diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c31b8a9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +config.js binary diff --git a/.gitignore b/.gitignore index 9ba7f7b..5c4c228 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ build/ .idea/ *.swp *.swo +.nvim.lua # OS files .DS_Store @@ -25,6 +26,7 @@ Thumbs.db # Python __pycache__/ +.venv/ *.py[cod] *$py.class *.so @@ -48,4 +50,4 @@ coverage.xml # Home Assistant configuration config/* -!config/configuration.yaml \ No newline at end of file +!config/configuration.yaml diff --git a/custom_components/rbac/__init__.py b/custom_components/rbac/__init__.py index 293e8ca..49eda36 100644 --- a/custom_components/rbac/__init__.py +++ b/custom_components/rbac/__init__.py @@ -1,7 +1,7 @@ """RBAC Middleware for Home Assistant.""" import logging import os -from typing import Any, Dict, Optional +from typing import Any, Dict, Optional, Callable from datetime import datetime import yaml @@ -68,7 +68,8 @@ def _load_file(): "services": ["host_reboot", "host_shutdown", "supervisor_update", "supervisor_restart"] } }, - "entities": {} + "entities": {}, + "panels": {} }, "users": {}, "roles": { @@ -111,6 +112,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: hass.data[DOMAIN]["original_async_call"] = hass.services.async_call _patch_service_registry(hass) + _patch_panel_list(hass) from . import services await services.async_setup_services(hass) @@ -121,9 +123,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: user_count = len(access_config.get("users", {})) _LOGGER.info(f"RBAC Middleware initialized successfully with {user_count} configured users") - - from .services import RBACConfigView, RBACUsersView, RBACDomainsView, RBACEntitiesView, RBACServicesView, RBACCurrentUserView, RBACSensorsView, RBACDenyLogView, RBACTemplateEvaluateView, RBACFrontendBlockingView, RBACYamlEditorView - + + from .services import RBACConfigView, RBACUsersView, RBACDomainsView, RBACEntitiesView, RBACPanelsView, RBACServicesView, RBACCurrentUserView, RBACSensorsView, RBACDenyLogView, RBACTemplateEvaluateView, RBACFrontendBlockingView, RBACYamlEditorView + hass.http.register_view(RBACConfigView()) hass.http.register_view(RBACUsersView()) hass.http.register_view(RBACDomainsView()) @@ -135,7 +137,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: hass.http.register_view(RBACTemplateEvaluateView()) hass.http.register_view(RBACFrontendBlockingView()) hass.http.register_view(RBACYamlEditorView()) - + hass.http.register_view(RBACPanelsView()) + _LOGGER.info("Registered RBAC API endpoints") await _register_sidebar_panel(hass) @@ -219,6 +222,102 @@ async def _setup_rbac_device(hass: HomeAssistant, config_entry): except Exception as e: _LOGGER.warning(f"Could not create device/sensors properly: {e}") +def _patch_panel_list(hass: HomeAssistant): + from homeassistant.components.websocket_api.const import DOMAIN as WS_DOMAIN + from homeassistant.components.websocket_api.connection import ActiveConnection + from homeassistant.core import callback + + class RBACFilterPanelActiveConnection: + "Wrapper for connection that filer restricted panels" + + __slots__ = [ + "hass", + "original_connection", + ] + + def __init__(self, hass: HomeAssistant, connection: ActiveConnection): + self.hass = hass + self.original_connection = connection + + def __getattr__(self, name): + return getattr(self.original_connection, name) + + def _send_filtered_data( + self, + data: dict[str, Any], + deny_all: bool, + rbac_include: set[str], + rbac_exclude: set[str], + ) -> None: + panels = data["result"] + + result = {} if deny_all else panels.copy() + + for key, value in panels.items(): + if key in rbac_include: + result[key] = value + elif key in rbac_exclude: + result.pop(key, None) + + data["result"] = result + return self.original_connection.send_message(data) + + def send_message(self, data: dict[str, Any]): + user = self.original_connection.user + user_id = user.id + access_config = self.hass.data.get(DOMAIN, {}).get("access_config", {}) + + rbac_enabled = access_config.get("enabled", True) + if not rbac_enabled: + _LOGGER.warning(f"RBAC is disabled - no filtering applied") + return self.original_connection.send_message(data) + + users = access_config.get("users", {}) + user_config = users.get(user_id) + + if not user_config: + default_config = access_config["default_restrictions"] + default_rbac_panels = default_config["panels"] + + rbac_exclude = set() + for key, access in default_rbac_panels.items(): + if access["hide"]: + rbac_exclude.add(key) + # Check default restrictions + return self._send_filtered_data(data, False, {}, rbac_exclude) + + user_role = user_config.get("role", "unknown") + + roles = access_config.get("roles", {}) + role_config = roles.get(user_role, {}) + + deny_all = role_config.get("deny_all", False) + rbac_panels = role_config.get("permissions", {}).get("panels", {}) + rbac_include = set() + rbac_exclude = set() + for key, access in rbac_panels.items(): + if access["allow"]: + rbac_include.add(key) + else: + rbac_exclude.add(key) + + self._send_filtered_data(data, deny_all, rbac_include, rbac_exclude) + + + @callback + def rbac_websocket_get_panels( + get_panel_func: Callable[[HomeAssistant, ActiveConnection, dict[str, Any]], None] + ) -> Callable[[HomeAssistant, ActiveConnection, dict[str, Any]], None]: + def wrapper( + hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any] + ) -> None: + new_connection = RBACFilterPanelActiveConnection(hass, connection) + get_panel_func(hass, new_connection, msg) + + return wrapper + + original_panel_handler, schema = hass.data[WS_DOMAIN]["get_panels"] + hass.data[WS_DOMAIN]["get_panels"] = rbac_websocket_get_panels(original_panel_handler), schema def _patch_service_registry(hass: HomeAssistant): """Patch the service registry to intercept service calls.""" diff --git a/custom_components/rbac/access_control.yaml b/custom_components/rbac/access_control.yaml index 615fc51..8786d44 100644 --- a/custom_components/rbac/access_control.yaml +++ b/custom_components/rbac/access_control.yaml @@ -30,6 +30,7 @@ default_restrictions: - supervisor_update - supervisor_restart entities: {} + panels: {} users: {} roles: admin: @@ -37,4 +38,4 @@ roles: user: description: Standard user with limited permissions guest: - description: Guest with minimal permissions \ No newline at end of file + description: Guest with minimal permissions diff --git a/custom_components/rbac/services.py b/custom_components/rbac/services.py index 6d4c733..6fc251c 100644 --- a/custom_components/rbac/services.py +++ b/custom_components/rbac/services.py @@ -12,6 +12,7 @@ from homeassistant.helpers import config_validation as cv from homeassistant.util.json import JsonObjectType from homeassistant.components.http import HomeAssistantView +from homeassistant.components.frontend import DATA_PANELS from aiohttp import web from . import ( @@ -728,6 +729,36 @@ async def get(self, request): return self.json({"error": str(e)}, status_code=500) +class RBACPanelsView(HomeAssistantView): + """Handle RBAC panels API requests.""" + + url = "/api/rbac/panels" + name = "api:rbac:panels" + requires_auth = True + + async def get(self, request): + """Get all available entities.""" + hass = request.app["hass"] + user = request["hass_user"] + + # Check admin permissions + if not await _is_admin_user(hass, user.id): + return self.json({ + "error": "Admin access required", + "message": "Only administrators can access entity information", + "redirect_url": "/" + }, status_code=403) + + try: + all_panels = hass.data[DATA_PANELS] + panels = [key for key in all_panels.keys()] + + return self.json(sorted(panels)) + except Exception as e: + _LOGGER.error(f"Error getting panels: {e}") + return self.json({"error": str(e)}, status_code=500) + + class RBACServicesView(HomeAssistantView): """Handle RBAC services API requests.""" diff --git a/custom_components/rbac/www/config.js b/custom_components/rbac/www/config.js index 6d5fb06..2eb4584 100644 --- a/custom_components/rbac/www/config.js +++ b/custom_components/rbac/www/config.js @@ -1,8 +1,8 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var pc,St,Zx,Uo,CO,qx,Gx,Yx,iv,Dp,Bp,Ux,Al={},Kx=[],gR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,mc=Array.isArray;function Di(t,e){for(var n in e)t[n]=e[n];return t}function ov(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function y(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?pc.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return Ol(t,a,r,i,null)}function Ol(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Zx,__i:-1,__u:0};return i==null&&St.vnode!=null&&St.vnode(o),o}function av(){return{current:null}}function At(t){return t.children}function er(t,e){this.props=t,this.context=e}function fs(t,e){if(e==null)return t.__?fs(t.__,t.__i+1):null;for(var n;es&&Uo.sort(Gx),t=Uo.shift(),s=Uo.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],a=[],e.__P&&((n=Di({},r)).__v=r.__v+1,St.vnode&&St.vnode(n),sv(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??fs(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,nC(o,n,a),r.__e=r.__=null,n.__e!=i&&Jx(n)));cd.__r=0}function eC(t,e,n,r,i,o,a,s,l,c,u){var d,f,h,p,m,g,v,O=r&&r.__k||Kx,S=e.length;for(l=vR(n,e,O,l,S),d=0;d0?Ol(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(c=a.__i=OR(a,n,l,d))!=-1&&(d--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(i>u?f--:il?f--:f++,a.__u|=4))):t.__k[o]=null;if(d)for(o=0;o(u?1:0)){for(i=n-1,o=n+1;i>=0||o=0?i--:o++])!=null&&!(2&c.__u)&&s==c.key&&l==c.type)return a}return-1}function $O(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||gR.test(e)?n:n+"px"}function Zc(t,e,n,r,i){var o,a;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||$O(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||$O(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Yx,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=iv,t.addEventListener(e,o?Bp:Dp,o)):t.removeEventListener(e,o?Bp:Dp,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function wO(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=iv++;else if(e.t0?t:mc(t)?t.map(rC):Di({},t)}function bR(t,e,n,r,i,o,a,s,l){var c,u,d,f,h,p,m,g=n.props,v=e.props,O=e.type;if(O=="svg"?i="http://www.w3.org/2000/svg":O=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c2&&(s.children=arguments.length>3?pc.call(arguments,2):n),Ol(t.type,s,r||t.key,i||t.ref,null)}function bt(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(a){a.__e=!0,Wp(a)})},this.sub=function(o){r.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),a&&a.call(o)}}),n.children}return e.__c="__cC"+Ux++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}pc=Kx.slice,St={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},Zx=0,er.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Di({},this.state),typeof t=="function"&&(t=t(Di({},n),this.props)),t&&Di(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Wp(this))},er.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Wp(this))},er.prototype.render=At,Uo=[],qx=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gx=function(t,e){return t.__v.__b-e.__v.__b},cd.__r=0,Yx=/(PointerCapture)$|Capture$/i,iv=0,Dp=wO(!1),Bp=wO(!0),Ux=0;var xR=0;function A(t,e,n,r,i,o){e||(e={});var a,s,l=e;if("ref"in l)for(s in l={},e)s=="ref"?a=e[s]:l[s]=e[s];var c={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--xR,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return St.vnode&&St.vnode(c),c}var co,sn,mh,PO,ps=0,aC=[],$n=St,_O=$n.__b,TO=$n.__r,kO=$n.diffed,RO=$n.__c,IO=$n.unmount,MO=$n.__;function _a(t,e){$n.__h&&$n.__h(sn,t,ps||e),ps=0;var n=sn.__H||(sn.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function J(t){return ps=1,Ms(sC,t)}function Ms(t,e,n){var r=_a(co++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):sC(void 0,e),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=sn,!sn.__f)){var i=function(s,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(f){return!!f.__c});if(u.every(function(f){return!f.__N}))return!o||o.call(this,s,l,c);var d=r.__c.props!==s;return u.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(d=!0)}}),o&&o.call(this,s,l,c)||d};sn.__f=!0;var o=sn.shouldComponentUpdate,a=sn.componentWillUpdate;sn.componentWillUpdate=function(s,l,c){if(this.__e){var u=o;o=void 0,i(s,l,c),o=u}a&&a.call(this,s,l,c)},sn.shouldComponentUpdate=i}return r.__N||r.__}function be(t,e){var n=_a(co++,3);!$n.__s&&dv(n.__H,e)&&(n.__=t,n.u=e,sn.__H.__h.push(n))}function Ti(t,e){var n=_a(co++,4);!$n.__s&&dv(n.__H,e)&&(n.__=t,n.u=e,sn.__h.push(n))}function U(t){return ps=5,ge(function(){return{current:t}},[])}function Yt(t,e,n){ps=6,Ti(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function ge(t,e){var n=_a(co++,7);return dv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ht(t,e){return ps=8,ge(function(){return t},e)}function fe(t){var e=sn.context[t.__c],n=_a(co++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(sn)),e.props.value):t.__}function cv(t,e){$n.useDebugValue&&$n.useDebugValue(e?e(t):t)}function CR(t){var e=_a(co++,10),n=J();return e.__=t,sn.componentDidCatch||(sn.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function uv(){var t=_a(co++,11);if(!t.__){for(var e=sn.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function $R(){for(var t;t=aC.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Au),t.__H.__h.forEach(Vp),t.__H.__h=[]}catch(e){t.__H.__h=[],$n.__e(e,t.__v)}}$n.__b=function(t){sn=null,_O&&_O(t)},$n.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),MO&&MO(t,e)},$n.__r=function(t){TO&&TO(t),co=0;var e=(sn=t.__c).__H;e&&(mh===sn?(e.__h=[],sn.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Au),e.__h.forEach(Vp),e.__h=[],co=0)),mh=sn},$n.diffed=function(t){kO&&kO(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(aC.push(e)!==1&&PO===$n.requestAnimationFrame||((PO=$n.requestAnimationFrame)||wR)($R)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),mh=sn=null},$n.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Au),n.__h=n.__h.filter(function(r){return!r.__||Vp(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],$n.__e(r,n.__v)}}),RO&&RO(t,e)},$n.unmount=function(t){IO&&IO(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Au(r)}catch(i){e=i}}),n.__H=void 0,e&&$n.__e(e,n.__v))};var EO=typeof requestAnimationFrame=="function";function wR(t){var e,n=function(){clearTimeout(r),EO&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);EO&&(e=requestAnimationFrame(n))}function Au(t){var e=sn,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),sn=e}function Vp(t){var e=sn;t.__c=t.__(),sn=e}function dv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function sC(t,e){return typeof e=="function"?e(t):e}function lC(t,e){for(var n in e)t[n]=e[n];return t}function Hp(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function fv(t,e){var n=e(),r=J({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Ti(function(){i.__=n,i.u=e,gh(i)&&o({t:i})},[t,n,e]),be(function(){return gh(i)&&o({t:i}),t(function(){gh(i)&&o({t:i})})},[t]),n}function gh(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function hv(t){t()}function pv(t){return t}function mv(){return[!1,hv]}var gv=Ti;function ud(t,e){this.props=t,this.context=e}function Ta(t,e){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!a:Hp(this.props,i)}function r(i){return this.shouldComponentUpdate=n,y(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(ud.prototype=new er).isPureReactComponent=!0,ud.prototype.shouldComponentUpdate=function(t,e){return Hp(this.props,t)||Hp(this.state,e)};var AO=St.__b;St.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),AO&&AO(t)};var PR=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Se(t){function e(n){var r=lC({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=PR,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var QO=function(t,e){return t==null?null:ao(ao(t).map(e))},Ao={map:QO,forEach:QO,count:function(t){return t?ao(t).length:0},only:function(t){var e=ao(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ao},_R=St.__e;St.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}_R(t,e,n,r)};var NO=St.unmount;function cC(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=lC({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return cC(r,e,n)})),t}function uC(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return uC(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function bl(){this.__u=0,this.o=null,this.__b=null}function dC(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function fC(t){var e,n,r;function i(o){if(e||(e=t()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw e;return y(n,o)}return i.displayName="Lazy",i.__f=!0,i}function qa(){this.i=null,this.l=null}St.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),NO&&NO(t)},(bl.prototype=new er).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=dC(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=uC(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},bl.prototype.componentWillUnmount=function(){this.o=[]},bl.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=cC(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&y(At,null,t.fallback);return i&&(i.__u&=-33),[y(At,null,e.__a?null:t.children),i]};var zO=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.h.removeChild(i)}}}hs(y(TR,{context:e.context},t.__v),e.v)}function lf(t,e){var n=y(kR,{__v:t,h:e});return n.containerInfo=e,n}(qa.prototype=new er).__a=function(t){var e=this,n=dC(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),zO(e,t,r)):i()};n?n(o):o()}},qa.prototype.render=function(t){this.i=null,this.l=new Map;var e=ao(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},qa.prototype.componentDidUpdate=qa.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){zO(t,n,e)})};var hC=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,RR=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,IR=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,MR=/[A-Z0-9]/g,ER=typeof document<"u",AR=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function pC(t,e,n){return e.__k==null&&(e.textContent=""),hs(t,e),typeof n=="function"&&n(),t?t.__c:null}function mC(t,e,n){return oC(t,e),typeof n=="function"&&n(),t?t.__c:null}er.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(er.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var LO=St.event;function QR(){}function NR(){return this.cancelBubble}function zR(){return this.defaultPrevented}St.event=function(t){return LO&&(t=LO(t)),t.persist=QR,t.isPropagationStopped=NR,t.isDefaultPrevented=zR,t.nativeEvent=t};var vv,LR={enumerable:!1,configurable:!0,get:function(){return this.class}},jO=St.vnode;St.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||ER&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||AR(n.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":IR.test(a)&&(a=l):l=a="oninput":o&&RR.test(a)?a=a.replace(MR,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=ao(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=ao(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",LR)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=hC,jO&&jO(t)};var DO=St.__r;St.__r=function(t){DO&&DO(t),vv=t.__c};var BO=St.diffed;St.diffed=function(t){BO&&BO(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),vv=null};var gC={ReactCurrentDispatcher:{current:{readContext:function(t){return vv.__n[t.__c].props.value},useCallback:Ht,useContext:fe,useDebugValue:cv,useDeferredValue:pv,useEffect:be,useId:uv,useImperativeHandle:Yt,useInsertionEffect:gv,useLayoutEffect:Ti,useMemo:ge,useReducer:Ms,useRef:U,useState:J,useSyncExternalStore:fv,useTransition:mv}}},vC="18.3.1";function OC(t){return y.bind(null,t)}function Kt(t){return!!t&&t.$$typeof===hC}function bC(t){return Kt(t)&&t.type===At}function yC(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Xn(t){return Kt(t)?SR.apply(null,arguments):t}function SC(t){return!!t.__k&&(hs(null,t),!0)}function xC(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ov=function(t,e){return t(e)},Ql=function(t,e){return t(e)},CC=At,$C=Kt,oe={useState:J,useId:uv,useReducer:Ms,useEffect:be,useLayoutEffect:Ti,useInsertionEffect:gv,useTransition:mv,useDeferredValue:pv,useSyncExternalStore:fv,startTransition:hv,useRef:U,useImperativeHandle:Yt,useMemo:ge,useCallback:Ht,useContext:fe,useDebugValue:cv,version:"18.3.1",Children:Ao,render:pC,hydrate:mC,unmountComponentAtNode:SC,createPortal:lf,createElement:y,createContext:bt,createFactory:OC,cloneElement:Xn,createRef:av,Fragment:At,isValidElement:Kt,isElement:$C,isFragment:bC,isMemo:yC,findDOMNode:xC,Component:er,PureComponent:ud,memo:Ta,forwardRef:Se,flushSync:Ql,unstable_batchedUpdates:Ov,StrictMode:CC,Suspense:bl,SuspenseList:qa,lazy:fC,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gC};const gc=Object.freeze(Object.defineProperty({__proto__:null,Children:Ao,Component:er,Fragment:At,PureComponent:ud,StrictMode:CC,Suspense:bl,SuspenseList:qa,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gC,cloneElement:Xn,createContext:bt,createElement:y,createFactory:OC,createPortal:lf,createRef:av,default:oe,findDOMNode:xC,flushSync:Ql,forwardRef:Se,hydrate:mC,isElement:$C,isFragment:bC,isMemo:yC,isValidElement:Kt,lazy:fC,memo:Ta,render:pC,startTransition:hv,unmountComponentAtNode:SC,unstable_batchedUpdates:Ov,useCallback:Ht,useContext:fe,useDebugValue:cv,useDeferredValue:pv,useEffect:be,useErrorBoundary:CR,useId:uv,useImperativeHandle:Yt,useInsertionEffect:gv,useLayoutEffect:Ti,useMemo:ge,useReducer:Ms,useRef:U,useState:J,useSyncExternalStore:fv,useTransition:mv,version:vC},Symbol.toStringTag,{value:"Module"}));function wC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var PC={exports:{}};/*! +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var pc,xt,Zx,Ko,$O,qx,Gx,Yx,ov,Wp,Fp,Ux,Al={},Kx=[],gR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,mc=Array.isArray;function Di(t,e){for(var n in e)t[n]=e[n];return t}function av(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function y(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?pc.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return Ol(t,a,r,i,null)}function Ol(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Zx,__i:-1,__u:0};return i==null&&xt.vnode!=null&&xt.vnode(o),o}function sv(){return{current:null}}function At(t){return t.children}function tr(t,e){this.props=t,this.context=e}function hs(t,e){if(e==null)return t.__?hs(t.__,t.__i+1):null;for(var n;es&&Ko.sort(Gx),t=Ko.shift(),s=Ko.length,t.__d&&(n=void 0,r=void 0,i=(r=(e=t).__v).__e,o=[],a=[],e.__P&&((n=Di({},r)).__v=r.__v+1,xt.vnode&&xt.vnode(n),lv(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i??hs(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,nC(o,n,a),r.__e=r.__=null,n.__e!=i&&Jx(n)));dd.__r=0}function eC(t,e,n,r,i,o,a,s,l,c,u){var d,f,h,p,m,g,v,O=r&&r.__k||Kx,S=e.length;for(l=vR(n,e,O,l,S),d=0;d0?Ol(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(c=a.__i=OR(a,n,l,d))!=-1&&(d--,(s=n[c])&&(s.__u|=2)),s==null||s.__v==null?(c==-1&&(i>u?f--:il?f--:f++,a.__u|=4))):t.__k[o]=null;if(d)for(o=0;o(u?1:0)){for(i=n-1,o=n+1;i>=0||o=0?i--:o++])!=null&&!(2&c.__u)&&s==c.key&&l==c.type)return a}return-1}function wO(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||gR.test(e)?n:n+"px"}function Zc(t,e,n,r,i){var o,a;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||wO(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||wO(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Yx,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=ov,t.addEventListener(e,o?Fp:Wp,o)):t.removeEventListener(e,o?Fp:Wp,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function PO(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ov++;else if(e.t0?t:mc(t)?t.map(rC):Di({},t)}function bR(t,e,n,r,i,o,a,s,l){var c,u,d,f,h,p,m,g=n.props,v=e.props,O=e.type;if(O=="svg"?i="http://www.w3.org/2000/svg":O=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c2&&(s.children=arguments.length>3?pc.call(arguments,2):n),Ol(t.type,s,r||t.key,i||t.ref,null)}function yt(t){function e(n){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(a){a.__e=!0,Vp(a)})},this.sub=function(o){r.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),a&&a.call(o)}}),n.children}return e.__c="__cC"+Ux++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}pc=Kx.slice,xt={__e:function(t,e,n,r){for(var i,o,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},Zx=0,tr.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Di({},this.state),typeof t=="function"&&(t=t(Di({},n),this.props)),t&&Di(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Vp(this))},tr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Vp(this))},tr.prototype.render=At,Ko=[],qx=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gx=function(t,e){return t.__v.__b-e.__v.__b},dd.__r=0,Yx=/(PointerCapture)$|Capture$/i,ov=0,Wp=PO(!1),Fp=PO(!0),Ux=0;var xR=0;function M(t,e,n,r,i,o){e||(e={});var a,s,l=e;if("ref"in l)for(s in l={},e)s=="ref"?a=e[s]:l[s]=e[s];var c={type:t,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--xR,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return xt.vnode&&xt.vnode(c),c}var co,sn,vh,_O,ms=0,aC=[],$n=xt,TO=$n.__b,kO=$n.__r,RO=$n.diffed,IO=$n.__c,MO=$n.unmount,EO=$n.__;function ka(t,e){$n.__h&&$n.__h(sn,t,ms||e),ms=0;var n=sn.__H||(sn.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function K(t){return ms=1,Ms(sC,t)}function Ms(t,e,n){var r=ka(co++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):sC(void 0,e),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=sn,!sn.__f)){var i=function(s,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(f){return!!f.__c});if(u.every(function(f){return!f.__N}))return!o||o.call(this,s,l,c);var d=r.__c.props!==s;return u.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(d=!0)}}),o&&o.call(this,s,l,c)||d};sn.__f=!0;var o=sn.shouldComponentUpdate,a=sn.componentWillUpdate;sn.componentWillUpdate=function(s,l,c){if(this.__e){var u=o;o=void 0,i(s,l,c),o=u}a&&a.call(this,s,l,c)},sn.shouldComponentUpdate=i}return r.__N||r.__}function be(t,e){var n=ka(co++,3);!$n.__s&&fv(n.__H,e)&&(n.__=t,n.u=e,sn.__H.__h.push(n))}function Ti(t,e){var n=ka(co++,4);!$n.__s&&fv(n.__H,e)&&(n.__=t,n.u=e,sn.__h.push(n))}function Y(t){return ms=5,me(function(){return{current:t}},[])}function Yt(t,e,n){ms=6,Ti(function(){if(typeof t=="function"){var r=t(e());return function(){t(null),r&&typeof r=="function"&&r()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function me(t,e){var n=ka(co++,7);return fv(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ht(t,e){return ms=8,me(function(){return t},e)}function de(t){var e=sn.context[t.__c],n=ka(co++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(sn)),e.props.value):t.__}function uv(t,e){$n.useDebugValue&&$n.useDebugValue(e?e(t):t)}function CR(t){var e=ka(co++,10),n=K();return e.__=t,sn.componentDidCatch||(sn.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function dv(){var t=ka(co++,11);if(!t.__){for(var e=sn.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function $R(){for(var t;t=aC.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Qu),t.__H.__h.forEach(Xp),t.__H.__h=[]}catch(e){t.__H.__h=[],$n.__e(e,t.__v)}}$n.__b=function(t){sn=null,TO&&TO(t)},$n.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),EO&&EO(t,e)},$n.__r=function(t){kO&&kO(t),co=0;var e=(sn=t.__c).__H;e&&(vh===sn?(e.__h=[],sn.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(Qu),e.__h.forEach(Xp),e.__h=[],co=0)),vh=sn},$n.diffed=function(t){RO&&RO(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(aC.push(e)!==1&&_O===$n.requestAnimationFrame||((_O=$n.requestAnimationFrame)||wR)($R)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),vh=sn=null},$n.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Qu),n.__h=n.__h.filter(function(r){return!r.__||Xp(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],$n.__e(r,n.__v)}}),IO&&IO(t,e)},$n.unmount=function(t){MO&&MO(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Qu(r)}catch(i){e=i}}),n.__H=void 0,e&&$n.__e(e,n.__v))};var AO=typeof requestAnimationFrame=="function";function wR(t){var e,n=function(){clearTimeout(r),AO&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);AO&&(e=requestAnimationFrame(n))}function Qu(t){var e=sn,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),sn=e}function Xp(t){var e=sn;t.__c=t.__(),sn=e}function fv(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function sC(t,e){return typeof e=="function"?e(t):e}function lC(t,e){for(var n in e)t[n]=e[n];return t}function Zp(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function hv(t,e){var n=e(),r=K({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Ti(function(){i.__=n,i.u=e,Oh(i)&&o({t:i})},[t,n,e]),be(function(){return Oh(i)&&o({t:i}),t(function(){Oh(i)&&o({t:i})})},[t]),n}function Oh(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function pv(t){t()}function mv(t){return t}function gv(){return[!1,pv]}var vv=Ti;function fd(t,e){this.props=t,this.context=e}function Ra(t,e){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!a:Zp(this.props,i)}function r(i){return this.shouldComponentUpdate=n,y(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(fd.prototype=new tr).isPureReactComponent=!0,fd.prototype.shouldComponentUpdate=function(t,e){return Zp(this.props,t)||Zp(this.state,e)};var QO=xt.__b;xt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),QO&&QO(t)};var PR=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ye(t){function e(n){var r=lC({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=PR,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var NO=function(t,e){return t==null?null:ao(ao(t).map(e))},Qo={map:NO,forEach:NO,count:function(t){return t?ao(t).length:0},only:function(t){var e=ao(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ao},_R=xt.__e;xt.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}_R(t,e,n,r)};var zO=xt.unmount;function cC(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=lC({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return cC(r,e,n)})),t}function uC(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return uC(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function bl(){this.__u=0,this.o=null,this.__b=null}function dC(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function fC(t){var e,n,r;function i(o){if(e||(e=t()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw e;return y(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Ya(){this.i=null,this.l=null}xt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),zO&&zO(t)},(bl.prototype=new tr).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=dC(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=uC(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},bl.prototype.componentWillUnmount=function(){this.o=[]},bl.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=cC(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&y(At,null,t.fallback);return i&&(i.__u&=-33),[y(At,null,e.__a?null:t.children),i]};var LO=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.h.removeChild(i)}}}ps(y(TR,{context:e.context},t.__v),e.v)}function uf(t,e){var n=y(kR,{__v:t,h:e});return n.containerInfo=e,n}(Ya.prototype=new tr).__a=function(t){var e=this,n=dC(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),LO(e,t,r)):i()};n?n(o):o()}},Ya.prototype.render=function(t){this.i=null,this.l=new Map;var e=ao(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Ya.prototype.componentDidUpdate=Ya.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){LO(t,n,e)})};var hC=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,RR=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,IR=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,MR=/[A-Z0-9]/g,ER=typeof document<"u",AR=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function pC(t,e,n){return e.__k==null&&(e.textContent=""),ps(t,e),typeof n=="function"&&n(),t?t.__c:null}function mC(t,e,n){return oC(t,e),typeof n=="function"&&n(),t?t.__c:null}tr.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(tr.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var jO=xt.event;function QR(){}function NR(){return this.cancelBubble}function zR(){return this.defaultPrevented}xt.event=function(t){return jO&&(t=jO(t)),t.persist=QR,t.isPropagationStopped=NR,t.isDefaultPrevented=zR,t.nativeEvent=t};var Ov,LR={enumerable:!1,configurable:!0,get:function(){return this.class}},DO=xt.vnode;xt.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||ER&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||AR(n.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":IR.test(a)&&(a=l):l=a="oninput":o&&RR.test(a)?a=a.replace(MR,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=ao(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=ao(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",LR)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=hC,DO&&DO(t)};var BO=xt.__r;xt.__r=function(t){BO&&BO(t),Ov=t.__c};var WO=xt.diffed;xt.diffed=function(t){WO&&WO(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),Ov=null};var gC={ReactCurrentDispatcher:{current:{readContext:function(t){return Ov.__n[t.__c].props.value},useCallback:Ht,useContext:de,useDebugValue:uv,useDeferredValue:mv,useEffect:be,useId:dv,useImperativeHandle:Yt,useInsertionEffect:vv,useLayoutEffect:Ti,useMemo:me,useReducer:Ms,useRef:Y,useState:K,useSyncExternalStore:hv,useTransition:gv}}},vC="18.3.1";function OC(t){return y.bind(null,t)}function Jt(t){return!!t&&t.$$typeof===hC}function bC(t){return Jt(t)&&t.type===At}function yC(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Zn(t){return Jt(t)?SR.apply(null,arguments):t}function SC(t){return!!t.__k&&(ps(null,t),!0)}function xC(t){return t&&(t.base||t.nodeType===1&&t)||null}var bv=function(t,e){return t(e)},Ql=function(t,e){return t(e)},CC=At,$C=Jt,oe={useState:K,useId:dv,useReducer:Ms,useEffect:be,useLayoutEffect:Ti,useInsertionEffect:vv,useTransition:gv,useDeferredValue:mv,useSyncExternalStore:hv,startTransition:pv,useRef:Y,useImperativeHandle:Yt,useMemo:me,useCallback:Ht,useContext:de,useDebugValue:uv,version:"18.3.1",Children:Qo,render:pC,hydrate:mC,unmountComponentAtNode:SC,createPortal:uf,createElement:y,createContext:yt,createFactory:OC,cloneElement:Zn,createRef:sv,Fragment:At,isValidElement:Jt,isElement:$C,isFragment:bC,isMemo:yC,findDOMNode:xC,Component:tr,PureComponent:fd,memo:Ra,forwardRef:ye,flushSync:Ql,unstable_batchedUpdates:bv,StrictMode:CC,Suspense:bl,SuspenseList:Ya,lazy:fC,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gC};const gc=Object.freeze(Object.defineProperty({__proto__:null,Children:Qo,Component:tr,Fragment:At,PureComponent:fd,StrictMode:CC,Suspense:bl,SuspenseList:Ya,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:gC,cloneElement:Zn,createContext:yt,createElement:y,createFactory:OC,createPortal:uf,createRef:sv,default:oe,findDOMNode:xC,flushSync:Ql,forwardRef:ye,hydrate:mC,isElement:$C,isFragment:bC,isMemo:yC,isValidElement:Jt,lazy:fC,memo:Ra,render:pC,startTransition:pv,unmountComponentAtNode:SC,unstable_batchedUpdates:bv,useCallback:Ht,useContext:de,useDebugValue:uv,useDeferredValue:mv,useEffect:be,useErrorBoundary:CR,useId:dv,useImperativeHandle:Yt,useInsertionEffect:vv,useLayoutEffect:Ti,useMemo:me,useReducer:Ms,useRef:Y,useState:K,useSyncExternalStore:hv,useTransition:gv,version:vC},Symbol.toStringTag,{value:"Module"}));function wC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var PC={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",a=0;a1&&arguments[1]!==void 0?arguments[1]:{},n=[];return oe.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(nr(r)):_C(r)&&r.props?n=n.concat(nr(r.props.children,e)):n.push(r))}),n}var Xp={},FR=function(e){};function VR(t,e){}function HR(t,e){}function XR(){Xp={}}function TC(t,e,n){!e&&!Xp[n]&&(t(!1,n),Xp[n]=!0)}function tr(t,e){TC(VR,t,e)}function ZR(t,e){TC(HR,t,e)}tr.preMessage=FR;tr.resetWarned=XR;tr.noteOnce=ZR;function qR(t,e){if(Je(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Je(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kC(t){var e=qR(t,"string");return Je(e)=="symbol"?e:e+""}function D(t,e,n){return(e=kC(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function WO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{},n=[];return oe.Children.forEach(t,function(r){r==null&&!e.keepEmpty||(Array.isArray(r)?n=n.concat(rr(r)):_C(r)&&r.props?n=n.concat(rr(r.props.children,e)):n.push(r))}),n}var qp={},FR=function(e){};function VR(t,e){}function HR(t,e){}function XR(){qp={}}function TC(t,e,n){!e&&!qp[n]&&(t(!1,n),qp[n]=!0)}function nr(t,e){TC(VR,t,e)}function ZR(t,e){TC(HR,t,e)}nr.preMessage=FR;nr.resetWarned=XR;nr.noteOnce=ZR;function qR(t,e){if(tt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(tt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kC(t){var e=qR(t,"string");return tt(e)=="symbol"?e:e+""}function D(t,e,n){return(e=kC(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FO(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e=19)return!0;var i=vh.isMemo(e)?e.type.type:e.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==vh.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==vh.ForwardRef)};function xv(t){return Kt(t)&&!_C(t)}var KR=function(e){return xv(e)&&vo(e)},Ho=function(e){if(e&&xv(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},Zp=bt(null);function JR(t){var e=t.children,n=t.onBatchResize,r=U(0),i=U([]),o=fe(Zp),a=Ht(function(s,l,c){r.current+=1;var u=r.current;i.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(s,l,c)},[n,o]);return y(Zp.Provider,{value:a},e)}var EC=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i0},t.prototype.connect_=function(){!qp||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),oI?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!qp||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=iI.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),AC=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof ms(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new pI(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ms(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new mI(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),NC=typeof WeakMap<"u"?new WeakMap:new EC,zC=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=aI.getInstance(),r=new gI(e,n,this);NC.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){zC.prototype[t]=function(){var e;return(e=NC.get(this))[t].apply(e,arguments)}});var vI=function(){return typeof dd.ResizeObserver<"u"?dd.ResizeObserver:zC}(),_o=new Map;function OI(t){t.forEach(function(e){var n,r=e.target;(n=_o.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var LC=new vI(OI);function bI(t,e){_o.has(t)||(_o.set(t,new Set),LC.observe(t)),_o.get(t).add(e)}function yI(t,e){_o.has(t)&&(_o.get(t).delete(e),_o.get(t).size||(LC.unobserve(t),_o.delete(t)))}function Mn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function VO(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&arguments[1]!==void 0?arguments[1]:1;HO+=1;var r=HO;function i(o){if(o===0)FC(r),e();else{var a=BC(function(){i(o-1)});$v.set(r,a)}}return i(n),r};Xt.cancel=function(t){var e=$v.get(t);return FC(t),WC(e)};function VC(t){if(Array.isArray(t))return t}function TI(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function HC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(t,e){return VC(t)||TI(t,e)||Cv(t,e)||HC()}function Ll(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function dr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Yp(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var XO="data-rc-order",ZO="data-rc-priority",kI="rc-util-key",Up=new Map;function XC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):kI}function Sf(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function RI(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function wv(t){return Array.from((Up.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function ZC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!dr())return null;var n=e.csp,r=e.prepend,i=e.priority,o=i===void 0?0:i,a=RI(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(XO,a),s&&o&&l.setAttribute(ZO,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Sf(e),u=c.firstChild;if(r){if(s){var d=(e.styles||wv(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(XO)))return!1;var h=Number(f.getAttribute(ZO)||0);return o>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function qC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Sf(e);return(e.styles||wv(n)).find(function(r){return r.getAttribute(XC(e))===t})}function jl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=qC(t,e);if(n){var r=Sf(e);r.removeChild(n)}}function II(t,e){var n=Up.get(t);if(!n||!Yp(document,n)){var r=ZC("",e),i=r.parentNode;Up.set(t,i),t.removeChild(r)}}function so(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Sf(n),i=wv(r),o=W(W({},n),{},{styles:i});II(r,o);var a=qC(e,o);if(a){var s,l;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==t&&(a.innerHTML=t),a}var u=ZC(t,o);return u.setAttribute(XC(o),e),u}function GC(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function ut(t,e){if(t==null)return{};var n,r,i=GC(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(o);if(tr(!l,"Warning: There may be circular references"),l)return!1;if(o===a)return!0;if(n&&s>1)return!1;r.add(o);var c=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var i=this;if(!this.has(n)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(c,u){var d=ae(c,2),f=d[1];return i.internalGet(u)[1]0,void 0),qO+=1}return En(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,i){return i(n,r)},void 0)}}]),t}(),Oh=new Pv;function Jp(t){var e=Array.isArray(t)?t:[t];return Oh.has(e)||Oh.set(e,new YC(e)),Oh.get(e)}var NI=new WeakMap,bh={};function zI(t,e){for(var n=NI,r=0;r3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return t;var o=W(W({},r),{},D(D({},gs,e),Si,n)),a=Object.keys(o).map(function(s){var l=o[s];return l?"".concat(s,'="').concat(l,'"'):null}).filter(function(s){return s}).join(" ");return"")}var Nu=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},LI=function(e,n,r){return Object.keys(e).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(i){var o=ae(i,2),a=o[0],s=o[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},UC=function(e,n,r){var i={},o={};return Object.entries(e).forEach(function(a){var s,l,c=ae(a,2),u=c[0],d=c[1];if(r!=null&&(s=r.preserve)!==null&&s!==void 0&&s[u])o[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,h=Nu(u,r==null?void 0:r.prefix);i[h]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),o[u]="var(".concat(h,")")}}),[o,LI(i,n,{scope:r==null?void 0:r.scope})]},UO=dr()?Ti:be,Nt=function(e,n){var r=U(!0);UO(function(){return e(r.current)},n),UO(function(){return r.current=!1,function(){r.current=!0}},[])},tm=function(e,n){Nt(function(r){if(!r)return e()},n)},jI=W({},gc),KO=jI.useInsertionEffect,DI=function(e,n,r){ge(e,r),Nt(function(){return n(!0)},r)},BI=KO?function(t,e,n){return KO(function(){return t(),e()},n)}:DI,WI=W({},gc),FI=WI.useInsertionEffect,VI=function(e){var n=[],r=!1;function i(o){r||n.push(o)}return be(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(o){return o()})}},e),i},HI=function(){return function(e){e()}},XI=typeof FI<"u"?VI:HI;function _v(t,e,n,r,i){var o=fe(Oc),a=o.cache,s=[t].concat($e(e)),l=Kp(s),c=XI([l]),u=function(p){a.opUpdate(l,function(m){var g=m||[void 0,void 0],v=ae(g,2),O=v[0],S=O===void 0?0:O,x=v[1],b=x,C=b||n(),$=[S,C];return p?p($):$})};ge(function(){u()},[l]);var d=a.opGet(l),f=d[1];return BI(function(){i==null||i(f)},function(h){return u(function(p){var m=ae(p,2),g=m[0],v=m[1];return h&&g===0&&(i==null||i(f)),[g+1,v]}),function(){a.opUpdate(l,function(p){var m=p||[],g=ae(m,2),v=g[0],O=v===void 0?0:v,S=g[1],x=O-1;return x===0?(c(function(){(h||!a.opGet(l))&&(r==null||r(S,!1))}),null):[O-1,S]})}},[l]),f}var ZI={},qI="css",Ko=new Map;function GI(t){Ko.set(t,(Ko.get(t)||0)+1)}function YI(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(gs,'="').concat(t,'"]'));n.forEach(function(r){if(r[To]===e){var i;(i=r.parentNode)===null||i===void 0||i.removeChild(r)}})}}var UI=0;function KI(t,e){Ko.set(t,(Ko.get(t)||0)-1);var n=new Set;Ko.forEach(function(r,i){r<=0&&n.add(i)}),Ko.size-n.size>UI&&n.forEach(function(r){YI(r,e),Ko.delete(r)})}var JI=function(e,n,r,i){var o=r.getDerivativeToken(e),a=W(W({},o),n);return i&&(a=i(a)),a},KC="token";function eM(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=fe(Oc),i=r.cache.instanceId,o=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?ZI:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,h=zI(function(){return Object.assign.apply(Object,[{}].concat($e(e)))},e),p=yl(h),m=yl(c),g=f?yl(f):"",v=_v(KC,[s,t.id,p,m,g],function(){var O,S=d?d(h,c,t):JI(h,c,t,u),x=W({},S),b="";if(f){var C=UC(S,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),$=ae(C,2);S=$[0],b=$[1]}var w=YO(S,s);S._tokenKey=w,x._tokenKey=YO(x,s);var P=(O=f==null?void 0:f.key)!==null&&O!==void 0?O:w;S._themeKey=P,GI(P);var _="".concat(qI,"-").concat(Ll(w));return S._hashId=_,[S,_,x,b,(f==null?void 0:f.key)||""]},function(O){KI(O[0]._themeKey,i)},function(O){var S=ae(O,4),x=S[0],b=S[3];if(f&&b){var C=so(b,Ll("css-variables-".concat(x._themeKey)),{mark:Si,prepend:"queue",attachTo:o,priority:-999});C[To]=i,C.setAttribute(gs,x._themeKey)}});return v}var tM=function(e,n,r){var i=ae(e,5),o=i[2],a=i[3],s=i[4],l=r||{},c=l.plain;if(!a)return null;var u=o._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},h=hd(a,s,u,f,c);return[d,u,h]},nM={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JC="comm",e$="rule",t$="decl",rM="@import",iM="@namespace",oM="@keyframes",aM="@layer",n$=Math.abs,Tv=String.fromCharCode;function r$(t){return t.trim()}function zu(t,e,n){return t.replace(e,n)}function sM(t,e,n){return t.indexOf(e,n)}function rs(t,e){return t.charCodeAt(e)|0}function vs(t,e,n){return t.slice(e,n)}function Ni(t){return t.length}function lM(t){return t.length}function qc(t,e){return e.push(t),t}var xf=1,Os=1,i$=0,di=0,Qn=0,Es="";function kv(t,e,n,r,i,o,a,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:xf,column:Os,length:a,return:"",siblings:s}}function cM(){return Qn}function uM(){return Qn=di>0?rs(Es,--di):0,Os--,Qn===10&&(Os=1,xf--),Qn}function xi(){return Qn=di2||Bl(Qn)>3?"":" "}function pM(t,e){for(;--e&&xi()&&!(Qn<48||Qn>102||Qn>57&&Qn<65||Qn>70&&Qn<97););return Cf(t,Lu()+(e<6&&ko()==32&&xi()==32))}function nm(t){for(;xi();)switch(Qn){case t:return di;case 34:case 39:t!==34&&t!==39&&nm(Qn);break;case 40:t===41&&nm(t);break;case 92:xi();break}return di}function mM(t,e){for(;xi()&&t+Qn!==57;)if(t+Qn===84&&ko()===47)break;return"/*"+Cf(e,di-1)+"*"+Tv(t===47?t:xi())}function gM(t){for(;!Bl(ko());)xi();return Cf(t,di)}function vM(t){return fM(ju("",null,null,null,[""],t=dM(t),0,[0],t))}function ju(t,e,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,v=1,O=0,S="",x=i,b=o,C=r,$=S;g;)switch(p=O,O=xi()){case 40:if(p!=108&&rs($,d-1)==58){sM($+=zu(yh(O),"&","&\f"),"&\f",n$(c?s[c-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:$+=yh(O);break;case 9:case 10:case 13:case 32:$+=hM(p);break;case 92:$+=pM(Lu()-1,7);continue;case 47:switch(ko()){case 42:case 47:qc(OM(mM(xi(),Lu()),e,n,l),l),(Bl(p||1)==5||Bl(ko()||1)==5)&&Ni($)&&vs($,-1,void 0)!==" "&&($+=" ");break;default:$+="/"}break;case 123*m:s[c++]=Ni($)*v;case 125*m:case 59:case 0:switch(O){case 0:case 125:g=0;case 59+u:v==-1&&($=zu($,/\f/g,"")),h>0&&(Ni($)-d||m===0&&p===47)&&qc(h>32?eb($+";",r,n,d-1,l):eb(zu($," ","")+";",r,n,d-2,l),l);break;case 59:$+=";";default:if(qc(C=JO($,e,n,c,u,i,s,S,x=[],b=[],d,o),o),O===123)if(u===0)ju($,e,C,C,x,o,d,s,b);else{switch(f){case 99:if(rs($,3)===110)break;case 108:if(rs($,2)===97)break;default:u=0;case 100:case 109:case 115:}u?ju(t,C,C,r&&qc(JO(t,C,C,0,0,i,s,S,i,x=[],d,b),b),i,b,d,s,r?x:b):ju($,C,C,C,[""],b,0,s,b)}}c=u=h=0,m=v=1,S=$="",d=a;break;case 58:d=1+Ni($),h=p;default:if(m<1){if(O==123)--m;else if(O==125&&m++==0&&uM()==125)continue}switch($+=Tv(O),O*m){case 38:v=u>0?1:($+="\f",-1);break;case 44:s[c++]=(Ni($)-1)*v,v=1;break;case 64:ko()===45&&($+=yh(xi())),f=ko(),u=d=Ni(S=$+=gM(Lu())),O++;break;case 45:p===45&&Ni($)==2&&(m=0)}}return o}function JO(t,e,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,h=i===0?o:[""],p=lM(h),m=0,g=0,v=0;m0?h[O]+" "+S:zu(S,/&\f/g,h[O])))&&(l[v++]=x);return kv(t,e,n,i===0?e$:s,l,c,u,d)}function OM(t,e,n,r){return kv(t,e,n,JC,Tv(cM()),vs(t,2,-2),0,r)}function eb(t,e,n,r,i){return kv(t,e,n,t$,vs(t,0,r),vs(t,r+1,-1),r,i)}function rm(t,e){for(var n="",r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer;n.path;var c=n.hashPriority,u=n.transformers,d=u===void 0?[]:u;n.linters;var f="",h={};function p(v){var O=v.getName(s);if(!h[O]){var S=t(v.style,n,{root:!1,parentSelectors:a}),x=ae(S,1),b=x[0];h[O]="@keyframes ".concat(v.getName(s)).concat(b)}}function m(v){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return v.forEach(function(S){Array.isArray(S)?m(S,O):S&&O.push(S)}),O}var g=m(Array.isArray(e)?e:[e]);return g.forEach(function(v){var O=typeof v=="string"&&!i?{}:v;if(typeof O=="string")f+="".concat(O,` -`);else if(O._keyframe)p(O);else{var S=d.reduce(function(x,b){var C;return(b==null||(C=b.visit)===null||C===void 0?void 0:C.call(b,x))||x},O);Object.keys(S).forEach(function(x){var b=S[x];if(Je(b)==="object"&&b&&(x!=="animationName"||!b._keyframe)&&!$M(b)){var C=!1,$=x.trim(),w=!1;(i||o)&&s?$.startsWith("@")?C=!0:$==="&"?$=nb("",s,c):$=nb(x,s,c):i&&!s&&($==="&"||$==="")&&($="",w=!0);var P=t(b,n,{root:w,injectHash:C,parentSelectors:[].concat($e(a),[$])}),_=ae(P,2),T=_[0],R=_[1];h=W(W({},h),R),f+="".concat($).concat(T)}else{let Q=function(M,E){var N=M.replace(/[A-Z]/g,function(L){return"-".concat(L.toLowerCase())}),z=E;!nM[M]&&typeof z=="number"&&z!==0&&(z="".concat(z,"px")),M==="animationName"&&E!==null&&E!==void 0&&E._keyframe&&(p(E),z=E.getName(s)),f+="".concat(N,":").concat(z,";")};var k,I=(k=b==null?void 0:b.value)!==null&&k!==void 0?k:b;Je(b)==="object"&&b!==null&&b!==void 0&&b[s$]&&Array.isArray(I)?I.forEach(function(M){Q(x,M)}):Q(x,I)}})}}),i?l&&(f&&(f="@layer ".concat(l.name," {").concat(f,"}")),l.dependencies&&(h["@layer ".concat(l.name)]=l.dependencies.map(function(v){return"@layer ".concat(v,", ").concat(l.name,";")}).join(` -`))):f="{".concat(f,"}"),[f,h]};function l$(t,e){return Ll("".concat(t.join("%")).concat(e))}function PM(){return null}var c$="style";function im(t,e){var n=t.token,r=t.path,i=t.hashId,o=t.layer,a=t.nonce,s=t.clientOnly,l=t.order,c=l===void 0?0:l,u=fe(Oc),d=u.autoClear;u.mock;var f=u.defaultCache,h=u.hashPriority,p=u.container,m=u.ssrInline,g=u.transformers,v=u.linters,O=u.cache,S=u.layer,x=n._tokenKey,b=[x];S&&b.push("layer"),b.push.apply(b,$e(r));var C=em,$=_v(c$,b,function(){var R=b.join("|");if(SM(R)){var k=xM(R),I=ae(k,2),Q=I[0],M=I[1];if(Q)return[Q,x,M,{},s,c]}var E=e(),N=wM(E,{hashId:i,hashPriority:h,layer:S?o:void 0,path:r.join("-"),transformers:g,linters:v}),z=ae(N,2),L=z[0],F=z[1],H=Du(L),V=l$(b,H);return[H,x,V,F,s,c]},function(R,k){var I=ae(R,3),Q=I[2];(k||d)&&em&&jl(Q,{mark:Si,attachTo:p})},function(R){var k=ae(R,4),I=k[0];k[1];var Q=k[2],M=k[3];if(C&&I!==o$){var E={mark:Si,prepend:S?!1:"queue",attachTo:p,priority:c},N=typeof a=="function"?a():a;N&&(E.csp={nonce:N});var z=[],L=[];Object.keys(M).forEach(function(H){H.startsWith("@layer")?z.push(H):L.push(H)}),z.forEach(function(H){so(Du(M[H]),"_layer-".concat(H),W(W({},E),{},{prepend:!0}))});var F=so(I,Q,E);F[To]=O.instanceId,F.setAttribute(gs,x),L.forEach(function(H){so(Du(M[H]),"_effect-".concat(H),E)})}}),w=ae($,3),P=w[0],_=w[1],T=w[2];return function(R){var k;return!m||C||!f?k=y(PM,null):k=y("style",Ce({},D(D({},gs,_),Si,T),{dangerouslySetInnerHTML:{__html:P}})),y(At,null,k,R)}}var _M=function(e,n,r){var i=ae(e,6),o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],d=r||{},f=d.plain;if(c)return null;var h=o,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=hd(o,a,s,p,f),l&&Object.keys(l).forEach(function(m){if(!n[m]){n[m]=!0;var g=Du(l[m]),v=hd(g,a,"_effect-".concat(m),p,f);m.startsWith("@layer")?h=v+h:h+=v}}),[u,s,h]},u$="cssVar",TM=function(e,n){var r=e.key,i=e.prefix,o=e.unitless,a=e.ignore,s=e.token,l=e.scope,c=l===void 0?"":l,u=fe(Oc),d=u.cache.instanceId,f=u.container,h=s._tokenKey,p=[].concat($e(e.path),[r,c,h]),m=_v(u$,p,function(){var g=n(),v=UC(g,r,{prefix:i,unitless:o,ignore:a,scope:c}),O=ae(v,2),S=O[0],x=O[1],b=l$(p,x);return[S,x,b,r]},function(g){var v=ae(g,3),O=v[2];em&&jl(O,{mark:Si,attachTo:f})},function(g){var v=ae(g,3),O=v[1],S=v[2];if(O){var x=so(O,S,{mark:Si,prepend:"queue",attachTo:f,priority:-999});x[To]=d,x.setAttribute(gs,r)}});return m},kM=function(e,n,r){var i=ae(e,4),o=i[1],a=i[2],s=i[3],l=r||{},c=l.plain;if(!o)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=hd(o,s,a,d,c);return[u,a,f]};D(D(D({},c$,_M),KC,tM),u$,kM);var _t=function(){function t(e,n){Mn(this,t),D(this,"name",void 0),D(this,"style",void 0),D(this,"_keyframe",!0),this.name=e,this.style=n}return En(t,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),t}();function Ea(t){return t.notSplit=!0,t}Ea(["borderTop","borderBottom"]),Ea(["borderTop"]),Ea(["borderBottom"]),Ea(["borderLeft","borderRight"]),Ea(["borderLeft"]),Ea(["borderRight"]);var Rv=bt({});function d$(t){return VC(t)||DC(t)||Cv(t)||HC()}function si(t,e){for(var n=t,r=0;r3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!si(t,e.slice(0,-1))?t:f$(t,e,n,r)}function RM(t){return Je(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function rb(t){return Array.isArray(t)?[]:{}}var IM=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ga(){for(var t=arguments.length,e=new Array(t),n=0;n{const t=()=>{};return t.deprecated=MM,t},h$=bt(void 0);var AM={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},QM={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},NM=W(W({},QM),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const p$={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ib={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},NM),timePickerLocale:Object.assign({},p$)},Wr="${label} is not a valid ${type}",Zi={locale:"en",Pagination:AM,DatePicker:ib,TimePicker:p$,Calendar:ib,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Wr,method:Wr,array:Wr,object:Wr,number:Wr,date:Wr,boolean:Wr,integer:Wr,float:Wr,regexp:Wr,email:Wr,url:Wr,hex:Wr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Bu=Object.assign({},Zi.Modal),Wu=[];const ob=()=>Wu.reduce((t,e)=>Object.assign(Object.assign({},t),e),Zi.Modal);function zM(t){if(t){const e=Object.assign({},t);return Wu.push(e),Bu=ob(),()=>{Wu=Wu.filter(n=>n!==e),Bu=ob()}}Bu=Object.assign({},Zi.Modal)}function m$(){return Bu}const Iv=bt(void 0),Ki=(t,e)=>{const n=fe(Iv),r=ge(()=>{var o;const a=e||Zi[t],s=(o=n==null?void 0:n[t])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[t,e,n]),i=ge(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Zi.locale:o},[n]);return[r,i]},LM="internalMark",jM=t=>{const{locale:e={},children:n,_ANT_MARK__:r}=t;be(()=>zM(e==null?void 0:e.Modal),[e]);const i=ge(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return y(Iv.Provider,{value:i},n)},Mv={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Wl=Object.assign(Object.assign({},Mv),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, + */var yv=Symbol.for("react.element"),Sv=Symbol.for("react.portal"),df=Symbol.for("react.fragment"),ff=Symbol.for("react.strict_mode"),hf=Symbol.for("react.profiler"),pf=Symbol.for("react.provider"),mf=Symbol.for("react.context"),GR=Symbol.for("react.server_context"),gf=Symbol.for("react.forward_ref"),vf=Symbol.for("react.suspense"),Of=Symbol.for("react.suspense_list"),bf=Symbol.for("react.memo"),yf=Symbol.for("react.lazy"),YR=Symbol.for("react.offscreen"),MC;MC=Symbol.for("react.module.reference");function pi(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case yv:switch(t=t.type,t){case df:case hf:case ff:case vf:case Of:return t;default:switch(t=t&&t.$$typeof,t){case GR:case mf:case gf:case yf:case bf:case pf:return t;default:return e}}case Sv:return e}}}en.ContextConsumer=mf;en.ContextProvider=pf;en.Element=yv;en.ForwardRef=gf;en.Fragment=df;en.Lazy=yf;en.Memo=bf;en.Portal=Sv;en.Profiler=hf;en.StrictMode=ff;en.Suspense=vf;en.SuspenseList=Of;en.isAsyncMode=function(){return!1};en.isConcurrentMode=function(){return!1};en.isContextConsumer=function(t){return pi(t)===mf};en.isContextProvider=function(t){return pi(t)===pf};en.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===yv};en.isForwardRef=function(t){return pi(t)===gf};en.isFragment=function(t){return pi(t)===df};en.isLazy=function(t){return pi(t)===yf};en.isMemo=function(t){return pi(t)===bf};en.isPortal=function(t){return pi(t)===Sv};en.isProfiler=function(t){return pi(t)===hf};en.isStrictMode=function(t){return pi(t)===ff};en.isSuspense=function(t){return pi(t)===vf};en.isSuspenseList=function(t){return pi(t)===Of};en.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===df||t===hf||t===ff||t===vf||t===Of||t===YR||typeof t=="object"&&t!==null&&(t.$$typeof===yf||t.$$typeof===bf||t.$$typeof===pf||t.$$typeof===mf||t.$$typeof===gf||t.$$typeof===MC||t.getModuleId!==void 0)};en.typeOf=pi;IC.exports=en;var bh=IC.exports;function vc(t,e,n){var r=Y({});return(!("value"in r.current)||n(r.current.condition,e))&&(r.current.value=t(),r.current.condition=e),r.current.value}var UR=Number(vC.split(".")[0]),xv=function(e,n){typeof e=="function"?e(n):tt(e)==="object"&&e&&"current"in e&&(e.current=n)},mr=function(){for(var e=arguments.length,n=new Array(e),r=0;r=19)return!0;var i=bh.isMemo(e)?e.type.type:e.type;return!(typeof i=="function"&&!((n=i.prototype)!==null&&n!==void 0&&n.render)&&i.$$typeof!==bh.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==bh.ForwardRef)};function Cv(t){return Jt(t)&&!_C(t)}var KR=function(e){return Cv(e)&&vo(e)},Xo=function(e){if(e&&Cv(e)){var n=e;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},Gp=yt(null);function JR(t){var e=t.children,n=t.onBatchResize,r=Y(0),i=Y([]),o=de(Gp),a=Ht(function(s,l,c){r.current+=1;var u=r.current;i.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(s,l,c)},[n,o]);return y(Gp.Provider,{value:a},e)}var EC=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},e.prototype.set=function(n,r){var i=t(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,i=t(r,n);~i&&r.splice(i,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i0},t.prototype.connect_=function(){!Yp||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),oI?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!Yp||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,i=iI.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),AC=function(t,e){for(var n=0,r=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof gs(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new pI(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof gs(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new mI(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),NC=typeof WeakMap<"u"?new WeakMap:new EC,zC=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=aI.getInstance(),r=new gI(e,n,this);NC.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){zC.prototype[t]=function(){var e;return(e=NC.get(this))[t].apply(e,arguments)}});var vI=function(){return typeof hd.ResizeObserver<"u"?hd.ResizeObserver:zC}(),To=new Map;function OI(t){t.forEach(function(e){var n,r=e.target;(n=To.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var LC=new vI(OI);function bI(t,e){To.has(t)||(To.set(t,new Set),LC.observe(t)),To.get(t).add(e)}function yI(t,e){To.has(t)&&(To.get(t).delete(e),To.get(t).size||(LC.unobserve(t),To.delete(t)))}function En(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function HO(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&arguments[1]!==void 0?arguments[1]:1;XO+=1;var r=XO;function i(o){if(o===0)FC(r),e();else{var a=BC(function(){i(o-1)});wv.set(r,a)}}return i(n),r};Xt.cancel=function(t){var e=wv.get(t);return FC(t),WC(e)};function VC(t){if(Array.isArray(t))return t}function TI(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function HC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ae(t,e){return VC(t)||TI(t,e)||$v(t,e)||HC()}function Ll(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function fr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Kp(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var ZO="data-rc-order",qO="data-rc-priority",kI="rc-util-key",Jp=new Map;function XC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):kI}function Cf(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function RI(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Pv(t){return Array.from((Jp.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function ZC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!fr())return null;var n=e.csp,r=e.prepend,i=e.priority,o=i===void 0?0:i,a=RI(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(ZO,a),s&&o&&l.setAttribute(qO,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var c=Cf(e),u=c.firstChild;if(r){if(s){var d=(e.styles||Pv(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(ZO)))return!1;var h=Number(f.getAttribute(qO)||0);return o>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function qC(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Cf(e);return(e.styles||Pv(n)).find(function(r){return r.getAttribute(XC(e))===t})}function jl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=qC(t,e);if(n){var r=Cf(e);r.removeChild(n)}}function II(t,e){var n=Jp.get(t);if(!n||!Kp(document,n)){var r=ZC("",e),i=r.parentNode;Jp.set(t,i),t.removeChild(r)}}function so(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Cf(n),i=Pv(r),o=W(W({},n),{},{styles:i});II(r,o);var a=qC(e,o);if(a){var s,l;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==t&&(a.innerHTML=t),a}var u=ZC(t,o);return u.setAttribute(XC(o),e),u}function GC(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function dt(t,e){if(t==null)return{};var n,r,i=GC(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(o);if(nr(!l,"Warning: There may be circular references"),l)return!1;if(o===a)return!0;if(n&&s>1)return!1;r.add(o);var c=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var i=this;if(!this.has(n)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(c,u){var d=ae(c,2),f=d[1];return i.internalGet(u)[1]0,void 0),GO+=1}return An(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,i){return i(n,r)},void 0)}}]),t}(),yh=new _v;function tm(t){var e=Array.isArray(t)?t:[t];return yh.has(e)||yh.set(e,new YC(e)),yh.get(e)}var NI=new WeakMap,Sh={};function zI(t,e){for(var n=NI,r=0;r3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return t;var o=W(W({},r),{},D(D({},vs,e),Si,n)),a=Object.keys(o).map(function(s){var l=o[s];return l?"".concat(s,'="').concat(l,'"'):null}).filter(function(s){return s}).join(" ");return"")}var zu=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},LI=function(e,n,r){return Object.keys(e).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(i){var o=ae(i,2),a=o[0],s=o[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},UC=function(e,n,r){var i={},o={};return Object.entries(e).forEach(function(a){var s,l,c=ae(a,2),u=c[0],d=c[1];if(r!=null&&(s=r.preserve)!==null&&s!==void 0&&s[u])o[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,h=zu(u,r==null?void 0:r.prefix);i[h]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),o[u]="var(".concat(h,")")}}),[o,LI(i,n,{scope:r==null?void 0:r.scope})]},KO=fr()?Ti:be,Nt=function(e,n){var r=Y(!0);KO(function(){return e(r.current)},n),KO(function(){return r.current=!1,function(){r.current=!0}},[])},rm=function(e,n){Nt(function(r){if(!r)return e()},n)},jI=W({},gc),JO=jI.useInsertionEffect,DI=function(e,n,r){me(e,r),Nt(function(){return n(!0)},r)},BI=JO?function(t,e,n){return JO(function(){return t(),e()},n)}:DI,WI=W({},gc),FI=WI.useInsertionEffect,VI=function(e){var n=[],r=!1;function i(o){r||n.push(o)}return be(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(o){return o()})}},e),i},HI=function(){return function(e){e()}},XI=typeof FI<"u"?VI:HI;function Tv(t,e,n,r,i){var o=de(Oc),a=o.cache,s=[t].concat(Pe(e)),l=em(s),c=XI([l]),u=function(p){a.opUpdate(l,function(m){var g=m||[void 0,void 0],v=ae(g,2),O=v[0],S=O===void 0?0:O,C=v[1],b=C,x=b||n(),$=[S,x];return p?p($):$})};me(function(){u()},[l]);var d=a.opGet(l),f=d[1];return BI(function(){i==null||i(f)},function(h){return u(function(p){var m=ae(p,2),g=m[0],v=m[1];return h&&g===0&&(i==null||i(f)),[g+1,v]}),function(){a.opUpdate(l,function(p){var m=p||[],g=ae(m,2),v=g[0],O=v===void 0?0:v,S=g[1],C=O-1;return C===0?(c(function(){(h||!a.opGet(l))&&(r==null||r(S,!1))}),null):[O-1,S]})}},[l]),f}var ZI={},qI="css",Jo=new Map;function GI(t){Jo.set(t,(Jo.get(t)||0)+1)}function YI(t,e){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(vs,'="').concat(t,'"]'));n.forEach(function(r){if(r[ko]===e){var i;(i=r.parentNode)===null||i===void 0||i.removeChild(r)}})}}var UI=0;function KI(t,e){Jo.set(t,(Jo.get(t)||0)-1);var n=new Set;Jo.forEach(function(r,i){r<=0&&n.add(i)}),Jo.size-n.size>UI&&n.forEach(function(r){YI(r,e),Jo.delete(r)})}var JI=function(e,n,r,i){var o=r.getDerivativeToken(e),a=W(W({},o),n);return i&&(a=i(a)),a},KC="token";function eM(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=de(Oc),i=r.cache.instanceId,o=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?ZI:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,h=zI(function(){return Object.assign.apply(Object,[{}].concat(Pe(e)))},e),p=yl(h),m=yl(c),g=f?yl(f):"",v=Tv(KC,[s,t.id,p,m,g],function(){var O,S=d?d(h,c,t):JI(h,c,t,u),C=W({},S),b="";if(f){var x=UC(S,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),$=ae(x,2);S=$[0],b=$[1]}var w=UO(S,s);S._tokenKey=w,C._tokenKey=UO(C,s);var P=(O=f==null?void 0:f.key)!==null&&O!==void 0?O:w;S._themeKey=P,GI(P);var _="".concat(qI,"-").concat(Ll(w));return S._hashId=_,[S,_,C,b,(f==null?void 0:f.key)||""]},function(O){KI(O[0]._themeKey,i)},function(O){var S=ae(O,4),C=S[0],b=S[3];if(f&&b){var x=so(b,Ll("css-variables-".concat(C._themeKey)),{mark:Si,prepend:"queue",attachTo:o,priority:-999});x[ko]=i,x.setAttribute(vs,C._themeKey)}});return v}var tM=function(e,n,r){var i=ae(e,5),o=i[2],a=i[3],s=i[4],l=r||{},c=l.plain;if(!a)return null;var u=o._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},h=md(a,s,u,f,c);return[d,u,h]},nM={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JC="comm",e$="rule",t$="decl",rM="@import",iM="@namespace",oM="@keyframes",aM="@layer",n$=Math.abs,kv=String.fromCharCode;function r$(t){return t.trim()}function Lu(t,e,n){return t.replace(e,n)}function sM(t,e,n){return t.indexOf(e,n)}function is(t,e){return t.charCodeAt(e)|0}function Os(t,e,n){return t.slice(e,n)}function Ni(t){return t.length}function lM(t){return t.length}function qc(t,e){return e.push(t),t}var $f=1,bs=1,i$=0,fi=0,Nn=0,Es="";function Rv(t,e,n,r,i,o,a,s){return{value:t,root:e,parent:n,type:r,props:i,children:o,line:$f,column:bs,length:a,return:"",siblings:s}}function cM(){return Nn}function uM(){return Nn=fi>0?is(Es,--fi):0,bs--,Nn===10&&(bs=1,$f--),Nn}function xi(){return Nn=fi2||Bl(Nn)>3?"":" "}function pM(t,e){for(;--e&&xi()&&!(Nn<48||Nn>102||Nn>57&&Nn<65||Nn>70&&Nn<97););return wf(t,ju()+(e<6&&Ro()==32&&xi()==32))}function im(t){for(;xi();)switch(Nn){case t:return fi;case 34:case 39:t!==34&&t!==39&&im(Nn);break;case 40:t===41&&im(t);break;case 92:xi();break}return fi}function mM(t,e){for(;xi()&&t+Nn!==57;)if(t+Nn===84&&Ro()===47)break;return"/*"+wf(e,fi-1)+"*"+kv(t===47?t:xi())}function gM(t){for(;!Bl(Ro());)xi();return wf(t,fi)}function vM(t){return fM(Du("",null,null,null,[""],t=dM(t),0,[0],t))}function Du(t,e,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,m=1,g=1,v=1,O=0,S="",C=i,b=o,x=r,$=S;g;)switch(p=O,O=xi()){case 40:if(p!=108&&is($,d-1)==58){sM($+=Lu(xh(O),"&","&\f"),"&\f",n$(c?s[c-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:$+=xh(O);break;case 9:case 10:case 13:case 32:$+=hM(p);break;case 92:$+=pM(ju()-1,7);continue;case 47:switch(Ro()){case 42:case 47:qc(OM(mM(xi(),ju()),e,n,l),l),(Bl(p||1)==5||Bl(Ro()||1)==5)&&Ni($)&&Os($,-1,void 0)!==" "&&($+=" ");break;default:$+="/"}break;case 123*m:s[c++]=Ni($)*v;case 125*m:case 59:case 0:switch(O){case 0:case 125:g=0;case 59+u:v==-1&&($=Lu($,/\f/g,"")),h>0&&(Ni($)-d||m===0&&p===47)&&qc(h>32?tb($+";",r,n,d-1,l):tb(Lu($," ","")+";",r,n,d-2,l),l);break;case 59:$+=";";default:if(qc(x=eb($,e,n,c,u,i,s,S,C=[],b=[],d,o),o),O===123)if(u===0)Du($,e,x,x,C,o,d,s,b);else{switch(f){case 99:if(is($,3)===110)break;case 108:if(is($,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Du(t,x,x,r&&qc(eb(t,x,x,0,0,i,s,S,i,C=[],d,b),b),i,b,d,s,r?C:b):Du($,x,x,x,[""],b,0,s,b)}}c=u=h=0,m=v=1,S=$="",d=a;break;case 58:d=1+Ni($),h=p;default:if(m<1){if(O==123)--m;else if(O==125&&m++==0&&uM()==125)continue}switch($+=kv(O),O*m){case 38:v=u>0?1:($+="\f",-1);break;case 44:s[c++]=(Ni($)-1)*v,v=1;break;case 64:Ro()===45&&($+=xh(xi())),f=Ro(),u=d=Ni(S=$+=gM(ju())),O++;break;case 45:p===45&&Ni($)==2&&(m=0)}}return o}function eb(t,e,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,h=i===0?o:[""],p=lM(h),m=0,g=0,v=0;m0?h[O]+" "+S:Lu(S,/&\f/g,h[O])))&&(l[v++]=C);return Rv(t,e,n,i===0?e$:s,l,c,u,d)}function OM(t,e,n,r){return Rv(t,e,n,JC,kv(cM()),Os(t,2,-2),0,r)}function tb(t,e,n,r,i){return Rv(t,e,n,t$,Os(t,0,r),Os(t,r+1,-1),r,i)}function om(t,e){for(var n="",r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer;n.path;var c=n.hashPriority,u=n.transformers,d=u===void 0?[]:u;n.linters;var f="",h={};function p(v){var O=v.getName(s);if(!h[O]){var S=t(v.style,n,{root:!1,parentSelectors:a}),C=ae(S,1),b=C[0];h[O]="@keyframes ".concat(v.getName(s)).concat(b)}}function m(v){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return v.forEach(function(S){Array.isArray(S)?m(S,O):S&&O.push(S)}),O}var g=m(Array.isArray(e)?e:[e]);return g.forEach(function(v){var O=typeof v=="string"&&!i?{}:v;if(typeof O=="string")f+="".concat(O,` +`);else if(O._keyframe)p(O);else{var S=d.reduce(function(C,b){var x;return(b==null||(x=b.visit)===null||x===void 0?void 0:x.call(b,C))||C},O);Object.keys(S).forEach(function(C){var b=S[C];if(tt(b)==="object"&&b&&(C!=="animationName"||!b._keyframe)&&!$M(b)){var x=!1,$=C.trim(),w=!1;(i||o)&&s?$.startsWith("@")?x=!0:$==="&"?$=rb("",s,c):$=rb(C,s,c):i&&!s&&($==="&"||$==="")&&($="",w=!0);var P=t(b,n,{root:w,injectHash:x,parentSelectors:[].concat(Pe(a),[$])}),_=ae(P,2),T=_[0],k=_[1];h=W(W({},h),k),f+="".concat($).concat(T)}else{let Q=function(E,A){var N=E.replace(/[A-Z]/g,function(z){return"-".concat(z.toLowerCase())}),L=A;!nM[E]&&typeof L=="number"&&L!==0&&(L="".concat(L,"px")),E==="animationName"&&A!==null&&A!==void 0&&A._keyframe&&(p(A),L=A.getName(s)),f+="".concat(N,":").concat(L,";")};var R,I=(R=b==null?void 0:b.value)!==null&&R!==void 0?R:b;tt(b)==="object"&&b!==null&&b!==void 0&&b[s$]&&Array.isArray(I)?I.forEach(function(E){Q(C,E)}):Q(C,I)}})}}),i?l&&(f&&(f="@layer ".concat(l.name," {").concat(f,"}")),l.dependencies&&(h["@layer ".concat(l.name)]=l.dependencies.map(function(v){return"@layer ".concat(v,", ").concat(l.name,";")}).join(` +`))):f="{".concat(f,"}"),[f,h]};function l$(t,e){return Ll("".concat(t.join("%")).concat(e))}function PM(){return null}var c$="style";function am(t,e){var n=t.token,r=t.path,i=t.hashId,o=t.layer,a=t.nonce,s=t.clientOnly,l=t.order,c=l===void 0?0:l,u=de(Oc),d=u.autoClear;u.mock;var f=u.defaultCache,h=u.hashPriority,p=u.container,m=u.ssrInline,g=u.transformers,v=u.linters,O=u.cache,S=u.layer,C=n._tokenKey,b=[C];S&&b.push("layer"),b.push.apply(b,Pe(r));var x=nm,$=Tv(c$,b,function(){var k=b.join("|");if(SM(k)){var R=xM(k),I=ae(R,2),Q=I[0],E=I[1];if(Q)return[Q,C,E,{},s,c]}var A=e(),N=wM(A,{hashId:i,hashPriority:h,layer:S?o:void 0,path:r.join("-"),transformers:g,linters:v}),L=ae(N,2),z=L[0],V=L[1],X=Bu(z),F=l$(b,X);return[X,C,F,V,s,c]},function(k,R){var I=ae(k,3),Q=I[2];(R||d)&&nm&&jl(Q,{mark:Si,attachTo:p})},function(k){var R=ae(k,4),I=R[0];R[1];var Q=R[2],E=R[3];if(x&&I!==o$){var A={mark:Si,prepend:S?!1:"queue",attachTo:p,priority:c},N=typeof a=="function"?a():a;N&&(A.csp={nonce:N});var L=[],z=[];Object.keys(E).forEach(function(X){X.startsWith("@layer")?L.push(X):z.push(X)}),L.forEach(function(X){so(Bu(E[X]),"_layer-".concat(X),W(W({},A),{},{prepend:!0}))});var V=so(I,Q,A);V[ko]=O.instanceId,V.setAttribute(vs,C),z.forEach(function(X){so(Bu(E[X]),"_effect-".concat(X),A)})}}),w=ae($,3),P=w[0],_=w[1],T=w[2];return function(k){var R;return!m||x||!f?R=y(PM,null):R=y("style",xe({},D(D({},vs,_),Si,T),{dangerouslySetInnerHTML:{__html:P}})),y(At,null,R,k)}}var _M=function(e,n,r){var i=ae(e,6),o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],d=r||{},f=d.plain;if(c)return null;var h=o,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=md(o,a,s,p,f),l&&Object.keys(l).forEach(function(m){if(!n[m]){n[m]=!0;var g=Bu(l[m]),v=md(g,a,"_effect-".concat(m),p,f);m.startsWith("@layer")?h=v+h:h+=v}}),[u,s,h]},u$="cssVar",TM=function(e,n){var r=e.key,i=e.prefix,o=e.unitless,a=e.ignore,s=e.token,l=e.scope,c=l===void 0?"":l,u=de(Oc),d=u.cache.instanceId,f=u.container,h=s._tokenKey,p=[].concat(Pe(e.path),[r,c,h]),m=Tv(u$,p,function(){var g=n(),v=UC(g,r,{prefix:i,unitless:o,ignore:a,scope:c}),O=ae(v,2),S=O[0],C=O[1],b=l$(p,C);return[S,C,b,r]},function(g){var v=ae(g,3),O=v[2];nm&&jl(O,{mark:Si,attachTo:f})},function(g){var v=ae(g,3),O=v[1],S=v[2];if(O){var C=so(O,S,{mark:Si,prepend:"queue",attachTo:f,priority:-999});C[ko]=d,C.setAttribute(vs,r)}});return m},kM=function(e,n,r){var i=ae(e,4),o=i[1],a=i[2],s=i[3],l=r||{},c=l.plain;if(!o)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=md(o,s,a,d,c);return[u,a,f]};D(D(D({},c$,_M),KC,tM),u$,kM);var _t=function(){function t(e,n){En(this,t),D(this,"name",void 0),D(this,"style",void 0),D(this,"_keyframe",!0),this.name=e,this.style=n}return An(t,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),t}();function Qa(t){return t.notSplit=!0,t}Qa(["borderTop","borderBottom"]),Qa(["borderTop"]),Qa(["borderBottom"]),Qa(["borderLeft","borderRight"]),Qa(["borderLeft"]),Qa(["borderRight"]);var Iv=yt({});function d$(t){return VC(t)||DC(t)||$v(t)||HC()}function li(t,e){for(var n=t,r=0;r3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!li(t,e.slice(0,-1))?t:f$(t,e,n,r)}function RM(t){return tt(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function ib(t){return Array.isArray(t)?[]:{}}var IM=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ua(){for(var t=arguments.length,e=new Array(t),n=0;n{const t=()=>{};return t.deprecated=MM,t},h$=yt(void 0);var AM={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},QM={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},NM=W(W({},QM),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const p$={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ob={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},NM),timePickerLocale:Object.assign({},p$)},Wr="${label} is not a valid ${type}",Zi={locale:"en",Pagination:AM,DatePicker:ob,TimePicker:p$,Calendar:ob,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Wr,method:Wr,array:Wr,object:Wr,number:Wr,date:Wr,boolean:Wr,integer:Wr,float:Wr,regexp:Wr,email:Wr,url:Wr,hex:Wr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Wu=Object.assign({},Zi.Modal),Fu=[];const ab=()=>Fu.reduce((t,e)=>Object.assign(Object.assign({},t),e),Zi.Modal);function zM(t){if(t){const e=Object.assign({},t);return Fu.push(e),Wu=ab(),()=>{Fu=Fu.filter(n=>n!==e),Wu=ab()}}Wu=Object.assign({},Zi.Modal)}function m$(){return Wu}const Mv=yt(void 0),Ki=(t,e)=>{const n=de(Mv),r=me(()=>{var o;const a=e||Zi[t],s=(o=n==null?void 0:n[t])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[t,e,n]),i=me(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Zi.locale:o},[n]);return[r,i]},LM="internalMark",jM=t=>{const{locale:e={},children:n,_ANT_MARK__:r}=t;be(()=>zM(e==null?void 0:e.Modal),[e]);const i=me(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return y(Mv.Provider,{value:i},n)},Ev={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Wl=Object.assign(Object.assign({},Ev),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Vn=Math.round;function Sh(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const ab=(t,e,n)=>n===0?t:t/100;function Gs(t,e){const n=e||255;return t>n?n:t<0?0:t}class Dt{constructor(e){D(this,"isValid",!0),D(this,"r",0),D(this,"g",0),D(this,"b",0),D(this,"a",1),D(this,"_h",void 0),D(this,"_s",void 0),D(this,"_l",void 0),D(this,"_v",void 0),D(this,"_max",void 0),D(this,"_min",void 0),D(this,"_brightness",void 0);function n(i){return i[0]in e&&i[1]in e&&i[2]in e}if(e)if(typeof e=="string"){let o=function(a){return i.startsWith(a)};var r=o;const i=e.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(e instanceof Dt)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=Gs(e.r),this.g=Gs(e.g),this.b=Gs(e.b),this.a=typeof e.a=="number"?Gs(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),i=e(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Vn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(e,n=50){const r=this._c(e),i=n/100,o=s=>(r[s]-this[s])*i+this[s],a={r:Vn(o("r")),g:Vn(o("g")),b:Vn(o("b")),a:Vn(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),i=o=>Vn((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=Vn(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=Vn(this.getSaturation()*100),r=Vn(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const i=this.clone();return i[e]=Gs(n,r),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(i,o){return parseInt(n[i]+n[o||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:i}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const f=Vn(r*255);this.r=f,this.g=f,this.b=f}let o=0,a=0,s=0;const l=e/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,a=u):l>=1&&l<2?(o=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(o=u,s=c):l>=5&&l<6&&(o=c,s=u);const d=r-c/2;this.r=Vn((o+d)*255),this.g=Vn((a+d)*255),this.b=Vn((s+d)*255)}fromHsv({h:e,s:n,v:r,a:i}){this._h=e%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=Vn(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=e/60,s=Math.floor(a),l=a-s,c=Vn(r*(1-n)*255),u=Vn(r*(1-n*l)*255),d=Vn(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const n=Sh(e,ab);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Sh(e,ab);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Sh(e,(r,i)=>i.includes("%")?Vn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var Gc=2,sb=.16,DM=.05,BM=.05,WM=.15,g$=5,v$=4,FM=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function lb(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-Gc*e:Math.round(t.h)+Gc*e:r=n?Math.round(t.h)+Gc*e:Math.round(t.h)-Gc*e,r<0?r+=360:r>=360&&(r-=360),r}function cb(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-sb*e:e===v$?r=t.s+sb:r=t.s+DM*e,r>1&&(r=1),n&&e===g$&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function ub(t,e,n){var r;return n?r=t.v+BM*e:r=t.v-WM*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function ga(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Dt(t),i=r.toHsv(),o=g$;o>0;o-=1){var a=new Dt({h:lb(i,o,!0),s:cb(i,o,!0),v:ub(i,o,!0)});n.push(a)}n.push(r);for(var s=1;s<=v$;s+=1){var l=new Dt({h:lb(i,s),s:cb(i,s),v:ub(i,s)});n.push(l)}return e.theme==="dark"?FM.map(function(c){var u=c.index,d=c.amount;return new Dt(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var xh={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},om=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];om.primary=om[5];var am=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];am.primary=am[5];var sm=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];sm.primary=sm[5];var pd=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];pd.primary=pd[5];var lm=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];lm.primary=lm[5];var cm=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];cm.primary=cm[5];var um=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];um.primary=um[5];var dm=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];dm.primary=dm[5];var md=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];md.primary=md[5];var fm=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];fm.primary=fm[5];var hm=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];hm.primary=hm[5];var pm=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];pm.primary=pm[5];var mm=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];mm.primary=mm[5];var Ch={red:om,volcano:am,orange:sm,gold:pd,yellow:lm,lime:cm,green:um,cyan:dm,blue:md,geekblue:fm,purple:hm,magenta:pm,grey:mm};function O$(t,{generateColorPalettes:e,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=t,u=e(s),d=e(r),f=e(i),h=e(o),p=e(a),m=n(l,c),g=t.colorLink||t.colorInfo,v=e(g),O=new Dt(h[1]).mix(new Dt(h[3]),50).toHexString();return Object.assign(Object.assign({},m),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:O,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:p[1],colorInfoBgHover:p[2],colorInfoBorder:p[3],colorInfoBorderHover:p[4],colorInfoHover:p[4],colorInfo:p[6],colorInfoActive:p[7],colorInfoTextHover:p[8],colorInfoText:p[9],colorInfoTextActive:p[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new Dt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const VM=t=>{let e=t,n=t,r=t,i=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:i}};function HM(t){const{motionUnit:e,motionBase:n,borderRadius:r,lineWidth:i}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:i+1},VM(r))}const XM=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function Fu(t){return(t+8)/t}function ZM(t){const e=Array.from({length:10}).map((n,r)=>{const i=r-1,o=t*Math.pow(Math.E,i/5),a=r>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:Fu(n)}))}const qM=t=>{const e=ZM(t),n=e.map(u=>u.size),r=e.map(u=>u.lineHeight),i=n[1],o=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*i),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function GM(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const ti=(t,e)=>new Dt(t).setA(e).toRgbString(),Ys=(t,e)=>new Dt(t).darken(e).toHexString(),YM=t=>{const e=ga(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},UM=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:ti(r,.88),colorTextSecondary:ti(r,.65),colorTextTertiary:ti(r,.45),colorTextQuaternary:ti(r,.25),colorFill:ti(r,.15),colorFillSecondary:ti(r,.06),colorFillTertiary:ti(r,.04),colorFillQuaternary:ti(r,.02),colorBgSolid:ti(r,1),colorBgSolidHover:ti(r,.75),colorBgSolidActive:ti(r,.95),colorBgLayout:Ys(n,4),colorBgContainer:Ys(n,0),colorBgElevated:Ys(n,0),colorBgSpotlight:ti(r,.85),colorBgBlur:"transparent",colorBorder:Ys(n,15),colorBorderSecondary:Ys(n,6)}};function Ev(t){xh.pink=xh.magenta,Ch.pink=Ch.magenta;const e=Object.keys(Mv).map(n=>{const r=t[n]===xh[n]?Ch[n]:ga(t[n]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i[`${n}${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),O$(t,{generateColorPalettes:YM,generateNeutralColorPalettes:UM})),qM(t.fontSize)),GM(t)),XM(t)),HM(t))}const b$=Jp(Ev),gd={token:Wl,override:{override:Wl},hashed:!0},y$=oe.createContext(gd),Fl="ant",$f="anticon",KM=["outlined","borderless","filled","underlined"],JM=(t,e)=>e||(t?`${Fl}-${t}`:Fl),it=bt({getPrefixCls:JM,iconPrefixCls:$f}),{Consumer:LU}=it,db={};function rr(t){const e=fe(it),{getPrefixCls:n,direction:r,getPopupContainer:i}=e,o=e[t];return Object.assign(Object.assign({classNames:db,styles:db},o),{getPrefixCls:n,direction:r,getPopupContainer:i})}const eE=`-ant-${Date.now()}-${Math.random()}`;function tE(t,e){const n={},r=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},i=(a,s)=>{const l=new Dt(a),c=ga(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){i(e.primaryColor,"primary");const a=new Dt(e.primaryColor),s=ga(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(a,c=>c.setA(c.a*.12));const l=new Dt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setA(c.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return e.successColor&&i(e.successColor,"success"),e.warningColor&&i(e.warningColor,"warning"),e.errorColor&&i(e.errorColor,"error"),e.infoColor&&i(e.infoColor,"info"),` +'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Vn=Math.round;function Ch(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const sb=(t,e,n)=>n===0?t:t/100;function Gs(t,e){const n=e||255;return t>n?n:t<0?0:t}class Dt{constructor(e){D(this,"isValid",!0),D(this,"r",0),D(this,"g",0),D(this,"b",0),D(this,"a",1),D(this,"_h",void 0),D(this,"_s",void 0),D(this,"_l",void 0),D(this,"_v",void 0),D(this,"_max",void 0),D(this,"_min",void 0),D(this,"_brightness",void 0);function n(i){return i[0]in e&&i[1]in e&&i[2]in e}if(e)if(typeof e=="string"){let o=function(a){return i.startsWith(a)};var r=o;const i=e.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(e instanceof Dt)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=Gs(e.r),this.g=Gs(e.g),this.b=Gs(e.b),this.a=typeof e.a=="number"?Gs(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),i=e(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Vn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(e,n=50){const r=this._c(e),i=n/100,o=s=>(r[s]-this[s])*i+this[s],a={r:Vn(o("r")),g:Vn(o("g")),b:Vn(o("b")),a:Vn(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),i=o=>Vn((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=Vn(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=Vn(this.getSaturation()*100),r=Vn(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const i=this.clone();return i[e]=Gs(n,r),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(i,o){return parseInt(n[i]+n[o||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:i}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const f=Vn(r*255);this.r=f,this.g=f,this.b=f}let o=0,a=0,s=0;const l=e/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,a=u):l>=1&&l<2?(o=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(o=u,s=c):l>=5&&l<6&&(o=c,s=u);const d=r-c/2;this.r=Vn((o+d)*255),this.g=Vn((a+d)*255),this.b=Vn((s+d)*255)}fromHsv({h:e,s:n,v:r,a:i}){this._h=e%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=Vn(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=e/60,s=Math.floor(a),l=a-s,c=Vn(r*(1-n)*255),u=Vn(r*(1-n*l)*255),d=Vn(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const n=Ch(e,sb);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=Ch(e,sb);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=Ch(e,(r,i)=>i.includes("%")?Vn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var Gc=2,lb=.16,DM=.05,BM=.05,WM=.15,g$=5,v$=4,FM=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function cb(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-Gc*e:Math.round(t.h)+Gc*e:r=n?Math.round(t.h)+Gc*e:Math.round(t.h)-Gc*e,r<0?r+=360:r>=360&&(r-=360),r}function ub(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-lb*e:e===v$?r=t.s+lb:r=t.s+DM*e,r>1&&(r=1),n&&e===g$&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function db(t,e,n){var r;return n?r=t.v+BM*e:r=t.v-WM*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Oa(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Dt(t),i=r.toHsv(),o=g$;o>0;o-=1){var a=new Dt({h:cb(i,o,!0),s:ub(i,o,!0),v:db(i,o,!0)});n.push(a)}n.push(r);for(var s=1;s<=v$;s+=1){var l=new Dt({h:cb(i,s),s:ub(i,s),v:db(i,s)});n.push(l)}return e.theme==="dark"?FM.map(function(c){var u=c.index,d=c.amount;return new Dt(e.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var $h={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},sm=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];sm.primary=sm[5];var lm=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];lm.primary=lm[5];var cm=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];cm.primary=cm[5];var gd=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];gd.primary=gd[5];var um=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];um.primary=um[5];var dm=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];dm.primary=dm[5];var fm=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];fm.primary=fm[5];var hm=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];hm.primary=hm[5];var vd=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];vd.primary=vd[5];var pm=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];pm.primary=pm[5];var mm=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];mm.primary=mm[5];var gm=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];gm.primary=gm[5];var vm=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];vm.primary=vm[5];var wh={red:sm,volcano:lm,orange:cm,gold:gd,yellow:um,lime:dm,green:fm,cyan:hm,blue:vd,geekblue:pm,purple:mm,magenta:gm,grey:vm};function O$(t,{generateColorPalettes:e,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=t,u=e(s),d=e(r),f=e(i),h=e(o),p=e(a),m=n(l,c),g=t.colorLink||t.colorInfo,v=e(g),O=new Dt(h[1]).mix(new Dt(h[3]),50).toHexString();return Object.assign(Object.assign({},m),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:O,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:f[1],colorWarningBgHover:f[2],colorWarningBorder:f[3],colorWarningBorderHover:f[4],colorWarningHover:f[4],colorWarning:f[6],colorWarningActive:f[7],colorWarningTextHover:f[8],colorWarningText:f[9],colorWarningTextActive:f[10],colorInfoBg:p[1],colorInfoBgHover:p[2],colorInfoBorder:p[3],colorInfoBorderHover:p[4],colorInfoHover:p[4],colorInfo:p[6],colorInfoActive:p[7],colorInfoTextHover:p[8],colorInfoText:p[9],colorInfoTextActive:p[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],colorBgMask:new Dt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const VM=t=>{let e=t,n=t,r=t,i=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?r=1:t>=6&&(r=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:i}};function HM(t){const{motionUnit:e,motionBase:n,borderRadius:r,lineWidth:i}=t;return Object.assign({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:i+1},VM(r))}const XM=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function Vu(t){return(t+8)/t}function ZM(t){const e=Array.from({length:10}).map((n,r)=>{const i=r-1,o=t*Math.pow(Math.E,i/5),a=r>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>({size:n,lineHeight:Vu(n)}))}const qM=t=>{const e=ZM(t),n=e.map(u=>u.size),r=e.map(u=>u.lineHeight),i=n[1],o=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*i),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function GM(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const ni=(t,e)=>new Dt(t).setA(e).toRgbString(),Ys=(t,e)=>new Dt(t).darken(e).toHexString(),YM=t=>{const e=Oa(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},UM=(t,e)=>{const n=t||"#fff",r=e||"#000";return{colorBgBase:n,colorTextBase:r,colorText:ni(r,.88),colorTextSecondary:ni(r,.65),colorTextTertiary:ni(r,.45),colorTextQuaternary:ni(r,.25),colorFill:ni(r,.15),colorFillSecondary:ni(r,.06),colorFillTertiary:ni(r,.04),colorFillQuaternary:ni(r,.02),colorBgSolid:ni(r,1),colorBgSolidHover:ni(r,.75),colorBgSolidActive:ni(r,.95),colorBgLayout:Ys(n,4),colorBgContainer:Ys(n,0),colorBgElevated:Ys(n,0),colorBgSpotlight:ni(r,.85),colorBgBlur:"transparent",colorBorder:Ys(n,15),colorBorderSecondary:Ys(n,6)}};function Av(t){$h.pink=$h.magenta,wh.pink=wh.magenta;const e=Object.keys(Ev).map(n=>{const r=t[n]===$h[n]?wh[n]:Oa(t[n]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i[`${n}${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),O$(t,{generateColorPalettes:YM,generateNeutralColorPalettes:UM})),qM(t.fontSize)),GM(t)),XM(t)),HM(t))}const b$=tm(Av),Od={token:Wl,override:{override:Wl},hashed:!0},y$=oe.createContext(Od),Fl="ant",Pf="anticon",KM=["outlined","borderless","filled","underlined"],JM=(t,e)=>e||(t?`${Fl}-${t}`:Fl),at=yt({getPrefixCls:JM,iconPrefixCls:Pf}),{Consumer:LU}=at,fb={};function ir(t){const e=de(at),{getPrefixCls:n,direction:r,getPopupContainer:i}=e,o=e[t];return Object.assign(Object.assign({classNames:fb,styles:fb},o),{getPrefixCls:n,direction:r,getPopupContainer:i})}const eE=`-ant-${Date.now()}-${Math.random()}`;function tE(t,e){const n={},r=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},i=(a,s)=>{const l=new Dt(a),c=Oa(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){i(e.primaryColor,"primary");const a=new Dt(e.primaryColor),s=Oa(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(a,c=>c.setA(c.a*.12));const l=new Dt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setA(c.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return e.successColor&&i(e.successColor,"success"),e.warningColor&&i(e.warningColor,"warning"),e.errorColor&&i(e.errorColor,"error"),e.infoColor&&i(e.infoColor,"info"),` :root { ${Object.keys(n).map(a=>`--${t}-${a}: ${n[a]};`).join(` `)} } - `.trim()}function nE(t,e){const n=tE(t,e);dr()&&so(n,`${eE}-dynamic-theme`)}const qi=bt(!1),Av=({children:t,disabled:e})=>{const n=fe(qi);return y(qi.Provider,{value:e??n},t)},va=bt(void 0),rE=({children:t,size:e})=>{const n=fe(va);return y(va.Provider,{value:e||n},t)};function iE(){const t=fe(qi),e=fe(va);return{componentDisabled:t,componentSize:e}}var S$=En(function t(){Mn(this,t)}),x$="CALC_UNIT",oE=new RegExp(x$,"g");function $h(t){return typeof t=="number"?"".concat(t).concat(x$):t}var aE=function(t){Ui(n,t);var e=Oo(n);function n(r,i){var o;Mn(this,n),o=e.call(this),D(Pt(o),"result",""),D(Pt(o),"unitlessCssVar",void 0),D(Pt(o),"lowPriority",void 0);var a=Je(r);return o.unitlessCssVar=i,r instanceof n?o.result="(".concat(r.result,")"):a==="number"?o.result=$h(r):a==="string"&&(o.result=r),o}return En(n,[{key:"add",value:function(i){return i instanceof n?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat($h(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof n?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat($h(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return o.result.includes(c)})&&(l=!1),this.result=this.result.replace(oE,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(S$),sE=function(t){Ui(n,t);var e=Oo(n);function n(r){var i;return Mn(this,n),i=e.call(this),D(Pt(i),"result",0),r instanceof n?i.result=r.result:typeof r=="number"&&(i.result=r),i}return En(n,[{key:"add",value:function(i){return i instanceof n?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof n?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof n?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof n?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),n}(S$),lE=function(e,n){var r=e==="css"?aE:sE;return function(i){return new r(i,n)}},fb=function(e,n){return"".concat([n,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function pn(t){var e=U();e.current=t;var n=Ht(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1e4){var r=Date.now();this.lastAccessBeat.forEach(function(i,o){r-i>fE&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),gb=new hE;function pE(t,e){return oe.useMemo(function(){var n=gb.get(e);if(n)return n;var r=t();return gb.set(e,r),r},e)}var mE=function(){return{}};function gE(t){var e=t.useCSP,n=e===void 0?mE:e,r=t.useToken,i=t.usePrefix,o=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(f,h,p,m){var g=Array.isArray(f)?f[0]:f;function v(w){return"".concat(String(g)).concat(w.slice(0,1).toUpperCase()).concat(w.slice(1))}var O=(m==null?void 0:m.unitless)||{},S=typeof s=="function"?s(f):{},x=W(W({},S),{},D({},v("zIndexPopup"),!0));Object.keys(O).forEach(function(w){x[v(w)]=O[w]});var b=W(W({},m),{},{unitless:x,prefixToken:v}),C=u(f,h,p,b),$=c(g,p,b);return function(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,_=C(w,P),T=ae(_,2),R=T[1],k=$(P),I=ae(k,2),Q=I[0],M=I[1];return[Q,R,M]}}function c(f,h,p){var m=p.unitless,g=p.injectStyle,v=g===void 0?!0:g,O=p.prefixToken,S=p.ignore,x=function($){var w=$.rootCls,P=$.cssVar,_=P===void 0?{}:P,T=r(),R=T.realToken;return TM({path:[f],prefix:_.prefix,key:_.key,unitless:m,ignore:S,token:R,scope:w},function(){var k=mb(f,R,h),I=hb(f,R,k,{deprecatedTokens:p==null?void 0:p.deprecatedTokens});return Object.keys(k).forEach(function(Q){I[O(Q)]=I[Q],delete I[Q]}),I}),null},b=function($){var w=r(),P=w.cssVar;return[function(_){return v&&P?oe.createElement(oe.Fragment,null,oe.createElement(x,{rootCls:$,cssVar:P,component:f}),_):_},P==null?void 0:P.key]};return b}function u(f,h,p){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],v=ae(g,1),O=v[0],S=g.join("-"),x=t.layer||{name:"antd"};return function(b){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b,$=r(),w=$.theme,P=$.realToken,_=$.hashId,T=$.token,R=$.cssVar,k=i(),I=k.rootPrefixCls,Q=k.iconPrefixCls,M=n(),E=R?"css":"js",N=pE(function(){var X=new Set;return R&&Object.keys(m.unitless||{}).forEach(function(B){X.add(Nu(B,R.prefix)),X.add(Nu(B,fb(O,R.prefix)))}),lE(E,X)},[E,O,R==null?void 0:R.prefix]),z=dE(E),L=z.max,F=z.min,H={theme:w,token:T,hashId:_,nonce:function(){return M.nonce},clientOnly:m.clientOnly,layer:x,order:m.order||-999};typeof o=="function"&&im(W(W({},H),{},{clientOnly:!1,path:["Shared",I]}),function(){return o(T,{prefix:{rootPrefixCls:I,iconPrefixCls:Q},csp:M})});var V=im(W(W({},H),{},{path:[S,b,Q]}),function(){if(m.injectStyle===!1)return[];var X=uE(T),B=X.token,G=X.flush,se=mb(O,P,p),re=".".concat(b),le=hb(O,P,se,{deprecatedTokens:m.deprecatedTokens});R&&se&&Je(se)==="object"&&Object.keys(se).forEach(function(ue){se[ue]="var(".concat(Nu(ue,fb(O,R.prefix)),")")});var me=kt(B,{componentCls:re,prefixCls:b,iconCls:".".concat(Q),antCls:".".concat(I),calc:N,max:L,min:F},R?se:le),ie=h(me,{hashId:_,prefixCls:b,rootPrefixCls:I,iconPrefixCls:Q});G(O,le);var ne=typeof a=="function"?a(me,b,C,m.resetFont):null;return[m.resetStyle===!1?null:ne,ie]});return[V,_]}}function d(f,h,p){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,h,p,W({resetStyle:!1,order:-998},m)),v=function(S){var x=S.prefixCls,b=S.rootCls,C=b===void 0?x:b;return g(x,C),null};return v}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const Qo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],vE="5.27.4";function Ph(t){return t>=0&&t<=255}function ul(t,e){const{r:n,g:r,b:i,a:o}=new Dt(t).toRgb();if(o<1)return t;const{r:a,g:s,b:l}=new Dt(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((i-l*(1-c))/c);if(Ph(u)&&Ph(d)&&Ph(f))return new Dt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Dt({r:n,g:r,b:i,a:1}).toRgbString()}var OE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{delete r[f]});const i=Object.assign(Object.assign({},n),r),o=480,a=576,s=768,l=992,c=1200,u=1600;if(i.motion===!1){const f="0s";i.motionDurationFast=f,i.motionDurationMid=f,i.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:ul(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:ul(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:ul(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:ul(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` + `.trim()}function nE(t,e){const n=tE(t,e);fr()&&so(n,`${eE}-dynamic-theme`)}const qi=yt(!1),Qv=({children:t,disabled:e})=>{const n=de(qi);return y(qi.Provider,{value:e??n},t)},ba=yt(void 0),rE=({children:t,size:e})=>{const n=de(ba);return y(ba.Provider,{value:e||n},t)};function iE(){const t=de(qi),e=de(ba);return{componentDisabled:t,componentSize:e}}var S$=An(function t(){En(this,t)}),x$="CALC_UNIT",oE=new RegExp(x$,"g");function Ph(t){return typeof t=="number"?"".concat(t).concat(x$):t}var aE=function(t){Ui(n,t);var e=Oo(n);function n(r,i){var o;En(this,n),o=e.call(this),D(Pt(o),"result",""),D(Pt(o),"unitlessCssVar",void 0),D(Pt(o),"lowPriority",void 0);var a=tt(r);return o.unitlessCssVar=i,r instanceof n?o.result="(".concat(r.result,")"):a==="number"?o.result=Ph(r):a==="string"&&(o.result=r),o}return An(n,[{key:"add",value:function(i){return i instanceof n?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(Ph(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof n?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(Ph(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof n?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return o.result.includes(c)})&&(l=!1),this.result=this.result.replace(oE,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(S$),sE=function(t){Ui(n,t);var e=Oo(n);function n(r){var i;return En(this,n),i=e.call(this),D(Pt(i),"result",0),r instanceof n?i.result=r.result:typeof r=="number"&&(i.result=r),i}return An(n,[{key:"add",value:function(i){return i instanceof n?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof n?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof n?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof n?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),n}(S$),lE=function(e,n){var r=e==="css"?aE:sE;return function(i){return new r(i,n)}},hb=function(e,n){return"".concat([n,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function pn(t){var e=Y();e.current=t;var n=Ht(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1e4){var r=Date.now();this.lastAccessBeat.forEach(function(i,o){r-i>fE&&(n.map.delete(o),n.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),vb=new hE;function pE(t,e){return oe.useMemo(function(){var n=vb.get(e);if(n)return n;var r=t();return vb.set(e,r),r},e)}var mE=function(){return{}};function gE(t){var e=t.useCSP,n=e===void 0?mE:e,r=t.useToken,i=t.usePrefix,o=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(f,h,p,m){var g=Array.isArray(f)?f[0]:f;function v(w){return"".concat(String(g)).concat(w.slice(0,1).toUpperCase()).concat(w.slice(1))}var O=(m==null?void 0:m.unitless)||{},S=typeof s=="function"?s(f):{},C=W(W({},S),{},D({},v("zIndexPopup"),!0));Object.keys(O).forEach(function(w){C[v(w)]=O[w]});var b=W(W({},m),{},{unitless:C,prefixToken:v}),x=u(f,h,p,b),$=c(g,p,b);return function(w){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,_=x(w,P),T=ae(_,2),k=T[1],R=$(P),I=ae(R,2),Q=I[0],E=I[1];return[Q,k,E]}}function c(f,h,p){var m=p.unitless,g=p.injectStyle,v=g===void 0?!0:g,O=p.prefixToken,S=p.ignore,C=function($){var w=$.rootCls,P=$.cssVar,_=P===void 0?{}:P,T=r(),k=T.realToken;return TM({path:[f],prefix:_.prefix,key:_.key,unitless:m,ignore:S,token:k,scope:w},function(){var R=gb(f,k,h),I=pb(f,k,R,{deprecatedTokens:p==null?void 0:p.deprecatedTokens});return Object.keys(R).forEach(function(Q){I[O(Q)]=I[Q],delete I[Q]}),I}),null},b=function($){var w=r(),P=w.cssVar;return[function(_){return v&&P?oe.createElement(oe.Fragment,null,oe.createElement(C,{rootCls:$,cssVar:P,component:f}),_):_},P==null?void 0:P.key]};return b}function u(f,h,p){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],v=ae(g,1),O=v[0],S=g.join("-"),C=t.layer||{name:"antd"};return function(b){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b,$=r(),w=$.theme,P=$.realToken,_=$.hashId,T=$.token,k=$.cssVar,R=i(),I=R.rootPrefixCls,Q=R.iconPrefixCls,E=n(),A=k?"css":"js",N=pE(function(){var H=new Set;return k&&Object.keys(m.unitless||{}).forEach(function(B){H.add(zu(B,k.prefix)),H.add(zu(B,hb(O,k.prefix)))}),lE(A,H)},[A,O,k==null?void 0:k.prefix]),L=dE(A),z=L.max,V=L.min,X={theme:w,token:T,hashId:_,nonce:function(){return E.nonce},clientOnly:m.clientOnly,layer:C,order:m.order||-999};typeof o=="function"&&am(W(W({},X),{},{clientOnly:!1,path:["Shared",I]}),function(){return o(T,{prefix:{rootPrefixCls:I,iconPrefixCls:Q},csp:E})});var F=am(W(W({},X),{},{path:[S,b,Q]}),function(){if(m.injectStyle===!1)return[];var H=uE(T),B=H.token,G=H.flush,se=gb(O,P,p),ie=".".concat(b),le=pb(O,P,se,{deprecatedTokens:m.deprecatedTokens});k&&se&&tt(se)==="object"&&Object.keys(se).forEach(function(ce){se[ce]="var(".concat(zu(ce,hb(O,k.prefix)),")")});var pe=kt(B,{componentCls:ie,prefixCls:b,iconCls:".".concat(Q),antCls:".".concat(I),calc:N,max:z,min:V},k?se:le),ne=h(pe,{hashId:_,prefixCls:b,rootPrefixCls:I,iconPrefixCls:Q});G(O,le);var ee=typeof a=="function"?a(pe,b,x,m.resetFont):null;return[m.resetStyle===!1?null:ee,ne]});return[F,_]}}function d(f,h,p){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,h,p,W({resetStyle:!1,order:-998},m)),v=function(S){var C=S.prefixCls,b=S.rootCls,x=b===void 0?C:b;return g(C,x),null};return v}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const No=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],vE="5.27.4";function Th(t){return t>=0&&t<=255}function ul(t,e){const{r:n,g:r,b:i,a:o}=new Dt(t).toRgb();if(o<1)return t;const{r:a,g:s,b:l}=new Dt(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((i-l*(1-c))/c);if(Th(u)&&Th(d)&&Th(f))return new Dt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Dt({r:n,g:r,b:i,a:1}).toRgbString()}var OE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{delete r[f]});const i=Object.assign(Object.assign({},n),r),o=480,a=576,s=768,l=992,c=1200,u=1600;if(i.motion===!1){const f="0s";i.motionDurationFast=f,i.motionDurationMid=f,i.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:ul(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:ul(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:ul(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:ul(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) @@ -53,7 +53,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var vb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const r=n.getDerivativeToken(t),{override:i}=e,o=vb(e,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=$$(a),o&&Object.entries(o).forEach(([s,l])=>{const{theme:c}=l,u=vb(l,["theme"]);let d=u;c&&(d=P$(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=d}),a};function Cr(){const{token:t,hashed:e,theme:n,override:r,cssVar:i}=oe.useContext(y$),o=`${vE}-${e||""}`,a=n||b$,[s,l,c]=eM(a,[Wl,t],{salt:o,override:r,getComputedToken:P$,formatToken:$$,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:w$,ignore:bE,preserve:yE}});return[a,c,e?l:"",s,i]}const ba={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},wn=(t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),As=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),No=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),SE=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),xE=(t,e,n,r)=>{const i=`[class^="${e}"], [class*=" ${e}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},wf=(t,e)=>({outline:`${q(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),Ci=(t,e)=>({"&:focus-visible":wf(t,e)}),_$=t=>({[`.${t}`]:Object.assign(Object.assign({},As()),{[`.${t} .${t}-icon`]:{display:"block"}})}),T$=t=>Object.assign(Object.assign({color:t.colorLink,textDecoration:t.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},Ci(t)),{"&:hover":{color:t.colorLinkHover,textDecoration:t.linkHoverDecoration},"&:focus":{color:t.colorLinkHover,textDecoration:t.linkFocusDecoration},"&:active":{color:t.colorLinkActive,textDecoration:t.linkHoverDecoration}}),{genStyleHooks:Zt,genComponentStyleHook:CE,genSubStyleComponent:Qs}=gE({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=fe(it);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,i]=Cr();return{theme:t,realToken:e,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:t}=fe(it);return t??{}},getResetStyles:(t,e)=>{var n;const r=SE(t);return[r,{"&":r},_$((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:$f)]},getCommonStyle:xE,getCompUnitless:()=>w$});function k$(t,e){return Qo.reduce((n,r)=>{const i=t[`${r}1`],o=t[`${r}3`],a=t[`${r}6`],s=t[`${r}7`];return Object.assign(Object.assign({},n),e(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const $E=(t,e)=>{const[n,r]=Cr();return im({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>_$(t))},wE=Object.assign({},gc),{useId:Ob}=wE,PE=()=>"",_E=typeof Ob>"u"?PE:Ob;function TE(t,e,n){var r;bc();const i=t||{},o=i.inherit===!1||!e?Object.assign(Object.assign({},gd),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:gd.hashed,cssVar:e==null?void 0:e.cssVar}):e,a=_E();return vc(()=>{var s,l;if(!t)return e;const c=Object.assign({},o.components);Object.keys(t.components||{}).forEach(f=>{c[f]=Object.assign(Object.assign({},c[f]),t.components[f])});const u=`css-var-${a.replace(/:/g,"")}`,d=((s=i.cssVar)!==null&&s!==void 0?s:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((l=i.cssVar)===null||l===void 0?void 0:l.key)||u});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:c,cssVar:d})},[i,o],(s,l)=>s.some((c,u)=>{const d=l[u];return!Dl(c,d,!0)}))}var kE=["children"],R$=bt({});function RE(t){var e=t.children,n=ut(t,kE);return y(R$.Provider,{value:n},e)}var IE=function(t){Ui(n,t);var e=Oo(n);function n(){return Mn(this,n),e.apply(this,arguments)}return En(n,[{key:"render",value:function(){return this.props.children}}]),n}(er);function ME(t){var e=Ms(function(s){return s+1},0),n=ae(e,2),r=n[1],i=U(t),o=pn(function(){return i.current}),a=pn(function(s){i.current=typeof s=="function"?s(i.current):s,r()});return[o,a]}var xo="none",Yc="appear",Uc="enter",Kc="leave",bb="none",gi="prepare",Ya="start",Ua="active",Qv="end",I$="prepared";function yb(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function EE(t,e){var n={animationend:yb("Animation","AnimationEnd"),transitionend:yb("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var AE=EE(dr(),typeof window<"u"?window:{}),M$={};if(dr()){var QE=document.createElement("div");M$=QE.style}var Jc={};function E$(t){if(Jc[t])return Jc[t];var e=AE[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Xt(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return be(function(){return function(){e()}},[]),[n,e]};var LE=[gi,Ya,Ua,Qv],jE=[gi,I$],L$=!1,DE=!0;function j$(t){return t===Ua||t===Qv}const BE=function(t,e,n){var r=Oa(bb),i=ae(r,2),o=i[0],a=i[1],s=zE(),l=ae(s,2),c=l[0],u=l[1];function d(){a(gi,!0)}var f=e?jE:LE;return z$(function(){if(o!==bb&&o!==Qv){var h=f.indexOf(o),p=f[h+1],m=n(o);m===L$?a(p,!0):p&&c(function(g){function v(){g.isCanceled()||a(p,!0)}m===!0?v():Promise.resolve(m).then(v)})}},[t,o]),be(function(){return function(){u()}},[]),[d,o]};function WE(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,h=r.onEnterPrepare,p=r.onLeavePrepare,m=r.onAppearStart,g=r.onEnterStart,v=r.onLeaveStart,O=r.onAppearActive,S=r.onEnterActive,x=r.onLeaveActive,b=r.onAppearEnd,C=r.onEnterEnd,$=r.onLeaveEnd,w=r.onVisibleChanged,P=Oa(),_=ae(P,2),T=_[0],R=_[1],k=ME(xo),I=ae(k,2),Q=I[0],M=I[1],E=Oa(null),N=ae(E,2),z=N[0],L=N[1],F=Q(),H=U(!1),V=U(null);function X(){return n()}var B=U(!1);function G(){M(xo),L(null,!0)}var se=pn(function(te){var Oe=Q();if(Oe!==xo){var ye=X();if(!(te&&!te.deadline&&te.target!==ye)){var pe=B.current,Qe;Oe===Yc&&pe?Qe=b==null?void 0:b(ye,te):Oe===Uc&&pe?Qe=C==null?void 0:C(ye,te):Oe===Kc&&pe&&(Qe=$==null?void 0:$(ye,te)),pe&&Qe!==!1&&G()}}}),re=NE(se),le=ae(re,1),me=le[0],ie=function(Oe){switch(Oe){case Yc:return D(D(D({},gi,f),Ya,m),Ua,O);case Uc:return D(D(D({},gi,h),Ya,g),Ua,S);case Kc:return D(D(D({},gi,p),Ya,v),Ua,x);default:return{}}},ne=ge(function(){return ie(F)},[F]),ue=BE(F,!t,function(te){if(te===gi){var Oe=ne[gi];return Oe?Oe(X()):L$}if(ee in ne){var ye;L(((ye=ne[ee])===null||ye===void 0?void 0:ye.call(ne,X(),null))||null)}return ee===Ua&&F!==xo&&(me(X()),u>0&&(clearTimeout(V.current),V.current=setTimeout(function(){se({deadline:!0})},u))),ee===I$&&G(),DE}),de=ae(ue,2),j=de[0],ee=de[1],he=j$(ee);B.current=he;var ve=U(null);z$(function(){if(!(H.current&&ve.current===e)){R(e);var te=H.current;H.current=!0;var Oe;!te&&e&&s&&(Oe=Yc),te&&e&&o&&(Oe=Uc),(te&&!e&&c||!te&&d&&!e&&c)&&(Oe=Kc);var ye=ie(Oe);Oe&&(t||ye[gi])?(M(Oe),j()):M(xo),ve.current=e}},[e]),be(function(){(F===Yc&&!s||F===Uc&&!o||F===Kc&&!c)&&M(xo)},[s,o,c]),be(function(){return function(){H.current=!1,clearTimeout(V.current)}},[]);var Y=U(!1);be(function(){T&&(Y.current=!0),T!==void 0&&F===xo&&((Y.current||T)&&(w==null||w(T)),Y.current=!0)},[T,F]);var ce=z;return ne[gi]&&ee===Ya&&(ce=W({transition:"none"},ce)),[F,ee,ce,T??e]}function FE(t){var e=t;Je(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=Se(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,d=i.children,f=i.motionName,h=i.leavedClassName,p=i.eventProps,m=fe(R$),g=m.motion,v=n(i,g),O=U(),S=U();function x(){try{return O.current instanceof HTMLElement?O.current:Qu(S.current)}catch{return null}}var b=WE(v,s,x,i),C=ae(b,4),$=C[0],w=C[1],P=C[2],_=C[3],T=U(_);_&&(T.current=!0);var R=Ht(function(N){O.current=N,Sv(o,N)},[o]),k,I=W(W({},p),{},{visible:s});if(!d)k=null;else if($===xo)_?k=d(W({},I),R):!c&&T.current&&h?k=d(W(W({},I),{},{className:h}),R):u||!c&&!h?k=d(W(W({},I),{},{style:{display:"none"}}),R):k=null;else{var Q;w===gi?Q="prepare":j$(w)?Q="active":w===Ya&&(Q="start");var M=Cb(f,"".concat($,"-").concat(Q));k=d(W(W({},I),{},{className:Z(Cb(f,$),D(D({},M,M&&Q),f,typeof f=="string")),style:P}),R)}if(Kt(k)&&vo(k)){var E=Ho(k);E||(k=Xn(k,{ref:R}))}return y(IE,{ref:S},k)});return r.displayName="CSSMotion",r}const pi=FE(N$);var vm="add",Om="keep",bm="remove",_h="removed";function VE(t){var e;return t&&Je(t)==="object"&&"key"in t?e=t:e={key:t},W(W({},e),{},{key:String(e.key)})}function ym(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(VE)}function HE(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=ym(t),a=ym(e);o.forEach(function(c){for(var u=!1,d=r;d1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==bm}),n.forEach(function(u){u.key===c&&(u.status=Om)})}),n}var XE=["component","children","onVisibleChanged","onAllRemoved"],ZE=["status"],qE=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function GE(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pi,n=function(r){Ui(o,r);var i=Oo(o);function o(){var a;Mn(this,o);for(var s=arguments.length,l=new Array(s),c=0;cnull;var KE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie.endsWith("Color"))}const n5=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:i}=t;e!==void 0&&(vd=e),n!==void 0&&(B$=n),"holderRender"in t&&(F$=i),r&&(t5(r)?nE(Vu(),r):W$=r)},V$=()=>({getPrefixCls:(t,e)=>e||(t?`${Vu()}-${t}`:Vu()),getIconPrefixCls:e5,getRootPrefixCls:()=>vd||Vu(),getTheme:()=>W$,holderRender:F$}),r5=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:p,popupOverflow:m,legacyLocale:g,parentContext:v,iconPrefixCls:O,theme:S,componentDisabled:x,segmented:b,statistic:C,spin:$,calendar:w,carousel:P,cascader:_,collapse:T,typography:R,checkbox:k,descriptions:I,divider:Q,drawer:M,skeleton:E,steps:N,image:z,layout:L,list:F,mentions:H,modal:V,progress:X,result:B,slider:G,breadcrumb:se,menu:re,pagination:le,input:me,textArea:ie,empty:ne,badge:ue,radio:de,rate:j,switch:ee,transfer:he,avatar:ve,message:Y,tag:ce,table:te,card:Oe,tabs:ye,timeline:pe,timePicker:Qe,upload:Me,notification:De,tree:we,colorPicker:Ie,datePicker:rt,rangePicker:Ye,flex:lt,wave:Be,dropdown:ke,warning:Xe,tour:_e,tooltip:Pe,popover:ct,popconfirm:xt,floatButton:Pn,floatButtonGroup:qt,variant:xn,inputNumber:gn,treeSelect:Bt}=t,Ot=Ht((tt,Ct)=>{const{prefixCls:$t}=t;if(Ct)return Ct;const wt=$t||v.getPrefixCls("");return tt?`${wt}-${tt}`:wt},[v.getPrefixCls,t.prefixCls]),ht=O||v.iconPrefixCls||$f,et=n||v.csp;$E(ht,et);const nt=TE(S,v.theme,{prefixCls:Ot("")}),Re={csp:et,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:p??h,popupOverflow:m,getPrefixCls:Ot,iconPrefixCls:ht,theme:nt,segmented:b,statistic:C,spin:$,calendar:w,carousel:P,cascader:_,collapse:T,typography:R,checkbox:k,descriptions:I,divider:Q,drawer:M,skeleton:E,steps:N,image:z,input:me,textArea:ie,layout:L,list:F,mentions:H,modal:V,progress:X,result:B,slider:G,breadcrumb:se,menu:re,pagination:le,empty:ne,badge:ue,radio:de,rate:j,switch:ee,transfer:he,avatar:ve,message:Y,tag:ce,table:te,card:Oe,tabs:ye,timeline:pe,timePicker:Qe,upload:Me,notification:De,tree:we,colorPicker:Ie,datePicker:rt,rangePicker:Ye,flex:lt,wave:Be,dropdown:ke,warning:Xe,tour:_e,tooltip:Pe,popover:ct,popconfirm:xt,floatButton:Pn,floatButtonGroup:qt,variant:xn,inputNumber:gn,treeSelect:Bt},ot=Object.assign({},v);Object.keys(Re).forEach(tt=>{Re[tt]!==void 0&&(ot[tt]=Re[tt])}),JE.forEach(tt=>{const Ct=t[tt];Ct&&(ot[tt]=Ct)}),typeof r<"u"&&(ot.button=Object.assign({autoInsertSpace:r},ot.button));const dt=vc(()=>ot,ot,(tt,Ct)=>{const $t=Object.keys(tt),wt=Object.keys(Ct);return $t.length!==wt.length||$t.some(Mt=>tt[Mt]!==Ct[Mt])}),{layer:Ee}=fe(Oc),Ze=ge(()=>({prefixCls:ht,csp:et,layer:Ee?"antd":void 0}),[ht,et,Ee]);let Ae=y(At,null,y(UE,{dropdownMatchSelectWidth:h}),e);const We=ge(()=>{var tt,Ct,$t,wt;return Ga(((tt=Zi.Form)===null||tt===void 0?void 0:tt.defaultValidateMessages)||{},(($t=(Ct=dt.locale)===null||Ct===void 0?void 0:Ct.Form)===null||$t===void 0?void 0:$t.defaultValidateMessages)||{},((wt=dt.form)===null||wt===void 0?void 0:wt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[dt,a==null?void 0:a.validateMessages]);Object.keys(We).length>0&&(Ae=y(h$.Provider,{value:We},Ae)),s&&(Ae=y(jM,{locale:s,_ANT_MARK__:LM},Ae)),Ae=y(Rv.Provider,{value:Ze},Ae),l&&(Ae=y(rE,{size:l},Ae)),Ae=y(YE,null,Ae);const st=ge(()=>{const tt=nt||{},{algorithm:Ct,token:$t,components:wt,cssVar:Mt}=tt,vn=KE(tt,["algorithm","token","components","cssVar"]),un=Ct&&(!Array.isArray(Ct)||Ct.length>0)?Jp(Ct):b$,Cn={};Object.entries(wt||{}).forEach(([Ut,nn])=>{const Te=Object.assign({},nn);"algorithm"in Te&&(Te.algorithm===!0?Te.theme=un:(Array.isArray(Te.algorithm)||typeof Te.algorithm=="function")&&(Te.theme=Jp(Te.algorithm)),delete Te.algorithm),Cn[Ut]=Te});const Ln=Object.assign(Object.assign({},Wl),$t);return Object.assign(Object.assign({},vn),{theme:un,token:Ln,components:Cn,override:Object.assign({override:Ln},Cn),cssVar:Mt})},[nt]);return S&&(Ae=y(y$.Provider,{value:st},Ae)),dt.warning&&(Ae=y(EM.Provider,{value:dt.warning},Ae)),x!==void 0&&(Ae=y(Av,{disabled:x},Ae)),y(it.Provider,{value:dt},Ae)},Gr=t=>{const e=fe(it),n=fe(Iv);return y(r5,Object.assign({parentContext:e,legacyLocale:n},t))};Gr.ConfigContext=it;Gr.SizeContext=va;Gr.config=n5;Gr.useConfig=iE;Object.defineProperty(Gr,"SizeContext",{get:()=>va});var i5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function H$(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function o5(t){return H$(t)instanceof ShadowRoot}function Od(t){return o5(t)?H$(t):null}function a5(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function s5(t,e){tr(t,"[@ant-design/icons] ".concat(e))}function wb(t){return Je(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(Je(t.icon)==="object"||typeof t.icon=="function")}function Pb(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[a5(n)]=r}return e},{})}function Sm(t,e,n){return n?oe.createElement(t.tag,W(W({key:e},Pb(t.attrs)),n),(t.children||[]).map(function(r,i){return Sm(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):oe.createElement(t.tag,W({key:e},Pb(t.attrs)),(t.children||[]).map(function(r,i){return Sm(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function X$(t){return ga(t)[0]}function Z$(t){return t?Array.isArray(t)?t:[t]:[]}var l5=` + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var Ob=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const r=n.getDerivativeToken(t),{override:i}=e,o=Ob(e,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=$$(a),o&&Object.entries(o).forEach(([s,l])=>{const{theme:c}=l,u=Ob(l,["theme"]);let d=u;c&&(d=P$(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=d}),a};function $r(){const{token:t,hashed:e,theme:n,override:r,cssVar:i}=oe.useContext(y$),o=`${vE}-${e||""}`,a=n||b$,[s,l,c]=eM(a,[Wl,t],{salt:o,override:r,getComputedToken:P$,formatToken:$$,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:w$,ignore:bE,preserve:yE}});return[a,c,e?l:"",s,i]}const Sa={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},wn=(t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),As=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),zo=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),SE=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),xE=(t,e,n,r)=>{const i=`[class^="${e}"], [class*=" ${e}"]`,o=n?`.${n}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},_f=(t,e)=>({outline:`${q(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),Ci=(t,e)=>({"&:focus-visible":_f(t,e)}),_$=t=>({[`.${t}`]:Object.assign(Object.assign({},As()),{[`.${t} .${t}-icon`]:{display:"block"}})}),T$=t=>Object.assign(Object.assign({color:t.colorLink,textDecoration:t.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},Ci(t)),{"&:hover":{color:t.colorLinkHover,textDecoration:t.linkHoverDecoration},"&:focus":{color:t.colorLinkHover,textDecoration:t.linkFocusDecoration},"&:active":{color:t.colorLinkActive,textDecoration:t.linkHoverDecoration}}),{genStyleHooks:Zt,genComponentStyleHook:CE,genSubStyleComponent:Qs}=gE({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=de(at);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,n,r,i]=$r();return{theme:t,realToken:e,hashId:n,token:r,cssVar:i}},useCSP:()=>{const{csp:t}=de(at);return t??{}},getResetStyles:(t,e)=>{var n;const r=SE(t);return[r,{"&":r},_$((n=e==null?void 0:e.prefix.iconPrefixCls)!==null&&n!==void 0?n:Pf)]},getCommonStyle:xE,getCompUnitless:()=>w$});function k$(t,e){return No.reduce((n,r)=>{const i=t[`${r}1`],o=t[`${r}3`],a=t[`${r}6`],s=t[`${r}7`];return Object.assign(Object.assign({},n),e(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const $E=(t,e)=>{const[n,r]=$r();return am({token:r,hashId:"",path:["ant-design-icons",t],nonce:()=>e==null?void 0:e.nonce,layer:{name:"antd"}},()=>_$(t))},wE=Object.assign({},gc),{useId:bb}=wE,PE=()=>"",_E=typeof bb>"u"?PE:bb;function TE(t,e,n){var r;bc();const i=t||{},o=i.inherit===!1||!e?Object.assign(Object.assign({},Od),{hashed:(r=e==null?void 0:e.hashed)!==null&&r!==void 0?r:Od.hashed,cssVar:e==null?void 0:e.cssVar}):e,a=_E();return vc(()=>{var s,l;if(!t)return e;const c=Object.assign({},o.components);Object.keys(t.components||{}).forEach(f=>{c[f]=Object.assign(Object.assign({},c[f]),t.components[f])});const u=`css-var-${a.replace(/:/g,"")}`,d=((s=i.cssVar)!==null&&s!==void 0?s:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((l=i.cssVar)===null||l===void 0?void 0:l.key)||u});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:c,cssVar:d})},[i,o],(s,l)=>s.some((c,u)=>{const d=l[u];return!Dl(c,d,!0)}))}var kE=["children"],R$=yt({});function RE(t){var e=t.children,n=dt(t,kE);return y(R$.Provider,{value:n},e)}var IE=function(t){Ui(n,t);var e=Oo(n);function n(){return En(this,n),e.apply(this,arguments)}return An(n,[{key:"render",value:function(){return this.props.children}}]),n}(tr);function ME(t){var e=Ms(function(s){return s+1},0),n=ae(e,2),r=n[1],i=Y(t),o=pn(function(){return i.current}),a=pn(function(s){i.current=typeof s=="function"?s(i.current):s,r()});return[o,a]}var xo="none",Yc="appear",Uc="enter",Kc="leave",yb="none",vi="prepare",Ka="start",Ja="active",Nv="end",I$="prepared";function Sb(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}function EE(t,e){var n={animationend:Sb("Animation","AnimationEnd"),transitionend:Sb("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete n.animationend.animation,"TransitionEvent"in e||delete n.transitionend.transition),n}var AE=EE(fr(),typeof window<"u"?window:{}),M$={};if(fr()){var QE=document.createElement("div");M$=QE.style}var Jc={};function E$(t){if(Jc[t])return Jc[t];var e=AE[t];if(e)for(var n=Object.keys(e),r=n.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Xt(function(){i<=1?r({isCanceled:function(){return o!==t.current}}):n(r,i-1)});t.current=o}return be(function(){return function(){e()}},[]),[n,e]};var LE=[vi,Ka,Ja,Nv],jE=[vi,I$],L$=!1,DE=!0;function j$(t){return t===Ja||t===Nv}const BE=function(t,e,n){var r=ya(yb),i=ae(r,2),o=i[0],a=i[1],s=zE(),l=ae(s,2),c=l[0],u=l[1];function d(){a(vi,!0)}var f=e?jE:LE;return z$(function(){if(o!==yb&&o!==Nv){var h=f.indexOf(o),p=f[h+1],m=n(o);m===L$?a(p,!0):p&&c(function(g){function v(){g.isCanceled()||a(p,!0)}m===!0?v():Promise.resolve(m).then(v)})}},[t,o]),be(function(){return function(){u()}},[]),[d,o]};function WE(t,e,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,h=r.onEnterPrepare,p=r.onLeavePrepare,m=r.onAppearStart,g=r.onEnterStart,v=r.onLeaveStart,O=r.onAppearActive,S=r.onEnterActive,C=r.onLeaveActive,b=r.onAppearEnd,x=r.onEnterEnd,$=r.onLeaveEnd,w=r.onVisibleChanged,P=ya(),_=ae(P,2),T=_[0],k=_[1],R=ME(xo),I=ae(R,2),Q=I[0],E=I[1],A=ya(null),N=ae(A,2),L=N[0],z=N[1],V=Q(),X=Y(!1),F=Y(null);function H(){return n()}var B=Y(!1);function G(){E(xo),z(null,!0)}var se=pn(function(Ce){var Ie=Q();if(Ie!==xo){var _e=H();if(!(Ce&&!Ce.deadline&&Ce.target!==_e)){var ve=B.current,Ne;Ie===Yc&&ve?Ne=b==null?void 0:b(_e,Ce):Ie===Uc&&ve?Ne=x==null?void 0:x(_e,Ce):Ie===Kc&&ve&&(Ne=$==null?void 0:$(_e,Ce)),ve&&Ne!==!1&&G()}}}),ie=NE(se),le=ae(ie,1),pe=le[0],ne=function(Ie){switch(Ie){case Yc:return D(D(D({},vi,f),Ka,m),Ja,O);case Uc:return D(D(D({},vi,h),Ka,g),Ja,S);case Kc:return D(D(D({},vi,p),Ka,v),Ja,C);default:return{}}},ee=me(function(){return ne(V)},[V]),ce=BE(V,!t,function(Ce){if(Ce===vi){var Ie=ee[vi];return Ie?Ie(H()):L$}if(J in ee){var _e;z(((_e=ee[J])===null||_e===void 0?void 0:_e.call(ee,H(),null))||null)}return J===Ja&&V!==xo&&(pe(H()),u>0&&(clearTimeout(F.current),F.current=setTimeout(function(){se({deadline:!0})},u))),J===I$&&G(),DE}),ue=ae(ce,2),j=ue[0],J=ue[1],he=j$(J);B.current=he;var ge=Y(null);z$(function(){if(!(X.current&&ge.current===e)){k(e);var Ce=X.current;X.current=!0;var Ie;!Ce&&e&&s&&(Ie=Yc),Ce&&e&&o&&(Ie=Uc),(Ce&&!e&&c||!Ce&&d&&!e&&c)&&(Ie=Kc);var _e=ne(Ie);Ie&&(t||_e[vi])?(E(Ie),j()):E(xo),ge.current=e}},[e]),be(function(){(V===Yc&&!s||V===Uc&&!o||V===Kc&&!c)&&E(xo)},[s,o,c]),be(function(){return function(){X.current=!1,clearTimeout(F.current)}},[]);var $e=Y(!1);be(function(){T&&($e.current=!0),T!==void 0&&V===xo&&(($e.current||T)&&(w==null||w(T)),$e.current=!0)},[T,V]);var Te=L;return ee[vi]&&J===Ka&&(Te=W({transition:"none"},Te)),[V,J,Te,T??e]}function FE(t){var e=t;tt(t)==="object"&&(e=t.transitionSupport);function n(i,o){return!!(i.motionName&&e&&o!==!1)}var r=ye(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,d=i.children,f=i.motionName,h=i.leavedClassName,p=i.eventProps,m=de(R$),g=m.motion,v=n(i,g),O=Y(),S=Y();function C(){try{return O.current instanceof HTMLElement?O.current:Nu(S.current)}catch{return null}}var b=WE(v,s,C,i),x=ae(b,4),$=x[0],w=x[1],P=x[2],_=x[3],T=Y(_);_&&(T.current=!0);var k=Ht(function(N){O.current=N,xv(o,N)},[o]),R,I=W(W({},p),{},{visible:s});if(!d)R=null;else if($===xo)_?R=d(W({},I),k):!c&&T.current&&h?R=d(W(W({},I),{},{className:h}),k):u||!c&&!h?R=d(W(W({},I),{},{style:{display:"none"}}),k):R=null;else{var Q;w===vi?Q="prepare":j$(w)?Q="active":w===Ka&&(Q="start");var E=$b(f,"".concat($,"-").concat(Q));R=d(W(W({},I),{},{className:Z($b(f,$),D(D({},E,E&&Q),f,typeof f=="string")),style:P}),k)}if(Jt(R)&&vo(R)){var A=Xo(R);A||(R=Zn(R,{ref:k}))}return y(IE,{ref:S},R)});return r.displayName="CSSMotion",r}const mi=FE(N$);var bm="add",ym="keep",Sm="remove",kh="removed";function VE(t){var e;return t&&tt(t)==="object"&&"key"in t?e=t:e={key:t},W(W({},e),{},{key:String(e.key)})}function xm(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(VE)}function HE(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=e.length,o=xm(t),a=xm(e);o.forEach(function(c){for(var u=!1,d=r;d1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Sm}),n.forEach(function(u){u.key===c&&(u.status=ym)})}),n}var XE=["component","children","onVisibleChanged","onAllRemoved"],ZE=["status"],qE=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function GE(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mi,n=function(r){Ui(o,r);var i=Oo(o);function o(){var a;En(this,o);for(var s=arguments.length,l=new Array(s),c=0;cnull;var KE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie.endsWith("Color"))}const n5=t=>{const{prefixCls:e,iconPrefixCls:n,theme:r,holderRender:i}=t;e!==void 0&&(bd=e),n!==void 0&&(B$=n),"holderRender"in t&&(F$=i),r&&(t5(r)?nE(Hu(),r):W$=r)},V$=()=>({getPrefixCls:(t,e)=>e||(t?`${Hu()}-${t}`:Hu()),getIconPrefixCls:e5,getRootPrefixCls:()=>bd||Hu(),getTheme:()=>W$,holderRender:F$}),r5=t=>{const{children:e,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:p,popupOverflow:m,legacyLocale:g,parentContext:v,iconPrefixCls:O,theme:S,componentDisabled:C,segmented:b,statistic:x,spin:$,calendar:w,carousel:P,cascader:_,collapse:T,typography:k,checkbox:R,descriptions:I,divider:Q,drawer:E,skeleton:A,steps:N,image:L,layout:z,list:V,mentions:X,modal:F,progress:H,result:B,slider:G,breadcrumb:se,menu:ie,pagination:le,input:pe,textArea:ne,empty:ee,badge:ce,radio:ue,rate:j,switch:J,transfer:he,avatar:ge,message:$e,tag:Te,table:Ce,card:Ie,tabs:_e,timeline:ve,timePicker:Ne,upload:ze,notification:re,tree:fe,colorPicker:te,datePicker:Oe,rangePicker:we,flex:Ke,wave:Ae,dropdown:Me,warning:Fe,tour:Re,tooltip:ke,popover:ot,popconfirm:ut,floatButton:Pn,floatButtonGroup:qt,variant:xn,inputNumber:gn,treeSelect:Bt}=t,bt=Ht((rt,Ct)=>{const{prefixCls:$t}=t;if(Ct)return Ct;const wt=$t||v.getPrefixCls("");return rt?`${wt}-${rt}`:wt},[v.getPrefixCls,t.prefixCls]),pt=O||v.iconPrefixCls||Pf,nt=n||v.csp;$E(pt,nt);const it=TE(S,v.theme,{prefixCls:bt("")}),Qe={csp:nt,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:p??h,popupOverflow:m,getPrefixCls:bt,iconPrefixCls:pt,theme:it,segmented:b,statistic:x,spin:$,calendar:w,carousel:P,cascader:_,collapse:T,typography:k,checkbox:R,descriptions:I,divider:Q,drawer:E,skeleton:A,steps:N,image:L,input:pe,textArea:ne,layout:z,list:V,mentions:X,modal:F,progress:H,result:B,slider:G,breadcrumb:se,menu:ie,pagination:le,empty:ee,badge:ce,radio:ue,rate:j,switch:J,transfer:he,avatar:ge,message:$e,tag:Te,table:Ce,card:Ie,tabs:_e,timeline:ve,timePicker:Ne,upload:ze,notification:re,tree:fe,colorPicker:te,datePicker:Oe,rangePicker:we,flex:Ke,wave:Ae,dropdown:Me,warning:Fe,tour:Re,tooltip:ke,popover:ot,popconfirm:ut,floatButton:Pn,floatButtonGroup:qt,variant:xn,inputNumber:gn,treeSelect:Bt},st=Object.assign({},v);Object.keys(Qe).forEach(rt=>{Qe[rt]!==void 0&&(st[rt]=Qe[rt])}),JE.forEach(rt=>{const Ct=t[rt];Ct&&(st[rt]=Ct)}),typeof r<"u"&&(st.button=Object.assign({autoInsertSpace:r},st.button));const ft=vc(()=>st,st,(rt,Ct)=>{const $t=Object.keys(rt),wt=Object.keys(Ct);return $t.length!==wt.length||$t.some(Mt=>rt[Mt]!==Ct[Mt])}),{layer:Le}=de(Oc),Ge=me(()=>({prefixCls:pt,csp:nt,layer:Le?"antd":void 0}),[pt,nt,Le]);let je=y(At,null,y(UE,{dropdownMatchSelectWidth:h}),e);const He=me(()=>{var rt,Ct,$t,wt;return Ua(((rt=Zi.Form)===null||rt===void 0?void 0:rt.defaultValidateMessages)||{},(($t=(Ct=ft.locale)===null||Ct===void 0?void 0:Ct.Form)===null||$t===void 0?void 0:$t.defaultValidateMessages)||{},((wt=ft.form)===null||wt===void 0?void 0:wt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[ft,a==null?void 0:a.validateMessages]);Object.keys(He).length>0&&(je=y(h$.Provider,{value:He},je)),s&&(je=y(jM,{locale:s,_ANT_MARK__:LM},je)),je=y(Iv.Provider,{value:Ge},je),l&&(je=y(rE,{size:l},je)),je=y(YE,null,je);const ct=me(()=>{const rt=it||{},{algorithm:Ct,token:$t,components:wt,cssVar:Mt}=rt,vn=KE(rt,["algorithm","token","components","cssVar"]),un=Ct&&(!Array.isArray(Ct)||Ct.length>0)?tm(Ct):b$,Cn={};Object.entries(wt||{}).forEach(([Ut,rn])=>{const Ee=Object.assign({},rn);"algorithm"in Ee&&(Ee.algorithm===!0?Ee.theme=un:(Array.isArray(Ee.algorithm)||typeof Ee.algorithm=="function")&&(Ee.theme=tm(Ee.algorithm)),delete Ee.algorithm),Cn[Ut]=Ee});const jn=Object.assign(Object.assign({},Wl),$t);return Object.assign(Object.assign({},vn),{theme:un,token:jn,components:Cn,override:Object.assign({override:jn},Cn),cssVar:Mt})},[it]);return S&&(je=y(y$.Provider,{value:ct},je)),ft.warning&&(je=y(EM.Provider,{value:ft.warning},je)),C!==void 0&&(je=y(Qv,{disabled:C},je)),y(at.Provider,{value:ft},je)},Yr=t=>{const e=de(at),n=de(Mv);return y(r5,Object.assign({parentContext:e,legacyLocale:n},t))};Yr.ConfigContext=at;Yr.SizeContext=ba;Yr.config=n5;Yr.useConfig=iE;Object.defineProperty(Yr,"SizeContext",{get:()=>ba});var i5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function H$(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function o5(t){return H$(t)instanceof ShadowRoot}function yd(t){return o5(t)?H$(t):null}function a5(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function s5(t,e){nr(t,"[@ant-design/icons] ".concat(e))}function Pb(t){return tt(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(tt(t.icon)==="object"||typeof t.icon=="function")}function _b(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[a5(n)]=r}return e},{})}function Cm(t,e,n){return n?oe.createElement(t.tag,W(W({key:e},_b(t.attrs)),n),(t.children||[]).map(function(r,i){return Cm(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):oe.createElement(t.tag,W({key:e},_b(t.attrs)),(t.children||[]).map(function(r,i){return Cm(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function X$(t){return Oa(t)[0]}function Z$(t){return t?Array.isArray(t)?t:[t]:[]}var l5=` .anticon { display: inline-flex; align-items: center; @@ -108,9 +108,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho transform: rotate(360deg); } } -`,c5=function(e){var n=fe(Rv),r=n.csp,i=n.prefixCls,o=n.layer,a=l5;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` { +`,c5=function(e){var n=de(Iv),r=n.csp,i=n.prefixCls,o=n.layer,a=l5;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` { `).concat(a,` -}`)),be(function(){var s=e.current,l=Od(s);so(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:l})},[])},u5=["icon","className","onClick","style","primaryColor","secondaryColor"],Sl={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function d5(t){var e=t.primaryColor,n=t.secondaryColor;Sl.primaryColor=e,Sl.secondaryColor=n||X$(e),Sl.calculated=!!n}function f5(){return W({},Sl)}var Ns=function(e){var n=e.icon,r=e.className,i=e.onClick,o=e.style,a=e.primaryColor,s=e.secondaryColor,l=ut(e,u5),c=U(),u=Sl;if(a&&(u={primaryColor:a,secondaryColor:s||X$(a)}),c5(c),s5(wb(n),"icon should be icon definiton, but got ".concat(n)),!wb(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=W(W({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Sm(d.icon,"svg-".concat(d.name),W(W({className:r,onClick:i,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};Ns.displayName="IconReact";Ns.getTwoToneColors=f5;Ns.setTwoToneColors=d5;function q$(t){var e=Z$(t),n=ae(e,2),r=n[0],i=n[1];return Ns.setTwoToneColors({primaryColor:r,secondaryColor:i})}function h5(){var t=Ns.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var p5=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];q$(md.primary);var Rt=Se(function(t,e){var n=t.className,r=t.icon,i=t.spin,o=t.rotate,a=t.tabIndex,s=t.onClick,l=t.twoToneColor,c=ut(t,p5),u=fe(Rv),d=u.prefixCls,f=d===void 0?"anticon":d,h=u.rootClassName,p=Z(h,f,D(D({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!i||r.name==="loading"),n),m=a;m===void 0&&s&&(m=-1);var g=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,v=Z$(l),O=ae(v,2),S=O[0],x=O[1];return y("span",Ce({role:"img","aria-label":r.name},c,{ref:e,tabIndex:m,onClick:s,className:p}),y(Ns,{icon:r,primaryColor:S,secondaryColor:x,style:g}))});Rt.displayName="AntdIcon";Rt.getTwoToneColor=h5;Rt.setTwoToneColor=q$;var m5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:i5}))},Pf=Se(m5),g5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},v5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:g5}))},zs=Se(v5),O5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},b5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:O5}))},Vi=Se(b5),y5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},S5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:y5}))},Ls=Se(S5),x5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},C5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:x5}))},Nv=Se(C5),$5=`accept acceptCharset accessKey action allowFullScreen allowTransparency +}`)),be(function(){var s=e.current,l=yd(s);so(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:l})},[])},u5=["icon","className","onClick","style","primaryColor","secondaryColor"],Sl={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function d5(t){var e=t.primaryColor,n=t.secondaryColor;Sl.primaryColor=e,Sl.secondaryColor=n||X$(e),Sl.calculated=!!n}function f5(){return W({},Sl)}var Ns=function(e){var n=e.icon,r=e.className,i=e.onClick,o=e.style,a=e.primaryColor,s=e.secondaryColor,l=dt(e,u5),c=Y(),u=Sl;if(a&&(u={primaryColor:a,secondaryColor:s||X$(a)}),c5(c),s5(Pb(n),"icon should be icon definiton, but got ".concat(n)),!Pb(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=W(W({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Cm(d.icon,"svg-".concat(d.name),W(W({className:r,onClick:i,style:o,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};Ns.displayName="IconReact";Ns.getTwoToneColors=f5;Ns.setTwoToneColors=d5;function q$(t){var e=Z$(t),n=ae(e,2),r=n[0],i=n[1];return Ns.setTwoToneColors({primaryColor:r,secondaryColor:i})}function h5(){var t=Ns.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var p5=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];q$(vd.primary);var Rt=ye(function(t,e){var n=t.className,r=t.icon,i=t.spin,o=t.rotate,a=t.tabIndex,s=t.onClick,l=t.twoToneColor,c=dt(t,p5),u=de(Iv),d=u.prefixCls,f=d===void 0?"anticon":d,h=u.rootClassName,p=Z(h,f,D(D({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!i||r.name==="loading"),n),m=a;m===void 0&&s&&(m=-1);var g=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,v=Z$(l),O=ae(v,2),S=O[0],C=O[1];return y("span",xe({role:"img","aria-label":r.name},c,{ref:e,tabIndex:m,onClick:s,className:p}),y(Ns,{icon:r,primaryColor:S,secondaryColor:C,style:g}))});Rt.displayName="AntdIcon";Rt.getTwoToneColor=h5;Rt.setTwoToneColor=q$;var m5=function(e,n){return y(Rt,xe({},e,{ref:n,icon:i5}))},Tf=ye(m5),g5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},v5=function(e,n){return y(Rt,xe({},e,{ref:n,icon:g5}))},zs=ye(v5),O5={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},b5=function(e,n){return y(Rt,xe({},e,{ref:n,icon:O5}))},Vi=ye(b5),y5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},S5=function(e,n){return y(Rt,xe({},e,{ref:n,icon:y5}))},Ls=ye(S5),x5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},C5=function(e,n){return y(Rt,xe({},e,{ref:n,icon:x5}))},zv=ye(C5),$5=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable @@ -127,108 +127,108 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata - onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,P5="".concat($5," ").concat(w5).split(/[\s\n]+/),_5="aria-",T5="data-";function _b(t,e){return t.indexOf(e)===0}function $i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=W({},e);var r={};return Object.keys(t).forEach(function(i){(n.aria&&(i==="role"||_b(i,_5))||n.data&&_b(i,T5)||n.attr&&P5.includes(i))&&(r[i]=t[i])}),r}function G$(t){return t&&oe.isValidElement(t)&&t.type===oe.Fragment}const zv=(t,e,n)=>oe.isValidElement(t)?oe.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function fr(t,e){return zv(t,t,e)}const eu=(t,e,n,r,i)=>({background:t,border:`${q(r.lineWidth)} ${r.lineType} ${e}`,[`${i}-icon`]:{color:n}}),k5=t=>{const{componentCls:e,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:o,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:h,defaultPadding:p}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"relative",display:"flex",alignItems:"center",padding:p,wordWrap:"break-word",borderRadius:l,[`&${e}-rtl`]:{direction:"rtl"},[`${e}-content`]:{flex:1,minWidth:0},[`${e}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:s},"&-message":{color:f},[`&${e}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,P5="".concat($5," ").concat(w5).split(/[\s\n]+/),_5="aria-",T5="data-";function Tb(t,e){return t.indexOf(e)===0}function $i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=W({},e);var r={};return Object.keys(t).forEach(function(i){(n.aria&&(i==="role"||Tb(i,_5))||n.data&&Tb(i,T5)||n.attr&&P5.includes(i))&&(r[i]=t[i])}),r}function G$(t){return t&&oe.isValidElement(t)&&t.type===oe.Fragment}const Lv=(t,e,n)=>oe.isValidElement(t)?oe.cloneElement(t,typeof n=="function"?n(t.props||{}):n):e;function hr(t,e){return Lv(t,t,e)}const eu=(t,e,n,r,i)=>({background:t,border:`${q(r.lineWidth)} ${r.lineType} ${e}`,[`${i}-icon`]:{color:n}}),k5=t=>{const{componentCls:e,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:o,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:h,defaultPadding:p}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"relative",display:"flex",alignItems:"center",padding:p,wordWrap:"break-word",borderRadius:l,[`&${e}-rtl`]:{direction:"rtl"},[`${e}-content`]:{flex:1,minWidth:0},[`${e}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:s},"&-message":{color:f},[`&${e}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, padding-top ${n} ${c}, padding-bottom ${n} ${c}, - margin-bottom ${n} ${c}`},[`&${e}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${e}-with-description`]:{alignItems:"flex-start",padding:h,[`${e}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${e}-message`]:{display:"block",marginBottom:r,color:f,fontSize:a},[`${e}-description`]:{display:"block",color:d}},[`${e}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},R5=t=>{const{componentCls:e,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:o,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=t;return{[e]:{"&-success":eu(i,r,n,t,e),"&-info":eu(h,f,d,t,e),"&-warning":eu(s,a,o,t,e),"&-error":Object.assign(Object.assign({},eu(u,c,l,t,e)),{[`${e}-description > pre`]:{margin:0,padding:0}})}}},I5=t=>{const{componentCls:e,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:o,colorIcon:a,colorIconHover:s}=t;return{[e]:{"&-action":{marginInlineStart:i},[`${e}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:o,lineHeight:q(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:s}}}}},M5=t=>({withDescriptionIconSize:t.fontSizeHeading3,defaultPadding:`${t.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`}),E5=Zt("Alert",t=>[k5(t),R5(t),I5(t)],M5);var Tb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{icon:e,prefixCls:n,type:r}=t,i=A5[r]||null;return e?zv(e,y("span",{className:`${n}-icon`},e),()=>({className:Z(`${n}-icon`,e.props.className)})):y(i,{className:`${n}-icon`})},N5=t=>{const{isClosable:e,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:o}=t,a=r===!0||r===void 0?y(Vi,null):r;return e?y("button",Object.assign({type:"button",onClick:i,className:`${n}-close-icon`,tabIndex:0},o),a):null},Y$=Se((t,e)=>{const{description:n,prefixCls:r,message:i,banner:o,className:a,rootClassName:s,style:l,onMouseEnter:c,onMouseLeave:u,onClick:d,afterClose:f,showIcon:h,closable:p,closeText:m,closeIcon:g,action:v,id:O}=t,S=Tb(t,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[x,b]=J(!1),C=U(null);Yt(e,()=>({nativeElement:C.current}));const{getPrefixCls:$,direction:w,closable:P,closeIcon:_,className:T,style:R}=rr("alert"),k=$("alert",r),[I,Q,M]=E5(k),E=B=>{var G;b(!0),(G=t.onClose)===null||G===void 0||G.call(t,B)},N=ge(()=>t.type!==void 0?t.type:o?"warning":"info",[t.type,o]),z=ge(()=>typeof p=="object"&&p.closeIcon||m?!0:typeof p=="boolean"?p:g!==!1&&g!==null&&g!==void 0?!0:!!P,[m,g,p,P]),L=o&&h===void 0?!0:h,F=Z(k,`${k}-${N}`,{[`${k}-with-description`]:!!n,[`${k}-no-icon`]:!L,[`${k}-banner`]:!!o,[`${k}-rtl`]:w==="rtl"},T,a,s,M,Q),H=$i(S,{aria:!0,data:!0}),V=ge(()=>typeof p=="object"&&p.closeIcon?p.closeIcon:m||(g!==void 0?g:typeof P=="object"&&P.closeIcon?P.closeIcon:_),[g,p,m,_]),X=ge(()=>{const B=p??P;if(typeof B=="object"){const{closeIcon:G}=B;return Tb(B,["closeIcon"])}return{}},[p,P]);return I(y(pi,{visible:!x,motionName:`${k}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:B=>({maxHeight:B.offsetHeight}),onLeaveEnd:f},({className:B,style:G},se)=>y("div",Object.assign({id:O,ref:pr(C,se),"data-show":!x,className:Z(F,B),style:Object.assign(Object.assign(Object.assign({},R),l),G),onMouseEnter:c,onMouseLeave:u,onClick:d,role:"alert"},H),L?y(Q5,{description:n,icon:t.icon,prefixCls:k,type:N}):null,y("div",{className:`${k}-content`},i?y("div",{className:`${k}-message`},i):null,n?y("div",{className:`${k}-description`},n):null),v?y("div",{className:`${k}-action`},v):null,y(N5,{isClosable:z,prefixCls:k,closeIcon:V,handleClose:E,ariaProps:X}))))});function z5(t,e,n){return e=ma(e),jC(t,yf()?Reflect.construct(e,n||[],ma(t).constructor):e.apply(t,n))}let L5=function(t){function e(){var n;return Mn(this,e),n=z5(this,e,arguments),n.state={error:void 0,info:{componentStack:""}},n}return Ui(e,t),En(e,[{key:"componentDidCatch",value:function(r,i){this.setState({error:r,info:i})}},{key:"render",value:function(){const{message:r,description:i,id:o,children:a}=this.props,{error:s,info:l}=this.state,c=(l==null?void 0:l.componentStack)||null,u=typeof r>"u"?(s||"").toString():r,d=typeof i>"u"?c:i;return s?y(Y$,{id:o,type:"error",message:u,description:y("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},d)}):a}}])}(er);const oa=Y$;oa.ErrorBoundary=L5;const kb=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Rb=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",tu=(t,e)=>{if(t.clientHeight{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightoe||o>t&&a=e&&s>=n?o-t-r:a>e&&sn?a-e+i:0,j5=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},Ib=(t,e)=>{var n,r,i,o;if(typeof document>"u")return[];const{scrollMode:a,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,d=typeof c=="function"?c:M=>M!==c;if(!kb(t))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let p=t;for(;kb(p)&&d(p);){if(p=j5(p),p===f){h.push(p);break}p!=null&&p===document.body&&tu(p)&&!tu(document.documentElement)||p!=null&&tu(p,u)&&h.push(p)}const m=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,g=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:v,scrollY:O}=window,{height:S,width:x,top:b,right:C,bottom:$,left:w}=t.getBoundingClientRect(),{top:P,right:_,bottom:T,left:R}=(M=>{const E=window.getComputedStyle(M);return{top:parseFloat(E.scrollMarginTop)||0,right:parseFloat(E.scrollMarginRight)||0,bottom:parseFloat(E.scrollMarginBottom)||0,left:parseFloat(E.scrollMarginLeft)||0}})(t);let k=s==="start"||s==="nearest"?b-P:s==="end"?$+T:b+S/2-P+T,I=l==="center"?w+x/2-R+_:l==="end"?C+_:w-R;const Q=[];for(let M=0;M=0&&w>=0&&$<=g&&C<=m&&(E===f&&!tu(E)||b>=L&&$<=H&&w>=V&&C<=F))return Q;const X=getComputedStyle(E),B=parseInt(X.borderLeftWidth,10),G=parseInt(X.borderTopWidth,10),se=parseInt(X.borderRightWidth,10),re=parseInt(X.borderBottomWidth,10);let le=0,me=0;const ie="offsetWidth"in E?E.offsetWidth-E.clientWidth-B-se:0,ne="offsetHeight"in E?E.offsetHeight-E.clientHeight-G-re:0,ue="offsetWidth"in E?E.offsetWidth===0?0:z/E.offsetWidth:0,de="offsetHeight"in E?E.offsetHeight===0?0:N/E.offsetHeight:0;if(f===E)le=s==="start"?k:s==="end"?k-g:s==="nearest"?nu(O,O+g,g,G,re,O+k,O+k+S,S):k-g/2,me=l==="start"?I:l==="center"?I-m/2:l==="end"?I-m:nu(v,v+m,m,B,se,v+I,v+I+x,x),le=Math.max(0,le+O),me=Math.max(0,me+v);else{le=s==="start"?k-L-G:s==="end"?k-H+re+ne:s==="nearest"?nu(L,H,N,G,re+ne,k,k+S,S):k-(L+N/2)+ne/2,me=l==="start"?I-V-B:l==="center"?I-(V+z/2)+ie/2:l==="end"?I-F+se+ie:nu(V,F,z,B,se+ie,I,I+x,x);const{scrollLeft:j,scrollTop:ee}=E;le=de===0?0:Math.max(0,Math.min(ee+le/de,E.scrollHeight-N/de+ne)),me=ue===0?0:Math.max(0,Math.min(j+me/ue,E.scrollWidth-z/ue+ie)),k+=ee-le,I+=j-me}Q.push({el:E,top:le,left:me})}return Q},D5=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function B5(t,e){if(!t.isConnected||!(i=>{let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const n=(i=>{const o=window.getComputedStyle(i);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(Ib(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:a}of Ib(t,D5(e))){const s=o-n.top+n.bottom,l=a-n.left+n.right;i.scroll({top:s,left:l,behavior:r})}}const $r=t=>{const[,,,,e]=Cr();return e?`${t}-css-var`:""};var je={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},U$=Se(function(t,e){var n=t.prefixCls,r=t.style,i=t.className,o=t.duration,a=o===void 0?4.5:o,s=t.showProgress,l=t.pauseOnHover,c=l===void 0?!0:l,u=t.eventKey,d=t.content,f=t.closable,h=t.closeIcon,p=h===void 0?"x":h,m=t.props,g=t.onClick,v=t.onNoticeClose,O=t.times,S=t.hovering,x=J(!1),b=ae(x,2),C=b[0],$=b[1],w=J(0),P=ae(w,2),_=P[0],T=P[1],R=J(0),k=ae(R,2),I=k[0],Q=k[1],M=S||C,E=a>0&&s,N=function(){v(u)},z=function(B){(B.key==="Enter"||B.code==="Enter"||B.keyCode===je.ENTER)&&N()};be(function(){if(!M&&a>0){var X=Date.now()-I,B=setTimeout(function(){N()},a*1e3-I);return function(){c&&clearTimeout(B),Q(Date.now()-X)}}},[a,M,O]),be(function(){if(!M&&E&&(c||I===0)){var X=performance.now(),B,G=function se(){cancelAnimationFrame(B),B=requestAnimationFrame(function(re){var le=re+I-X,me=Math.min(le/(a*1e3),1);T(me*100),me<1&&se()})};return G(),function(){c&&cancelAnimationFrame(B)}}},[a,I,M,E,O]);var L=ge(function(){return Je(f)==="object"&&f!==null?f:f?{closeIcon:p}:{}},[f,p]),F=$i(L,!0),H=100-(!_||_<0?0:_>100?100:_),V="".concat(n,"-notice");return y("div",Ce({},m,{ref:e,className:Z(V,i,D({},"".concat(V,"-closable"),f)),style:r,onMouseEnter:function(B){var G;$(!0),m==null||(G=m.onMouseEnter)===null||G===void 0||G.call(m,B)},onMouseLeave:function(B){var G;$(!1),m==null||(G=m.onMouseLeave)===null||G===void 0||G.call(m,B)},onClick:g}),y("div",{className:"".concat(V,"-content")},d),f&&y("a",Ce({tabIndex:0,className:"".concat(V,"-close"),onKeyDown:z,"aria-label":"Close"},F,{onClick:function(B){B.preventDefault(),B.stopPropagation(),N()}}),L.closeIcon),E&&y("progress",{className:"".concat(V,"-progress"),max:"100",value:H},H+"%"))}),K$=oe.createContext({}),W5=function(e){var n=e.children,r=e.classNames;return oe.createElement(K$.Provider,{value:{classNames:r}},n)},Mb=8,Eb=3,Ab=16,F5=function(e){var n={offset:Mb,threshold:Eb,gap:Ab};if(e&&Je(e)==="object"){var r,i,o;n.offset=(r=e.offset)!==null&&r!==void 0?r:Mb,n.threshold=(i=e.threshold)!==null&&i!==void 0?i:Eb,n.gap=(o=e.gap)!==null&&o!==void 0?o:Ab}return[!!e,n]},V5=["className","style","classNames","styles"],H5=function(e){var n=e.configList,r=e.placement,i=e.prefixCls,o=e.className,a=e.style,s=e.motion,l=e.onAllNoticeRemoved,c=e.onNoticeClose,u=e.stack,d=fe(K$),f=d.classNames,h=U({}),p=J(null),m=ae(p,2),g=m[0],v=m[1],O=J([]),S=ae(O,2),x=S[0],b=S[1],C=n.map(function(M){return{config:M,key:String(M.key)}}),$=F5(u),w=ae($,2),P=w[0],_=w[1],T=_.offset,R=_.threshold,k=_.gap,I=P&&(x.length>0||C.length<=R),Q=typeof s=="function"?s(r):s;return be(function(){P&&x.length>1&&b(function(M){return M.filter(function(E){return C.some(function(N){var z=N.key;return E===z})})})},[x,C,P]),be(function(){var M;if(P&&h.current[(M=C[C.length-1])===null||M===void 0?void 0:M.key]){var E;v(h.current[(E=C[C.length-1])===null||E===void 0?void 0:E.key])}},[C,P]),oe.createElement(D$,Ce({key:r,className:Z(i,"".concat(i,"-").concat(r),f==null?void 0:f.list,o,D(D({},"".concat(i,"-stack"),!!P),"".concat(i,"-stack-expanded"),I)),style:a,keys:C,motionAppear:!0},Q,{onAllRemoved:function(){l(r)}}),function(M,E){var N=M.config,z=M.className,L=M.style,F=M.index,H=N,V=H.key,X=H.times,B=String(V),G=N,se=G.className,re=G.style,le=G.classNames,me=G.styles,ie=ut(G,V5),ne=C.findIndex(function(pe){return pe.key===B}),ue={};if(P){var de=C.length-1-(ne>-1?ne:F-1),j=r==="top"||r==="bottom"?"-50%":"0";if(de>0){var ee,he,ve;ue.height=I?(ee=h.current[B])===null||ee===void 0?void 0:ee.offsetHeight:g==null?void 0:g.offsetHeight;for(var Y=0,ce=0;ce-1?h.current[B]=Qe:delete h.current[B]},prefixCls:i,classNames:le,styles:me,className:Z(se,f==null?void 0:f.notice),style:re,times:X,key:V,eventKey:V,onNoticeClose:c,hovering:P&&x.length>0})))})},X5=Se(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-notification":n,i=t.container,o=t.motion,a=t.maxCount,s=t.className,l=t.style,c=t.onAllRemoved,u=t.stack,d=t.renderNotifications,f=J([]),h=ae(f,2),p=h[0],m=h[1],g=function(P){var _,T=p.find(function(R){return R.key===P});T==null||(_=T.onClose)===null||_===void 0||_.call(T),m(function(R){return R.filter(function(k){return k.key!==P})})};Yt(e,function(){return{open:function(P){m(function(_){var T=$e(_),R=T.findIndex(function(Q){return Q.key===P.key}),k=W({},P);if(R>=0){var I;k.times=(((I=_[R])===null||I===void 0?void 0:I.times)||0)+1,T[R]=k}else k.times=0,T.push(k);return a>0&&T.length>a&&(T=T.slice(-a)),T})},close:function(P){g(P)},destroy:function(){m([])}}});var v=J({}),O=ae(v,2),S=O[0],x=O[1];be(function(){var w={};p.forEach(function(P){var _=P.placement,T=_===void 0?"topRight":_;T&&(w[T]=w[T]||[],w[T].push(P))}),Object.keys(S).forEach(function(P){w[P]=w[P]||[]}),x(w)},[p]);var b=function(P){x(function(_){var T=W({},_),R=T[P]||[];return R.length||delete T[P],T})},C=U(!1);if(be(function(){Object.keys(S).length>0?C.current=!0:C.current&&(c==null||c(),C.current=!1)},[S]),!i)return null;var $=Object.keys(S);return lf(y(At,null,$.map(function(w){var P=S[w],_=y(H5,{key:w,configList:P,placement:w,prefixCls:r,className:s==null?void 0:s(w),style:l==null?void 0:l(w),motion:o,onNoticeClose:g,onAllNoticeRemoved:b,stack:u});return d?d(_,{prefixCls:r,key:w}):_})),i)}),Z5=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],q5=function(){return document.body},Qb=0;function G5(){for(var t={},e=arguments.length,n=new Array(e),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},e=t.getContainer,n=e===void 0?q5:e,r=t.motion,i=t.prefixCls,o=t.maxCount,a=t.className,s=t.style,l=t.onAllRemoved,c=t.stack,u=t.renderNotifications,d=ut(t,Z5),f=J(),h=ae(f,2),p=h[0],m=h[1],g=U(),v=y(X5,{container:p,ref:g,prefixCls:i,motion:r,maxCount:o,className:a,style:s,onAllRemoved:l,stack:c,renderNotifications:u}),O=J([]),S=ae(O,2),x=S[0],b=S[1],C=pn(function(w){var P=G5(d,w);(P.key===null||P.key===void 0)&&(P.key="rc-notification-".concat(Qb),Qb+=1),b(function(_){return[].concat($e(_),[{type:"open",config:P}])})}),$=ge(function(){return{open:C,close:function(P){b(function(_){return[].concat($e(_),[{type:"close",key:P}])})},destroy:function(){b(function(P){return[].concat($e(P),[{type:"destroy"}])})}}},[]);return be(function(){m(n())}),be(function(){if(g.current&&x.length){x.forEach(function(_){switch(_.type){case"open":g.current.open(_.config);break;case"close":g.current.close(_.key);break;case"destroy":g.current.destroy();break}});var w,P;b(function(_){return(w!==_||!P)&&(w=_,P=_.filter(function(T){return!x.includes(T)})),P})}},[x]),[$,v]}var U5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},K5=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:U5}))},yc=Se(K5);const _f=oe.createContext(void 0),Co=100,J5=10,J$=Co*J5,ew={Modal:Co,Drawer:Co,Popover:Co,Popconfirm:Co,Tooltip:Co,Tour:Co,FloatButton:Co},eA={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function tA(t){return t in ew}const Sc=(t,e)=>{const[,n]=Cr(),r=oe.useContext(_f),i=tA(t);let o;if(e!==void 0)o=[e,e];else{let a=r??0;i?a+=(r?0:n.zIndexPopupBase)+ew[t]:a+=eA[t],o=[r===void 0?e:a,a]}return o};function nA(){const[t,e]=J([]),n=Ht(r=>(e(i=>[].concat($e(i),[r])),()=>{e(i=>i.filter(o=>o!==r))}),[]);return[t,n]}function tw(t,e){this.v=t,this.k=e}function or(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}or=function(a,s,l,c){function u(d,f){or(a,d,function(h){return this._invoke(d,f,h)})}s?i?i(a,s,{value:l,enumerable:!c,configurable:!c,writable:!c}):a[s]=l:(u("next",0),u("throw",1),u("return",2))},or(t,e,n,r)}function Lv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(h,p,m,g){var v=p&&p.prototype instanceof s?p:s,O=Object.create(v.prototype);return or(O,"_invoke",function(S,x,b){var C,$,w,P=0,_=b||[],T=!1,R={p:0,n:0,v:t,a:k,f:k.bind(t,4),d:function(Q,M){return C=Q,$=0,w=t,R.n=M,a}};function k(I,Q){for($=I,w=Q,e=0;!T&&P&&!M&&e<_.length;e++){var M,E=_[e],N=R.p,z=E[2];I>3?(M=z===Q)&&(w=E[($=E[4])?5:($=3,3)],E[4]=E[5]=t):E[0]<=N&&((M=I<2&&NQ||Q>z)&&(E[4]=I,E[5]=Q,R.n=z,$=0))}if(M||I>1)return a;throw T=!0,Q}return function(I,Q,M){if(P>1)throw TypeError("Generator is already running");for(T&&Q===1&&k(Q,M),$=Q,w=M;(e=$<2?t:w)||!T;){C||($?$<3?($>1&&(R.n=-1),k($,w)):R.n=w:R.v=w);try{if(P=2,C){if($||(I="next"),e=C[I]){if(!(e=e.call(C,w)))throw TypeError("iterator result is not an object");if(!e.done)return e;w=e.value,$<2&&($=0)}else $===1&&(e=C.return)&&e.call(C),$<2&&(w=TypeError("The iterator does not provide a '"+I+"' method"),$=1);C=t}else if((e=(T=R.n<0)?w:S.call(x,R))!==a)break}catch(E){C=t,$=1,w=E}finally{P=1}}return{value:e,done:T}}}(h,m,g),!0),O}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(or(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,or(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,or(d,"constructor",c),or(c,"constructor",l),l.displayName="GeneratorFunction",or(c,i,"GeneratorFunction"),or(d),or(d,i,"Generator"),or(d,r,function(){return this}),or(d,"toString",function(){return"[object Generator]"}),(Lv=function(){return{w:o,m:f}})()}function bd(t,e){function n(i,o,a,s){try{var l=t[i](o),c=l.value;return c instanceof tw?e.resolve(c.v).then(function(u){n("next",u,a,s)},function(u){n("throw",u,a,s)}):e.resolve(c).then(function(u){l.value=u,a(l)},function(u){return n("throw",u,a,s)})}catch(u){s(u)}}var r;this.next||(or(bd.prototype),or(bd.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),or(this,"_invoke",function(i,o,a){function s(){return new e(function(l,c){n(i,a,l,c)})}return r=r?r.then(s,s):s()},!0)}function nw(t,e,n,r,i){return new bd(Lv().w(t,e,n,r),i||Promise)}function rA(t,e,n,r,i){var o=nw(t,e,n,r,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function iA(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in e)return i.value=r,i.done=!1,i;return i.done=!0,i}}function Nb(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(Je(t)+" is not iterable")}function hr(){var t=Lv(),e=t.m(hr),n=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function r(a){var s=typeof a=="function"&&a.constructor;return!!s&&(s===n||(s.displayName||s.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var s,l;return function(c){s||(s={stop:function(){return l(c.a,2)},catch:function(){return c.v},abrupt:function(d,f){return l(c.a,i[d],f)},delegateYield:function(d,f,h){return s.resultName=f,l(c.d,Nb(d),h)},finish:function(d){return l(c.f,d)}},l=function(d,f,h){c.p=s.prev,c.n=s.next;try{return d(f,h)}finally{s.next=c.n}}),s.resultName&&(s[s.resultName]=c.v,s.resultName=void 0),s.sent=c.v,s.next=c.n;try{return a.call(this,s)}finally{c.p=s.prev,c.n=s.next}}}return(hr=function(){return{wrap:function(l,c,u,d){return t.w(o(l),c,u,d&&d.reverse())},isGeneratorFunction:r,mark:t.m,awrap:function(l,c){return new tw(l,c)},AsyncIterator:bd,async:function(l,c,u,d,f){return(r(c)?nw:rA)(o(l),c,u,d,f)},keys:iA,values:Nb}})()}function zb(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ka(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(l){zb(o,r,i,a,s,"next",l)}function s(l){zb(o,r,i,a,s,"throw",l)}a(void 0)})}}var xc=W({},gc),oA=xc.version,Th=xc.render,aA=xc.unmountComponentAtNode,Tf;try{var sA=Number((oA||"").split(".")[0]);sA>=18&&(Tf=xc.createRoot)}catch{}function Lb(t){var e=xc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&Je(e)==="object"&&(e.usingClientEntryPoint=t)}var yd="__rc_react_root__";function lA(t,e){Lb(!0);var n=e[yd]||Tf(e);Lb(!1),n.render(t),e[yd]=n}function cA(t,e){Th==null||Th(t,e)}function uA(t,e){if(Tf){lA(t,e);return}cA(t,e)}function dA(t){return xm.apply(this,arguments)}function xm(){return xm=ka(hr().mark(function t(e){return hr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=e[yd])===null||i===void 0||i.unmount(),delete e[yd]}));case 1:case"end":return r.stop()}},t)})),xm.apply(this,arguments)}function fA(t){aA(t)}function hA(t){return Cm.apply(this,arguments)}function Cm(){return Cm=ka(hr().mark(function t(e){return hr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Tf===void 0){r.next=2;break}return r.abrupt("return",dA(e));case 2:fA(e);case 3:case"end":return r.stop()}},t)})),Cm.apply(this,arguments)}const pA=(t,e)=>(uA(t,e),()=>hA(e));let mA=pA;function jv(t){return mA}const kh=()=>({height:0,opacity:0}),jb=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},gA=t=>({height:t?t.offsetHeight:0}),Rh=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",Sd=(t=Fl)=>({motionName:`${t}-motion-collapse`,onAppearStart:kh,onEnterStart:kh,onAppearActive:jb,onEnterActive:jb,onLeaveStart:gA,onLeaveActive:kh,onAppearEnd:Rh,onEnterEnd:Rh,onLeaveEnd:Rh,motionDeadline:500}),zo=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function cn(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const kf=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1},vA=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},OA=CE("Wave",vA),rw=`${Fl}-wave-target`;function bA(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"&&t!=="canvastext"}function yA(t){var e;const{borderTopColor:n,borderColor:r,backgroundColor:i}=getComputedStyle(t);return(e=[n,r,i].find(bA))!==null&&e!==void 0?e:null}function Ih(t){return Number.isNaN(t)?0:t}const SA=t=>{const{className:e,target:n,component:r,registerUnmount:i}=t,o=U(null),a=U(null);be(()=>{a.current=i()},[]);const[s,l]=J(null),[c,u]=J([]),[d,f]=J(0),[h,p]=J(0),[m,g]=J(0),[v,O]=J(0),[S,x]=J(!1),b={left:d,top:h,width:m,height:v,borderRadius:c.map(w=>`${w}px`).join(" ")};s&&(b["--wave-color"]=s);function C(){const w=getComputedStyle(n);l(yA(n));const P=w.position==="static",{borderLeftWidth:_,borderTopWidth:T}=w;f(P?n.offsetLeft:Ih(-parseFloat(_))),p(P?n.offsetTop:Ih(-parseFloat(T))),g(n.offsetWidth),O(n.offsetHeight);const{borderTopLeftRadius:R,borderTopRightRadius:k,borderBottomLeftRadius:I,borderBottomRightRadius:Q}=w;u([R,k,Q,I].map(M=>Ih(parseFloat(M))))}if(be(()=>{if(n){const w=Xt(()=>{C(),x(!0)});let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(C),P.observe(n)),()=>{Xt.cancel(w),P==null||P.disconnect()}}},[]),!S)return null;const $=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(rw));return y(pi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(w,P)=>{var _,T;if(P.deadline||P.propertyName==="opacity"){const R=(_=o.current)===null||_===void 0?void 0:_.parentElement;(T=a.current)===null||T===void 0||T.call(a).then(()=>{R==null||R.remove()})}return!1}},({className:w},P)=>y("div",{ref:pr(o,P),className:Z(e,w,{"wave-quick":$}),style:b}))},xA=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",t==null||t.insertBefore(i,t==null?void 0:t.firstChild);const o=jv();let a=null;function s(){return a}a=o(y(SA,Object.assign({},e,{target:t,registerUnmount:s})),i)},CA=(t,e,n)=>{const{wave:r}=fe(it),[,i,o]=Cr(),a=pn(c=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${rw}`)||u,{showEffect:f}=r||{};(f||xA)(d,{className:e,token:i,component:n,event:c,hashId:o})}),s=U(null);return c=>{Xt.cancel(s.current),s.current=Xt(()=>{a(c)})}},Dv=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:i}=fe(it),o=U(null),a=i("wave"),[,s]=OA(a),l=CA(o,Z(a,s),r);if(oe.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==window.Node.ELEMENT_NODE||n)return;const d=f=>{!kf(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")&&!u.className.includes("disabled:")||u.getAttribute("aria-disabled")==="true"||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!oe.isValidElement(e))return e??null;const c=vo(e)?pr(Ho(e),o):o;return fr(e,{ref:c})},Dr=t=>{const e=oe.useContext(va);return oe.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},$A=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},wA=t=>{const{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},PA=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},iw=Zt("Space",t=>{const e=kt(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[wA(e),PA(e),$A(e)]},()=>({}),{resetStyle:!1});var ow=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=fe(Rf),r=ge(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=n,s=i==="vertical"?"-vertical-":"-";return Z(`${t}-compact${s}item`,{[`${t}-compact${s}first-item`]:o,[`${t}-compact${s}last-item`]:a,[`${t}-compact${s}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},_A=t=>{const{children:e}=t;return y(Rf.Provider,{value:null},e)},TA=t=>{const{children:e}=t,n=ow(t,["children"]);return y(Rf.Provider,{value:ge(()=>n,[n])},e)},kA=t=>{const{getPrefixCls:e,direction:n}=fe(it),{size:r,direction:i,block:o,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=ow(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Dr(S=>r??S),f=e("space-compact",a),[h,p]=iw(f),m=Z(f,p,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:o,[`${f}-vertical`]:i==="vertical"},s,l),g=fe(Rf),v=nr(c),O=ge(()=>v.map((S,x)=>{const b=(S==null?void 0:S.key)||`${f}-item-${x}`;return y(TA,{key:b,compactSize:d,compactDirection:i,isFirstItem:x===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:x===v.length-1&&(!g||(g==null?void 0:g.isLastItem))},S)}),[r,v,g]);return v.length===0?null:h(y("div",Object.assign({className:m},u),O))};var RA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n}=fe(it),{prefixCls:r,size:i,className:o}=t,a=RA(t,["prefixCls","size","className"]),s=e("btn-group",r),[,,l]=Cr(),c=ge(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),u=Z(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},o,l);return y(aw.Provider,{value:i},y("div",Object.assign({},a,{className:u})))},Db=/^[\u4E00-\u9FA5]{2}$/,$m=Db.test.bind(Db);function Bv(t){return t==="danger"?{danger:!0}:{type:t}}function Bb(t){return typeof t=="string"}function Mh(t){return t==="text"||t==="link"}function MA(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&Bb(t.type)&&$m(t.props.children)?fr(t,{children:t.props.children.split("").join(n)}):Bb(t)?$m(t)?oe.createElement("span",null,t.split("").join(n)):oe.createElement("span",null,t):G$(t)?oe.createElement("span",null,t):t}function EA(t,e){let n=!1;const r=[];return oe.Children.forEach(t,i=>{const o=typeof i,a=o==="string"||o==="number";if(n&&a){const s=r.length-1,l=r[s];r[s]=`${l}${i}`}else r.push(i);n=a}),oe.Children.map(r,i=>MA(i,e))}["default","primary","danger"].concat($e(Qo));const wm=Se((t,e)=>{const{className:n,style:r,children:i,prefixCls:o}=t,a=Z(`${o}-icon`,n);return oe.createElement("span",{ref:e,className:a,style:r},i)}),Wb=Se((t,e)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=t,a=Z(`${n}-loading-icon`,r);return oe.createElement(wm,{prefixCls:n,className:a,style:i,ref:e},oe.createElement(yc,{className:o}))}),Eh=()=>({width:0,opacity:0,transform:"scale(0)"}),Ah=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),AA=t=>{const{prefixCls:e,loading:n,existIcon:r,className:i,style:o,mount:a}=t,s=!!n;return r?oe.createElement(Wb,{prefixCls:e,className:i,style:o}):oe.createElement(pi,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Eh,onAppearActive:Ah,onEnterStart:Eh,onEnterActive:Ah,onLeaveStart:Ah,onLeaveActive:Eh},({className:l,style:c},u)=>{const d=Object.assign(Object.assign({},o),c);return oe.createElement(Wb,{prefixCls:e,className:Z(i,l),style:d,ref:u})})},Fb=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),QA=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},Fb(`${e}-primary`,i),Fb(`${e}-danger`,o)]}};var NA=["b"],zA=["v"],Qh=function(e){return Math.round(Number(e||0))},LA=function(e){if(e instanceof Dt)return e;if(e&&Je(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,i=ut(n,NA);return W(W({},i),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},Vl=function(t){Ui(n,t);var e=Oo(n);function n(r){return Mn(this,n),e.call(this,LA(r))}return En(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=Qh(i.s*100),a=Qh(i.b*100),s=Qh(i.h),l=i.a,c="hsb(".concat(s,", ").concat(o,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=ut(i,zA);return W(W({},a),{},{b:o,a:this.a})}}]),n}(Dt),jA=function(e){return e instanceof Vl?e:new Vl(e)};jA("#1677ff");const DA=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",BA=(t,e)=>t?DA(t,e):"";let Pm=function(){function t(e){Mn(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(i=>({color:new t(i.color),percent:i.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(({color:i,percent:o})=>({color:new t(i),percent:o})),this.metaColor=new Vl(this.colors[0].color.metaColor)):this.metaColor=new Vl(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return En(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return BA(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])}();var WA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},FA=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:WA}))},xd=Se(FA),sw=oe.forwardRef(function(t,e){var n=t.prefixCls,r=t.forceRender,i=t.className,o=t.style,a=t.children,s=t.isActive,l=t.role,c=t.classNames,u=t.styles,d=oe.useState(s||r),f=ae(d,2),h=f[0],p=f[1];return oe.useEffect(function(){(r||s)&&p(!0)},[r,s]),h?oe.createElement("div",{ref:e,className:Z("".concat(n,"-content"),D(D({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),i),style:o,role:l},oe.createElement("div",{className:Z("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});sw.displayName="PanelContent";var VA=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],lw=oe.forwardRef(function(t,e){var n=t.showArrow,r=n===void 0?!0:n,i=t.headerClass,o=t.isActive,a=t.onItemClick,s=t.forceRender,l=t.className,c=t.classNames,u=c===void 0?{}:c,d=t.styles,f=d===void 0?{}:d,h=t.prefixCls,p=t.collapsible,m=t.accordion,g=t.panelKey,v=t.extra,O=t.header,S=t.expandIcon,x=t.openMotion,b=t.destroyInactivePanel,C=t.children,$=ut(t,VA),w=p==="disabled",P=v!=null&&typeof v!="boolean",_=D(D(D({onClick:function(){a==null||a(g)},onKeyDown:function(E){(E.key==="Enter"||E.keyCode===je.ENTER||E.which===je.ENTER)&&(a==null||a(g))},role:m?"tab":"button"},"aria-expanded",o),"aria-disabled",w),"tabIndex",w?-1:0),T=typeof S=="function"?S(t):oe.createElement("i",{className:"arrow"}),R=T&&oe.createElement("div",Ce({className:"".concat(h,"-expand-icon")},["header","icon"].includes(p)?_:{}),T),k=Z("".concat(h,"-item"),D(D({},"".concat(h,"-item-active"),o),"".concat(h,"-item-disabled"),w),l),I=Z(i,"".concat(h,"-header"),D({},"".concat(h,"-collapsible-").concat(p),!!p),u.header),Q=W({className:I,style:f.header},["header","icon"].includes(p)?{}:_);return oe.createElement("div",Ce({},$,{ref:e,className:k}),oe.createElement("div",Q,r&&R,oe.createElement("span",Ce({className:"".concat(h,"-header-text")},p==="header"?_:{}),O),P&&oe.createElement("div",{className:"".concat(h,"-extra")},v)),oe.createElement(pi,Ce({visible:o,leavedClassName:"".concat(h,"-content-hidden")},x,{forceRender:s,removeOnLeave:b}),function(M,E){var N=M.className,z=M.style;return oe.createElement(sw,{ref:E,prefixCls:h,className:N,classNames:u,style:z,styles:f,isActive:o,forceRender:s,role:m?"tabpanel":void 0},C)}))}),HA=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],XA=function(e,n){var r=n.prefixCls,i=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return e.map(function(d,f){var h=d.children,p=d.label,m=d.key,g=d.collapsible,v=d.onItemClick,O=d.destroyInactivePanel,S=ut(d,HA),x=String(m??f),b=g??o,C=O??a,$=function(_){b!=="disabled"&&(s(_),v==null||v(_))},w=!1;return i?w=l[0]===x:w=l.indexOf(x)>-1,oe.createElement(lw,Ce({},S,{prefixCls:r,key:x,panelKey:x,isActive:w,accordion:i,openMotion:c,expandIcon:u,header:p,collapsible:b,onItemClick:$,destroyInactivePanel:C}),h)})},ZA=function(e,n,r){if(!e)return null;var i=r.prefixCls,o=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,l=r.onItemClick,c=r.activeKey,u=r.openMotion,d=r.expandIcon,f=e.key||String(n),h=e.props,p=h.header,m=h.headerClass,g=h.destroyInactivePanel,v=h.collapsible,O=h.onItemClick,S=!1;o?S=c[0]===f:S=c.indexOf(f)>-1;var x=v??a,b=function(w){x!=="disabled"&&(l(w),O==null||O(w))},C={key:f,panelKey:f,header:p,headerClass:m,isActive:S,prefixCls:i,destroyInactivePanel:g??s,openMotion:u,accordion:o,children:e.props.children,onItemClick:b,expandIcon:d,collapsible:x};return typeof e.type=="string"?e:(Object.keys(C).forEach(function($){typeof C[$]>"u"&&delete C[$]}),oe.cloneElement(e,C))};function qA(t,e,n){return Array.isArray(t)?XA(t,n):nr(e).map(function(r,i){return ZA(r,i,n)})}function GA(t){var e=t;if(!Array.isArray(e)){var n=Je(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(r){return String(r)})}var YA=oe.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-collapse":n,i=t.destroyInactivePanel,o=i===void 0?!1:i,a=t.style,s=t.accordion,l=t.className,c=t.children,u=t.collapsible,d=t.openMotion,f=t.expandIcon,h=t.activeKey,p=t.defaultActiveKey,m=t.onChange,g=t.items,v=Z(r,l),O=_n([],{value:h,onChange:function(P){return m==null?void 0:m(P)},defaultValue:p,postState:GA}),S=ae(O,2),x=S[0],b=S[1],C=function(P){return b(function(){if(s)return x[0]===P?[]:[P];var _=x.indexOf(P),T=_>-1;return T?x.filter(function(R){return R!==P}):[].concat($e(x),[P])})};tr(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var $=qA(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:o,onItemClick:C,activeKey:x});return oe.createElement("div",Ce({ref:e,className:v,style:a,role:s?"tablist":void 0},$i(t,{aria:!0,data:!0})),$)});const Wv=Object.assign(YA,{Panel:lw});Wv.Panel;const UA=Se((t,e)=>{const{getPrefixCls:n}=fe(it),{prefixCls:r,className:i,showArrow:o=!0}=t,a=n("collapse",r),s=Z({[`${a}-no-arrow`]:!o},i);return y(Wv.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))}),Fv=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, + margin-bottom ${n} ${c}`},[`&${e}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${e}-with-description`]:{alignItems:"flex-start",padding:h,[`${e}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${e}-message`]:{display:"block",marginBottom:r,color:f,fontSize:a},[`${e}-description`]:{display:"block",color:d}},[`${e}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},R5=t=>{const{componentCls:e,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:o,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=t;return{[e]:{"&-success":eu(i,r,n,t,e),"&-info":eu(h,f,d,t,e),"&-warning":eu(s,a,o,t,e),"&-error":Object.assign(Object.assign({},eu(u,c,l,t,e)),{[`${e}-description > pre`]:{margin:0,padding:0}})}}},I5=t=>{const{componentCls:e,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:o,colorIcon:a,colorIconHover:s}=t;return{[e]:{"&-action":{marginInlineStart:i},[`${e}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:o,lineHeight:q(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:s}}}}},M5=t=>({withDescriptionIconSize:t.fontSizeHeading3,defaultPadding:`${t.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`}),E5=Zt("Alert",t=>[k5(t),R5(t),I5(t)],M5);var kb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{icon:e,prefixCls:n,type:r}=t,i=A5[r]||null;return e?Lv(e,y("span",{className:`${n}-icon`},e),()=>({className:Z(`${n}-icon`,e.props.className)})):y(i,{className:`${n}-icon`})},N5=t=>{const{isClosable:e,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:o}=t,a=r===!0||r===void 0?y(Vi,null):r;return e?y("button",Object.assign({type:"button",onClick:i,className:`${n}-close-icon`,tabIndex:0},o),a):null},Y$=ye((t,e)=>{const{description:n,prefixCls:r,message:i,banner:o,className:a,rootClassName:s,style:l,onMouseEnter:c,onMouseLeave:u,onClick:d,afterClose:f,showIcon:h,closable:p,closeText:m,closeIcon:g,action:v,id:O}=t,S=kb(t,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[C,b]=K(!1),x=Y(null);Yt(e,()=>({nativeElement:x.current}));const{getPrefixCls:$,direction:w,closable:P,closeIcon:_,className:T,style:k}=ir("alert"),R=$("alert",r),[I,Q,E]=E5(R),A=B=>{var G;b(!0),(G=t.onClose)===null||G===void 0||G.call(t,B)},N=me(()=>t.type!==void 0?t.type:o?"warning":"info",[t.type,o]),L=me(()=>typeof p=="object"&&p.closeIcon||m?!0:typeof p=="boolean"?p:g!==!1&&g!==null&&g!==void 0?!0:!!P,[m,g,p,P]),z=o&&h===void 0?!0:h,V=Z(R,`${R}-${N}`,{[`${R}-with-description`]:!!n,[`${R}-no-icon`]:!z,[`${R}-banner`]:!!o,[`${R}-rtl`]:w==="rtl"},T,a,s,E,Q),X=$i(S,{aria:!0,data:!0}),F=me(()=>typeof p=="object"&&p.closeIcon?p.closeIcon:m||(g!==void 0?g:typeof P=="object"&&P.closeIcon?P.closeIcon:_),[g,p,m,_]),H=me(()=>{const B=p??P;if(typeof B=="object"){const{closeIcon:G}=B;return kb(B,["closeIcon"])}return{}},[p,P]);return I(y(mi,{visible:!C,motionName:`${R}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:B=>({maxHeight:B.offsetHeight}),onLeaveEnd:f},({className:B,style:G},se)=>y("div",Object.assign({id:O,ref:mr(x,se),"data-show":!C,className:Z(V,B),style:Object.assign(Object.assign(Object.assign({},k),l),G),onMouseEnter:c,onMouseLeave:u,onClick:d,role:"alert"},X),z?y(Q5,{description:n,icon:t.icon,prefixCls:R,type:N}):null,y("div",{className:`${R}-content`},i?y("div",{className:`${R}-message`},i):null,n?y("div",{className:`${R}-description`},n):null),v?y("div",{className:`${R}-action`},v):null,y(N5,{isClosable:L,prefixCls:R,closeIcon:F,handleClose:A,ariaProps:H}))))});function z5(t,e,n){return e=va(e),jC(t,xf()?Reflect.construct(e,n||[],va(t).constructor):e.apply(t,n))}let L5=function(t){function e(){var n;return En(this,e),n=z5(this,e,arguments),n.state={error:void 0,info:{componentStack:""}},n}return Ui(e,t),An(e,[{key:"componentDidCatch",value:function(r,i){this.setState({error:r,info:i})}},{key:"render",value:function(){const{message:r,description:i,id:o,children:a}=this.props,{error:s,info:l}=this.state,c=(l==null?void 0:l.componentStack)||null,u=typeof r>"u"?(s||"").toString():r,d=typeof i>"u"?c:i;return s?y(Y$,{id:o,type:"error",message:u,description:y("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},d)}):a}}])}(tr);const aa=Y$;aa.ErrorBoundary=L5;const Rb=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Ib=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",tu=(t,e)=>{if(t.clientHeight{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeightoe||o>t&&a=e&&s>=n?o-t-r:a>e&&sn?a-e+i:0,j5=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},Mb=(t,e)=>{var n,r,i,o;if(typeof document>"u")return[];const{scrollMode:a,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,d=typeof c=="function"?c:E=>E!==c;if(!Rb(t))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let p=t;for(;Rb(p)&&d(p);){if(p=j5(p),p===f){h.push(p);break}p!=null&&p===document.body&&tu(p)&&!tu(document.documentElement)||p!=null&&tu(p,u)&&h.push(p)}const m=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,g=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:v,scrollY:O}=window,{height:S,width:C,top:b,right:x,bottom:$,left:w}=t.getBoundingClientRect(),{top:P,right:_,bottom:T,left:k}=(E=>{const A=window.getComputedStyle(E);return{top:parseFloat(A.scrollMarginTop)||0,right:parseFloat(A.scrollMarginRight)||0,bottom:parseFloat(A.scrollMarginBottom)||0,left:parseFloat(A.scrollMarginLeft)||0}})(t);let R=s==="start"||s==="nearest"?b-P:s==="end"?$+T:b+S/2-P+T,I=l==="center"?w+C/2-k+_:l==="end"?x+_:w-k;const Q=[];for(let E=0;E=0&&w>=0&&$<=g&&x<=m&&(A===f&&!tu(A)||b>=z&&$<=X&&w>=F&&x<=V))return Q;const H=getComputedStyle(A),B=parseInt(H.borderLeftWidth,10),G=parseInt(H.borderTopWidth,10),se=parseInt(H.borderRightWidth,10),ie=parseInt(H.borderBottomWidth,10);let le=0,pe=0;const ne="offsetWidth"in A?A.offsetWidth-A.clientWidth-B-se:0,ee="offsetHeight"in A?A.offsetHeight-A.clientHeight-G-ie:0,ce="offsetWidth"in A?A.offsetWidth===0?0:L/A.offsetWidth:0,ue="offsetHeight"in A?A.offsetHeight===0?0:N/A.offsetHeight:0;if(f===A)le=s==="start"?R:s==="end"?R-g:s==="nearest"?nu(O,O+g,g,G,ie,O+R,O+R+S,S):R-g/2,pe=l==="start"?I:l==="center"?I-m/2:l==="end"?I-m:nu(v,v+m,m,B,se,v+I,v+I+C,C),le=Math.max(0,le+O),pe=Math.max(0,pe+v);else{le=s==="start"?R-z-G:s==="end"?R-X+ie+ee:s==="nearest"?nu(z,X,N,G,ie+ee,R,R+S,S):R-(z+N/2)+ee/2,pe=l==="start"?I-F-B:l==="center"?I-(F+L/2)+ne/2:l==="end"?I-V+se+ne:nu(F,V,L,B,se+ne,I,I+C,C);const{scrollLeft:j,scrollTop:J}=A;le=ue===0?0:Math.max(0,Math.min(J+le/ue,A.scrollHeight-N/ue+ee)),pe=ce===0?0:Math.max(0,Math.min(j+pe/ce,A.scrollWidth-L/ce+ne)),R+=J-le,I+=j-pe}Q.push({el:A,top:le,left:pe})}return Q},D5=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function B5(t,e){if(!t.isConnected||!(i=>{let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const n=(i=>{const o=window.getComputedStyle(i);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(Mb(t,e));const r=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:a}of Mb(t,D5(e))){const s=o-n.top+n.bottom,l=a-n.left+n.right;i.scroll({top:s,left:l,behavior:r})}}const wr=t=>{const[,,,,e]=$r();return e?`${t}-css-var`:""};var Ve={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},U$=ye(function(t,e){var n=t.prefixCls,r=t.style,i=t.className,o=t.duration,a=o===void 0?4.5:o,s=t.showProgress,l=t.pauseOnHover,c=l===void 0?!0:l,u=t.eventKey,d=t.content,f=t.closable,h=t.closeIcon,p=h===void 0?"x":h,m=t.props,g=t.onClick,v=t.onNoticeClose,O=t.times,S=t.hovering,C=K(!1),b=ae(C,2),x=b[0],$=b[1],w=K(0),P=ae(w,2),_=P[0],T=P[1],k=K(0),R=ae(k,2),I=R[0],Q=R[1],E=S||x,A=a>0&&s,N=function(){v(u)},L=function(B){(B.key==="Enter"||B.code==="Enter"||B.keyCode===Ve.ENTER)&&N()};be(function(){if(!E&&a>0){var H=Date.now()-I,B=setTimeout(function(){N()},a*1e3-I);return function(){c&&clearTimeout(B),Q(Date.now()-H)}}},[a,E,O]),be(function(){if(!E&&A&&(c||I===0)){var H=performance.now(),B,G=function se(){cancelAnimationFrame(B),B=requestAnimationFrame(function(ie){var le=ie+I-H,pe=Math.min(le/(a*1e3),1);T(pe*100),pe<1&&se()})};return G(),function(){c&&cancelAnimationFrame(B)}}},[a,I,E,A,O]);var z=me(function(){return tt(f)==="object"&&f!==null?f:f?{closeIcon:p}:{}},[f,p]),V=$i(z,!0),X=100-(!_||_<0?0:_>100?100:_),F="".concat(n,"-notice");return y("div",xe({},m,{ref:e,className:Z(F,i,D({},"".concat(F,"-closable"),f)),style:r,onMouseEnter:function(B){var G;$(!0),m==null||(G=m.onMouseEnter)===null||G===void 0||G.call(m,B)},onMouseLeave:function(B){var G;$(!1),m==null||(G=m.onMouseLeave)===null||G===void 0||G.call(m,B)},onClick:g}),y("div",{className:"".concat(F,"-content")},d),f&&y("a",xe({tabIndex:0,className:"".concat(F,"-close"),onKeyDown:L,"aria-label":"Close"},V,{onClick:function(B){B.preventDefault(),B.stopPropagation(),N()}}),z.closeIcon),A&&y("progress",{className:"".concat(F,"-progress"),max:"100",value:X},X+"%"))}),K$=oe.createContext({}),W5=function(e){var n=e.children,r=e.classNames;return oe.createElement(K$.Provider,{value:{classNames:r}},n)},Eb=8,Ab=3,Qb=16,F5=function(e){var n={offset:Eb,threshold:Ab,gap:Qb};if(e&&tt(e)==="object"){var r,i,o;n.offset=(r=e.offset)!==null&&r!==void 0?r:Eb,n.threshold=(i=e.threshold)!==null&&i!==void 0?i:Ab,n.gap=(o=e.gap)!==null&&o!==void 0?o:Qb}return[!!e,n]},V5=["className","style","classNames","styles"],H5=function(e){var n=e.configList,r=e.placement,i=e.prefixCls,o=e.className,a=e.style,s=e.motion,l=e.onAllNoticeRemoved,c=e.onNoticeClose,u=e.stack,d=de(K$),f=d.classNames,h=Y({}),p=K(null),m=ae(p,2),g=m[0],v=m[1],O=K([]),S=ae(O,2),C=S[0],b=S[1],x=n.map(function(E){return{config:E,key:String(E.key)}}),$=F5(u),w=ae($,2),P=w[0],_=w[1],T=_.offset,k=_.threshold,R=_.gap,I=P&&(C.length>0||x.length<=k),Q=typeof s=="function"?s(r):s;return be(function(){P&&C.length>1&&b(function(E){return E.filter(function(A){return x.some(function(N){var L=N.key;return A===L})})})},[C,x,P]),be(function(){var E;if(P&&h.current[(E=x[x.length-1])===null||E===void 0?void 0:E.key]){var A;v(h.current[(A=x[x.length-1])===null||A===void 0?void 0:A.key])}},[x,P]),oe.createElement(D$,xe({key:r,className:Z(i,"".concat(i,"-").concat(r),f==null?void 0:f.list,o,D(D({},"".concat(i,"-stack"),!!P),"".concat(i,"-stack-expanded"),I)),style:a,keys:x,motionAppear:!0},Q,{onAllRemoved:function(){l(r)}}),function(E,A){var N=E.config,L=E.className,z=E.style,V=E.index,X=N,F=X.key,H=X.times,B=String(F),G=N,se=G.className,ie=G.style,le=G.classNames,pe=G.styles,ne=dt(G,V5),ee=x.findIndex(function(ve){return ve.key===B}),ce={};if(P){var ue=x.length-1-(ee>-1?ee:V-1),j=r==="top"||r==="bottom"?"-50%":"0";if(ue>0){var J,he,ge;ce.height=I?(J=h.current[B])===null||J===void 0?void 0:J.offsetHeight:g==null?void 0:g.offsetHeight;for(var $e=0,Te=0;Te-1?h.current[B]=Ne:delete h.current[B]},prefixCls:i,classNames:le,styles:pe,className:Z(se,f==null?void 0:f.notice),style:ie,times:H,key:F,eventKey:F,onNoticeClose:c,hovering:P&&C.length>0})))})},X5=ye(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-notification":n,i=t.container,o=t.motion,a=t.maxCount,s=t.className,l=t.style,c=t.onAllRemoved,u=t.stack,d=t.renderNotifications,f=K([]),h=ae(f,2),p=h[0],m=h[1],g=function(P){var _,T=p.find(function(k){return k.key===P});T==null||(_=T.onClose)===null||_===void 0||_.call(T),m(function(k){return k.filter(function(R){return R.key!==P})})};Yt(e,function(){return{open:function(P){m(function(_){var T=Pe(_),k=T.findIndex(function(Q){return Q.key===P.key}),R=W({},P);if(k>=0){var I;R.times=(((I=_[k])===null||I===void 0?void 0:I.times)||0)+1,T[k]=R}else R.times=0,T.push(R);return a>0&&T.length>a&&(T=T.slice(-a)),T})},close:function(P){g(P)},destroy:function(){m([])}}});var v=K({}),O=ae(v,2),S=O[0],C=O[1];be(function(){var w={};p.forEach(function(P){var _=P.placement,T=_===void 0?"topRight":_;T&&(w[T]=w[T]||[],w[T].push(P))}),Object.keys(S).forEach(function(P){w[P]=w[P]||[]}),C(w)},[p]);var b=function(P){C(function(_){var T=W({},_),k=T[P]||[];return k.length||delete T[P],T})},x=Y(!1);if(be(function(){Object.keys(S).length>0?x.current=!0:x.current&&(c==null||c(),x.current=!1)},[S]),!i)return null;var $=Object.keys(S);return uf(y(At,null,$.map(function(w){var P=S[w],_=y(H5,{key:w,configList:P,placement:w,prefixCls:r,className:s==null?void 0:s(w),style:l==null?void 0:l(w),motion:o,onNoticeClose:g,onAllNoticeRemoved:b,stack:u});return d?d(_,{prefixCls:r,key:w}):_})),i)}),Z5=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],q5=function(){return document.body},Nb=0;function G5(){for(var t={},e=arguments.length,n=new Array(e),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},e=t.getContainer,n=e===void 0?q5:e,r=t.motion,i=t.prefixCls,o=t.maxCount,a=t.className,s=t.style,l=t.onAllRemoved,c=t.stack,u=t.renderNotifications,d=dt(t,Z5),f=K(),h=ae(f,2),p=h[0],m=h[1],g=Y(),v=y(X5,{container:p,ref:g,prefixCls:i,motion:r,maxCount:o,className:a,style:s,onAllRemoved:l,stack:c,renderNotifications:u}),O=K([]),S=ae(O,2),C=S[0],b=S[1],x=pn(function(w){var P=G5(d,w);(P.key===null||P.key===void 0)&&(P.key="rc-notification-".concat(Nb),Nb+=1),b(function(_){return[].concat(Pe(_),[{type:"open",config:P}])})}),$=me(function(){return{open:x,close:function(P){b(function(_){return[].concat(Pe(_),[{type:"close",key:P}])})},destroy:function(){b(function(P){return[].concat(Pe(P),[{type:"destroy"}])})}}},[]);return be(function(){m(n())}),be(function(){if(g.current&&C.length){C.forEach(function(_){switch(_.type){case"open":g.current.open(_.config);break;case"close":g.current.close(_.key);break;case"destroy":g.current.destroy();break}});var w,P;b(function(_){return(w!==_||!P)&&(w=_,P=_.filter(function(T){return!C.includes(T)})),P})}},[C]),[$,v]}var U5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},K5=function(e,n){return y(Rt,xe({},e,{ref:n,icon:U5}))},yc=ye(K5);const kf=oe.createContext(void 0),Co=100,J5=10,J$=Co*J5,ew={Modal:Co,Drawer:Co,Popover:Co,Popconfirm:Co,Tooltip:Co,Tour:Co,FloatButton:Co},eA={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function tA(t){return t in ew}const Sc=(t,e)=>{const[,n]=$r(),r=oe.useContext(kf),i=tA(t);let o;if(e!==void 0)o=[e,e];else{let a=r??0;i?a+=(r?0:n.zIndexPopupBase)+ew[t]:a+=eA[t],o=[r===void 0?e:a,a]}return o};function nA(){const[t,e]=K([]),n=Ht(r=>(e(i=>[].concat(Pe(i),[r])),()=>{e(i=>i.filter(o=>o!==r))}),[]);return[t,n]}function tw(t,e){this.v=t,this.k=e}function ar(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}ar=function(a,s,l,c){function u(d,f){ar(a,d,function(h){return this._invoke(d,f,h)})}s?i?i(a,s,{value:l,enumerable:!c,configurable:!c,writable:!c}):a[s]=l:(u("next",0),u("throw",1),u("return",2))},ar(t,e,n,r)}function jv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(h,p,m,g){var v=p&&p.prototype instanceof s?p:s,O=Object.create(v.prototype);return ar(O,"_invoke",function(S,C,b){var x,$,w,P=0,_=b||[],T=!1,k={p:0,n:0,v:t,a:R,f:R.bind(t,4),d:function(Q,E){return x=Q,$=0,w=t,k.n=E,a}};function R(I,Q){for($=I,w=Q,e=0;!T&&P&&!E&&e<_.length;e++){var E,A=_[e],N=k.p,L=A[2];I>3?(E=L===Q)&&(w=A[($=A[4])?5:($=3,3)],A[4]=A[5]=t):A[0]<=N&&((E=I<2&&NQ||Q>L)&&(A[4]=I,A[5]=Q,k.n=L,$=0))}if(E||I>1)return a;throw T=!0,Q}return function(I,Q,E){if(P>1)throw TypeError("Generator is already running");for(T&&Q===1&&R(Q,E),$=Q,w=E;(e=$<2?t:w)||!T;){x||($?$<3?($>1&&(k.n=-1),R($,w)):k.n=w:k.v=w);try{if(P=2,x){if($||(I="next"),e=x[I]){if(!(e=e.call(x,w)))throw TypeError("iterator result is not an object");if(!e.done)return e;w=e.value,$<2&&($=0)}else $===1&&(e=x.return)&&e.call(x),$<2&&(w=TypeError("The iterator does not provide a '"+I+"' method"),$=1);x=t}else if((e=(T=k.n<0)?w:S.call(C,k))!==a)break}catch(A){x=t,$=1,w=A}finally{P=1}}return{value:e,done:T}}}(h,m,g),!0),O}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(ar(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(u);function f(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,ar(h,i,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,ar(d,"constructor",c),ar(c,"constructor",l),l.displayName="GeneratorFunction",ar(c,i,"GeneratorFunction"),ar(d),ar(d,i,"Generator"),ar(d,r,function(){return this}),ar(d,"toString",function(){return"[object Generator]"}),(jv=function(){return{w:o,m:f}})()}function Sd(t,e){function n(i,o,a,s){try{var l=t[i](o),c=l.value;return c instanceof tw?e.resolve(c.v).then(function(u){n("next",u,a,s)},function(u){n("throw",u,a,s)}):e.resolve(c).then(function(u){l.value=u,a(l)},function(u){return n("throw",u,a,s)})}catch(u){s(u)}}var r;this.next||(ar(Sd.prototype),ar(Sd.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),ar(this,"_invoke",function(i,o,a){function s(){return new e(function(l,c){n(i,a,l,c)})}return r=r?r.then(s,s):s()},!0)}function nw(t,e,n,r,i){return new Sd(jv().w(t,e,n,r),i||Promise)}function rA(t,e,n,r,i){var o=nw(t,e,n,r,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function iA(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in e)return i.value=r,i.done=!1,i;return i.done=!0,i}}function zb(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(tt(t)+" is not iterable")}function pr(){var t=jv(),e=t.m(pr),n=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function r(a){var s=typeof a=="function"&&a.constructor;return!!s&&(s===n||(s.displayName||s.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var s,l;return function(c){s||(s={stop:function(){return l(c.a,2)},catch:function(){return c.v},abrupt:function(d,f){return l(c.a,i[d],f)},delegateYield:function(d,f,h){return s.resultName=f,l(c.d,zb(d),h)},finish:function(d){return l(c.f,d)}},l=function(d,f,h){c.p=s.prev,c.n=s.next;try{return d(f,h)}finally{s.next=c.n}}),s.resultName&&(s[s.resultName]=c.v,s.resultName=void 0),s.sent=c.v,s.next=c.n;try{return a.call(this,s)}finally{c.p=s.prev,c.n=s.next}}}return(pr=function(){return{wrap:function(l,c,u,d){return t.w(o(l),c,u,d&&d.reverse())},isGeneratorFunction:r,mark:t.m,awrap:function(l,c){return new tw(l,c)},AsyncIterator:Sd,async:function(l,c,u,d,f){return(r(c)?nw:rA)(o(l),c,u,d,f)},keys:iA,values:zb}})()}function Lb(t,e,n,r,i,o,a){try{var s=t[o](a),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ia(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(l){Lb(o,r,i,a,s,"next",l)}function s(l){Lb(o,r,i,a,s,"throw",l)}a(void 0)})}}var xc=W({},gc),oA=xc.version,Rh=xc.render,aA=xc.unmountComponentAtNode,Rf;try{var sA=Number((oA||"").split(".")[0]);sA>=18&&(Rf=xc.createRoot)}catch{}function jb(t){var e=xc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&tt(e)==="object"&&(e.usingClientEntryPoint=t)}var xd="__rc_react_root__";function lA(t,e){jb(!0);var n=e[xd]||Rf(e);jb(!1),n.render(t),e[xd]=n}function cA(t,e){Rh==null||Rh(t,e)}function uA(t,e){if(Rf){lA(t,e);return}cA(t,e)}function dA(t){return $m.apply(this,arguments)}function $m(){return $m=Ia(pr().mark(function t(e){return pr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=e[xd])===null||i===void 0||i.unmount(),delete e[xd]}));case 1:case"end":return r.stop()}},t)})),$m.apply(this,arguments)}function fA(t){aA(t)}function hA(t){return wm.apply(this,arguments)}function wm(){return wm=Ia(pr().mark(function t(e){return pr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Rf===void 0){r.next=2;break}return r.abrupt("return",dA(e));case 2:fA(e);case 3:case"end":return r.stop()}},t)})),wm.apply(this,arguments)}const pA=(t,e)=>(uA(t,e),()=>hA(e));let mA=pA;function Dv(t){return mA}const Ih=()=>({height:0,opacity:0}),Db=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},gA=t=>({height:t?t.offsetHeight:0}),Mh=(t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height",Cd=(t=Fl)=>({motionName:`${t}-motion-collapse`,onAppearStart:Ih,onEnterStart:Ih,onAppearActive:Db,onEnterActive:Db,onLeaveStart:gA,onLeaveActive:Ih,onAppearEnd:Mh,onEnterEnd:Mh,onLeaveEnd:Mh,motionDeadline:500}),Lo=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function cn(t,e){var n=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(r){delete n[r]}),n}const If=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),n=e.width,r=e.height;if(n||r)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1},vA=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},OA=CE("Wave",vA),rw=`${Fl}-wave-target`;function bA(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"&&t!=="canvastext"}function yA(t){var e;const{borderTopColor:n,borderColor:r,backgroundColor:i}=getComputedStyle(t);return(e=[n,r,i].find(bA))!==null&&e!==void 0?e:null}function Eh(t){return Number.isNaN(t)?0:t}const SA=t=>{const{className:e,target:n,component:r,registerUnmount:i}=t,o=Y(null),a=Y(null);be(()=>{a.current=i()},[]);const[s,l]=K(null),[c,u]=K([]),[d,f]=K(0),[h,p]=K(0),[m,g]=K(0),[v,O]=K(0),[S,C]=K(!1),b={left:d,top:h,width:m,height:v,borderRadius:c.map(w=>`${w}px`).join(" ")};s&&(b["--wave-color"]=s);function x(){const w=getComputedStyle(n);l(yA(n));const P=w.position==="static",{borderLeftWidth:_,borderTopWidth:T}=w;f(P?n.offsetLeft:Eh(-parseFloat(_))),p(P?n.offsetTop:Eh(-parseFloat(T))),g(n.offsetWidth),O(n.offsetHeight);const{borderTopLeftRadius:k,borderTopRightRadius:R,borderBottomLeftRadius:I,borderBottomRightRadius:Q}=w;u([k,R,Q,I].map(E=>Eh(parseFloat(E))))}if(be(()=>{if(n){const w=Xt(()=>{x(),C(!0)});let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(x),P.observe(n)),()=>{Xt.cancel(w),P==null||P.disconnect()}}},[]),!S)return null;const $=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(rw));return y(mi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(w,P)=>{var _,T;if(P.deadline||P.propertyName==="opacity"){const k=(_=o.current)===null||_===void 0?void 0:_.parentElement;(T=a.current)===null||T===void 0||T.call(a).then(()=>{k==null||k.remove()})}return!1}},({className:w},P)=>y("div",{ref:mr(o,P),className:Z(e,w,{"wave-quick":$}),style:b}))},xA=(t,e)=>{var n;const{component:r}=e;if(r==="Checkbox"&&!(!((n=t.querySelector("input"))===null||n===void 0)&&n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",t==null||t.insertBefore(i,t==null?void 0:t.firstChild);const o=Dv();let a=null;function s(){return a}a=o(y(SA,Object.assign({},e,{target:t,registerUnmount:s})),i)},CA=(t,e,n)=>{const{wave:r}=de(at),[,i,o]=$r(),a=pn(c=>{const u=t.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${rw}`)||u,{showEffect:f}=r||{};(f||xA)(d,{className:e,token:i,component:n,event:c,hashId:o})}),s=Y(null);return c=>{Xt.cancel(s.current),s.current=Xt(()=>{a(c)})}},Bv=t=>{const{children:e,disabled:n,component:r}=t,{getPrefixCls:i}=de(at),o=Y(null),a=i("wave"),[,s]=OA(a),l=CA(o,Z(a,s),r);if(oe.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==window.Node.ELEMENT_NODE||n)return;const d=f=>{!If(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")&&!u.className.includes("disabled:")||u.getAttribute("aria-disabled")==="true"||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!oe.isValidElement(e))return e??null;const c=vo(e)?mr(Xo(e),o):o;return hr(e,{ref:c})},Dr=t=>{const e=oe.useContext(ba);return oe.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},$A=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},wA=t=>{const{componentCls:e,antCls:n}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},PA=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},iw=Zt("Space",t=>{const e=kt(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[wA(e),PA(e),$A(e)]},()=>({}),{resetStyle:!1});var ow=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=de(Mf),r=me(()=>{if(!n)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=n,s=i==="vertical"?"-vertical-":"-";return Z(`${t}-compact${s}item`,{[`${t}-compact${s}first-item`]:o,[`${t}-compact${s}last-item`]:a,[`${t}-compact${s}item-rtl`]:e==="rtl"})},[t,e,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},_A=t=>{const{children:e}=t;return y(Mf.Provider,{value:null},e)},TA=t=>{const{children:e}=t,n=ow(t,["children"]);return y(Mf.Provider,{value:me(()=>n,[n])},e)},kA=t=>{const{getPrefixCls:e,direction:n}=de(at),{size:r,direction:i,block:o,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=ow(t,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Dr(S=>r??S),f=e("space-compact",a),[h,p]=iw(f),m=Z(f,p,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:o,[`${f}-vertical`]:i==="vertical"},s,l),g=de(Mf),v=rr(c),O=me(()=>v.map((S,C)=>{const b=(S==null?void 0:S.key)||`${f}-item-${C}`;return y(TA,{key:b,compactSize:d,compactDirection:i,isFirstItem:C===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:C===v.length-1&&(!g||(g==null?void 0:g.isLastItem))},S)}),[r,v,g]);return v.length===0?null:h(y("div",Object.assign({className:m},u),O))};var RA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n}=de(at),{prefixCls:r,size:i,className:o}=t,a=RA(t,["prefixCls","size","className"]),s=e("btn-group",r),[,,l]=$r(),c=me(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),u=Z(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},o,l);return y(aw.Provider,{value:i},y("div",Object.assign({},a,{className:u})))},Bb=/^[\u4E00-\u9FA5]{2}$/,Pm=Bb.test.bind(Bb);function Wv(t){return t==="danger"?{danger:!0}:{type:t}}function Wb(t){return typeof t=="string"}function Ah(t){return t==="text"||t==="link"}function MA(t,e){if(t==null)return;const n=e?" ":"";return typeof t!="string"&&typeof t!="number"&&Wb(t.type)&&Pm(t.props.children)?hr(t,{children:t.props.children.split("").join(n)}):Wb(t)?Pm(t)?oe.createElement("span",null,t.split("").join(n)):oe.createElement("span",null,t):G$(t)?oe.createElement("span",null,t):t}function EA(t,e){let n=!1;const r=[];return oe.Children.forEach(t,i=>{const o=typeof i,a=o==="string"||o==="number";if(n&&a){const s=r.length-1,l=r[s];r[s]=`${l}${i}`}else r.push(i);n=a}),oe.Children.map(r,i=>MA(i,e))}["default","primary","danger"].concat(Pe(No));const _m=ye((t,e)=>{const{className:n,style:r,children:i,prefixCls:o}=t,a=Z(`${o}-icon`,n);return oe.createElement("span",{ref:e,className:a,style:r},i)}),Fb=ye((t,e)=>{const{prefixCls:n,className:r,style:i,iconClassName:o}=t,a=Z(`${n}-loading-icon`,r);return oe.createElement(_m,{prefixCls:n,className:a,style:i,ref:e},oe.createElement(yc,{className:o}))}),Qh=()=>({width:0,opacity:0,transform:"scale(0)"}),Nh=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),AA=t=>{const{prefixCls:e,loading:n,existIcon:r,className:i,style:o,mount:a}=t,s=!!n;return r?oe.createElement(Fb,{prefixCls:e,className:i,style:o}):oe.createElement(mi,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Qh,onAppearActive:Nh,onEnterStart:Qh,onEnterActive:Nh,onLeaveStart:Nh,onLeaveActive:Qh},({className:l,style:c},u)=>{const d=Object.assign(Object.assign({},o),c);return oe.createElement(Fb,{prefixCls:e,className:Z(i,l),style:d,ref:u})})},Vb=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),QA=t=>{const{componentCls:e,fontSize:n,lineWidth:r,groupBorderColor:i,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(r).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},Vb(`${e}-primary`,i),Vb(`${e}-danger`,o)]}};var NA=["b"],zA=["v"],zh=function(e){return Math.round(Number(e||0))},LA=function(e){if(e instanceof Dt)return e;if(e&&tt(e)==="object"&&"h"in e&&"b"in e){var n=e,r=n.b,i=dt(n,NA);return W(W({},i),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},Vl=function(t){Ui(n,t);var e=Oo(n);function n(r){return En(this,n),e.call(this,LA(r))}return An(n,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=zh(i.s*100),a=zh(i.b*100),s=zh(i.h),l=i.a,c="hsb(".concat(s,", ").concat(o,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=dt(i,zA);return W(W({},a),{},{b:o,a:this.a})}}]),n}(Dt),jA=function(e){return e instanceof Vl?e:new Vl(e)};jA("#1677ff");const DA=(t,e)=>(t==null?void 0:t.replace(/[^\w/]/g,"").slice(0,e?8:6))||"",BA=(t,e)=>t?DA(t,e):"";let Tm=function(){function t(e){En(this,t);var n;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)===null||n===void 0?void 0:n.map(i=>({color:new t(i.color),percent:i.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(({color:i,percent:o})=>({color:new t(i),percent:o})),this.metaColor=new Vl(this.colors[0].color.metaColor)):this.metaColor=new Vl(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return An(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return BA(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,i)=>{const o=n.colors[i];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===n.toHexString()}}])}();var WA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},FA=function(e,n){return y(Rt,xe({},e,{ref:n,icon:WA}))},$d=ye(FA),sw=oe.forwardRef(function(t,e){var n=t.prefixCls,r=t.forceRender,i=t.className,o=t.style,a=t.children,s=t.isActive,l=t.role,c=t.classNames,u=t.styles,d=oe.useState(s||r),f=ae(d,2),h=f[0],p=f[1];return oe.useEffect(function(){(r||s)&&p(!0)},[r,s]),h?oe.createElement("div",{ref:e,className:Z("".concat(n,"-content"),D(D({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),i),style:o,role:l},oe.createElement("div",{className:Z("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});sw.displayName="PanelContent";var VA=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],lw=oe.forwardRef(function(t,e){var n=t.showArrow,r=n===void 0?!0:n,i=t.headerClass,o=t.isActive,a=t.onItemClick,s=t.forceRender,l=t.className,c=t.classNames,u=c===void 0?{}:c,d=t.styles,f=d===void 0?{}:d,h=t.prefixCls,p=t.collapsible,m=t.accordion,g=t.panelKey,v=t.extra,O=t.header,S=t.expandIcon,C=t.openMotion,b=t.destroyInactivePanel,x=t.children,$=dt(t,VA),w=p==="disabled",P=v!=null&&typeof v!="boolean",_=D(D(D({onClick:function(){a==null||a(g)},onKeyDown:function(A){(A.key==="Enter"||A.keyCode===Ve.ENTER||A.which===Ve.ENTER)&&(a==null||a(g))},role:m?"tab":"button"},"aria-expanded",o),"aria-disabled",w),"tabIndex",w?-1:0),T=typeof S=="function"?S(t):oe.createElement("i",{className:"arrow"}),k=T&&oe.createElement("div",xe({className:"".concat(h,"-expand-icon")},["header","icon"].includes(p)?_:{}),T),R=Z("".concat(h,"-item"),D(D({},"".concat(h,"-item-active"),o),"".concat(h,"-item-disabled"),w),l),I=Z(i,"".concat(h,"-header"),D({},"".concat(h,"-collapsible-").concat(p),!!p),u.header),Q=W({className:I,style:f.header},["header","icon"].includes(p)?{}:_);return oe.createElement("div",xe({},$,{ref:e,className:R}),oe.createElement("div",Q,r&&k,oe.createElement("span",xe({className:"".concat(h,"-header-text")},p==="header"?_:{}),O),P&&oe.createElement("div",{className:"".concat(h,"-extra")},v)),oe.createElement(mi,xe({visible:o,leavedClassName:"".concat(h,"-content-hidden")},C,{forceRender:s,removeOnLeave:b}),function(E,A){var N=E.className,L=E.style;return oe.createElement(sw,{ref:A,prefixCls:h,className:N,classNames:u,style:L,styles:f,isActive:o,forceRender:s,role:m?"tabpanel":void 0},x)}))}),HA=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],XA=function(e,n){var r=n.prefixCls,i=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return e.map(function(d,f){var h=d.children,p=d.label,m=d.key,g=d.collapsible,v=d.onItemClick,O=d.destroyInactivePanel,S=dt(d,HA),C=String(m??f),b=g??o,x=O??a,$=function(_){b!=="disabled"&&(s(_),v==null||v(_))},w=!1;return i?w=l[0]===C:w=l.indexOf(C)>-1,oe.createElement(lw,xe({},S,{prefixCls:r,key:C,panelKey:C,isActive:w,accordion:i,openMotion:c,expandIcon:u,header:p,collapsible:b,onItemClick:$,destroyInactivePanel:x}),h)})},ZA=function(e,n,r){if(!e)return null;var i=r.prefixCls,o=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,l=r.onItemClick,c=r.activeKey,u=r.openMotion,d=r.expandIcon,f=e.key||String(n),h=e.props,p=h.header,m=h.headerClass,g=h.destroyInactivePanel,v=h.collapsible,O=h.onItemClick,S=!1;o?S=c[0]===f:S=c.indexOf(f)>-1;var C=v??a,b=function(w){C!=="disabled"&&(l(w),O==null||O(w))},x={key:f,panelKey:f,header:p,headerClass:m,isActive:S,prefixCls:i,destroyInactivePanel:g??s,openMotion:u,accordion:o,children:e.props.children,onItemClick:b,expandIcon:d,collapsible:C};return typeof e.type=="string"?e:(Object.keys(x).forEach(function($){typeof x[$]>"u"&&delete x[$]}),oe.cloneElement(e,x))};function qA(t,e,n){return Array.isArray(t)?XA(t,n):rr(e).map(function(r,i){return ZA(r,i,n)})}function GA(t){var e=t;if(!Array.isArray(e)){var n=tt(e);e=n==="number"||n==="string"?[e]:[]}return e.map(function(r){return String(r)})}var YA=oe.forwardRef(function(t,e){var n=t.prefixCls,r=n===void 0?"rc-collapse":n,i=t.destroyInactivePanel,o=i===void 0?!1:i,a=t.style,s=t.accordion,l=t.className,c=t.children,u=t.collapsible,d=t.openMotion,f=t.expandIcon,h=t.activeKey,p=t.defaultActiveKey,m=t.onChange,g=t.items,v=Z(r,l),O=_n([],{value:h,onChange:function(P){return m==null?void 0:m(P)},defaultValue:p,postState:GA}),S=ae(O,2),C=S[0],b=S[1],x=function(P){return b(function(){if(s)return C[0]===P?[]:[P];var _=C.indexOf(P),T=_>-1;return T?C.filter(function(k){return k!==P}):[].concat(Pe(C),[P])})};nr(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var $=qA(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:o,onItemClick:x,activeKey:C});return oe.createElement("div",xe({ref:e,className:v,style:a,role:s?"tablist":void 0},$i(t,{aria:!0,data:!0})),$)});const Fv=Object.assign(YA,{Panel:lw});Fv.Panel;const UA=ye((t,e)=>{const{getPrefixCls:n}=de(at),{prefixCls:r,className:i,showArrow:o=!0}=t,a=n("collapse",r),s=Z({[`${a}-no-arrow`]:!o},i);return y(Fv.Panel,Object.assign({ref:e},t,{prefixCls:a,className:s}))}),Vv=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, - opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),KA=t=>({animationDuration:t,animationFillMode:"both"}),JA=t=>({animationDuration:t,animationFillMode:"both"}),If=(t,e,n,r,i=!1)=>{const o=i?"&":"";return{[` + opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),KA=t=>({animationDuration:t,animationFillMode:"both"}),JA=t=>({animationDuration:t,animationFillMode:"both"}),Ef=(t,e,n,r,i=!1)=>{const o=i?"&":"";return{[` ${o}${t}-enter, ${o}${t}-appear `]:Object.assign(Object.assign({},KA(r)),{animationPlayState:"paused"}),[`${o}${t}-leave`]:Object.assign(Object.assign({},JA(r)),{animationPlayState:"paused"}),[` ${o}${t}-enter${t}-enter-active, ${o}${t}-appear${t}-appear-active - `]:{animationName:e,animationPlayState:"running"},[`${o}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},eQ=new _t("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),tQ=new _t("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),nQ=(t,e=!1)=>{const{antCls:n}=t,r=`${n}-fade`,i=e?"&":"";return[If(r,eQ,tQ,t.motionDurationMid,e),{[` + `]:{animationName:e,animationPlayState:"running"},[`${o}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},eQ=new _t("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),tQ=new _t("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),nQ=(t,e=!1)=>{const{antCls:n}=t,r=`${n}-fade`,i=e?"&":"";return[Ef(r,eQ,tQ,t.motionDurationMid,e),{[` ${i}${r}-enter, ${i}${r}-appear - `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${r}-leave`]:{animationTimingFunction:"linear"}}]},rQ=new _t("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),iQ=new _t("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),oQ=new _t("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),aQ=new _t("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),sQ=new _t("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),lQ=new _t("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),cQ=new _t("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),uQ=new _t("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),dQ={"move-up":{inKeyframes:cQ,outKeyframes:uQ},"move-down":{inKeyframes:rQ,outKeyframes:iQ},"move-left":{inKeyframes:oQ,outKeyframes:aQ},"move-right":{inKeyframes:sQ,outKeyframes:lQ}},Cd=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=dQ[e];return[If(r,i,o,t.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${r}-leave`]:{animationTimingFunction:"linear"}}]},rQ=new _t("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),iQ=new _t("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),oQ=new _t("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),aQ=new _t("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),sQ=new _t("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),lQ=new _t("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),cQ=new _t("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),uQ=new _t("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),dQ={"move-up":{inKeyframes:cQ,outKeyframes:uQ},"move-down":{inKeyframes:rQ,outKeyframes:iQ},"move-left":{inKeyframes:oQ,outKeyframes:aQ},"move-right":{inKeyframes:sQ,outKeyframes:lQ}},wd=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=dQ[e];return[Ef(r,i,o,t.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Vv=new _t("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Hv=new _t("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Xv=new _t("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Zv=new _t("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),fQ=new _t("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),hQ=new _t("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),pQ=new _t("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),mQ=new _t("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),gQ={"slide-up":{inKeyframes:Vv,outKeyframes:Hv},"slide-down":{inKeyframes:Xv,outKeyframes:Zv},"slide-left":{inKeyframes:fQ,outKeyframes:hQ},"slide-right":{inKeyframes:pQ,outKeyframes:mQ}},Lo=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=gQ[e];return[If(r,i,o,t.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Hv=new _t("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Xv=new _t("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Zv=new _t("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),qv=new _t("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),fQ=new _t("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),hQ=new _t("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),pQ=new _t("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),mQ=new _t("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),gQ={"slide-up":{inKeyframes:Hv,outKeyframes:Xv},"slide-down":{inKeyframes:Zv,outKeyframes:qv},"slide-left":{inKeyframes:fQ,outKeyframes:hQ},"slide-right":{inKeyframes:pQ,outKeyframes:mQ}},jo=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=gQ[e];return[Ef(r,i,o,t.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},qv=new _t("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),vQ=new _t("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Vb=new _t("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Hb=new _t("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),OQ=new _t("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),bQ=new _t("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),yQ=new _t("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),SQ=new _t("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),xQ=new _t("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),CQ=new _t("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),$Q=new _t("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),wQ=new _t("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),PQ={zoom:{inKeyframes:qv,outKeyframes:vQ},"zoom-big":{inKeyframes:Vb,outKeyframes:Hb},"zoom-big-fast":{inKeyframes:Vb,outKeyframes:Hb},"zoom-left":{inKeyframes:yQ,outKeyframes:SQ},"zoom-right":{inKeyframes:xQ,outKeyframes:CQ},"zoom-up":{inKeyframes:OQ,outKeyframes:bQ},"zoom-down":{inKeyframes:$Q,outKeyframes:wQ}},Cc=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=PQ[e];return[If(r,i,o,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[` + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},Gv=new _t("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),vQ=new _t("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Hb=new _t("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Xb=new _t("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),OQ=new _t("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),bQ=new _t("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),yQ=new _t("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),SQ=new _t("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),xQ=new _t("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),CQ=new _t("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),$Q=new _t("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),wQ=new _t("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),PQ={zoom:{inKeyframes:Gv,outKeyframes:vQ},"zoom-big":{inKeyframes:Hb,outKeyframes:Xb},"zoom-big-fast":{inKeyframes:Hb,outKeyframes:Xb},"zoom-left":{inKeyframes:yQ,outKeyframes:SQ},"zoom-right":{inKeyframes:xQ,outKeyframes:CQ},"zoom-up":{inKeyframes:OQ,outKeyframes:bQ},"zoom-down":{inKeyframes:$Q,outKeyframes:wQ}},Cc=(t,e)=>{const{antCls:n}=t,r=`${n}-${e}`,{inKeyframes:i,outKeyframes:o}=PQ[e];return[Ef(r,i,o,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[` ${r}-enter, ${r}-appear - `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},_Q=t=>{const{componentCls:e,contentBg:n,padding:r,headerBg:i,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:h,colorTextDisabled:p,fontSizeLG:m,lineHeight:g,lineHeightLG:v,marginSM:O,paddingSM:S,paddingLG:x,paddingXS:b,motionDurationSlow:C,fontSizeIcon:$,contentPadding:w,fontHeight:P,fontHeightLG:_}=t,T=`${q(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},wn(t)),{backgroundColor:i,border:T,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:T,"&:first-child":{[` + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},_Q=t=>{const{componentCls:e,contentBg:n,padding:r,headerBg:i,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:h,colorTextDisabled:p,fontSizeLG:m,lineHeight:g,lineHeightLG:v,marginSM:O,paddingSM:S,paddingLG:C,paddingXS:b,motionDurationSlow:x,fontSizeIcon:$,contentPadding:w,fontHeight:P,fontHeightLG:_}=t,T=`${q(c)} ${u} ${d}`;return{[e]:Object.assign(Object.assign({},wn(t)),{backgroundColor:i,border:T,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:T,"&:first-child":{[` &, & > ${e}-header`]:{borderRadius:`${q(l)} ${q(l)} 0 0`}},"&:last-child":{[` &, - & > ${e}-header`]:{borderRadius:`0 0 ${q(l)} ${q(l)}`}},[`> ${e}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:h,lineHeight:g,cursor:"pointer",transition:`all ${C}, visibility 0s`},Ci(t)),{[`> ${e}-header-text`]:{flex:"auto"},[`${e}-expand-icon`]:{height:P,display:"flex",alignItems:"center",paddingInlineEnd:O},[`${e}-arrow`]:Object.assign(Object.assign({},As()),{fontSize:$,transition:`transform ${C}`,svg:{transition:`transform ${C}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}}),[`${e}-collapsible-header`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-collapsible-icon`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:f,backgroundColor:n,borderTop:T,[`& > ${e}-content-box`]:{padding:w},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:b,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(S).sub(b).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:S}}},"&-large":{[`> ${e}-item`]:{fontSize:m,lineHeight:v,[`> ${e}-header`]:{padding:s,paddingInlineStart:r,[`> ${e}-expand-icon`]:{height:_,marginInlineStart:t.calc(x).sub(r).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:x}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${q(l)} ${q(l)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:p,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:O}}}}})}},TQ=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},kQ=t=>{const{componentCls:e,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:o}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${o}`},[` + & > ${e}-header`]:{borderRadius:`0 0 ${q(l)} ${q(l)}`}},[`> ${e}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:h,lineHeight:g,cursor:"pointer",transition:`all ${x}, visibility 0s`},Ci(t)),{[`> ${e}-header-text`]:{flex:"auto"},[`${e}-expand-icon`]:{height:P,display:"flex",alignItems:"center",paddingInlineEnd:O},[`${e}-arrow`]:Object.assign(Object.assign({},As()),{fontSize:$,transition:`transform ${x}`,svg:{transition:`transform ${x}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}}),[`${e}-collapsible-header`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-collapsible-icon`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-content`]:{color:f,backgroundColor:n,borderTop:T,[`& > ${e}-content-box`]:{padding:w},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:a,paddingInlineStart:b,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(S).sub(b).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:S}}},"&-large":{[`> ${e}-item`]:{fontSize:m,lineHeight:v,[`> ${e}-header`]:{padding:s,paddingInlineStart:r,[`> ${e}-expand-icon`]:{height:_,marginInlineStart:t.calc(C).sub(r).equal()}},[`> ${e}-content > ${e}-content-box`]:{padding:C}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-content`]:{borderRadius:`0 0 ${q(l)} ${q(l)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:p,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:O}}}}})}},TQ=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},kQ=t=>{const{componentCls:e,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:o}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${o}`},[` > ${e}-item:last-child, > ${e}-item:last-child ${e}-header - `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:i,borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{padding:r}}}},RQ=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},IQ=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer,borderlessContentPadding:`${t.paddingXXS}px 16px ${t.padding}px`,borderlessContentBg:"transparent"}),MQ=Zt("Collapse",t=>{const e=kt(t,{collapseHeaderPaddingSM:`${q(t.paddingXS)} ${q(t.paddingSM)}`,collapseHeaderPaddingLG:`${q(t.padding)} ${q(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[_Q(e),kQ(e),RQ(e),TQ(e),Fv(e)]},IQ),EQ=Se((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:i,className:o,style:a}=rr("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:h,expandIconPosition:p="start",children:m,destroyInactivePanel:g,destroyOnHidden:v,expandIcon:O}=t,S=Dr(Q=>{var M;return(M=h??Q)!==null&&M!==void 0?M:"middle"}),x=n("collapse",s),b=n(),[C,$,w]=MQ(x),P=ge(()=>p==="left"?"start":p==="right"?"end":p,[p]),_=O??i,T=Ht((Q={})=>{const M=typeof _=="function"?_(Q):y(xd,{rotate:Q.isActive?r==="rtl"?-90:90:void 0,"aria-label":Q.isActive?"expanded":"collapsed"});return fr(M,()=>{var E;return{className:Z((E=M.props)===null||E===void 0?void 0:E.className,`${x}-arrow`)}})},[_,x,r]),R=Z(`${x}-icon-position-${P}`,{[`${x}-borderless`]:!d,[`${x}-rtl`]:r==="rtl",[`${x}-ghost`]:!!f,[`${x}-${S}`]:S!=="middle"},o,l,c,$,w),k=ge(()=>Object.assign(Object.assign({},Sd(b)),{motionAppear:!1,leavedClassName:`${x}-content-hidden`}),[b,x]),I=ge(()=>m?nr(m).map((Q,M)=>{var E,N;const z=Q.props;if(z!=null&&z.disabled){const L=(E=Q.key)!==null&&E!==void 0?E:String(M),F=Object.assign(Object.assign({},cn(Q.props,["disabled"])),{key:L,collapsible:(N=z.collapsible)!==null&&N!==void 0?N:"disabled"});return fr(Q,F)}return Q}):null,[m]);return C(y(Wv,Object.assign({ref:e,openMotion:k},cn(t,["rootClassName"]),{expandIcon:T,prefixCls:x,className:R,style:Object.assign(Object.assign({},a),u),destroyInactivePanel:v??g}),I))}),Us=Object.assign(EQ,{Panel:UA}),AQ=t=>t instanceof Pm?t:new Pm(t),QQ=(t,e)=>{const{r:n,g:r,b:i,a:o}=t.toRgb(),a=new Vl(t.toRgbString()).onBackground(e).toHsv();return o<=.5?a.v>.5:n*.299+r*.587+i*.114>192},cw=t=>{const{paddingInline:e,onlyIconSize:n}=t;return kt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},uw=t=>{var e,n,r,i,o,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(i=t.contentLineHeight)!==null&&i!==void 0?i:Fu(s),d=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:Fu(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:Fu(c),h=QQ(new Pm(t.colorBgSolid),"#fff")?"#000":"#fff",p=Qo.reduce((m,g)=>Object.assign(Object.assign({},m),{[`${g}ShadowColor`]:`0 ${q(t.controlOutlineWidth)} 0 ${ul(t[`${g}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},p),{fontWeight:400,iconGap:t.marginXS,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:h,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*f)/2-t.lineWidth,0)})},NQ=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,iconGap:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:s,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:As(),"> a":{color:"currentColor"},"&:not(:disabled)":Ci(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"}},[`&${e}-loading`]:{opacity:i,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${o} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},dw=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),zQ=t=>({minWidth:t.controlHeight,paddingInline:0,borderRadius:"50%"}),LQ=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Mf=(t,e,n,r,i,o,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},dw(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),jQ=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},LQ(t))}),DQ=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Ef=(t,e,n,r)=>{const o=r&&["link","text"].includes(r)?DQ:jQ;return Object.assign(Object.assign({},o(t)),dw(t.componentCls,e,n))},Af=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},Ef(t,r,i))}),Qf=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},Ef(t,r,i))}),Nf=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),zf=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Ef(t,n,r))}),Gi=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},Ef(t,r,i,n))}),BQ=t=>{const{componentCls:e}=t;return Qo.reduce((n,r)=>{const i=t[`${r}6`],o=t[`${r}1`],a=t[`${r}5`],s=t[`${r}2`],l=t[`${r}3`],c=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:t[`${r}ShadowColor`]},Af(t,t.colorTextLightSolid,i,{background:a},{background:c})),Qf(t,i,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Nf(t)),zf(t,o,{color:i,background:s},{color:i,background:l})),Gi(t,i,"link",{color:a},{color:c})),Gi(t,i,"text",{color:a,background:o},{color:c,background:l}))})},{})},WQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},Af(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Nf(t)),zf(t,t.colorFillTertiary,{color:t.defaultColor,background:t.colorFillSecondary},{color:t.defaultColor,background:t.colorFill})),Mf(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Gi(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),FQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Qf(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Nf(t)),zf(t,t.colorPrimaryBg,{color:t.colorPrimary,background:t.colorPrimaryBgHover},{color:t.colorPrimary,background:t.colorPrimaryBorder})),Gi(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),Gi(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Mf(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),VQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},Af(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Qf(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Nf(t)),zf(t,t.colorErrorBg,{color:t.colorError,background:t.colorErrorBgFilledHover},{color:t.colorError,background:t.colorErrorBgActive})),Gi(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Gi(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Mf(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),HQ=t=>Object.assign(Object.assign({},Gi(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Mf(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),XQ=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:WQ(t),[`${e}-color-primary`]:FQ(t),[`${e}-color-dangerous`]:VQ(t),[`${e}-color-link`]:HQ(t)},BQ(t))},ZQ=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Qf(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Gi(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),Af(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Gi(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),Gv=(t,e="")=>{const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:i,height:r,padding:`${q(l)} ${q(a)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:zQ(t)},{[`${n}${n}-round${e}`]:{borderRadius:t.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:t.buttonPaddingHorizontal}}}]},qQ=t=>{const e=kt(t,{fontSize:t.contentFontSize});return Gv(e,t.componentCls)},GQ=t=>{const e=kt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return Gv(e,`${t.componentCls}-sm`)},YQ=t=>{const e=kt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return Gv(e,`${t.componentCls}-lg`)},UQ=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},KQ=Zt("Button",t=>{const e=cw(t);return[NQ(e),qQ(e),GQ(e),YQ(e),UQ(e),XQ(e),ZQ(e),QA(e)]},uw,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function JQ(t,e,n,r){const{focusElCls:i,focus:o,borderElCls:a}=n,s=a?"> *":"",l=["hover",o?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${s}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[l]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${s}`]:{zIndex:0}})}}function e4(t,e,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Yv(t,e={focus:!0}){const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},JQ(t,r,e,n)),e4(n,r,e))}}function t4(t,e,n){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function n4(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function r4(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},t4(t,e,t.componentCls)),n4(t.componentCls,e))}}const i4=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:i}=t,o=i(r).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?o:0,insetInlineStart:s?0:o,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},o4=Qs(["Button","compact"],t=>{const e=cw(t);return[Yv(e),r4(e),i4(e)]},uw);var a4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{loading:i=!1,prefixCls:o,color:a,variant:s,type:l,danger:c=!1,shape:u,size:d,styles:f,disabled:h,className:p,rootClassName:m,children:g,icon:v,iconPosition:O="start",ghost:S=!1,block:x=!1,htmlType:b="button",classNames:C,style:$={},autoInsertSpace:w,autoFocus:P}=t,_=a4(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),T=l||"default",{button:R}=oe.useContext(it),k=u||(R==null?void 0:R.shape)||"default",[I,Q]=ge(()=>{if(a&&s)return[a,s];if(l||c){const Pe=l4[T]||[];return c?["danger",Pe[1]]:Pe}return R!=null&&R.color&&(R!=null&&R.variant)?[R.color,R.variant]:["default","outlined"]},[l,a,s,c,R==null?void 0:R.variant,R==null?void 0:R.color]),E=I==="danger"?"dangerous":I,{getPrefixCls:N,direction:z,autoInsertSpace:L,className:F,style:H,classNames:V,styles:X}=rr("button"),B=(n=w??L)!==null&&n!==void 0?n:!0,G=N("btn",o),[se,re,le]=KQ(G),me=fe(qi),ie=h??me,ne=fe(aw),ue=ge(()=>s4(i),[i]),[de,j]=J(ue.loading),[ee,he]=J(!1),ve=U(null),Y=go(e,ve),ce=Ao.count(g)===1&&!v&&!Mh(Q),te=U(!0);oe.useEffect(()=>(te.current=!1,()=>{te.current=!0}),[]),Nt(()=>{let Pe=null;ue.delay>0?Pe=setTimeout(()=>{Pe=null,j(!0)},ue.delay):j(ue.loading);function ct(){Pe&&(clearTimeout(Pe),Pe=null)}return ct},[ue.delay,ue.loading]),be(()=>{if(!ve.current||!B)return;const Pe=ve.current.textContent||"";ce&&$m(Pe)?ee||he(!0):ee&&he(!1)}),be(()=>{P&&ve.current&&ve.current.focus()},[]);const Oe=oe.useCallback(Pe=>{var ct;if(de||ie){Pe.preventDefault();return}(ct=t.onClick)===null||ct===void 0||ct.call(t,("href"in t,Pe))},[t.onClick,de,ie]),{compactSize:ye,compactItemClassnames:pe}=js(G,z),Qe={large:"lg",small:"sm",middle:void 0},Me=Dr(Pe=>{var ct,xt;return(xt=(ct=d??ye)!==null&&ct!==void 0?ct:ne)!==null&&xt!==void 0?xt:Pe}),De=Me&&(r=Qe[Me])!==null&&r!==void 0?r:"",we=de?"loading":v,Ie=cn(_,["navigate"]),rt=Z(G,re,le,{[`${G}-${k}`]:k!=="default"&&k,[`${G}-${T}`]:T,[`${G}-dangerous`]:c,[`${G}-color-${E}`]:E,[`${G}-variant-${Q}`]:Q,[`${G}-${De}`]:De,[`${G}-icon-only`]:!g&&g!==0&&!!we,[`${G}-background-ghost`]:S&&!Mh(Q),[`${G}-loading`]:de,[`${G}-two-chinese-chars`]:ee&&B&&!de,[`${G}-block`]:x,[`${G}-rtl`]:z==="rtl",[`${G}-icon-end`]:O==="end"},pe,p,m,F),Ye=Object.assign(Object.assign({},H),$),lt=Z(C==null?void 0:C.icon,V.icon),Be=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),X.icon||{}),ke=v&&!de?oe.createElement(wm,{prefixCls:G,className:lt,style:Be},v):i&&typeof i=="object"&&i.icon?oe.createElement(wm,{prefixCls:G,className:lt,style:Be},i.icon):oe.createElement(AA,{existIcon:!!v,prefixCls:G,loading:de,mount:te.current}),Xe=g||g===0?EA(g,ce&&B):null;if(Ie.href!==void 0)return se(oe.createElement("a",Object.assign({},Ie,{className:Z(rt,{[`${G}-disabled`]:ie}),href:ie?void 0:Ie.href,style:Ye,onClick:Oe,ref:Y,tabIndex:ie?-1:0,"aria-disabled":ie}),ke,Xe));let _e=oe.createElement("button",Object.assign({},_,{type:b,className:rt,style:Ye,onClick:Oe,disabled:ie,ref:Y}),ke,Xe,pe&&oe.createElement(o4,{prefixCls:G}));return Mh(Q)||(_e=oe.createElement(Dv,{component:"Button",disabled:de},_e)),se(_e)}),vt=c4;vt.Group=IA;vt.__ANT_BUTTON=!0;const Nh=t=>typeof(t==null?void 0:t.then)=="function",Uv=t=>{const{type:e,children:n,prefixCls:r,buttonProps:i,close:o,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=U(!1),f=U(null),[h,p]=Oa(!1),m=(...O)=>{o==null||o.apply(void 0,O)};be(()=>{let O=null;return a&&(O=setTimeout(()=>{var S;(S=f.current)===null||S===void 0||S.focus({preventScroll:!0})})),()=>{O&&clearTimeout(O)}},[]);const g=O=>{Nh(O)&&(p(!0),O.then((...S)=>{p(!1,!0),m.apply(void 0,S),d.current=!1},S=>{if(p(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(S)}))},v=O=>{if(d.current)return;if(d.current=!0,!u){m();return}let S;if(s){if(S=u(O),c&&!Nh(S)){d.current=!1,m(O);return}}else if(u.length)S=u(o),d.current=!1;else if(S=u(),!Nh(S)){m();return}g(S)};return y(vt,Object.assign({},Bv(e),{onClick:v,loading:h,prefixCls:r},i,{ref:f}),n)},$c=oe.createContext({}),{Provider:fw}=$c,Xb=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:s,onConfirm:l}=fe($c);return i?oe.createElement(Uv,{isSilent:r,actionFn:s,close:(...c)=>{a==null||a.apply(void 0,c),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${o}-btn`},n):null},Zb=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:s,onOk:l}=fe($c);return oe.createElement(Uv,{isSilent:n,type:a||"primary",actionFn:l,close:(...c)=>{e==null||e.apply(void 0,c),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${i}-btn`},o)};var hw=bt(null),qb=[];function u4(t,e){var n=J(function(){if(!dr())return null;var p=document.createElement("div");return p}),r=ae(n,1),i=r[0],o=U(!1),a=fe(hw),s=J(qb),l=ae(s,2),c=l[0],u=l[1],d=a||(o.current?void 0:function(p){u(function(m){var g=[p].concat($e(m));return g})});function f(){i.parentElement||document.body.appendChild(i),o.current=!0}function h(){var p;(p=i.parentElement)===null||p===void 0||p.removeChild(i),o.current=!1}return Nt(function(){return t?a?a(f):f():h(),h},[t]),Nt(function(){c.length&&(c.forEach(function(p){return p()}),u(qb))},[c]),[i,d]}function d4(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(t){var a=getComputedStyle(t);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";so(` + `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:i,borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{padding:r}}}},RQ=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},IQ=t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer,borderlessContentPadding:`${t.paddingXXS}px 16px ${t.padding}px`,borderlessContentBg:"transparent"}),MQ=Zt("Collapse",t=>{const e=kt(t,{collapseHeaderPaddingSM:`${q(t.paddingXS)} ${q(t.paddingSM)}`,collapseHeaderPaddingLG:`${q(t.padding)} ${q(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[_Q(e),kQ(e),RQ(e),TQ(e),Vv(e)]},IQ),EQ=ye((t,e)=>{const{getPrefixCls:n,direction:r,expandIcon:i,className:o,style:a}=ir("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:h,expandIconPosition:p="start",children:m,destroyInactivePanel:g,destroyOnHidden:v,expandIcon:O}=t,S=Dr(Q=>{var E;return(E=h??Q)!==null&&E!==void 0?E:"middle"}),C=n("collapse",s),b=n(),[x,$,w]=MQ(C),P=me(()=>p==="left"?"start":p==="right"?"end":p,[p]),_=O??i,T=Ht((Q={})=>{const E=typeof _=="function"?_(Q):y($d,{rotate:Q.isActive?r==="rtl"?-90:90:void 0,"aria-label":Q.isActive?"expanded":"collapsed"});return hr(E,()=>{var A;return{className:Z((A=E.props)===null||A===void 0?void 0:A.className,`${C}-arrow`)}})},[_,C,r]),k=Z(`${C}-icon-position-${P}`,{[`${C}-borderless`]:!d,[`${C}-rtl`]:r==="rtl",[`${C}-ghost`]:!!f,[`${C}-${S}`]:S!=="middle"},o,l,c,$,w),R=me(()=>Object.assign(Object.assign({},Cd(b)),{motionAppear:!1,leavedClassName:`${C}-content-hidden`}),[b,C]),I=me(()=>m?rr(m).map((Q,E)=>{var A,N;const L=Q.props;if(L!=null&&L.disabled){const z=(A=Q.key)!==null&&A!==void 0?A:String(E),V=Object.assign(Object.assign({},cn(Q.props,["disabled"])),{key:z,collapsible:(N=L.collapsible)!==null&&N!==void 0?N:"disabled"});return hr(Q,V)}return Q}):null,[m]);return x(y(Fv,Object.assign({ref:e,openMotion:R},cn(t,["rootClassName"]),{expandIcon:T,prefixCls:C,className:k,style:Object.assign(Object.assign({},a),u),destroyInactivePanel:v??g}),I))}),Us=Object.assign(EQ,{Panel:UA}),AQ=t=>t instanceof Tm?t:new Tm(t),QQ=(t,e)=>{const{r:n,g:r,b:i,a:o}=t.toRgb(),a=new Vl(t.toRgbString()).onBackground(e).toHsv();return o<=.5?a.v>.5:n*.299+r*.587+i*.114>192},cw=t=>{const{paddingInline:e,onlyIconSize:n}=t;return kt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},uw=t=>{var e,n,r,i,o,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(n=t.contentFontSizeSM)!==null&&n!==void 0?n:t.fontSize,c=(r=t.contentFontSizeLG)!==null&&r!==void 0?r:t.fontSizeLG,u=(i=t.contentLineHeight)!==null&&i!==void 0?i:Vu(s),d=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:Vu(l),f=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:Vu(c),h=QQ(new Tm(t.colorBgSolid),"#fff")?"#000":"#fff",p=No.reduce((m,g)=>Object.assign(Object.assign({},m),{[`${g}ShadowColor`]:`0 ${q(t.controlOutlineWidth)} 0 ${ul(t[`${g}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},p),{fontWeight:400,iconGap:t.marginXS,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:h,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*d)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*f)/2-t.lineWidth,0)})},NQ=t=>{const{componentCls:e,iconCls:n,fontWeight:r,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,iconGap:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:s,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:As(),"> a":{color:"currentColor"},"&:not(:disabled)":Ci(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"}},[`&${e}-loading`]:{opacity:i,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${o} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},dw=(t,e,n)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":n}}),zQ=t=>({minWidth:t.controlHeight,paddingInline:0,borderRadius:"50%"}),LQ=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Af=(t,e,n,r,i,o,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:e,borderColor:r||void 0,boxShadow:"none"},dw(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),jQ=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},LQ(t))}),DQ=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Qf=(t,e,n,r)=>{const o=r&&["link","text"].includes(r)?DQ:jQ;return Object.assign(Object.assign({},o(t)),dw(t.componentCls,e,n))},Nf=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:n},Qf(t,r,i))}),zf=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:n},Qf(t,r,i))}),Lf=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),jf=(t,e,n,r)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Qf(t,n,r))}),Gi=(t,e,n,r,i)=>({[`&${t.componentCls}-variant-${n}`]:Object.assign({color:e,boxShadow:"none"},Qf(t,r,i,n))}),BQ=t=>{const{componentCls:e}=t;return No.reduce((n,r)=>{const i=t[`${r}6`],o=t[`${r}1`],a=t[`${r}5`],s=t[`${r}2`],l=t[`${r}3`],c=t[`${r}7`];return Object.assign(Object.assign({},n),{[`&${e}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:t[`${r}ShadowColor`]},Nf(t,t.colorTextLightSolid,i,{background:a},{background:c})),zf(t,i,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Lf(t)),jf(t,o,{color:i,background:s},{color:i,background:l})),Gi(t,i,"link",{color:a},{color:c})),Gi(t,i,"text",{color:a,background:o},{color:c,background:l}))})},{})},WQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},Nf(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Lf(t)),jf(t,t.colorFillTertiary,{color:t.defaultColor,background:t.colorFillSecondary},{color:t.defaultColor,background:t.colorFill})),Af(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Gi(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),FQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},zf(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Lf(t)),jf(t,t.colorPrimaryBg,{color:t.colorPrimary,background:t.colorPrimaryBgHover},{color:t.colorPrimary,background:t.colorPrimaryBorder})),Gi(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),Gi(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Af(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),VQ=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},Nf(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),zf(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Lf(t)),jf(t,t.colorErrorBg,{color:t.colorError,background:t.colorErrorBgFilledHover},{color:t.colorError,background:t.colorErrorBgActive})),Gi(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Gi(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Af(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),HQ=t=>Object.assign(Object.assign({},Gi(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Af(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),XQ=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:WQ(t),[`${e}-color-primary`]:FQ(t),[`${e}-color-dangerous`]:VQ(t),[`${e}-color-link`]:HQ(t)},BQ(t))},ZQ=t=>Object.assign(Object.assign(Object.assign(Object.assign({},zf(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Gi(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),Nf(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Gi(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),Yv=(t,e="")=>{const{componentCls:n,controlHeight:r,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:i,height:r,padding:`${q(l)} ${q(a)}`,borderRadius:o,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${e}`]:zQ(t)},{[`${n}${n}-round${e}`]:{borderRadius:t.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:t.buttonPaddingHorizontal}}}]},qQ=t=>{const e=kt(t,{fontSize:t.contentFontSize});return Yv(e,t.componentCls)},GQ=t=>{const e=kt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return Yv(e,`${t.componentCls}-sm`)},YQ=t=>{const e=kt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return Yv(e,`${t.componentCls}-lg`)},UQ=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},KQ=Zt("Button",t=>{const e=cw(t);return[NQ(e),qQ(e),GQ(e),YQ(e),UQ(e),XQ(e),ZQ(e),QA(e)]},uw,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function JQ(t,e,n,r){const{focusElCls:i,focus:o,borderElCls:a}=n,s=a?"> *":"",l=["hover",o?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${s}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[l]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${s}`]:{zIndex:0}})}}function e4(t,e,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Uv(t,e={focus:!0}){const{componentCls:n}=t,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},JQ(t,r,e,n)),e4(n,r,e))}}function t4(t,e,n){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function n4(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function r4(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},t4(t,e,t.componentCls)),n4(t.componentCls,e))}}const i4=t=>{const{componentCls:e,colorPrimaryHover:n,lineWidth:r,calc:i}=t,o=i(r).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?o:0,insetInlineStart:s?0:o,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},o4=Qs(["Button","compact"],t=>{const e=cw(t);return[Uv(e),r4(e),i4(e)]},uw);var a4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{loading:i=!1,prefixCls:o,color:a,variant:s,type:l,danger:c=!1,shape:u,size:d,styles:f,disabled:h,className:p,rootClassName:m,children:g,icon:v,iconPosition:O="start",ghost:S=!1,block:C=!1,htmlType:b="button",classNames:x,style:$={},autoInsertSpace:w,autoFocus:P}=t,_=a4(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),T=l||"default",{button:k}=oe.useContext(at),R=u||(k==null?void 0:k.shape)||"default",[I,Q]=me(()=>{if(a&&s)return[a,s];if(l||c){const ke=l4[T]||[];return c?["danger",ke[1]]:ke}return k!=null&&k.color&&(k!=null&&k.variant)?[k.color,k.variant]:["default","outlined"]},[l,a,s,c,k==null?void 0:k.variant,k==null?void 0:k.color]),A=I==="danger"?"dangerous":I,{getPrefixCls:N,direction:L,autoInsertSpace:z,className:V,style:X,classNames:F,styles:H}=ir("button"),B=(n=w??z)!==null&&n!==void 0?n:!0,G=N("btn",o),[se,ie,le]=KQ(G),pe=de(qi),ne=h??pe,ee=de(aw),ce=me(()=>s4(i),[i]),[ue,j]=K(ce.loading),[J,he]=K(!1),ge=Y(null),$e=go(e,ge),Te=Qo.count(g)===1&&!v&&!Ah(Q),Ce=Y(!0);oe.useEffect(()=>(Ce.current=!1,()=>{Ce.current=!0}),[]),Nt(()=>{let ke=null;ce.delay>0?ke=setTimeout(()=>{ke=null,j(!0)},ce.delay):j(ce.loading);function ot(){ke&&(clearTimeout(ke),ke=null)}return ot},[ce.delay,ce.loading]),be(()=>{if(!ge.current||!B)return;const ke=ge.current.textContent||"";Te&&Pm(ke)?J||he(!0):J&&he(!1)}),be(()=>{P&&ge.current&&ge.current.focus()},[]);const Ie=oe.useCallback(ke=>{var ot;if(ue||ne){ke.preventDefault();return}(ot=t.onClick)===null||ot===void 0||ot.call(t,("href"in t,ke))},[t.onClick,ue,ne]),{compactSize:_e,compactItemClassnames:ve}=js(G,L),Ne={large:"lg",small:"sm",middle:void 0},ze=Dr(ke=>{var ot,ut;return(ut=(ot=d??_e)!==null&&ot!==void 0?ot:ee)!==null&&ut!==void 0?ut:ke}),re=ze&&(r=Ne[ze])!==null&&r!==void 0?r:"",fe=ue?"loading":v,te=cn(_,["navigate"]),Oe=Z(G,ie,le,{[`${G}-${R}`]:R!=="default"&&R,[`${G}-${T}`]:T,[`${G}-dangerous`]:c,[`${G}-color-${A}`]:A,[`${G}-variant-${Q}`]:Q,[`${G}-${re}`]:re,[`${G}-icon-only`]:!g&&g!==0&&!!fe,[`${G}-background-ghost`]:S&&!Ah(Q),[`${G}-loading`]:ue,[`${G}-two-chinese-chars`]:J&&B&&!ue,[`${G}-block`]:C,[`${G}-rtl`]:L==="rtl",[`${G}-icon-end`]:O==="end"},ve,p,m,V),we=Object.assign(Object.assign({},X),$),Ke=Z(x==null?void 0:x.icon,F.icon),Ae=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),H.icon||{}),Me=v&&!ue?oe.createElement(_m,{prefixCls:G,className:Ke,style:Ae},v):i&&typeof i=="object"&&i.icon?oe.createElement(_m,{prefixCls:G,className:Ke,style:Ae},i.icon):oe.createElement(AA,{existIcon:!!v,prefixCls:G,loading:ue,mount:Ce.current}),Fe=g||g===0?EA(g,Te&&B):null;if(te.href!==void 0)return se(oe.createElement("a",Object.assign({},te,{className:Z(Oe,{[`${G}-disabled`]:ne}),href:ne?void 0:te.href,style:we,onClick:Ie,ref:$e,tabIndex:ne?-1:0,"aria-disabled":ne}),Me,Fe));let Re=oe.createElement("button",Object.assign({},_,{type:b,className:Oe,style:we,onClick:Ie,disabled:ne,ref:$e}),Me,Fe,ve&&oe.createElement(o4,{prefixCls:G}));return Ah(Q)||(Re=oe.createElement(Bv,{component:"Button",disabled:ue},Re)),se(Re)}),vt=c4;vt.Group=IA;vt.__ANT_BUTTON=!0;const Lh=t=>typeof(t==null?void 0:t.then)=="function",Kv=t=>{const{type:e,children:n,prefixCls:r,buttonProps:i,close:o,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=t,d=Y(!1),f=Y(null),[h,p]=ya(!1),m=(...O)=>{o==null||o.apply(void 0,O)};be(()=>{let O=null;return a&&(O=setTimeout(()=>{var S;(S=f.current)===null||S===void 0||S.focus({preventScroll:!0})})),()=>{O&&clearTimeout(O)}},[]);const g=O=>{Lh(O)&&(p(!0),O.then((...S)=>{p(!1,!0),m.apply(void 0,S),d.current=!1},S=>{if(p(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(S)}))},v=O=>{if(d.current)return;if(d.current=!0,!u){m();return}let S;if(s){if(S=u(O),c&&!Lh(S)){d.current=!1,m(O);return}}else if(u.length)S=u(o),d.current=!1;else if(S=u(),!Lh(S)){m();return}g(S)};return y(vt,Object.assign({},Wv(e),{onClick:v,loading:h,prefixCls:r},i,{ref:f}),n)},$c=oe.createContext({}),{Provider:fw}=$c,Zb=()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:n,isSilent:r,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:s,onConfirm:l}=de($c);return i?oe.createElement(Kv,{isSilent:r,actionFn:s,close:(...c)=>{a==null||a.apply(void 0,c),l==null||l(!1)},autoFocus:t==="cancel",buttonProps:e,prefixCls:`${o}-btn`},n):null},qb=()=>{const{autoFocusButton:t,close:e,isSilent:n,okButtonProps:r,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:s,onOk:l}=de($c);return oe.createElement(Kv,{isSilent:n,type:a||"primary",actionFn:l,close:(...c)=>{e==null||e.apply(void 0,c),s==null||s(!0)},autoFocus:t==="ok",buttonProps:r,prefixCls:`${i}-btn`},o)};var hw=yt(null),Gb=[];function u4(t,e){var n=K(function(){if(!fr())return null;var p=document.createElement("div");return p}),r=ae(n,1),i=r[0],o=Y(!1),a=de(hw),s=K(Gb),l=ae(s,2),c=l[0],u=l[1],d=a||(o.current?void 0:function(p){u(function(m){var g=[p].concat(Pe(m));return g})});function f(){i.parentElement||document.body.appendChild(i),o.current=!0}function h(){var p;(p=i.parentElement)===null||p===void 0||p.removeChild(i),o.current=!1}return Nt(function(){return t?a?a(f):f():h(),h},[t]),Nt(function(){c.length&&(c.forEach(function(p){return p()}),u(Gb))},[c]),[i,d]}function d4(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=e;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var i,o;if(t){var a=getComputedStyle(t);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";so(` #`.concat(e,`::-webkit-scrollbar { `).concat(u,` `).concat(d,` -}`),e)}catch(p){console.error(p),i=l,o=c}}document.body.appendChild(n);var f=t&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,h=t&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),jl(e),{width:f,height:h}}function f4(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:d4(t)}function h4(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var p4="rc-util-locker-".concat(Date.now()),Gb=0;function m4(t){var e=!!t,n=J(function(){return Gb+=1,"".concat(p4,"_").concat(Gb)}),r=ae(n,1),i=r[0];Nt(function(){if(e){var o=f4(document.body).width,a=h4();so(` +}`),e)}catch(p){console.error(p),i=l,o=c}}document.body.appendChild(n);var f=t&&i&&!isNaN(i)?i:n.offsetWidth-n.clientWidth,h=t&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),jl(e),{width:f,height:h}}function f4(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:d4(t)}function h4(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var p4="rc-util-locker-".concat(Date.now()),Yb=0;function m4(t){var e=!!t,n=K(function(){return Yb+=1,"".concat(p4,"_").concat(Yb)}),r=ae(n,1),i=r[0];Nt(function(){if(e){var o=f4(document.body).width,a=h4();so(` html body { overflow-y: hidden; `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",` -}`),i)}else jl(i);return function(){jl(i)}},[e,i])}var g4=!1;function v4(t){return g4}var Yb=function(e){return e===!1?!1:!dr()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},Kv=Se(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer;t.debug;var o=t.autoDestroy,a=o===void 0?!0:o,s=t.children,l=J(n),c=ae(l,2),u=c[0],d=c[1],f=u||n;be(function(){(a||n)&&d(n)},[n,a]);var h=J(function(){return Yb(i)}),p=ae(h,2),m=p[0],g=p[1];be(function(){var T=Yb(i);g(T??null)});var v=u4(f&&!m),O=ae(v,2),S=O[0],x=O[1],b=m??S;m4(r&&n&&dr()&&(b===S||b===document.body));var C=null;if(s&&vo(s)&&e){var $=s;C=$.ref}var w=go(C,e);if(!f||!dr()||m===void 0)return null;var P=b===!1||v4(),_=s;return e&&(_=Xn(s,{ref:w})),y(hw.Provider,{value:x},P?_:lf(_,b))}),pw=bt({});function O4(){var t=W({},gc);return t.useId}var Ub=0,Kb=O4();const Jv=Kb?function(e){var n=Kb();return e||n}:function(e){var n=J("ssr-id"),r=ae(n,2),i=r[0],o=r[1];return be(function(){var a=Ub;Ub+=1,o("rc_unique_".concat(a))},[]),e||i};function Jb(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function ey(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var i=t.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function b4(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=ey(i),n.top+=ey(i,!0),n}const y4=Ta(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var S4={width:0,height:0,overflow:"hidden",outline:"none"},x4={outline:"none"},mw=oe.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.title,a=t.ariaId,s=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,f=t.bodyStyle,h=t.bodyProps,p=t.modalRender,m=t.onMouseDown,g=t.onMouseUp,v=t.holderRef,O=t.visible,S=t.forceRender,x=t.width,b=t.height,C=t.classNames,$=t.styles,w=oe.useContext(pw),P=w.panel,_=go(v,P),T=U(),R=U();oe.useImperativeHandle(e,function(){return{focus:function(){var H;(H=T.current)===null||H===void 0||H.focus({preventScroll:!0})},changeActive:function(H){var V=document,X=V.activeElement;H&&X===R.current?T.current.focus({preventScroll:!0}):!H&&X===T.current&&R.current.focus({preventScroll:!0})}}});var k={};x!==void 0&&(k.width=x),b!==void 0&&(k.height=b);var I=s?oe.createElement("div",{className:Z("".concat(n,"-footer"),C==null?void 0:C.footer),style:W({},$==null?void 0:$.footer)},s):null,Q=o?oe.createElement("div",{className:Z("".concat(n,"-header"),C==null?void 0:C.header),style:W({},$==null?void 0:$.header)},oe.createElement("div",{className:"".concat(n,"-title"),id:a},o)):null,M=ge(function(){return Je(l)==="object"&&l!==null?l:l?{closeIcon:c??oe.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),E=$i(M,!0),N=Je(l)==="object"&&l.disabled,z=l?oe.createElement("button",Ce({type:"button",onClick:u,"aria-label":"Close"},E,{className:"".concat(n,"-close"),disabled:N}),M.closeIcon):null,L=oe.createElement("div",{className:Z("".concat(n,"-content"),C==null?void 0:C.content),style:$==null?void 0:$.content},z,Q,oe.createElement("div",Ce({className:Z("".concat(n,"-body"),C==null?void 0:C.body),style:W(W({},f),$==null?void 0:$.body)},h),d),I);return oe.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?a:null,"aria-modal":"true",ref:_,style:W(W({},i),k),className:Z(n,r),onMouseDown:m,onMouseUp:g},oe.createElement("div",{ref:T,tabIndex:0,style:x4},oe.createElement(y4,{shouldUpdate:O||S},p?p(L):L)),oe.createElement("div",{tabIndex:0,ref:R,style:S4}))}),gw=Se(function(t,e){var n=t.prefixCls,r=t.title,i=t.style,o=t.className,a=t.visible,s=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,f=t.mousePosition,h=U(),p=J(),m=ae(p,2),g=m[0],v=m[1],O={};g&&(O.transformOrigin=g);function S(){var x=b4(h.current);v(f&&(f.x||f.y)?"".concat(f.x-x.left,"px ").concat(f.y-x.top,"px"):"")}return y(pi,{visible:a,onVisibleChanged:d,onAppearPrepare:S,onEnterPrepare:S,forceRender:s,motionName:c,removeOnLeave:l,ref:h},function(x,b){var C=x.className,$=x.style;return y(mw,Ce({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:b,style:W(W(W({},$),i),O),className:Z(o,C)}))})});gw.displayName="Content";var C4=function(e){var n=e.prefixCls,r=e.style,i=e.visible,o=e.maskProps,a=e.motionName,s=e.className;return y(pi,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return y("div",Ce({ref:c,style:W(W({},d),r),className:Z("".concat(n,"-mask"),u,s)},o))})},$4=function(e){var n=e.prefixCls,r=n===void 0?"rc-dialog":n,i=e.zIndex,o=e.visible,a=o===void 0?!1:o,s=e.keyboard,l=s===void 0?!0:s,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,f=e.wrapClassName,h=e.wrapProps,p=e.onClose,m=e.afterOpenChange,g=e.afterClose,v=e.transitionName,O=e.animation,S=e.closable,x=S===void 0?!0:S,b=e.mask,C=b===void 0?!0:b,$=e.maskTransitionName,w=e.maskAnimation,P=e.maskClosable,_=P===void 0?!0:P,T=e.maskStyle,R=e.maskProps,k=e.rootClassName,I=e.classNames,Q=e.styles,M=U(),E=U(),N=U(),z=J(a),L=ae(z,2),F=L[0],H=L[1],V=Jv();function X(){Yp(E.current,document.activeElement)||(M.current=document.activeElement)}function B(){if(!Yp(E.current,document.activeElement)){var j;(j=N.current)===null||j===void 0||j.focus()}}function G(j){if(j)B();else{if(H(!1),C&&M.current&&u){try{M.current.focus({preventScroll:!0})}catch{}M.current=null}F&&(g==null||g())}m==null||m(j)}function se(j){p==null||p(j)}var re=U(!1),le=U(),me=function(){clearTimeout(le.current),re.current=!0},ie=function(){le.current=setTimeout(function(){re.current=!1})},ne=null;_&&(ne=function(ee){re.current?re.current=!1:E.current===ee.target&&se(ee)});function ue(j){if(l&&j.keyCode===je.ESC){j.stopPropagation(),se(j);return}a&&j.keyCode===je.TAB&&N.current.changeActive(!j.shiftKey)}be(function(){a&&(H(!0),X())},[a]),be(function(){return function(){clearTimeout(le.current)}},[]);var de=W(W(W({zIndex:i},d),Q==null?void 0:Q.wrapper),{},{display:F?null:"none"});return y("div",Ce({className:Z("".concat(r,"-root"),k)},$i(e,{data:!0})),y(C4,{prefixCls:r,visible:C&&a,motionName:Jb(r,$,w),style:W(W({zIndex:i},T),Q==null?void 0:Q.mask),maskProps:R,className:I==null?void 0:I.mask}),y("div",Ce({tabIndex:-1,onKeyDown:ue,className:Z("".concat(r,"-wrap"),f,I==null?void 0:I.wrapper),ref:E,onClick:ne,style:de},h),y(gw,Ce({},e,{onMouseDown:me,onMouseUp:ie,ref:N,closable:x,ariaId:V,prefixCls:r,visible:a&&F,onClose:se,onVisibleChanged:G,motionName:Jb(r,v,O)}))))},vw=function(e){var n=e.visible,r=e.getContainer,i=e.forceRender,o=e.destroyOnClose,a=o===void 0?!1:o,s=e.afterClose,l=e.panelRef,c=J(n),u=ae(c,2),d=u[0],f=u[1],h=ge(function(){return{panel:l}},[l]);return be(function(){n&&f(!0)},[n]),!i&&a&&!d?null:y(pw.Provider,{value:h},y(Kv,{open:n||i||d,autoDestroy:!1,getContainer:r,autoLock:n||d},y($4,Ce({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};vw.displayName="Dialog";var aa="RC_FORM_INTERNAL_HOOKS",tn=function(){tr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},ya=bt({getFieldValue:tn,getFieldsValue:tn,getFieldError:tn,getFieldWarning:tn,getFieldsError:tn,isFieldsTouched:tn,isFieldTouched:tn,isFieldValidating:tn,isFieldsValidating:tn,resetFields:tn,setFields:tn,setFieldValue:tn,setFieldsValue:tn,validateFields:tn,submit:tn,getInternalHooks:function(){return tn(),{dispatch:tn,initEntityValue:tn,registerField:tn,useSubscribe:tn,setInitialValues:tn,destroyForm:tn,setCallbacks:tn,registerWatch:tn,getFields:tn,setValidateMessages:tn,setPreserve:tn,getInitialValue:tn}}}),Hl=bt(null);function _m(t){return t==null?[]:Array.isArray(t)?t:[t]}function w4(t){return t&&!!t._init}function Tm(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var km=Tm();function P4(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function _4(t,e,n){if(yf())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&zl(i,n.prototype),i}function Rm(t){var e=typeof Map=="function"?new Map:void 0;return Rm=function(r){if(r===null||!P4(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return _4(r,arguments,ma(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zl(i,r)},Rm(t)}var T4=/%[sdj%]/g,k4=function(){};function Im(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function Yr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function R4(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Wn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||R4(e)&&typeof t=="string"&&!t)}function I4(t,e,n){var r=[],i=0,o=t.length;function a(s){r.push.apply(r,$e(s||[])),i++,i===o&&n(r)}t.forEach(function(s){e(s,a)})}function ty(t,e,n){var r=0,i=t.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,se.max?i.push(Yr(o.messages[d].max,e.fullField,e.max)):s&&l&&(ue.max)&&i.push(Yr(o.messages[d].range,e.fullField,e.min,e.max))},Ow=function(e,n,r,i,o,a){e.required&&(!r.hasOwnProperty(e.field)||Wn(n,a||e.type))&&i.push(Yr(o.messages.required,e.fullField))},ru;const j4=function(){if(ru)return ru;var t="[a-fA-F\\d:]",e=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function(C){return C&&C.exact?s:new RegExp("(?:".concat(e(C)).concat(n).concat(e(C),")|(?:").concat(e(C)).concat(a).concat(e(C),")"),"g")};u.v4=function(b){return b&&b.exact?l:new RegExp("".concat(e(b)).concat(n).concat(e(b)),"g")},u.v6=function(b){return b&&b.exact?c:new RegExp("".concat(e(b)).concat(a).concat(e(b)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",h=u.v4().source,p=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",v="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",O="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',x="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(h,"|").concat(p,"|").concat(m).concat(g).concat(v,")").concat(O).concat(S);return ru=new RegExp("(?:^".concat(x,"$)"),"i"),ru};var oy={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},dl={integer:function(e){return dl.number(e)&&parseInt(e,10)===e},float:function(e){return dl.number(e)&&!dl.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return Je(e)==="object"&&!dl.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(oy.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(j4())},hex:function(e){return typeof e=="string"&&!!e.match(oy.hex)}},D4=function(e,n,r,i,o){if(e.required&&n===void 0){Ow(e,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?dl[s](n)||i.push(Yr(o.messages.types[s],e.fullField,e.type)):s&&Je(n)!==e.type&&i.push(Yr(o.messages.types[s],e.fullField,e.type))},B4=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Yr(o.messages.whitespace,e.fullField))};const Et={required:Ow,whitespace:B4,type:D4,range:L4,enum:N4,pattern:z4};var W4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o)}r(a)},F4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();Et.required(e,n,i,a,o,"array"),n!=null&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},V4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},H4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"date")&&!e.required)return r();if(Et.required(e,n,i,a,o),!Wn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Et.type(e,l,i,a,o),l&&Et.range(e,l.getTime(),i,a,o)}}r(a)},X4="enum",Z4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et[X4](e,n,i,a,o)}r(a)},q4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},G4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},Y4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},U4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},K4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},J4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"string")&&!e.required)return r();Et.required(e,n,i,a,o),Wn(n,"string")||Et.pattern(e,n,i,a,o)}r(a)},e3=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),Wn(n)||Et.type(e,n,i,a,o)}r(a)},t3=function(e,n,r,i,o){var a=[],s=Array.isArray(n)?"array":Je(n);Et.required(e,n,i,a,o,s),r(a)},n3=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"string")&&!e.required)return r();Et.required(e,n,i,a,o,"string"),Wn(n,"string")||(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o),Et.pattern(e,n,i,a,o),e.whitespace===!0&&Et.whitespace(e,n,i,a,o))}r(a)},zh=function(e,n,r,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(Wn(n,a)&&!e.required)return r();Et.required(e,n,i,s,o,a),Wn(n,a)||Et.type(e,n,i,s,o)}r(s)};const xl={string:n3,method:Y4,number:U4,boolean:V4,regexp:e3,integer:G4,float:q4,array:F4,object:K4,enum:Z4,pattern:J4,date:H4,url:zh,hex:zh,email:zh,required:t3,any:W4};var wc=function(){function t(e){Mn(this,t),D(this,"rules",null),D(this,"_messages",km),this.define(e)}return En(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(Je(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=iy(Tm(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=i,l=o;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(p){var m=[],g={};function v(S){if(Array.isArray(S)){var x;m=(x=m).concat.apply(x,$e(S))}else m.push(S)}for(var O=0;O0&&arguments[0]!==void 0?arguments[0]:[],w=Array.isArray($)?$:[$];!s.suppressWarning&&w.length&&t.warning("async-validator:",w),w.length&&g.message!==void 0&&(w=[].concat(g.message));var P=w.map(ry(g,a));if(s.first&&P.length)return h[g.field]=1,m(P);if(!v)m(P);else{if(g.required&&!p.value)return g.message!==void 0?P=[].concat(g.message).map(ry(g,a)):s.error&&(P=[s.error(g,Yr(s.messages.required,g.field))]),m(P);var _={};g.defaultField&&Object.keys(p.value).map(function(k){_[k]=g.defaultField}),_=W(W({},_),p.rule.fields);var T={};Object.keys(_).forEach(function(k){var I=_[k],Q=Array.isArray(I)?I:[I];T[k]=Q.map(O.bind(null,k))});var R=new t(T);R.messages(s.messages),p.rule.options&&(p.rule.options.messages=s.messages,p.rule.options.error=s.error),R.validate(p.value,p.rule.options||s,function(k){var I=[];P&&P.length&&I.push.apply(I,$e(P)),k&&k.length&&I.push.apply(I,$e(k)),m(I.length?I:null)})}}var x;if(g.asyncValidator)x=g.asyncValidator(g,p.value,S,p.source,s);else if(g.validator){try{x=g.validator(g,p.value,S,p.source,s)}catch($){var b,C;(b=(C=console).error)===null||b===void 0||b.call(C,$),s.suppressValidatorError||setTimeout(function(){throw $},0),S($.message)}x===!0?S():x===!1?S(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):x instanceof Array?S(x):x instanceof Error&&S(x.message)}x&&x.then&&x.then(function(){return S()},function($){return S($)})},function(p){c(p)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!xl.hasOwnProperty(n.type))throw new Error(Yr("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?xl.required:xl[this.getType(n)]||void 0}}]),t}();D(wc,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");xl[e]=n});D(wc,"warning",k4);D(wc,"messages",km);D(wc,"validators",xl);var Fr="'${name}' is not a valid ${type}",bw={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Fr,method:Fr,array:Fr,object:Fr,number:Fr,date:Fr,boolean:Fr,integer:Fr,float:Fr,regexp:Fr,email:Fr,url:Fr,hex:Fr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},ay=wc;function r3(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var sy="CODE_LOGIC_ERROR";function Mm(t,e,n,r,i){return Em.apply(this,arguments)}function Em(){return Em=ka(hr().mark(function t(e,n,r,i,o){var a,s,l,c,u,d,f,h,p;return hr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=W({},r),delete a.ruleIndex,ay.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(v){return console.error(v),Promise.reject(sy)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new ay(D({},e,[a])),u=Ga(bw,i.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(D({},e,n),W({},i)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(v,O){var S=v.message,x=S===sy?u.default:S;return Kt(x)?Xn(x,{key:"error_".concat(O)}):x}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(v,O){return Mm("".concat(e,".").concat(O),v,l,i,o)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(v,O){return[].concat($e(v),$e(O))},[]));case 23:return h=W(W({},r),{},{name:e,enum:(r.enum||[]).join(", ")},o),p=d.map(function(v){return typeof v=="string"?r3(v,h):v}),g.abrupt("return",p);case 26:case"end":return g.stop()}},t,null,[[10,15]])})),Em.apply(this,arguments)}function i3(t,e,n,r,i,o){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,h=W(W({},u),{},{ruleIndex:d});return f&&(h.validator=function(p,m,g){var v=!1,O=function(){for(var b=arguments.length,C=new Array(b),$=0;$2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return yw(e,r,n)})}function yw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,i){return t[i]===r})}function s3(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||Je(t)!=="object"||Je(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),i=new Set([].concat(n,r));return $e(i).every(function(o){var a=t[o],s=e[o];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function l3(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&Je(e.target)==="object"&&t in e.target?e.target[t]:e}function cy(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var i=t[e],o=e-n;return o>0?[].concat($e(t.slice(0,n)),[i],$e(t.slice(n,e)),$e(t.slice(e+1,r))):o<0?[].concat($e(t.slice(0,e)),$e(t.slice(e+1,n+1)),[i],$e(t.slice(n+1,r))):t}var c3=["name"],ni=[];function Lh(t,e,n,r,i,o){return typeof t=="function"?t(e,n,"source"in o?{source:o.source}:{}):r!==i}var e0=function(t){Ui(n,t);var e=Oo(n);function n(r){var i;if(Mn(this,n),i=e.call(this,r),D(Pt(i),"state",{resetCount:0}),D(Pt(i),"cancelRegisterFunc",null),D(Pt(i),"mounted",!1),D(Pt(i),"touched",!1),D(Pt(i),"dirty",!1),D(Pt(i),"validatePromise",void 0),D(Pt(i),"prevValidating",void 0),D(Pt(i),"errors",ni),D(Pt(i),"warnings",ni),D(Pt(i),"cancelRegister",function(){var l=i.props,c=l.preserve,u=l.isListField,d=l.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,c,kn(d)),i.cancelRegisterFunc=null}),D(Pt(i),"getNamePath",function(){var l=i.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat($e(f),$e(c)):[]}),D(Pt(i),"getRules",function(){var l=i.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),D(Pt(i),"refresh",function(){i.mounted&&i.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),D(Pt(i),"metaCache",null),D(Pt(i),"triggerMetaEvent",function(l){var c=i.props.onMetaChange;if(c){var u=W(W({},i.getMeta()),{},{destroy:l});Dl(i.metaCache,u)||c(u),i.metaCache=u}else i.metaCache=null}),D(Pt(i),"onStoreChange",function(l,c,u){var d=i.props,f=d.shouldUpdate,h=d.dependencies,p=h===void 0?[]:h,m=d.onReset,g=u.store,v=i.getNamePath(),O=i.getValue(l),S=i.getValue(g),x=c&&is(c,v);switch(u.type==="valueUpdate"&&u.source==="external"&&!Dl(O,S)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=ni,i.warnings=ni,i.triggerMetaEvent()),u.type){case"reset":if(!c||x){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=ni,i.warnings=ni,i.triggerMetaEvent(),m==null||m(),i.refresh();return}break;case"remove":{if(f&&Lh(f,l,g,O,S,u)){i.reRender();return}break}case"setField":{var b=u.data;if(x){"touched"in b&&(i.touched=b.touched),"validating"in b&&!("originRCField"in b)&&(i.validatePromise=b.validating?Promise.resolve([]):null),"errors"in b&&(i.errors=b.errors||ni),"warnings"in b&&(i.warnings=b.warnings||ni),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in b&&is(c,v,!0)){i.reRender();return}if(f&&!v.length&&Lh(f,l,g,O,S,u)){i.reRender();return}break}case"dependenciesUpdate":{var C=p.map(kn);if(C.some(function($){return is(u.relatedFields,$)})){i.reRender();return}break}default:if(x||(!p.length||v.length||f)&&Lh(f,l,g,O,S,u)){i.reRender();return}break}f===!0&&i.reRender()}),D(Pt(i),"validateRules",function(l){var c=i.getNamePath(),u=i.getValue(),d=l||{},f=d.triggerName,h=d.validateOnly,p=h===void 0?!1:h,m=Promise.resolve().then(ka(hr().mark(function g(){var v,O,S,x,b,C,$;return hr().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(i.mounted){P.next=2;break}return P.abrupt("return",[]);case 2:if(v=i.props,O=v.validateFirst,S=O===void 0?!1:O,x=v.messageVariables,b=v.validateDebounce,C=i.getRules(),f&&(C=C.filter(function(_){return _}).filter(function(_){var T=_.validateTrigger;if(!T)return!0;var R=_m(T);return R.includes(f)})),!(b&&f)){P.next=10;break}return P.next=8,new Promise(function(_){setTimeout(_,b)});case 8:if(i.validatePromise===m){P.next=10;break}return P.abrupt("return",[]);case 10:return $=i3(c,u,C,l,S,x),$.catch(function(_){return _}).then(function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ni;if(i.validatePromise===m){var T;i.validatePromise=null;var R=[],k=[];(T=_.forEach)===null||T===void 0||T.call(_,function(I){var Q=I.rule.warningOnly,M=I.errors,E=M===void 0?ni:M;Q?k.push.apply(k,$e(E)):R.push.apply(R,$e(E))}),i.errors=R,i.warnings=k,i.triggerMetaEvent(),i.reRender()}}),P.abrupt("return",$);case 13:case"end":return P.stop()}},g)})));return p||(i.validatePromise=m,i.dirty=!0,i.errors=ni,i.warnings=ni,i.triggerMetaEvent(),i.reRender()),m}),D(Pt(i),"isFieldValidating",function(){return!!i.validatePromise}),D(Pt(i),"isFieldTouched",function(){return i.touched}),D(Pt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var l=i.props.fieldContext,c=l.getInternalHooks(aa),u=c.getInitialValue;return u(i.getNamePath())!==void 0}),D(Pt(i),"getErrors",function(){return i.errors}),D(Pt(i),"getWarnings",function(){return i.warnings}),D(Pt(i),"isListField",function(){return i.props.isListField}),D(Pt(i),"isList",function(){return i.props.isList}),D(Pt(i),"isPreserve",function(){return i.props.preserve}),D(Pt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var l={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return l}),D(Pt(i),"getOnlyChild",function(l){if(typeof l=="function"){var c=i.getMeta();return W(W({},i.getOnlyChild(l(i.getControlled(),c,i.props.fieldContext))),{},{isFunction:!0})}var u=nr(l);return u.length!==1||!Kt(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),D(Pt(i),"getValue",function(l){var c=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return si(l||c(!0),u)}),D(Pt(i),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.props,u=c.name,d=c.trigger,f=c.validateTrigger,h=c.getValueFromEvent,p=c.normalize,m=c.valuePropName,g=c.getValueProps,v=c.fieldContext,O=f!==void 0?f:v.validateTrigger,S=i.getNamePath(),x=v.getInternalHooks,b=v.getFieldsValue,C=x(aa),$=C.dispatch,w=i.getValue(),P=g||function(I){return D({},m,I)},_=l[d],T=u!==void 0?P(w):{},R=W(W({},l),T);R[d]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var I,Q=arguments.length,M=new Array(Q),E=0;E=0&&_<=T.length?(u.keys=[].concat($e(u.keys.slice(0,_)),[u.id],$e(u.keys.slice(_))),S([].concat($e(T.slice(0,_)),[P],$e(T.slice(_))))):(u.keys=[].concat($e(u.keys),[u.id]),S([].concat($e(T),[P]))),u.id+=1},remove:function(P){var _=b(),T=new Set(Array.isArray(P)?P:[P]);T.size<=0||(u.keys=u.keys.filter(function(R,k){return!T.has(k)}),S(_.filter(function(R,k){return!T.has(k)})))},move:function(P,_){if(P!==_){var T=b();P<0||P>=T.length||_<0||_>=T.length||(u.keys=cy(u.keys,P,_),S(cy(T,P,_)))}}},$=O||[];return Array.isArray($)||($=[]),r($.map(function(w,P){var _=u.keys[P];return _===void 0&&(u.keys[P]=u.id,_=u.keys[P],u.id+=1),{name:P,key:_,isListField:!0}}),C,g)})))}function u3(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(i,o){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(e&&o(r),i(r))})})}):Promise.resolve([])}var xw="__@field_split__";function jh(t){return t.map(function(e){return"".concat(Je(e),":").concat(e)}).join(xw)}var Qa=function(){function t(){Mn(this,t),D(this,"kvs",new Map)}return En(t,[{key:"set",value:function(n,r){this.kvs.set(jh(n),r)}},{key:"get",value:function(n){return this.kvs.get(jh(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(jh(n))}},{key:"map",value:function(n){return $e(this.kvs.entries()).map(function(r){var i=ae(r,2),o=i[0],a=i[1],s=o.split(xw);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=ae(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),t}(),d3=["name"],f3=En(function t(e){var n=this;Mn(this,t),D(this,"formHooked",!1),D(this,"forceRootUpdate",void 0),D(this,"subscribable",!0),D(this,"store",{}),D(this,"fieldEntities",[]),D(this,"initialValues",{}),D(this,"callbacks",{}),D(this,"validateMessages",null),D(this,"preserve",null),D(this,"lastValidatePromise",null),D(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),D(this,"getInternalHooks",function(r){return r===aa?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(tr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),D(this,"useSubscribe",function(r){n.subscribable=r}),D(this,"prevWithoutPreserves",null),D(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,a=Ga(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var l=s.key;a=ai(a,l,si(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),D(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new Qa;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),D(this,"getInitialValue",function(r){var i=si(n.initialValues,r);return r.length?Ga(i):i}),D(this,"setCallbacks",function(r){n.callbacks=r}),D(this,"setValidateMessages",function(r){n.validateMessages=r}),D(this,"setPreserve",function(r){n.preserve=r}),D(this,"watchList",[]),D(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),D(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(i,o,r)})}}),D(this,"timeoutId",null),D(this,"warningUnhooked",function(){}),D(this,"updateStore",function(r){n.store=r}),D(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),D(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new Qa;return n.getFieldEntities(r).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),D(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var a=kn(o);return i.get(a)||{INVALIDATE_NAME_PATH:kn(o)}})}),D(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,a,s;if(r===!0||Array.isArray(r)?(o=r,a=i):r&&Je(r)==="object"&&(s=r.strict,a=r.filter),o===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return l.forEach(function(u){var d,f,h="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var p,m;if((p=(m=u).isList)!==null&&p!==void 0&&p.call(m))return}else if(!o&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(h);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(h)}}),ly(n.store,c.map(kn))}),D(this,"getFieldValue",function(r){n.warningUnhooked();var i=kn(r);return si(n.store,i)}),D(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:kn(r[a]),errors:[],warnings:[]}})}),D(this,"getFieldError",function(r){n.warningUnhooked();var i=kn(r),o=n.getFieldsError([i])[0];return o.errors}),D(this,"getFieldWarning",function(r){n.warningUnhooked();var i=kn(r),o=n.getFieldsError([i])[0];return o.warnings}),D(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},i=new Qa,o=n.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=i.get(u)||new Set;d.add({entity:l,value:c}),i.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),h=n.getInitialValue(f);if(h!==void 0)tr(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var p=i.get(f);if(p&&p.size>1)tr(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(p){var m=n.getFieldValue(f),g=u.isListField();!g&&(!r.skipExist||m===void 0)&&n.updateStore(ai(n.store,f,$e(p)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=i.get(l);if(c){var u;(u=s).push.apply(u,$e($e(c).map(function(d){return d.entity})))}})):s=o,a(s)}),D(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Ga(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(kn);o.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(ai(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),D(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(a){var s=a.name,l=ut(a,d3),c=kn(s);o.push(c),"value"in l&&n.updateStore(ai(n.store,c,l.value)),n.notifyObservers(i,[c],{type:"setField",data:a})}),n.notifyWatch(o)}),D(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var a=o.getNamePath(),s=o.getMeta(),l=W(W({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return i}),D(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),a=si(n.store,o);a===void 0&&n.updateStore(ai(n.store,o,i))}}),D(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),D(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==c&&n.fieldEntities.every(function(d){return!yw(d.getNamePath(),i)})){var u=n.store;n.updateStore(ai(u,i,c,!0)),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}n.notifyWatch([i])}}),D(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),D(this,"notifyObservers",function(r,i,o){if(n.subscribable){var a=W(W({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,i,a)})}else n.forceRootUpdate()}),D(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat($e(o))}),o}),D(this,"updateValue",function(r,i){var o=kn(r),a=n.store;n.updateStore(ai(n.store,o,i)),n.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var s=n.triggerDependenciesUpdate(a,o),l=n.callbacks.onValuesChange;if(l){var c=ly(n.store,[o]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat($e(s)))}),D(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Ga(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),D(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),D(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],a=new Qa;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=kn(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!i.has(d)){i.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(o.push(f),l(f))}})};return s(r),o}),D(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var a=n.getFields();if(i){var s=new Qa;i.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return is(r,u)});l.length&&o(l,a)}}),D(this,"validateFields",function(r,i){n.warningUnhooked();var o,a;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,a=i):a=r;var s=!!o,l=s?o.map(kn):[],c=[],u=String(Date.now()),d=new Set,f=a||{},h=f.recursive,p=f.dirty;n.getFieldEntities(!0).forEach(function(O){if(s||l.push(O.getNamePath()),!(!O.props.rules||!O.props.rules.length)&&!(p&&!O.isFieldDirty())){var S=O.getNamePath();if(d.add(S.join(u)),!s||is(l,S,h)){var x=O.validateRules(W({validateMessages:W(W({},bw),n.validateMessages)},a));c.push(x.then(function(){return{name:S,errors:[],warnings:[]}}).catch(function(b){var C,$=[],w=[];return(C=b.forEach)===null||C===void 0||C.call(b,function(P){var _=P.rule.warningOnly,T=P.errors;_?w.push.apply(w,$e(T)):$.push.apply($,$e(T))}),$.length?Promise.reject({name:S,errors:$,warnings:w}):{name:S,errors:$,warnings:w}}))}}});var m=u3(c);n.lastValidatePromise=m,m.catch(function(O){return O}).then(function(O){var S=O.map(function(x){var b=x.name;return b});n.notifyObservers(n.store,S,{type:"validateFinish"}),n.triggerOnFieldsChange(S,O)});var g=m.then(function(){return n.lastValidatePromise===m?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(O){var S=O.filter(function(x){return x&&x.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:S,outOfDate:n.lastValidatePromise!==m})});g.catch(function(O){return O});var v=l.filter(function(O){return d.has(O.join(u))});return n.triggerOnFieldsChange(v),g}),D(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=e});function n0(t){var e=U(),n=J({}),r=ae(n,2),i=r[1];if(!e.current)if(t)e.current=t;else{var o=function(){i({})},a=new f3(o);e.current=a.getForm()}return[e.current]}var Nm=bt({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Cw=function(e){var n=e.validateMessages,r=e.onFormChange,i=e.onFormFinish,o=e.children,a=fe(Nm),s=U({});return y(Nm.Provider,{value:W(W({},a),{},{validateMessages:W(W({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){i&&i(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=W(W({},s.current),{},D({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=W({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},o)},h3=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],p3=function(e,n){var r=e.name,i=e.initialValues,o=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,f=e.validateTrigger,h=f===void 0?"onChange":f,p=e.onValuesChange,m=e.onFieldsChange,g=e.onFinish,v=e.onFinishFailed,O=e.clearOnDestroy,S=ut(e,h3),x=U(null),b=fe(Nm),C=n0(a),$=ae(C,1),w=$[0],P=w.getInternalHooks(aa),_=P.useSubscribe,T=P.setInitialValues,R=P.setCallbacks,k=P.setValidateMessages,I=P.setPreserve,Q=P.destroyForm;Yt(n,function(){return W(W({},w),{},{nativeElement:x.current})}),be(function(){return b.registerForm(r,w),function(){b.unregisterForm(r)}},[b,w,r]),k(W(W({},b.validateMessages),d)),R({onValuesChange:p,onFieldsChange:function(X){if(b.triggerFormChange(r,X),m){for(var B=arguments.length,G=new Array(B>1?B-1:0),se=1;se{}}),ww=bt(null),Pw=t=>{const e=cn(t,["prefixCls"]);return y(Cw,Object.assign({},e))},r0=bt({prefixCls:""}),Jr=bt({}),_w=({children:t,status:e,override:n})=>{const r=fe(Jr),i=ge(()=>{const o=Object.assign({},r);return n&&delete o.isFormItemInput,e&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[e,n,r]);return y(Jr.Provider,{value:i},t)},Tw=bt(void 0),bs=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let i=r;return n&&(i=oe.createElement(_w,{override:!0,status:!0},i)),e&&(i=oe.createElement(_A,null,i)),i};function dy(...t){const e={};return t.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})}),e}function $d(t){if(!t)return;const{closable:e,closeIcon:n}=t;return{closable:e,closeIcon:n}}function fy(t){const{closable:e,closeIcon:n}=t||{};return oe.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(r=Object.assign(Object.assign({},r),e)),r},[e,n])}const g3={};function kw(t,e,n=g3){const r=fy(t),i=fy(e),[o]=Ki("global",Zi.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,s=oe.useMemo(()=>Object.assign({closeIcon:oe.createElement(Vi,null)},n),[n]),l=oe.useMemo(()=>r===!1?!1:r?dy(s,i,r):i===!1?!1:i?dy(s,i):s.closable?s:!1,[r,i,s]);return oe.useMemo(()=>{var c,u;if(l===!1)return[!1,null,a,{}];const{closeIconRender:d}=s,{closeIcon:f}=l;let h=f;const p=$i(l,!0);return h!=null&&(d&&(h=d(f)),h=oe.isValidElement(h)?oe.cloneElement(h,Object.assign(Object.assign(Object.assign({},h.props),{"aria-label":(u=(c=h.props)===null||c===void 0?void 0:c["aria-label"])!==null&&u!==void 0?u:o.close}),p)):oe.createElement("span",Object.assign({"aria-label":o.close},p),h)),[!0,h,a,p]},[l,s])}var v3=function(e){if(dr()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1};function hy(t,e){return v3(t)}const O3=()=>dr()&&window.document.documentElement,Lf=t=>{const{prefixCls:e,className:n,style:r,size:i,shape:o}=t,a=Z({[`${e}-lg`]:i==="large",[`${e}-sm`]:i==="small"}),s=Z({[`${e}-circle`]:o==="circle",[`${e}-square`]:o==="square",[`${e}-round`]:o==="round"}),l=ge(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return y("span",{className:Z(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},b3=new _t("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),jf=t=>({height:t,lineHeight:q(t)}),os=t=>Object.assign({width:t},jf(t)),y3=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:b3,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Dh=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},jf(t)),S3=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},os(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},os(i)),[`${e}${e}-sm`]:Object.assign({},os(o))}},x3=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Dh(e,s)),[`${r}-lg`]:Object.assign({},Dh(i,s)),[`${r}-sm`]:Object.assign({},Dh(o,s))}},py=t=>Object.assign({width:t},jf(t)),C3=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:i,calc:o}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:i},py(o(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},py(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},Bh=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},Wh=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},jf(t)),$3=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},Wh(r,s))},Bh(t,r,n)),{[`${n}-lg`]:Object.assign({},Wh(i,s))}),Bh(t,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Wh(o,s))}),Bh(t,o,`${n}-sm`))},w3=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:h,borderRadius:p,titleHeight:m,blockRadius:g,paragraphLiHeight:v,controlHeightXS:O,paragraphMarginTop:S}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},os(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},os(c)),[`${n}-sm`]:Object.assign({},os(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:m,background:d,borderRadius:g,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:v,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:O}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${r}, ${i} > li`]:{borderRadius:p}}},[`${e}-with-avatar ${e}-content`]:{[r]:{marginBlockStart:h,[`+ ${i}`]:{marginBlockStart:S}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},$3(t)),S3(t)),x3(t)),C3(t)),[`${e}${e}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[` +}`),i)}else jl(i);return function(){jl(i)}},[e,i])}var g4=!1;function v4(t){return g4}var Ub=function(e){return e===!1?!1:!fr()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},Jv=ye(function(t,e){var n=t.open,r=t.autoLock,i=t.getContainer;t.debug;var o=t.autoDestroy,a=o===void 0?!0:o,s=t.children,l=K(n),c=ae(l,2),u=c[0],d=c[1],f=u||n;be(function(){(a||n)&&d(n)},[n,a]);var h=K(function(){return Ub(i)}),p=ae(h,2),m=p[0],g=p[1];be(function(){var T=Ub(i);g(T??null)});var v=u4(f&&!m),O=ae(v,2),S=O[0],C=O[1],b=m??S;m4(r&&n&&fr()&&(b===S||b===document.body));var x=null;if(s&&vo(s)&&e){var $=s;x=$.ref}var w=go(x,e);if(!f||!fr()||m===void 0)return null;var P=b===!1||v4(),_=s;return e&&(_=Zn(s,{ref:w})),y(hw.Provider,{value:C},P?_:uf(_,b))}),pw=yt({});function O4(){var t=W({},gc);return t.useId}var Kb=0,Jb=O4();const e0=Jb?function(e){var n=Jb();return e||n}:function(e){var n=K("ssr-id"),r=ae(n,2),i=r[0],o=r[1];return be(function(){var a=Kb;Kb+=1,o("rc_unique_".concat(a))},[]),e||i};function ey(t,e,n){var r=e;return!r&&n&&(r="".concat(t,"-").concat(n)),r}function ty(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if(typeof n!="number"){var i=t.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function b4(t){var e=t.getBoundingClientRect(),n={left:e.left,top:e.top},r=t.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=ty(i),n.top+=ty(i,!0),n}const y4=Ra(function(t){var e=t.children;return e},function(t,e){var n=e.shouldUpdate;return!n});var S4={width:0,height:0,overflow:"hidden",outline:"none"},x4={outline:"none"},mw=oe.forwardRef(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.title,a=t.ariaId,s=t.footer,l=t.closable,c=t.closeIcon,u=t.onClose,d=t.children,f=t.bodyStyle,h=t.bodyProps,p=t.modalRender,m=t.onMouseDown,g=t.onMouseUp,v=t.holderRef,O=t.visible,S=t.forceRender,C=t.width,b=t.height,x=t.classNames,$=t.styles,w=oe.useContext(pw),P=w.panel,_=go(v,P),T=Y(),k=Y();oe.useImperativeHandle(e,function(){return{focus:function(){var X;(X=T.current)===null||X===void 0||X.focus({preventScroll:!0})},changeActive:function(X){var F=document,H=F.activeElement;X&&H===k.current?T.current.focus({preventScroll:!0}):!X&&H===T.current&&k.current.focus({preventScroll:!0})}}});var R={};C!==void 0&&(R.width=C),b!==void 0&&(R.height=b);var I=s?oe.createElement("div",{className:Z("".concat(n,"-footer"),x==null?void 0:x.footer),style:W({},$==null?void 0:$.footer)},s):null,Q=o?oe.createElement("div",{className:Z("".concat(n,"-header"),x==null?void 0:x.header),style:W({},$==null?void 0:$.header)},oe.createElement("div",{className:"".concat(n,"-title"),id:a},o)):null,E=me(function(){return tt(l)==="object"&&l!==null?l:l?{closeIcon:c??oe.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),A=$i(E,!0),N=tt(l)==="object"&&l.disabled,L=l?oe.createElement("button",xe({type:"button",onClick:u,"aria-label":"Close"},A,{className:"".concat(n,"-close"),disabled:N}),E.closeIcon):null,z=oe.createElement("div",{className:Z("".concat(n,"-content"),x==null?void 0:x.content),style:$==null?void 0:$.content},L,Q,oe.createElement("div",xe({className:Z("".concat(n,"-body"),x==null?void 0:x.body),style:W(W({},f),$==null?void 0:$.body)},h),d),I);return oe.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?a:null,"aria-modal":"true",ref:_,style:W(W({},i),R),className:Z(n,r),onMouseDown:m,onMouseUp:g},oe.createElement("div",{ref:T,tabIndex:0,style:x4},oe.createElement(y4,{shouldUpdate:O||S},p?p(z):z)),oe.createElement("div",{tabIndex:0,ref:k,style:S4}))}),gw=ye(function(t,e){var n=t.prefixCls,r=t.title,i=t.style,o=t.className,a=t.visible,s=t.forceRender,l=t.destroyOnClose,c=t.motionName,u=t.ariaId,d=t.onVisibleChanged,f=t.mousePosition,h=Y(),p=K(),m=ae(p,2),g=m[0],v=m[1],O={};g&&(O.transformOrigin=g);function S(){var C=b4(h.current);v(f&&(f.x||f.y)?"".concat(f.x-C.left,"px ").concat(f.y-C.top,"px"):"")}return y(mi,{visible:a,onVisibleChanged:d,onAppearPrepare:S,onEnterPrepare:S,forceRender:s,motionName:c,removeOnLeave:l,ref:h},function(C,b){var x=C.className,$=C.style;return y(mw,xe({},t,{ref:e,title:r,ariaId:u,prefixCls:n,holderRef:b,style:W(W(W({},$),i),O),className:Z(o,x)}))})});gw.displayName="Content";var C4=function(e){var n=e.prefixCls,r=e.style,i=e.visible,o=e.maskProps,a=e.motionName,s=e.className;return y(mi,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return y("div",xe({ref:c,style:W(W({},d),r),className:Z("".concat(n,"-mask"),u,s)},o))})},$4=function(e){var n=e.prefixCls,r=n===void 0?"rc-dialog":n,i=e.zIndex,o=e.visible,a=o===void 0?!1:o,s=e.keyboard,l=s===void 0?!0:s,c=e.focusTriggerAfterClose,u=c===void 0?!0:c,d=e.wrapStyle,f=e.wrapClassName,h=e.wrapProps,p=e.onClose,m=e.afterOpenChange,g=e.afterClose,v=e.transitionName,O=e.animation,S=e.closable,C=S===void 0?!0:S,b=e.mask,x=b===void 0?!0:b,$=e.maskTransitionName,w=e.maskAnimation,P=e.maskClosable,_=P===void 0?!0:P,T=e.maskStyle,k=e.maskProps,R=e.rootClassName,I=e.classNames,Q=e.styles,E=Y(),A=Y(),N=Y(),L=K(a),z=ae(L,2),V=z[0],X=z[1],F=e0();function H(){Kp(A.current,document.activeElement)||(E.current=document.activeElement)}function B(){if(!Kp(A.current,document.activeElement)){var j;(j=N.current)===null||j===void 0||j.focus()}}function G(j){if(j)B();else{if(X(!1),x&&E.current&&u){try{E.current.focus({preventScroll:!0})}catch{}E.current=null}V&&(g==null||g())}m==null||m(j)}function se(j){p==null||p(j)}var ie=Y(!1),le=Y(),pe=function(){clearTimeout(le.current),ie.current=!0},ne=function(){le.current=setTimeout(function(){ie.current=!1})},ee=null;_&&(ee=function(J){ie.current?ie.current=!1:A.current===J.target&&se(J)});function ce(j){if(l&&j.keyCode===Ve.ESC){j.stopPropagation(),se(j);return}a&&j.keyCode===Ve.TAB&&N.current.changeActive(!j.shiftKey)}be(function(){a&&(X(!0),H())},[a]),be(function(){return function(){clearTimeout(le.current)}},[]);var ue=W(W(W({zIndex:i},d),Q==null?void 0:Q.wrapper),{},{display:V?null:"none"});return y("div",xe({className:Z("".concat(r,"-root"),R)},$i(e,{data:!0})),y(C4,{prefixCls:r,visible:x&&a,motionName:ey(r,$,w),style:W(W({zIndex:i},T),Q==null?void 0:Q.mask),maskProps:k,className:I==null?void 0:I.mask}),y("div",xe({tabIndex:-1,onKeyDown:ce,className:Z("".concat(r,"-wrap"),f,I==null?void 0:I.wrapper),ref:A,onClick:ee,style:ue},h),y(gw,xe({},e,{onMouseDown:pe,onMouseUp:ne,ref:N,closable:C,ariaId:F,prefixCls:r,visible:a&&V,onClose:se,onVisibleChanged:G,motionName:ey(r,v,O)}))))},vw=function(e){var n=e.visible,r=e.getContainer,i=e.forceRender,o=e.destroyOnClose,a=o===void 0?!1:o,s=e.afterClose,l=e.panelRef,c=K(n),u=ae(c,2),d=u[0],f=u[1],h=me(function(){return{panel:l}},[l]);return be(function(){n&&f(!0)},[n]),!i&&a&&!d?null:y(pw.Provider,{value:h},y(Jv,{open:n||i||d,autoDestroy:!1,getContainer:r,autoLock:n||d},y($4,xe({},e,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};vw.displayName="Dialog";var sa="RC_FORM_INTERNAL_HOOKS",nn=function(){nr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},xa=yt({getFieldValue:nn,getFieldsValue:nn,getFieldError:nn,getFieldWarning:nn,getFieldsError:nn,isFieldsTouched:nn,isFieldTouched:nn,isFieldValidating:nn,isFieldsValidating:nn,resetFields:nn,setFields:nn,setFieldValue:nn,setFieldsValue:nn,validateFields:nn,submit:nn,getInternalHooks:function(){return nn(),{dispatch:nn,initEntityValue:nn,registerField:nn,useSubscribe:nn,setInitialValues:nn,destroyForm:nn,setCallbacks:nn,registerWatch:nn,getFields:nn,setValidateMessages:nn,setPreserve:nn,getInitialValue:nn}}}),Hl=yt(null);function km(t){return t==null?[]:Array.isArray(t)?t:[t]}function w4(t){return t&&!!t._init}function Rm(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Im=Rm();function P4(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function _4(t,e,n){if(xf())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&zl(i,n.prototype),i}function Mm(t){var e=typeof Map=="function"?new Map:void 0;return Mm=function(r){if(r===null||!P4(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return _4(r,arguments,va(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zl(i,r)},Mm(t)}var T4=/%[sdj%]/g,k4=function(){};function Em(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function Ur(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function R4(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Wn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||R4(e)&&typeof t=="string"&&!t)}function I4(t,e,n){var r=[],i=0,o=t.length;function a(s){r.push.apply(r,Pe(s||[])),i++,i===o&&n(r)}t.forEach(function(s){e(s,a)})}function ny(t,e,n){var r=0,i=t.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,se.max?i.push(Ur(o.messages[d].max,e.fullField,e.max)):s&&l&&(ue.max)&&i.push(Ur(o.messages[d].range,e.fullField,e.min,e.max))},Ow=function(e,n,r,i,o,a){e.required&&(!r.hasOwnProperty(e.field)||Wn(n,a||e.type))&&i.push(Ur(o.messages.required,e.fullField))},ru;const j4=function(){if(ru)return ru;var t="[a-fA-F\\d:]",e=function(x){return x&&x.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function(x){return x&&x.exact?s:new RegExp("(?:".concat(e(x)).concat(n).concat(e(x),")|(?:").concat(e(x)).concat(a).concat(e(x),")"),"g")};u.v4=function(b){return b&&b.exact?l:new RegExp("".concat(e(b)).concat(n).concat(e(b)),"g")},u.v6=function(b){return b&&b.exact?c:new RegExp("".concat(e(b)).concat(a).concat(e(b)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",h=u.v4().source,p=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",v="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",O="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',C="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(h,"|").concat(p,"|").concat(m).concat(g).concat(v,")").concat(O).concat(S);return ru=new RegExp("(?:^".concat(C,"$)"),"i"),ru};var ay={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},dl={integer:function(e){return dl.number(e)&&parseInt(e,10)===e},float:function(e){return dl.number(e)&&!dl.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return tt(e)==="object"&&!dl.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(ay.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(j4())},hex:function(e){return typeof e=="string"&&!!e.match(ay.hex)}},D4=function(e,n,r,i,o){if(e.required&&n===void 0){Ow(e,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?dl[s](n)||i.push(Ur(o.messages.types[s],e.fullField,e.type)):s&&tt(n)!==e.type&&i.push(Ur(o.messages.types[s],e.fullField,e.type))},B4=function(e,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(Ur(o.messages.whitespace,e.fullField))};const Et={required:Ow,whitespace:B4,type:D4,range:L4,enum:N4,pattern:z4};var W4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o)}r(a)},F4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();Et.required(e,n,i,a,o,"array"),n!=null&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},V4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},H4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"date")&&!e.required)return r();if(Et.required(e,n,i,a,o),!Wn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Et.type(e,l,i,a,o),l&&Et.range(e,l.getTime(),i,a,o)}}r(a)},X4="enum",Z4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et[X4](e,n,i,a,o)}r(a)},q4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},G4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},Y4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},U4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o))}r(a)},K4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),n!==void 0&&Et.type(e,n,i,a,o)}r(a)},J4=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"string")&&!e.required)return r();Et.required(e,n,i,a,o),Wn(n,"string")||Et.pattern(e,n,i,a,o)}r(a)},e3=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n)&&!e.required)return r();Et.required(e,n,i,a,o),Wn(n)||Et.type(e,n,i,a,o)}r(a)},t3=function(e,n,r,i,o){var a=[],s=Array.isArray(n)?"array":tt(n);Et.required(e,n,i,a,o,s),r(a)},n3=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(Wn(n,"string")&&!e.required)return r();Et.required(e,n,i,a,o,"string"),Wn(n,"string")||(Et.type(e,n,i,a,o),Et.range(e,n,i,a,o),Et.pattern(e,n,i,a,o),e.whitespace===!0&&Et.whitespace(e,n,i,a,o))}r(a)},jh=function(e,n,r,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(Wn(n,a)&&!e.required)return r();Et.required(e,n,i,s,o,a),Wn(n,a)||Et.type(e,n,i,s,o)}r(s)};const xl={string:n3,method:Y4,number:U4,boolean:V4,regexp:e3,integer:G4,float:q4,array:F4,object:K4,enum:Z4,pattern:J4,date:H4,url:jh,hex:jh,email:jh,required:t3,any:W4};var wc=function(){function t(e){En(this,t),D(this,"rules",null),D(this,"_messages",Im),this.define(e)}return An(t,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(tt(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(i){var o=n[i];r.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(n){return n&&(this._messages=oy(Rm(),n)),this._messages}},{key:"validate",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=i,l=o;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(p){var m=[],g={};function v(S){if(Array.isArray(S)){var C;m=(C=m).concat.apply(C,Pe(S))}else m.push(S)}for(var O=0;O0&&arguments[0]!==void 0?arguments[0]:[],w=Array.isArray($)?$:[$];!s.suppressWarning&&w.length&&t.warning("async-validator:",w),w.length&&g.message!==void 0&&(w=[].concat(g.message));var P=w.map(iy(g,a));if(s.first&&P.length)return h[g.field]=1,m(P);if(!v)m(P);else{if(g.required&&!p.value)return g.message!==void 0?P=[].concat(g.message).map(iy(g,a)):s.error&&(P=[s.error(g,Ur(s.messages.required,g.field))]),m(P);var _={};g.defaultField&&Object.keys(p.value).map(function(R){_[R]=g.defaultField}),_=W(W({},_),p.rule.fields);var T={};Object.keys(_).forEach(function(R){var I=_[R],Q=Array.isArray(I)?I:[I];T[R]=Q.map(O.bind(null,R))});var k=new t(T);k.messages(s.messages),p.rule.options&&(p.rule.options.messages=s.messages,p.rule.options.error=s.error),k.validate(p.value,p.rule.options||s,function(R){var I=[];P&&P.length&&I.push.apply(I,Pe(P)),R&&R.length&&I.push.apply(I,Pe(R)),m(I.length?I:null)})}}var C;if(g.asyncValidator)C=g.asyncValidator(g,p.value,S,p.source,s);else if(g.validator){try{C=g.validator(g,p.value,S,p.source,s)}catch($){var b,x;(b=(x=console).error)===null||b===void 0||b.call(x,$),s.suppressValidatorError||setTimeout(function(){throw $},0),S($.message)}C===!0?S():C===!1?S(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):C instanceof Array?S(C):C instanceof Error&&S(C.message)}C&&C.then&&C.then(function(){return S()},function($){return S($)})},function(p){c(p)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!xl.hasOwnProperty(n.type))throw new Error(Ur("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),i=r.indexOf("message");return i!==-1&&r.splice(i,1),r.length===1&&r[0]==="required"?xl.required:xl[this.getType(n)]||void 0}}]),t}();D(wc,"register",function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");xl[e]=n});D(wc,"warning",k4);D(wc,"messages",Im);D(wc,"validators",xl);var Fr="'${name}' is not a valid ${type}",bw={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Fr,method:Fr,array:Fr,object:Fr,number:Fr,date:Fr,boolean:Fr,integer:Fr,float:Fr,regexp:Fr,email:Fr,url:Fr,hex:Fr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},sy=wc;function r3(t,e){return t.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return e[r]})}var ly="CODE_LOGIC_ERROR";function Am(t,e,n,r,i){return Qm.apply(this,arguments)}function Qm(){return Qm=Ia(pr().mark(function t(e,n,r,i,o){var a,s,l,c,u,d,f,h,p;return pr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=W({},r),delete a.ruleIndex,sy.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(v){return console.error(v),Promise.reject(ly)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new sy(D({},e,[a])),u=Ua(bw,i.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(D({},e,n),W({},i)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(v,O){var S=v.message,C=S===ly?u.default:S;return Jt(C)?Zn(C,{key:"error_".concat(O)}):C}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(v,O){return Am("".concat(e,".").concat(O),v,l,i,o)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(v,O){return[].concat(Pe(v),Pe(O))},[]));case 23:return h=W(W({},r),{},{name:e,enum:(r.enum||[]).join(", ")},o),p=d.map(function(v){return typeof v=="string"?r3(v,h):v}),g.abrupt("return",p);case 26:case"end":return g.stop()}},t,null,[[10,15]])})),Qm.apply(this,arguments)}function i3(t,e,n,r,i,o){var a=t.join("."),s=n.map(function(u,d){var f=u.validator,h=W(W({},u),{},{ruleIndex:d});return f&&(h.validator=function(p,m,g){var v=!1,O=function(){for(var b=arguments.length,x=new Array(b),$=0;$2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(r){return yw(e,r,n)})}function yw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!n&&t.length!==e.length?!1:e.every(function(r,i){return t[i]===r})}function s3(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||tt(t)!=="object"||tt(e)!=="object")return!1;var n=Object.keys(t),r=Object.keys(e),i=new Set([].concat(n,r));return Pe(i).every(function(o){var a=t[o],s=e[o];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function l3(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&tt(e.target)==="object"&&t in e.target?e.target[t]:e}function uy(t,e,n){var r=t.length;if(e<0||e>=r||n<0||n>=r)return t;var i=t[e],o=e-n;return o>0?[].concat(Pe(t.slice(0,n)),[i],Pe(t.slice(n,e)),Pe(t.slice(e+1,r))):o<0?[].concat(Pe(t.slice(0,e)),Pe(t.slice(e+1,n+1)),[i],Pe(t.slice(n+1,r))):t}var c3=["name"],ri=[];function Dh(t,e,n,r,i,o){return typeof t=="function"?t(e,n,"source"in o?{source:o.source}:{}):r!==i}var t0=function(t){Ui(n,t);var e=Oo(n);function n(r){var i;if(En(this,n),i=e.call(this,r),D(Pt(i),"state",{resetCount:0}),D(Pt(i),"cancelRegisterFunc",null),D(Pt(i),"mounted",!1),D(Pt(i),"touched",!1),D(Pt(i),"dirty",!1),D(Pt(i),"validatePromise",void 0),D(Pt(i),"prevValidating",void 0),D(Pt(i),"errors",ri),D(Pt(i),"warnings",ri),D(Pt(i),"cancelRegister",function(){var l=i.props,c=l.preserve,u=l.isListField,d=l.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,c,kn(d)),i.cancelRegisterFunc=null}),D(Pt(i),"getNamePath",function(){var l=i.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat(Pe(f),Pe(c)):[]}),D(Pt(i),"getRules",function(){var l=i.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),D(Pt(i),"refresh",function(){i.mounted&&i.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),D(Pt(i),"metaCache",null),D(Pt(i),"triggerMetaEvent",function(l){var c=i.props.onMetaChange;if(c){var u=W(W({},i.getMeta()),{},{destroy:l});Dl(i.metaCache,u)||c(u),i.metaCache=u}else i.metaCache=null}),D(Pt(i),"onStoreChange",function(l,c,u){var d=i.props,f=d.shouldUpdate,h=d.dependencies,p=h===void 0?[]:h,m=d.onReset,g=u.store,v=i.getNamePath(),O=i.getValue(l),S=i.getValue(g),C=c&&os(c,v);switch(u.type==="valueUpdate"&&u.source==="external"&&!Dl(O,S)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=ri,i.warnings=ri,i.triggerMetaEvent()),u.type){case"reset":if(!c||C){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=ri,i.warnings=ri,i.triggerMetaEvent(),m==null||m(),i.refresh();return}break;case"remove":{if(f&&Dh(f,l,g,O,S,u)){i.reRender();return}break}case"setField":{var b=u.data;if(C){"touched"in b&&(i.touched=b.touched),"validating"in b&&!("originRCField"in b)&&(i.validatePromise=b.validating?Promise.resolve([]):null),"errors"in b&&(i.errors=b.errors||ri),"warnings"in b&&(i.warnings=b.warnings||ri),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in b&&os(c,v,!0)){i.reRender();return}if(f&&!v.length&&Dh(f,l,g,O,S,u)){i.reRender();return}break}case"dependenciesUpdate":{var x=p.map(kn);if(x.some(function($){return os(u.relatedFields,$)})){i.reRender();return}break}default:if(C||(!p.length||v.length||f)&&Dh(f,l,g,O,S,u)){i.reRender();return}break}f===!0&&i.reRender()}),D(Pt(i),"validateRules",function(l){var c=i.getNamePath(),u=i.getValue(),d=l||{},f=d.triggerName,h=d.validateOnly,p=h===void 0?!1:h,m=Promise.resolve().then(Ia(pr().mark(function g(){var v,O,S,C,b,x,$;return pr().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(i.mounted){P.next=2;break}return P.abrupt("return",[]);case 2:if(v=i.props,O=v.validateFirst,S=O===void 0?!1:O,C=v.messageVariables,b=v.validateDebounce,x=i.getRules(),f&&(x=x.filter(function(_){return _}).filter(function(_){var T=_.validateTrigger;if(!T)return!0;var k=km(T);return k.includes(f)})),!(b&&f)){P.next=10;break}return P.next=8,new Promise(function(_){setTimeout(_,b)});case 8:if(i.validatePromise===m){P.next=10;break}return P.abrupt("return",[]);case 10:return $=i3(c,u,x,l,S,C),$.catch(function(_){return _}).then(function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ri;if(i.validatePromise===m){var T;i.validatePromise=null;var k=[],R=[];(T=_.forEach)===null||T===void 0||T.call(_,function(I){var Q=I.rule.warningOnly,E=I.errors,A=E===void 0?ri:E;Q?R.push.apply(R,Pe(A)):k.push.apply(k,Pe(A))}),i.errors=k,i.warnings=R,i.triggerMetaEvent(),i.reRender()}}),P.abrupt("return",$);case 13:case"end":return P.stop()}},g)})));return p||(i.validatePromise=m,i.dirty=!0,i.errors=ri,i.warnings=ri,i.triggerMetaEvent(),i.reRender()),m}),D(Pt(i),"isFieldValidating",function(){return!!i.validatePromise}),D(Pt(i),"isFieldTouched",function(){return i.touched}),D(Pt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var l=i.props.fieldContext,c=l.getInternalHooks(sa),u=c.getInitialValue;return u(i.getNamePath())!==void 0}),D(Pt(i),"getErrors",function(){return i.errors}),D(Pt(i),"getWarnings",function(){return i.warnings}),D(Pt(i),"isListField",function(){return i.props.isListField}),D(Pt(i),"isList",function(){return i.props.isList}),D(Pt(i),"isPreserve",function(){return i.props.preserve}),D(Pt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var l={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return l}),D(Pt(i),"getOnlyChild",function(l){if(typeof l=="function"){var c=i.getMeta();return W(W({},i.getOnlyChild(l(i.getControlled(),c,i.props.fieldContext))),{},{isFunction:!0})}var u=rr(l);return u.length!==1||!Jt(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),D(Pt(i),"getValue",function(l){var c=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return li(l||c(!0),u)}),D(Pt(i),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.props,u=c.name,d=c.trigger,f=c.validateTrigger,h=c.getValueFromEvent,p=c.normalize,m=c.valuePropName,g=c.getValueProps,v=c.fieldContext,O=f!==void 0?f:v.validateTrigger,S=i.getNamePath(),C=v.getInternalHooks,b=v.getFieldsValue,x=C(sa),$=x.dispatch,w=i.getValue(),P=g||function(I){return D({},m,I)},_=l[d],T=u!==void 0?P(w):{},k=W(W({},l),T);k[d]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var I,Q=arguments.length,E=new Array(Q),A=0;A=0&&_<=T.length?(u.keys=[].concat(Pe(u.keys.slice(0,_)),[u.id],Pe(u.keys.slice(_))),S([].concat(Pe(T.slice(0,_)),[P],Pe(T.slice(_))))):(u.keys=[].concat(Pe(u.keys),[u.id]),S([].concat(Pe(T),[P]))),u.id+=1},remove:function(P){var _=b(),T=new Set(Array.isArray(P)?P:[P]);T.size<=0||(u.keys=u.keys.filter(function(k,R){return!T.has(R)}),S(_.filter(function(k,R){return!T.has(R)})))},move:function(P,_){if(P!==_){var T=b();P<0||P>=T.length||_<0||_>=T.length||(u.keys=uy(u.keys,P,_),S(uy(T,P,_)))}}},$=O||[];return Array.isArray($)||($=[]),r($.map(function(w,P){var _=u.keys[P];return _===void 0&&(u.keys[P]=u.id,_=u.keys[P],u.id+=1),{name:P,key:_,isListField:!0}}),x,g)})))}function u3(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(i,o){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(e&&o(r),i(r))})})}):Promise.resolve([])}var xw="__@field_split__";function Bh(t){return t.map(function(e){return"".concat(tt(e),":").concat(e)}).join(xw)}var za=function(){function t(){En(this,t),D(this,"kvs",new Map)}return An(t,[{key:"set",value:function(n,r){this.kvs.set(Bh(n),r)}},{key:"get",value:function(n){return this.kvs.get(Bh(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(Bh(n))}},{key:"map",value:function(n){return Pe(this.kvs.entries()).map(function(r){var i=ae(r,2),o=i[0],a=i[1],s=o.split(xw);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=ae(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),t}(),d3=["name"],f3=An(function t(e){var n=this;En(this,t),D(this,"formHooked",!1),D(this,"forceRootUpdate",void 0),D(this,"subscribable",!0),D(this,"store",{}),D(this,"fieldEntities",[]),D(this,"initialValues",{}),D(this,"callbacks",{}),D(this,"validateMessages",null),D(this,"preserve",null),D(this,"lastValidatePromise",null),D(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),D(this,"getInternalHooks",function(r){return r===sa?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(nr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),D(this,"useSubscribe",function(r){n.subscribable=r}),D(this,"prevWithoutPreserves",null),D(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,a=Ua(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var l=s.key;a=ai(a,l,li(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),D(this,"destroyForm",function(r){if(r)n.updateStore({});else{var i=new za;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=i}}),D(this,"getInitialValue",function(r){var i=li(n.initialValues,r);return r.length?Ua(i):i}),D(this,"setCallbacks",function(r){n.callbacks=r}),D(this,"setValidateMessages",function(r){n.validateMessages=r}),D(this,"setPreserve",function(r){n.preserve=r}),D(this,"watchList",[]),D(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),D(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(i,o,r)})}}),D(this,"timeoutId",null),D(this,"warningUnhooked",function(){}),D(this,"updateStore",function(r){n.store=r}),D(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),D(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new za;return n.getFieldEntities(r).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),D(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var a=kn(o);return i.get(a)||{INVALIDATE_NAME_PATH:kn(o)}})}),D(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,a,s;if(r===!0||Array.isArray(r)?(o=r,a=i):r&&tt(r)==="object"&&(s=r.strict,a=r.filter),o===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return l.forEach(function(u){var d,f,h="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var p,m;if((p=(m=u).isList)!==null&&p!==void 0&&p.call(m))return}else if(!o&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(h);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(h)}}),cy(n.store,c.map(kn))}),D(this,"getFieldValue",function(r){n.warningUnhooked();var i=kn(r);return li(n.store,i)}),D(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:kn(r[a]),errors:[],warnings:[]}})}),D(this,"getFieldError",function(r){n.warningUnhooked();var i=kn(r),o=n.getFieldsError([i])[0];return o.errors}),D(this,"getFieldWarning",function(r){n.warningUnhooked();var i=kn(r),o=n.getFieldsError([i])[0];return o.warnings}),D(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},i=new za,o=n.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=i.get(u)||new Set;d.add({entity:l,value:c}),i.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),h=n.getInitialValue(f);if(h!==void 0)nr(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var p=i.get(f);if(p&&p.size>1)nr(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(p){var m=n.getFieldValue(f),g=u.isListField();!g&&(!r.skipExist||m===void 0)&&n.updateStore(ai(n.store,f,Pe(p)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=i.get(l);if(c){var u;(u=s).push.apply(u,Pe(Pe(c).map(function(d){return d.entity})))}})):s=o,a(s)}),D(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Ua(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(kn);o.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(ai(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),D(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(a){var s=a.name,l=dt(a,d3),c=kn(s);o.push(c),"value"in l&&n.updateStore(ai(n.store,c,l.value)),n.notifyObservers(i,[c],{type:"setField",data:a})}),n.notifyWatch(o)}),D(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var a=o.getNamePath(),s=o.getMeta(),l=W(W({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return i}),D(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),a=li(n.store,o);a===void 0&&n.updateStore(ai(n.store,o,i))}}),D(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),D(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==c&&n.fieldEntities.every(function(d){return!yw(d.getNamePath(),i)})){var u=n.store;n.updateStore(ai(u,i,c,!0)),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}n.notifyWatch([i])}}),D(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),D(this,"notifyObservers",function(r,i,o){if(n.subscribable){var a=W(W({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,i,a)})}else n.forceRootUpdate()}),D(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(Pe(o))}),o}),D(this,"updateValue",function(r,i){var o=kn(r),a=n.store;n.updateStore(ai(n.store,o,i)),n.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var s=n.triggerDependenciesUpdate(a,o),l=n.callbacks.onValuesChange;if(l){var c=cy(n.store,[o]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(Pe(s)))}),D(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Ua(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),D(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i,errors:[],warnings:[]}])}),D(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],a=new za;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=kn(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!i.has(d)){i.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(o.push(f),l(f))}})};return s(r),o}),D(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var a=n.getFields();if(i){var s=new za;i.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return os(r,u)});l.length&&o(l,a)}}),D(this,"validateFields",function(r,i){n.warningUnhooked();var o,a;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(o=r,a=i):a=r;var s=!!o,l=s?o.map(kn):[],c=[],u=String(Date.now()),d=new Set,f=a||{},h=f.recursive,p=f.dirty;n.getFieldEntities(!0).forEach(function(O){if(s||l.push(O.getNamePath()),!(!O.props.rules||!O.props.rules.length)&&!(p&&!O.isFieldDirty())){var S=O.getNamePath();if(d.add(S.join(u)),!s||os(l,S,h)){var C=O.validateRules(W({validateMessages:W(W({},bw),n.validateMessages)},a));c.push(C.then(function(){return{name:S,errors:[],warnings:[]}}).catch(function(b){var x,$=[],w=[];return(x=b.forEach)===null||x===void 0||x.call(b,function(P){var _=P.rule.warningOnly,T=P.errors;_?w.push.apply(w,Pe(T)):$.push.apply($,Pe(T))}),$.length?Promise.reject({name:S,errors:$,warnings:w}):{name:S,errors:$,warnings:w}}))}}});var m=u3(c);n.lastValidatePromise=m,m.catch(function(O){return O}).then(function(O){var S=O.map(function(C){var b=C.name;return b});n.notifyObservers(n.store,S,{type:"validateFinish"}),n.triggerOnFieldsChange(S,O)});var g=m.then(function(){return n.lastValidatePromise===m?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(O){var S=O.filter(function(C){return C&&C.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:S,outOfDate:n.lastValidatePromise!==m})});g.catch(function(O){return O});var v=l.filter(function(O){return d.has(O.join(u))});return n.triggerOnFieldsChange(v),g}),D(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=e});function r0(t){var e=Y(),n=K({}),r=ae(n,2),i=r[1];if(!e.current)if(t)e.current=t;else{var o=function(){i({})},a=new f3(o);e.current=a.getForm()}return[e.current]}var Lm=yt({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Cw=function(e){var n=e.validateMessages,r=e.onFormChange,i=e.onFormFinish,o=e.children,a=de(Lm),s=Y({});return y(Lm.Provider,{value:W(W({},a),{},{validateMessages:W(W({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){i&&i(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=W(W({},s.current),{},D({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=W({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},o)},h3=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],p3=function(e,n){var r=e.name,i=e.initialValues,o=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,d=e.validateMessages,f=e.validateTrigger,h=f===void 0?"onChange":f,p=e.onValuesChange,m=e.onFieldsChange,g=e.onFinish,v=e.onFinishFailed,O=e.clearOnDestroy,S=dt(e,h3),C=Y(null),b=de(Lm),x=r0(a),$=ae(x,1),w=$[0],P=w.getInternalHooks(sa),_=P.useSubscribe,T=P.setInitialValues,k=P.setCallbacks,R=P.setValidateMessages,I=P.setPreserve,Q=P.destroyForm;Yt(n,function(){return W(W({},w),{},{nativeElement:C.current})}),be(function(){return b.registerForm(r,w),function(){b.unregisterForm(r)}},[b,w,r]),R(W(W({},b.validateMessages),d)),k({onValuesChange:p,onFieldsChange:function(H){if(b.triggerFormChange(r,H),m){for(var B=arguments.length,G=new Array(B>1?B-1:0),se=1;se{}}),ww=yt(null),Pw=t=>{const e=cn(t,["prefixCls"]);return y(Cw,Object.assign({},e))},i0=yt({prefixCls:""}),ei=yt({}),_w=({children:t,status:e,override:n})=>{const r=de(ei),i=me(()=>{const o=Object.assign({},r);return n&&delete o.isFormItemInput,e&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[e,n,r]);return y(ei.Provider,{value:i},t)},Tw=yt(void 0),ys=t=>{const{space:e,form:n,children:r}=t;if(r==null)return null;let i=r;return n&&(i=oe.createElement(_w,{override:!0,status:!0},i)),e&&(i=oe.createElement(_A,null,i)),i};function fy(...t){const e={};return t.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(e[r]=n[r])})}),e}function Pd(t){if(!t)return;const{closable:e,closeIcon:n}=t;return{closable:e,closeIcon:n}}function hy(t){const{closable:e,closeIcon:n}=t||{};return oe.useMemo(()=>{if(!e&&(e===!1||n===!1||n===null))return!1;if(e===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return e&&typeof e=="object"&&(r=Object.assign(Object.assign({},r),e)),r},[e,n])}const g3={};function kw(t,e,n=g3){const r=hy(t),i=hy(e),[o]=Ki("global",Zi.global),a=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,s=oe.useMemo(()=>Object.assign({closeIcon:oe.createElement(Vi,null)},n),[n]),l=oe.useMemo(()=>r===!1?!1:r?fy(s,i,r):i===!1?!1:i?fy(s,i):s.closable?s:!1,[r,i,s]);return oe.useMemo(()=>{var c,u;if(l===!1)return[!1,null,a,{}];const{closeIconRender:d}=s,{closeIcon:f}=l;let h=f;const p=$i(l,!0);return h!=null&&(d&&(h=d(f)),h=oe.isValidElement(h)?oe.cloneElement(h,Object.assign(Object.assign(Object.assign({},h.props),{"aria-label":(u=(c=h.props)===null||c===void 0?void 0:c["aria-label"])!==null&&u!==void 0?u:o.close}),p)):oe.createElement("span",Object.assign({"aria-label":o.close},p),h)),[!0,h,a,p]},[l,s])}var v3=function(e){if(fr()&&window.document.documentElement){var n=Array.isArray(e)?e:[e],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1};function py(t,e){return v3(t)}const O3=()=>fr()&&window.document.documentElement,Df=t=>{const{prefixCls:e,className:n,style:r,size:i,shape:o}=t,a=Z({[`${e}-lg`]:i==="large",[`${e}-sm`]:i==="small"}),s=Z({[`${e}-circle`]:o==="circle",[`${e}-square`]:o==="square",[`${e}-round`]:o==="round"}),l=me(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return y("span",{className:Z(e,a,s,n),style:Object.assign(Object.assign({},l),r)})},b3=new _t("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Bf=t=>({height:t,lineHeight:q(t)}),as=t=>Object.assign({width:t},Bf(t)),y3=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:b3,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Wh=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},Bf(t)),S3=t=>{const{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o}=t;return{[e]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},as(r)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:Object.assign({},as(i)),[`${e}${e}-sm`]:Object.assign({},as(o))}},x3=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Wh(e,s)),[`${r}-lg`]:Object.assign({},Wh(i,s)),[`${r}-sm`]:Object.assign({},Wh(o,s))}},my=t=>Object.assign({width:t},Bf(t)),C3=t=>{const{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:i,calc:o}=t;return{[e]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:i},my(o(n).mul(2).equal())),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Object.assign(Object.assign({},my(n)),{maxWidth:o(n).mul(4).equal(),maxHeight:o(n).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},Fh=(t,e,n)=>{const{skeletonButtonCls:r}=t;return{[`${n}${r}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:e}}},Vh=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},Bf(t)),$3=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:r,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:s}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},Vh(r,s))},Fh(t,r,n)),{[`${n}-lg`]:Object.assign({},Vh(i,s))}),Fh(t,i,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Vh(o,s))}),Fh(t,o,`${n}-sm`))},w3=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:h,borderRadius:p,titleHeight:m,blockRadius:g,paragraphLiHeight:v,controlHeightXS:O,paragraphMarginTop:S}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},as(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},as(c)),[`${n}-sm`]:Object.assign({},as(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:m,background:d,borderRadius:g,[`+ ${i}`]:{marginBlockStart:u}},[i]:{padding:0,"> li":{width:"100%",height:v,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:O}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${r}, ${i} > li`]:{borderRadius:p}}},[`${e}-with-avatar ${e}-content`]:{[r]:{marginBlockStart:h,[`+ ${i}`]:{marginBlockStart:S}}},[`${e}${e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},$3(t)),S3(t)),x3(t)),C3(t)),[`${e}${e}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${e}${e}-active`]:{[` ${r}, ${i} > li, ${n}, ${o}, ${a}, ${s} - `]:Object.assign({},y3(t))}}},P3=t=>{const{colorFillContent:e,colorFill:n}=t,r=e,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},Bs=Zt("Skeleton",t=>{const{componentCls:e,calc:n}=t,r=kt(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return w3(r)},P3,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),_3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,shape:o="circle",size:a="default"}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls","className"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i},n,r,u,d);return c(y("div",{className:h},y(Lf,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:a},f))))},T3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o=!1,size:a="default"}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(y("div",{className:h},y(Lf,Object.assign({prefixCls:`${l}-button`,size:a},f))))},k3="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",R3=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o}=t,{getPrefixCls:a}=fe(it),s=a("skeleton",e),[l,c,u]=Bs(s),d=Z(s,`${s}-element`,{[`${s}-active`]:o},n,r,c,u);return l(y("div",{className:d},y("div",{className:Z(`${s}-image`,n),style:i},y("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},y("title",null,"Image placeholder"),y("path",{d:k3,className:`${s}-image-path`})))))},I3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o,size:a="default"}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(y("div",{className:h},y(Lf,Object.assign({prefixCls:`${l}-input`,size:a},f))))},M3=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o,children:a}=t,{getPrefixCls:s}=fe(it),l=s("skeleton",e),[c,u,d]=Bs(l),f=Z(l,`${l}-element`,{[`${l}-active`]:o},u,n,r,d);return c(y("div",{className:f},y("div",{className:Z(`${l}-image`,n),style:i},a)))},E3=(t,e)=>{const{width:n,rows:r=2}=e;if(Array.isArray(n))return n[t];if(r-1===t)return n},A3=t=>{const{prefixCls:e,className:n,style:r,rows:i=0}=t,o=Array.from({length:i}).map((a,s)=>y("li",{key:s,style:{width:E3(s,t)}}));return y("ul",{className:Z(e,n),style:r},o)},Q3=({prefixCls:t,className:e,width:n,style:r})=>y("h3",{className:Z(t,e),style:Object.assign({width:n},r)});function Fh(t){return t&&typeof t=="object"?t:{}}function N3(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function z3(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function L3(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Ra=t=>{const{prefixCls:e,loading:n,className:r,rootClassName:i,style:o,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=t,{getPrefixCls:f,direction:h,className:p,style:m}=rr("skeleton"),g=f("skeleton",e),[v,O,S]=Bs(g);if(n||!("loading"in t)){const x=!!s,b=!!l,C=!!c;let $;if(x){const _=Object.assign(Object.assign({prefixCls:`${g}-avatar`},N3(b,C)),Fh(s));$=y("div",{className:`${g}-header`},y(Lf,Object.assign({},_)))}let w;if(b||C){let _;if(b){const R=Object.assign(Object.assign({prefixCls:`${g}-title`},z3(x,C)),Fh(l));_=y(Q3,Object.assign({},R))}let T;if(C){const R=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},L3(x,b)),Fh(c));T=y(A3,Object.assign({},R))}w=y("div",{className:`${g}-content`},_,T)}const P=Z(g,{[`${g}-with-avatar`]:x,[`${g}-active`]:u,[`${g}-rtl`]:h==="rtl",[`${g}-round`]:d},p,r,i,O,S);return v(y("div",{className:P,style:Object.assign(Object.assign({},m),o)},$,w))}return a??null};Ra.Button=T3;Ra.Avatar=_3;Ra.Input=I3;Ra.Image=R3;Ra.Node=M3;function my(){}const j3=bt({add:my,remove:my});function D3(t){const e=fe(j3),n=U(null);return pn(i=>{if(i){const o=t?i.querySelector(t):i;e.add(o),n.current=o}else e.remove(n.current)})}const gy=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=fe($c);return oe.createElement(vt,Object.assign({onClick:n},t),e)},vy=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:r,onOk:i}=fe($c);return oe.createElement(vt,Object.assign({},Bv(n),{loading:t,onClick:i},e),r)};function Rw(t,e){return oe.createElement("span",{className:`${t}-close-x`},e||oe.createElement(Vi,{className:`${t}-close-icon`}))}const Iw=t=>{const{okText:e,okType:n="primary",cancelText:r,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=t,[u]=Ki("Modal",m$()),d=e||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),h={confirmLoading:i,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:o,onCancel:a},p=oe.useMemo(()=>h,$e(Object.values(h)));let m;return typeof c=="function"||typeof c>"u"?(m=oe.createElement(oe.Fragment,null,oe.createElement(gy,null),oe.createElement(vy,null)),typeof c=="function"&&(m=c(m,{OkBtn:vy,CancelBtn:gy})),m=oe.createElement(fw,{value:p},m)):m=c,oe.createElement(Av,{disabled:!1},m)},B3=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},W3=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},F3=(t,e)=>{const{prefixCls:n,componentCls:r,gridColumns:i}=t,o={};for(let a=i;a>=0;a--)a===0?(o[`${r}${e}-${a}`]={display:"none"},o[`${r}-push-${a}`]={insetInlineStart:"auto"},o[`${r}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-push-${a}`]={insetInlineStart:"auto"},o[`${r}${e}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-offset-${a}`]={marginInlineStart:0},o[`${r}${e}-order-${a}`]={order:0}):(o[`${r}${e}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${r}${e}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${r}${e}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${r}${e}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${r}${e}-order-${a}`]={order:a});return o[`${r}${e}-flex`]={flex:`var(--${n}${e}-flex)`},o},zm=(t,e)=>F3(t,e),V3=(t,e,n)=>({[`@media (min-width: ${q(e)})`]:Object.assign({},zm(t,n))}),H3=()=>({}),X3=()=>({}),Z3=Zt("Grid",B3,H3),Mw=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin}),q3=Zt("Grid",t=>{const e=kt(t,{gridColumns:24}),n=Mw(e);return delete n.xs,[W3(e),zm(e,""),zm(e,"-xs"),Object.keys(n).map(r=>V3(e,n[r],`-${r}`)).reduce((r,i)=>Object.assign(Object.assign({},r),i),{})]},X3);function Oy(t){return{position:t,inset:0}}const G3=t=>{const{componentCls:e,antCls:n}=t;return[{[`${e}-root`]:{[`${e}${n}-zoom-enter, ${e}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${n}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:Object.assign(Object.assign({},Oy("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},Oy("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:nQ(t)}]},Y3=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${q(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},wn(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${q(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:Object.assign({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:q(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},Ci(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${q(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content, + `]:Object.assign({},y3(t))}}},P3=t=>{const{colorFillContent:e,colorFill:n}=t,r=e,i=n;return{color:r,colorGradientEnd:i,gradientFromColor:r,gradientToColor:i,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},Bs=Zt("Skeleton",t=>{const{componentCls:e,calc:n}=t,r=kt(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return w3(r)},P3,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),_3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,shape:o="circle",size:a="default"}=t,{getPrefixCls:s}=de(at),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls","className"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i},n,r,u,d);return c(y("div",{className:h},y(Df,Object.assign({prefixCls:`${l}-avatar`,shape:o,size:a},f))))},T3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o=!1,size:a="default"}=t,{getPrefixCls:s}=de(at),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(y("div",{className:h},y(Df,Object.assign({prefixCls:`${l}-button`,size:a},f))))},k3="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",R3=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o}=t,{getPrefixCls:a}=de(at),s=a("skeleton",e),[l,c,u]=Bs(s),d=Z(s,`${s}-element`,{[`${s}-active`]:o},n,r,c,u);return l(y("div",{className:d},y("div",{className:Z(`${s}-image`,n),style:i},y("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},y("title",null,"Image placeholder"),y("path",{d:k3,className:`${s}-image-path`})))))},I3=t=>{const{prefixCls:e,className:n,rootClassName:r,active:i,block:o,size:a="default"}=t,{getPrefixCls:s}=de(at),l=s("skeleton",e),[c,u,d]=Bs(l),f=cn(t,["prefixCls"]),h=Z(l,`${l}-element`,{[`${l}-active`]:i,[`${l}-block`]:o},n,r,u,d);return c(y("div",{className:h},y(Df,Object.assign({prefixCls:`${l}-input`,size:a},f))))},M3=t=>{const{prefixCls:e,className:n,rootClassName:r,style:i,active:o,children:a}=t,{getPrefixCls:s}=de(at),l=s("skeleton",e),[c,u,d]=Bs(l),f=Z(l,`${l}-element`,{[`${l}-active`]:o},u,n,r,d);return c(y("div",{className:f},y("div",{className:Z(`${l}-image`,n),style:i},a)))},E3=(t,e)=>{const{width:n,rows:r=2}=e;if(Array.isArray(n))return n[t];if(r-1===t)return n},A3=t=>{const{prefixCls:e,className:n,style:r,rows:i=0}=t,o=Array.from({length:i}).map((a,s)=>y("li",{key:s,style:{width:E3(s,t)}}));return y("ul",{className:Z(e,n),style:r},o)},Q3=({prefixCls:t,className:e,width:n,style:r})=>y("h3",{className:Z(t,e),style:Object.assign({width:n},r)});function Hh(t){return t&&typeof t=="object"?t:{}}function N3(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function z3(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function L3(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Ma=t=>{const{prefixCls:e,loading:n,className:r,rootClassName:i,style:o,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=t,{getPrefixCls:f,direction:h,className:p,style:m}=ir("skeleton"),g=f("skeleton",e),[v,O,S]=Bs(g);if(n||!("loading"in t)){const C=!!s,b=!!l,x=!!c;let $;if(C){const _=Object.assign(Object.assign({prefixCls:`${g}-avatar`},N3(b,x)),Hh(s));$=y("div",{className:`${g}-header`},y(Df,Object.assign({},_)))}let w;if(b||x){let _;if(b){const k=Object.assign(Object.assign({prefixCls:`${g}-title`},z3(C,x)),Hh(l));_=y(Q3,Object.assign({},k))}let T;if(x){const k=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},L3(C,b)),Hh(c));T=y(A3,Object.assign({},k))}w=y("div",{className:`${g}-content`},_,T)}const P=Z(g,{[`${g}-with-avatar`]:C,[`${g}-active`]:u,[`${g}-rtl`]:h==="rtl",[`${g}-round`]:d},p,r,i,O,S);return v(y("div",{className:P,style:Object.assign(Object.assign({},m),o)},$,w))}return a??null};Ma.Button=T3;Ma.Avatar=_3;Ma.Input=I3;Ma.Image=R3;Ma.Node=M3;function gy(){}const j3=yt({add:gy,remove:gy});function D3(t){const e=de(j3),n=Y(null);return pn(i=>{if(i){const o=t?i.querySelector(t):i;e.add(o),n.current=o}else e.remove(n.current)})}const vy=()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:n}=de($c);return oe.createElement(vt,Object.assign({onClick:n},t),e)},Oy=()=>{const{confirmLoading:t,okButtonProps:e,okType:n,okTextLocale:r,onOk:i}=de($c);return oe.createElement(vt,Object.assign({},Wv(n),{loading:t,onClick:i},e),r)};function Rw(t,e){return oe.createElement("span",{className:`${t}-close-x`},e||oe.createElement(Vi,{className:`${t}-close-icon`}))}const Iw=t=>{const{okText:e,okType:n="primary",cancelText:r,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=t,[u]=Ki("Modal",m$()),d=e||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),h={confirmLoading:i,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:o,onCancel:a},p=oe.useMemo(()=>h,Pe(Object.values(h)));let m;return typeof c=="function"||typeof c>"u"?(m=oe.createElement(oe.Fragment,null,oe.createElement(vy,null),oe.createElement(Oy,null)),typeof c=="function"&&(m=c(m,{OkBtn:Oy,CancelBtn:vy})),m=oe.createElement(fw,{value:p},m)):m=c,oe.createElement(Qv,{disabled:!1},m)},B3=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},W3=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},F3=(t,e)=>{const{prefixCls:n,componentCls:r,gridColumns:i}=t,o={};for(let a=i;a>=0;a--)a===0?(o[`${r}${e}-${a}`]={display:"none"},o[`${r}-push-${a}`]={insetInlineStart:"auto"},o[`${r}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-push-${a}`]={insetInlineStart:"auto"},o[`${r}${e}-pull-${a}`]={insetInlineEnd:"auto"},o[`${r}${e}-offset-${a}`]={marginInlineStart:0},o[`${r}${e}-order-${a}`]={order:0}):(o[`${r}${e}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${r}${e}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${r}${e}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${r}${e}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${r}${e}-order-${a}`]={order:a});return o[`${r}${e}-flex`]={flex:`var(--${n}${e}-flex)`},o},jm=(t,e)=>F3(t,e),V3=(t,e,n)=>({[`@media (min-width: ${q(e)})`]:Object.assign({},jm(t,n))}),H3=()=>({}),X3=()=>({}),Z3=Zt("Grid",B3,H3),Mw=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin}),q3=Zt("Grid",t=>{const e=kt(t,{gridColumns:24}),n=Mw(e);return delete n.xs,[W3(e),jm(e,""),jm(e,"-xs"),Object.keys(n).map(r=>V3(e,n[r],`-${r}`)).reduce((r,i)=>Object.assign(Object.assign({},r),i),{})]},X3);function by(t){return{position:t,inset:0}}const G3=t=>{const{componentCls:e,antCls:n}=t;return[{[`${e}-root`]:{[`${e}${n}-zoom-enter, ${e}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${n}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:Object.assign(Object.assign({},by("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Object.assign(Object.assign({},by("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:nQ(t)}]},Y3=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${q(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Object.assign(Object.assign({},wn(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${q(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:Object.assign({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:q(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},Ci(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${q(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content, ${e}-body, - ${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},U3=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},K3=t=>{const{componentCls:e}=t,n=Mw(t),r=Object.assign({},n);delete r.xs;const i=`--${e.replace(".","")}-`,o=Object.keys(r).map(a=>({[`@media (min-width: ${q(r[a])})`]:{width:`var(${i}${a}-width)`}}));return{[`${e}-root`]:{[e]:[].concat($e(Object.keys(n).map((a,s)=>{const l=Object.keys(n)[s-1];return l?{[`${i}${a}-width`]:`var(${i}${l}-width)`}:null})),[{width:`var(${i}xs-width)`}],$e(o))}}},Ew=t=>{const e=t.padding,n=t.fontSizeHeading5,r=t.lineHeightHeading5;return kt(t,{modalHeaderHeight:t.calc(t.calc(r).mul(n).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},Aw=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${q(t.paddingMD)} ${q(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${q(t.padding)} ${q(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${q(t.paddingXS)} ${q(t.padding)}`:0,footerBorderTop:t.wireframe?`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${q(t.padding*2)} ${q(t.padding*2)} ${q(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),Qw=Zt("Modal",t=>{const e=Ew(t);return[Y3(e),U3(e),G3(e),Cc(e,"zoom"),K3(e)]},Aw,{unitless:{titleLineHeight:!0}});var J3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{Lm={x:t.pageX,y:t.pageY},setTimeout(()=>{Lm=null},100)};O3()&&document.documentElement.addEventListener("click",eN,!0);const Nw=t=>{const{prefixCls:e,className:n,rootClassName:r,open:i,wrapClassName:o,centered:a,getContainer:s,focusTriggerAfterClose:l=!0,style:c,visible:u,width:d=520,footer:f,classNames:h,styles:p,children:m,loading:g,confirmLoading:v,zIndex:O,mousePosition:S,onOk:x,onCancel:b,destroyOnHidden:C,destroyOnClose:$,panelRef:w=null}=t,P=J3(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef"]),{getPopupContainer:_,getPrefixCls:T,direction:R,modal:k}=fe(it),I=j=>{v||b==null||b(j)},Q=j=>{x==null||x(j)},M=T("modal",e),E=T(),N=$r(M),[z,L,F]=Qw(M,N),H=Z(o,{[`${M}-centered`]:a??(k==null?void 0:k.centered),[`${M}-wrap-rtl`]:R==="rtl"}),V=f!==null&&!g?y(Iw,Object.assign({},t,{onOk:Q,onCancel:I})):null,[X,B,G,se]=kw($d(t),$d(k),{closable:!0,closeIcon:y(Vi,{className:`${M}-close-icon`}),closeIconRender:j=>Rw(M,j)}),re=D3(`.${M}-content`),le=pr(w,re),[me,ie]=Sc("Modal",O),[ne,ue]=ge(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),de=ge(()=>{const j={};return ue&&Object.keys(ue).forEach(ee=>{const he=ue[ee];he!==void 0&&(j[`--${M}-${ee}-width`]=typeof he=="number"?`${he}px`:he)}),j},[ue]);return z(y(bs,{form:!0,space:!0},y(_f.Provider,{value:ie},y(vw,Object.assign({width:ne},P,{zIndex:me,getContainer:s===void 0?_:s,prefixCls:M,rootClassName:Z(L,r,F,N),footer:V,visible:i??u,mousePosition:S??Lm,onClose:I,closable:X&&Object.assign({disabled:G,closeIcon:B},se),closeIcon:B,focusTriggerAfterClose:l,transitionName:zo(E,"zoom",t.transitionName),maskTransitionName:zo(E,"fade",t.maskTransitionName),className:Z(L,n,k==null?void 0:k.className),style:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.style),c),de),classNames:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.classNames),h),{wrapper:Z(H,h==null?void 0:h.wrapper)}),styles:Object.assign(Object.assign({},k==null?void 0:k.styles),p),panelRef:le,destroyOnClose:C??$}),g?y(Ra,{active:!0,title:!1,paragraph:{rows:4},className:`${M}-body-skeleton`}):m))))},tN=t=>{const{componentCls:e,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=t,u=`${e}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},No()),[`&${e} ${e}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS,maxWidth:`calc(100% - ${q(t.marginSM)})`},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${q(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${u}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:t.colorText,fontSize:o,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${u}-error ${u}-body > ${t.iconCls}`]:{color:t.colorError},[`${u}-warning ${u}-body > ${t.iconCls}, - ${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},nN=Qs(["Modal","confirm"],t=>{const e=Ew(t);return tN(e)},Aw,{order:-1e3});var rN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iO,$e(Object.values(O))),x=y(At,null,y(Xb,null),y(Zb,null)),b=t.title!==void 0&&t.title!==null,C=`${o}-body`;return y("div",{className:`${o}-body-wrapper`},y("div",{className:Z(C,{[`${C}-has-title`]:b})},d,y("div",{className:`${o}-paragraph`},b&&y("span",{className:`${o}-title`},t.title),y("div",{className:`${o}-content`},t.content))),l===void 0||typeof l=="function"?y(fw,{value:S},y("div",{className:`${o}-btns`},typeof l=="function"?l(x,{OkBtn:Zb,CancelBtn:Xb}):x)):l,y(nN,{prefixCls:e}))}const iN=t=>{const{close:e,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=t,f=`${o}-confirm`,h=t.width||416,p=t.style||{},m=t.mask===void 0?!0:t.mask,g=t.maskClosable===void 0?!1:t.maskClosable,v=Z(f,`${f}-${t.type}`,{[`${f}-rtl`]:i==="rtl"},t.className),[,O]=Cr(),S=ge(()=>n!==void 0?n:O.zIndexPopupBase+J$,[n,O]);return y(Nw,Object.assign({},t,{className:v,wrapClassName:Z({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:zo(s||"","zoom",t.transitionName),maskTransitionName:zo(s||"","fade",t.maskTransitionName),mask:m,maskClosable:g,style:p,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:S,closable:c}),y(zw,Object.assign({},t,{confirmPrefixCls:f})))},Lw=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:i}=t;return y(Gr,{prefixCls:e,iconPrefixCls:n,direction:r,theme:i},y(iN,Object.assign({},t)))},sa=[];let jw="";function Dw(){return jw}const oN=t=>{var e,n;const{prefixCls:r,getContainer:i,direction:o}=t,a=m$(),s=fe(it),l=Dw()||s.getPrefixCls(),c=r||`${l}-modal`;let u=i;return u===!1&&(u=void 0),oe.createElement(Lw,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:o??s.direction,locale:(n=(e=s.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function Pc(t){const e=V$(),n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),i,o;function a(...u){var d;if(u.some(p=>p==null?void 0:p.triggerCancel)){var h;(d=t.onCancel)===null||d===void 0||(h=d).call.apply(h,[t,()=>{}].concat($e(u.slice(1))))}for(let p=0;p{const d=e.getPrefixCls(void 0,Dw()),f=e.getIconPrefixCls(),h=e.getTheme(),p=oe.createElement(oN,Object.assign({},u));o=jv()(oe.createElement(Gr,{prefixCls:d,iconPrefixCls:f,theme:h},e.holderRender?e.holderRender(p):p),n)})}function l(...u){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,u)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),sa.push(l),{destroy:l,update:c}}function Bw(t){return Object.assign(Object.assign({},t),{type:"warning"})}function Ww(t){return Object.assign(Object.assign({},t),{type:"info"})}function Fw(t){return Object.assign(Object.assign({},t),{type:"success"})}function Vw(t){return Object.assign(Object.assign({},t),{type:"error"})}function Hw(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function aN({rootPrefixCls:t}){jw=t}var sN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,{afterClose:r,config:i}=t,o=sN(t,["afterClose","config"]);const[a,s]=J(!0),[l,c]=J(i),{direction:u,getPrefixCls:d}=fe(it),f=d("modal"),h=d(),p=()=>{var O;r(),(O=l.afterClose)===null||O===void 0||O.call(l)},m=(...O)=>{var S;if(s(!1),O.some(C=>C==null?void 0:C.triggerCancel)){var b;(S=l.onCancel)===null||S===void 0||(b=S).call.apply(b,[l,()=>{}].concat($e(O.slice(1))))}};Yt(e,()=>({destroy:m,update:O=>{c(S=>{const x=typeof O=="function"?O(S):O;return Object.assign(Object.assign({},S),x)})}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[v]=Ki("Modal",Zi.Modal);return y(Lw,Object.assign({prefixCls:f,rootPrefixCls:h},l,{close:m,open:a,afterClose:p,okText:l.okText||(g?v==null?void 0:v.okText:v==null?void 0:v.justOkText),direction:l.direction||u,cancelText:l.cancelText||(v==null?void 0:v.cancelText)},o))},cN=Se(lN);let by=0;const uN=Ta(Se((t,e)=>{const[n,r]=nA();return Yt(e,()=>({patchElement:r}),[]),y(At,null,n)}));function dN(){const t=U(null),[e,n]=J([]);be(()=>{e.length&&($e(e).forEach(a=>{a()}),n([]))},[e]);const r=Ht(o=>function(s){var l;by+=1;const c=av();let u;const d=new Promise(g=>{u=g});let f=!1,h;const p=y(cN,{key:`modal-${by}`,config:o(s),ref:c,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:g=>{u(g)}});return h=(l=t.current)===null||l===void 0?void 0:l.patchElement(p),h&&sa.push(h),{destroy:()=>{function g(){var v;(v=c.current)===null||v===void 0||v.destroy()}c.current?g():n(v=>[].concat($e(v),[g]))},update:g=>{function v(){var O;(O=c.current)===null||O===void 0||O.update(g)}c.current?v():n(O=>[].concat($e(O),[v]))},then:g=>(f=!0,d.then(g))}},[]);return[ge(()=>({info:r(Ww),success:r(Fw),error:r(Vw),warning:r(Bw),confirm:r(Hw)}),[]),y(uN,{key:"modal-holder",ref:t})]}const fN=t=>{const{componentCls:e,notificationMarginEdge:n,animationMaxHeight:r}=t,i=`${e}-notice`,o=new _t("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new _t("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new _t("antNotificationBottomFadeIn",{"0%":{bottom:t.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),l=new _t("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[e]:{[`&${e}-top, &${e}-bottom`]:{marginInline:0,[i]:{marginInline:"auto auto"}},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:s}},[`&${e}-topRight, &${e}-bottomRight`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:"auto",marginInlineStart:0},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:l}}}}},hN=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],pN={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},mN=(t,e)=>{const{componentCls:n}=t;return{[`${n}-${e}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[e.startsWith("top")?"top":"bottom"]:0,[pN[e]]:{value:0,_skip_check_:!0}}}}},gN=t=>{const e={};for(let n=1;n ${t.componentCls}-notice`]:{opacity:0,transition:`opacity ${t.motionDurationMid}`}};return Object.assign({[`&:not(:nth-last-child(-n+${t.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},e)},vN=t=>{const e={};for(let n=1;n{const{componentCls:e}=t;return Object.assign({[`${e}-stack`]:{[`& > ${e}-notice-wrapper`]:Object.assign({transition:`transform ${t.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute"},gN(t))},[`${e}-stack:not(${e}-stack-expanded)`]:{[`& > ${e}-notice-wrapper`]:Object.assign({},vN(t))},[`${e}-stack${e}-stack-expanded`]:{[`& > ${e}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${t.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:t.margin,width:"100%",insetInline:0,bottom:t.calc(t.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},hN.map(n=>mN(t,n)).reduce((n,r)=>Object.assign(Object.assign({},n),r),{}))},Xw=t=>{const{iconCls:e,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:o,borderRadiusLG:a,colorSuccess:s,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:p,notificationProgressBg:m,notificationProgressHeight:g,fontSize:v,lineHeight:O,width:S,notificationIconSize:x,colorText:b}=t,C=`${n}-notice`;return{position:"relative",marginBottom:o,marginInlineStart:"auto",background:f,borderRadius:a,boxShadow:r,[C]:{padding:h,width:S,maxWidth:`calc(100vw - ${q(t.calc(p).mul(2).equal())})`,overflow:"hidden",lineHeight:O,wordWrap:"break-word"},[`${C}-message`]:{color:d,fontSize:i,lineHeight:t.lineHeightLG},[`${C}-description`]:{fontSize:v,color:b,marginTop:t.marginXS},[`${C}-closable ${C}-message`]:{paddingInlineEnd:t.paddingLG},[`${C}-with-icon ${C}-message`]:{marginInlineStart:t.calc(t.marginSM).add(x).equal(),fontSize:i},[`${C}-with-icon ${C}-description`]:{marginInlineStart:t.calc(t.marginSM).add(x).equal(),fontSize:v},[`${C}-icon`]:{position:"absolute",fontSize:x,lineHeight:1,[`&-success${e}`]:{color:s},[`&-info${e}`]:{color:l},[`&-warning${e}`]:{color:c},[`&-error${e}`]:{color:u}},[`${C}-close`]:Object.assign({position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:t.colorIconHover,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},Ci(t)),[`${C}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${q(a)} * 2)`,left:{_skip_check_:!0,value:a},right:{_skip_check_:!0,value:a},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:m},"&::-webkit-progress-value":{borderRadius:a,background:m}},[`${C}-actions`]:{float:"right",marginTop:t.marginSM}}},bN=t=>{const{componentCls:e,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:o}=t,a=`${e}-notice`,s=new _t("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[e]:Object.assign(Object.assign({},wn(t)),{position:"fixed",zIndex:t.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${e}-hook-holder`]:{position:"relative"},[`${e}-fade-appear-prepare`]:{opacity:"0 !important"},[`${e}-fade-enter, ${e}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:o,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${e}-fade-leave`]:{animationTimingFunction:o,animationFillMode:"both",animationDuration:i,animationPlayState:"paused"},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationPlayState:"running"},[`${e}-fade-leave${e}-fade-leave-active`]:{animationName:s,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${a}-actions`]:{float:"left"}}})},{[e]:{[`${a}-wrapper`]:Object.assign({},Xw(t))}}]},Zw=t=>({zIndexPopup:t.zIndexPopupBase+J$+50,width:384}),qw=t=>{const e=t.paddingMD,n=t.paddingLG;return kt(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:n,notificationIconSize:t.calc(t.fontSizeLG).mul(t.lineHeightLG).equal(),notificationCloseButtonSize:t.calc(t.controlHeightLG).mul(.55).equal(),notificationMarginBottom:t.margin,notificationPadding:`${q(t.paddingMD)} ${q(t.paddingContentHorizontalLG)}`,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2,notificationProgressBg:`linear-gradient(90deg, ${t.colorPrimaryBorderHover}, ${t.colorPrimary})`})},Gw=Zt("Notification",t=>{const e=qw(t);return[bN(e),fN(e),ON(e)]},Zw),yN=Qs(["Notification","PurePanel"],t=>{const e=`${t.componentCls}-notice`,n=qw(t);return{[`${e}-pure-panel`]:Object.assign(Object.assign({},Xw(n)),{width:n.width,maxWidth:`calc(100vw - ${q(t.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0})}},Zw);var SN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,icon:n,type:r,message:i,description:o,actions:a,role:s="alert"}=t;let l=null;return n?l=y("span",{className:`${e}-icon`},n):r&&(l=y(xN[r]||null,{className:Z(`${e}-icon`,`${e}-icon-${r}`)})),y("div",{className:Z({[`${e}-with-icon`]:l}),role:s},l,y("div",{className:`${e}-message`},i),o&&y("div",{className:`${e}-description`},o),a&&y("div",{className:`${e}-actions`},a))},CN=t=>{const{prefixCls:e,className:n,icon:r,type:i,message:o,description:a,btn:s,actions:l,closable:c=!0,closeIcon:u,className:d}=t,f=SN(t,["prefixCls","className","icon","type","message","description","btn","actions","closable","closeIcon","className"]),{getPrefixCls:h}=fe(it),p=l??s,m=e||h("notification"),g=`${m}-notice`,v=$r(m),[O,S,x]=Gw(m,v);return O(y("div",{className:Z(`${g}-pure-panel`,S,n,x,v)},y(yN,{prefixCls:m}),y(U$,Object.assign({},f,{prefixCls:m,eventKey:"pure",duration:null,closable:c,className:Z({notificationClassName:d}),closeIcon:i0(m,u),content:y(Yw,{prefixCls:g,icon:r,type:i,message:o,description:a,actions:p})}))))};function $N(t,e,n){let r;switch(t){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":r={left:0,top:e,bottom:"auto"};break;case"topRight":r={right:0,top:e,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function wN(t){return{motionName:`${t}-fade`}}function PN(t,e,n){return typeof t<"u"?t:typeof(e==null?void 0:e.closeIcon)<"u"?e.closeIcon:n==null?void 0:n.closeIcon}var _N=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=$r(e),[r,i,o]=Gw(e,n);return r(oe.createElement(W5,{classNames:{list:Z(i,o,n)}},t))},IN=(t,{prefixCls:e,key:n})=>oe.createElement(RN,{prefixCls:e,key:n},t),MN=oe.forwardRef((t,e)=>{const{top:n,bottom:r,prefixCls:i,getContainer:o,maxCount:a,rtl:s,onAllRemoved:l,stack:c,duration:u,pauseOnHover:d=!0,showProgress:f}=t,{getPrefixCls:h,getPopupContainer:p,notification:m,direction:g}=fe(it),[,v]=Cr(),O=i||h("notification"),S=w=>$N(w,n??yy,r??yy),x=()=>Z({[`${O}-rtl`]:s??g==="rtl"}),b=()=>wN(O),[C,$]=Y5({prefixCls:O,style:S,className:x,motion:b,closable:!0,closeIcon:i0(O),duration:u??TN,getContainer:()=>(o==null?void 0:o())||(p==null?void 0:p())||document.body,maxCount:a,pauseOnHover:d,showProgress:f,onAllRemoved:l,renderNotifications:IN,stack:c===!1?!1:{threshold:typeof c=="object"?c==null?void 0:c.threshold:void 0,offset:8,gap:v.margin}});return oe.useImperativeHandle(e,()=>Object.assign(Object.assign({},C),{prefixCls:O,notification:m})),$});function Uw(t){const e=oe.useRef(null);return bc(),[oe.useMemo(()=>{const r=s=>{var l;if(!e.current)return;const{open:c,prefixCls:u,notification:d}=e.current,f=`${u}-notice`,{message:h,description:p,icon:m,type:g,btn:v,actions:O,className:S,style:x,role:b="alert",closeIcon:C,closable:$}=s,w=_N(s,["message","description","icon","type","btn","actions","className","style","role","closeIcon","closable"]),P=O??v,_=i0(f,PN(C,t,d));return c(Object.assign(Object.assign({placement:(l=t==null?void 0:t.placement)!==null&&l!==void 0?l:kN},w),{content:oe.createElement(Yw,{prefixCls:f,icon:m,type:g,message:h,description:p,actions:P,role:b}),className:Z(g&&`${f}-${g}`,S,d==null?void 0:d.className),style:Object.assign(Object.assign({},d==null?void 0:d.style),x),closeIcon:_,closable:$??!!_}))},o={open:r,destroy:s=>{var l,c;s!==void 0?(l=e.current)===null||l===void 0||l.close(s):(c=e.current)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(s=>{o[s]=l=>r(Object.assign(Object.assign({},l),{type:s}))}),o},[]),oe.createElement(MN,Object.assign({key:"notification-holder"},t,{ref:e}))]}function EN(t){return Uw(t)}const AN=oe.createContext({});function Kw(t){return e=>y(Gr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},y(t,Object.assign({},e)))}const Jw=(t,e,n,r,i)=>Kw(a=>{const{prefixCls:s,style:l}=a,c=U(null),[u,d]=J(0),[f,h]=J(0),[p,m]=_n(!1,{value:a.open}),{getPrefixCls:g}=fe(it),v=g(r||"select",s);be(()=>{if(m(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(C=>{const $=C[0].target;d($.offsetHeight+8),h($.offsetWidth)}),b=setInterval(()=>{var C;const $=i?`.${i(v)}`:`.${v}-dropdown`,w=(C=c.current)===null||C===void 0?void 0:C.querySelector($);w&&(clearInterval(b),x.observe(w))},10);return()=>{clearInterval(b),x.disconnect()}}},[]);let O=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:p,visible:p,getPopupContainer:()=>c.current});return e&&Object.assign(O,{[e]:{overflow:{adjustX:!1,adjustY:!1}}}),y("div",{ref:c,style:{paddingBottom:u,position:"relative",minWidth:f}},y(t,Object.assign({},O)))}),o0=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var Df=function(e){var n=e.className,r=e.customizeIcon,i=e.customizeIconProps,o=e.children,a=e.onMouseDown,s=e.onClick,l=typeof r=="function"?r(i):r;return y("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:y("span",{className:Z(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},o))},QN=function(e,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=oe.useMemo(function(){if(Je(i)==="object")return i.clearIcon;if(o)return o},[i,o]),u=oe.useMemo(function(){return!!(!a&&i&&(r.length||s)&&!(l==="combobox"&&s===""))},[i,a,r.length,s,l]);return{allowClear:u,clearIcon:oe.createElement(Df,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},e2=bt(null);function NN(){return fe(e2)}function zN(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=J(!1),n=ae(e,2),r=n[0],i=n[1],o=U(null),a=function(){window.clearTimeout(o.current)};be(function(){return a},[]);var s=function(c,u){a(),o.current=window.setTimeout(function(){i(c),u&&u()},t)};return[r,s,a]}function t2(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=U(null),n=U(null);be(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||e.current===null)&&(e.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function LN(t,e,n,r){var i=U(null);i.current={open:e,triggerOpen:n,customizedTrigger:r},be(function(){function o(a){var s;if(!((s=i.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),i.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function jN(t){return t&&![je.ESC,je.SHIFT,je.BACKSPACE,je.TAB,je.WIN_KEY,je.ALT,je.META,je.WIN_KEY_RIGHT,je.CTRL,je.SEMICOLON,je.EQUALS,je.CAPS_LOCK,je.CONTEXT_MENU,je.F1,je.F2,je.F3,je.F4,je.F5,je.F6,je.F7,je.F8,je.F9,je.F10,je.F11,je.F12].includes(t)}var DN=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Na=void 0;function BN(t,e){var n=t.prefixCls,r=t.invalidate,i=t.item,o=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,f=t.children,h=t.display,p=t.order,m=t.component,g=m===void 0?"div":m,v=ut(t,DN),O=a&&!h;function S(w){l(c,w)}be(function(){return function(){S(null)}},[]);var x=o&&i!==Na?o(i,{index:p}):f,b;r||(b={opacity:O?0:1,height:O?0:Na,overflowY:O?"hidden":Na,order:a?p:Na,pointerEvents:O?"none":Na,position:O?"absolute":Na});var C={};O&&(C["aria-hidden"]=!0);var $=y(g,Ce({className:Z(!r&&n,u),style:W(W({},b),d)},C,v,{ref:e}),x);return a&&($=y(Kr,{onResize:function(P){var _=P.offsetWidth;S(_)},disabled:s},$)),$}var Cl=Se(BN);Cl.displayName="Item";function WN(t){if(typeof MessageChannel>"u")Xt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function FN(){var t=U(null),e=function(r){t.current||(t.current=[],WN(function(){Ov(function(){t.current.forEach(function(i){i()}),t.current=null})})),t.current.push(r)};return e}function Ks(t,e){var n=J(e),r=ae(n,2),i=r[0],o=r[1],a=pn(function(s){t(function(){o(s)})});return[i,a]}var wd=oe.createContext(null),VN=["component"],HN=["className"],XN=["className"],ZN=function(e,n){var r=fe(wd);if(!r){var i=e.component,o=i===void 0?"div":i,a=ut(e,VN);return y(o,Ce({},a,{ref:n}))}var s=r.className,l=ut(r,HN),c=e.className,u=ut(e,XN);return y(wd.Provider,{value:null},y(Cl,Ce({ref:n,className:Z(s,c)},l,u)))},n2=Se(ZN);n2.displayName="RawItem";var qN=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],r2="responsive",i2="invalidate";function GN(t){return"+ ".concat(t.length," ...")}function YN(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,i=t.data,o=i===void 0?[]:i,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,f=t.style,h=t.className,p=t.maxCount,m=t.renderRest,g=t.renderRawRest,v=t.suffix,O=t.component,S=O===void 0?"div":O,x=t.itemComponent,b=t.onVisibleChange,C=ut(t,qN),$=d==="full",w=FN(),P=Ks(w,null),_=ae(P,2),T=_[0],R=_[1],k=T||0,I=Ks(w,new Map),Q=ae(I,2),M=Q[0],E=Q[1],N=Ks(w,0),z=ae(N,2),L=z[0],F=z[1],H=Ks(w,0),V=ae(H,2),X=V[0],B=V[1],G=Ks(w,0),se=ae(G,2),re=se[0],le=se[1],me=J(null),ie=ae(me,2),ne=ie[0],ue=ie[1],de=J(null),j=ae(de,2),ee=j[0],he=j[1],ve=ge(function(){return ee===null&&$?Number.MAX_SAFE_INTEGER:ee||0},[ee,T]),Y=J(!1),ce=ae(Y,2),te=ce[0],Oe=ce[1],ye="".concat(r,"-item"),pe=Math.max(L,X),Qe=p===r2,Me=o.length&&Qe,De=p===i2,we=Me||typeof p=="number"&&o.length>p,Ie=ge(function(){var et=o;return Me?T===null&&$?et=o:et=o.slice(0,Math.min(o.length,k/u)):typeof p=="number"&&(et=o.slice(0,p)),et},[o,u,T,p,Me]),rt=ge(function(){return Me?o.slice(ve+1):o.slice(Ie.length)},[o,Ie,Me,ve]),Ye=Ht(function(et,nt){var Re;return typeof l=="function"?l(et):(Re=l&&(et==null?void 0:et[l]))!==null&&Re!==void 0?Re:nt},[l]),lt=Ht(a||function(et){return et},[a]);function Be(et,nt,Re){ee===et&&(nt===void 0||nt===ne)||(he(et),Re||(Oe(etk){Be(ot-1,et-dt-re+X);break}}v&&ct(0)+re>k&&ue(null)}},[k,M,X,re,Ye,Ie]);var xt=te&&!!rt.length,Pn={};ne!==null&&Me&&(Pn={position:"absolute",left:ne,top:0});var qt={prefixCls:ye,responsive:Me,component:x,invalidate:De},xn=s?function(et,nt){var Re=Ye(et,nt);return y(wd.Provider,{key:Re,value:W(W({},qt),{},{order:nt,item:et,itemKey:Re,registerSize:Xe,display:nt<=ve})},s(et,nt))}:function(et,nt){var Re=Ye(et,nt);return y(Cl,Ce({},qt,{order:nt,key:Re,item:et,renderItem:lt,itemKey:Re,registerSize:Xe,display:nt<=ve}))},gn={order:xt?ve:Number.MAX_SAFE_INTEGER,className:"".concat(ye,"-rest"),registerSize:_e,display:xt},Bt=m||GN,Ot=g?y(wd.Provider,{value:W(W({},qt),gn)},g(rt)):y(Cl,Ce({},qt,gn),typeof Bt=="function"?Bt(rt):Bt),ht=y(S,Ce({className:Z(!De&&r,h),style:f,ref:e},C),Ie.map(xn),we?Ot:null,v&&y(Cl,Ce({},qt,{responsive:Qe,responsiveDisabled:!Me,order:ve,className:"".concat(ye,"-suffix"),registerSize:Pe,display:!0,style:Pn}),v));return Qe?y(Kr,{onResize:ke,disabled:!Me},ht):ht}var Hi=Se(YN);Hi.displayName="Overflow";Hi.Item=n2;Hi.RESPONSIVE=r2;Hi.INVALIDATE=i2;function UN(t,e,n){var r=W(W({},t),e);return Object.keys(e).forEach(function(i){var o=e[i];typeof o=="function"&&(r[i]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;cS&&(ce="".concat(te.slice(0,S),"..."))}var Oe=function(pe){pe&&pe.stopPropagation(),w(j)};return typeof C=="function"?le(ve,ce,ee,Y,Oe):re(j,ce,ee,Y,Oe)},ie=function(j){if(!i.length)return null;var ee=typeof b=="function"?b(j):b;return typeof C=="function"?le(void 0,ee,!1,!1,void 0,!0):re({title:ee},ee,!1)},ne=y("div",{className:"".concat(B,"-search"),style:{width:z},onFocus:function(){X(!0)},onBlur:function(){X(!1)}},y(o2,{ref:l,open:o,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:h,autoComplete:p,editable:se,activeDescendantId:m,value:G,onKeyDown:T,onMouseDown:R,onChange:P,onPaste:_,onCompositionStart:k,onCompositionEnd:I,onBlur:Q,tabIndex:g,attrs:$i(e,!0)}),y("span",{ref:M,className:"".concat(B,"-search-mirror"),"aria-hidden":!0},G," ")),ue=y(Hi,{prefixCls:"".concat(B,"-overflow"),data:i,renderItem:me,renderRest:ie,suffix:ne,itemKey:oz,maxCount:O});return y("span",{className:"".concat(B,"-wrap")},ue,!i.length&&!G&&y("span",{className:"".concat(B,"-placeholder")},c))},sz=function(e){var n=e.inputElement,r=e.prefixCls,i=e.id,o=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,h=e.placeholder,p=e.tabIndex,m=e.showSearch,g=e.searchValue,v=e.activeValue,O=e.maxLength,S=e.onInputKeyDown,x=e.onInputMouseDown,b=e.onInputChange,C=e.onInputPaste,$=e.onInputCompositionStart,w=e.onInputCompositionEnd,P=e.onInputBlur,_=e.title,T=J(!1),R=ae(T,2),k=R[0],I=R[1],Q=u==="combobox",M=Q||m,E=f[0],N=g||"";Q&&v&&!k&&(N=v),be(function(){Q&&I(!1)},[Q,v]);var z=u!=="combobox"&&!d&&!m?!1:!!N,L=_===void 0?s2(E):_,F=ge(function(){return E?null:y("span",{className:"".concat(r,"-selection-placeholder"),style:z?{visibility:"hidden"}:void 0},h)},[E,z,h,r]);return y("span",{className:"".concat(r,"-selection-wrap")},y("span",{className:"".concat(r,"-selection-search")},y(o2,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:M,activeDescendantId:c,value:N,onKeyDown:S,onMouseDown:x,onChange:function(V){I(!0),b(V)},onPaste:C,onCompositionStart:$,onCompositionEnd:w,onBlur:P,tabIndex:p,attrs:$i(e,!0),maxLength:Q?O:void 0})),!Q&&E?y("span",{className:"".concat(r,"-selection-item"),title:L,style:z?{visibility:"hidden"}:void 0},E.label):null,F)},lz=function(e,n){var r=U(null),i=U(!1),o=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.prefix,f=e.autoClearSearchValue,h=e.onSearch,p=e.onSearchSubmit,m=e.onToggleOpen,g=e.onInputKeyDown,v=e.onInputBlur,O=e.domRef;Yt(n,function(){return{focus:function(L){r.current.focus(L)},blur:function(){r.current.blur()}}});var S=t2(0),x=ae(S,2),b=x[0],C=x[1],$=function(L){var F=L.which,H=r.current instanceof HTMLTextAreaElement;!H&&a&&(F===je.UP||F===je.DOWN)&&L.preventDefault(),g&&g(L),F===je.ENTER&&s==="tags"&&!i.current&&!a&&(p==null||p(L.target.value)),!(H&&!a&&~[je.UP,je.DOWN,je.LEFT,je.RIGHT].indexOf(F))&&jN(F)&&m(!0)},w=function(){C(!0)},P=U(null),_=function(L){h(L,!0,i.current)!==!1&&m(!0)},T=function(){i.current=!0},R=function(L){i.current=!1,s!=="combobox"&&_(L.target.value)},k=function(L){var F=L.target.value;if(c&&P.current&&/[\r\n]/.test(P.current)){var H=P.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");F=F.replace(H,P.current)}P.current=null,_(F)},I=function(L){var F=L.clipboardData,H=F==null?void 0:F.getData("text");P.current=H||""},Q=function(L){var F=L.target;if(F!==r.current){var H=document.body.style.msTouchAction!==void 0;H?setTimeout(function(){r.current.focus()}):r.current.focus()}},M=function(L){var F=b();L.target!==r.current&&!F&&!(s==="combobox"&&u)&&L.preventDefault(),(s!=="combobox"&&(!l||!F)||!a)&&(a&&f!==!1&&h("",!0,!1),m())},E={inputRef:r,onInputKeyDown:$,onInputMouseDown:w,onInputChange:k,onInputPaste:I,onInputCompositionStart:T,onInputCompositionEnd:R,onInputBlur:v},N=s==="multiple"||s==="tags"?y(az,Ce({},e,E)):y(sz,Ce({},e,E));return y("div",{ref:O,className:"".concat(o,"-selector"),onClick:Q,onMouseDown:M},d&&y("div",{className:"".concat(o,"-prefix")},d),N)},cz=Se(lz);function uz(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},a=o.className,s=o.content,l=i.x,c=l===void 0?0:l,u=i.y,d=u===void 0?0:u,f=U();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var p=n.points[0],m=n.points[1],g=p[0],v=p[1],O=m[0],S=m[1];g===O||!["t","b"].includes(g)?h.top=d:g==="t"?h.top=0:h.bottom=0,v===S||!["l","r"].includes(v)?h.left=c:v==="l"?h.left=0:h.right=0}return y("div",{ref:f,className:Z("".concat(e,"-arrow"),a),style:h},s)}function dz(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?y(pi,Ce({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return y("div",{style:{zIndex:r},className:Z("".concat(e,"-mask"),s)})}):null}var fz=Ta(function(t){var e=t.children;return e},function(t,e){return e.cache}),hz=Se(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,f=t.mask,h=t.arrow,p=t.arrowPos,m=t.align,g=t.motion,v=t.maskMotion,O=t.forceRender,S=t.getPopupContainer,x=t.autoDestroy,b=t.portal,C=t.zIndex,$=t.onMouseEnter,w=t.onMouseLeave,P=t.onPointerEnter,_=t.onPointerDownCapture,T=t.ready,R=t.offsetX,k=t.offsetY,I=t.offsetR,Q=t.offsetB,M=t.onAlign,E=t.onPrepare,N=t.stretch,z=t.targetWidth,L=t.targetHeight,F=typeof n=="function"?n():n,H=l||c,V=(S==null?void 0:S.length)>0,X=J(!S||!V),B=ae(X,2),G=B[0],se=B[1];if(Nt(function(){!G&&V&&a&&se(!0)},[G,V,a]),!G)return null;var re="auto",le={left:"-1000vw",top:"-1000vh",right:re,bottom:re};if(T||!l){var me,ie=m.points,ne=m.dynamicInset||((me=m._experimental)===null||me===void 0?void 0:me.dynamicInset),ue=ne&&ie[0][1]==="r",de=ne&&ie[0][0]==="b";ue?(le.right=I,le.left=re):(le.left=R,le.right=re),de?(le.bottom=Q,le.top=re):(le.top=k,le.bottom=re)}var j={};return N&&(N.includes("height")&&L?j.height=L:N.includes("minHeight")&&L&&(j.minHeight=L),N.includes("width")&&z?j.width=z:N.includes("minWidth")&&z&&(j.minWidth=z)),l||(j.pointerEvents="none"),y(b,{open:O||H,getContainer:S&&function(){return S(a)},autoDestroy:x},y(dz,{prefixCls:i,open:l,zIndex:C,mask:f,motion:v}),y(Kr,{onResize:M,disabled:!l},function(ee){return y(pi,Ce({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:O,leavedClassName:"".concat(i,"-hidden")},g,{onAppearPrepare:E,onEnterPrepare:E,visible:l,onVisibleChanged:function(ve){var Y;g==null||(Y=g.onVisibleChanged)===null||Y===void 0||Y.call(g,ve),s(ve)}}),function(he,ve){var Y=he.className,ce=he.style,te=Z(i,Y,r);return y("div",{ref:pr(ee,e,ve),className:te,style:W(W(W(W({"--arrow-x":"".concat(p.x||0,"px"),"--arrow-y":"".concat(p.y||0,"px")},le),j),ce),{},{boxSizing:"border-box",zIndex:C},o),onMouseEnter:$,onMouseLeave:w,onPointerEnter:P,onClick:d,onPointerDownCapture:_},h&&y(uz,{prefixCls:i,arrow:h,arrowPos:p,align:m}),y(fz,{cache:!l&&!u},F))})}))}),pz=Se(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=vo(n),o=Ht(function(s){Sv(e,r?r(s):s)},[r]),a=go(o,Ho(n));return i?Xn(n,{ref:a}):n}),Cy=bt(null);function $y(t){return t?Array.isArray(t)?t:[t]:[]}function mz(t,e,n,r){return ge(function(){var i=$y(n??e),o=$y(r??e),a=new Set(i),s=new Set(o);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,n,r])}function gz(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function vz(t,e,n,r){for(var i=n.points,o=Object.keys(t),a=0;a1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function Js(t){return Xl(parseFloat(t),0)}function Py(t,e){var n=W({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=_c(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,l=i.borderBottomWidth,c=i.borderLeftWidth,u=i.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,h=r.clientHeight,p=r.offsetWidth,m=r.clientWidth,g=Js(s),v=Js(l),O=Js(c),S=Js(u),x=Xl(Math.round(d.width/p*1e3)/1e3),b=Xl(Math.round(d.height/f*1e3)/1e3),C=(p-m-O-S)*x,$=(f-h-g-v)*b,w=g*b,P=v*b,_=O*x,T=S*x,R=0,k=0;if(o==="clip"){var I=Js(a);R=I*x,k=I*b}var Q=d.x+_-R,M=d.y+w-k,E=Q+d.width+2*R-_-T-C,N=M+d.height+2*k-w-P-$;n.left=Math.max(n.left,Q),n.top=Math.max(n.top,M),n.right=Math.min(n.right,E),n.bottom=Math.min(n.bottom,N)}}),n}function _y(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function Ty(t,e){var n=e||[],r=ae(n,2),i=r[0],o=r[1];return[_y(t.width,i),_y(t.height,o)]}function ky(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function za(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function So(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function Oz(t,e,n,r,i,o,a){var s=J({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=ae(s,2),c=l[0],u=l[1],d=U(0),f=ge(function(){return e?jm(e):[]},[e]),h=U({}),p=function(){h.current={}};t||p();var m=pn(function(){if(e&&n&&t){let Rr=function(Ia,yo){var Ma=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qe,Fc=H.x+Ia,Vc=H.y+yo,hh=Fc+de,Ke=Vc+ue,mt=Math.max(Fc,Ma.left),On=Math.max(Vc,Ma.top),Tn=Math.min(hh,Ma.right),bn=Math.min(Ke,Ma.bottom);return Math.max(0,(Tn-mt)*(bn-On))},qo=function(){un=H.y+ot,Cn=un+ue,Ln=H.x+Re,Ut=Ln+de};var SO=Rr,Wc=qo,O,S,x,b,C=e,$=C.ownerDocument,w=_c(C),P=w.getComputedStyle(C),_=P.position,T=C.style.left,R=C.style.top,k=C.style.right,I=C.style.bottom,Q=C.style.overflow,M=W(W({},i[r]),o),E=$.createElement("div");(O=C.parentElement)===null||O===void 0||O.appendChild(E),E.style.left="".concat(C.offsetLeft,"px"),E.style.top="".concat(C.offsetTop,"px"),E.style.position=_,E.style.height="".concat(C.offsetHeight,"px"),E.style.width="".concat(C.offsetWidth,"px"),C.style.left="0",C.style.top="0",C.style.right="auto",C.style.bottom="auto",C.style.overflow="hidden";var N;if(Array.isArray(n))N={x:n[0],y:n[1],width:0,height:0};else{var z,L,F=n.getBoundingClientRect();F.x=(z=F.x)!==null&&z!==void 0?z:F.left,F.y=(L=F.y)!==null&&L!==void 0?L:F.top,N={x:F.x,y:F.y,width:F.width,height:F.height}}var H=C.getBoundingClientRect(),V=w.getComputedStyle(C),X=V.height,B=V.width;H.x=(S=H.x)!==null&&S!==void 0?S:H.left,H.y=(x=H.y)!==null&&x!==void 0?x:H.top;var G=$.documentElement,se=G.clientWidth,re=G.clientHeight,le=G.scrollWidth,me=G.scrollHeight,ie=G.scrollTop,ne=G.scrollLeft,ue=H.height,de=H.width,j=N.height,ee=N.width,he={left:0,top:0,right:se,bottom:re},ve={left:-ne,top:-ie,right:le-ne,bottom:me-ie},Y=M.htmlRegion,ce="visible",te="visibleFirst";Y!=="scroll"&&Y!==te&&(Y=ce);var Oe=Y===te,ye=Py(ve,f),pe=Py(he,f),Qe=Y===ce?pe:ye,Me=Oe?pe:Qe;C.style.left="auto",C.style.top="auto",C.style.right="0",C.style.bottom="0";var De=C.getBoundingClientRect();C.style.left=T,C.style.top=R,C.style.right=k,C.style.bottom=I,C.style.overflow=Q,(b=C.parentElement)===null||b===void 0||b.removeChild(E);var we=Xl(Math.round(de/parseFloat(B)*1e3)/1e3),Ie=Xl(Math.round(ue/parseFloat(X)*1e3)/1e3);if(we===0||Ie===0||Nl(n)&&!kf(n))return;var rt=M.offset,Ye=M.targetOffset,lt=Ty(H,rt),Be=ae(lt,2),ke=Be[0],Xe=Be[1],_e=Ty(N,Ye),Pe=ae(_e,2),ct=Pe[0],xt=Pe[1];N.x-=ct,N.y-=xt;var Pn=M.points||[],qt=ae(Pn,2),xn=qt[0],gn=qt[1],Bt=ky(gn),Ot=ky(xn),ht=za(N,Bt),et=za(H,Ot),nt=W({},M),Re=ht.x-et.x+ke,ot=ht.y-et.y+Xe,dt=Rr(Re,ot),Ee=Rr(Re,ot,pe),Ze=za(N,["t","l"]),Ae=za(H,["t","l"]),We=za(N,["b","r"]),st=za(H,["b","r"]),tt=M.overflow||{},Ct=tt.adjustX,$t=tt.adjustY,wt=tt.shiftX,Mt=tt.shiftY,vn=function(yo){return typeof yo=="boolean"?yo:yo>=0},un,Cn,Ln,Ut;qo();var nn=vn($t),Te=Ot[0]===Bt[0];if(nn&&Ot[0]==="t"&&(Cn>Me.bottom||h.current.bt)){var Le=ot;Te?Le-=ue-j:Le=Ze.y-st.y-Xe;var pt=Rr(Re,Le),yt=Rr(Re,Le,pe);pt>dt||pt===dt&&(!Oe||yt>=Ee)?(h.current.bt=!0,ot=Le,Xe=-Xe,nt.points=[So(Ot,0),So(Bt,0)]):h.current.bt=!1}if(nn&&Ot[0]==="b"&&(undt||Ge===dt&&(!Oe||ft>=Ee)?(h.current.tb=!0,ot=Ue,Xe=-Xe,nt.points=[So(Ot,0),So(Bt,0)]):h.current.tb=!1}var It=vn(Ct),zt=Ot[1]===Bt[1];if(It&&Ot[1]==="l"&&(Ut>Me.right||h.current.rl)){var Vt=Re;zt?Vt-=de-ee:Vt=Ze.x-st.x-ke;var dn=Rr(Vt,ot),Br=Rr(Vt,ot,pe);dn>dt||dn===dt&&(!Oe||Br>=Ee)?(h.current.rl=!0,Re=Vt,ke=-ke,nt.points=[So(Ot,1),So(Bt,1)]):h.current.rl=!1}if(It&&Ot[1]==="r"&&(Lndt||Pr===dt&&(!Oe||_r>=Ee)?(h.current.lr=!0,Re=wr,ke=-ke,nt.points=[So(Ot,1),So(Bt,1)]):h.current.lr=!1}qo();var qn=wt===!0?0:wt;typeof qn=="number"&&(Lnpe.right&&(Re-=Ut-pe.right-ke,N.x>pe.right-qn&&(Re+=N.x-pe.right+qn)));var Tr=Mt===!0?0:Mt;typeof Tr=="number"&&(unpe.bottom&&(ot-=Cn-pe.bottom-Xe,N.y>pe.bottom-Tr&&(ot+=N.y-pe.bottom+Tr)));var kr=H.x+Re,ei=kr+de,Ri=H.y+ot,Gt=Ri+ue,qe=N.x,Fe=qe+ee,Lt=N.y,Wt=Lt+j,en=Math.max(kr,qe),fn=Math.min(ei,Fe),gr=(en+fn)/2,Gn=gr-kr,vr=Math.max(Ri,Lt),ir=Math.min(Gt,Wt),Or=(vr+ir)/2,Ii=Or-Ri;a==null||a(e,nt);var br=De.right-H.x-(Re+H.width),qs=De.bottom-H.y-(ot+H.height);we===1&&(Re=Math.round(Re),br=Math.round(br)),Ie===1&&(ot=Math.round(ot),qs=Math.round(qs));var fh={ready:!0,offsetX:Re/we,offsetY:ot/Ie,offsetR:br/we,offsetB:qs/Ie,arrowX:Gn/we,arrowY:Ii/Ie,scaleX:we,scaleY:Ie,align:nt};u(fh)}}),g=function(){d.current+=1;var S=d.current;Promise.resolve().then(function(){d.current===S&&m()})},v=function(){u(function(S){return W(W({},S),{},{ready:!1})})};return Nt(v,[r]),Nt(function(){t||v()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function bz(t,e,n,r,i){Nt(function(){if(t&&e&&n){let f=function(){r(),i()};var d=f,o=e,a=n,s=jm(o),l=jm(a),c=_c(a),u=new Set([c].concat($e(s),$e(l)));return u.forEach(function(h){h.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),r(),function(){u.forEach(function(h){h.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[t,e,n])}function yz(t,e,n,r,i,o,a,s){var l=U(t);l.current=t;var c=U(!1);be(function(){if(e&&r&&(!i||o)){var d=function(){c.current=!1},f=function(g){var v;l.current&&!a(((v=g.composedPath)===null||v===void 0||(v=v.call(g))===null||v===void 0?void 0:v[0])||g.target)&&!c.current&&s(!1)},h=_c(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var p=Od(n);return p&&(p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0)),function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),p&&(p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0))}}},[e,n,r,i,o]);function u(){c.current=!0}return u}var Sz=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function xz(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Kv,e=Se(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,h=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,m=n.mouseEnterDelay,g=n.mouseLeaveDelay,v=g===void 0?.1:g,O=n.focusDelay,S=n.blurDelay,x=n.mask,b=n.maskClosable,C=b===void 0?!0:b,$=n.getPopupContainer,w=n.forceRender,P=n.autoDestroy,_=n.destroyPopupOnHide,T=n.popup,R=n.popupClassName,k=n.popupStyle,I=n.popupPlacement,Q=n.builtinPlacements,M=Q===void 0?{}:Q,E=n.popupAlign,N=n.zIndex,z=n.stretch,L=n.getPopupClassNameFromAlign,F=n.fresh,H=n.alignPoint,V=n.onPopupClick,X=n.onPopupAlign,B=n.arrow,G=n.popupMotion,se=n.maskMotion,re=n.popupTransitionName,le=n.popupAnimation,me=n.maskTransitionName,ie=n.maskAnimation,ne=n.className,ue=n.getTriggerDOMNode,de=ut(n,Sz),j=P||_||!1,ee=J(!1),he=ae(ee,2),ve=he[0],Y=he[1];Nt(function(){Y(o0())},[]);var ce=U({}),te=fe(Cy),Oe=ge(function(){return{registerSubPopup:function(mt,On){ce.current[mt]=On,te==null||te.registerSubPopup(mt,On)}}},[te]),ye=Jv(),pe=J(null),Qe=ae(pe,2),Me=Qe[0],De=Qe[1],we=U(null),Ie=pn(function(Ke){we.current=Ke,Nl(Ke)&&Me!==Ke&&De(Ke),te==null||te.registerSubPopup(ye,Ke)}),rt=J(null),Ye=ae(rt,2),lt=Ye[0],Be=Ye[1],ke=U(null),Xe=pn(function(Ke){Nl(Ke)&<!==Ke&&(Be(Ke),ke.current=Ke)}),_e=Ao.only(a),Pe=(_e==null?void 0:_e.props)||{},ct={},xt=pn(function(Ke){var mt,On,Tn=lt;return(Tn==null?void 0:Tn.contains(Ke))||((mt=Od(Tn))===null||mt===void 0?void 0:mt.host)===Ke||Ke===Tn||(Me==null?void 0:Me.contains(Ke))||((On=Od(Me))===null||On===void 0?void 0:On.host)===Ke||Ke===Me||Object.values(ce.current).some(function(bn){return(bn==null?void 0:bn.contains(Ke))||Ke===bn})}),Pn=wy(o,G,le,re),qt=wy(o,se,ie,me),xn=J(f||!1),gn=ae(xn,2),Bt=gn[0],Ot=gn[1],ht=d??Bt,et=pn(function(Ke){d===void 0&&Ot(Ke)});Nt(function(){Ot(d||!1)},[d]);var nt=U(ht);nt.current=ht;var Re=U([]);Re.current=[];var ot=pn(function(Ke){var mt;et(Ke),((mt=Re.current[Re.current.length-1])!==null&&mt!==void 0?mt:ht)!==Ke&&(Re.current.push(Ke),h==null||h(Ke))}),dt=U(),Ee=function(){clearTimeout(dt.current)},Ze=function(mt){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ee(),On===0?ot(mt):dt.current=setTimeout(function(){ot(mt)},On*1e3)};be(function(){return Ee},[]);var Ae=J(!1),We=ae(Ae,2),st=We[0],tt=We[1];Nt(function(Ke){(!Ke||ht)&&tt(!0)},[ht]);var Ct=J(null),$t=ae(Ct,2),wt=$t[0],Mt=$t[1],vn=J(null),un=ae(vn,2),Cn=un[0],Ln=un[1],Ut=function(mt){Ln([mt.clientX,mt.clientY])},nn=Oz(ht,Me,H&&Cn!==null?Cn:lt,I,M,E,X),Te=ae(nn,11),Le=Te[0],pt=Te[1],yt=Te[2],Ue=Te[3],Ge=Te[4],ft=Te[5],It=Te[6],zt=Te[7],Vt=Te[8],dn=Te[9],Br=Te[10],wr=mz(ve,l,c,u),Pr=ae(wr,2),_r=Pr[0],qn=Pr[1],Tr=_r.has("click"),kr=qn.has("click")||qn.has("contextMenu"),ei=pn(function(){st||Br()}),Ri=function(){nt.current&&H&&kr&&Ze(!1)};bz(ht,lt,Me,ei,Ri),Nt(function(){ei()},[Cn,I]),Nt(function(){ht&&!(M!=null&&M[I])&&ei()},[JSON.stringify(E)]);var Gt=ge(function(){var Ke=vz(M,o,dn,H);return Z(Ke,L==null?void 0:L(dn))},[dn,L,M,o,H]);Yt(r,function(){return{nativeElement:ke.current,popupElement:we.current,forceAlign:ei}});var qe=J(0),Fe=ae(qe,2),Lt=Fe[0],Wt=Fe[1],en=J(0),fn=ae(en,2),gr=fn[0],Gn=fn[1],vr=function(){if(z&<){var mt=lt.getBoundingClientRect();Wt(mt.width),Gn(mt.height)}},ir=function(){vr(),ei()},Or=function(mt){tt(!1),Br(),p==null||p(mt)},Ii=function(){return new Promise(function(mt){vr(),Mt(function(){return mt})})};Nt(function(){wt&&(Br(),wt(),Mt(null))},[wt]);function br(Ke,mt,On,Tn){ct[Ke]=function(bn){var Hc;Tn==null||Tn(bn),Ze(mt,On);for(var ph=arguments.length,xO=new Array(ph>1?ph-1:0),Xc=1;Xc1?On-1:0),bn=1;bn1?On-1:0),bn=1;bn1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,i=[],o=l2(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var p=h[s];i.push({key:Ry(h,i.length),groupOption:f,data:h,label:h[a],value:p})}else{var m=h[c];m===void 0&&r&&(m=h.label),i.push({key:Ry(h,i.length),group:!0,data:h,label:m}),u(h[l],!0)}})}return u(t,!1),i}function Bm(t){var e=W({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return tr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var Tz=function(e,n,r){if(!n||!n.length)return null;var i=!1,o=function s(l,c){var u=d$(c),d=u[0],f=u.slice(1);if(!d)return[l];var h=l.split(d);return i=i||h.length>1,h.reduce(function(p,m){return[].concat($e(p),$e(s(m,f)))},[]).filter(Boolean)},a=o(e,n);return i?typeof r<"u"?a.slice(0,r):a:null},a0=bt(null);function kz(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return y("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(Je(o))?o:a}).join(", ")),n.length>r?", ...":null)}var Rz=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Iz=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Wm=function(e){return e==="tags"||e==="multiple"},Mz=Se(function(t,e){var n,r=t.id,i=t.prefixCls,o=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,f=t.emptyOptions,h=t.notFoundContent,p=h===void 0?"Not Found":h,m=t.onClear,g=t.mode,v=t.disabled,O=t.loading,S=t.getInputElement,x=t.getRawInputElement,b=t.open,C=t.defaultOpen,$=t.onDropdownVisibleChange,w=t.activeValue,P=t.onActiveValueChange,_=t.activeDescendantId,T=t.searchValue,R=t.autoClearSearchValue,k=t.onSearch,I=t.onSearchSplit,Q=t.tokenSeparators,M=t.allowClear,E=t.prefix,N=t.suffixIcon,z=t.clearIcon,L=t.OptionList,F=t.animation,H=t.transitionName,V=t.dropdownStyle,X=t.dropdownClassName,B=t.dropdownMatchSelectWidth,G=t.dropdownRender,se=t.dropdownAlign,re=t.placement,le=t.builtinPlacements,me=t.getPopupContainer,ie=t.showAction,ne=ie===void 0?[]:ie,ue=t.onFocus,de=t.onBlur,j=t.onKeyUp,ee=t.onKeyDown,he=t.onMouseDown,ve=ut(t,Rz),Y=Wm(g),ce=(a!==void 0?a:Y)||g==="combobox",te=W({},ve);Iz.forEach(function(qe){delete te[qe]}),c==null||c.forEach(function(qe){delete te[qe]});var Oe=J(!1),ye=ae(Oe,2),pe=ye[0],Qe=ye[1];be(function(){Qe(o0())},[]);var Me=U(null),De=U(null),we=U(null),Ie=U(null),rt=U(null),Ye=U(!1),lt=zN(),Be=ae(lt,3),ke=Be[0],Xe=Be[1],_e=Be[2];Yt(e,function(){var qe,Fe;return{focus:(qe=Ie.current)===null||qe===void 0?void 0:qe.focus,blur:(Fe=Ie.current)===null||Fe===void 0?void 0:Fe.blur,scrollTo:function(Wt){var en;return(en=rt.current)===null||en===void 0?void 0:en.scrollTo(Wt)},nativeElement:Me.current||De.current}});var Pe=ge(function(){var qe;if(g!=="combobox")return T;var Fe=(qe=u[0])===null||qe===void 0?void 0:qe.value;return typeof Fe=="string"||typeof Fe=="number"?String(Fe):""},[T,g,u]),ct=g==="combobox"&&typeof S=="function"&&S()||null,xt=typeof x=="function"&&x(),Pn=go(De,xt==null||(n=xt.props)===null||n===void 0?void 0:n.ref),qt=J(!1),xn=ae(qt,2),gn=xn[0],Bt=xn[1];Nt(function(){Bt(!0)},[]);var Ot=_n(!1,{defaultValue:C,value:b}),ht=ae(Ot,2),et=ht[0],nt=ht[1],Re=gn?et:!1,ot=!p&&f;(v||ot&&Re&&g==="combobox")&&(Re=!1);var dt=ot?!1:Re,Ee=Ht(function(qe){var Fe=qe!==void 0?qe:!Re;v||(nt(Fe),Re!==Fe&&($==null||$(Fe)))},[v,Re,nt,$]),Ze=ge(function(){return(Q||[]).some(function(qe){return[` + ${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},U3=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},K3=t=>{const{componentCls:e}=t,n=Mw(t),r=Object.assign({},n);delete r.xs;const i=`--${e.replace(".","")}-`,o=Object.keys(r).map(a=>({[`@media (min-width: ${q(r[a])})`]:{width:`var(${i}${a}-width)`}}));return{[`${e}-root`]:{[e]:[].concat(Pe(Object.keys(n).map((a,s)=>{const l=Object.keys(n)[s-1];return l?{[`${i}${a}-width`]:`var(${i}${l}-width)`}:null})),[{width:`var(${i}xs-width)`}],Pe(o))}}},Ew=t=>{const e=t.padding,n=t.fontSizeHeading5,r=t.lineHeightHeading5;return kt(t,{modalHeaderHeight:t.calc(t.calc(r).mul(n).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},Aw=t=>({footerBg:"transparent",headerBg:t.colorBgElevated,titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${q(t.paddingMD)} ${q(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${q(t.padding)} ${q(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${q(t.paddingXS)} ${q(t.padding)}`:0,footerBorderTop:t.wireframe?`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${q(t.padding*2)} ${q(t.padding*2)} ${q(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM}),Qw=Zt("Modal",t=>{const e=Ew(t);return[Y3(e),U3(e),G3(e),Cc(e,"zoom"),K3(e)]},Aw,{unitless:{titleLineHeight:!0}});var J3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{Dm={x:t.pageX,y:t.pageY},setTimeout(()=>{Dm=null},100)};O3()&&document.documentElement.addEventListener("click",eN,!0);const Nw=t=>{const{prefixCls:e,className:n,rootClassName:r,open:i,wrapClassName:o,centered:a,getContainer:s,focusTriggerAfterClose:l=!0,style:c,visible:u,width:d=520,footer:f,classNames:h,styles:p,children:m,loading:g,confirmLoading:v,zIndex:O,mousePosition:S,onOk:C,onCancel:b,destroyOnHidden:x,destroyOnClose:$,panelRef:w=null}=t,P=J3(t,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef"]),{getPopupContainer:_,getPrefixCls:T,direction:k,modal:R}=de(at),I=j=>{v||b==null||b(j)},Q=j=>{C==null||C(j)},E=T("modal",e),A=T(),N=wr(E),[L,z,V]=Qw(E,N),X=Z(o,{[`${E}-centered`]:a??(R==null?void 0:R.centered),[`${E}-wrap-rtl`]:k==="rtl"}),F=f!==null&&!g?y(Iw,Object.assign({},t,{onOk:Q,onCancel:I})):null,[H,B,G,se]=kw(Pd(t),Pd(R),{closable:!0,closeIcon:y(Vi,{className:`${E}-close-icon`}),closeIconRender:j=>Rw(E,j)}),ie=D3(`.${E}-content`),le=mr(w,ie),[pe,ne]=Sc("Modal",O),[ee,ce]=me(()=>d&&typeof d=="object"?[void 0,d]:[d,void 0],[d]),ue=me(()=>{const j={};return ce&&Object.keys(ce).forEach(J=>{const he=ce[J];he!==void 0&&(j[`--${E}-${J}-width`]=typeof he=="number"?`${he}px`:he)}),j},[ce]);return L(y(ys,{form:!0,space:!0},y(kf.Provider,{value:ne},y(vw,Object.assign({width:ee},P,{zIndex:pe,getContainer:s===void 0?_:s,prefixCls:E,rootClassName:Z(z,r,V,N),footer:F,visible:i??u,mousePosition:S??Dm,onClose:I,closable:H&&Object.assign({disabled:G,closeIcon:B},se),closeIcon:B,focusTriggerAfterClose:l,transitionName:Lo(A,"zoom",t.transitionName),maskTransitionName:Lo(A,"fade",t.maskTransitionName),className:Z(z,n,R==null?void 0:R.className),style:Object.assign(Object.assign(Object.assign({},R==null?void 0:R.style),c),ue),classNames:Object.assign(Object.assign(Object.assign({},R==null?void 0:R.classNames),h),{wrapper:Z(X,h==null?void 0:h.wrapper)}),styles:Object.assign(Object.assign({},R==null?void 0:R.styles),p),panelRef:le,destroyOnClose:x??$}),g?y(Ma,{active:!0,title:!1,paragraph:{rows:4},className:`${E}-body-skeleton`}):m))))},tN=t=>{const{componentCls:e,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=t,u=`${e}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},zo()),[`&${e} ${e}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(s).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS,maxWidth:`calc(100% - ${q(t.marginSM)})`},[`${t.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${q(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${u}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:t.colorText,fontSize:o,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${u}-error ${u}-body > ${t.iconCls}`]:{color:t.colorError},[`${u}-warning ${u}-body > ${t.iconCls}, + ${u}-confirm ${u}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${u}-info ${u}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${u}-success ${u}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},nN=Qs(["Modal","confirm"],t=>{const e=Ew(t);return tN(e)},Aw,{order:-1e3});var rN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iO,Pe(Object.values(O))),C=y(At,null,y(Zb,null),y(qb,null)),b=t.title!==void 0&&t.title!==null,x=`${o}-body`;return y("div",{className:`${o}-body-wrapper`},y("div",{className:Z(x,{[`${x}-has-title`]:b})},d,y("div",{className:`${o}-paragraph`},b&&y("span",{className:`${o}-title`},t.title),y("div",{className:`${o}-content`},t.content))),l===void 0||typeof l=="function"?y(fw,{value:S},y("div",{className:`${o}-btns`},typeof l=="function"?l(C,{OkBtn:qb,CancelBtn:Zb}):C)):l,y(nN,{prefixCls:e}))}const iN=t=>{const{close:e,zIndex:n,maskStyle:r,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=t,f=`${o}-confirm`,h=t.width||416,p=t.style||{},m=t.mask===void 0?!0:t.mask,g=t.maskClosable===void 0?!1:t.maskClosable,v=Z(f,`${f}-${t.type}`,{[`${f}-rtl`]:i==="rtl"},t.className),[,O]=$r(),S=me(()=>n!==void 0?n:O.zIndexPopupBase+J$,[n,O]);return y(Nw,Object.assign({},t,{className:v,wrapClassName:Z({[`${f}-centered`]:!!t.centered},a),onCancel:()=>{e==null||e({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:Lo(s||"","zoom",t.transitionName),maskTransitionName:Lo(s||"","fade",t.maskTransitionName),mask:m,maskClosable:g,style:p,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:S,closable:c}),y(zw,Object.assign({},t,{confirmPrefixCls:f})))},Lw=t=>{const{rootPrefixCls:e,iconPrefixCls:n,direction:r,theme:i}=t;return y(Yr,{prefixCls:e,iconPrefixCls:n,direction:r,theme:i},y(iN,Object.assign({},t)))},la=[];let jw="";function Dw(){return jw}const oN=t=>{var e,n;const{prefixCls:r,getContainer:i,direction:o}=t,a=m$(),s=de(at),l=Dw()||s.getPrefixCls(),c=r||`${l}-modal`;let u=i;return u===!1&&(u=void 0),oe.createElement(Lw,Object.assign({},t,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:o??s.direction,locale:(n=(e=s.locale)===null||e===void 0?void 0:e.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function Pc(t){const e=V$(),n=document.createDocumentFragment();let r=Object.assign(Object.assign({},t),{close:l,open:!0}),i,o;function a(...u){var d;if(u.some(p=>p==null?void 0:p.triggerCancel)){var h;(d=t.onCancel)===null||d===void 0||(h=d).call.apply(h,[t,()=>{}].concat(Pe(u.slice(1))))}for(let p=0;p{const d=e.getPrefixCls(void 0,Dw()),f=e.getIconPrefixCls(),h=e.getTheme(),p=oe.createElement(oN,Object.assign({},u));o=Dv()(oe.createElement(Yr,{prefixCls:d,iconPrefixCls:f,theme:h},e.holderRender?e.holderRender(p):p),n)})}function l(...u){r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof t.afterClose=="function"&&t.afterClose(),a.apply(this,u)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),la.push(l),{destroy:l,update:c}}function Bw(t){return Object.assign(Object.assign({},t),{type:"warning"})}function Ww(t){return Object.assign(Object.assign({},t),{type:"info"})}function Fw(t){return Object.assign(Object.assign({},t),{type:"success"})}function Vw(t){return Object.assign(Object.assign({},t),{type:"error"})}function Hw(t){return Object.assign(Object.assign({},t),{type:"confirm"})}function aN({rootPrefixCls:t}){jw=t}var sN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,{afterClose:r,config:i}=t,o=sN(t,["afterClose","config"]);const[a,s]=K(!0),[l,c]=K(i),{direction:u,getPrefixCls:d}=de(at),f=d("modal"),h=d(),p=()=>{var O;r(),(O=l.afterClose)===null||O===void 0||O.call(l)},m=(...O)=>{var S;if(s(!1),O.some(x=>x==null?void 0:x.triggerCancel)){var b;(S=l.onCancel)===null||S===void 0||(b=S).call.apply(b,[l,()=>{}].concat(Pe(O.slice(1))))}};Yt(e,()=>({destroy:m,update:O=>{c(S=>{const C=typeof O=="function"?O(S):O;return Object.assign(Object.assign({},S),C)})}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[v]=Ki("Modal",Zi.Modal);return y(Lw,Object.assign({prefixCls:f,rootPrefixCls:h},l,{close:m,open:a,afterClose:p,okText:l.okText||(g?v==null?void 0:v.okText:v==null?void 0:v.justOkText),direction:l.direction||u,cancelText:l.cancelText||(v==null?void 0:v.cancelText)},o))},cN=ye(lN);let yy=0;const uN=Ra(ye((t,e)=>{const[n,r]=nA();return Yt(e,()=>({patchElement:r}),[]),y(At,null,n)}));function dN(){const t=Y(null),[e,n]=K([]);be(()=>{e.length&&(Pe(e).forEach(a=>{a()}),n([]))},[e]);const r=Ht(o=>function(s){var l;yy+=1;const c=sv();let u;const d=new Promise(g=>{u=g});let f=!1,h;const p=y(cN,{key:`modal-${yy}`,config:o(s),ref:c,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:g=>{u(g)}});return h=(l=t.current)===null||l===void 0?void 0:l.patchElement(p),h&&la.push(h),{destroy:()=>{function g(){var v;(v=c.current)===null||v===void 0||v.destroy()}c.current?g():n(v=>[].concat(Pe(v),[g]))},update:g=>{function v(){var O;(O=c.current)===null||O===void 0||O.update(g)}c.current?v():n(O=>[].concat(Pe(O),[v]))},then:g=>(f=!0,d.then(g))}},[]);return[me(()=>({info:r(Ww),success:r(Fw),error:r(Vw),warning:r(Bw),confirm:r(Hw)}),[]),y(uN,{key:"modal-holder",ref:t})]}const fN=t=>{const{componentCls:e,notificationMarginEdge:n,animationMaxHeight:r}=t,i=`${e}-notice`,o=new _t("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new _t("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}}),s=new _t("antNotificationBottomFadeIn",{"0%":{bottom:t.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),l=new _t("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[e]:{[`&${e}-top, &${e}-bottom`]:{marginInline:0,[i]:{marginInline:"auto auto"}},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:s}},[`&${e}-topRight, &${e}-bottomRight`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:"auto",marginInlineStart:0},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:l}}}}},hN=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],pN={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},mN=(t,e)=>{const{componentCls:n}=t;return{[`${n}-${e}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[e.startsWith("top")?"top":"bottom"]:0,[pN[e]]:{value:0,_skip_check_:!0}}}}},gN=t=>{const e={};for(let n=1;n ${t.componentCls}-notice`]:{opacity:0,transition:`opacity ${t.motionDurationMid}`}};return Object.assign({[`&:not(:nth-last-child(-n+${t.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},e)},vN=t=>{const e={};for(let n=1;n{const{componentCls:e}=t;return Object.assign({[`${e}-stack`]:{[`& > ${e}-notice-wrapper`]:Object.assign({transition:`transform ${t.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute"},gN(t))},[`${e}-stack:not(${e}-stack-expanded)`]:{[`& > ${e}-notice-wrapper`]:Object.assign({},vN(t))},[`${e}-stack${e}-stack-expanded`]:{[`& > ${e}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${t.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:t.margin,width:"100%",insetInline:0,bottom:t.calc(t.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},hN.map(n=>mN(t,n)).reduce((n,r)=>Object.assign(Object.assign({},n),r),{}))},Xw=t=>{const{iconCls:e,componentCls:n,boxShadow:r,fontSizeLG:i,notificationMarginBottom:o,borderRadiusLG:a,colorSuccess:s,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:p,notificationProgressBg:m,notificationProgressHeight:g,fontSize:v,lineHeight:O,width:S,notificationIconSize:C,colorText:b}=t,x=`${n}-notice`;return{position:"relative",marginBottom:o,marginInlineStart:"auto",background:f,borderRadius:a,boxShadow:r,[x]:{padding:h,width:S,maxWidth:`calc(100vw - ${q(t.calc(p).mul(2).equal())})`,overflow:"hidden",lineHeight:O,wordWrap:"break-word"},[`${x}-message`]:{color:d,fontSize:i,lineHeight:t.lineHeightLG},[`${x}-description`]:{fontSize:v,color:b,marginTop:t.marginXS},[`${x}-closable ${x}-message`]:{paddingInlineEnd:t.paddingLG},[`${x}-with-icon ${x}-message`]:{marginInlineStart:t.calc(t.marginSM).add(C).equal(),fontSize:i},[`${x}-with-icon ${x}-description`]:{marginInlineStart:t.calc(t.marginSM).add(C).equal(),fontSize:v},[`${x}-icon`]:{position:"absolute",fontSize:C,lineHeight:1,[`&-success${e}`]:{color:s},[`&-info${e}`]:{color:l},[`&-warning${e}`]:{color:c},[`&-error${e}`]:{color:u}},[`${x}-close`]:Object.assign({position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:t.colorIconHover,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},Ci(t)),[`${x}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${q(a)} * 2)`,left:{_skip_check_:!0,value:a},right:{_skip_check_:!0,value:a},bottom:0,blockSize:g,border:0,"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:m},"&::-webkit-progress-value":{borderRadius:a,background:m}},[`${x}-actions`]:{float:"right",marginTop:t.marginSM}}},bN=t=>{const{componentCls:e,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:i,motionEaseInOut:o}=t,a=`${e}-notice`,s=new _t("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[e]:Object.assign(Object.assign({},wn(t)),{position:"fixed",zIndex:t.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${e}-hook-holder`]:{position:"relative"},[`${e}-fade-appear-prepare`]:{opacity:"0 !important"},[`${e}-fade-enter, ${e}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:o,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${e}-fade-leave`]:{animationTimingFunction:o,animationFillMode:"both",animationDuration:i,animationPlayState:"paused"},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationPlayState:"running"},[`${e}-fade-leave${e}-fade-leave-active`]:{animationName:s,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${a}-actions`]:{float:"left"}}})},{[e]:{[`${a}-wrapper`]:Object.assign({},Xw(t))}}]},Zw=t=>({zIndexPopup:t.zIndexPopupBase+J$+50,width:384}),qw=t=>{const e=t.paddingMD,n=t.paddingLG;return kt(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:n,notificationIconSize:t.calc(t.fontSizeLG).mul(t.lineHeightLG).equal(),notificationCloseButtonSize:t.calc(t.controlHeightLG).mul(.55).equal(),notificationMarginBottom:t.margin,notificationPadding:`${q(t.paddingMD)} ${q(t.paddingContentHorizontalLG)}`,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2,notificationProgressBg:`linear-gradient(90deg, ${t.colorPrimaryBorderHover}, ${t.colorPrimary})`})},Gw=Zt("Notification",t=>{const e=qw(t);return[bN(e),fN(e),ON(e)]},Zw),yN=Qs(["Notification","PurePanel"],t=>{const e=`${t.componentCls}-notice`,n=qw(t);return{[`${e}-pure-panel`]:Object.assign(Object.assign({},Xw(n)),{width:n.width,maxWidth:`calc(100vw - ${q(t.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0})}},Zw);var SN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,icon:n,type:r,message:i,description:o,actions:a,role:s="alert"}=t;let l=null;return n?l=y("span",{className:`${e}-icon`},n):r&&(l=y(xN[r]||null,{className:Z(`${e}-icon`,`${e}-icon-${r}`)})),y("div",{className:Z({[`${e}-with-icon`]:l}),role:s},l,y("div",{className:`${e}-message`},i),o&&y("div",{className:`${e}-description`},o),a&&y("div",{className:`${e}-actions`},a))},CN=t=>{const{prefixCls:e,className:n,icon:r,type:i,message:o,description:a,btn:s,actions:l,closable:c=!0,closeIcon:u,className:d}=t,f=SN(t,["prefixCls","className","icon","type","message","description","btn","actions","closable","closeIcon","className"]),{getPrefixCls:h}=de(at),p=l??s,m=e||h("notification"),g=`${m}-notice`,v=wr(m),[O,S,C]=Gw(m,v);return O(y("div",{className:Z(`${g}-pure-panel`,S,n,C,v)},y(yN,{prefixCls:m}),y(U$,Object.assign({},f,{prefixCls:m,eventKey:"pure",duration:null,closable:c,className:Z({notificationClassName:d}),closeIcon:o0(m,u),content:y(Yw,{prefixCls:g,icon:r,type:i,message:o,description:a,actions:p})}))))};function $N(t,e,n){let r;switch(t){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":r={left:0,top:e,bottom:"auto"};break;case"topRight":r={right:0,top:e,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function wN(t){return{motionName:`${t}-fade`}}function PN(t,e,n){return typeof t<"u"?t:typeof(e==null?void 0:e.closeIcon)<"u"?e.closeIcon:n==null?void 0:n.closeIcon}var _N=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=wr(e),[r,i,o]=Gw(e,n);return r(oe.createElement(W5,{classNames:{list:Z(i,o,n)}},t))},IN=(t,{prefixCls:e,key:n})=>oe.createElement(RN,{prefixCls:e,key:n},t),MN=oe.forwardRef((t,e)=>{const{top:n,bottom:r,prefixCls:i,getContainer:o,maxCount:a,rtl:s,onAllRemoved:l,stack:c,duration:u,pauseOnHover:d=!0,showProgress:f}=t,{getPrefixCls:h,getPopupContainer:p,notification:m,direction:g}=de(at),[,v]=$r(),O=i||h("notification"),S=w=>$N(w,n??Sy,r??Sy),C=()=>Z({[`${O}-rtl`]:s??g==="rtl"}),b=()=>wN(O),[x,$]=Y5({prefixCls:O,style:S,className:C,motion:b,closable:!0,closeIcon:o0(O),duration:u??TN,getContainer:()=>(o==null?void 0:o())||(p==null?void 0:p())||document.body,maxCount:a,pauseOnHover:d,showProgress:f,onAllRemoved:l,renderNotifications:IN,stack:c===!1?!1:{threshold:typeof c=="object"?c==null?void 0:c.threshold:void 0,offset:8,gap:v.margin}});return oe.useImperativeHandle(e,()=>Object.assign(Object.assign({},x),{prefixCls:O,notification:m})),$});function Uw(t){const e=oe.useRef(null);return bc(),[oe.useMemo(()=>{const r=s=>{var l;if(!e.current)return;const{open:c,prefixCls:u,notification:d}=e.current,f=`${u}-notice`,{message:h,description:p,icon:m,type:g,btn:v,actions:O,className:S,style:C,role:b="alert",closeIcon:x,closable:$}=s,w=_N(s,["message","description","icon","type","btn","actions","className","style","role","closeIcon","closable"]),P=O??v,_=o0(f,PN(x,t,d));return c(Object.assign(Object.assign({placement:(l=t==null?void 0:t.placement)!==null&&l!==void 0?l:kN},w),{content:oe.createElement(Yw,{prefixCls:f,icon:m,type:g,message:h,description:p,actions:P,role:b}),className:Z(g&&`${f}-${g}`,S,d==null?void 0:d.className),style:Object.assign(Object.assign({},d==null?void 0:d.style),C),closeIcon:_,closable:$??!!_}))},o={open:r,destroy:s=>{var l,c;s!==void 0?(l=e.current)===null||l===void 0||l.close(s):(c=e.current)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(s=>{o[s]=l=>r(Object.assign(Object.assign({},l),{type:s}))}),o},[]),oe.createElement(MN,Object.assign({key:"notification-holder"},t,{ref:e}))]}function EN(t){return Uw(t)}const AN=oe.createContext({});function Kw(t){return e=>y(Yr,{theme:{token:{motion:!1,zIndexPopupBase:0}}},y(t,Object.assign({},e)))}const Jw=(t,e,n,r,i)=>Kw(a=>{const{prefixCls:s,style:l}=a,c=Y(null),[u,d]=K(0),[f,h]=K(0),[p,m]=_n(!1,{value:a.open}),{getPrefixCls:g}=de(at),v=g(r||"select",s);be(()=>{if(m(!0),typeof ResizeObserver<"u"){const C=new ResizeObserver(x=>{const $=x[0].target;d($.offsetHeight+8),h($.offsetWidth)}),b=setInterval(()=>{var x;const $=i?`.${i(v)}`:`.${v}-dropdown`,w=(x=c.current)===null||x===void 0?void 0:x.querySelector($);w&&(clearInterval(b),C.observe(w))},10);return()=>{clearInterval(b),C.disconnect()}}},[]);let O=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:p,visible:p,getPopupContainer:()=>c.current});return e&&Object.assign(O,{[e]:{overflow:{adjustX:!1,adjustY:!1}}}),y("div",{ref:c,style:{paddingBottom:u,position:"relative",minWidth:f}},y(t,Object.assign({},O)))}),a0=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substr(0,4))};var Wf=function(e){var n=e.className,r=e.customizeIcon,i=e.customizeIconProps,o=e.children,a=e.onMouseDown,s=e.onClick,l=typeof r=="function"?r(i):r;return y("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:y("span",{className:Z(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},o))},QN=function(e,n,r,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=oe.useMemo(function(){if(tt(i)==="object")return i.clearIcon;if(o)return o},[i,o]),u=oe.useMemo(function(){return!!(!a&&i&&(r.length||s)&&!(l==="combobox"&&s===""))},[i,a,r.length,s,l]);return{allowClear:u,clearIcon:oe.createElement(Wf,{className:"".concat(e,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},e2=yt(null);function NN(){return de(e2)}function zN(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=K(!1),n=ae(e,2),r=n[0],i=n[1],o=Y(null),a=function(){window.clearTimeout(o.current)};be(function(){return a},[]);var s=function(c,u){a(),o.current=window.setTimeout(function(){i(c),u&&u()},t)};return[r,s,a]}function t2(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=Y(null),n=Y(null);be(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||e.current===null)&&(e.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},r]}function LN(t,e,n,r){var i=Y(null);i.current={open:e,triggerOpen:n,customizedTrigger:r},be(function(){function o(a){var s;if(!((s=i.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),i.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function jN(t){return t&&![Ve.ESC,Ve.SHIFT,Ve.BACKSPACE,Ve.TAB,Ve.WIN_KEY,Ve.ALT,Ve.META,Ve.WIN_KEY_RIGHT,Ve.CTRL,Ve.SEMICOLON,Ve.EQUALS,Ve.CAPS_LOCK,Ve.CONTEXT_MENU,Ve.F1,Ve.F2,Ve.F3,Ve.F4,Ve.F5,Ve.F6,Ve.F7,Ve.F8,Ve.F9,Ve.F10,Ve.F11,Ve.F12].includes(t)}var DN=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],La=void 0;function BN(t,e){var n=t.prefixCls,r=t.invalidate,i=t.item,o=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,d=t.style,f=t.children,h=t.display,p=t.order,m=t.component,g=m===void 0?"div":m,v=dt(t,DN),O=a&&!h;function S(w){l(c,w)}be(function(){return function(){S(null)}},[]);var C=o&&i!==La?o(i,{index:p}):f,b;r||(b={opacity:O?0:1,height:O?0:La,overflowY:O?"hidden":La,order:a?p:La,pointerEvents:O?"none":La,position:O?"absolute":La});var x={};O&&(x["aria-hidden"]=!0);var $=y(g,xe({className:Z(!r&&n,u),style:W(W({},b),d)},x,v,{ref:e}),C);return a&&($=y(Jr,{onResize:function(P){var _=P.offsetWidth;S(_)},disabled:s},$)),$}var Cl=ye(BN);Cl.displayName="Item";function WN(t){if(typeof MessageChannel>"u")Xt(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function FN(){var t=Y(null),e=function(r){t.current||(t.current=[],WN(function(){bv(function(){t.current.forEach(function(i){i()}),t.current=null})})),t.current.push(r)};return e}function Ks(t,e){var n=K(e),r=ae(n,2),i=r[0],o=r[1],a=pn(function(s){t(function(){o(s)})});return[i,a]}var _d=oe.createContext(null),VN=["component"],HN=["className"],XN=["className"],ZN=function(e,n){var r=de(_d);if(!r){var i=e.component,o=i===void 0?"div":i,a=dt(e,VN);return y(o,xe({},a,{ref:n}))}var s=r.className,l=dt(r,HN),c=e.className,u=dt(e,XN);return y(_d.Provider,{value:null},y(Cl,xe({ref:n,className:Z(s,c)},l,u)))},n2=ye(ZN);n2.displayName="RawItem";var qN=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],r2="responsive",i2="invalidate";function GN(t){return"+ ".concat(t.length," ...")}function YN(t,e){var n=t.prefixCls,r=n===void 0?"rc-overflow":n,i=t.data,o=i===void 0?[]:i,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,d=t.ssr,f=t.style,h=t.className,p=t.maxCount,m=t.renderRest,g=t.renderRawRest,v=t.suffix,O=t.component,S=O===void 0?"div":O,C=t.itemComponent,b=t.onVisibleChange,x=dt(t,qN),$=d==="full",w=FN(),P=Ks(w,null),_=ae(P,2),T=_[0],k=_[1],R=T||0,I=Ks(w,new Map),Q=ae(I,2),E=Q[0],A=Q[1],N=Ks(w,0),L=ae(N,2),z=L[0],V=L[1],X=Ks(w,0),F=ae(X,2),H=F[0],B=F[1],G=Ks(w,0),se=ae(G,2),ie=se[0],le=se[1],pe=K(null),ne=ae(pe,2),ee=ne[0],ce=ne[1],ue=K(null),j=ae(ue,2),J=j[0],he=j[1],ge=me(function(){return J===null&&$?Number.MAX_SAFE_INTEGER:J||0},[J,T]),$e=K(!1),Te=ae($e,2),Ce=Te[0],Ie=Te[1],_e="".concat(r,"-item"),ve=Math.max(z,H),Ne=p===r2,ze=o.length&&Ne,re=p===i2,fe=ze||typeof p=="number"&&o.length>p,te=me(function(){var nt=o;return ze?T===null&&$?nt=o:nt=o.slice(0,Math.min(o.length,R/u)):typeof p=="number"&&(nt=o.slice(0,p)),nt},[o,u,T,p,ze]),Oe=me(function(){return ze?o.slice(ge+1):o.slice(te.length)},[o,te,ze,ge]),we=Ht(function(nt,it){var Qe;return typeof l=="function"?l(nt):(Qe=l&&(nt==null?void 0:nt[l]))!==null&&Qe!==void 0?Qe:it},[l]),Ke=Ht(a||function(nt){return nt},[a]);function Ae(nt,it,Qe){J===nt&&(it===void 0||it===ee)||(he(nt),Qe||(Ie(ntR){Ae(st-1,nt-ft-ie+H);break}}v&&ot(0)+ie>R&&ce(null)}},[R,E,H,ie,we,te]);var ut=Ce&&!!Oe.length,Pn={};ee!==null&&ze&&(Pn={position:"absolute",left:ee,top:0});var qt={prefixCls:_e,responsive:ze,component:C,invalidate:re},xn=s?function(nt,it){var Qe=we(nt,it);return y(_d.Provider,{key:Qe,value:W(W({},qt),{},{order:it,item:nt,itemKey:Qe,registerSize:Fe,display:it<=ge})},s(nt,it))}:function(nt,it){var Qe=we(nt,it);return y(Cl,xe({},qt,{order:it,key:Qe,item:nt,renderItem:Ke,itemKey:Qe,registerSize:Fe,display:it<=ge}))},gn={order:ut?ge:Number.MAX_SAFE_INTEGER,className:"".concat(_e,"-rest"),registerSize:Re,display:ut},Bt=m||GN,bt=g?y(_d.Provider,{value:W(W({},qt),gn)},g(Oe)):y(Cl,xe({},qt,gn),typeof Bt=="function"?Bt(Oe):Bt),pt=y(S,xe({className:Z(!re&&r,h),style:f,ref:e},x),te.map(xn),fe?bt:null,v&&y(Cl,xe({},qt,{responsive:Ne,responsiveDisabled:!ze,order:ge,className:"".concat(_e,"-suffix"),registerSize:ke,display:!0,style:Pn}),v));return Ne?y(Jr,{onResize:Me,disabled:!ze},pt):pt}var Hi=ye(YN);Hi.displayName="Overflow";Hi.Item=n2;Hi.RESPONSIVE=r2;Hi.INVALIDATE=i2;function UN(t,e,n){var r=W(W({},t),e);return Object.keys(e).forEach(function(i){var o=e[i];typeof o=="function"&&(r[i]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;cS&&(Te="".concat(Ce.slice(0,S),"..."))}var Ie=function(ve){ve&&ve.stopPropagation(),w(j)};return typeof x=="function"?le(ge,Te,J,$e,Ie):ie(j,Te,J,$e,Ie)},ne=function(j){if(!i.length)return null;var J=typeof b=="function"?b(j):b;return typeof x=="function"?le(void 0,J,!1,!1,void 0,!0):ie({title:J},J,!1)},ee=y("div",{className:"".concat(B,"-search"),style:{width:L},onFocus:function(){H(!0)},onBlur:function(){H(!1)}},y(o2,{ref:l,open:o,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:h,autoComplete:p,editable:se,activeDescendantId:m,value:G,onKeyDown:T,onMouseDown:k,onChange:P,onPaste:_,onCompositionStart:R,onCompositionEnd:I,onBlur:Q,tabIndex:g,attrs:$i(e,!0)}),y("span",{ref:E,className:"".concat(B,"-search-mirror"),"aria-hidden":!0},G," ")),ce=y(Hi,{prefixCls:"".concat(B,"-overflow"),data:i,renderItem:pe,renderRest:ne,suffix:ee,itemKey:oz,maxCount:O});return y("span",{className:"".concat(B,"-wrap")},ce,!i.length&&!G&&y("span",{className:"".concat(B,"-placeholder")},c))},sz=function(e){var n=e.inputElement,r=e.prefixCls,i=e.id,o=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,h=e.placeholder,p=e.tabIndex,m=e.showSearch,g=e.searchValue,v=e.activeValue,O=e.maxLength,S=e.onInputKeyDown,C=e.onInputMouseDown,b=e.onInputChange,x=e.onInputPaste,$=e.onInputCompositionStart,w=e.onInputCompositionEnd,P=e.onInputBlur,_=e.title,T=K(!1),k=ae(T,2),R=k[0],I=k[1],Q=u==="combobox",E=Q||m,A=f[0],N=g||"";Q&&v&&!R&&(N=v),be(function(){Q&&I(!1)},[Q,v]);var L=u!=="combobox"&&!d&&!m?!1:!!N,z=_===void 0?s2(A):_,V=me(function(){return A?null:y("span",{className:"".concat(r,"-selection-placeholder"),style:L?{visibility:"hidden"}:void 0},h)},[A,L,h,r]);return y("span",{className:"".concat(r,"-selection-wrap")},y("span",{className:"".concat(r,"-selection-search")},y(o2,{ref:o,prefixCls:r,id:i,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:E,activeDescendantId:c,value:N,onKeyDown:S,onMouseDown:C,onChange:function(F){I(!0),b(F)},onPaste:x,onCompositionStart:$,onCompositionEnd:w,onBlur:P,tabIndex:p,attrs:$i(e,!0),maxLength:Q?O:void 0})),!Q&&A?y("span",{className:"".concat(r,"-selection-item"),title:z,style:L?{visibility:"hidden"}:void 0},A.label):null,V)},lz=function(e,n){var r=Y(null),i=Y(!1),o=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,d=e.prefix,f=e.autoClearSearchValue,h=e.onSearch,p=e.onSearchSubmit,m=e.onToggleOpen,g=e.onInputKeyDown,v=e.onInputBlur,O=e.domRef;Yt(n,function(){return{focus:function(z){r.current.focus(z)},blur:function(){r.current.blur()}}});var S=t2(0),C=ae(S,2),b=C[0],x=C[1],$=function(z){var V=z.which,X=r.current instanceof HTMLTextAreaElement;!X&&a&&(V===Ve.UP||V===Ve.DOWN)&&z.preventDefault(),g&&g(z),V===Ve.ENTER&&s==="tags"&&!i.current&&!a&&(p==null||p(z.target.value)),!(X&&!a&&~[Ve.UP,Ve.DOWN,Ve.LEFT,Ve.RIGHT].indexOf(V))&&jN(V)&&m(!0)},w=function(){x(!0)},P=Y(null),_=function(z){h(z,!0,i.current)!==!1&&m(!0)},T=function(){i.current=!0},k=function(z){i.current=!1,s!=="combobox"&&_(z.target.value)},R=function(z){var V=z.target.value;if(c&&P.current&&/[\r\n]/.test(P.current)){var X=P.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");V=V.replace(X,P.current)}P.current=null,_(V)},I=function(z){var V=z.clipboardData,X=V==null?void 0:V.getData("text");P.current=X||""},Q=function(z){var V=z.target;if(V!==r.current){var X=document.body.style.msTouchAction!==void 0;X?setTimeout(function(){r.current.focus()}):r.current.focus()}},E=function(z){var V=b();z.target!==r.current&&!V&&!(s==="combobox"&&u)&&z.preventDefault(),(s!=="combobox"&&(!l||!V)||!a)&&(a&&f!==!1&&h("",!0,!1),m())},A={inputRef:r,onInputKeyDown:$,onInputMouseDown:w,onInputChange:R,onInputPaste:I,onInputCompositionStart:T,onInputCompositionEnd:k,onInputBlur:v},N=s==="multiple"||s==="tags"?y(az,xe({},e,A)):y(sz,xe({},e,A));return y("div",{ref:O,className:"".concat(o,"-selector"),onClick:Q,onMouseDown:E},d&&y("div",{className:"".concat(o,"-prefix")},d),N)},cz=ye(lz);function uz(t){var e=t.prefixCls,n=t.align,r=t.arrow,i=t.arrowPos,o=r||{},a=o.className,s=o.content,l=i.x,c=l===void 0?0:l,u=i.y,d=u===void 0?0:u,f=Y();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var p=n.points[0],m=n.points[1],g=p[0],v=p[1],O=m[0],S=m[1];g===O||!["t","b"].includes(g)?h.top=d:g==="t"?h.top=0:h.bottom=0,v===S||!["l","r"].includes(v)?h.left=c:v==="l"?h.left=0:h.right=0}return y("div",{ref:f,className:Z("".concat(e,"-arrow"),a),style:h},s)}function dz(t){var e=t.prefixCls,n=t.open,r=t.zIndex,i=t.mask,o=t.motion;return i?y(mi,xe({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return y("div",{style:{zIndex:r},className:Z("".concat(e,"-mask"),s)})}):null}var fz=Ra(function(t){var e=t.children;return e},function(t,e){return e.cache}),hz=ye(function(t,e){var n=t.popup,r=t.className,i=t.prefixCls,o=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,d=t.onClick,f=t.mask,h=t.arrow,p=t.arrowPos,m=t.align,g=t.motion,v=t.maskMotion,O=t.forceRender,S=t.getPopupContainer,C=t.autoDestroy,b=t.portal,x=t.zIndex,$=t.onMouseEnter,w=t.onMouseLeave,P=t.onPointerEnter,_=t.onPointerDownCapture,T=t.ready,k=t.offsetX,R=t.offsetY,I=t.offsetR,Q=t.offsetB,E=t.onAlign,A=t.onPrepare,N=t.stretch,L=t.targetWidth,z=t.targetHeight,V=typeof n=="function"?n():n,X=l||c,F=(S==null?void 0:S.length)>0,H=K(!S||!F),B=ae(H,2),G=B[0],se=B[1];if(Nt(function(){!G&&F&&a&&se(!0)},[G,F,a]),!G)return null;var ie="auto",le={left:"-1000vw",top:"-1000vh",right:ie,bottom:ie};if(T||!l){var pe,ne=m.points,ee=m.dynamicInset||((pe=m._experimental)===null||pe===void 0?void 0:pe.dynamicInset),ce=ee&&ne[0][1]==="r",ue=ee&&ne[0][0]==="b";ce?(le.right=I,le.left=ie):(le.left=k,le.right=ie),ue?(le.bottom=Q,le.top=ie):(le.top=R,le.bottom=ie)}var j={};return N&&(N.includes("height")&&z?j.height=z:N.includes("minHeight")&&z&&(j.minHeight=z),N.includes("width")&&L?j.width=L:N.includes("minWidth")&&L&&(j.minWidth=L)),l||(j.pointerEvents="none"),y(b,{open:O||X,getContainer:S&&function(){return S(a)},autoDestroy:C},y(dz,{prefixCls:i,open:l,zIndex:x,mask:f,motion:v}),y(Jr,{onResize:E,disabled:!l},function(J){return y(mi,xe({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:O,leavedClassName:"".concat(i,"-hidden")},g,{onAppearPrepare:A,onEnterPrepare:A,visible:l,onVisibleChanged:function(ge){var $e;g==null||($e=g.onVisibleChanged)===null||$e===void 0||$e.call(g,ge),s(ge)}}),function(he,ge){var $e=he.className,Te=he.style,Ce=Z(i,$e,r);return y("div",{ref:mr(J,e,ge),className:Ce,style:W(W(W(W({"--arrow-x":"".concat(p.x||0,"px"),"--arrow-y":"".concat(p.y||0,"px")},le),j),Te),{},{boxSizing:"border-box",zIndex:x},o),onMouseEnter:$,onMouseLeave:w,onPointerEnter:P,onClick:d,onPointerDownCapture:_},h&&y(uz,{prefixCls:i,arrow:h,arrowPos:p,align:m}),y(fz,{cache:!l&&!u},V))})}))}),pz=ye(function(t,e){var n=t.children,r=t.getTriggerDOMNode,i=vo(n),o=Ht(function(s){xv(e,r?r(s):s)},[r]),a=go(o,Xo(n));return i?Zn(n,{ref:a}):n}),$y=yt(null);function wy(t){return t?Array.isArray(t)?t:[t]:[]}function mz(t,e,n,r){return me(function(){var i=wy(n??e),o=wy(r??e),a=new Set(i),s=new Set(o);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,n,r])}function gz(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function vz(t,e,n,r){for(var i=n.points,o=Object.keys(t),a=0;a1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function Js(t){return Xl(parseFloat(t),0)}function _y(t,e){var n=W({},t);return(e||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=_c(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,l=i.borderBottomWidth,c=i.borderLeftWidth,u=i.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,h=r.clientHeight,p=r.offsetWidth,m=r.clientWidth,g=Js(s),v=Js(l),O=Js(c),S=Js(u),C=Xl(Math.round(d.width/p*1e3)/1e3),b=Xl(Math.round(d.height/f*1e3)/1e3),x=(p-m-O-S)*C,$=(f-h-g-v)*b,w=g*b,P=v*b,_=O*C,T=S*C,k=0,R=0;if(o==="clip"){var I=Js(a);k=I*C,R=I*b}var Q=d.x+_-k,E=d.y+w-R,A=Q+d.width+2*k-_-T-x,N=E+d.height+2*R-w-P-$;n.left=Math.max(n.left,Q),n.top=Math.max(n.top,E),n.right=Math.min(n.right,A),n.bottom=Math.min(n.bottom,N)}}),n}function Ty(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(e),r=n.match(/^(.*)\%$/);return r?t*(parseFloat(r[1])/100):parseFloat(n)}function ky(t,e){var n=e||[],r=ae(n,2),i=r[0],o=r[1];return[Ty(t.width,i),Ty(t.height,o)]}function Ry(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function ja(t,e){var n=e[0],r=e[1],i,o;return n==="t"?o=t.y:n==="b"?o=t.y+t.height:o=t.y+t.height/2,r==="l"?i=t.x:r==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function So(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map(function(r,i){return i===e?n[r]||"c":r}).join("")}function Oz(t,e,n,r,i,o,a){var s=K({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=ae(s,2),c=l[0],u=l[1],d=Y(0),f=me(function(){return e?Bm(e):[]},[e]),h=Y({}),p=function(){h.current={}};t||p();var m=pn(function(){if(e&&n&&t){let Ir=function(Ea,yo){var Aa=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ne,Fc=X.x+Ea,Vc=X.y+yo,mh=Fc+ue,et=Vc+ce,gt=Math.max(Fc,Aa.left),On=Math.max(Vc,Aa.top),Tn=Math.min(mh,Aa.right),bn=Math.min(et,Aa.bottom);return Math.max(0,(Tn-gt)*(bn-On))},Go=function(){un=X.y+st,Cn=un+ce,jn=X.x+Qe,Ut=jn+ue};var xO=Ir,Wc=Go,O,S,C,b,x=e,$=x.ownerDocument,w=_c(x),P=w.getComputedStyle(x),_=P.position,T=x.style.left,k=x.style.top,R=x.style.right,I=x.style.bottom,Q=x.style.overflow,E=W(W({},i[r]),o),A=$.createElement("div");(O=x.parentElement)===null||O===void 0||O.appendChild(A),A.style.left="".concat(x.offsetLeft,"px"),A.style.top="".concat(x.offsetTop,"px"),A.style.position=_,A.style.height="".concat(x.offsetHeight,"px"),A.style.width="".concat(x.offsetWidth,"px"),x.style.left="0",x.style.top="0",x.style.right="auto",x.style.bottom="auto",x.style.overflow="hidden";var N;if(Array.isArray(n))N={x:n[0],y:n[1],width:0,height:0};else{var L,z,V=n.getBoundingClientRect();V.x=(L=V.x)!==null&&L!==void 0?L:V.left,V.y=(z=V.y)!==null&&z!==void 0?z:V.top,N={x:V.x,y:V.y,width:V.width,height:V.height}}var X=x.getBoundingClientRect(),F=w.getComputedStyle(x),H=F.height,B=F.width;X.x=(S=X.x)!==null&&S!==void 0?S:X.left,X.y=(C=X.y)!==null&&C!==void 0?C:X.top;var G=$.documentElement,se=G.clientWidth,ie=G.clientHeight,le=G.scrollWidth,pe=G.scrollHeight,ne=G.scrollTop,ee=G.scrollLeft,ce=X.height,ue=X.width,j=N.height,J=N.width,he={left:0,top:0,right:se,bottom:ie},ge={left:-ee,top:-ne,right:le-ee,bottom:pe-ne},$e=E.htmlRegion,Te="visible",Ce="visibleFirst";$e!=="scroll"&&$e!==Ce&&($e=Te);var Ie=$e===Ce,_e=_y(ge,f),ve=_y(he,f),Ne=$e===Te?ve:_e,ze=Ie?ve:Ne;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";var re=x.getBoundingClientRect();x.style.left=T,x.style.top=k,x.style.right=R,x.style.bottom=I,x.style.overflow=Q,(b=x.parentElement)===null||b===void 0||b.removeChild(A);var fe=Xl(Math.round(ue/parseFloat(B)*1e3)/1e3),te=Xl(Math.round(ce/parseFloat(H)*1e3)/1e3);if(fe===0||te===0||Nl(n)&&!If(n))return;var Oe=E.offset,we=E.targetOffset,Ke=ky(X,Oe),Ae=ae(Ke,2),Me=Ae[0],Fe=Ae[1],Re=ky(N,we),ke=ae(Re,2),ot=ke[0],ut=ke[1];N.x-=ot,N.y-=ut;var Pn=E.points||[],qt=ae(Pn,2),xn=qt[0],gn=qt[1],Bt=Ry(gn),bt=Ry(xn),pt=ja(N,Bt),nt=ja(X,bt),it=W({},E),Qe=pt.x-nt.x+Me,st=pt.y-nt.y+Fe,ft=Ir(Qe,st),Le=Ir(Qe,st,ve),Ge=ja(N,["t","l"]),je=ja(X,["t","l"]),He=ja(N,["b","r"]),ct=ja(X,["b","r"]),rt=E.overflow||{},Ct=rt.adjustX,$t=rt.adjustY,wt=rt.shiftX,Mt=rt.shiftY,vn=function(yo){return typeof yo=="boolean"?yo:yo>=0},un,Cn,jn,Ut;Go();var rn=vn($t),Ee=bt[0]===Bt[0];if(rn&&bt[0]==="t"&&(Cn>ze.bottom||h.current.bt)){var We=st;Ee?We-=ce-j:We=Ge.y-ct.y-Fe;var mt=Ir(Qe,We),St=Ir(Qe,We,ve);mt>ft||mt===ft&&(!Ie||St>=Le)?(h.current.bt=!0,st=We,Fe=-Fe,it.points=[So(bt,0),So(Bt,0)]):h.current.bt=!1}if(rn&&bt[0]==="b"&&(unft||Ue===ft&&(!Ie||ht>=Le)?(h.current.tb=!0,st=Je,Fe=-Fe,it.points=[So(bt,0),So(Bt,0)]):h.current.tb=!1}var It=vn(Ct),zt=bt[1]===Bt[1];if(It&&bt[1]==="l"&&(Ut>ze.right||h.current.rl)){var Vt=Qe;zt?Vt-=ue-J:Vt=Ge.x-ct.x-Me;var dn=Ir(Vt,st),Br=Ir(Vt,st,ve);dn>ft||dn===ft&&(!Ie||Br>=Le)?(h.current.rl=!0,Qe=Vt,Me=-Me,it.points=[So(bt,1),So(Bt,1)]):h.current.rl=!1}if(It&&bt[1]==="r"&&(jnft||_r===ft&&(!Ie||Tr>=Le)?(h.current.lr=!0,Qe=Pr,Me=-Me,it.points=[So(bt,1),So(Bt,1)]):h.current.lr=!1}Go();var Gn=wt===!0?0:wt;typeof Gn=="number"&&(jnve.right&&(Qe-=Ut-ve.right-Me,N.x>ve.right-Gn&&(Qe+=N.x-ve.right+Gn)));var kr=Mt===!0?0:Mt;typeof kr=="number"&&(unve.bottom&&(st-=Cn-ve.bottom-Fe,N.y>ve.bottom-kr&&(st+=N.y-ve.bottom+kr)));var Rr=X.x+Qe,ti=Rr+ue,Ri=X.y+st,Gt=Ri+ce,Ye=N.x,Xe=Ye+J,Lt=N.y,Wt=Lt+j,tn=Math.max(Rr,Ye),fn=Math.min(ti,Xe),vr=(tn+fn)/2,Yn=vr-Rr,Or=Math.max(Ri,Lt),or=Math.min(Gt,Wt),br=(Or+or)/2,Ii=br-Ri;a==null||a(e,it);var yr=re.right-X.x-(Qe+X.width),qs=re.bottom-X.y-(st+X.height);fe===1&&(Qe=Math.round(Qe),yr=Math.round(yr)),te===1&&(st=Math.round(st),qs=Math.round(qs));var ph={ready:!0,offsetX:Qe/fe,offsetY:st/te,offsetR:yr/fe,offsetB:qs/te,arrowX:Yn/fe,arrowY:Ii/te,scaleX:fe,scaleY:te,align:it};u(ph)}}),g=function(){d.current+=1;var S=d.current;Promise.resolve().then(function(){d.current===S&&m()})},v=function(){u(function(S){return W(W({},S),{},{ready:!1})})};return Nt(v,[r]),Nt(function(){t||v()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function bz(t,e,n,r,i){Nt(function(){if(t&&e&&n){let f=function(){r(),i()};var d=f,o=e,a=n,s=Bm(o),l=Bm(a),c=_c(a),u=new Set([c].concat(Pe(s),Pe(l)));return u.forEach(function(h){h.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),r(),function(){u.forEach(function(h){h.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[t,e,n])}function yz(t,e,n,r,i,o,a,s){var l=Y(t);l.current=t;var c=Y(!1);be(function(){if(e&&r&&(!i||o)){var d=function(){c.current=!1},f=function(g){var v;l.current&&!a(((v=g.composedPath)===null||v===void 0||(v=v.call(g))===null||v===void 0?void 0:v[0])||g.target)&&!c.current&&s(!1)},h=_c(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var p=yd(n);return p&&(p.addEventListener("mousedown",f,!0),p.addEventListener("contextmenu",f,!0)),function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),p&&(p.removeEventListener("mousedown",f,!0),p.removeEventListener("contextmenu",f,!0))}}},[e,n,r,i,o]);function u(){c.current=!0}return u}var Sz=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function xz(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jv,e=ye(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,h=n.onPopupVisibleChange,p=n.afterPopupVisibleChange,m=n.mouseEnterDelay,g=n.mouseLeaveDelay,v=g===void 0?.1:g,O=n.focusDelay,S=n.blurDelay,C=n.mask,b=n.maskClosable,x=b===void 0?!0:b,$=n.getPopupContainer,w=n.forceRender,P=n.autoDestroy,_=n.destroyPopupOnHide,T=n.popup,k=n.popupClassName,R=n.popupStyle,I=n.popupPlacement,Q=n.builtinPlacements,E=Q===void 0?{}:Q,A=n.popupAlign,N=n.zIndex,L=n.stretch,z=n.getPopupClassNameFromAlign,V=n.fresh,X=n.alignPoint,F=n.onPopupClick,H=n.onPopupAlign,B=n.arrow,G=n.popupMotion,se=n.maskMotion,ie=n.popupTransitionName,le=n.popupAnimation,pe=n.maskTransitionName,ne=n.maskAnimation,ee=n.className,ce=n.getTriggerDOMNode,ue=dt(n,Sz),j=P||_||!1,J=K(!1),he=ae(J,2),ge=he[0],$e=he[1];Nt(function(){$e(a0())},[]);var Te=Y({}),Ce=de($y),Ie=me(function(){return{registerSubPopup:function(gt,On){Te.current[gt]=On,Ce==null||Ce.registerSubPopup(gt,On)}}},[Ce]),_e=e0(),ve=K(null),Ne=ae(ve,2),ze=Ne[0],re=Ne[1],fe=Y(null),te=pn(function(et){fe.current=et,Nl(et)&&ze!==et&&re(et),Ce==null||Ce.registerSubPopup(_e,et)}),Oe=K(null),we=ae(Oe,2),Ke=we[0],Ae=we[1],Me=Y(null),Fe=pn(function(et){Nl(et)&&Ke!==et&&(Ae(et),Me.current=et)}),Re=Qo.only(a),ke=(Re==null?void 0:Re.props)||{},ot={},ut=pn(function(et){var gt,On,Tn=Ke;return(Tn==null?void 0:Tn.contains(et))||((gt=yd(Tn))===null||gt===void 0?void 0:gt.host)===et||et===Tn||(ze==null?void 0:ze.contains(et))||((On=yd(ze))===null||On===void 0?void 0:On.host)===et||et===ze||Object.values(Te.current).some(function(bn){return(bn==null?void 0:bn.contains(et))||et===bn})}),Pn=Py(o,G,le,ie),qt=Py(o,se,ne,pe),xn=K(f||!1),gn=ae(xn,2),Bt=gn[0],bt=gn[1],pt=d??Bt,nt=pn(function(et){d===void 0&&bt(et)});Nt(function(){bt(d||!1)},[d]);var it=Y(pt);it.current=pt;var Qe=Y([]);Qe.current=[];var st=pn(function(et){var gt;nt(et),((gt=Qe.current[Qe.current.length-1])!==null&>!==void 0?gt:pt)!==et&&(Qe.current.push(et),h==null||h(et))}),ft=Y(),Le=function(){clearTimeout(ft.current)},Ge=function(gt){var On=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Le(),On===0?st(gt):ft.current=setTimeout(function(){st(gt)},On*1e3)};be(function(){return Le},[]);var je=K(!1),He=ae(je,2),ct=He[0],rt=He[1];Nt(function(et){(!et||pt)&&rt(!0)},[pt]);var Ct=K(null),$t=ae(Ct,2),wt=$t[0],Mt=$t[1],vn=K(null),un=ae(vn,2),Cn=un[0],jn=un[1],Ut=function(gt){jn([gt.clientX,gt.clientY])},rn=Oz(pt,ze,X&&Cn!==null?Cn:Ke,I,E,A,H),Ee=ae(rn,11),We=Ee[0],mt=Ee[1],St=Ee[2],Je=Ee[3],Ue=Ee[4],ht=Ee[5],It=Ee[6],zt=Ee[7],Vt=Ee[8],dn=Ee[9],Br=Ee[10],Pr=mz(ge,l,c,u),_r=ae(Pr,2),Tr=_r[0],Gn=_r[1],kr=Tr.has("click"),Rr=Gn.has("click")||Gn.has("contextMenu"),ti=pn(function(){ct||Br()}),Ri=function(){it.current&&X&&Rr&&Ge(!1)};bz(pt,Ke,ze,ti,Ri),Nt(function(){ti()},[Cn,I]),Nt(function(){pt&&!(E!=null&&E[I])&&ti()},[JSON.stringify(A)]);var Gt=me(function(){var et=vz(E,o,dn,X);return Z(et,z==null?void 0:z(dn))},[dn,z,E,o,X]);Yt(r,function(){return{nativeElement:Me.current,popupElement:fe.current,forceAlign:ti}});var Ye=K(0),Xe=ae(Ye,2),Lt=Xe[0],Wt=Xe[1],tn=K(0),fn=ae(tn,2),vr=fn[0],Yn=fn[1],Or=function(){if(L&&Ke){var gt=Ke.getBoundingClientRect();Wt(gt.width),Yn(gt.height)}},or=function(){Or(),ti()},br=function(gt){rt(!1),Br(),p==null||p(gt)},Ii=function(){return new Promise(function(gt){Or(),Mt(function(){return gt})})};Nt(function(){wt&&(Br(),wt(),Mt(null))},[wt]);function yr(et,gt,On,Tn){ot[et]=function(bn){var Hc;Tn==null||Tn(bn),Ge(gt,On);for(var gh=arguments.length,CO=new Array(gh>1?gh-1:0),Xc=1;Xc1?On-1:0),bn=1;bn1?On-1:0),bn=1;bn1&&arguments[1]!==void 0?arguments[1]:{},n=e.fieldNames,r=e.childrenAsData,i=[],o=l2(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var p=h[s];i.push({key:Iy(h,i.length),groupOption:f,data:h,label:h[a],value:p})}else{var m=h[c];m===void 0&&r&&(m=h.label),i.push({key:Iy(h,i.length),group:!0,data:h,label:m}),u(h[l],!0)}})}return u(t,!1),i}function Fm(t){var e=W({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return nr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var Tz=function(e,n,r){if(!n||!n.length)return null;var i=!1,o=function s(l,c){var u=d$(c),d=u[0],f=u.slice(1);if(!d)return[l];var h=l.split(d);return i=i||h.length>1,h.reduce(function(p,m){return[].concat(Pe(p),Pe(s(m,f)))},[]).filter(Boolean)},a=o(e,n);return i?typeof r<"u"?a.slice(0,r):a:null},s0=yt(null);function kz(t){var e=t.visible,n=t.values;if(!e)return null;var r=50;return y("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(tt(o))?o:a}).join(", ")),n.length>r?", ...":null)}var Rz=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Iz=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Vm=function(e){return e==="tags"||e==="multiple"},Mz=ye(function(t,e){var n,r=t.id,i=t.prefixCls,o=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,d=t.onDisplayValuesChange,f=t.emptyOptions,h=t.notFoundContent,p=h===void 0?"Not Found":h,m=t.onClear,g=t.mode,v=t.disabled,O=t.loading,S=t.getInputElement,C=t.getRawInputElement,b=t.open,x=t.defaultOpen,$=t.onDropdownVisibleChange,w=t.activeValue,P=t.onActiveValueChange,_=t.activeDescendantId,T=t.searchValue,k=t.autoClearSearchValue,R=t.onSearch,I=t.onSearchSplit,Q=t.tokenSeparators,E=t.allowClear,A=t.prefix,N=t.suffixIcon,L=t.clearIcon,z=t.OptionList,V=t.animation,X=t.transitionName,F=t.dropdownStyle,H=t.dropdownClassName,B=t.dropdownMatchSelectWidth,G=t.dropdownRender,se=t.dropdownAlign,ie=t.placement,le=t.builtinPlacements,pe=t.getPopupContainer,ne=t.showAction,ee=ne===void 0?[]:ne,ce=t.onFocus,ue=t.onBlur,j=t.onKeyUp,J=t.onKeyDown,he=t.onMouseDown,ge=dt(t,Rz),$e=Vm(g),Te=(a!==void 0?a:$e)||g==="combobox",Ce=W({},ge);Iz.forEach(function(Ye){delete Ce[Ye]}),c==null||c.forEach(function(Ye){delete Ce[Ye]});var Ie=K(!1),_e=ae(Ie,2),ve=_e[0],Ne=_e[1];be(function(){Ne(a0())},[]);var ze=Y(null),re=Y(null),fe=Y(null),te=Y(null),Oe=Y(null),we=Y(!1),Ke=zN(),Ae=ae(Ke,3),Me=Ae[0],Fe=Ae[1],Re=Ae[2];Yt(e,function(){var Ye,Xe;return{focus:(Ye=te.current)===null||Ye===void 0?void 0:Ye.focus,blur:(Xe=te.current)===null||Xe===void 0?void 0:Xe.blur,scrollTo:function(Wt){var tn;return(tn=Oe.current)===null||tn===void 0?void 0:tn.scrollTo(Wt)},nativeElement:ze.current||re.current}});var ke=me(function(){var Ye;if(g!=="combobox")return T;var Xe=(Ye=u[0])===null||Ye===void 0?void 0:Ye.value;return typeof Xe=="string"||typeof Xe=="number"?String(Xe):""},[T,g,u]),ot=g==="combobox"&&typeof S=="function"&&S()||null,ut=typeof C=="function"&&C(),Pn=go(re,ut==null||(n=ut.props)===null||n===void 0?void 0:n.ref),qt=K(!1),xn=ae(qt,2),gn=xn[0],Bt=xn[1];Nt(function(){Bt(!0)},[]);var bt=_n(!1,{defaultValue:x,value:b}),pt=ae(bt,2),nt=pt[0],it=pt[1],Qe=gn?nt:!1,st=!p&&f;(v||st&&Qe&&g==="combobox")&&(Qe=!1);var ft=st?!1:Qe,Le=Ht(function(Ye){var Xe=Ye!==void 0?Ye:!Qe;v||(it(Xe),Qe!==Xe&&($==null||$(Xe)))},[v,Qe,it,$]),Ge=me(function(){return(Q||[]).some(function(Ye){return[` `,`\r -`].includes(qe)})},[Q]),Ae=fe(a0)||{},We=Ae.maxCount,st=Ae.rawValues,tt=function(Fe,Lt,Wt){if(!(Y&&Dm(We)&&(st==null?void 0:st.size)>=We)){var en=!0,fn=Fe;P==null||P(null);var gr=Tz(Fe,Q,Dm(We)?We-st.size:void 0),Gn=Wt?null:gr;return g!=="combobox"&&Gn&&(fn="",I==null||I(Gn),Ee(!1),en=!1),k&&Pe!==fn&&k(fn,{source:Lt?"typing":"effect"}),en}},Ct=function(Fe){!Fe||!Fe.trim()||k(Fe,{source:"submit"})};be(function(){!Re&&!Y&&g!=="combobox"&&tt("",!1,!1)},[Re]),be(function(){et&&v&&nt(!1),v&&!Ye.current&&Xe(!1)},[v]);var $t=t2(),wt=ae($t,2),Mt=wt[0],vn=wt[1],un=U(!1),Cn=function(Fe){var Lt=Mt(),Wt=Fe.key,en=Wt==="Enter";if(en&&(g!=="combobox"&&Fe.preventDefault(),Re||Ee(!0)),vn(!!Pe),Wt==="Backspace"&&!Lt&&Y&&!Pe&&u.length){for(var fn=$e(u),gr=null,Gn=fn.length-1;Gn>=0;Gn-=1){var vr=fn[Gn];if(!vr.disabled){fn.splice(Gn,1),gr=vr;break}}gr&&d(fn,{type:"remove",values:[gr]})}for(var ir=arguments.length,Or=new Array(ir>1?ir-1:0),Ii=1;Ii1?Lt-1:0),en=1;en1?gr-1:0),vr=1;vr"u"?"undefined":Je(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const u2=function(t,e,n,r){var i=U(!1),o=U(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var s=U({top:t,bottom:e,left:n,right:r});return s.current.top=t,s.current.bottom=e,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&a(),!i.current&&d}};function zz(t,e,n,r,i,o,a){var s=U(0),l=U(null),c=U(null),u=U(!1),d=u2(e,n,r,i);function f(O,S){if(Xt.cancel(l.current),!d(!1,S)){var x=O;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=S,c.current=S,Iy||x.preventDefault(),l.current=Xt(function(){var b=u.current?10:1;a(s.current*b,!1),s.current=0})}}function h(O,S){a(S,!0),Iy||O.preventDefault()}var p=U(null),m=U(null);function g(O){if(t){Xt.cancel(m.current),m.current=Xt(function(){p.current=null},2);var S=O.deltaX,x=O.deltaY,b=O.shiftKey,C=S,$=x;(p.current==="sx"||!p.current&&b&&x&&!S)&&(C=x,$=0,p.current="sx");var w=Math.abs(C),P=Math.abs($);p.current===null&&(p.current=o&&w>P?"x":"y"),p.current==="y"?f(O,$):h(O,C)}}function v(O){t&&(u.current=O.detail===c.current)}return[g,v]}function Lz(t,e,n,r){var i=ge(function(){return[new Map,[]]},[t,n.id,r]),o=ae(i,2),a=o[0],s=o[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),h=a.get(d);if(f===void 0||h===void 0)for(var p=t.length,m=s.length;m0&&arguments[0]!==void 0?arguments[0]:!1;u();var p=function(){var v=!1;s.current.forEach(function(O,S){if(O&&O.offsetParent){var x=O.offsetHeight,b=getComputedStyle(O),C=b.marginTop,$=b.marginBottom,w=My(C),P=My($),_=x+w+P;l.current.get(S)!==_&&(l.current.set(S,_),v=!0)}}),v&&a(function(O){return O+1})};if(h)p();else{c.current+=1;var m=c.current;Promise.resolve().then(function(){m===c.current&&p()})}}function f(h,p){var m=t(h);s.current.get(m),p?(s.current.set(m,p),d()):s.current.delete(m)}return be(function(){return u},[]),[f,d,l.current,o]}var Ey=14/15;function Bz(t,e,n){var r=U(!1),i=U(0),o=U(0),a=U(null),s=U(null),l,c=function(h){if(r.current){var p=Math.ceil(h.touches[0].pageX),m=Math.ceil(h.touches[0].pageY),g=i.current-p,v=o.current-m,O=Math.abs(g)>Math.abs(v);O?i.current=p:o.current=m;var S=n(O,O?g:v,!1,h);S&&h.preventDefault(),clearInterval(s.current),S&&(s.current=setInterval(function(){O?g*=Ey:v*=Ey;var x=Math.floor(O?g:v);(!n(O,x,!0)||Math.abs(x)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(h.touches[0].pageX),o.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},Nt(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=e.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[t])}function Ay(t){return Math.floor(Math.pow(t,.5))}function Fm(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function Wz(t,e,n){be(function(){var r=e.current;if(t&&r){var i=!1,o,a,s=function(){Xt.cancel(o)},l=function f(){s(),o=Xt(function(){n(a),f()})},c=function(){i=!1,s()},u=function(h){if(!(h.target.draggable||h.button!==0)){var p=h;p._virtualHandled||(p._virtualHandled=!0,i=!0)}},d=function(h){if(i){var p=Fm(h,!1),m=r.getBoundingClientRect(),g=m.top,v=m.bottom;if(p<=g){var O=g-p;a=-Ay(O),l()}else if(p>=v){var S=p-v;a=Ay(S),l()}else s()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),r.ownerDocument.addEventListener("dragend",c),function(){r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),r.ownerDocument.removeEventListener("dragend",c),s()}}},[t])}var Fz=10;function Vz(t,e,n,r,i,o,a,s){var l=U(),c=J(null),u=ae(c,2),d=u[0],f=u[1];return Nt(function(){if(d&&d.times=0;I-=1){var Q=i(e[I]),M=n.get(Q);if(M===void 0){O=!0;break}if(k-=M,k<=0)break}switch(b){case"top":x=$-g;break;case"bottom":x=w-v+g;break;default:{var E=t.current.scrollTop,N=E+v;$N&&(S="bottom")}}x!==null&&a(x),x!==d.lastTop&&(O=!0)}O&&f(W(W({},d),{},{times:d.times+1,targetAlign:S,lastTop:x}))}},[d,t.current]),function(h){if(h==null){s();return}if(Xt.cancel(l.current),typeof h=="number")a(h);else if(h&&Je(h)==="object"){var p,m=h.align;"index"in h?p=h.index:p=e.findIndex(function(O){return i(O)===h.key});var g=h.offset,v=g===void 0?0:g;f({times:0,index:p,offset:v,originAlign:m})}}}var Qy=Se(function(t,e){var n=t.prefixCls,r=t.rtl,i=t.scrollOffset,o=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,f=t.style,h=t.thumbStyle,p=t.showScrollBar,m=J(!1),g=ae(m,2),v=g[0],O=g[1],S=J(null),x=ae(S,2),b=x[0],C=x[1],$=J(null),w=ae($,2),P=w[0],_=w[1],T=!r,R=U(),k=U(),I=J(p),Q=ae(I,2),M=Q[0],E=Q[1],N=U(),z=function(){p===!0||p===!1||(clearTimeout(N.current),E(!0),N.current=setTimeout(function(){E(!1)},3e3))},L=o-d||0,F=d-u||0,H=ge(function(){if(i===0||L===0)return 0;var ie=i/L;return ie*F},[i,L,F]),V=function(ne){ne.stopPropagation(),ne.preventDefault()},X=U({top:H,dragging:v,pageY:b,startTop:P});X.current={top:H,dragging:v,pageY:b,startTop:P};var B=function(ne){O(!0),C(Fm(ne,c)),_(X.current.top),a(),ne.stopPropagation(),ne.preventDefault()};be(function(){var ie=function(j){j.preventDefault()},ne=R.current,ue=k.current;return ne.addEventListener("touchstart",ie,{passive:!1}),ue.addEventListener("touchstart",B,{passive:!1}),function(){ne.removeEventListener("touchstart",ie),ue.removeEventListener("touchstart",B)}},[]);var G=U();G.current=L;var se=U();se.current=F,be(function(){if(v){var ie,ne=function(j){var ee=X.current,he=ee.dragging,ve=ee.pageY,Y=ee.startTop;Xt.cancel(ie);var ce=R.current.getBoundingClientRect(),te=d/(c?ce.width:ce.height);if(he){var Oe=(Fm(j,c)-ve)*te,ye=Y;!T&&c?ye-=Oe:ye+=Oe;var pe=G.current,Qe=se.current,Me=Qe?ye/Qe:0,De=Math.ceil(Me*pe);De=Math.max(De,0),De=Math.min(De,pe),ie=Xt(function(){l(De,c)})}},ue=function(){O(!1),s()};return window.addEventListener("mousemove",ne,{passive:!0}),window.addEventListener("touchmove",ne,{passive:!0}),window.addEventListener("mouseup",ue,{passive:!0}),window.addEventListener("touchend",ue,{passive:!0}),function(){window.removeEventListener("mousemove",ne),window.removeEventListener("touchmove",ne),window.removeEventListener("mouseup",ue),window.removeEventListener("touchend",ue),Xt.cancel(ie)}}},[v]),be(function(){return z(),function(){clearTimeout(N.current)}},[i]),Yt(e,function(){return{delayHidden:z}});var re="".concat(n,"-scrollbar"),le={position:"absolute",visibility:M?null:"hidden"},me={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(le,{height:8,left:0,right:0,bottom:0}),Object.assign(me,D({height:"100%",width:u},T?"left":"right",H))):(Object.assign(le,D({width:8,top:0,bottom:0},T?"right":"left",0)),Object.assign(me,{width:"100%",height:u,top:H})),y("div",{ref:R,className:Z(re,D(D(D({},"".concat(re,"-horizontal"),c),"".concat(re,"-vertical"),!c),"".concat(re,"-visible"),M)),style:W(W({},le),f),onMouseDown:V,onMouseMove:z},y("div",{ref:k,className:Z("".concat(re,"-thumb"),D({},"".concat(re,"-thumb-moving"),v)),style:W(W({},me),h),onMouseDown:B}))}),Hz=20;function Ny(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,Hz),Math.floor(n)}var Xz=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Zz=[],qz={overflowY:"auto",overflowAnchor:"none"};function Gz(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,i=t.className,o=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,d=t.children,f=t.itemKey,h=t.virtual,p=t.direction,m=t.scrollWidth,g=t.component,v=g===void 0?"div":g,O=t.onScroll,S=t.onVirtualScroll,x=t.onVisibleChange,b=t.innerProps,C=t.extraRender,$=t.styles,w=t.showScrollBar,P=w===void 0?"optional":w,_=ut(t,Xz),T=Ht(function(Te){return typeof f=="function"?f(Te):Te==null?void 0:Te[f]},[f]),R=Dz(T),k=ae(R,4),I=k[0],Q=k[1],M=k[2],E=k[3],N=!!(h!==!1&&o&&a),z=ge(function(){return Object.values(M.maps).reduce(function(Te,Le){return Te+Le},0)},[M.id,M.maps]),L=N&&u&&(Math.max(a*u.length,z)>o||!!m),F=p==="rtl",H=Z(r,D({},"".concat(r,"-rtl"),F),i),V=u||Zz,X=U(),B=U(),G=U(),se=J(0),re=ae(se,2),le=re[0],me=re[1],ie=J(0),ne=ae(ie,2),ue=ne[0],de=ne[1],j=J(!1),ee=ae(j,2),he=ee[0],ve=ee[1],Y=function(){ve(!0)},ce=function(){ve(!1)},te={getKey:T};function Oe(Te){me(function(Le){var pt;typeof Te=="function"?pt=Te(Le):pt=Te;var yt=Bt(pt);return X.current.scrollTop=yt,yt})}var ye=U({start:0,end:V.length}),pe=U(),Qe=Nz(V,T),Me=ae(Qe,1),De=Me[0];pe.current=De;var we=ge(function(){if(!N)return{scrollHeight:void 0,start:0,end:V.length-1,offset:void 0};if(!L){var Te;return{scrollHeight:((Te=B.current)===null||Te===void 0?void 0:Te.offsetHeight)||0,start:0,end:V.length-1,offset:void 0}}for(var Le=0,pt,yt,Ue,Ge=V.length,ft=0;ft=le&&pt===void 0&&(pt=ft,yt=Le),dn>le+o&&Ue===void 0&&(Ue=ft),Le=dn}return pt===void 0&&(pt=0,yt=0,Ue=Math.ceil(o/a)),Ue===void 0&&(Ue=V.length-1),Ue=Math.min(Ue+1,V.length-1),{scrollHeight:Le,start:pt,end:Ue,offset:yt}},[L,N,le,V,E,o]),Ie=we.scrollHeight,rt=we.start,Ye=we.end,lt=we.offset;ye.current.start=rt,ye.current.end=Ye,Ti(function(){var Te=M.getRecord();if(Te.size===1){var Le=Array.from(Te.keys())[0],pt=Te.get(Le),yt=V[rt];if(yt&&pt===void 0){var Ue=T(yt);if(Ue===Le){var Ge=M.get(Le),ft=Ge-a;Oe(function(It){return It+ft})}}}M.resetRecord()},[Ie]);var Be=J({width:0,height:o}),ke=ae(Be,2),Xe=ke[0],_e=ke[1],Pe=function(Le){_e({width:Le.offsetWidth,height:Le.offsetHeight})},ct=U(),xt=U(),Pn=ge(function(){return Ny(Xe.width,m)},[Xe.width,m]),qt=ge(function(){return Ny(Xe.height,Ie)},[Xe.height,Ie]),xn=Ie-o,gn=U(xn);gn.current=xn;function Bt(Te){var Le=Te;return Number.isNaN(gn.current)||(Le=Math.min(Le,gn.current)),Le=Math.max(Le,0),Le}var Ot=le<=0,ht=le>=xn,et=ue<=0,nt=ue>=m,Re=u2(Ot,ht,et,nt),ot=function(){return{x:F?-ue:ue,y:le}},dt=U(ot()),Ee=pn(function(Te){if(S){var Le=W(W({},ot()),Te);(dt.current.x!==Le.x||dt.current.y!==Le.y)&&(S(Le),dt.current=Le)}});function Ze(Te,Le){var pt=Te;Le?(Ql(function(){de(pt)}),Ee()):Oe(pt)}function Ae(Te){var Le=Te.currentTarget.scrollTop;Le!==le&&Oe(Le),O==null||O(Te),Ee()}var We=function(Le){var pt=Le,yt=m?m-Xe.width:0;return pt=Math.max(pt,0),pt=Math.min(pt,yt),pt},st=pn(function(Te,Le){Le?(Ql(function(){de(function(pt){var yt=pt+(F?-Te:Te);return We(yt)})}),Ee()):Oe(function(pt){var yt=pt+Te;return yt})}),tt=zz(N,Ot,ht,et,nt,!!m,st),Ct=ae(tt,2),$t=Ct[0],wt=Ct[1];Bz(N,X,function(Te,Le,pt,yt){var Ue=yt;return Re(Te,Le,pt)?!1:!Ue||!Ue._virtualHandled?(Ue&&(Ue._virtualHandled=!0),$t({preventDefault:function(){},deltaX:Te?Le:0,deltaY:Te?0:Le}),!0):!1}),Wz(L,X,function(Te){Oe(function(Le){return Le+Te})}),Nt(function(){function Te(pt){var yt=Ot&&pt.detail<0,Ue=ht&&pt.detail>0;N&&!yt&&!Ue&&pt.preventDefault()}var Le=X.current;return Le.addEventListener("wheel",$t,{passive:!1}),Le.addEventListener("DOMMouseScroll",wt,{passive:!0}),Le.addEventListener("MozMousePixelScroll",Te,{passive:!1}),function(){Le.removeEventListener("wheel",$t),Le.removeEventListener("DOMMouseScroll",wt),Le.removeEventListener("MozMousePixelScroll",Te)}},[N,Ot,ht]),Nt(function(){if(m){var Te=We(ue);de(Te),Ee({x:Te})}},[Xe.width,m]);var Mt=function(){var Le,pt;(Le=ct.current)===null||Le===void 0||Le.delayHidden(),(pt=xt.current)===null||pt===void 0||pt.delayHidden()},vn=Vz(X,V,M,a,T,function(){return Q(!0)},Oe,Mt);Yt(e,function(){return{nativeElement:G.current,getScrollInfo:ot,scrollTo:function(Le){function pt(yt){return yt&&Je(yt)==="object"&&("left"in yt||"top"in yt)}pt(Le)?(Le.left!==void 0&&de(We(Le.left)),vn(Le.top)):vn(Le)}}}),Nt(function(){if(x){var Te=V.slice(rt,Ye+1);x(Te,V)}},[rt,Ye,V]);var un=Lz(V,T,M,a),Cn=C==null?void 0:C({start:rt,end:Ye,virtual:L,offsetX:ue,offsetY:lt,rtl:F,getSize:un}),Ln=Az(V,rt,Ye,m,ue,I,d,te),Ut=null;o&&(Ut=W(D({},l?"height":"maxHeight",o),qz),N&&(Ut.overflowY="hidden",m&&(Ut.overflowX="hidden"),he&&(Ut.pointerEvents="none")));var nn={};return F&&(nn.dir="rtl"),y("div",Ce({ref:G,style:W(W({},c),{},{position:"relative"}),className:H},nn,_),y(Kr,{onResize:Pe},y(v,{className:"".concat(r,"-holder"),style:Ut,ref:X,onScroll:Ae,onMouseEnter:Mt},y(c2,{prefixCls:r,height:Ie,offsetX:ue,offsetY:lt,scrollWidth:m,onInnerResize:Q,ref:B,innerProps:b,rtl:F,extra:Cn},Ln))),L&&Ie>o&&y(Qy,{ref:ct,prefixCls:r,scrollOffset:le,scrollRange:Ie,rtl:F,onScroll:Ze,onStartMove:Y,onStopMove:ce,spinSize:qt,containerSize:Xe.height,style:$==null?void 0:$.verticalScrollBar,thumbStyle:$==null?void 0:$.verticalScrollBarThumb,showScrollBar:P}),L&&m>Xe.width&&y(Qy,{ref:xt,prefixCls:r,scrollOffset:ue,scrollRange:m,rtl:F,onScroll:Ze,onStartMove:Y,onStopMove:ce,spinSize:Pn,containerSize:Xe.width,horizontal:!0,style:$==null?void 0:$.horizontalScrollBar,thumbStyle:$==null?void 0:$.horizontalScrollBarThumb,showScrollBar:P}))}var d2=Se(Gz);d2.displayName="List";function Yz(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Uz=["disabled","title","children","style","className"];function zy(t){return typeof t=="string"||typeof t=="number"}var Kz=function(e,n){var r=NN(),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=fe(a0),p=h.maxCount,m=h.flattenOptions,g=h.onActiveValue,v=h.defaultActiveFirstOption,O=h.onSelect,S=h.menuItemSelectedIcon,x=h.rawValues,b=h.fieldNames,C=h.virtual,$=h.direction,w=h.listHeight,P=h.listItemHeight,_=h.optionRender,T="".concat(i,"-item"),R=vc(function(){return m},[a,m],function(ie,ne){return ne[0]&&ie[1]!==ne[1]}),k=U(null),I=ge(function(){return s&&Dm(p)&&(x==null?void 0:x.size)>=p},[s,p,x==null?void 0:x.size]),Q=function(ne){ne.preventDefault()},M=function(ne){var ue;(ue=k.current)===null||ue===void 0||ue.scrollTo(typeof ne=="number"?{index:ne}:ne)},E=Ht(function(ie){return l==="combobox"?!1:x.has(ie)},[l,$e(x).toString(),x.size]),N=function(ne){for(var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,de=R.length,j=0;j1&&arguments[1]!==void 0?arguments[1]:!1;H(ne);var de={source:ue?"keyboard":"mouse"},j=R[ne];if(!j){g(null,-1,de);return}g(j.value,ne,de)};be(function(){V(v!==!1?N(0):-1)},[R.length,c]);var X=Ht(function(ie){return l==="combobox"?String(ie).toLowerCase()===c.toLowerCase():x.has(ie)},[l,c,$e(x).toString(),x.size]);be(function(){var ie=setTimeout(function(){if(!s&&a&&x.size===1){var ue=Array.from(x)[0],de=R.findIndex(function(j){var ee=j.data;return c?String(ee.value).startsWith(c):ee.value===ue});de!==-1&&(V(de),M(de))}});if(a){var ne;(ne=k.current)===null||ne===void 0||ne.scrollTo(void 0)}return function(){return clearTimeout(ie)}},[a,c]);var B=function(ne){ne!==void 0&&O(ne,{selected:!x.has(ne)}),s||u(!1)};if(Yt(n,function(){return{onKeyDown:function(ne){var ue=ne.which,de=ne.ctrlKey;switch(ue){case je.N:case je.P:case je.UP:case je.DOWN:{var j=0;if(ue===je.UP?j=-1:ue===je.DOWN?j=1:Yz()&&de&&(ue===je.N?j=1:ue===je.P&&(j=-1)),j!==0){var ee=N(F+j,j);M(ee),V(ee,!0)}break}case je.TAB:case je.ENTER:{var he,ve=R[F];ve&&!(ve!=null&&(he=ve.data)!==null&&he!==void 0&&he.disabled)&&!I?B(ve.value):B(void 0),a&&ne.preventDefault();break}case je.ESC:u(!1),a&&ne.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ne){M(ne)}}}),R.length===0)return y("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(T,"-empty"),onMouseDown:Q},d);var G=Object.keys(b).map(function(ie){return b[ie]}),se=function(ne){return ne.label};function re(ie,ne){var ue=ie.group;return{role:ue?"presentation":"option",id:"".concat(o,"_list_").concat(ne)}}var le=function(ne){var ue=R[ne];if(!ue)return null;var de=ue.data||{},j=de.value,ee=ue.group,he=$i(de,!0),ve=se(ue);return ue?y("div",Ce({"aria-label":typeof ve=="string"&&!ee?ve:null},he,{key:ne},re(ue,ne),{"aria-selected":X(j)}),j):null},me={role:"listbox",id:"".concat(o,"_list")};return y(At,null,C&&y("div",Ce({},me,{style:{height:0,width:0,overflow:"hidden"}}),le(F-1),le(F),le(F+1)),y(d2,{itemKey:"key",ref:k,data:R,height:w,itemHeight:P,fullHeight:!1,onMouseDown:Q,onScroll:f,virtual:C,direction:$,innerProps:C?null:me},function(ie,ne){var ue=ie.group,de=ie.groupOption,j=ie.data,ee=ie.label,he=ie.value,ve=j.key;if(ue){var Y,ce=(Y=j.title)!==null&&Y!==void 0?Y:zy(ee)?ee.toString():void 0;return y("div",{className:Z(T,"".concat(T,"-group"),j.className),title:ce},ee!==void 0?ee:ve)}var te=j.disabled,Oe=j.title;j.children;var ye=j.style,pe=j.className,Qe=ut(j,Uz),Me=cn(Qe,G),De=E(he),we=te||!De&&I,Ie="".concat(T,"-option"),rt=Z(T,Ie,pe,D(D(D(D({},"".concat(Ie,"-grouped"),de),"".concat(Ie,"-active"),F===ne&&!we),"".concat(Ie,"-disabled"),we),"".concat(Ie,"-selected"),De)),Ye=se(ie),lt=!S||typeof S=="function"||De,Be=typeof Ye=="number"?Ye:Ye||he,ke=zy(Be)?Be.toString():void 0;return Oe!==void 0&&(ke=Oe),y("div",Ce({},$i(Me),C?{}:re(ie,ne),{"aria-selected":X(he),className:rt,title:ke,onMouseMove:function(){F===ne||we||V(ne)},onClick:function(){we||B(he)},style:ye}),y("div",{className:"".concat(Ie,"-content")},typeof _=="function"?_(ie,{index:ne}):Be),Kt(S)||De,lt&&y(Df,{className:"".concat(T,"-option-state"),customizeIcon:S,customizeIconProps:{value:he,disabled:we,isSelected:De}},De?"✓":null))}))},Jz=Se(Kz);const e6=function(t,e){var n=U({values:new Map,options:new Map}),r=ge(function(){var o=n.current,a=o.values,s=o.options,l=t.map(function(d){if(d.label===void 0){var f;return W(W({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),i=Ht(function(o){return e.get(o)||n.current.options.get(o)},[e]);return[r,i]};function Vh(t,e){return a2(t).join("").toUpperCase().includes(e)}const t6=function(t,e,n,r,i){return ge(function(){if(!n||r===!1)return t;var o=e.options,a=e.label,s=e.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(h,p){return i?Vh(p[i],u):p[o]?Vh(p[a!=="children"?a:"label"],u):Vh(p[s],u)},f=c?function(h){return Bm(h)}:function(h){return h};return t.forEach(function(h){if(h[o]){var p=d(n,f(h));if(p)l.push(h);else{var m=h[o].filter(function(g){return d(n,f(g))});m.length&&l.push(W(W({},h),{},D({},o,m)))}return}d(n,f(h))&&l.push(h)}),l},[t,r,i,n,e])};var Ly=0,n6=dr();function r6(){var t;return n6?(t=Ly,Ly+=1):t="TEST_OR_SSR",t}function i6(t){var e=J(),n=ae(e,2),r=n[0],i=n[1];return be(function(){i("rc_select_".concat(r6()))},[]),t||r}var o6=["children","value"],a6=["children"];function s6(t){var e=t,n=e.key,r=e.props,i=r.children,o=r.value,a=ut(r,o6);return W({key:n,value:o!==void 0?o:n,children:i},a)}function f2(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return nr(t).map(function(n,r){if(!Kt(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,c=ut(s,a6);return e||!o?s6(n):W(W({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:f2(l)})}).filter(function(n){return n})}var l6=function(e,n,r,i,o){return ge(function(){var a=e,s=!e;s&&(a=f2(n));var l=new Map,c=new Map,u=function(h,p,m){m&&typeof m=="string"&&h.set(p[m],p)},d=function f(h){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=0;m0?Ee(We.options):We.options}):We})},Be=ge(function(){return O?lt(Ye):Ye},[Ye,O,me]),ke=ge(function(){return _z(Be,{fieldNames:se,childrenAsData:B})},[Be,se,B]),Xe=function(Ze){var Ae=ee(Ze);if(ce(Ae),L&&(Ae.length!==pe.length||Ae.some(function(tt,Ct){var $t;return(($t=pe[Ct])===null||$t===void 0?void 0:$t.value)!==(tt==null?void 0:tt.value)}))){var We=z?Ae:Ae.map(function(tt){return tt.value}),st=Ae.map(function(tt){return Bm(Qe(tt.value))});L(X?We:We[0],X?st:st[0])}},_e=J(null),Pe=ae(_e,2),ct=Pe[0],xt=Pe[1],Pn=J(0),qt=ae(Pn,2),xn=qt[0],gn=qt[1],Bt=w!==void 0?w:r!=="combobox",Ot=Ht(function(Ee,Ze){var Ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},We=Ae.source,st=We===void 0?"keyboard":We;gn(Ze),a&&r==="combobox"&&Ee!==null&&st==="keyboard"&&xt(String(Ee))},[a,r]),ht=function(Ze,Ae,We){var st=function(){var Ut,nn=Qe(Ze);return[z?{label:nn==null?void 0:nn[se.label],value:Ze,key:(Ut=nn==null?void 0:nn.key)!==null&&Ut!==void 0?Ut:Ze}:Ze,Bm(nn)]};if(Ae&&h){var tt=st(),Ct=ae(tt,2),$t=Ct[0],wt=Ct[1];h($t,wt)}else if(!Ae&&p&&We!=="clear"){var Mt=st(),vn=ae(Mt,2),un=vn[0],Cn=vn[1];p(un,Cn)}},et=jy(function(Ee,Ze){var Ae,We=X?Ze.selected:!0;We?Ae=X?[].concat($e(pe),[Ee]):[Ee]:Ae=pe.filter(function(st){return st.value!==Ee}),Xe(Ae),ht(Ee,We),r==="combobox"?xt(""):(!Wm||f)&&(ie(""),xt(""))}),nt=function(Ze,Ae){Xe(Ze);var We=Ae.type,st=Ae.values;(We==="remove"||We==="clear")&&st.forEach(function(tt){ht(tt.value,!1,We)})},Re=function(Ze,Ae){if(ie(Ze),xt(null),Ae.source==="submit"){var We=(Ze||"").trim();if(We){var st=Array.from(new Set([].concat($e(De),[We])));Xe(st),ht(We,!0),ie("")}return}Ae.source!=="blur"&&(r==="combobox"&&Xe(Ze),u==null||u(Ze))},ot=function(Ze){var Ae=Ze;r!=="tags"&&(Ae=Ze.map(function(st){var tt=de.get(st);return tt==null?void 0:tt.value}).filter(function(st){return st!==void 0}));var We=Array.from(new Set([].concat($e(De),$e(Ae))));Xe(We),We.forEach(function(st){ht(st,!0)})},dt=ge(function(){var Ee=_!==!1&&g!==!1;return W(W({},ne),{},{flattenOptions:ke,onActiveValue:Ot,defaultActiveFirstOption:Bt,onSelect:et,menuItemSelectedIcon:P,rawValues:De,fieldNames:se,virtual:Ee,direction:T,listHeight:k,listItemHeight:Q,childrenAsData:B,maxCount:F,optionRender:C})},[F,ne,ke,Ot,Bt,et,P,De,se,_,g,T,k,Q,B,C]);return y(a0.Provider,{value:dt},y(Mz,Ce({},H,{id:V,prefixCls:o,ref:e,omitDomProps:u6,mode:r,displayValues:Me,onDisplayValuesChange:nt,direction:T,searchValue:me,onSearch:Re,autoClearSearchValue:f,onSearchSplit:ot,dropdownMatchSelectWidth:g,OptionList:Jz,emptyOptions:!ke.length,activeValue:ct,activeDescendantId:"".concat(V,"_list_").concat(xn)})))}),c0=f6;c0.Option=l0;c0.OptGroup=s0;function Pd(t,e,n){return Z({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const Wf=(t,e)=>e||t,h6=()=>{const[,t]=Cr(),[e]=Ki("Empty"),r=new Dt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return y("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},y("title",null,(e==null?void 0:e.description)||"Empty"),y("g",{fill:"none",fillRule:"evenodd"},y("g",{transform:"translate(24 31.67)"},y("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),y("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),y("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),y("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),y("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),y("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),y("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},y("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),y("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},p6=()=>{const[,t]=Cr(),[e]=Ki("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=t,{borderColor:a,shadowColor:s,contentColor:l}=ge(()=>({borderColor:new Dt(n).onBackground(o).toHexString(),shadowColor:new Dt(r).onBackground(o).toHexString(),contentColor:new Dt(i).onBackground(o).toHexString()}),[n,r,i,o]);return y("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},y("title",null,(e==null?void 0:e.description)||"Empty"),y("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},y("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),y("g",{fillRule:"nonzero",stroke:a},y("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),y("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},m6=t=>{const{componentCls:e,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=t;return{[e]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:r,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:r,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},g6=Zt("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,i=kt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return m6(i)});var v6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{className:n,rootClassName:r,prefixCls:i,image:o,description:a,children:s,imageStyle:l,style:c,classNames:u,styles:d}=t,f=v6(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:h,direction:p,className:m,style:g,classNames:v,styles:O,image:S}=rr("empty"),x=h("empty",i),[b,C,$]=g6(x),[w]=Ki("Empty"),P=typeof a<"u"?a:w==null?void 0:w.description,_=typeof P=="string"?P:"empty",T=(e=o??S)!==null&&e!==void 0?e:h2;let R=null;return typeof T=="string"?R=y("img",{draggable:!1,alt:_,src:T}):R=T,b(y("div",Object.assign({className:Z(C,$,x,m,{[`${x}-normal`]:T===p2,[`${x}-rtl`]:p==="rtl"},n,r,v.root,u==null?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},O.root),g),d==null?void 0:d.root),c)},f),y("div",{className:Z(`${x}-image`,v.image,u==null?void 0:u.image),style:Object.assign(Object.assign(Object.assign({},l),O.image),d==null?void 0:d.image)},R),P&&y("div",{className:Z(`${x}-description`,v.description,u==null?void 0:u.description),style:Object.assign(Object.assign({},O.description),d==null?void 0:d.description)},P),s&&y("div",{className:Z(`${x}-footer`,v.footer,u==null?void 0:u.footer),style:Object.assign(Object.assign({},O.footer),d==null?void 0:d.footer)},s)))};Jo.PRESENTED_IMAGE_DEFAULT=h2;Jo.PRESENTED_IMAGE_SIMPLE=p2;const O6=t=>{const{componentName:e}=t,{getPrefixCls:n}=fe(it),r=n("empty");switch(e){case"Table":case"List":return oe.createElement(Jo,{image:Jo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return oe.createElement(Jo,{image:Jo.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return oe.createElement(Jo,null)}},Ff=(t,e,n=void 0)=>{var r,i;const{variant:o,[t]:a}=fe(it),s=fe(Tw),l=a==null?void 0:a.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(i=(r=s??l)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const u=KM.includes(c);return[c,u]},b6=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function y6(t,e){return t||b6(e)}const Dy=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:r,optionPadding:i}=t;return{position:"relative",display:"block",minHeight:e,padding:i,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},S6=t=>{const{antCls:e,componentCls:n}=t,r=`${n}-item`,i=`&${e}-slide-up-enter${e}-slide-up-enter-active`,o=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[` +`].includes(Ye)})},[Q]),je=de(s0)||{},He=je.maxCount,ct=je.rawValues,rt=function(Xe,Lt,Wt){if(!($e&&Wm(He)&&(ct==null?void 0:ct.size)>=He)){var tn=!0,fn=Xe;P==null||P(null);var vr=Tz(Xe,Q,Wm(He)?He-ct.size:void 0),Yn=Wt?null:vr;return g!=="combobox"&&Yn&&(fn="",I==null||I(Yn),Le(!1),tn=!1),R&&ke!==fn&&R(fn,{source:Lt?"typing":"effect"}),tn}},Ct=function(Xe){!Xe||!Xe.trim()||R(Xe,{source:"submit"})};be(function(){!Qe&&!$e&&g!=="combobox"&&rt("",!1,!1)},[Qe]),be(function(){nt&&v&&it(!1),v&&!we.current&&Fe(!1)},[v]);var $t=t2(),wt=ae($t,2),Mt=wt[0],vn=wt[1],un=Y(!1),Cn=function(Xe){var Lt=Mt(),Wt=Xe.key,tn=Wt==="Enter";if(tn&&(g!=="combobox"&&Xe.preventDefault(),Qe||Le(!0)),vn(!!ke),Wt==="Backspace"&&!Lt&&$e&&!ke&&u.length){for(var fn=Pe(u),vr=null,Yn=fn.length-1;Yn>=0;Yn-=1){var Or=fn[Yn];if(!Or.disabled){fn.splice(Yn,1),vr=Or;break}}vr&&d(fn,{type:"remove",values:[vr]})}for(var or=arguments.length,br=new Array(or>1?or-1:0),Ii=1;Ii1?Lt-1:0),tn=1;tn1?vr-1:0),Or=1;Or"u"?"undefined":tt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const u2=function(t,e,n,r){var i=Y(!1),o=Y(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var s=Y({top:t,bottom:e,left:n,right:r});return s.current.top=t,s.current.bottom=e,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&a(),!i.current&&d}};function zz(t,e,n,r,i,o,a){var s=Y(0),l=Y(null),c=Y(null),u=Y(!1),d=u2(e,n,r,i);function f(O,S){if(Xt.cancel(l.current),!d(!1,S)){var C=O;if(!C._virtualHandled)C._virtualHandled=!0;else return;s.current+=S,c.current=S,My||C.preventDefault(),l.current=Xt(function(){var b=u.current?10:1;a(s.current*b,!1),s.current=0})}}function h(O,S){a(S,!0),My||O.preventDefault()}var p=Y(null),m=Y(null);function g(O){if(t){Xt.cancel(m.current),m.current=Xt(function(){p.current=null},2);var S=O.deltaX,C=O.deltaY,b=O.shiftKey,x=S,$=C;(p.current==="sx"||!p.current&&b&&C&&!S)&&(x=C,$=0,p.current="sx");var w=Math.abs(x),P=Math.abs($);p.current===null&&(p.current=o&&w>P?"x":"y"),p.current==="y"?f(O,$):h(O,x)}}function v(O){t&&(u.current=O.detail===c.current)}return[g,v]}function Lz(t,e,n,r){var i=me(function(){return[new Map,[]]},[t,n.id,r]),o=ae(i,2),a=o[0],s=o[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),h=a.get(d);if(f===void 0||h===void 0)for(var p=t.length,m=s.length;m0&&arguments[0]!==void 0?arguments[0]:!1;u();var p=function(){var v=!1;s.current.forEach(function(O,S){if(O&&O.offsetParent){var C=O.offsetHeight,b=getComputedStyle(O),x=b.marginTop,$=b.marginBottom,w=Ey(x),P=Ey($),_=C+w+P;l.current.get(S)!==_&&(l.current.set(S,_),v=!0)}}),v&&a(function(O){return O+1})};if(h)p();else{c.current+=1;var m=c.current;Promise.resolve().then(function(){m===c.current&&p()})}}function f(h,p){var m=t(h);s.current.get(m),p?(s.current.set(m,p),d()):s.current.delete(m)}return be(function(){return u},[]),[f,d,l.current,o]}var Ay=14/15;function Bz(t,e,n){var r=Y(!1),i=Y(0),o=Y(0),a=Y(null),s=Y(null),l,c=function(h){if(r.current){var p=Math.ceil(h.touches[0].pageX),m=Math.ceil(h.touches[0].pageY),g=i.current-p,v=o.current-m,O=Math.abs(g)>Math.abs(v);O?i.current=p:o.current=m;var S=n(O,O?g:v,!1,h);S&&h.preventDefault(),clearInterval(s.current),S&&(s.current=setInterval(function(){O?g*=Ay:v*=Ay;var C=Math.floor(O?g:v);(!n(O,C,!0)||Math.abs(C)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(h.touches[0].pageX),o.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},Nt(function(){return t&&e.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=e.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[t])}function Qy(t){return Math.floor(Math.pow(t,.5))}function Hm(t,e){var n="touches"in t?t.touches[0]:t;return n[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function Wz(t,e,n){be(function(){var r=e.current;if(t&&r){var i=!1,o,a,s=function(){Xt.cancel(o)},l=function f(){s(),o=Xt(function(){n(a),f()})},c=function(){i=!1,s()},u=function(h){if(!(h.target.draggable||h.button!==0)){var p=h;p._virtualHandled||(p._virtualHandled=!0,i=!0)}},d=function(h){if(i){var p=Hm(h,!1),m=r.getBoundingClientRect(),g=m.top,v=m.bottom;if(p<=g){var O=g-p;a=-Qy(O),l()}else if(p>=v){var S=p-v;a=Qy(S),l()}else s()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),r.ownerDocument.addEventListener("dragend",c),function(){r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),r.ownerDocument.removeEventListener("dragend",c),s()}}},[t])}var Fz=10;function Vz(t,e,n,r,i,o,a,s){var l=Y(),c=K(null),u=ae(c,2),d=u[0],f=u[1];return Nt(function(){if(d&&d.times=0;I-=1){var Q=i(e[I]),E=n.get(Q);if(E===void 0){O=!0;break}if(R-=E,R<=0)break}switch(b){case"top":C=$-g;break;case"bottom":C=w-v+g;break;default:{var A=t.current.scrollTop,N=A+v;$N&&(S="bottom")}}C!==null&&a(C),C!==d.lastTop&&(O=!0)}O&&f(W(W({},d),{},{times:d.times+1,targetAlign:S,lastTop:C}))}},[d,t.current]),function(h){if(h==null){s();return}if(Xt.cancel(l.current),typeof h=="number")a(h);else if(h&&tt(h)==="object"){var p,m=h.align;"index"in h?p=h.index:p=e.findIndex(function(O){return i(O)===h.key});var g=h.offset,v=g===void 0?0:g;f({times:0,index:p,offset:v,originAlign:m})}}}var Ny=ye(function(t,e){var n=t.prefixCls,r=t.rtl,i=t.scrollOffset,o=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,d=t.containerSize,f=t.style,h=t.thumbStyle,p=t.showScrollBar,m=K(!1),g=ae(m,2),v=g[0],O=g[1],S=K(null),C=ae(S,2),b=C[0],x=C[1],$=K(null),w=ae($,2),P=w[0],_=w[1],T=!r,k=Y(),R=Y(),I=K(p),Q=ae(I,2),E=Q[0],A=Q[1],N=Y(),L=function(){p===!0||p===!1||(clearTimeout(N.current),A(!0),N.current=setTimeout(function(){A(!1)},3e3))},z=o-d||0,V=d-u||0,X=me(function(){if(i===0||z===0)return 0;var ne=i/z;return ne*V},[i,z,V]),F=function(ee){ee.stopPropagation(),ee.preventDefault()},H=Y({top:X,dragging:v,pageY:b,startTop:P});H.current={top:X,dragging:v,pageY:b,startTop:P};var B=function(ee){O(!0),x(Hm(ee,c)),_(H.current.top),a(),ee.stopPropagation(),ee.preventDefault()};be(function(){var ne=function(j){j.preventDefault()},ee=k.current,ce=R.current;return ee.addEventListener("touchstart",ne,{passive:!1}),ce.addEventListener("touchstart",B,{passive:!1}),function(){ee.removeEventListener("touchstart",ne),ce.removeEventListener("touchstart",B)}},[]);var G=Y();G.current=z;var se=Y();se.current=V,be(function(){if(v){var ne,ee=function(j){var J=H.current,he=J.dragging,ge=J.pageY,$e=J.startTop;Xt.cancel(ne);var Te=k.current.getBoundingClientRect(),Ce=d/(c?Te.width:Te.height);if(he){var Ie=(Hm(j,c)-ge)*Ce,_e=$e;!T&&c?_e-=Ie:_e+=Ie;var ve=G.current,Ne=se.current,ze=Ne?_e/Ne:0,re=Math.ceil(ze*ve);re=Math.max(re,0),re=Math.min(re,ve),ne=Xt(function(){l(re,c)})}},ce=function(){O(!1),s()};return window.addEventListener("mousemove",ee,{passive:!0}),window.addEventListener("touchmove",ee,{passive:!0}),window.addEventListener("mouseup",ce,{passive:!0}),window.addEventListener("touchend",ce,{passive:!0}),function(){window.removeEventListener("mousemove",ee),window.removeEventListener("touchmove",ee),window.removeEventListener("mouseup",ce),window.removeEventListener("touchend",ce),Xt.cancel(ne)}}},[v]),be(function(){return L(),function(){clearTimeout(N.current)}},[i]),Yt(e,function(){return{delayHidden:L}});var ie="".concat(n,"-scrollbar"),le={position:"absolute",visibility:E?null:"hidden"},pe={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(le,{height:8,left:0,right:0,bottom:0}),Object.assign(pe,D({height:"100%",width:u},T?"left":"right",X))):(Object.assign(le,D({width:8,top:0,bottom:0},T?"right":"left",0)),Object.assign(pe,{width:"100%",height:u,top:X})),y("div",{ref:k,className:Z(ie,D(D(D({},"".concat(ie,"-horizontal"),c),"".concat(ie,"-vertical"),!c),"".concat(ie,"-visible"),E)),style:W(W({},le),f),onMouseDown:F,onMouseMove:L},y("div",{ref:R,className:Z("".concat(ie,"-thumb"),D({},"".concat(ie,"-thumb-moving"),v)),style:W(W({},pe),h),onMouseDown:B}))}),Hz=20;function zy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,Hz),Math.floor(n)}var Xz=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Zz=[],qz={overflowY:"auto",overflowAnchor:"none"};function Gz(t,e){var n=t.prefixCls,r=n===void 0?"rc-virtual-list":n,i=t.className,o=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,d=t.children,f=t.itemKey,h=t.virtual,p=t.direction,m=t.scrollWidth,g=t.component,v=g===void 0?"div":g,O=t.onScroll,S=t.onVirtualScroll,C=t.onVisibleChange,b=t.innerProps,x=t.extraRender,$=t.styles,w=t.showScrollBar,P=w===void 0?"optional":w,_=dt(t,Xz),T=Ht(function(Ee){return typeof f=="function"?f(Ee):Ee==null?void 0:Ee[f]},[f]),k=Dz(T),R=ae(k,4),I=R[0],Q=R[1],E=R[2],A=R[3],N=!!(h!==!1&&o&&a),L=me(function(){return Object.values(E.maps).reduce(function(Ee,We){return Ee+We},0)},[E.id,E.maps]),z=N&&u&&(Math.max(a*u.length,L)>o||!!m),V=p==="rtl",X=Z(r,D({},"".concat(r,"-rtl"),V),i),F=u||Zz,H=Y(),B=Y(),G=Y(),se=K(0),ie=ae(se,2),le=ie[0],pe=ie[1],ne=K(0),ee=ae(ne,2),ce=ee[0],ue=ee[1],j=K(!1),J=ae(j,2),he=J[0],ge=J[1],$e=function(){ge(!0)},Te=function(){ge(!1)},Ce={getKey:T};function Ie(Ee){pe(function(We){var mt;typeof Ee=="function"?mt=Ee(We):mt=Ee;var St=Bt(mt);return H.current.scrollTop=St,St})}var _e=Y({start:0,end:F.length}),ve=Y(),Ne=Nz(F,T),ze=ae(Ne,1),re=ze[0];ve.current=re;var fe=me(function(){if(!N)return{scrollHeight:void 0,start:0,end:F.length-1,offset:void 0};if(!z){var Ee;return{scrollHeight:((Ee=B.current)===null||Ee===void 0?void 0:Ee.offsetHeight)||0,start:0,end:F.length-1,offset:void 0}}for(var We=0,mt,St,Je,Ue=F.length,ht=0;ht=le&&mt===void 0&&(mt=ht,St=We),dn>le+o&&Je===void 0&&(Je=ht),We=dn}return mt===void 0&&(mt=0,St=0,Je=Math.ceil(o/a)),Je===void 0&&(Je=F.length-1),Je=Math.min(Je+1,F.length-1),{scrollHeight:We,start:mt,end:Je,offset:St}},[z,N,le,F,A,o]),te=fe.scrollHeight,Oe=fe.start,we=fe.end,Ke=fe.offset;_e.current.start=Oe,_e.current.end=we,Ti(function(){var Ee=E.getRecord();if(Ee.size===1){var We=Array.from(Ee.keys())[0],mt=Ee.get(We),St=F[Oe];if(St&&mt===void 0){var Je=T(St);if(Je===We){var Ue=E.get(We),ht=Ue-a;Ie(function(It){return It+ht})}}}E.resetRecord()},[te]);var Ae=K({width:0,height:o}),Me=ae(Ae,2),Fe=Me[0],Re=Me[1],ke=function(We){Re({width:We.offsetWidth,height:We.offsetHeight})},ot=Y(),ut=Y(),Pn=me(function(){return zy(Fe.width,m)},[Fe.width,m]),qt=me(function(){return zy(Fe.height,te)},[Fe.height,te]),xn=te-o,gn=Y(xn);gn.current=xn;function Bt(Ee){var We=Ee;return Number.isNaN(gn.current)||(We=Math.min(We,gn.current)),We=Math.max(We,0),We}var bt=le<=0,pt=le>=xn,nt=ce<=0,it=ce>=m,Qe=u2(bt,pt,nt,it),st=function(){return{x:V?-ce:ce,y:le}},ft=Y(st()),Le=pn(function(Ee){if(S){var We=W(W({},st()),Ee);(ft.current.x!==We.x||ft.current.y!==We.y)&&(S(We),ft.current=We)}});function Ge(Ee,We){var mt=Ee;We?(Ql(function(){ue(mt)}),Le()):Ie(mt)}function je(Ee){var We=Ee.currentTarget.scrollTop;We!==le&&Ie(We),O==null||O(Ee),Le()}var He=function(We){var mt=We,St=m?m-Fe.width:0;return mt=Math.max(mt,0),mt=Math.min(mt,St),mt},ct=pn(function(Ee,We){We?(Ql(function(){ue(function(mt){var St=mt+(V?-Ee:Ee);return He(St)})}),Le()):Ie(function(mt){var St=mt+Ee;return St})}),rt=zz(N,bt,pt,nt,it,!!m,ct),Ct=ae(rt,2),$t=Ct[0],wt=Ct[1];Bz(N,H,function(Ee,We,mt,St){var Je=St;return Qe(Ee,We,mt)?!1:!Je||!Je._virtualHandled?(Je&&(Je._virtualHandled=!0),$t({preventDefault:function(){},deltaX:Ee?We:0,deltaY:Ee?0:We}),!0):!1}),Wz(z,H,function(Ee){Ie(function(We){return We+Ee})}),Nt(function(){function Ee(mt){var St=bt&&mt.detail<0,Je=pt&&mt.detail>0;N&&!St&&!Je&&mt.preventDefault()}var We=H.current;return We.addEventListener("wheel",$t,{passive:!1}),We.addEventListener("DOMMouseScroll",wt,{passive:!0}),We.addEventListener("MozMousePixelScroll",Ee,{passive:!1}),function(){We.removeEventListener("wheel",$t),We.removeEventListener("DOMMouseScroll",wt),We.removeEventListener("MozMousePixelScroll",Ee)}},[N,bt,pt]),Nt(function(){if(m){var Ee=He(ce);ue(Ee),Le({x:Ee})}},[Fe.width,m]);var Mt=function(){var We,mt;(We=ot.current)===null||We===void 0||We.delayHidden(),(mt=ut.current)===null||mt===void 0||mt.delayHidden()},vn=Vz(H,F,E,a,T,function(){return Q(!0)},Ie,Mt);Yt(e,function(){return{nativeElement:G.current,getScrollInfo:st,scrollTo:function(We){function mt(St){return St&&tt(St)==="object"&&("left"in St||"top"in St)}mt(We)?(We.left!==void 0&&ue(He(We.left)),vn(We.top)):vn(We)}}}),Nt(function(){if(C){var Ee=F.slice(Oe,we+1);C(Ee,F)}},[Oe,we,F]);var un=Lz(F,T,E,a),Cn=x==null?void 0:x({start:Oe,end:we,virtual:z,offsetX:ce,offsetY:Ke,rtl:V,getSize:un}),jn=Az(F,Oe,we,m,ce,I,d,Ce),Ut=null;o&&(Ut=W(D({},l?"height":"maxHeight",o),qz),N&&(Ut.overflowY="hidden",m&&(Ut.overflowX="hidden"),he&&(Ut.pointerEvents="none")));var rn={};return V&&(rn.dir="rtl"),y("div",xe({ref:G,style:W(W({},c),{},{position:"relative"}),className:X},rn,_),y(Jr,{onResize:ke},y(v,{className:"".concat(r,"-holder"),style:Ut,ref:H,onScroll:je,onMouseEnter:Mt},y(c2,{prefixCls:r,height:te,offsetX:ce,offsetY:Ke,scrollWidth:m,onInnerResize:Q,ref:B,innerProps:b,rtl:V,extra:Cn},jn))),z&&te>o&&y(Ny,{ref:ot,prefixCls:r,scrollOffset:le,scrollRange:te,rtl:V,onScroll:Ge,onStartMove:$e,onStopMove:Te,spinSize:qt,containerSize:Fe.height,style:$==null?void 0:$.verticalScrollBar,thumbStyle:$==null?void 0:$.verticalScrollBarThumb,showScrollBar:P}),z&&m>Fe.width&&y(Ny,{ref:ut,prefixCls:r,scrollOffset:ce,scrollRange:m,rtl:V,onScroll:Ge,onStartMove:$e,onStopMove:Te,spinSize:Pn,containerSize:Fe.width,horizontal:!0,style:$==null?void 0:$.horizontalScrollBar,thumbStyle:$==null?void 0:$.horizontalScrollBarThumb,showScrollBar:P}))}var d2=ye(Gz);d2.displayName="List";function Yz(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Uz=["disabled","title","children","style","className"];function Ly(t){return typeof t=="string"||typeof t=="number"}var Kz=function(e,n){var r=NN(),i=r.prefixCls,o=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=de(s0),p=h.maxCount,m=h.flattenOptions,g=h.onActiveValue,v=h.defaultActiveFirstOption,O=h.onSelect,S=h.menuItemSelectedIcon,C=h.rawValues,b=h.fieldNames,x=h.virtual,$=h.direction,w=h.listHeight,P=h.listItemHeight,_=h.optionRender,T="".concat(i,"-item"),k=vc(function(){return m},[a,m],function(ne,ee){return ee[0]&&ne[1]!==ee[1]}),R=Y(null),I=me(function(){return s&&Wm(p)&&(C==null?void 0:C.size)>=p},[s,p,C==null?void 0:C.size]),Q=function(ee){ee.preventDefault()},E=function(ee){var ce;(ce=R.current)===null||ce===void 0||ce.scrollTo(typeof ee=="number"?{index:ee}:ee)},A=Ht(function(ne){return l==="combobox"?!1:C.has(ne)},[l,Pe(C).toString(),C.size]),N=function(ee){for(var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ue=k.length,j=0;j1&&arguments[1]!==void 0?arguments[1]:!1;X(ee);var ue={source:ce?"keyboard":"mouse"},j=k[ee];if(!j){g(null,-1,ue);return}g(j.value,ee,ue)};be(function(){F(v!==!1?N(0):-1)},[k.length,c]);var H=Ht(function(ne){return l==="combobox"?String(ne).toLowerCase()===c.toLowerCase():C.has(ne)},[l,c,Pe(C).toString(),C.size]);be(function(){var ne=setTimeout(function(){if(!s&&a&&C.size===1){var ce=Array.from(C)[0],ue=k.findIndex(function(j){var J=j.data;return c?String(J.value).startsWith(c):J.value===ce});ue!==-1&&(F(ue),E(ue))}});if(a){var ee;(ee=R.current)===null||ee===void 0||ee.scrollTo(void 0)}return function(){return clearTimeout(ne)}},[a,c]);var B=function(ee){ee!==void 0&&O(ee,{selected:!C.has(ee)}),s||u(!1)};if(Yt(n,function(){return{onKeyDown:function(ee){var ce=ee.which,ue=ee.ctrlKey;switch(ce){case Ve.N:case Ve.P:case Ve.UP:case Ve.DOWN:{var j=0;if(ce===Ve.UP?j=-1:ce===Ve.DOWN?j=1:Yz()&&ue&&(ce===Ve.N?j=1:ce===Ve.P&&(j=-1)),j!==0){var J=N(V+j,j);E(J),F(J,!0)}break}case Ve.TAB:case Ve.ENTER:{var he,ge=k[V];ge&&!(ge!=null&&(he=ge.data)!==null&&he!==void 0&&he.disabled)&&!I?B(ge.value):B(void 0),a&&ee.preventDefault();break}case Ve.ESC:u(!1),a&&ee.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ee){E(ee)}}}),k.length===0)return y("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(T,"-empty"),onMouseDown:Q},d);var G=Object.keys(b).map(function(ne){return b[ne]}),se=function(ee){return ee.label};function ie(ne,ee){var ce=ne.group;return{role:ce?"presentation":"option",id:"".concat(o,"_list_").concat(ee)}}var le=function(ee){var ce=k[ee];if(!ce)return null;var ue=ce.data||{},j=ue.value,J=ce.group,he=$i(ue,!0),ge=se(ce);return ce?y("div",xe({"aria-label":typeof ge=="string"&&!J?ge:null},he,{key:ee},ie(ce,ee),{"aria-selected":H(j)}),j):null},pe={role:"listbox",id:"".concat(o,"_list")};return y(At,null,x&&y("div",xe({},pe,{style:{height:0,width:0,overflow:"hidden"}}),le(V-1),le(V),le(V+1)),y(d2,{itemKey:"key",ref:R,data:k,height:w,itemHeight:P,fullHeight:!1,onMouseDown:Q,onScroll:f,virtual:x,direction:$,innerProps:x?null:pe},function(ne,ee){var ce=ne.group,ue=ne.groupOption,j=ne.data,J=ne.label,he=ne.value,ge=j.key;if(ce){var $e,Te=($e=j.title)!==null&&$e!==void 0?$e:Ly(J)?J.toString():void 0;return y("div",{className:Z(T,"".concat(T,"-group"),j.className),title:Te},J!==void 0?J:ge)}var Ce=j.disabled,Ie=j.title;j.children;var _e=j.style,ve=j.className,Ne=dt(j,Uz),ze=cn(Ne,G),re=A(he),fe=Ce||!re&&I,te="".concat(T,"-option"),Oe=Z(T,te,ve,D(D(D(D({},"".concat(te,"-grouped"),ue),"".concat(te,"-active"),V===ee&&!fe),"".concat(te,"-disabled"),fe),"".concat(te,"-selected"),re)),we=se(ne),Ke=!S||typeof S=="function"||re,Ae=typeof we=="number"?we:we||he,Me=Ly(Ae)?Ae.toString():void 0;return Ie!==void 0&&(Me=Ie),y("div",xe({},$i(ze),x?{}:ie(ne,ee),{"aria-selected":H(he),className:Oe,title:Me,onMouseMove:function(){V===ee||fe||F(ee)},onClick:function(){fe||B(he)},style:_e}),y("div",{className:"".concat(te,"-content")},typeof _=="function"?_(ne,{index:ee}):Ae),Jt(S)||re,Ke&&y(Wf,{className:"".concat(T,"-option-state"),customizeIcon:S,customizeIconProps:{value:he,disabled:fe,isSelected:re}},re?"✓":null))}))},Jz=ye(Kz);const e6=function(t,e){var n=Y({values:new Map,options:new Map}),r=me(function(){var o=n.current,a=o.values,s=o.options,l=t.map(function(d){if(d.label===void 0){var f;return W(W({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,e.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[t,e]),i=Ht(function(o){return e.get(o)||n.current.options.get(o)},[e]);return[r,i]};function Xh(t,e){return a2(t).join("").toUpperCase().includes(e)}const t6=function(t,e,n,r,i){return me(function(){if(!n||r===!1)return t;var o=e.options,a=e.label,s=e.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(h,p){return i?Xh(p[i],u):p[o]?Xh(p[a!=="children"?a:"label"],u):Xh(p[s],u)},f=c?function(h){return Fm(h)}:function(h){return h};return t.forEach(function(h){if(h[o]){var p=d(n,f(h));if(p)l.push(h);else{var m=h[o].filter(function(g){return d(n,f(g))});m.length&&l.push(W(W({},h),{},D({},o,m)))}return}d(n,f(h))&&l.push(h)}),l},[t,r,i,n,e])};var jy=0,n6=fr();function r6(){var t;return n6?(t=jy,jy+=1):t="TEST_OR_SSR",t}function i6(t){var e=K(),n=ae(e,2),r=n[0],i=n[1];return be(function(){i("rc_select_".concat(r6()))},[]),t||r}var o6=["children","value"],a6=["children"];function s6(t){var e=t,n=e.key,r=e.props,i=r.children,o=r.value,a=dt(r,o6);return W({key:n,value:o!==void 0?o:n,children:i},a)}function f2(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return rr(t).map(function(n,r){if(!Jt(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,c=dt(s,a6);return e||!o?s6(n):W(W({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:f2(l)})}).filter(function(n){return n})}var l6=function(e,n,r,i,o){return me(function(){var a=e,s=!e;s&&(a=f2(n));var l=new Map,c=new Map,u=function(h,p,m){m&&typeof m=="string"&&h.set(p[m],p)},d=function f(h){for(var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=0;m0?Le(He.options):He.options}):He})},Ae=me(function(){return O?Ke(we):we},[we,O,pe]),Me=me(function(){return _z(Ae,{fieldNames:se,childrenAsData:B})},[Ae,se,B]),Fe=function(Ge){var je=J(Ge);if(Te(je),z&&(je.length!==ve.length||je.some(function(rt,Ct){var $t;return(($t=ve[Ct])===null||$t===void 0?void 0:$t.value)!==(rt==null?void 0:rt.value)}))){var He=L?je:je.map(function(rt){return rt.value}),ct=je.map(function(rt){return Fm(Ne(rt.value))});z(H?He:He[0],H?ct:ct[0])}},Re=K(null),ke=ae(Re,2),ot=ke[0],ut=ke[1],Pn=K(0),qt=ae(Pn,2),xn=qt[0],gn=qt[1],Bt=w!==void 0?w:r!=="combobox",bt=Ht(function(Le,Ge){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},He=je.source,ct=He===void 0?"keyboard":He;gn(Ge),a&&r==="combobox"&&Le!==null&&ct==="keyboard"&&ut(String(Le))},[a,r]),pt=function(Ge,je,He){var ct=function(){var Ut,rn=Ne(Ge);return[L?{label:rn==null?void 0:rn[se.label],value:Ge,key:(Ut=rn==null?void 0:rn.key)!==null&&Ut!==void 0?Ut:Ge}:Ge,Fm(rn)]};if(je&&h){var rt=ct(),Ct=ae(rt,2),$t=Ct[0],wt=Ct[1];h($t,wt)}else if(!je&&p&&He!=="clear"){var Mt=ct(),vn=ae(Mt,2),un=vn[0],Cn=vn[1];p(un,Cn)}},nt=Dy(function(Le,Ge){var je,He=H?Ge.selected:!0;He?je=H?[].concat(Pe(ve),[Le]):[Le]:je=ve.filter(function(ct){return ct.value!==Le}),Fe(je),pt(Le,He),r==="combobox"?ut(""):(!Vm||f)&&(ne(""),ut(""))}),it=function(Ge,je){Fe(Ge);var He=je.type,ct=je.values;(He==="remove"||He==="clear")&&ct.forEach(function(rt){pt(rt.value,!1,He)})},Qe=function(Ge,je){if(ne(Ge),ut(null),je.source==="submit"){var He=(Ge||"").trim();if(He){var ct=Array.from(new Set([].concat(Pe(re),[He])));Fe(ct),pt(He,!0),ne("")}return}je.source!=="blur"&&(r==="combobox"&&Fe(Ge),u==null||u(Ge))},st=function(Ge){var je=Ge;r!=="tags"&&(je=Ge.map(function(ct){var rt=ue.get(ct);return rt==null?void 0:rt.value}).filter(function(ct){return ct!==void 0}));var He=Array.from(new Set([].concat(Pe(re),Pe(je))));Fe(He),He.forEach(function(ct){pt(ct,!0)})},ft=me(function(){var Le=_!==!1&&g!==!1;return W(W({},ee),{},{flattenOptions:Me,onActiveValue:bt,defaultActiveFirstOption:Bt,onSelect:nt,menuItemSelectedIcon:P,rawValues:re,fieldNames:se,virtual:Le,direction:T,listHeight:R,listItemHeight:Q,childrenAsData:B,maxCount:V,optionRender:x})},[V,ee,Me,bt,Bt,nt,P,re,se,_,g,T,R,Q,B,x]);return y(s0.Provider,{value:ft},y(Mz,xe({},X,{id:F,prefixCls:o,ref:e,omitDomProps:u6,mode:r,displayValues:ze,onDisplayValuesChange:it,direction:T,searchValue:pe,onSearch:Qe,autoClearSearchValue:f,onSearchSplit:st,dropdownMatchSelectWidth:g,OptionList:Jz,emptyOptions:!Me.length,activeValue:ot,activeDescendantId:"".concat(F,"_list_").concat(xn)})))}),u0=f6;u0.Option=c0;u0.OptGroup=l0;function Td(t,e,n){return Z({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const Vf=(t,e)=>e||t,h6=()=>{const[,t]=$r(),[e]=Ki("Empty"),r=new Dt(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return y("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},y("title",null,(e==null?void 0:e.description)||"Empty"),y("g",{fill:"none",fillRule:"evenodd"},y("g",{transform:"translate(24 31.67)"},y("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),y("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),y("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),y("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),y("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),y("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),y("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},y("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),y("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},p6=()=>{const[,t]=$r(),[e]=Ki("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=t,{borderColor:a,shadowColor:s,contentColor:l}=me(()=>({borderColor:new Dt(n).onBackground(o).toHexString(),shadowColor:new Dt(r).onBackground(o).toHexString(),contentColor:new Dt(i).onBackground(o).toHexString()}),[n,r,i,o]);return y("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},y("title",null,(e==null?void 0:e.description)||"Empty"),y("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},y("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),y("g",{fillRule:"nonzero",stroke:a},y("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),y("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},m6=t=>{const{componentCls:e,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=t;return{[e]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:r,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:r,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},g6=Zt("Empty",t=>{const{componentCls:e,controlHeightLG:n,calc:r}=t,i=kt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return m6(i)});var v6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{className:n,rootClassName:r,prefixCls:i,image:o,description:a,children:s,imageStyle:l,style:c,classNames:u,styles:d}=t,f=v6(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:h,direction:p,className:m,style:g,classNames:v,styles:O,image:S}=ir("empty"),C=h("empty",i),[b,x,$]=g6(C),[w]=Ki("Empty"),P=typeof a<"u"?a:w==null?void 0:w.description,_=typeof P=="string"?P:"empty",T=(e=o??S)!==null&&e!==void 0?e:h2;let k=null;return typeof T=="string"?k=y("img",{draggable:!1,alt:_,src:T}):k=T,b(y("div",Object.assign({className:Z(x,$,C,m,{[`${C}-normal`]:T===p2,[`${C}-rtl`]:p==="rtl"},n,r,v.root,u==null?void 0:u.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},O.root),g),d==null?void 0:d.root),c)},f),y("div",{className:Z(`${C}-image`,v.image,u==null?void 0:u.image),style:Object.assign(Object.assign(Object.assign({},l),O.image),d==null?void 0:d.image)},k),P&&y("div",{className:Z(`${C}-description`,v.description,u==null?void 0:u.description),style:Object.assign(Object.assign({},O.description),d==null?void 0:d.description)},P),s&&y("div",{className:Z(`${C}-footer`,v.footer,u==null?void 0:u.footer),style:Object.assign(Object.assign({},O.footer),d==null?void 0:d.footer)},s)))};ea.PRESENTED_IMAGE_DEFAULT=h2;ea.PRESENTED_IMAGE_SIMPLE=p2;const O6=t=>{const{componentName:e}=t,{getPrefixCls:n}=de(at),r=n("empty");switch(e){case"Table":case"List":return oe.createElement(ea,{image:ea.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return oe.createElement(ea,{image:ea.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return oe.createElement(ea,null)}},Hf=(t,e,n=void 0)=>{var r,i;const{variant:o,[t]:a}=de(at),s=de(Tw),l=a==null?void 0:a.variant;let c;typeof e<"u"?c=e:n===!1?c="borderless":c=(i=(r=s??l)!==null&&r!==void 0?r:o)!==null&&i!==void 0?i:"outlined";const u=KM.includes(c);return[c,u]},b6=t=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function y6(t,e){return t||b6(e)}const By=t=>{const{optionHeight:e,optionFontSize:n,optionLineHeight:r,optionPadding:i}=t;return{position:"relative",display:"block",minHeight:e,padding:i,color:t.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},S6=t=>{const{antCls:e,componentCls:n}=t,r=`${n}-item`,i=`&${e}-slide-up-enter${e}-slide-up-enter-active`,o=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[` ${i}${s}bottomLeft, ${o}${s}bottomLeft - `]:{animationName:Vv},[` + `]:{animationName:Hv},[` ${i}${s}topLeft, ${o}${s}topLeft, ${i}${s}topRight, ${o}${s}topRight - `]:{animationName:Xv},[`${a}${s}bottomLeft`]:{animationName:Hv},[` + `]:{animationName:Zv},[`${a}${s}bottomLeft`]:{animationName:Xv},[` ${a}${s}topLeft, ${a}${s}topRight - `]:{animationName:Zv},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},Dy(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},ba),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${r}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Dy(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Lo(t,"slide-up"),Lo(t,"slide-down"),Cd(t,"move-up"),Cd(t,"move-down")]},x6=t=>{const{multipleSelectItemHeight:e,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=t,o=t.max(t.calc(n).sub(r).equal(),0),a=t.max(t.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:q(e),itemLineHeight:q(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},C6=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:r}=t;return t.calc(n).sub(e).div(2).sub(r).equal()},$6=t=>{const{componentCls:e,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:t.calc(o).div(2).equal(),[`${e}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},As()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},w6=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=t,i=`${n}-selection-overflow`,o=t.multipleSelectItemHeight,a=C6(t),s=e?`${n}-${e}`:"",l=x6(t);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},$6(t)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${n}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${q(r)} 0`,lineHeight:q(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:q(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:q(o),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${i}-item + ${i}-item, + `]:{animationName:qv},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},By(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Sa),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${r}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},By(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},jo(t,"slide-up"),jo(t,"slide-down"),wd(t,"move-up"),wd(t,"move-down")]},x6=t=>{const{multipleSelectItemHeight:e,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=t,o=t.max(t.calc(n).sub(r).equal(),0),a=t.max(t.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:q(e),itemLineHeight:q(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},C6=t=>{const{multipleSelectItemHeight:e,selectHeight:n,lineWidth:r}=t;return t.calc(n).sub(e).div(2).sub(r).equal()},$6=t=>{const{componentCls:e,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:t.calc(o).div(2).equal(),[`${e}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},As()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},w6=(t,e)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=t,i=`${n}-selection-overflow`,o=t.multipleSelectItemHeight,a=C6(t),s=e?`${n}-${e}`:"",l=x6(t);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},$6(t)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${n}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${q(r)} 0`,lineHeight:q(o),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:q(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:q(o),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${i}-item + ${i}-item, ${n}-prefix + ${n}-selection-wrap - `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:t.fontFamily,lineHeight:q(o),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function Hh(t,e){const{componentCls:n}=t,r=e?`${n}-${e}`:"",i={[`${n}-multiple${r}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[` + `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:t.fontFamily,lineHeight:q(o),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function Zh(t,e){const{componentCls:n}=t,r=e?`${n}-${e}`:"",i={[`${n}-multiple${r}`]:{fontSize:t.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[` &${n}-show-arrow ${n}-selector, &${n}-allow-clear ${n}-selector - `]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[w6(t,e),i]}const P6=t=>{const{componentCls:e}=t,n=kt(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),r=kt(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[Hh(t),Hh(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},Hh(r,"lg")]};function Xh(t,e){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=t,o=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=e?`${n}-${e}`:"";return{[`${n}-single${a}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},wn(t,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:q(o)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[` + `]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[w6(t,e),i]}const P6=t=>{const{componentCls:e}=t,n=kt(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),r=kt(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[Zh(t),Zh(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},Zh(r,"lg")]};function qh(t,e){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:i}=t,o=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=e?`${n}-${e}`:"";return{[`${n}-single${a}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},wn(t,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:q(o)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[` ${n}-selection-item, ${n}-selection-placeholder `]:{display:"block",padding:0,lineHeight:q(o),transition:`all ${t.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` &${n}-show-arrow ${n}-selection-item, &${n}-show-arrow ${n}-selection-search, &${n}-show-arrow ${n}-selection-placeholder - `]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${q(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:t.fontSize},"&:after":{lineHeight:q(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${q(r)}`,"&:after":{display:"none"}}}}}}}function _6(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[Xh(t),Xh(kt(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${q(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[` + `]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${q(r)}`,[`${n}-selection-search-input`]:{height:o,fontSize:t.fontSize},"&:after":{lineHeight:q(o)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${q(r)}`,"&:after":{display:"none"}}}}}}}function _6(t){const{componentCls:e}=t,n=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[qh(t),qh(kt(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${q(n)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(n).add(t.calc(t.fontSize).mul(1.5)).equal()},[` &${e}-show-arrow ${e}-selection-item, &${e}-show-arrow ${e}-selection-placeholder - `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},Xh(kt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const T6=t=>{const{fontSize:e,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:p,colorFillSecondary:m,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:O,colorPrimary:S,controlOutline:x}=t,b=s*2,C=r*2,$=Math.min(i-b,i-C),w=Math.min(o-b,o-C),P=Math.min(a-b,a-C);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(i-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:i,selectorBg:p,clearBg:p,singleItemHeightLG:a,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:$,multipleItemHeightSM:w,multipleItemHeightLG:P,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:O,activeBorderColor:S,activeOutlineColor:x,selectAffixPadding:s}},m2=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${q(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${q(i)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},By=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},m2(t,e))}),k6=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},m2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),By(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),By(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),g2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${q(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},Wy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},g2(t,e))}),R6=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},g2(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),Wy(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),Wy(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),I6=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),v2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${q(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${n}-prefix`]:{color:e.color}}}},Fy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},v2(t,e))}),M6=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},v2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Fy(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Fy(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),E6=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},k6(t)),R6(t)),I6(t)),M6(t))}),A6=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Q6=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},N6=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=t,o={[`${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},A6(t)),Q6(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},ba),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},ba),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},As()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},z6=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},N6(t),_6(t),P6(t),S6(t),{[`${e}-rtl`]:{direction:"rtl"}},Yv(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},L6=Zt("Select",(t,{rootPrefixCls:e})=>{const n=kt(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[z6(n),E6(n)]},T6,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var j6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},D6=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:j6}))},_d=Se(D6),B6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},W6=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:B6}))},O2=Se(W6),F6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},V6=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:F6}))},b2=Se(V6);function H6({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){const f=e??y(zs,null),h=v=>t===null&&!a&&!u?null:y(At,null,l!==!1&&v,a&&c);let p=null;if(t!==void 0)p=h(t);else if(i)p=h(y(yc,{spin:!0}));else{const v=`${s}-suffix`;p=({open:O,showSearch:S})=>h(O&&S?y(b2,{className:v}):y(O2,{className:v}))}let m=null;n!==void 0?m=n:o?m=y(_d,null):m=null;let g=null;return r!==void 0?g=r:g=y(Vi,null),{clearIcon:f,suffixIcon:p,itemIcon:m,removeIcon:g}}function X6(t){return oe.useMemo(()=>{if(t)return(...e)=>oe.createElement(bs,{space:!0},t.apply(void 0,e))},[t])}function Z6(t,e){return e!==void 0?e:t!==null}var q6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a;const{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:d,popupClassName:f,dropdownClassName:h,listHeight:p=256,placement:m,listItemHeight:g,size:v,disabled:O,notFoundContent:S,status:x,builtinPlacements:b,dropdownMatchSelectWidth:C,popupMatchSelectWidth:$,direction:w,style:P,allowClear:_,variant:T,dropdownStyle:R,transitionName:k,tagRender:I,maxCount:Q,prefix:M,dropdownRender:E,popupRender:N,onDropdownVisibleChange:z,onOpenChange:L,styles:F,classNames:H}=t,V=q6(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:X,getPrefixCls:B,renderEmpty:G,direction:se,virtual:re,popupMatchSelectWidth:le,popupOverflow:me}=fe(it),{showSearch:ie,style:ne,styles:ue,className:de,classNames:j}=rr("select"),[,ee]=Cr(),he=g??(ee==null?void 0:ee.controlHeight),ve=B("select",s),Y=B(),ce=w??se,{compactSize:te,compactItemClassnames:Oe}=js(ve,ce),[ye,pe]=Ff("select",T,l),Qe=$r(ve),[Me,De,we]=L6(ve,Qe),Ie=ge(()=>{const{mode:We}=t;if(We!=="combobox")return We===y2?"combobox":We},[t.mode]),rt=Ie==="multiple"||Ie==="tags",Ye=Z6(t.suffixIcon,t.showArrow),lt=(n=$??C)!==null&&n!==void 0?n:le,Be=((r=F==null?void 0:F.popup)===null||r===void 0?void 0:r.root)||((i=ue.popup)===null||i===void 0?void 0:i.root)||R,ke=X6(N||E),Xe=L||z,{status:_e,hasFeedback:Pe,isFormItemInput:ct,feedbackIcon:xt}=fe(Jr),Pn=Wf(_e,x);let qt;S!==void 0?qt=S:Ie==="combobox"?qt=null:qt=(G==null?void 0:G("Select"))||y(O6,{componentName:"Select"});const{suffixIcon:xn,itemIcon:gn,removeIcon:Bt,clearIcon:Ot}=H6(Object.assign(Object.assign({},V),{multiple:rt,hasFeedback:Pe,feedbackIcon:xt,showSuffixIcon:Ye,prefixCls:ve,componentName:"Select"})),ht=_===!0?{clearIcon:Ot}:_,et=cn(V,["suffixIcon","itemIcon"]),nt=Z(((o=H==null?void 0:H.popup)===null||o===void 0?void 0:o.root)||((a=j==null?void 0:j.popup)===null||a===void 0?void 0:a.root)||f||h,{[`${ve}-dropdown-${ce}`]:ce==="rtl"},u,j.root,H==null?void 0:H.root,we,Qe,De),Re=Dr(We=>{var st;return(st=v??te)!==null&&st!==void 0?st:We}),ot=fe(qi),dt=O??ot,Ee=Z({[`${ve}-lg`]:Re==="large",[`${ve}-sm`]:Re==="small",[`${ve}-rtl`]:ce==="rtl",[`${ve}-${ye}`]:pe,[`${ve}-in-form-item`]:ct},Pd(ve,Pn,Pe),Oe,de,c,j.root,H==null?void 0:H.root,u,we,Qe,De),Ze=ge(()=>m!==void 0?m:ce==="rtl"?"bottomRight":"bottomLeft",[m,ce]),[Ae]=Sc("SelectLike",Be==null?void 0:Be.zIndex);return Me(y(c0,Object.assign({ref:e,virtual:re,showSearch:ie},et,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ue.root),F==null?void 0:F.root),ne),P),dropdownMatchSelectWidth:lt,transitionName:zo(Y,"slide-up",k),builtinPlacements:y6(b,me),listHeight:p,listItemHeight:he,mode:Ie,prefixCls:ve,placement:Ze,direction:ce,prefix:M,suffixIcon:xn,menuItemSelectedIcon:gn,removeIcon:Bt,allowClear:ht,notFoundContent:qt,className:Ee,getPopupContainer:d||X,dropdownClassName:nt,disabled:dt,dropdownStyle:Object.assign(Object.assign({},Be),{zIndex:Ae}),maxCount:rt?Q:void 0,tagRender:rt?I:void 0,dropdownRender:ke,onDropdownVisibleChange:Xe})))},jn=Se(G6),Y6=Jw(jn,"dropdownAlign");jn.SECRET_COMBOBOX_MODE_DO_NOT_USE=y2;jn.Option=l0;jn.OptGroup=s0;jn._InternalPanelDoNotUseOrYouWillBeFired=Y6;const S2=(t,e)=>{typeof(t==null?void 0:t.addEventListener)<"u"?t.addEventListener("change",e):typeof(t==null?void 0:t.addListener)<"u"&&t.addListener(e)},x2=(t,e)=>{typeof(t==null?void 0:t.removeEventListener)<"u"?t.removeEventListener("change",e):typeof(t==null?void 0:t.removeListener)<"u"&&t.removeListener(e)},ys=["xxl","xl","lg","md","sm","xs"],U6=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`}),K6=t=>{const e=t,n=[].concat(ys).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,s=`screen${o}`;if(!(e[a]<=e[s]))throw new Error(`${a}<=${s} fails : !(${e[a]}<=${e[s]})`);if(i{const[,t]=Cr(),e=U6(K6(t));return oe.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:e,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(e).forEach(([o,a])=>{const s=({matches:c})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:c}))},l=window.matchMedia(a);S2(l,s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},unregister(){Object.values(e).forEach(o=>{const a=this.matchHandlers[o];x2(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[t])};function eL(){const[,t]=Ms(e=>e+1,0);return t}function C2(t=!0,e={}){const n=U(e),r=eL(),i=J6();return Nt(()=>{const o=i.subscribe(a=>{n.current=a,t&&r()});return()=>i.unsubscribe(o)},[]),n.current}const Vm=bt({}),tL=t=>{const{antCls:e,componentCls:n,iconCls:r,avatarBg:i,avatarColor:o,containerSize:a,containerSizeLG:s,containerSizeSM:l,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:h,iconFontSizeSM:p,borderRadius:m,borderRadiusLG:g,borderRadiusSM:v,lineWidth:O,lineType:S}=t,x=(b,C,$,w)=>({width:b,height:b,borderRadius:"50%",fontSize:C,[`&${n}-square`]:{borderRadius:w},[`&${n}-icon`]:{fontSize:$,[`> ${r}`]:{margin:0}}});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:o,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:i,border:`${q(O)} ${S} transparent`,"&-image":{background:"transparent"},[`${e}-image-img`]:{display:"block"}}),x(a,c,f,m)),{"&-lg":Object.assign({},x(s,u,h,g)),"&-sm":Object.assign({},x(l,d,p,v)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},nL=t=>{const{componentCls:e,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=t;return{[`${e}-group`]:{display:"inline-flex",[e]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${e}-group-popover`]:{[`${e} + ${e}`]:{marginInlineStart:i}}}},rL=t=>{const{controlHeight:e,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:o,fontSizeXL:a,fontSizeHeading3:s,marginXS:l,marginXXS:c,colorBorderBg:u}=t;return{containerSize:e,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((o+a)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:c,groupOverlapping:-l,groupBorderColor:u}},$2=Zt("Avatar",t=>{const{colorTextLightSolid:e,colorTextPlaceholder:n}=t,r=kt(t,{avatarBg:n,avatarColor:e});return[tL(r),nL(r)]},rL);var iL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,shape:r,size:i,src:o,srcSet:a,icon:s,className:l,rootClassName:c,style:u,alt:d,draggable:f,children:h,crossOrigin:p,gap:m=4,onError:g}=t,v=iL(t,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","style","alt","draggable","children","crossOrigin","gap","onError"]),[O,S]=J(1),[x,b]=J(!1),[C,$]=J(!0),w=U(null),P=U(null),_=pr(e,w),{getPrefixCls:T,avatar:R}=fe(it),k=fe(Vm),I=()=>{if(!P.current||!w.current)return;const ie=P.current.offsetWidth,ne=w.current.offsetWidth;ie!==0&&ne!==0&&m*2{b(!0)},[]),be(()=>{$(!0),S(1)},[o]),be(I,[m]);const Q=()=>{(g==null?void 0:g())!==!1&&$(!1)},M=Dr(ie=>{var ne,ue;return(ue=(ne=i??(k==null?void 0:k.size))!==null&&ne!==void 0?ne:ie)!==null&&ue!==void 0?ue:"default"}),E=Object.keys(typeof M=="object"?M||{}:{}).some(ie=>["xs","sm","md","lg","xl","xxl"].includes(ie)),N=C2(E),z=ge(()=>{if(typeof M!="object")return{};const ie=ys.find(ue=>N[ue]),ne=M[ie];return ne?{width:ne,height:ne,fontSize:ne&&(s||h)?ne/2:18}:{}},[N,M]),L=T("avatar",n),F=$r(L),[H,V,X]=$2(L,F),B=Z({[`${L}-lg`]:M==="large",[`${L}-sm`]:M==="small"}),G=Kt(o),se=r||(k==null?void 0:k.shape)||"circle",re=Z(L,B,R==null?void 0:R.className,`${L}-${se}`,{[`${L}-image`]:G||o&&C,[`${L}-icon`]:!!s},X,F,l,c,V),le=typeof M=="number"?{width:M,height:M,fontSize:s?M/2:18}:{};let me;if(typeof o=="string"&&C)me=y("img",{src:o,draggable:f,srcSet:a,onError:Q,alt:d,crossOrigin:p});else if(G)me=o;else if(s)me=s;else if(x||O!==1){const ie=`scale(${O})`,ne={msTransform:ie,WebkitTransform:ie,transform:ie};me=y(Kr,{onResize:I},y("span",{className:`${L}-string`,ref:P,style:Object.assign({},ne)},h))}else me=y("span",{className:`${L}-string`,style:{opacity:0},ref:P},h);return H(y("span",Object.assign({},v,{style:Object.assign(Object.assign(Object.assign(Object.assign({},le),z),R==null?void 0:R.style),u),className:re,ref:_}),me))}),Ss=t=>t?typeof t=="function"?t():t:null;function u0(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,a=t.className,s=t.style;return y("div",{className:Z("".concat(n,"-content"),a),style:s},y("div",{className:Z("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}var La={shiftX:64,adjustY:1},ja={adjustX:1,shiftY:!0},ri=[0,0],oL={left:{points:["cr","cl"],overflow:ja,offset:[-4,0],targetOffset:ri},right:{points:["cl","cr"],overflow:ja,offset:[4,0],targetOffset:ri},top:{points:["bc","tc"],overflow:La,offset:[0,-4],targetOffset:ri},bottom:{points:["tc","bc"],overflow:La,offset:[0,4],targetOffset:ri},topLeft:{points:["bl","tl"],overflow:La,offset:[0,-4],targetOffset:ri},leftTop:{points:["tr","tl"],overflow:ja,offset:[-4,0],targetOffset:ri},topRight:{points:["br","tr"],overflow:La,offset:[0,-4],targetOffset:ri},rightTop:{points:["tl","tr"],overflow:ja,offset:[4,0],targetOffset:ri},bottomRight:{points:["tr","br"],overflow:La,offset:[0,4],targetOffset:ri},rightBottom:{points:["bl","br"],overflow:ja,offset:[4,0],targetOffset:ri},bottomLeft:{points:["tl","bl"],overflow:La,offset:[0,4],targetOffset:ri},leftBottom:{points:["br","bl"],overflow:ja,offset:[-4,0],targetOffset:ri}},aL=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],sL=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?"rc-tooltip":d,h=e.children,p=e.onVisibleChange,m=e.afterVisibleChange,g=e.transitionName,v=e.animation,O=e.motion,S=e.placement,x=S===void 0?"right":S,b=e.align,C=b===void 0?{}:b,$=e.destroyTooltipOnHide,w=$===void 0?!1:$,P=e.defaultVisible,_=e.getTooltipContainer,T=e.overlayInnerStyle;e.arrowContent;var R=e.overlay,k=e.id,I=e.showArrow,Q=I===void 0?!0:I,M=e.classNames,E=e.styles,N=ut(e,aL),z=Jv(k),L=U(null);Yt(n,function(){return L.current});var F=W({},N);"visible"in e&&(F.popupVisible=e.visible);var H=function(){return y(u0,{key:"content",prefixCls:f,id:z,bodyClassName:M==null?void 0:M.body,overlayInnerStyle:W(W({},T),E==null?void 0:E.body)},R)},V=function(){var B=Ao.only(h),G=(B==null?void 0:B.props)||{},se=W(W({},G),{},{"aria-describedby":R?z:null});return Xn(h,se)};return y(Bf,Ce({popupClassName:Z(r,M==null?void 0:M.root),prefixCls:f,popup:H,action:o,builtinPlacements:oL,popupPlacement:x,ref:L,popupAlign:C,getPopupContainer:_,onPopupVisibleChange:p,afterPopupVisibleChange:m,popupTransitionName:g,popupAnimation:v,popupMotion:O,defaultPopupVisible:P,autoDestroy:w,mouseLeaveDelay:c,popupStyle:W(W({},u),E==null?void 0:E.root),mouseEnterDelay:s,arrow:Q},F),V())};const lL=Se(sL);function d0(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:r}=t,i=e/2,o=0,a=i,s=r*1/Math.sqrt(2),l=i-r*(1-1/Math.sqrt(2)),c=i-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*i-c,f=u,h=2*i-s,p=l,m=2*i-o,g=a,v=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),O=r*(Math.sqrt(2)-1),S=`polygon(${O}px 100%, 50% ${O}px, ${2*i-O}px 100%, ${O}px 100%)`,x=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${h} ${p} A ${r} ${r} 0 0 0 ${m} ${g} Z')`;return{arrowShadowWidth:v,arrowPath:x,arrowPolygon:S}}const cL=(t,e,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${q(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},P2=8;function Vf(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?P2:r}}function iu(t,e){return t?e:{}}function f0(t,e,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},cL(t,e,i)),{"&:before":{background:e}})]},iu(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${q(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),iu(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${q(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),iu(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),iu(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function uL(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Vy={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},dL={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},fL=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function _2(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=t,s=e/2,l={},c=Vf({contentRadius:o,limitVerticalRadius:!0});return Object.keys(Vy).forEach(u=>{const d=r&&dL[u]||Vy[u],f=Object.assign(Object.assign({},d),{offset:[0,0],dynamicInset:!0});switch(l[u]=f,fL.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+i;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=uL(u,c,e,n),a&&(f.htmlRegion="visibleFirst")}),l}const hL=t=>{const{calc:e,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=t,p=e(a).add(h).add(f).equal(),m=e(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:m,minHeight:l,padding:`${q(t.calc(u).div(2).equal())} ${q(d)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:p},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:t.min(a,P2)}},[`${n}-content`]:{position:"relative"}}),k$(t,(g,{darkColor:v})=>({[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:v},[`${n}-arrow`]:{"--antd-arrow-background-color":v}}}))),{"&-rtl":{direction:"rtl"}})},f0(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},pL=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},Vf({contentRadius:t.borderRadius,limitVerticalRadius:!0})),d0(kt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),T2=(t,e=!0)=>Zt("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,s=kt(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[hL(s),Cc(r,"zoom-big-fast")]},pL,{resetStyle:!1,injectStyle:e})(t),mL=Qo.map(t=>`${t}-inverse`),gL=["success","processing","error","default","warning"];function k2(t,e=!0){return e?[].concat($e(mL),$e(Qo)).includes(t):Qo.includes(t)}function vL(t){return gL.includes(t)}function R2(t,e){const n=k2(e),r=Z({[`${t}-${e}`]:e&&n}),i={},o={},a=AQ(e).toRgb(),l=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return e&&!n&&(i.background=e,i["--ant-tooltip-color"]=l,o["--antd-arrow-background-color"]=e),{className:r,overlayStyle:i,arrowStyle:o}}const OL=t=>{const{prefixCls:e,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=t,{getPrefixCls:s}=fe(it),l=s("tooltip",e),[c,u,d]=T2(l),f=R2(l,o),h=f.arrowStyle,p=Object.assign(Object.assign({},a),f.overlayStyle),m=Z(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(y("div",{className:m,style:h},y("div",{className:`${l}-arrow`}),y(u0,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:p}),i)))};var bL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:h,arrow:p=!0,title:m,overlay:g,builtinPlacements:v,arrowPointAtCenter:O=!1,autoAdjustOverflow:S=!0,motion:x,getPopupContainer:b,placement:C="top",mouseEnterDelay:$=.1,mouseLeaveDelay:w=.1,overlayStyle:P,rootClassName:_,overlayClassName:T,styles:R,classNames:k}=t,I=bL(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),Q=!!p,[,M]=Cr(),{getPopupContainer:E,getPrefixCls:N,direction:z,className:L,style:F,classNames:H,styles:V}=rr("tooltip"),X=bc(),B=U(null),G=()=>{var Ye;(Ye=B.current)===null||Ye===void 0||Ye.forceAlign()};Yt(e,()=>{var Ye,lt;return{forceAlign:G,forcePopupAlign:()=>{X.deprecated(!1,"forcePopupAlign","forceAlign"),G()},nativeElement:(Ye=B.current)===null||Ye===void 0?void 0:Ye.nativeElement,popupElement:(lt=B.current)===null||lt===void 0?void 0:lt.popupElement}});const[se,re]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),le=!m&&!g&&m!==0,me=Ye=>{var lt,Be;re(le?!1:Ye),le||((lt=t.onOpenChange)===null||lt===void 0||lt.call(t,Ye),(Be=t.onVisibleChange)===null||Be===void 0||Be.call(t,Ye))},ie=ge(()=>{var Ye,lt;let Be=O;return typeof p=="object"&&(Be=(lt=(Ye=p.pointAtCenter)!==null&&Ye!==void 0?Ye:p.arrowPointAtCenter)!==null&<!==void 0?lt:O),v||_2({arrowPointAtCenter:Be,autoAdjustOverflow:S,arrowWidth:Q?M.sizePopupArrow:0,borderRadius:M.borderRadius,offset:M.marginXXS,visibleFirst:!0})},[O,p,v,M]),ne=ge(()=>m===0?m:g||m||"",[g,m]),ue=y(bs,{space:!0},typeof ne=="function"?ne():ne),de=N("tooltip",i),j=N(),ee=t["data-popover-inject"];let he=se;!("open"in t)&&!("visible"in t)&&le&&(he=!1);const ve=Kt(c)&&!G$(c)?c:y("span",null,c),Y=ve.props,ce=!Y.className||typeof Y.className=="string"?Z(Y.className,o||`${de}-open`):Y.className,[te,Oe,ye]=T2(de,!ee),pe=R2(de,s),Qe=pe.arrowStyle,Me=Z(T,{[`${de}-rtl`]:z==="rtl"},pe.className,_,Oe,ye,L,H.root,k==null?void 0:k.root),De=Z(H.body,k==null?void 0:k.body),[we,Ie]=Sc("Tooltip",I.zIndex),rt=y(lL,Object.assign({},I,{zIndex:we,showArrow:Q,placement:C,mouseEnterDelay:$,mouseLeaveDelay:w,prefixCls:de,classNames:{root:Me,body:De},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qe),V.root),F),P),R==null?void 0:R.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},V.body),l),R==null?void 0:R.body),pe.overlayStyle)},getTooltipContainer:b||a||E,ref:B,builtinPlacements:ie,overlay:ue,visible:he,onVisibleChange:me,afterVisibleChange:u??d,arrowContent:y("span",{className:`${de}-arrow-content`}),motion:{motionName:zo(j,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!f}),he?fr(ve,{className:ce}):ve);return te(y(_f.Provider,{value:Ie},rt))}),on=yL;on._InternalPanelDoNotUseOrYouWillBeFired=OL;const SL=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:h,innerContentPadding:p,titlePadding:m}=t;return[{[e]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:o},[`${e}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:h,padding:m},[`${e}-inner-content`]:{color:n,padding:p}})},f0(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},xL=t=>{const{componentCls:e}=t;return{[e]:Qo.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},CL=t=>{const{lineWidth:e,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,f=n-r,h=f/2,p=f/2-e,m=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},d0(t)),Vf({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:l,titlePadding:o?`${h}px ${m}px ${p}px`:0,titleBorderBottom:o?`${e}px ${c} ${u}`:"none",innerContentPadding:o?`${d}px ${m}px`:0})},I2=Zt("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=kt(t,{popoverBg:e,popoverColor:n});return[SL(r),xL(r),Cc(r,"zoom-big")]},CL,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var $L=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!t&&!e?null:y(At,null,t&&y("div",{className:`${n}-title`},t),e&&y("div",{className:`${n}-inner-content`},e)),wL=t=>{const{hashId:e,prefixCls:n,className:r,style:i,placement:o="top",title:a,content:s,children:l}=t,c=Ss(a),u=Ss(s),d=Z(e,n,`${n}-pure`,`${n}-placement-${o}`,r);return y("div",{className:d,style:i},y("div",{className:`${n}-arrow`}),y(u0,Object.assign({},t,{className:e,prefixCls:n}),l||y(M2,{prefixCls:n,title:c,content:u})))},E2=t=>{const{prefixCls:e,className:n}=t,r=$L(t,["prefixCls","className"]),{getPrefixCls:i}=fe(it),o=i("popover",e),[a,s,l]=I2(o);return a(y(wL,Object.assign({},r,{prefixCls:o,hashId:s,className:Z(n,l)})))};var PL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,title:o,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:h,overlayStyle:p={},styles:m,classNames:g}=t,v=PL(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:O,className:S,style:x,classNames:b,styles:C}=rr("popover"),$=O("popover",i),[w,P,_]=I2($),T=O(),R=Z(s,P,_,S,b.root,g==null?void 0:g.root),k=Z(b.body,g==null?void 0:g.body),[I,Q]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),M=(F,H)=>{Q(F,!0),h==null||h(F,H)},E=F=>{F.keyCode===je.ESC&&M(!1,F)},N=F=>{M(F)},z=Ss(o),L=Ss(a);return w(y(on,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},v,{prefixCls:$,classNames:{root:R,body:k},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},C.root),x),p),m==null?void 0:m.root),body:Object.assign(Object.assign({},C.body),m==null?void 0:m.body)},ref:e,open:I,onOpenChange:N,overlay:z||L?y(M2,{prefixCls:$,title:z,content:L}):null,transitionName:zo(T,"zoom-big",v.transitionName),"data-popover-inject":!0}),fr(u,{onKeyDown:F=>{var H,V;Kt(u)&&((V=u==null?void 0:(H=u.props).onKeyDown)===null||V===void 0||V.call(H,F)),E(F)}})))}),h0=_L;h0._InternalPanelDoNotUseOrYouWillBeFired=E2;const Hy=t=>{const{size:e,shape:n}=fe(Vm),r=ge(()=>({size:t.size||e,shape:t.shape||n}),[t.size,t.shape,e,n]);return y(Vm.Provider,{value:r},t.children)},TL=t=>{var e,n,r,i;const{getPrefixCls:o,direction:a}=fe(it),{prefixCls:s,className:l,rootClassName:c,style:u,maxCount:d,maxStyle:f,size:h,shape:p,maxPopoverPlacement:m,maxPopoverTrigger:g,children:v,max:O}=t,S=o("avatar",s),x=`${S}-group`,b=$r(S),[C,$,w]=$2(S,b),P=Z(x,{[`${x}-rtl`]:a==="rtl"},w,b,l,c,$),_=nr(v).map((k,I)=>fr(k,{key:`avatar-key-${I}`})),T=(O==null?void 0:O.count)||d,R=_.length;if(T&&Ttypeof t!="object"&&typeof t!="function"||t===null;var Q2=bt(null);function N2(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function z2(t){var e=fe(Q2);return N2(e,t)}var jL=["children","locked"],wi=bt(null);function DL(t,e){var n=W({},t);return Object.keys(e).forEach(function(r){var i=e[r];i!==void 0&&(n[r]=i)}),n}function Zl(t){var e=t.children,n=t.locked,r=ut(t,jL),i=fe(wi),o=vc(function(){return DL(i,r)},[i,r],function(a,s){return!n&&(a[0]!==s[0]||!Dl(a[1],s[1],!0))});return y(wi.Provider,{value:o},e)}var BL=[],L2=bt(null);function Hf(){return fe(L2)}var j2=bt(BL);function Ws(t){var e=fe(j2);return ge(function(){return t!==void 0?[].concat($e(e),[t]):e},[e,t])}var D2=bt(null),m0=bt({});function Xy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(kf(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),i=t.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function WL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=$e(t.querySelectorAll("*")).filter(function(r){return Xy(r,e)});return Xy(t,e)&&n.unshift(t),n}var Xm=je.LEFT,Zm=je.RIGHT,qm=je.UP,Hu=je.DOWN,Xu=je.ENTER,B2=je.ESC,el=je.HOME,tl=je.END,Zy=[qm,Hu,Xm,Zm];function FL(t,e,n,r){var i,o="prev",a="next",s="children",l="parent";if(t==="inline"&&r===Xu)return{inlineTrigger:!0};var c=D(D({},qm,o),Hu,a),u=D(D(D(D({},Xm,n?a:o),Zm,n?o:a),Hu,s),Xu,s),d=D(D(D(D(D(D({},qm,o),Hu,a),Xu,s),B2,l),Xm,n?s:l),Zm,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(i=f["".concat(t).concat(e?"":"Sub")])===null||i===void 0?void 0:i[r];switch(h){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function VL(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function HL(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function g0(t,e){var n=WL(t,!0);return n.filter(function(r){return e.has(r)})}function qy(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var i=g0(t,e),o=i.length,a=i.findIndex(function(s){return n===s});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var Gm=function(e,n){var r=new Set,i=new Map,o=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(N2(n,a),"']"));s&&(r.add(s),o.set(s,a),i.set(a,s))}),{elements:r,key2element:i,element2key:o}};function XL(t,e,n,r,i,o,a,s,l,c){var u=U(),d=U();d.current=e;var f=function(){Xt.cancel(u.current)};return be(function(){return function(){f()}},[]),function(h){var p=h.which;if([].concat(Zy,[Xu,B2,el,tl]).includes(p)){var m=o(),g=Gm(m,r),v=g,O=v.elements,S=v.key2element,x=v.element2key,b=S.get(e),C=HL(b,O),$=x.get(C),w=FL(t,a($,!0).length===1,n,p);if(!w&&p!==el&&p!==tl)return;(Zy.includes(p)||[el,tl].includes(p))&&h.preventDefault();var P=function(E){if(E){var N=E,z=E.querySelector("a");z!=null&&z.getAttribute("href")&&(N=z);var L=x.get(E);s(L),f(),u.current=Xt(function(){d.current===L&&N.focus()})}};if([el,tl].includes(p)||w.sibling||!C){var _;!C||t==="inline"?_=i.current:_=VL(C);var T,R=g0(_,O);p===el?T=R[0]:p===tl?T=R[R.length-1]:T=qy(_,O,C,w.offset),P(T)}else if(w.inlineTrigger)l($);else if(w.offset>0)l($,!0),f(),u.current=Xt(function(){g=Gm(m,r);var M=C.getAttribute("aria-controls"),E=document.getElementById(M),N=qy(E,g.elements);P(N)},5);else if(w.offset<0){var k=a($,!0),I=k[k.length-2],Q=S.get(I);l(I,!1),P(Q)}}c==null||c(h)}}function ZL(t){Promise.resolve().then(t)}var v0="__RC_UTIL_PATH_SPLIT__",Gy=function(e){return e.join(v0)},qL=function(e){return e.split(v0)},Ym="rc-menu-more";function GL(){var t=J({}),e=ae(t,2),n=e[1],r=U(new Map),i=U(new Map),o=J([]),a=ae(o,2),s=a[0],l=a[1],c=U(0),u=U(!1),d=function(){u.current||n({})},f=Ht(function(S,x){var b=Gy(x);i.current.set(b,S),r.current.set(S,b),c.current+=1;var C=c.current;ZL(function(){C===c.current&&d()})},[]),h=Ht(function(S,x){var b=Gy(x);i.current.delete(b),r.current.delete(S)},[]),p=Ht(function(S){l(S)},[]),m=Ht(function(S,x){var b=r.current.get(S)||"",C=qL(b);return x&&s.includes(C[0])&&C.unshift(Ym),C},[s]),g=Ht(function(S,x){return S.filter(function(b){return b!==void 0}).some(function(b){var C=m(b,!0);return C.includes(x)})},[m]),v=function(){var x=$e(r.current.keys());return s.length&&x.push(Ym),x},O=Ht(function(S){var x="".concat(r.current.get(S)).concat(v0),b=new Set;return $e(i.current.keys()).forEach(function(C){C.startsWith(x)&&b.add(i.current.get(C))}),b},[]);return be(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:p,isSubPathKey:g,getKeyPath:m,getKeys:v,getSubPathKeys:O}}function fl(t){var e=U(t);e.current=t;var n=Ht(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1&&(O.motionAppear=!1);var S=O.onVisibleChanged;return O.onVisibleChanged=function(x){return!f.current&&!x&&g(!0),S==null?void 0:S(x)},m?null:y(Zl,{mode:o,locked:!f.current},y(pi,Ce({visible:v},O,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var b=x.className,C=x.style;return y(O0,{id:e,className:b,style:C},i)}))}var fj=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],hj=["active"],pj=Se(function(t,e){var n=t.style,r=t.className,i=t.title,o=t.eventKey;t.warnKey;var a=t.disabled,s=t.internalPopupClose,l=t.children,c=t.itemIcon,u=t.expandIcon,d=t.popupClassName,f=t.popupOffset,h=t.popupStyle,p=t.onClick,m=t.onMouseEnter,g=t.onMouseLeave,v=t.onTitleClick,O=t.onTitleMouseEnter,S=t.onTitleMouseLeave,x=ut(t,fj),b=z2(o),C=fe(wi),$=C.prefixCls,w=C.mode,P=C.openKeys,_=C.disabled,T=C.overflowDisabled,R=C.activeKey,k=C.selectedKeys,I=C.itemIcon,Q=C.expandIcon,M=C.onItemClick,E=C.onOpenChange,N=C.onActive,z=fe(m0),L=z._internalRenderSubMenuItem,F=fe(D2),H=F.isSubPathKey,V=Ws(),X="".concat($,"-submenu"),B=_||a,G=U(),se=U(),re=c??I,le=u??Q,me=P.includes(o),ie=!T&&me,ne=H(k,o),ue=W2(o,B,O,S),de=ue.active,j=ut(ue,hj),ee=J(!1),he=ae(ee,2),ve=he[0],Y=he[1],ce=function(_e){B||Y(_e)},te=function(_e){ce(!0),m==null||m({key:o,domEvent:_e})},Oe=function(_e){ce(!1),g==null||g({key:o,domEvent:_e})},ye=ge(function(){return de||(w!=="inline"?ve||H([R],o):!1)},[w,de,R,ve,o,H]),pe=F2(V.length),Qe=function(_e){B||(v==null||v({key:o,domEvent:_e}),w==="inline"&&E(o,!me))},Me=fl(function(Xe){p==null||p(Td(Xe)),M(Xe)}),De=function(_e){w!=="inline"&&E(o,_e)},we=function(){N(o)},Ie=b&&"".concat(b,"-popup"),rt=ge(function(){return y(V2,{icon:w!=="horizontal"?le:void 0,props:W(W({},t),{},{isOpen:ie,isSubMenu:!0})},y("i",{className:"".concat(X,"-arrow")}))},[w,le,t,ie,X]),Ye=y("div",Ce({role:"menuitem",style:pe,className:"".concat(X,"-title"),tabIndex:B?null:-1,ref:G,title:typeof i=="string"?i:null,"data-menu-id":T&&b?null:b,"aria-expanded":ie,"aria-haspopup":!0,"aria-controls":Ie,"aria-disabled":B,onClick:Qe,onFocus:we},j),i,rt),lt=U(w);if(w!=="inline"&&V.length>1?lt.current="vertical":lt.current=w,!T){var Be=lt.current;Ye=y(uj,{mode:Be,prefixCls:X,visible:!s&&ie&&w!=="inline",popupClassName:d,popupOffset:f,popupStyle:h,popup:y(Zl,{mode:Be==="horizontal"?"vertical":Be},y(O0,{id:Ie,ref:se},l)),disabled:B,onVisibleChange:De},Ye)}var ke=y(Hi.Item,Ce({ref:e,role:"none"},x,{component:"li",style:n,className:Z(X,"".concat(X,"-").concat(w),r,D(D(D(D({},"".concat(X,"-open"),ie),"".concat(X,"-active"),ye),"".concat(X,"-selected"),ne),"".concat(X,"-disabled"),B)),onMouseEnter:te,onMouseLeave:Oe}),Ye,!T&&y(dj,{id:Ie,open:ie,keyPath:V},l));return L&&(ke=L(ke,t,{selected:ne,active:ye,open:ie,disabled:B})),y(Zl,{onItemClick:Me,mode:w==="horizontal"?"vertical":w,itemIcon:re,expandIcon:le},ke)}),Xf=Se(function(t,e){var n=t.eventKey,r=t.children,i=Ws(n),o=b0(r,i),a=Hf();be(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var s;return a?s=o:s=y(pj,Ce({ref:e},t),o),y(j2.Provider,{value:i},s)});function y0(t){var e=t.className,n=t.style,r=fe(wi),i=r.prefixCls,o=Hf();return o?null:y("li",{role:"separator",className:Z("".concat(i,"-item-divider"),e),style:n})}var mj=["className","title","eventKey","children"],gj=Se(function(t,e){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=ut(t,mj),a=fe(wi),s=a.prefixCls,l="".concat(s,"-item-group");return y("li",Ce({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:Z(l,n)}),y("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),y("ul",{role:"group",className:"".concat(l,"-list")},i))}),S0=Se(function(t,e){var n=t.eventKey,r=t.children,i=Ws(n),o=b0(r,i),a=Hf();return a?o:y(gj,Ce({ref:e},cn(t,["warnKey"])),o)}),vj=["label","children","key","type","extra"];function Um(t,e,n){var r=e.item,i=e.group,o=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&Je(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,h=c.type,p=c.extra,m=ut(c,vj),g=f??"tmp-".concat(l);return d||h==="group"?h==="group"?y(i,Ce({key:g},m,{title:u}),Um(d,e,n)):y(o,Ce({key:g},m,{title:u}),Um(d,e,n)):h==="divider"?y(a,Ce({key:g},m)):y(r,Ce({key:g},m,{extra:p}),u,(!!p||p===0)&&y("span",{className:"".concat(n,"-item-extra")},p))}return null}).filter(function(s){return s})}function Uy(t,e,n,r,i){var o=t,a=W({divider:y0,item:Tc,group:S0,submenu:Xf},r);return e&&(o=Um(e,a,i)),b0(o,n)}var Oj=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Go=[],bj=Se(function(t,e){var n,r=t,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,h=r.direction,p=r.id,m=r.mode,g=m===void 0?"vertical":m,v=r.inlineCollapsed,O=r.disabled,S=r.disabledOverflow,x=r.subMenuOpenDelay,b=x===void 0?.1:x,C=r.subMenuCloseDelay,$=C===void 0?.1:C,w=r.forceSubMenuRender,P=r.defaultOpenKeys,_=r.openKeys,T=r.activeKey,R=r.defaultActiveFirst,k=r.selectable,I=k===void 0?!0:k,Q=r.multiple,M=Q===void 0?!1:Q,E=r.defaultSelectedKeys,N=r.selectedKeys,z=r.onSelect,L=r.onDeselect,F=r.inlineIndent,H=F===void 0?24:F,V=r.motion,X=r.defaultMotions,B=r.triggerSubMenuAction,G=B===void 0?"hover":B,se=r.builtinPlacements,re=r.itemIcon,le=r.expandIcon,me=r.overflowedIndicator,ie=me===void 0?"...":me,ne=r.overflowedIndicatorPopupClassName,ue=r.getPopupContainer,de=r.onClick,j=r.onOpenChange,ee=r.onKeyDown;r.openAnimation,r.openTransitionName;var he=r._internalRenderMenuItem,ve=r._internalRenderSubMenuItem,Y=r._internalComponents,ce=ut(r,Oj),te=ge(function(){return[Uy(f,d,Go,Y,o),Uy(f,d,Go,{},o)]},[f,d,Y]),Oe=ae(te,2),ye=Oe[0],pe=Oe[1],Qe=J(!1),Me=ae(Qe,2),De=Me[0],we=Me[1],Ie=U(),rt=UL(p),Ye=h==="rtl",lt=_n(P,{value:_,postState:function(qe){return qe||Go}}),Be=ae(lt,2),ke=Be[0],Xe=Be[1],_e=function(qe){var Fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Lt(){Xe(qe),j==null||j(qe)}Fe?Ql(Lt):Lt()},Pe=J(ke),ct=ae(Pe,2),xt=ct[0],Pn=ct[1],qt=U(!1),xn=ge(function(){return(g==="inline"||g==="vertical")&&v?["vertical",v]:[g,!1]},[g,v]),gn=ae(xn,2),Bt=gn[0],Ot=gn[1],ht=Bt==="inline",et=J(Bt),nt=ae(et,2),Re=nt[0],ot=nt[1],dt=J(Ot),Ee=ae(dt,2),Ze=Ee[0],Ae=Ee[1];be(function(){ot(Bt),Ae(Ot),qt.current&&(ht?Xe(xt):_e(Go))},[Bt,Ot]);var We=J(0),st=ae(We,2),tt=st[0],Ct=st[1],$t=tt>=ye.length-1||Re!=="horizontal"||S;be(function(){ht&&Pn(ke)},[ke]),be(function(){return qt.current=!0,function(){qt.current=!1}},[]);var wt=GL(),Mt=wt.registerPath,vn=wt.unregisterPath,un=wt.refreshOverflowKeys,Cn=wt.isSubPathKey,Ln=wt.getKeyPath,Ut=wt.getKeys,nn=wt.getSubPathKeys,Te=ge(function(){return{registerPath:Mt,unregisterPath:vn}},[Mt,vn]),Le=ge(function(){return{isSubPathKey:Cn}},[Cn]);be(function(){un($t?Go:ye.slice(tt+1).map(function(Gt){return Gt.key}))},[tt,$t]);var pt=_n(T||R&&((n=ye[0])===null||n===void 0?void 0:n.key),{value:T}),yt=ae(pt,2),Ue=yt[0],Ge=yt[1],ft=fl(function(Gt){Ge(Gt)}),It=fl(function(){Ge(void 0)});Yt(e,function(){return{list:Ie.current,focus:function(qe){var Fe,Lt=Ut(),Wt=Gm(Lt,rt),en=Wt.elements,fn=Wt.key2element,gr=Wt.element2key,Gn=g0(Ie.current,en),vr=Ue??(Gn[0]?gr.get(Gn[0]):(Fe=ye.find(function(Ii){return!Ii.props.disabled}))===null||Fe===void 0?void 0:Fe.key),ir=fn.get(vr);if(vr&&ir){var Or;ir==null||(Or=ir.focus)===null||Or===void 0||Or.call(ir,qe)}}}});var zt=_n(E||[],{value:N,postState:function(qe){return Array.isArray(qe)?qe:qe==null?Go:[qe]}}),Vt=ae(zt,2),dn=Vt[0],Br=Vt[1],wr=function(qe){if(I){var Fe=qe.key,Lt=dn.includes(Fe),Wt;M?Lt?Wt=dn.filter(function(fn){return fn!==Fe}):Wt=[].concat($e(dn),[Fe]):Wt=[Fe],Br(Wt);var en=W(W({},qe),{},{selectedKeys:Wt});Lt?L==null||L(en):z==null||z(en)}!M&&ke.length&&Re!=="inline"&&_e(Go)},Pr=fl(function(Gt){de==null||de(Td(Gt)),wr(Gt)}),_r=fl(function(Gt,qe){var Fe=ke.filter(function(Wt){return Wt!==Gt});if(qe)Fe.push(Gt);else if(Re!=="inline"){var Lt=nn(Gt);Fe=Fe.filter(function(Wt){return!Lt.has(Wt)})}Dl(ke,Fe,!0)||_e(Fe,!0)}),qn=function(qe,Fe){var Lt=Fe??!ke.includes(qe);_r(qe,Lt)},Tr=XL(Re,Ue,Ye,rt,Ie,Ut,Ln,Ge,qn,ee);be(function(){we(!0)},[]);var kr=ge(function(){return{_internalRenderMenuItem:he,_internalRenderSubMenuItem:ve}},[he,ve]),ei=Re!=="horizontal"||S?ye:ye.map(function(Gt,qe){return y(Zl,{key:Gt.key,overflowDisabled:qe>tt},Gt)}),Ri=y(Hi,Ce({id:p,ref:Ie,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:Tc,className:Z(o,"".concat(o,"-root"),"".concat(o,"-").concat(Re),l,D(D({},"".concat(o,"-inline-collapsed"),Ze),"".concat(o,"-rtl"),Ye),a),dir:h,style:s,role:"menu",tabIndex:u,data:ei,renderRawItem:function(qe){return qe},renderRawRest:function(qe){var Fe=qe.length,Lt=Fe?ye.slice(-Fe):null;return y(Xf,{eventKey:Ym,title:ie,disabled:$t,internalPopupClose:Fe===0,popupClassName:ne},Lt)},maxCount:Re!=="horizontal"||S?Hi.INVALIDATE:Hi.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(qe){Ct(qe)},onKeyDown:Tr},ce));return y(m0.Provider,{value:kr},y(Q2.Provider,{value:rt},y(Zl,{prefixCls:o,rootClassName:a,mode:Re,openKeys:ke,rtl:Ye,disabled:O,motion:De?V:null,defaultMotions:De?X:null,activeKey:Ue,onActive:ft,onInactive:It,selectedKeys:dn,inlineIndent:H,subMenuOpenDelay:b,subMenuCloseDelay:$,forceSubMenuRender:w,builtinPlacements:se,triggerSubMenuAction:G,getPopupContainer:ue,itemIcon:re,expandIcon:le,onItemClick:Pr,onOpenChange:_r},y(D2.Provider,{value:Le},Ri),y("div",{style:{display:"none"},"aria-hidden":!0},y(L2.Provider,{value:Te},pe)))))}),Fs=bj;Fs.Item=Tc;Fs.SubMenu=Xf;Fs.ItemGroup=S0;Fs.Divider=y0;var yj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},Sj=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:yj}))},xj=Se(Sj);const X2=bt({siderHook:{addSider:()=>null,removeSider:()=>null}}),Cj=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:a,color:s,lineHeight:q(o),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},Z2=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=t,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:i,footerPadding:`${o}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:i}},q2=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],G2=Zt("Layout",Cj,Z2,{deprecatedTokens:q2}),$j=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:h,lightTriggerColor:p,lightTriggerBg:m,bodyBg:g}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${e}-children`]:{overflow:"hidden"},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:q(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${q(f)} ${q(f)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderRadius:`${q(f)} 0 0 ${q(f)}`}},"&-light":{background:h,[`${e}-trigger`]:{color:p,background:m},[`${e}-zero-width-trigger`]:{color:p,background:m,border:`1px solid ${g}`,borderInlineStart:0}}}}},wj=Zt(["Layout","Sider"],$j,Z2,{deprecatedTokens:q2});var Pj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Zf=bt({}),Tj=(()=>{let t=0;return(e="")=>(t+=1,`${e}${t}`)})(),Y2=Se((t,e)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:h,breakpoint:p,onCollapse:m,onBreakpoint:g}=t,v=Pj(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:O}=fe(X2),[S,x]=J("collapsed"in t?t.collapsed:a),[b,C]=J(!1);be(()=>{"collapsed"in t&&x(t.collapsed)},[t.collapsed]);const $=(re,le)=>{"collapsed"in t||x(re),m==null||m(re,le)},{getPrefixCls:w,direction:P}=fe(it),_=w("layout-sider",n),[T,R,k]=wj(_),I=U(null);I.current=re=>{C(re.matches),g==null||g(re.matches),S!==re.matches&&$(re.matches,"responsive")},be(()=>{function re(me){var ie;return(ie=I.current)===null||ie===void 0?void 0:ie.call(I,me)}let le;return typeof(window==null?void 0:window.matchMedia)<"u"&&p&&p in Ky&&(le=window.matchMedia(`screen and (max-width: ${Ky[p]})`),S2(le,re),re(le)),()=>{x2(le,re)}},[p]),be(()=>{const re=Tj("ant-sider-");return O.addSider(re),()=>O.removeSider(re)},[]);const Q=()=>{$(!S,"clickTrigger")},M=cn(v,["collapsed"]),E=S?f:d,N=_j(E)?`${E}px`:String(E),z=parseFloat(String(f||0))===0?y("span",{onClick:Q,className:Z(`${_}-zero-width-trigger`,`${_}-zero-width-trigger-${u?"right":"left"}`),style:h},i||y(xj,null)):null,L=P==="rtl"==!u,V={expanded:y(L?xd:Hm,null),collapsed:y(L?Hm:xd,null)}[S?"collapsed":"expanded"],X=i!==null?z||y("div",{className:`${_}-trigger`,onClick:Q,style:{width:N}},i||V):null,B=Object.assign(Object.assign({},l),{flex:`0 0 ${N}`,maxWidth:N,minWidth:N,width:N}),G=Z(_,`${_}-${s}`,{[`${_}-collapsed`]:!!S,[`${_}-has-trigger`]:c&&i!==null&&!z,[`${_}-below`]:!!b,[`${_}-zero-width`]:parseFloat(N)===0},r,R,k),se=ge(()=>({siderCollapsed:S}),[S]);return T(y(Zf.Provider,{value:se},y("aside",Object.assign({className:G},M,{style:B,ref:e}),y("div",{className:`${_}-children`},o),c||b&&z?X:null)))});var kj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Rj=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:kj}))},x0=Se(Rj);const kd=bt({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var Ij=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,dashed:r}=t,i=Ij(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=fe(it),a=o("menu",e),s=Z({[`${a}-item-divider-dashed`]:!!r},n);return y(y0,Object.assign({className:s},i))},K2=t=>{var e;const{className:n,children:r,icon:i,title:o,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=fe(kd),h=S=>{const x=r==null?void 0:r[0],b=y("span",{className:Z(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!i||Kt(r)&&r.type==="span")&&r&&S&&c&&typeof x=="string"?y("div",{className:`${l}-inline-collapsed-noicon`},x.charAt(0)):b},{siderCollapsed:p}=fe(Zf);let m=o;typeof o>"u"?m=c?r:"":o===!1&&(m="");const g={title:m};!p&&!f&&(g.title=null,g.open=!1);const v=nr(r).length;let O=y(Tc,Object.assign({},cn(t,["title","icon","danger"]),{className:Z({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(i?v+1:v)===1},n),title:typeof o=="string"?o:void 0}),fr(i,{className:Z(Kt(i)?(e=i.props)===null||e===void 0?void 0:e.className:void 0,`${l}-item-icon`)}),h(f));return d||(O=y(on,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),O)),O};var Mj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{children:n}=t,r=Mj(t,["children"]),i=fe(Rd),o=ge(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=KR(n),s=go(e,a?Ho(n):null);return y(Rd.Provider,{value:o},y(bs,{space:!0},a?Xn(n,{ref:s}):n))}),Aj=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${q(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover, + `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},qh(kt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const T6=t=>{const{fontSize:e,lineHeight:n,lineWidth:r,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:p,colorFillSecondary:m,colorBgContainerDisabled:g,colorTextDisabled:v,colorPrimaryHover:O,colorPrimary:S,controlOutline:C}=t,b=s*2,x=r*2,$=Math.min(i-b,i-x),w=Math.min(o-b,o-x),P=Math.min(a-b,a-x);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(i-e*n)/2}px ${l}px`,optionFontSize:e,optionLineHeight:n,optionHeight:i,selectorBg:p,clearBg:p,singleItemHeightLG:a,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:$,multipleItemHeightSM:w,multipleItemHeightLG:P,multipleSelectorBgDisabled:g,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:O,activeBorderColor:S,activeOutlineColor:C,selectAffixPadding:s}},m2=(t,e)=>{const{componentCls:n,antCls:r,controlOutlineWidth:i}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${q(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${q(i)} ${e.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:e.color}}}},Wy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},m2(t,e))}),k6=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},m2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Wy(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Wy(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),g2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:e.bg,border:`${q(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:e.hoverBg},[`${n}-focused& ${n}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},Fy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},g2(t,e))}),R6=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},g2(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),Fy(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),Fy(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),I6=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),v2=(t,e)=>{const{componentCls:n,antCls:r}=t;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${q(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:e.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${n}-prefix`]:{color:e.color}}}},Vy=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},v2(t,e))}),M6=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},v2(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Vy(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Vy(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),E6=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},k6(t)),R6(t)),I6(t)),M6(t))}),A6=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Q6=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},N6=t=>{const{antCls:e,componentCls:n,inputPaddingHorizontalBase:r,iconCls:i}=t,o={[`${n}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},A6(t)),Q6(t)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Sa),{[`> ${e}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},Sa),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},As()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:t.calc(r).add(t.fontSize).add(t.paddingXS).equal()}}}}}},z6=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},N6(t),_6(t),P6(t),S6(t),{[`${e}-rtl`]:{direction:"rtl"}},Uv(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},L6=Zt("Select",(t,{rootPrefixCls:e})=>{const n=kt(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[z6(n),E6(n)]},T6,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var j6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},D6=function(e,n){return y(Rt,xe({},e,{ref:n,icon:j6}))},kd=ye(D6),B6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},W6=function(e,n){return y(Rt,xe({},e,{ref:n,icon:B6}))},O2=ye(W6),F6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},V6=function(e,n){return y(Rt,xe({},e,{ref:n,icon:F6}))},b2=ye(V6);function H6({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:n,removeIcon:r,loading:i,multiple:o,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){const f=e??y(zs,null),h=v=>t===null&&!a&&!u?null:y(At,null,l!==!1&&v,a&&c);let p=null;if(t!==void 0)p=h(t);else if(i)p=h(y(yc,{spin:!0}));else{const v=`${s}-suffix`;p=({open:O,showSearch:S})=>h(O&&S?y(b2,{className:v}):y(O2,{className:v}))}let m=null;n!==void 0?m=n:o?m=y(kd,null):m=null;let g=null;return r!==void 0?g=r:g=y(Vi,null),{clearIcon:f,suffixIcon:p,itemIcon:m,removeIcon:g}}function X6(t){return oe.useMemo(()=>{if(t)return(...e)=>oe.createElement(ys,{space:!0},t.apply(void 0,e))},[t])}function Z6(t,e){return e!==void 0?e:t!==null}var q6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a;const{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:d,popupClassName:f,dropdownClassName:h,listHeight:p=256,placement:m,listItemHeight:g,size:v,disabled:O,notFoundContent:S,status:C,builtinPlacements:b,dropdownMatchSelectWidth:x,popupMatchSelectWidth:$,direction:w,style:P,allowClear:_,variant:T,dropdownStyle:k,transitionName:R,tagRender:I,maxCount:Q,prefix:E,dropdownRender:A,popupRender:N,onDropdownVisibleChange:L,onOpenChange:z,styles:V,classNames:X}=t,F=q6(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:H,getPrefixCls:B,renderEmpty:G,direction:se,virtual:ie,popupMatchSelectWidth:le,popupOverflow:pe}=de(at),{showSearch:ne,style:ee,styles:ce,className:ue,classNames:j}=ir("select"),[,J]=$r(),he=g??(J==null?void 0:J.controlHeight),ge=B("select",s),$e=B(),Te=w??se,{compactSize:Ce,compactItemClassnames:Ie}=js(ge,Te),[_e,ve]=Hf("select",T,l),Ne=wr(ge),[ze,re,fe]=L6(ge,Ne),te=me(()=>{const{mode:He}=t;if(He!=="combobox")return He===y2?"combobox":He},[t.mode]),Oe=te==="multiple"||te==="tags",we=Z6(t.suffixIcon,t.showArrow),Ke=(n=$??x)!==null&&n!==void 0?n:le,Ae=((r=V==null?void 0:V.popup)===null||r===void 0?void 0:r.root)||((i=ce.popup)===null||i===void 0?void 0:i.root)||k,Me=X6(N||A),Fe=z||L,{status:Re,hasFeedback:ke,isFormItemInput:ot,feedbackIcon:ut}=de(ei),Pn=Vf(Re,C);let qt;S!==void 0?qt=S:te==="combobox"?qt=null:qt=(G==null?void 0:G("Select"))||y(O6,{componentName:"Select"});const{suffixIcon:xn,itemIcon:gn,removeIcon:Bt,clearIcon:bt}=H6(Object.assign(Object.assign({},F),{multiple:Oe,hasFeedback:ke,feedbackIcon:ut,showSuffixIcon:we,prefixCls:ge,componentName:"Select"})),pt=_===!0?{clearIcon:bt}:_,nt=cn(F,["suffixIcon","itemIcon"]),it=Z(((o=X==null?void 0:X.popup)===null||o===void 0?void 0:o.root)||((a=j==null?void 0:j.popup)===null||a===void 0?void 0:a.root)||f||h,{[`${ge}-dropdown-${Te}`]:Te==="rtl"},u,j.root,X==null?void 0:X.root,fe,Ne,re),Qe=Dr(He=>{var ct;return(ct=v??Ce)!==null&&ct!==void 0?ct:He}),st=de(qi),ft=O??st,Le=Z({[`${ge}-lg`]:Qe==="large",[`${ge}-sm`]:Qe==="small",[`${ge}-rtl`]:Te==="rtl",[`${ge}-${_e}`]:ve,[`${ge}-in-form-item`]:ot},Td(ge,Pn,ke),Ie,ue,c,j.root,X==null?void 0:X.root,u,fe,Ne,re),Ge=me(()=>m!==void 0?m:Te==="rtl"?"bottomRight":"bottomLeft",[m,Te]),[je]=Sc("SelectLike",Ae==null?void 0:Ae.zIndex);return ze(y(u0,Object.assign({ref:e,virtual:ie,showSearch:ne},nt,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ce.root),V==null?void 0:V.root),ee),P),dropdownMatchSelectWidth:Ke,transitionName:Lo($e,"slide-up",R),builtinPlacements:y6(b,pe),listHeight:p,listItemHeight:he,mode:te,prefixCls:ge,placement:Ge,direction:Te,prefix:E,suffixIcon:xn,menuItemSelectedIcon:gn,removeIcon:Bt,allowClear:pt,notFoundContent:qt,className:Le,getPopupContainer:d||H,dropdownClassName:it,disabled:ft,dropdownStyle:Object.assign(Object.assign({},Ae),{zIndex:je}),maxCount:Oe?Q:void 0,tagRender:Oe?I:void 0,dropdownRender:Me,onDropdownVisibleChange:Fe})))},Rn=ye(G6),Y6=Jw(Rn,"dropdownAlign");Rn.SECRET_COMBOBOX_MODE_DO_NOT_USE=y2;Rn.Option=c0;Rn.OptGroup=l0;Rn._InternalPanelDoNotUseOrYouWillBeFired=Y6;const S2=(t,e)=>{typeof(t==null?void 0:t.addEventListener)<"u"?t.addEventListener("change",e):typeof(t==null?void 0:t.addListener)<"u"&&t.addListener(e)},x2=(t,e)=>{typeof(t==null?void 0:t.removeEventListener)<"u"?t.removeEventListener("change",e):typeof(t==null?void 0:t.removeListener)<"u"&&t.removeListener(e)},Ss=["xxl","xl","lg","md","sm","xs"],U6=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`}),K6=t=>{const e=t,n=[].concat(Ss).reverse();return n.forEach((r,i)=>{const o=r.toUpperCase(),a=`screen${o}Min`,s=`screen${o}`;if(!(e[a]<=e[s]))throw new Error(`${a}<=${s} fails : !(${e[a]}<=${e[s]})`);if(i{const[,t]=$r(),e=U6(K6(t));return oe.useMemo(()=>{const n=new Map;let r=-1,i={};return{responsiveMap:e,matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},register(){Object.entries(e).forEach(([o,a])=>{const s=({matches:c})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:c}))},l=window.matchMedia(a);S2(l,s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},unregister(){Object.values(e).forEach(o=>{const a=this.matchHandlers[o];x2(a==null?void 0:a.mql,a==null?void 0:a.listener)}),n.clear()}}},[t])};function eL(){const[,t]=Ms(e=>e+1,0);return t}function C2(t=!0,e={}){const n=Y(e),r=eL(),i=J6();return Nt(()=>{const o=i.subscribe(a=>{n.current=a,t&&r()});return()=>i.unsubscribe(o)},[]),n.current}const Xm=yt({}),tL=t=>{const{antCls:e,componentCls:n,iconCls:r,avatarBg:i,avatarColor:o,containerSize:a,containerSizeLG:s,containerSizeSM:l,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,iconFontSize:f,iconFontSizeLG:h,iconFontSizeSM:p,borderRadius:m,borderRadiusLG:g,borderRadiusSM:v,lineWidth:O,lineType:S}=t,C=(b,x,$,w)=>({width:b,height:b,borderRadius:"50%",fontSize:x,[`&${n}-square`]:{borderRadius:w},[`&${n}-icon`]:{fontSize:$,[`> ${r}`]:{margin:0}}});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:o,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:i,border:`${q(O)} ${S} transparent`,"&-image":{background:"transparent"},[`${e}-image-img`]:{display:"block"}}),C(a,c,f,m)),{"&-lg":Object.assign({},C(s,u,h,g)),"&-sm":Object.assign({},C(l,d,p,v)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},nL=t=>{const{componentCls:e,groupBorderColor:n,groupOverlapping:r,groupSpace:i}=t;return{[`${e}-group`]:{display:"inline-flex",[e]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${e}-group-popover`]:{[`${e} + ${e}`]:{marginInlineStart:i}}}},rL=t=>{const{controlHeight:e,controlHeightLG:n,controlHeightSM:r,fontSize:i,fontSizeLG:o,fontSizeXL:a,fontSizeHeading3:s,marginXS:l,marginXXS:c,colorBorderBg:u}=t;return{containerSize:e,containerSizeLG:n,containerSizeSM:r,textFontSize:i,textFontSizeLG:i,textFontSizeSM:i,iconFontSize:Math.round((o+a)/2),iconFontSizeLG:s,iconFontSizeSM:i,groupSpace:c,groupOverlapping:-l,groupBorderColor:u}},$2=Zt("Avatar",t=>{const{colorTextLightSolid:e,colorTextPlaceholder:n}=t,r=kt(t,{avatarBg:n,avatarColor:e});return[tL(r),nL(r)]},rL);var iL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,shape:r,size:i,src:o,srcSet:a,icon:s,className:l,rootClassName:c,style:u,alt:d,draggable:f,children:h,crossOrigin:p,gap:m=4,onError:g}=t,v=iL(t,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","style","alt","draggable","children","crossOrigin","gap","onError"]),[O,S]=K(1),[C,b]=K(!1),[x,$]=K(!0),w=Y(null),P=Y(null),_=mr(e,w),{getPrefixCls:T,avatar:k}=de(at),R=de(Xm),I=()=>{if(!P.current||!w.current)return;const ne=P.current.offsetWidth,ee=w.current.offsetWidth;ne!==0&&ee!==0&&m*2{b(!0)},[]),be(()=>{$(!0),S(1)},[o]),be(I,[m]);const Q=()=>{(g==null?void 0:g())!==!1&&$(!1)},E=Dr(ne=>{var ee,ce;return(ce=(ee=i??(R==null?void 0:R.size))!==null&&ee!==void 0?ee:ne)!==null&&ce!==void 0?ce:"default"}),A=Object.keys(typeof E=="object"?E||{}:{}).some(ne=>["xs","sm","md","lg","xl","xxl"].includes(ne)),N=C2(A),L=me(()=>{if(typeof E!="object")return{};const ne=Ss.find(ce=>N[ce]),ee=E[ne];return ee?{width:ee,height:ee,fontSize:ee&&(s||h)?ee/2:18}:{}},[N,E]),z=T("avatar",n),V=wr(z),[X,F,H]=$2(z,V),B=Z({[`${z}-lg`]:E==="large",[`${z}-sm`]:E==="small"}),G=Jt(o),se=r||(R==null?void 0:R.shape)||"circle",ie=Z(z,B,k==null?void 0:k.className,`${z}-${se}`,{[`${z}-image`]:G||o&&x,[`${z}-icon`]:!!s},H,V,l,c,F),le=typeof E=="number"?{width:E,height:E,fontSize:s?E/2:18}:{};let pe;if(typeof o=="string"&&x)pe=y("img",{src:o,draggable:f,srcSet:a,onError:Q,alt:d,crossOrigin:p});else if(G)pe=o;else if(s)pe=s;else if(C||O!==1){const ne=`scale(${O})`,ee={msTransform:ne,WebkitTransform:ne,transform:ne};pe=y(Jr,{onResize:I},y("span",{className:`${z}-string`,ref:P,style:Object.assign({},ee)},h))}else pe=y("span",{className:`${z}-string`,style:{opacity:0},ref:P},h);return X(y("span",Object.assign({},v,{style:Object.assign(Object.assign(Object.assign(Object.assign({},le),L),k==null?void 0:k.style),u),className:ie,ref:_}),pe))}),xs=t=>t?typeof t=="function"?t():t:null;function d0(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,a=t.className,s=t.style;return y("div",{className:Z("".concat(n,"-content"),a),style:s},y("div",{className:Z("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}var Da={shiftX:64,adjustY:1},Ba={adjustX:1,shiftY:!0},ii=[0,0],oL={left:{points:["cr","cl"],overflow:Ba,offset:[-4,0],targetOffset:ii},right:{points:["cl","cr"],overflow:Ba,offset:[4,0],targetOffset:ii},top:{points:["bc","tc"],overflow:Da,offset:[0,-4],targetOffset:ii},bottom:{points:["tc","bc"],overflow:Da,offset:[0,4],targetOffset:ii},topLeft:{points:["bl","tl"],overflow:Da,offset:[0,-4],targetOffset:ii},leftTop:{points:["tr","tl"],overflow:Ba,offset:[-4,0],targetOffset:ii},topRight:{points:["br","tr"],overflow:Da,offset:[0,-4],targetOffset:ii},rightTop:{points:["tl","tr"],overflow:Ba,offset:[4,0],targetOffset:ii},bottomRight:{points:["tr","br"],overflow:Da,offset:[0,4],targetOffset:ii},rightBottom:{points:["bl","br"],overflow:Ba,offset:[4,0],targetOffset:ii},bottomLeft:{points:["tl","bl"],overflow:Da,offset:[0,4],targetOffset:ii},leftBottom:{points:["br","bl"],overflow:Ba,offset:[-4,0],targetOffset:ii}},aL=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],sL=function(e,n){var r=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,d=e.prefixCls,f=d===void 0?"rc-tooltip":d,h=e.children,p=e.onVisibleChange,m=e.afterVisibleChange,g=e.transitionName,v=e.animation,O=e.motion,S=e.placement,C=S===void 0?"right":S,b=e.align,x=b===void 0?{}:b,$=e.destroyTooltipOnHide,w=$===void 0?!1:$,P=e.defaultVisible,_=e.getTooltipContainer,T=e.overlayInnerStyle;e.arrowContent;var k=e.overlay,R=e.id,I=e.showArrow,Q=I===void 0?!0:I,E=e.classNames,A=e.styles,N=dt(e,aL),L=e0(R),z=Y(null);Yt(n,function(){return z.current});var V=W({},N);"visible"in e&&(V.popupVisible=e.visible);var X=function(){return y(d0,{key:"content",prefixCls:f,id:L,bodyClassName:E==null?void 0:E.body,overlayInnerStyle:W(W({},T),A==null?void 0:A.body)},k)},F=function(){var B=Qo.only(h),G=(B==null?void 0:B.props)||{},se=W(W({},G),{},{"aria-describedby":k?L:null});return Zn(h,se)};return y(Ff,xe({popupClassName:Z(r,E==null?void 0:E.root),prefixCls:f,popup:X,action:o,builtinPlacements:oL,popupPlacement:C,ref:z,popupAlign:x,getPopupContainer:_,onPopupVisibleChange:p,afterPopupVisibleChange:m,popupTransitionName:g,popupAnimation:v,popupMotion:O,defaultPopupVisible:P,autoDestroy:w,mouseLeaveDelay:c,popupStyle:W(W({},u),A==null?void 0:A.root),mouseEnterDelay:s,arrow:Q},V),F())};const lL=ye(sL);function f0(t){const{sizePopupArrow:e,borderRadiusXS:n,borderRadiusOuter:r}=t,i=e/2,o=0,a=i,s=r*1/Math.sqrt(2),l=i-r*(1-1/Math.sqrt(2)),c=i-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*i-c,f=u,h=2*i-s,p=l,m=2*i-o,g=a,v=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),O=r*(Math.sqrt(2)-1),S=`polygon(${O}px 100%, 50% ${O}px, ${2*i-O}px 100%, ${O}px 100%)`,C=`path('M ${o} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${h} ${p} A ${r} ${r} 0 0 0 ${m} ${g} Z')`;return{arrowShadowWidth:v,arrowPath:C,arrowPolygon:S}}const cL=(t,e,n)=>{const{sizePopupArrow:r,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${q(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},P2=8;function Xf(t){const{contentRadius:e,limitVerticalRadius:n}=t,r=e>12?e+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?P2:r}}function iu(t,e){return t?e:{}}function h0(t,e,n){const{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},cL(t,e,i)),{"&:before":{background:e}})]},iu(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${q(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),iu(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${q(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),iu(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:o},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:o}})),iu(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:o},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:o}}))}}function uL(t,e,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Hy={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},dL={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},fL=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function _2(t){const{arrowWidth:e,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=t,s=e/2,l={},c=Xf({contentRadius:o,limitVerticalRadius:!0});return Object.keys(Hy).forEach(u=>{const d=r&&dL[u]||Hy[u],f=Object.assign(Object.assign({},d),{offset:[0,0],dynamicInset:!0});switch(l[u]=f,fL.has(u)&&(f.autoArrow=!1),u){case"top":case"topLeft":case"topRight":f.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+i;break}if(r)switch(u){case"topLeft":case"bottomLeft":f.offset[0]=-c.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=c.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-c.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=c.arrowOffsetHorizontal*2-s;break}f.overflow=uL(u,c,e,n),a&&(f.htmlRegion="visibleFirst")}),l}const hL=t=>{const{calc:e,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=t,p=e(a).add(h).add(f).equal(),m=e(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${n}-inner`]:{minWidth:m,minHeight:l,padding:`${q(t.calc(u).div(2).equal())} ${q(d)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:p},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:t.min(a,P2)}},[`${n}-content`]:{position:"relative"}}),k$(t,(g,{darkColor:v})=>({[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:v},[`${n}-arrow`]:{"--antd-arrow-background-color":v}}}))),{"&-rtl":{direction:"rtl"}})},h0(t,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},pL=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},Xf({contentRadius:t.borderRadius,limitVerticalRadius:!0})),f0(kt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),T2=(t,e=!0)=>Zt("Tooltip",r=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=r,s=kt(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[hL(s),Cc(r,"zoom-big-fast")]},pL,{resetStyle:!1,injectStyle:e})(t),mL=No.map(t=>`${t}-inverse`),gL=["success","processing","error","default","warning"];function k2(t,e=!0){return e?[].concat(Pe(mL),Pe(No)).includes(t):No.includes(t)}function vL(t){return gL.includes(t)}function R2(t,e){const n=k2(e),r=Z({[`${t}-${e}`]:e&&n}),i={},o={},a=AQ(e).toRgb(),l=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return e&&!n&&(i.background=e,i["--ant-tooltip-color"]=l,o["--antd-arrow-background-color"]=e),{className:r,overlayStyle:i,arrowStyle:o}}const OL=t=>{const{prefixCls:e,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=t,{getPrefixCls:s}=de(at),l=s("tooltip",e),[c,u,d]=T2(l),f=R2(l,o),h=f.arrowStyle,p=Object.assign(Object.assign({},a),f.overlayStyle),m=Z(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(y("div",{className:m,style:h},y("div",{className:`${l}-arrow`}),y(d0,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:p}),i)))};var bL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,destroyOnHidden:h,arrow:p=!0,title:m,overlay:g,builtinPlacements:v,arrowPointAtCenter:O=!1,autoAdjustOverflow:S=!0,motion:C,getPopupContainer:b,placement:x="top",mouseEnterDelay:$=.1,mouseLeaveDelay:w=.1,overlayStyle:P,rootClassName:_,overlayClassName:T,styles:k,classNames:R}=t,I=bL(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),Q=!!p,[,E]=$r(),{getPopupContainer:A,getPrefixCls:N,direction:L,className:z,style:V,classNames:X,styles:F}=ir("tooltip"),H=bc(),B=Y(null),G=()=>{var we;(we=B.current)===null||we===void 0||we.forceAlign()};Yt(e,()=>{var we,Ke;return{forceAlign:G,forcePopupAlign:()=>{H.deprecated(!1,"forcePopupAlign","forceAlign"),G()},nativeElement:(we=B.current)===null||we===void 0?void 0:we.nativeElement,popupElement:(Ke=B.current)===null||Ke===void 0?void 0:Ke.popupElement}});const[se,ie]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),le=!m&&!g&&m!==0,pe=we=>{var Ke,Ae;ie(le?!1:we),le||((Ke=t.onOpenChange)===null||Ke===void 0||Ke.call(t,we),(Ae=t.onVisibleChange)===null||Ae===void 0||Ae.call(t,we))},ne=me(()=>{var we,Ke;let Ae=O;return typeof p=="object"&&(Ae=(Ke=(we=p.pointAtCenter)!==null&&we!==void 0?we:p.arrowPointAtCenter)!==null&&Ke!==void 0?Ke:O),v||_2({arrowPointAtCenter:Ae,autoAdjustOverflow:S,arrowWidth:Q?E.sizePopupArrow:0,borderRadius:E.borderRadius,offset:E.marginXXS,visibleFirst:!0})},[O,p,v,E]),ee=me(()=>m===0?m:g||m||"",[g,m]),ce=y(ys,{space:!0},typeof ee=="function"?ee():ee),ue=N("tooltip",i),j=N(),J=t["data-popover-inject"];let he=se;!("open"in t)&&!("visible"in t)&&le&&(he=!1);const ge=Jt(c)&&!G$(c)?c:y("span",null,c),$e=ge.props,Te=!$e.className||typeof $e.className=="string"?Z($e.className,o||`${ue}-open`):$e.className,[Ce,Ie,_e]=T2(ue,!J),ve=R2(ue,s),Ne=ve.arrowStyle,ze=Z(T,{[`${ue}-rtl`]:L==="rtl"},ve.className,_,Ie,_e,z,X.root,R==null?void 0:R.root),re=Z(X.body,R==null?void 0:R.body),[fe,te]=Sc("Tooltip",I.zIndex),Oe=y(lL,Object.assign({},I,{zIndex:fe,showArrow:Q,placement:x,mouseEnterDelay:$,mouseLeaveDelay:w,prefixCls:ue,classNames:{root:ze,body:re},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ne),F.root),V),P),k==null?void 0:k.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},F.body),l),k==null?void 0:k.body),ve.overlayStyle)},getTooltipContainer:b||a||A,ref:B,builtinPlacements:ne,overlay:ce,visible:he,onVisibleChange:pe,afterVisibleChange:u??d,arrowContent:y("span",{className:`${ue}-arrow-content`}),motion:{motionName:Lo(j,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!f}),he?hr(ge,{className:Te}):ge);return Ce(y(kf.Provider,{value:te},Oe))}),Kt=yL;Kt._InternalPanelDoNotUseOrYouWillBeFired=OL;const SL=t=>{const{componentCls:e,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:h,innerContentPadding:p,titlePadding:m}=t;return[{[e]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:o},[`${e}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:h,padding:m},[`${e}-inner-content`]:{color:n,padding:p}})},h0(t,"var(--antd-arrow-background-color)"),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block",[`${e}-content`]:{display:"inline-block"}}}]},xL=t=>{const{componentCls:e}=t;return{[e]:No.map(n=>{const r=t[`${n}6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":r,[`${e}-inner`]:{backgroundColor:r},[`${e}-arrow`]:{background:"transparent"}}}})}},CL=t=>{const{lineWidth:e,controlHeight:n,fontHeight:r,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=t,f=n-r,h=f/2,p=f/2-e,m=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},f0(t)),Xf({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:l,titlePadding:o?`${h}px ${m}px ${p}px`:0,titleBorderBottom:o?`${e}px ${c} ${u}`:"none",innerContentPadding:o?`${d}px ${m}px`:0})},I2=Zt("Popover",t=>{const{colorBgElevated:e,colorText:n}=t,r=kt(t,{popoverBg:e,popoverColor:n});return[SL(r),xL(r),Cc(r,"zoom-big")]},CL,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var $L=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!t&&!e?null:y(At,null,t&&y("div",{className:`${n}-title`},t),e&&y("div",{className:`${n}-inner-content`},e)),wL=t=>{const{hashId:e,prefixCls:n,className:r,style:i,placement:o="top",title:a,content:s,children:l}=t,c=xs(a),u=xs(s),d=Z(e,n,`${n}-pure`,`${n}-placement-${o}`,r);return y("div",{className:d,style:i},y("div",{className:`${n}-arrow`}),y(d0,Object.assign({},t,{className:e,prefixCls:n}),l||y(M2,{prefixCls:n,title:c,content:u})))},E2=t=>{const{prefixCls:e,className:n}=t,r=$L(t,["prefixCls","className"]),{getPrefixCls:i}=de(at),o=i("popover",e),[a,s,l]=I2(o);return a(y(wL,Object.assign({},r,{prefixCls:o,hashId:s,className:Z(n,l)})))};var PL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,title:o,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:h,overlayStyle:p={},styles:m,classNames:g}=t,v=PL(t,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:O,className:S,style:C,classNames:b,styles:x}=ir("popover"),$=O("popover",i),[w,P,_]=I2($),T=O(),k=Z(s,P,_,S,b.root,g==null?void 0:g.root),R=Z(b.body,g==null?void 0:g.body),[I,Q]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),E=(V,X)=>{Q(V,!0),h==null||h(V,X)},A=V=>{V.keyCode===Ve.ESC&&E(!1,V)},N=V=>{E(V)},L=xs(o),z=xs(a);return w(y(Kt,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},v,{prefixCls:$,classNames:{root:k,body:R},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},x.root),C),p),m==null?void 0:m.root),body:Object.assign(Object.assign({},x.body),m==null?void 0:m.body)},ref:e,open:I,onOpenChange:N,overlay:L||z?y(M2,{prefixCls:$,title:L,content:z}):null,transitionName:Lo(T,"zoom-big",v.transitionName),"data-popover-inject":!0}),hr(u,{onKeyDown:V=>{var X,F;Jt(u)&&((F=u==null?void 0:(X=u.props).onKeyDown)===null||F===void 0||F.call(X,V)),A(V)}})))}),p0=_L;p0._InternalPanelDoNotUseOrYouWillBeFired=E2;const Xy=t=>{const{size:e,shape:n}=de(Xm),r=me(()=>({size:t.size||e,shape:t.shape||n}),[t.size,t.shape,e,n]);return y(Xm.Provider,{value:r},t.children)},TL=t=>{var e,n,r,i;const{getPrefixCls:o,direction:a}=de(at),{prefixCls:s,className:l,rootClassName:c,style:u,maxCount:d,maxStyle:f,size:h,shape:p,maxPopoverPlacement:m,maxPopoverTrigger:g,children:v,max:O}=t,S=o("avatar",s),C=`${S}-group`,b=wr(S),[x,$,w]=$2(S,b),P=Z(C,{[`${C}-rtl`]:a==="rtl"},w,b,l,c,$),_=rr(v).map((R,I)=>hr(R,{key:`avatar-key-${I}`})),T=(O==null?void 0:O.count)||d,k=_.length;if(T&&Ttypeof t!="object"&&typeof t!="function"||t===null;var Q2=yt(null);function N2(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function z2(t){var e=de(Q2);return N2(e,t)}var jL=["children","locked"],wi=yt(null);function DL(t,e){var n=W({},t);return Object.keys(e).forEach(function(r){var i=e[r];i!==void 0&&(n[r]=i)}),n}function Zl(t){var e=t.children,n=t.locked,r=dt(t,jL),i=de(wi),o=vc(function(){return DL(i,r)},[i,r],function(a,s){return!n&&(a[0]!==s[0]||!Dl(a[1],s[1],!0))});return y(wi.Provider,{value:o},e)}var BL=[],L2=yt(null);function Zf(){return de(L2)}var j2=yt(BL);function Ws(t){var e=de(j2);return me(function(){return t!==void 0?[].concat(Pe(e),[t]):e},[e,t])}var D2=yt(null),g0=yt({});function Zy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(If(t)){var n=t.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||t.isContentEditable||n==="a"&&!!t.getAttribute("href"),i=t.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:r&&a===null&&(a=0),r&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function WL(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Pe(t.querySelectorAll("*")).filter(function(r){return Zy(r,e)});return Zy(t,e)&&n.unshift(t),n}var qm=Ve.LEFT,Gm=Ve.RIGHT,Ym=Ve.UP,Xu=Ve.DOWN,Zu=Ve.ENTER,B2=Ve.ESC,el=Ve.HOME,tl=Ve.END,qy=[Ym,Xu,qm,Gm];function FL(t,e,n,r){var i,o="prev",a="next",s="children",l="parent";if(t==="inline"&&r===Zu)return{inlineTrigger:!0};var c=D(D({},Ym,o),Xu,a),u=D(D(D(D({},qm,n?a:o),Gm,n?o:a),Xu,s),Zu,s),d=D(D(D(D(D(D({},Ym,o),Xu,a),Zu,s),B2,l),qm,n?s:l),Gm,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(i=f["".concat(t).concat(e?"":"Sub")])===null||i===void 0?void 0:i[r];switch(h){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function VL(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function HL(t,e){for(var n=t||document.activeElement;n;){if(e.has(n))return n;n=n.parentElement}return null}function v0(t,e){var n=WL(t,!0);return n.filter(function(r){return e.has(r)})}function Gy(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var i=v0(t,e),o=i.length,a=i.findIndex(function(s){return n===s});return r<0?a===-1?a=o-1:a-=1:r>0&&(a+=1),a=(a+o)%o,i[a]}var Um=function(e,n){var r=new Set,i=new Map,o=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(N2(n,a),"']"));s&&(r.add(s),o.set(s,a),i.set(a,s))}),{elements:r,key2element:i,element2key:o}};function XL(t,e,n,r,i,o,a,s,l,c){var u=Y(),d=Y();d.current=e;var f=function(){Xt.cancel(u.current)};return be(function(){return function(){f()}},[]),function(h){var p=h.which;if([].concat(qy,[Zu,B2,el,tl]).includes(p)){var m=o(),g=Um(m,r),v=g,O=v.elements,S=v.key2element,C=v.element2key,b=S.get(e),x=HL(b,O),$=C.get(x),w=FL(t,a($,!0).length===1,n,p);if(!w&&p!==el&&p!==tl)return;(qy.includes(p)||[el,tl].includes(p))&&h.preventDefault();var P=function(A){if(A){var N=A,L=A.querySelector("a");L!=null&&L.getAttribute("href")&&(N=L);var z=C.get(A);s(z),f(),u.current=Xt(function(){d.current===z&&N.focus()})}};if([el,tl].includes(p)||w.sibling||!x){var _;!x||t==="inline"?_=i.current:_=VL(x);var T,k=v0(_,O);p===el?T=k[0]:p===tl?T=k[k.length-1]:T=Gy(_,O,x,w.offset),P(T)}else if(w.inlineTrigger)l($);else if(w.offset>0)l($,!0),f(),u.current=Xt(function(){g=Um(m,r);var E=x.getAttribute("aria-controls"),A=document.getElementById(E),N=Gy(A,g.elements);P(N)},5);else if(w.offset<0){var R=a($,!0),I=R[R.length-2],Q=S.get(I);l(I,!1),P(Q)}}c==null||c(h)}}function ZL(t){Promise.resolve().then(t)}var O0="__RC_UTIL_PATH_SPLIT__",Yy=function(e){return e.join(O0)},qL=function(e){return e.split(O0)},Km="rc-menu-more";function GL(){var t=K({}),e=ae(t,2),n=e[1],r=Y(new Map),i=Y(new Map),o=K([]),a=ae(o,2),s=a[0],l=a[1],c=Y(0),u=Y(!1),d=function(){u.current||n({})},f=Ht(function(S,C){var b=Yy(C);i.current.set(b,S),r.current.set(S,b),c.current+=1;var x=c.current;ZL(function(){x===c.current&&d()})},[]),h=Ht(function(S,C){var b=Yy(C);i.current.delete(b),r.current.delete(S)},[]),p=Ht(function(S){l(S)},[]),m=Ht(function(S,C){var b=r.current.get(S)||"",x=qL(b);return C&&s.includes(x[0])&&x.unshift(Km),x},[s]),g=Ht(function(S,C){return S.filter(function(b){return b!==void 0}).some(function(b){var x=m(b,!0);return x.includes(C)})},[m]),v=function(){var C=Pe(r.current.keys());return s.length&&C.push(Km),C},O=Ht(function(S){var C="".concat(r.current.get(S)).concat(O0),b=new Set;return Pe(i.current.keys()).forEach(function(x){x.startsWith(C)&&b.add(i.current.get(x))}),b},[]);return be(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:p,isSubPathKey:g,getKeyPath:m,getKeys:v,getSubPathKeys:O}}function fl(t){var e=Y(t);e.current=t;var n=Ht(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1&&(O.motionAppear=!1);var S=O.onVisibleChanged;return O.onVisibleChanged=function(C){return!f.current&&!C&&g(!0),S==null?void 0:S(C)},m?null:y(Zl,{mode:o,locked:!f.current},y(mi,xe({visible:v},O,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(C){var b=C.className,x=C.style;return y(b0,{id:e,className:b,style:x},i)}))}var fj=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],hj=["active"],pj=ye(function(t,e){var n=t.style,r=t.className,i=t.title,o=t.eventKey;t.warnKey;var a=t.disabled,s=t.internalPopupClose,l=t.children,c=t.itemIcon,u=t.expandIcon,d=t.popupClassName,f=t.popupOffset,h=t.popupStyle,p=t.onClick,m=t.onMouseEnter,g=t.onMouseLeave,v=t.onTitleClick,O=t.onTitleMouseEnter,S=t.onTitleMouseLeave,C=dt(t,fj),b=z2(o),x=de(wi),$=x.prefixCls,w=x.mode,P=x.openKeys,_=x.disabled,T=x.overflowDisabled,k=x.activeKey,R=x.selectedKeys,I=x.itemIcon,Q=x.expandIcon,E=x.onItemClick,A=x.onOpenChange,N=x.onActive,L=de(g0),z=L._internalRenderSubMenuItem,V=de(D2),X=V.isSubPathKey,F=Ws(),H="".concat($,"-submenu"),B=_||a,G=Y(),se=Y(),ie=c??I,le=u??Q,pe=P.includes(o),ne=!T&&pe,ee=X(R,o),ce=W2(o,B,O,S),ue=ce.active,j=dt(ce,hj),J=K(!1),he=ae(J,2),ge=he[0],$e=he[1],Te=function(Re){B||$e(Re)},Ce=function(Re){Te(!0),m==null||m({key:o,domEvent:Re})},Ie=function(Re){Te(!1),g==null||g({key:o,domEvent:Re})},_e=me(function(){return ue||(w!=="inline"?ge||X([k],o):!1)},[w,ue,k,ge,o,X]),ve=F2(F.length),Ne=function(Re){B||(v==null||v({key:o,domEvent:Re}),w==="inline"&&A(o,!pe))},ze=fl(function(Fe){p==null||p(Rd(Fe)),E(Fe)}),re=function(Re){w!=="inline"&&A(o,Re)},fe=function(){N(o)},te=b&&"".concat(b,"-popup"),Oe=me(function(){return y(V2,{icon:w!=="horizontal"?le:void 0,props:W(W({},t),{},{isOpen:ne,isSubMenu:!0})},y("i",{className:"".concat(H,"-arrow")}))},[w,le,t,ne,H]),we=y("div",xe({role:"menuitem",style:ve,className:"".concat(H,"-title"),tabIndex:B?null:-1,ref:G,title:typeof i=="string"?i:null,"data-menu-id":T&&b?null:b,"aria-expanded":ne,"aria-haspopup":!0,"aria-controls":te,"aria-disabled":B,onClick:Ne,onFocus:fe},j),i,Oe),Ke=Y(w);if(w!=="inline"&&F.length>1?Ke.current="vertical":Ke.current=w,!T){var Ae=Ke.current;we=y(uj,{mode:Ae,prefixCls:H,visible:!s&&ne&&w!=="inline",popupClassName:d,popupOffset:f,popupStyle:h,popup:y(Zl,{mode:Ae==="horizontal"?"vertical":Ae},y(b0,{id:te,ref:se},l)),disabled:B,onVisibleChange:re},we)}var Me=y(Hi.Item,xe({ref:e,role:"none"},C,{component:"li",style:n,className:Z(H,"".concat(H,"-").concat(w),r,D(D(D(D({},"".concat(H,"-open"),ne),"".concat(H,"-active"),_e),"".concat(H,"-selected"),ee),"".concat(H,"-disabled"),B)),onMouseEnter:Ce,onMouseLeave:Ie}),we,!T&&y(dj,{id:te,open:ne,keyPath:F},l));return z&&(Me=z(Me,t,{selected:ee,active:_e,open:ne,disabled:B})),y(Zl,{onItemClick:ze,mode:w==="horizontal"?"vertical":w,itemIcon:ie,expandIcon:le},Me)}),qf=ye(function(t,e){var n=t.eventKey,r=t.children,i=Ws(n),o=y0(r,i),a=Zf();be(function(){if(a)return a.registerPath(n,i),function(){a.unregisterPath(n,i)}},[i]);var s;return a?s=o:s=y(pj,xe({ref:e},t),o),y(j2.Provider,{value:i},s)});function S0(t){var e=t.className,n=t.style,r=de(wi),i=r.prefixCls,o=Zf();return o?null:y("li",{role:"separator",className:Z("".concat(i,"-item-divider"),e),style:n})}var mj=["className","title","eventKey","children"],gj=ye(function(t,e){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=dt(t,mj),a=de(wi),s=a.prefixCls,l="".concat(s,"-item-group");return y("li",xe({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:Z(l,n)}),y("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),y("ul",{role:"group",className:"".concat(l,"-list")},i))}),x0=ye(function(t,e){var n=t.eventKey,r=t.children,i=Ws(n),o=y0(r,i),a=Zf();return a?o:y(gj,xe({ref:e},cn(t,["warnKey"])),o)}),vj=["label","children","key","type","extra"];function Jm(t,e,n){var r=e.item,i=e.group,o=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&tt(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,h=c.type,p=c.extra,m=dt(c,vj),g=f??"tmp-".concat(l);return d||h==="group"?h==="group"?y(i,xe({key:g},m,{title:u}),Jm(d,e,n)):y(o,xe({key:g},m,{title:u}),Jm(d,e,n)):h==="divider"?y(a,xe({key:g},m)):y(r,xe({key:g},m,{extra:p}),u,(!!p||p===0)&&y("span",{className:"".concat(n,"-item-extra")},p))}return null}).filter(function(s){return s})}function Ky(t,e,n,r,i){var o=t,a=W({divider:S0,item:Tc,group:x0,submenu:qf},r);return e&&(o=Jm(e,a,i)),y0(o,n)}var Oj=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Yo=[],bj=ye(function(t,e){var n,r=t,i=r.prefixCls,o=i===void 0?"rc-menu":i,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,h=r.direction,p=r.id,m=r.mode,g=m===void 0?"vertical":m,v=r.inlineCollapsed,O=r.disabled,S=r.disabledOverflow,C=r.subMenuOpenDelay,b=C===void 0?.1:C,x=r.subMenuCloseDelay,$=x===void 0?.1:x,w=r.forceSubMenuRender,P=r.defaultOpenKeys,_=r.openKeys,T=r.activeKey,k=r.defaultActiveFirst,R=r.selectable,I=R===void 0?!0:R,Q=r.multiple,E=Q===void 0?!1:Q,A=r.defaultSelectedKeys,N=r.selectedKeys,L=r.onSelect,z=r.onDeselect,V=r.inlineIndent,X=V===void 0?24:V,F=r.motion,H=r.defaultMotions,B=r.triggerSubMenuAction,G=B===void 0?"hover":B,se=r.builtinPlacements,ie=r.itemIcon,le=r.expandIcon,pe=r.overflowedIndicator,ne=pe===void 0?"...":pe,ee=r.overflowedIndicatorPopupClassName,ce=r.getPopupContainer,ue=r.onClick,j=r.onOpenChange,J=r.onKeyDown;r.openAnimation,r.openTransitionName;var he=r._internalRenderMenuItem,ge=r._internalRenderSubMenuItem,$e=r._internalComponents,Te=dt(r,Oj),Ce=me(function(){return[Ky(f,d,Yo,$e,o),Ky(f,d,Yo,{},o)]},[f,d,$e]),Ie=ae(Ce,2),_e=Ie[0],ve=Ie[1],Ne=K(!1),ze=ae(Ne,2),re=ze[0],fe=ze[1],te=Y(),Oe=UL(p),we=h==="rtl",Ke=_n(P,{value:_,postState:function(Ye){return Ye||Yo}}),Ae=ae(Ke,2),Me=Ae[0],Fe=Ae[1],Re=function(Ye){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Lt(){Fe(Ye),j==null||j(Ye)}Xe?Ql(Lt):Lt()},ke=K(Me),ot=ae(ke,2),ut=ot[0],Pn=ot[1],qt=Y(!1),xn=me(function(){return(g==="inline"||g==="vertical")&&v?["vertical",v]:[g,!1]},[g,v]),gn=ae(xn,2),Bt=gn[0],bt=gn[1],pt=Bt==="inline",nt=K(Bt),it=ae(nt,2),Qe=it[0],st=it[1],ft=K(bt),Le=ae(ft,2),Ge=Le[0],je=Le[1];be(function(){st(Bt),je(bt),qt.current&&(pt?Fe(ut):Re(Yo))},[Bt,bt]);var He=K(0),ct=ae(He,2),rt=ct[0],Ct=ct[1],$t=rt>=_e.length-1||Qe!=="horizontal"||S;be(function(){pt&&Pn(Me)},[Me]),be(function(){return qt.current=!0,function(){qt.current=!1}},[]);var wt=GL(),Mt=wt.registerPath,vn=wt.unregisterPath,un=wt.refreshOverflowKeys,Cn=wt.isSubPathKey,jn=wt.getKeyPath,Ut=wt.getKeys,rn=wt.getSubPathKeys,Ee=me(function(){return{registerPath:Mt,unregisterPath:vn}},[Mt,vn]),We=me(function(){return{isSubPathKey:Cn}},[Cn]);be(function(){un($t?Yo:_e.slice(rt+1).map(function(Gt){return Gt.key}))},[rt,$t]);var mt=_n(T||k&&((n=_e[0])===null||n===void 0?void 0:n.key),{value:T}),St=ae(mt,2),Je=St[0],Ue=St[1],ht=fl(function(Gt){Ue(Gt)}),It=fl(function(){Ue(void 0)});Yt(e,function(){return{list:te.current,focus:function(Ye){var Xe,Lt=Ut(),Wt=Um(Lt,Oe),tn=Wt.elements,fn=Wt.key2element,vr=Wt.element2key,Yn=v0(te.current,tn),Or=Je??(Yn[0]?vr.get(Yn[0]):(Xe=_e.find(function(Ii){return!Ii.props.disabled}))===null||Xe===void 0?void 0:Xe.key),or=fn.get(Or);if(Or&&or){var br;or==null||(br=or.focus)===null||br===void 0||br.call(or,Ye)}}}});var zt=_n(A||[],{value:N,postState:function(Ye){return Array.isArray(Ye)?Ye:Ye==null?Yo:[Ye]}}),Vt=ae(zt,2),dn=Vt[0],Br=Vt[1],Pr=function(Ye){if(I){var Xe=Ye.key,Lt=dn.includes(Xe),Wt;E?Lt?Wt=dn.filter(function(fn){return fn!==Xe}):Wt=[].concat(Pe(dn),[Xe]):Wt=[Xe],Br(Wt);var tn=W(W({},Ye),{},{selectedKeys:Wt});Lt?z==null||z(tn):L==null||L(tn)}!E&&Me.length&&Qe!=="inline"&&Re(Yo)},_r=fl(function(Gt){ue==null||ue(Rd(Gt)),Pr(Gt)}),Tr=fl(function(Gt,Ye){var Xe=Me.filter(function(Wt){return Wt!==Gt});if(Ye)Xe.push(Gt);else if(Qe!=="inline"){var Lt=rn(Gt);Xe=Xe.filter(function(Wt){return!Lt.has(Wt)})}Dl(Me,Xe,!0)||Re(Xe,!0)}),Gn=function(Ye,Xe){var Lt=Xe??!Me.includes(Ye);Tr(Ye,Lt)},kr=XL(Qe,Je,we,Oe,te,Ut,jn,Ue,Gn,J);be(function(){fe(!0)},[]);var Rr=me(function(){return{_internalRenderMenuItem:he,_internalRenderSubMenuItem:ge}},[he,ge]),ti=Qe!=="horizontal"||S?_e:_e.map(function(Gt,Ye){return y(Zl,{key:Gt.key,overflowDisabled:Ye>rt},Gt)}),Ri=y(Hi,xe({id:p,ref:te,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:Tc,className:Z(o,"".concat(o,"-root"),"".concat(o,"-").concat(Qe),l,D(D({},"".concat(o,"-inline-collapsed"),Ge),"".concat(o,"-rtl"),we),a),dir:h,style:s,role:"menu",tabIndex:u,data:ti,renderRawItem:function(Ye){return Ye},renderRawRest:function(Ye){var Xe=Ye.length,Lt=Xe?_e.slice(-Xe):null;return y(qf,{eventKey:Km,title:ne,disabled:$t,internalPopupClose:Xe===0,popupClassName:ee},Lt)},maxCount:Qe!=="horizontal"||S?Hi.INVALIDATE:Hi.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ye){Ct(Ye)},onKeyDown:kr},Te));return y(g0.Provider,{value:Rr},y(Q2.Provider,{value:Oe},y(Zl,{prefixCls:o,rootClassName:a,mode:Qe,openKeys:Me,rtl:we,disabled:O,motion:re?F:null,defaultMotions:re?H:null,activeKey:Je,onActive:ht,onInactive:It,selectedKeys:dn,inlineIndent:X,subMenuOpenDelay:b,subMenuCloseDelay:$,forceSubMenuRender:w,builtinPlacements:se,triggerSubMenuAction:G,getPopupContainer:ce,itemIcon:ie,expandIcon:le,onItemClick:_r,onOpenChange:Tr},y(D2.Provider,{value:We},Ri),y("div",{style:{display:"none"},"aria-hidden":!0},y(L2.Provider,{value:Ee},ve)))))}),Fs=bj;Fs.Item=Tc;Fs.SubMenu=qf;Fs.ItemGroup=x0;Fs.Divider=S0;var yj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},Sj=function(e,n){return y(Rt,xe({},e,{ref:n,icon:yj}))},xj=ye(Sj);const X2=yt({siderHook:{addSider:()=>null,removeSider:()=>null}}),Cj=t=>{const{antCls:e,componentCls:n,colorText:r,footerBg:i,headerHeight:o,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=t;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:o,padding:a,color:s,lineHeight:q(o),background:d,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:i},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},Z2=t=>{const{colorBgLayout:e,controlHeight:n,controlHeightLG:r,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=t,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140",bodyBg:e,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:i,footerPadding:`${o}px ${c}px`,footerBg:e,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:i}},q2=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],G2=Zt("Layout",Cj,Z2,{deprecatedTokens:q2}),$j=t=>{const{componentCls:e,siderBg:n,motionDurationMid:r,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:h,lightTriggerColor:p,lightTriggerBg:m,bodyBg:g}=t;return{[e]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${e}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${e}-children`]:{overflow:"hidden"},[`${e}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:q(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${e}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:t.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${q(f)} ${q(f)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:t.calc(u).mul(-1).equal(),borderRadius:`${q(f)} 0 0 ${q(f)}`}},"&-light":{background:h,[`${e}-trigger`]:{color:p,background:m},[`${e}-zero-width-trigger`]:{color:p,background:m,border:`1px solid ${g}`,borderInlineStart:0}}}}},wj=Zt(["Layout","Sider"],$j,Z2,{deprecatedTokens:q2});var Pj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i!Number.isNaN(Number.parseFloat(t))&&isFinite(t),Gf=yt({}),Tj=(()=>{let t=0;return(e="")=>(t+=1,`${e}${t}`)})(),Y2=ye((t,e)=>{const{prefixCls:n,className:r,trigger:i,children:o,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:h,breakpoint:p,onCollapse:m,onBreakpoint:g}=t,v=Pj(t,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:O}=de(X2),[S,C]=K("collapsed"in t?t.collapsed:a),[b,x]=K(!1);be(()=>{"collapsed"in t&&C(t.collapsed)},[t.collapsed]);const $=(ie,le)=>{"collapsed"in t||C(ie),m==null||m(ie,le)},{getPrefixCls:w,direction:P}=de(at),_=w("layout-sider",n),[T,k,R]=wj(_),I=Y(null);I.current=ie=>{x(ie.matches),g==null||g(ie.matches),S!==ie.matches&&$(ie.matches,"responsive")},be(()=>{function ie(pe){var ne;return(ne=I.current)===null||ne===void 0?void 0:ne.call(I,pe)}let le;return typeof(window==null?void 0:window.matchMedia)<"u"&&p&&p in Jy&&(le=window.matchMedia(`screen and (max-width: ${Jy[p]})`),S2(le,ie),ie(le)),()=>{x2(le,ie)}},[p]),be(()=>{const ie=Tj("ant-sider-");return O.addSider(ie),()=>O.removeSider(ie)},[]);const Q=()=>{$(!S,"clickTrigger")},E=cn(v,["collapsed"]),A=S?f:d,N=_j(A)?`${A}px`:String(A),L=parseFloat(String(f||0))===0?y("span",{onClick:Q,className:Z(`${_}-zero-width-trigger`,`${_}-zero-width-trigger-${u?"right":"left"}`),style:h},i||y(xj,null)):null,z=P==="rtl"==!u,F={expanded:y(z?$d:Zm,null),collapsed:y(z?Zm:$d,null)}[S?"collapsed":"expanded"],H=i!==null?L||y("div",{className:`${_}-trigger`,onClick:Q,style:{width:N}},i||F):null,B=Object.assign(Object.assign({},l),{flex:`0 0 ${N}`,maxWidth:N,minWidth:N,width:N}),G=Z(_,`${_}-${s}`,{[`${_}-collapsed`]:!!S,[`${_}-has-trigger`]:c&&i!==null&&!L,[`${_}-below`]:!!b,[`${_}-zero-width`]:parseFloat(N)===0},r,k,R),se=me(()=>({siderCollapsed:S}),[S]);return T(y(Gf.Provider,{value:se},y("aside",Object.assign({className:G},E,{style:B,ref:e}),y("div",{className:`${_}-children`},o),c||b&&L?H:null)))});var kj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Rj=function(e,n){return y(Rt,xe({},e,{ref:n,icon:kj}))},C0=ye(Rj);const Id=yt({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var Ij=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,dashed:r}=t,i=Ij(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=de(at),a=o("menu",e),s=Z({[`${a}-item-divider-dashed`]:!!r},n);return y(S0,Object.assign({className:s},i))},K2=t=>{var e;const{className:n,children:r,icon:i,title:o,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=de(Id),h=S=>{const C=r==null?void 0:r[0],b=y("span",{className:Z(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!i||Jt(r)&&r.type==="span")&&r&&S&&c&&typeof C=="string"?y("div",{className:`${l}-inline-collapsed-noicon`},C.charAt(0)):b},{siderCollapsed:p}=de(Gf);let m=o;typeof o>"u"?m=c?r:"":o===!1&&(m="");const g={title:m};!p&&!f&&(g.title=null,g.open=!1);const v=rr(r).length;let O=y(Tc,Object.assign({},cn(t,["title","icon","danger"]),{className:Z({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(i?v+1:v)===1},n),title:typeof o=="string"?o:void 0}),hr(i,{className:Z(Jt(i)?(e=i.props)===null||e===void 0?void 0:e.className:void 0,`${l}-item-icon`)}),h(f));return d||(O=y(Kt,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),O)),O};var Mj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{children:n}=t,r=Mj(t,["children"]),i=de(Md),o=me(()=>Object.assign(Object.assign({},i),r),[i,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=KR(n),s=go(e,a?Xo(n):null);return y(Md.Provider,{value:o},y(ys,{space:!0},a?Zn(n,{ref:s}):n))}),Aj=t=>{const{componentCls:e,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${q(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover, > ${e}-item-active, > ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},Qj=({componentCls:t,menuArrowOffset:e,calc:n})=>({[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical, - ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${q(n(e).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${q(e)})`}}}}),Jy=t=>wf(t),e1=(t,e)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:h,motionEaseInOut:p,motionEaseOut:m,itemPaddingInline:g,motionDurationMid:v,itemHoverColor:O,lineType:S,colorSplit:x,itemDisabledColor:b,dangerItemColor:C,dangerItemHoverColor:$,dangerItemSelectedColor:w,dangerItemActiveBg:P,dangerItemSelectedBg:_,popupBg:T,itemHoverBg:R,itemActiveBg:k,menuSubMenuBg:I,horizontalItemSelectedColor:Q,horizontalItemSelectedBg:M,horizontalItemBorderRadius:E,horizontalItemHoverBg:N}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},Jy(t)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},Jy(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${b} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:O}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:R},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:R},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:C,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:$}},[`&${n}-item:active`]:{background:P}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:_}},[`&${n}-submenu > ${n}`]:{backgroundColor:I},[`&${n}-popup > ${n}`]:{backgroundColor:T},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:T},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:t.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:E,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${q(u)} solid transparent`,transition:`border-color ${h} ${p}`,content:'""'},"&:hover, &-active, &-open":{background:N,"&::after":{borderBottomWidth:u,borderBottomColor:Q}},"&-selected":{color:Q,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:Q}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${q(f)} ${S} ${x}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${q(d)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${v} ${m}`,`opacity ${v} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${v} ${p}`,`opacity ${v} ${p}`].join(",")}}}}}},t1=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(o).add(i).add(a).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:q(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${e}-item, + ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${q(n(e).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${q(e)})`}}}}),e1=t=>_f(t),t1=(t,e)=>{const{componentCls:n,itemColor:r,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:h,motionEaseInOut:p,motionEaseOut:m,itemPaddingInline:g,motionDurationMid:v,itemHoverColor:O,lineType:S,colorSplit:C,itemDisabledColor:b,dangerItemColor:x,dangerItemHoverColor:$,dangerItemSelectedColor:w,dangerItemActiveBg:P,dangerItemSelectedBg:_,popupBg:T,itemHoverBg:k,itemActiveBg:R,menuSubMenuBg:I,horizontalItemSelectedColor:Q,horizontalItemSelectedBg:E,horizontalItemBorderRadius:A,horizontalItemHoverBg:N}=t;return{[`${n}-${e}, ${n}-${e} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},e1(t)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},e1(t))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${b} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:O}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:R}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:R}}},[`${n}-item-danger`]:{color:x,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:$}},[`&${n}-item:active`]:{background:P}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:i,[`&${n}-item-danger`]:{color:w},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:_}},[`&${n}-submenu > ${n}`]:{backgroundColor:I},[`&${n}-popup > ${n}`]:{backgroundColor:T},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:T},[`&${n}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:t.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:A,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${q(u)} solid transparent`,transition:`border-color ${h} ${p}`,content:'""'},"&:hover, &-active, &-open":{background:N,"&::after":{borderBottomWidth:u,borderBottomColor:Q}},"&-selected":{color:Q,backgroundColor:E,"&:hover":{backgroundColor:E},"&::after":{borderBottomWidth:u,borderBottomColor:Q}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${q(f)} ${S} ${C}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${q(d)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${v} ${m}`,`opacity ${v} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:w}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${v} ${p}`,`opacity ${v} ${p}`].join(",")}}}}}},n1=t=>{const{componentCls:e,itemHeight:n,itemMarginInline:r,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(o).add(i).add(a).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:q(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${e}-item, > ${e}-submenu > ${e}-submenu-title`]:{height:n,lineHeight:q(n)},[`${e}-item-group-list ${e}-submenu-title, - ${e}-submenu-title`]:{paddingInlineEnd:u}}},Nj=t=>{const{componentCls:e,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:p,collapsedWidth:m,collapsedIconSize:g}=t,v={height:r,lineHeight:q(r),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},t1(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},t1(t)),{boxShadow:p})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${q(t.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:v,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:v}},{[`${e}-inline-collapsed`]:{width:m,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item, + ${e}-submenu-title`]:{paddingInlineEnd:u}}},Nj=t=>{const{componentCls:e,iconCls:n,itemHeight:r,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:p,collapsedWidth:m,collapsedIconSize:g}=t,v={height:r,lineHeight:q(r),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},n1(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},n1(t)),{boxShadow:p})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${q(t.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:v,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:v}},{[`${e}-inline-collapsed`]:{width:m,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item, > ${e}-item-group > ${e}-item-group-list > ${e}-item, > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title, > ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${q(t.calc(g).div(2).equal())} - ${q(c)})`,textOverflow:"clip",[` ${e}-submenu-arrow, ${e}-submenu-expand-icon - `]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:q(r),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${e}-item-group-title`]:Object.assign(Object.assign({},ba),{paddingInline:h})}}]},n1=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${e}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},As()),[`&${e}-item-only-child`]:{[`> ${a}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},r1=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(o).mul(.6).equal(),height:t.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${q(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${q(a)})`}}}}},zj=t=>{const{antCls:e,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:h,menuArrowSize:p,menuArrowOffset:m,lineType:g,groupTitleLineHeight:v,groupTitleFontSize:O}=t;return[{"":{[n]:Object.assign(Object.assign({},No()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),No()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${q(s)} ${q(l)}`,fontSize:O,lineHeight:v,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),n1(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${q(t.calc(r).mul(2).equal())} ${q(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},n1(t)),r1(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:h},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS}}}),r1(t)),{[`&-inline-collapsed ${n}-submenu-arrow, - &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${q(m)})`},"&::after":{transform:`rotate(45deg) translateX(${q(t.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${q(t.calc(p).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${q(t.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${q(m)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Lj=t=>{var e,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:p,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:v,lineHeight:O,colorBgElevated:S,marginXXS:x,padding:b,fontSize:C,controlHeightSM:$,fontSizeLG:w,colorTextLightSolid:P,colorErrorHover:_}=t,T=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,R=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:h,k=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,I=new Dt(P).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:T,colorActiveBarHeight:p,activeBarHeight:p,colorActiveBarBorderSize:h,activeBarBorderWidth:R,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:k,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:O,collapsedWidth:v*2,popupBg:S,itemMarginBlock:x,itemPaddingInline:b,horizontalLineHeight:`${v*1.15}px`,iconSize:C,iconMarginInlineEnd:$-C,collapsedIconSize:w,groupTitleFontSize:C,darkItemDisabledColor:new Dt(P).setA(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:P,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:P,darkDangerItemHoverColor:_,darkDangerItemSelectedColor:P,darkDangerItemActiveBg:o,itemWidth:T?`calc(100% + ${R}px)`:`calc(100% - ${k*2}px)`}},jj=(t,e=t,n=!0)=>Zt("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:h,darkDangerItemSelectedBg:p,darkItemHoverBg:m,darkGroupTitleColor:g,darkItemHoverColor:v,darkItemDisabledColor:O,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:b,popupBg:C,darkPopupBg:$}=i,w=i.calc(s).div(7).mul(5).equal(),P=kt(i,{menuArrowSize:w,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(w).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:C}),_=kt(P,{itemColor:l,itemHoverColor:v,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:$,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:O,dangerItemColor:c,dangerItemHoverColor:S,dangerItemSelectedColor:x,dangerItemActiveBg:b,dangerItemSelectedBg:p,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:h});return[zj(P),Aj(P),Nj(P),e1(P,"light"),e1(_,"dark"),Qj(P),Fv(P),Lo(P,"slide-up"),Lo(P,"slide-down"),Cc(P,"zoom-big")]},Lj,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e),J2=t=>{var e;const{popupClassName:n,icon:r,title:i,theme:o}=t,a=fe(kd),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=Ws();let d;if(!r)d=l&&!u.length&&i&&typeof i=="string"?y("div",{className:`${s}-inline-collapsed-noicon`},i.charAt(0)):y("span",{className:`${s}-title-content`},i);else{const p=Kt(i)&&i.type==="span";d=y(At,null,fr(r,{className:Z(Kt(r)?(e=r.props)===null||e===void 0?void 0:e.className:void 0,`${s}-item-icon`)}),p?i:y("span",{className:`${s}-title-content`},i))}const f=ge(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[h]=Sc("Menu");return y(kd.Provider,{value:f},y(Xf,Object.assign({},cn(t,["icon"]),{title:d,popupClassName:Z(s,n,`${s}-${o||c}`),popupStyle:Object.assign({zIndex:h},t.popupStyle)})))};var Dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const r=fe(Rd),i=r||{},{getPrefixCls:o,getPopupContainer:a,direction:s,menu:l}=fe(it),c=o(),{prefixCls:u,className:d,style:f,theme:h="light",expandIcon:p,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:g,siderCollapsed:v,rootClassName:O,mode:S,selectable:x,onClick:b,overflowedIndicatorPopupClassName:C}=t,$=Dj(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),w=cn($,["collapsedWidth"]);(n=i.validator)===null||n===void 0||n.call(i,{mode:S});const P=pn((...H)=>{var V;b==null||b.apply(void 0,H),(V=i.onClick)===null||V===void 0||V.call(i)}),_=i.mode||S,T=x??i.selectable,R=g??v,k={horizontal:{motionName:`${c}-slide-up`},inline:Sd(c),other:{motionName:`${c}-zoom-big`}},I=o("menu",u||i.prefixCls),Q=$r(I),[M,E,N]=jj(I,Q,!r),z=Z(`${I}-${h}`,l==null?void 0:l.className,d),L=ge(()=>{var H,V;if(typeof p=="function"||Zh(p))return p||null;if(typeof i.expandIcon=="function"||Zh(i.expandIcon))return i.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||Zh(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const X=(H=p??(i==null?void 0:i.expandIcon))!==null&&H!==void 0?H:l==null?void 0:l.expandIcon;return fr(X,{className:Z(`${I}-submenu-expand-icon`,Kt(X)?(V=X.props)===null||V===void 0?void 0:V.className:void 0)})},[p,i==null?void 0:i.expandIcon,l==null?void 0:l.expandIcon,I]),F=ge(()=>({prefixCls:I,inlineCollapsed:R||!1,direction:s,firstLevel:!0,theme:h,mode:_,disableMenuItemTitleTooltip:m}),[I,R,s,m,h]);return M(y(Rd.Provider,{value:null},y(kd.Provider,{value:F},y(Fs,Object.assign({getPopupContainer:a,overflowedIndicator:y(x0,null),overflowedIndicatorPopupClassName:Z(I,`${I}-${h}`,C),mode:_,selectable:T,onClick:P},w,{inlineCollapsed:R,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:z,prefixCls:I,direction:s,defaultMotions:k,expandIcon:L,ref:e,rootClassName:Z(O,E,i.rootClassName,N,Q),_internalComponents:Bj})))))}),kc=Se((t,e)=>{const n=U(null),r=fe(Zf);return Yt(e,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),y(Wj,Object.assign({ref:n},t,r))});kc.Item=K2;kc.SubMenu=J2;kc.Divider=U2;kc.ItemGroup=S0;const Fj=t=>{const{componentCls:e,menuCls:n,colorError:r,colorTextLightSolid:i}=t,o=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},Vj=t=>{const{componentCls:e,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:h,controlPaddingHorizontal:p,colorBgElevated:m}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:t.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:h}},[`${e}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:h},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomLeft, + `]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:q(r),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:i}},[`${e}-item-group-title`]:Object.assign(Object.assign({},Sa),{paddingInline:h})}}]},r1=t=>{const{componentCls:e,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${i}`].join(","),[`${e}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${o}`,`margin ${n} ${i}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${i}`,`margin ${n}`,`color ${n}`].join(",")}},[`${e}-item-icon`]:Object.assign({},As()),[`&${e}-item-only-child`]:{[`> ${a}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},i1=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:r,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(o).mul(.6).equal(),height:t.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${q(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${q(a)})`}}}}},zj=t=>{const{antCls:e,componentCls:n,fontSize:r,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:h,menuArrowSize:p,menuArrowOffset:m,lineType:g,groupTitleLineHeight:v,groupTitleFontSize:O}=t;return[{"":{[n]:Object.assign(Object.assign({},zo()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),zo()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${q(s)} ${q(l)}`,fontSize:O,lineHeight:v,transition:`all ${i}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),r1(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${q(t.calc(r).mul(2).equal())} ${q(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},r1(t)),i1(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:h},[`${n}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:t.paddingXS}}}),i1(t)),{[`&-inline-collapsed ${n}-submenu-arrow, + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${q(m)})`},"&::after":{transform:`rotate(45deg) translateX(${q(t.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${q(t.calc(p).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${q(t.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${q(m)})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Lj=t=>{var e,n,r;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:p,controlItemBgActive:m,colorBgTextHover:g,controlHeightLG:v,lineHeight:O,colorBgElevated:S,marginXXS:C,padding:b,fontSize:x,controlHeightSM:$,fontSizeLG:w,colorTextLightSolid:P,colorErrorHover:_}=t,T=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,k=(n=t.activeBarBorderWidth)!==null&&n!==void 0?n:h,R=(r=t.itemMarginInline)!==null&&r!==void 0?r:t.marginXXS,I=new Dt(P).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:T,colorActiveBarHeight:p,activeBarHeight:p,colorActiveBarBorderSize:h,activeBarBorderWidth:k,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:R,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:O,collapsedWidth:v*2,popupBg:S,itemMarginBlock:C,itemPaddingInline:b,horizontalLineHeight:`${v*1.15}px`,iconSize:x,iconMarginInlineEnd:$-x,collapsedIconSize:w,groupTitleFontSize:x,darkItemDisabledColor:new Dt(P).setA(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:P,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:P,darkDangerItemHoverColor:_,darkDangerItemSelectedColor:P,darkDangerItemActiveBg:o,itemWidth:T?`calc(100% + ${k}px)`:`calc(100% - ${R*2}px)`}},jj=(t,e=t,n=!0)=>Zt("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:h,darkDangerItemSelectedBg:p,darkItemHoverBg:m,darkGroupTitleColor:g,darkItemHoverColor:v,darkItemDisabledColor:O,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:b,popupBg:x,darkPopupBg:$}=i,w=i.calc(s).div(7).mul(5).equal(),P=kt(i,{menuArrowSize:w,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(w).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:x}),_=kt(P,{itemColor:l,itemHoverColor:v,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:$,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:O,dangerItemColor:c,dangerItemHoverColor:S,dangerItemSelectedColor:C,dangerItemActiveBg:b,dangerItemSelectedBg:p,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:h});return[zj(P),Aj(P),Nj(P),t1(P,"light"),t1(_,"dark"),Qj(P),Vv(P),jo(P,"slide-up"),jo(P,"slide-down"),Cc(P,"zoom-big")]},Lj,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(t,e),J2=t=>{var e;const{popupClassName:n,icon:r,title:i,theme:o}=t,a=de(Id),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=Ws();let d;if(!r)d=l&&!u.length&&i&&typeof i=="string"?y("div",{className:`${s}-inline-collapsed-noicon`},i.charAt(0)):y("span",{className:`${s}-title-content`},i);else{const p=Jt(i)&&i.type==="span";d=y(At,null,hr(r,{className:Z(Jt(r)?(e=r.props)===null||e===void 0?void 0:e.className:void 0,`${s}-item-icon`)}),p?i:y("span",{className:`${s}-title-content`},i))}const f=me(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[h]=Sc("Menu");return y(Id.Provider,{value:f},y(qf,Object.assign({},cn(t,["icon"]),{title:d,popupClassName:Z(s,n,`${s}-${o||c}`),popupStyle:Object.assign({zIndex:h},t.popupStyle)})))};var Dj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const r=de(Md),i=r||{},{getPrefixCls:o,getPopupContainer:a,direction:s,menu:l}=de(at),c=o(),{prefixCls:u,className:d,style:f,theme:h="light",expandIcon:p,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:g,siderCollapsed:v,rootClassName:O,mode:S,selectable:C,onClick:b,overflowedIndicatorPopupClassName:x}=t,$=Dj(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),w=cn($,["collapsedWidth"]);(n=i.validator)===null||n===void 0||n.call(i,{mode:S});const P=pn((...X)=>{var F;b==null||b.apply(void 0,X),(F=i.onClick)===null||F===void 0||F.call(i)}),_=i.mode||S,T=C??i.selectable,k=g??v,R={horizontal:{motionName:`${c}-slide-up`},inline:Cd(c),other:{motionName:`${c}-zoom-big`}},I=o("menu",u||i.prefixCls),Q=wr(I),[E,A,N]=jj(I,Q,!r),L=Z(`${I}-${h}`,l==null?void 0:l.className,d),z=me(()=>{var X,F;if(typeof p=="function"||Gh(p))return p||null;if(typeof i.expandIcon=="function"||Gh(i.expandIcon))return i.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||Gh(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const H=(X=p??(i==null?void 0:i.expandIcon))!==null&&X!==void 0?X:l==null?void 0:l.expandIcon;return hr(H,{className:Z(`${I}-submenu-expand-icon`,Jt(H)?(F=H.props)===null||F===void 0?void 0:F.className:void 0)})},[p,i==null?void 0:i.expandIcon,l==null?void 0:l.expandIcon,I]),V=me(()=>({prefixCls:I,inlineCollapsed:k||!1,direction:s,firstLevel:!0,theme:h,mode:_,disableMenuItemTitleTooltip:m}),[I,k,s,m,h]);return E(y(Md.Provider,{value:null},y(Id.Provider,{value:V},y(Fs,Object.assign({getPopupContainer:a,overflowedIndicator:y(C0,null),overflowedIndicatorPopupClassName:Z(I,`${I}-${h}`,x),mode:_,selectable:T,onClick:P},w,{inlineCollapsed:k,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:L,prefixCls:I,direction:s,defaultMotions:R,expandIcon:z,ref:e,rootClassName:Z(O,A,i.rootClassName,N,Q),_internalComponents:Bj})))))}),kc=ye((t,e)=>{const n=Y(null),r=de(Gf);return Yt(e,()=>({menu:n.current,focus:i=>{var o;(o=n.current)===null||o===void 0||o.focus(i)}})),y(Wj,Object.assign({ref:n},t,r))});kc.Item=K2;kc.SubMenu=J2;kc.Divider=U2;kc.ItemGroup=x0;const Fj=t=>{const{componentCls:e,menuCls:n,colorError:r,colorTextLightSolid:i}=t,o=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:i,backgroundColor:r}}}}}},Vj=t=>{const{componentCls:e,menuCls:n,zIndexPopup:r,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:h,controlPaddingHorizontal:p,colorBgElevated:m}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:t.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:h}},[`${e}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:h},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomLeft, &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomLeft, &${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottom, &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottom, &${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomRight, - &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:Vv},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft, + &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:Hv},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft, &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topLeft, &${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-top, &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-top, &${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topRight, - &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:Xv},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft, + &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:Zv},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft, &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottom, - &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:Hv},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft, + &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:Xv},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft, &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-top, - &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:Zv}}},f0(t,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},wn(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},Ci(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${q(c)} ${q(p)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${q(c)} ${q(p)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},Ci(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${q(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${q(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(p).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[Lo(t,"slide-up"),Lo(t,"slide-down"),Cd(t,"move-up"),Cd(t,"move-down"),Cc(t,"zoom-big")]]},Hj=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},Vf({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),d0(t)),Xj=Zt("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:i}=t,o=kt(t,{menuCls:`${i}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[Vj(o),Fj(o)]},Hj,{resetStyle:!1}),qf=t=>{var e;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:h,open:p,onOpenChange:m,visible:g,onVisibleChange:v,mouseEnterDelay:O=.15,mouseLeaveDelay:S=.1,autoAdjustOverflow:x=!0,placement:b="",overlay:C,transitionName:$,destroyOnHidden:w,destroyPopupOnHide:P}=t,{getPopupContainer:_,getPrefixCls:T,direction:R,dropdown:k}=fe(it),I=c||l;bc();const Q=ge(()=>{const he=T();return $!==void 0?$:b.includes("top")?`${he}-slide-down`:`${he}-slide-up`},[T,b,$]),M=ge(()=>b?b.includes("Center")?b.slice(0,b.indexOf("Center")):b:R==="rtl"?"bottomRight":"bottomLeft",[b,R]),E=T("dropdown",i),N=$r(E),[z,L,F]=Xj(E,N),[,H]=Cr(),V=Ao.only(LL(o)?y("span",null,o):o),X=fr(V,{className:Z(`${E}-trigger`,{[`${E}-rtl`]:R==="rtl"},V.props.className),disabled:(e=V.props.disabled)!==null&&e!==void 0?e:s}),B=s?[]:a,G=!!(B!=null&&B.includes("contextMenu")),[se,re]=_n(!1,{value:p??g}),le=pn(he=>{m==null||m(he,{source:"trigger"}),v==null||v(he),re(he)}),me=Z(d,f,L,F,N,k==null?void 0:k.className,{[`${E}-rtl`]:R==="rtl"}),ie=_2({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:x,offset:H.marginXXS,arrowWidth:r?H.sizePopupArrow:0,borderRadius:H.borderRadius}),ne=pn(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),re(!1))}),ue=()=>{let he;return n!=null&&n.items?he=y(kc,Object.assign({},n)):typeof C=="function"?he=C():he=C,I&&(he=I(he)),he=Ao.only(typeof he=="string"?y("span",null,he):he),y(Ej,{prefixCls:`${E}-menu`,rootClassName:Z(F,N),expandIcon:y("span",{className:`${E}-menu-submenu-arrow`},R==="rtl"?y(Hm,{className:`${E}-menu-submenu-arrow-icon`}):y(xd,{className:`${E}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ne,validator:({mode:ve})=>{}},he)},[de,j]=Sc("Dropdown",h==null?void 0:h.zIndex);let ee=y(A2,Object.assign({alignPoint:G},cn(t,["rootClassName"]),{mouseEnterDelay:O,mouseLeaveDelay:S,visible:se,builtinPlacements:ie,arrow:!!r,overlayClassName:me,prefixCls:E,getPopupContainer:u||_,transitionName:Q,trigger:B,overlay:ue,placement:M,onVisibleChange:le,overlayStyle:Object.assign(Object.assign(Object.assign({},k==null?void 0:k.style),h),{zIndex:de}),autoDestroy:w??P}),X);return de&&(ee=y(_f.Provider,{value:j},ee)),z(ee)},Zj=Jw(qf,"align",void 0,"dropdown",t=>t),qj=t=>y(Zj,Object.assign({},t),y("span",null));qf._InternalPanelDoNotUseOrYouWillBeFired=qj;const Gj=["parentNode"],Yj="form_item";function $l(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function eP(t,e){if(!t.length)return;const n=t.join("_");return e?`${e}_${n}`:Gj.includes(n)?`${Yj}_${n}`:n}function tP(t,e,n,r,i,o){let a=r;return o!==void 0?a=o:n.validating?a="validating":t.length?a="error":e.length?a="warning":(n.touched||i&&n.validated)&&(a="success"),a}var Uj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);it??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:i=>o=>{const a=i1(i);o?n.current[a]=o:delete n.current[a]}},scrollToField:(i,o={})=>{const{focus:a}=o,s=Uj(o,["focus"]),l=o1(i,r);l&&(B5(l,Object.assign({scrollMode:"if-needed",block:"nearest"},s)),a&&r.focusField(i))},focusField:i=>{var o,a;const s=r.getFieldInstance(i);typeof(s==null?void 0:s.focus)=="function"?s.focus():(a=(o=o1(i,r))===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o)},getFieldInstance:i=>{const o=i1(i);return n.current[o]}}),[t,e]);return[r]}function Gf(t){return kt(t,{inputAffixPadding:t.paddingXXS})}const Yf=t=>{const{controlHeight:e,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:p,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:v,colorWarningOutline:O,colorBgContainer:S,inputFontSize:x,inputFontSizeLG:b,inputFontSizeSM:C}=t,$=x||n,w=C||$,P=b||s,_=Math.round((e-$*r)/2*10)/10-i,T=Math.round((o-w*r)/2*10)/10-i,R=Math.ceil((a-P*l)/2*10)/10-i;return{paddingBlock:Math.max(_,0),paddingBlockSM:Math.max(T,0),paddingBlockLG:Math.max(R,0),paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:p,hoverBorderColor:h,activeShadow:`0 0 0 ${m}px ${g}`,errorActiveShadow:`0 0 0 ${m}px ${v}`,warningActiveShadow:`0 0 0 ${m}px ${O}`,hoverBg:S,activeBg:S,inputFontSize:$,inputFontSizeLG:P,inputFontSizeSM:w}},Kj=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),C0=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Kj(kt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),rP=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),a1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},rP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),Jj=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},rP(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},C0(t))}),a1(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),a1(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),s1=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),eD=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},s1(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),s1(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},C0(t))}})}),tD=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},iP=(t,e)=>{var n;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=e==null?void 0:e.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},l1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},iP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),nD=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},iP(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},C0(t))}),l1(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),l1(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),c1=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),rD=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},c1(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),c1(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),oP=(t,e)=>({background:t.colorBgContainer,borderWidth:`${q(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.activeBorderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),u1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},oP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),iD=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oP(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),u1(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),u1(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),oD=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),aP=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=t;return{padding:`${q(e)} ${q(i)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},sP=t=>({padding:`${q(t.paddingBlockSM)} ${q(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),lP=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${q(t.paddingBlock)} ${q(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},oD(t.colorTextPlaceholder)),{"&-lg":Object.assign({},aP(t)),"&-sm":Object.assign({},sP(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),aD=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},aP(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},sP(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${q(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${q(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${q(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${q(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${q(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},No()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` + &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:qv}}},h0(t,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},wn(t)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},Ci(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${q(c)} ${q(p)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${q(c)} ${q(p)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},Ci(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${q(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${q(t.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:t.calc(p).add(t.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[jo(t,"slide-up"),jo(t,"slide-down"),wd(t,"move-up"),wd(t,"move-down"),Cc(t,"zoom-big")]]},Hj=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},Xf({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),f0(t)),Xj=Zt("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:n,paddingXXS:r,componentCls:i}=t,o=kt(t,{menuCls:`${i}-menu`,dropdownArrowDistance:t.calc(n).div(2).add(e).equal(),dropdownEdgeChildPadding:r});return[Vj(o),Fj(o)]},Hj,{resetStyle:!1}),Yf=t=>{var e;const{menu:n,arrow:r,prefixCls:i,children:o,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:h,open:p,onOpenChange:m,visible:g,onVisibleChange:v,mouseEnterDelay:O=.15,mouseLeaveDelay:S=.1,autoAdjustOverflow:C=!0,placement:b="",overlay:x,transitionName:$,destroyOnHidden:w,destroyPopupOnHide:P}=t,{getPopupContainer:_,getPrefixCls:T,direction:k,dropdown:R}=de(at),I=c||l;bc();const Q=me(()=>{const he=T();return $!==void 0?$:b.includes("top")?`${he}-slide-down`:`${he}-slide-up`},[T,b,$]),E=me(()=>b?b.includes("Center")?b.slice(0,b.indexOf("Center")):b:k==="rtl"?"bottomRight":"bottomLeft",[b,k]),A=T("dropdown",i),N=wr(A),[L,z,V]=Xj(A,N),[,X]=$r(),F=Qo.only(LL(o)?y("span",null,o):o),H=hr(F,{className:Z(`${A}-trigger`,{[`${A}-rtl`]:k==="rtl"},F.props.className),disabled:(e=F.props.disabled)!==null&&e!==void 0?e:s}),B=s?[]:a,G=!!(B!=null&&B.includes("contextMenu")),[se,ie]=_n(!1,{value:p??g}),le=pn(he=>{m==null||m(he,{source:"trigger"}),v==null||v(he),ie(he)}),pe=Z(d,f,z,V,N,R==null?void 0:R.className,{[`${A}-rtl`]:k==="rtl"}),ne=_2({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:C,offset:X.marginXXS,arrowWidth:r?X.sizePopupArrow:0,borderRadius:X.borderRadius}),ee=pn(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),ie(!1))}),ce=()=>{let he;return n!=null&&n.items?he=y(kc,Object.assign({},n)):typeof x=="function"?he=x():he=x,I&&(he=I(he)),he=Qo.only(typeof he=="string"?y("span",null,he):he),y(Ej,{prefixCls:`${A}-menu`,rootClassName:Z(V,N),expandIcon:y("span",{className:`${A}-menu-submenu-arrow`},k==="rtl"?y(Zm,{className:`${A}-menu-submenu-arrow-icon`}):y($d,{className:`${A}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ee,validator:({mode:ge})=>{}},he)},[ue,j]=Sc("Dropdown",h==null?void 0:h.zIndex);let J=y(A2,Object.assign({alignPoint:G},cn(t,["rootClassName"]),{mouseEnterDelay:O,mouseLeaveDelay:S,visible:se,builtinPlacements:ne,arrow:!!r,overlayClassName:pe,prefixCls:A,getPopupContainer:u||_,transitionName:Q,trigger:B,overlay:ce,placement:E,onVisibleChange:le,overlayStyle:Object.assign(Object.assign(Object.assign({},R==null?void 0:R.style),h),{zIndex:ue}),autoDestroy:w??P}),H);return ue&&(J=y(kf.Provider,{value:j},J)),L(J)},Zj=Jw(Yf,"align",void 0,"dropdown",t=>t),qj=t=>y(Zj,Object.assign({},t),y("span",null));Yf._InternalPanelDoNotUseOrYouWillBeFired=qj;const Gj=["parentNode"],Yj="form_item";function $l(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function eP(t,e){if(!t.length)return;const n=t.join("_");return e?`${e}_${n}`:Gj.includes(n)?`${Yj}_${n}`:n}function tP(t,e,n,r,i,o){let a=r;return o!==void 0?a=o:n.validating?a="validating":t.length?a="error":e.length?a="warning":(n.touched||i&&n.validated)&&(a="success"),a}var Uj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);it??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:i=>o=>{const a=o1(i);o?n.current[a]=o:delete n.current[a]}},scrollToField:(i,o={})=>{const{focus:a}=o,s=Uj(o,["focus"]),l=a1(i,r);l&&(B5(l,Object.assign({scrollMode:"if-needed",block:"nearest"},s)),a&&r.focusField(i))},focusField:i=>{var o,a;const s=r.getFieldInstance(i);typeof(s==null?void 0:s.focus)=="function"?s.focus():(a=(o=a1(i,r))===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o)},getFieldInstance:i=>{const o=o1(i);return n.current[o]}}),[t,e]);return[r]}function Uf(t){return kt(t,{inputAffixPadding:t.paddingXXS})}const Kf=t=>{const{controlHeight:e,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:p,controlOutlineWidth:m,controlOutline:g,colorErrorOutline:v,colorWarningOutline:O,colorBgContainer:S,inputFontSize:C,inputFontSizeLG:b,inputFontSizeSM:x}=t,$=C||n,w=x||$,P=b||s,_=Math.round((e-$*r)/2*10)/10-i,T=Math.round((o-w*r)/2*10)/10-i,k=Math.ceil((a-P*l)/2*10)/10-i;return{paddingBlock:Math.max(_,0),paddingBlockSM:Math.max(T,0),paddingBlockLG:Math.max(k,0),paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:p,hoverBorderColor:h,activeShadow:`0 0 0 ${m}px ${g}`,errorActiveShadow:`0 0 0 ${m}px ${v}`,warningActiveShadow:`0 0 0 ${m}px ${O}`,hoverBg:S,activeBg:S,inputFontSize:$,inputFontSizeLG:P,inputFontSizeSM:w}},Kj=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),$0=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Kj(kt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),rP=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),s1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},rP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),Jj=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},rP(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},$0(t))}),s1(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),s1(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),l1=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),eD=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},l1(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),l1(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},$0(t))}})}),tD=(t,e)=>{const{componentCls:n}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},iP=(t,e)=>{var n;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=e==null?void 0:e.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},c1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},iP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),nD=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},iP(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},$0(t))}),c1(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),c1(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),u1=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),rD=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},u1(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),u1(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),oP=(t,e)=>({background:t.colorBgContainer,borderWidth:`${q(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.activeBorderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),d1=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},oP(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),iD=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oP(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),d1(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),d1(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),oD=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),aP=t=>{const{paddingBlockLG:e,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=t;return{padding:`${q(e)} ${q(i)}`,fontSize:t.inputFontSizeLG,lineHeight:n,borderRadius:r}},sP=t=>({padding:`${q(t.paddingBlockSM)} ${q(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),lP=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${q(t.paddingBlock)} ${q(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},oD(t.colorTextPlaceholder)),{"&-lg":Object.assign({},aP(t)),"&-sm":Object.assign({},sP(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),aD=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},aP(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},sP(t)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${q(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${q(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${q(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${q(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${q(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},zo()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` & > ${e}-affix-wrapper, & > ${e}-number-affix-wrapper, & > ${n}-picker-range @@ -243,9 +243,9 @@ html body { & > ${n}-cascader-picker:last-child ${e}, & > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}})}},sD=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:r,calc:i}=t,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),lP(t)),Jj(t)),nD(t)),tD(t)),iD(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},lD=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:t.colorIcon},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${q(t.inputAffixPadding)}`}}}},cD=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=t,l=`${e}-affix-wrapper`,c=`${e}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},lP(t)),{display:"inline-flex",[`&:not(${e}-disabled):hover`]:{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),lD(t)),{[`${s}${e}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${e}-underlined`]:{borderRadius:0},[c]:{[`${s}${e}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},uD=t=>{const{componentCls:e,borderRadiusLG:n,borderRadiusSM:r}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},wn(t)),aD(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:n,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:r}}},eD(t)),rD(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},dD=t=>{const{componentCls:e,antCls:n}=t,r=`${e}-search`;return{[r]:{[e]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${e}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{height:t.controlHeight,borderRadius:0},[`${e}-lg`]:{lineHeight:t.calc(t.lineHeightLG).sub(2e-4).equal()},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:t.colorTextDescription,"&:not([disabled]):hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightLG}},"&-small":{[`${e}-affix-wrapper, ${r}-button`]:{height:t.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button, > ${e}, - ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},fD=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},cP=Zt(["Input","Shared"],t=>{const e=kt(t,Gf(t));return[sD(e),cD(e)]},Yf,{resetFont:!1}),uP=Zt(["Input","Component"],t=>{const e=kt(t,Gf(t));return[uD(e),dD(e),fD(e),Yv(e)]},Yf,{resetFont:!1});var hD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},pD=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:hD}))},ea=Se(pD);const Uf=bt(null);var mD=function(e){var n=e.activeTabOffset,r=e.horizontal,i=e.rtl,o=e.indicator,a=o===void 0?{}:o,s=a.size,l=a.align,c=l===void 0?"center":l,u=J(),d=ae(u,2),f=d[0],h=d[1],p=U(),m=oe.useCallback(function(v){return typeof s=="function"?s(v):typeof s=="number"?s:v},[s]);function g(){Xt.cancel(p.current)}return be(function(){var v={};if(n)if(r){v.width=m(n.width);var O=i?"right":"left";c==="start"&&(v[O]=n[O]),c==="center"&&(v[O]=n[O]+n.width/2,v.transform=i?"translateX(50%)":"translateX(-50%)"),c==="end"&&(v[O]=n[O]+n.width,v.transform="translateX(-100%)")}else v.height=m(n.height),c==="start"&&(v.top=n.top),c==="center"&&(v.top=n.top+n.height/2,v.transform="translateY(-50%)"),c==="end"&&(v.top=n.top+n.height,v.transform="translateY(-100%)");return g(),p.current=Xt(function(){var S=f&&v&&Object.keys(v).every(function(x){var b=v[x],C=f[x];return typeof b=="number"&&typeof C=="number"?Math.round(b)===Math.round(C):b===C});S||h(v)}),g},[JSON.stringify(n),r,i,c,m]),{style:f}},d1={width:0,height:0,left:0,top:0};function gD(t,e,n){return ge(function(){for(var r,i=new Map,o=e.get((r=t[0])===null||r===void 0?void 0:r.key)||d1,a=o.left+o.width,s=0;sI?(R=_,C.current="x"):(R=T,C.current="y"),e(-R,-R)&&P.preventDefault()}var w=U(null);w.current={onTouchStart:S,onTouchMove:x,onTouchEnd:b,onWheel:$},be(function(){function P(k){w.current.onTouchStart(k)}function _(k){w.current.onTouchMove(k)}function T(k){w.current.onTouchEnd(k)}function R(k){w.current.onWheel(k)}return document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",T,{passive:!0}),t.current.addEventListener("touchstart",P,{passive:!0}),t.current.addEventListener("wheel",R,{passive:!1}),function(){document.removeEventListener("touchmove",_),document.removeEventListener("touchend",T)}},[])}function dP(t){var e=J(0),n=ae(e,2),r=n[0],i=n[1],o=U(0),a=U();return a.current=t,tm(function(){var s;(s=a.current)===null||s===void 0||s.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function bD(t){var e=U([]),n=J({}),r=ae(n,2),i=r[1],o=U(typeof t=="function"?t():t),a=dP(function(){var l=o.current;e.current.forEach(function(c){l=c(l)}),e.current=[],o.current=l,i({})});function s(l){e.current.push(l),a()}return[o.current,s]}var m1={width:0,height:0,left:0,top:0,right:0};function yD(t,e,n,r,i,o,a){var s=a.tabs,l=a.tabPosition,c=a.rtl,u,d,f;return["top","bottom"].includes(l)?(u="width",d=c?"right":"left",f=Math.abs(n)):(u="height",d="top",f=-n),ge(function(){if(!s.length)return[0,0];for(var h=s.length,p=h,m=0;mMath.floor(f+e)){p=m-1;break}}for(var v=0,O=h-1;O>=0;O-=1){var S=t.get(s[O].key)||m1;if(S[d]p?[0,-1]:[v,p]},[t,e,r,i,o,f,l,s.map(function(h){return h.key}).join("_"),c])}function g1(t){var e;return t instanceof Map?(e={},t.forEach(function(n,r){e[r]=n})):e=t,JSON.stringify(e)}var SD="TABS_DQ";function fP(t){return String(t).replace(/"/g,SD)}function $0(t,e,n,r){return!(!n||r||t===!1||t===void 0&&(e===!1||e===null))}var hP=Se(function(t,e){var n=t.prefixCls,r=t.editable,i=t.locale,o=t.style;return!r||r.showAdd===!1?null:y("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(s){r.onEdit("add",{event:s})}},r.addIcon||"+")}),v1=Se(function(t,e){var n=t.position,r=t.prefixCls,i=t.extra;if(!i)return null;var o,a={};return Je(i)==="object"&&!Kt(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?y("div",{className:"".concat(r,"-extra-content"),ref:e},o):null}),xD=Se(function(t,e){var n=t.prefixCls,r=t.id,i=t.tabs,o=t.locale,a=t.mobile,s=t.more,l=s===void 0?{}:s,c=t.style,u=t.className,d=t.editable,f=t.tabBarGutter,h=t.rtl,p=t.removeAriaLabel,m=t.onTabClick,g=t.getPopupContainer,v=t.popupClassName,O=J(!1),S=ae(O,2),x=S[0],b=S[1],C=J(null),$=ae(C,2),w=$[0],P=$[1],_=l.icon,T=_===void 0?"More":_,R="".concat(r,"-more-popup"),k="".concat(n,"-dropdown"),I=w!==null?"".concat(R,"-").concat(w):null,Q=o==null?void 0:o.dropdownAriaLabel;function M(V,X){V.preventDefault(),V.stopPropagation(),d.onEdit("remove",{key:X,event:V})}var E=y(Fs,{onClick:function(X){var B=X.key,G=X.domEvent;m(B,G),b(!1)},prefixCls:"".concat(k,"-menu"),id:R,tabIndex:-1,role:"listbox","aria-activedescendant":I,selectedKeys:[w],"aria-label":Q!==void 0?Q:"expanded dropdown"},i.map(function(V){var X=V.closable,B=V.disabled,G=V.closeIcon,se=V.key,re=V.label,le=$0(X,G,d,B);return y(Tc,{key:se,id:"".concat(R,"-").concat(se),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(se),disabled:B},y("span",null,re),le&&y("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:"".concat(k,"-menu-item-remove"),onClick:function(ie){ie.stopPropagation(),M(ie,se)}},G||d.removeIcon||"×"))}));function N(V){for(var X=i.filter(function(le){return!le.disabled}),B=X.findIndex(function(le){return le.key===w})||0,G=X.length,se=0;seGe?"left":"right"})}),k=ae(R,2),I=k[0],Q=k[1],M=f1(0,function(Ue,Ge){!T&&m&&m({direction:Ue>Ge?"top":"bottom"})}),E=ae(M,2),N=E[0],z=E[1],L=J([0,0]),F=ae(L,2),H=F[0],V=F[1],X=J([0,0]),B=ae(X,2),G=B[0],se=B[1],re=J([0,0]),le=ae(re,2),me=le[0],ie=le[1],ne=J([0,0]),ue=ae(ne,2),de=ue[0],j=ue[1],ee=bD(new Map),he=ae(ee,2),ve=he[0],Y=he[1],ce=gD(S,ve,G[0]),te=ou(H,T),Oe=ou(G,T),ye=ou(me,T),pe=ou(de,T),Qe=Math.floor(te)Ie?Ie:Ue}var Ye=U(null),lt=J(),Be=ae(lt,2),ke=Be[0],Xe=Be[1];function _e(){Xe(Date.now())}function Pe(){Ye.current&&clearTimeout(Ye.current)}OD($,function(Ue,Ge){function ft(It,zt){It(function(Vt){var dn=rt(Vt+zt);return dn})}return Qe?(T?ft(Q,Ue):ft(z,Ge),Pe(),_e(),!0):!1}),be(function(){return Pe(),ke&&(Ye.current=setTimeout(function(){Xe(0)},100)),Pe},[ke]);var ct=yD(ce,Me,T?I:N,Oe,ye,pe,W(W({},t),{},{tabs:S})),xt=ae(ct,2),Pn=xt[0],qt=xt[1],xn=pn(function(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Ge=ce.get(Ue)||{width:0,height:0,left:0,right:0,top:0};if(T){var ft=I;s?Ge.rightI+Me&&(ft=Ge.right+Ge.width-Me):Ge.left<-I?ft=-Ge.left:Ge.left+Ge.width>-I+Me&&(ft=-(Ge.left+Ge.width-Me)),z(0),Q(rt(ft))}else{var It=N;Ge.top<-N?It=-Ge.top:Ge.top+Ge.height>-N+Me&&(It=-(Ge.top+Ge.height-Me)),Q(0),z(rt(It))}}),gn=J(),Bt=ae(gn,2),Ot=Bt[0],ht=Bt[1],et=J(!1),nt=ae(et,2),Re=nt[0],ot=nt[1],dt=S.filter(function(Ue){return!Ue.disabled}).map(function(Ue){return Ue.key}),Ee=function(Ge){var ft=dt.indexOf(Ot||a),It=dt.length,zt=(ft+Ge+It)%It,Vt=dt[zt];ht(Vt)},Ze=function(Ge,ft){var It=dt.indexOf(Ge),zt=S.find(function(dn){return dn.key===Ge}),Vt=$0(zt==null?void 0:zt.closable,zt==null?void 0:zt.closeIcon,c,zt==null?void 0:zt.disabled);Vt&&(ft.preventDefault(),ft.stopPropagation(),c.onEdit("remove",{key:Ge,event:ft}),It===dt.length-1?Ee(-1):Ee(1))},Ae=function(Ge,ft){ot(!0),ft.button===1&&Ze(Ge,ft)},We=function(Ge){var ft=Ge.code,It=s&&T,zt=dt[0],Vt=dt[dt.length-1];switch(ft){case"ArrowLeft":{T&&Ee(It?1:-1);break}case"ArrowRight":{T&&Ee(It?-1:1);break}case"ArrowUp":{Ge.preventDefault(),T||Ee(-1);break}case"ArrowDown":{Ge.preventDefault(),T||Ee(1);break}case"Home":{Ge.preventDefault(),ht(zt);break}case"End":{Ge.preventDefault(),ht(Vt);break}case"Enter":case"Space":{Ge.preventDefault(),p(Ot??a,Ge);break}case"Backspace":case"Delete":{Ze(Ot,Ge);break}}},st={};T?st[s?"marginRight":"marginLeft"]=f:st.marginTop=f;var tt=S.map(function(Ue,Ge){var ft=Ue.key;return y($D,{id:i,prefixCls:O,key:ft,tab:Ue,style:Ge===0?void 0:st,closable:Ue.closable,editable:c,active:ft===a,focus:ft===Ot,renderWrapper:h,removeAriaLabel:u==null?void 0:u.removeAriaLabel,tabCount:dt.length,currentPosition:Ge+1,onClick:function(zt){p(ft,zt)},onKeyDown:We,onFocus:function(){Re||ht(ft),xn(ft),_e(),$.current&&(s||($.current.scrollLeft=0),$.current.scrollTop=0)},onBlur:function(){ht(void 0)},onMouseDown:function(zt){return Ae(ft,zt)},onMouseUp:function(){ot(!1)}})}),Ct=function(){return Y(function(){var Ge,ft=new Map,It=(Ge=w.current)===null||Ge===void 0?void 0:Ge.getBoundingClientRect();return S.forEach(function(zt){var Vt,dn=zt.key,Br=(Vt=w.current)===null||Vt===void 0?void 0:Vt.querySelector('[data-node-key="'.concat(fP(dn),'"]'));if(Br){var wr=wD(Br,It),Pr=ae(wr,4),_r=Pr[0],qn=Pr[1],Tr=Pr[2],kr=Pr[3];ft.set(dn,{width:_r,height:qn,left:Tr,top:kr})}}),ft})};be(function(){Ct()},[S.map(function(Ue){return Ue.key}).join("_")]);var $t=dP(function(){var Ue=Wa(x),Ge=Wa(b),ft=Wa(C);V([Ue[0]-Ge[0]-ft[0],Ue[1]-Ge[1]-ft[1]]);var It=Wa(_);ie(It);var zt=Wa(P);j(zt);var Vt=Wa(w);se([Vt[0]-It[0],Vt[1]-It[1]]),Ct()}),wt=S.slice(0,Pn),Mt=S.slice(qt+1),vn=[].concat($e(wt),$e(Mt)),un=ce.get(a),Cn=mD({activeTabOffset:un,horizontal:T,indicator:g,rtl:s}),Ln=Cn.style;be(function(){xn()},[a,we,Ie,g1(un),g1(ce),T]),be(function(){$t()},[s]);var Ut=!!vn.length,nn="".concat(O,"-nav-wrap"),Te,Le,pt,yt;return T?s?(Le=I>0,Te=I!==Ie):(Te=I<0,Le=I!==we):(pt=N<0,yt=N!==we),y(Kr,{onResize:$t},y("div",{ref:go(e,x),role:"tablist","aria-orientation":T?"horizontal":"vertical",className:Z("".concat(O,"-nav"),n),style:r,onKeyDown:function(){_e()}},y(v1,{ref:b,position:"left",extra:l,prefixCls:O}),y(Kr,{onResize:$t},y("div",{className:Z(nn,D(D(D(D({},"".concat(nn,"-ping-left"),Te),"".concat(nn,"-ping-right"),Le),"".concat(nn,"-ping-top"),pt),"".concat(nn,"-ping-bottom"),yt)),ref:$},y(Kr,{onResize:$t},y("div",{ref:w,className:"".concat(O,"-nav-list"),style:{transform:"translate(".concat(I,"px, ").concat(N,"px)"),transition:ke?"none":void 0}},tt,y(hP,{ref:_,prefixCls:O,locale:u,editable:c,style:W(W({},tt.length===0?void 0:st),{},{visibility:Ut?"hidden":null})}),y("div",{className:Z("".concat(O,"-ink-bar"),D({},"".concat(O,"-ink-bar-animated"),o.inkBar)),style:Ln}))))),y(CD,Ce({},t,{removeAriaLabel:u==null?void 0:u.removeAriaLabel,ref:P,prefixCls:O,tabs:vn,className:!Ut&&De,tabMoving:!!ke})),y(v1,{ref:C,position:"right",extra:l,prefixCls:O})))}),pP=Se(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.id,a=t.active,s=t.tabKey,l=t.children;return y("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:i,className:Z(n,a&&"".concat(n,"-active"),r),ref:e},l)}),PD=["renderTabBar"],_D=["label","key"],TD=function(e){var n=e.renderTabBar,r=ut(e,PD),i=fe(Uf),o=i.tabs;if(n){var a=W(W({},r),{},{panes:o.map(function(s){var l=s.label,c=s.key,u=ut(s,_D);return y(pP,Ce({tab:l,key:c,tabKey:c},u))})});return n(a,O1)}return y(O1,r)},kD=["key","forceRender","style","className","destroyInactiveTabPane"],RD=function(e){var n=e.id,r=e.activeKey,i=e.animated,o=e.tabPosition,a=e.destroyInactiveTabPane,s=fe(Uf),l=s.prefixCls,c=s.tabs,u=i.tabPane,d="".concat(l,"-tabpane");return y("div",{className:Z("".concat(l,"-content-holder"))},y("div",{className:Z("".concat(l,"-content"),"".concat(l,"-content-").concat(o),D({},"".concat(l,"-content-animated"),u))},c.map(function(f){var h=f.key,p=f.forceRender,m=f.style,g=f.className,v=f.destroyInactiveTabPane,O=ut(f,kD),S=h===r;return y(pi,Ce({key:h,visible:S,forceRender:p,removeOnLeave:!!(a||v),leavedClassName:"".concat(d,"-hidden")},i.tabPaneMotion),function(x,b){var C=x.style,$=x.className;return y(pP,Ce({},O,{prefixCls:d,id:n,tabKey:h,animated:u,active:S,style:W(W({},m),C),className:Z(g,$),ref:b}))})})))};function ID(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},e;return t===!1?e={inkBar:!1,tabPane:!1}:t===!0?e={inkBar:!0,tabPane:!1}:e=W({inkBar:!0},Je(t)==="object"?t:{}),e.tabPaneMotion&&e.tabPane===void 0&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}var MD=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],b1=0,ED=Se(function(t,e){var n=t.id,r=t.prefixCls,i=r===void 0?"rc-tabs":r,o=t.className,a=t.items,s=t.direction,l=t.activeKey,c=t.defaultActiveKey,u=t.editable,d=t.animated,f=t.tabPosition,h=f===void 0?"top":f,p=t.tabBarGutter,m=t.tabBarStyle,g=t.tabBarExtraContent,v=t.locale,O=t.more,S=t.destroyInactiveTabPane,x=t.renderTabBar,b=t.onChange,C=t.onTabClick,$=t.onTabScroll,w=t.getPopupContainer,P=t.popupClassName,_=t.indicator,T=ut(t,MD),R=ge(function(){return(a||[]).filter(function(de){return de&&Je(de)==="object"&&"key"in de})},[a]),k=s==="rtl",I=ID(d),Q=J(!1),M=ae(Q,2),E=M[0],N=M[1];be(function(){N(o0())},[]);var z=_n(function(){var de;return(de=R[0])===null||de===void 0?void 0:de.key},{value:l,defaultValue:c}),L=ae(z,2),F=L[0],H=L[1],V=J(function(){return R.findIndex(function(de){return de.key===F})}),X=ae(V,2),B=X[0],G=X[1];be(function(){var de=R.findIndex(function(ee){return ee.key===F});if(de===-1){var j;de=Math.max(0,Math.min(B,R.length-1)),H((j=R[de])===null||j===void 0?void 0:j.key)}G(de)},[R.map(function(de){return de.key}).join("_"),F,B]);var se=_n(null,{value:n}),re=ae(se,2),le=re[0],me=re[1];be(function(){n||(me("rc-tabs-".concat(b1)),b1+=1)},[]);function ie(de,j){C==null||C(de,j);var ee=de!==F;H(de),ee&&(b==null||b(de))}var ne={id:le,activeKey:F,animated:I,tabPosition:h,rtl:k,mobile:E},ue=W(W({},ne),{},{editable:u,locale:v,more:O,tabBarGutter:p,onTabClick:ie,onTabScroll:$,extra:g,style:m,panes:null,getPopupContainer:w,popupClassName:P,indicator:_});return y(Uf.Provider,{value:{tabs:R,prefixCls:i}},y("div",Ce({ref:e,id:n,className:Z(i,"".concat(i,"-").concat(h),D(D(D({},"".concat(i,"-mobile"),E),"".concat(i,"-editable"),u),"".concat(i,"-rtl"),k),o)},T),y(TD,Ce({},ue,{renderTabBar:x})),y(RD,Ce({destroyInactiveTabPane:S},ne,{animated:I}))))});const AD={motionAppear:!1,motionEnter:!0,motionLeave:!0};function QD(t,e={inkBar:!0,tabPane:!1}){let n;return e===!1?n={inkBar:!1,tabPane:!1}:e===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof e=="object"?e:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},AD),{motionName:zo(t,"switch")})),n}var ND=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie)}function LD(t,e){if(t)return t.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=nr(e).map(r=>{if(Kt(r)){const{key:i,props:o}=r,a=o||{},{tab:s}=a,l=ND(a,["tab"]);return Object.assign(Object.assign({key:String(i)},l),{label:s})}return null});return zD(n)}const jD=t=>{const{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[Lo(t,"slide-up"),Lo(t,"slide-down")]]},DD=t=>{const{componentCls:e,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:n,background:r,border:`${q(t.lineWidth)} ${t.lineType} ${o}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:a,background:t.colorBgContainer},[`${e}-tab-focus:has(${e}-tab-btn:focus-visible)`]:wf(t,-3),[`& ${e}-tab${e}-tab-focus ${e}-tab-btn:focus-visible`]:{outline:"none"},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:q(i)}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:q(i)}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${q(t.borderRadiusLG)} 0 0 ${q(t.borderRadiusLG)}`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},BD=t=>{const{componentCls:e,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=t;return{[`${e}-dropdown`]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${q(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Object.assign(Object.assign({},ba),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${q(t.paddingXXS)} ${q(t.paddingSM)}`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},WD=t=>{const{componentCls:e,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:s}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${q(t.lineWidth)} ${t.lineType} ${r}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:`width ${t.motionDurationSlow}, left ${t.motionDurationSlow}, + ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},fD=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},cP=Zt(["Input","Shared"],t=>{const e=kt(t,Uf(t));return[sD(e),cD(e)]},Kf,{resetFont:!1}),uP=Zt(["Input","Component"],t=>{const e=kt(t,Uf(t));return[uD(e),dD(e),fD(e),Uv(e)]},Kf,{resetFont:!1});var hD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},pD=function(e,n){return y(Rt,xe({},e,{ref:n,icon:hD}))},$o=ye(pD);const Jf=yt(null);var mD=function(e){var n=e.activeTabOffset,r=e.horizontal,i=e.rtl,o=e.indicator,a=o===void 0?{}:o,s=a.size,l=a.align,c=l===void 0?"center":l,u=K(),d=ae(u,2),f=d[0],h=d[1],p=Y(),m=oe.useCallback(function(v){return typeof s=="function"?s(v):typeof s=="number"?s:v},[s]);function g(){Xt.cancel(p.current)}return be(function(){var v={};if(n)if(r){v.width=m(n.width);var O=i?"right":"left";c==="start"&&(v[O]=n[O]),c==="center"&&(v[O]=n[O]+n.width/2,v.transform=i?"translateX(50%)":"translateX(-50%)"),c==="end"&&(v[O]=n[O]+n.width,v.transform="translateX(-100%)")}else v.height=m(n.height),c==="start"&&(v.top=n.top),c==="center"&&(v.top=n.top+n.height/2,v.transform="translateY(-50%)"),c==="end"&&(v.top=n.top+n.height,v.transform="translateY(-100%)");return g(),p.current=Xt(function(){var S=f&&v&&Object.keys(v).every(function(C){var b=v[C],x=f[C];return typeof b=="number"&&typeof x=="number"?Math.round(b)===Math.round(x):b===x});S||h(v)}),g},[JSON.stringify(n),r,i,c,m]),{style:f}},f1={width:0,height:0,left:0,top:0};function gD(t,e,n){return me(function(){for(var r,i=new Map,o=e.get((r=t[0])===null||r===void 0?void 0:r.key)||f1,a=o.left+o.width,s=0;sI?(k=_,x.current="x"):(k=T,x.current="y"),e(-k,-k)&&P.preventDefault()}var w=Y(null);w.current={onTouchStart:S,onTouchMove:C,onTouchEnd:b,onWheel:$},be(function(){function P(R){w.current.onTouchStart(R)}function _(R){w.current.onTouchMove(R)}function T(R){w.current.onTouchEnd(R)}function k(R){w.current.onWheel(R)}return document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",T,{passive:!0}),t.current.addEventListener("touchstart",P,{passive:!0}),t.current.addEventListener("wheel",k,{passive:!1}),function(){document.removeEventListener("touchmove",_),document.removeEventListener("touchend",T)}},[])}function dP(t){var e=K(0),n=ae(e,2),r=n[0],i=n[1],o=Y(0),a=Y();return a.current=t,rm(function(){var s;(s=a.current)===null||s===void 0||s.call(a)},[r]),function(){o.current===r&&(o.current+=1,i(o.current))}}function bD(t){var e=Y([]),n=K({}),r=ae(n,2),i=r[1],o=Y(typeof t=="function"?t():t),a=dP(function(){var l=o.current;e.current.forEach(function(c){l=c(l)}),e.current=[],o.current=l,i({})});function s(l){e.current.push(l),a()}return[o.current,s]}var g1={width:0,height:0,left:0,top:0,right:0};function yD(t,e,n,r,i,o,a){var s=a.tabs,l=a.tabPosition,c=a.rtl,u,d,f;return["top","bottom"].includes(l)?(u="width",d=c?"right":"left",f=Math.abs(n)):(u="height",d="top",f=-n),me(function(){if(!s.length)return[0,0];for(var h=s.length,p=h,m=0;mMath.floor(f+e)){p=m-1;break}}for(var v=0,O=h-1;O>=0;O-=1){var S=t.get(s[O].key)||g1;if(S[d]p?[0,-1]:[v,p]},[t,e,r,i,o,f,l,s.map(function(h){return h.key}).join("_"),c])}function v1(t){var e;return t instanceof Map?(e={},t.forEach(function(n,r){e[r]=n})):e=t,JSON.stringify(e)}var SD="TABS_DQ";function fP(t){return String(t).replace(/"/g,SD)}function w0(t,e,n,r){return!(!n||r||t===!1||t===void 0&&(e===!1||e===null))}var hP=ye(function(t,e){var n=t.prefixCls,r=t.editable,i=t.locale,o=t.style;return!r||r.showAdd===!1?null:y("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(s){r.onEdit("add",{event:s})}},r.addIcon||"+")}),O1=ye(function(t,e){var n=t.position,r=t.prefixCls,i=t.extra;if(!i)return null;var o,a={};return tt(i)==="object"&&!Jt(i)?a=i:a.right=i,n==="right"&&(o=a.right),n==="left"&&(o=a.left),o?y("div",{className:"".concat(r,"-extra-content"),ref:e},o):null}),xD=ye(function(t,e){var n=t.prefixCls,r=t.id,i=t.tabs,o=t.locale,a=t.mobile,s=t.more,l=s===void 0?{}:s,c=t.style,u=t.className,d=t.editable,f=t.tabBarGutter,h=t.rtl,p=t.removeAriaLabel,m=t.onTabClick,g=t.getPopupContainer,v=t.popupClassName,O=K(!1),S=ae(O,2),C=S[0],b=S[1],x=K(null),$=ae(x,2),w=$[0],P=$[1],_=l.icon,T=_===void 0?"More":_,k="".concat(r,"-more-popup"),R="".concat(n,"-dropdown"),I=w!==null?"".concat(k,"-").concat(w):null,Q=o==null?void 0:o.dropdownAriaLabel;function E(F,H){F.preventDefault(),F.stopPropagation(),d.onEdit("remove",{key:H,event:F})}var A=y(Fs,{onClick:function(H){var B=H.key,G=H.domEvent;m(B,G),b(!1)},prefixCls:"".concat(R,"-menu"),id:k,tabIndex:-1,role:"listbox","aria-activedescendant":I,selectedKeys:[w],"aria-label":Q!==void 0?Q:"expanded dropdown"},i.map(function(F){var H=F.closable,B=F.disabled,G=F.closeIcon,se=F.key,ie=F.label,le=w0(H,G,d,B);return y(Tc,{key:se,id:"".concat(k,"-").concat(se),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(se),disabled:B},y("span",null,ie),le&&y("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:"".concat(R,"-menu-item-remove"),onClick:function(ne){ne.stopPropagation(),E(ne,se)}},G||d.removeIcon||"×"))}));function N(F){for(var H=i.filter(function(le){return!le.disabled}),B=H.findIndex(function(le){return le.key===w})||0,G=H.length,se=0;seUe?"left":"right"})}),R=ae(k,2),I=R[0],Q=R[1],E=h1(0,function(Je,Ue){!T&&m&&m({direction:Je>Ue?"top":"bottom"})}),A=ae(E,2),N=A[0],L=A[1],z=K([0,0]),V=ae(z,2),X=V[0],F=V[1],H=K([0,0]),B=ae(H,2),G=B[0],se=B[1],ie=K([0,0]),le=ae(ie,2),pe=le[0],ne=le[1],ee=K([0,0]),ce=ae(ee,2),ue=ce[0],j=ce[1],J=bD(new Map),he=ae(J,2),ge=he[0],$e=he[1],Te=gD(S,ge,G[0]),Ce=ou(X,T),Ie=ou(G,T),_e=ou(pe,T),ve=ou(ue,T),Ne=Math.floor(Ce)te?te:Je}var we=Y(null),Ke=K(),Ae=ae(Ke,2),Me=Ae[0],Fe=Ae[1];function Re(){Fe(Date.now())}function ke(){we.current&&clearTimeout(we.current)}OD($,function(Je,Ue){function ht(It,zt){It(function(Vt){var dn=Oe(Vt+zt);return dn})}return Ne?(T?ht(Q,Je):ht(L,Ue),ke(),Re(),!0):!1}),be(function(){return ke(),Me&&(we.current=setTimeout(function(){Fe(0)},100)),ke},[Me]);var ot=yD(Te,ze,T?I:N,Ie,_e,ve,W(W({},t),{},{tabs:S})),ut=ae(ot,2),Pn=ut[0],qt=ut[1],xn=pn(function(){var Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Ue=Te.get(Je)||{width:0,height:0,left:0,right:0,top:0};if(T){var ht=I;s?Ue.rightI+ze&&(ht=Ue.right+Ue.width-ze):Ue.left<-I?ht=-Ue.left:Ue.left+Ue.width>-I+ze&&(ht=-(Ue.left+Ue.width-ze)),L(0),Q(Oe(ht))}else{var It=N;Ue.top<-N?It=-Ue.top:Ue.top+Ue.height>-N+ze&&(It=-(Ue.top+Ue.height-ze)),Q(0),L(Oe(It))}}),gn=K(),Bt=ae(gn,2),bt=Bt[0],pt=Bt[1],nt=K(!1),it=ae(nt,2),Qe=it[0],st=it[1],ft=S.filter(function(Je){return!Je.disabled}).map(function(Je){return Je.key}),Le=function(Ue){var ht=ft.indexOf(bt||a),It=ft.length,zt=(ht+Ue+It)%It,Vt=ft[zt];pt(Vt)},Ge=function(Ue,ht){var It=ft.indexOf(Ue),zt=S.find(function(dn){return dn.key===Ue}),Vt=w0(zt==null?void 0:zt.closable,zt==null?void 0:zt.closeIcon,c,zt==null?void 0:zt.disabled);Vt&&(ht.preventDefault(),ht.stopPropagation(),c.onEdit("remove",{key:Ue,event:ht}),It===ft.length-1?Le(-1):Le(1))},je=function(Ue,ht){st(!0),ht.button===1&&Ge(Ue,ht)},He=function(Ue){var ht=Ue.code,It=s&&T,zt=ft[0],Vt=ft[ft.length-1];switch(ht){case"ArrowLeft":{T&&Le(It?1:-1);break}case"ArrowRight":{T&&Le(It?-1:1);break}case"ArrowUp":{Ue.preventDefault(),T||Le(-1);break}case"ArrowDown":{Ue.preventDefault(),T||Le(1);break}case"Home":{Ue.preventDefault(),pt(zt);break}case"End":{Ue.preventDefault(),pt(Vt);break}case"Enter":case"Space":{Ue.preventDefault(),p(bt??a,Ue);break}case"Backspace":case"Delete":{Ge(bt,Ue);break}}},ct={};T?ct[s?"marginRight":"marginLeft"]=f:ct.marginTop=f;var rt=S.map(function(Je,Ue){var ht=Je.key;return y($D,{id:i,prefixCls:O,key:ht,tab:Je,style:Ue===0?void 0:ct,closable:Je.closable,editable:c,active:ht===a,focus:ht===bt,renderWrapper:h,removeAriaLabel:u==null?void 0:u.removeAriaLabel,tabCount:ft.length,currentPosition:Ue+1,onClick:function(zt){p(ht,zt)},onKeyDown:He,onFocus:function(){Qe||pt(ht),xn(ht),Re(),$.current&&(s||($.current.scrollLeft=0),$.current.scrollTop=0)},onBlur:function(){pt(void 0)},onMouseDown:function(zt){return je(ht,zt)},onMouseUp:function(){st(!1)}})}),Ct=function(){return $e(function(){var Ue,ht=new Map,It=(Ue=w.current)===null||Ue===void 0?void 0:Ue.getBoundingClientRect();return S.forEach(function(zt){var Vt,dn=zt.key,Br=(Vt=w.current)===null||Vt===void 0?void 0:Vt.querySelector('[data-node-key="'.concat(fP(dn),'"]'));if(Br){var Pr=wD(Br,It),_r=ae(Pr,4),Tr=_r[0],Gn=_r[1],kr=_r[2],Rr=_r[3];ht.set(dn,{width:Tr,height:Gn,left:kr,top:Rr})}}),ht})};be(function(){Ct()},[S.map(function(Je){return Je.key}).join("_")]);var $t=dP(function(){var Je=Va(C),Ue=Va(b),ht=Va(x);F([Je[0]-Ue[0]-ht[0],Je[1]-Ue[1]-ht[1]]);var It=Va(_);ne(It);var zt=Va(P);j(zt);var Vt=Va(w);se([Vt[0]-It[0],Vt[1]-It[1]]),Ct()}),wt=S.slice(0,Pn),Mt=S.slice(qt+1),vn=[].concat(Pe(wt),Pe(Mt)),un=Te.get(a),Cn=mD({activeTabOffset:un,horizontal:T,indicator:g,rtl:s}),jn=Cn.style;be(function(){xn()},[a,fe,te,v1(un),v1(Te),T]),be(function(){$t()},[s]);var Ut=!!vn.length,rn="".concat(O,"-nav-wrap"),Ee,We,mt,St;return T?s?(We=I>0,Ee=I!==te):(Ee=I<0,We=I!==fe):(mt=N<0,St=N!==fe),y(Jr,{onResize:$t},y("div",{ref:go(e,C),role:"tablist","aria-orientation":T?"horizontal":"vertical",className:Z("".concat(O,"-nav"),n),style:r,onKeyDown:function(){Re()}},y(O1,{ref:b,position:"left",extra:l,prefixCls:O}),y(Jr,{onResize:$t},y("div",{className:Z(rn,D(D(D(D({},"".concat(rn,"-ping-left"),Ee),"".concat(rn,"-ping-right"),We),"".concat(rn,"-ping-top"),mt),"".concat(rn,"-ping-bottom"),St)),ref:$},y(Jr,{onResize:$t},y("div",{ref:w,className:"".concat(O,"-nav-list"),style:{transform:"translate(".concat(I,"px, ").concat(N,"px)"),transition:Me?"none":void 0}},rt,y(hP,{ref:_,prefixCls:O,locale:u,editable:c,style:W(W({},rt.length===0?void 0:ct),{},{visibility:Ut?"hidden":null})}),y("div",{className:Z("".concat(O,"-ink-bar"),D({},"".concat(O,"-ink-bar-animated"),o.inkBar)),style:jn}))))),y(CD,xe({},t,{removeAriaLabel:u==null?void 0:u.removeAriaLabel,ref:P,prefixCls:O,tabs:vn,className:!Ut&&re,tabMoving:!!Me})),y(O1,{ref:x,position:"right",extra:l,prefixCls:O})))}),pP=ye(function(t,e){var n=t.prefixCls,r=t.className,i=t.style,o=t.id,a=t.active,s=t.tabKey,l=t.children;return y("div",{id:o&&"".concat(o,"-panel-").concat(s),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(s),"aria-hidden":!a,style:i,className:Z(n,a&&"".concat(n,"-active"),r),ref:e},l)}),PD=["renderTabBar"],_D=["label","key"],TD=function(e){var n=e.renderTabBar,r=dt(e,PD),i=de(Jf),o=i.tabs;if(n){var a=W(W({},r),{},{panes:o.map(function(s){var l=s.label,c=s.key,u=dt(s,_D);return y(pP,xe({tab:l,key:c,tabKey:c},u))})});return n(a,b1)}return y(b1,r)},kD=["key","forceRender","style","className","destroyInactiveTabPane"],RD=function(e){var n=e.id,r=e.activeKey,i=e.animated,o=e.tabPosition,a=e.destroyInactiveTabPane,s=de(Jf),l=s.prefixCls,c=s.tabs,u=i.tabPane,d="".concat(l,"-tabpane");return y("div",{className:Z("".concat(l,"-content-holder"))},y("div",{className:Z("".concat(l,"-content"),"".concat(l,"-content-").concat(o),D({},"".concat(l,"-content-animated"),u))},c.map(function(f){var h=f.key,p=f.forceRender,m=f.style,g=f.className,v=f.destroyInactiveTabPane,O=dt(f,kD),S=h===r;return y(mi,xe({key:h,visible:S,forceRender:p,removeOnLeave:!!(a||v),leavedClassName:"".concat(d,"-hidden")},i.tabPaneMotion),function(C,b){var x=C.style,$=C.className;return y(pP,xe({},O,{prefixCls:d,id:n,tabKey:h,animated:u,active:S,style:W(W({},m),x),className:Z(g,$),ref:b}))})})))};function ID(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},e;return t===!1?e={inkBar:!1,tabPane:!1}:t===!0?e={inkBar:!0,tabPane:!1}:e=W({inkBar:!0},tt(t)==="object"?t:{}),e.tabPaneMotion&&e.tabPane===void 0&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(e.tabPane=!1),e}var MD=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],y1=0,ED=ye(function(t,e){var n=t.id,r=t.prefixCls,i=r===void 0?"rc-tabs":r,o=t.className,a=t.items,s=t.direction,l=t.activeKey,c=t.defaultActiveKey,u=t.editable,d=t.animated,f=t.tabPosition,h=f===void 0?"top":f,p=t.tabBarGutter,m=t.tabBarStyle,g=t.tabBarExtraContent,v=t.locale,O=t.more,S=t.destroyInactiveTabPane,C=t.renderTabBar,b=t.onChange,x=t.onTabClick,$=t.onTabScroll,w=t.getPopupContainer,P=t.popupClassName,_=t.indicator,T=dt(t,MD),k=me(function(){return(a||[]).filter(function(ue){return ue&&tt(ue)==="object"&&"key"in ue})},[a]),R=s==="rtl",I=ID(d),Q=K(!1),E=ae(Q,2),A=E[0],N=E[1];be(function(){N(a0())},[]);var L=_n(function(){var ue;return(ue=k[0])===null||ue===void 0?void 0:ue.key},{value:l,defaultValue:c}),z=ae(L,2),V=z[0],X=z[1],F=K(function(){return k.findIndex(function(ue){return ue.key===V})}),H=ae(F,2),B=H[0],G=H[1];be(function(){var ue=k.findIndex(function(J){return J.key===V});if(ue===-1){var j;ue=Math.max(0,Math.min(B,k.length-1)),X((j=k[ue])===null||j===void 0?void 0:j.key)}G(ue)},[k.map(function(ue){return ue.key}).join("_"),V,B]);var se=_n(null,{value:n}),ie=ae(se,2),le=ie[0],pe=ie[1];be(function(){n||(pe("rc-tabs-".concat(y1)),y1+=1)},[]);function ne(ue,j){x==null||x(ue,j);var J=ue!==V;X(ue),J&&(b==null||b(ue))}var ee={id:le,activeKey:V,animated:I,tabPosition:h,rtl:R,mobile:A},ce=W(W({},ee),{},{editable:u,locale:v,more:O,tabBarGutter:p,onTabClick:ne,onTabScroll:$,extra:g,style:m,panes:null,getPopupContainer:w,popupClassName:P,indicator:_});return y(Jf.Provider,{value:{tabs:k,prefixCls:i}},y("div",xe({ref:e,id:n,className:Z(i,"".concat(i,"-").concat(h),D(D(D({},"".concat(i,"-mobile"),A),"".concat(i,"-editable"),u),"".concat(i,"-rtl"),R),o)},T),y(TD,xe({},ce,{renderTabBar:C})),y(RD,xe({destroyInactiveTabPane:S},ee,{animated:I}))))});const AD={motionAppear:!1,motionEnter:!0,motionLeave:!0};function QD(t,e={inkBar:!0,tabPane:!1}){let n;return e===!1?n={inkBar:!1,tabPane:!1}:e===!0?n={inkBar:!0,tabPane:!0}:n=Object.assign({inkBar:!0},typeof e=="object"?e:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},AD),{motionName:Lo(t,"switch")})),n}var ND=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);ie)}function LD(t,e){if(t)return t.map(r=>{var i;const o=(i=r.destroyOnHidden)!==null&&i!==void 0?i:r.destroyInactiveTabPane;return Object.assign(Object.assign({},r),{destroyInactiveTabPane:o})});const n=rr(e).map(r=>{if(Jt(r)){const{key:i,props:o}=r,a=o||{},{tab:s}=a,l=ND(a,["tab"]);return Object.assign(Object.assign({key:String(i)},l),{label:s})}return null});return zD(n)}const jD=t=>{const{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[jo(t,"slide-up"),jo(t,"slide-down")]]},DD=t=>{const{componentCls:e,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:n,background:r,border:`${q(t.lineWidth)} ${t.lineType} ${o}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:a,background:t.colorBgContainer},[`${e}-tab-focus:has(${e}-tab-btn:focus-visible)`]:_f(t,-3),[`& ${e}-tab${e}-tab-focus ${e}-tab-btn:focus-visible`]:{outline:"none"},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:q(i)}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:q(i)}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${q(t.borderRadiusLG)} 0 0 ${q(t.borderRadiusLG)}`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},BD=t=>{const{componentCls:e,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=t;return{[`${e}-dropdown`]:Object.assign(Object.assign({},wn(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${q(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Object.assign(Object.assign({},Sa),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${q(t.paddingXXS)} ${q(t.paddingSM)}`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},WD=t=>{const{componentCls:e,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:s}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${q(t.lineWidth)} ${t.lineType} ${r}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:`width ${t.motionDurationSlow}, left ${t.motionDurationSlow}, right ${t.motionDurationSlow}`}},[`${e}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:t.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowRight},[`&${e}-nav-wrap-ping-left::before`]:{opacity:1},[`&${e}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${e}-top`]:{[`> ${e}-nav, - > div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:s(t.controlHeight).mul(1.25).equal(),[`${e}-tab`]:{padding:o,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:a},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:`height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:q(s(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},FD=t=>{const{componentCls:e,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:s}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:a,fontSize:t.titleFontSizeSM}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:s,fontSize:t.titleFontSizeLG,lineHeight:t.lineHeightLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:n},[`${e}-nav-add`]:{minWidth:i,minHeight:i}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${q(t.borderRadius)} ${q(t.borderRadius)}`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${q(t.borderRadius)} ${q(t.borderRadius)} 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${q(t.borderRadius)} ${q(t.borderRadius)} 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${q(t.borderRadius)} 0 0 ${q(t.borderRadius)}`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:r},[`${e}-nav-add`]:{minWidth:o,minHeight:o}}}}}},VD=t=>{const{componentCls:e,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:s,itemColor:l}=t,c=`${e}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${t.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:t.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},Ci(t)),"&:hover":{color:r},[`&${c}-active ${c}-btn`]:{color:s,textShadow:t.tabsActiveTextShadow},[`&${c}-focus ${c}-btn:focus-visible`]:wf(t),[`&${c}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${c}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:o}}}},HD=t=>{const{componentCls:e,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:n},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:q(t.marginSM)}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:q(t.marginXS)},marginLeft:{_skip_check_:!0,value:q(o(t.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},XD=t=>{const{componentCls:e,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:s}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} ${s}`,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},Ci(t,-3))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),VD(t)),{[`${e}-content`]:{position:"relative",width:"100%"},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:Object.assign(Object.assign({},Ci(t)),{"&-hidden":{display:"none"}})}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping']) > ${e}-nav-list`]:{margin:"auto"}}}}}},ZD=t=>{const{cardHeight:e,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=t,a=e||o,s=n||i,l=r||o+8;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:a,cardHeightSM:s,cardHeightLG:l,cardPadding:`${(a-t.fontHeight)/2-t.lineWidth}px ${t.padding}px`,cardPaddingSM:`${(s-t.fontHeight)/2-t.lineWidth}px ${t.paddingXS}px`,cardPaddingLG:`${(l-t.fontHeightLG)/2-t.lineWidth}px ${t.padding}px`,titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:`0 0 ${t.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${t.paddingSM}px 0`,horizontalItemPaddingSM:`${t.paddingXS}px 0`,horizontalItemPaddingLG:`${t.padding}px 0`,verticalItemPadding:`${t.paddingXS}px ${t.paddingLG}px`,verticalItemMargin:`${t.margin}px 0 0 0`,itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}},qD=Zt("Tabs",t=>{const e=kt(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${q(t.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${q(t.horizontalItemGutter)}`});return[FD(e),HD(e),WD(e),BD(e),DD(e),XD(e),jD(e)]},ZD),GD=()=>null;var YD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a,s,l,c,u,d,f;const{type:h,className:p,rootClassName:m,size:g,onEdit:v,hideAdd:O,centered:S,addIcon:x,removeIcon:b,moreIcon:C,more:$,popupClassName:w,children:P,items:_,animated:T,style:R,indicatorSize:k,indicator:I,destroyInactiveTabPane:Q,destroyOnHidden:M}=t,E=YD(t,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:N}=E,{direction:z,tabs:L,getPrefixCls:F,getPopupContainer:H}=fe(it),V=F("tabs",N),X=$r(V),[B,G,se]=qD(V,X),re=U(null);Yt(e,()=>({nativeElement:re.current}));let le;h==="editable-card"&&(le={onEdit:(ee,{key:he,event:ve})=>{v==null||v(ee==="add"?ve:he,ee)},removeIcon:(n=b??(L==null?void 0:L.removeIcon))!==null&&n!==void 0?n:y(Vi,null),addIcon:(x??(L==null?void 0:L.addIcon))||y(ea,null),showAdd:O!==!0});const me=F(),ie=Dr(g),ne=LD(_,P),ue=QD(V,T),de=Object.assign(Object.assign({},L==null?void 0:L.style),R),j={align:(r=I==null?void 0:I.align)!==null&&r!==void 0?r:(i=L==null?void 0:L.indicator)===null||i===void 0?void 0:i.align,size:(l=(a=(o=I==null?void 0:I.size)!==null&&o!==void 0?o:k)!==null&&a!==void 0?a:(s=L==null?void 0:L.indicator)===null||s===void 0?void 0:s.size)!==null&&l!==void 0?l:L==null?void 0:L.indicatorSize};return B(y(ED,Object.assign({ref:re,direction:z,getPopupContainer:H},E,{items:ne,className:Z({[`${V}-${ie}`]:ie,[`${V}-card`]:["card","editable-card"].includes(h),[`${V}-editable-card`]:h==="editable-card",[`${V}-centered`]:S},L==null?void 0:L.className,p,m,G,se,X),popupClassName:Z(w,G,se,X),style:de,editable:le,more:Object.assign({icon:(f=(d=(u=(c=L==null?void 0:L.more)===null||c===void 0?void 0:c.icon)!==null&&u!==void 0?u:L==null?void 0:L.moreIcon)!==null&&d!==void 0?d:C)!==null&&f!==void 0?f:y(x0,null),transitionName:`${me}-slide-up`},$),prefixCls:V,animated:ue,indicator:j,destroyInactiveTabPane:M??Q})))}),mP=UD;mP.TabPane=GD;var KD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,className:n,hoverable:r=!0}=t,i=KD(t,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=fe(it),a=o("card",e),s=Z(`${a}-grid`,n,{[`${a}-grid-hoverable`]:r});return y("div",Object.assign({},i,{className:s}))},JD=t=>{const{antCls:e,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:o}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${q(i)}`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`},No()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},ba),{[` + > div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:s(t.controlHeight).mul(1.25).equal(),[`${e}-tab`]:{padding:o,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:a},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:`height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:q(s(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},FD=t=>{const{componentCls:e,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:s}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:a,fontSize:t.titleFontSizeSM}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:s,fontSize:t.titleFontSizeLG,lineHeight:t.lineHeightLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:n},[`${e}-nav-add`]:{minWidth:i,minHeight:i}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${q(t.borderRadius)} ${q(t.borderRadius)}`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${q(t.borderRadius)} ${q(t.borderRadius)} 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${q(t.borderRadius)} ${q(t.borderRadius)} 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${q(t.borderRadius)} 0 0 ${q(t.borderRadius)}`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:r},[`${e}-nav-add`]:{minWidth:o,minHeight:o}}}}}},VD=t=>{const{componentCls:e,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:s,itemColor:l}=t,c=`${e}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${t.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:t.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},Ci(t)),"&:hover":{color:r},[`&${c}-active ${c}-btn`]:{color:s,textShadow:t.tabsActiveTextShadow},[`&${c}-focus ${c}-btn:focus-visible`]:_f(t),[`&${c}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${c}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:o}}}},HD=t=>{const{componentCls:e,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:o}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:n},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:q(t.marginSM)}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:q(t.marginXS)},marginLeft:{_skip_check_:!0,value:q(o(t.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},XD=t=>{const{componentCls:e,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:s}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${q(t.lineWidth)} ${t.lineType} ${s}`,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},Ci(t,-3))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),VD(t)),{[`${e}-content`]:{position:"relative",width:"100%"},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:Object.assign(Object.assign({},Ci(t)),{"&-hidden":{display:"none"}})}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping']) > ${e}-nav-list`]:{margin:"auto"}}}}}},ZD=t=>{const{cardHeight:e,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:o}=t,a=e||o,s=n||i,l=r||o+8;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:a,cardHeightSM:s,cardHeightLG:l,cardPadding:`${(a-t.fontHeight)/2-t.lineWidth}px ${t.padding}px`,cardPaddingSM:`${(s-t.fontHeight)/2-t.lineWidth}px ${t.paddingXS}px`,cardPaddingLG:`${(l-t.fontHeightLG)/2-t.lineWidth}px ${t.padding}px`,titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:`0 0 ${t.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${t.paddingSM}px 0`,horizontalItemPaddingSM:`${t.paddingXS}px 0`,horizontalItemPaddingLG:`${t.padding}px 0`,verticalItemPadding:`${t.paddingXS}px ${t.paddingLG}px`,verticalItemMargin:`${t.margin}px 0 0 0`,itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}},qD=Zt("Tabs",t=>{const e=kt(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${q(t.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${q(t.horizontalItemGutter)}`});return[FD(e),HD(e),WD(e),BD(e),DD(e),XD(e),jD(e)]},ZD),GD=()=>null;var YD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r,i,o,a,s,l,c,u,d,f;const{type:h,className:p,rootClassName:m,size:g,onEdit:v,hideAdd:O,centered:S,addIcon:C,removeIcon:b,moreIcon:x,more:$,popupClassName:w,children:P,items:_,animated:T,style:k,indicatorSize:R,indicator:I,destroyInactiveTabPane:Q,destroyOnHidden:E}=t,A=YD(t,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:N}=A,{direction:L,tabs:z,getPrefixCls:V,getPopupContainer:X}=de(at),F=V("tabs",N),H=wr(F),[B,G,se]=qD(F,H),ie=Y(null);Yt(e,()=>({nativeElement:ie.current}));let le;h==="editable-card"&&(le={onEdit:(J,{key:he,event:ge})=>{v==null||v(J==="add"?ge:he,J)},removeIcon:(n=b??(z==null?void 0:z.removeIcon))!==null&&n!==void 0?n:y(Vi,null),addIcon:(C??(z==null?void 0:z.addIcon))||y($o,null),showAdd:O!==!0});const pe=V(),ne=Dr(g),ee=LD(_,P),ce=QD(F,T),ue=Object.assign(Object.assign({},z==null?void 0:z.style),k),j={align:(r=I==null?void 0:I.align)!==null&&r!==void 0?r:(i=z==null?void 0:z.indicator)===null||i===void 0?void 0:i.align,size:(l=(a=(o=I==null?void 0:I.size)!==null&&o!==void 0?o:R)!==null&&a!==void 0?a:(s=z==null?void 0:z.indicator)===null||s===void 0?void 0:s.size)!==null&&l!==void 0?l:z==null?void 0:z.indicatorSize};return B(y(ED,Object.assign({ref:ie,direction:L,getPopupContainer:X},A,{items:ee,className:Z({[`${F}-${ne}`]:ne,[`${F}-card`]:["card","editable-card"].includes(h),[`${F}-editable-card`]:h==="editable-card",[`${F}-centered`]:S},z==null?void 0:z.className,p,m,G,se,H),popupClassName:Z(w,G,se,H),style:ue,editable:le,more:Object.assign({icon:(f=(d=(u=(c=z==null?void 0:z.more)===null||c===void 0?void 0:c.icon)!==null&&u!==void 0?u:z==null?void 0:z.moreIcon)!==null&&d!==void 0?d:x)!==null&&f!==void 0?f:y(C0,null),transitionName:`${pe}-slide-up`},$),prefixCls:F,animated:ce,indicator:j,destroyInactiveTabPane:E??Q})))}),mP=UD;mP.TabPane=GD;var KD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,className:n,hoverable:r=!0}=t,i=KD(t,["prefixCls","className","hoverable"]);const{getPrefixCls:o}=de(at),a=o("card",e),s=Z(`${a}-grid`,n,{[`${a}-grid-hoverable`]:r});return y("div",Object.assign({},i,{className:s}))},JD=t=>{const{antCls:e,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:o}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:r,marginBottom:-1,padding:`0 ${q(i)}`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`},zo()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},Sa),{[` > ${n}-typography, > ${n}-typography-edit-content `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${e}-tabs-top`]:{clear:"both",marginBottom:o,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorderSecondary}`}}})},eB=t=>{const{cardPaddingBase:e,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:` @@ -254,14 +254,14 @@ html body { ${q(i)} ${q(i)} 0 0 ${n}, ${q(i)} 0 0 0 ${n} inset, 0 ${q(i)} 0 0 ${n} inset; - `,transition:`all ${t.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},tB=t=>{const{componentCls:e,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:a}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${q(t.lineWidth)} ${t.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},No()),{"& > li":{margin:r,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${e}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:t.colorIcon,lineHeight:q(t.fontHeight),transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:q(t.calc(i).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${q(t.lineWidth)} ${t.lineType} ${o}`}}})},nB=t=>Object.assign(Object.assign({margin:`${q(t.calc(t.marginXXS).mul(-1).equal())} 0`,display:"flex"},No()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},ba),"&-description":{color:t.colorTextDescription}}),rB=t=>{const{componentCls:e,colorFillAlter:n,headerPadding:r,bodyPadding:i}=t;return{[`${e}-head`]:{padding:`0 ${q(r)}`,background:n,"&-title":{fontSize:t.fontSize}},[`${e}-body`]:{padding:`${q(t.padding)} ${q(i)}`}}},iB=t=>{const{componentCls:e}=t;return{overflow:"hidden",[`${e}-body`]:{userSelect:"none"}}},oB=t=>{const{componentCls:e,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:a,extraColor:s}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${e}-bordered)`]:{boxShadow:o},[`${e}-head`]:JD(t),[`${e}-extra`]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:t.fontSize},[`${e}-body`]:Object.assign({padding:a,borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},No()),[`${e}-grid`]:eB(t),[`${e}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`}},[`${e}-actions`]:tB(t),[`${e}-meta`]:nB(t)}),[`${e}-bordered`]:{border:`${q(t.lineWidth)} ${t.lineType} ${i}`,[`${e}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${e}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${e}-contain-grid`]:{borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0 `,[`${e}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${e}-loading) ${e}-body`]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),padding:0}},[`${e}-contain-tabs`]:{[`> div${e}-head`]:{minHeight:0,[`${e}-head-title, ${e}-extra`]:{paddingTop:r}}},[`${e}-type-inner`]:rB(t),[`${e}-loading`]:iB(t),[`${e}-rtl`]:{direction:"rtl"}}},aB=t=>{const{componentCls:e,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=t;return{[`${e}-small`]:{[`> ${e}-head`]:{minHeight:i,padding:`0 ${q(r)}`,fontSize:o,[`> ${e}-head-wrapper`]:{[`> ${e}-extra`]:{fontSize:t.fontSize}}},[`> ${e}-body`]:{padding:n}},[`${e}-small${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},sB=t=>{var e,n;return{headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+t.padding*2,headerHeightSM:t.fontSize*t.lineHeight+t.paddingXS*2,actionsBg:t.colorBgContainer,actionsLiMargin:`${t.paddingSM}px 0`,tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:(e=t.bodyPadding)!==null&&e!==void 0?e:t.paddingLG,headerPadding:(n=t.headerPadding)!==null&&n!==void 0?n:t.paddingLG}},lB=Zt("Card",t=>{const e=kt(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize});return[oB(e),aB(e)]},sB);var y1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{actionClasses:e,actions:n=[],actionStyle:r}=t;return y("ul",{className:e,style:r},n.map((i,o)=>{const a=`action-${o}`;return y("li",{style:{width:`${100/n.length}%`},key:a},y("span",null,i))}))},uB=Se((t,e)=>{const{prefixCls:n,className:r,rootClassName:i,style:o,extra:a,headStyle:s={},bodyStyle:l={},title:c,loading:u,bordered:d,variant:f,size:h,type:p,cover:m,actions:g,tabList:v,children:O,activeTabKey:S,defaultActiveTabKey:x,tabBarExtraContent:b,hoverable:C,tabProps:$={},classNames:w,styles:P}=t,_=y1(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:T,direction:R,card:k}=fe(it),[I]=Ff("card",f,d),Q=ce=>{var te;(te=t.onTabChange)===null||te===void 0||te.call(t,ce)},M=ce=>{var te;return Z((te=k==null?void 0:k.classNames)===null||te===void 0?void 0:te[ce],w==null?void 0:w[ce])},E=ce=>{var te;return Object.assign(Object.assign({},(te=k==null?void 0:k.styles)===null||te===void 0?void 0:te[ce]),P==null?void 0:P[ce])},N=ge(()=>{let ce=!1;return Ao.forEach(O,te=>{(te==null?void 0:te.type)===gP&&(ce=!0)}),ce},[O]),z=T("card",n),[L,F,H]=lB(z),V=y(Ra,{loading:!0,active:!0,paragraph:{rows:4},title:!1},O),X=S!==void 0,B=Object.assign(Object.assign({},$),{[X?"activeKey":"defaultActiveKey"]:X?S:x,tabBarExtraContent:b});let G;const se=Dr(h),le=v?y(mP,Object.assign({size:!se||se==="default"?"large":se},B,{className:`${z}-head-tabs`,onChange:Q,items:v.map(ce=>{var{tab:te}=ce,Oe=y1(ce,["tab"]);return Object.assign({label:te},Oe)})})):null;if(c||a||le){const ce=Z(`${z}-head`,M("header")),te=Z(`${z}-head-title`,M("title")),Oe=Z(`${z}-extra`,M("extra")),ye=Object.assign(Object.assign({},s),E("header"));G=y("div",{className:ce,style:ye},y("div",{className:`${z}-head-wrapper`},c&&y("div",{className:te,style:E("title")},c),a&&y("div",{className:Oe,style:E("extra")},a)),le)}const me=Z(`${z}-cover`,M("cover")),ie=m?y("div",{className:me,style:E("cover")},m):null,ne=Z(`${z}-body`,M("body")),ue=Object.assign(Object.assign({},l),E("body")),de=y("div",{className:ne,style:ue},u?V:O),j=Z(`${z}-actions`,M("actions")),ee=g!=null&&g.length?y(cB,{actionClasses:j,actionStyle:E("actions"),actions:g}):null,he=cn(_,["onTabChange"]),ve=Z(z,k==null?void 0:k.className,{[`${z}-loading`]:u,[`${z}-bordered`]:I!=="borderless",[`${z}-hoverable`]:C,[`${z}-contain-grid`]:N,[`${z}-contain-tabs`]:v==null?void 0:v.length,[`${z}-${se}`]:se,[`${z}-type-${p}`]:!!p,[`${z}-rtl`]:R==="rtl"},r,i,F,H),Y=Object.assign(Object.assign({},k==null?void 0:k.style),o);return L(y("div",Object.assign({ref:e},he,{className:ve,style:Y}),G,ie,de,ee))});var dB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,avatar:r,title:i,description:o}=t,a=dB(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=fe(it),l=s("card",e),c=Z(`${l}-meta`,n),u=r?y("div",{className:`${l}-meta-avatar`},r):null,d=i?y("div",{className:`${l}-meta-title`},i):null,f=o?y("div",{className:`${l}-meta-description`},o):null,h=d||f?y("div",{className:`${l}-meta-detail`},d,f):null;return y("div",Object.assign({},a,{className:c}),u,h)},Sa=uB;Sa.Grid=gP;Sa.Meta=fB;function hB(t,e,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,l=r.debounceMode,c=l===void 0?void 0:l,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function p(g){var v=g||{},O=v.upcomingOnly,S=O===void 0?!1:O;h(),d=!S}function m(){for(var g=arguments.length,v=new Array(g),O=0;Ot?s?(f=Date.now(),o||(u=setTimeout(c?C:b,t))):b():o!==!0&&(u=setTimeout(c?C:b,c===void 0?t-x:t))}return m.cancel=p,m}function pB(t,e,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return hB(t,e,{debounceMode:o!==!1})}const vP=bt({});var mB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:n,direction:r}=fe(it),{gutter:i,wrap:o}=fe(vP),{prefixCls:a,span:s,order:l,offset:c,push:u,pull:d,className:f,children:h,flex:p,style:m}=t,g=mB(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),v=n("col",a),[O,S,x]=q3(v),b={};let C={};gB.forEach(P=>{let _={};const T=t[P];typeof T=="number"?_.span=T:typeof T=="object"&&(_=T||{}),delete g[P],C=Object.assign(Object.assign({},C),{[`${v}-${P}-${_.span}`]:_.span!==void 0,[`${v}-${P}-order-${_.order}`]:_.order||_.order===0,[`${v}-${P}-offset-${_.offset}`]:_.offset||_.offset===0,[`${v}-${P}-push-${_.push}`]:_.push||_.push===0,[`${v}-${P}-pull-${_.pull}`]:_.pull||_.pull===0,[`${v}-rtl`]:r==="rtl"}),_.flex&&(C[`${v}-${P}-flex`]=!0,b[`--${v}-${P}-flex`]=S1(_.flex))});const $=Z(v,{[`${v}-${s}`]:s!==void 0,[`${v}-order-${l}`]:l,[`${v}-offset-${c}`]:c,[`${v}-push-${u}`]:u,[`${v}-pull-${d}`]:d},f,C,S,x),w={};if(i&&i[0]>0){const P=i[0]/2;w.paddingLeft=P,w.paddingRight=P}return p&&(w.flex=S1(p),o===!1&&!w.minWidth&&(w.minWidth=0)),O(y("div",Object.assign({},g,{style:Object.assign(Object.assign(Object.assign({},w),m),b),className:$,ref:e}),h))});function vB(t,e){const n=[void 0,void 0],r=Array.isArray(t)?t:[t,void 0],i=e||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let s=0;s{if(typeof t=="string"&&r(t),typeof t=="object")for(let o=0;o{i()},[JSON.stringify(t),e]),n}const xs=Se((t,e)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:s,gutter:l=0,wrap:c}=t,u=OB(t,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:d,direction:f}=fe(it),h=C2(!0,null),p=x1(i,h),m=x1(r,h),g=d("row",n),[v,O,S]=Z3(g),x=vB(l,h),b=Z(g,{[`${g}-no-wrap`]:c===!1,[`${g}-${m}`]:m,[`${g}-${p}`]:p,[`${g}-rtl`]:f==="rtl"},o,O,S),C={},$=x[0]!=null&&x[0]>0?x[0]/-2:void 0;$&&(C.marginLeft=$,C.marginRight=$);const[w,P]=x;C.rowGap=P;const _=ge(()=>({gutter:[w,P],wrap:c}),[w,P,c]);return v(y(vP.Provider,{value:_},y("div",Object.assign({},u,{className:b,style:Object.assign(Object.assign({},C),a),ref:e}),s)))}),bB=t=>{const{componentCls:e}=t;return{[e]:{"&-horizontal":{[`&${e}`]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},yB=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{borderBlockStart:`${q(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${q(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${q(t.marginLG)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${q(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${q(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${q(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${q(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},SB=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),xB=Zt("Divider",t=>{const e=kt(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[yB(e),bB(e)]},SB,{unitless:{orientationMargin:!0}});var CB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n,className:r,style:i}=rr("divider"),{prefixCls:o,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:h="solid",plain:p,style:m,size:g}=t,v=CB(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),O=e("divider",o),[S,x,b]=xB(O),C=Dr(g),$=$B[C],w=!!d,P=ge(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),_=P==="start"&&l!=null,T=P==="end"&&l!=null,R=Z(O,r,x,b,`${O}-${a}`,{[`${O}-with-text`]:w,[`${O}-with-text-${P}`]:w,[`${O}-dashed`]:!!f,[`${O}-${h}`]:h!=="solid",[`${O}-plain`]:!!p,[`${O}-rtl`]:n==="rtl",[`${O}-no-default-orientation-margin-start`]:_,[`${O}-no-default-orientation-margin-end`]:T,[`${O}-${$}`]:!!$},c,u),k=ge(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),I={marginInlineStart:_?k:void 0,marginInlineEnd:T?k:void 0};return S(y("div",Object.assign({className:R,style:Object.assign(Object.assign({},i),m)},v,{role:"separator"}),d&&a!=="vertical"&&y("span",{className:`${O}-inner-text`,style:I},d)))};function wB(t){return!!(t.addonBefore||t.addonAfter)}function PB(t){return!!(t.prefix||t.suffix||t.allowClear)}function C1(t,e,n){var r=e.cloneNode(!0),i=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},i}function Id(t,e,n,r){if(n){var i=e;if(e.type==="click"){i=C1(e,t,""),n(i);return}if(t.type!=="file"&&r!==void 0){i=C1(e,t,r),n(i);return}n(i)}}function OP(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var i=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}}var bP=oe.forwardRef(function(t,e){var n,r,i,o=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,f=t.className,h=t.style,p=t.disabled,m=t.readOnly,g=t.focused,v=t.triggerFocus,O=t.allowClear,S=t.value,x=t.handleReset,b=t.hidden,C=t.classes,$=t.classNames,w=t.dataAttrs,P=t.styles,_=t.components,T=t.onClear,R=a??o,k=(_==null?void 0:_.affixWrapper)||"span",I=(_==null?void 0:_.groupWrapper)||"span",Q=(_==null?void 0:_.wrapper)||"span",M=(_==null?void 0:_.groupAddon)||"span",E=U(null),N=function(j){var ee;(ee=E.current)!==null&&ee!==void 0&&ee.contains(j.target)&&(v==null||v())},z=PB(t),L=Xn(R,{value:S,className:Z((n=R.props)===null||n===void 0?void 0:n.className,!z&&($==null?void 0:$.variant))||null}),F=U(null);if(oe.useImperativeHandle(e,function(){return{nativeElement:F.current||E.current}}),z){var H=null;if(O){var V=!p&&!m&&S,X="".concat(s,"-clear-icon"),B=Je(O)==="object"&&O!==null&&O!==void 0&&O.clearIcon?O.clearIcon:"✖";H=oe.createElement("button",{type:"button",tabIndex:-1,onClick:function(j){x==null||x(j),T==null||T()},onMouseDown:function(j){return j.preventDefault()},className:Z(X,D(D({},"".concat(X,"-hidden"),!V),"".concat(X,"-has-suffix"),!!c))},B)}var G="".concat(s,"-affix-wrapper"),se=Z(G,D(D(D(D(D({},"".concat(s,"-disabled"),p),"".concat(G,"-disabled"),p),"".concat(G,"-focused"),g),"".concat(G,"-readonly"),m),"".concat(G,"-input-with-clear-btn"),c&&O&&S),C==null?void 0:C.affixWrapper,$==null?void 0:$.affixWrapper,$==null?void 0:$.variant),re=(c||O)&&oe.createElement("span",{className:Z("".concat(s,"-suffix"),$==null?void 0:$.suffix),style:P==null?void 0:P.suffix},H,c);L=oe.createElement(k,Ce({className:se,style:P==null?void 0:P.affixWrapper,onClick:N},w==null?void 0:w.affixWrapper,{ref:E}),l&&oe.createElement("span",{className:Z("".concat(s,"-prefix"),$==null?void 0:$.prefix),style:P==null?void 0:P.prefix},l),L,re)}if(wB(t)){var le="".concat(s,"-group"),me="".concat(le,"-addon"),ie="".concat(le,"-wrapper"),ne=Z("".concat(s,"-wrapper"),le,C==null?void 0:C.wrapper,$==null?void 0:$.wrapper),ue=Z(ie,D({},"".concat(ie,"-disabled"),p),C==null?void 0:C.group,$==null?void 0:$.groupWrapper);L=oe.createElement(I,{className:ue,ref:F},oe.createElement(Q,{className:ne},u&&oe.createElement(M,{className:me},u),L,d&&oe.createElement(M,{className:me},d)))}return oe.cloneElement(L,{className:Z((r=L.props)===null||r===void 0?void 0:r.className,f)||null,style:W(W({},(i=L.props)===null||i===void 0?void 0:i.style),h),hidden:b})}),_B=["show"];function yP(t,e){return ge(function(){var n={};e&&(n.show=Je(e)==="object"&&e.formatter?e.formatter:!!e),n=W(W({},n),t);var r=n,i=r.show,o=ut(r,_B);return W(W({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[t,e])}var TB=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],kB=Se(function(t,e){var n=t.autoComplete,r=t.onChange,i=t.onFocus,o=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,f=t.htmlSize,h=t.className,p=t.maxLength,m=t.suffix,g=t.showCount,v=t.count,O=t.type,S=O===void 0?"text":O,x=t.classes,b=t.classNames,C=t.styles,$=t.onCompositionStart,w=t.onCompositionEnd,P=ut(t,TB),_=J(!1),T=ae(_,2),R=T[0],k=T[1],I=U(!1),Q=U(!1),M=U(null),E=U(null),N=function(pe){M.current&&OP(M.current,pe)},z=_n(t.defaultValue,{value:t.value}),L=ae(z,2),F=L[0],H=L[1],V=F==null?"":String(F),X=J(null),B=ae(X,2),G=B[0],se=B[1],re=yP(v,g),le=re.max||p,me=re.strategy(V),ie=!!le&&me>le;Yt(e,function(){var ye;return{focus:N,blur:function(){var Qe;(Qe=M.current)===null||Qe===void 0||Qe.blur()},setSelectionRange:function(Qe,Me,De){var we;(we=M.current)===null||we===void 0||we.setSelectionRange(Qe,Me,De)},select:function(){var Qe;(Qe=M.current)===null||Qe===void 0||Qe.select()},input:M.current,nativeElement:((ye=E.current)===null||ye===void 0?void 0:ye.nativeElement)||M.current}}),be(function(){Q.current&&(Q.current=!1),k(function(ye){return ye&&d?!1:ye})},[d]);var ne=function(pe,Qe,Me){var De=Qe;if(!I.current&&re.exceedFormatter&&re.max&&re.strategy(Qe)>re.max){if(De=re.exceedFormatter(Qe,{max:re.max}),Qe!==De){var we,Ie;se([((we=M.current)===null||we===void 0?void 0:we.selectionStart)||0,((Ie=M.current)===null||Ie===void 0?void 0:Ie.selectionEnd)||0])}}else if(Me.source==="compositionEnd")return;H(De),M.current&&Id(M.current,pe,r,De)};be(function(){if(G){var ye;(ye=M.current)===null||ye===void 0||ye.setSelectionRange.apply(ye,$e(G))}},[G]);var ue=function(pe){ne(pe,pe.target.value,{source:"change"})},de=function(pe){I.current=!1,ne(pe,pe.currentTarget.value,{source:"compositionEnd"}),w==null||w(pe)},j=function(pe){a&&pe.key==="Enter"&&!Q.current&&(Q.current=!0,a(pe)),s==null||s(pe)},ee=function(pe){pe.key==="Enter"&&(Q.current=!1),l==null||l(pe)},he=function(pe){k(!0),i==null||i(pe)},ve=function(pe){Q.current&&(Q.current=!1),k(!1),o==null||o(pe)},Y=function(pe){H(""),N(),M.current&&Id(M.current,pe,r)},ce=ie&&"".concat(u,"-out-of-range"),te=function(){var pe=cn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return oe.createElement("input",Ce({autoComplete:n},pe,{onChange:ue,onFocus:he,onBlur:ve,onKeyDown:j,onKeyUp:ee,className:Z(u,D({},"".concat(u,"-disabled"),d),b==null?void 0:b.input),style:C==null?void 0:C.input,ref:M,size:f,type:S,onCompositionStart:function(Me){I.current=!0,$==null||$(Me)},onCompositionEnd:de}))},Oe=function(){var pe=Number(le)>0;if(m||re.show){var Qe=re.showFormatter?re.showFormatter({value:V,count:me,maxLength:le}):"".concat(me).concat(pe?" / ".concat(le):"");return oe.createElement(oe.Fragment,null,re.show&&oe.createElement("span",{className:Z("".concat(u,"-show-count-suffix"),D({},"".concat(u,"-show-count-has-suffix"),!!m),b==null?void 0:b.count),style:W({},C==null?void 0:C.count)},Qe),m)}return null};return oe.createElement(bP,Ce({},P,{prefixCls:u,className:Z(h,ce),handleReset:Y,value:V,focused:R,triggerFocus:N,suffix:Oe(),disabled:d,classes:x,classNames:b,styles:C,ref:E}),te())});const SP=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:oe.createElement(zs,null)}),e};function xP(t,e){const n=U([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,a,s;!((i=t.current)===null||i===void 0)&&i.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return be(()=>(e&&r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function RB(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var IB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:h,style:p,styles:m,rootClassName:g,onChange:v,classNames:O,variant:S}=t,x=IB(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:b,direction:C,allowClear:$,autoComplete:w,className:P,style:_,classNames:T,styles:R}=rr("input"),k=b("input",n),I=U(null),Q=$r(k),[M,E,N]=cP(k,g),[z]=uP(k,Q),{compactSize:L,compactItemClassnames:F}=js(k,C),H=Dr(ve=>{var Y;return(Y=o??L)!==null&&Y!==void 0?Y:ve}),V=oe.useContext(qi),X=a??V,{status:B,hasFeedback:G,feedbackIcon:se}=fe(Jr),re=Wf(B,i),le=RB(t)||!!G;U(le);const me=xP(I,!0),ie=ve=>{me(),s==null||s(ve)},ne=ve=>{me(),l==null||l(ve)},ue=ve=>{me(),v==null||v(ve)},de=(G||c)&&oe.createElement(oe.Fragment,null,c,G&&se),j=SP(u??$),[ee,he]=Ff("input",S,r);return M(z(oe.createElement(kB,Object.assign({ref:pr(e,I),prefixCls:k,autoComplete:w},x,{disabled:X,onBlur:ie,onFocus:ne,style:Object.assign(Object.assign({},_),p),styles:Object.assign(Object.assign({},R),m),suffix:de,allowClear:j,className:Z(h,g,N,Q,F,P),onChange:ue,addonBefore:f&&oe.createElement(bs,{form:!0,space:!0},f),addonAfter:d&&oe.createElement(bs,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},O),T),{input:Z({[`${k}-sm`]:H==="small",[`${k}-lg`]:H==="large",[`${k}-rtl`]:C==="rtl"},O==null?void 0:O.input,T.input,E),variant:Z({[`${k}-${ee}`]:he},Pd(k,re)),affixWrapper:Z({[`${k}-affix-wrapper-sm`]:H==="small",[`${k}-affix-wrapper-lg`]:H==="large",[`${k}-affix-wrapper-rtl`]:C==="rtl"},E),wrapper:Z({[`${k}-group-rtl`]:C==="rtl"},E),groupWrapper:Z({[`${k}-group-wrapper-sm`]:H==="small",[`${k}-group-wrapper-lg`]:H==="large",[`${k}-group-wrapper-rtl`]:C==="rtl",[`${k}-group-wrapper-${ee}`]:he},Pd(`${k}-group-wrapper`,re,G),E)})}))))});function $1(t){return["small","middle","large"].includes(t)}function w1(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const CP=oe.createContext({latestIndex:0}),MB=CP.Provider,EB=({className:t,index:e,children:n,split:r,style:i})=>{const{latestIndex:o}=fe(CP);return n==null?null:y(At,null,y("div",{className:t,style:i},n),e{var n;const{getPrefixCls:r,direction:i,size:o,className:a,style:s,classNames:l,styles:c}=rr("space"),{size:u=o??"small",align:d,className:f,rootClassName:h,children:p,direction:m="horizontal",prefixCls:g,split:v,style:O,wrap:S=!1,classNames:x,styles:b}=t,C=AB(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$,w]=Array.isArray(u)?u:[u,u],P=$1(w),_=$1($),T=w1(w),R=w1($),k=nr(p,{keepEmpty:!0}),I=d===void 0&&m==="horizontal"?"center":d,Q=r("space",g),[M,E,N]=iw(Q),z=Z(Q,a,E,`${Q}-${m}`,{[`${Q}-rtl`]:i==="rtl",[`${Q}-align-${I}`]:I,[`${Q}-gap-row-${w}`]:P,[`${Q}-gap-col-${$}`]:_},f,h,N),L=Z(`${Q}-item`,(n=x==null?void 0:x.item)!==null&&n!==void 0?n:l.item);let F=0;const H=k.map((B,G)=>{var se;B!=null&&(F=G);const re=(B==null?void 0:B.key)||`${L}-${G}`;return y(EB,{className:L,key:re,index:G,split:v,style:(se=b==null?void 0:b.item)!==null&&se!==void 0?se:c.item},B)}),V=ge(()=>({latestIndex:F}),[F]);if(k.length===0)return null;const X={};return S&&(X.flexWrap="wrap"),!_&&R&&(X.columnGap=$),!P&&T&&(X.rowGap=w),M(y("div",Object.assign({ref:e,className:z,style:Object.assign(Object.assign(Object.assign({},X),s),O)},C),y(MB,{value:V},H)))}),jo=QB;jo.Compact=kA;var NB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPopupContainer:e,getPrefixCls:n,direction:r}=fe(it),{prefixCls:i,type:o="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:h,arrow:p,autoFocus:m,overlay:g,trigger:v,align:O,open:S,onOpenChange:x,placement:b,getPopupContainer:C,href:$,icon:w=y(x0,null),title:P,buttonsRender:_=ie=>ie,mouseEnterDelay:T,mouseLeaveDelay:R,overlayClassName:k,overlayStyle:I,destroyOnHidden:Q,destroyPopupOnHide:M,dropdownRender:E,popupRender:N}=t,z=NB(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),L=n("dropdown",i),F=`${L}-button`,V={menu:h,arrow:p,autoFocus:m,align:O,disabled:s,trigger:s?[]:v,onOpenChange:x,getPopupContainer:C||e,mouseEnterDelay:T,mouseLeaveDelay:R,overlayClassName:k,overlayStyle:I,destroyOnHidden:Q,popupRender:N||E},{compactSize:X,compactItemClassnames:B}=js(L,r),G=Z(F,B,f);"destroyPopupOnHide"in t&&(V.destroyPopupOnHide=M),"overlay"in t&&(V.overlay=g),"open"in t&&(V.open=S),"placement"in t?V.placement=b:V.placement=r==="rtl"?"bottomLeft":"bottomRight";const se=y(vt,{type:o,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:$,title:P},d),re=y(vt,{type:o,danger:a,icon:w}),[le,me]=_([se,re]);return y(jo.Compact,Object.assign({className:G,size:X,block:!0},z),le,y(qf,Object.assign({},V),me))};$P.__ANT_BUTTON=!0;const w0=qf;w0.Button=$P;function zB(t){return t==null?null:typeof t=="object"&&!Kt(t)?t:{title:t}}var LB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},jB=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:LB}))},DB=Se(jB);function Md(t){const[e,n]=J(t);return be(()=>{const r=setTimeout(()=>{n(t)},t.length?0:10);return()=>{clearTimeout(r)}},[t]),e}const BB=t=>{const{componentCls:e}=t,n=`${e}-show-help`,r=`${e}-show-help-item`;return{[n]:{transition:`opacity ${t.motionDurationFast} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${t.motionDurationFast} ${t.motionEaseInOut}, + `,transition:`all ${t.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:r}}},tB=t=>{const{componentCls:e,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:a}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:a,borderTop:`${q(t.lineWidth)} ${t.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},zo()),{"& > li":{margin:r,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${e}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:t.colorIcon,lineHeight:q(t.fontHeight),transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:q(t.calc(i).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${q(t.lineWidth)} ${t.lineType} ${o}`}}})},nB=t=>Object.assign(Object.assign({margin:`${q(t.calc(t.marginXXS).mul(-1).equal())} 0`,display:"flex"},zo()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},Sa),"&-description":{color:t.colorTextDescription}}),rB=t=>{const{componentCls:e,colorFillAlter:n,headerPadding:r,bodyPadding:i}=t;return{[`${e}-head`]:{padding:`0 ${q(r)}`,background:n,"&-title":{fontSize:t.fontSize}},[`${e}-body`]:{padding:`${q(t.padding)} ${q(i)}`}}},iB=t=>{const{componentCls:e}=t;return{overflow:"hidden",[`${e}-body`]:{userSelect:"none"}}},oB=t=>{const{componentCls:e,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:a,extraColor:s}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${e}-bordered)`]:{boxShadow:o},[`${e}-head`]:JD(t),[`${e}-extra`]:{marginInlineStart:"auto",color:s,fontWeight:"normal",fontSize:t.fontSize},[`${e}-body`]:Object.assign({padding:a,borderRadius:`0 0 ${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)}`},zo()),[`${e}-grid`]:eB(t),[`${e}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0`}},[`${e}-actions`]:tB(t),[`${e}-meta`]:nB(t)}),[`${e}-bordered`]:{border:`${q(t.lineWidth)} ${t.lineType} ${i}`,[`${e}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${e}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${e}-contain-grid`]:{borderRadius:`${q(t.borderRadiusLG)} ${q(t.borderRadiusLG)} 0 0 `,[`${e}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${e}-loading) ${e}-body`]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),padding:0}},[`${e}-contain-tabs`]:{[`> div${e}-head`]:{minHeight:0,[`${e}-head-title, ${e}-extra`]:{paddingTop:r}}},[`${e}-type-inner`]:rB(t),[`${e}-loading`]:iB(t),[`${e}-rtl`]:{direction:"rtl"}}},aB=t=>{const{componentCls:e,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=t;return{[`${e}-small`]:{[`> ${e}-head`]:{minHeight:i,padding:`0 ${q(r)}`,fontSize:o,[`> ${e}-head-wrapper`]:{[`> ${e}-extra`]:{fontSize:t.fontSize}}},[`> ${e}-body`]:{padding:n}},[`${e}-small${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},sB=t=>{var e,n;return{headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+t.padding*2,headerHeightSM:t.fontSize*t.lineHeight+t.paddingXS*2,actionsBg:t.colorBgContainer,actionsLiMargin:`${t.paddingSM}px 0`,tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:(e=t.bodyPadding)!==null&&e!==void 0?e:t.paddingLG,headerPadding:(n=t.headerPadding)!==null&&n!==void 0?n:t.paddingLG}},lB=Zt("Card",t=>{const e=kt(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize});return[oB(e),aB(e)]},sB);var S1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{actionClasses:e,actions:n=[],actionStyle:r}=t;return y("ul",{className:e,style:r},n.map((i,o)=>{const a=`action-${o}`;return y("li",{style:{width:`${100/n.length}%`},key:a},y("span",null,i))}))},uB=ye((t,e)=>{const{prefixCls:n,className:r,rootClassName:i,style:o,extra:a,headStyle:s={},bodyStyle:l={},title:c,loading:u,bordered:d,variant:f,size:h,type:p,cover:m,actions:g,tabList:v,children:O,activeTabKey:S,defaultActiveTabKey:C,tabBarExtraContent:b,hoverable:x,tabProps:$={},classNames:w,styles:P}=t,_=S1(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","variant","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:T,direction:k,card:R}=de(at),[I]=Hf("card",f,d),Q=Te=>{var Ce;(Ce=t.onTabChange)===null||Ce===void 0||Ce.call(t,Te)},E=Te=>{var Ce;return Z((Ce=R==null?void 0:R.classNames)===null||Ce===void 0?void 0:Ce[Te],w==null?void 0:w[Te])},A=Te=>{var Ce;return Object.assign(Object.assign({},(Ce=R==null?void 0:R.styles)===null||Ce===void 0?void 0:Ce[Te]),P==null?void 0:P[Te])},N=me(()=>{let Te=!1;return Qo.forEach(O,Ce=>{(Ce==null?void 0:Ce.type)===gP&&(Te=!0)}),Te},[O]),L=T("card",n),[z,V,X]=lB(L),F=y(Ma,{loading:!0,active:!0,paragraph:{rows:4},title:!1},O),H=S!==void 0,B=Object.assign(Object.assign({},$),{[H?"activeKey":"defaultActiveKey"]:H?S:C,tabBarExtraContent:b});let G;const se=Dr(h),le=v?y(mP,Object.assign({size:!se||se==="default"?"large":se},B,{className:`${L}-head-tabs`,onChange:Q,items:v.map(Te=>{var{tab:Ce}=Te,Ie=S1(Te,["tab"]);return Object.assign({label:Ce},Ie)})})):null;if(c||a||le){const Te=Z(`${L}-head`,E("header")),Ce=Z(`${L}-head-title`,E("title")),Ie=Z(`${L}-extra`,E("extra")),_e=Object.assign(Object.assign({},s),A("header"));G=y("div",{className:Te,style:_e},y("div",{className:`${L}-head-wrapper`},c&&y("div",{className:Ce,style:A("title")},c),a&&y("div",{className:Ie,style:A("extra")},a)),le)}const pe=Z(`${L}-cover`,E("cover")),ne=m?y("div",{className:pe,style:A("cover")},m):null,ee=Z(`${L}-body`,E("body")),ce=Object.assign(Object.assign({},l),A("body")),ue=y("div",{className:ee,style:ce},u?F:O),j=Z(`${L}-actions`,E("actions")),J=g!=null&&g.length?y(cB,{actionClasses:j,actionStyle:A("actions"),actions:g}):null,he=cn(_,["onTabChange"]),ge=Z(L,R==null?void 0:R.className,{[`${L}-loading`]:u,[`${L}-bordered`]:I!=="borderless",[`${L}-hoverable`]:x,[`${L}-contain-grid`]:N,[`${L}-contain-tabs`]:v==null?void 0:v.length,[`${L}-${se}`]:se,[`${L}-type-${p}`]:!!p,[`${L}-rtl`]:k==="rtl"},r,i,V,X),$e=Object.assign(Object.assign({},R==null?void 0:R.style),o);return z(y("div",Object.assign({ref:e},he,{className:ge,style:$e}),G,ne,ue,J))});var dB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,avatar:r,title:i,description:o}=t,a=dB(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=de(at),l=s("card",e),c=Z(`${l}-meta`,n),u=r?y("div",{className:`${l}-meta-avatar`},r):null,d=i?y("div",{className:`${l}-meta-title`},i):null,f=o?y("div",{className:`${l}-meta-description`},o):null,h=d||f?y("div",{className:`${l}-meta-detail`},d,f):null;return y("div",Object.assign({},a,{className:c}),u,h)},Ca=uB;Ca.Grid=gP;Ca.Meta=fB;function hB(t,e,n){var r=n||{},i=r.noTrailing,o=i===void 0?!1:i,a=r.noLeading,s=a===void 0?!1:a,l=r.debounceMode,c=l===void 0?void 0:l,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function p(g){var v=g||{},O=v.upcomingOnly,S=O===void 0?!1:O;h(),d=!S}function m(){for(var g=arguments.length,v=new Array(g),O=0;Ot?s?(f=Date.now(),o||(u=setTimeout(c?x:b,t))):b():o!==!0&&(u=setTimeout(c?x:b,c===void 0?t-C:t))}return m.cancel=p,m}function pB(t,e,n){var r={},i=r.atBegin,o=i===void 0?!1:i;return hB(t,e,{debounceMode:o!==!1})}const vP=yt({});var mB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:n,direction:r}=de(at),{gutter:i,wrap:o}=de(vP),{prefixCls:a,span:s,order:l,offset:c,push:u,pull:d,className:f,children:h,flex:p,style:m}=t,g=mB(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),v=n("col",a),[O,S,C]=q3(v),b={};let x={};gB.forEach(P=>{let _={};const T=t[P];typeof T=="number"?_.span=T:typeof T=="object"&&(_=T||{}),delete g[P],x=Object.assign(Object.assign({},x),{[`${v}-${P}-${_.span}`]:_.span!==void 0,[`${v}-${P}-order-${_.order}`]:_.order||_.order===0,[`${v}-${P}-offset-${_.offset}`]:_.offset||_.offset===0,[`${v}-${P}-push-${_.push}`]:_.push||_.push===0,[`${v}-${P}-pull-${_.pull}`]:_.pull||_.pull===0,[`${v}-rtl`]:r==="rtl"}),_.flex&&(x[`${v}-${P}-flex`]=!0,b[`--${v}-${P}-flex`]=x1(_.flex))});const $=Z(v,{[`${v}-${s}`]:s!==void 0,[`${v}-order-${l}`]:l,[`${v}-offset-${c}`]:c,[`${v}-push-${u}`]:u,[`${v}-pull-${d}`]:d},f,x,S,C),w={};if(i&&i[0]>0){const P=i[0]/2;w.paddingLeft=P,w.paddingRight=P}return p&&(w.flex=x1(p),o===!1&&!w.minWidth&&(w.minWidth=0)),O(y("div",Object.assign({},g,{style:Object.assign(Object.assign(Object.assign({},w),m),b),className:$,ref:e}),h))});function vB(t,e){const n=[void 0,void 0],r=Array.isArray(t)?t:[t,void 0],i=e||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return r.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let s=0;s{if(typeof t=="string"&&r(t),typeof t=="object")for(let o=0;o{i()},[JSON.stringify(t),e]),n}const ha=ye((t,e)=>{const{prefixCls:n,justify:r,align:i,className:o,style:a,children:s,gutter:l=0,wrap:c}=t,u=OB(t,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:d,direction:f}=de(at),h=C2(!0,null),p=C1(i,h),m=C1(r,h),g=d("row",n),[v,O,S]=Z3(g),C=vB(l,h),b=Z(g,{[`${g}-no-wrap`]:c===!1,[`${g}-${m}`]:m,[`${g}-${p}`]:p,[`${g}-rtl`]:f==="rtl"},o,O,S),x={},$=C[0]!=null&&C[0]>0?C[0]/-2:void 0;$&&(x.marginLeft=$,x.marginRight=$);const[w,P]=C;x.rowGap=P;const _=me(()=>({gutter:[w,P],wrap:c}),[w,P,c]);return v(y(vP.Provider,{value:_},y("div",Object.assign({},u,{className:b,style:Object.assign(Object.assign({},x),a),ref:e}),s)))}),bB=t=>{const{componentCls:e}=t;return{[e]:{"&-horizontal":{[`&${e}`]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},yB=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:s}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{borderBlockStart:`${q(i)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${q(i)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${q(t.marginLG)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${q(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${q(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${q(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${q(i)} 0 0`},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},SB=t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),xB=Zt("Divider",t=>{const e=kt(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[yB(e),bB(e)]},SB,{unitless:{orientationMargin:!0}});var CB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPrefixCls:e,direction:n,className:r,style:i}=ir("divider"),{prefixCls:o,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:h="solid",plain:p,style:m,size:g}=t,v=CB(t,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),O=e("divider",o),[S,C,b]=xB(O),x=Dr(g),$=$B[x],w=!!d,P=me(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),_=P==="start"&&l!=null,T=P==="end"&&l!=null,k=Z(O,r,C,b,`${O}-${a}`,{[`${O}-with-text`]:w,[`${O}-with-text-${P}`]:w,[`${O}-dashed`]:!!f,[`${O}-${h}`]:h!=="solid",[`${O}-plain`]:!!p,[`${O}-rtl`]:n==="rtl",[`${O}-no-default-orientation-margin-start`]:_,[`${O}-no-default-orientation-margin-end`]:T,[`${O}-${$}`]:!!$},c,u),R=me(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),I={marginInlineStart:_?R:void 0,marginInlineEnd:T?R:void 0};return S(y("div",Object.assign({className:k,style:Object.assign(Object.assign({},i),m)},v,{role:"separator"}),d&&a!=="vertical"&&y("span",{className:`${O}-inner-text`,style:I},d)))};function wB(t){return!!(t.addonBefore||t.addonAfter)}function PB(t){return!!(t.prefix||t.suffix||t.allowClear)}function $1(t,e,n){var r=e.cloneNode(!0),i=Object.create(t,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(r.selectionStart=e.selectionStart,r.selectionEnd=e.selectionEnd),r.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},i}function Ed(t,e,n,r){if(n){var i=e;if(e.type==="click"){i=$1(e,t,""),n(i);return}if(t.type!=="file"&&r!==void 0){i=$1(e,t,r),n(i);return}n(i)}}function OP(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var i=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}}var bP=oe.forwardRef(function(t,e){var n,r,i,o=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,d=t.addonAfter,f=t.className,h=t.style,p=t.disabled,m=t.readOnly,g=t.focused,v=t.triggerFocus,O=t.allowClear,S=t.value,C=t.handleReset,b=t.hidden,x=t.classes,$=t.classNames,w=t.dataAttrs,P=t.styles,_=t.components,T=t.onClear,k=a??o,R=(_==null?void 0:_.affixWrapper)||"span",I=(_==null?void 0:_.groupWrapper)||"span",Q=(_==null?void 0:_.wrapper)||"span",E=(_==null?void 0:_.groupAddon)||"span",A=Y(null),N=function(j){var J;(J=A.current)!==null&&J!==void 0&&J.contains(j.target)&&(v==null||v())},L=PB(t),z=Zn(k,{value:S,className:Z((n=k.props)===null||n===void 0?void 0:n.className,!L&&($==null?void 0:$.variant))||null}),V=Y(null);if(oe.useImperativeHandle(e,function(){return{nativeElement:V.current||A.current}}),L){var X=null;if(O){var F=!p&&!m&&S,H="".concat(s,"-clear-icon"),B=tt(O)==="object"&&O!==null&&O!==void 0&&O.clearIcon?O.clearIcon:"✖";X=oe.createElement("button",{type:"button",tabIndex:-1,onClick:function(j){C==null||C(j),T==null||T()},onMouseDown:function(j){return j.preventDefault()},className:Z(H,D(D({},"".concat(H,"-hidden"),!F),"".concat(H,"-has-suffix"),!!c))},B)}var G="".concat(s,"-affix-wrapper"),se=Z(G,D(D(D(D(D({},"".concat(s,"-disabled"),p),"".concat(G,"-disabled"),p),"".concat(G,"-focused"),g),"".concat(G,"-readonly"),m),"".concat(G,"-input-with-clear-btn"),c&&O&&S),x==null?void 0:x.affixWrapper,$==null?void 0:$.affixWrapper,$==null?void 0:$.variant),ie=(c||O)&&oe.createElement("span",{className:Z("".concat(s,"-suffix"),$==null?void 0:$.suffix),style:P==null?void 0:P.suffix},X,c);z=oe.createElement(R,xe({className:se,style:P==null?void 0:P.affixWrapper,onClick:N},w==null?void 0:w.affixWrapper,{ref:A}),l&&oe.createElement("span",{className:Z("".concat(s,"-prefix"),$==null?void 0:$.prefix),style:P==null?void 0:P.prefix},l),z,ie)}if(wB(t)){var le="".concat(s,"-group"),pe="".concat(le,"-addon"),ne="".concat(le,"-wrapper"),ee=Z("".concat(s,"-wrapper"),le,x==null?void 0:x.wrapper,$==null?void 0:$.wrapper),ce=Z(ne,D({},"".concat(ne,"-disabled"),p),x==null?void 0:x.group,$==null?void 0:$.groupWrapper);z=oe.createElement(I,{className:ce,ref:V},oe.createElement(Q,{className:ee},u&&oe.createElement(E,{className:pe},u),z,d&&oe.createElement(E,{className:pe},d)))}return oe.cloneElement(z,{className:Z((r=z.props)===null||r===void 0?void 0:r.className,f)||null,style:W(W({},(i=z.props)===null||i===void 0?void 0:i.style),h),hidden:b})}),_B=["show"];function yP(t,e){return me(function(){var n={};e&&(n.show=tt(e)==="object"&&e.formatter?e.formatter:!!e),n=W(W({},n),t);var r=n,i=r.show,o=dt(r,_B);return W(W({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[t,e])}var TB=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],kB=ye(function(t,e){var n=t.autoComplete,r=t.onChange,i=t.onFocus,o=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,d=t.disabled,f=t.htmlSize,h=t.className,p=t.maxLength,m=t.suffix,g=t.showCount,v=t.count,O=t.type,S=O===void 0?"text":O,C=t.classes,b=t.classNames,x=t.styles,$=t.onCompositionStart,w=t.onCompositionEnd,P=dt(t,TB),_=K(!1),T=ae(_,2),k=T[0],R=T[1],I=Y(!1),Q=Y(!1),E=Y(null),A=Y(null),N=function(ve){E.current&&OP(E.current,ve)},L=_n(t.defaultValue,{value:t.value}),z=ae(L,2),V=z[0],X=z[1],F=V==null?"":String(V),H=K(null),B=ae(H,2),G=B[0],se=B[1],ie=yP(v,g),le=ie.max||p,pe=ie.strategy(F),ne=!!le&&pe>le;Yt(e,function(){var _e;return{focus:N,blur:function(){var Ne;(Ne=E.current)===null||Ne===void 0||Ne.blur()},setSelectionRange:function(Ne,ze,re){var fe;(fe=E.current)===null||fe===void 0||fe.setSelectionRange(Ne,ze,re)},select:function(){var Ne;(Ne=E.current)===null||Ne===void 0||Ne.select()},input:E.current,nativeElement:((_e=A.current)===null||_e===void 0?void 0:_e.nativeElement)||E.current}}),be(function(){Q.current&&(Q.current=!1),R(function(_e){return _e&&d?!1:_e})},[d]);var ee=function(ve,Ne,ze){var re=Ne;if(!I.current&&ie.exceedFormatter&&ie.max&&ie.strategy(Ne)>ie.max){if(re=ie.exceedFormatter(Ne,{max:ie.max}),Ne!==re){var fe,te;se([((fe=E.current)===null||fe===void 0?void 0:fe.selectionStart)||0,((te=E.current)===null||te===void 0?void 0:te.selectionEnd)||0])}}else if(ze.source==="compositionEnd")return;X(re),E.current&&Ed(E.current,ve,r,re)};be(function(){if(G){var _e;(_e=E.current)===null||_e===void 0||_e.setSelectionRange.apply(_e,Pe(G))}},[G]);var ce=function(ve){ee(ve,ve.target.value,{source:"change"})},ue=function(ve){I.current=!1,ee(ve,ve.currentTarget.value,{source:"compositionEnd"}),w==null||w(ve)},j=function(ve){a&&ve.key==="Enter"&&!Q.current&&(Q.current=!0,a(ve)),s==null||s(ve)},J=function(ve){ve.key==="Enter"&&(Q.current=!1),l==null||l(ve)},he=function(ve){R(!0),i==null||i(ve)},ge=function(ve){Q.current&&(Q.current=!1),R(!1),o==null||o(ve)},$e=function(ve){X(""),N(),E.current&&Ed(E.current,ve,r)},Te=ne&&"".concat(u,"-out-of-range"),Ce=function(){var ve=cn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return oe.createElement("input",xe({autoComplete:n},ve,{onChange:ce,onFocus:he,onBlur:ge,onKeyDown:j,onKeyUp:J,className:Z(u,D({},"".concat(u,"-disabled"),d),b==null?void 0:b.input),style:x==null?void 0:x.input,ref:E,size:f,type:S,onCompositionStart:function(ze){I.current=!0,$==null||$(ze)},onCompositionEnd:ue}))},Ie=function(){var ve=Number(le)>0;if(m||ie.show){var Ne=ie.showFormatter?ie.showFormatter({value:F,count:pe,maxLength:le}):"".concat(pe).concat(ve?" / ".concat(le):"");return oe.createElement(oe.Fragment,null,ie.show&&oe.createElement("span",{className:Z("".concat(u,"-show-count-suffix"),D({},"".concat(u,"-show-count-has-suffix"),!!m),b==null?void 0:b.count),style:W({},x==null?void 0:x.count)},Ne),m)}return null};return oe.createElement(bP,xe({},P,{prefixCls:u,className:Z(h,Te),handleReset:$e,value:F,focused:k,triggerFocus:N,suffix:Ie(),disabled:d,classes:C,classNames:b,styles:x,ref:A}),Ce())});const SP=t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:oe.createElement(zs,null)}),e};function xP(t,e){const n=Y([]),r=()=>{n.current.push(setTimeout(()=>{var i,o,a,s;!((i=t.current)===null||i===void 0)&&i.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return be(()=>(e&&r(),()=>n.current.forEach(i=>{i&&clearTimeout(i)})),[]),r}function RB(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var IB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,bordered:r=!0,status:i,size:o,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:h,style:p,styles:m,rootClassName:g,onChange:v,classNames:O,variant:S}=t,C=IB(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:b,direction:x,allowClear:$,autoComplete:w,className:P,style:_,classNames:T,styles:k}=ir("input"),R=b("input",n),I=Y(null),Q=wr(R),[E,A,N]=cP(R,g),[L]=uP(R,Q),{compactSize:z,compactItemClassnames:V}=js(R,x),X=Dr(ge=>{var $e;return($e=o??z)!==null&&$e!==void 0?$e:ge}),F=oe.useContext(qi),H=a??F,{status:B,hasFeedback:G,feedbackIcon:se}=de(ei),ie=Vf(B,i),le=RB(t)||!!G;Y(le);const pe=xP(I,!0),ne=ge=>{pe(),s==null||s(ge)},ee=ge=>{pe(),l==null||l(ge)},ce=ge=>{pe(),v==null||v(ge)},ue=(G||c)&&oe.createElement(oe.Fragment,null,c,G&&se),j=SP(u??$),[J,he]=Hf("input",S,r);return E(L(oe.createElement(kB,Object.assign({ref:mr(e,I),prefixCls:R,autoComplete:w},C,{disabled:H,onBlur:ne,onFocus:ee,style:Object.assign(Object.assign({},_),p),styles:Object.assign(Object.assign({},k),m),suffix:ue,allowClear:j,className:Z(h,g,N,Q,V,P),onChange:ce,addonBefore:f&&oe.createElement(ys,{form:!0,space:!0},f),addonAfter:d&&oe.createElement(ys,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},O),T),{input:Z({[`${R}-sm`]:X==="small",[`${R}-lg`]:X==="large",[`${R}-rtl`]:x==="rtl"},O==null?void 0:O.input,T.input,A),variant:Z({[`${R}-${J}`]:he},Td(R,ie)),affixWrapper:Z({[`${R}-affix-wrapper-sm`]:X==="small",[`${R}-affix-wrapper-lg`]:X==="large",[`${R}-affix-wrapper-rtl`]:x==="rtl"},A),wrapper:Z({[`${R}-group-rtl`]:x==="rtl"},A),groupWrapper:Z({[`${R}-group-wrapper-sm`]:X==="small",[`${R}-group-wrapper-lg`]:X==="large",[`${R}-group-wrapper-rtl`]:x==="rtl",[`${R}-group-wrapper-${J}`]:he},Td(`${R}-group-wrapper`,ie,G),A)})}))))});function w1(t){return["small","middle","large"].includes(t)}function P1(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const CP=oe.createContext({latestIndex:0}),MB=CP.Provider,EB=({className:t,index:e,children:n,split:r,style:i})=>{const{latestIndex:o}=de(CP);return n==null?null:y(At,null,y("div",{className:t,style:i},n),e{var n;const{getPrefixCls:r,direction:i,size:o,className:a,style:s,classNames:l,styles:c}=ir("space"),{size:u=o??"small",align:d,className:f,rootClassName:h,children:p,direction:m="horizontal",prefixCls:g,split:v,style:O,wrap:S=!1,classNames:C,styles:b}=t,x=AB(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$,w]=Array.isArray(u)?u:[u,u],P=w1(w),_=w1($),T=P1(w),k=P1($),R=rr(p,{keepEmpty:!0}),I=d===void 0&&m==="horizontal"?"center":d,Q=r("space",g),[E,A,N]=iw(Q),L=Z(Q,a,A,`${Q}-${m}`,{[`${Q}-rtl`]:i==="rtl",[`${Q}-align-${I}`]:I,[`${Q}-gap-row-${w}`]:P,[`${Q}-gap-col-${$}`]:_},f,h,N),z=Z(`${Q}-item`,(n=C==null?void 0:C.item)!==null&&n!==void 0?n:l.item);let V=0;const X=R.map((B,G)=>{var se;B!=null&&(V=G);const ie=(B==null?void 0:B.key)||`${z}-${G}`;return y(EB,{className:z,key:ie,index:G,split:v,style:(se=b==null?void 0:b.item)!==null&&se!==void 0?se:c.item},B)}),F=me(()=>({latestIndex:V}),[V]);if(R.length===0)return null;const H={};return S&&(H.flexWrap="wrap"),!_&&k&&(H.columnGap=$),!P&&T&&(H.rowGap=w),E(y("div",Object.assign({ref:e,className:L,style:Object.assign(Object.assign(Object.assign({},H),s),O)},x),y(MB,{value:F},X)))}),Do=QB;Do.Compact=kA;var NB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{getPopupContainer:e,getPrefixCls:n,direction:r}=de(at),{prefixCls:i,type:o="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:h,arrow:p,autoFocus:m,overlay:g,trigger:v,align:O,open:S,onOpenChange:C,placement:b,getPopupContainer:x,href:$,icon:w=y(C0,null),title:P,buttonsRender:_=ne=>ne,mouseEnterDelay:T,mouseLeaveDelay:k,overlayClassName:R,overlayStyle:I,destroyOnHidden:Q,destroyPopupOnHide:E,dropdownRender:A,popupRender:N}=t,L=NB(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),z=n("dropdown",i),V=`${z}-button`,F={menu:h,arrow:p,autoFocus:m,align:O,disabled:s,trigger:s?[]:v,onOpenChange:C,getPopupContainer:x||e,mouseEnterDelay:T,mouseLeaveDelay:k,overlayClassName:R,overlayStyle:I,destroyOnHidden:Q,popupRender:N||A},{compactSize:H,compactItemClassnames:B}=js(z,r),G=Z(V,B,f);"destroyPopupOnHide"in t&&(F.destroyPopupOnHide=E),"overlay"in t&&(F.overlay=g),"open"in t&&(F.open=S),"placement"in t?F.placement=b:F.placement=r==="rtl"?"bottomLeft":"bottomRight";const se=y(vt,{type:o,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:$,title:P},d),ie=y(vt,{type:o,danger:a,icon:w}),[le,pe]=_([se,ie]);return y(Do.Compact,Object.assign({className:G,size:H,block:!0},L),le,y(Yf,Object.assign({},F),pe))};$P.__ANT_BUTTON=!0;const P0=Yf;P0.Button=$P;function zB(t){return t==null?null:typeof t=="object"&&!Jt(t)?t:{title:t}}var LB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},jB=function(e,n){return y(Rt,xe({},e,{ref:n,icon:LB}))},DB=ye(jB);function Ad(t){const[e,n]=K(t);return be(()=>{const r=setTimeout(()=>{n(t)},t.length?0:10);return()=>{clearTimeout(r)}},[t]),e}const BB=t=>{const{componentCls:e}=t,n=`${e}-show-help`,r=`${e}-show-help-item`;return{[n]:{transition:`opacity ${t.motionDurationFast} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${t.motionDurationFast} ${t.motionEaseInOut}, opacity ${t.motionDurationFast} ${t.motionEaseInOut}, - transform ${t.motionDurationFast} ${t.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},WB=t=>({legend:{display:"block",width:"100%",marginBottom:t.marginLG,padding:0,color:t.colorTextDescription,fontSize:t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${q(t.controlOutlineWidth)} ${t.controlOutline}`},output:{display:"block",paddingTop:15,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight}}),P1=(t,e)=>{const{formItemCls:n}=t;return{[n]:{[`${n}-label > label`]:{height:e},[`${n}-control-input`]:{minHeight:e}}}},FB=t=>{const{componentCls:e}=t;return{[t.componentCls]:Object.assign(Object.assign(Object.assign({},wn(t)),WB(t)),{[`${e}-text`]:{display:"inline-block",paddingInlineEnd:t.paddingSM},"&-small":Object.assign({},P1(t,t.controlHeightSM)),"&-large":Object.assign({},P1(t,t.controlHeightLG))})}},VB=t=>{const{formItemCls:e,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:o,labelColor:a,labelFontSize:s,labelHeight:l,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:u,itemMarginBottom:d}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{marginBottom:d,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, - &-hidden${i}-row`]:{display:"none"},"&-has-warning":{[`${e}-split`]:{color:t.colorError}},"&-has-error":{[`${e}-split`]:{color:t.colorWarning}},[`${e}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:t.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:l,color:a,fontSize:s,[`> ${n}`]:{fontSize:t.fontSize,verticalAlign:"top"},[`&${e}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:t.marginXXS,color:o,fontSize:t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${e}-required-mark-hidden, &${e}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${e}-optional`]:{display:"inline-block",marginInlineStart:t.marginXXS,color:t.colorTextDescription,[`&${e}-required-mark-hidden`]:{display:"none"}},[`${e}-tooltip`]:{color:t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:c,marginInlineEnd:u},[`&${e}-no-colon::after`]:{content:'"\\a0"'}}},[`${e}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[e]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:t.colorTextDescription,fontSize:t.fontSize,lineHeight:t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:t.controlHeightSM,transition:`color ${t.motionDurationMid} ${t.motionEaseOut}`},"&-explain":{"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning}}},[`&-with-help ${e}-explain`]:{height:"auto",opacity:1},[`${e}-feedback-icon`]:{fontSize:t.fontSize,textAlign:"center",visibility:"visible",animationName:qv,animationDuration:t.motionDurationMid,animationTimingFunction:t.motionEaseOutBack,pointerEvents:"none","&-success":{color:t.colorSuccess},"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning},"&-validating":{color:t.colorPrimary}}})}},ta=t=>({padding:t.verticalLabelPadding,margin:t.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),HB=t=>{const{antCls:e,formItemCls:n}=t;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}},[`${e}-col-24${n}-label, + transform ${t.motionDurationFast} ${t.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},WB=t=>({legend:{display:"block",width:"100%",marginBottom:t.marginLG,padding:0,color:t.colorTextDescription,fontSize:t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${q(t.controlOutlineWidth)} ${t.controlOutline}`},output:{display:"block",paddingTop:15,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight}}),_1=(t,e)=>{const{formItemCls:n}=t;return{[n]:{[`${n}-label > label`]:{height:e},[`${n}-control-input`]:{minHeight:e}}}},FB=t=>{const{componentCls:e}=t;return{[t.componentCls]:Object.assign(Object.assign(Object.assign({},wn(t)),WB(t)),{[`${e}-text`]:{display:"inline-block",paddingInlineEnd:t.paddingSM},"&-small":Object.assign({},_1(t,t.controlHeightSM)),"&-large":Object.assign({},_1(t,t.controlHeightLG))})}},VB=t=>{const{formItemCls:e,iconCls:n,rootPrefixCls:r,antCls:i,labelRequiredMarkColor:o,labelColor:a,labelFontSize:s,labelHeight:l,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:u,itemMarginBottom:d}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{marginBottom:d,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, + &-hidden${i}-row`]:{display:"none"},"&-has-warning":{[`${e}-split`]:{color:t.colorError}},"&-has-error":{[`${e}-split`]:{color:t.colorWarning}},[`${e}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:t.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:l,color:a,fontSize:s,[`> ${n}`]:{fontSize:t.fontSize,verticalAlign:"top"},[`&${e}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:t.marginXXS,color:o,fontSize:t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${e}-required-mark-hidden, &${e}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${e}-optional`]:{display:"inline-block",marginInlineStart:t.marginXXS,color:t.colorTextDescription,[`&${e}-required-mark-hidden`]:{display:"none"}},[`${e}-tooltip`]:{color:t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:c,marginInlineEnd:u},[`&${e}-no-colon::after`]:{content:'"\\a0"'}}},[`${e}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[e]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:t.colorTextDescription,fontSize:t.fontSize,lineHeight:t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:t.controlHeightSM,transition:`color ${t.motionDurationMid} ${t.motionEaseOut}`},"&-explain":{"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning}}},[`&-with-help ${e}-explain`]:{height:"auto",opacity:1},[`${e}-feedback-icon`]:{fontSize:t.fontSize,textAlign:"center",visibility:"visible",animationName:Gv,animationDuration:t.motionDurationMid,animationTimingFunction:t.motionEaseOutBack,pointerEvents:"none","&-success":{color:t.colorSuccess},"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning},"&-validating":{color:t.colorPrimary}}})}},ta=t=>({padding:t.verticalLabelPadding,margin:t.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),HB=t=>{const{antCls:e,formItemCls:n}=t;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}},[`${e}-col-24${n}-label, ${e}-col-xl-24${n}-label`]:ta(t)}}},XB=t=>{const{componentCls:e,formItemCls:n,inlineItemMarginBottom:r}=t;return{[`${e}-inline`]:{display:"flex",flexWrap:"wrap",[`${n}-inline`]:{flex:"none",marginInlineEnd:t.margin,marginBottom:r,"&-row":{flexWrap:"nowrap"},[`> ${n}-label, > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${e}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},ZB=t=>{const{componentCls:e,formItemCls:n,rootPrefixCls:r}=t;return{[`${n} ${n}-label`]:ta(t),[`${e}:not(${e}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},qB=t=>{const{componentCls:e,formItemCls:n,antCls:r}=t;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label, ${r}-col-24${n}-label, - ${r}-col-xl-24${n}-label`]:ta(t)},[`@media (max-width: ${q(t.screenXSMax)})`]:[ZB(t),{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:ta(t)}}}],[`@media (max-width: ${q(t.screenSMMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:ta(t)}}},[`@media (max-width: ${q(t.screenMDMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:ta(t)}}},[`@media (max-width: ${q(t.screenLGMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:ta(t)}}}}},GB=t=>({labelRequiredMarkColor:t.colorError,labelColor:t.colorTextHeading,labelFontSize:t.fontSize,labelHeight:t.controlHeight,labelColonMarginInlineStart:t.marginXXS/2,labelColonMarginInlineEnd:t.marginXS,itemMarginBottom:t.marginLG,verticalLabelPadding:`0 0 ${t.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),wP=(t,e)=>kt(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:e}),P0=Zt("Form",(t,{rootPrefixCls:e})=>{const n=wP(t,e);return[FB(n),VB(n),BB(n),HB(n),XB(n),qB(n),Fv(n),qv]},GB,{order:-1e3}),_1=[];function Gh(t,e,n,r=0){return{key:typeof t=="string"?t:`${e}-${r}`,error:t,errorStatus:n}}const PP=({help:t,helpStatus:e,errors:n=_1,warnings:r=_1,className:i,fieldId:o,onVisibleChanged:a})=>{const{prefixCls:s}=fe(r0),l=`${s}-item-explain`,c=$r(s),[u,d,f]=P0(s,c),h=ge(()=>Sd(s),[s]),p=Md(n),m=Md(r),g=ge(()=>t!=null?[Gh(t,"help",e)]:[].concat($e(p.map((S,x)=>Gh(S,"error","error",x))),$e(m.map((S,x)=>Gh(S,"warning","warning",x)))),[t,e,p,m]),v=ge(()=>{const S={};return g.forEach(({key:x})=>{S[x]=(S[x]||0)+1}),g.map((x,b)=>Object.assign(Object.assign({},x),{key:S[x.key]>1?`${x.key}-fallback-${b}`:x.key}))},[g]),O={};return o&&(O.id=`${o}_help`),u(y(pi,{motionDeadline:h.motionDeadline,motionName:`${s}-show-help`,visible:!!v.length,onVisibleChanged:a},S=>{const{className:x,style:b}=S;return y("div",Object.assign({},O,{className:Z(l,x,f,c,i,d),style:b}),y(D$,Object.assign({keys:v},Sd(s),{motionName:`${s}-show-help-item`,component:!1}),C=>{const{key:$,error:w,errorStatus:P,className:_,style:T}=C;return y("div",{key:$,className:Z(_,{[`${l}-${P}`]:P}),style:T},w)}))}))};var YB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=fe(qi),{getPrefixCls:r,direction:i,requiredMark:o,colon:a,scrollToFirstError:s,className:l,style:c}=rr("form"),{prefixCls:u,className:d,rootClassName:f,size:h,disabled:p=n,form:m,colon:g,labelAlign:v,labelWrap:O,labelCol:S,wrapperCol:x,hideRequiredMark:b,layout:C="horizontal",scrollToFirstError:$,requiredMark:w,onFinishFailed:P,name:_,style:T,feedbackIcons:R,variant:k}=t,I=YB(t,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Q=Dr(h),M=fe(h$),E=ge(()=>w!==void 0?w:b?!1:o!==void 0?o:!0,[b,w,o]),N=g??a,z=r("form",u),L=$r(z),[F,H,V]=P0(z,L),X=Z(z,`${z}-${C}`,{[`${z}-hide-required-mark`]:E===!1,[`${z}-rtl`]:i==="rtl",[`${z}-${Q}`]:Q},V,L,H,l,d,f),[B]=nP(m),{__INTERNAL__:G}=B;G.name=_;const se=ge(()=>({name:_,labelAlign:v,labelCol:S,labelWrap:O,wrapperCol:x,layout:C,colon:N,requiredMark:E,itemRef:G.itemRef,form:B,feedbackIcons:R}),[_,v,S,x,C,N,E,B,R]),re=U(null);Yt(e,()=>{var ie;return Object.assign(Object.assign({},B),{nativeElement:(ie=re.current)===null||ie===void 0?void 0:ie.nativeElement})});const le=(ie,ne)=>{if(ie){let ue={block:"nearest"};typeof ie=="object"&&(ue=Object.assign(Object.assign({},ue),ie)),B.scrollToField(ne,ue)}},me=ie=>{if(P==null||P(ie),ie.errorFields.length){const ne=ie.errorFields[0].name;if($!==void 0){le($,ne);return}s!==void 0&&le(s,ne)}};return F(y(Tw.Provider,{value:k},y(Av,{disabled:p},y(va.Provider,{value:Q},y(Pw,{validateMessages:M},y(uo.Provider,{value:se},y(_w,{status:!0},y(Ds,Object.assign({id:_},I,{name:_,onFinishFailed:me,form:B,ref:re,style:Object.assign(Object.assign({},c),T),className:X})))))))))},KB=Se(UB);function JB(t){if(typeof t=="function")return t;const e=nr(t);return e.length<=1?e[0]:e}const _P=()=>{const{status:t,errors:e=[],warnings:n=[]}=fe(Jr);return{status:t,errors:e,warnings:n}};_P.Context=Jr;function e8(t){const[e,n]=J(t),r=U(null),i=U([]),o=U(!1);be(()=>(o.current=!1,()=>{o.current=!0,Xt.cancel(r.current),r.current=null}),[]);function a(s){o.current||(r.current===null&&(i.current=[],r.current=Xt(()=>{r.current=null,n(l=>{let c=l;return i.current.forEach(u=>{c=u(c)}),c})})),i.current.push(s))}return[e,a]}function t8(){const{itemRef:t}=fe(uo),e=U({});function n(r,i){const o=i&&typeof i=="object"&&Ho(i),a=r.join("_");return(e.current.name!==a||e.current.originRef!==o)&&(e.current.name=a,e.current.originRef=o,e.current.ref=pr(t(r),o)),e.current.ref}return n}const n8=t=>{const{formItemCls:e}=t;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${e}-control`]:{display:"flex"}}}},r8=Qs(["Form","item-item"],(t,{rootPrefixCls:e})=>{const n=wP(t,e);return n8(n)});var i8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,status:n,labelCol:r,wrapperCol:i,children:o,errors:a,warnings:s,_internalItemRender:l,extra:c,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:h,label:p}=t,m=`${e}-item`,g=fe(uo),v=ge(()=>{let I=Object.assign({},i||g.wrapperCol||{});return p===null&&!r&&!i&&g.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(M=>{const E=M?[M]:[],N=si(g.labelCol,E),z=typeof N=="object"?N:{},L=si(I,E),F=typeof L=="object"?L:{};"span"in z&&!("offset"in F)&&z.span{const{labelCol:I,wrapperCol:Q}=g;return i8(g,["labelCol","wrapperCol"])},[g]),x=U(null),[b,C]=J(0);Nt(()=>{c&&x.current?C(x.current.clientHeight):C(0)},[c]);const $=y("div",{className:`${m}-control-input`},y("div",{className:`${m}-control-input-content`},o)),w=ge(()=>({prefixCls:e,status:n}),[e,n]),P=f!==null||a.length||s.length?y(r0.Provider,{value:w},y(PP,{fieldId:d,errors:a,warnings:s,help:u,helpStatus:n,className:`${m}-explain-connected`,onVisibleChanged:h})):null,_={};d&&(_.id=`${d}_extra`);const T=c?y("div",Object.assign({},_,{className:`${m}-extra`,ref:x}),c):null,R=P||T?y("div",{className:`${m}-additional`,style:f?{minHeight:f+b}:{}},P,T):null,k=l&&l.mark==="pro_table_render"&&l.render?l.render(t,{input:$,errorList:P,extra:T}):y(At,null,$,R);return y(uo.Provider,{value:S},y(Mr,Object.assign({},v,{className:O}),k),y(r8,{prefixCls:e}))};var s8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},l8=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:s8}))},c8=Se(l8),u8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var u;const[d]=Ki("Form"),{labelAlign:f,labelCol:h,labelWrap:p,colon:m}=fe(uo);if(!e)return null;const g=r||h||{},v=i||f,O=`${t}-item-label`,S=Z(O,v==="left"&&`${O}-left`,g.className,{[`${O}-wrap`]:!!p});let x=e;const b=o===!0||m!==!1&&o!==!1;b&&!c&&typeof e=="string"&&e.trim()&&(x=e.replace(/[:|:]\s*$/,""));const $=zB(l);if($){const{icon:k=y(c8,null)}=$,I=u8($,["icon"]),Q=y(on,Object.assign({},I),Xn(k,{className:`${t}-item-tooltip`,title:"",onClick:M=>{M.preventDefault()},tabIndex:null}));x=y(At,null,x,Q)}const w=s==="optional",P=typeof s=="function",_=s===!1;P?x=s(x,{required:!!a}):w&&!a&&(x=y(At,null,x,y("span",{className:`${t}-item-optional`,title:""},(d==null?void 0:d.optional)||((u=Zi.Form)===null||u===void 0?void 0:u.optional))));let T;_?T="hidden":(w||P)&&(T="optional");const R=Z({[`${t}-item-required`]:a,[`${t}-item-required-mark-${T}`]:T,[`${t}-item-no-colon`]:!b});return y(Mr,Object.assign({},g,{className:S}),y("label",{htmlFor:n,className:R,title:typeof e=="string"?e:""},x))},f8={success:Pf,warning:Ls,error:zs,validating:yc};function TP({children:t,errors:e,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:o,meta:a,noStyle:s,name:l}){const c=`${o}-item`,{feedbackIcons:u}=fe(uo),d=tP(e,n,a,null,!!r,i),{isFormItemInput:f,status:h,hasFeedback:p,feedbackIcon:m,name:g}=fe(Jr),v=ge(()=>{var O;let S;if(r){const b=r!==!0&&r.icons||u,C=d&&((O=b==null?void 0:b({status:d,errors:e,warnings:n}))===null||O===void 0?void 0:O[d]),$=d&&f8[d];S=C!==!1&&$?y("span",{className:Z(`${c}-feedback-icon`,`${c}-feedback-icon-${d}`)},C||y($,null)):null}const x={status:d||"",errors:e,warnings:n,hasFeedback:!!r,feedbackIcon:S,isFormItemInput:!0,name:l};return s&&(x.status=(d??h)||"",x.isFormItemInput=f,x.hasFeedback=!!(r??p),x.feedbackIcon=r!==void 0?x.feedbackIcon:m,x.name=l??g),x},[d,r,s,f,h]);return y(Jr.Provider,{value:v},t)}var h8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{if(k&&P.current){const F=getComputedStyle(P.current);M(parseInt(F.marginBottom,10))}},[k,I]);const E=F=>{F||M(null)},z=((F=!1)=>{const H=F?_:c.errors,V=F?T:c.warnings;return tP(H,V,c,"",!!u,l)})(),L=Z(x,n,r,{[`${x}-with-help`]:R||_.length||T.length,[`${x}-has-feedback`]:z&&u,[`${x}-has-success`]:z==="success",[`${x}-has-warning`]:z==="warning",[`${x}-has-error`]:z==="error",[`${x}-is-validating`]:z==="validating",[`${x}-hidden`]:d,[`${x}-${$}`]:$});return y("div",{className:L,style:i,ref:P},y(xs,Object.assign({className:`${x}-row`},cn(S,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),y(d8,Object.assign({htmlFor:h},t,{requiredMark:b,required:p??m,prefixCls:e,vertical:w})),y(a8,Object.assign({},t,c,{errors:_,warnings:T,prefixCls:e,status:z,help:o,marginBottom:Q,onErrorVisibleChanged:E}),y(ww.Provider,{value:g},y(TP,{prefixCls:e,meta:c,errors:c.errors,warnings:c.warnings,hasFeedback:u,validateStatus:z,name:O},f)))),!!Q&&y("div",{className:`${x}-margin-offset`,style:{marginBottom:-Q}}))}const m8="__SPLIT__";function g8(t,e){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(i=>{const o=t[i],a=e[i];return o===a||typeof o=="function"||typeof a=="function"})}const v8=Ta(({children:t})=>t,(t,e)=>g8(t.control,e.control)&&t.update===e.update&&t.childProps.length===e.childProps.length&&t.childProps.every((n,r)=>n===e.childProps[r]));function T1(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function O8(t){const{name:e,noStyle:n,className:r,dependencies:i,prefixCls:o,shouldUpdate:a,rules:s,children:l,required:c,label:u,messageVariables:d,trigger:f="onChange",validateTrigger:h,hidden:p,help:m,layout:g}=t,{getPrefixCls:v}=fe(it),{name:O}=fe(uo),S=JB(l),x=typeof S=="function",b=fe(ww),{validateTrigger:C}=fe(ya),$=h!==void 0?h:C,w=e!=null,P=v("form",o),_=$r(P),[T,R,k]=P0(P,_);bc();const I=fe(Hl),Q=U(null),[M,E]=e8({}),[N,z]=Oa(()=>T1()),L=se=>{const re=I==null?void 0:I.getKey(se.name);if(z(se.destroy?T1():se,!0),n&&m!==!1&&b){let le=se.name;if(se.destroy)le=Q.current||le;else if(re!==void 0){const[me,ie]=re;le=[me].concat($e(ie)),Q.current=le}b(se,le)}},F=(se,re)=>{E(le=>{const me=Object.assign({},le),ne=[].concat($e(se.name.slice(0,-1)),$e(re)).join(m8);return se.destroy?delete me[ne]:me[ne]=se,me})},[H,V]=ge(()=>{const se=$e(N.errors),re=$e(N.warnings);return Object.values(M).forEach(le=>{se.push.apply(se,$e(le.errors||[])),re.push.apply(re,$e(le.warnings||[]))}),[se,re]},[M,N.errors,N.warnings]),X=t8();function B(se,re,le){return n&&!p?y(TP,{prefixCls:P,hasFeedback:t.hasFeedback,validateStatus:t.validateStatus,meta:N,errors:H,warnings:V,noStyle:!0,name:e},se):y(p8,Object.assign({key:"row"},t,{className:Z(r,k,_,R),prefixCls:P,fieldId:re,isRequired:le,errors:H,warnings:V,meta:N,onSubItemMetaChange:F,layout:g,name:e}),se)}if(!w&&!x&&!i)return T(B(S));let G={};return typeof u=="string"?G.label=u:e&&(G.label=String(e)),d&&(G=Object.assign(Object.assign({},G),d)),T(y(t0,Object.assign({},t,{messageVariables:G,trigger:f,validateTrigger:$,onMetaChange:L}),(se,re,le)=>{const me=$l(e).length&&re?re.name:[],ie=eP(me,O),ne=c!==void 0?c:!!(s!=null&&s.some(j=>{if(j&&typeof j=="object"&&j.required&&!j.warningOnly)return!0;if(typeof j=="function"){const ee=j(le);return(ee==null?void 0:ee.required)&&!(ee!=null&&ee.warningOnly)}return!1})),ue=Object.assign({},se);let de=null;if(Array.isArray(S)&&w)de=S;else if(!(x&&(!(a||i)||w))){if(!(i&&!x&&!w))if(Kt(S)){const j=Object.assign(Object.assign({},S.props),ue);if(j.id||(j.id=ie),m||H.length>0||V.length>0||t.extra){const ve=[];(m||H.length>0)&&ve.push(`${ie}_help`),t.extra&&ve.push(`${ie}_extra`),j["aria-describedby"]=ve.join(" ")}H.length>0&&(j["aria-invalid"]="true"),ne&&(j["aria-required"]="true"),vo(S)&&(j.ref=X(me,S)),new Set([].concat($e($l(f)),$e($l($)))).forEach(ve=>{j[ve]=(...Y)=>{var ce,te,Oe,ye,pe;(Oe=ue[ve])===null||Oe===void 0||(ce=Oe).call.apply(ce,[ue].concat(Y)),(pe=(ye=S.props)[ve])===null||pe===void 0||(te=pe).call.apply(te,[ye].concat(Y))}});const he=[j["aria-required"],j["aria-invalid"],j["aria-describedby"]];de=y(v8,{control:ue,update:S,childProps:he},fr(S,j))}else x&&(a||i)&&!w?de=S(le):de=S}return B(de,ie,ne)}))}const kP=O8;kP.useStatus=_P;var b8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,children:n}=t,r=b8(t,["prefixCls","children"]);const{getPrefixCls:i}=fe(it),o=i("form",e),a=ge(()=>({prefixCls:o,status:"error"}),[o]);return y(Sw,Object.assign({},r),(s,l,c)=>y(r0.Provider,{value:a},n(s.map(u=>Object.assign(Object.assign({},u),{fieldKey:u.key})),l,{errors:c.errors,warnings:c.warnings})))};function S8(){const{form:t}=fe(uo);return t}const yr=KB;yr.Item=kP;yr.List=y8;yr.ErrorList=PP;yr.useForm=nP;yr.useFormInstance=S8;yr.useWatch=$w;yr.Provider=Pw;yr.create=()=>{};var x8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},C8=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:x8}))},$8=Se(C8);const w8=t=>{const{getPrefixCls:e,direction:n}=fe(it),{prefixCls:r,className:i}=t,o=e("input-group",r),a=e("input"),[s,l,c]=uP(a),u=Z(o,c,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:n==="rtl"},l,i),d=fe(Jr),f=ge(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return s(y("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},y(Jr.Provider,{value:f},t.children)))},P8=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:t.colorText},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},_8=Zt(["Input","OTP"],t=>{const e=kt(t,Gf(t));return P8(e)},Yf);var T8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{className:n,value:r,onChange:i,onActiveChange:o,index:a,mask:s}=t,l=T8(t,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=fe(it),u=c("otp"),d=typeof s=="string"?s:r,f=U(null);Yt(e,()=>f.current);const h=g=>{i(a,g.target.value)},p=()=>{Xt(()=>{var g;const v=(g=f.current)===null||g===void 0?void 0:g.input;document.activeElement===v&&v&&v.select()})},m=g=>{const{key:v,ctrlKey:O,metaKey:S}=g;v==="ArrowLeft"?o(a-1):v==="ArrowRight"?o(a+1):v==="z"&&(O||S)?g.preventDefault():v==="Backspace"&&!r&&o(a-1),p()};return y("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&y("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},d),y(Kf,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:f,value:r,onInput:h,onFocus:p,onKeyDown:m,onMouseDown:p,onMouseUp:p,className:Z(n,{[`${u}-mask-input`]:s})})))});var R8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{index:e,prefixCls:n,separator:r}=t,i=typeof r=="function"?r(e):r;return i?y("span",{className:`${n}-separator`},i):null},M8=Se((t,e)=>{const{prefixCls:n,length:r=6,size:i,defaultValue:o,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:h,mask:p,type:m,onInput:g,inputMode:v}=t,O=R8(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:S,direction:x}=fe(it),b=S("otp",n),C=$i(O,{aria:!0,data:!0,attr:!0}),[$,w,P]=_8(b),_=Dr(X=>i??X),T=fe(Jr),R=Wf(T.status,f),k=ge(()=>Object.assign(Object.assign({},T),{status:R,hasFeedback:!1,feedbackIcon:null}),[T,R]),I=U(null),Q=U({});Yt(e,()=>({focus:()=>{var X;(X=Q.current[0])===null||X===void 0||X.focus()},blur:()=>{var X;for(let B=0;Bl?l(X):X,[E,N]=J(()=>au(M(o||"")));be(()=>{a!==void 0&&N(au(a))},[a]);const z=pn(X=>{N(X),g&&g(X),s&&X.length===r&&X.every(B=>B)&&X.some((B,G)=>E[G]!==B)&&s(X.join(""))}),L=pn((X,B)=>{let G=$e(E);for(let re=0;re=0&&!G[re];re-=1)G.pop();const se=M(G.map(re=>re||" ").join(""));return G=au(se).map((re,le)=>re===" "&&!G[le]?G[le]:re),G}),F=(X,B)=>{var G;const se=L(X,B),re=Math.min(X+B.length,r-1);re!==X&&se[X]!==void 0&&((G=Q.current[re])===null||G===void 0||G.focus()),z(se)},H=X=>{var B;(B=Q.current[X])===null||B===void 0||B.focus()},V={variant:u,disabled:d,status:R,mask:p,type:m,inputMode:v};return $(y("div",Object.assign({},C,{ref:I,className:Z(b,{[`${b}-sm`]:_==="small",[`${b}-lg`]:_==="large",[`${b}-rtl`]:x==="rtl"},P,w),role:"group"}),y(Jr.Provider,{value:k},Array.from({length:r}).map((X,B)=>{const G=`otp-${B}`,se=E[B]||"";return y(At,{key:G},y(k8,Object.assign({ref:re=>{Q.current[B]=re},index:B,size:_,htmlSize:1,className:`${b}-input`,onChange:F,value:se,onActiveChange:H,autoFocus:B===0&&h},V)),By(t?$8:Q8,null),L8={click:"onClick",hover:"onMouseOver"},j8=Se((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:i=!0,iconRender:o=z8,suffix:a}=t,s=fe(qi),l=n??s,c=typeof i=="object"&&i.visible!==void 0,[u,d]=J(()=>c?i.visible:!1),f=U(null);be(()=>{c&&d(i.visible)},[c,i]);const h=xP(f),p=()=>{var T;if(l)return;u&&h();const R=!u;d(R),typeof i=="object"&&((T=i.onVisibleChange)===null||T===void 0||T.call(i,R))},m=T=>{const R=L8[r]||"",k=o(u),I={[R]:p,className:`${T}-icon`,key:"passwordIcon",onMouseDown:Q=>{Q.preventDefault()},onMouseUp:Q=>{Q.preventDefault()}};return Xn(Kt(k)?k:y("span",null,k),I)},{className:g,prefixCls:v,inputPrefixCls:O,size:S}=t,x=N8(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:b}=fe(it),C=b("input",O),$=b("input-password",v),w=i&&m($),P=Z($,g,{[`${$}-${S}`]:!!S}),_=Object.assign(Object.assign({},cn(x,["suffix","iconRender","visibilityToggle"])),{type:u?"text":"password",className:P,prefixCls:C,suffix:y(At,null,w,a)});return S&&(_.size=S),y(Kf,Object.assign({ref:pr(e,f)},_))});var D8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,inputPrefixCls:r,className:i,size:o,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:h,onCompositionEnd:p,variant:m,onPressEnter:g}=t,v=D8(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:O,direction:S}=fe(it),x=U(!1),b=O("input-search",n),C=O("input",r),{compactSize:$}=js(b,S),w=Dr(V=>{var X;return(X=o??$)!==null&&X!==void 0?X:V}),P=U(null),_=V=>{V!=null&&V.target&&V.type==="click"&&d&&d(V.target.value,V,{source:"clear"}),f==null||f(V)},T=V=>{var X;document.activeElement===((X=P.current)===null||X===void 0?void 0:X.input)&&V.preventDefault()},R=V=>{var X,B;d&&d((B=(X=P.current)===null||X===void 0?void 0:X.input)===null||B===void 0?void 0:B.value,V,{source:"input"})},k=V=>{x.current||c||(g==null||g(V),R(V))},I=typeof s=="boolean"?y(b2,null):null,Q=`${b}-button`;let M;const E=s||{},N=E.type&&E.type.__ANT_BUTTON===!0;N||E.type==="button"?M=fr(E,Object.assign({onMouseDown:T,onClick:V=>{var X,B;(B=(X=E==null?void 0:E.props)===null||X===void 0?void 0:X.onClick)===null||B===void 0||B.call(X,V),R(V)},key:"enterButton"},N?{className:Q,size:w}:{})):M=y(vt,{className:Q,color:s?"primary":"default",size:w,disabled:u,key:"enterButton",onMouseDown:T,onClick:R,loading:c,icon:I,variant:m==="borderless"||m==="filled"||m==="underlined"?"text":s?"solid":void 0},s),l&&(M=[M,fr(l,{key:"addonAfter"})]);const z=Z(b,{[`${b}-rtl`]:S==="rtl",[`${b}-${w}`]:!!w,[`${b}-with-button`]:!!s},i),L=V=>{x.current=!0,h==null||h(V)},F=V=>{x.current=!1,p==null||p(V)},H=Object.assign(Object.assign({},v),{className:z,prefixCls:C,type:"search",size:w,variant:m,onPressEnter:k,onCompositionStart:L,onCompositionEnd:F,addonAfter:M,suffix:a,onChange:_,disabled:u});return y(Kf,Object.assign({ref:pr(P,e)},H))});var W8=` + ${r}-col-xl-24${n}-label`]:ta(t)},[`@media (max-width: ${q(t.screenXSMax)})`]:[ZB(t),{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:ta(t)}}}],[`@media (max-width: ${q(t.screenSMMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:ta(t)}}},[`@media (max-width: ${q(t.screenMDMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:ta(t)}}},[`@media (max-width: ${q(t.screenLGMax)})`]:{[e]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:ta(t)}}}}},GB=t=>({labelRequiredMarkColor:t.colorError,labelColor:t.colorTextHeading,labelFontSize:t.fontSize,labelHeight:t.controlHeight,labelColonMarginInlineStart:t.marginXXS/2,labelColonMarginInlineEnd:t.marginXS,itemMarginBottom:t.marginLG,verticalLabelPadding:`0 0 ${t.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),wP=(t,e)=>kt(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:e}),_0=Zt("Form",(t,{rootPrefixCls:e})=>{const n=wP(t,e);return[FB(n),VB(n),BB(n),HB(n),XB(n),qB(n),Vv(n),Gv]},GB,{order:-1e3}),T1=[];function Yh(t,e,n,r=0){return{key:typeof t=="string"?t:`${e}-${r}`,error:t,errorStatus:n}}const PP=({help:t,helpStatus:e,errors:n=T1,warnings:r=T1,className:i,fieldId:o,onVisibleChanged:a})=>{const{prefixCls:s}=de(i0),l=`${s}-item-explain`,c=wr(s),[u,d,f]=_0(s,c),h=me(()=>Cd(s),[s]),p=Ad(n),m=Ad(r),g=me(()=>t!=null?[Yh(t,"help",e)]:[].concat(Pe(p.map((S,C)=>Yh(S,"error","error",C))),Pe(m.map((S,C)=>Yh(S,"warning","warning",C)))),[t,e,p,m]),v=me(()=>{const S={};return g.forEach(({key:C})=>{S[C]=(S[C]||0)+1}),g.map((C,b)=>Object.assign(Object.assign({},C),{key:S[C.key]>1?`${C.key}-fallback-${b}`:C.key}))},[g]),O={};return o&&(O.id=`${o}_help`),u(y(mi,{motionDeadline:h.motionDeadline,motionName:`${s}-show-help`,visible:!!v.length,onVisibleChanged:a},S=>{const{className:C,style:b}=S;return y("div",Object.assign({},O,{className:Z(l,C,f,c,i,d),style:b}),y(D$,Object.assign({keys:v},Cd(s),{motionName:`${s}-show-help-item`,component:!1}),x=>{const{key:$,error:w,errorStatus:P,className:_,style:T}=x;return y("div",{key:$,className:Z(_,{[`${l}-${P}`]:P}),style:T},w)}))}))};var YB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const n=de(qi),{getPrefixCls:r,direction:i,requiredMark:o,colon:a,scrollToFirstError:s,className:l,style:c}=ir("form"),{prefixCls:u,className:d,rootClassName:f,size:h,disabled:p=n,form:m,colon:g,labelAlign:v,labelWrap:O,labelCol:S,wrapperCol:C,hideRequiredMark:b,layout:x="horizontal",scrollToFirstError:$,requiredMark:w,onFinishFailed:P,name:_,style:T,feedbackIcons:k,variant:R}=t,I=YB(t,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Q=Dr(h),E=de(h$),A=me(()=>w!==void 0?w:b?!1:o!==void 0?o:!0,[b,w,o]),N=g??a,L=r("form",u),z=wr(L),[V,X,F]=_0(L,z),H=Z(L,`${L}-${x}`,{[`${L}-hide-required-mark`]:A===!1,[`${L}-rtl`]:i==="rtl",[`${L}-${Q}`]:Q},F,z,X,l,d,f),[B]=nP(m),{__INTERNAL__:G}=B;G.name=_;const se=me(()=>({name:_,labelAlign:v,labelCol:S,labelWrap:O,wrapperCol:C,layout:x,colon:N,requiredMark:A,itemRef:G.itemRef,form:B,feedbackIcons:k}),[_,v,S,C,x,N,A,B,k]),ie=Y(null);Yt(e,()=>{var ne;return Object.assign(Object.assign({},B),{nativeElement:(ne=ie.current)===null||ne===void 0?void 0:ne.nativeElement})});const le=(ne,ee)=>{if(ne){let ce={block:"nearest"};typeof ne=="object"&&(ce=Object.assign(Object.assign({},ce),ne)),B.scrollToField(ee,ce)}},pe=ne=>{if(P==null||P(ne),ne.errorFields.length){const ee=ne.errorFields[0].name;if($!==void 0){le($,ee);return}s!==void 0&&le(s,ee)}};return V(y(Tw.Provider,{value:R},y(Qv,{disabled:p},y(ba.Provider,{value:Q},y(Pw,{validateMessages:E},y(uo.Provider,{value:se},y(_w,{status:!0},y(Ds,Object.assign({id:_},I,{name:_,onFinishFailed:pe,form:B,ref:ie,style:Object.assign(Object.assign({},c),T),className:H})))))))))},KB=ye(UB);function JB(t){if(typeof t=="function")return t;const e=rr(t);return e.length<=1?e[0]:e}const _P=()=>{const{status:t,errors:e=[],warnings:n=[]}=de(ei);return{status:t,errors:e,warnings:n}};_P.Context=ei;function e8(t){const[e,n]=K(t),r=Y(null),i=Y([]),o=Y(!1);be(()=>(o.current=!1,()=>{o.current=!0,Xt.cancel(r.current),r.current=null}),[]);function a(s){o.current||(r.current===null&&(i.current=[],r.current=Xt(()=>{r.current=null,n(l=>{let c=l;return i.current.forEach(u=>{c=u(c)}),c})})),i.current.push(s))}return[e,a]}function t8(){const{itemRef:t}=de(uo),e=Y({});function n(r,i){const o=i&&typeof i=="object"&&Xo(i),a=r.join("_");return(e.current.name!==a||e.current.originRef!==o)&&(e.current.name=a,e.current.originRef=o,e.current.ref=mr(t(r),o)),e.current.ref}return n}const n8=t=>{const{formItemCls:e}=t;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${e}-control`]:{display:"flex"}}}},r8=Qs(["Form","item-item"],(t,{rootPrefixCls:e})=>{const n=wP(t,e);return n8(n)});var i8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,status:n,labelCol:r,wrapperCol:i,children:o,errors:a,warnings:s,_internalItemRender:l,extra:c,help:u,fieldId:d,marginBottom:f,onErrorVisibleChanged:h,label:p}=t,m=`${e}-item`,g=de(uo),v=me(()=>{let I=Object.assign({},i||g.wrapperCol||{});return p===null&&!r&&!i&&g.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(E=>{const A=E?[E]:[],N=li(g.labelCol,A),L=typeof N=="object"?N:{},z=li(I,A),V=typeof z=="object"?z:{};"span"in L&&!("offset"in V)&&L.span{const{labelCol:I,wrapperCol:Q}=g;return i8(g,["labelCol","wrapperCol"])},[g]),C=Y(null),[b,x]=K(0);Nt(()=>{c&&C.current?x(C.current.clientHeight):x(0)},[c]);const $=y("div",{className:`${m}-control-input`},y("div",{className:`${m}-control-input-content`},o)),w=me(()=>({prefixCls:e,status:n}),[e,n]),P=f!==null||a.length||s.length?y(i0.Provider,{value:w},y(PP,{fieldId:d,errors:a,warnings:s,help:u,helpStatus:n,className:`${m}-explain-connected`,onVisibleChanged:h})):null,_={};d&&(_.id=`${d}_extra`);const T=c?y("div",Object.assign({},_,{className:`${m}-extra`,ref:C}),c):null,k=P||T?y("div",{className:`${m}-additional`,style:f?{minHeight:f+b}:{}},P,T):null,R=l&&l.mark==="pro_table_render"&&l.render?l.render(t,{input:$,errorList:P,extra:T}):y(At,null,$,k);return y(uo.Provider,{value:S},y(Hn,Object.assign({},v,{className:O}),R),y(r8,{prefixCls:e}))};var s8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},l8=function(e,n){return y(Rt,xe({},e,{ref:n,icon:s8}))},c8=ye(l8),u8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var u;const[d]=Ki("Form"),{labelAlign:f,labelCol:h,labelWrap:p,colon:m}=de(uo);if(!e)return null;const g=r||h||{},v=i||f,O=`${t}-item-label`,S=Z(O,v==="left"&&`${O}-left`,g.className,{[`${O}-wrap`]:!!p});let C=e;const b=o===!0||m!==!1&&o!==!1;b&&!c&&typeof e=="string"&&e.trim()&&(C=e.replace(/[:|:]\s*$/,""));const $=zB(l);if($){const{icon:R=y(c8,null)}=$,I=u8($,["icon"]),Q=y(Kt,Object.assign({},I),Zn(R,{className:`${t}-item-tooltip`,title:"",onClick:E=>{E.preventDefault()},tabIndex:null}));C=y(At,null,C,Q)}const w=s==="optional",P=typeof s=="function",_=s===!1;P?C=s(C,{required:!!a}):w&&!a&&(C=y(At,null,C,y("span",{className:`${t}-item-optional`,title:""},(d==null?void 0:d.optional)||((u=Zi.Form)===null||u===void 0?void 0:u.optional))));let T;_?T="hidden":(w||P)&&(T="optional");const k=Z({[`${t}-item-required`]:a,[`${t}-item-required-mark-${T}`]:T,[`${t}-item-no-colon`]:!b});return y(Hn,Object.assign({},g,{className:S}),y("label",{htmlFor:n,className:k,title:typeof e=="string"?e:""},C))},f8={success:Tf,warning:Ls,error:zs,validating:yc};function TP({children:t,errors:e,warnings:n,hasFeedback:r,validateStatus:i,prefixCls:o,meta:a,noStyle:s,name:l}){const c=`${o}-item`,{feedbackIcons:u}=de(uo),d=tP(e,n,a,null,!!r,i),{isFormItemInput:f,status:h,hasFeedback:p,feedbackIcon:m,name:g}=de(ei),v=me(()=>{var O;let S;if(r){const b=r!==!0&&r.icons||u,x=d&&((O=b==null?void 0:b({status:d,errors:e,warnings:n}))===null||O===void 0?void 0:O[d]),$=d&&f8[d];S=x!==!1&&$?y("span",{className:Z(`${c}-feedback-icon`,`${c}-feedback-icon-${d}`)},x||y($,null)):null}const C={status:d||"",errors:e,warnings:n,hasFeedback:!!r,feedbackIcon:S,isFormItemInput:!0,name:l};return s&&(C.status=(d??h)||"",C.isFormItemInput=f,C.hasFeedback=!!(r??p),C.feedbackIcon=r!==void 0?C.feedbackIcon:m,C.name=l??g),C},[d,r,s,f,h]);return y(ei.Provider,{value:v},t)}var h8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{if(R&&P.current){const V=getComputedStyle(P.current);E(parseInt(V.marginBottom,10))}},[R,I]);const A=V=>{V||E(null)},L=((V=!1)=>{const X=V?_:c.errors,F=V?T:c.warnings;return tP(X,F,c,"",!!u,l)})(),z=Z(C,n,r,{[`${C}-with-help`]:k||_.length||T.length,[`${C}-has-feedback`]:L&&u,[`${C}-has-success`]:L==="success",[`${C}-has-warning`]:L==="warning",[`${C}-has-error`]:L==="error",[`${C}-is-validating`]:L==="validating",[`${C}-hidden`]:d,[`${C}-${$}`]:$});return y("div",{className:z,style:i,ref:P},y(ha,Object.assign({className:`${C}-row`},cn(S,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),y(d8,Object.assign({htmlFor:h},t,{requiredMark:b,required:p??m,prefixCls:e,vertical:w})),y(a8,Object.assign({},t,c,{errors:_,warnings:T,prefixCls:e,status:L,help:o,marginBottom:Q,onErrorVisibleChanged:A}),y(ww.Provider,{value:g},y(TP,{prefixCls:e,meta:c,errors:c.errors,warnings:c.warnings,hasFeedback:u,validateStatus:L,name:O},f)))),!!Q&&y("div",{className:`${C}-margin-offset`,style:{marginBottom:-Q}}))}const m8="__SPLIT__";function g8(t,e){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(i=>{const o=t[i],a=e[i];return o===a||typeof o=="function"||typeof a=="function"})}const v8=Ra(({children:t})=>t,(t,e)=>g8(t.control,e.control)&&t.update===e.update&&t.childProps.length===e.childProps.length&&t.childProps.every((n,r)=>n===e.childProps[r]));function k1(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function O8(t){const{name:e,noStyle:n,className:r,dependencies:i,prefixCls:o,shouldUpdate:a,rules:s,children:l,required:c,label:u,messageVariables:d,trigger:f="onChange",validateTrigger:h,hidden:p,help:m,layout:g}=t,{getPrefixCls:v}=de(at),{name:O}=de(uo),S=JB(l),C=typeof S=="function",b=de(ww),{validateTrigger:x}=de(xa),$=h!==void 0?h:x,w=e!=null,P=v("form",o),_=wr(P),[T,k,R]=_0(P,_);bc();const I=de(Hl),Q=Y(null),[E,A]=e8({}),[N,L]=ya(()=>k1()),z=se=>{const ie=I==null?void 0:I.getKey(se.name);if(L(se.destroy?k1():se,!0),n&&m!==!1&&b){let le=se.name;if(se.destroy)le=Q.current||le;else if(ie!==void 0){const[pe,ne]=ie;le=[pe].concat(Pe(ne)),Q.current=le}b(se,le)}},V=(se,ie)=>{A(le=>{const pe=Object.assign({},le),ee=[].concat(Pe(se.name.slice(0,-1)),Pe(ie)).join(m8);return se.destroy?delete pe[ee]:pe[ee]=se,pe})},[X,F]=me(()=>{const se=Pe(N.errors),ie=Pe(N.warnings);return Object.values(E).forEach(le=>{se.push.apply(se,Pe(le.errors||[])),ie.push.apply(ie,Pe(le.warnings||[]))}),[se,ie]},[E,N.errors,N.warnings]),H=t8();function B(se,ie,le){return n&&!p?y(TP,{prefixCls:P,hasFeedback:t.hasFeedback,validateStatus:t.validateStatus,meta:N,errors:X,warnings:F,noStyle:!0,name:e},se):y(p8,Object.assign({key:"row"},t,{className:Z(r,R,_,k),prefixCls:P,fieldId:ie,isRequired:le,errors:X,warnings:F,meta:N,onSubItemMetaChange:V,layout:g,name:e}),se)}if(!w&&!C&&!i)return T(B(S));let G={};return typeof u=="string"?G.label=u:e&&(G.label=String(e)),d&&(G=Object.assign(Object.assign({},G),d)),T(y(n0,Object.assign({},t,{messageVariables:G,trigger:f,validateTrigger:$,onMetaChange:z}),(se,ie,le)=>{const pe=$l(e).length&&ie?ie.name:[],ne=eP(pe,O),ee=c!==void 0?c:!!(s!=null&&s.some(j=>{if(j&&typeof j=="object"&&j.required&&!j.warningOnly)return!0;if(typeof j=="function"){const J=j(le);return(J==null?void 0:J.required)&&!(J!=null&&J.warningOnly)}return!1})),ce=Object.assign({},se);let ue=null;if(Array.isArray(S)&&w)ue=S;else if(!(C&&(!(a||i)||w))){if(!(i&&!C&&!w))if(Jt(S)){const j=Object.assign(Object.assign({},S.props),ce);if(j.id||(j.id=ne),m||X.length>0||F.length>0||t.extra){const ge=[];(m||X.length>0)&&ge.push(`${ne}_help`),t.extra&&ge.push(`${ne}_extra`),j["aria-describedby"]=ge.join(" ")}X.length>0&&(j["aria-invalid"]="true"),ee&&(j["aria-required"]="true"),vo(S)&&(j.ref=H(pe,S)),new Set([].concat(Pe($l(f)),Pe($l($)))).forEach(ge=>{j[ge]=(...$e)=>{var Te,Ce,Ie,_e,ve;(Ie=ce[ge])===null||Ie===void 0||(Te=Ie).call.apply(Te,[ce].concat($e)),(ve=(_e=S.props)[ge])===null||ve===void 0||(Ce=ve).call.apply(Ce,[_e].concat($e))}});const he=[j["aria-required"],j["aria-invalid"],j["aria-describedby"]];ue=y(v8,{control:ce,update:S,childProps:he},hr(S,j))}else C&&(a||i)&&!w?ue=S(le):ue=S}return B(ue,ne,ee)}))}const kP=O8;kP.useStatus=_P;var b8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{prefixCls:e,children:n}=t,r=b8(t,["prefixCls","children"]);const{getPrefixCls:i}=de(at),o=i("form",e),a=me(()=>({prefixCls:o,status:"error"}),[o]);return y(Sw,Object.assign({},r),(s,l,c)=>y(i0.Provider,{value:a},n(s.map(u=>Object.assign(Object.assign({},u),{fieldKey:u.key})),l,{errors:c.errors,warnings:c.warnings})))};function S8(){const{form:t}=de(uo);return t}const Sr=KB;Sr.Item=kP;Sr.List=y8;Sr.ErrorList=PP;Sr.useForm=nP;Sr.useFormInstance=S8;Sr.useWatch=$w;Sr.Provider=Pw;Sr.create=()=>{};var x8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},C8=function(e,n){return y(Rt,xe({},e,{ref:n,icon:x8}))},$8=ye(C8);const w8=t=>{const{getPrefixCls:e,direction:n}=de(at),{prefixCls:r,className:i}=t,o=e("input-group",r),a=e("input"),[s,l,c]=uP(a),u=Z(o,c,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:n==="rtl"},l,i),d=de(ei),f=me(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return s(y("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},y(ei.Provider,{value:f},t.children)))},P8=t=>{const{componentCls:e,paddingXS:n}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:t.colorText},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},_8=Zt(["Input","OTP"],t=>{const e=kt(t,Uf(t));return P8(e)},Kf);var T8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{className:n,value:r,onChange:i,onActiveChange:o,index:a,mask:s}=t,l=T8(t,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=de(at),u=c("otp"),d=typeof s=="string"?s:r,f=Y(null);Yt(e,()=>f.current);const h=g=>{i(a,g.target.value)},p=()=>{Xt(()=>{var g;const v=(g=f.current)===null||g===void 0?void 0:g.input;document.activeElement===v&&v&&v.select()})},m=g=>{const{key:v,ctrlKey:O,metaKey:S}=g;v==="ArrowLeft"?o(a-1):v==="ArrowRight"?o(a+1):v==="z"&&(O||S)?g.preventDefault():v==="Backspace"&&!r&&o(a-1),p()};return y("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&r!==""&&r!==void 0&&y("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},d),y(eh,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:f,value:r,onInput:h,onFocus:p,onKeyDown:m,onMouseDown:p,onMouseUp:p,className:Z(n,{[`${u}-mask-input`]:s})})))});var R8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{index:e,prefixCls:n,separator:r}=t,i=typeof r=="function"?r(e):r;return i?y("span",{className:`${n}-separator`},i):null},M8=ye((t,e)=>{const{prefixCls:n,length:r=6,size:i,defaultValue:o,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:h,mask:p,type:m,onInput:g,inputMode:v}=t,O=R8(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:S,direction:C}=de(at),b=S("otp",n),x=$i(O,{aria:!0,data:!0,attr:!0}),[$,w,P]=_8(b),_=Dr(H=>i??H),T=de(ei),k=Vf(T.status,f),R=me(()=>Object.assign(Object.assign({},T),{status:k,hasFeedback:!1,feedbackIcon:null}),[T,k]),I=Y(null),Q=Y({});Yt(e,()=>({focus:()=>{var H;(H=Q.current[0])===null||H===void 0||H.focus()},blur:()=>{var H;for(let B=0;Bl?l(H):H,[A,N]=K(()=>su(E(o||"")));be(()=>{a!==void 0&&N(su(a))},[a]);const L=pn(H=>{N(H),g&&g(H),s&&H.length===r&&H.every(B=>B)&&H.some((B,G)=>A[G]!==B)&&s(H.join(""))}),z=pn((H,B)=>{let G=Pe(A);for(let ie=0;ie=0&&!G[ie];ie-=1)G.pop();const se=E(G.map(ie=>ie||" ").join(""));return G=su(se).map((ie,le)=>ie===" "&&!G[le]?G[le]:ie),G}),V=(H,B)=>{var G;const se=z(H,B),ie=Math.min(H+B.length,r-1);ie!==H&&se[H]!==void 0&&((G=Q.current[ie])===null||G===void 0||G.focus()),L(se)},X=H=>{var B;(B=Q.current[H])===null||B===void 0||B.focus()},F={variant:u,disabled:d,status:k,mask:p,type:m,inputMode:v};return $(y("div",Object.assign({},x,{ref:I,className:Z(b,{[`${b}-sm`]:_==="small",[`${b}-lg`]:_==="large",[`${b}-rtl`]:C==="rtl"},P,w),role:"group"}),y(ei.Provider,{value:R},Array.from({length:r}).map((H,B)=>{const G=`otp-${B}`,se=A[B]||"";return y(At,{key:G},y(k8,Object.assign({ref:ie=>{Q.current[B]=ie},index:B,size:_,htmlSize:1,className:`${b}-input`,onChange:V,value:se,onActiveChange:X,autoFocus:B===0&&h},F)),By(t?$8:Q8,null),L8={click:"onClick",hover:"onMouseOver"},j8=ye((t,e)=>{const{disabled:n,action:r="click",visibilityToggle:i=!0,iconRender:o=z8,suffix:a}=t,s=de(qi),l=n??s,c=typeof i=="object"&&i.visible!==void 0,[u,d]=K(()=>c?i.visible:!1),f=Y(null);be(()=>{c&&d(i.visible)},[c,i]);const h=xP(f),p=()=>{var T;if(l)return;u&&h();const k=!u;d(k),typeof i=="object"&&((T=i.onVisibleChange)===null||T===void 0||T.call(i,k))},m=T=>{const k=L8[r]||"",R=o(u),I={[k]:p,className:`${T}-icon`,key:"passwordIcon",onMouseDown:Q=>{Q.preventDefault()},onMouseUp:Q=>{Q.preventDefault()}};return Zn(Jt(R)?R:y("span",null,R),I)},{className:g,prefixCls:v,inputPrefixCls:O,size:S}=t,C=N8(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:b}=de(at),x=b("input",O),$=b("input-password",v),w=i&&m($),P=Z($,g,{[`${$}-${S}`]:!!S}),_=Object.assign(Object.assign({},cn(C,["suffix","iconRender","visibilityToggle"])),{type:u?"text":"password",className:P,prefixCls:x,suffix:y(At,null,w,a)});return S&&(_.size=S),y(eh,Object.assign({ref:mr(e,f)},_))});var D8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,inputPrefixCls:r,className:i,size:o,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:h,onCompositionEnd:p,variant:m,onPressEnter:g}=t,v=D8(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:O,direction:S}=de(at),C=Y(!1),b=O("input-search",n),x=O("input",r),{compactSize:$}=js(b,S),w=Dr(F=>{var H;return(H=o??$)!==null&&H!==void 0?H:F}),P=Y(null),_=F=>{F!=null&&F.target&&F.type==="click"&&d&&d(F.target.value,F,{source:"clear"}),f==null||f(F)},T=F=>{var H;document.activeElement===((H=P.current)===null||H===void 0?void 0:H.input)&&F.preventDefault()},k=F=>{var H,B;d&&d((B=(H=P.current)===null||H===void 0?void 0:H.input)===null||B===void 0?void 0:B.value,F,{source:"input"})},R=F=>{C.current||c||(g==null||g(F),k(F))},I=typeof s=="boolean"?y(b2,null):null,Q=`${b}-button`;let E;const A=s||{},N=A.type&&A.type.__ANT_BUTTON===!0;N||A.type==="button"?E=hr(A,Object.assign({onMouseDown:T,onClick:F=>{var H,B;(B=(H=A==null?void 0:A.props)===null||H===void 0?void 0:H.onClick)===null||B===void 0||B.call(H,F),k(F)},key:"enterButton"},N?{className:Q,size:w}:{})):E=y(vt,{className:Q,color:s?"primary":"default",size:w,disabled:u,key:"enterButton",onMouseDown:T,onClick:k,loading:c,icon:I,variant:m==="borderless"||m==="filled"||m==="underlined"?"text":s?"solid":void 0},s),l&&(E=[E,hr(l,{key:"addonAfter"})]);const L=Z(b,{[`${b}-rtl`]:S==="rtl",[`${b}-${w}`]:!!w,[`${b}-with-button`]:!!s},i),z=F=>{C.current=!0,h==null||h(F)},V=F=>{C.current=!1,p==null||p(F)},X=Object.assign(Object.assign({},v),{className:L,prefixCls:x,type:"search",size:w,variant:m,onPressEnter:R,onCompositionStart:z,onCompositionEnd:V,addonAfter:E,suffix:a,onChange:_,disabled:u});return y(eh,Object.assign({ref:mr(P,e)},X))});var W8=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -272,15 +272,15 @@ html body { top:0 !important; right:0 !important; pointer-events: none !important; -`,F8=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Yh={},Vr;function V8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Yh[n])return Yh[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=F8.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return e&&n&&(Yh[n]=l),l}function H8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Vr||(Vr=document.createElement("textarea"),Vr.setAttribute("tab-index","-1"),Vr.setAttribute("aria-hidden","true"),Vr.setAttribute("name","hiddenTextarea"),document.body.appendChild(Vr)),t.getAttribute("wrap")?Vr.setAttribute("wrap",t.getAttribute("wrap")):Vr.removeAttribute("wrap");var i=V8(t,e),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;Vr.setAttribute("style","".concat(l,";").concat(W8)),Vr.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=Vr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=o),n!==null||r!==null){Vr.value=" ";var h=Vr.scrollHeight-o;n!==null&&(c=h*n,s==="border-box"&&(c=c+o+a),f=Math.max(c,f)),r!==null&&(u=h*r,s==="border-box"&&(u=u+o+a),d=f>u?"":"hidden",f=Math.min(u,f))}var p={height:f,overflowY:d,resize:"none"};return c&&(p.minHeight=c),u&&(p.maxHeight=u),p}var X8=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Uh=0,Kh=1,Jh=2,Z8=Se(function(t,e){var n=t,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange;n.onInternalAutoSize;var f=ut(n,X8),h=_n(i,{value:o,postState:function(V){return V??""}}),p=ae(h,2),m=p[0],g=p[1],v=function(V){g(V.target.value),d==null||d(V)},O=U();Yt(e,function(){return{textArea:O.current}});var S=ge(function(){return a&&Je(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),x=ae(S,2),b=x[0],C=x[1],$=!!a,w=J(Jh),P=ae(w,2),_=P[0],T=P[1],R=J(),k=ae(R,2),I=k[0],Q=k[1],M=function(){T(Uh)};Nt(function(){$&&M()},[o,b,C,$]),Nt(function(){if(_===Uh)T(Kh);else if(_===Kh){var H=H8(O.current,!1,b,C);T(Jh),Q(H)}},[_]);var E=U(),N=function(){Xt.cancel(E.current)},z=function(V){_===Jh&&(s==null||s(V),a&&(N(),E.current=Xt(function(){M()})))};be(function(){return N},[]);var L=$?I:null,F=W(W({},c),L);return(_===Uh||_===Kh)&&(F.overflowY="hidden",F.overflowX="hidden"),y(Kr,{onResize:z,disabled:!(a||s)},y("textarea",Ce({},f,{ref:O,style:F,className:Z(r,l,D({},"".concat(r,"-disabled"),u)),disabled:u,value:m,onChange:v})))}),q8=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],G8=oe.forwardRef(function(t,e){var n,r=t.defaultValue,i=t.value,o=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,f=t.suffix,h=t.prefixCls,p=h===void 0?"rc-textarea":h,m=t.showCount,g=t.count,v=t.className,O=t.style,S=t.disabled,x=t.hidden,b=t.classNames,C=t.styles,$=t.onResize,w=t.onClear,P=t.onPressEnter,_=t.readOnly,T=t.autoSize,R=t.onKeyDown,k=ut(t,q8),I=_n(r,{value:i,defaultValue:r}),Q=ae(I,2),M=Q[0],E=Q[1],N=M==null?"":String(M),z=oe.useState(!1),L=ae(z,2),F=L[0],H=L[1],V=oe.useRef(!1),X=oe.useState(null),B=ae(X,2),G=B[0],se=B[1],re=U(null),le=U(null),me=function(){var ke;return(ke=le.current)===null||ke===void 0?void 0:ke.textArea},ie=function(){me().focus()};Yt(e,function(){var Be;return{resizableTextArea:le.current,focus:ie,blur:function(){me().blur()},nativeElement:((Be=re.current)===null||Be===void 0?void 0:Be.nativeElement)||me()}}),be(function(){H(function(Be){return!S&&Be})},[S]);var ne=oe.useState(null),ue=ae(ne,2),de=ue[0],j=ue[1];oe.useEffect(function(){if(de){var Be;(Be=me()).setSelectionRange.apply(Be,$e(de))}},[de]);var ee=yP(g,m),he=(n=ee.max)!==null&&n!==void 0?n:c,ve=Number(he)>0,Y=ee.strategy(N),ce=!!he&&Y>he,te=function(ke,Xe){var _e=Xe;!V.current&&ee.exceedFormatter&&ee.max&&ee.strategy(Xe)>ee.max&&(_e=ee.exceedFormatter(Xe,{max:ee.max}),Xe!==_e&&j([me().selectionStart||0,me().selectionEnd||0])),E(_e),Id(ke.currentTarget,ke,s,_e)},Oe=function(ke){V.current=!0,u==null||u(ke)},ye=function(ke){V.current=!1,te(ke,ke.currentTarget.value),d==null||d(ke)},pe=function(ke){te(ke,ke.target.value)},Qe=function(ke){ke.key==="Enter"&&P&&P(ke),R==null||R(ke)},Me=function(ke){H(!0),o==null||o(ke)},De=function(ke){H(!1),a==null||a(ke)},we=function(ke){E(""),ie(),Id(me(),ke,s)},Ie=f,rt;ee.show&&(ee.showFormatter?rt=ee.showFormatter({value:N,count:Y,maxLength:he}):rt="".concat(Y).concat(ve?" / ".concat(he):""),Ie=oe.createElement(oe.Fragment,null,Ie,oe.createElement("span",{className:Z("".concat(p,"-data-count"),b==null?void 0:b.count),style:C==null?void 0:C.count},rt)));var Ye=function(ke){var Xe;$==null||$(ke),(Xe=me())!==null&&Xe!==void 0&&Xe.style.height&&se(!0)},lt=!T&&!m&&!l;return oe.createElement(bP,{ref:re,value:N,allowClear:l,handleReset:we,suffix:Ie,prefixCls:p,classNames:W(W({},b),{},{affixWrapper:Z(b==null?void 0:b.affixWrapper,D(D({},"".concat(p,"-show-count"),m),"".concat(p,"-textarea-allow-clear"),l))}),disabled:S,focused:F,className:Z(v,ce&&"".concat(p,"-out-of-range")),style:W(W({},O),G&&!lt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof rt=="string"?rt:void 0}},hidden:x,readOnly:_,onClear:w},oe.createElement(Z8,Ce({},k,{autoSize:T,maxLength:c,onKeyDown:Qe,onChange:pe,onFocus:Me,onBlur:De,onCompositionStart:Oe,onCompositionEnd:ye,className:Z(b==null?void 0:b.textarea),style:W(W({},C==null?void 0:C.textarea),{},{resize:O==null?void 0:O.resize}),disabled:S,prefixCls:p,onResize:Ye,ref:le,readOnly:_})))});const Y8=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` +`,F8=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Uh={},Vr;function V8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Uh[n])return Uh[n];var r=window.getComputedStyle(t),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=F8.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return e&&n&&(Uh[n]=l),l}function H8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Vr||(Vr=document.createElement("textarea"),Vr.setAttribute("tab-index","-1"),Vr.setAttribute("aria-hidden","true"),Vr.setAttribute("name","hiddenTextarea"),document.body.appendChild(Vr)),t.getAttribute("wrap")?Vr.setAttribute("wrap",t.getAttribute("wrap")):Vr.removeAttribute("wrap");var i=V8(t,e),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;Vr.setAttribute("style","".concat(l,";").concat(W8)),Vr.value=t.value||t.placeholder||"";var c=void 0,u=void 0,d,f=Vr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=o),n!==null||r!==null){Vr.value=" ";var h=Vr.scrollHeight-o;n!==null&&(c=h*n,s==="border-box"&&(c=c+o+a),f=Math.max(c,f)),r!==null&&(u=h*r,s==="border-box"&&(u=u+o+a),d=f>u?"":"hidden",f=Math.min(u,f))}var p={height:f,overflowY:d,resize:"none"};return c&&(p.minHeight=c),u&&(p.maxHeight=u),p}var X8=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Kh=0,Jh=1,ep=2,Z8=ye(function(t,e){var n=t,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange;n.onInternalAutoSize;var f=dt(n,X8),h=_n(i,{value:o,postState:function(F){return F??""}}),p=ae(h,2),m=p[0],g=p[1],v=function(F){g(F.target.value),d==null||d(F)},O=Y();Yt(e,function(){return{textArea:O.current}});var S=me(function(){return a&&tt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),C=ae(S,2),b=C[0],x=C[1],$=!!a,w=K(ep),P=ae(w,2),_=P[0],T=P[1],k=K(),R=ae(k,2),I=R[0],Q=R[1],E=function(){T(Kh)};Nt(function(){$&&E()},[o,b,x,$]),Nt(function(){if(_===Kh)T(Jh);else if(_===Jh){var X=H8(O.current,!1,b,x);T(ep),Q(X)}},[_]);var A=Y(),N=function(){Xt.cancel(A.current)},L=function(F){_===ep&&(s==null||s(F),a&&(N(),A.current=Xt(function(){E()})))};be(function(){return N},[]);var z=$?I:null,V=W(W({},c),z);return(_===Kh||_===Jh)&&(V.overflowY="hidden",V.overflowX="hidden"),y(Jr,{onResize:L,disabled:!(a||s)},y("textarea",xe({},f,{ref:O,style:V,className:Z(r,l,D({},"".concat(r,"-disabled"),u)),disabled:u,value:m,onChange:v})))}),q8=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],G8=oe.forwardRef(function(t,e){var n,r=t.defaultValue,i=t.value,o=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,d=t.onCompositionEnd,f=t.suffix,h=t.prefixCls,p=h===void 0?"rc-textarea":h,m=t.showCount,g=t.count,v=t.className,O=t.style,S=t.disabled,C=t.hidden,b=t.classNames,x=t.styles,$=t.onResize,w=t.onClear,P=t.onPressEnter,_=t.readOnly,T=t.autoSize,k=t.onKeyDown,R=dt(t,q8),I=_n(r,{value:i,defaultValue:r}),Q=ae(I,2),E=Q[0],A=Q[1],N=E==null?"":String(E),L=oe.useState(!1),z=ae(L,2),V=z[0],X=z[1],F=oe.useRef(!1),H=oe.useState(null),B=ae(H,2),G=B[0],se=B[1],ie=Y(null),le=Y(null),pe=function(){var Me;return(Me=le.current)===null||Me===void 0?void 0:Me.textArea},ne=function(){pe().focus()};Yt(e,function(){var Ae;return{resizableTextArea:le.current,focus:ne,blur:function(){pe().blur()},nativeElement:((Ae=ie.current)===null||Ae===void 0?void 0:Ae.nativeElement)||pe()}}),be(function(){X(function(Ae){return!S&&Ae})},[S]);var ee=oe.useState(null),ce=ae(ee,2),ue=ce[0],j=ce[1];oe.useEffect(function(){if(ue){var Ae;(Ae=pe()).setSelectionRange.apply(Ae,Pe(ue))}},[ue]);var J=yP(g,m),he=(n=J.max)!==null&&n!==void 0?n:c,ge=Number(he)>0,$e=J.strategy(N),Te=!!he&&$e>he,Ce=function(Me,Fe){var Re=Fe;!F.current&&J.exceedFormatter&&J.max&&J.strategy(Fe)>J.max&&(Re=J.exceedFormatter(Fe,{max:J.max}),Fe!==Re&&j([pe().selectionStart||0,pe().selectionEnd||0])),A(Re),Ed(Me.currentTarget,Me,s,Re)},Ie=function(Me){F.current=!0,u==null||u(Me)},_e=function(Me){F.current=!1,Ce(Me,Me.currentTarget.value),d==null||d(Me)},ve=function(Me){Ce(Me,Me.target.value)},Ne=function(Me){Me.key==="Enter"&&P&&P(Me),k==null||k(Me)},ze=function(Me){X(!0),o==null||o(Me)},re=function(Me){X(!1),a==null||a(Me)},fe=function(Me){A(""),ne(),Ed(pe(),Me,s)},te=f,Oe;J.show&&(J.showFormatter?Oe=J.showFormatter({value:N,count:$e,maxLength:he}):Oe="".concat($e).concat(ge?" / ".concat(he):""),te=oe.createElement(oe.Fragment,null,te,oe.createElement("span",{className:Z("".concat(p,"-data-count"),b==null?void 0:b.count),style:x==null?void 0:x.count},Oe)));var we=function(Me){var Fe;$==null||$(Me),(Fe=pe())!==null&&Fe!==void 0&&Fe.style.height&&se(!0)},Ke=!T&&!m&&!l;return oe.createElement(bP,{ref:ie,value:N,allowClear:l,handleReset:fe,suffix:te,prefixCls:p,classNames:W(W({},b),{},{affixWrapper:Z(b==null?void 0:b.affixWrapper,D(D({},"".concat(p,"-show-count"),m),"".concat(p,"-textarea-allow-clear"),l))}),disabled:S,focused:V,className:Z(v,Te&&"".concat(p,"-out-of-range")),style:W(W({},O),G&&!Ke?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Oe=="string"?Oe:void 0}},hidden:C,readOnly:_,onClear:w},oe.createElement(Z8,xe({},R,{autoSize:T,maxLength:c,onKeyDown:Ne,onChange:ve,onFocus:ze,onBlur:re,onCompositionStart:Ie,onCompositionEnd:_e,className:Z(b==null?void 0:b.textarea),style:W(W({},x==null?void 0:x.textarea),{},{resize:O==null?void 0:O.resize}),disabled:S,prefixCls:p,onResize:we,ref:le,readOnly:_})))});const Y8=t=>{const{componentCls:e,paddingLG:n}=t,r=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` &-allow-clear > ${e}, &-affix-wrapper${r}-has-feedback ${e} - `]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},U8=Zt(["Input","TextArea"],t=>{const e=kt(t,Gf(t));return Y8(e)},Yf,{resetFont:!1});var K8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:h,variant:p,showCount:m,onMouseDown:g,onResize:v}=t,O=K8(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:S,direction:x,allowClear:b,autoComplete:C,className:$,style:w,classNames:P,styles:_}=rr("textArea"),T=fe(qi),R=a??T,{status:k,hasFeedback:I,feedbackIcon:Q}=fe(Jr),M=Wf(k,s),E=U(null);Yt(e,()=>{var ee;return{resizableTextArea:(ee=E.current)===null||ee===void 0?void 0:ee.resizableTextArea,focus:he=>{var ve,Y;OP((Y=(ve=E.current)===null||ve===void 0?void 0:ve.resizableTextArea)===null||Y===void 0?void 0:Y.textArea,he)},blur:()=>{var he;return(he=E.current)===null||he===void 0?void 0:he.blur()}}});const N=S("input",r),z=$r(N),[L,F,H]=cP(N,u),[V]=U8(N,z),{compactSize:X,compactItemClassnames:B}=js(N,x),G=Dr(ee=>{var he;return(he=o??X)!==null&&he!==void 0?he:ee}),[se,re]=Ff("textArea",p,i),le=SP(l??b),[me,ie]=J(!1),[ne,ue]=J(!1),de=ee=>{ie(!0),g==null||g(ee);const he=()=>{ie(!1),document.removeEventListener("mouseup",he)};document.addEventListener("mouseup",he)},j=ee=>{var he,ve;if(v==null||v(ee),me&&typeof getComputedStyle=="function"){const Y=(ve=(he=E.current)===null||he===void 0?void 0:he.nativeElement)===null||ve===void 0?void 0:ve.querySelector("textarea");Y&&getComputedStyle(Y).resize==="both"&&ue(!0)}};return L(V(y(G8,Object.assign({autoComplete:C},O,{style:Object.assign(Object.assign({},w),f),styles:Object.assign(Object.assign({},_),h),disabled:R,allowClear:le,className:Z(H,z,d,u,B,$,ne&&`${N}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),P),{textarea:Z({[`${N}-sm`]:G==="small",[`${N}-lg`]:G==="large"},F,c==null?void 0:c.textarea,P.textarea,me&&`${N}-mouse-active`),variant:Z({[`${N}-${se}`]:re},Pd(N,M)),affixWrapper:Z(`${N}-textarea-affix-wrapper`,{[`${N}-affix-wrapper-rtl`]:x==="rtl",[`${N}-affix-wrapper-sm`]:G==="small",[`${N}-affix-wrapper-lg`]:G==="large",[`${N}-textarea-show-count`]:m||((n=t.count)===null||n===void 0?void 0:n.show)},F)}),prefixCls:N,suffix:I&&y("span",{className:`${N}-textarea-suffix`},Q),showCount:m,ref:E,onResize:j,onMouseDown:de}))))}),bi=Kf;bi.Group=w8;bi.Search=B8;bi.TextArea=RP;bi.Password=j8;bi.OTP=M8;function J8(t,e,n){return typeof n=="boolean"?n:t.length?!0:nr(e).some(i=>i.type===Y2)}var IP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iSe((o,a)=>y(r,Object.assign({ref:a,suffixCls:t,tagName:e},o)))}const _0=Se((t,e)=>{const{prefixCls:n,suffixCls:r,className:i,tagName:o}=t,a=IP(t,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:s}=fe(it),l=s("layout",n),[c,u,d]=G2(l),f=r?`${l}-${r}`:l;return c(y(o,Object.assign({className:Z(n||f,i,u,d),ref:e},a)))}),e7=Se((t,e)=>{const{direction:n}=fe(it),[r,i]=J([]),{prefixCls:o,className:a,rootClassName:s,children:l,hasSider:c,tagName:u,style:d}=t,f=IP(t,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=cn(f,["suffixCls"]),{getPrefixCls:p,className:m,style:g}=rr("layout"),v=p("layout",o),O=J8(r,l,c),[S,x,b]=G2(v),C=Z(v,{[`${v}-has-sider`]:O,[`${v}-rtl`]:n==="rtl"},m,a,s,x,b),$=ge(()=>({siderHook:{addSider:w=>{i(P=>[].concat($e(P),[w]))},removeSider:w=>{i(P=>P.filter(_=>_!==w))}}}),[]);return S(y(X2.Provider,{value:$},y(u,Object.assign({ref:e,className:C,style:Object.assign(Object.assign({},g),d)},h),l)))}),t7=Jf({tagName:"div",displayName:"Layout"})(e7),n7=Jf({suffixCls:"header",tagName:"header",displayName:"Header"})(_0),r7=Jf({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(_0),i7=Jf({suffixCls:"content",tagName:"main",displayName:"Content"})(_0),Zr=t7;Zr.Header=n7;Zr.Footer=r7;Zr.Content=i7;Zr.Sider=Y2;Zr._InternalSiderContext=Zf;const Ed=100,MP=Ed/5,EP=Ed/2-MP/2,ep=EP*2*Math.PI,k1=50,R1=t=>{const{dotClassName:e,style:n,hasCircleCls:r}=t;return y("circle",{className:Z(`${e}-circle`,{[`${e}-circle-bg`]:r}),r:EP,cx:k1,cy:k1,strokeWidth:MP,style:n})},o7=({percent:t,prefixCls:e})=>{const n=`${e}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[o,a]=J(!1);Nt(()=>{t!==0&&a(!0)},[t!==0]);const s=Math.max(Math.min(t,100),0);if(!o)return null;const l={strokeDashoffset:`${ep/4}`,strokeDasharray:`${ep*s/100} ${ep*(100-s)/100}`};return y("span",{className:Z(r,`${n}-progress`,s<=0&&i)},y("svg",{viewBox:`0 0 ${Ed} ${Ed}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},y(R1,{dotClassName:n,hasCircleCls:!0}),y(R1,{dotClassName:n,style:l})))};function a7(t){const{prefixCls:e,percent:n=0}=t,r=`${e}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return y(At,null,y("span",{className:Z(i,n>0&&o)},y("span",{className:Z(r,`${e}-dot-spin`)},[1,2,3,4].map(a=>y("i",{className:`${e}-dot-item`,key:a})))),y(o7,{prefixCls:e,percent:n}))}function s7(t){var e;const{prefixCls:n,indicator:r,percent:i}=t,o=`${n}-dot`;return r&&Kt(r)?fr(r,{className:Z((e=r.props)===null||e===void 0?void 0:e.className,o),percent:i}):y(a7,{prefixCls:n,percent:i})}const l7=new _t("antSpinMove",{to:{opacity:1}}),c7=new _t("antRotate",{to:{transform:"rotate(405deg)"}}),u7=t=>{const{componentCls:e,calc:n}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"absolute",display:"none",color:t.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${e}-text`]:{fontSize:t.fontSize,paddingTop:n(n(t.dotSize).sub(t.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:t.colorBgMask,zIndex:t.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${t.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[e]:{[`${e}-dot-holder`]:{color:t.colorWhite},[`${e}-text`]:{color:t.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${e}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${e}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(t.dotSize).mul(-1).div(2).equal()},[`${e}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${e}-dot`]:{margin:n(t.dotSizeSM).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeSM).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${e}-dot`]:{margin:n(t.dotSizeLG).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeLG).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${e}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${e}-dot-holder`]:{width:"1em",height:"1em",fontSize:t.dotSize,display:"inline-block",transition:`transform ${t.motionDurationSlow} ease, opacity ${t.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:t.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${e}-dot-progress`]:{position:"absolute",inset:0},[`${e}-dot`]:{position:"relative",display:"inline-block",fontSize:t.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),height:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:l7,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:c7,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${t.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:t.colorFillSecondary}},[`&-sm ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeSM}},[`&-sm ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal(),height:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal()}},[`&-lg ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeLG}},[`&-lg ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal(),height:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal()}},[`&${e}-show-text ${e}-text`]:{display:"block"}})}},d7=t=>{const{controlHeightLG:e,controlHeight:n}=t;return{contentHeight:400,dotSize:e/2,dotSizeSM:e*.35,dotSizeLG:n}},f7=Zt("Spin",t=>{const e=kt(t,{spinDotDefault:t.colorTextDescription});return u7(e)},d7),h7=200,I1=[[30,.05],[70,.03],[96,.01]];function p7(t,e){const[n,r]=J(0),i=U(null),o=e==="auto";return be(()=>(o&&t&&(r(0),i.current=setInterval(()=>{r(a=>{const s=100-a;for(let l=0;l{clearInterval(i.current)}),[o,t]),o?n:e}var m7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:a,size:s="default",tip:l,wrapperClassName:c,style:u,children:d,fullscreen:f=!1,indicator:h,percent:p}=t,m=m7(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:g,direction:v,className:O,style:S,indicator:x}=rr("spin"),b=g("spin",n),[C,$,w]=f7(b),[P,_]=J(()=>r&&!g7(r,i)),T=p7(P,p);be(()=>{if(r){const N=pB(i,()=>{_(!0)});return N(),()=>{var z;(z=N==null?void 0:N.cancel)===null||z===void 0||z.call(N)}}_(!1)},[i,r]);const R=ge(()=>typeof d<"u"&&!f,[d,f]),k=Z(b,O,{[`${b}-sm`]:s==="small",[`${b}-lg`]:s==="large",[`${b}-spinning`]:P,[`${b}-show-text`]:!!l,[`${b}-rtl`]:v==="rtl"},o,!f&&a,$,w),I=Z(`${b}-container`,{[`${b}-blur`]:P}),Q=(e=h??x)!==null&&e!==void 0?e:AP,M=Object.assign(Object.assign({},S),u),E=y("div",Object.assign({},m,{style:M,className:k,"aria-live":"polite","aria-busy":P}),y(s7,{prefixCls:b,indicator:Q,percent:T}),l&&(R||f)?y("div",{className:`${b}-text`},l):null);return C(R?y("div",Object.assign({},m,{className:Z(`${b}-nested-loading`,c,$,w)}),P&&y("div",{key:"loading"},E),y("div",{className:I,key:"container"},d)):f?y("div",{className:Z(`${b}-fullscreen`,{[`${b}-fullscreen-show`]:P},a,$,w)},E):E)};QP.setDefaultIndicator=t=>{AP=t};const v7=(t,e=!1)=>e&&t==null?[]:Array.isArray(t)?t:[t];var O7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,closeIcon:r,closable:i,type:o,title:a,children:s,footer:l}=t,c=O7(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=fe(it),d=u(),f=e||u("modal"),h=$r(d),[p,m,g]=Qw(f,h),v=`${f}-confirm`;let O={};return o?O={closable:i??!1,title:"",footer:"",children:y(zw,Object.assign({},t,{prefixCls:f,confirmPrefixCls:v,rootPrefixCls:d,content:s}))}:O={closable:i??!0,title:a,footer:l!==null&&y(Iw,Object.assign({},t)),children:s},p(y(mw,Object.assign({prefixCls:f,className:Z(m,`${f}-pure-panel`,o&&v,o&&`${v}-${o}`,n,g,h)},c,{closeIcon:Rw(f,r),closable:i},O)))},y7=Kw(b7);function NP(t){return Pc(Bw(t))}const ur=Nw;ur.useModal=dN;ur.info=function(e){return Pc(Ww(e))};ur.success=function(e){return Pc(Fw(e))};ur.error=function(e){return Pc(Vw(e))};ur.warning=NP;ur.warn=NP;ur.confirm=function(e){return Pc(Hw(e))};ur.destroyAll=function(){for(;sa.length;){const e=sa.pop();e&&e()}};ur.config=aN;ur._InternalPanelDoNotUseOrYouWillBeFired=y7;let vi=null,qu=t=>t(),Ad=[],ql={};function M1(){const{getContainer:t,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}=ql,s=(t==null?void 0:t())||document.body;return{getContainer:()=>s,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}}const S7=oe.forwardRef((t,e)=>{const{notificationConfig:n,sync:r}=t,{getPrefixCls:i}=fe(it),o=ql.prefixCls||i("notification"),a=fe(AN),[s,l]=Uw(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),a.notification));return oe.useEffect(r,[]),oe.useImperativeHandle(e,()=>{const c=Object.assign({},s);return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),s[u].apply(s,d))}),{instance:c,sync:r}}),l}),x7=oe.forwardRef((t,e)=>{const[n,r]=oe.useState(M1),i=()=>{r(M1)};oe.useEffect(i,[]);const o=V$(),a=o.getRootPrefixCls(),s=o.getIconPrefixCls(),l=o.getTheme(),c=oe.createElement(S7,{ref:e,sync:i,notificationConfig:n});return oe.createElement(Gr,{prefixCls:a,iconPrefixCls:s,theme:l},o.holderRender?o.holderRender(c):c)}),T0=()=>{if(!vi){const t=document.createDocumentFragment(),e={fragment:t};vi=e,qu(()=>{jv()(oe.createElement(x7,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!e.instance&&i&&(e.instance=i,e.sync=o,T0())})}}),t)});return}vi.instance&&(Ad.forEach(t=>{switch(t.type){case"open":{qu(()=>{vi.instance.open(Object.assign(Object.assign({},ql),t.config))});break}case"destroy":qu(()=>{var e;(e=vi==null?void 0:vi.instance)===null||e===void 0||e.destroy(t.key)});break}}),Ad=[])};function C7(t){ql=Object.assign(Object.assign({},ql),t),qu(()=>{var e;(e=vi==null?void 0:vi.sync)===null||e===void 0||e.call(vi)})}function zP(t){Ad.push({type:"open",config:t}),T0()}const $7=t=>{Ad.push({type:"destroy",key:t}),T0()},w7=["success","info","warning","error"],P7={open:zP,destroy:$7,config:C7,useNotification:EN,_InternalPanelDoNotUseOrYouWillBeFired:CN},ar=P7;w7.forEach(t=>{ar[t]=e=>zP(Object.assign(Object.assign({},e),{type:t}))});const _7=t=>{const{componentCls:e,iconCls:n,antCls:r,zIndexPopup:i,colorText:o,colorWarning:a,marginXXS:s,marginXS:l,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=t;return{[e]:{zIndex:i,[`&${r}-popover`]:{fontSize:c},[`${e}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${n}`]:{color:a,fontSize:c,lineHeight:1,marginInlineEnd:l},[`${e}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${e}-description`]:{marginTop:s,color:o}},[`${e}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}},T7=t=>{const{zIndexPopupBase:e}=t;return{zIndexPopup:e+60}},LP=Zt("Popconfirm",t=>_7(t),T7,{resetStyle:!1});var k7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,okButtonProps:n,cancelButtonProps:r,title:i,description:o,cancelText:a,okText:s,okType:l="primary",icon:c=y(Ls,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:h,onPopupClick:p}=t,{getPrefixCls:m}=fe(it),[g]=Ki("Popconfirm",Zi.Popconfirm),v=Ss(i),O=Ss(o);return y("div",{className:`${e}-inner-content`,onClick:p},y("div",{className:`${e}-message`},c&&y("span",{className:`${e}-message-icon`},c),y("div",{className:`${e}-message-text`},v&&y("div",{className:`${e}-title`},v),O&&y("div",{className:`${e}-description`},O))),y("div",{className:`${e}-buttons`},u&&y(vt,Object.assign({onClick:h,size:"small"},r),a||(g==null?void 0:g.cancelText)),y(Uv,{buttonProps:Object.assign(Object.assign({size:"small"},Bv(l)),n),actionFn:f,close:d,prefixCls:m("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},s||(g==null?void 0:g.okText))))},R7=t=>{const{prefixCls:e,placement:n,className:r,style:i}=t,o=k7(t,["prefixCls","placement","className","style"]),{getPrefixCls:a}=fe(it),s=a("popconfirm",e),[l]=LP(s);return l(y(E2,{placement:n,className:Z(s,r),style:i,content:y(jP,Object.assign({prefixCls:s},o))}))};var I7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,placement:o="top",trigger:a="click",okType:s="primary",icon:l=y(Ls,null),children:c,overlayClassName:u,onOpenChange:d,onVisibleChange:f,overlayStyle:h,styles:p,classNames:m}=t,g=I7(t,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:v,className:O,style:S,classNames:x,styles:b}=rr("popconfirm"),[C,$]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),w=(E,N)=>{$(E,!0),f==null||f(E),d==null||d(E,N)},P=E=>{w(!1,E)},_=E=>{var N;return(N=t.onConfirm)===null||N===void 0?void 0:N.call(void 0,E)},T=E=>{var N;w(!1,E),(N=t.onCancel)===null||N===void 0||N.call(void 0,E)},R=(E,N)=>{const{disabled:z=!1}=t;z||w(E,N)},k=v("popconfirm",i),I=Z(k,O,u,x.root,m==null?void 0:m.root),Q=Z(x.body,m==null?void 0:m.body),[M]=LP(k);return M(y(h0,Object.assign({},cn(g,["title"]),{trigger:a,placement:o,onOpenChange:R,open:C,ref:e,classNames:{root:I,body:Q},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),S),h),p==null?void 0:p.root),body:Object.assign(Object.assign({},b.body),p==null?void 0:p.body)},content:y(jP,Object.assign({okType:s,icon:l},t,{prefixCls:k,close:P,onConfirm:_,onCancel:T})),"data-popover-inject":!0}),c))}),DP=M7;DP._InternalPanelDoNotUseOrYouWillBeFired=R7;var E7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},A7=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:E7}))},wl=Se(A7),Q7=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],BP=Se(function(t,e){var n,r=t.prefixCls,i=r===void 0?"rc-switch":r,o=t.className,a=t.checked,s=t.defaultChecked,l=t.disabled,c=t.loadingIcon,u=t.checkedChildren,d=t.unCheckedChildren,f=t.onClick,h=t.onChange,p=t.onKeyDown,m=ut(t,Q7),g=_n(!1,{value:a,defaultValue:s}),v=ae(g,2),O=v[0],S=v[1];function x(w,P){var _=O;return l||(_=w,S(_),h==null||h(_,P)),_}function b(w){w.which===je.LEFT?x(!1,w):w.which===je.RIGHT&&x(!0,w),p==null||p(w)}function C(w){var P=x(!O,w);f==null||f(P,w)}var $=Z(i,o,(n={},D(n,"".concat(i,"-checked"),O),D(n,"".concat(i,"-disabled"),l),n));return y("button",Ce({},m,{type:"button",role:"switch","aria-checked":O,disabled:l,className:$,ref:e,onKeyDown:b,onClick:C}),c,y("span",{className:"".concat(i,"-inner")},y("span",{className:"".concat(i,"-inner-checked")},u),y("span",{className:"".concat(i,"-inner-unchecked")},d)))});BP.displayName="Switch";const N7=t=>{const{componentCls:e,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:s,calc:l}=t,c=`${e}-inner`,u=q(l(s).add(l(r).mul(2)).equal()),d=q(l(a).mul(2).equal());return{[e]:{[`&${e}-small`]:{minWidth:i,height:n,lineHeight:q(n),[`${e}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:s,height:s},[`${e}-loading-icon`]:{top:l(l(s).sub(t.switchLoadingIconSize)).div(2).equal(),fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${q(l(s).add(r).equal())})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(t.marginXXS).div(2).equal(),marginInlineEnd:l(t.marginXXS).mul(-1).div(2).equal()}},[`&${e}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(t.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(t.marginXXS).div(2).equal()}}}}}}},z7=t=>{const{componentCls:e,handleSize:n,calc:r}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:r(r(n).sub(t.fontSize)).div(2).equal(),color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},L7=t=>{const{componentCls:e,trackPadding:n,handleBg:r,handleShadow:i,handleSize:o,calc:a}=t,s=`${e}-handle`;return{[e]:{[s]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${s}`]:{insetInlineStart:`calc(100% - ${q(a(o).add(n).equal())})`},[`&:not(${e}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},j7=t=>{const{componentCls:e,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:s}=t,l=`${e}-inner`,c=q(s(a).add(s(r).mul(2)).equal()),u=q(s(o).mul(2).equal());return{[e]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${l}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(r).mul(2).equal(),marginInlineEnd:s(r).mul(-1).mul(2).equal()}},[`&${e}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(r).mul(-1).mul(2).equal(),marginInlineEnd:s(r).mul(2).equal()}}}}}},D7=t=>{const{componentCls:e,trackHeight:n,trackMinWidth:r}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:q(n),verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),Ci(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},B7=t=>{const{fontSize:e,lineHeight:n,controlHeight:r,colorWhite:i}=t,o=e*n,a=r/2,s=2,l=o-s*2,c=a-s*2;return{trackHeight:o,trackHeightSM:a,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:i,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Dt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},W7=Zt("Switch",t=>{const e=kt(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:t.calc(t.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[D7(e),j7(e),L7(e),z7(e),N7(e)]},B7);var F7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,size:r,disabled:i,loading:o,className:a,rootClassName:s,style:l,checked:c,value:u,defaultChecked:d,defaultValue:f,onChange:h}=t,p=F7(t,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[m,g]=_n(!1,{value:c??u,defaultValue:d??f}),{getPrefixCls:v,direction:O,switch:S}=fe(it),x=fe(qi),b=(i??x)||o,C=v("switch",n),$=y("div",{className:`${C}-handle`},o&&y(yc,{className:`${C}-loading-icon`})),[w,P,_]=W7(C),T=Dr(r),R=Z(S==null?void 0:S.className,{[`${C}-small`]:T==="small",[`${C}-loading`]:o,[`${C}-rtl`]:O==="rtl"},a,s,P,_),k=Object.assign(Object.assign({},S==null?void 0:S.style),l);return w(y(Dv,{component:"Switch",disabled:b},y(BP,Object.assign({},p,{checked:m,onChange:(...Q)=>{g(Q[0]),h==null||h.apply(void 0,Q)},prefixCls:C,className:R,style:k,disabled:b,ref:e,loadingIcon:$}))))}),Oi=V7;Oi.__ANT_SWITCH=!0;const H7=t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:o}=t,a=o(r).sub(n).equal(),s=o(e).sub(n).equal();return{[i]:Object.assign(Object.assign({},wn(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:a,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:t.tagIconSize,color:t.colorIcon,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},k0=t=>{const{lineWidth:e,fontSizeIcon:n,calc:r}=t,i=t.fontSizeSM;return kt(t,{tagFontSize:i,tagLineHeight:q(r(t.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(e).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.defaultBg})},R0=t=>({defaultBg:new Dt(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText}),WP=Zt("Tag",t=>{const e=k0(t);return H7(e)},R0);var X7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,style:r,className:i,checked:o,children:a,icon:s,onChange:l,onClick:c}=t,u=X7(t,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:d,tag:f}=fe(it),h=S=>{l==null||l(!o),c==null||c(S)},p=d("tag",n),[m,g,v]=WP(p),O=Z(p,`${p}-checkable`,{[`${p}-checkable-checked`]:o},f==null?void 0:f.className,i,g,v);return m(y("span",Object.assign({},u,{ref:e,style:Object.assign(Object.assign({},r),f==null?void 0:f.style),className:O,onClick:h}),s,y("span",null,a)))}),q7=t=>k$(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:o})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:o,borderColor:o},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}})),G7=Qs(["Tag","preset"],t=>{const e=k0(t);return q7(e)},R0);function Y7(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}const su=(t,e,n)=>{const r=Y7(n);return{[`${t.componentCls}${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${r}Bg`],borderColor:t[`color${r}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}},U7=Qs(["Tag","status"],t=>{const e=k0(t);return[su(e,"success","Success"),su(e,"processing","Info"),su(e,"error","Error"),su(e,"warning","Warning")]},R0);var K7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,className:r,rootClassName:i,style:o,children:a,icon:s,color:l,onClose:c,bordered:u=!0,visible:d}=t,f=K7(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:h,direction:p,tag:m}=fe(it),[g,v]=J(!0),O=cn(f,["closeIcon","closable"]);be(()=>{d!==void 0&&v(d)},[d]);const S=k2(l),x=vL(l),b=S||x,C=Object.assign(Object.assign({backgroundColor:l&&!b?l:void 0},m==null?void 0:m.style),o),$=h("tag",n),[w,P,_]=WP($),T=Z($,m==null?void 0:m.className,{[`${$}-${l}`]:b,[`${$}-has-color`]:l&&!b,[`${$}-hidden`]:!g,[`${$}-rtl`]:p==="rtl",[`${$}-borderless`]:!u},r,i,P,_),R=N=>{N.stopPropagation(),c==null||c(N),!N.defaultPrevented&&v(!1)},[,k]=kw($d(t),$d(m),{closable:!1,closeIconRender:N=>{const z=y("span",{className:`${$}-close-icon`,onClick:R},N);return zv(N,z,L=>({onClick:F=>{var H;(H=L==null?void 0:L.onClick)===null||H===void 0||H.call(L,F),R(F)},className:Z(L==null?void 0:L.className,`${$}-close-icon`)}))}}),I=typeof f.onClick=="function"||a&&a.type==="a",Q=s||null,M=Q?y(At,null,Q,a&&y("span",null,a)):a,E=y("span",Object.assign({},O,{ref:e,className:T,style:C}),M,k,S&&y(G7,{key:"preset",prefixCls:$}),x&&y(U7,{key:"status",prefixCls:$}));return w(I?y(Dv,{component:"Tag"},E):E)}),Ka=J7;Ka.CheckableTag=Z7;const ii=(t,e)=>new Dt(t).setA(e).toRgbString(),Fa=(t,e)=>new Dt(t).lighten(e).toHexString(),e9=t=>{const e=ga(t,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},t9=(t,e)=>{const n=t||"#000",r=e||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:ii(r,.85),colorTextSecondary:ii(r,.65),colorTextTertiary:ii(r,.45),colorTextQuaternary:ii(r,.25),colorFill:ii(r,.18),colorFillSecondary:ii(r,.12),colorFillTertiary:ii(r,.08),colorFillQuaternary:ii(r,.04),colorBgSolid:ii(r,.95),colorBgSolidHover:ii(r,1),colorBgSolidActive:ii(r,.9),colorBgElevated:Fa(n,12),colorBgContainer:Fa(n,8),colorBgLayout:Fa(n,0),colorBgSpotlight:Fa(n,26),colorBgBlur:ii(r,.04),colorBorder:Fa(n,26),colorBorderSecondary:Fa(n,19)}},n9=(t,e)=>{const n=Object.keys(Mv).map(o=>{const a=ga(t[o],{theme:"dark"});return Array.from({length:10},()=>1).reduce((s,l,c)=>(s[`${o}-${c+1}`]=a[c],s[`${o}${c+1}`]=a[c],s),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=e??Ev(t),i=O$(t,{generateColorPalettes:e9,generateNeutralColorPalettes:t9});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},E1={defaultSeed:gd.token,defaultAlgorithm:Ev,darkAlgorithm:n9};var r9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},i9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:r9}))},Km=Se(i9),o9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},a9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:o9}))},FP=Se(a9),s9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},l9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:s9}))},c9=Se(l9);const u9=(t,e,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:t,lineHeight:e}},d9=t=>{const e=[1,2,3,4,5],n={};return e.forEach(r=>{n[` + `]:{paddingInlineEnd:n},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},U8=Zt(["Input","TextArea"],t=>{const e=kt(t,Uf(t));return Y8(e)},Kf,{resetFont:!1});var K8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,bordered:i=!0,size:o,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:h,variant:p,showCount:m,onMouseDown:g,onResize:v}=t,O=K8(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:S,direction:C,allowClear:b,autoComplete:x,className:$,style:w,classNames:P,styles:_}=ir("textArea"),T=de(qi),k=a??T,{status:R,hasFeedback:I,feedbackIcon:Q}=de(ei),E=Vf(R,s),A=Y(null);Yt(e,()=>{var J;return{resizableTextArea:(J=A.current)===null||J===void 0?void 0:J.resizableTextArea,focus:he=>{var ge,$e;OP(($e=(ge=A.current)===null||ge===void 0?void 0:ge.resizableTextArea)===null||$e===void 0?void 0:$e.textArea,he)},blur:()=>{var he;return(he=A.current)===null||he===void 0?void 0:he.blur()}}});const N=S("input",r),L=wr(N),[z,V,X]=cP(N,u),[F]=U8(N,L),{compactSize:H,compactItemClassnames:B}=js(N,C),G=Dr(J=>{var he;return(he=o??H)!==null&&he!==void 0?he:J}),[se,ie]=Hf("textArea",p,i),le=SP(l??b),[pe,ne]=K(!1),[ee,ce]=K(!1),ue=J=>{ne(!0),g==null||g(J);const he=()=>{ne(!1),document.removeEventListener("mouseup",he)};document.addEventListener("mouseup",he)},j=J=>{var he,ge;if(v==null||v(J),pe&&typeof getComputedStyle=="function"){const $e=(ge=(he=A.current)===null||he===void 0?void 0:he.nativeElement)===null||ge===void 0?void 0:ge.querySelector("textarea");$e&&getComputedStyle($e).resize==="both"&&ce(!0)}};return z(F(y(G8,Object.assign({autoComplete:x},O,{style:Object.assign(Object.assign({},w),f),styles:Object.assign(Object.assign({},_),h),disabled:k,allowClear:le,className:Z(X,L,d,u,B,$,ee&&`${N}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),P),{textarea:Z({[`${N}-sm`]:G==="small",[`${N}-lg`]:G==="large"},V,c==null?void 0:c.textarea,P.textarea,pe&&`${N}-mouse-active`),variant:Z({[`${N}-${se}`]:ie},Td(N,E)),affixWrapper:Z(`${N}-textarea-affix-wrapper`,{[`${N}-affix-wrapper-rtl`]:C==="rtl",[`${N}-affix-wrapper-sm`]:G==="small",[`${N}-affix-wrapper-lg`]:G==="large",[`${N}-textarea-show-count`]:m||((n=t.count)===null||n===void 0?void 0:n.show)},V)}),prefixCls:N,suffix:I&&y("span",{className:`${N}-textarea-suffix`},Q),showCount:m,ref:A,onResize:j,onMouseDown:ue}))))}),bi=eh;bi.Group=w8;bi.Search=B8;bi.TextArea=RP;bi.Password=j8;bi.OTP=M8;function J8(t,e,n){return typeof n=="boolean"?n:t.length?!0:rr(e).some(i=>i.type===Y2)}var IP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);iye((o,a)=>y(r,Object.assign({ref:a,suffixCls:t,tagName:e},o)))}const T0=ye((t,e)=>{const{prefixCls:n,suffixCls:r,className:i,tagName:o}=t,a=IP(t,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:s}=de(at),l=s("layout",n),[c,u,d]=G2(l),f=r?`${l}-${r}`:l;return c(y(o,Object.assign({className:Z(n||f,i,u,d),ref:e},a)))}),e7=ye((t,e)=>{const{direction:n}=de(at),[r,i]=K([]),{prefixCls:o,className:a,rootClassName:s,children:l,hasSider:c,tagName:u,style:d}=t,f=IP(t,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),h=cn(f,["suffixCls"]),{getPrefixCls:p,className:m,style:g}=ir("layout"),v=p("layout",o),O=J8(r,l,c),[S,C,b]=G2(v),x=Z(v,{[`${v}-has-sider`]:O,[`${v}-rtl`]:n==="rtl"},m,a,s,C,b),$=me(()=>({siderHook:{addSider:w=>{i(P=>[].concat(Pe(P),[w]))},removeSider:w=>{i(P=>P.filter(_=>_!==w))}}}),[]);return S(y(X2.Provider,{value:$},y(u,Object.assign({ref:e,className:x,style:Object.assign(Object.assign({},g),d)},h),l)))}),t7=th({tagName:"div",displayName:"Layout"})(e7),n7=th({suffixCls:"header",tagName:"header",displayName:"Header"})(T0),r7=th({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(T0),i7=th({suffixCls:"content",tagName:"main",displayName:"Content"})(T0),qr=t7;qr.Header=n7;qr.Footer=r7;qr.Content=i7;qr.Sider=Y2;qr._InternalSiderContext=Gf;const Qd=100,MP=Qd/5,EP=Qd/2-MP/2,tp=EP*2*Math.PI,R1=50,I1=t=>{const{dotClassName:e,style:n,hasCircleCls:r}=t;return y("circle",{className:Z(`${e}-circle`,{[`${e}-circle-bg`]:r}),r:EP,cx:R1,cy:R1,strokeWidth:MP,style:n})},o7=({percent:t,prefixCls:e})=>{const n=`${e}-dot`,r=`${n}-holder`,i=`${r}-hidden`,[o,a]=K(!1);Nt(()=>{t!==0&&a(!0)},[t!==0]);const s=Math.max(Math.min(t,100),0);if(!o)return null;const l={strokeDashoffset:`${tp/4}`,strokeDasharray:`${tp*s/100} ${tp*(100-s)/100}`};return y("span",{className:Z(r,`${n}-progress`,s<=0&&i)},y("svg",{viewBox:`0 0 ${Qd} ${Qd}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},y(I1,{dotClassName:n,hasCircleCls:!0}),y(I1,{dotClassName:n,style:l})))};function a7(t){const{prefixCls:e,percent:n=0}=t,r=`${e}-dot`,i=`${r}-holder`,o=`${i}-hidden`;return y(At,null,y("span",{className:Z(i,n>0&&o)},y("span",{className:Z(r,`${e}-dot-spin`)},[1,2,3,4].map(a=>y("i",{className:`${e}-dot-item`,key:a})))),y(o7,{prefixCls:e,percent:n}))}function s7(t){var e;const{prefixCls:n,indicator:r,percent:i}=t,o=`${n}-dot`;return r&&Jt(r)?hr(r,{className:Z((e=r.props)===null||e===void 0?void 0:e.className,o),percent:i}):y(a7,{prefixCls:n,percent:i})}const l7=new _t("antSpinMove",{to:{opacity:1}}),c7=new _t("antRotate",{to:{transform:"rotate(405deg)"}}),u7=t=>{const{componentCls:e,calc:n}=t;return{[e]:Object.assign(Object.assign({},wn(t)),{position:"absolute",display:"none",color:t.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${e}-text`]:{fontSize:t.fontSize,paddingTop:n(n(t.dotSize).sub(t.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:t.colorBgMask,zIndex:t.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${t.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[e]:{[`${e}-dot-holder`]:{color:t.colorWhite},[`${e}-text`]:{color:t.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${e}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${e}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:n(t.dotSize).mul(-1).div(2).equal()},[`${e}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${e}-dot`]:{margin:n(t.dotSizeSM).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeSM).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${e}-dot`]:{margin:n(t.dotSizeLG).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:n(n(t.dotSizeLG).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:n(t.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${e}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${e}-dot-holder`]:{width:"1em",height:"1em",fontSize:t.dotSize,display:"inline-block",transition:`transform ${t.motionDurationSlow} ease, opacity ${t.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:t.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${e}-dot-progress`]:{position:"absolute",inset:0},[`${e}-dot`]:{position:"relative",display:"inline-block",fontSize:t.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),height:n(t.dotSize).sub(n(t.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:l7,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:c7,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(r=>`${r} ${t.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:t.colorFillSecondary}},[`&-sm ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeSM}},[`&-sm ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal(),height:n(n(t.dotSizeSM).sub(n(t.marginXXS).div(2))).div(2).equal()}},[`&-lg ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeLG}},[`&-lg ${e}-dot-holder`]:{i:{width:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal(),height:n(n(t.dotSizeLG).sub(t.marginXXS)).div(2).equal()}},[`&${e}-show-text ${e}-text`]:{display:"block"}})}},d7=t=>{const{controlHeightLG:e,controlHeight:n}=t;return{contentHeight:400,dotSize:e/2,dotSizeSM:e*.35,dotSizeLG:n}},f7=Zt("Spin",t=>{const e=kt(t,{spinDotDefault:t.colorTextDescription});return u7(e)},d7),h7=200,M1=[[30,.05],[70,.03],[96,.01]];function p7(t,e){const[n,r]=K(0),i=Y(null),o=e==="auto";return be(()=>(o&&t&&(r(0),i.current=setInterval(()=>{r(a=>{const s=100-a;for(let l=0;l{clearInterval(i.current)}),[o,t]),o?n:e}var m7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e;const{prefixCls:n,spinning:r=!0,delay:i=0,className:o,rootClassName:a,size:s="default",tip:l,wrapperClassName:c,style:u,children:d,fullscreen:f=!1,indicator:h,percent:p}=t,m=m7(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:g,direction:v,className:O,style:S,indicator:C}=ir("spin"),b=g("spin",n),[x,$,w]=f7(b),[P,_]=K(()=>r&&!g7(r,i)),T=p7(P,p);be(()=>{if(r){const N=pB(i,()=>{_(!0)});return N(),()=>{var L;(L=N==null?void 0:N.cancel)===null||L===void 0||L.call(N)}}_(!1)},[i,r]);const k=me(()=>typeof d<"u"&&!f,[d,f]),R=Z(b,O,{[`${b}-sm`]:s==="small",[`${b}-lg`]:s==="large",[`${b}-spinning`]:P,[`${b}-show-text`]:!!l,[`${b}-rtl`]:v==="rtl"},o,!f&&a,$,w),I=Z(`${b}-container`,{[`${b}-blur`]:P}),Q=(e=h??C)!==null&&e!==void 0?e:AP,E=Object.assign(Object.assign({},S),u),A=y("div",Object.assign({},m,{style:E,className:R,"aria-live":"polite","aria-busy":P}),y(s7,{prefixCls:b,indicator:Q,percent:T}),l&&(k||f)?y("div",{className:`${b}-text`},l):null);return x(k?y("div",Object.assign({},m,{className:Z(`${b}-nested-loading`,c,$,w)}),P&&y("div",{key:"loading"},A),y("div",{className:I,key:"container"},d)):f?y("div",{className:Z(`${b}-fullscreen`,{[`${b}-fullscreen-show`]:P},a,$,w)},A):A)};QP.setDefaultIndicator=t=>{AP=t};const v7=(t,e=!1)=>e&&t==null?[]:Array.isArray(t)?t:[t];var O7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,className:n,closeIcon:r,closable:i,type:o,title:a,children:s,footer:l}=t,c=O7(t,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=de(at),d=u(),f=e||u("modal"),h=wr(d),[p,m,g]=Qw(f,h),v=`${f}-confirm`;let O={};return o?O={closable:i??!1,title:"",footer:"",children:y(zw,Object.assign({},t,{prefixCls:f,confirmPrefixCls:v,rootPrefixCls:d,content:s}))}:O={closable:i??!0,title:a,footer:l!==null&&y(Iw,Object.assign({},t)),children:s},p(y(mw,Object.assign({prefixCls:f,className:Z(m,`${f}-pure-panel`,o&&v,o&&`${v}-${o}`,n,g,h)},c,{closeIcon:Rw(f,r),closable:i},O)))},y7=Kw(b7);function NP(t){return Pc(Bw(t))}const dr=Nw;dr.useModal=dN;dr.info=function(e){return Pc(Ww(e))};dr.success=function(e){return Pc(Fw(e))};dr.error=function(e){return Pc(Vw(e))};dr.warning=NP;dr.warn=NP;dr.confirm=function(e){return Pc(Hw(e))};dr.destroyAll=function(){for(;la.length;){const e=la.pop();e&&e()}};dr.config=aN;dr._InternalPanelDoNotUseOrYouWillBeFired=y7;let Oi=null,Gu=t=>t(),Nd=[],ql={};function E1(){const{getContainer:t,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}=ql,s=(t==null?void 0:t())||document.body;return{getContainer:()=>s,rtl:e,maxCount:n,top:r,bottom:i,showProgress:o,pauseOnHover:a}}const S7=oe.forwardRef((t,e)=>{const{notificationConfig:n,sync:r}=t,{getPrefixCls:i}=de(at),o=ql.prefixCls||i("notification"),a=de(AN),[s,l]=Uw(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),a.notification));return oe.useEffect(r,[]),oe.useImperativeHandle(e,()=>{const c=Object.assign({},s);return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),s[u].apply(s,d))}),{instance:c,sync:r}}),l}),x7=oe.forwardRef((t,e)=>{const[n,r]=oe.useState(E1),i=()=>{r(E1)};oe.useEffect(i,[]);const o=V$(),a=o.getRootPrefixCls(),s=o.getIconPrefixCls(),l=o.getTheme(),c=oe.createElement(S7,{ref:e,sync:i,notificationConfig:n});return oe.createElement(Yr,{prefixCls:a,iconPrefixCls:s,theme:l},o.holderRender?o.holderRender(c):c)}),k0=()=>{if(!Oi){const t=document.createDocumentFragment(),e={fragment:t};Oi=e,Gu(()=>{Dv()(oe.createElement(x7,{ref:r=>{const{instance:i,sync:o}=r||{};Promise.resolve().then(()=>{!e.instance&&i&&(e.instance=i,e.sync=o,k0())})}}),t)});return}Oi.instance&&(Nd.forEach(t=>{switch(t.type){case"open":{Gu(()=>{Oi.instance.open(Object.assign(Object.assign({},ql),t.config))});break}case"destroy":Gu(()=>{var e;(e=Oi==null?void 0:Oi.instance)===null||e===void 0||e.destroy(t.key)});break}}),Nd=[])};function C7(t){ql=Object.assign(Object.assign({},ql),t),Gu(()=>{var e;(e=Oi==null?void 0:Oi.sync)===null||e===void 0||e.call(Oi)})}function zP(t){Nd.push({type:"open",config:t}),k0()}const $7=t=>{Nd.push({type:"destroy",key:t}),k0()},w7=["success","info","warning","error"],P7={open:zP,destroy:$7,config:C7,useNotification:EN,_InternalPanelDoNotUseOrYouWillBeFired:CN},sr=P7;w7.forEach(t=>{sr[t]=e=>zP(Object.assign(Object.assign({},e),{type:t}))});const _7=t=>{const{componentCls:e,iconCls:n,antCls:r,zIndexPopup:i,colorText:o,colorWarning:a,marginXXS:s,marginXS:l,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=t;return{[e]:{zIndex:i,[`&${r}-popover`]:{fontSize:c},[`${e}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${n}`]:{color:a,fontSize:c,lineHeight:1,marginInlineEnd:l},[`${e}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${e}-description`]:{marginTop:s,color:o}},[`${e}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}},T7=t=>{const{zIndexPopupBase:e}=t;return{zIndexPopup:e+60}},LP=Zt("Popconfirm",t=>_7(t),T7,{resetStyle:!1});var k7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:e,okButtonProps:n,cancelButtonProps:r,title:i,description:o,cancelText:a,okText:s,okType:l="primary",icon:c=y(Ls,null),showCancel:u=!0,close:d,onConfirm:f,onCancel:h,onPopupClick:p}=t,{getPrefixCls:m}=de(at),[g]=Ki("Popconfirm",Zi.Popconfirm),v=xs(i),O=xs(o);return y("div",{className:`${e}-inner-content`,onClick:p},y("div",{className:`${e}-message`},c&&y("span",{className:`${e}-message-icon`},c),y("div",{className:`${e}-message-text`},v&&y("div",{className:`${e}-title`},v),O&&y("div",{className:`${e}-description`},O))),y("div",{className:`${e}-buttons`},u&&y(vt,Object.assign({onClick:h,size:"small"},r),a||(g==null?void 0:g.cancelText)),y(Kv,{buttonProps:Object.assign(Object.assign({size:"small"},Wv(l)),n),actionFn:f,close:d,prefixCls:m("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},s||(g==null?void 0:g.okText))))},R7=t=>{const{prefixCls:e,placement:n,className:r,style:i}=t,o=k7(t,["prefixCls","placement","className","style"]),{getPrefixCls:a}=de(at),s=a("popconfirm",e),[l]=LP(s);return l(y(E2,{placement:n,className:Z(s,r),style:i,content:y(jP,Object.assign({prefixCls:s},o))}))};var I7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n,r;const{prefixCls:i,placement:o="top",trigger:a="click",okType:s="primary",icon:l=y(Ls,null),children:c,overlayClassName:u,onOpenChange:d,onVisibleChange:f,overlayStyle:h,styles:p,classNames:m}=t,g=I7(t,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:v,className:O,style:S,classNames:C,styles:b}=ir("popconfirm"),[x,$]=_n(!1,{value:(n=t.open)!==null&&n!==void 0?n:t.visible,defaultValue:(r=t.defaultOpen)!==null&&r!==void 0?r:t.defaultVisible}),w=(A,N)=>{$(A,!0),f==null||f(A),d==null||d(A,N)},P=A=>{w(!1,A)},_=A=>{var N;return(N=t.onConfirm)===null||N===void 0?void 0:N.call(void 0,A)},T=A=>{var N;w(!1,A),(N=t.onCancel)===null||N===void 0||N.call(void 0,A)},k=(A,N)=>{const{disabled:L=!1}=t;L||w(A,N)},R=v("popconfirm",i),I=Z(R,O,u,C.root,m==null?void 0:m.root),Q=Z(C.body,m==null?void 0:m.body),[E]=LP(R);return E(y(p0,Object.assign({},cn(g,["title"]),{trigger:a,placement:o,onOpenChange:k,open:x,ref:e,classNames:{root:I,body:Q},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},b.root),S),h),p==null?void 0:p.root),body:Object.assign(Object.assign({},b.body),p==null?void 0:p.body)},content:y(jP,Object.assign({okType:s,icon:l},t,{prefixCls:R,close:P,onConfirm:_,onCancel:T})),"data-popover-inject":!0}),c))}),DP=M7;DP._InternalPanelDoNotUseOrYouWillBeFired=R7;var E7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},A7=function(e,n){return y(Rt,xe({},e,{ref:n,icon:E7}))},wl=ye(A7),Q7=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],BP=ye(function(t,e){var n,r=t.prefixCls,i=r===void 0?"rc-switch":r,o=t.className,a=t.checked,s=t.defaultChecked,l=t.disabled,c=t.loadingIcon,u=t.checkedChildren,d=t.unCheckedChildren,f=t.onClick,h=t.onChange,p=t.onKeyDown,m=dt(t,Q7),g=_n(!1,{value:a,defaultValue:s}),v=ae(g,2),O=v[0],S=v[1];function C(w,P){var _=O;return l||(_=w,S(_),h==null||h(_,P)),_}function b(w){w.which===Ve.LEFT?C(!1,w):w.which===Ve.RIGHT&&C(!0,w),p==null||p(w)}function x(w){var P=C(!O,w);f==null||f(P,w)}var $=Z(i,o,(n={},D(n,"".concat(i,"-checked"),O),D(n,"".concat(i,"-disabled"),l),n));return y("button",xe({},m,{type:"button",role:"switch","aria-checked":O,disabled:l,className:$,ref:e,onKeyDown:b,onClick:x}),c,y("span",{className:"".concat(i,"-inner")},y("span",{className:"".concat(i,"-inner-checked")},u),y("span",{className:"".concat(i,"-inner-unchecked")},d)))});BP.displayName="Switch";const N7=t=>{const{componentCls:e,trackHeightSM:n,trackPadding:r,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:s,calc:l}=t,c=`${e}-inner`,u=q(l(s).add(l(r).mul(2)).equal()),d=q(l(a).mul(2).equal());return{[e]:{[`&${e}-small`]:{minWidth:i,height:n,lineHeight:q(n),[`${e}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${c}-checked, ${c}-unchecked`]:{minHeight:n},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:s,height:s},[`${e}-loading-icon`]:{top:l(l(s).sub(t.switchLoadingIconSize)).div(2).equal(),fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${q(l(s).add(r).equal())})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(t.marginXXS).div(2).equal(),marginInlineEnd:l(t.marginXXS).mul(-1).div(2).equal()}},[`&${e}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(t.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(t.marginXXS).div(2).equal()}}}}}}},z7=t=>{const{componentCls:e,handleSize:n,calc:r}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:r(r(n).sub(t.fontSize)).div(2).equal(),color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},L7=t=>{const{componentCls:e,trackPadding:n,handleBg:r,handleShadow:i,handleSize:o,calc:a}=t,s=`${e}-handle`;return{[e]:{[s]:{position:"absolute",top:n,insetInlineStart:n,width:o,height:o,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:r,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${s}`]:{insetInlineStart:`calc(100% - ${q(a(o).add(n).equal())})`},[`&:not(${e}-disabled):active`]:{[`${s}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${s}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},j7=t=>{const{componentCls:e,trackHeight:n,trackPadding:r,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:s}=t,l=`${e}-inner`,c=q(s(a).add(s(r).mul(2)).equal()),u=q(s(o).mul(2).equal());return{[e]:{[l]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${l}-checked, ${l}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:n},[`${l}-checked`]:{marginInlineStart:`calc(-100% + ${c} - ${u})`,marginInlineEnd:`calc(100% - ${c} + ${u})`},[`${l}-unchecked`]:{marginTop:s(n).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${l}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${l}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${l}-unchecked`]:{marginInlineStart:`calc(100% - ${c} + ${u})`,marginInlineEnd:`calc(-100% + ${c} - ${u})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${l}`]:{[`${l}-unchecked`]:{marginInlineStart:s(r).mul(2).equal(),marginInlineEnd:s(r).mul(-1).mul(2).equal()}},[`&${e}-checked ${l}`]:{[`${l}-checked`]:{marginInlineStart:s(r).mul(-1).mul(2).equal(),marginInlineEnd:s(r).mul(2).equal()}}}}}},D7=t=>{const{componentCls:e,trackHeight:n,trackMinWidth:r}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},wn(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:r,height:n,lineHeight:q(n),verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),Ci(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},B7=t=>{const{fontSize:e,lineHeight:n,controlHeight:r,colorWhite:i}=t,o=e*n,a=r/2,s=2,l=o-s*2,c=a-s*2;return{trackHeight:o,trackHeightSM:a,trackMinWidth:l*2+s*4,trackMinWidthSM:c*2+s*2,trackPadding:s,handleBg:i,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new Dt("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+s+s*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+s+s*2}},W7=Zt("Switch",t=>{const e=kt(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:t.calc(t.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[D7(e),j7(e),L7(e),z7(e),N7(e)]},B7);var F7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,size:r,disabled:i,loading:o,className:a,rootClassName:s,style:l,checked:c,value:u,defaultChecked:d,defaultValue:f,onChange:h}=t,p=F7(t,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[m,g]=_n(!1,{value:c??u,defaultValue:d??f}),{getPrefixCls:v,direction:O,switch:S}=de(at),C=de(qi),b=(i??C)||o,x=v("switch",n),$=y("div",{className:`${x}-handle`},o&&y(yc,{className:`${x}-loading-icon`})),[w,P,_]=W7(x),T=Dr(r),k=Z(S==null?void 0:S.className,{[`${x}-small`]:T==="small",[`${x}-loading`]:o,[`${x}-rtl`]:O==="rtl"},a,s,P,_),R=Object.assign(Object.assign({},S==null?void 0:S.style),l);return w(y(Bv,{component:"Switch",disabled:b},y(BP,Object.assign({},p,{checked:m,onChange:(...Q)=>{g(Q[0]),h==null||h.apply(void 0,Q)},prefixCls:x,className:k,style:R,disabled:b,ref:e,loadingIcon:$}))))}),si=V7;si.__ANT_SWITCH=!0;const H7=t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:r,componentCls:i,calc:o}=t,a=o(r).sub(n).equal(),s=o(e).sub(n).equal();return{[i]:Object.assign(Object.assign({},wn(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:a,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${q(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${i}-close-icon`]:{marginInlineStart:s,fontSize:t.tagIconSize,color:t.colorIcon,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},R0=t=>{const{lineWidth:e,fontSizeIcon:n,calc:r}=t,i=t.fontSizeSM;return kt(t,{tagFontSize:i,tagLineHeight:q(r(t.lineHeightSM).mul(i).equal()),tagIconSize:r(n).sub(r(e).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.defaultBg})},I0=t=>({defaultBg:new Dt(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText}),WP=Zt("Tag",t=>{const e=R0(t);return H7(e)},I0);var X7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,style:r,className:i,checked:o,children:a,icon:s,onChange:l,onClick:c}=t,u=X7(t,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:d,tag:f}=de(at),h=S=>{l==null||l(!o),c==null||c(S)},p=d("tag",n),[m,g,v]=WP(p),O=Z(p,`${p}-checkable`,{[`${p}-checkable-checked`]:o},f==null?void 0:f.className,i,g,v);return m(y("span",Object.assign({},u,{ref:e,style:Object.assign(Object.assign({},r),f==null?void 0:f.style),className:O,onClick:h}),s,y("span",null,a)))}),q7=t=>k$(t,(e,{textColor:n,lightBorderColor:r,lightColor:i,darkColor:o})=>({[`${t.componentCls}${t.componentCls}-${e}`]:{color:n,background:i,borderColor:r,"&-inverse":{color:t.colorTextLightSolid,background:o,borderColor:o},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}})),G7=Qs(["Tag","preset"],t=>{const e=R0(t);return q7(e)},I0);function Y7(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}const lu=(t,e,n)=>{const r=Y7(n);return{[`${t.componentCls}${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${r}Bg`],borderColor:t[`color${r}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}},U7=Qs(["Tag","status"],t=>{const e=R0(t);return[lu(e,"success","Success"),lu(e,"processing","Info"),lu(e,"error","Error"),lu(e,"warning","Warning")]},I0);var K7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,className:r,rootClassName:i,style:o,children:a,icon:s,color:l,onClose:c,bordered:u=!0,visible:d}=t,f=K7(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:h,direction:p,tag:m}=de(at),[g,v]=K(!0),O=cn(f,["closeIcon","closable"]);be(()=>{d!==void 0&&v(d)},[d]);const S=k2(l),C=vL(l),b=S||C,x=Object.assign(Object.assign({backgroundColor:l&&!b?l:void 0},m==null?void 0:m.style),o),$=h("tag",n),[w,P,_]=WP($),T=Z($,m==null?void 0:m.className,{[`${$}-${l}`]:b,[`${$}-has-color`]:l&&!b,[`${$}-hidden`]:!g,[`${$}-rtl`]:p==="rtl",[`${$}-borderless`]:!u},r,i,P,_),k=N=>{N.stopPropagation(),c==null||c(N),!N.defaultPrevented&&v(!1)},[,R]=kw(Pd(t),Pd(m),{closable:!1,closeIconRender:N=>{const L=y("span",{className:`${$}-close-icon`,onClick:k},N);return Lv(N,L,z=>({onClick:V=>{var X;(X=z==null?void 0:z.onClick)===null||X===void 0||X.call(z,V),k(V)},className:Z(z==null?void 0:z.className,`${$}-close-icon`)}))}}),I=typeof f.onClick=="function"||a&&a.type==="a",Q=s||null,E=Q?y(At,null,Q,a&&y("span",null,a)):a,A=y("span",Object.assign({},O,{ref:e,className:T,style:x}),E,R,S&&y(G7,{key:"preset",prefixCls:$}),C&&y(U7,{key:"status",prefixCls:$}));return w(I?y(Bv,{component:"Tag"},A):A)}),na=J7;na.CheckableTag=Z7;const oi=(t,e)=>new Dt(t).setA(e).toRgbString(),Ha=(t,e)=>new Dt(t).lighten(e).toHexString(),e9=t=>{const e=Oa(t,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},t9=(t,e)=>{const n=t||"#000",r=e||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:oi(r,.85),colorTextSecondary:oi(r,.65),colorTextTertiary:oi(r,.45),colorTextQuaternary:oi(r,.25),colorFill:oi(r,.18),colorFillSecondary:oi(r,.12),colorFillTertiary:oi(r,.08),colorFillQuaternary:oi(r,.04),colorBgSolid:oi(r,.95),colorBgSolidHover:oi(r,1),colorBgSolidActive:oi(r,.9),colorBgElevated:Ha(n,12),colorBgContainer:Ha(n,8),colorBgLayout:Ha(n,0),colorBgSpotlight:Ha(n,26),colorBgBlur:oi(r,.04),colorBorder:Ha(n,26),colorBorderSecondary:Ha(n,19)}},n9=(t,e)=>{const n=Object.keys(Ev).map(o=>{const a=Oa(t[o],{theme:"dark"});return Array.from({length:10},()=>1).reduce((s,l,c)=>(s[`${o}-${c+1}`]=a[c],s[`${o}${c+1}`]=a[c],s),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=e??Av(t),i=O$(t,{generateColorPalettes:e9,generateNeutralColorPalettes:t9});return Object.assign(Object.assign(Object.assign(Object.assign({},r),n),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},A1={defaultSeed:Od.token,defaultAlgorithm:Av,darkAlgorithm:n9};var r9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},i9=function(e,n){return y(Rt,xe({},e,{ref:n,icon:r9}))},Yu=ye(i9),o9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},a9=function(e,n){return y(Rt,xe({},e,{ref:n,icon:o9}))},FP=ye(a9),s9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},l9=function(e,n){return y(Rt,xe({},e,{ref:n,icon:s9}))},c9=ye(l9);const u9=(t,e,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:t,lineHeight:e}},d9=t=>{const e=[1,2,3,4,5],n={};return e.forEach(r=>{n[` h${r}&, div&-h${r}, div&-h${r} > textarea, h${r} - `]=u9(t[`fontSizeHeading${r}`],t[`lineHeightHeading${r}`],t.colorTextHeading,t)}),n},f9=t=>{const{componentCls:e}=t;return{"a&, a":Object.assign(Object.assign({},T$(t)),{userSelect:"text",[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},h9=t=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:pd[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:t.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:t.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),p9=t=>{const{componentCls:e,paddingSM:n}=t,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:t.calc(t.paddingSM).mul(-1).equal(),insetBlockStart:t.calc(r).div(-2).add(1).equal(),marginBottom:t.calc(r).div(2).sub(2).equal()},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.calc(t.marginXS).add(2).equal(),insetBlockEnd:t.marginXS,color:t.colorIcon,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},m9=t=>({[`${t.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:t.colorSuccess}},[`${t.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),g9=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),v9=t=>{const{componentCls:e,titleMarginTop:n}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success`]:{color:t.colorSuccessText},[`&${e}-warning`]:{color:t.colorWarningText},[`&${e}-danger`]:{color:t.colorErrorText,"a&:active, a&:focus":{color:t.colorErrorTextActive},"a&:hover":{color:t.colorErrorTextHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},d9(t)),{[` + `]=u9(t[`fontSizeHeading${r}`],t[`lineHeightHeading${r}`],t.colorTextHeading,t)}),n},f9=t=>{const{componentCls:e}=t;return{"a&, a":Object.assign(Object.assign({},T$(t)),{userSelect:"text",[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},h9=t=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:gd[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:t.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:t.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),p9=t=>{const{componentCls:e,paddingSM:n}=t,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:t.calc(t.paddingSM).mul(-1).equal(),insetBlockStart:t.calc(r).div(-2).add(1).equal(),marginBottom:t.calc(r).div(2).sub(2).equal()},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.calc(t.marginXS).add(2).equal(),insetBlockEnd:t.marginXS,color:t.colorIcon,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},m9=t=>({[`${t.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:t.colorSuccess}},[`${t.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),g9=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),v9=t=>{const{componentCls:e,titleMarginTop:n}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success`]:{color:t.colorSuccessText},[`&${e}-warning`]:{color:t.colorWarningText},[`&${e}-danger`]:{color:t.colorErrorText,"a&:active, a&:focus":{color:t.colorErrorTextActive},"a&:hover":{color:t.colorErrorTextHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},d9(t)),{[` & + h1${e}, & + h2${e}, & + h3${e}, @@ -291,30 +291,30 @@ html body { ${e}-collapse, ${e}-edit, ${e}-copy - `]:Object.assign(Object.assign({},T$(t)),{marginInlineStart:t.marginXXS})}),p9(t)),m9(t)),g9()),{"&-rtl":{direction:"rtl"}})}},O9=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),VP=Zt("Typography",v9,O9),b9=t=>{const{prefixCls:e,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:f,enterIcon:h=y(c9,null)}=t,p=U(null),m=U(!1),g=U(null),[v,O]=J(l);be(()=>{O(l)},[l]),be(()=>{var I;if(!((I=p.current)===null||I===void 0)&&I.resizableTextArea){const{textArea:Q}=p.current.resizableTextArea;Q.focus();const{length:M}=Q.value;Q.setSelectionRange(M,M)}},[]);const S=({target:I})=>{O(I.value.replace(/[\n\r]/g,""))},x=()=>{m.current=!0},b=()=>{m.current=!1},C=({keyCode:I})=>{m.current||(g.current=I)},$=()=>{c(v.trim())},w=({keyCode:I,ctrlKey:Q,altKey:M,metaKey:E,shiftKey:N})=>{g.current!==I||m.current||Q||M||E||N||(I===je.ENTER?($(),d==null||d()):I===je.ESC&&u())},P=()=>{$()},[_,T,R]=VP(e),k=Z(e,`${e}-edit-content`,{[`${e}-rtl`]:o==="rtl",[`${e}-${f}`]:!!f},r,T,R);return _(y("div",{className:k,style:i},y(RP,{ref:p,maxLength:a,value:v,onChange:S,onKeyDown:C,onKeyUp:w,onCompositionStart:x,onCompositionEnd:b,onBlur:P,"aria-label":n,rows:1,autoSize:s}),h!==null?fr(h,{className:`${e}-edit-content-confirm`}):null))};var y9=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=A1[e.format]||A1.default;window.clipboardData.setData(d,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=C9("message"in e?e.message:x9),window.prompt(r,t)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var w9=$9;const P9=wC(w9);var _9=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})};const T9=({copyConfig:t,children:e})=>{const[n,r]=J(!1),[i,o]=J(!1),a=U(null),s=()=>{a.current&&clearTimeout(a.current)},l={};t.format&&(l.format=t.format),be(()=>s,[]);const c=pn(u=>_9(void 0,void 0,void 0,function*(){var d;u==null||u.preventDefault(),u==null||u.stopPropagation(),o(!0);try{const f=typeof t.text=="function"?yield t.text():t.text;P9(f||v7(e,!0).join("")||"",l),o(!1),r(!0),s(),a.current=setTimeout(()=>{r(!1)},3e3),(d=t.onCopy)===null||d===void 0||d.call(t,u)}catch(f){throw o(!1),f}}));return{copied:n,copyLoading:i,onClick:c}};function tp(t,e){return ge(()=>{const n=!!t;return[n,Object.assign(Object.assign({},e),n&&typeof t=="object"?t:null)]},[t])}const k9=t=>{const e=U(void 0);return be(()=>{e.current=t}),e.current},R9=(t,e,n)=>ge(()=>t===!0?{title:e??n}:Kt(t)?{title:t}:typeof t=="object"?Object.assign({title:e??n},t):{title:t},[t,e,n]);var I9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:c}=t,u=I9(t,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,className:h,style:p}=rr("typography"),m=l??f,g=a?pr(e,a):e,v=d("typography",n),[O,S,x]=VP(v),b=Z(v,h,{[`${v}-rtl`]:m==="rtl"},i,o,S,x),C=Object.assign(Object.assign({},p),c);return O(y(r,Object.assign({className:b,style:C,ref:g},u),s))});var M9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},E9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:M9}))},A9=Se(E9);function Q1(t){return t===!1?[!1,!1]:Array.isArray(t)?t:[t]}function np(t,e,n){return t===!0||t===void 0?e:t||n&&e}function Q9(t){const e=document.createElement("em");t.appendChild(e);const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return t.removeChild(e),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const I0=t=>["string","number"].includes(typeof t),N9=({prefixCls:t,copied:e,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:s,loading:l})=>{const c=Q1(i),u=Q1(o),{copied:d,copy:f}=n??{},h=e?d:f,p=np(c[e?1:0],h),m=typeof p=="string"?p:h;return y(on,{title:p},y("button",{type:"button",className:Z(`${t}-copy`,{[`${t}-copy-success`]:e,[`${t}-copy-icon-only`]:r}),onClick:s,"aria-label":m,tabIndex:a},e?np(u[1],y(_d,null),!0):np(u[0],y(l?yc:A9,null),!0)))},lu=Se(({style:t,children:e},n)=>{const r=U(null);return Yt(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),y("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},t)},e)}),z9=t=>t.reduce((e,n)=>e+(I0(n)?String(n).length:1),0);function N1(t,e){let n=0;const r=[];for(let i=0;ie){const c=e-n;return r.push(String(o).slice(0,c)),r}r.push(o),n=l}return t}const rp=0,ip=1,op=2,ap=3,z1=4,cu={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function L9(t){const{enableMeasure:e,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=t,c=ge(()=>nr(r),[r]),u=ge(()=>z9(c),[r]),d=ge(()=>i(c,!1),[r]),[f,h]=J(null),p=U(null),m=U(null),g=U(null),v=U(null),O=U(null),[S,x]=J(!1),[b,C]=J(rp),[$,w]=J(0),[P,_]=J(null);Nt(()=>{C(e&&n&&u?ip:rp)},[n,r,o,e,c]),Nt(()=>{var I,Q,M,E;if(b===ip){C(op);const N=m.current&&getComputedStyle(m.current).whiteSpace;_(N)}else if(b===op){const N=!!(!((I=g.current)===null||I===void 0)&&I.isExceed());C(N?ap:z1),h(N?[0,u]:null),x(N);const z=((Q=g.current)===null||Q===void 0?void 0:Q.getHeight())||0,L=o===1?0:((M=v.current)===null||M===void 0?void 0:M.getHeight())||0,F=((E=O.current)===null||E===void 0?void 0:E.getHeight())||0,H=Math.max(z,L+F);w(H+1),l(N)}},[b]);const T=f?Math.ceil((f[0]+f[1])/2):0;Nt(()=>{var I;const[Q,M]=f||[0,0];if(Q!==M){const N=(((I=p.current)===null||I===void 0?void 0:I.getHeight())||0)>$;let z=T;M-Q===1&&(z=N?Q:M),h(N?[Q,z]:[z,M])}},[f,T]);const R=ge(()=>{if(!e)return i(c,!1);if(b!==ap||!f||f[0]!==f[1]){const I=i(c,!1);return[z1,rp].includes(b)?I:y("span",{style:Object.assign(Object.assign({},cu),{WebkitLineClamp:o})},I)}return i(a?c:N1(c,f[0]),S)},[a,b,f,c].concat($e(s))),k={width:n,margin:0,padding:0,whiteSpace:P==="nowrap"?"normal":"inherit"};return y(At,null,R,b===op&&y(At,null,y(lu,{style:Object.assign(Object.assign(Object.assign({},k),cu),{WebkitLineClamp:o}),ref:g},d),y(lu,{style:Object.assign(Object.assign(Object.assign({},k),cu),{WebkitLineClamp:o-1}),ref:v},d),y(lu,{style:Object.assign(Object.assign(Object.assign({},k),cu),{WebkitLineClamp:1}),ref:O},i([],!0))),b===ap&&f&&f[0]!==f[1]&&y(lu,{style:Object.assign(Object.assign({},k),{top:400}),ref:p},i(N1(c,T),!0)),b===ip&&y("span",{style:{whiteSpace:"inherit"},ref:m}))}const j9=({enableEllipsis:t,isEllipsis:e,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!t?n:y(on,Object.assign({open:e?void 0:!1},r),n);var D9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:s,children:l,ellipsis:c,editable:u,copyable:d,component:f,title:h}=t,p=D9(t,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:m,direction:g}=fe(it),[v]=Ki("Text"),O=U(null),S=U(null),x=m("typography",r),b=cn(p,L1),[C,$]=tp(u),[w,P]=_n(!1,{value:$.editing}),{triggerType:_=["icon"]}=$,T=_e=>{var Pe;_e&&((Pe=$.onStart)===null||Pe===void 0||Pe.call($)),P(_e)},R=k9(w);Nt(()=>{var _e;!w&&R&&((_e=S.current)===null||_e===void 0||_e.focus())},[w]);const k=_e=>{_e==null||_e.preventDefault(),T(!0)},I=_e=>{var Pe;(Pe=$.onChange)===null||Pe===void 0||Pe.call($,_e),T(!1)},Q=()=>{var _e;(_e=$.onCancel)===null||_e===void 0||_e.call($),T(!1)},[M,E]=tp(d),{copied:N,copyLoading:z,onClick:L}=T9({copyConfig:E,children:l}),[F,H]=J(!1),[V,X]=J(!1),[B,G]=J(!1),[se,re]=J(!1),[le,me]=J(!0),[ie,ne]=tp(c,{expandable:!1,symbol:_e=>_e?v==null?void 0:v.collapse:v==null?void 0:v.expand}),[ue,de]=_n(ne.defaultExpanded||!1,{value:ne.expanded}),j=ie&&(!ue||ne.expandable==="collapsible"),{rows:ee=1}=ne,he=ge(()=>j&&(ne.suffix!==void 0||ne.onEllipsis||ne.expandable||C||M),[j,ne,C,M]);Nt(()=>{ie&&!he&&(H(hy("webkitLineClamp")),X(hy("textOverflow")))},[he,ie]);const[ve,Y]=J(j),ce=ge(()=>he?!1:ee===1?V:F,[he,V,F]);Nt(()=>{Y(ce&&j)},[ce,j]);const te=j&&(ve?se:B),Oe=j&&ee===1&&ve,ye=j&&ee>1&&ve,pe=(_e,Pe)=>{var ct;de(Pe.expanded),(ct=ne.onExpand)===null||ct===void 0||ct.call(ne,_e,Pe)},[Qe,Me]=J(0),De=({offsetWidth:_e})=>{Me(_e)},we=_e=>{var Pe;G(_e),B!==_e&&((Pe=ne.onEllipsis)===null||Pe===void 0||Pe.call(ne,_e))};be(()=>{const _e=O.current;if(ie&&ve&&_e){const Pe=Q9(_e);se!==Pe&&re(Pe)}},[ie,ve,l,ye,le,Qe]),be(()=>{const _e=O.current;if(typeof IntersectionObserver>"u"||!_e||!ve||!j)return;const Pe=new IntersectionObserver(()=>{me(!!_e.offsetParent)});return Pe.observe(_e),()=>{Pe.disconnect()}},[ve,j]);const Ie=R9(ne.tooltip,$.text,l),rt=ge(()=>{if(!(!ie||ve))return[$.text,l,h,Ie.title].find(I0)},[ie,ve,h,Ie.title,te]);if(w)return y(b9,{value:(n=$.text)!==null&&n!==void 0?n:typeof l=="string"?l:"",onSave:I,onCancel:Q,onEnd:$.onEnd,prefixCls:x,className:i,style:o,direction:g,component:f,maxLength:$.maxLength,autoSize:$.autoSize,enterIcon:$.enterIcon});const Ye=()=>{const{expandable:_e,symbol:Pe}=ne;return _e?y("button",{type:"button",key:"expand",className:`${x}-${ue?"collapse":"expand"}`,onClick:ct=>pe(ct,{expanded:!ue}),"aria-label":ue?v.collapse:v==null?void 0:v.expand},typeof Pe=="function"?Pe(ue):Pe):null},lt=()=>{if(!C)return;const{icon:_e,tooltip:Pe,tabIndex:ct}=$,xt=nr(Pe)[0]||(v==null?void 0:v.edit),Pn=typeof xt=="string"?xt:"";return _.includes("icon")?y(on,{key:"edit",title:Pe===!1?"":xt},y("button",{type:"button",ref:S,className:`${x}-edit`,onClick:k,"aria-label":Pn,tabIndex:ct},_e||y(FP,{role:"button"}))):null},Be=()=>M?y(N9,Object.assign({key:"copy"},E,{prefixCls:x,copied:N,locale:v,onCopy:L,loading:z,iconOnly:l==null})):null,ke=_e=>[_e&&Ye(),lt(),Be()],Xe=_e=>[_e&&!ue&&y("span",{"aria-hidden":!0,key:"ellipsis"},W9),ne.suffix,ke(_e)];return y(Kr,{onResize:De,disabled:!j},_e=>y(j9,{tooltipProps:Ie,enableEllipsis:j,isEllipsis:te},y(HP,Object.assign({className:Z({[`${x}-${a}`]:a,[`${x}-disabled`]:s,[`${x}-ellipsis`]:ie,[`${x}-ellipsis-single-line`]:Oe,[`${x}-ellipsis-multiple-line`]:ye},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:ye?ee:void 0}),component:f,ref:pr(_e,O,e),direction:g,onClick:_.includes("text")?k:void 0,"aria-label":rt==null?void 0:rt.toString(),title:h},b),y(L9,{enableMeasure:j&&!ve,text:l,rows:ee,width:Qe,onEllipsis:we,expanded:ue,miscDeps:[N,ue,z,C,M,v].concat($e(L1.map(Pe=>t[Pe])))},(Pe,ct)=>B9(t,y(At,null,Pe.length>0&&ct&&!ue&&rt?y("span",{key:"show-content","aria-hidden":!0},Pe):Pe,Xe(ct)))))))});var F9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n,rel:r}=t,i=F9(t,["ellipsis","rel"]);const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,y(eh,Object.assign({},o,{ref:e,ellipsis:!!n,component:"a"}))}),H9=Se((t,e)=>y(eh,Object.assign({ref:e},t,{component:"div"})));var X9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n}=t,r=X9(t,["ellipsis"]);const i=ge(()=>n&&typeof n=="object"?cn(n,["expandable","rows"]):n,[n]);return y(eh,Object.assign({ref:e},r,{ellipsis:i,component:"span"}))},q9=Se(Z9);var G9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{level:n=1}=t,r=G9(t,["level"]),i=Y9.includes(n)?`h${n}`:"h1";return y(eh,Object.assign({ref:e},r,{component:i}))}),yn=HP;yn.Text=q9;yn.Link=V9;yn.Title=U9;yn.Paragraph=H9;var K9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},J9=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:K9}))},eW=Se(J9),tW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},nW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:tW}))},Gu=Se(nW),rW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},iW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:rW}))},Yu=Se(iW),oW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M448 804a64 64 0 10128 0 64 64 0 10-128 0zm32-168h64c4.4 0 8-3.6 8-8V164c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"exclamation",theme:"outlined"},aW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:oW}))},sW=Se(aW),lW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},cW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:lW}))},uW=Se(cW),dW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"},fW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:dW}))},hW=Se(fW),pW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},mW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:pW}))},gW=Se(mW),vW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},OW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:vW}))},bW=Se(OW),yW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},SW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:yW}))},xW=Se(SW),CW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},$W=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:CW}))},XP=Se($W),wW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"},PW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:wW}))},_W=Se(PW),TW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},kW=function(e,n){return y(Rt,Ce({},e,{ref:n,icon:TW}))},RW=Se(kW);function uu({currentUser:t=null,isDarkMode:e=!1,onThemeToggle:n}){const[r,i]=J(!1),o=()=>{try{return window.self!==window.top}catch{return!0}},a=p=>{if(console.log("Header getUserPicture called with user:",p),p!=null&&p.entity_picture)return console.log("Using entity_picture:",p.entity_picture),p.entity_picture;if(p!=null&&p.id){const m=`/api/image/serve/${p.id}/512x512`;return console.log("Using fallback URL:",m),m}return console.log("No picture available for user"),null},s=p=>(p==null?void 0:p.name)||"Unknown User",l=()=>{const p=window.location.href,m=new URL(p);window.location.href=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/`},c=()=>{const p=window.location.href,m=new URL(p),g=m.hostname,v=m.protocol,O=m.port?`:${m.port}`:"",S=`${v}//${g}${O}/config/integrations/integration/rbac`;o()?window.open(S,"_blank"):window.location.href=S},u=()=>{const p=window.location.href,m=new URL(p),g=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/api/rbac/static/config.html`;window.open(g,"_blank")},d=()=>{localStorage.removeItem("hassTokens"),sessionStorage.removeItem("hassTokens");const p=window.location.href,m=new URL(p);window.location.href=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/auth/authorize`},f=()=>{i(!0),n()},h=[...o()?[{key:"newTab",label:"Open in New Tab",icon:A(uW,{}),onClick:u}]:[],...o()?[]:[{key:"home",label:"Return to Home Assistant",icon:A(hW,{}),onClick:l}],{key:"integration",label:"RBAC Integration",icon:A(XP,{}),onClick:c},{key:"logout",label:"Log Out",icon:A(gW,{}),onClick:d}];return A("div",{style:{background:e?"#1f1f1f":"white",padding:"20px",borderRadius:"8px",boxShadow:e?"0 2px 4px rgba(255,255,255,0.1)":"0 2px 4px rgba(0,0,0,0.1)",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px",border:e?"1px solid #424242":"none"},children:[A("div",{children:[A("h1",{style:{margin:0,color:e?"#ffffff":"#1976d2"},children:"🔐 RBAC Configuration"}),A("p",{style:{margin:0,color:e?"#d9d9d9":"#666"},children:"Manage role-based access control for your Home Assistant instance"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[A(on,{title:e?"Switch to light mode":"Switch to dark mode",children:A(vt,{type:"text",icon:e?A(_W,{className:r?"theme-toggle-spin":""}):A(bW,{className:r?"theme-toggle-spin":""}),onClick:f,style:{fontSize:"16px",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid #d9d9d9",backgroundColor:"transparent",transition:"all 0.3s ease"},onMouseEnter:p=>{p.currentTarget.style.backgroundColor="#f5f5f5",p.currentTarget.style.borderColor="#1890ff"},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="transparent",p.currentTarget.style.borderColor="#d9d9d9"}})}),t&&A(w0,{menu:{items:h},trigger:["click"],placement:"bottomRight",children:A("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.2s ease"},onMouseEnter:p=>{p.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="transparent"},children:[A(p0,{src:a(t),size:48,children:s(t).charAt(0).toUpperCase()}),A("div",{children:[A(yn.Text,{strong:!0,style:{fontSize:"16px"},children:s(t)}),A("br",{}),A(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:t.role||"No role assigned"})]})]})})]})]})}const{Option:IW}=jn;function j1({options:t,selectedValues:e,onSelectionChange:n,placeholder:r="Select items...",disabled:i=!1}){return A(jn,{mode:"multiple",placeholder:r,value:e,onChange:s=>{n(s||[])},disabled:i,tagRender:s=>{const{label:l,closable:c,onClose:u}=s;return A(Ka,{color:"blue",closable:c,onClose:u,style:{marginRight:3},children:l})},style:{width:"100%"},showSearch:!0,filterOption:(s,l)=>{var c;return((c=l==null?void 0:l.children)==null?void 0:c.toLowerCase().indexOf(s.toLowerCase()))>=0},children:t.map(s=>A(IW,{value:s,children:s},s))})}function MW({data:t,onSuccess:e,onError:n}){const[r,i]=J(!1),[o,a]=J({domains:[],entities:[]});be(()=>{var u;if((u=t.config)!=null&&u.default_restrictions){const d=t.config.default_restrictions;a({domains:Object.keys(d.domains||{}),entities:Object.keys(d.entities||{})})}},[t.config]);const s=async()=>{i(!0);try{const u=await l();if(!u)throw new Error("Not authenticated with Home Assistant");const d={domains:{},entities:{},services:{}};if(o.domains.forEach(h=>{d.domains[h]={hide:!0,services:[]}}),o.entities.forEach(h=>{d.entities[h]={hide:!0,services:[]}}),!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${u.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_default_restrictions",restrictions:d})})).ok)throw new Error("Failed to save default restrictions");e("Default restrictions saved successfully!")}catch(u){console.error("Error saving default restrictions:",u),n(u.message)}finally{i(!1)}},l=async()=>{try{const u=c();if(u&&u.auth){if(u.auth.data&&u.auth.data.access_token)return{access_token:u.auth.data.access_token,token_type:"Bearer"};if(u.auth.access_token)return{access_token:u.auth.access_token,token_type:"Bearer"}}const d=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return d?{access_token:JSON.parse(d).access_token,token_type:"Bearer"}:null}catch(u){return console.error("Auth error:",u),null}},c=()=>{try{const u=document.querySelector("home-assistant");return u&&u.hass?u.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch(u){return console.error("Error getting hass object:",u),null}};return A("div",{children:[A(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Configure global restrictions applied to all users."}),A(xs,{gutter:[16,16],style:{marginBottom:24},children:[A(Mr,{xs:24,md:12,children:A(j1,{options:t.domains||[],selectedValues:o.domains,onSelectionChange:u=>a(d=>({...d,domains:u})),placeholder:"Select domains to restrict...",disabled:r})}),A(Mr,{xs:24,md:12,children:A(j1,{options:t.entities||[],selectedValues:o.entities,onSelectionChange:u=>a(d=>({...d,entities:u})),placeholder:"Select entities to restrict...",disabled:r})})]}),A(jo,{style:{justifyContent:"flex-end",display:"flex",width:"100%",marginTop:24},children:A(vt,{type:"primary",onClick:s,disabled:r,loading:r,size:"large",children:"Save Default Restrictions"})})]})}let Jm=[],ZP=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=ZP[r])e=r+1;else return!0;if(e==n)return!1}}function D1(t){return t>=127462&&t<=127487}const B1=8205;function AW(t,e,n=!0,r=!0){return(n?qP:QW)(t,e,r)}function qP(t,e,n){if(e==t.length)return e;e&&GP(t.charCodeAt(e))&&YP(t.charCodeAt(e-1))&&e--;let r=sp(t,e);for(e+=W1(r);e=0&&D1(sp(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function QW(t,e,n){for(;e>0;){let r=qP(t,e-2,n);if(r=56320&&t<57344}function YP(t){return t>=55296&&t<56320}function W1(t){return t<65536?1:2}let Ft=class UP{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Cs(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),zi.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Cs(this,e,n);let r=[];return this.decompose(e,n,r,0),zi.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Pl(this),o=new Pl(e);for(let a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}iter(e=1){return new Pl(this,e)}iterRange(e,n=this.length){return new KP(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new JP(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?UP.empty:e.length<=32?new Rn(e):zi.from(Rn.split(e,[]))}};class Rn extends Ft{constructor(e,n=NW(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((n?r:s)>=e)return new zW(i,s,r,a);i=s+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Rn(F1(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),s=Uu(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new Rn(s,a.length+o.length));else{let l=s.length>>1;r.push(new Rn(s.slice(0,l)),new Rn(s.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Rn))return super.replace(e,n,r);[e,n]=Cs(this,e,n);let i=Uu(this.text,Uu(r.text,F1(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Rn(i,o):zi.from(Rn.split(i,[]),o)}sliceString(e,n=this.length,r=` -`){[e,n]=Cs(this,e,n);let i="";for(let o=0,a=0;o<=n&&ae&&a&&(i+=r),eo&&(i+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Rn(r,i)),r=[],i=-1);return i>-1&&n.push(new Rn(r,i)),n}}class zi extends Ft{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,i);i=s+1,r=l+1}}decompose(e,n,r,i){for(let o=0,a=0;a<=n&&o=a){let c=i&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!c?r.push(s):s.decompose(e-a,n-a,r,c)}a=l+1}}replace(e,n,r){if([e,n]=Cs(this,e,n),r.lines=o&&n<=s){let l=a.replace(e-o,n-o,r),c=this.lines-a.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new zi(u,this.length-(n-e)+r.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=` -`){[e,n]=Cs(this,e,n);let i="";for(let o=0,a=0;oe&&o&&(i+=r),ea&&(i+=s.sliceString(e-a,n-a,r)),a=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof zi))return 0;let r=0,[i,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==a||o==s)return r;let l=this.children[i],c=e.children[o];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let p of e)p.flatten(h);return new Rn(h,n)}let i=Math.max(32,r>>5),o=i<<1,a=i>>1,s=[],l=0,c=-1,u=[];function d(h){let p;if(h.lines>o&&h instanceof zi)for(let m of h.children)d(m);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof Rn&&l&&(p=u[u.length-1])instanceof Rn&&h.lines+p.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new Rn(p.text.concat(h.text),p.length+1+h.length)):(l+h.lines>i&&f(),l+=h.lines,c+=h.length+1,u.push(h))}function f(){l!=0&&(s.push(u.length==1?u[0]:zi.from(u,c)),c=-1,l=u.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new zi(s,n)}}Ft.empty=new Rn([""],0);function NW(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Uu(t,e,n=0,r=1e9){for(let i=0,o=0,a=!0;o=n&&(l>r&&(s=s.slice(0,r-i)),i0?1:(e instanceof Rn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof Rn?i.text.length:i.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=` -`,this;e--}else if(i instanceof Rn){let l=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Rn?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class KP{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Pl(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class JP{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ft.prototype[Symbol.iterator]=function(){return this.iter()},Pl.prototype[Symbol.iterator]=KP.prototype[Symbol.iterator]=JP.prototype[Symbol.iterator]=function(){return this});class zW{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Cs(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Jn(t,e,n=!0,r=!0){return AW(t,e,n,r)}function LW(t){return t>=56320&&t<57344}function jW(t){return t>=55296&&t<56320}function Er(t,e){let n=t.charCodeAt(e);if(!jW(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return LW(r)?(n-55296<<10)+(r-56320)+65536:n}function M0(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Li(t){return t<65536?1:2}const eg=/\r\n?|\n/;var Kn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Kn||(Kn={}));class Xi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-i);o+=s}else{if(r!=Kn.Simple&&c>=e&&(r==Kn.TrackDel&&ie||r==Kn.TrackBefore&&ie))return null;if(c>e||c==e&&n<0&&!s)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r=0&&i<=n&&s>=e)return in?"cover":!0;i=s}return!1}toString(){let e="";for(let n=0;n=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Xi(e)}static create(e){return new Xi(e)}}class Dn extends Xi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return tg(this,(n,r,i,o,a)=>e=e.replace(i,i+(r-n),a),!1),e}mapDesc(e,n=!1){return ng(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i=0){n[i]=s,n[i+1]=a;let l=i>>1;for(;r.length0&&Ro(r,n,o.text),o.forward(u),s+=u}let c=e[a++];for(;s>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],a=0,s=null;function l(u=!1){if(!u&&!i.length)return;af||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let p=h?typeof h=="string"?Ft.of(h.split(r||eg)):h:Ft.empty,m=p.length;if(d==f&&m==0)return;da&&lr(i,d-a,-1),lr(i,f-d,m),Ro(o,i,p),a=f}}return c(e),l(!s),s}static empty(e){return new Dn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;is&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Ro(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,c,o,u,d),i=c,o=u}}}function ng(t,e,n,r=!1){let i=[],o=r?[]:null,a=new Gl(t),s=new Gl(e);for(let l=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&s.ins==-1){let c=Math.min(a.len,s.len);lr(i,c,-1),a.forward(c),s.forward(c)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len=0&&l=0){let c=0,u=a.len;for(;u;)if(s.ins==-1){let d=Math.min(u,s.len);c+=d,u-=d,s.forward(d)}else if(s.ins==0&&s.lenl||a.ins>=0&&a.len>l)&&(s||r.length>c),o.forward2(l),a.forward(l)}}}}class Gl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Ft.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ft.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class la{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new la(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return xe.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return xe.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return xe.range(e.anchor,e.head)}static create(e,n,r){return new la(e,n,r)}}class xe{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:xe.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new xe(e.ranges.map(n=>la.fromJSON(n)),e.main)}static single(e,n=e){return new xe([xe.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;io.head?xe.range(l,s):xe.range(s,l))}}return new xe(e,n)}}function t_(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let E0=0;class He{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=E0++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new He(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:A0),!!e.static,e.enables)}of(e){return new Ku([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ku(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ku(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function A0(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class Ku{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=E0++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,c=!1,u=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?c=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||u.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||rg(d,u)){let h=r(d);if(s?!V1(h,d.values[a],i):!i(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,p=f.config.address[o];if(p!=null){let m=Nd(f,p);if(this.dependencies.every(g=>g instanceof He?f.facet(g)===d.facet(g):g instanceof Zn?f.field(g,!1)==d.field(g,!1):!0)||(s?V1(h=r(d),m,i):i(h=r(d),m)))return d.values[a]=m,0}else h=r(d);return d.values[a]=h,1}}}}function V1(t,e,n){if(t.length!=e.length)return!1;for(let r=0;rt[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let c=[];for(let u=0;ur===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(du).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],a=this.updateF(o,i);return this.compareF(o,a)?0:(r.values[n]=a,1)},reconfigure:(r,i)=>{let o=r.facet(du),a=i.facet(du),s;return(s=o.find(l=>l.field==this))&&s!=a.find(l=>l.field==this)?(r.values[n]=s.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,du.of({field:this,create:e})]}get extension(){return this}}const na={lowest:4,low:3,default:2,high:1,highest:0};function nl(t){return e=>new n_(e,t)}const Xo={highest:nl(na.highest),high:nl(na.high),default:nl(na.default),low:nl(na.low),lowest:nl(na.lowest)};class n_{constructor(e,n){this.inner=e,this.prec=n}}class th{of(e){return new ig(this,e)}reconfigure(e){return th.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class ig{constructor(e,n){this.compartment=e,this.inner=n}}class Qd{constructor(e,n,r,i,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,r){let i=[],o=Object.create(null),a=new Map;for(let f of BW(e,n,a))f instanceof Zn?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],c=[];for(let f of i)s[f.id]=c.length<<1,c.push(h=>f.slot(h));let u=r==null?void 0:r.config.facets;for(let f in o){let h=o[f],p=h[0].facet,m=u&&u[f]||[];if(h.every(g=>g.type==0))if(s[p.id]=l.length<<1|1,A0(m,h))l.push(r.facet(p));else{let g=p.combine(h.map(v=>v.value));l.push(r&&p.compare(g,r.facet(p))?r.facet(p):g)}else{for(let g of h)g.type==0?(s[g.id]=l.length<<1|1,l.push(g.value)):(s[g.id]=c.length<<1,c.push(v=>g.dynamicSlot(v)));s[p.id]=c.length<<1,c.push(g=>DW(g,p,h))}}let d=c.map(f=>f(s));return new Qd(e,a,d,s,l,o)}}function BW(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(a,s){let l=i.get(a);if(l!=null){if(l<=s)return;let c=r[l].indexOf(a);c>-1&&r[l].splice(c,1),a instanceof ig&&n.delete(a.compartment)}if(i.set(a,s),Array.isArray(a))for(let c of a)o(c,s);else if(a instanceof ig){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(a.compartment)||a.inner;n.set(a.compartment,c),o(c,s)}else if(a instanceof n_)o(a.inner,a.prec);else if(a instanceof Zn)r[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof Ku)r[s].push(a),a.facet.extensions&&o(a.facet.extensions,na.default);else{let c=a.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,s)}}return o(t,na.default),r.reduce((a,s)=>a.concat(s))}function _l(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Nd(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const r_=He.define(),og=He.define({combine:t=>t.some(e=>e),static:!0}),i_=He.define({combine:t=>t.length?t[0]:void 0,static:!0}),o_=He.define(),a_=He.define(),s_=He.define(),l_=He.define({combine:t=>t.length?t[0]:!1});class Ji{constructor(e,n){this.type=e,this.value=n}static define(){return new WW}}class WW{of(e){return new Ji(this,e)}}class FW{constructor(e){this.map=e}of(e){return new gt(this,e)}}class gt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new gt(this.type,n)}is(e){return this.type==e}static define(e={}){return new FW(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}gt.reconfigure=gt.define();gt.appendConfig=gt.define();class Nn{constructor(e,n,r,i,o,a){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&t_(r,n.newLength),o.some(s=>s.type==Nn.time)||(this.annotations=o.concat(Nn.time.of(Date.now())))}static create(e,n,r,i,o,a){return new Nn(e,n,r,i,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Nn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Nn.time=Ji.define();Nn.userEvent=Ji.define();Nn.addToHistory=Ji.define();Nn.remote=Ji.define();function VW(t,e){let n=[];for(let r=0,i=0;;){let o,a;if(r=t[r]))o=t[r++],a=t[r++];else if(i=0;i--){let o=r[i](t);o instanceof Nn?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Nn?t=o[0]:t=u_(e,as(o),!1)}return t}function XW(t){let e=t.startState,n=e.facet(s_),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=c_(r,ag(e,o,t.changes.newLength),!0))}return r==t?t:Nn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const ZW=[];function as(t){return t==null?ZW:Array.isArray(t)?t:[t]}var Sn=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Sn||(Sn={}));const qW=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let sg;try{sg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function GW(t){if(sg)return sg.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||qW.test(n)))return!0}return!1}function YW(t){return e=>{if(!/\S/.test(e))return Sn.Space;if(GW(e))return Sn.Word;for(let n=0;n-1)return Sn.Word;return Sn.Other}}class Qt{constructor(e,n,r,i,o,a){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;si.set(c,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(gt.reconfigure)?(n=null,r=s.value):s.is(gt.appendConfig)&&(n=null,r=as(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=Qd.resolve(r,i,this),o=new Qt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let a=e.startState.facet(og)?e.newSelection:e.newSelection.asSingle();new Qt(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:xe.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=as(r.effects);for(let s=1;sa.spec.fromJSON(s,l)))}}return Qt.create({doc:e.doc,selection:xe.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=Qd.resolve(e.extensions||[],new Map),r=e.doc instanceof Ft?e.doc:Ft.of((e.doc||"").split(n.staticFacet(Qt.lineSeparator)||eg)),i=e.selection?e.selection instanceof xe?e.selection:xe.single(e.selection.anchor,e.selection.head):xe.single(0);return t_(i,r.length),n.staticFacet(og)||(i=i.asSingle()),new Qt(n,r,i,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(Qt.tabSize)}get lineBreak(){return this.facet(Qt.lineSeparator)||` -`}get readOnly(){return this.facet(l_)}phrase(e,...n){for(let r of this.facet(Qt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(r_))for(let a of o(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){return YW(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=Jn(n,a,!1);if(o(n.slice(l,a))!=Sn.Word)break;a=l}for(;st.length?t[0]:4});Qt.lineSeparator=i_;Qt.readOnly=l_;Qt.phrases=He.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Qt.languageData=r_;Qt.changeFilter=o_;Qt.transactionFilter=a_;Qt.transactionExtender=s_;th.reconfigure=gt.define();function eo(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let a=i[o],s=r[o];if(s===void 0)r[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class xa{eq(e){return this==e}range(e,n=e){return lg.create(e,n,this)}}xa.prototype.startSide=xa.prototype.endSide=0;xa.prototype.point=!1;xa.prototype.mapMode=Kn.TrackDel;let lg=class d_{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new d_(e,n,r)}};function cg(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Q0{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let a=i,s=o.length;;){if(a==s)return a;let l=a+s>>1,c=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return c>=0?a:s;c>=0?s=l:a=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);oh||f==h&&c.startSide>0&&c.endSide<=0)continue;(h-f||c.endSide-c.startSide)<0||(a<0&&(a=f),c.point&&(s=Math.max(s,h-f)),r.push(c),i.push(f-a),o.push(h-a))}return{mapped:r.length?new Q0(i,o,r,s):null,pos:a}}}class jt{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new jt(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(cg)),this.isEmpty)return n.length?jt.of(n):this;let s=new f_(this,null,-1).goto(0),l=0,c=[],u=new fo;for(;s.value||l=0){let d=n[l++];u.addInner(d.from,d.to,d.value)||c.push(d)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||os.to||o=o&&e<=o+a.length&&a.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Yl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Yl.from(e).goto(n)}static compare(e,n,r,i,o=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=H1(a,s,r),c=new rl(a,l,o),u=new rl(s,l,o);r.iterGaps((d,f,h)=>X1(c,d,u,f,h,i)),r.empty&&r.length==0&&X1(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),a=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=H1(o,a),l=new rl(o,s,0).goto(r),c=new rl(a,s,0).goto(r);for(;;){if(l.to!=c.to||!ug(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,o=-1){let a=new rl(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let c=Math.min(a.to,r);if(a.point){let u=a.activeForPoint(a.to),d=a.pointFroms&&(i.span(s,c,a.active,l),l=a.openEnd(c));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new fo;for(let i of e instanceof lg?[e]:n?UW(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return jt.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=jt.empty;i=i.nextLayer)n=new jt(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}jt.empty=new jt([],[],null,-1);function UW(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(cg);e=r}return t}jt.empty.nextLayer=jt.empty;class fo{finishChunk(e){this.chunks.push(new Q0(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new fo)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(jt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=jt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function H1(t,e,n){let r=new Map;for(let o of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new f_(a,n,r,o));return i.length==1?i[0]:new Yl(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)lp(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)lp(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),lp(this.heap,0)}}}function lp(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class rl{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yl.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){fu(this.active,e),fu(this.activeTo,e),fu(this.activeRank,e),this.minActive=Z1(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n0;)n++;hu(this.active,n,r),hu(this.activeTo,n,i),hu(this.activeRank,n,o),e&&hu(e,n,this.cursor.from),this.minActive=Z1(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&fu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function X1(t,e,n,r,i,o){t.goto(e),n.goto(r);let a=r+i,s=r,l=r-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,d=u<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&ug(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!ug(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;(c||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),s=d,u<=0&&t.next(),u>=0&&n.next()}}function ug(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function Z1(t,e){let n=-1,r=1e9;for(let i=0;i=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Jn(t,i)}return r===!0?-1:t.length}const fg="ͼ",q1=typeof Symbol>"u"?"__"+fg:Symbol.for(fg),hg=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),G1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Do{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,c){let u=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let p=s[h];if(/&/.test(h))o(h.split(/,\s*/).map(m=>a.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),p,l);else if(p&&typeof p=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),p,u,f)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||f)&&l.push((r&&!d&&!c?a.map(r):a).join(", ")+" {"+u.join(" ")+"}")}for(let a in e)o(i(a),e[a],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let e=G1[q1]||1;return G1[q1]=e+1,fg+e.toString(36)}static mount(e,n,r){let i=e[hg],o=r&&r.nonce;i?o&&i.setNonce(o):i=new KW(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let Y1=new Map;class KW{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=Y1.get(r);if(o)return e[hg]=o;this.sheet=new i.CSSStyleSheet,Y1.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[hg]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let a=0;a-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),r)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},JW=typeof navigator<"u"&&/Mac/.test(navigator.platform),eF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Un=0;Un<10;Un++)Bo[48+Un]=Bo[96+Un]=String(Un);for(var Un=1;Un<=24;Un++)Bo[Un+111]="F"+Un;for(var Un=65;Un<=90;Un++)Bo[Un]=String.fromCharCode(Un+32),Ul[Un]=String.fromCharCode(Un);for(var cp in Bo)Ul.hasOwnProperty(cp)||(Ul[cp]=Bo[cp]);function tF(t){var e=JW&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||eF&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ul:Bo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function rn(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function rF(t,e,n,r,i,o,a,s){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,d=!1;u&&!d;)if(u.nodeType==1){let f,h=u==l.body,p=1,m=1;if(h)f=nF(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:p,scaleY:m}=p_(u,O)),f={left:O.left,right:O.left+u.clientWidth*p,top:O.top,bottom:O.top+u.clientHeight*m}}let g=0,v=0;if(i=="nearest")e.top0&&e.bottom>f.bottom+v&&(v=e.bottom-f.bottom+a)):e.bottom>f.bottom&&(v=e.bottom-f.bottom+a,n<0&&e.top-v0&&e.right>f.right+g&&(g=e.right-f.right+o)):e.right>f.right&&(g=e.right-f.right+o,n<0&&e.leftf.bottom||e.leftf.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function iF(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class oF{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Yi(n):0),r,Math.min(e.focusOffset,r?Yi(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Va=null;function m_(t){if(t.setActive)return t.setActive();if(Va)return t.focus(Va);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Va==null?{get preventScroll(){return Va={preventScroll:!0},!0}}:void 0),!Va){Va=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function O_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Yi(n)}else if(n.parentNode&&!zd(n))r=Ca(n),n=n.parentNode;else return null}}function b_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&rn)return d.domBoundsAround(e,n,c);if(f>=e&&i==-1&&(i=l,o=c),c>n&&d.dom.parentNode==this.dom){a=l,s=u;break}u=f,c=f+d.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=N0){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function S_(t,e,n,r,i,o,a,s,l){let{children:c}=t,u=c.length?c[e]:null,d=o.length?o[o.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&u&&!a&&!f&&o.length<2&&u.merge(n,i,o.length?d:null,n==0,s,l))){if(r0&&(!a&&o.length&&u.merge(n,u.length,o[0],!1,s,0)?u.breakAfter=o.shift().breakAfter:(n2);var Ve={mac:tS||/Mac/.test(Ar.platform),windows:/Win/.test(Ar.platform),linux:/Linux|X11/.test(Ar.platform),ie:nh,ie_version:C_?mg.documentMode||6:vg?+vg[1]:gg?+gg[1]:0,gecko:eS,gecko_version:eS?+(/Firefox\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,chrome:!!up,chrome_version:up?+up[1]:0,ios:tS,android:/Android\b/.test(Ar.userAgent),safari:$_,webkit_version:lF?+(/\bAppleWebKit\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,tabSize:mg.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const cF=256;class Pi extends ln{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof Pi)||this.length-(n-e)+r.length>cF||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Pi(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new cr(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return uF(this.dom,e,n)}}class ho extends ln{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(g_(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,a){return r&&(!(r instanceof ho&&r.mark.eq(this.mark))||e&&o<=0||ne&&n.push(r=e&&(i=o),r=l,o++}let a=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ho(this.mark,n,a)}domAtPos(e){return w_(this,e)}coordsAt(e,n){return __(this,e,n)}}function uF(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?Ve.chrome||Ve.gecko||(e?(i--,a=1):o=0)?0:s.length-1];return Ve.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,c=>c.width)||l),a?Rc(l,a<0):l||null}class Io extends ln{static create(e,n,r){return new Io(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Io.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,a){return r&&(!(r instanceof Io)||!this.widget.compare(r.widget)||e>0&&o<=0||n0)?cr.before(this.dom):cr.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?i.length-1:0;o=i[s],!(e>0?s==0:s==i.length-1||o.top0?cr.before(this.dom):cr.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ft.empty}get isHidden(){return!0}}Pi.prototype.children=Io.prototype.children=ws.prototype.children=N0;function w_(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;io&&e0;o--){let a=r[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=i;o0&&e instanceof ho&&i.length&&(r=i[i.length-1])instanceof ho&&r.mark.eq(e.mark)?P_(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function __(t,e,n){let r=null,i=-1,o=null,a=-1;function s(c,u){for(let d=0,f=0;d=u&&(h.children.length?s(h,u-f):(!o||o.isHidden&&(n>0||fF(o,h)))&&(p>u||f==p&&h.getSide()>0)?(o=h,a=u-f):(f-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function bg(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function hF(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Wo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:a}=T_(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new Wo(e,r,i,n,e.widget||null,!0)}static line(e){return new Mc(e)}static set(e,n=!1){return jt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}at.none=jt.empty;class Ic extends at{constructor(e){let{start:n,end:r}=T_(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Ic&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Ld(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Ic.prototype.point=!1;class Mc extends at{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Mc&&this.spec.class==e.spec.class&&Ld(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Mc.prototype.mapMode=Kn.TrackBefore;Mc.prototype.point=!0;class Wo extends at{constructor(e,n,r,i,o,a){super(n,r,o,e),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?Kn.TrackBefore:Kn.TrackAfter:Kn.TrackDel}get type(){return this.startSide!=this.endSide?Sr.WidgetRange:this.startSide<=0?Sr.WidgetBefore:Sr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Wo&&pF(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Wo.prototype.point=!0;function T_(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function pF(t,e){return t==e||!!(t&&e&&t.compare(e))}function ed(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class An extends ln{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,a){if(r){if(!(r instanceof An))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),x_(this,e,n,r?r.children.slice():[],o,a),!0}split(e){let n=new An;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Ld(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){P_(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=Og(n,this.attrs||{})),r&&(this.attrs=Og({class:r},this.attrs||{}))}domAtPos(e){return w_(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(g_(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(bg(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&ln.get(i)instanceof ho;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=ln.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Ve.ios||!this.children.some(o=>o instanceof Pi))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof Pi)||/[^ -~]/.test(r.text))return null;let i=$s(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=__(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight=n){if(o instanceof An)return o;if(a>n)break}i=a+o.breakAfter}return null}}class lo extends ln{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,a){return r&&(!(r instanceof lo)||!this.widget.compare(r.widget)||e>0&&o<=0||n0}}class yg extends to{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class kl{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof lo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new An),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(pu(new ws(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof lo)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e),o=Math.min(i,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(pu(new Pi(this.text.slice(this.textOff,this.textOff+o)),n),r),this.atCursorPos=!0,this.textOff+=o,e-=o,r=i<=o?0:n.length}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof Wo){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof Wo)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new lo(r.widget||Ps.block,s,r));else{let l=Io.create(r.widget||Ps.inline,s,s?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e0),u=!l.isEditable&&(ei.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(d.append(pu(new ws(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(pu(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let a=new kl(e,n,r,o);return a.openEnd=jt.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function pu(t,e){for(let n of e)t=new ho(n,[t],t.length);return t}class Ps extends to{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ps.inline=new Ps("span");Ps.block=new Ps("div");var mn=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(mn||(mn={}));const wa=mn.LTR,z0=mn.RTL;function k_(t){let e=[];for(let n=0;n=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.fromn:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function I_(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;m-=3)if(Mi[m+1]==-h){let g=Mi[m+2],v=g&2?i:g&4?g&1?o:i:0;v&&(an[d]=an[Mi[m]]=v),s=m;break}}else{if(Mi.length==189)break;Mi[s++]=d,Mi[s++]=f,Mi[s++]=l}else if((p=an[d])==2||p==1){let m=p==i;l=m?0:1;for(let g=s-3;g>=0;g-=3){let v=Mi[g+2];if(v&2)break;if(m)Mi[g+2]|=2;else{if(v&4)break;Mi[g+2]|=4}}}}}function yF(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:t,s=il;)p==g&&(p=n[--m].from,g=m?n[m-1].to:t),an[--p]=h;l=u}else o=c,l++}}}function xg(t,e,n,r,i,o,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;ll&&a.push(new Mo(l,m.from,h));let g=m.direction==wa!=!(h%2);Cg(t,g?r+1:r,i,m.inner,m.from,m.to,a),l=m.to}p=m.to}else{if(p==n||(u?an[p]!=s:an[p]==s))break;p++}f?xg(t,l,p,r+1,i,f,a):le;){let u=!0,d=!1;if(!c||l>o[c-1].to){let m=an[l-1];m!=s&&(u=!1,d=m==16)}let f=!u&&s==1?[]:null,h=u?r:r+1,p=l;e:for(;;)if(c&&p==o[c-1].to){if(d)break e;let m=o[--c];if(!u)for(let g=m.from,v=c;;){if(g==e)break e;if(v&&o[v-1].to==g)g=o[--v].from;else{if(an[g-1]==s)break e;break}}if(f)f.push(m);else{m.toan.length;)an[an.length]=256;let r=[],i=e==wa?0:1;return Cg(t,i,i,n,0,t.length,r),r}function M_(t){return[new Mo(0,t,0)]}let E_="";function xF(t,e,n,r,i){var o;let a=r.head-t.from,s=Mo.find(e,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[s],c=l.side(i,n);if(a==c){let f=s+=i?1:-1;if(f<0||f>=e.length)return null;l=e[s=f],a=l.side(!i,n),c=l.side(i,n)}let u=Jn(t.text,a,l.forward(i,n));(ul.to)&&(u=c),E_=t.text.slice(Math.min(a,u),Math.max(a,u));let d=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return d&&u==c&&d.level+(i?0:1)t.some(e=>e)}),B_=He.define({combine:t=>t.some(e=>e)}),W_=He.define();class ls{constructor(e,n="nearest",r="nearest",i=5,o=5,a=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new ls(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new ls(xe.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const mu=gt.define({map:(t,e)=>t.map(e)}),F_=gt.define();function Nr(t,e,n){let r=t.facet(z_);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const oo=He.define({combine:t=>t.length?t[0]:!0});let $F=0;const Ja=He.define({combine(t){return t.filter((e,n)=>{for(let r=0;r{let l=[];return a&&l.push(Jl.of(c=>{let u=c.plugin(s);return u?a(u):at.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return In.define((r,i)=>new e(r,i),n)}}class dp{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Nr(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Nr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Nr(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const V_=He.define(),D0=He.define(),Jl=He.define(),H_=He.define(),Ec=He.define(),X_=He.define();function rS(t,e){let n=t.state.facet(X_);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return jt.spans(r,e.from,e.to,{point(){},span(o,a,s,l){let c=o-e.from,u=a-e.from,d=i;for(let f=s.length-1;f>=0;f--,l--){let h=s[f].spec.bidiIsolate,p;if(h==null&&(h=CF(e.text,c,u)),l>0&&d.length&&(p=d[d.length-1]).to==c&&p.direction==h)p.to=u,d=p.inner;else{let m={from:c,to:u,direction:h,inner:[]};d.push(m),d=m.inner}}}}),i}const Z_=He.define();function B0(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(Z_)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:n,top:r,bottom:i}}const hl=He.define();class ui{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new ui(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toAu)break;o+=2}if(!l)return r;new ui(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class jd{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Dn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,a,s,l)=>i.push(new ui(o,a,s,l))),this.changedRanges=i}static create(e,n,r){return new jd(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class iS extends ln{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=at.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new An],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ui(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!IF(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?PF(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new ui(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Ve.ie||Ve.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=kF(a,s,e.changes);return r=ui.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Ve.chrome||Ve.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?i[a]:null;if(!s)break;let{fromA:l,toA:c,fromB:u,toB:d}=s,f,h,p,m;if(r&&r.range.fromBu){let x=kl.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),b=kl.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=x.breakAtStart,p=x.openStart,m=b.openEnd;let C=this.compositionView(r);b.breakAtStart?C.breakAfter=1:b.content.length&&C.merge(C.length,C.length,b.content[0],!1,b.openStart,0)&&(C.breakAfter=b.content[0].breakAfter,b.content.shift()),x.content.length&&C.merge(0,0,x.content[x.content.length-1],!0,0,x.openEnd)&&x.content.pop(),f=x.content.concat(C).concat(b.content)}else({content:f,breakAtStart:h,openStart:p,openEnd:m}=kl.build(this.view.state.doc,u,d,this.decorations,this.dynamicDecorationMap));let{i:g,off:v}=o.findPos(c,1),{i:O,off:S}=o.findPos(l,-1);S_(this,O,S,g,v,f,h,p,m)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(F_)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new Pi(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new ho(i,[n],n.length);let r=new An;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=ln.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(oo)||this.dom.tabIndex>-1)&&Ju(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),c=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Ve.gecko&&s.empty&&!this.hasComposition&&wF(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=c=new cr(d,0),a=!0}let u=this.view.observer.selectionRange;(a||!u.focusNode||(!Tl(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Tl(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{Ve.android&&Ve.chrome&&this.dom.contains(u.focusNode)&&RF(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=Kl(this.view.root);if(d)if(s.empty){if(Ve.gecko){let f=_F(l.node,l.offset);if(f&&f!=3){let h=(f==1?O_:b_)(l.node,l.offset);h&&(l=new cr(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,c]=[c,l]),f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new cr(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new cr(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Tl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Kl(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=An.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i=0;i--){let o=ln.get(n.childNodes[i]);o instanceof An&&(r=o.domAtPos(o.length))}return r?new cr(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=ln.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n=0;a--){let s=this.children[a],l=o-s.breakAfter,c=l-s.length;if(le||s.covers(1))&&(!r||s instanceof An&&!(r instanceof An&&n>=0)))r=s,i=c;else if(r&&c==e&&l==e&&s instanceof lo&&Math.abs(n)<2){if(s.deco.startSide<0)break;a&&(r=null)}o=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof An))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(r,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}r=l}if(!(i instanceof Pi))return null;let o=Jn(i.text,r);if(o==r)return null;let a=$a(i.dom,r,o).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==mn.LTR;for(let c=0,u=0;ui)break;if(c>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let p=d.dom.lastChild,m=p?$s(p):[];if(m.length){let g=m[m.length-1],v=l?g.right-h.left:h.right-g.left;v>s&&(s=v,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?mn.RTL:mn.LTR}measureTextSize(){for(let o of this.children)if(o instanceof An){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=$s(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new y_(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],a=o?o.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(at.replace({widget:new yg(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!o)break;r=o.to+1}return at.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Jl).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(H_).map((o,a)=>{let s=typeof o=="function";return s&&(r=!0),s?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(jt.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=B0(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;rF(this.view.scrollDOM,a,n.head{re.from&&(n=!0)}),n}function MF(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return xe.cursor(e);o==0?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=Jn(i.text,o,!1):s=Jn(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let c=Jn(i.text,a,!1);if(r(i.text.slice(c,a))!=l)break;a=c}for(;st?e.left-t:Math.max(0,t-e.right)}function AF(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function fp(t,e){return t.tope.top+1}function oS(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function wg(t,e,n){let r,i,o,a,s=!1,l,c,u,d;for(let p=t.firstChild;p;p=p.nextSibling){let m=$s(p);for(let g=0;gS||a==S&&o>O)&&(r=p,i=v,o=O,a=S,s=O?e0:gv.bottom&&(!u||u.bottomv.top)&&(c=p,d=v):u&&fp(u,v)?u=aS(u,v.bottom):d&&fp(d,v)&&(d=oS(d,v.top))}}if(u&&u.bottom>=n?(r=l,i=u):d&&d.top<=n&&(r=c,i=d),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return sS(r,f,n);if(s&&r.contentEditable!="false")return wg(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function sS(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&d=(u.left+u.right)/2,h=f;if((Ve.chrome||Ve.gecko)&&$a(t,s).getBoundingClientRect().left==u.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};i=s+(h?1:0),o=d}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function G_(t,e,n,r=-1){var i,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:d}=e,f=d-s;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let x=t.viewState.heightOracle.textHeight/2,b=!1;l=t.elementAtHeight(f),l.type!=Sr.Text;)for(;f=r>0?l.bottom+x:l.top-x,!(f>=0&&f<=c);){if(b)return n?null:0;b=!0,r=-r}d=s+f;let h=l.from;if(ht.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:lS(t,a,l,u,d);let p=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:p,g=m.elementFromPoint(u,d);g&&!t.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!t.contentDOM.contains(g)&&(g=null));let v,O=-1;if(g&&((i=t.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let x=p.caretPositionFromPoint(u,d);x&&({offsetNode:v,offset:O}=x)}else if(p.caretRangeFromPoint){let x=p.caretRangeFromPoint(u,d);x&&({startContainer:v,startOffset:O}=x)}v&&(!t.contentDOM.contains(v)||Ve.safari&&QF(v,O,u)||Ve.chrome&&NF(v,O,u))&&(v=void 0),v&&(O=Math.min(Yi(v),O))}if(!v||!t.docView.dom.contains(v)){let x=An.find(t.docView,h);if(!x)return f>l.top+l.height/2?l.to:l.from;({node:v,offset:O}=wg(x.dom,u,d))}let S=t.docView.nearest(v);if(!S)return null;if(S.isWidget&&((o=S.dom)===null||o===void 0?void 0:o.nodeType)==1){let x=S.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-s)*.5)/s);o+=l*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+dg(a,o,t.state.tabSize)}function Y_(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let o=i.nextSibling;if(o){if(o.nodeName=="BR")break;return!1}else{let a=i.parentNode;if(!a||a.nodeName=="DIV")break;i=a}}return $a(t,r-1,r).getBoundingClientRect().right>n}function QF(t,e,n){return Y_(t,e,n)}function NF(t,e,n){if(e!=0)return Y_(t,e,n);for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():$a(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function Pg(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let o of r.type){if(o.from>e)break;if(!(o.toe)return o;(!i||o.type==Sr.Text&&(i.type!=o.type||(n<0?o.frome)))&&(i=o)}}return i||r}return r}function zF(t,e,n,r){let i=Pg(t,e.head,e.assoc||-1),o=!r||i.type!=Sr.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(s==mn.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return xe.cursor(l,n?-1:1)}return xe.cursor(n?i.to:i.from,n?-1:1)}function cS(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let c=xF(i,o,a,s,n),u=E_;if(!c){if(i.number==(n?t.state.doc.lines:1))return s;u=` -`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return s}else{if(!r)return c;l=r(u)}s=c}}function LF(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let a=r(o);return i==Sn.Space&&(i=a),i==a}}function jF(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return xe.cursor(i,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)a==null&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let h=t.viewState.lineBlockAt(i);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),s=(o<0?h.top:h.bottom)+u}let d=l.left+a,f=r??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=s+(f+h)*o,m=G_(t,{x:d,y:p},!1,o);if(pl.bottom||(o<0?mi)){let g=t.docView.coordsForChar(m),v=!g||p{if(e>o&&ei(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:xe.cursor(r,ro)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=i.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=o+a}}readNode(e){if(e.cmIgnore)return;let n=ln.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(BF(e,r.node,r.offset)?n:0))}}function BF(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=o||a?[]:HF(e),l=new DF(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=XF(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!pg(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),c=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!pg(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),u=e.viewport;if((Ve.ios||Ve.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=i.from,c=null;(o===8||Ve.android&&e.text.length=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:Ve.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==` - `&&t.lineWrapping&&(r&&(r=xe.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ft.of([" "])}),n)return W0(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin,s=="select.pointer"&&(r=U_(t.state.facet(Ec).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function W0(t,e,n,r=-1){if(Ve.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Ve.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ss(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&ss(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&ss(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=FF(t,e,n));return t.state.facet(L_).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function FF(t,e,n){let r,i=t.state,o=i.selection.main,a=-1;if(e.from==e.to&&e.fromo.to){let l=e.fromd(t)),c,l);e.from==u&&(a=u)}if(a>-1)r={changes:e,selection:xe.cursor(e.from+e.insert.length,-1)};else if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=o.frome.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),d,f=n&&q_(t,n.main.head);if(f){let m=e.insert.length-(e.to-e.from);d={from:f.from,to:f.to-m}}else d=t.state.doc.lineAt(o.head);let h=o.to-e.to,p=o.to-o.from;r=i.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:l,range:c||m.map(l)};let g=m.to-h,v=g-u.length;if(m.to-m.from!=p||t.state.sliceDoc(v,g)!=u||m.to>=d.from&&m.from<=d.to)return{range:m};let O=i.changes({from:v,to:g,insert:e.insert}),S=m.to-o.to;return{changes:O,range:c?xe.range(Math.max(0,c.anchor+S),Math.max(0,c.head+S)):m.map(O)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function VF(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}if(a=a?o-n:0;o-=l,s=o+(s-a),a=o}else if(s=s?o-n:0;o-=l,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}function HF(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new uS(n,r)),(i!=n||o!=r)&&e.push(new uS(i,o))),e}function XF(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?xe.single(n+e,r+e):null}class ZF{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Ve.safari&&e.contentDOM.addEventListener("input",()=>null),Ve.gecko&&cV(e.contentDOM.ownerDocument)}handleEvent(e){!tV(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=qF(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&eT.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Ve.android&&Ve.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Ve.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=J_.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||GF.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:Ve.safari&&!Ve.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function dS(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Nr(n.state,i)}}}function qF(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,o=i&&i.plugin.domEventHandlers,a=i&&i.plugin.domEventObservers;if(o)for(let s in o){let l=o[s];l&&n(s).handlers.push(dS(r.value,l))}if(a)for(let s in a){let l=a[s];l&&n(s).observers.push(dS(r.value,l))}}for(let r in _i)n(r).handlers.push(_i[r]);for(let r in fi)n(r).observers.push(fi[r]);return e}const J_=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],GF="dthko",eT=[16,17,18,20,91,92,224,225],gu=6;function vu(t){return Math.max(0,t)*.7+8}function YF(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class UF{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=iF(e.contentDOM),this.atoms=e.state.facet(Ec).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Qt.allowMultipleSelections)&&KF(e,n),this.dragging=eV(e,n)&&rT(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&YF(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=B0(this.view);e.clientX-l.left<=i+gu?n=-vu(i-e.clientX):e.clientX+l.right>=a-gu&&(n=vu(e.clientX-a)),e.clientY-l.top<=o+gu?r=-vu(o-e.clientY):e.clientY+l.bottom>=s-gu&&(r=vu(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=U_(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function KF(t,e){let n=t.state.facet(A_);return n.length?n[0](e):Ve.mac?e.metaKey:e.ctrlKey}function JF(t,e){let n=t.state.facet(Q_);return n.length?n[0](e):Ve.mac?!e.altKey:!e.ctrlKey}function eV(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Kl(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function tV(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=ln.get(n))&&r.ignoreEvent(e))return!1;return!0}const _i=Object.create(null),fi=Object.create(null),tT=Ve.ie&&Ve.ie_version<15||Ve.ios&&Ve.webkit_version<604;function nV(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),nT(t,n.value)},50)}function rh(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function nT(t,e){e=rh(t.state,L0,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(_g!=null&&n.selection.ranges.every(l=>l.empty)&&_g==o.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let d=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:d},range:xe.cursor(c.from+d.length)}})}else a?r=n.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:xe.cursor(l.from+c.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}fi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};_i.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);fi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};fi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};_i.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(N_))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=oV(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new UF(t,e,n,r)),r&&t.observer.ignore(()=>{m_(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function fS(t,e,n,r){if(r==1)return xe.cursor(e,n);if(r==2)return MF(t.state,e,n);{let i=An.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return se>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function rV(t,e,n,r){let i=An.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&hS(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&hS(n,r,s)?1:a&&a.bottom>=r?-1:1}function pS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:rV(t,n,e.clientX,e.clientY)}}const iV=Ve.ie&&Ve.ie_version<=11;let mS=null,gS=0,vS=0;function rT(t){if(!iV)return t.detail;let e=mS,n=vS;return mS=t,vS=Date.now(),gS=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(gS+1)%3:1}function oV(t,e){let n=pS(t,e),r=rT(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=pS(t,o),c,u=fS(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=fS(t,n.pos,n.bias,r),f=Math.min(d.from,u.from),h=Math.max(d.to,u.to);u=f1&&(c=aV(i,l.pos))?c:s?i.addRange(u):xe.create([u])}}}function aV(t,e){for(let n=0;n=e)return xe.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}_i.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=xe.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",rh(t.state,j0,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};_i.dragend=t=>(t.inputState.draggedContent=null,!1);function OS(t,e,n,r){if(n=rh(t.state,L0,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&JF(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}_i.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&OS(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return OS(t,e,r,!0),!0}return!1};_i.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=tT?null:e.clipboardData;return n?(nT(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(nV(t),!1)};function sV(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function lV(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:rh(t,j0,e.join(t.lineBreak)),ranges:n,linewise:r}}let _g=null;_i.copy=_i.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=lV(t.state);if(!n&&!i)return!1;_g=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=tT?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(sV(t,n),!1)};const iT=Ji.define();function oT(t,e){let n=[];for(let r of t.facet(j_)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:iT.of(!0)}):null}function aT(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=oT(t.state,e);n?t.dispatch(n):t.update([])}},10)}fi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),aT(t)};fi.blur=t=>{t.observer.clearSelectionRange(),aT(t)};fi.compositionstart=fi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};fi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Ve.chrome&&Ve.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};fi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};_i.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),c=t.posAtDOM(s.endContainer,s.endOffset);return W0(t,{from:l,to:c,insert:t.state.toText(o)},null),!0}}let i;if(Ve.chrome&&Ve.android&&(i=J_.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Ve.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Ve.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>fi.compositionend(t,e),20),!1};const bS=new Set;function cV(t){bS.has(t)||(bS.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const yS=["pre-wrap","normal","pre-line","break-spaces"];let _s=!1;function SS(){_s=!1}class uV{constructor(e){this.lineWrapping=e,this.doc=Ft.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return yS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>td&&(_s=!0),this.height=e)}replace(e,n,r){return xr.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:c,fromB:u,toB:d}=i[s],f=o.lineAt(l,hn.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=c?f:o.lineAt(c,hn.ByPosNoHeight,r,0,0);for(d+=h.to-c,c=h.to;s>0&&f.from<=i[s-1].toA;)l=i[s-1].fromA,u=i[s-1].fromB,s--,lo*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class qr extends sT{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new ji(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof qr||i instanceof Yn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Yn?i=new qr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):xr.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Yn extends xr{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e0){let o=r[r.length-1];o instanceof Yn?r[r.length-1]=new Yn(o.length+i):r.push(null,new Yn(i-1))}if(e>0){let o=r[0];o instanceof Yn?r[0]=new Yn(e+o.length):r.unshift(new Yn(e-1),null)}return xr.of(r)}decomposeLeft(e,n){n.push(new Yn(e-1),null)}decomposeRight(e,n){n.push(null,new Yn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new Yn(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let u=e.doc.lineAt(s).length;a.length&&a.push(null);let d=i.heights[i.index++];l==-1?l=d:Math.abs(d-l)>=td&&(l=-2);let f=new qr(u,d);f.outdated=!1,a.push(f),s+=u+1}s<=o&&a.push(null,new Yn(o-s).updateHeight(e,s));let c=xr.of(a);return(l<0||Math.abs(c.height-this.height)>=td||Math.abs(l-this.heightMetrics(e,n).perLine)>=td)&&(_s=!0),Dd(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class fV extends xr{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return es))return c;let u=n==hn.ByPosNoHeight?hn.ByPosNoHeight:hn.ByPos;return l?c.join(this.right.lineAt(s,u,r,a,s)):this.left.lineAt(s,u,r,i,o).join(c)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,r,s,l,a);else{let c=this.lineAt(l,hn.ByPos,r,i,o);e=e&&c.from<=n&&a(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&xS(o,a-1),n=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e2*n.size||n.size>2*e.size?xr.of(this.break?[e,null,n]:[e,n]):(this.left=Dd(this.left,e),this.right=Dd(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function xS(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Yn&&(r=t[e+1])instanceof Yn&&t.splice(e-1,3,new Yn(n.length+1+r.length))}const hV=5;class F0{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof qr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new qr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e=hV)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new qr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Yn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof qr)return e;let n=new qr(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof qr)&&!this.isCovered?this.nodes.push(new qr(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&d.overflow!="visible"){let f=u.getBoundingClientRect();o=Math.max(o,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=Math.min(c==t.parentNode?i.innerHeight:l,f.bottom)}c=d.position=="absolute"||d.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function vV(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function OV(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class pp{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new uV(n),this.stateDeco=e.facet(Jl).filter(r=>typeof r!="function"),this.heightMap=xr.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle.setDoc(e.doc),[new ui(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=at.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new Ou(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?$S:new V0(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ml(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Jl).filter(u=>typeof u!="function");let i=e.changedRanges,o=ui.extendWithRanges(i,pV(r,this.stateDeco,e?e.changes:Dn.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);SS(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||_s)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(B_)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?mn.RTL:mn.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,u=0;if(s.width&&s.height){let{scaleX:x,scaleY:b}=p_(n,s);(x>.005&&Math.abs(this.scaleX-x)>.005||b>.005&&Math.abs(this.scaleY-b)>.005)&&(this.scaleX=x,this.scaleY=b,c|=16,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=v_(e.scrollDOM);let p=(this.printing?OV:gV)(n,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget&&!vV(e.dom))return 0;let O=s.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let x=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(x)&&(a=!0),a||i.lineWrapping&&Math.abs(O-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:C,textHeight:$}=e.docView.measureTextSize();a=b>0&&i.refresh(o,b,C,$,Math.max(5,O/C),x),a&&(e.docView.minWidth=0,c|=16)}m>0&&g>0?u=Math.max(m,g):m<0&&g<0&&(u=Math.min(m,g)),SS();for(let b of this.viewports){let C=b.from==this.viewport.from?x:e.docView.measureVisibleLineHeights(b);this.heightMap=(a?xr.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle,[new ui(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new dV(b.from,C))}_s&&(c|=2)}let S=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new Ou(i.lineAt(a-r*1e3,hn.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,hn.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(c,hn.ByPos,o,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o>1,a=i<<1;if(this.defaultTextDirection!=mn.LTR&&!r)return[];let s=[],l=(u,d,f,h)=>{if(d-uu&&vv.from>=f.from&&v.to<=f.to&&Math.abs(v.from-u)v.fromO));if(!g){if(dS.from<=d&&S.to>=d)){let S=n.moveToLineBoundary(xe.cursor(d),!1,!0).head;S>u&&(d=S)}let v=this.gapSize(f,u,d,h),O=r||v<2e6?v:2e6;g=new pp(u,d,v,O)}s.push(g)},c=u=>{if(u.length2e6)for(let C of e)C.from>=u.from&&C.fromu.from&&l(u.from,h,u,d),pn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];jt.spans(n,this.viewport.from,this.viewport.to,{span(o,a){r.push({from:o,to:a})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||ml(this.heightMap.lineAt(e,hn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||ml(this.heightMap.lineAt(this.scaler.fromDOM(e),hn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return ml(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Ou{constructor(e,n){this.from=e,this.to=n}}function yV(t,e,n){let r=[],i=t,o=0;return jt.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function yu(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function SV(t,e){for(let n of t)if(e(n))return n}const $S={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class V0{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let c=n.lineAt(s,hn.ByPos,e,0,0).top,u=n.lineAt(l,hn.ByPos,e,0,0).bottom;return i+=u-c,{from:s,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=nn.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function ml(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ji(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>ml(i,e)):t._content)}const Su=He.define({combine:t=>t.join(" ")}),Tg=He.define({combine:t=>t.indexOf(!0)>-1}),kg=Do.newName(),lT=Do.newName(),cT=Do.newName(),uT={"&light":"."+lT,"&dark":"."+cT};function Rg(t,e,n){return new Do(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const xV=Rg("."+kg,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uT),CV={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},mp=Ve.ie&&Ve.ie_version<=11;class $V{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new oF,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Ve.ie&&Ve.ie_version<=11||Ve.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Ve.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Ve.chrome&&Ve.chrome_version<126)&&(this.editContext=new PV(e),e.state.facet(oo)&&(e.contentDOM.editContext=this.editContext.editContext)),mp&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(oo)?r.root.activeElement!=this.dom:!Ju(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Ve.ie&&Ve.ie_version<=11||Ve.android&&Ve.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Tl(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Kl(e.root);if(!n)return!1;let r=Ve.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&wV(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Ju(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&ss(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);a&&(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Ju(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new WF(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=K_(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=wS(n,e.previousSibling||e.target.previousSibling,-1),i=wS(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(oo)!=e.state.facet(oo)&&(e.view.contentDOM.editContext=e.state.facet(oo)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function wS(t,e,n){for(;e;){let r=ln.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function PS(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Tl(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function wV(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return PS(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?PS(t,n):null}class PV{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:a}=i,s=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:s,drifted:!1});let c={from:s,to:l,insert:Ft.of(r.text.split(` -`))};if(c.from==this.from&&othis.to&&(c.to=o),c.from==c.to&&!c.insert.length){let u=xe.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));u.main.eq(i)||e.dispatch({selection:u,userEvent:"select"});return}if((Ve.mac||Ve.android)&&c.from==a-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:s,to:l,insert:Ft.of([r.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);W0(e,c,xe.single(this.toEditorPos(r.selectionStart,u),this.toEditorPos(r.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let l=this.toEditorPos(o.rangeStart),c=this.toEditorPos(o.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Kl(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,c)=>{if(r)return;let u=c.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=u,this.to+=u;else if(othis.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ze{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||aF(e.parent)||document,this.viewState=new CS(e.state||Qt.create(e)),e.scrollTo&&e.scrollTo.is(mu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ja).map(i=>new dp(i));for(let i of this.plugins)i.update(this);this.observer=new $V(this),this.inputState=new ZF(this),this.inputState.ensureHandlers(this.plugins),this.docView=new iS(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Nn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(iT))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=oT(o,a),l||(s=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(Qt.phrases)!=this.state.facet(Qt.phrases))return this.setState(o);i=jd.create(this,o,e),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new ls(h.empty?h:xe.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(mu)&&(d=h.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Bd.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(hl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Su)!=i.state.facet(Su)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet($g))try{f(i)}catch(h){Nr(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!K_(this,u)&&c.force&&ss(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new CS(e),this.plugins=e.facet(Ja).map(r=>new dp(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new iS(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Ja),r=e.state.facet(Ja);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new dp(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(v_(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(p){return Nr(this.state,p),_S}}),d=jd.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet($g))s(n)}get themeClasses(){return kg+" "+(this.state.facet(Tg)?cT:lT)+" "+this.state.facet(Su)}updateAttrs(){let e=TS(this,V_,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(oo)?"true":"false",class:"cm-content",style:`${Ve.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),TS(this,D0,n);let r=this.observer.ignore(()=>{let i=bg(this.contentDOM,this.contentAttrs,n),o=bg(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(ze.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(hl);let e=this.state.facet(ze.cspNonce);Do.mount(this.root,this.styleModules.concat(xV).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;nr.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return hp(this,e,cS(this,e,n,r))}moveByGroup(e,n){return hp(this,e,cS(this,e,n,r=>LF(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return xe.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return zF(this,e,n,r)}moveVertically(e,n,r){return hp(this,e,jF(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),G_(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Mo.find(o,e-i.from,-1,n)];return Rc(r,a.dir==mn.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(D_)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>_V)return M_(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||I_(o.isolates,r=rS(this,e))))return o.order;r||(r=rS(this,e));let i=SF(e.text,n,r);return this.bidiCache.push(new Bd(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Ve.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{m_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return mu.of(new ls(typeof e=="number"?xe.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return mu.of(new ls(xe.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return In.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return In.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Do.newName(),i=[Su.of(r),hl.of(Rg(`.${r}`,e))];return n&&n.dark&&i.push(Tg.of(!0)),i}static baseTheme(e){return Xo.lowest(hl.of(Rg("."+kg,e,uT)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&ln.get(r)||ln.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}ze.styleModule=hl;ze.inputHandler=L_;ze.clipboardInputFilter=L0;ze.clipboardOutputFilter=j0;ze.scrollHandler=W_;ze.focusChangeEffect=j_;ze.perLineTextDirection=D_;ze.exceptionSink=z_;ze.updateListener=$g;ze.editable=oo;ze.mouseSelectionStyle=N_;ze.dragMovesSelection=Q_;ze.clickAddsSelectionRange=A_;ze.decorations=Jl;ze.outerDecorations=H_;ze.atomicRanges=Ec;ze.bidiIsolatedRanges=X_;ze.scrollMargins=Z_;ze.darkTheme=Tg;ze.cspNonce=He.define({combine:t=>t.length?t[0]:""});ze.contentAttributes=D0;ze.editorAttributes=V_;ze.lineWrapping=ze.contentAttributes.of({class:"cm-lineWrapping"});ze.announce=gt.define();const _V=4096,_S={};class Bd{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:mn.LTR;for(let o=Math.max(0,e.length-10);o=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&Og(a,n)}return n}const TV=Ve.mac?"mac":Ve.windows?"win":Ve.linux?"linux":"key";function kV(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;lr.concat(i),[]))),n}function IV(t,e,n){return fT(dT(t.state),e,t,n)}let Po=null;const MV=4e3;function EV(t,e=TV){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,c,u)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),p=s.split(/ (?!$)/).map(v=>kV(v,e));for(let v=1;v{let x=Po={view:S,prefix:O,scope:a};return setTimeout(()=>{Po==x&&(Po=null)},MV),!0}]})}let m=p.join(" ");i(m,!1);let g=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&g.run.push(l),c&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let c of s){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=a;for(let f in u)u[f].run.push(h=>d(h,Ig))}let l=a[e]||a.key;if(l)for(let c of s)o(c,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(c,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let Ig=null;function fT(t,e,n,r){Ig=e;let i=tF(e),o=Er(i,0),a=Li(o)==i.length&&i!=" ",s="",l=!1,c=!1,u=!1;Po&&Po.view==n&&Po.scope==r&&(s=Po.prefix+" ",eT.indexOf(e.keyCode)<0&&(c=!0,Po=null));let d=new Set,f=g=>{if(g){for(let v of g.run)if(!d.has(v)&&(d.add(v),v(n)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],p,m;return h&&(f(h[s+xu(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Ve.windows&&e.ctrlKey&&e.altKey)&&!(Ve.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(p=Bo[e.keyCode])&&p!=i?(f(h[s+xu(p,e,!0)])||e.shiftKey&&(m=Ul[e.keyCode])!=i&&m!=p&&f(h[s+xu(m,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+xu(i,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),Ig=null,l}class Qc{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=hT(e);return[new Qc(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return AV(e,n,r)}}function hT(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==mn.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function RS(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function AV(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==mn.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=hT(t),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),h=Pg(t,r,1),p=Pg(t,i,-1),m=h.type==Sr.Text?h:null,g=p.type==Sr.Text?p:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=RS(t,r,1,m)),g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=RS(t,i,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return O(S(n.from,n.to,m));{let b=m?S(n.from,null,m):x(h,!1),C=g?S(null,n.to,g):x(p,!0),$=[];return(m||h).to<(g||p).from-(m&&g?1:0)||h.widgetLineBreaks>1&&b.bottom+t.defaultLineHeight/2R&&I.from=M)break;L>Q&&T(Math.max(z,Q),b==null&&z<=R,Math.min(L,M),C==null&&L>=k,N.dir)}if(Q=E.to+1,Q>=M)break}return _.length==0&&T(R,b==null,k,C==null,t.textDirection),{top:w,bottom:P,horizontal:_}}function x(b,C){let $=s.top+(C?b.top:b.bottom);return{top:$,bottom:$,horizontal:[]}}}function QV(t,e){return t.constructor==e.constructor&&t.eq(e)}class NV{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(nd)!=e.state.facet(nd)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(nd);for(;n!QV(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,Ve.ios&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const nd=He.define();function pT(t){return[In.define(e=>new NV(e,t)),nd.of(t)]}const ec=He.define({combine(t){return eo(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function zV(t={}){return[ec.of(t),LV,jV,DV,B_.of(!0)]}function mT(t){return t.startState.facet(ec)!=t.state.facet(ec)}const LV=pT({above:!0,markers(t){let{state:e}=t,n=e.facet(ec),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty||n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:xe.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Qc.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=mT(t);return n&&IS(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){IS(e.state,t)},class:"cm-cursorLayer"});function IS(t,e){e.style.animationDuration=t.facet(ec).cursorBlinkRate+"ms"}const jV=pT({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Qc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||mT(t)},class:"cm-selectionLayer"}),DV=Xo.highest(ze.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),gT=gt.define({map(t,e){return t==null?null:e.mapPos(t)}}),gl=Zn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(gT)?r.value:n,t)}}),BV=In.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(gl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(gl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(gl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(gl)!=t&&this.view.dispatch({effects:gT.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function WV(){return[gl,BV]}function MS(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function FV(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class VV{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,c,u)=>i(u,c,c+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,c,u)=>{let d=r(s,l,c);d&&u(c,c+s[0].length,d)};else if(r)this.addMatch=(s,l,c,u)=>u(c,c+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new fo,r=n.add.bind(n);for(let{from:i,to:o}of FV(e,this.maxLength))MS(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>=e.view.viewport.from&&s<=e.view.viewport.to&&(r=Math.min(s,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>=a){let l=e.state.doc.lineAt(a),c=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){u=a;break}for(;sf.push(v.range(m,g));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.indexthis.addMatch(g,e,m,p));n=n.update({filterFrom:u,filterTo:d,filter:(m,g)=>md,add:f})}}return n}}const Mg=/x/.unicode!=null?"gu":"g",HV=new RegExp(`[\0-\b ---Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Mg),XV={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let gp=null;function ZV(){var t;if(gp==null&&typeof document<"u"&&document.body){let e=document.body.style;gp=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return gp||!1}const rd=He.define({combine(t){let e=eo(t,{render:null,specialChars:HV,addSpecialChars:null});return(e.replaceTabs=!ZV())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Mg)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Mg)),e}});function qV(t={}){return[rd.of(t),GV()]}let ES=null;function GV(){return ES||(ES=In.fromClass(class{constructor(t){this.view=t,this.decorations=at.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(rd)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new VV({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Er(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=Vs(a.text,s,r-a.from);return at.replace({widget:new JV((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=at.replace({widget:new KV(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(rd);t.startState.facet(rd)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const YV="•";function UV(t){return t>=32?YV:t==10?"␤":String.fromCharCode(9216+t)}class KV extends to{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=UV(this.code),r=e.state.phrase("Control character")+" "+(XV[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class JV extends to{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function eH(){return nH}const tH=at.line({class:"cm-activeLine"}),nH=In.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(tH.range(i.from)),e=i.from)}return at.set(n)}},{decorations:t=>t.decorations});class rH extends to{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?$s(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Rc(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function iH(t){let e=In.fromClass(class{constructor(n){this.view=n,this.placeholder=t?at.set([at.widget({widget:new rH(t),side:1}).range(0)]):at.none}get decorations(){return this.view.state.doc.length?at.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,ze.contentAttributes.of({"aria-placeholder":t})]:e}const Eg=2e3;function oH(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>Eg||n.off>Eg||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=s&&o.push(xe.range(c.from+a,c.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=dg(c.text,a,t.tabSize,!0);if(u<0)o.push(xe.cursor(c.to));else{let d=dg(c.text,s,t.tabSize);o.push(xe.range(c.from+u,c.from+d))}}}return o}function aH(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function AS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>Eg?-1:i==r.length?aH(t,e.clientX):Vs(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function sH(t,e){let n=AS(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=AS(t,i);if(!s)return r;let l=oH(t.state,n,s);return l.length?a?xe.create(l.concat(r.ranges)):xe.create(l):r}}:null}function lH(t){let e=n=>n.altKey&&n.button==0;return ze.mouseSelectionStyle.of((n,r)=>e(r)?sH(n,r):null)}const cH={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},uH={style:"cursor: crosshair"};function dH(t={}){let[e,n]=cH[t.key||"Alt"],r=In.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,ze.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?uH:null})]}const il="-10000px";class vT{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;ln[c]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function fH(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const vp=He.define({combine:t=>{var e,n,r;return{position:Ve.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||fH}}}),QS=new WeakMap,H0=In.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(vp);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new vT(t,X0,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(vp);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=il,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(Ve.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==il&&o.style.left=="0px"){let a=o.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=B0(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,a)=>{let s=this.manager.tooltipViews[a];return s.getCoords?s.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(vp).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1)){u.style.top=il;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,m=f.right-f.left,g=(e=QS.get(c))!==null&&e!==void 0?e:f.bottom-f.top,v=c.offset||pH,O=this.view.textDirection==mn.LTR,S=f.width>r.right-r.left?O?r.left:r.right-f.width:O?Math.max(r.left,Math.min(d.left-(h?14:0)+v.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(h?14:0)-v.x),r.right-m),x=this.above[s];!l.strictSide&&(x?d.top-g-p-v.yr.bottom)&&x==r.bottom-d.bottom>d.top-r.top&&(x=this.above[s]=!x);let b=(x?d.top-r.top:r.bottom-d.bottom)-p;if(bS&&w.topC&&(C=x?w.top-g-2-p:w.bottom+p+2);if(this.position=="absolute"?(u.style.top=(C-t.parent.top)/o+"px",NS(u,(S-t.parent.left)/i)):(u.style.top=C/o+"px",NS(u,S/i)),h){let w=d.left+(O?v.x:-v.x)-(S+14-7);h.style.left=w/i+"px"}c.overlap!==!0&&a.push({left:S,top:C,right:$,bottom:C+g}),u.classList.toggle("cm-tooltip-above",x),u.classList.toggle("cm-tooltip-below",!x),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=il}},{eventObservers:{scroll(){this.maybeMeasure()}}});function NS(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const hH=ze.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),pH={x:0,y:0},X0=He.define({enables:[H0,hH]}),Wd=He.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class ih{static create(e){return new ih(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new vT(e,Wd,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const mH=X0.compute([Wd],t=>{let e=t.facet(Wd);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:ih.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class gH{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;es.bottom||n.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==mn.RTL?-1:1;o=n.x{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Nr(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(H0),n=e?e.manager.tooltips.findIndex(r=>r.create==ih.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!vH(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!OH(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Cu=4;function vH(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-Cu&&e.clientX<=r+Cu&&e.clientY>=i-Cu&&e.clientY<=o+Cu}function OH(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.righti||Math.min(a.bottom,s)=e&&l<=n}function bH(t,e={}){let n=gt.define(),r=Zn.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,Kn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),s);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),a.push(c)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(yH)&&(i=[]);return i},provide:i=>Wd.from(i)});return{active:r,extension:[r,In.define(i=>new gH(i,t,r,n,e.hoverTime||300)),mH]}}function OT(t,e){let n=t.plugin(H0);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const yH=gt.define(),zS=He.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function tc(t,e){let n=t.plugin(bT),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const bT=In.fromClass(class{constructor(t){this.input=t.state.facet(nc),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(zS);this.top=new $u(t,!0,e.topContainer),this.bottom=new $u(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(zS);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new $u(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new $u(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(nc);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),s.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:a).push(u)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ze.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class $u{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=LS(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=LS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function LS(t){let e=t.nextSibling;return t.remove(),e}const nc=He.define({enables:bT});class po extends xa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}po.prototype.elementClass="";po.prototype.toDOM=void 0;po.prototype.mapMode=Kn.TrackBefore;po.prototype.startSide=po.prototype.endSide=-1;po.prototype.point=!0;const id=He.define(),SH=He.define(),xH={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>jt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Il=He.define();function CH(t){return[yT(),Il.of({...xH,...t})]}const jS=He.define({combine:t=>t.some(e=>e)});function yT(t){return[$H]}const $H=In.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Il).map(e=>new BS(t,e)),this.fixed=!t.state.facet(jS);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(jS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=jt.iter(this.view.state.facet(id),this.view.viewport.from),r=[],i=this.gutters.map(o=>new wH(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==Sr.Text&&a){Ag(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==Sr.Text){Ag(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Il),n=t.state.facet(Il),r=t.docChanged||t.heightChanged||t.viewportChanged||!jt.eq(t.startState.facet(id),t.state.facet(id),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new BS(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)o.config.side=="after"?this.getDOMAfter().appendChild(o.dom):this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ze.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==mn.LTR?{left:r,right:i}:{right:r,left:i}})});function DS(t){return Array.isArray(t)?t:[t]}function Ag(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class wH{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=jt.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new ST(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Ag(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(SH)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class BS{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=DS(n.markers(e)),n.initialSpacer&&(this.spacer=new ST(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=DS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!jt.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class ST{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),PH(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=oo(s,l,c)||a(s,l,c):a}return r}})}});class Op extends po{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function bp(t,e){return t.state.facet(es).formatNumber(e,t.state)}const kH=Il.compute([es],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(_H)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new Op(bp(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(TH)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(es)!=e.state.facet(es),initialSpacer(e){return new Op(bp(e,WS(e.state.doc.lines)))},updateSpacer(e,n){let r=bp(n.view,WS(n.view.state.doc.lines));return r==e.number?e:new Op(r)},domEventHandlers:t.facet(es).domEventHandlers,side:"before"}));function RH(t={}){return[es.of(t),yT(),kH]}function WS(t){let e=9;for(;e{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(IH.range(i)))}return jt.of(e)});function EH(){return MH}const xT=1024;let AH=0;class yp{constructor(e,n){this.from=e,this.to=n}}class Tt{constructor(e={}){this.id=AH++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=jr.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Tt.closedBy=new Tt({deserialize:t=>t.split(" ")});Tt.openedBy=new Tt({deserialize:t=>t.split(" ")});Tt.group=new Tt({deserialize:t=>t.split(" ")});Tt.isolate=new Tt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Tt.contextHash=new Tt({perNode:!0});Tt.lookAhead=new Tt({perNode:!0});Tt.mounted=new Tt({perNode:!0});class Fd{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Tt.mounted.id]}}const QH=Object.create(null);class jr{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):QH,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new jr(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Tt.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Tt.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}jr.none=new jr("",Object.create(null),0,8);class Z0{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|Bn.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:Y0(jr.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new zn(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new zn(jr.none,n,r,i)))}static build(e){return jH(e)}}zn.empty=new zn(jr.none,[],[],0);class q0{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new q0(this.buffer,this.index)}}class Fo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return jr.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function rc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=c;e+=n){let u=s[e],d=l[e]+a.from;if(CT(i,r,d,d+u.length)){if(u instanceof Fo){if(o&Bn.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,r-d,i);if(f>-1)return new Bi(new NH(a,u,e,d),null,f)}else if(o&Bn.IncludeAnonymous||!u.type.isAnonymous||G0(u)){let f;if(!(o&Bn.IgnoreMounts)&&(f=Fd.get(u))&&!f.overlay)return new Lr(f.tree,d,e,a);let h=new Lr(u,d,e,a);return o&Bn.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&Bn.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Bn.IgnoreOverlays)&&(i=Fd.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a=o:s>o))return new Lr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function VS(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function Qg(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class NH{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Bi extends $T{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Bi(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Bn.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Bi(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Bi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Bi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new zn(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function wT(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||a.to=e){let s=new Lr(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(rc(s,e,n,!1))}}return i?wT(i):r}class Ng{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Lr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Lr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Bn.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Bn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Bn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&Bn.IncludeAnonymous||s instanceof Fo||!s.type.isAnonymous||G0(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}for(let i=r;i=0;o--){if(o<0)return Qg(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function G0(t){return t.children.some(e=>e instanceof Fo||!e.type.isAnonymous||G0(e))}function jH(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=xT,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new q0(n,n.length):n,l=r.types,c=0,u=0;function d(b,C,$,w,P,_){let{id:T,start:R,end:k,size:I}=s,Q=u,M=c;for(;I<0;)if(s.next(),I==-1){let F=o[T];$.push(F),w.push(R-b);return}else if(I==-3){c=T;return}else if(I==-4){u=T;return}else throw new RangeError(`Unrecognized record size: ${I}`);let E=l[T],N,z,L=R-b;if(k-R<=i&&(z=g(s.pos-C,P))){let F=new Uint16Array(z.size-z.skip),H=s.pos-z.size,V=F.length;for(;s.pos>H;)V=v(z.start,F,V);N=new Fo(F,k-z.start,r),L=z.start-b}else{let F=s.pos-I;s.next();let H=[],V=[],X=T>=a?T:-1,B=0,G=k;for(;s.pos>F;)X>=0&&s.id==X&&s.size>=0?(s.end<=G-i&&(p(H,V,R,B,s.end,G,X,Q,M),B=H.length,G=s.end),s.next()):_>2500?f(R,F,H,V):d(R,F,H,V,X,_+1);if(X>=0&&B>0&&B-1&&B>0){let se=h(E,M);N=Y0(E,H,V,0,H.length,0,k-R,se,se)}else N=m(E,H,V,k-R,Q-k,M)}$.push(N),w.push(L)}function f(b,C,$,w){let P=[],_=0,T=-1;for(;s.pos>C;){let{id:R,start:k,end:I,size:Q}=s;if(Q>4)s.next();else{if(T>-1&&k=0;I-=3)R[Q++]=P[I],R[Q++]=P[I+1]-k,R[Q++]=P[I+2]-k,R[Q++]=Q;$.push(new Fo(R,P[2]-k,r)),w.push(k-b)}}function h(b,C){return($,w,P)=>{let _=0,T=$.length-1,R,k;if(T>=0&&(R=$[T])instanceof zn){if(!T&&R.type==b&&R.length==P)return R;(k=R.prop(Tt.lookAhead))&&(_=w[T]+R.length+k)}return m(b,$,w,P,_,C)}}function p(b,C,$,w,P,_,T,R,k){let I=[],Q=[];for(;b.length>w;)I.push(b.pop()),Q.push(C.pop()+$-P);b.push(m(r.types[T],I,Q,_-P,R-_,k)),C.push(P-$)}function m(b,C,$,w,P,_,T){if(_){let R=[Tt.contextHash,_];T=T?[R].concat(T):[R]}if(P>25){let R=[Tt.lookAhead,P];T=T?[R].concat(T):[R]}return new zn(b,C,$,w,T)}function g(b,C){let $=s.fork(),w=0,P=0,_=0,T=$.end-i,R={size:0,start:0,skip:0};e:for(let k=$.pos-b;$.pos>k;){let I=$.size;if($.id==C&&I>=0){R.size=w,R.start=P,R.skip=_,_+=4,w+=4,$.next();continue}let Q=$.pos-I;if(I<0||Q=a?4:0,E=$.start;for($.next();$.pos>Q;){if($.size<0)if($.size==-3)M+=4;else break e;else $.id>=a&&(M+=4);$.next()}P=E,w+=I,_+=M}return(C<0||w==b)&&(R.size=w,R.start=P,R.skip=_),R.size>4?R:void 0}function v(b,C,$){let{id:w,start:P,end:_,size:T}=s;if(s.next(),T>=0&&w4){let k=s.pos-(T-4);for(;s.pos>k;)$=v(b,C,$)}C[--$]=R,C[--$]=_-b,C[--$]=P-b,C[--$]=w}else T==-3?c=w:T==-4&&(u=w);return $}let O=[],S=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,O,S,-1,0);let x=(e=t.length)!==null&&e!==void 0?e:O.length?S[0]+O[0].length:0;return new zn(l[t.topID],O.reverse(),S.reverse(),x)}const HS=new WeakMap;function od(t,e){if(!t.isAnonymous||e instanceof Fo||e.type!=t)return 1;let n=HS.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof zn)){n=1;break}n+=od(t,r)}HS.set(e,n)}return n}function Y0(t,e,n,r,i,o,a,s,l){let c=0;for(let p=r;p=u)break;C+=$}if(S==x+1){if(C>u){let $=p[x];h($.children,$.positions,0,$.children.length,m[x]+O);continue}d.push(p[x])}else{let $=m[S-1]+p[S-1].length-b;d.push(Y0(t,p,m,x,S,b,$,null,l))}f.push(b+O-o)}}return h(e,n,r,i,0),(s||l)(d,f,a)}class DH{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Bi?this.setBuffer(e.context.buffer,e.index,n):e instanceof Lr&&this.map.set(e.tree,n)}get(e){return e instanceof Bi?this.getBuffer(e.context.buffer,e.index):e instanceof Lr?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class fa{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new fa(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,c=0;;s++){let u=s=r)for(;a&&a.from=f.from||d<=f.to||c){let h=Math.max(f.from,l)-c,p=Math.min(f.to,d)-c;f=h>=p?null:new fa(h,p,f.tree,f.offset+c,s>0,!!u)}if(f&&i.push(f),a.to>d)break;a=onew yp(i.from,i.to)):[new yp(0,0)]:[new yp(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class BH{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Tt({perNode:!0});let WH=0,ro=class zg{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=WH++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof zg&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new zg(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Vd(e);return r=>r.modified.indexOf(n)>-1?r:Vd.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},FH=0;class Vd{constructor(e){this.name=e,this.instances=[],this.id=FH++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&VH(n,s.modified));if(r)return r;let i=[],o=new ro(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=HH(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push(Vd.get(s,l));return o}}function VH(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function HH(t){let e=[[]];for(let n=0;nr.length-n.length)}function U0(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let d=0;;){if(s=="..."&&d>0&&d+3==i.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==i.length)break;let h=i[d++];if(d==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(d)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Hd(r,a,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return _T.add(e)}const _T=new Tt;class Hd{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=i;for(let s of o)for(let l of s.set){let c=n[l.id];if(c){a=a?a+" "+c:c;break}}return a},scope:r}}function XH(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function ZH(t,e,n,r=0,i=t.length){let o=new qH(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class qH{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let c=i,u=GH(e)||Hd.empty,d=XH(o,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,s),c),u.opaque)return;let f=e.tree&&e.tree.prop(Tt.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),p=this.highlighters.filter(g=>!g.scope||g.scope(f.tree.type)),m=e.firstChild();for(let g=0,v=s;;g++){let O=g=S||!e.nextSibling())););if(!O||S>r)break;v=O.to+s,v>n&&(this.highlightRange(h.cursor(),Math.max(n,O.from+s),Math.min(r,v),"",p),this.startSpan(Math.min(r,v),c))}m&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function GH(t){let e=t.type.prop(_T);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ne=ro.define,Pu=Ne(),$o=Ne(),XS=Ne($o),ZS=Ne($o),wo=Ne(),_u=Ne(wo),Sp=Ne(wo),Qi=Ne(),Yo=Ne(Qi),Ei=Ne(),Ai=Ne(),Lg=Ne(),ol=Ne(Lg),Tu=Ne(),K={comment:Pu,lineComment:Ne(Pu),blockComment:Ne(Pu),docComment:Ne(Pu),name:$o,variableName:Ne($o),typeName:XS,tagName:Ne(XS),propertyName:ZS,attributeName:Ne(ZS),className:Ne($o),labelName:Ne($o),namespace:Ne($o),macroName:Ne($o),literal:wo,string:_u,docString:Ne(_u),character:Ne(_u),attributeValue:Ne(_u),number:Sp,integer:Ne(Sp),float:Ne(Sp),bool:Ne(wo),regexp:Ne(wo),escape:Ne(wo),color:Ne(wo),url:Ne(wo),keyword:Ei,self:Ne(Ei),null:Ne(Ei),atom:Ne(Ei),unit:Ne(Ei),modifier:Ne(Ei),operatorKeyword:Ne(Ei),controlKeyword:Ne(Ei),definitionKeyword:Ne(Ei),moduleKeyword:Ne(Ei),operator:Ai,derefOperator:Ne(Ai),arithmeticOperator:Ne(Ai),logicOperator:Ne(Ai),bitwiseOperator:Ne(Ai),compareOperator:Ne(Ai),updateOperator:Ne(Ai),definitionOperator:Ne(Ai),typeOperator:Ne(Ai),controlOperator:Ne(Ai),punctuation:Lg,separator:Ne(Lg),bracket:ol,angleBracket:Ne(ol),squareBracket:Ne(ol),paren:Ne(ol),brace:Ne(ol),content:Qi,heading:Yo,heading1:Ne(Yo),heading2:Ne(Yo),heading3:Ne(Yo),heading4:Ne(Yo),heading5:Ne(Yo),heading6:Ne(Yo),contentSeparator:Ne(Qi),list:Ne(Qi),quote:Ne(Qi),emphasis:Ne(Qi),strong:Ne(Qi),link:Ne(Qi),monospace:Ne(Qi),strikethrough:Ne(Qi),inserted:Ne(),deleted:Ne(),changed:Ne(),invalid:Ne(),meta:Tu,documentMeta:Ne(Tu),annotation:Ne(Tu),processingInstruction:Ne(Tu),definition:ro.defineModifier("definition"),constant:ro.defineModifier("constant"),function:ro.defineModifier("function"),standard:ro.defineModifier("standard"),local:ro.defineModifier("local"),special:ro.defineModifier("special")};for(let t in K){let e=K[t];e instanceof ro&&(e.name=t)}TT([{tag:K.link,class:"tok-link"},{tag:K.heading,class:"tok-heading"},{tag:K.emphasis,class:"tok-emphasis"},{tag:K.strong,class:"tok-strong"},{tag:K.keyword,class:"tok-keyword"},{tag:K.atom,class:"tok-atom"},{tag:K.bool,class:"tok-bool"},{tag:K.url,class:"tok-url"},{tag:K.labelName,class:"tok-labelName"},{tag:K.inserted,class:"tok-inserted"},{tag:K.deleted,class:"tok-deleted"},{tag:K.literal,class:"tok-literal"},{tag:K.string,class:"tok-string"},{tag:K.number,class:"tok-number"},{tag:[K.regexp,K.escape,K.special(K.string)],class:"tok-string2"},{tag:K.variableName,class:"tok-variableName"},{tag:K.local(K.variableName),class:"tok-variableName tok-local"},{tag:K.definition(K.variableName),class:"tok-variableName tok-definition"},{tag:K.special(K.variableName),class:"tok-variableName2"},{tag:K.definition(K.propertyName),class:"tok-propertyName tok-definition"},{tag:K.typeName,class:"tok-typeName"},{tag:K.namespace,class:"tok-namespace"},{tag:K.className,class:"tok-className"},{tag:K.macroName,class:"tok-macroName"},{tag:K.propertyName,class:"tok-propertyName"},{tag:K.operator,class:"tok-operator"},{tag:K.comment,class:"tok-comment"},{tag:K.meta,class:"tok-meta"},{tag:K.invalid,class:"tok-invalid"},{tag:K.punctuation,class:"tok-punctuation"}]);var xp;const ts=new Tt;function kT(t){return He.define({combine:t?e=>e.concat(t):void 0})}const K0=new Tt;class yi{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Qt.prototype.hasOwnProperty("tree")||Object.defineProperty(Qt.prototype,"tree",{get(){return Fn(this)}}),this.parser=n,this.extension=[Vo.of(this),Qt.languageData.of((o,a,s)=>{let l=qS(o,a,s),c=l.type.prop(ts);if(!c)return[];let u=o.facet(c),d=l.type.prop(K0);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,o)){let p=o.facet(h.facet);return h.type=="replace"?p:p.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return qS(e,n,r).type.prop(ts)==this.data}findRegions(e){let n=e.facet(Vo);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(ts)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(Tt.mounted);if(s){if(s.tree.prop(ts)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;lr.isTop?n:void 0)]}),e.name)}configure(e,n){return new ic(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Fn(t){let e=t.field(yi.state,!1);return e?e.tree:zn.empty}class YH{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let al=null;class Xd{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new Xd(e,n,[],zn.empty,0,r,[],null)}startParse(){return this.parser.startParse(new YH(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=zn.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(fa.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=al;al=this;try{return e()}finally{al=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=GS(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,d,f)=>l.push({fromA:c,toA:u,fromB:d,toB:f})),r=fa.applyChanges(r,l),i=zn.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),d=e.mapPos(c.to,-1);ue.from&&(this.fragments=GS(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends PT{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=al;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new zn(jr.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return al}}function GS(t,e,n){return fa.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ts{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ts(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=Xd.create(e.facet(Vo).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ts(r)}}yi.state=Zn.define({create:Ts.init,update(t,e){for(let n of e.effects)if(n.is(yi.setState))return n.value;return e.startState.facet(Vo)!=e.state.facet(Vo)?Ts.init(e.state):t.apply(e)}});let RT=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(RT=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Cp=typeof navigator<"u"&&(!((xp=navigator.scheduling)===null||xp===void 0)&&xp.isInputPending)?()=>navigator.scheduling.isInputPending():null,UH=In.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(yi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(yi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=RT(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndi+1e3,l=o.context.work(()=>Cp&&Cp()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:yi.setState.of(new Ts(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Nr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Vo=He.define({combine(t){return t.length?t[0]:null},enables:t=>[yi.state,UH,ze.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class IT{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const KH=He.define(),Nc=He.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Zd(t){let e=t.facet(Nc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function oc(t,e){let n="",r=t.tabSize,i=t.facet(Nc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o=e?JH(t,n,e):null}class oh{constructor(e,n={}){this.state=e,this.options=n,this.unit=Zd(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Vs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const eO=new Tt;function JH(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a&&!(a.fromr.node.to||a.from==r.node.from&&a.type==r.node.type);a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return MT(r,t,n)}function MT(t,e,n){for(let r=t;r;r=r.next){let i=tX(r.node);if(i)return i(tO.create(e,n,r))}return 0}function eX(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function tX(t){let e=t.type.prop(eO);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Tt.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>ET(a,!0,1,void 0,o&&!eX(a)?i.from:void 0)}return t.parent==null?nX:null}function nX(){return 0}class tO extends oh{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new tO(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(rX(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return MT(this.context.next,this.base,this.pos)}}function rX(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function iX(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let c=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+c}}s=l.to}}function jg({closing:t,align:e=!0,units:n=1}){return r=>ET(r,e,n,t)}function ET(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?iX(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const oX=t=>t.baseIndent;function $p({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const aX=200;function sX(){return Qt.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+aX)return t;let o=n.sliceString(i.from,r);if(!e.some(c=>c.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:c}of a.selection.ranges){let u=a.doc.lineAt(c);if(u.from==s)continue;s=u.from;let d=J0(a,u.from);if(d==null)continue;let f=/^\s*/.exec(u.text)[0],h=oc(a,d);f!=h&&l.push({from:u.from,to:u.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const lX=He.define(),nO=new Tt;function AT(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&s.from=e&&c.to>n&&(o=c)}}return o}function uX(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function qd(t,e,n){for(let r of t.facet(lX)){let i=r(t,e,n);if(i)return i}return cX(t,e,n)}function QT(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const ah=gt.define({map:QT}),zc=gt.define({map:QT});function NT(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Pa=Zn.define({create(){return at.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=YS(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(ah)&&!dX(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(jT),i=r?at.replace({widget:new OX(r(e.state,n.value))}):US;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(zc)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=YS(t,e.selection.main.head)),t},provide:t=>ze.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{ie&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,o)=>i>=n||o<=e}):t}function Gd(t,e,n){var r;let i=null;return(r=t.field(Pa,!1))===null||r===void 0||r.between(e,n,(o,a)=>{(!i||i.from>o)&&(i={from:o,to:a})}),i}function dX(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function zT(t,e){return t.field(Pa,!1)?e:e.concat(gt.appendConfig.of(DT()))}const fX=t=>{for(let e of NT(t)){let n=qd(t.state,e.from,e.to);if(n)return t.dispatch({effects:zT(t.state,[ah.of(n),LT(t,n)])}),!0}return!1},hX=t=>{if(!t.state.field(Pa,!1))return!1;let e=[];for(let n of NT(t)){let r=Gd(t.state,n.from,n.to);r&&e.push(zc.of(r),LT(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function LT(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return ze.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const pX=t=>{let{state:e}=t,n=[];for(let r=0;r{let e=t.state.field(Pa,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(zc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},gX=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:fX},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:hX},{key:"Ctrl-Alt-[",run:pX},{key:"Ctrl-Alt-]",run:mX}],vX={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},jT=He.define({combine(t){return eo(t,vX)}});function DT(t){return[Pa,SX]}function BT(t,e){let{state:n}=t,r=n.facet(jT),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=Gd(t.state,s.from,s.to);l&&t.dispatch({effects:zc.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const US=at.replace({widget:new class extends to{toDOM(t){return BT(t,null)}}});class OX extends to{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return BT(e,this.value)}}const bX={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class wp extends po{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function yX(t={}){let e={...bX,...t},n=new wp(e,!0),r=new wp(e,!1),i=In.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Vo)!=a.state.facet(Vo)||a.startState.field(Pa,!1)!=a.state.field(Pa,!1)||Fn(a.startState)!=Fn(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new fo;for(let l of a.viewportLineBlocks){let c=Gd(a.state,l.from,l.to)?r:qd(a.state,l.from,l.to)?n:null;c&&s.add(l.from,l.from,c)}return s.finish()}}),{domEventHandlers:o}=e;return[i,CH({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||jt.empty},initialSpacer(){return new wp(e,!1)},domEventHandlers:{...o,click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let c=Gd(a.state,s.from,s.to);if(c)return a.dispatch({effects:zc.of(c)}),!0;let u=qd(a.state,s.from,s.to);return u?(a.dispatch({effects:ah.of(u)}),!0):!1}}}),DT()]}const SX=ze.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Lc{constructor(e,n){this.specs=e;let r;function i(s){let l=Do.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof yi?s=>s.prop(ts)==a.data:a?s=>s==a:void 0,this.style=TT(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new Do(r):null,this.themeType=n.themeType}static define(e,n){return new Lc(e,n||{})}}const Dg=He.define(),WT=He.define({combine(t){return t.length?[t[0]]:null}});function Pp(t){let e=t.facet(Dg);return e.length?e:t.facet(WT)}function FT(t,e){let n=[CX],r;return t instanceof Lc&&(t.module&&n.push(ze.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(WT.of(t)):r?n.push(Dg.computeN([ze.darkTheme],i=>i.facet(ze.darkTheme)==(r=="dark")?[t]:[])):n.push(Dg.of(t)),n}class xX{constructor(e){this.markCache=Object.create(null),this.tree=Fn(e.state),this.decorations=this.buildDeco(e,Pp(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Fn(e.state),r=Pp(e.state),i=r!=Pp(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return at.none;let r=new fo;for(let{from:i,to:o}of e.visibleRanges)ZH(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=at.mark({class:l})))},i,o);return r.finish()}}const CX=Xo.high(In.fromClass(xX,{decorations:t=>t.decorations})),$X=Lc.define([{tag:K.meta,color:"#404740"},{tag:K.link,textDecoration:"underline"},{tag:K.heading,textDecoration:"underline",fontWeight:"bold"},{tag:K.emphasis,fontStyle:"italic"},{tag:K.strong,fontWeight:"bold"},{tag:K.strikethrough,textDecoration:"line-through"},{tag:K.keyword,color:"#708"},{tag:[K.atom,K.bool,K.url,K.contentSeparator,K.labelName],color:"#219"},{tag:[K.literal,K.inserted],color:"#164"},{tag:[K.string,K.deleted],color:"#a11"},{tag:[K.regexp,K.escape,K.special(K.string)],color:"#e40"},{tag:K.definition(K.variableName),color:"#00f"},{tag:K.local(K.variableName),color:"#30a"},{tag:[K.typeName,K.namespace],color:"#085"},{tag:K.className,color:"#167"},{tag:[K.special(K.variableName),K.macroName],color:"#256"},{tag:K.definition(K.propertyName),color:"#00c"},{tag:K.comment,color:"#940"},{tag:K.invalid,color:"#f00"}]),wX=ze.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),VT=1e4,HT="()[]{}",XT=He.define({combine(t){return eo(t,{afterCursor:!0,brackets:HT,maxScanDistance:VT,renderMatch:TX})}}),PX=at.mark({class:"cm-matchingBracket"}),_X=at.mark({class:"cm-nonmatchingBracket"});function TX(t){let e=[],n=t.matched?PX:_X;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const kX=Zn.define({create(){return at.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(XT);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Wi(e.state,i.head,-1,r)||i.head>0&&Wi(e.state,i.head-1,1,r)||r.afterCursor&&(Wi(e.state,i.head,1,r)||i.headze.decorations.from(t)}),RX=[kX,wX];function IX(t={}){return[XT.of(t),RX]}const MX=new Tt;function Bg(t,e,n){let r=t.prop(e<0?Tt.openedBy:Tt.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function Wg(t){let e=t.type.prop(MX);return e?e(t.node):t}function Wi(t,e,n,r={}){let i=r.maxScanDistance||VT,o=r.brackets||HT,a=Fn(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let c=Bg(l.type,n,o);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return EX(t,e,n,l,u,c,o)}}return AX(t,e,n,a,s.type,i,o)}function EX(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},c=0,u=s==null?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!u.next().done&&f<=o;){let h=u.value;n<0&&(f+=h.length);let p=e+f*n;for(let m=n>0?0:h.length-1,g=n>0?h.length:-1;m!=g;m+=n){let v=a.indexOf(h[m]);if(!(v<0||r.resolveInner(p+m,1).type!=i))if(v%2==0==n>0)d++;else{if(d==1)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}n>0&&(f+=h.length)}return u.done?{start:c,matched:!1}:null}const QX=Object.create(null),KS=[jr.none],JS=[],ex=Object.create(null),NX=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])NX[t]=zX(QX,e);function _p(t,e){JS.indexOf(t)>-1||(JS.push(t),console.warn(e))}function zX(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let c of s.split(".")){let u=t[c]||K[c];u?typeof u=="function"?l.length?l=l.map(u):_p(c,`Modifier ${c} used at start of tag`):l.length?_p(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:_p(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=ex[i];if(o)return o.id;let a=ex[i]=jr.define({id:KS.length,name:r,props:[U0({[r]:n})]});return KS.push(a),a.id}mn.RTL,mn.LTR;const LX=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=iO(t.state,n.from);return r.line?jX(t):r.block?BX(t):!1};function rO(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const jX=rO(VX,0),DX=rO(ZT,0),BX=rO((t,e)=>ZT(t,e,FX(e)),0);function iO(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const sl=50;function WX(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-sl,r),a=t.sliceDoc(i,i+sl),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,c=o.length-s;if(o.slice(c-e.length,c)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let u,d;i-r<=2*sl?u=d=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+sl),d=t.sliceDoc(i-sl,i));let f=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(d)[0].length,p=d.length-h-n.length;return u.slice(f,f+e.length)==e&&d.slice(p,p+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(d.charAt(p-1))?1:0}}:null}function FX(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function ZT(t,e,n=e.selection.ranges){let r=n.map(o=>iO(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>WX(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;ai&&(o==a||a>d.from)){i=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,p=d.text.slice(f,f+c.length)==c?f:-1;fo.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:c,empty:u,single:d}of r)(d||!u)&&o.push({from:s.from+c,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let c=a.from+s,u=c+l.length;a.text[u-a.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const Fg=Ji.define(),HX=Ji.define(),XX=He.define(),qT=He.define({combine(t){return eo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),GT=Zn.define({create(){return Fi.empty},update(t,e){let n=e.state.facet(qT),r=e.annotation(Fg);if(r){let l=zr.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=Yd(u,u.length,n.minDepth,l):u=KT(u,e.startState.selection),new Fi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(HX);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Nn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=zr.fromTransaction(e),a=e.annotation(Nn.time),s=e.annotation(Nn.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Fi(t.done.map(zr.fromJSON),t.undone.map(zr.fromJSON))}});function ZX(t={}){return[GT,qT.of(t),ze.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?YT:e.inputType=="historyRedo"?Vg:null;return r?(e.preventDefault(),r(n)):!1}})]}function sh(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(GT,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const YT=sh(0,!1),Vg=sh(1,!1),qX=sh(0,!0),GX=sh(1,!0);class zr{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new zr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new zr(e.changes&&Dn.fromJSON(e.changes),[],e.mapped&&Xi.fromJSON(e.mapped),e.startSelection&&xe.fromJSON(e.startSelection),e.selectionsAfter.map(xe.fromJSON))}static fromTransaction(e,n){let r=li;for(let i of e.startState.facet(XX)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new zr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,li)}static selection(e){return new zr(void 0,li,void 0,void 0,e)}}function Yd(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function YX(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l=c&&a<=u&&(r=!0)}}),r}function UX(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function UT(t,e){return t.length?e.length?t.concat(e):t:e}const li=[],KX=200;function KT(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-KX));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Yd(t,t.length-1,1e9,n.setSelAfter(r)))}else return[zr.selection([e])]}function JX(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Tp(t,e){if(!t.length)return t;let n=t.length,r=li;for(;n;){let i=eZ(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[zr.selection(r)]:li}function eZ(t,e,n){let r=UT(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):li,n);if(!t.changes)return zr.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new zr(i,gt.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const tZ=/^(input\.type|delete)($|\.)/;class Fi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Fi(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||tZ.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):lh(n,e))}function mr(t){return t.textDirectionAt(t.state.selection.main.head)==mn.LTR}const ek=t=>JT(t,!mr(t)),tk=t=>JT(t,mr(t));function nk(t,e){return ki(t,n=>n.empty?t.moveByGroup(n,e):lh(n,e))}const rZ=t=>nk(t,!mr(t)),iZ=t=>nk(t,mr(t));function oZ(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function ch(t,e,n){let r=Fn(t).resolveInner(e.head),i=n?Tt.closedBy:Tt.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;oZ(t,c,i)?r=c:l=n?c.to:c.from}let o=r.type.prop(i),a,s;return o&&(a=n?Wi(t,r.from,1):Wi(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,xe.cursor(s,n?-1:1)}const aZ=t=>ki(t,e=>ch(t.state,e,!mr(t))),sZ=t=>ki(t,e=>ch(t.state,e,mr(t)));function rk(t,e){return ki(t,n=>{if(!n.empty)return lh(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const ik=t=>rk(t,!1),ok=t=>rk(t,!0);function ak(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):lh(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,c=s.bottom-n.marginBottom;a&&a.top>l&&a.bottomsk(t,!1),Hg=t=>sk(t,!0);function Zo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=xe.cursor(r.from+o))}return i}const lZ=t=>ki(t,e=>Zo(t,e,!0)),cZ=t=>ki(t,e=>Zo(t,e,!1)),uZ=t=>ki(t,e=>Zo(t,e,!mr(t))),dZ=t=>ki(t,e=>Zo(t,e,mr(t))),fZ=t=>ki(t,e=>xe.cursor(t.lineBlockAt(e.head).from,1)),hZ=t=>ki(t,e=>xe.cursor(t.lineBlockAt(e.head).to,-1));function pZ(t,e,n){let r=!1,i=Hs(t.selection,o=>{let a=Wi(t,o.head,-1)||Wi(t,o.head,1)||o.head>0&&Wi(t,o.head-1,1)||o.headpZ(t,e);function mi(t,e){let n=Hs(t.state.selection,r=>{let i=e(r);return xe.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(no(t.state,n)),!0)}function lk(t,e){return mi(t,n=>t.moveByChar(n,e))}const ck=t=>lk(t,!mr(t)),uk=t=>lk(t,mr(t));function dk(t,e){return mi(t,n=>t.moveByGroup(n,e))}const gZ=t=>dk(t,!mr(t)),vZ=t=>dk(t,mr(t)),OZ=t=>mi(t,e=>ch(t.state,e,!mr(t))),bZ=t=>mi(t,e=>ch(t.state,e,mr(t)));function fk(t,e){return mi(t,n=>t.moveVertically(n,e))}const hk=t=>fk(t,!1),pk=t=>fk(t,!0);function mk(t,e){return mi(t,n=>t.moveVertically(n,e,ak(t).height))}const nx=t=>mk(t,!1),rx=t=>mk(t,!0),yZ=t=>mi(t,e=>Zo(t,e,!0)),SZ=t=>mi(t,e=>Zo(t,e,!1)),xZ=t=>mi(t,e=>Zo(t,e,!mr(t))),CZ=t=>mi(t,e=>Zo(t,e,mr(t))),$Z=t=>mi(t,e=>xe.cursor(t.lineBlockAt(e.head).from)),wZ=t=>mi(t,e=>xe.cursor(t.lineBlockAt(e.head).to)),ix=({state:t,dispatch:e})=>(e(no(t,{anchor:0})),!0),ox=({state:t,dispatch:e})=>(e(no(t,{anchor:t.doc.length})),!0),ax=({state:t,dispatch:e})=>(e(no(t,{anchor:t.selection.main.anchor,head:0})),!0),sx=({state:t,dispatch:e})=>(e(no(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),PZ=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),_Z=({state:t,dispatch:e})=>{let n=uh(t).map(({from:r,to:i})=>xe.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:xe.create(n),userEvent:"select"})),!0},TZ=({state:t,dispatch:e})=>{let n=Hs(t.selection,r=>{let i=Fn(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return xe.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(no(t,n)),!0)},kZ=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=xe.create([n.main]):n.main.empty||(r=xe.create([xe.cursor(n.main.head)])),r?(e(no(t,r)),!0):!1};function jc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);la&&(n="delete.forward",l=ku(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=ku(t,a,!1),s=ku(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:xe.cursor(a,ai(t)))r.between(e,e,(i,o)=>{ie&&(e=n?o:i)});return e}const gk=(t,e,n)=>jc(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&igk(t,!1,!0),vk=t=>gk(t,!0,!1),Ok=(t,e)=>jc(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Jn(o.text,r-o.from,e)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=a(c);if(s!=null&&u!=s)break;(c!=" "||r!=n.head)&&(s=u),r=l}return r}),bk=t=>Ok(t,!1),RZ=t=>Ok(t,!0),IZ=t=>jc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headjc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),EZ=t=>jc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ft.of(["",""])},range:xe.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},QZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:Jn(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:Jn(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:xe.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function uh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function yk(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of uh(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push(xe.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push(xe.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:xe.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const NZ=({state:t,dispatch:e})=>yk(t,e,!1),zZ=({state:t,dispatch:e})=>yk(t,e,!0);function Sk(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of uh(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const LZ=({state:t,dispatch:e})=>Sk(t,e,!1),jZ=({state:t,dispatch:e})=>Sk(t,e,!0),DZ=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(uh(e).map(({from:i,to:o})=>(i>0?i--:o{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function BZ(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Fn(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(Tt.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const lx=xk(!1),WZ=xk(!0);function xk(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&BZ(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let c=new oh(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=J0(c,o);for(u==null&&(u=Vs(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));as.from&&o{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:xe.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const FZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new oh(t,{overrideIndentation:o=>{let a=n[o];return a??-1}}),i=oO(t,(o,a,s)=>{let l=J0(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],u=oc(t,l);(c!=u||s.fromt.readOnly?!1:(e(t.update(oO(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Nc)})}),{userEvent:"input.indent"})),!0),$k=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(oO(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Vs(i,t.tabSize),a=0,s=oc(t,Math.max(0,o-Zd(t)));for(;a(t.setTabFocusMode(),!0),HZ=[{key:"Ctrl-b",run:ek,shift:ck,preventDefault:!0},{key:"Ctrl-f",run:tk,shift:uk},{key:"Ctrl-p",run:ik,shift:hk},{key:"Ctrl-n",run:ok,shift:pk},{key:"Ctrl-a",run:fZ,shift:$Z},{key:"Ctrl-e",run:hZ,shift:wZ},{key:"Ctrl-d",run:vk},{key:"Ctrl-h",run:Xg},{key:"Ctrl-k",run:IZ},{key:"Ctrl-Alt-h",run:bk},{key:"Ctrl-o",run:AZ},{key:"Ctrl-t",run:QZ},{key:"Ctrl-v",run:Hg}],XZ=[{key:"ArrowLeft",run:ek,shift:ck,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:rZ,shift:gZ,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:uZ,shift:xZ,preventDefault:!0},{key:"ArrowRight",run:tk,shift:uk,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:iZ,shift:vZ,preventDefault:!0},{mac:"Cmd-ArrowRight",run:dZ,shift:CZ,preventDefault:!0},{key:"ArrowUp",run:ik,shift:hk,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ix,shift:ax},{mac:"Ctrl-ArrowUp",run:tx,shift:nx},{key:"ArrowDown",run:ok,shift:pk,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ox,shift:sx},{mac:"Ctrl-ArrowDown",run:Hg,shift:rx},{key:"PageUp",run:tx,shift:nx},{key:"PageDown",run:Hg,shift:rx},{key:"Home",run:cZ,shift:SZ,preventDefault:!0},{key:"Mod-Home",run:ix,shift:ax},{key:"End",run:lZ,shift:yZ,preventDefault:!0},{key:"Mod-End",run:ox,shift:sx},{key:"Enter",run:lx,shift:lx},{key:"Mod-a",run:PZ},{key:"Backspace",run:Xg,shift:Xg},{key:"Delete",run:vk},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bk},{key:"Mod-Delete",mac:"Alt-Delete",run:RZ},{mac:"Mod-Backspace",run:MZ},{mac:"Mod-Delete",run:EZ}].concat(HZ.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),ZZ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:aZ,shift:OZ},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:sZ,shift:bZ},{key:"Alt-ArrowUp",run:NZ},{key:"Shift-Alt-ArrowUp",run:LZ},{key:"Alt-ArrowDown",run:zZ},{key:"Shift-Alt-ArrowDown",run:jZ},{key:"Escape",run:kZ},{key:"Mod-Enter",run:WZ},{key:"Alt-l",mac:"Ctrl-l",run:_Z},{key:"Mod-i",run:TZ,preventDefault:!0},{key:"Mod-[",run:$k},{key:"Mod-]",run:Ck},{key:"Mod-Alt-\\",run:FZ},{key:"Shift-Mod-k",run:DZ},{key:"Shift-Mod-\\",run:mZ},{key:"Mod-/",run:LX},{key:"Alt-A",run:DX},{key:"Ctrl-m",mac:"Shift-Alt-m",run:VZ}].concat(XZ),qZ={key:"Tab",run:Ck,shift:$k},cx=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ks{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(cx(s)):cx,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Er(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=M0(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Li(e);let i=this.normalize(n);if(i.length)for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Ud(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=n){let s=new cs(n,e.sliceString(n,r));return kp.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Ud(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=cs.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Pk.prototype[Symbol.iterator]=_k.prototype[Symbol.iterator]=function(){return this});function GZ(t){try{return new RegExp(t,aO),!0}catch{return!1}}function Ud(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function Zg(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=rn("input",{class:"cm-textfield",name:"line",value:e}),r=rn("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Ml.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},rn("label",t.state.phrase("Go to line"),": ",n)," ",rn("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),rn("button",{name:"close",onclick:()=>{t.dispatch({effects:Ml.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,c,u,d]=o,f=u?+u.slice(1):0,h=c?+c:s.number;if(c&&d){let g=h/100;l&&(g=g*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*g)}else c&&l&&(h=h*(l=="-"?-1:1)+s.number);let p=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),m=xe.cursor(p.from+Math.max(0,Math.min(f,p.length)));t.dispatch({effects:[Ml.of(!1),ze.scrollIntoView(m.from,{y:"center"})],selection:m}),t.focus()}return{dom:r}}const Ml=gt.define(),ux=Zn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Ml)&&(t=n.value);return t},provide:t=>nc.from(t,e=>e?Zg:null)}),YZ=t=>{let e=tc(t,Zg);if(!e){let n=[Ml.of(!0)];t.state.field(ux,!1)==null&&n.push(gt.appendConfig.of([ux,UZ])),t.dispatch({effects:n}),e=tc(t,Zg)}return e&&e.dom.querySelector("input").select(),!0},UZ=ze.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),KZ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},JZ=He.define({combine(t){return eo(t,KZ,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function eq(t){return[oq,iq]}const tq=at.mark({class:"cm-selectionMatch"}),nq=at.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function dx(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Sn.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Sn.Word)}function rq(t,e,n,r){return t(e.sliceDoc(n,n+1))==Sn.Word&&t(e.sliceDoc(r-1,r))==Sn.Word}const iq=In.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(JZ),{state:n}=t,r=n.selection;if(r.ranges.length>1)return at.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return at.none;let l=n.wordAt(i.head);if(!l)return at.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return at.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(dx(a,n,i.from,i.to)&&rq(a,n,i.from,i.to)))return at.none}else if(o=n.sliceDoc(i.from,i.to),!o)return at.none}let s=[];for(let l of t.visibleRanges){let c=new ks(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:d}=c.value;if((!a||dx(a,n,u,d))&&(i.empty&&u<=i.from&&d>=i.to?s.push(nq.range(u,d)):(u>=i.to||d<=i.from)&&s.push(tq.range(u,d)),s.length>e.maxMatches))return at.none}}return at.set(s)}},{decorations:t=>t.decorations}),oq=ze.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),aq=({state:t,dispatch:e})=>{let{selection:n}=t,r=xe.create(n.ranges.map(i=>t.wordAt(i.head)||xe.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function sq(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new ks(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new ks(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const lq=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return aq({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=sq(t,r);return i?(e(t.update({selection:t.selection.addRange(xe.range(i.from,i.to),!1),effects:ze.scrollIntoView(i.to)})),!0):!1},Xs=He.define({combine(t){return eo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new yq(e),scrollToMatch:e=>ze.scrollIntoView(e)})}});class Tk{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||GZ(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?` -`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new fq(this):new uq(this)}getCursor(e,n=0,r){let i=e.doc?e:Qt.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Xa(this,i,n,r):Ha(this,i,n,r)}}class kk{constructor(e){this.spec=e}}function Ha(t,e,n,r){return new ks(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?cq(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function cq(t,e){return(n,r,i,o)=>((o>n||o+i.length=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Ha(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function Xa(t,e,n,r){return new Pk(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?dq(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function Kd(t,e){return t.slice(Jn(t,e,!1),e)}function Jd(t,e){return t.slice(e,Jn(t,e))}function dq(t){return(e,n,r)=>!r[0].length||(t(Kd(r.input,r.index))!=Sn.Word||t(Jd(r.input,r.index))!=Sn.Word)&&(t(Jd(r.input,r.index+r[0].length))!=Sn.Word||t(Kd(r.input,r.index+r[0].length))!=Sn.Word)}class fq extends kk{nextMatch(e,n,r){let i=Xa(this.spec,e,r,e.doc.length).next();return i.done&&(i=Xa(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=Xa(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Xa(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const ac=gt.define(),sO=gt.define(),Eo=Zn.define({create(t){return new Rp(qg(t).create(),null)},update(t,e){for(let n of e.effects)n.is(ac)?t=new Rp(n.value.create(),t.panel):n.is(sO)&&(t=new Rp(t.query,n.value?lO:null));return t},provide:t=>nc.from(t,e=>e.panel)});class Rp{constructor(e,n){this.query=e,this.panel=n}}const hq=at.mark({class:"cm-searchMatch"}),pq=at.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mq=In.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Eo))}update(t){let e=t.state.field(Eo);(e!=t.startState.field(Eo)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return at.none;let{view:n}=this,r=new fo;for(let i=0,o=n.visibleRanges,a=o.length;io[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(c,u)=>{let d=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);r.add(c,u,d?pq:hq)})}return r.finish()}},{decorations:t=>t.decorations});function Dc(t){return e=>{let n=e.state.field(Eo,!1);return n&&n.query.spec.valid?t(e,n):Mk(e)}}const ef=Dc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=xe.single(r.from,r.to),o=t.state.facet(Xs);return t.dispatch({selection:i,effects:[cO(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),Ik(t),!0}),tf=Dc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=xe.single(i.from,i.to),a=t.state.facet(Xs);return t.dispatch({selection:o,effects:[cO(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),Ik(t),!0}),gq=Dc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:xe.create(n.map(r=>xe.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),vq=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new ks(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(xe.range(s.value.from,s.value.to))}return e(t.update({selection:xe.create(o,a),userEvent:"select.search.matches"})),!0},fx=Dc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,c,u=[];a.from==r&&a.to==i&&(c=n.toText(e.getReplacement(a)),s.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(n,a.from,a.to),u.push(ze.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=t.state.changes(s);return a&&(l=xe.single(a.from,a.to).map(d),u.push(cO(t,a)),u.push(n.facet(Xs).scrollToMatch(l.main,t))),t.dispatch({changes:d,selection:l,effects:u,userEvent:"input.replace"}),!0}),Oq=Dc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ze.announce.of(r),userEvent:"input.replace.all"}),!0});function lO(t){return t.state.facet(Xs).createPanel(t)}function qg(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let c=t.facet(Xs);return new Tk({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function Rk(t){let e=tc(t,lO);return e&&e.dom.querySelector("[main-field]")}function Ik(t){let e=Rk(t);e&&e==t.root.activeElement&&e.select()}const Mk=t=>{let e=t.state.field(Eo,!1);if(e&&e.panel){let n=Rk(t);if(n&&n!=t.root.activeElement){let r=qg(t.state,e.query.spec);r.valid&&t.dispatch({effects:ac.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[sO.of(!0),e?ac.of(qg(t.state,e.query.spec)):gt.appendConfig.of(xq)]});return!0},Ek=t=>{let e=t.state.field(Eo,!1);if(!e||!e.panel)return!1;let n=tc(t,lO);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:sO.of(!1)}),!0},bq=[{key:"Mod-f",run:Mk,scope:"editor search-panel"},{key:"F3",run:ef,shift:tf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:ef,shift:tf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ek,scope:"editor search-panel"},{key:"Mod-Shift-l",run:vq},{key:"Mod-Alt-g",run:YZ},{key:"Mod-d",run:lq,preventDefault:!0}];class yq{constructor(e){this.view=e;let n=this.query=e.state.field(Eo).query.spec;this.commit=this.commit.bind(this),this.searchField=rn("input",{value:n.search,placeholder:Hr(e,"Find"),"aria-label":Hr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=rn("input",{value:n.replace,placeholder:Hr(e,"Replace"),"aria-label":Hr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=rn("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=rn("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=rn("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return rn("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=rn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>ef(e),[Hr(e,"next")]),r("prev",()=>tf(e),[Hr(e,"previous")]),r("select",()=>gq(e),[Hr(e,"all")]),rn("label",null,[this.caseField,Hr(e,"match case")]),rn("label",null,[this.reField,Hr(e,"regexp")]),rn("label",null,[this.wordField,Hr(e,"by word")]),...e.state.readOnly?[]:[rn("br"),this.replaceField,r("replace",()=>fx(e),[Hr(e,"replace")]),r("replaceAll",()=>Oq(e),[Hr(e,"replace all")])],rn("button",{name:"close",onclick:()=>Ek(e),"aria-label":Hr(e,"close"),type:"button"},["×"])])}commit(){let e=new Tk({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ac.of(e)}))}keydown(e){IV(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?tf:ef)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),fx(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(ac)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Xs).top}}function Hr(t,e){return t.state.phrase(e)}const Ru=30,Iu=/[\s\.,:;?!]/;function cO(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-Ru),a=Math.min(i,n+Ru),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;ls.length-Ru;l--)if(!Iu.test(s[l-1])&&Iu.test(s[l])){s=s.slice(0,l);break}}return ze.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const Sq=ze.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xq=[Eo,Xo.low(mq),Sq];class Ak{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Fn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(Nk(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function hx(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Cq(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;otypeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Cq(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function $q(t,e){return n=>{for(let r=Fn(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class px{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function ha(t){return t.selection.main.from}function Nk(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const uO=Ji.define();function wq(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return{...t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:xe.cursor(s.from+o+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const mx=new WeakMap;function Pq(t){if(!Array.isArray(t))return t;let e=mx.get(t);return e||mx.set(t,e=Qk(t)),e}const nf=gt.define(),sc=gt.define();class _q{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(C=M0(b))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!O||$==1&&g||x==0&&$!=0)&&(n[d]==b||r[d]==b&&(f=!0)?a[d++]=O:a.length&&(v=!1)),x=$,O+=Li(b)}return d==l&&a[0]==0&&v?this.result(-100+(f?-200:0),a,e):h==l&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-900-e.length,[p,m]):d==l?this.result(-100+(f?-200:0)+-700+(v?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Li(Er(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class Tq{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:kq,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>gx(e(r),n(r)),optionClass:(e,n)=>r=>gx(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function gx(t,e){return t?e?t+" "+e:t:e}function kq(t,e,n,r,i,o){let a=t.textDirection==mn.RTL,s=a,l=!1,c="top",u,d,f=e.left-i.left,h=i.right-e.right,p=r.right-r.left,m=r.bottom-r.top;if(s&&f=m||O>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let g=(e.bottom-e.top)/o.offsetHeight,v=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/g}px; max-width: ${d/v}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function Rq(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;cl&&a.appendChild(document.createTextNode(s.slice(l,u)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(u,d))),f.className="cm-completionMatchedText",l=d}return ln.position-r.position).map(n=>n.render)}function Ip(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class Iq{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(Hn);this.optionContent=Rq(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=Ip(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,d;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(d=/-(\d+)$/.exec(u.id))&&+d[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Hn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:sc.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=Ip(o.length,a,e.state.facet(Hn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Ip(n.options.length,n.selected,this.view.state.facet(Hn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>Nr(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&Eq(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom{a.target==i&&a.preventDefault()});let o=null;for(let a=r.from;ar.from||r.from==0))if(o=f,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=f}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+a,u.setAttribute("role","option");let d=this.optionClass(s);d&&(u.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew Iq(n,t,e)}function Eq(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.topn.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function vx(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Aq(t,e){let n=[],r=null,i=null,o=u=>{n.push(u);let{section:d}=u.completion;if(d){r||(r=[]);let f=typeof d=="string"?d:d.name;r.some(h=>h.name==f)||r.push(typeof d=="string"?{name:f}:d)}},a=e.facet(Hn);for(let u of t)if(u.hasResult()){let d=u.result.getMatch;if(u.result.filter===!1)for(let f of u.result.options)o(new px(f,u.source,d?d(f):[],1e9-n.length));else{let f=e.sliceDoc(u.from,u.to),h,p=a.filterStrict?new Tq(f):new _q(f);for(let m of u.result.options)if(h=p.match(m.label)){let g=m.displayLabel?d?d(m,h.matched):[]:h.matched,v=h.score+(m.boost||0);if(o(new px(m,u.source,g,v)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:O}=m.section;i||(i=Object.create(null)),i[O]=Math.max(v,i[O]||-1e9)}}}}if(r){let u=Object.create(null),d=0,f=(h,p)=>(h.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(h.namef.score-d.score||c(d.completion,f.completion))){let d=u.completion;!l||l.label!=d.label||l.detail!=d.detail||l.type!=null&&d.type!=null&&l.type!=d.type||l.apply!=d.apply||l.boost!=d.boost?s.push(u):vx(u.completion)>vx(l)&&(s[s.length-1]=u),l=u.completion}return s}class ns{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new ns(this.options,Ox(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,a){if(i&&!a&&e.some(c=>c.isPending))return i.setDisabled();let s=Aq(e,n);if(!s.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Hn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:Dq,above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new ns(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new ns(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class rf{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new rf(Lq,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Hn),o=(r.override||n.languageDataAt("autocomplete",ha(n)).map(Pq)).map(l=>(this.active.find(u=>u.source==l)||new ci(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,c)=>l==this.active[c])&&(o=this.active);let a=this.open,s=e.effects.some(l=>l.is(dO));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Qq(o,this.active)||s?a=ns.build(o,n,this.id,a,r,s):a&&a.disabled&&!o.some(l=>l.isPending)&&(a=null),!a&&o.every(l=>!l.isPending)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new ci(l.source,0):l));for(let l of e.effects)l.is(Lk)&&(a=a&&a.setSelected(l.value,this.id));return o==this.active&&a==this.open?this:new rf(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Nq:zq}}function Qq(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Lq=[];function zk(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(uO);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ci{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=zk(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ci(i.source,0)),r&4&&i.state==0&&(i=new ci(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(nf))i=new ci(i.source,1,o.value);else if(o.is(sc))i=new ci(i.source,0);else if(o.is(dO))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ha(e.state))}}class us extends ci{constructor(e,n,r,i,o,a){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=ha(e.state);if(s>a||!i||n&2&&(ha(e.startState)==this.from||sn.map(e))}}),Lk=gt.define(),Qr=Zn.define({create(){return rf.start()},update(t,e){return t.update(e)},provide:t=>[X0.from(t,e=>e.tooltip),ze.contentAttributes.from(t,e=>e.attrs)]});function fO(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Qr).active.find(i=>i.source==e.source);return r instanceof us?(typeof n=="string"?t.dispatch({...wq(t.state,n,r.from,r.to),annotations:uO.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const Dq=Mq(Qr,fO);function Mu(t,e="option"){return n=>{let r=n.state.field(Qr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:Lk.of(s)}),!0}}const Bq=t=>{let e=t.state.field(Qr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Qr,!1)?(t.dispatch({effects:nf.of(!0)}),!0):!1,Wq=t=>{let e=t.state.field(Qr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:sc.of(null)}),!0)};class Fq{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Vq=50,Hq=1e3,Xq=In.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Qr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Qr),n=t.state.facet(Hn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Qr)==e)return;let r=t.transactions.some(o=>{let a=zk(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;oVq&&Date.now()-a.time>Hq){for(let s of a.context.abortListeners)try{s()}catch(l){Nr(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(nf)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Qr);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Hn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=ha(e),r=new Ak(e,n,t.explicit,this.view),i=new Fq(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:sc.of(null)}),Nr(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Hn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Hn),r=this.view.state.field(Qr);for(let i=0;is.source==o.active.source);if(a&&a.isPending)if(o.done==null){let s=new ci(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:dO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Qr,!1);if(e&&e.tooltip&&this.view.state.facet(Hn).closeOnBlur){let n=e.open&&OT(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:sc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:nf.of(!1)}),20),this.composing=0}}}),Zq=typeof navigator=="object"&&/Win/.test(navigator.platform),qq=Xo.highest(ze.domEventHandlers({keydown(t,e){let n=e.state.field(Qr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Zq&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&fO(e,r),!1}})),jk=ze.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Gq{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class hO{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Kn.TrackDel),r=e.mapPos(this.to,1,Kn.TrackDel);return n==null||r==null?null:new hO(this.field,n,r)}}class pO{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=a,u=/^\t*/.exec(l)[0].length;for(let d=0;dnew hO(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1,u=l.replace(/\\[{}]/g,d=>d[1]);for(let d=0;d=c&&f.field++}for(let d of i)if(d.line==r.length&&d.from>o.index){let f=o[2]?3+(o[1]||"").length:2;d.from-=f,d.to-=f}i.push(new Gq(c,r.length,o.index,o.index+u.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(a)}return new pO(r,i)}}let Yq=at.widget({widget:new class extends to{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Uq=at.mark({class:"cm-snippetField"});class Zs{constructor(e,n){this.ranges=e,this.active=n,this.deco=at.set(e.map(r=>(r.from==r.to?Yq:Uq).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Zs(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Bc=gt.define({map(t,e){return t&&t.map(e)}}),Kq=gt.define(),lc=Zn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Bc))return n.value;if(n.is(Kq)&&t)return new Zs(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ze.decorations.from(t,e=>e?e.deco:at.none)});function mO(t,e){return xe.create(t.filter(n=>n.field==e).map(n=>xe.range(n.from,n.to)))}function Jq(t){let e=pO.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:o==l.from?l.to:o,insert:Ft.of(a)},scrollIntoView:!0,annotations:r?[uO.of(r),Nn.userEvent.of("input.complete")]:void 0};if(s.length&&(c.selection=mO(s,0)),s.some(u=>u.field>0)){let u=new Zs(s,0),d=c.effects=[Bc.of(u)];n.state.field(lc,!1)===void 0&&d.push(gt.appendConfig.of([lc,iG,oG,jk]))}n.dispatch(n.state.update(c))}}function Dk(t){return({state:e,dispatch:n})=>{let r=e.field(lc,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:mO(r.ranges,i),effects:Bc.of(o?null:new Zs(r.ranges,i)),scrollIntoView:!0})),!0}}const eG=({state:t,dispatch:e})=>t.field(lc,!1)?(e(t.update({effects:Bc.of(null)})),!0):!1,tG=Dk(1),nG=Dk(-1),rG=[{key:"Tab",run:tG,shift:nG},{key:"Escape",run:eG}],bx=He.define({combine(t){return t.length?t[0]:rG}}),iG=Xo.highest(Ac.compute([bx],t=>t.facet(bx)));function Ir(t,e){return{...e,apply:Jq(t)}}const oG=ze.domEventHandlers({mousedown(t,e){let n=e.state.field(lc,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:mO(n.ranges,i.field),effects:Bc.of(n.ranges.some(o=>o.field>i.field)?new Zs(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),cc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ca=gt.define({map(t,e){let n=e.mapPos(t,-1,Kn.TrackAfter);return n??void 0}}),gO=new class extends xa{};gO.startSide=1;gO.endSide=-1;const Bk=Zn.define({create(){return jt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(ca)&&(t=t.update({add:[gO.range(n.value,n.value+1)]}));return t}});function aG(){return[lG,Bk]}const Ep="()[]{}<>«»»«[]{}";function Wk(t){for(let e=0;e{if((sG?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Li(Er(r,0))==1||e!=i.from||n!=i.to)return!1;let o=dG(t.state,r);return o?(t.dispatch(o),!0):!1}),cG=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=Fk(t,t.selection.main.head).brackets||cc.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=fG(t.doc,a.head);for(let l of r)if(l==s&&dh(t.doc,a.head)==Wk(Er(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:xe.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},uG=[{key:"Backspace",run:cG}];function dG(t,e){let n=Fk(t,t.selection.main.head),r=n.brackets||cc.brackets;for(let i of r){let o=Wk(Er(i,0));if(e==i)return o==i?mG(t,i,r.indexOf(i+i+i)>-1,n):hG(t,i,o,n.before||cc.before);if(e==o&&Vk(t,t.selection.main.from))return pG(t,i,o)}return null}function Vk(t,e){let n=!1;return t.field(Bk).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function dh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Li(Er(n,0)))}function fG(t,e){let n=t.sliceString(e-2,e);return Li(Er(n,0))==n.length?n:n.slice(1)}function hG(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:ca.of(a.to+e.length),range:xe.range(a.anchor+e.length,a.head+e.length)};let s=dh(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:ca.of(a.head+e.length),range:xe.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function pG(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&dh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:xe.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function mG(t,e,n,r){let i=r.stringPrefixes||cc.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:ca.of(s.to+e.length),range:xe.range(s.anchor+e.length,s.head+e.length)};let l=s.head,c=dh(t.doc,l),u;if(c==e){if(yx(t,l))return{changes:{insert:e+e,from:l},effects:ca.of(l+e.length),range:xe.cursor(l+e.length)};if(Vk(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:xe.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=Sx(t,l-2*e.length,i))>-1&&yx(t,u))return{changes:{insert:e+e+e+e,from:l},effects:ca.of(l+e.length),range:xe.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=Sn.Word&&Sx(t,l,i)>-1&&!gG(t,l,e,i))return{changes:{insert:e+e,from:l},effects:ca.of(l+e.length),range:xe.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function yx(t,e){let n=Fn(t).resolveInner(e+1);return n.parent&&n.from==e}function gG(t,e,n,r){let i=Fn(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function Sx(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Sn.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Sn.Word)return o}return-1}function vG(t={}){return[qq,Qr,Hn.of(t),Xq,OG,jk]}const Hk=[{key:"Ctrl-Space",run:Mp},{mac:"Alt-`",run:Mp},{mac:"Alt-i",run:Mp},{key:"Escape",run:Wq},{key:"ArrowDown",run:Mu(!0)},{key:"ArrowUp",run:Mu(!1)},{key:"PageDown",run:Mu(!0,"page")},{key:"PageUp",run:Mu(!1,"page")},{key:"Enter",run:Bq}],OG=Xo.highest(Ac.computeN([Hn],t=>t.facet(Hn).defaultKeymap?[Hk]:[]));class xx{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class ra{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(uc).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((u,d)=>u.from-d.from||u.to-d.to),a=new fo,s=[],l=0;for(let u=0;;){let d=u==o.length?null:o[u];if(!d&&!s.length)break;let f,h;for(s.length?(f=l,h=s.reduce((m,g)=>Math.min(m,g.to),d&&d.from>f?d.from:1e8)):(f=d.from,h=d.to,s.push(d),u++);um.from||m.to==f))s.push(m),u++,h=Math.min(m.to,h);else{h=Math.min(m.from,h);break}}let p=IG(s);if(s.some(m=>m.from==m.to||m.from==m.to-1&&r.doc.lineAt(m.from).to==m.from))a.add(f,f,at.widget({widget:new _G(p),diagnostics:s.slice()}));else{let m=s.reduce((g,v)=>v.markClass?g+" "+v.markClass:g,"");a.add(f,h,at.mark({class:"cm-lintRange cm-lintRange-"+p+m,diagnostics:s.slice(),inclusiveEnd:s.some(g=>g.to>h)}))}l=h;for(let m=0;m{if(!(e&&a.diagnostics.indexOf(e)<0))if(!r)r=new xx(i,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new xx(r.from,o,r.diagnostic)}}),r}function bG(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(uc).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(Xk))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function yG(t,e){return t.field(Ur,!1)?e:e.concat(gt.appendConfig.of(MG))}const Xk=gt.define(),vO=gt.define(),Zk=gt.define(),Ur=Zn.define({create(){return new ra(at.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=Rs(n,t.selected.diagnostic,o)||Rs(n,null,o)}!n.size&&i&&e.state.facet(uc).autoPanel&&(i=null),t=new ra(n,i,r)}for(let n of e.effects)if(n.is(Xk)){let r=e.state.facet(uc).autoPanel?n.value.length?dc.open:null:t.panel;t=ra.init(n.value,r,e.state)}else n.is(vO)?t=new ra(t.diagnostics,n.value?dc.open:null,t.selected):n.is(Zk)&&(t=new ra(t.diagnostics,t.panel,n.value));return t},provide:t=>[nc.from(t,e=>e.panel),ze.decorations.from(t,e=>e.diagnostics)]}),SG=at.mark({class:"cm-lintRange cm-lintRange-active"});function xG(t,e,n){let{diagnostics:r}=t.state.field(Ur),i,o=-1,a=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(eGk(t,n,!1)))}const $G=t=>{let e=t.state.field(Ur,!1);(!e||!e.panel)&&t.dispatch({effects:yG(t.state,[vO.of(!0)])});let n=tc(t,dc.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Cx=t=>{let e=t.state.field(Ur,!1);return!e||!e.panel?!1:(t.dispatch({effects:vO.of(!1)}),!0)},wG=t=>{let e=t.state.field(Ur,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},PG=[{key:"Mod-Shift-m",run:$G,preventDefault:!0},{key:"F8",run:wG}],uc=He.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},eo(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function qk(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;ro.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function Gk(t,e,n){var r;let i=n?qk(e.actions):[];return rn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},rn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=Rs(t.state.field(Ur).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[a]?c.indexOf(i[a]):-1,d=u<0?c:[c.slice(0,u),rn("u",c.slice(u,u+1)),c.slice(u+1)];return rn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[a]})"`}.`},d)}),e.source&&rn("div",{class:"cm-diagnosticSource"},e.source))}class _G extends to{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return rn("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class $x{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Gk(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class dc{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)Cx(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=qk(o.actions);for(let s=0;s{for(let o=0;oCx(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Ur).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(a.has(u))continue;a.add(u);let d=-1,f;for(let h=r;hr&&(this.items.splice(r,d-r),i=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),o=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),r++}});r({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let c=l.height/this.list.offsetHeight;s.topl.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ur),r=Rs(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Zk.of(r)})}static open(e){return new dc(e)}}function TG(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Eu(t){return TG(``,'width="6" height="3"')}const kG=ze.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Eu("#d11")},".cm-lintRange-warning":{backgroundImage:Eu("orange")},".cm-lintRange-info":{backgroundImage:Eu("#999")},".cm-lintRange-hint":{backgroundImage:Eu("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function RG(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function IG(t){let e="hint",n=1;for(let r of t){let i=RG(r.severity);i>n&&(n=i,e=r.severity)}return e}const MG=[Ur,ze.decorations.compute([Ur],t=>{let{selected:e,panel:n}=t.field(Ur);return!e||!n||e.from==e.to?at.none:at.set([SG.range(e.from,e.to)])}),bH(xG,{hideOn:bG}),kG];var wx=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(uG)),e.defaultKeymap!==!1&&(r=r.concat(ZZ)),e.searchKeymap!==!1&&(r=r.concat(bq)),e.historyKeymap!==!1&&(r=r.concat(nZ)),e.foldKeymap!==!1&&(r=r.concat(gX)),e.completionKeymap!==!1&&(r=r.concat(Hk)),e.lintKeymap!==!1&&(r=r.concat(PG));var i=[];return e.lineNumbers!==!1&&i.push(RH()),e.highlightActiveLineGutter!==!1&&i.push(EH()),e.highlightSpecialChars!==!1&&i.push(qV()),e.history!==!1&&i.push(ZX()),e.foldGutter!==!1&&i.push(yX()),e.drawSelection!==!1&&i.push(zV()),e.dropCursor!==!1&&i.push(WV()),e.allowMultipleSelections!==!1&&i.push(Qt.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(sX()),e.syntaxHighlighting!==!1&&i.push(FT($X,{fallback:!0})),e.bracketMatching!==!1&&i.push(IX()),e.closeBrackets!==!1&&i.push(aG()),e.autocompletion!==!1&&i.push(vG()),e.rectangularSelection!==!1&&i.push(lH()),n!==!1&&i.push(dH()),e.highlightActiveLine!==!1&&i.push(eH()),e.highlightSelectionMatches!==!1&&i.push(eq()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Nc.of(" ".repeat(e.tabSize))),i.concat([Ac.of(r.flat())]).filter(Boolean)};const EG="#e5c07b",Px="#e06c75",AG="#56b6c2",QG="#ffffff",ad="#abb2bf",Gg="#7d8799",NG="#61afef",zG="#98c379",_x="#d19a66",LG="#c678dd",jG="#21252b",Tx="#2c313a",kx="#282c34",Ap="#353a42",DG="#3E4451",Rx="#528bff",BG=ze.theme({"&":{color:ad,backgroundColor:kx},".cm-content":{caretColor:Rx},".cm-cursor, .cm-dropCursor":{borderLeftColor:Rx},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:DG},".cm-panels":{backgroundColor:jG,color:ad},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:kx,color:Gg,border:"none"},".cm-activeLineGutter":{backgroundColor:Tx},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Ap},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Ap,borderBottomColor:Ap},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Tx,color:ad}}},{dark:!0}),WG=Lc.define([{tag:K.keyword,color:LG},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:Px},{tag:[K.function(K.variableName),K.labelName],color:NG},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:_x},{tag:[K.definition(K.name),K.separator],color:ad},{tag:[K.typeName,K.className,K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:EG},{tag:[K.operator,K.operatorKeyword,K.url,K.escape,K.regexp,K.link,K.special(K.string)],color:AG},{tag:[K.meta,K.comment],color:Gg},{tag:K.strong,fontWeight:"bold"},{tag:K.emphasis,fontStyle:"italic"},{tag:K.strikethrough,textDecoration:"line-through"},{tag:K.link,color:Gg,textDecoration:"underline"},{tag:K.heading,fontWeight:"bold",color:Px},{tag:[K.atom,K.bool,K.special(K.variableName)],color:_x},{tag:[K.processingInstruction,K.string,K.inserted],color:zG},{tag:K.invalid,color:QG}]),FG=[BG,FT(WG)];var VG=ze.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),HG=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:a="",basicSetup:s=!0}=e,l=[];switch(n&&l.unshift(Ac.of([qZ])),s&&(typeof s=="boolean"?l.unshift(wx()):l.unshift(wx(s))),a&&l.unshift(iH(a)),o){case"light":l.push(VG);break;case"dark":l.push(FG);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(ze.editable.of(!1)),i&&l.push(Qt.readOnly.of(!0)),[...l]},XG=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class ZG{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class Ix{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Qp=null,qG=()=>typeof window>"u"?new Ix:(Qp||(Qp=new Ix),Qp),Mx=Ji.define(),GG=200,YG=[];function UG(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:a,extensions:s=YG,autoFocus:l,theme:c="light",height:u=null,minHeight:d=null,maxHeight:f=null,width:h=null,minWidth:p=null,maxWidth:m=null,placeholder:g="",editable:v=!0,readOnly:O=!1,indentWithTab:S=!0,basicSetup:x=!0,root:b,initialState:C}=t,[$,w]=J(),[P,_]=J(),[T,R]=J(),k=J(()=>({current:null}))[0],I=J(()=>({current:null}))[0],Q=ze.theme({"&":{height:u,minHeight:d,maxHeight:f,width:h,minWidth:p,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),M=ze.updateListener.of(z=>{if(z.docChanged&&typeof r=="function"&&!z.transactions.some(H=>H.annotation(Mx))){k.current?k.current.reset():(k.current=new ZG(()=>{if(I.current){var H=I.current;I.current=null,H()}k.current=null},GG),qG().add(k.current));var L=z.state.doc,F=L.toString();r(F,z)}i&&i(XG(z))}),E=HG({theme:c,editable:v,readOnly:O,placeholder:g,indentWithTab:S,basicSetup:x}),N=[M,Q,...E];return a&&typeof a=="function"&&N.push(ze.updateListener.of(a)),N=N.concat(s),Ti(()=>{if($&&!T){var z={doc:e,selection:n,extensions:N},L=C?Qt.fromJSON(C.json,z,C.fields):Qt.create(z);if(R(L),!P){var F=new ze({state:L,parent:$,root:b});_(F),o&&o(F,L)}}return()=>{P&&(R(void 0),_(void 0))}},[$,T]),be(()=>{t.container&&w(t.container)},[t.container]),be(()=>()=>{P&&(P.destroy(),_(void 0)),k.current&&(k.current.cancel(),k.current=null)},[P]),be(()=>{l&&P&&P.focus()},[l,P]),be(()=>{P&&P.dispatch({effects:gt.reconfigure.of(N)})},[c,s,u,d,f,h,p,m,g,v,O,S,x,r,a]),be(()=>{if(e!==void 0){var z=P?P.state.doc.toString():"";if(P&&e!==z){var L=k.current&&!k.current.isDone,F=()=>{P&&e!==P.state.doc.toString()&&P.dispatch({changes:{from:0,to:P.state.doc.toString().length,insert:e||""},annotations:[Mx.of(!0)]})};L?I.current=F:F()}}},[e,P]),{state:T,setState:R,view:P,setView:_,container:$,setContainer:w}}var KG=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],OO=Se((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:d="light",height:f,minHeight:h,maxHeight:p,width:m,minWidth:g,maxWidth:v,basicSetup:O,placeholder:S,indentWithTab:x,editable:b,readOnly:C,root:$,initialState:w}=t,P=GC(t,KG),_=U(null),{state:T,view:R,container:k,setContainer:I}=UG({root:$,value:r,autoFocus:u,theme:d,height:f,minHeight:h,maxHeight:p,width:m,minWidth:g,maxWidth:v,basicSetup:O,placeholder:S,indentWithTab:x,editable:b,readOnly:C,selection:i,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:o,initialState:w});Yt(e,()=>({editor:_.current,state:T,view:R}),[_,k,T,R]);var Q=Ht(E=>{_.current=E,I(E)},[I]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var M=typeof d=="string"?"cm-theme-"+d:"cm-theme";return A("div",Ce({ref:Q,className:""+M+(n?" "+n:"")},P))});OO.displayName="CodeMirror";var Ex={};class of{constructor(e,n,r,i,o,a,s,l,c,u=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new of(e,[],n,r,r,0,[],0,i?new Ax(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new of(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new JG(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,a;ol&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,c=this.stack.length-s*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ax{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class JG{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class af{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new af(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new af(this.stack,this.pos,this.index)}}function vl(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class sd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Qx=new sd;class eY{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Qx,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;or.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n=this.chunk2Pos&&rs.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Qx,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class ds{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;Yk(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}ds.prototype.contextual=ds.prototype.fallback=ds.prototype.extend=!1;class Yg{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?vl(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(Yk(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Yg.prototype.contextual=ds.prototype.fallback=ds.prototype.extend=!1;class bo{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Yk(t,e,n,r,i,o){let a=0,s=1<0){let p=t[h];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||tY(p,e.token.value,i,o))){e.acceptToken(p);break}}let u=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[c+f*3-3]==65535){a=t[c+f*3-1];continue e}for(;d>1,p=c+h+(h<<1),m=t[p],g=t[p+1]||65536;if(u=g)d=h+1;else{a=t[p+2],e.advance();continue e}}break}}function Nx(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function tY(t,e,n,r){let i=Nx(n,r,e);return i<0||Nx(n,r,t)e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class nY{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?zx(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?zx(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(o instanceof zn){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}}class rY{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new sd)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!u.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new sd,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new sd,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a=0&&r.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;oe.bufferLength*4?new nY(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&aY(i);if(a)return Xr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Xr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return Xr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!c||(d.prop(Tt.contextHash)||0)==u))return e.useNode(d,f),Xr&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof zn)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof zn&&d.positions[0]==0)d=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),Xr&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;ci?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Lx(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),Xr&&console.log(u+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=u;for(let h=0;d.forceReduce()&&h<10&&(Xr&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)Xr&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))Xr&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Xr&&console.log(u+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Lx(s,r)):(!i||i.scoret;class Uk{constructor(e){this.start=e.start,this.shift=e.shift||zp,this.reduce=e.reduce||zp,this.reuse=e.reuse||zp,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class fc extends PT{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),i=[];for(let s=0;s=0)o(u,l,s[c++]);else{let d=s[c+-u];for(let f=-u;f>0;f--)o(s[c++],l,d);c++}}}this.nodeSet=new Z0(n.map((s,l)=>jr.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=xT;let a=vl(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new ds(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new iY(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let c=o+(a>>1);o0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=io(this.data,o+2);else break;i=n(io(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=io(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(fc.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=jx(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;or)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,r)<<1|e}return t.get}const sY=316,lY=317,Dx=1,cY=2,uY=3,dY=4,fY=318,hY=320,pY=321,mY=5,gY=6,vY=0,Ug=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Kk=125,OY=59,Kg=47,bY=42,yY=43,SY=45,xY=60,CY=44,$Y=63,wY=46,PY=91,_Y=new Uk({start:!1,shift(t,e){return e==mY||e==gY||e==hY?t:e==pY},strict:!1}),TY=new bo((t,e)=>{let{next:n}=t;(n==Kk||n==-1||e.context)&&t.acceptToken(fY)},{contextual:!0,fallback:!0}),kY=new bo((t,e)=>{let{next:n}=t,r;Ug.indexOf(n)>-1||n==Kg&&((r=t.peek(1))==Kg||r==bY)||n!=Kk&&n!=OY&&n!=-1&&!e.context&&t.acceptToken(sY)},{contextual:!0}),RY=new bo((t,e)=>{t.next==PY&&!e.context&&t.acceptToken(lY)},{contextual:!0}),IY=new bo((t,e)=>{let{next:n}=t;if(n==yY||n==SY){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(Dx);t.acceptToken(r?Dx:cY)}}else n==$Y&&t.peek(1)==wY&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(uY))},{contextual:!0});function Lp(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const MY=new bo((t,e)=>{if(t.next!=xY||!e.dialectEnabled(vY)||(t.advance(),t.next==Kg))return;let n=0;for(;Ug.indexOf(t.next)>-1;)t.advance(),n++;if(Lp(t.next,!0)){for(t.advance(),n++;Lp(t.next,!1);)t.advance(),n++;for(;Ug.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==CY)return;for(let r=0;;r++){if(r==7){if(!Lp(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(dY,-n)}),EY=U0({"get set async static":K.modifier,"for while do if else switch try catch finally return throw break continue default case defer":K.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":K.operatorKeyword,"let var const using function class extends":K.definitionKeyword,"import export from":K.moduleKeyword,"with debugger new":K.keyword,TemplateString:K.special(K.string),super:K.atom,BooleanLiteral:K.bool,this:K.self,null:K.null,Star:K.modifier,VariableName:K.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":K.function(K.variableName),VariableDefinition:K.definition(K.variableName),Label:K.labelName,PropertyName:K.propertyName,PrivatePropertyName:K.special(K.propertyName),"CallExpression/MemberExpression/PropertyName":K.function(K.propertyName),"FunctionDeclaration/VariableDefinition":K.function(K.definition(K.variableName)),"ClassDeclaration/VariableDefinition":K.definition(K.className),"NewExpression/VariableName":K.className,PropertyDefinition:K.definition(K.propertyName),PrivatePropertyDefinition:K.definition(K.special(K.propertyName)),UpdateOp:K.updateOperator,"LineComment Hashbang":K.lineComment,BlockComment:K.blockComment,Number:K.number,String:K.string,Escape:K.escape,ArithOp:K.arithmeticOperator,LogicOp:K.logicOperator,BitOp:K.bitwiseOperator,CompareOp:K.compareOperator,RegExp:K.regexp,Equals:K.definitionOperator,Arrow:K.function(K.punctuation),": Spread":K.punctuation,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace,"InterpolationStart InterpolationEnd":K.special(K.brace),".":K.derefOperator,", ;":K.separator,"@":K.meta,TypeName:K.typeName,TypeDefinition:K.definition(K.typeName),"type enum interface implements namespace module declare":K.definitionKeyword,"abstract global Privacy readonly override":K.modifier,"is keyof unique infer asserts":K.operatorKeyword,JSXAttributeValue:K.attributeValue,JSXText:K.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":K.angleBracket,"JSXIdentifier JSXNameSpacedName":K.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":K.attributeName,"JSXBuiltin/JSXIdentifier":K.standard(K.tagName)}),AY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},QY={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},NY={__proto__:null,"<":193},zY=fc.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-EtOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-EPO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-ERQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<VO!l$xO#jROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!OVO!l$xO#jVO!l$xO#jROe!iOpkOrPO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]VO!l$xO#j^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOrROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]WO!l$xO#jgPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{SU+P%]S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mR>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o>UPS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^T)z$u){V+P%]S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SS#q]SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uSSR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:mSR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:oS)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mSS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:mS#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^Q+T%aQ/c*Oo4OP>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^n=rTQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o4OP>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f]>^nZ>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f]>^nZ>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.lPQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.nSR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:_Y,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[EY],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[kY,RY,IY,MY,2,3,4,5,6,7,8,9,10,11,12,13,14,TY,new Yg("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Yg("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>AY[t]||-1},{term:343,get:t=>QY[t]||-1},{term:95,get:t=>NY[t]||-1}],tokenPrec:15201}),Jk=[Ir("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Ir("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Ir("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Ir("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Ir("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Ir(`try { + `]:Object.assign(Object.assign({},T$(t)),{marginInlineStart:t.marginXXS})}),p9(t)),m9(t)),g9()),{"&-rtl":{direction:"rtl"}})}},O9=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),VP=Zt("Typography",v9,O9),b9=t=>{const{prefixCls:e,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:f,enterIcon:h=y(c9,null)}=t,p=Y(null),m=Y(!1),g=Y(null),[v,O]=K(l);be(()=>{O(l)},[l]),be(()=>{var I;if(!((I=p.current)===null||I===void 0)&&I.resizableTextArea){const{textArea:Q}=p.current.resizableTextArea;Q.focus();const{length:E}=Q.value;Q.setSelectionRange(E,E)}},[]);const S=({target:I})=>{O(I.value.replace(/[\n\r]/g,""))},C=()=>{m.current=!0},b=()=>{m.current=!1},x=({keyCode:I})=>{m.current||(g.current=I)},$=()=>{c(v.trim())},w=({keyCode:I,ctrlKey:Q,altKey:E,metaKey:A,shiftKey:N})=>{g.current!==I||m.current||Q||E||A||N||(I===Ve.ENTER?($(),d==null||d()):I===Ve.ESC&&u())},P=()=>{$()},[_,T,k]=VP(e),R=Z(e,`${e}-edit-content`,{[`${e}-rtl`]:o==="rtl",[`${e}-${f}`]:!!f},r,T,k);return _(y("div",{className:R,style:i},y(RP,{ref:p,maxLength:a,value:v,onChange:S,onKeyDown:x,onKeyUp:w,onCompositionStart:C,onCompositionEnd:b,onBlur:P,"aria-label":n,rows:1,autoSize:s}),h!==null?hr(h,{className:`${e}-edit-content-confirm`}):null))};var y9=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=Q1[e.format]||Q1.default;window.clipboardData.setData(d,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=C9("message"in e?e.message:x9),window.prompt(r,t)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var w9=$9;const P9=wC(w9);var _9=function(t,e,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(t,e||[])).next())})};const T9=({copyConfig:t,children:e})=>{const[n,r]=K(!1),[i,o]=K(!1),a=Y(null),s=()=>{a.current&&clearTimeout(a.current)},l={};t.format&&(l.format=t.format),be(()=>s,[]);const c=pn(u=>_9(void 0,void 0,void 0,function*(){var d;u==null||u.preventDefault(),u==null||u.stopPropagation(),o(!0);try{const f=typeof t.text=="function"?yield t.text():t.text;P9(f||v7(e,!0).join("")||"",l),o(!1),r(!0),s(),a.current=setTimeout(()=>{r(!1)},3e3),(d=t.onCopy)===null||d===void 0||d.call(t,u)}catch(f){throw o(!1),f}}));return{copied:n,copyLoading:i,onClick:c}};function np(t,e){return me(()=>{const n=!!t;return[n,Object.assign(Object.assign({},e),n&&typeof t=="object"?t:null)]},[t])}const k9=t=>{const e=Y(void 0);return be(()=>{e.current=t}),e.current},R9=(t,e,n)=>me(()=>t===!0?{title:e??n}:Jt(t)?{title:t}:typeof t=="object"?Object.assign({title:e??n},t):{title:t},[t,e,n]);var I9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:c}=t,u=I9(t,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,className:h,style:p}=ir("typography"),m=l??f,g=a?mr(e,a):e,v=d("typography",n),[O,S,C]=VP(v),b=Z(v,h,{[`${v}-rtl`]:m==="rtl"},i,o,S,C),x=Object.assign(Object.assign({},p),c);return O(y(r,Object.assign({className:b,style:x,ref:g},u),s))});var M9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},E9=function(e,n){return y(Rt,xe({},e,{ref:n,icon:M9}))},A9=ye(E9);function N1(t){return t===!1?[!1,!1]:Array.isArray(t)?t:[t]}function rp(t,e,n){return t===!0||t===void 0?e:t||n&&e}function Q9(t){const e=document.createElement("em");t.appendChild(e);const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return t.removeChild(e),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const M0=t=>["string","number"].includes(typeof t),N9=({prefixCls:t,copied:e,locale:n,iconOnly:r,tooltips:i,icon:o,tabIndex:a,onCopy:s,loading:l})=>{const c=N1(i),u=N1(o),{copied:d,copy:f}=n??{},h=e?d:f,p=rp(c[e?1:0],h),m=typeof p=="string"?p:h;return y(Kt,{title:p},y("button",{type:"button",className:Z(`${t}-copy`,{[`${t}-copy-success`]:e,[`${t}-copy-icon-only`]:r}),onClick:s,"aria-label":m,tabIndex:a},e?rp(u[1],y(kd,null),!0):rp(u[0],y(l?yc:A9,null),!0)))},cu=ye(({style:t,children:e},n)=>{const r=Y(null);return Yt(n,()=>({isExceed:()=>{const i=r.current;return i.scrollHeight>i.clientHeight},getHeight:()=>r.current.clientHeight})),y("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},t)},e)}),z9=t=>t.reduce((e,n)=>e+(M0(n)?String(n).length:1),0);function z1(t,e){let n=0;const r=[];for(let i=0;ie){const c=e-n;return r.push(String(o).slice(0,c)),r}r.push(o),n=l}return t}const ip=0,op=1,ap=2,sp=3,L1=4,uu={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function L9(t){const{enableMeasure:e,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=t,c=me(()=>rr(r),[r]),u=me(()=>z9(c),[r]),d=me(()=>i(c,!1),[r]),[f,h]=K(null),p=Y(null),m=Y(null),g=Y(null),v=Y(null),O=Y(null),[S,C]=K(!1),[b,x]=K(ip),[$,w]=K(0),[P,_]=K(null);Nt(()=>{x(e&&n&&u?op:ip)},[n,r,o,e,c]),Nt(()=>{var I,Q,E,A;if(b===op){x(ap);const N=m.current&&getComputedStyle(m.current).whiteSpace;_(N)}else if(b===ap){const N=!!(!((I=g.current)===null||I===void 0)&&I.isExceed());x(N?sp:L1),h(N?[0,u]:null),C(N);const L=((Q=g.current)===null||Q===void 0?void 0:Q.getHeight())||0,z=o===1?0:((E=v.current)===null||E===void 0?void 0:E.getHeight())||0,V=((A=O.current)===null||A===void 0?void 0:A.getHeight())||0,X=Math.max(L,z+V);w(X+1),l(N)}},[b]);const T=f?Math.ceil((f[0]+f[1])/2):0;Nt(()=>{var I;const[Q,E]=f||[0,0];if(Q!==E){const N=(((I=p.current)===null||I===void 0?void 0:I.getHeight())||0)>$;let L=T;E-Q===1&&(L=N?Q:E),h(N?[Q,L]:[L,E])}},[f,T]);const k=me(()=>{if(!e)return i(c,!1);if(b!==sp||!f||f[0]!==f[1]){const I=i(c,!1);return[L1,ip].includes(b)?I:y("span",{style:Object.assign(Object.assign({},uu),{WebkitLineClamp:o})},I)}return i(a?c:z1(c,f[0]),S)},[a,b,f,c].concat(Pe(s))),R={width:n,margin:0,padding:0,whiteSpace:P==="nowrap"?"normal":"inherit"};return y(At,null,k,b===ap&&y(At,null,y(cu,{style:Object.assign(Object.assign(Object.assign({},R),uu),{WebkitLineClamp:o}),ref:g},d),y(cu,{style:Object.assign(Object.assign(Object.assign({},R),uu),{WebkitLineClamp:o-1}),ref:v},d),y(cu,{style:Object.assign(Object.assign(Object.assign({},R),uu),{WebkitLineClamp:1}),ref:O},i([],!0))),b===sp&&f&&f[0]!==f[1]&&y(cu,{style:Object.assign(Object.assign({},R),{top:400}),ref:p},i(z1(c,T),!0)),b===op&&y("span",{style:{whiteSpace:"inherit"},ref:m}))}const j9=({enableEllipsis:t,isEllipsis:e,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!t?n:y(Kt,Object.assign({open:e?void 0:!1},r),n);var D9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var n;const{prefixCls:r,className:i,style:o,type:a,disabled:s,children:l,ellipsis:c,editable:u,copyable:d,component:f,title:h}=t,p=D9(t,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:m,direction:g}=de(at),[v]=Ki("Text"),O=Y(null),S=Y(null),C=m("typography",r),b=cn(p,j1),[x,$]=np(u),[w,P]=_n(!1,{value:$.editing}),{triggerType:_=["icon"]}=$,T=Re=>{var ke;Re&&((ke=$.onStart)===null||ke===void 0||ke.call($)),P(Re)},k=k9(w);Nt(()=>{var Re;!w&&k&&((Re=S.current)===null||Re===void 0||Re.focus())},[w]);const R=Re=>{Re==null||Re.preventDefault(),T(!0)},I=Re=>{var ke;(ke=$.onChange)===null||ke===void 0||ke.call($,Re),T(!1)},Q=()=>{var Re;(Re=$.onCancel)===null||Re===void 0||Re.call($),T(!1)},[E,A]=np(d),{copied:N,copyLoading:L,onClick:z}=T9({copyConfig:A,children:l}),[V,X]=K(!1),[F,H]=K(!1),[B,G]=K(!1),[se,ie]=K(!1),[le,pe]=K(!0),[ne,ee]=np(c,{expandable:!1,symbol:Re=>Re?v==null?void 0:v.collapse:v==null?void 0:v.expand}),[ce,ue]=_n(ee.defaultExpanded||!1,{value:ee.expanded}),j=ne&&(!ce||ee.expandable==="collapsible"),{rows:J=1}=ee,he=me(()=>j&&(ee.suffix!==void 0||ee.onEllipsis||ee.expandable||x||E),[j,ee,x,E]);Nt(()=>{ne&&!he&&(X(py("webkitLineClamp")),H(py("textOverflow")))},[he,ne]);const[ge,$e]=K(j),Te=me(()=>he?!1:J===1?F:V,[he,F,V]);Nt(()=>{$e(Te&&j)},[Te,j]);const Ce=j&&(ge?se:B),Ie=j&&J===1&&ge,_e=j&&J>1&&ge,ve=(Re,ke)=>{var ot;ue(ke.expanded),(ot=ee.onExpand)===null||ot===void 0||ot.call(ee,Re,ke)},[Ne,ze]=K(0),re=({offsetWidth:Re})=>{ze(Re)},fe=Re=>{var ke;G(Re),B!==Re&&((ke=ee.onEllipsis)===null||ke===void 0||ke.call(ee,Re))};be(()=>{const Re=O.current;if(ne&&ge&&Re){const ke=Q9(Re);se!==ke&&ie(ke)}},[ne,ge,l,_e,le,Ne]),be(()=>{const Re=O.current;if(typeof IntersectionObserver>"u"||!Re||!ge||!j)return;const ke=new IntersectionObserver(()=>{pe(!!Re.offsetParent)});return ke.observe(Re),()=>{ke.disconnect()}},[ge,j]);const te=R9(ee.tooltip,$.text,l),Oe=me(()=>{if(!(!ne||ge))return[$.text,l,h,te.title].find(M0)},[ne,ge,h,te.title,Ce]);if(w)return y(b9,{value:(n=$.text)!==null&&n!==void 0?n:typeof l=="string"?l:"",onSave:I,onCancel:Q,onEnd:$.onEnd,prefixCls:C,className:i,style:o,direction:g,component:f,maxLength:$.maxLength,autoSize:$.autoSize,enterIcon:$.enterIcon});const we=()=>{const{expandable:Re,symbol:ke}=ee;return Re?y("button",{type:"button",key:"expand",className:`${C}-${ce?"collapse":"expand"}`,onClick:ot=>ve(ot,{expanded:!ce}),"aria-label":ce?v.collapse:v==null?void 0:v.expand},typeof ke=="function"?ke(ce):ke):null},Ke=()=>{if(!x)return;const{icon:Re,tooltip:ke,tabIndex:ot}=$,ut=rr(ke)[0]||(v==null?void 0:v.edit),Pn=typeof ut=="string"?ut:"";return _.includes("icon")?y(Kt,{key:"edit",title:ke===!1?"":ut},y("button",{type:"button",ref:S,className:`${C}-edit`,onClick:R,"aria-label":Pn,tabIndex:ot},Re||y(FP,{role:"button"}))):null},Ae=()=>E?y(N9,Object.assign({key:"copy"},A,{prefixCls:C,copied:N,locale:v,onCopy:z,loading:L,iconOnly:l==null})):null,Me=Re=>[Re&&we(),Ke(),Ae()],Fe=Re=>[Re&&!ce&&y("span",{"aria-hidden":!0,key:"ellipsis"},W9),ee.suffix,Me(Re)];return y(Jr,{onResize:re,disabled:!j},Re=>y(j9,{tooltipProps:te,enableEllipsis:j,isEllipsis:Ce},y(HP,Object.assign({className:Z({[`${C}-${a}`]:a,[`${C}-disabled`]:s,[`${C}-ellipsis`]:ne,[`${C}-ellipsis-single-line`]:Ie,[`${C}-ellipsis-multiple-line`]:_e},i),prefixCls:r,style:Object.assign(Object.assign({},o),{WebkitLineClamp:_e?J:void 0}),component:f,ref:mr(Re,O,e),direction:g,onClick:_.includes("text")?R:void 0,"aria-label":Oe==null?void 0:Oe.toString(),title:h},b),y(L9,{enableMeasure:j&&!ge,text:l,rows:J,width:Ne,onEllipsis:fe,expanded:ce,miscDeps:[N,ce,L,x,E,v].concat(Pe(j1.map(ke=>t[ke])))},(ke,ot)=>B9(t,y(At,null,ke.length>0&&ot&&!ce&&Oe?y("span",{key:"show-content","aria-hidden":!0},ke):ke,Fe(ot)))))))});var F9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n,rel:r}=t,i=F9(t,["ellipsis","rel"]);const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,y(nh,Object.assign({},o,{ref:e,ellipsis:!!n,component:"a"}))}),H9=ye((t,e)=>y(nh,Object.assign({ref:e},t,{component:"div"})));var X9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var{ellipsis:n}=t,r=X9(t,["ellipsis"]);const i=me(()=>n&&typeof n=="object"?cn(n,["expandable","rows"]):n,[n]);return y(nh,Object.assign({ref:e},r,{ellipsis:i,component:"span"}))},q9=ye(Z9);var G9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{const{level:n=1}=t,r=G9(t,["level"]),i=Y9.includes(n)?`h${n}`:"h1";return y(nh,Object.assign({ref:e},r,{component:i}))}),yn=HP;yn.Text=q9;yn.Link=V9;yn.Title=U9;yn.Paragraph=H9;var K9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6a25.95 25.95 0 0025.6 30.4h723c1.5 0 3-.1 4.4-.4a25.88 25.88 0 0021.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"}}]},name:"clear",theme:"outlined"},J9=function(e,n){return y(Rt,xe({},e,{ref:n,icon:K9}))},eW=ye(J9),tW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},nW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:tW}))},Uu=ye(nW),rW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},iW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:rW}))},Ku=ye(iW),oW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M448 804a64 64 0 10128 0 64 64 0 10-128 0zm32-168h64c4.4 0 8-3.6 8-8V164c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"exclamation",theme:"outlined"},aW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:oW}))},sW=ye(aW),lW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},cW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:lW}))},uW=ye(cW),dW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"},fW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:dW}))},hW=ye(fW),pW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"},mW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:pW}))},gW=ye(mW),vW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},OW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:vW}))},bW=ye(OW),yW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},SW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:yW}))},xW=ye(SW),CW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},$W=function(e,n){return y(Rt,xe({},e,{ref:n,icon:CW}))},XP=ye($W),wW={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"},PW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:wW}))},_W=ye(PW),TW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"},kW=function(e,n){return y(Rt,xe({},e,{ref:n,icon:TW}))},RW=ye(kW);function du({currentUser:t=null,isDarkMode:e=!1,onThemeToggle:n}){const[r,i]=K(!1),o=()=>{try{return window.self!==window.top}catch{return!0}},a=p=>{if(console.log("Header getUserPicture called with user:",p),p!=null&&p.entity_picture)return console.log("Using entity_picture:",p.entity_picture),p.entity_picture;if(p!=null&&p.id){const m=`/api/image/serve/${p.id}/512x512`;return console.log("Using fallback URL:",m),m}return console.log("No picture available for user"),null},s=p=>(p==null?void 0:p.name)||"Unknown User",l=()=>{const p=window.location.href,m=new URL(p);window.location.href=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/`},c=()=>{const p=window.location.href,m=new URL(p),g=m.hostname,v=m.protocol,O=m.port?`:${m.port}`:"",S=`${v}//${g}${O}/config/integrations/integration/rbac`;o()?window.open(S,"_blank"):window.location.href=S},u=()=>{const p=window.location.href,m=new URL(p),g=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/api/rbac/static/config.html`;window.open(g,"_blank")},d=()=>{localStorage.removeItem("hassTokens"),sessionStorage.removeItem("hassTokens");const p=window.location.href,m=new URL(p);window.location.href=`${m.protocol}//${m.hostname}${m.port?":"+m.port:""}/auth/authorize`},f=()=>{i(!0),n()},h=[...o()?[{key:"newTab",label:"Open in New Tab",icon:M(uW,{}),onClick:u}]:[],...o()?[]:[{key:"home",label:"Return to Home Assistant",icon:M(hW,{}),onClick:l}],{key:"integration",label:"RBAC Integration",icon:M(XP,{}),onClick:c},{key:"logout",label:"Log Out",icon:M(gW,{}),onClick:d}];return M("div",{style:{background:e?"#1f1f1f":"white",padding:"20px",borderRadius:"8px",boxShadow:e?"0 2px 4px rgba(255,255,255,0.1)":"0 2px 4px rgba(0,0,0,0.1)",display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px",border:e?"1px solid #424242":"none"},children:[M("div",{children:[M("h1",{style:{margin:0,color:e?"#ffffff":"#1976d2"},children:"🔐 RBAC Configuration"}),M("p",{style:{margin:0,color:e?"#d9d9d9":"#666"},children:"Manage role-based access control for your Home Assistant instance"})]}),M("div",{style:{display:"flex",alignItems:"center",gap:"16px"},children:[M(Kt,{title:e?"Switch to light mode":"Switch to dark mode",children:M(vt,{type:"text",icon:e?M(_W,{className:r?"theme-toggle-spin":""}):M(bW,{className:r?"theme-toggle-spin":""}),onClick:f,style:{fontSize:"16px",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px",border:"1px solid #d9d9d9",backgroundColor:"transparent",transition:"all 0.3s ease"},onMouseEnter:p=>{p.currentTarget.style.backgroundColor="#f5f5f5",p.currentTarget.style.borderColor="#1890ff"},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="transparent",p.currentTarget.style.borderColor="#d9d9d9"}})}),t&&M(P0,{menu:{items:h},trigger:["click"],placement:"bottomRight",children:M("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"8px 12px",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.2s ease"},onMouseEnter:p=>{p.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="transparent"},children:[M(m0,{src:a(t),size:48,children:s(t).charAt(0).toUpperCase()}),M("div",{children:[M(yn.Text,{strong:!0,style:{fontSize:"16px"},children:s(t)}),M("br",{}),M(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:t.role||"No role assigned"})]})]})})]})]})}const{Option:IW}=Rn;function lp({options:t,selectedValues:e,onSelectionChange:n,placeholder:r="Select items...",disabled:i=!1}){return M(Rn,{mode:"multiple",placeholder:r,value:e,onChange:s=>{n(s||[])},disabled:i,tagRender:s=>{const{label:l,closable:c,onClose:u}=s;return M(na,{color:"blue",closable:c,onClose:u,style:{marginRight:3},children:l})},style:{width:"100%"},showSearch:!0,filterOption:(s,l)=>{var c;return((c=l==null?void 0:l.children)==null?void 0:c.toLowerCase().indexOf(s.toLowerCase()))>=0},children:t.map(s=>M(IW,{value:s,children:s},s))})}function MW({data:t,onSuccess:e,onError:n}){const[r,i]=K(!1),[o,a]=K({domains:[],entities:[],panels:[]});be(()=>{var u;if((u=t.config)!=null&&u.default_restrictions){const d=t.config.default_restrictions;a({domains:Object.keys(d.domains||{}),entities:Object.keys(d.entities||{}),panels:Object.keys(d.panels||{})})}},[t.config]);const s=async()=>{i(!0);try{const u=await l();if(!u)throw new Error("Not authenticated with Home Assistant");const d={domains:{},entities:{},services:{},panels:{}};if(o.domains.forEach(h=>{d.domains[h]={hide:!0,services:[]}}),o.entities.forEach(h=>{d.entities[h]={hide:!0,services:[]}}),o.panels.forEach(h=>{d.panels[h]={hide:!0}}),!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${u.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_default_restrictions",restrictions:d})})).ok)throw new Error("Failed to save default restrictions");e("Default restrictions saved successfully!")}catch(u){console.error("Error saving default restrictions:",u),n(u.message)}finally{i(!1)}},l=async()=>{try{const u=c();if(u&&u.auth){if(u.auth.data&&u.auth.data.access_token)return{access_token:u.auth.data.access_token,token_type:"Bearer"};if(u.auth.access_token)return{access_token:u.auth.access_token,token_type:"Bearer"}}const d=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return d?{access_token:JSON.parse(d).access_token,token_type:"Bearer"}:null}catch(u){return console.error("Auth error:",u),null}},c=()=>{try{const u=document.querySelector("home-assistant");return u&&u.hass?u.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch(u){return console.error("Error getting hass object:",u),null}};return M("div",{children:[M(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Configure global restrictions applied to all users."}),M(ha,{gutter:[16,16],style:{marginBottom:24},children:[M(Hn,{xs:24,md:12,children:M(lp,{options:t.domains||[],selectedValues:o.domains,onSelectionChange:u=>a(d=>({...d,domains:u})),placeholder:"Select domains to restrict...",disabled:r})}),M(Hn,{xs:24,md:12,children:M(lp,{options:t.entities||[],selectedValues:o.entities,onSelectionChange:u=>a(d=>({...d,entities:u})),placeholder:"Select entities to restrict...",disabled:r})}),M(Hn,{xs:24,md:12,children:M(lp,{options:t.panels||[],selectedValues:o.panels,onSelectionChange:u=>a(d=>({...d,panels:u})),placeholder:"Select panels to restrict...",disabled:r})})]}),M(Do,{style:{justifyContent:"flex-end",display:"flex",width:"100%",marginTop:24},children:M(vt,{type:"primary",onClick:s,disabled:r,loading:r,size:"large",children:"Save Default Restrictions"})})]})}let eg=[],ZP=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=ZP[r])e=r+1;else return!0;if(e==n)return!1}}function D1(t){return t>=127462&&t<=127487}const B1=8205;function AW(t,e,n=!0,r=!0){return(n?qP:QW)(t,e,r)}function qP(t,e,n){if(e==t.length)return e;e&&GP(t.charCodeAt(e))&&YP(t.charCodeAt(e-1))&&e--;let r=cp(t,e);for(e+=W1(r);e=0&&D1(cp(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function QW(t,e,n){for(;e>0;){let r=qP(t,e-2,n);if(r=56320&&t<57344}function YP(t){return t>=55296&&t<56320}function W1(t){return t<65536?1:2}let Ft=class UP{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Cs(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),zi.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Cs(this,e,n);let r=[];return this.decompose(e,n,r,0),zi.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Pl(this),o=new Pl(e);for(let a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}iter(e=1){return new Pl(this,e)}iterRange(e,n=this.length){return new KP(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new JP(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?UP.empty:e.length<=32?new In(e):zi.from(In.split(e,[]))}};class In extends Ft{constructor(e,n=NW(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((n?r:s)>=e)return new zW(i,s,r,a);i=s+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new In(F1(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),s=Ju(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new In(s,a.length+o.length));else{let l=s.length>>1;r.push(new In(s.slice(0,l)),new In(s.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof In))return super.replace(e,n,r);[e,n]=Cs(this,e,n);let i=Ju(this.text,Ju(r.text,F1(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new In(i,o):zi.from(In.split(i,[]),o)}sliceString(e,n=this.length,r=` +`){[e,n]=Cs(this,e,n);let i="";for(let o=0,a=0;o<=n&&ae&&a&&(i+=r),eo&&(i+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new In(r,i)),r=[],i=-1);return i>-1&&n.push(new In(r,i)),n}}class zi extends Ft{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,i);i=s+1,r=l+1}}decompose(e,n,r,i){for(let o=0,a=0;a<=n&&o=a){let c=i&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!c?r.push(s):s.decompose(e-a,n-a,r,c)}a=l+1}}replace(e,n,r){if([e,n]=Cs(this,e,n),r.lines=o&&n<=s){let l=a.replace(e-o,n-o,r),c=this.lines-a.lines+l.lines;if(l.lines>4&&l.lines>c>>6){let u=this.children.slice();return u[i]=l,new zi(u,this.length-(n-e)+r.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=` +`){[e,n]=Cs(this,e,n);let i="";for(let o=0,a=0;oe&&o&&(i+=r),ea&&(i+=s.sliceString(e-a,n-a,r)),a=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof zi))return 0;let r=0,[i,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==a||o==s)return r;let l=this.children[i],c=e.children[o];if(l!=c)return r+l.scanIdentical(c,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let p of e)p.flatten(h);return new In(h,n)}let i=Math.max(32,r>>5),o=i<<1,a=i>>1,s=[],l=0,c=-1,u=[];function d(h){let p;if(h.lines>o&&h instanceof zi)for(let m of h.children)d(m);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof In&&l&&(p=u[u.length-1])instanceof In&&h.lines+p.lines<=32?(l+=h.lines,c+=h.length+1,u[u.length-1]=new In(p.text.concat(h.text),p.length+1+h.length)):(l+h.lines>i&&f(),l+=h.lines,c+=h.length+1,u.push(h))}function f(){l!=0&&(s.push(u.length==1?u[0]:zi.from(u,c)),c=-1,l=u.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new zi(s,n)}}Ft.empty=new In([""],0);function NW(t){let e=-1;for(let n of t)e+=n.length+1;return e}function Ju(t,e,n=0,r=1e9){for(let i=0,o=0,a=!0;o=n&&(l>r&&(s=s.slice(0,r-i)),i0?1:(e instanceof In?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof In?i.text.length:i.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof In){let l=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof In?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class KP{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Pl(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class JP{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Ft.prototype[Symbol.iterator]=function(){return this.iter()},Pl.prototype[Symbol.iterator]=KP.prototype[Symbol.iterator]=JP.prototype[Symbol.iterator]=function(){return this});class zW{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Cs(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function er(t,e,n=!0,r=!0){return AW(t,e,n,r)}function LW(t){return t>=56320&&t<57344}function jW(t){return t>=55296&&t<56320}function Er(t,e){let n=t.charCodeAt(e);if(!jW(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return LW(r)?(n-55296<<10)+(r-56320)+65536:n}function E0(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Li(t){return t<65536?1:2}const tg=/\r\n?|\n/;var Jn=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Jn||(Jn={}));class Xi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-i);o+=s}else{if(r!=Jn.Simple&&c>=e&&(r==Jn.TrackDel&&ie||r==Jn.TrackBefore&&ie))return null;if(c>e||c==e&&n<0&&!s)return e==i||n<0?o:o+l;o+=l}i=c}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r=0&&i<=n&&s>=e)return in?"cover":!0;i=s}return!1}toString(){let e="";for(let n=0;n=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Xi(e)}static create(e){return new Xi(e)}}class Dn extends Xi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return ng(this,(n,r,i,o,a)=>e=e.replace(i,i+(r-n),a),!1),e}mapDesc(e,n=!1){return rg(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i=0){n[i]=s,n[i+1]=a;let l=i>>1;for(;r.length0&&Io(r,n,o.text),o.forward(u),s+=u}let c=e[a++];for(;s>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],a=0,s=null;function l(u=!1){if(!u&&!i.length)return;af||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let p=h?typeof h=="string"?Ft.of(h.split(r||tg)):h:Ft.empty,m=p.length;if(d==f&&m==0)return;da&&cr(i,d-a,-1),cr(i,f-d,m),Io(o,i,p),a=f}}return c(e),l(!s),s}static empty(e){return new Dn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;is&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Io(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,c,o,u,d),i=c,o=u}}}function rg(t,e,n,r=!1){let i=[],o=r?[]:null,a=new Gl(t),s=new Gl(e);for(let l=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&s.ins==-1){let c=Math.min(a.len,s.len);cr(i,c,-1),a.forward(c),s.forward(c)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len=0&&l=0){let c=0,u=a.len;for(;u;)if(s.ins==-1){let d=Math.min(u,s.len);c+=d,u-=d,s.forward(d)}else if(s.ins==0&&s.lenl||a.ins>=0&&a.len>l)&&(s||r.length>c),o.forward2(l),a.forward(l)}}}}class Gl{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Ft.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Ft.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ca{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new ca(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return Se.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return Se.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Se.range(e.anchor,e.head)}static create(e,n,r){return new ca(e,n,r)}}class Se{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:Se.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Se(e.ranges.map(n=>ca.fromJSON(n)),e.main)}static single(e,n=e){return new Se([Se.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;io.head?Se.range(l,s):Se.range(s,l))}}return new Se(e,n)}}function t_(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let A0=0;class qe{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=A0++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new qe(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:Q0),!!e.static,e.enables)}of(e){return new ed([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ed(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ed(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function Q0(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class ed{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=A0++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,c=!1,u=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?c=!0:((n=e[d.id])!==null&&n!==void 0?n:1)&1||u.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||c&&(f.docChanged||f.selection)||ig(d,u)){let h=r(d);if(s?!V1(h,d.values[a],i):!i(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,p=f.config.address[o];if(p!=null){let m=Ld(f,p);if(this.dependencies.every(g=>g instanceof qe?f.facet(g)===d.facet(g):g instanceof qn?f.field(g,!1)==d.field(g,!1):!0)||(s?V1(h=r(d),m,i):i(h=r(d),m)))return d.values[a]=m,0}else h=r(d);return d.values[a]=h,1}}}}function V1(t,e,n){if(t.length!=e.length)return!1;for(let r=0;rt[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let c=[];for(let u=0;ur===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(fu).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],a=this.updateF(o,i);return this.compareF(o,a)?0:(r.values[n]=a,1)},reconfigure:(r,i)=>{let o=r.facet(fu),a=i.facet(fu),s;return(s=o.find(l=>l.field==this))&&s!=a.find(l=>l.field==this)?(r.values[n]=s.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,fu.of({field:this,create:e})]}get extension(){return this}}const ra={lowest:4,low:3,default:2,high:1,highest:0};function nl(t){return e=>new n_(e,t)}const Zo={highest:nl(ra.highest),high:nl(ra.high),default:nl(ra.default),low:nl(ra.low),lowest:nl(ra.lowest)};class n_{constructor(e,n){this.inner=e,this.prec=n}}class rh{of(e){return new og(this,e)}reconfigure(e){return rh.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class og{constructor(e,n){this.compartment=e,this.inner=n}}class zd{constructor(e,n,r,i,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,r){let i=[],o=Object.create(null),a=new Map;for(let f of BW(e,n,a))f instanceof qn?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],c=[];for(let f of i)s[f.id]=c.length<<1,c.push(h=>f.slot(h));let u=r==null?void 0:r.config.facets;for(let f in o){let h=o[f],p=h[0].facet,m=u&&u[f]||[];if(h.every(g=>g.type==0))if(s[p.id]=l.length<<1|1,Q0(m,h))l.push(r.facet(p));else{let g=p.combine(h.map(v=>v.value));l.push(r&&p.compare(g,r.facet(p))?r.facet(p):g)}else{for(let g of h)g.type==0?(s[g.id]=l.length<<1|1,l.push(g.value)):(s[g.id]=c.length<<1,c.push(v=>g.dynamicSlot(v)));s[p.id]=c.length<<1,c.push(g=>DW(g,p,h))}}let d=c.map(f=>f(s));return new zd(e,a,d,s,l,o)}}function BW(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(a,s){let l=i.get(a);if(l!=null){if(l<=s)return;let c=r[l].indexOf(a);c>-1&&r[l].splice(c,1),a instanceof og&&n.delete(a.compartment)}if(i.set(a,s),Array.isArray(a))for(let c of a)o(c,s);else if(a instanceof og){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(a.compartment)||a.inner;n.set(a.compartment,c),o(c,s)}else if(a instanceof n_)o(a.inner,a.prec);else if(a instanceof qn)r[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof ed)r[s].push(a),a.facet.extensions&&o(a.facet.extensions,ra.default);else{let c=a.extension;if(!c)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(c,s)}}return o(t,ra.default),r.reduce((a,s)=>a.concat(s))}function _l(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Ld(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const r_=qe.define(),ag=qe.define({combine:t=>t.some(e=>e),static:!0}),i_=qe.define({combine:t=>t.length?t[0]:void 0,static:!0}),o_=qe.define(),a_=qe.define(),s_=qe.define(),l_=qe.define({combine:t=>t.length?t[0]:!1});class Ji{constructor(e,n){this.type=e,this.value=n}static define(){return new WW}}class WW{of(e){return new Ji(this,e)}}class FW{constructor(e){this.map=e}of(e){return new Ot(this,e)}}class Ot{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Ot(this.type,n)}is(e){return this.type==e}static define(e={}){return new FW(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Ot.reconfigure=Ot.define();Ot.appendConfig=Ot.define();class zn{constructor(e,n,r,i,o,a){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&t_(r,n.newLength),o.some(s=>s.type==zn.time)||(this.annotations=o.concat(zn.time.of(Date.now())))}static create(e,n,r,i,o,a){return new zn(e,n,r,i,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(zn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}zn.time=Ji.define();zn.userEvent=Ji.define();zn.addToHistory=Ji.define();zn.remote=Ji.define();function VW(t,e){let n=[];for(let r=0,i=0;;){let o,a;if(r=t[r]))o=t[r++],a=t[r++];else if(i=0;i--){let o=r[i](t);o instanceof zn?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof zn?t=o[0]:t=u_(e,ss(o),!1)}return t}function XW(t){let e=t.startState,n=e.facet(s_),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=c_(r,sg(e,o,t.changes.newLength),!0))}return r==t?t:zn.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const ZW=[];function ss(t){return t==null?ZW:Array.isArray(t)?t:[t]}var Sn=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Sn||(Sn={}));const qW=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let lg;try{lg=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function GW(t){if(lg)return lg.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||qW.test(n)))return!0}return!1}function YW(t){return e=>{if(!/\S/.test(e))return Sn.Space;if(GW(e))return Sn.Word;for(let n=0;n-1)return Sn.Word;return Sn.Other}}class Qt{constructor(e,n,r,i,o,a){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;si.set(c,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(Ot.reconfigure)?(n=null,r=s.value):s.is(Ot.appendConfig)&&(n=null,r=ss(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=zd.resolve(r,i,this),o=new Qt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,c)=>c.reconfigure(l,this),null).values);let a=e.startState.facet(ag)?e.newSelection:e.newSelection.asSingle();new Qt(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:Se.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=ss(r.effects);for(let s=1;sa.spec.fromJSON(s,l)))}}return Qt.create({doc:e.doc,selection:Se.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=zd.resolve(e.extensions||[],new Map),r=e.doc instanceof Ft?e.doc:Ft.of((e.doc||"").split(n.staticFacet(Qt.lineSeparator)||tg)),i=e.selection?e.selection instanceof Se?e.selection:Se.single(e.selection.anchor,e.selection.head):Se.single(0);return t_(i,r.length),n.staticFacet(ag)||(i=i.asSingle()),new Qt(n,r,i,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(Qt.tabSize)}get lineBreak(){return this.facet(Qt.lineSeparator)||` +`}get readOnly(){return this.facet(l_)}phrase(e,...n){for(let r of this.facet(Qt.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(r_))for(let a of o(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){return YW(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=er(n,a,!1);if(o(n.slice(l,a))!=Sn.Word)break;a=l}for(;st.length?t[0]:4});Qt.lineSeparator=i_;Qt.readOnly=l_;Qt.phrases=qe.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});Qt.languageData=r_;Qt.changeFilter=o_;Qt.transactionFilter=a_;Qt.transactionExtender=s_;rh.reconfigure=Ot.define();function eo(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let a=i[o],s=r[o];if(s===void 0)r[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class $a{eq(e){return this==e}range(e,n=e){return cg.create(e,n,this)}}$a.prototype.startSide=$a.prototype.endSide=0;$a.prototype.point=!1;$a.prototype.mapMode=Jn.TrackDel;let cg=class d_{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new d_(e,n,r)}};function ug(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class N0{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let a=i,s=o.length;;){if(a==s)return a;let l=a+s>>1,c=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return c>=0?a:s;c>=0?s=l:a=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);oh||f==h&&c.startSide>0&&c.endSide<=0)continue;(h-f||c.endSide-c.startSide)<0||(a<0&&(a=f),c.point&&(s=Math.max(s,h-f)),r.push(c),i.push(f-a),o.push(h-a))}return{mapped:r.length?new N0(i,o,r,s):null,pos:a}}}class jt{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new jt(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(ug)),this.isEmpty)return n.length?jt.of(n):this;let s=new f_(this,null,-1).goto(0),l=0,c=[],u=new fo;for(;s.value||l=0){let d=n[l++];u.addInner(d.from,d.to,d.value)||c.push(d)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||os.to||o=o&&e<=o+a.length&&a.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Yl.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Yl.from(e).goto(n)}static compare(e,n,r,i,o=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=H1(a,s,r),c=new rl(a,l,o),u=new rl(s,l,o);r.iterGaps((d,f,h)=>X1(c,d,u,f,h,i)),r.empty&&r.length==0&&X1(c,0,u,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let o=e.filter(u=>!u.isEmpty&&n.indexOf(u)<0),a=n.filter(u=>!u.isEmpty&&e.indexOf(u)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=H1(o,a),l=new rl(o,s,0).goto(r),c=new rl(a,s,0).goto(r);for(;;){if(l.to!=c.to||!dg(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>i)return!0;l.next(),c.next()}}static spans(e,n,r,i,o=-1){let a=new rl(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let c=Math.min(a.to,r);if(a.point){let u=a.activeForPoint(a.to),d=a.pointFroms&&(i.span(s,c,a.active,l),l=a.openEnd(c));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new fo;for(let i of e instanceof cg?[e]:n?UW(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return jt.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=jt.empty;i=i.nextLayer)n=new jt(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}jt.empty=new jt([],[],null,-1);function UW(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(ug);e=r}return t}jt.empty.nextLayer=jt.empty;class fo{finishChunk(e){this.chunks.push(new N0(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new fo)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(jt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=jt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function H1(t,e,n){let r=new Map;for(let o of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new f_(a,n,r,o));return i.length==1?i[0]:new Yl(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)up(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)up(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),up(this.heap,0)}}}function up(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class rl{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Yl.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){hu(this.active,e),hu(this.activeTo,e),hu(this.activeRank,e),this.minActive=Z1(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n0;)n++;pu(this.active,n,r),pu(this.activeTo,n,i),pu(this.activeRank,n,o),e&&pu(e,n,this.cursor.from),this.minActive=Z1(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&hu(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function X1(t,e,n,r,i,o){t.goto(e),n.goto(r);let a=r+i,s=r,l=r-e;for(;;){let c=t.to+l-n.to,u=c||t.endSide-n.endSide,d=u<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&dg(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!dg(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;(c||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),s=d,u<=0&&t.next(),u>=0&&n.next()}}function dg(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function Z1(t,e){let n=-1,r=1e9;for(let i=0;i=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=er(t,i)}return r===!0?-1:t.length}const hg="ͼ",q1=typeof Symbol>"u"?"__"+hg:Symbol.for(hg),pg=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),G1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Bo{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,c){let u=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let p=s[h];if(/&/.test(h))o(h.split(/,\s*/).map(m=>a.map(g=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),p,l);else if(p&&typeof p=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),p,u,f)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||f)&&l.push((r&&!d&&!c?a.map(r):a).join(", ")+" {"+u.join(" ")+"}")}for(let a in e)o(i(a),e[a],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=G1[q1]||1;return G1[q1]=e+1,hg+e.toString(36)}static mount(e,n,r){let i=e[pg],o=r&&r.nonce;i?o&&i.setNonce(o):i=new KW(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let Y1=new Map;class KW{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=Y1.get(r);if(o)return e[pg]=o;this.sheet=new i.CSSStyleSheet,Y1.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[pg]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let a=0;a-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),r)for(let c=0;c",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},JW=typeof navigator<"u"&&/Mac/.test(navigator.platform),eF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Kn=0;Kn<10;Kn++)Wo[48+Kn]=Wo[96+Kn]=String(Kn);for(var Kn=1;Kn<=24;Kn++)Wo[Kn+111]="F"+Kn;for(var Kn=65;Kn<=90;Kn++)Wo[Kn]=String.fromCharCode(Kn+32),Ul[Kn]=String.fromCharCode(Kn);for(var dp in Wo)Ul.hasOwnProperty(dp)||(Ul[dp]=Wo[dp]);function tF(t){var e=JW&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||eF&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ul:Wo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function on(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function rF(t,e,n,r,i,o,a,s){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,d=!1;u&&!d;)if(u.nodeType==1){let f,h=u==l.body,p=1,m=1;if(h)f=nF(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let O=u.getBoundingClientRect();({scaleX:p,scaleY:m}=p_(u,O)),f={left:O.left,right:O.left+u.clientWidth*p,top:O.top,bottom:O.top+u.clientHeight*m}}let g=0,v=0;if(i=="nearest")e.top0&&e.bottom>f.bottom+v&&(v=e.bottom-f.bottom+a)):e.bottom>f.bottom&&(v=e.bottom-f.bottom+a,n<0&&e.top-v0&&e.right>f.right+g&&(g=e.right-f.right+o)):e.right>f.right&&(g=e.right-f.right+o,n<0&&e.leftf.bottom||e.leftf.right)&&(e={left:Math.max(e.left,f.left),right:Math.min(e.right,f.right),top:Math.max(e.top,f.top),bottom:Math.min(e.bottom,f.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function iF(t){let e=t.ownerDocument,n,r;for(let i=t.parentNode;i&&!(i==e.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class oF{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?Yi(n):0),r,Math.min(e.focusOffset,r?Yi(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Xa=null;function m_(t){if(t.setActive)return t.setActive();if(Xa)return t.focus(Xa);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Xa==null?{get preventScroll(){return Xa={preventScroll:!0},!0}}:void 0),!Xa){Xa=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function O_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Yi(n)}else if(n.parentNode&&!jd(n))r=wa(n),n=n.parentNode;else return null}}function b_(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&rn)return d.domBoundsAround(e,n,c);if(f>=e&&i==-1&&(i=l,o=c),c>n&&d.dom.parentNode==this.dom){a=l,s=u;break}u=f,c=f+d.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=z0){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function S_(t,e,n,r,i,o,a,s,l){let{children:c}=t,u=c.length?c[e]:null,d=o.length?o[o.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&u&&!a&&!f&&o.length<2&&u.merge(n,i,o.length?d:null,n==0,s,l))){if(r0&&(!a&&o.length&&u.merge(n,u.length,o[0],!1,s,0)?u.breakAfter=o.shift().breakAfter:(n2);var Ze={mac:tS||/Mac/.test(Ar.platform),windows:/Win/.test(Ar.platform),linux:/Linux|X11/.test(Ar.platform),ie:ih,ie_version:C_?gg.documentMode||6:Og?+Og[1]:vg?+vg[1]:0,gecko:eS,gecko_version:eS?+(/Firefox\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,chrome:!!fp,chrome_version:fp?+fp[1]:0,ios:tS,android:/Android\b/.test(Ar.userAgent),safari:$_,webkit_version:lF?+(/\bAppleWebKit\/(\d+)/.exec(Ar.userAgent)||[0,0])[1]:0,tabSize:gg.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const cF=256;class Pi extends ln{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof Pi)||this.length-(n-e)+r.length>cF||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new Pi(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new ur(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return uF(this.dom,e,n)}}class ho extends ln{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(g_(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,a){return r&&(!(r instanceof ho&&r.mark.eq(this.mark))||e&&o<=0||ne&&n.push(r=e&&(i=o),r=l,o++}let a=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new ho(this.mark,n,a)}domAtPos(e){return w_(this,e)}coordsAt(e,n){return __(this,e,n)}}function uF(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?Ze.chrome||Ze.gecko||(e?(i--,a=1):o=0)?0:s.length-1];return Ze.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,c=>c.width)||l),a?Rc(l,a<0):l||null}class Mo extends ln{static create(e,n,r){return new Mo(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Mo.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,a){return r&&(!(r instanceof Mo)||!this.widget.compare(r.widget)||e>0&&o<=0||n0)?ur.before(this.dom):ur.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?i.length-1:0;o=i[s],!(e>0?s==0:s==i.length-1||o.top0?ur.before(this.dom):ur.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ft.empty}get isHidden(){return!0}}Pi.prototype.children=Mo.prototype.children=ws.prototype.children=z0;function w_(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;io&&e0;o--){let a=r[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=i;o0&&e instanceof ho&&i.length&&(r=i[i.length-1])instanceof ho&&r.mark.eq(e.mark)?P_(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function __(t,e,n){let r=null,i=-1,o=null,a=-1;function s(c,u){for(let d=0,f=0;d=u&&(h.children.length?s(h,u-f):(!o||o.isHidden&&(n>0||fF(o,h)))&&(p>u||f==p&&h.getSide()>0)?(o=h,a=u-f):(f-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function yg(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function hF(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Fo(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:a}=T_(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new Fo(e,r,i,n,e.widget||null,!0)}static line(e){return new Mc(e)}static set(e,n=!1){return jt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}lt.none=jt.empty;class Ic extends lt{constructor(e){let{start:n,end:r}=T_(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Ic&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&Dd(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Ic.prototype.point=!1;class Mc extends lt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Mc&&this.spec.class==e.spec.class&&Dd(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Mc.prototype.mapMode=Jn.TrackBefore;Mc.prototype.point=!0;class Fo extends lt{constructor(e,n,r,i,o,a){super(n,r,o,e),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?Jn.TrackBefore:Jn.TrackAfter:Jn.TrackDel}get type(){return this.startSide!=this.endSide?xr.WidgetRange:this.startSide<=0?xr.WidgetBefore:xr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Fo&&pF(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Fo.prototype.point=!0;function T_(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function pF(t,e){return t==e||!!(t&&e&&t.compare(e))}function nd(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Qn extends ln{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,a){if(r){if(!(r instanceof Qn))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),x_(this,e,n,r?r.children.slice():[],o,a),!0}split(e){let n=new Qn;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){Dd(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){P_(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=bg(n,this.attrs||{})),r&&(this.attrs=bg({class:r},this.attrs||{}))}domAtPos(e){return w_(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(g_(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(yg(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&ln.get(i)instanceof ho;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=ln.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Ze.ios||!this.children.some(o=>o instanceof Pi))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof Pi)||/[^ -~]/.test(r.text))return null;let i=$s(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=__(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight=n){if(o instanceof Qn)return o;if(a>n)break}i=a+o.breakAfter}return null}}class lo extends ln{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,a){return r&&(!(r instanceof lo)||!this.widget.compare(r.widget)||e>0&&o<=0||n0}}class Sg extends to{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class kl{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof lo&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Qn),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(mu(new ws(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof lo)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:s,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e),o=Math.min(i,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(mu(new Pi(this.text.slice(this.textOff,this.textOff+o)),n),r),this.atCursorPos=!0,this.textOff+=o,e-=o,r=i<=o?0:n.length}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof Fo){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof Fo)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new lo(r.widget||Ps.block,s,r));else{let l=Mo.create(r.widget||Ps.inline,s,s?0:r.startSide),c=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e0),u=!l.isEditable&&(ei.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!c&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),c&&(d.append(mu(new ws(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(mu(l,i),o),this.atCursorPos=u,this.pendingBuffer=u?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let a=new kl(e,n,r,o);return a.openEnd=jt.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function mu(t,e){for(let n of e)t=new ho(n,[t],t.length);return t}class Ps extends to{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ps.inline=new Ps("span");Ps.block=new Ps("div");var mn=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(mn||(mn={}));const _a=mn.LTR,L0=mn.RTL;function k_(t){let e=[];for(let n=0;n=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.fromn:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function I_(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;m-=3)if(Mi[m+1]==-h){let g=Mi[m+2],v=g&2?i:g&4?g&1?o:i:0;v&&(an[d]=an[Mi[m]]=v),s=m;break}}else{if(Mi.length==189)break;Mi[s++]=d,Mi[s++]=f,Mi[s++]=l}else if((p=an[d])==2||p==1){let m=p==i;l=m?0:1;for(let g=s-3;g>=0;g-=3){let v=Mi[g+2];if(v&2)break;if(m)Mi[g+2]|=2;else{if(v&4)break;Mi[g+2]|=4}}}}}function yF(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:t,s=il;)p==g&&(p=n[--m].from,g=m?n[m-1].to:t),an[--p]=h;l=u}else o=c,l++}}}function Cg(t,e,n,r,i,o,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;ll&&a.push(new Eo(l,m.from,h));let g=m.direction==_a!=!(h%2);$g(t,g?r+1:r,i,m.inner,m.from,m.to,a),l=m.to}p=m.to}else{if(p==n||(u?an[p]!=s:an[p]==s))break;p++}f?Cg(t,l,p,r+1,i,f,a):le;){let u=!0,d=!1;if(!c||l>o[c-1].to){let m=an[l-1];m!=s&&(u=!1,d=m==16)}let f=!u&&s==1?[]:null,h=u?r:r+1,p=l;e:for(;;)if(c&&p==o[c-1].to){if(d)break e;let m=o[--c];if(!u)for(let g=m.from,v=c;;){if(g==e)break e;if(v&&o[v-1].to==g)g=o[--v].from;else{if(an[g-1]==s)break e;break}}if(f)f.push(m);else{m.toan.length;)an[an.length]=256;let r=[],i=e==_a?0:1;return $g(t,i,i,n,0,t.length,r),r}function M_(t){return[new Eo(0,t,0)]}let E_="";function xF(t,e,n,r,i){var o;let a=r.head-t.from,s=Eo.find(e,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[s],c=l.side(i,n);if(a==c){let f=s+=i?1:-1;if(f<0||f>=e.length)return null;l=e[s=f],a=l.side(!i,n),c=l.side(i,n)}let u=er(t.text,a,l.forward(i,n));(ul.to)&&(u=c),E_=t.text.slice(Math.min(a,u),Math.max(a,u));let d=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return d&&u==c&&d.level+(i?0:1)t.some(e=>e)}),B_=qe.define({combine:t=>t.some(e=>e)}),W_=qe.define();class cs{constructor(e,n="nearest",r="nearest",i=5,o=5,a=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new cs(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new cs(Se.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const gu=Ot.define({map:(t,e)=>t.map(e)}),F_=Ot.define();function Nr(t,e,n){let r=t.facet(z_);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const oo=qe.define({combine:t=>t.length?t[0]:!0});let $F=0;const es=qe.define({combine(t){return t.filter((e,n)=>{for(let r=0;r{let l=[];return a&&l.push(Jl.of(c=>{let u=c.plugin(s);return u?a(u):lt.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return Mn.define((r,i)=>new e(r,i),n)}}class hp{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(Nr(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){Nr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){Nr(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const V_=qe.define(),B0=qe.define(),Jl=qe.define(),H_=qe.define(),Ec=qe.define(),X_=qe.define();function rS(t,e){let n=t.state.facet(X_);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return jt.spans(r,e.from,e.to,{point(){},span(o,a,s,l){let c=o-e.from,u=a-e.from,d=i;for(let f=s.length-1;f>=0;f--,l--){let h=s[f].spec.bidiIsolate,p;if(h==null&&(h=CF(e.text,c,u)),l>0&&d.length&&(p=d[d.length-1]).to==c&&p.direction==h)p.to=u,d=p.inner;else{let m={from:c,to:u,direction:h,inner:[]};d.push(m),d=m.inner}}}}),i}const Z_=qe.define();function W0(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(Z_)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:n,top:r,bottom:i}}const hl=qe.define();class di{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new di(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toAu)break;o+=2}if(!l)return r;new di(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class Bd{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Dn.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,a,s,l)=>i.push(new di(o,a,s,l))),this.changedRanges=i}static create(e,n,r){return new Bd(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class iS extends ln{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=lt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Qn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new di(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:c,toA:u})=>uthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!IF(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?PF(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:u}=this.hasComposition;r=new di(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Ze.ie||Ze.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=kF(a,s,e.changes);return r=di.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Ze.chrome||Ze.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?i[a]:null;if(!s)break;let{fromA:l,toA:c,fromB:u,toB:d}=s,f,h,p,m;if(r&&r.range.fromBu){let C=kl.build(this.view.state.doc,u,r.range.fromB,this.decorations,this.dynamicDecorationMap),b=kl.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=C.breakAtStart,p=C.openStart,m=b.openEnd;let x=this.compositionView(r);b.breakAtStart?x.breakAfter=1:b.content.length&&x.merge(x.length,x.length,b.content[0],!1,b.openStart,0)&&(x.breakAfter=b.content[0].breakAfter,b.content.shift()),C.content.length&&x.merge(0,0,C.content[C.content.length-1],!0,0,C.openEnd)&&C.content.pop(),f=C.content.concat(x).concat(b.content)}else({content:f,breakAtStart:h,openStart:p,openEnd:m}=kl.build(this.view.state.doc,u,d,this.decorations,this.dynamicDecorationMap));let{i:g,off:v}=o.findPos(c,1),{i:O,off:S}=o.findPos(l,-1);S_(this,O,S,g,v,f,h,p,m)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(F_)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new Pi(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new ho(i,[n],n.length);let r=new Qn;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=ln.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(oo)||this.dom.tabIndex>-1)&&td(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),c=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Ze.gecko&&s.empty&&!this.hasComposition&&wF(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=c=new ur(d,0),a=!0}let u=this.view.observer.selectionRange;(a||!u.focusNode||(!Tl(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Tl(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{Ze.android&&Ze.chrome&&this.dom.contains(u.focusNode)&&RF(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=Kl(this.view.root);if(d)if(s.empty){if(Ze.gecko){let f=_F(l.node,l.offset);if(f&&f!=3){let h=(f==1?O_:b_)(l.node,l.offset);h&&(l=new ur(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(c.node,c.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,c]=[c,l]),f.setEnd(c.node,c.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new ur(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new ur(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Tl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=Kl(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=Qn.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),c=this.coordsAt(n.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(n.head+n.assoc);r.collapse(u.node,u.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i=0;i--){let o=ln.get(n.childNodes[i]);o instanceof Qn&&(r=o.domAtPos(o.length))}return r?new ur(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=ln.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n=0;a--){let s=this.children[a],l=o-s.breakAfter,c=l-s.length;if(le||s.covers(1))&&(!r||s instanceof Qn&&!(r instanceof Qn&&n>=0)))r=s,i=c;else if(r&&c==e&&l==e&&s instanceof lo&&Math.abs(n)<2){if(s.deco.startSide<0)break;a&&(r=null)}o=c}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Qn))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(r,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}r=l}if(!(i instanceof Pi))return null;let o=er(i.text,r);if(o==r)return null;let a=Pa(i.dom,r,o).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==mn.LTR;for(let c=0,u=0;ui)break;if(c>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let p=d.dom.lastChild,m=p?$s(p):[];if(m.length){let g=m[m.length-1],v=l?g.right-h.left:h.right-g.left;v>s&&(s=v,this.minWidth=o,this.minWidthFrom=c,this.minWidthTo=f)}}}c=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?mn.RTL:mn.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Qn){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=$s(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new y_(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],a=o?o.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(lt.replace({widget:new Sg(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!o)break;r=o.to+1}return lt.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Jl).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(H_).map((o,a)=>{let s=typeof o=="function";return s&&(r=!0),s?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(jt.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=W0(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;rF(this.view.scrollDOM,a,n.head{re.from&&(n=!0)}),n}function MF(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return Se.cursor(e);o==0?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=er(i.text,o,!1):s=er(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let c=er(i.text,a,!1);if(r(i.text.slice(c,a))!=l)break;a=c}for(;st?e.left-t:Math.max(0,t-e.right)}function AF(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function pp(t,e){return t.tope.top+1}function oS(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Pg(t,e,n){let r,i,o,a,s=!1,l,c,u,d;for(let p=t.firstChild;p;p=p.nextSibling){let m=$s(p);for(let g=0;gS||a==S&&o>O)&&(r=p,i=v,o=O,a=S,s=O?e0:gv.bottom&&(!u||u.bottomv.top)&&(c=p,d=v):u&&pp(u,v)?u=aS(u,v.bottom):d&&pp(d,v)&&(d=oS(d,v.top))}}if(u&&u.bottom>=n?(r=l,i=u):d&&d.top<=n&&(r=c,i=d),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return sS(r,f,n);if(s&&r.contentEditable!="false")return Pg(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function sS(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=e&&u.right+1>=e&&d=(u.left+u.right)/2,h=f;if((Ze.chrome||Ze.gecko)&&Pa(t,s).getBoundingClientRect().left==u.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};i=s+(h?1:0),o=d}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function G_(t,e,n,r=-1){var i,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:c}=t.viewState,{x:u,y:d}=e,f=d-s;if(f<0)return 0;if(f>c)return t.state.doc.length;for(let C=t.viewState.heightOracle.textHeight/2,b=!1;l=t.elementAtHeight(f),l.type!=xr.Text;)for(;f=r>0?l.bottom+C:l.top-C,!(f>=0&&f<=c);){if(b)return n?null:0;b=!0,r=-r}d=s+f;let h=l.from;if(ht.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:lS(t,a,l,u,d);let p=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:p,g=m.elementFromPoint(u,d);g&&!t.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!t.contentDOM.contains(g)&&(g=null));let v,O=-1;if(g&&((i=t.docView.nearest(g))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let C=p.caretPositionFromPoint(u,d);C&&({offsetNode:v,offset:O}=C)}else if(p.caretRangeFromPoint){let C=p.caretRangeFromPoint(u,d);C&&({startContainer:v,startOffset:O}=C)}v&&(!t.contentDOM.contains(v)||Ze.safari&&QF(v,O,u)||Ze.chrome&&NF(v,O,u))&&(v=void 0),v&&(O=Math.min(Yi(v),O))}if(!v||!t.docView.dom.contains(v)){let C=Qn.find(t.docView,h);if(!C)return f>l.top+l.height/2?l.to:l.from;({node:v,offset:O}=Pg(C.dom,u,d))}let S=t.docView.nearest(v);if(!S)return null;if(S.isWidget&&((o=S.dom)===null||o===void 0?void 0:o.nodeType)==1){let C=S.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight,l=Math.floor((i-n.top-(t.defaultLineHeight-s)*.5)/s);o+=l*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+fg(a,o,t.state.tabSize)}function Y_(t,e,n){let r,i=t;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(;;){let o=i.nextSibling;if(o){if(o.nodeName=="BR")break;return!1}else{let a=i.parentNode;if(!a||a.nodeName=="DIV")break;i=a}}return Pa(t,r-1,r).getBoundingClientRect().right>n}function QF(t,e,n){return Y_(t,e,n)}function NF(t,e,n){if(e!=0)return Y_(t,e,n);for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():Pa(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function _g(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let o of r.type){if(o.from>e)break;if(!(o.toe)return o;(!i||o.type==xr.Text&&(i.type!=o.type||(n<0?o.frome)))&&(i=o)}}return i||r}return r}function zF(t,e,n,r){let i=_g(t,e.head,e.assoc||-1),o=!r||i.type!=xr.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(s==mn.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return Se.cursor(l,n?-1:1)}return Se.cursor(n?i.to:i.from,n?-1:1)}function cS(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let c=xF(i,o,a,s,n),u=E_;if(!c){if(i.number==(n?t.state.doc.lines:1))return s;u=` +`,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),c=t.visualLineSide(i,!n)}if(l){if(!l(u))return s}else{if(!r)return c;l=r(u)}s=c}}function LF(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let a=r(o);return i==Sn.Space&&(i=a),i==a}}function jF(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return Se.cursor(i,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)a==null&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let h=t.viewState.lineBlockAt(i);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),s=(o<0?h.top:h.bottom)+u}let d=l.left+a,f=r??t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let p=s+(f+h)*o,m=G_(t,{x:d,y:p},!1,o);if(pl.bottom||(o<0?mi)){let g=t.docView.coordsForChar(m),v=!g||p{if(e>o&&ei(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:Se.cursor(r,ro)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=i.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=o+a}}readNode(e){if(e.cmIgnore)return;let n=ln.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(BF(e,r.node,r.offset)?n:0))}}function BF(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=o||a?[]:HF(e),l=new DF(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=XF(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!mg(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),c=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!mg(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),u=e.viewport;if((Ze.ios||Ze.chrome)&&e.state.selection.main.empty&&l!=c&&(u.from>0||u.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=i.from,c=null;(o===8||Ze.android&&e.text.length=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:Ze.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==` + `&&t.lineWrapping&&(r&&(r=Se.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Ft.of([" "])}),n)return F0(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin,s=="select.pointer"&&(r=U_(t.state.facet(Ec).map(l=>l(t)),r))),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function F0(t,e,n,r=-1){if(Ze.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Ze.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&ls(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&ls(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&ls(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=FF(t,e,n));return t.state.facet(L_).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function FF(t,e,n){let r,i=t.state,o=i.selection.main,a=-1;if(e.from==e.to&&e.fromo.to){let l=e.fromd(t)),c,l);e.from==u&&(a=u)}if(a>-1)r={changes:e,selection:Se.cursor(e.from+e.insert.length,-1)};else if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let l=o.frome.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(l+e.insert.sliceString(0,void 0,t.state.lineBreak)+c))}else{let l=i.changes(e),c=n&&n.main.to<=l.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),d,f=n&&q_(t,n.main.head);if(f){let m=e.insert.length-(e.to-e.from);d={from:f.from,to:f.to-m}}else d=t.state.doc.lineAt(o.head);let h=o.to-e.to,p=o.to-o.from;r=i.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:l,range:c||m.map(l)};let g=m.to-h,v=g-u.length;if(m.to-m.from!=p||t.state.sliceDoc(v,g)!=u||m.to>=d.from&&m.from<=d.to)return{range:m};let O=i.changes({from:v,to:g,insert:e.insert}),S=m.to-o.to;return{changes:O,range:c?Se.range(Math.max(0,c.anchor+S),Math.max(0,c.head+S)):m.map(O)}})}else r={changes:l,selection:c&&i.selection.replaceRange(c)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function VF(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}if(a=a?o-n:0;o-=l,s=o+(s-a),a=o}else if(s=s?o-n:0;o-=l,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}function HF(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new uS(n,r)),(i!=n||o!=r)&&e.push(new uS(i,o))),e}function XF(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?Se.single(n+e,r+e):null}class ZF{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Ze.safari&&e.contentDOM.addEventListener("input",()=>null),Ze.gecko&&cV(e.contentDOM.ownerDocument)}handleEvent(e){!tV(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=qF(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&eT.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Ze.android&&Ze.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Ze.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=J_.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||GF.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:Ze.safari&&!Ze.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function dS(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){Nr(n.state,i)}}}function qF(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,o=i&&i.plugin.domEventHandlers,a=i&&i.plugin.domEventObservers;if(o)for(let s in o){let l=o[s];l&&n(s).handlers.push(dS(r.value,l))}if(a)for(let s in a){let l=a[s];l&&n(s).observers.push(dS(r.value,l))}}for(let r in _i)n(r).handlers.push(_i[r]);for(let r in hi)n(r).observers.push(hi[r]);return e}const J_=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],GF="dthko",eT=[16,17,18,20,91,92,224,225],vu=6;function Ou(t){return Math.max(0,t)*.7+8}function YF(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class UF{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=iF(e.contentDOM),this.atoms=e.state.facet(Ec).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Qt.allowMultipleSelections)&&KF(e,n),this.dragging=eV(e,n)&&rT(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&YF(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=W0(this.view);e.clientX-l.left<=i+vu?n=-Ou(i-e.clientX):e.clientX+l.right>=a-vu&&(n=Ou(e.clientX-a)),e.clientY-l.top<=o+vu?r=-Ou(o-e.clientY):e.clientY+l.bottom>=s-vu&&(r=Ou(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=U_(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function KF(t,e){let n=t.state.facet(A_);return n.length?n[0](e):Ze.mac?e.metaKey:e.ctrlKey}function JF(t,e){let n=t.state.facet(Q_);return n.length?n[0](e):Ze.mac?!e.altKey:!e.ctrlKey}function eV(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=Kl(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function tV(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=ln.get(n))&&r.ignoreEvent(e))return!1;return!0}const _i=Object.create(null),hi=Object.create(null),tT=Ze.ie&&Ze.ie_version<15||Ze.ios&&Ze.webkit_version<604;function nV(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),nT(t,n.value)},50)}function oh(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function nT(t,e){e=oh(t.state,j0,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(Tg!=null&&n.selection.ranges.every(l=>l.empty)&&Tg==o.toString()){let l=-1;r=n.changeByRange(c=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let d=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:u.from,insert:d},range:Se.cursor(c.from+d.length)}})}else a?r=n.changeByRange(l=>{let c=o.line(i++);return{changes:{from:l.from,to:l.to,insert:c.text},range:Se.cursor(l.from+c.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}hi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};_i.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);hi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};hi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};_i.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(N_))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=oV(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new UF(t,e,n,r)),r&&t.observer.ignore(()=>{m_(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function fS(t,e,n,r){if(r==1)return Se.cursor(e,n);if(r==2)return MF(t.state,e,n);{let i=Qn.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return se>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function rV(t,e,n,r){let i=Qn.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&hS(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&hS(n,r,s)?1:a&&a.bottom>=r?-1:1}function pS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:rV(t,n,e.clientX,e.clientY)}}const iV=Ze.ie&&Ze.ie_version<=11;let mS=null,gS=0,vS=0;function rT(t){if(!iV)return t.detail;let e=mS,n=vS;return mS=t,vS=Date.now(),gS=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(gS+1)%3:1}function oV(t,e){let n=pS(t,e),r=rT(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=pS(t,o),c,u=fS(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=fS(t,n.pos,n.bias,r),f=Math.min(d.from,u.from),h=Math.max(d.to,u.to);u=f1&&(c=aV(i,l.pos))?c:s?i.addRange(u):Se.create([u])}}}function aV(t,e){for(let n=0;n=e)return Se.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}_i.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=Se.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",oh(t.state,D0,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};_i.dragend=t=>(t.inputState.draggedContent=null,!1);function OS(t,e,n,r){if(n=oh(t.state,j0,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&JF(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}_i.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&OS(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return OS(t,e,r,!0),!0}return!1};_i.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=tT?null:e.clipboardData;return n?(nT(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(nV(t),!1)};function sV(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function lV(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:oh(t,D0,e.join(t.lineBreak)),ranges:n,linewise:r}}let Tg=null;_i.copy=_i.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=lV(t.state);if(!n&&!i)return!1;Tg=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=tT?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(sV(t,n),!1)};const iT=Ji.define();function oT(t,e){let n=[];for(let r of t.facet(j_)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:iT.of(!0)}):null}function aT(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=oT(t.state,e);n?t.dispatch(n):t.update([])}},10)}hi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),aT(t)};hi.blur=t=>{t.observer.clearSelectionRange(),aT(t)};hi.compositionstart=hi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};hi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Ze.chrome&&Ze.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};hi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};_i.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),c=t.posAtDOM(s.endContainer,s.endOffset);return F0(t,{from:l,to:c,insert:t.state.toText(o)},null),!0}}let i;if(Ze.chrome&&Ze.android&&(i=J_.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Ze.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Ze.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>hi.compositionend(t,e),20),!1};const bS=new Set;function cV(t){bS.has(t)||(bS.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const yS=["pre-wrap","normal","pre-line","break-spaces"];let _s=!1;function SS(){_s=!1}class uV{constructor(e){this.lineWrapping=e,this.doc=Ft.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return yS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let c=0;c0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>rd&&(_s=!0),this.height=e)}replace(e,n,r){return Cr.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:c,fromB:u,toB:d}=i[s],f=o.lineAt(l,hn.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=c?f:o.lineAt(c,hn.ByPosNoHeight,r,0,0);for(d+=h.to-c,c=h.to;s>0&&f.from<=i[s-1].toA;)l=i[s-1].fromA,u=i[s-1].fromB,s--,lo*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Gr extends sT{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new ji(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Gr||i instanceof Un&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Un?i=new Gr(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Cr.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Un extends Cr{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let c=i+(e0){let o=r[r.length-1];o instanceof Un?r[r.length-1]=new Un(o.length+i):r.push(null,new Un(i-1))}if(e>0){let o=r[0];o instanceof Un?r[0]=new Un(e+o.length):r.unshift(new Un(e-1),null)}return Cr.of(r)}decomposeLeft(e,n){n.push(new Un(e-1),null)}decomposeRight(e,n){n.push(null,new Un(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new Un(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let u=e.doc.lineAt(s).length;a.length&&a.push(null);let d=i.heights[i.index++];l==-1?l=d:Math.abs(d-l)>=rd&&(l=-2);let f=new Gr(u,d);f.outdated=!1,a.push(f),s+=u+1}s<=o&&a.push(null,new Un(o-s).updateHeight(e,s));let c=Cr.of(a);return(l<0||Math.abs(c.height-this.height)>=rd||Math.abs(l-this.heightMetrics(e,n).perLine)>=rd)&&(_s=!0),Wd(this,c)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class fV extends Cr{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return es))return c;let u=n==hn.ByPosNoHeight?hn.ByPosNoHeight:hn.ByPos;return l?c.join(this.right.lineAt(s,u,r,a,s)):this.left.lineAt(s,u,r,i,o).join(c)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,r,s,l,a);else{let c=this.lineAt(l,hn.ByPos,r,i,o);e=e&&c.from<=n&&a(c),n>c.to&&this.right.forEachLine(c.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&xS(o,a-1),n=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e2*n.size||n.size>2*e.size?Cr.of(this.break?[e,null,n]:[e,n]):(this.left=Wd(this.left,e),this.right=Wd(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function xS(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Un&&(r=t[e+1])instanceof Un&&t.splice(e-1,3,new Un(n.length+1+r.length))}const hV=5;class V0{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Gr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Gr(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e=hV)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Gr(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Un(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Gr)return e;let n=new Gr(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Gr)&&!this.isCovered?this.nodes.push(new Gr(0,-1)):(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&d.overflow!="visible"){let f=u.getBoundingClientRect();o=Math.max(o,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=Math.min(c==t.parentNode?i.innerHeight:l,f.bottom)}c=d.position=="absolute"||d.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function vV(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left0&&e.top0}function OV(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class gp{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new uV(n),this.stateDeco=e.facet(Jl).filter(r=>typeof r!="function"),this.heightMap=Cr.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle.setDoc(e.doc),[new di(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=lt.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new bu(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?$S:new H0(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(ml(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(Jl).filter(u=>typeof u!="function");let i=e.changedRanges,o=di.extendWithRanges(i,pV(r,this.stateDeco,e?e.changes:Dn.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);SS(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||_s)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(B_)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?mn.RTL:mn.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let c=0,u=0;if(s.width&&s.height){let{scaleX:C,scaleY:b}=p_(n,s);(C>.005&&Math.abs(this.scaleX-C)>.005||b>.005&&Math.abs(this.scaleY-b)>.005)&&(this.scaleX=C,this.scaleY=b,c|=16,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=v_(e.scrollDOM);let p=(this.printing?OV:gV)(n,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget&&!vV(e.dom))return 0;let O=s.width;if((this.contentDOMWidth!=O||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),l){let C=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(C)&&(a=!0),a||i.lineWrapping&&Math.abs(O-this.contentDOMWidth)>i.charWidth){let{lineHeight:b,charWidth:x,textHeight:$}=e.docView.measureTextSize();a=b>0&&i.refresh(o,b,x,$,Math.max(5,O/x),C),a&&(e.docView.minWidth=0,c|=16)}m>0&&g>0?u=Math.max(m,g):m<0&&g<0&&(u=Math.min(m,g)),SS();for(let b of this.viewports){let x=b.from==this.viewport.from?C:e.docView.measureVisibleLineHeights(b);this.heightMap=(a?Cr.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle,[new di(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new dV(b.from,x))}_s&&(c|=2)}let S=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return S&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(c&2||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new bu(i.lineAt(a-r*1e3,hn.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,hn.ByHeight,o,0,0).to);if(n){let{head:c}=n.range;if(cl.to){let u=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(c,hn.ByPos,o,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-u/2:n.y=="start"||n.y=="nearest"&&c=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o>1,a=i<<1;if(this.defaultTextDirection!=mn.LTR&&!r)return[];let s=[],l=(u,d,f,h)=>{if(d-uu&&vv.from>=f.from&&v.to<=f.to&&Math.abs(v.from-u)v.fromO));if(!g){if(dS.from<=d&&S.to>=d)){let S=n.moveToLineBoundary(Se.cursor(d),!1,!0).head;S>u&&(d=S)}let v=this.gapSize(f,u,d,h),O=r||v<2e6?v:2e6;g=new gp(u,d,v,O)}s.push(g)},c=u=>{if(u.length2e6)for(let x of e)x.from>=u.from&&x.fromu.from&&l(u.from,h,u,d),pn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];jt.spans(n,this.viewport.from,this.viewport.to,{span(o,a){r.push({from:o,to:a})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let o=0;o=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||ml(this.heightMap.lineAt(e,hn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||ml(this.heightMap.lineAt(this.scaler.fromDOM(e),hn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return ml(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class bu{constructor(e,n){this.from=e,this.to=n}}function yV(t,e,n){let r=[],i=t,o=0;return jt.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function Su(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function SV(t,e){for(let n of t)if(e(n))return n}const $S={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class H0{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let c=n.lineAt(s,hn.ByPos,e,0,0).top,u=n.lineAt(l,hn.ByPos,e,0,0).bottom;return i+=u-c,{from:s,to:l,top:c,bottom:u,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=nn.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function ml(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ji(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>ml(i,e)):t._content)}const xu=qe.define({combine:t=>t.join(" ")}),kg=qe.define({combine:t=>t.indexOf(!0)>-1}),Rg=Bo.newName(),lT=Bo.newName(),cT=Bo.newName(),uT={"&light":"."+lT,"&dark":"."+cT};function Ig(t,e,n){return new Bo(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const xV=Ig("."+Rg,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uT),CV={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},vp=Ze.ie&&Ze.ie_version<=11;class $V{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new oF,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Ze.ie&&Ze.ie_version<=11||Ze.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Ze.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Ze.chrome&&Ze.chrome_version<126)&&(this.editContext=new PV(e),e.state.facet(oo)&&(e.contentDOM.editContext=this.editContext.editContext)),vp&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(oo)?r.root.activeElement!=this.dom:!td(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Ze.ie&&Ze.ie_version<=11||Ze.android&&Ze.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Tl(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=Kl(e.root);if(!n)return!1;let r=Ze.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&wV(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=td(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&ls(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);a&&(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&td(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new WF(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=K_(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=wS(n,e.previousSibling||e.target.previousSibling,-1),i=wS(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(oo)!=e.state.facet(oo)&&(e.view.contentDOM.editContext=e.state.facet(oo)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function wS(t,e,n){for(;e;){let r=ln.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function PS(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Tl(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function wV(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return PS(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?PS(t,n):null}class PV{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:o,head:a}=i,s=this.toEditorPos(r.updateRangeStart),l=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:s,drifted:!1});let c={from:s,to:l,insert:Ft.of(r.text.split(` +`))};if(c.from==this.from&&othis.to&&(c.to=o),c.from==c.to&&!c.insert.length){let u=Se.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));u.main.eq(i)||e.dispatch({selection:u,userEvent:"select"});return}if((Ze.mac||Ze.android)&&c.from==a-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(c={from:s,to:l,insert:Ft.of([r.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let u=this.to-this.from+(c.to-c.from+c.insert.length);F0(e,c,Se.single(this.toEditorPos(r.selectionStart,u),this.toEditorPos(r.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(s)){let l=this.toEditorPos(o.rangeStart),c=this.toEditorPos(o.rangeEnd);if(l{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Kl(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,c)=>{if(r)return;let u=c.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(c)){i=this.pendingContextChange=null,n+=u,this.to+=u;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=u,this.to+=u;else if(othis.to||this.to-this.from+c.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),c.toString()),this.to+=u}n+=u}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Be{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||aF(e.parent)||document,this.viewState=new CS(e.state||Qt.create(e)),e.scrollTo&&e.scrollTo.is(gu)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(es).map(i=>new hp(i));for(let i of this.plugins)i.update(this);this.observer=new $V(this),this.inputState=new ZF(this),this.inputState.ensureHandlers(this.plugins),this.docView=new iS(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof zn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(iT))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=oT(o,a),l||(s=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(Qt.phrases)!=this.state.facet(Qt.phrases))return this.setState(o);i=Bd.create(this,o,e),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new cs(h.empty?h:Se.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(gu)&&(d=h.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Fd.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(hl)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(xu)!=i.state.facet(xu)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet(wg))try{f(i)}catch(h){Nr(this.state,h,"update listener")}(l||u)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!K_(this,u)&&c.force&&ls(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new CS(e),this.plugins=e.facet(es).map(r=>new hp(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new iS(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(es),r=e.state.facet(es);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new hp(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(v_(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];l&4||([this.measureRequests,c]=[c,this.measureRequests]);let u=c.map(h=>{try{return h.read(this)}catch(p){return Nr(this.state,p),_S}}),d=Bd.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h1||p<-1){i=i+p,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(wg))s(n)}get themeClasses(){return Rg+" "+(this.state.facet(kg)?cT:lT)+" "+this.state.facet(xu)}updateAttrs(){let e=TS(this,V_,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(oo)?"true":"false",class:"cm-content",style:`${Ze.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),TS(this,B0,n);let r=this.observer.ignore(()=>{let i=yg(this.contentDOM,this.contentAttrs,n),o=yg(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(Be.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(hl);let e=this.state.facet(Be.cspNonce);Bo.mount(this.root,this.styleModules.concat(xV).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;nr.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return mp(this,e,cS(this,e,n,r))}moveByGroup(e,n){return mp(this,e,cS(this,e,n,r=>LF(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return Se.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return zF(this,e,n,r)}moveVertically(e,n,r){return mp(this,e,jF(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),G_(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Eo.find(o,e-i.from,-1,n)];return Rc(r,a.dir==mn.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(D_)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>_V)return M_(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||I_(o.isolates,r=rS(this,e))))return o.order;r||(r=rS(this,e));let i=SF(e.text,n,r);return this.bidiCache.push(new Fd(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Ze.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{m_(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return gu.of(new cs(typeof e=="number"?Se.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return gu.of(new cs(Se.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Mn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Mn.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Bo.newName(),i=[xu.of(r),hl.of(Ig(`.${r}`,e))];return n&&n.dark&&i.push(kg.of(!0)),i}static baseTheme(e){return Zo.lowest(hl.of(Ig("."+Rg,e,uT)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&ln.get(r)||ln.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}Be.styleModule=hl;Be.inputHandler=L_;Be.clipboardInputFilter=j0;Be.clipboardOutputFilter=D0;Be.scrollHandler=W_;Be.focusChangeEffect=j_;Be.perLineTextDirection=D_;Be.exceptionSink=z_;Be.updateListener=wg;Be.editable=oo;Be.mouseSelectionStyle=N_;Be.dragMovesSelection=Q_;Be.clickAddsSelectionRange=A_;Be.decorations=Jl;Be.outerDecorations=H_;Be.atomicRanges=Ec;Be.bidiIsolatedRanges=X_;Be.scrollMargins=Z_;Be.darkTheme=kg;Be.cspNonce=qe.define({combine:t=>t.length?t[0]:""});Be.contentAttributes=B0;Be.editorAttributes=V_;Be.lineWrapping=Be.contentAttributes.of({class:"cm-lineWrapping"});Be.announce=Ot.define();const _V=4096,_S={};class Fd{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:mn.LTR;for(let o=Math.max(0,e.length-10);o=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&bg(a,n)}return n}const TV=Ze.mac?"mac":Ze.windows?"win":Ze.linux?"linux":"key";function kV(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;lr.concat(i),[]))),n}function IV(t,e,n){return fT(dT(t.state),e,t,n)}let _o=null;const MV=4e3;function EV(t,e=TV){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,c,u)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),p=s.split(/ (?!$)/).map(v=>kV(v,e));for(let v=1;v{let C=_o={view:S,prefix:O,scope:a};return setTimeout(()=>{_o==C&&(_o=null)},MV),!0}]})}let m=p.join(" ");i(m,!1);let g=h[m]||(h[m]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&g.run.push(l),c&&(g.preventDefault=!0),u&&(g.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let c of s){let u=n[c]||(n[c]=Object.create(null));u._any||(u._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=a;for(let f in u)u[f].run.push(h=>d(h,Mg))}let l=a[e]||a.key;if(l)for(let c of s)o(c,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(c,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let Mg=null;function fT(t,e,n,r){Mg=e;let i=tF(e),o=Er(i,0),a=Li(o)==i.length&&i!=" ",s="",l=!1,c=!1,u=!1;_o&&_o.view==n&&_o.scope==r&&(s=_o.prefix+" ",eT.indexOf(e.keyCode)<0&&(c=!0,_o=null));let d=new Set,f=g=>{if(g){for(let v of g.run)if(!d.has(v)&&(d.add(v),v(n)))return g.stopPropagation&&(u=!0),!0;g.preventDefault&&(g.stopPropagation&&(u=!0),c=!0)}return!1},h=t[r],p,m;return h&&(f(h[s+Cu(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Ze.windows&&e.ctrlKey&&e.altKey)&&!(Ze.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(p=Wo[e.keyCode])&&p!=i?(f(h[s+Cu(p,e,!0)])||e.shiftKey&&(m=Ul[e.keyCode])!=i&&m!=p&&f(h[s+Cu(m,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+Cu(i,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),c&&(l=!0),l&&u&&e.stopPropagation(),Mg=null,l}class Qc{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=hT(e);return[new Qc(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return AV(e,n,r)}}function hT(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==mn.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function RS(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function AV(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==mn.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=hT(t),c=a.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),h=_g(t,r,1),p=_g(t,i,-1),m=h.type==xr.Text?h:null,g=p.type==xr.Text?p:null;if(m&&(t.lineWrapping||h.widgetLineBreaks)&&(m=RS(t,r,1,m)),g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=RS(t,i,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return O(S(n.from,n.to,m));{let b=m?S(n.from,null,m):C(h,!1),x=g?S(null,n.to,g):C(p,!0),$=[];return(m||h).to<(g||p).from-(m&&g?1:0)||h.widgetLineBreaks>1&&b.bottom+t.defaultLineHeight/2k&&I.from=E)break;z>Q&&T(Math.max(L,Q),b==null&&L<=k,Math.min(z,E),x==null&&z>=R,N.dir)}if(Q=A.to+1,Q>=E)break}return _.length==0&&T(k,b==null,R,x==null,t.textDirection),{top:w,bottom:P,horizontal:_}}function C(b,x){let $=s.top+(x?b.top:b.bottom);return{top:$,bottom:$,horizontal:[]}}}function QV(t,e){return t.constructor==e.constructor&&t.eq(e)}class NV{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(id)!=e.state.facet(id)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(id);for(;n!QV(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e,Ze.ios&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const id=qe.define();function pT(t){return[Mn.define(e=>new NV(e,t)),id.of(t)]}const ec=qe.define({combine(t){return eo(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function zV(t={}){return[ec.of(t),LV,jV,DV,B_.of(!0)]}function mT(t){return t.startState.facet(ec)!=t.state.facet(ec)}const LV=pT({above:!0,markers(t){let{state:e}=t,n=e.facet(ec),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty||n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:Se.cursor(i.head,i.head>i.anchor?-1:1);for(let l of Qc.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=mT(t);return n&&IS(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){IS(e.state,t)},class:"cm-cursorLayer"});function IS(t,e){e.style.animationDuration=t.facet(ec).cursorBlinkRate+"ms"}const jV=pT({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Qc.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||mT(t)},class:"cm-selectionLayer"}),DV=Zo.highest(Be.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),gT=Ot.define({map(t,e){return t==null?null:e.mapPos(t)}}),gl=qn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(gT)?r.value:n,t)}}),BV=Mn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(gl);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(gl)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(gl),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(gl)!=t&&this.view.dispatch({effects:gT.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function WV(){return[gl,BV]}function MS(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function FV(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class VV{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,c,u)=>i(u,c,c+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,c,u)=>{let d=r(s,l,c);d&&u(c,c+s[0].length,d)};else if(r)this.addMatch=(s,l,c,u)=>u(c,c+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new fo,r=n.add.bind(n);for(let{from:i,to:o}of FV(e,this.maxLength))MS(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>=e.view.viewport.from&&s<=e.view.viewport.to&&(r=Math.min(s,r),i=Math.max(l,i))}),e.viewportMoved||i-r>1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>=a){let l=e.state.doc.lineAt(a),c=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){u=a;break}for(;sf.push(v.range(m,g));if(l==c)for(this.regexp.lastIndex=u-l.from;(h=this.regexp.exec(l.text))&&h.indexthis.addMatch(g,e,m,p));n=n.update({filterFrom:u,filterTo:d,filter:(m,g)=>md,add:f})}}return n}}const Eg=/x/.unicode!=null?"gu":"g",HV=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,Eg),XV={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Op=null;function ZV(){var t;if(Op==null&&typeof document<"u"&&document.body){let e=document.body.style;Op=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Op||!1}const od=qe.define({combine(t){let e=eo(t,{render:null,specialChars:HV,addSpecialChars:null});return(e.replaceTabs=!ZV())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Eg)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Eg)),e}});function qV(t={}){return[od.of(t),GV()]}let ES=null;function GV(){return ES||(ES=Mn.fromClass(class{constructor(t){this.view=t,this.decorations=lt.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(od)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new VV({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=Er(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=Vs(a.text,s,r-a.from);return lt.replace({widget:new JV((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=lt.replace({widget:new KV(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(od);t.startState.facet(od)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const YV="•";function UV(t){return t>=32?YV:t==10?"␤":String.fromCharCode(9216+t)}class KV extends to{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=UV(this.code),r=e.state.phrase("Control character")+" "+(XV[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class JV extends to{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function eH(){return nH}const tH=lt.line({class:"cm-activeLine"}),nH=Mn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(tH.range(i.from)),e=i.from)}return lt.set(n)}},{decorations:t=>t.decorations});class rH extends to{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?$s(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Rc(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function iH(t){let e=Mn.fromClass(class{constructor(n){this.view=n,this.placeholder=t?lt.set([lt.widget({widget:new rH(t),side:1}).range(0)]):lt.none}get decorations(){return this.view.state.doc.length?lt.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,Be.contentAttributes.of({"aria-placeholder":t})]:e}const Ag=2e3;function oH(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>Ag||n.off>Ag||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let c=t.doc.line(l);c.length<=s&&o.push(Se.range(c.from+a,c.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let c=t.doc.line(l),u=fg(c.text,a,t.tabSize,!0);if(u<0)o.push(Se.cursor(c.to));else{let d=fg(c.text,s,t.tabSize);o.push(Se.range(c.from+u,c.from+d))}}}return o}function aH(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function AS(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>Ag?-1:i==r.length?aH(t,e.clientX):Vs(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function sH(t,e){let n=AS(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=AS(t,i);if(!s)return r;let l=oH(t.state,n,s);return l.length?a?Se.create(l.concat(r.ranges)):Se.create(l):r}}:null}function lH(t){let e=n=>n.altKey&&n.button==0;return Be.mouseSelectionStyle.of((n,r)=>e(r)?sH(n,r):null)}const cH={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},uH={style:"cursor: crosshair"};function dH(t={}){let[e,n]=cH[t.key||"Alt"],r=Mn.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,Be.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?uH:null})]}const il="-10000px";class vT{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;ln[c]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function fH(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const bp=qe.define({combine:t=>{var e,n,r;return{position:Ze.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||fH}}}),QS=new WeakMap,X0=Mn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(bp);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new vT(t,Z0,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(bp);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=il,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:o}=this.manager.tooltipViews[0];if(Ze.gecko)n=o.offsetParent!=this.container.ownerDocument.body;else if(o.style.top==il&&o.style.left=="0px"){let a=o.getBoundingClientRect();n=Math.abs(a.top+1e4)>1||Math.abs(a.left)>1}}if(n||this.position=="absolute")if(this.parent){let o=this.parent.getBoundingClientRect();o.width&&o.height&&(t=o.width/this.parent.offsetWidth,e=o.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=W0(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((o,a)=>{let s=this.manager.tooltipViews[a];return s.getCoords?s.getCoords(o.pos):this.view.coordsAtPos(o.pos)}),size:this.manager.tooltipViews.map(({dom:o})=>o.getBoundingClientRect()),space:this.view.state.facet(bp).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1)){u.style.top=il;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,p=h?7:0,m=f.right-f.left,g=(e=QS.get(c))!==null&&e!==void 0?e:f.bottom-f.top,v=c.offset||pH,O=this.view.textDirection==mn.LTR,S=f.width>r.right-r.left?O?r.left:r.right-f.width:O?Math.max(r.left,Math.min(d.left-(h?14:0)+v.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(h?14:0)-v.x),r.right-m),C=this.above[s];!l.strictSide&&(C?d.top-g-p-v.yr.bottom)&&C==r.bottom-d.bottom>d.top-r.top&&(C=this.above[s]=!C);let b=(C?d.top-r.top:r.bottom-d.bottom)-p;if(bS&&w.topx&&(x=C?w.top-g-2-p:w.bottom+p+2);if(this.position=="absolute"?(u.style.top=(x-t.parent.top)/o+"px",NS(u,(S-t.parent.left)/i)):(u.style.top=x/o+"px",NS(u,S/i)),h){let w=d.left+(O?v.x:-v.x)-(S+14-7);h.style.left=w/i+"px"}c.overlap!==!0&&a.push({left:S,top:x,right:$,bottom:x+g}),u.classList.toggle("cm-tooltip-above",C),u.classList.toggle("cm-tooltip-below",!C),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=il}},{eventObservers:{scroll(){this.maybeMeasure()}}});function NS(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const hH=Be.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),pH={x:0,y:0},Z0=qe.define({enables:[X0,hH]}),Vd=qe.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class ah{static create(e){return new ah(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new vT(e,Vd,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const mH=Z0.compute([Vd],t=>{let e=t.facet(Vd);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:ah.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class gH{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;es.bottom||n.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(u=>u.from<=i&&u.to>=i),c=l&&l.dir==mn.RTL?-1:1;o=n.x{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>Nr(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(X0),n=e?e.manager.tooltips.findIndex(r=>r.create==ah.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!vH(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!OH(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const $u=4;function vH(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-$u&&e.clientX<=r+$u&&e.clientY>=i-$u&&e.clientY<=o+$u}function OH(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.righti||Math.min(a.bottom,s)=e&&l<=n}function bH(t,e={}){let n=Ot.define(),r=qn.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,Jn.TrackDel);if(l!=null){let c=Object.assign(Object.create(null),s);c.pos=l,c.end!=null&&(c.end=o.changes.mapPos(c.end)),a.push(c)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(yH)&&(i=[]);return i},provide:i=>Vd.from(i)});return{active:r,extension:[r,Mn.define(i=>new gH(i,t,r,n,e.hoverTime||300)),mH]}}function OT(t,e){let n=t.plugin(X0);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const yH=Ot.define(),zS=qe.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function tc(t,e){let n=t.plugin(bT),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const bT=Mn.fromClass(class{constructor(t){this.input=t.state.facet(nc),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(zS);this.top=new wu(t,!0,e.topContainer),this.bottom=new wu(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(zS);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new wu(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new wu(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(nc);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let c=this.specs.indexOf(l),u;c<0?(u=l(t.view),s.push(u)):(u=this.panels[c],u.update&&u.update(t)),i.push(u),(u.top?o:a).push(u)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Be.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class wu{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=LS(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=LS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function LS(t){let e=t.nextSibling;return t.remove(),e}const nc=qe.define({enables:bT});class po extends $a{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}po.prototype.elementClass="";po.prototype.toDOM=void 0;po.prototype.mapMode=Jn.TrackBefore;po.prototype.startSide=po.prototype.endSide=-1;po.prototype.point=!0;const ad=qe.define(),SH=qe.define(),xH={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>jt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Il=qe.define();function CH(t){return[yT(),Il.of({...xH,...t})]}const jS=qe.define({combine:t=>t.some(e=>e)});function yT(t){return[$H]}const $H=Mn.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Il).map(e=>new BS(t,e)),this.fixed=!t.state.facet(jS);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(jS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=jt.iter(this.view.state.facet(ad),this.view.viewport.from),r=[],i=this.gutters.map(o=>new wH(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==xr.Text&&a){Qg(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==xr.Text){Qg(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Il),n=t.state.facet(Il),r=t.docChanged||t.heightChanged||t.viewportChanged||!jt.eq(t.startState.facet(ad),t.state.facet(ad),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new BS(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)o.config.side=="after"?this.getDOMAfter().appendChild(o.dom):this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Be.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==mn.LTR?{left:r,right:i}:{right:r,left:i}})});function DS(t){return Array.isArray(t)?t:[t]}function Qg(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class wH{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=jt.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new ST(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Qg(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(SH)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class BS{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=DS(n.markers(e)),n.initialSpacer&&(this.spacer=new ST(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=DS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!jt.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class ST{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),PH(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=oo(s,l,c)||a(s,l,c):a}return r}})}});class yp extends po{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Sp(t,e){return t.state.facet(ts).formatNumber(e,t.state)}const kH=Il.compute([ts],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(_H)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new yp(Sp(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(TH)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(ts)!=e.state.facet(ts),initialSpacer(e){return new yp(Sp(e,WS(e.state.doc.lines)))},updateSpacer(e,n){let r=Sp(n.view,WS(n.view.state.doc.lines));return r==e.number?e:new yp(r)},domEventHandlers:t.facet(ts).domEventHandlers,side:"before"}));function RH(t={}){return[ts.of(t),yT(),kH]}function WS(t){let e=9;for(;e{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(IH.range(i)))}return jt.of(e)});function EH(){return MH}const xT=1024;let AH=0;class xp{constructor(e,n){this.from=e,this.to=n}}class Tt{constructor(e={}){this.id=AH++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=jr.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Tt.closedBy=new Tt({deserialize:t=>t.split(" ")});Tt.openedBy=new Tt({deserialize:t=>t.split(" ")});Tt.group=new Tt({deserialize:t=>t.split(" ")});Tt.isolate=new Tt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Tt.contextHash=new Tt({perNode:!0});Tt.lookAhead=new Tt({perNode:!0});Tt.mounted=new Tt({perNode:!0});class Hd{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Tt.mounted.id]}}const QH=Object.create(null);class jr{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):QH,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new jr(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Tt.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Tt.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}jr.none=new jr("",Object.create(null),0,8);class q0{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|Bn.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:U0(jr.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Ln(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Ln(jr.none,n,r,i)))}static build(e){return jH(e)}}Ln.empty=new Ln(jr.none,[],[],0);class G0{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new G0(this.buffer,this.index)}}class Vo{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return jr.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function rc(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=c;e+=n){let u=s[e],d=l[e]+a.from;if(CT(i,r,d,d+u.length)){if(u instanceof Vo){if(o&Bn.ExcludeBuffers)continue;let f=u.findChild(0,u.buffer.length,n,r-d,i);if(f>-1)return new Bi(new NH(a,u,e,d),null,f)}else if(o&Bn.IncludeAnonymous||!u.type.isAnonymous||Y0(u)){let f;if(!(o&Bn.IgnoreMounts)&&(f=Hd.get(u))&&!f.overlay)return new Lr(f.tree,d,e,a);let h=new Lr(u,d,e,a);return o&Bn.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&Bn.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Bn.IgnoreOverlays)&&(i=Hd.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a=o:s>o))return new Lr(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function VS(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function Ng(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class NH{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class Bi extends $T{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new Bi(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Bn.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new Bi(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Bi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Bi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new Ln(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function wT(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||a.to=e){let s=new Lr(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(rc(s,e,n,!1))}}return i?wT(i):r}class zg{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Lr)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Lr?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Bn.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Bn.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Bn.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&Bn.IncludeAnonymous||s instanceof Vo||!s.type.isAnonymous||Y0(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}for(let i=r;i=0;o--){if(o<0)return Ng(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function Y0(t){return t.children.some(e=>e instanceof Vo||!e.type.isAnonymous||Y0(e))}function jH(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=xT,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new G0(n,n.length):n,l=r.types,c=0,u=0;function d(b,x,$,w,P,_){let{id:T,start:k,end:R,size:I}=s,Q=u,E=c;for(;I<0;)if(s.next(),I==-1){let V=o[T];$.push(V),w.push(k-b);return}else if(I==-3){c=T;return}else if(I==-4){u=T;return}else throw new RangeError(`Unrecognized record size: ${I}`);let A=l[T],N,L,z=k-b;if(R-k<=i&&(L=g(s.pos-x,P))){let V=new Uint16Array(L.size-L.skip),X=s.pos-L.size,F=V.length;for(;s.pos>X;)F=v(L.start,V,F);N=new Vo(V,R-L.start,r),z=L.start-b}else{let V=s.pos-I;s.next();let X=[],F=[],H=T>=a?T:-1,B=0,G=R;for(;s.pos>V;)H>=0&&s.id==H&&s.size>=0?(s.end<=G-i&&(p(X,F,k,B,s.end,G,H,Q,E),B=X.length,G=s.end),s.next()):_>2500?f(k,V,X,F):d(k,V,X,F,H,_+1);if(H>=0&&B>0&&B-1&&B>0){let se=h(A,E);N=U0(A,X,F,0,X.length,0,R-k,se,se)}else N=m(A,X,F,R-k,Q-R,E)}$.push(N),w.push(z)}function f(b,x,$,w){let P=[],_=0,T=-1;for(;s.pos>x;){let{id:k,start:R,end:I,size:Q}=s;if(Q>4)s.next();else{if(T>-1&&R=0;I-=3)k[Q++]=P[I],k[Q++]=P[I+1]-R,k[Q++]=P[I+2]-R,k[Q++]=Q;$.push(new Vo(k,P[2]-R,r)),w.push(R-b)}}function h(b,x){return($,w,P)=>{let _=0,T=$.length-1,k,R;if(T>=0&&(k=$[T])instanceof Ln){if(!T&&k.type==b&&k.length==P)return k;(R=k.prop(Tt.lookAhead))&&(_=w[T]+k.length+R)}return m(b,$,w,P,_,x)}}function p(b,x,$,w,P,_,T,k,R){let I=[],Q=[];for(;b.length>w;)I.push(b.pop()),Q.push(x.pop()+$-P);b.push(m(r.types[T],I,Q,_-P,k-_,R)),x.push(P-$)}function m(b,x,$,w,P,_,T){if(_){let k=[Tt.contextHash,_];T=T?[k].concat(T):[k]}if(P>25){let k=[Tt.lookAhead,P];T=T?[k].concat(T):[k]}return new Ln(b,x,$,w,T)}function g(b,x){let $=s.fork(),w=0,P=0,_=0,T=$.end-i,k={size:0,start:0,skip:0};e:for(let R=$.pos-b;$.pos>R;){let I=$.size;if($.id==x&&I>=0){k.size=w,k.start=P,k.skip=_,_+=4,w+=4,$.next();continue}let Q=$.pos-I;if(I<0||Q=a?4:0,A=$.start;for($.next();$.pos>Q;){if($.size<0)if($.size==-3)E+=4;else break e;else $.id>=a&&(E+=4);$.next()}P=A,w+=I,_+=E}return(x<0||w==b)&&(k.size=w,k.start=P,k.skip=_),k.size>4?k:void 0}function v(b,x,$){let{id:w,start:P,end:_,size:T}=s;if(s.next(),T>=0&&w4){let R=s.pos-(T-4);for(;s.pos>R;)$=v(b,x,$)}x[--$]=k,x[--$]=_-b,x[--$]=P-b,x[--$]=w}else T==-3?c=w:T==-4&&(u=w);return $}let O=[],S=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,O,S,-1,0);let C=(e=t.length)!==null&&e!==void 0?e:O.length?S[0]+O[0].length:0;return new Ln(l[t.topID],O.reverse(),S.reverse(),C)}const HS=new WeakMap;function sd(t,e){if(!t.isAnonymous||e instanceof Vo||e.type!=t)return 1;let n=HS.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Ln)){n=1;break}n+=sd(t,r)}HS.set(e,n)}return n}function U0(t,e,n,r,i,o,a,s,l){let c=0;for(let p=r;p=u)break;x+=$}if(S==C+1){if(x>u){let $=p[C];h($.children,$.positions,0,$.children.length,m[C]+O);continue}d.push(p[C])}else{let $=m[S-1]+p[S-1].length-b;d.push(U0(t,p,m,C,S,b,$,null,l))}f.push(b+O-o)}}return h(e,n,r,i,0),(s||l)(d,f,a)}class DH{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof Bi?this.setBuffer(e.context.buffer,e.index,n):e instanceof Lr&&this.map.set(e.tree,n)}get(e){return e instanceof Bi?this.getBuffer(e.context.buffer,e.index):e instanceof Lr?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class pa{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new pa(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,c=0;;s++){let u=s=r)for(;a&&a.from=f.from||d<=f.to||c){let h=Math.max(f.from,l)-c,p=Math.min(f.to,d)-c;f=h>=p?null:new pa(h,p,f.tree,f.offset+c,s>0,!!u)}if(f&&i.push(f),a.to>d)break;a=onew xp(i.from,i.to)):[new xp(0,0)]:[new xp(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class BH{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new Tt({perNode:!0});let WH=0,ro=class Lg{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=WH++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof Lg&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new Lg(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new Xd(e);return r=>r.modified.indexOf(n)>-1?r:Xd.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},FH=0;class Xd{constructor(e){this.name=e,this.instances=[],this.id=FH++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&VH(n,s.modified));if(r)return r;let i=[],o=new ro(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=HH(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push(Xd.get(s,l));return o}}function VH(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function HH(t){let e=[[]];for(let n=0;nr.length-n.length)}function K0(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let d=0;;){if(s=="..."&&d>0&&d+3==i.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==i.length)break;let h=i[d++];if(d==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(d)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new Zd(r,a,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return _T.add(e)}const _T=new Tt;class Zd{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=i;for(let s of o)for(let l of s.set){let c=n[l.id];if(c){a=a?a+" "+c:c;break}}return a},scope:r}}function XH(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function ZH(t,e,n,r=0,i=t.length){let o=new qH(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class qH{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let c=i,u=GH(e)||Zd.empty,d=XH(o,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,s),c),u.opaque)return;let f=e.tree&&e.tree.prop(Tt.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),p=this.highlighters.filter(g=>!g.scope||g.scope(f.tree.type)),m=e.firstChild();for(let g=0,v=s;;g++){let O=g=S||!e.nextSibling())););if(!O||S>r)break;v=O.to+s,v>n&&(this.highlightRange(h.cursor(),Math.max(n,O.from+s),Math.min(r,v),"",p),this.startSpan(Math.min(r,v),c))}m&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function GH(t){let e=t.type.prop(_T);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const De=ro.define,_u=De(),wo=De(),XS=De(wo),ZS=De(wo),Po=De(),Tu=De(Po),Cp=De(Po),Qi=De(),Uo=De(Qi),Ei=De(),Ai=De(),jg=De(),ol=De(jg),ku=De(),U={comment:_u,lineComment:De(_u),blockComment:De(_u),docComment:De(_u),name:wo,variableName:De(wo),typeName:XS,tagName:De(XS),propertyName:ZS,attributeName:De(ZS),className:De(wo),labelName:De(wo),namespace:De(wo),macroName:De(wo),literal:Po,string:Tu,docString:De(Tu),character:De(Tu),attributeValue:De(Tu),number:Cp,integer:De(Cp),float:De(Cp),bool:De(Po),regexp:De(Po),escape:De(Po),color:De(Po),url:De(Po),keyword:Ei,self:De(Ei),null:De(Ei),atom:De(Ei),unit:De(Ei),modifier:De(Ei),operatorKeyword:De(Ei),controlKeyword:De(Ei),definitionKeyword:De(Ei),moduleKeyword:De(Ei),operator:Ai,derefOperator:De(Ai),arithmeticOperator:De(Ai),logicOperator:De(Ai),bitwiseOperator:De(Ai),compareOperator:De(Ai),updateOperator:De(Ai),definitionOperator:De(Ai),typeOperator:De(Ai),controlOperator:De(Ai),punctuation:jg,separator:De(jg),bracket:ol,angleBracket:De(ol),squareBracket:De(ol),paren:De(ol),brace:De(ol),content:Qi,heading:Uo,heading1:De(Uo),heading2:De(Uo),heading3:De(Uo),heading4:De(Uo),heading5:De(Uo),heading6:De(Uo),contentSeparator:De(Qi),list:De(Qi),quote:De(Qi),emphasis:De(Qi),strong:De(Qi),link:De(Qi),monospace:De(Qi),strikethrough:De(Qi),inserted:De(),deleted:De(),changed:De(),invalid:De(),meta:ku,documentMeta:De(ku),annotation:De(ku),processingInstruction:De(ku),definition:ro.defineModifier("definition"),constant:ro.defineModifier("constant"),function:ro.defineModifier("function"),standard:ro.defineModifier("standard"),local:ro.defineModifier("local"),special:ro.defineModifier("special")};for(let t in U){let e=U[t];e instanceof ro&&(e.name=t)}TT([{tag:U.link,class:"tok-link"},{tag:U.heading,class:"tok-heading"},{tag:U.emphasis,class:"tok-emphasis"},{tag:U.strong,class:"tok-strong"},{tag:U.keyword,class:"tok-keyword"},{tag:U.atom,class:"tok-atom"},{tag:U.bool,class:"tok-bool"},{tag:U.url,class:"tok-url"},{tag:U.labelName,class:"tok-labelName"},{tag:U.inserted,class:"tok-inserted"},{tag:U.deleted,class:"tok-deleted"},{tag:U.literal,class:"tok-literal"},{tag:U.string,class:"tok-string"},{tag:U.number,class:"tok-number"},{tag:[U.regexp,U.escape,U.special(U.string)],class:"tok-string2"},{tag:U.variableName,class:"tok-variableName"},{tag:U.local(U.variableName),class:"tok-variableName tok-local"},{tag:U.definition(U.variableName),class:"tok-variableName tok-definition"},{tag:U.special(U.variableName),class:"tok-variableName2"},{tag:U.definition(U.propertyName),class:"tok-propertyName tok-definition"},{tag:U.typeName,class:"tok-typeName"},{tag:U.namespace,class:"tok-namespace"},{tag:U.className,class:"tok-className"},{tag:U.macroName,class:"tok-macroName"},{tag:U.propertyName,class:"tok-propertyName"},{tag:U.operator,class:"tok-operator"},{tag:U.comment,class:"tok-comment"},{tag:U.meta,class:"tok-meta"},{tag:U.invalid,class:"tok-invalid"},{tag:U.punctuation,class:"tok-punctuation"}]);var $p;const ns=new Tt;function kT(t){return qe.define({combine:t?e=>e.concat(t):void 0})}const J0=new Tt;class yi{constructor(e,n,r=[],i=""){this.data=e,this.name=i,Qt.prototype.hasOwnProperty("tree")||Object.defineProperty(Qt.prototype,"tree",{get(){return Fn(this)}}),this.parser=n,this.extension=[Ho.of(this),Qt.languageData.of((o,a,s)=>{let l=qS(o,a,s),c=l.type.prop(ns);if(!c)return[];let u=o.facet(c),d=l.type.prop(J0);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,o)){let p=o.facet(h.facet);return h.type=="replace"?p:p.concat(u)}}return u})].concat(r)}isActiveAt(e,n,r=-1){return qS(e,n,r).type.prop(ns)==this.data}findRegions(e){let n=e.facet(Ho);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(ns)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(Tt.mounted);if(s){if(s.tree.prop(ns)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;lr.isTop?n:void 0)]}),e.name)}configure(e,n){return new ic(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Fn(t){let e=t.field(yi.state,!1);return e?e.tree:Ln.empty}class YH{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let al=null;class qd{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new qd(e,n,[],Ln.empty,0,r,[],null)}startParse(){return this.parser.startParse(new YH(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ln.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(pa.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=al;al=this;try{return e()}finally{al=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=GS(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((c,u,d,f)=>l.push({fromA:c,toA:u,fromB:d,toB:f})),r=pa.applyChanges(r,l),i=Ln.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let c of this.skipped){let u=e.mapPos(c.from,1),d=e.mapPos(c.to,-1);ue.from&&(this.fragments=GS(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends PT{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=al;if(l){for(let c of i)l.tempSkipped.push(c);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new Ln(jr.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return al}}function GS(t,e,n){return pa.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Ts{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Ts(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=qd.create(e.facet(Ho).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Ts(r)}}yi.state=qn.define({create:Ts.init,update(t,e){for(let n of e.effects)if(n.is(yi.setState))return n.value;return e.startState.facet(Ho)!=e.state.facet(Ho)?Ts.init(e.state):t.apply(e)}});let RT=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(RT=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const wp=typeof navigator<"u"&&(!(($p=navigator.scheduling)===null||$p===void 0)&&$p.isInputPending)?()=>navigator.scheduling.isInputPending():null,UH=Mn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(yi.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(yi.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=RT(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndi+1e3,l=o.context.work(()=>wp&&wp()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:yi.setState.of(new Ts(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>Nr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ho=qe.define({combine(t){return t.length?t[0]:null},enables:t=>[yi.state,UH,Be.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class IT{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const KH=qe.define(),Nc=qe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Gd(t){let e=t.facet(Nc);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function oc(t,e){let n="",r=t.tabSize,i=t.facet(Nc)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o=e?JH(t,n,e):null}class sh{constructor(e,n={}){this.state=e,this.options=n,this.unit=Gd(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return Vs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const tO=new Tt;function JH(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a&&!(a.fromr.node.to||a.from==r.node.from&&a.type==r.node.type);a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return MT(r,t,n)}function MT(t,e,n){for(let r=t;r;r=r.next){let i=tX(r.node);if(i)return i(nO.create(e,n,r))}return 0}function eX(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function tX(t){let e=t.type.prop(tO);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Tt.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>ET(a,!0,1,void 0,o&&!eX(a)?i.from:void 0)}return t.parent==null?nX:null}function nX(){return 0}class nO extends sh{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new nO(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(rX(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return MT(this.context.next,this.base,this.pos)}}function rX(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function iX(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let c=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+c}}s=l.to}}function Dg({closing:t,align:e=!0,units:n=1}){return r=>ET(r,e,n,t)}function ET(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?iX(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const oX=t=>t.baseIndent;function Pp({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const aX=200;function sX(){return Qt.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+aX)return t;let o=n.sliceString(i.from,r);if(!e.some(c=>c.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:c}of a.selection.ranges){let u=a.doc.lineAt(c);if(u.from==s)continue;s=u.from;let d=eO(a,u.from);if(d==null)continue;let f=/^\s*/.exec(u.text)[0],h=oc(a,d);f!=h&&l.push({from:u.from,to:u.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const lX=qe.define(),rO=new Tt;function AT(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&s.from=e&&c.to>n&&(o=c)}}return o}function uX(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Yd(t,e,n){for(let r of t.facet(lX)){let i=r(t,e,n);if(i)return i}return cX(t,e,n)}function QT(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const lh=Ot.define({map:QT}),zc=Ot.define({map:QT});function NT(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const Ta=qn.define({create(){return lt.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=YS(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(lh)&&!dX(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(jT),i=r?lt.replace({widget:new OX(r(e.state,n.value))}):US;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(zc)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=YS(t,e.selection.main.head)),t},provide:t=>Be.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{ie&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,o)=>i>=n||o<=e}):t}function Ud(t,e,n){var r;let i=null;return(r=t.field(Ta,!1))===null||r===void 0||r.between(e,n,(o,a)=>{(!i||i.from>o)&&(i={from:o,to:a})}),i}function dX(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function zT(t,e){return t.field(Ta,!1)?e:e.concat(Ot.appendConfig.of(DT()))}const fX=t=>{for(let e of NT(t)){let n=Yd(t.state,e.from,e.to);if(n)return t.dispatch({effects:zT(t.state,[lh.of(n),LT(t,n)])}),!0}return!1},hX=t=>{if(!t.state.field(Ta,!1))return!1;let e=[];for(let n of NT(t)){let r=Ud(t.state,n.from,n.to);r&&e.push(zc.of(r),LT(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function LT(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return Be.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const pX=t=>{let{state:e}=t,n=[];for(let r=0;r{let e=t.state.field(Ta,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(zc.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},gX=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:fX},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:hX},{key:"Ctrl-Alt-[",run:pX},{key:"Ctrl-Alt-]",run:mX}],vX={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},jT=qe.define({combine(t){return eo(t,vX)}});function DT(t){return[Ta,SX]}function BT(t,e){let{state:n}=t,r=n.facet(jT),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=Ud(t.state,s.from,s.to);l&&t.dispatch({effects:zc.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const US=lt.replace({widget:new class extends to{toDOM(t){return BT(t,null)}}});class OX extends to{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return BT(e,this.value)}}const bX={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class _p extends po{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function yX(t={}){let e={...bX,...t},n=new _p(e,!0),r=new _p(e,!1),i=Mn.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Ho)!=a.state.facet(Ho)||a.startState.field(Ta,!1)!=a.state.field(Ta,!1)||Fn(a.startState)!=Fn(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new fo;for(let l of a.viewportLineBlocks){let c=Ud(a.state,l.from,l.to)?r:Yd(a.state,l.from,l.to)?n:null;c&&s.add(l.from,l.from,c)}return s.finish()}}),{domEventHandlers:o}=e;return[i,CH({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||jt.empty},initialSpacer(){return new _p(e,!1)},domEventHandlers:{...o,click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let c=Ud(a.state,s.from,s.to);if(c)return a.dispatch({effects:zc.of(c)}),!0;let u=Yd(a.state,s.from,s.to);return u?(a.dispatch({effects:lh.of(u)}),!0):!1}}}),DT()]}const SX=Be.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Lc{constructor(e,n){this.specs=e;let r;function i(s){let l=Bo.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof yi?s=>s.prop(ns)==a.data:a?s=>s==a:void 0,this.style=TT(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new Bo(r):null,this.themeType=n.themeType}static define(e,n){return new Lc(e,n||{})}}const Bg=qe.define(),WT=qe.define({combine(t){return t.length?[t[0]]:null}});function Tp(t){let e=t.facet(Bg);return e.length?e:t.facet(WT)}function FT(t,e){let n=[CX],r;return t instanceof Lc&&(t.module&&n.push(Be.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(WT.of(t)):r?n.push(Bg.computeN([Be.darkTheme],i=>i.facet(Be.darkTheme)==(r=="dark")?[t]:[])):n.push(Bg.of(t)),n}class xX{constructor(e){this.markCache=Object.create(null),this.tree=Fn(e.state),this.decorations=this.buildDeco(e,Tp(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=Fn(e.state),r=Tp(e.state),i=r!=Tp(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return lt.none;let r=new fo;for(let{from:i,to:o}of e.visibleRanges)ZH(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=lt.mark({class:l})))},i,o);return r.finish()}}const CX=Zo.high(Mn.fromClass(xX,{decorations:t=>t.decorations})),$X=Lc.define([{tag:U.meta,color:"#404740"},{tag:U.link,textDecoration:"underline"},{tag:U.heading,textDecoration:"underline",fontWeight:"bold"},{tag:U.emphasis,fontStyle:"italic"},{tag:U.strong,fontWeight:"bold"},{tag:U.strikethrough,textDecoration:"line-through"},{tag:U.keyword,color:"#708"},{tag:[U.atom,U.bool,U.url,U.contentSeparator,U.labelName],color:"#219"},{tag:[U.literal,U.inserted],color:"#164"},{tag:[U.string,U.deleted],color:"#a11"},{tag:[U.regexp,U.escape,U.special(U.string)],color:"#e40"},{tag:U.definition(U.variableName),color:"#00f"},{tag:U.local(U.variableName),color:"#30a"},{tag:[U.typeName,U.namespace],color:"#085"},{tag:U.className,color:"#167"},{tag:[U.special(U.variableName),U.macroName],color:"#256"},{tag:U.definition(U.propertyName),color:"#00c"},{tag:U.comment,color:"#940"},{tag:U.invalid,color:"#f00"}]),wX=Be.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),VT=1e4,HT="()[]{}",XT=qe.define({combine(t){return eo(t,{afterCursor:!0,brackets:HT,maxScanDistance:VT,renderMatch:TX})}}),PX=lt.mark({class:"cm-matchingBracket"}),_X=lt.mark({class:"cm-nonmatchingBracket"});function TX(t){let e=[],n=t.matched?PX:_X;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const kX=qn.define({create(){return lt.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(XT);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Wi(e.state,i.head,-1,r)||i.head>0&&Wi(e.state,i.head-1,1,r)||r.afterCursor&&(Wi(e.state,i.head,1,r)||i.headBe.decorations.from(t)}),RX=[kX,wX];function IX(t={}){return[XT.of(t),RX]}const MX=new Tt;function Wg(t,e,n){let r=t.prop(e<0?Tt.openedBy:Tt.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function Fg(t){let e=t.type.prop(MX);return e?e(t.node):t}function Wi(t,e,n,r={}){let i=r.maxScanDistance||VT,o=r.brackets||HT,a=Fn(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let c=Wg(l.type,n,o);if(c&&l.from0?e>=u.from&&eu.from&&e<=u.to))return EX(t,e,n,l,u,c,o)}}return AX(t,e,n,a,s.type,i,o)}function EX(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},c=0,u=s==null?void 0:s.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&o.indexOf(u.type.name)>-1&&u.from0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!u.next().done&&f<=o;){let h=u.value;n<0&&(f+=h.length);let p=e+f*n;for(let m=n>0?0:h.length-1,g=n>0?h.length:-1;m!=g;m+=n){let v=a.indexOf(h[m]);if(!(v<0||r.resolveInner(p+m,1).type!=i))if(v%2==0==n>0)d++;else{if(d==1)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}n>0&&(f+=h.length)}return u.done?{start:c,matched:!1}:null}const QX=Object.create(null),KS=[jr.none],JS=[],ex=Object.create(null),NX=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])NX[t]=zX(QX,e);function kp(t,e){JS.indexOf(t)>-1||(JS.push(t),console.warn(e))}function zX(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let c of s.split(".")){let u=t[c]||U[c];u?typeof u=="function"?l.length?l=l.map(u):kp(c,`Modifier ${c} used at start of tag`):l.length?kp(c,`Tag ${c} used as modifier`):l=Array.isArray(u)?u:[u]:kp(c,`Unknown highlighting tag ${c}`)}for(let c of l)n.push(c)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=ex[i];if(o)return o.id;let a=ex[i]=jr.define({id:KS.length,name:r,props:[K0({[r]:n})]});return KS.push(a),a.id}mn.RTL,mn.LTR;const LX=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=oO(t.state,n.from);return r.line?jX(t):r.block?BX(t):!1};function iO(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const jX=iO(VX,0),DX=iO(ZT,0),BX=iO((t,e)=>ZT(t,e,FX(e)),0);function oO(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const sl=50;function WX(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-sl,r),a=t.sliceDoc(i,i+sl),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,c=o.length-s;if(o.slice(c-e.length,c)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let u,d;i-r<=2*sl?u=d=t.sliceDoc(r,i):(u=t.sliceDoc(r,r+sl),d=t.sliceDoc(i-sl,i));let f=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(d)[0].length,p=d.length-h-n.length;return u.slice(f,f+e.length)==e&&d.slice(p,p+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(u.charAt(f+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(d.charAt(p-1))?1:0}}:null}function FX(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function ZT(t,e,n=e.selection.ranges){let r=n.map(o=>oO(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>WX(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;ai&&(o==a||a>d.from)){i=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,p=d.text.slice(f,f+c.length)==c?f:-1;fo.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:c,empty:u,single:d}of r)(d||!u)&&o.push({from:s.from+c,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let c=a.from+s,u=c+l.length;a.text[u-a.from]==" "&&u++,o.push({from:c,to:u})}return{changes:o}}return null}const Vg=Ji.define(),HX=Ji.define(),XX=qe.define(),qT=qe.define({combine(t){return eo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),GT=qn.define({create(){return Fi.empty},update(t,e){let n=e.state.facet(qT),r=e.annotation(Vg);if(r){let l=zr.fromTransaction(e,r.selection),c=r.side,u=c==0?t.undone:t.done;return l?u=Kd(u,u.length,n.minDepth,l):u=KT(u,e.startState.selection),new Fi(c==0?r.rest:u,c==0?u:r.rest)}let i=e.annotation(HX);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(zn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=zr.fromTransaction(e),a=e.annotation(zn.time),s=e.annotation(zn.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Fi(t.done.map(zr.fromJSON),t.undone.map(zr.fromJSON))}});function ZX(t={}){return[GT,qT.of(t),Be.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?YT:e.inputType=="historyRedo"?Hg:null;return r?(e.preventDefault(),r(n)):!1}})]}function ch(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(GT,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const YT=ch(0,!1),Hg=ch(1,!1),qX=ch(0,!0),GX=ch(1,!0);class zr{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new zr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new zr(e.changes&&Dn.fromJSON(e.changes),[],e.mapped&&Xi.fromJSON(e.mapped),e.startSelection&&Se.fromJSON(e.startSelection),e.selectionsAfter.map(Se.fromJSON))}static fromTransaction(e,n){let r=ci;for(let i of e.startState.facet(XX)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new zr(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,ci)}static selection(e){return new zr(void 0,ci,void 0,void 0,e)}}function Kd(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function YX(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l=c&&a<=u&&(r=!0)}}),r}function UX(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function UT(t,e){return t.length?e.length?t.concat(e):t:e}const ci=[],KX=200;function KT(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-KX));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Kd(t,t.length-1,1e9,n.setSelAfter(r)))}else return[zr.selection([e])]}function JX(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Rp(t,e){if(!t.length)return t;let n=t.length,r=ci;for(;n;){let i=eZ(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[zr.selection(r)]:ci}function eZ(t,e,n){let r=UT(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):ci,n);if(!t.changes)return zr.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new zr(i,Ot.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const tZ=/^(input\.type|delete)($|\.)/;class Fi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Fi(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||tZ.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):uh(n,e))}function gr(t){return t.textDirectionAt(t.state.selection.main.head)==mn.LTR}const ek=t=>JT(t,!gr(t)),tk=t=>JT(t,gr(t));function nk(t,e){return ki(t,n=>n.empty?t.moveByGroup(n,e):uh(n,e))}const rZ=t=>nk(t,!gr(t)),iZ=t=>nk(t,gr(t));function oZ(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function dh(t,e,n){let r=Fn(t).resolveInner(e.head),i=n?Tt.closedBy:Tt.openedBy;for(let l=e.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;oZ(t,c,i)?r=c:l=n?c.to:c.from}let o=r.type.prop(i),a,s;return o&&(a=n?Wi(t,r.from,1):Wi(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,Se.cursor(s,n?-1:1)}const aZ=t=>ki(t,e=>dh(t.state,e,!gr(t))),sZ=t=>ki(t,e=>dh(t.state,e,gr(t)));function rk(t,e){return ki(t,n=>{if(!n.empty)return uh(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const ik=t=>rk(t,!1),ok=t=>rk(t,!0);function ak(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):uh(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,c=s.bottom-n.marginBottom;a&&a.top>l&&a.bottomsk(t,!1),Xg=t=>sk(t,!0);function qo(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=Se.cursor(r.from+o))}return i}const lZ=t=>ki(t,e=>qo(t,e,!0)),cZ=t=>ki(t,e=>qo(t,e,!1)),uZ=t=>ki(t,e=>qo(t,e,!gr(t))),dZ=t=>ki(t,e=>qo(t,e,gr(t))),fZ=t=>ki(t,e=>Se.cursor(t.lineBlockAt(e.head).from,1)),hZ=t=>ki(t,e=>Se.cursor(t.lineBlockAt(e.head).to,-1));function pZ(t,e,n){let r=!1,i=Hs(t.selection,o=>{let a=Wi(t,o.head,-1)||Wi(t,o.head,1)||o.head>0&&Wi(t,o.head-1,1)||o.headpZ(t,e);function gi(t,e){let n=Hs(t.state.selection,r=>{let i=e(r);return Se.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(no(t.state,n)),!0)}function lk(t,e){return gi(t,n=>t.moveByChar(n,e))}const ck=t=>lk(t,!gr(t)),uk=t=>lk(t,gr(t));function dk(t,e){return gi(t,n=>t.moveByGroup(n,e))}const gZ=t=>dk(t,!gr(t)),vZ=t=>dk(t,gr(t)),OZ=t=>gi(t,e=>dh(t.state,e,!gr(t))),bZ=t=>gi(t,e=>dh(t.state,e,gr(t)));function fk(t,e){return gi(t,n=>t.moveVertically(n,e))}const hk=t=>fk(t,!1),pk=t=>fk(t,!0);function mk(t,e){return gi(t,n=>t.moveVertically(n,e,ak(t).height))}const nx=t=>mk(t,!1),rx=t=>mk(t,!0),yZ=t=>gi(t,e=>qo(t,e,!0)),SZ=t=>gi(t,e=>qo(t,e,!1)),xZ=t=>gi(t,e=>qo(t,e,!gr(t))),CZ=t=>gi(t,e=>qo(t,e,gr(t))),$Z=t=>gi(t,e=>Se.cursor(t.lineBlockAt(e.head).from)),wZ=t=>gi(t,e=>Se.cursor(t.lineBlockAt(e.head).to)),ix=({state:t,dispatch:e})=>(e(no(t,{anchor:0})),!0),ox=({state:t,dispatch:e})=>(e(no(t,{anchor:t.doc.length})),!0),ax=({state:t,dispatch:e})=>(e(no(t,{anchor:t.selection.main.anchor,head:0})),!0),sx=({state:t,dispatch:e})=>(e(no(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),PZ=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),_Z=({state:t,dispatch:e})=>{let n=fh(t).map(({from:r,to:i})=>Se.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:Se.create(n),userEvent:"select"})),!0},TZ=({state:t,dispatch:e})=>{let n=Hs(t.selection,r=>{let i=Fn(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return Se.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(no(t,n)),!0)},kZ=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=Se.create([n.main]):n.main.empty||(r=Se.create([Se.cursor(n.main.head)])),r?(e(no(t,r)),!0):!1};function jc(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);la&&(n="delete.forward",l=Ru(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=Ru(t,a,!1),s=Ru(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:Se.cursor(a,ai(t)))r.between(e,e,(i,o)=>{ie&&(e=n?o:i)});return e}const gk=(t,e,n)=>jc(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&igk(t,!1,!0),vk=t=>gk(t,!0,!1),Ok=(t,e)=>jc(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=er(o.text,r-o.from,e)+o.from,c=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),u=a(c);if(s!=null&&u!=s)break;(c!=" "||r!=n.head)&&(s=u),r=l}return r}),bk=t=>Ok(t,!1),RZ=t=>Ok(t,!0),IZ=t=>jc(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headjc(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),EZ=t=>jc(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Ft.of(["",""])},range:Se.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},QZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:er(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:er(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:Se.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function fh(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function yk(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of fh(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push(Se.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push(Se.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:Se.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const NZ=({state:t,dispatch:e})=>yk(t,e,!1),zZ=({state:t,dispatch:e})=>yk(t,e,!0);function Sk(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of fh(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const LZ=({state:t,dispatch:e})=>Sk(t,e,!1),jZ=({state:t,dispatch:e})=>Sk(t,e,!0),DZ=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(fh(e).map(({from:i,to:o})=>(i>0?i--:o{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function BZ(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=Fn(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(Tt.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const lx=xk(!1),WZ=xk(!0);function xk(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&BZ(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let c=new sh(e,{simulateBreak:o,simulateDoubleBreak:!!l}),u=eO(c,o);for(u==null&&(u=Vs(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));as.from&&o{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:Se.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const FZ=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new sh(t,{overrideIndentation:o=>{let a=n[o];return a??-1}}),i=aO(t,(o,a,s)=>{let l=eO(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let c=/^\s*/.exec(o.text)[0],u=oc(t,l);(c!=u||s.fromt.readOnly?!1:(e(t.update(aO(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Nc)})}),{userEvent:"input.indent"})),!0),$k=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(aO(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=Vs(i,t.tabSize),a=0,s=oc(t,Math.max(0,o-Gd(t)));for(;a(t.setTabFocusMode(),!0),HZ=[{key:"Ctrl-b",run:ek,shift:ck,preventDefault:!0},{key:"Ctrl-f",run:tk,shift:uk},{key:"Ctrl-p",run:ik,shift:hk},{key:"Ctrl-n",run:ok,shift:pk},{key:"Ctrl-a",run:fZ,shift:$Z},{key:"Ctrl-e",run:hZ,shift:wZ},{key:"Ctrl-d",run:vk},{key:"Ctrl-h",run:Zg},{key:"Ctrl-k",run:IZ},{key:"Ctrl-Alt-h",run:bk},{key:"Ctrl-o",run:AZ},{key:"Ctrl-t",run:QZ},{key:"Ctrl-v",run:Xg}],XZ=[{key:"ArrowLeft",run:ek,shift:ck,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:rZ,shift:gZ,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:uZ,shift:xZ,preventDefault:!0},{key:"ArrowRight",run:tk,shift:uk,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:iZ,shift:vZ,preventDefault:!0},{mac:"Cmd-ArrowRight",run:dZ,shift:CZ,preventDefault:!0},{key:"ArrowUp",run:ik,shift:hk,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ix,shift:ax},{mac:"Ctrl-ArrowUp",run:tx,shift:nx},{key:"ArrowDown",run:ok,shift:pk,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ox,shift:sx},{mac:"Ctrl-ArrowDown",run:Xg,shift:rx},{key:"PageUp",run:tx,shift:nx},{key:"PageDown",run:Xg,shift:rx},{key:"Home",run:cZ,shift:SZ,preventDefault:!0},{key:"Mod-Home",run:ix,shift:ax},{key:"End",run:lZ,shift:yZ,preventDefault:!0},{key:"Mod-End",run:ox,shift:sx},{key:"Enter",run:lx,shift:lx},{key:"Mod-a",run:PZ},{key:"Backspace",run:Zg,shift:Zg},{key:"Delete",run:vk},{key:"Mod-Backspace",mac:"Alt-Backspace",run:bk},{key:"Mod-Delete",mac:"Alt-Delete",run:RZ},{mac:"Mod-Backspace",run:MZ},{mac:"Mod-Delete",run:EZ}].concat(HZ.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),ZZ=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:aZ,shift:OZ},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:sZ,shift:bZ},{key:"Alt-ArrowUp",run:NZ},{key:"Shift-Alt-ArrowUp",run:LZ},{key:"Alt-ArrowDown",run:zZ},{key:"Shift-Alt-ArrowDown",run:jZ},{key:"Escape",run:kZ},{key:"Mod-Enter",run:WZ},{key:"Alt-l",mac:"Ctrl-l",run:_Z},{key:"Mod-i",run:TZ,preventDefault:!0},{key:"Mod-[",run:$k},{key:"Mod-]",run:Ck},{key:"Mod-Alt-\\",run:FZ},{key:"Shift-Mod-k",run:DZ},{key:"Shift-Mod-\\",run:mZ},{key:"Mod-/",run:LX},{key:"Alt-A",run:DX},{key:"Ctrl-m",mac:"Shift-Alt-m",run:VZ}].concat(XZ),qZ={key:"Tab",run:Ck,shift:$k},cx=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ks{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(cx(s)):cx,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Er(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=E0(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Li(e);let i=this.normalize(n);if(i.length)for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=Jd(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=n){let s=new us(n,e.sliceString(n,r));return Ip.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=Jd(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=us.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Pk.prototype[Symbol.iterator]=_k.prototype[Symbol.iterator]=function(){return this});function GZ(t){try{return new RegExp(t,sO),!0}catch{return!1}}function Jd(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function qg(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=on("input",{class:"cm-textfield",name:"line",value:e}),r=on("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:Ml.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},on("label",t.state.phrase("Go to line"),": ",n)," ",on("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),on("button",{name:"close",onclick:()=>{t.dispatch({effects:Ml.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,c,u,d]=o,f=u?+u.slice(1):0,h=c?+c:s.number;if(c&&d){let g=h/100;l&&(g=g*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*g)}else c&&l&&(h=h*(l=="-"?-1:1)+s.number);let p=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),m=Se.cursor(p.from+Math.max(0,Math.min(f,p.length)));t.dispatch({effects:[Ml.of(!1),Be.scrollIntoView(m.from,{y:"center"})],selection:m}),t.focus()}return{dom:r}}const Ml=Ot.define(),ux=qn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Ml)&&(t=n.value);return t},provide:t=>nc.from(t,e=>e?qg:null)}),YZ=t=>{let e=tc(t,qg);if(!e){let n=[Ml.of(!0)];t.state.field(ux,!1)==null&&n.push(Ot.appendConfig.of([ux,UZ])),t.dispatch({effects:n}),e=tc(t,qg)}return e&&e.dom.querySelector("input").select(),!0},UZ=Be.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),KZ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},JZ=qe.define({combine(t){return eo(t,KZ,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function eq(t){return[oq,iq]}const tq=lt.mark({class:"cm-selectionMatch"}),nq=lt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function dx(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Sn.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Sn.Word)}function rq(t,e,n,r){return t(e.sliceDoc(n,n+1))==Sn.Word&&t(e.sliceDoc(r-1,r))==Sn.Word}const iq=Mn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(JZ),{state:n}=t,r=n.selection;if(r.ranges.length>1)return lt.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return lt.none;let l=n.wordAt(i.head);if(!l)return lt.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return lt.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(dx(a,n,i.from,i.to)&&rq(a,n,i.from,i.to)))return lt.none}else if(o=n.sliceDoc(i.from,i.to),!o)return lt.none}let s=[];for(let l of t.visibleRanges){let c=new ks(n.doc,o,l.from,l.to);for(;!c.next().done;){let{from:u,to:d}=c.value;if((!a||dx(a,n,u,d))&&(i.empty&&u<=i.from&&d>=i.to?s.push(nq.range(u,d)):(u>=i.to||d<=i.from)&&s.push(tq.range(u,d)),s.length>e.maxMatches))return lt.none}}return lt.set(s)}},{decorations:t=>t.decorations}),oq=Be.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),aq=({state:t,dispatch:e})=>{let{selection:n}=t,r=Se.create(n.ranges.map(i=>t.wordAt(i.head)||Se.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function sq(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new ks(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new ks(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const lq=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return aq({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=sq(t,r);return i?(e(t.update({selection:t.selection.addRange(Se.range(i.from,i.to),!1),effects:Be.scrollIntoView(i.to)})),!0):!1},Xs=qe.define({combine(t){return eo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new yq(e),scrollToMatch:e=>Be.scrollIntoView(e)})}});class Tk{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||GZ(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?` +`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new fq(this):new uq(this)}getCursor(e,n=0,r){let i=e.doc?e:Qt.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?qa(this,i,n,r):Za(this,i,n,r)}}class kk{constructor(e){this.spec=e}}function Za(t,e,n,r){return new ks(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?cq(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function cq(t,e){return(n,r,i,o)=>((o>n||o+i.length=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=Za(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function qa(t,e,n,r){return new Pk(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?dq(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function ef(t,e){return t.slice(er(t,e,!1),e)}function tf(t,e){return t.slice(e,er(t,e))}function dq(t){return(e,n,r)=>!r[0].length||(t(ef(r.input,r.index))!=Sn.Word||t(tf(r.input,r.index))!=Sn.Word)&&(t(tf(r.input,r.index+r[0].length))!=Sn.Word||t(ef(r.input,r.index+r[0].length))!=Sn.Word)}class fq extends kk{nextMatch(e,n,r){let i=qa(this.spec,e,r,e.doc.length).next();return i.done&&(i=qa(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=qa(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let o=+r.slice(0,i);if(o>0&&o=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=qa(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const ac=Ot.define(),lO=Ot.define(),Ao=qn.define({create(t){return new Mp(Gg(t).create(),null)},update(t,e){for(let n of e.effects)n.is(ac)?t=new Mp(n.value.create(),t.panel):n.is(lO)&&(t=new Mp(t.query,n.value?cO:null));return t},provide:t=>nc.from(t,e=>e.panel)});class Mp{constructor(e,n){this.query=e,this.panel=n}}const hq=lt.mark({class:"cm-searchMatch"}),pq=lt.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mq=Mn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Ao))}update(t){let e=t.state.field(Ao);(e!=t.startState.field(Ao)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return lt.none;let{view:n}=this,r=new fo;for(let i=0,o=n.visibleRanges,a=o.length;io[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(c,u)=>{let d=n.state.selection.ranges.some(f=>f.from==c&&f.to==u);r.add(c,u,d?pq:hq)})}return r.finish()}},{decorations:t=>t.decorations});function Dc(t){return e=>{let n=e.state.field(Ao,!1);return n&&n.query.spec.valid?t(e,n):Mk(e)}}const nf=Dc((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=Se.single(r.from,r.to),o=t.state.facet(Xs);return t.dispatch({selection:i,effects:[uO(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),Ik(t),!0}),rf=Dc((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=Se.single(i.from,i.to),a=t.state.facet(Xs);return t.dispatch({selection:o,effects:[uO(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),Ik(t),!0}),gq=Dc((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:Se.create(n.map(r=>Se.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),vq=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new ks(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(Se.range(s.value.from,s.value.to))}return e(t.update({selection:Se.create(o,a),userEvent:"select.search.matches"})),!0},fx=Dc((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,c,u=[];a.from==r&&a.to==i&&(c=n.toText(e.getReplacement(a)),s.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(n,a.from,a.to),u.push(Be.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=t.state.changes(s);return a&&(l=Se.single(a.from,a.to).map(d),u.push(uO(t,a)),u.push(n.facet(Xs).scrollToMatch(l.main,t))),t.dispatch({changes:d,selection:l,effects:u,userEvent:"input.replace"}),!0}),Oq=Dc((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Be.announce.of(r),userEvent:"input.replace.all"}),!0});function cO(t){return t.state.facet(Xs).createPanel(t)}function Gg(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let c=t.facet(Xs);return new Tk({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:c.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:c.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:c.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:c.wholeWord})}function Rk(t){let e=tc(t,cO);return e&&e.dom.querySelector("[main-field]")}function Ik(t){let e=Rk(t);e&&e==t.root.activeElement&&e.select()}const Mk=t=>{let e=t.state.field(Ao,!1);if(e&&e.panel){let n=Rk(t);if(n&&n!=t.root.activeElement){let r=Gg(t.state,e.query.spec);r.valid&&t.dispatch({effects:ac.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[lO.of(!0),e?ac.of(Gg(t.state,e.query.spec)):Ot.appendConfig.of(xq)]});return!0},Ek=t=>{let e=t.state.field(Ao,!1);if(!e||!e.panel)return!1;let n=tc(t,cO);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:lO.of(!1)}),!0},bq=[{key:"Mod-f",run:Mk,scope:"editor search-panel"},{key:"F3",run:nf,shift:rf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:nf,shift:rf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Ek,scope:"editor search-panel"},{key:"Mod-Shift-l",run:vq},{key:"Mod-Alt-g",run:YZ},{key:"Mod-d",run:lq,preventDefault:!0}];class yq{constructor(e){this.view=e;let n=this.query=e.state.field(Ao).query.spec;this.commit=this.commit.bind(this),this.searchField=on("input",{value:n.search,placeholder:Hr(e,"Find"),"aria-label":Hr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=on("input",{value:n.replace,placeholder:Hr(e,"Replace"),"aria-label":Hr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=on("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=on("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=on("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return on("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=on("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>nf(e),[Hr(e,"next")]),r("prev",()=>rf(e),[Hr(e,"previous")]),r("select",()=>gq(e),[Hr(e,"all")]),on("label",null,[this.caseField,Hr(e,"match case")]),on("label",null,[this.reField,Hr(e,"regexp")]),on("label",null,[this.wordField,Hr(e,"by word")]),...e.state.readOnly?[]:[on("br"),this.replaceField,r("replace",()=>fx(e),[Hr(e,"replace")]),r("replaceAll",()=>Oq(e),[Hr(e,"replace all")])],on("button",{name:"close",onclick:()=>Ek(e),"aria-label":Hr(e,"close"),type:"button"},["×"])])}commit(){let e=new Tk({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:ac.of(e)}))}keydown(e){IV(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?rf:nf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),fx(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(ac)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Xs).top}}function Hr(t,e){return t.state.phrase(e)}const Iu=30,Mu=/[\s\.,:;?!]/;function uO(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-Iu),a=Math.min(i,n+Iu),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;ls.length-Iu;l--)if(!Mu.test(s[l-1])&&Mu.test(s[l])){s=s.slice(0,l);break}}return Be.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const Sq=Be.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xq=[Ao,Zo.low(mq),Sq];class Ak{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=Fn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(Nk(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function hx(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Cq(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;otypeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Cq(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function $q(t,e){return n=>{for(let r=Fn(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class px{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function ma(t){return t.selection.main.from}function Nk(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const dO=Ji.define();function wq(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return{...t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:Se.cursor(s.from+o+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const mx=new WeakMap;function Pq(t){if(!Array.isArray(t))return t;let e=mx.get(t);return e||mx.set(t,e=Qk(t)),e}const of=Ot.define(),sc=Ot.define();class _q{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&b<=57||b>=97&&b<=122?2:b>=65&&b<=90?1:0:(x=E0(b))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!O||$==1&&g||C==0&&$!=0)&&(n[d]==b||r[d]==b&&(f=!0)?a[d++]=O:a.length&&(v=!1)),C=$,O+=Li(b)}return d==l&&a[0]==0&&v?this.result(-100+(f?-200:0),a,e):h==l&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-900-e.length,[p,m]):d==l?this.result(-100+(f?-200:0)+-700+(v?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Li(Er(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class Tq{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:kq,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>gx(e(r),n(r)),optionClass:(e,n)=>r=>gx(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function gx(t,e){return t?e?t+" "+e:t:e}function kq(t,e,n,r,i,o){let a=t.textDirection==mn.RTL,s=a,l=!1,c="top",u,d,f=e.left-i.left,h=i.right-e.right,p=r.right-r.left,m=r.bottom-r.top;if(s&&f=m||O>e.top?u=n.bottom-e.top:(c="bottom",u=e.bottom-n.top)}let g=(e.bottom-e.top)/o.offsetHeight,v=(e.right-e.left)/o.offsetWidth;return{style:`${c}: ${u/g}px; max-width: ${d/v}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function Rq(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let c=0;cl&&a.appendChild(document.createTextNode(s.slice(l,u)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(u,d))),f.className="cm-completionMatchedText",l=d}return ln.position-r.position).map(n=>n.render)}function Ep(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class Iq{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(Xn);this.optionContent=Rq(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=Ep(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:c}=e.state.field(n).open;for(let u=l.target,d;u&&u!=this.dom;u=u.parentNode)if(u.nodeName=="LI"&&(d=/-(\d+)$/.exec(u.id))&&+d[1]{let c=e.state.field(this.stateField,!1);c&&c.tooltip&&e.state.facet(Xn).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:sc.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=Ep(o.length,a,e.state.facet(Xn).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=Ep(n.options.length,n.selected,this.view.state.facet(Xn).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>Nr(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&Eq(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottom{a.target==i&&a.preventDefault()});let o=null;for(let a=r.from;ar.from||r.from==0))if(o=f,typeof c!="string"&&c.header)i.appendChild(c.header(c));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=f}}const u=i.appendChild(document.createElement("li"));u.id=n+"-"+a,u.setAttribute("role","option");let d=this.optionClass(s);d&&(u.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,this.view,l);h&&u.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew Iq(n,t,e)}function Eq(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.topn.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function vx(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Aq(t,e){let n=[],r=null,i=null,o=u=>{n.push(u);let{section:d}=u.completion;if(d){r||(r=[]);let f=typeof d=="string"?d:d.name;r.some(h=>h.name==f)||r.push(typeof d=="string"?{name:f}:d)}},a=e.facet(Xn);for(let u of t)if(u.hasResult()){let d=u.result.getMatch;if(u.result.filter===!1)for(let f of u.result.options)o(new px(f,u.source,d?d(f):[],1e9-n.length));else{let f=e.sliceDoc(u.from,u.to),h,p=a.filterStrict?new Tq(f):new _q(f);for(let m of u.result.options)if(h=p.match(m.label)){let g=m.displayLabel?d?d(m,h.matched):[]:h.matched,v=h.score+(m.boost||0);if(o(new px(m,u.source,g,v)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:O}=m.section;i||(i=Object.create(null)),i[O]=Math.max(v,i[O]||-1e9)}}}}if(r){let u=Object.create(null),d=0,f=(h,p)=>(h.rank==="dynamic"&&p.rank==="dynamic"?i[p.name]-i[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof p.rank=="number"?p.rank:1e9)||(h.namef.score-d.score||c(d.completion,f.completion))){let d=u.completion;!l||l.label!=d.label||l.detail!=d.detail||l.type!=null&&d.type!=null&&l.type!=d.type||l.apply!=d.apply||l.boost!=d.boost?s.push(u):vx(u.completion)>vx(l)&&(s[s.length-1]=u),l=u.completion}return s}class rs{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new rs(this.options,Ox(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o,a){if(i&&!a&&e.some(c=>c.isPending))return i.setDisabled();let s=Aq(e,n);if(!s.length)return i&&e.some(c=>c.isPending)?i.setDisabled():null;let l=n.facet(Xn).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let c=i.options[i.selected].completion;for(let u=0;uu.hasResult()?Math.min(c,u.from):c,1e8),create:Dq,above:o.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new rs(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new rs(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class af{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new af(Lq,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Xn),o=(r.override||n.languageDataAt("autocomplete",ma(n)).map(Pq)).map(l=>(this.active.find(u=>u.source==l)||new ui(l,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((l,c)=>l==this.active[c])&&(o=this.active);let a=this.open,s=e.effects.some(l=>l.is(fO));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Qq(o,this.active)||s?a=rs.build(o,n,this.id,a,r,s):a&&a.disabled&&!o.some(l=>l.isPending)&&(a=null),!a&&o.every(l=>!l.isPending)&&o.some(l=>l.hasResult())&&(o=o.map(l=>l.hasResult()?new ui(l.source,0):l));for(let l of e.effects)l.is(Lk)&&(a=a&&a.setSelected(l.value,this.id));return o==this.active&&a==this.open?this:new af(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Nq:zq}}function Qq(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Lq=[];function zk(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(dO);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ui{constructor(e,n,r=!1){this.source=e,this.state=n,this.explicit=r}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let r=zk(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new ui(i.source,0)),r&4&&i.state==0&&(i=new ui(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(of))i=new ui(i.source,1,o.value);else if(o.is(sc))i=new ui(i.source,0);else if(o.is(fO))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ma(e.state))}}class ds extends ui{constructor(e,n,r,i,o,a){super(e,3,n),this.limit=r,this.result=i,this.from=o,this.to=a}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=ma(e.state);if(s>a||!i||n&2&&(ma(e.startState)==this.from||sn.map(e))}}),Lk=Ot.define(),Qr=qn.define({create(){return af.start()},update(t,e){return t.update(e)},provide:t=>[Z0.from(t,e=>e.tooltip),Be.contentAttributes.from(t,e=>e.attrs)]});function hO(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Qr).active.find(i=>i.source==e.source);return r instanceof ds?(typeof n=="string"?t.dispatch({...wq(t.state,n,r.from,r.to),annotations:dO.of(e.completion)}):n(t,e.completion,r.from,r.to),!0):!1}const Dq=Mq(Qr,hO);function Eu(t,e="option"){return n=>{let r=n.state.field(Qr,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:Lk.of(s)}),!0}}const Bq=t=>{let e=t.state.field(Qr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Qr,!1)?(t.dispatch({effects:of.of(!0)}),!0):!1,Wq=t=>{let e=t.state.field(Qr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:sc.of(null)}),!0)};class Fq{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Vq=50,Hq=1e3,Xq=Mn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Qr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Qr),n=t.state.facet(Xn);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Qr)==e)return;let r=t.transactions.some(o=>{let a=zk(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;oVq&&Date.now()-a.time>Hq){for(let s of a.context.abortListeners)try{s()}catch(l){Nr(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(of)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.isPending&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Qr);for(let n of e.active)n.isPending&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Xn).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=ma(e),r=new Ak(e,n,t.explicit,this.view),i=new Fq(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:sc.of(null)}),Nr(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Xn).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Xn),r=this.view.state.field(Qr);for(let i=0;is.source==o.active.source);if(a&&a.isPending)if(o.done==null){let s=new ui(o.active.source,0);for(let l of o.updates)s=s.update(l,n);s.isPending||e.push(s)}else this.startQuery(a)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:fO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Qr,!1);if(e&&e.tooltip&&this.view.state.facet(Xn).closeOnBlur){let n=e.open&&OT(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:sc.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:of.of(!1)}),20),this.composing=0}}}),Zq=typeof navigator=="object"&&/Win/.test(navigator.platform),qq=Zo.highest(Be.domEventHandlers({keydown(t,e){let n=e.state.field(Qr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Zq&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&hO(e,r),!1}})),jk=Be.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Gq{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class pO{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,Jn.TrackDel),r=e.mapPos(this.to,1,Jn.TrackDel);return n==null||r==null?null:new pO(this.field,n,r)}}class mO{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let c=a,u=/^\t*/.exec(l)[0].length;for(let d=0;dnew pO(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",c=-1,u=l.replace(/\\[{}]/g,d=>d[1]);for(let d=0;d=c&&f.field++}for(let d of i)if(d.line==r.length&&d.from>o.index){let f=o[2]?3+(o[1]||"").length:2;d.from-=f,d.to-=f}i.push(new Gq(c,r.length,o.index,o.index+u.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,c)=>{for(let u of i)u.line==r.length&&u.from>c&&(u.from--,u.to--);return l}),r.push(a)}return new mO(r,i)}}let Yq=lt.widget({widget:new class extends to{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Uq=lt.mark({class:"cm-snippetField"});class Zs{constructor(e,n){this.ranges=e,this.active=n,this.deco=lt.set(e.map(r=>(r.from==r.to?Yq:Uq).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Zs(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Bc=Ot.define({map(t,e){return t&&t.map(e)}}),Kq=Ot.define(),lc=qn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Bc))return n.value;if(n.is(Kq)&&t)return new Zs(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Be.decorations.from(t,e=>e?e.deco:lt.none)});function gO(t,e){return Se.create(t.filter(n=>n.field==e).map(n=>Se.range(n.from,n.to)))}function Jq(t){let e=mO.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),{main:l}=n.state.selection,c={changes:{from:i,to:o==l.from?l.to:o,insert:Ft.of(a)},scrollIntoView:!0,annotations:r?[dO.of(r),zn.userEvent.of("input.complete")]:void 0};if(s.length&&(c.selection=gO(s,0)),s.some(u=>u.field>0)){let u=new Zs(s,0),d=c.effects=[Bc.of(u)];n.state.field(lc,!1)===void 0&&d.push(Ot.appendConfig.of([lc,iG,oG,jk]))}n.dispatch(n.state.update(c))}}function Dk(t){return({state:e,dispatch:n})=>{let r=e.field(lc,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:gO(r.ranges,i),effects:Bc.of(o?null:new Zs(r.ranges,i)),scrollIntoView:!0})),!0}}const eG=({state:t,dispatch:e})=>t.field(lc,!1)?(e(t.update({effects:Bc.of(null)})),!0):!1,tG=Dk(1),nG=Dk(-1),rG=[{key:"Tab",run:tG,shift:nG},{key:"Escape",run:eG}],bx=qe.define({combine(t){return t.length?t[0]:rG}}),iG=Zo.highest(Ac.compute([bx],t=>t.facet(bx)));function Mr(t,e){return{...e,apply:Jq(t)}}const oG=Be.domEventHandlers({mousedown(t,e){let n=e.state.field(lc,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:gO(n.ranges,i.field),effects:Bc.of(n.ranges.some(o=>o.field>i.field)?new Zs(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),cc={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},ua=Ot.define({map(t,e){let n=e.mapPos(t,-1,Jn.TrackAfter);return n??void 0}}),vO=new class extends $a{};vO.startSide=1;vO.endSide=-1;const Bk=qn.define({create(){return jt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(ua)&&(t=t.update({add:[vO.range(n.value,n.value+1)]}));return t}});function aG(){return[lG,Bk]}const Qp="()[]{}<>«»»«[]{}";function Wk(t){for(let e=0;e{if((sG?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Li(Er(r,0))==1||e!=i.from||n!=i.to)return!1;let o=dG(t.state,r);return o?(t.dispatch(o),!0):!1}),cG=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=Fk(t,t.selection.main.head).brackets||cc.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=fG(t.doc,a.head);for(let l of r)if(l==s&&hh(t.doc,a.head)==Wk(Er(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:Se.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},uG=[{key:"Backspace",run:cG}];function dG(t,e){let n=Fk(t,t.selection.main.head),r=n.brackets||cc.brackets;for(let i of r){let o=Wk(Er(i,0));if(e==i)return o==i?mG(t,i,r.indexOf(i+i+i)>-1,n):hG(t,i,o,n.before||cc.before);if(e==o&&Vk(t,t.selection.main.from))return pG(t,i,o)}return null}function Vk(t,e){let n=!1;return t.field(Bk).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function hh(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Li(Er(n,0)))}function fG(t,e){let n=t.sliceString(e-2,e);return Li(Er(n,0))==n.length?n:n.slice(1)}function hG(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:ua.of(a.to+e.length),range:Se.range(a.anchor+e.length,a.head+e.length)};let s=hh(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:ua.of(a.head+e.length),range:Se.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function pG(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&hh(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:Se.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function mG(t,e,n,r){let i=r.stringPrefixes||cc.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:ua.of(s.to+e.length),range:Se.range(s.anchor+e.length,s.head+e.length)};let l=s.head,c=hh(t.doc,l),u;if(c==e){if(yx(t,l))return{changes:{insert:e+e,from:l},effects:ua.of(l+e.length),range:Se.cursor(l+e.length)};if(Vk(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:Se.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(u=Sx(t,l-2*e.length,i))>-1&&yx(t,u))return{changes:{insert:e+e+e+e,from:l},effects:ua.of(l+e.length),range:Se.cursor(l+e.length)};if(t.charCategorizer(l)(c)!=Sn.Word&&Sx(t,l,i)>-1&&!gG(t,l,e,i))return{changes:{insert:e+e,from:l},effects:ua.of(l+e.length),range:Se.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function yx(t,e){let n=Fn(t).resolveInner(e+1);return n.parent&&n.from==e}function gG(t,e,n,r){let i=Fn(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let u=i.firstChild;for(;u&&u.from==i.from&&u.to-u.from>n.length+l;){if(t.sliceDoc(u.to-n.length,u.to)==n)return!1;u=u.firstChild}return!0}let c=i.to==e&&i.parent;if(!c)break;i=c}return!1}function Sx(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Sn.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=Sn.Word)return o}return-1}function vG(t={}){return[qq,Qr,Xn.of(t),Xq,OG,jk]}const Hk=[{key:"Ctrl-Space",run:Ap},{mac:"Alt-`",run:Ap},{mac:"Alt-i",run:Ap},{key:"Escape",run:Wq},{key:"ArrowDown",run:Eu(!0)},{key:"ArrowUp",run:Eu(!1)},{key:"PageDown",run:Eu(!0,"page")},{key:"PageUp",run:Eu(!1,"page")},{key:"Enter",run:Bq}],OG=Zo.highest(Ac.computeN([Xn],t=>t.facet(Xn).defaultKeymap?[Hk]:[]));class xx{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class ia{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=r.facet(uc).markerFilter;i&&(e=i(e,r));let o=e.slice().sort((u,d)=>u.from-d.from||u.to-d.to),a=new fo,s=[],l=0;for(let u=0;;){let d=u==o.length?null:o[u];if(!d&&!s.length)break;let f,h;for(s.length?(f=l,h=s.reduce((m,g)=>Math.min(m,g.to),d&&d.from>f?d.from:1e8)):(f=d.from,h=d.to,s.push(d),u++);um.from||m.to==f))s.push(m),u++,h=Math.min(m.to,h);else{h=Math.min(m.from,h);break}}let p=IG(s);if(s.some(m=>m.from==m.to||m.from==m.to-1&&r.doc.lineAt(m.from).to==m.from))a.add(f,f,lt.widget({widget:new _G(p),diagnostics:s.slice()}));else{let m=s.reduce((g,v)=>v.markClass?g+" "+v.markClass:g,"");a.add(f,h,lt.mark({class:"cm-lintRange cm-lintRange-"+p+m,diagnostics:s.slice(),inclusiveEnd:s.some(g=>g.to>h)}))}l=h;for(let m=0;m{if(!(e&&a.diagnostics.indexOf(e)<0))if(!r)r=new xx(i,o,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new xx(r.from,o,r.diagnostic)}}),r}function bG(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(uc).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(Xk))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function yG(t,e){return t.field(Kr,!1)?e:e.concat(Ot.appendConfig.of(MG))}const Xk=Ot.define(),OO=Ot.define(),Zk=Ot.define(),Kr=qn.define({create(){return new ia(lt.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=Rs(n,t.selected.diagnostic,o)||Rs(n,null,o)}!n.size&&i&&e.state.facet(uc).autoPanel&&(i=null),t=new ia(n,i,r)}for(let n of e.effects)if(n.is(Xk)){let r=e.state.facet(uc).autoPanel?n.value.length?dc.open:null:t.panel;t=ia.init(n.value,r,e.state)}else n.is(OO)?t=new ia(t.diagnostics,n.value?dc.open:null,t.selected):n.is(Zk)&&(t=new ia(t.diagnostics,t.panel,n.value));return t},provide:t=>[nc.from(t,e=>e.panel),Be.decorations.from(t,e=>e.diagnostics)]}),SG=lt.mark({class:"cm-lintRange cm-lintRange-active"});function xG(t,e,n){let{diagnostics:r}=t.state.field(Kr),i,o=-1,a=-1;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,c,{spec:u})=>{if(e>=l&&e<=c&&(l==c||(e>l||n>0)&&(eGk(t,n,!1)))}const $G=t=>{let e=t.state.field(Kr,!1);(!e||!e.panel)&&t.dispatch({effects:yG(t.state,[OO.of(!0)])});let n=tc(t,dc.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},Cx=t=>{let e=t.state.field(Kr,!1);return!e||!e.panel?!1:(t.dispatch({effects:OO.of(!1)}),!0)},wG=t=>{let e=t.state.field(Kr,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},PG=[{key:"Mod-Shift-m",run:$G,preventDefault:!0},{key:"F8",run:wG}],uc=qe.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},eo(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function qk(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;ro.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function Gk(t,e,n){var r;let i=n?qk(e.actions):[];return on("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},on("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=Rs(t.state.field(Kr).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:c}=o,u=i[a]?c.indexOf(i[a]):-1,d=u<0?c:[c.slice(0,u),on("u",c.slice(u,u+1)),c.slice(u+1)];return on("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${i[a]})"`}.`},d)}),e.source&&on("div",{class:"cm-diagnosticSource"},e.source))}class _G extends to{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return on("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class $x{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Gk(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class dc{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)Cx(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=qk(o.actions);for(let s=0;s{for(let o=0;oCx(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Kr).selected;if(!e)return-1;for(let n=0;n{for(let u of c.diagnostics){if(a.has(u))continue;a.add(u);let d=-1,f;for(let h=r;hr&&(this.items.splice(r,d-r),i=!0)),n&&f.diagnostic==n.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),o=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),r++}});r({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:s,panel:l})=>{let c=l.height/this.list.offsetHeight;s.topl.bottom&&(this.list.scrollTop+=(s.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Kr),r=Rs(n.diagnostics,this.items[e].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:Zk.of(r)})}static open(e){return new dc(e)}}function TG(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Au(t){return TG(``,'width="6" height="3"')}const kG=Be.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Au("#d11")},".cm-lintRange-warning":{backgroundImage:Au("orange")},".cm-lintRange-info":{backgroundImage:Au("#999")},".cm-lintRange-hint":{backgroundImage:Au("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function RG(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function IG(t){let e="hint",n=1;for(let r of t){let i=RG(r.severity);i>n&&(n=i,e=r.severity)}return e}const MG=[Kr,Be.decorations.compute([Kr],t=>{let{selected:e,panel:n}=t.field(Kr);return!e||!n||e.from==e.to?lt.none:lt.set([SG.range(e.from,e.to)])}),bH(xG,{hideOn:bG}),kG];var wx=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,r=[];e.closeBracketsKeymap!==!1&&(r=r.concat(uG)),e.defaultKeymap!==!1&&(r=r.concat(ZZ)),e.searchKeymap!==!1&&(r=r.concat(bq)),e.historyKeymap!==!1&&(r=r.concat(nZ)),e.foldKeymap!==!1&&(r=r.concat(gX)),e.completionKeymap!==!1&&(r=r.concat(Hk)),e.lintKeymap!==!1&&(r=r.concat(PG));var i=[];return e.lineNumbers!==!1&&i.push(RH()),e.highlightActiveLineGutter!==!1&&i.push(EH()),e.highlightSpecialChars!==!1&&i.push(qV()),e.history!==!1&&i.push(ZX()),e.foldGutter!==!1&&i.push(yX()),e.drawSelection!==!1&&i.push(zV()),e.dropCursor!==!1&&i.push(WV()),e.allowMultipleSelections!==!1&&i.push(Qt.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&i.push(sX()),e.syntaxHighlighting!==!1&&i.push(FT($X,{fallback:!0})),e.bracketMatching!==!1&&i.push(IX()),e.closeBrackets!==!1&&i.push(aG()),e.autocompletion!==!1&&i.push(vG()),e.rectangularSelection!==!1&&i.push(lH()),n!==!1&&i.push(dH()),e.highlightActiveLine!==!1&&i.push(eH()),e.highlightSelectionMatches!==!1&&i.push(eq()),e.tabSize&&typeof e.tabSize=="number"&&i.push(Nc.of(" ".repeat(e.tabSize))),i.concat([Ac.of(r.flat())]).filter(Boolean)};const EG="#e5c07b",Px="#e06c75",AG="#56b6c2",QG="#ffffff",ld="#abb2bf",Yg="#7d8799",NG="#61afef",zG="#98c379",_x="#d19a66",LG="#c678dd",jG="#21252b",Tx="#2c313a",kx="#282c34",Np="#353a42",DG="#3E4451",Rx="#528bff",BG=Be.theme({"&":{color:ld,backgroundColor:kx},".cm-content":{caretColor:Rx},".cm-cursor, .cm-dropCursor":{borderLeftColor:Rx},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:DG},".cm-panels":{backgroundColor:jG,color:ld},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:kx,color:Yg,border:"none"},".cm-activeLineGutter":{backgroundColor:Tx},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Np},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Np,borderBottomColor:Np},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Tx,color:ld}}},{dark:!0}),WG=Lc.define([{tag:U.keyword,color:LG},{tag:[U.name,U.deleted,U.character,U.propertyName,U.macroName],color:Px},{tag:[U.function(U.variableName),U.labelName],color:NG},{tag:[U.color,U.constant(U.name),U.standard(U.name)],color:_x},{tag:[U.definition(U.name),U.separator],color:ld},{tag:[U.typeName,U.className,U.number,U.changed,U.annotation,U.modifier,U.self,U.namespace],color:EG},{tag:[U.operator,U.operatorKeyword,U.url,U.escape,U.regexp,U.link,U.special(U.string)],color:AG},{tag:[U.meta,U.comment],color:Yg},{tag:U.strong,fontWeight:"bold"},{tag:U.emphasis,fontStyle:"italic"},{tag:U.strikethrough,textDecoration:"line-through"},{tag:U.link,color:Yg,textDecoration:"underline"},{tag:U.heading,fontWeight:"bold",color:Px},{tag:[U.atom,U.bool,U.special(U.variableName)],color:_x},{tag:[U.processingInstruction,U.string,U.inserted],color:zG},{tag:U.invalid,color:QG}]),FG=[BG,FT(WG)];var VG=Be.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),HG=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:r=!0,readOnly:i=!1,theme:o="light",placeholder:a="",basicSetup:s=!0}=e,l=[];switch(n&&l.unshift(Ac.of([qZ])),s&&(typeof s=="boolean"?l.unshift(wx()):l.unshift(wx(s))),a&&l.unshift(iH(a)),o){case"light":l.push(VG);break;case"dark":l.push(FG);break;case"none":break;default:l.push(o);break}return r===!1&&l.push(Be.editable.of(!1)),i&&l.push(Qt.readOnly.of(!0)),[...l]},XG=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class ZG{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(r){console.error("TimeoutLatch callback error:",r)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class Ix{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var zp=null,qG=()=>typeof window>"u"?new Ix:(zp||(zp=new Ix),zp),Mx=Ji.define(),GG=200,YG=[];function UG(t){var{value:e,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:a,extensions:s=YG,autoFocus:l,theme:c="light",height:u=null,minHeight:d=null,maxHeight:f=null,width:h=null,minWidth:p=null,maxWidth:m=null,placeholder:g="",editable:v=!0,readOnly:O=!1,indentWithTab:S=!0,basicSetup:C=!0,root:b,initialState:x}=t,[$,w]=K(),[P,_]=K(),[T,k]=K(),R=K(()=>({current:null}))[0],I=K(()=>({current:null}))[0],Q=Be.theme({"&":{height:u,minHeight:d,maxHeight:f,width:h,minWidth:p,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),E=Be.updateListener.of(L=>{if(L.docChanged&&typeof r=="function"&&!L.transactions.some(X=>X.annotation(Mx))){R.current?R.current.reset():(R.current=new ZG(()=>{if(I.current){var X=I.current;I.current=null,X()}R.current=null},GG),qG().add(R.current));var z=L.state.doc,V=z.toString();r(V,L)}i&&i(XG(L))}),A=HG({theme:c,editable:v,readOnly:O,placeholder:g,indentWithTab:S,basicSetup:C}),N=[E,Q,...A];return a&&typeof a=="function"&&N.push(Be.updateListener.of(a)),N=N.concat(s),Ti(()=>{if($&&!T){var L={doc:e,selection:n,extensions:N},z=x?Qt.fromJSON(x.json,L,x.fields):Qt.create(L);if(k(z),!P){var V=new Be({state:z,parent:$,root:b});_(V),o&&o(V,z)}}return()=>{P&&(k(void 0),_(void 0))}},[$,T]),be(()=>{t.container&&w(t.container)},[t.container]),be(()=>()=>{P&&(P.destroy(),_(void 0)),R.current&&(R.current.cancel(),R.current=null)},[P]),be(()=>{l&&P&&P.focus()},[l,P]),be(()=>{P&&P.dispatch({effects:Ot.reconfigure.of(N)})},[c,s,u,d,f,h,p,m,g,v,O,S,C,r,a]),be(()=>{if(e!==void 0){var L=P?P.state.doc.toString():"";if(P&&e!==L){var z=R.current&&!R.current.isDone,V=()=>{P&&e!==P.state.doc.toString()&&P.dispatch({changes:{from:0,to:P.state.doc.toString().length,insert:e||""},annotations:[Mx.of(!0)]})};z?I.current=V:V()}}},[e,P]),{state:T,setState:k,view:P,setView:_,container:$,setContainer:w}}var KG=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],bO=ye((t,e)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:d="light",height:f,minHeight:h,maxHeight:p,width:m,minWidth:g,maxWidth:v,basicSetup:O,placeholder:S,indentWithTab:C,editable:b,readOnly:x,root:$,initialState:w}=t,P=GC(t,KG),_=Y(null),{state:T,view:k,container:R,setContainer:I}=UG({root:$,value:r,autoFocus:u,theme:d,height:f,minHeight:h,maxHeight:p,width:m,minWidth:g,maxWidth:v,basicSetup:O,placeholder:S,indentWithTab:C,editable:b,readOnly:x,selection:i,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:c,extensions:o,initialState:w});Yt(e,()=>({editor:_.current,state:T,view:k}),[_,R,T,k]);var Q=Ht(A=>{_.current=A,I(A)},[I]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var E=typeof d=="string"?"cm-theme-"+d:"cm-theme";return M("div",xe({ref:Q,className:""+E+(n?" "+n:"")},P))});bO.displayName="CodeMirror";var Ex={};class sf{constructor(e,n,r,i,o,a,s,l,c,u=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=a,this.buffer=s,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new sf(e,[],n,r,r,0,[],0,i?new Ax(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4);else{let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new sf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new JG(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if(!(r&65536))return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,a;ol&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,c=this.stack.length-s*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ax{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class JG{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class lf{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new lf(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new lf(this.stack,this.pos,this.index)}}function vl(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class cd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Qx=new cd;class eY{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Qx,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;or.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n=this.chunk2Pos&&rs.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Qx,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class fs{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;Yk(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}fs.prototype.contextual=fs.prototype.fallback=fs.prototype.extend=!1;class Ug{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?vl(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(Yk(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Ug.prototype.contextual=fs.prototype.fallback=fs.prototype.extend=!1;class bo{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Yk(t,e,n,r,i,o){let a=0,s=1<0){let p=t[h];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||tY(p,e.token.value,i,o))){e.acceptToken(p);break}}let u=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[c+f*3-3]==65535){a=t[c+f*3-1];continue e}for(;d>1,p=c+h+(h<<1),m=t[p],g=t[p+1]||65536;if(u=g)d=h+1;else{a=t[p+2],e.advance();continue e}}break}}function Nx(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function tY(t,e,n,r){let i=Nx(n,r,e);return i<0||Nx(n,r,t)e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class nY{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?zx(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?zx(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(o instanceof Ln){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}}class rY{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new cd)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!u.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new cd,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new cd,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a=0&&r.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;oe.bufferLength*4?new nY(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&aY(i);if(a)return Xr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw Xr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return Xr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a500&&c.buffer.length>500)if((s.score-c.score||s.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!c||(d.prop(Tt.contextHash)||0)==u))return e.useNode(d,f),Xr&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Ln)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof Ln&&d.positions[0]==0)d=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),Xr&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;ci?n.push(p):r.push(p)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Lx(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),Xr&&console.log(u+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=u;for(let h=0;d.forceReduce()&&h<10&&(Xr&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)Xr&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))Xr&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(c==s.pos&&(c++,l=0),s.recoverByDelete(l,c),Xr&&console.log(u+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Lx(s,r)):(!i||i.scoret;class Uk{constructor(e){this.start=e.start,this.shift=e.shift||jp,this.reduce=e.reduce||jp,this.reuse=e.reuse||jp,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class fc extends PT{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),i=[];for(let s=0;s=0)o(u,l,s[c++]);else{let d=s[c+-u];for(let f=-u;f>0;f--)o(s[c++],l,d);c++}}}this.nodeSet=new q0(n.map((s,l)=>jr.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=xT;let a=vl(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new fs(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new iY(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let c=o+(a>>1);o0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=io(this.data,o+2);else break;i=n(io(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=io(this.data,r+2);else break;if(!(this.data[r+2]&1)){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(fc.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=jx(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;or)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,r)<<1|e}return t.get}const sY=316,lY=317,Dx=1,cY=2,uY=3,dY=4,fY=318,hY=320,pY=321,mY=5,gY=6,vY=0,Kg=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Kk=125,OY=59,Jg=47,bY=42,yY=43,SY=45,xY=60,CY=44,$Y=63,wY=46,PY=91,_Y=new Uk({start:!1,shift(t,e){return e==mY||e==gY||e==hY?t:e==pY},strict:!1}),TY=new bo((t,e)=>{let{next:n}=t;(n==Kk||n==-1||e.context)&&t.acceptToken(fY)},{contextual:!0,fallback:!0}),kY=new bo((t,e)=>{let{next:n}=t,r;Kg.indexOf(n)>-1||n==Jg&&((r=t.peek(1))==Jg||r==bY)||n!=Kk&&n!=OY&&n!=-1&&!e.context&&t.acceptToken(sY)},{contextual:!0}),RY=new bo((t,e)=>{t.next==PY&&!e.context&&t.acceptToken(lY)},{contextual:!0}),IY=new bo((t,e)=>{let{next:n}=t;if(n==yY||n==SY){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(Dx);t.acceptToken(r?Dx:cY)}}else n==$Y&&t.peek(1)==wY&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(uY))},{contextual:!0});function Dp(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const MY=new bo((t,e)=>{if(t.next!=xY||!e.dialectEnabled(vY)||(t.advance(),t.next==Jg))return;let n=0;for(;Kg.indexOf(t.next)>-1;)t.advance(),n++;if(Dp(t.next,!0)){for(t.advance(),n++;Dp(t.next,!1);)t.advance(),n++;for(;Kg.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==CY)return;for(let r=0;;r++){if(r==7){if(!Dp(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(dY,-n)}),EY=K0({"get set async static":U.modifier,"for while do if else switch try catch finally return throw break continue default case defer":U.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":U.operatorKeyword,"let var const using function class extends":U.definitionKeyword,"import export from":U.moduleKeyword,"with debugger new":U.keyword,TemplateString:U.special(U.string),super:U.atom,BooleanLiteral:U.bool,this:U.self,null:U.null,Star:U.modifier,VariableName:U.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":U.function(U.variableName),VariableDefinition:U.definition(U.variableName),Label:U.labelName,PropertyName:U.propertyName,PrivatePropertyName:U.special(U.propertyName),"CallExpression/MemberExpression/PropertyName":U.function(U.propertyName),"FunctionDeclaration/VariableDefinition":U.function(U.definition(U.variableName)),"ClassDeclaration/VariableDefinition":U.definition(U.className),"NewExpression/VariableName":U.className,PropertyDefinition:U.definition(U.propertyName),PrivatePropertyDefinition:U.definition(U.special(U.propertyName)),UpdateOp:U.updateOperator,"LineComment Hashbang":U.lineComment,BlockComment:U.blockComment,Number:U.number,String:U.string,Escape:U.escape,ArithOp:U.arithmeticOperator,LogicOp:U.logicOperator,BitOp:U.bitwiseOperator,CompareOp:U.compareOperator,RegExp:U.regexp,Equals:U.definitionOperator,Arrow:U.function(U.punctuation),": Spread":U.punctuation,"( )":U.paren,"[ ]":U.squareBracket,"{ }":U.brace,"InterpolationStart InterpolationEnd":U.special(U.brace),".":U.derefOperator,", ;":U.separator,"@":U.meta,TypeName:U.typeName,TypeDefinition:U.definition(U.typeName),"type enum interface implements namespace module declare":U.definitionKeyword,"abstract global Privacy readonly override":U.modifier,"is keyof unique infer asserts":U.operatorKeyword,JSXAttributeValue:U.attributeValue,JSXText:U.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":U.angleBracket,"JSXIdentifier JSXNameSpacedName":U.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":U.attributeName,"JSXBuiltin/JSXIdentifier":U.standard(U.tagName)}),AY={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},QY={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},NY={__proto__:null,"<":193},zY=fc.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FeOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ!0Lb'#Jv'#JvO%[QlO'#JvOOQO'#Jy'#JyOOQO'#Ih'#IhOCQQpO'#EgOOQ!0Lb'#Ef'#EfOOQ!0Lb'#J}'#J}OC|Q!0MSO'#EgODWQpO'#EWOOQO'#Jx'#JxODlQpO'#JyOEyQpO'#EWODWQpO'#EgPFWO&2DjO'#CbPOOO)CD})CD}OOOO'#I`'#I`OFcO#tO,59UOOQ!0Lh,59U,59UOOOO'#Ia'#IaOFqO&jO,59UOGPQ!L^O'#DcOOOO'#Ic'#IcOGWO#@ItO,59{OOQ!0Lf,59{,59{OGfQlO'#IdOGyQ`O'#JtOIxQ!fO'#JtO+}QlO'#JtOJPQ`O,5:ROJgQ`O'#EpOJtQ`O'#KTOKPQ`O'#KSOKPQ`O'#KSOKXQ`O,5;^OK^Q`O'#KROOQ!0Ln,5:^,5:^OKeQlO,5:^OMcQ!0MxO,5:fONSQ`O,5:nONmQ!0LrO'#KQONtQ`O'#KPO9eQ`O'#KPO! YQ`O'#KPO! bQ`O,5;]O! gQ`O'#KPO!#lQ!fO'#JsOOQ!0Lh'#Ci'#CiO%[QlO'#ESO!$[Q!fO,5:sOOQS'#Jz'#JzOOQO-EtOOQ['#Jh'#JhOOQ[,5>u,5>uOOQ[-E<]-E<]O!TO`QlO,5>VO!LOQ`O,5>XO`QlO,5>ZO!LTQ`O,5>^O!LYQlO,5>dOOQ[,5>j,5>jO%[QlO,5>jO9uQ!0LrO,5>lOOQ[,5>n,5>nO#!dQ`O,5>nOOQ[,5>p,5>pO#!dQ`O,5>pOOQ[,5>r,5>rO##QQpO'#D_O%[QlO'#JvO##sQpO'#JvO##}QpO'#DmO#$`QpO'#DmO#&qQlO'#DmO#&xQ`O'#JuO#'QQ`O,5:WO#'VQ`O'#EtO#'eQ`O'#KUO#'mQ`O,5;_O#'rQpO'#DmO#(PQpO'#EVOOQ!0Lf,5:o,5:oO%[QlO,5:oO#(WQ`O,5:oO?YQ`O,5;YO!CUQpO,5;YO!C^QMhO,5;YO:dQMhO,5;YO#(`Q`O,5@bO#(eQ07dO,5:sOOQO-EPO$6^Q`O,5>POOQ[1G3i1G3iO`QlO1G3iOOQ[1G3o1G3oOOQ[1G3q1G3qO?TQ`O1G3sO$6cQlO1G3uO$:gQlO'#HtOOQ[1G3x1G3xO$:tQ`O'#HzO?YQ`O'#H|OOQ[1G4O1G4OO$:|QlO1G4OO9uQ!0LrO1G4UOOQ[1G4W1G4WOOQ!0Lb'#G_'#G_O9uQ!0LrO1G4YO9uQ!0LrO1G4[O$?TQ`O,5@bO!)[QlO,5;`O9eQ`O,5;`O?YQ`O,5:XO!)[QlO,5:XO!CUQpO,5:XO$?YQ?MtO,5:XOOQO,5;`,5;`O$?dQpO'#IeO$?zQ`O,5@aOOQ!0Lf1G/r1G/rO$@SQpO'#IkO$@^Q`O,5@pOOQ!0Lb1G0y1G0yO#$`QpO,5:XOOQO'#Ig'#IgO$@fQpO,5:qOOQ!0Ln,5:q,5:qO#(ZQ`O1G0ZOOQ!0Lf1G0Z1G0ZO%[QlO1G0ZOOQ!0Lf1G0t1G0tO?YQ`O1G0tO!CUQpO1G0tO!C^QMhO1G0tOOQ!0Lb1G5|1G5|O!ByQ!0LrO1G0^OOQO1G0m1G0mO%[QlO1G0mO$@mQ!0LrO1G0mO$@xQ!0LrO1G0mO!CUQpO1G0^ODWQpO1G0^O$AWQ!0LrO1G0mOOQO1G0^1G0^O$AlQ!0MxO1G0mPOOO-E<[-E<[POOO1G.h1G.hOOOO1G/i1G/iO$AvQ!bO,5QQpO,5@}OOQ!0Lb1G3c1G3cOOQ[7+$V7+$VO@zQ`O7+$VO9uQ!0LrO7+$VO%>]Q`O7+$VO%[QlO1G6lO%[QlO1G6mO%>bQ!0LrO1G6lO%>lQlO1G3kO%>sQ`O1G3kO%>xQlO1G3kOOQ[7+)T7+)TO9uQ!0LrO7+)_O`QlO7+)aOOQ['#Kh'#KhOOQ['#JS'#JSO%?PQlO,5>`OOQ[,5>`,5>`O%[QlO'#HuO%?^Q`O'#HwOOQ[,5>f,5>fO9eQ`O,5>fOOQ[,5>h,5>hOOQ[7+)j7+)jOOQ[7+)p7+)pOOQ[7+)t7+)tOOQ[7+)v7+)vO%?cQpO1G5|O%?}Q?MtO1G0zO%@XQ`O1G0zOOQO1G/s1G/sO%@dQ?MtO1G/sO?YQ`O1G/sO!)[QlO'#DmOOQO,5?P,5?POOQO-ERQ`O7+,WO&>WQ`O7+,XO%[QlO7+,WO%[QlO7+,XOOQ[7+)V7+)VO&>]Q`O7+)VO&>bQlO7+)VO&>iQ`O7+)VOOQ[<nQ`O,5>aOOQ[,5>c,5>cO&>sQ`O1G4QO9eQ`O7+&fO!)[QlO7+&fOOQO7+%_7+%_O&>xQ?MtO1G6ZO?YQ`O7+%_OOQ!0Lf<yQ?MvO,5?aO'@|Q?MvO,5?cO'CPQ?MvO7+'|O'DuQMjOG27TOOQO<VO!l$xO#jROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]$_Oa$qa'z$qa'w$qa!k$qa!Y$qa!_$qa%i$qa!g$qa~Ol)dO~P!&zOh%VOp%WOr%XOs$tOt$tOz%YO|%ZO!O%]O!S${O!_$|O!i%bO!l$xO#j%cO$W%`O$t%^O$v%_O$y%aO(T(vO(VTO(YUO(a$uO(y$}O(z%PO~Og(pP~P!,TO!Q)iO!g)hO!_$^X$Z$^X$]$^X$_$^X$f$^X~O!g)hO!_({X$Z({X$]({X$_({X$f({X~O!Q)iO~P!.^O!Q)iO!_({X$Z({X$]({X$_({X$f({X~O!_)kO$Z)oO$])jO$_)jO$f)pO~O![)sO~P!)[O$]$hO$_$gO$f)wO~On$zX!Q$zX#S$zX'y$zX(y$zX(z$zX~OgmXg$zXnmX!]mX#`mX~P!0SOx)yO(b)zO(c)|O~On*VO!Q*OO'y*PO(y$}O(z%PO~Og)}O~P!1WOg*WO~Oh%VOr%XOs$tOt$tOz%YO|%ZO!OVO!l$xO#jVO!l$xO#jROe!iOpkOrPO(VTO(YUO(aVO(o[O~O(T=QO~P#$qO!]-]O!^(iX~O!^-_O~O!g-VO#`-UO!]#hX!^#hX~O!]-`O!^(xX~O!^-bO~O!c-cO!d-cO(U!lO~P#$`O!^-fO~P'_On-iO!_'`O~O!Y-nO~Os!{a!b!{a!c!{a!d!{a#T!{a#U!{a#V!{a#W!{a#X!{a#[!{a#]!{a(U!{a(V!{a(Y!{a(e!{a(o!{a~P!#vO!p-sO#`-qO~PChO!c-uO!d-uO(U!lO~PDWOa%nO#`-qO'z%nO~Oa%nO!g#vO#`-qO'z%nO~Oa%nO!g#vO!p-sO#`-qO'z%nO(r'pO~O(P'xO(Q'xO(R-zO~Ov-{O~O!Y'Wa!]'Wa~P!:tO![.PO!Y'WX!]'WX~P%[O!](VO!Y(ha~O!Y(ha~PHRO!](^O!Y(va~O!S%hO![.TO!_%iO(T%gO!Y'^X!]'^X~O#`.VO!](ta!k(taa(ta'z(ta~O!g#vO~P#,wO!](jO!k(sa~O!S%hO!_%iO#j.ZO(T%gO~Op.`O!S%hO![.]O!_%iO!|]O#i._O#j.]O(T%gO!]'aX!k'aX~OR.dO!l#xO~Oh%VOn.gO!_'`O%i.fO~Oa#ci!]#ci'z#ci'w#ci!Y#ci!k#civ#ci!_#ci%i#ci!g#ci~P!:tOn>]O!Q*OO'y*PO(y$}O(z%PO~O#k#_aa#_a#`#_a'z#_a!]#_a!k#_a!_#_a!Y#_a~P#/sO#k(`XP(`XR(`X[(`Xa(`Xj(`Xr(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X'z(`X(a(`X(r(`X!k(`X!Y(`X'w(`Xv(`X!_(`X%i(`X!g(`X~P!6kO!].tO!k(kX~P!:tO!k.wO~O!Y.yO~OP$[OR#zO!Q#yO!S#{O!l#xO!p$[O(aVO[#mia#mij#mir#mi!]#mi#R#mi#o#mi#p#mi#q#mi#r#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#n#mi~P#3cO#n$OO~P#3cOP$[OR#zOr$aO!Q#yO!S#{O!l#xO!p$[O#n$OO#o$PO#p$PO#q$PO(aVO[#mia#mij#mi!]#mi#R#mi#s#mi#t#mi#u#mi#v#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#r#mi~P#6QO#r$QO~P#6QOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO(aVOa#mi!]#mi#x#mi#z#mi#{#mi'z#mi(r#mi(y#mi(z#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#v#mi~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO(aVO(z#}Oa#mi!]#mi#z#mi#{#mi'z#mi(r#mi(y#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#x$UO~P#;VO#x#mi~P#;VO#v$SO~P#8oOP$[OR#zO[$cOj$ROr$aO!Q#yO!S#{O!l#xO!p$[O#R$RO#n$OO#o$PO#p$PO#q$PO#r$QO#s$RO#t$RO#u$bO#v$SO#x$UO(aVO(y#|O(z#}Oa#mi!]#mi#{#mi'z#mi(r#mi'w#mi!Y#mi!k#miv#mi!_#mi%i#mi!g#mi~O#z#mi~P#={O#z$WO~P#={OP]XR]X[]Xj]Xr]X!Q]X!S]X!l]X!p]X#R]X#S]X#`]X#kfX#n]X#o]X#p]X#q]X#r]X#s]X#t]X#u]X#v]X#x]X#z]X#{]X$Q]X(a]X(r]X(y]X(z]X!]]X!^]X~O$O]X~P#@jOP$[OR#zO[]O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P#EyO!]/POg(pX~P!1WOg/RO~Oa$Pi!]$Pi'z$Pi'w$Pi!Y$Pi!k$Piv$Pi!_$Pi%i$Pi!g$Pi~P!:tO$]/SO$_/SO~O$]/TO$_/TO~O!g)hO#`/UO!_$cX$Z$cX$]$cX$_$cX$f$cX~O![/VO~O!_)kO$Z/XO$])jO$_)jO$f/YO~O!]VO!l$xO#j^O!Q*OO'y*PO(y$}O(z%POP#miR#mi!S#mi!l#mi!p#mi#n#mi#o#mi#p#mi#q#mi(a#mi~P&,QO#S$dOP(`XR(`X[(`Xj(`Xn(`Xr(`X!Q(`X!S(`X!l(`X!p(`X#R(`X#n(`X#o(`X#p(`X#q(`X#r(`X#s(`X#t(`X#u(`X#v(`X#x(`X#z(`X#{(`X$O(`X'y(`X(a(`X(r(`X(y(`X(z(`X!](`X!^(`X~O$O$Pi!]$Pi!^$Pi~P#BwO$O!ri!^!ri~P$+oOg']a!]']a~P!1WO!^7nO~O!]'da!^'da~P#BwO!Y7oO~P#/sO!g#vO(r'pO!]'ea!k'ea~O!]/pO!k)Oi~O!]/pO!g#vO!k)Oi~Og$|q!]$|q#`$|q$O$|q~P!1WO!Y'ga!]'ga~P#/sO!g7vO~O!]/yO!Y)Pi~P#/sO!]/yO!Y)Pi~O!Y7yO~Oh%VOr8OO!l%eO(r'pO~Oj8QO!g#vO~Or8TO!g#vO(r'pO~O!Q*OO'y*PO(z%POn'ja(y'ja!]'ja#`'ja~Og'ja$O'ja~P&5RO!Q*OO'y*POn'la(y'la(z'la!]'la#`'la~Og'la$O'la~P&5tOg(_q!](_q~P!1WO#`8VOg(_q!](_q~P!1WO!Y8WO~Og%Oq!]%Oq#`%Oq$O%Oq~P!1WOa$oy!]$oy'z$oy'w$oy!Y$oy!k$oyv$oy!_$oy%i$oy!g$oy~P!:tO!g6rO~O!]5[O!_)Qa~O!_'`OP$TaR$Ta[$Taj$Tar$Ta!Q$Ta!S$Ta!]$Ta!l$Ta!p$Ta#R$Ta#n$Ta#o$Ta#p$Ta#q$Ta#r$Ta#s$Ta#t$Ta#u$Ta#v$Ta#x$Ta#z$Ta#{$Ta(a$Ta(r$Ta(y$Ta(z$Ta~O%i7WO~P&8fO%^8[Oa%[i!_%[i'z%[i!]%[i~Oa#cy!]#cy'z#cy'w#cy!Y#cy!k#cyv#cy!_#cy%i#cy!g#cy~P!:tO[8^O~Ob8`O(T+qO(VTO(YUO~O!]1TO!^)Xi~O`8dO~O(e(|O!]'pX!^'pX~O!]5uO!^)Ua~O!^8nO~P%;eO(o!sO~P$&YO#[8oO~O!_1oO~O!_1oO%i8qO~On8tO!_1oO%i8qO~O[8yO!]'sa!^'sa~O!]1zO!^)Vi~O!k8}O~O!k9OO~O!k9RO~O!k9RO~P%[Oa9TO~O!g9UO~O!k9VO~O!](wi!^(wi~P#BwOa%nO#`9_O'z%nO~O!](ty!k(tya(ty'z(ty~P!:tO!](jO!k(sy~O%i9bO~P&8fO!_'`O%i9bO~O#k$|qP$|qR$|q[$|qa$|qj$|qr$|q!S$|q!]$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q'z$|q(a$|q(r$|q!k$|q!Y$|q'w$|q#`$|qv$|q!_$|q%i$|q!g$|q~P#/sO#k'jaP'jaR'ja['jaa'jaj'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja'z'ja(a'ja(r'ja!k'ja!Y'ja'w'jav'ja!_'ja%i'ja!g'ja~P&5RO#k'laP'laR'la['laa'laj'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la'z'la(a'la(r'la!k'la!Y'la'w'lav'la!_'la%i'la!g'la~P&5tO#k%OqP%OqR%Oq[%Oqa%Oqj%Oqr%Oq!S%Oq!]%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq'z%Oq(a%Oq(r%Oq!k%Oq!Y%Oq'w%Oq#`%Oqv%Oq!_%Oq%i%Oq!g%Oq~P#/sO!]'Yi!k'Yi~P!:tO$O#cq!]#cq!^#cq~P#BwO(y$}OP%aaR%aa[%aaj%aar%aa!S%aa!l%aa!p%aa#R%aa#n%aa#o%aa#p%aa#q%aa#r%aa#s%aa#t%aa#u%aa#v%aa#x%aa#z%aa#{%aa$O%aa(a%aa(r%aa!]%aa!^%aa~On%aa!Q%aa'y%aa(z%aa~P&IyO(z%POP%caR%ca[%caj%car%ca!S%ca!l%ca!p%ca#R%ca#n%ca#o%ca#p%ca#q%ca#r%ca#s%ca#t%ca#u%ca#v%ca#x%ca#z%ca#{%ca$O%ca(a%ca(r%ca!]%ca!^%ca~On%ca!Q%ca'y%ca(y%ca~P&LQOn>^O!Q*OO'y*PO(z%PO~P&IyOn>^O!Q*OO'y*PO(y$}O~P&LQOR0kO!Q0kO!S0lO#S$dOP}a[}aj}an}ar}a!l}a!p}a#R}a#n}a#o}a#p}a#q}a#r}a#s}a#t}a#u}a#v}a#x}a#z}a#{}a$O}a'y}a(a}a(r}a(y}a(z}a!]}a!^}a~O!Q*OO'y*POP$saR$sa[$saj$san$sar$sa!S$sa!l$sa!p$sa#R$sa#n$sa#o$sa#p$sa#q$sa#r$sa#s$sa#t$sa#u$sa#v$sa#x$sa#z$sa#{$sa$O$sa(a$sa(r$sa(y$sa(z$sa!]$sa!^$sa~O!Q*OO'y*POP$uaR$ua[$uaj$uan$uar$ua!S$ua!l$ua!p$ua#R$ua#n$ua#o$ua#p$ua#q$ua#r$ua#s$ua#t$ua#u$ua#v$ua#x$ua#z$ua#{$ua$O$ua(a$ua(r$ua(y$ua(z$ua!]$ua!^$ua~On>^O!Q*OO'y*PO(y$}O(z%PO~OP%TaR%Ta[%Taj%Tar%Ta!S%Ta!l%Ta!p%Ta#R%Ta#n%Ta#o%Ta#p%Ta#q%Ta#r%Ta#s%Ta#t%Ta#u%Ta#v%Ta#x%Ta#z%Ta#{%Ta$O%Ta(a%Ta(r%Ta!]%Ta!^%Ta~P''VO$O$mq!]$mq!^$mq~P#BwO$O$oq!]$oq!^$oq~P#BwO!^9oO~O$O9pO~P!1WO!g#vO!]'ei!k'ei~O!g#vO(r'pO!]'ei!k'ei~O!]/pO!k)Oq~O!Y'gi!]'gi~P#/sO!]/yO!Y)Pq~Or9wO!g#vO(r'pO~O[9yO!Y9xO~P#/sO!Y9xO~Oj:PO!g#vO~Og(_y!](_y~P!1WO!]'na!_'na~P#/sOa%[q!_%[q'z%[q!]%[q~P#/sO[:UO~O!]1TO!^)Xq~O`:YO~O#`:ZO!]'pa!^'pa~O!]5uO!^)Ui~P#BwO!S:]O~O!_1oO%i:`O~O(VTO(YUO(e:eO~O!]1zO!^)Vq~O!k:hO~O!k:iO~O!k:jO~O!k:jO~P%[O#`:mO!]#hy!^#hy~O!]#hy!^#hy~P#BwO%i:rO~P&8fO!_'`O%i:rO~O$O#|y!]#|y!^#|y~P#BwOP$|iR$|i[$|ij$|ir$|i!S$|i!l$|i!p$|i#R$|i#n$|i#o$|i#p$|i#q$|i#r$|i#s$|i#t$|i#u$|i#v$|i#x$|i#z$|i#{$|i$O$|i(a$|i(r$|i!]$|i!^$|i~P''VO!Q*OO'y*PO(z%POP'iaR'ia['iaj'ian'iar'ia!S'ia!l'ia!p'ia#R'ia#n'ia#o'ia#p'ia#q'ia#r'ia#s'ia#t'ia#u'ia#v'ia#x'ia#z'ia#{'ia$O'ia(a'ia(r'ia(y'ia!]'ia!^'ia~O!Q*OO'y*POP'kaR'ka['kaj'kan'kar'ka!S'ka!l'ka!p'ka#R'ka#n'ka#o'ka#p'ka#q'ka#r'ka#s'ka#t'ka#u'ka#v'ka#x'ka#z'ka#{'ka$O'ka(a'ka(r'ka(y'ka(z'ka!]'ka!^'ka~O(y$}OP%aiR%ai[%aij%ain%air%ai!Q%ai!S%ai!l%ai!p%ai#R%ai#n%ai#o%ai#p%ai#q%ai#r%ai#s%ai#t%ai#u%ai#v%ai#x%ai#z%ai#{%ai$O%ai'y%ai(a%ai(r%ai(z%ai!]%ai!^%ai~O(z%POP%ciR%ci[%cij%cin%cir%ci!Q%ci!S%ci!l%ci!p%ci#R%ci#n%ci#o%ci#p%ci#q%ci#r%ci#s%ci#t%ci#u%ci#v%ci#x%ci#z%ci#{%ci$O%ci'y%ci(a%ci(r%ci(y%ci!]%ci!^%ci~O$O$oy!]$oy!^$oy~P#BwO$O#cy!]#cy!^#cy~P#BwO!g#vO!]'eq!k'eq~O!]/pO!k)Oy~O!Y'gq!]'gq~P#/sOr:|O!g#vO(r'pO~O[;QO!Y;PO~P#/sO!Y;PO~Og(_!R!](_!R~P!1WOa%[y!_%[y'z%[y!]%[y~P#/sO!]1TO!^)Xy~O!]5uO!^)Uq~O(T;XO~O!_1oO%i;[O~O!k;_O~O%i;dO~P&8fOP$|qR$|q[$|qj$|qr$|q!S$|q!l$|q!p$|q#R$|q#n$|q#o$|q#p$|q#q$|q#r$|q#s$|q#t$|q#u$|q#v$|q#x$|q#z$|q#{$|q$O$|q(a$|q(r$|q!]$|q!^$|q~P''VO!Q*OO'y*PO(z%POP'jaR'ja['jaj'jan'jar'ja!S'ja!l'ja!p'ja#R'ja#n'ja#o'ja#p'ja#q'ja#r'ja#s'ja#t'ja#u'ja#v'ja#x'ja#z'ja#{'ja$O'ja(a'ja(r'ja(y'ja!]'ja!^'ja~O!Q*OO'y*POP'laR'la['laj'lan'lar'la!S'la!l'la!p'la#R'la#n'la#o'la#p'la#q'la#r'la#s'la#t'la#u'la#v'la#x'la#z'la#{'la$O'la(a'la(r'la(y'la(z'la!]'la!^'la~OP%OqR%Oq[%Oqj%Oqr%Oq!S%Oq!l%Oq!p%Oq#R%Oq#n%Oq#o%Oq#p%Oq#q%Oq#r%Oq#s%Oq#t%Oq#u%Oq#v%Oq#x%Oq#z%Oq#{%Oq$O%Oq(a%Oq(r%Oq!]%Oq!^%Oq~P''VOg%e!Z!]%e!Z#`%e!Z$O%e!Z~P!1WO!Y;hO~P#/sOr;iO!g#vO(r'pO~O[;kO!Y;hO~P#/sO!]'pq!^'pq~P#BwO!]#h!Z!^#h!Z~P#BwO#k%e!ZP%e!ZR%e!Z[%e!Za%e!Zj%e!Zr%e!Z!S%e!Z!]%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z'z%e!Z(a%e!Z(r%e!Z!k%e!Z!Y%e!Z'w%e!Z#`%e!Zv%e!Z!_%e!Z%i%e!Z!g%e!Z~P#/sOr;tO!g#vO(r'pO~O!Y;uO~P#/sOr;|O!g#vO(r'pO~O!Y;}O~P#/sOP%e!ZR%e!Z[%e!Zj%e!Zr%e!Z!S%e!Z!l%e!Z!p%e!Z#R%e!Z#n%e!Z#o%e!Z#p%e!Z#q%e!Z#r%e!Z#s%e!Z#t%e!Z#u%e!Z#v%e!Z#x%e!Z#z%e!Z#{%e!Z$O%e!Z(a%e!Z(r%e!Z!]%e!Z!^%e!Z~P''VOrROe!iOpkOrPO(T)]O(VTO(YUO(aVO(o[O~O!]WO!l$xO#jgPPP!>oI[PPPPPPPPP!BOP!C]PPI[!DnPI[PI[I[I[I[I[PI[!FQP!I[P!LbP!Lf!Lp!Lt!LtP!IXP!Lx!LxP#!OP#!SI[PI[#!Y#%_CjA^PA^PA^A^P#&lA^A^#)OA^#+vA^#.SA^A^#.r#1W#1W#1]#1f#1W#1qPP#1WPA^#2ZA^#6YA^A^6mPPP#:_PPP#:x#:xP#:xP#;`#:xPP#;fP#;]P#;]#;y#;]#P#>V#>]#>k#>q#>{#?R#?]#?c#?s#?y#@k#@}#AT#AZ#Ai#BO#Cs#DR#DY#Et#FS#Gt#HS#HY#H`#Hf#Hp#Hv#H|#IW#Ij#IpPPPPPPPPPPP#IvPPPPPPP#Jk#Mx$ b$ i$ qPPP$']P$'f$*_$0x$0{$1O$1}$2Q$2X$2aP$2g$2jP$3W$3[$4S$5b$5g$5}PP$6S$6Y$6^$6a$6e$6i$7e$7|$8e$8i$8l$8o$8y$8|$9Q$9UR!|RoqOXst!Z#d%m&r&t&u&w,s,x2[2_Y!vQ'`-e1o5{Q%tvQ%|yQ&T|Q&j!VS'W!e-]Q'f!iS'l!r!yU*k$|*Z*oQ+o%}S+|&V&WQ,d&dQ-c'_Q-m'gQ-u'mQ0[*qQ1b,OQ1y,eR<{SU+P%]S!S!nQ!r!v!y!z$|'W'_'`'l'm'n*k*o*q*r-]-c-e-u0[0_1o5{5}%[$ti#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^Q&X|Q'U!eS'[%i-`Q+t&PQ,P&WQ,f&gQ0n+SQ1Y+uQ1_+{Q2Q,jQ2R,kQ5f1TQ5o1aQ6[1zQ6_1|Q6`2PQ8`5gQ8c5lQ8|6bQ:X8dQ:f8yQ;V:YR<}*ZrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R,h&k&z^OPXYstuvwz!Z!`!g!j!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'b'r(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mR>S[#]WZ#W#Z'X(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ%wxQ%{yW&Q|&V&W,OQ&_!TQ'c!hQ'e!iQ(q#sS+n%|%}Q+r&PQ,_&bQ,c&dS-l'f'gQ.i(rQ1R+oQ1X+uQ1Z+vQ1^+zQ1t,`S1x,d,eQ2|-mQ5e1TQ5i1WQ5n1`Q6Z1yQ8_5gQ8b5kQ8f5pQ:T8^R;T:U!U$zi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y!^%yy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{Q+h%wQ,T&[Q,W&]Q,b&dQ.h(qQ1s,_U1w,c,d,eQ3e.iQ6U1tS6Y1x1yQ8x6Z#f>T#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o>UPS&[!Q&iQ&]!RQ&^!SU*}%[%d=sR,R&Y%]%Si#v$b$c$d$x${%O%Q%^%_%c)y*R*T*V*Y*a*g*w*x+f+i,S,V.f/P/d/m/x/y/{0`0b0i0j0o1f1i1q3c4^4_4j4o5Q5[5_6S7W7v8Q8V8[8q9b9p9y:P:`:r;Q;[;d;kP>X>Y>]>^T)z$u){V+P%]S$i$^c#Y#e%q%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.|.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SQ'Y!eR2q-]!W!nQ!e!r!v!y!z$|'W'_'`'l'm'n*Z*k*o*q*r-]-c-e-u0[0_1o5{5}R1l,ZnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&y!^Q'v!xS(s#u<^Q+l%zQ,]&_Q,^&aQ-j'dQ-w'oS.r(x=PS0q+X=ZQ1P+mQ1n,[Q2c,zQ2e,{Q2m-WQ2z-kQ2}-oS5Y0r=eQ5a1QS5d1S=fQ6t2oQ6x2{Q6}3SQ8]5bQ9Y6vQ9Z6yQ9^7OR:l9V$d$]c#Y#e%s%u(S(Y(t(y)R)S)T)U)V)W)X)Y)Z)[)^)`)b)g)q+d+x-Z-x-}.S.U.s.v.z.}/O/b0p2k2n3O3V3k3p3q3r3s3t3u3v3w3x3y3z3{3|4P4Q4X5X5c6u6{7Q7a7b7k7l8k9X9]9g9m9n:o;W;`SS#q]SU$fd)_,mS(p#p'iU*v%R(w4OU0m+O.n7gQ5^0xQ7V3`Q9d7YR:s9em!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}Q't!uS(f#g2US-s'k'wQ/s*]Q0R*jQ3U-vQ4f/tQ4r0TQ4s0UQ4x0^Q7r4`S7}4t4vS8R4y4{Q9r7sQ9v7yQ9{8OQ:Q8TS:{9w9xS;g:|;PS;s;h;iS;{;t;uSSR=o>R%^bOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Q%fj!^%xy!i!u%{%|%}'V'e'f'g'k'u*j+n+o-Y-l-m-t0R0U1R2u2|3T4r4s4v7}9{S&Oz!jQ+k%yQ,a&dW1v,b,c,d,eU6X1w1x1yS8w6Y6ZQ:d8x!r=j$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ=t>QR=u>R%QeOPXYstuvw!Z!`!g!o#S#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_Y#bWZ#W#Z(T!b%jm#h#i#l$x%e%h(^(h(i(j*Y*^*b+Z+[+^,o-V.T.Z.[.]._/m/p2d3[3]4a6r7TQ,n&o!p=k$Z$n)s-U-X/V2p4T5w6s:Z:mSR=n'XU']!e%i*ZR2s-`%SdOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+],p,s,x-i-q.P.V.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3l4z6T6e6f6i6|8t9T9_!r)_$Z$n'X)s-U-X/V2p4T5w6s:Z:mSQ,m&oQ0x+gQ3`.gQ7Y3dR9e7[!b$Tc#Y%q(S(Y(t(y)Z)[)`)g+x-x-}.S.U.s.v/b0p3O3V3k3{5X5c6{7Q7a9]:oS)^)q-Z.|2k2n3p4P4X6u7b7k7l8k9X9g9m9n;W;`=vQ>X>ZR>Y>['QkOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mSS$oh$pR4U/U'XgOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$kf$qQ$ifS)j$l)nR)v$qT$jf$qT)l$l)n'XhOPWXYZhstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$Z$_$a$e$n$p%m%t&R&k&n&o&r&t&u&w&{'T'X'b'r(T(V(](d(x(z)O)s)}*i+X+]+g,p,s,x-U-X-i-q.P.V.g.t.{/U/V/n0]0l0r1S1r2S2T2V2X2[2_2a2p3Q3W3d3l4T4z5w6T6e6f6i6s6|7[8t9T9_:Z:mST$oh$pQ$rhR)u$p%^jOPWXYZstuvw!Z!`!g!o#S#W#Z#d#o#u#x#{$O$P$Q$R$S$T$U$V$W$X$_$a$e%m%t&R&k&n&o&r&t&u&w&{'T'b'r(T(V(](d(x(z)O)}*i+X+]+g,p,s,x-i-q.P.V.g.t.{/n0]0l0r1S1r2S2T2V2X2[2_2a3Q3W3d3l4z6T6e6f6i6|7[8t9T9_!s>Q$Z$n'X)s-U-X/V2p4T5w6s:Z:mS#glOPXZst!Z!`!o#S#d#o#{$n%m&k&n&o&r&t&u&w&{'T'b)O)s*i+]+g,p,s,x-i.g/V/n0]0l1r2S2T2V2X2[2_2a3d4T4z6T6e6f6i7[8t9T!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^Q+T%aQ/c*Oo4OP>X>YQ*c$zU*l$|*Z*oQ+U%bQ0W*m#f=q#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^n=rTQ=x>UQ=y>VR=z>W!U%Ri$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y#f(w#v$b$c$x${)y*V*Y*g+f+i,S,V.f/d/m/y/{1f1i1q3c4^4j4o5[5_6S7W7v8Q8[8q9b9y:P:`:r;Q;[;d;k]>^o4OP>X>Y>]>^Q,U&]Q1h,WQ5s1gR8h5tV*n$|*Z*oU*n$|*Z*oT5z1o5{S0P*i/nQ4w0]T8S4z:]Q+j%xQ0V*lQ1O+kQ1u,aQ6W1vQ8v6XQ:c8wR;^:d!U%Oi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Yx*R$v)e*S*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>OS0`*t0a#f]>^nZ>[`=T3}7c7f7j9h:t:w;yS=_.l3iT=`7e9k!U%Qi$d%O%Q%^%_%c*R*T*a*w*x/P/x0`0b0i0j0o4_5Q8V9p>P>X>Y|*T$v)e*U*t+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>OS0b*u0c#f]>^nZ>[d=V3}7d7e7j9h9i:t:u:w;yS=a.m3jT=b7f9lrnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q&f!UR,p&ornOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_R&f!UQ,Y&^R1d,RsnOXst!V!Z#d%m&i&r&t&u&w,s,x2[2_Q1p,_S6R1s1tU8p6P6Q6US:_8r8sS;Y:^:aQ;m;ZR;w;nQ&m!VR,i&iR6_1|R:f8yW&Q|&V&W,OR1Z+vQ&r!WR,s&sR,y&xT2],x2_R,}&yQ,|&yR2f,}Q'y!{R-y'ySsOtQ#dXT%ps#dQ#OTR'{#OQ#RUR'}#RQ){$uR/`){Q#UVR(Q#UQ#XWU(W#X(X.QQ(X#YR.Q(YQ-^'YR2r-^Q.u(yS3m.u3nR3n.vQ-e'`R2v-eY!rQ'`-e1o5{R'j!rQ/Q)eR4S/QU#_W%h*YU(_#_(`.RQ(`#`R.R(ZQ-a']R2t-at`OXst!V!Z#d%m&i&k&r&t&u&w,s,x2[2_S#hZ%eU#r`#h.[R.[(jQ(k#jQ.X(gW.a(k.X3X7RQ3X.YR7R3YQ)n$lR/W)nQ$phR)t$pQ$`cU)a$`-|O>Z>[Q/z*eU4k/z4m7xQ4m/|R7x4lS*o$|*ZR0Y*ox*S$v)e*t*u+V/v0d0e4R4g5R5S5W7p8U:R:x=p=}>O!d.j(u)c*[*e.l.m.q/_/k/|0v1e3h4[4h4l5r7]7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/h*S.j7ca7c3}7e7f7j9h:t:w;yQ0a*tQ3i.lU4}0a3i9kR9k7e|*U$v)e*t*u+V/g/v0d0e4R4g4|5R5S5W7p8U:R:x=p=}>O!h.k(u)c*[*e.l.m.q/_/k/|0v1e3f3h4[4h4l5r7]7^7`7w7z8X8Z9t9|:S:};R;e;j;v>Z>[U/j*U.k7de7d3}7e7f7j9h9i:t:u:w;yQ0c*uQ3j.mU5P0c3j9lR9l7fQ*z%UR0g*zQ5]0vR8Y5]Q+_%kR0u+_Q5v1jS8j5v:[R:[8kQ,[&_R1m,[Q5{1oR8m5{Q1{,fS6]1{8zR8z6_Q1U+rW5h1U5j8a:VQ5j1XQ8a5iR:V8bQ+w&QR1[+wQ2_,xR6m2_YrOXst#dQ&v!ZQ+a%mQ,r&rQ,t&tQ,u&uQ,w&wQ2Y,sS2],x2_R6l2[Q%opQ&z!_Q&}!aQ'P!bQ'R!cQ'q!uQ+`%lQ+l%zQ,Q&XQ,h&mQ-P&|W-p'k's't'wQ-w'oQ0X*nQ1P+mQ1c,PS2O,i,lQ2g-OQ2h-RQ2i-SQ2}-oW3P-r-s-v-xQ5a1QQ5m1_Q5q1eQ6V1uQ6a2QQ6k2ZU6z3O3R3UQ6}3SQ8]5bQ8e5oQ8g5rQ8l5zQ8u6WQ8{6`S9[6{7PQ9^7OQ:W8cQ:b8vQ:g8|Q:n9]Q;U:XQ;]:cQ;a:oQ;l;VR;o;^Q%zyQ'd!iQ'o!uU+m%{%|%}Q-W'VU-k'e'f'gS-o'k'uQ0Q*jS1Q+n+oQ2o-YS2{-l-mQ3S-tS4p0R0UQ5b1RQ6v2uQ6y2|Q7O3TU7{4r4s4vQ9z7}R;O9{S$wi>PR*{%VU%Ui%V>PR0f*yQ$viS(u#v+iS)c$b$cQ)e$dQ*[$xS*e${*YQ*t%OQ*u%QQ+Q%^Q+R%_Q+V%cQ.lPQ=}>XQ>O>YQ>Z>]R>[>^Q+O%]Q.nSR#[WR'Z!el!tQ!r!v!y!z'`'l'm'n-e-u1o5{5}S'V!e-]U*j$|*Z*oS-Y'W'_S0U*k*qQ0^*rQ2u-cQ4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:_Y,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[EY],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(WpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Wp(Z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$i&j(Wp(Z!b'|0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(X#S$i&j'}0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$i&j(Wp(Z!b'}0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$i&j!p),Q(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#v(Ch$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(V':f$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$i&j(Z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$i&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$d`$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$d``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$d`$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(Z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$d`(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$i&j(Wp(Z!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$i&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(Z!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$i&j(WpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(WpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Wp(Z!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$i&j!X7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!X7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!X7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$i&j(Z!b!X7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(Z!b!X7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(Z!b!X7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(Z!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$i&j(Z!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$i&j(Wp(Z!bs'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!g$b$i&j$O)Lv(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#R-v$?V_!^(CdvBr$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!q7`$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$i&j(Wp(Z!b'|0/l$]#t(T,2j(e$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[kY,RY,IY,MY,2,3,4,5,6,7,8,9,10,11,12,13,14,TY,new Ug("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Ug("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>AY[t]||-1},{term:343,get:t=>QY[t]||-1},{term:95,get:t=>NY[t]||-1}],tokenPrec:15201}),Jk=[Mr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Mr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Mr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Mr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Mr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Mr(`try { \${} } catch (\${error}) { \${} -}`,{label:"try",detail:"/ catch block",type:"keyword"}),Ir("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Ir(`if (\${}) { +}`,{label:"try",detail:"/ catch block",type:"keyword"}),Mr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Mr(`if (\${}) { \${} } else { \${} -}`,{label:"if",detail:"/ else block",type:"keyword"}),Ir(`class \${name} { +}`,{label:"if",detail:"/ else block",type:"keyword"}),Mr(`class \${name} { constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),Ir('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Ir('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LY=Jk.concat([Ir("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Ir("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Ir("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Bx=new DH,eR=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ll(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const jY=["FunctionDeclaration"],DY={FunctionDeclaration:ll("function"),ClassDeclaration:ll("class"),ClassExpression:()=>!0,EnumDeclaration:ll("constant"),TypeAliasDeclaration:ll("type"),NamespaceDeclaration:ll("namespace"),VariableDefinition(t,e){t.matchContext(jY)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function tR(t,e){let n=Bx.get(e);if(n)return n;let r=[],i=!0;function o(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(Bn.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let s=DY[a.name];if(s&&s(a,o)||eR.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of tR(t,a.node))r.push(s);return!1}}),Bx.set(e,r),r}const Wx=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,nR=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function BY(t){let e=Fn(t.state).resolveInner(t.pos,-1);if(nR.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Wx.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)eR.has(i.name)&&(r=r.concat(tR(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Wx}}const pa=ic.define({name:"javascript",parser:zY.configure({props:[eO.add({IfStatement:$p({except:/^\s*({|else\b)/}),TryStatement:$p({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:oX,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:jg({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":$p({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),nO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":AT,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),rR={test:t=>/^JSX/.test(t.name),facet:kT({commentTokens:{block:{open:"{/*",close:"*/}"}}})},WY=pa.configure({dialect:"ts"},"typescript"),FY=pa.configure({dialect:"jsx",props:[K0.add(t=>t.isTop?[rR]:void 0)]}),VY=pa.configure({dialect:"jsx ts",props:[K0.add(t=>t.isTop?[rR]:void 0)]},"typescript");let iR=t=>({label:t,type:"keyword"});const oR="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(iR),HY=oR.concat(["declare","implements","private","protected","public"].map(iR));function XY(t={}){let e=t.jsx?t.typescript?VY:FY:t.typescript?WY:pa,n=t.typescript?LY.concat(HY):Jk.concat(oR);return new IT(e,[pa.data.of({autocomplete:$q(nR,Qk(n))}),pa.data.of({autocomplete:BY}),t.jsx?GY:[]])}function ZY(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Fx(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const qY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),GY=ze.inputHandler.of((t,e,n,r,i)=>{if((qY?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!pa.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:a}=o,s=a.changeByRange(l=>{var c;let{head:u}=l,d=Fn(a).resolveInner(u-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(u-1,u)!=r||d.name=="JSXAttributeValue"&&d.to>u)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:""}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,p=h.parent;if(p&&h.from==u-2&&((f=Fx(a.doc,p.firstChild,u))||((c=p.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let m=`${f}>`;return{range:xe.cursor(u+m.length,-1),changes:{from:u,insert:m}}}}else if(r==">"){let h=ZY(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(u,u+2))&&(f=Fx(a.doc,h,u)))return{range:l,changes:{from:u,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),{TextArea:BU}=bi,{Text:cl}=yn;function Jg({visible:t,onCancel:e,onSave:n,roleName:r,roleConfig:i,availableRoles:o=[],domains:a=[],entities:s=[],services:l={}}){const[c]=yr.useForm(),[u,d]=J(!1),[f,h]=J([]),[p,m]=J([]),[g,v]=J(!1),[O,S]=J(!1),[x,b]=J(null),[C,$]=J(""),[w,P]=J(""),[_,T]=J(null),[R,k]=J(null),[I,Q]=J({}),[M,E]=J({});be(()=>{var Y,ce,te,Oe;if(t&&i){c.setFieldsValue({description:i.description||"",admin:i.admin||!1,deny_all:i.deny_all||!1,fallbackRole:i.fallbackRole||"",domains:((Y=i.permissions)==null?void 0:Y.domains)||{},entities:((ce=i.permissions)==null?void 0:ce.entities)||{}});const ye=[],pe=[];(te=i.permissions)!=null&&te.domains&&Object.entries(i.permissions.domains).forEach(([De,we])=>{ye.push({domain:De,services:we.services||[],allow:we.allow||!1})}),(Oe=i.permissions)!=null&&Oe.entities&&Object.entries(i.permissions.entities).forEach(([De,we])=>{pe.push({entity:De,services:we.services||[],allow:we.allow||!1})}),h(ye),m(pe),d(!!i.template),v(i.admin||!1),S(i.deny_all||!1),b(null),$(""),P(i.template||""),T(null);const Qe={},Me={};ye.forEach((De,we)=>{Qe[we]=De.services.length>0}),pe.forEach((De,we)=>{Me[we]=De.services.length>0}),Q(Qe),E(Me)}else t&&(c.resetFields(),h([]),m([]),d(!1),v(!1),S(!1),z(!1),b(null),$(""),P(""),T(null),Q({}),E({}))},[t,i,c]),be(()=>{t&&ee().then(Y=>{k(Y)})},[t]);const[N,z]=J(!1),L=()=>{z(!0)},F=Y=>{if(z(!1),Y==="convert"){const ce=f.map(Oe=>({...Oe,allow:!0})),te=p.map(Oe=>({...Oe,allow:!0}));h(ce),m(te)}else Y==="clear"?(h([]),m([])):Y==="cancel"&&(S(!1),c.setFieldsValue({deny_all:!1}))},H=async()=>{try{const Y=await c.validateFields(),ce={},te={};f.forEach(pe=>{ce[pe.domain]={services:pe.services,allow:pe.allow||!1}}),p.forEach(pe=>{te[pe.entity]={services:pe.services,allow:pe.allow||!1}});const Oe={description:Y.description,admin:Y.admin||!1,deny_all:Y.deny_all||!1,permissions:{domains:ce,entities:te}};u&&w&&(Oe.template=w,Y.fallbackRole&&(Oe.fallbackRole=Y.fallbackRole));const ye={roleData:Oe,roleName:r||Y.roleName};n(ye)}catch(Y){console.error("Form validation failed:",Y)}},V=()=>{const Y=f.length;h([...f,{domain:"",services:[],allow:O}]),Q({...I,[Y]:!1})},X=Y=>{h(f.filter((Oe,ye)=>ye!==Y));const ce={...I};delete ce[Y];const te={};Object.keys(ce).forEach(Oe=>{const ye=parseInt(Oe);ye>Y?te[ye-1]=ce[Oe]:ye{const Oe=[...f];Oe[Y]={...Oe[Y],[ce]:te},h(Oe)},G=()=>{const Y=p.length;m([...p,{entity:"",services:[],allow:O}]),E({...M,[Y]:!1})},se=Y=>{m(p.filter((Oe,ye)=>ye!==Y));const ce={...M};delete ce[Y];const te={};Object.keys(ce).forEach(Oe=>{const ye=parseInt(Oe);ye>Y?te[ye-1]=ce[Oe]:ye{const Oe=[...p];Oe[Y]={...Oe[Y],[ce]:te},m(Oe)},le=Y=>{Q({...I,[Y]:!0})},me=Y=>{E({...M,[Y]:!0})},ie=Y=>{var ce;return((ce=l.domains)==null?void 0:ce[Y])||[]},ne=Y=>{var ce;return((ce=l.entities)==null?void 0:ce[Y])||[]},ue=async()=>{var Y,ce,te;try{const Oe=document.querySelector("home-assistant");if(Oe&&Oe.hass){const pe=Oe.hass;if((ce=(Y=pe.auth)==null?void 0:Y.data)!=null&&ce.access_token)return{access_token:pe.auth.data.access_token};if((te=pe.auth)!=null&&te.access_token)return{access_token:pe.auth.access_token}}const ye=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return ye?{access_token:JSON.parse(ye).access_token}:null}catch(Oe){return console.error("Auth error:",Oe),null}},de=()=>{const Y=window.location.href,ce=new URL(Y),te=ce.hostname,Oe=ce.protocol,ye=ce.port?`:${ce.port}`:"",pe=`${Oe}//${te}${ye}/developer-tools/template`;window.open(pe,"_blank")},j=()=>{P(""),b(null),T(null),$(""),c.setFieldsValue({fallbackRole:""}),d(!1)},ee=async()=>{try{const Y=await ue();if(!Y)return null;const ce=await fetch("/api/rbac/current-user",{headers:{Authorization:`Bearer ${Y.access_token}`}});return ce.ok?(await ce.json()).person_entity_id:null}catch(Y){return console.error("Error getting current user entity:",Y),null}},he=(Y="variable")=>{if(R){let ce="";switch(Y){case"variable":ce="current_user_str";break;case"home":ce="states[current_user_str].state == 'home'";break;case"away":ce="states[current_user_str].state != 'home'";break;default:ce="{{ states(current_user_str) }}"}const te=w+ce;P(te),b(null),T(null)}},ve=async()=>{try{if(b("loading"),$(""),!w){b("error"),$("No template to test"),ar.error({message:"Template Test Failed",description:"Please enter a template first",placement:"bottomRight",duration:3});return}const Y=await ue();if(!Y)throw new Error("Not authenticated with Home Assistant");const te=await(await fetch("/api/rbac/evaluate-template",{method:"POST",headers:{Authorization:`Bearer ${Y.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({template:w})})).json();te.success?(b(te.result?"true":"false"),T(te.evaluated_value)):(b("error"),$(te.error),T(null),ar.error({message:"Template Evaluation Error",description:te.error,placement:"bottomRight",duration:5}))}catch(Y){console.error("Error testing template:",Y),b("error"),$(Y.message),T(null),ar.error({message:"Template Test Failed",description:Y.message,placement:"bottomRight",duration:5})}};return A(At,{children:[A(ur,{title:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:"40px"},children:[A("span",{children:r?`Edit Role: ${r}`:"Create New Role"}),A("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"4px"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(cl,{style:{fontSize:"14px"},children:"Admin Role"}),A(Oi,{checked:g,onChange:Y=>{v(Y),c.setFieldsValue({admin:Y})}})]}),!g&&A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(cl,{style:{fontSize:"14px"},children:O?"Deny All":"Allow All"}),A(on,{title:O?"Switch to Allow All (permit by default)":"Switch to Deny All (block by default)",children:A(Oi,{checked:O,checkedChildren:"✗",unCheckedChildren:"✓",style:{backgroundColor:O?"#ff4d4f":"#52c41a"},onChange:Y=>{S(Y),c.setFieldsValue({deny_all:Y}),Y&&(f.some(te=>!te.allow)||p.some(te=>!te.allow))&&L()}})})]})]})]}),open:t,onCancel:e,onOk:H,width:800,okText:"Save Role",cancelText:"Cancel",children:A(yr,{form:c,layout:"vertical",children:[!r&&A(yr.Item,{name:"roleName",label:"Role Name",rules:[{required:!0,message:"Please enter a role name"},{pattern:/^[a-z0-9_]+$/,message:"Role name must be lowercase letters, numbers, and underscores only"}],help:"Use lowercase letters, numbers, and underscores (e.g., 'power_user', 'guest', 'moderator')",children:A(bi,{placeholder:"Enter role name (e.g., 'power_user')"})}),A(yr.Item,{name:"description",label:"Description",rules:[{required:!0,message:"Please enter a description"}],children:A(bi,{placeholder:"Enter role description"})}),A(yr.Item,{name:"admin",hidden:!0,children:A(bi,{})}),A(yr.Item,{name:"deny_all",hidden:!0,children:A(bi,{})}),!g&&A(At,{children:[A(qh,{children:"Template Configuration"}),u?A("div",{children:[A("div",{style:{marginBottom:24},children:[A("div",{style:{marginBottom:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(vt,{size:"small",type:"text",icon:A(Vi,{}),onClick:j,style:{color:"#ff4d4f",border:"none",padding:"4px",minWidth:"auto",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:Y=>{Y.currentTarget.style.backgroundColor="#ff4d4f",Y.currentTarget.style.color="white"},onMouseLeave:Y=>{Y.currentTarget.style.backgroundColor="transparent",Y.currentTarget.style.color="#ff4d4f"},title:"Clear template settings"}),A(cl,{strong:!0,children:"Template"})]}),A("div",{style:{display:"flex",gap:"8px"},children:[A(vt,{size:"small",icon:A(RW,{}),onClick:de,title:"Open Home Assistant Template Editor",children:"HA Editor"}),A(vt,{size:"small",loading:x==="loading",onClick:ve,type:x==="true"?"primary":"default",style:{backgroundColor:x==="true"?"#52c41a":x==="false"?"#ff4d4f":x==="error"?"#faad14":void 0,color:x?"white":void 0,borderColor:x==="true"?"#52c41a":x==="false"?"#ff4d4f":x==="error"?"#faad14":void 0,minWidth:"100px"},icon:x==="true"?A(_d,{}):x==="false"?A(Vi,{}):x==="error"?A(sW,{}):A(Gu,{}),children:x==="true"?"True":x==="false"?"False":x==="error"?"Error":"Test"})]})]}),A("div",{style:{position:"relative"},children:[A(OO,{value:w,height:"150px",extensions:[XY({jsx:!0})],onChange:Y=>{P(Y),b(null),T(null)},placeholder:"Enter Jinja2 template (e.g., {{ states(current_user_str) == 'home' }})",theme:"light",basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightSpecialChars:!0,foldGutter:!0,drawSelection:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,searchKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0},style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"}}),R&&A(w0,{menu:{items:[{key:"variable",label:"Insert user variable",icon:A(Gu,{}),onClick:()=>he("variable")},{key:"home",label:"Check if home",icon:A(_d,{}),onClick:()=>he("home")},{key:"away",label:"Check if away",icon:A(Vi,{}),onClick:()=>he("away")}]},trigger:["click"],placement:"topRight",children:A(vt,{type:"primary",size:"small",icon:A(Gu,{}),style:{position:"absolute",bottom:"8px",right:"8px",zIndex:10,fontSize:"12px",height:"28px",padding:"0 8px"},title:"Insert user template snippets",children:["Insert User ",A(O2,{})]})})]}),A(cl,{type:"secondary",style:{fontSize:"12px"},children:x&&_!==null?A(At,{children:[A("strong",{children:"Evaluated result:"})," ",String(_)]}):"Jinja2 template that determines when this role should be active. If false, the fallback role will be used."})]}),A(yr.Item,{name:"fallbackRole",label:"Fallback Role",help:"Role to use when template evaluates to false",children:A(jn,{showSearch:!0,placeholder:"Select fallback role",filterOption:(Y,ce)=>ce.children.toLowerCase().indexOf(Y.toLowerCase())>=0,children:o.filter(Y=>Y!==r).map(Y=>A(jn.Option,{value:Y,children:Y},Y))})}),A(cl,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"When the template evaluates to false, users with this role will automatically be assigned the fallback role instead."})]}):A(vt,{type:"dashed",icon:A(ea,{}),onClick:()=>d(!0),style:{width:"100%",marginBottom:16},children:"Add Template"}),A(qh,{children:"Domains"}),f.map((Y,ce)=>A("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":ce,children:A(xs,{gutter:16,align:"middle",children:[A(Mr,{span:10,children:A(jn,{showSearch:!0,placeholder:"Select domain",value:Y.domain,onChange:te=>B(ce,"domain",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:a.map(te=>A(jn.Option,{value:te,children:te},te))})}),A(Mr,{span:10,children:I[ce]?A(jn,{mode:"multiple",showSearch:!0,placeholder:Y.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:Y.services,onChange:te=>B(ce,"services",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:ie(Y.domain).map(te=>A(jn.Option,{value:te,children:te},te))}):A(on,{title:Y.allow?"Add specific services to allow":"Add specific services",children:A(vt,{type:"dashed",icon:A(ea,{}),onClick:()=>le(ce),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:te=>{te.currentTarget.style.opacity="1",te.currentTarget.style.borderColor="#1890ff",te.currentTarget.style.color="#1890ff"},onMouseLeave:te=>{te.currentTarget.style.opacity="0.6",te.currentTarget.style.borderColor="#d9d9d9",te.currentTarget.style.color="#999"},children:Y.allow?"Allow Services":"Services"})})}),A(Mr,{span:2,children:A(on,{title:Y.allow?"Allow this domain/services":"Block this domain/services",children:A(Oi,{size:"small",checked:Y.allow,onChange:te=>B(ce,"allow",te),checkedChildren:"✓",unCheckedChildren:"✗",disabled:O&&Y.allow,style:{backgroundColor:Y.allow?"#52c41a":"#ff4d4f"}})})}),A(Mr,{span:2,children:A(vt,{type:"text",danger:!0,icon:A(Km,{}),onClick:()=>X(ce)})})]})},ce)),A(vt,{type:"dashed",icon:A(ea,{}),onClick:V,style:{width:"100%",marginBottom:16},children:"Add Domain"}),A(qh,{children:"Entities"}),p.map((Y,ce)=>A("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":ce,children:A(xs,{gutter:16,align:"middle",children:[A(Mr,{span:10,children:A(jn,{showSearch:!0,placeholder:"Select entity",value:Y.entity,onChange:te=>re(ce,"entity",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:s.map(te=>A(jn.Option,{value:te,children:te},te))})}),A(Mr,{span:10,children:M[ce]?A(jn,{mode:"multiple",showSearch:!0,placeholder:Y.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:Y.services,onChange:te=>re(ce,"services",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:ne(Y.entity).map(te=>A(jn.Option,{value:te,children:te},te))}):A(on,{title:Y.allow?"Add specific services to allow":"Add specific services",children:A(vt,{type:"dashed",icon:A(ea,{}),onClick:()=>me(ce),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:te=>{te.currentTarget.style.opacity="1",te.currentTarget.style.borderColor="#1890ff",te.currentTarget.style.color="#1890ff"},onMouseLeave:te=>{te.currentTarget.style.opacity="0.6",te.currentTarget.style.borderColor="#d9d9d9",te.currentTarget.style.color="#999"},children:Y.allow?"Allow Services":"Services"})})}),A(Mr,{span:2,children:A(on,{title:Y.allow?"Allow this entity/services":"Block this entity/services",children:A(Oi,{size:"small",checked:Y.allow,onChange:te=>re(ce,"allow",te),checkedChildren:"✓",unCheckedChildren:"✗",disabled:O&&Y.allow,style:{backgroundColor:Y.allow?"#52c41a":"#ff4d4f"}})})}),A(Mr,{span:2,children:A(vt,{type:"text",danger:!0,icon:A(Km,{}),onClick:()=>se(ce)})})]})},ce)),A(vt,{type:"dashed",icon:A(ea,{}),onClick:G,style:{width:"100%"},children:"Add Entity"})]})]})}),A(ur,{title:"Convert Existing Restrictions?",open:N,onCancel:()=>F("cancel"),footer:[A(vt,{onClick:()=>F("cancel"),children:"Cancel"},"cancel"),A(vt,{onClick:()=>F("clear"),children:"Clear All"},"clear"),A(vt,{type:"primary",onClick:()=>F("convert"),children:"Convert to Allow"},"convert")],children:A("div",{children:A("p",{children:"You have blocking restrictions configured. What would you like to do?"})})})]})}function YY({data:t,onSuccess:e,onError:n,onDataChange:r}){const[i,o]=J(!1),[a,s]=J({}),[l,c]=J(null),[u,d]=J(null),[f,h]=J(!1);be(()=>{var $;($=t.config)!=null&&$.roles&&s(t.config.roles)},[t.config]);const p=async()=>{try{const $=m();if($&&$.auth){if($.auth.data&&$.auth.data.access_token)return{access_token:$.auth.data.access_token,token_type:"Bearer"};if($.auth.access_token)return{access_token:$.auth.access_token,token_type:"Bearer"}}const w=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return w?{access_token:JSON.parse(w).access_token,token_type:"Bearer"}:null}catch($){return console.error("Auth error:",$),null}},m=()=>{try{const $=document.querySelector("home-assistant");return $&&$.hass?$.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch($){return console.error("Error getting hass object:",$),null}},g=()=>{h(!0)},v=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"delete_role",roleName:$})})).ok)throw new Error("Failed to delete role");const _={...a};delete _[$],s(_),r({...t,config:{...t.config,roles:_}}),e(`Role "${$}" deleted successfully!`)}catch(w){console.error("Error deleting role:",w),n(w.message)}finally{o(!1)}},O=$=>{const w=a[$];w&&(c($),d(w))},S=()=>{c(null),d(null)},x=()=>{h(!1)},b=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");const{roleName:P,roleData:_}=$,T=P||l;if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_role",roleName:T,roleConfig:_})})).ok)throw new Error("Failed to update role");const k={...a};k[l]=_,s(k),r({...t,config:{...t.config,roles:k}}),e(`Role "${l}" updated successfully!`),S()}catch(w){console.error("Error updating role:",w),n(w.message)}finally{o(!1)}},C=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");const{roleName:P,roleData:_}=$;if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_role",roleName:P,roleConfig:_})})).ok)throw new Error("Failed to create role");const R={...a};R[P]=_,s(R),r({...t,config:{...t.config,roles:R}}),e(`Role "${P}" created successfully!`),x()}catch(w){console.error("Error creating role:",w),n(w.message)}finally{o(!1)}};return A("div",{children:[A(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Create and manage roles with specific permissions."}),A(yn.Title,{level:4,children:"Existing Roles"}),Object.keys(a).length===0?A(yn.Text,{type:"secondary",italic:!0,children:"No roles created yet."}):A(xs,{gutter:[16,16],children:Object.entries(a).map(([$,w])=>{var P,_;return A(Mr,{xs:24,sm:12,children:A(Sa,{size:"small",style:{height:"100%"},actions:[A("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#1890ff"},onMouseEnter:T=>{T.currentTarget.style.backgroundColor="#1890ff",T.currentTarget.style.color="black"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="transparent",T.currentTarget.style.color="#1890ff"},onClick:()=>O($),children:A(vt,{type:"link",icon:A(FP,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Edit"})},"edit"),A(DP,{title:"Are you sure you want to delete this role?",onConfirm:()=>v($),okText:"Yes",cancelText:"No",children:A("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#ff4d4f"},onMouseEnter:T=>{T.currentTarget.style.backgroundColor="#ff4d4f",T.currentTarget.style.color="black"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="transparent",T.currentTarget.style.color="#ff4d4f"},children:A(vt,{type:"link",danger:!0,icon:A(Km,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Delete"})})},"delete")],children:A("div",{style:{height:"120px",display:"flex",flexDirection:"column"},children:[A(Sa.Meta,{title:$,description:w.description||"No description"}),A(jo,{wrap:!0,style:{marginTop:"auto"},children:[w.template&&A(on,{title:`Template: ${w.template}`,children:A(Ka,{color:"purple",icon:A(Gu,{}),children:"Template"})}),w.deny_all&&A(on,{title:"Deny All mode enabled - blocks by default",children:A(Ka,{color:"red",children:"Deny All"})}),Object.keys(((P=w.permissions)==null?void 0:P.domains)||{}).length>0&&A(on,{title:A("div",{children:[A("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Domains:"}),Object.keys(w.permissions.domains).map(T=>A("div",{style:{fontSize:"12px"},children:["• ",T]},T))]}),placement:"top",children:A(Ka,{color:"blue",children:[Object.keys(w.permissions.domains).length," domains"]})}),Object.keys(((_=w.permissions)==null?void 0:_.entities)||{}).length>0&&A(on,{title:A("div",{children:[A("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Entities:"}),Object.keys(w.permissions.entities).map(T=>A("div",{style:{fontSize:"12px"},children:["• ",T]},T))]}),placement:"top",children:A(Ka,{color:"green",children:[Object.keys(w.permissions.entities).length," entities"]})})]})]})})},$)})}),A(vt,{type:"dashed",icon:A(ea,{}),onClick:g,disabled:i,style:{width:"100%",marginTop:16},children:"Add Role"}),A(Jg,{visible:!!l,onCancel:S,onSave:b,roleName:l,roleConfig:u,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services}),A(Jg,{visible:f,onCancel:x,onSave:C,roleName:null,roleConfig:null,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services})]})}const UY=()=>{try{const t=document.querySelector("home-assistant");return t&&t.hass?t.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch(t){return console.error("Error getting hass object:",t),null}},aR=async()=>{try{const t=UY();if(t&&t.auth){if(t.auth.data&&t.auth.data.access_token)return{access_token:t.auth.data.access_token,token_type:"Bearer"};if(t.auth.access_token)return{access_token:t.auth.access_token,token_type:"Bearer"}}const e=localStorage.getItem("hassTokens");if(e)return{access_token:JSON.parse(e).access_token,token_type:"Bearer"};const n=sessionStorage.getItem("hassTokens");if(n)return{access_token:JSON.parse(n).access_token,token_type:"Bearer"};const r=await fetch("/auth/token");if(!r.ok)throw new Error("Not authenticated");return await r.json()}catch(t){return console.error("Error getting HA auth:",t),null}},oi=async(t,e={})=>{const n=await aR();if(!n)throw new Error("Not authenticated with Home Assistant");const r={headers:{Authorization:`Bearer ${n.access_token}`,"Content-Type":"application/json",...e.headers}};return fetch(t,{...r,...e})};function KY({data:t,onSuccess:e,onError:n,onDataChange:r,isDarkMode:i=!1}){const[o,a]=J(!1),[s,l]=J({}),[c,u]=J(null),[d,f]=J(null);be(()=>{var b;if((b=t.config)!=null&&b.users){const C={};Object.entries(t.config.users).forEach(([$,w])=>{C[$]=w.role||"user"}),l(C)}},[t.config]);const h=b=>{var w;const C=s[b.id];if(!C||!((w=t.config)!=null&&w.roles))return!1;const $=t.config.roles[C];return($==null?void 0:$.admin)===!0},p=b=>{if(!b)return{};const C=i?"#262626":"white";return{border:"2px solid transparent",background:`linear-gradient(${C}, ${C}) padding-box, linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57) border-box`,animation:"adminGlow 2s ease-in-out infinite alternate",boxShadow:"0 0 20px rgba(255, 107, 107, 0.3)"}},m=async(b,C)=>{var $;a(!0);try{if(!(await oi("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"assign_user_role",userId:b,roleName:C})})).ok)throw new Error("Failed to assign role");const P={...s,[b]:C};l(P);const _={...(($=t.config)==null?void 0:$.users)||{}};_[b]||(_[b]={}),_[b].role=C,r({...t,config:{...t.config,users:_}});const T=t.users.find(k=>k.id===b),R=T?T.name:b;e(`Role "${C}" assigned to ${R} successfully!`)}catch(w){console.error("Error assigning role:",w),n(w.message)}finally{a(!1)}},g=()=>{var C;const b=Object.keys(((C=t.config)==null?void 0:C.roles)||{});return b.includes("admin")||b.unshift("admin"),b.includes("user")||b.push("user"),b.includes("guest")||b.push("guest"),b},v=b=>{const C=s[b];return g().includes(C)},O=b=>b.name||b.username||b.id,S=b=>b.entity_picture?b.entity_picture:b.id?`/api/image/serve/${b.id}/512x512`:null,x=()=>{u(null),f(null)};return A("div",{children:[A("style",{children:` +}`,{label:"class",detail:"definition",type:"keyword"}),Mr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Mr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LY=Jk.concat([Mr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Mr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Mr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Bx=new DH,eR=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function ll(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const jY=["FunctionDeclaration"],DY={FunctionDeclaration:ll("function"),ClassDeclaration:ll("class"),ClassExpression:()=>!0,EnumDeclaration:ll("constant"),TypeAliasDeclaration:ll("type"),NamespaceDeclaration:ll("namespace"),VariableDefinition(t,e){t.matchContext(jY)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function tR(t,e){let n=Bx.get(e);if(n)return n;let r=[],i=!0;function o(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(Bn.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let s=DY[a.name];if(s&&s(a,o)||eR.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of tR(t,a.node))r.push(s);return!1}}),Bx.set(e,r),r}const Wx=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,nR=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function BY(t){let e=Fn(t.state).resolveInner(t.pos,-1);if(nR.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Wx.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)eR.has(i.name)&&(r=r.concat(tR(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Wx}}const ga=ic.define({name:"javascript",parser:zY.configure({props:[tO.add({IfStatement:Pp({except:/^\s*({|else\b)/}),TryStatement:Pp({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:oX,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:Dg({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Pp({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),rO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":AT,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),rR={test:t=>/^JSX/.test(t.name),facet:kT({commentTokens:{block:{open:"{/*",close:"*/}"}}})},WY=ga.configure({dialect:"ts"},"typescript"),FY=ga.configure({dialect:"jsx",props:[J0.add(t=>t.isTop?[rR]:void 0)]}),VY=ga.configure({dialect:"jsx ts",props:[J0.add(t=>t.isTop?[rR]:void 0)]},"typescript");let iR=t=>({label:t,type:"keyword"});const oR="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(iR),HY=oR.concat(["declare","implements","private","protected","public"].map(iR));function XY(t={}){let e=t.jsx?t.typescript?VY:FY:t.typescript?WY:ga,n=t.typescript?LY.concat(HY):Jk.concat(oR);return new IT(e,[ga.data.of({autocomplete:$q(nR,Qk(n))}),ga.data.of({autocomplete:BY}),t.jsx?GY:[]])}function ZY(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function Fx(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const qY=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),GY=Be.inputHandler.of((t,e,n,r,i)=>{if((qY?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!ga.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:a}=o,s=a.changeByRange(l=>{var c;let{head:u}=l,d=Fn(a).resolveInner(u-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(u-1,u)!=r||d.name=="JSXAttributeValue"&&d.to>u)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:""}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,p=h.parent;if(p&&h.from==u-2&&((f=Fx(a.doc,p.firstChild,u))||((c=p.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let m=`${f}>`;return{range:Se.cursor(u+m.length,-1),changes:{from:u,insert:m}}}}else if(r==">"){let h=ZY(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(u,u+2))&&(f=Fx(a.doc,h,u)))return{range:l,changes:{from:u,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),{TextArea:BU}=bi,{Text:cl}=yn;function ev({visible:t,onCancel:e,onSave:n,roleName:r,roleConfig:i,availableRoles:o=[],domains:a=[],entities:s=[],services:l={},panels:c=[]}){const[u]=Sr.useForm(),[d,f]=K(!1),[h,p]=K([]),[m,g]=K([]),[v,O]=K([]),[S,C]=K(!1),[b,x]=K(!1),[$,w]=K(null),[P,_]=K(""),[T,k]=K(""),[R,I]=K(null),[Q,E]=K(null),[A,N]=K({}),[L,z]=K({}),[V,X]=K({});be(()=>{var re,fe,te,Oe,we,Ke;if(t&&i){u.setFieldsValue({description:i.description||"",admin:i.admin||!1,deny_all:i.deny_all||!1,fallbackRole:i.fallbackRole||"",domains:((re=i.permissions)==null?void 0:re.domains)||{},entities:((fe=i.permissions)==null?void 0:fe.entities)||{},panels:((te=i.permissions)==null?void 0:te.panels)||{}});const Ae=[],Me=[],Fe=[];(Oe=i.permissions)!=null&&Oe.domains&&Object.entries(i.permissions.domains).forEach(([ot,ut])=>{Ae.push({domain:ot,services:ut.services||[],allow:ut.allow||!1})}),(we=i.permissions)!=null&&we.entities&&Object.entries(i.permissions.entities).forEach(([ot,ut])=>{Me.push({entity:ot,services:ut.services||[],allow:ut.allow||!1})}),(Ke=i.permissions)!=null&&Ke.panels&&Object.entries(i.permissions.panels).forEach(([ot,ut])=>{Fe.push({panel:ot,allow:ut.allow||!1})}),p(Ae),g(Me),O(Fe),f(!!i.template),C(i.admin||!1),x(i.deny_all||!1),w(null),_(""),k(i.template||""),I(null);const Re={},ke={};Ae.forEach((ot,ut)=>{Re[ut]=ot.services.length>0}),Me.forEach((ot,ut)=>{ke[ut]=ot.services.length>0}),N(Re),z(ke)}else t&&(u.resetFields(),p([]),g([]),f(!1),C(!1),x(!1),H(!1),w(null),_(""),k(""),I(null),N({}),z({}))},[t,i,u]),be(()=>{t&&ve().then(re=>{E(re)})},[t]);const[F,H]=K(!1),B=()=>{H(!0)},G=re=>{if(H(!1),re==="convert"){const fe=h.map(we=>({...we,allow:!0})),te=m.map(we=>({...we,allow:!0})),Oe=v.map(we=>({...we,allow:!0}));p(fe),g(te),O(Oe)}else re==="clear"?(p([]),g([]),O([])):re==="cancel"&&(x(!1),u.setFieldsValue({deny_all:!1}))},se=async()=>{try{const re=await u.validateFields(),fe={},te={},Oe={};h.forEach(Ae=>{fe[Ae.domain]={services:Ae.services,allow:Ae.allow||!1}}),m.forEach(Ae=>{te[Ae.entity]={services:Ae.services,allow:Ae.allow||!1}}),v.forEach(Ae=>{Oe[Ae.panel]={allow:Ae.allow||!1}});const we={description:re.description,admin:re.admin||!1,deny_all:re.deny_all||!1,permissions:{domains:fe,entities:te,panels:Oe}};d&&T&&(we.template=T,re.fallbackRole&&(we.fallbackRole=re.fallbackRole));const Ke={roleData:we,roleName:r||re.roleName};n(Ke)}catch(re){console.error("Form validation failed:",re)}},ie=()=>{const re=h.length;p([...h,{domain:"",services:[],allow:b}]),N({...A,[re]:!1})},le=re=>{p(h.filter((Oe,we)=>we!==re));const fe={...A};delete fe[re];const te={};Object.keys(fe).forEach(Oe=>{const we=parseInt(Oe);we>re?te[we-1]=fe[Oe]:we{const Oe=[...h];Oe[re]={...Oe[re],[fe]:te},p(Oe)},ne=()=>{const re=m.length;g([...m,{entity:"",services:[],allow:b}]),z({...L,[re]:!1})},ee=re=>{g(m.filter((Oe,we)=>we!==re));const fe={...L};delete fe[re];const te={};Object.keys(fe).forEach(Oe=>{const we=parseInt(Oe);we>re?te[we-1]=fe[Oe]:we{const Oe=[...m];Oe[re]={...Oe[re],[fe]:te},g(Oe)},ue=()=>{const re=v.length;O([...v,{panel:"",allow:b}]),X({...V,[re]:!1})},j=re=>{O(v.filter((Oe,we)=>we!==re));const fe={...V};delete fe[re];const te={};Object.keys(fe).forEach(Oe=>{const we=parseInt(Oe);we>re?te[we-1]=fe[Oe]:we{const Oe=[...v];Oe[re]={...Oe[re],[fe]:te},O(Oe)},he=re=>{N({...A,[re]:!0})},ge=re=>{z({...L,[re]:!0})},$e=re=>{var fe;return((fe=l.domains)==null?void 0:fe[re])||[]},Te=re=>{var fe;return((fe=l.entities)==null?void 0:fe[re])||[]},Ce=async()=>{var re,fe,te;try{const Oe=document.querySelector("home-assistant");if(Oe&&Oe.hass){const Ke=Oe.hass;if((fe=(re=Ke.auth)==null?void 0:re.data)!=null&&fe.access_token)return{access_token:Ke.auth.data.access_token};if((te=Ke.auth)!=null&&te.access_token)return{access_token:Ke.auth.access_token}}const we=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return we?{access_token:JSON.parse(we).access_token}:null}catch(Oe){return console.error("Auth error:",Oe),null}},Ie=()=>{const re=window.location.href,fe=new URL(re),te=fe.hostname,Oe=fe.protocol,we=fe.port?`:${fe.port}`:"",Ke=`${Oe}//${te}${we}/developer-tools/template`;window.open(Ke,"_blank")},_e=()=>{k(""),w(null),I(null),_(""),u.setFieldsValue({fallbackRole:""}),f(!1)},ve=async()=>{try{const re=await Ce();if(!re)return null;const fe=await fetch("/api/rbac/current-user",{headers:{Authorization:`Bearer ${re.access_token}`}});return fe.ok?(await fe.json()).person_entity_id:null}catch(re){return console.error("Error getting current user entity:",re),null}},Ne=(re="variable")=>{if(Q){let fe="";switch(re){case"variable":fe="current_user_str";break;case"home":fe="states[current_user_str].state == 'home'";break;case"away":fe="states[current_user_str].state != 'home'";break;default:fe="{{ states(current_user_str) }}"}const te=T+fe;k(te),w(null),I(null)}},ze=async()=>{try{if(w("loading"),_(""),!T){w("error"),_("No template to test"),sr.error({message:"Template Test Failed",description:"Please enter a template first",placement:"bottomRight",duration:3});return}const re=await Ce();if(!re)throw new Error("Not authenticated with Home Assistant");const te=await(await fetch("/api/rbac/evaluate-template",{method:"POST",headers:{Authorization:`Bearer ${re.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({template:T})})).json();te.success?(w(te.result?"true":"false"),I(te.evaluated_value)):(w("error"),_(te.error),I(null),sr.error({message:"Template Evaluation Error",description:te.error,placement:"bottomRight",duration:5}))}catch(re){console.error("Error testing template:",re),w("error"),_(re.message),I(null),sr.error({message:"Template Test Failed",description:re.message,placement:"bottomRight",duration:5})}};return M(At,{children:[M(dr,{title:M("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingRight:"40px"},children:[M("span",{children:r?`Edit Role: ${r}`:"Create New Role"}),M("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"4px"},children:[M("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[M(cl,{style:{fontSize:"14px"},children:"Admin Role"}),M(si,{checked:S,onChange:re=>{C(re),u.setFieldsValue({admin:re})}})]}),!S&&M("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[M(cl,{style:{fontSize:"14px"},children:b?"Deny All":"Allow All"}),M(Kt,{title:b?"Switch to Allow All (permit by default)":"Switch to Deny All (block by default)",children:M(si,{checked:b,checkedChildren:"✗",unCheckedChildren:"✓",style:{backgroundColor:b?"#ff4d4f":"#52c41a"},onChange:re=>{x(re),u.setFieldsValue({deny_all:re}),re&&(h.some(te=>!te.allow)||m.some(te=>!te.allow)||v.some(te=>!te.allow))&&B()}})})]})]})]}),open:t,onCancel:e,onOk:se,width:800,okText:"Save Role",cancelText:"Cancel",children:M(Sr,{form:u,layout:"vertical",children:[!r&&M(Sr.Item,{name:"roleName",label:"Role Name",rules:[{required:!0,message:"Please enter a role name"},{pattern:/^[a-z0-9_]+$/,message:"Role name must be lowercase letters, numbers, and underscores only"}],help:"Use lowercase letters, numbers, and underscores (e.g., 'power_user', 'guest', 'moderator')",children:M(bi,{placeholder:"Enter role name (e.g., 'power_user')"})}),M(Sr.Item,{name:"description",label:"Description",rules:[{required:!0,message:"Please enter a description"}],children:M(bi,{placeholder:"Enter role description"})}),M(Sr.Item,{name:"admin",hidden:!0,children:M(bi,{})}),M(Sr.Item,{name:"deny_all",hidden:!0,children:M(bi,{})}),!S&&M(At,{children:[M(au,{children:"Template Configuration"}),d?M("div",{children:[M("div",{style:{marginBottom:24},children:[M("div",{style:{marginBottom:8,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[M("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[M(vt,{size:"small",type:"text",icon:M(Vi,{}),onClick:_e,style:{color:"#ff4d4f",border:"none",padding:"4px",minWidth:"auto",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseEnter:re=>{re.currentTarget.style.backgroundColor="#ff4d4f",re.currentTarget.style.color="white"},onMouseLeave:re=>{re.currentTarget.style.backgroundColor="transparent",re.currentTarget.style.color="#ff4d4f"},title:"Clear template settings"}),M(cl,{strong:!0,children:"Template"})]}),M("div",{style:{display:"flex",gap:"8px"},children:[M(vt,{size:"small",icon:M(RW,{}),onClick:Ie,title:"Open Home Assistant Template Editor",children:"HA Editor"}),M(vt,{size:"small",loading:$==="loading",onClick:ze,type:$==="true"?"primary":"default",style:{backgroundColor:$==="true"?"#52c41a":$==="false"?"#ff4d4f":$==="error"?"#faad14":void 0,color:$?"white":void 0,borderColor:$==="true"?"#52c41a":$==="false"?"#ff4d4f":$==="error"?"#faad14":void 0,minWidth:"100px"},icon:$==="true"?M(kd,{}):$==="false"?M(Vi,{}):$==="error"?M(sW,{}):M(Uu,{}),children:$==="true"?"True":$==="false"?"False":$==="error"?"Error":"Test"})]})]}),M("div",{style:{position:"relative"},children:[M(bO,{value:T,height:"150px",extensions:[XY({jsx:!0})],onChange:re=>{k(re),w(null),I(null)},placeholder:"Enter Jinja2 template (e.g., {{ states(current_user_str) == 'home' }})",theme:"light",basicSetup:{lineNumbers:!0,highlightActiveLineGutter:!0,highlightSpecialChars:!0,foldGutter:!0,drawSelection:!0,dropCursor:!0,allowMultipleSelections:!0,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,rectangularSelection:!0,crosshairCursor:!0,highlightActiveLine:!0,highlightSelectionMatches:!0,closeBracketsKeymap:!0,searchKeymap:!0,foldKeymap:!0,completionKeymap:!0,lintKeymap:!0},style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"}}),Q&&M(P0,{menu:{items:[{key:"variable",label:"Insert user variable",icon:M(Uu,{}),onClick:()=>Ne("variable")},{key:"home",label:"Check if home",icon:M(kd,{}),onClick:()=>Ne("home")},{key:"away",label:"Check if away",icon:M(Vi,{}),onClick:()=>Ne("away")}]},trigger:["click"],placement:"topRight",children:M(vt,{type:"primary",size:"small",icon:M(Uu,{}),style:{position:"absolute",bottom:"8px",right:"8px",zIndex:10,fontSize:"12px",height:"28px",padding:"0 8px"},title:"Insert user template snippets",children:["Insert User ",M(O2,{})]})})]}),M(cl,{type:"secondary",style:{fontSize:"12px"},children:$&&R!==null?M(At,{children:[M("strong",{children:"Evaluated result:"})," ",String(R)]}):"Jinja2 template that determines when this role should be active. If false, the fallback role will be used."})]}),M(Sr.Item,{name:"fallbackRole",label:"Fallback Role",help:"Role to use when template evaluates to false",children:M(Rn,{showSearch:!0,placeholder:"Select fallback role",filterOption:(re,fe)=>fe.children.toLowerCase().indexOf(re.toLowerCase())>=0,children:o.filter(re=>re!==r).map(re=>M(Rn.Option,{value:re,children:re},re))})}),M(cl,{type:"secondary",style:{fontSize:"12px",fontStyle:"italic"},children:"When the template evaluates to false, users with this role will automatically be assigned the fallback role instead."})]}):M(vt,{type:"dashed",icon:M($o,{}),onClick:()=>f(!0),style:{width:"100%",marginBottom:16},children:"Add Template"}),M(au,{children:"Domains"}),h.map((re,fe)=>M("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":fe,children:M(ha,{gutter:16,align:"middle",children:[M(Hn,{span:10,children:M(Rn,{showSearch:!0,placeholder:"Select domain",value:re.domain,onChange:te=>pe(fe,"domain",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:a.map(te=>M(Rn.Option,{value:te,children:te},te))})}),M(Hn,{span:10,children:A[fe]?M(Rn,{mode:"multiple",showSearch:!0,placeholder:re.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:re.services,onChange:te=>pe(fe,"services",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:$e(re.domain).map(te=>M(Rn.Option,{value:te,children:te},te))}):M(Kt,{title:re.allow?"Add specific services to allow":"Add specific services",children:M(vt,{type:"dashed",icon:M($o,{}),onClick:()=>he(fe),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:te=>{te.currentTarget.style.opacity="1",te.currentTarget.style.borderColor="#1890ff",te.currentTarget.style.color="#1890ff"},onMouseLeave:te=>{te.currentTarget.style.opacity="0.6",te.currentTarget.style.borderColor="#d9d9d9",te.currentTarget.style.color="#999"},children:re.allow?"Allow Services":"Services"})})}),M(Hn,{span:2,children:M(Kt,{title:re.allow?"Allow this domain/services":"Block this domain/services",children:M(si,{size:"small",checked:re.allow,onChange:te=>pe(fe,"allow",te),checkedChildren:"✓",unCheckedChildren:"✗",disabled:b&&re.allow,style:{backgroundColor:re.allow?"#52c41a":"#ff4d4f"}})})}),M(Hn,{span:2,children:M(vt,{type:"text",danger:!0,icon:M(Yu,{}),onClick:()=>le(fe)})})]})},fe)),M(vt,{type:"dashed",icon:M($o,{}),onClick:ie,style:{width:"100%",marginBottom:16},children:"Add Domain"}),M(au,{children:"Entities"}),m.map((re,fe)=>M("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":fe,children:M(ha,{gutter:16,align:"middle",children:[M(Hn,{span:10,children:M(Rn,{showSearch:!0,placeholder:"Select entity",value:re.entity,onChange:te=>ce(fe,"entity",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:s.map(te=>M(Rn.Option,{value:te,children:te},te))})}),M(Hn,{span:10,children:L[fe]?M(Rn,{mode:"multiple",showSearch:!0,placeholder:re.allow?"Select services to allow (empty = allow all)":"Select services (empty = block all)",value:re.services,onChange:te=>ce(fe,"services",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:Te(re.entity).map(te=>M(Rn.Option,{value:te,children:te},te))}):M(Kt,{title:re.allow?"Add specific services to allow":"Add specific services",children:M(vt,{type:"dashed",icon:M($o,{}),onClick:()=>ge(fe),style:{width:"100%",height:"32px",border:"2px dashed #d9d9d9",background:"transparent",color:"#999",opacity:.6,transition:"all 0.3s ease"},onMouseEnter:te=>{te.currentTarget.style.opacity="1",te.currentTarget.style.borderColor="#1890ff",te.currentTarget.style.color="#1890ff"},onMouseLeave:te=>{te.currentTarget.style.opacity="0.6",te.currentTarget.style.borderColor="#d9d9d9",te.currentTarget.style.color="#999"},children:re.allow?"Allow Services":"Services"})})}),M(Hn,{span:2,children:M(Kt,{title:re.allow?"Allow this entity/services":"Block this entity/services",children:M(si,{size:"small",checked:re.allow,onChange:te=>ce(fe,"allow",te),checkedChildren:"✓",unCheckedChildren:"✗",disabled:b&&re.allow,style:{backgroundColor:re.allow?"#52c41a":"#ff4d4f"}})})}),M(Hn,{span:2,children:M(vt,{type:"text",danger:!0,icon:M(Yu,{}),onClick:()=>ee(fe)})})]})},fe)),M(vt,{type:"dashed",icon:M($o,{}),onClick:ne,style:{width:"100%"},children:"Add Entity"}),M(au,{children:"Dashboards"}),v.map((re,fe)=>M("div",{style:{marginBottom:16,padding:16,border:"1px solid #f0f0f0",borderRadius:6},"data-restriction-index":fe,children:M(ha,{gutter:16,align:"middle",children:[M(Hn,{span:20,children:M(Rn,{showSearch:!0,placeholder:"Select dashboard",value:re.panel,onChange:te=>J(fe,"panel",te),style:{width:"100%"},filterOption:(te,Oe)=>Oe.children.toLowerCase().indexOf(te.toLowerCase())>=0,children:c.map(te=>M(Rn.Option,{value:te,children:te},te))})}),M(Hn,{span:2,children:M(Kt,{title:re.allow?"Allow this dashboard":"Block this dashboard",children:M(si,{size:"small",checked:re.allow,onChange:te=>J(fe,"allow",te),checkedChildren:"✓",unCheckedChildren:"✗",disabled:b&&re.allow,style:{backgroundColor:re.allow?"#52c41a":"#ff4d4f"}})})}),M(Hn,{span:2,children:M(vt,{type:"text",danger:!0,icon:M(Yu,{}),onClick:()=>j(fe)})})]})},fe)),M(vt,{type:"dashed",icon:M($o,{}),onClick:ue,style:{width:"100%"},children:"Add Dashboard"})]})]})}),M(dr,{title:"Convert Existing Restrictions?",open:F,onCancel:()=>G("cancel"),footer:[M(vt,{onClick:()=>G("cancel"),children:"Cancel"},"cancel"),M(vt,{onClick:()=>G("clear"),children:"Clear All"},"clear"),M(vt,{type:"primary",onClick:()=>G("convert"),children:"Convert to Allow"},"convert")],children:M("div",{children:M("p",{children:"You have blocking restrictions configured. What would you like to do?"})})})]})}function YY({data:t,onSuccess:e,onError:n,onDataChange:r}){const[i,o]=K(!1),[a,s]=K({}),[l,c]=K(null),[u,d]=K(null),[f,h]=K(!1);be(()=>{var $;($=t.config)!=null&&$.roles&&s(t.config.roles)},[t.config]);const p=async()=>{try{const $=m();if($&&$.auth){if($.auth.data&&$.auth.data.access_token)return{access_token:$.auth.data.access_token,token_type:"Bearer"};if($.auth.access_token)return{access_token:$.auth.access_token,token_type:"Bearer"}}const w=localStorage.getItem("hassTokens")||sessionStorage.getItem("hassTokens");return w?{access_token:JSON.parse(w).access_token,token_type:"Bearer"}:null}catch($){return console.error("Auth error:",$),null}},m=()=>{try{const $=document.querySelector("home-assistant");return $&&$.hass?$.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch($){return console.error("Error getting hass object:",$),null}},g=()=>{h(!0)},v=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"delete_role",roleName:$})})).ok)throw new Error("Failed to delete role");const _={...a};delete _[$],s(_),r({...t,config:{...t.config,roles:_}}),e(`Role "${$}" deleted successfully!`)}catch(w){console.error("Error deleting role:",w),n(w.message)}finally{o(!1)}},O=$=>{const w=a[$];w&&(c($),d(w))},S=()=>{c(null),d(null)},C=()=>{h(!1)},b=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");const{roleName:P,roleData:_}=$,T=P||l;if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_role",roleName:T,roleConfig:_})})).ok)throw new Error("Failed to update role");const R={...a};R[l]=_,s(R),r({...t,config:{...t.config,roles:R}}),e(`Role "${l}" updated successfully!`),S()}catch(w){console.error("Error updating role:",w),n(w.message)}finally{o(!1)}},x=async $=>{o(!0);try{const w=await p();if(!w)throw new Error("Not authenticated with Home Assistant");const{roleName:P,roleData:_}=$;if(!(await fetch("/api/rbac/config",{method:"POST",headers:{Authorization:`Bearer ${w.access_token}`,"Content-Type":"application/json"},body:JSON.stringify({action:"update_role",roleName:P,roleConfig:_})})).ok)throw new Error("Failed to create role");const k={...a};k[P]=_,s(k),r({...t,config:{...t.config,roles:k}}),e(`Role "${P}" created successfully!`),C()}catch(w){console.error("Error creating role:",w),n(w.message)}finally{o(!1)}};return M("div",{children:[M(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Create and manage roles with specific permissions."}),M(yn.Title,{level:4,children:"Existing Roles"}),Object.keys(a).length===0?M(yn.Text,{type:"secondary",italic:!0,children:"No roles created yet."}):M(ha,{gutter:[16,16],children:Object.entries(a).map(([$,w])=>{var P,_,T;return M(Hn,{xs:24,sm:12,children:M(Ca,{size:"small",style:{height:"100%"},actions:[M("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#1890ff"},onMouseEnter:k=>{k.currentTarget.style.backgroundColor="#1890ff",k.currentTarget.style.color="black"},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent",k.currentTarget.style.color="#1890ff"},onClick:()=>O($),children:M(vt,{type:"link",icon:M(FP,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Edit"})},"edit"),M(DP,{title:"Are you sure you want to delete this role?",onConfirm:()=>v($),okText:"Yes",cancelText:"No",children:M("div",{style:{padding:"8px 16px",margin:"4px",borderRadius:"4px",transition:"all 0.2s ease",cursor:"pointer",backgroundColor:"transparent",color:"#ff4d4f"},onMouseEnter:k=>{k.currentTarget.style.backgroundColor="#ff4d4f",k.currentTarget.style.color="black"},onMouseLeave:k=>{k.currentTarget.style.backgroundColor="transparent",k.currentTarget.style.color="#ff4d4f"},children:M(vt,{type:"link",danger:!0,icon:M(Yu,{}),disabled:i,style:{color:"inherit",padding:0,height:"auto",border:"none",background:"transparent"},children:"Delete"})})},"delete")],children:M("div",{style:{height:"120px",display:"flex",flexDirection:"column"},children:[M(Ca.Meta,{title:$,description:w.description||"No description"}),M(Do,{wrap:!0,style:{marginTop:"auto"},children:[w.template&&M(Kt,{title:`Template: ${w.template}`,children:M(na,{color:"purple",icon:M(Uu,{}),children:"Template"})}),w.deny_all&&M(Kt,{title:"Deny All mode enabled - blocks by default",children:M(na,{color:"red",children:"Deny All"})}),Object.keys(((P=w.permissions)==null?void 0:P.domains)||{}).length>0&&M(Kt,{title:M("div",{children:[M("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Domains:"}),Object.keys(w.permissions.domains).map(k=>M("div",{style:{fontSize:"12px"},children:["• ",k]},k))]}),placement:"top",children:M(na,{color:"blue",children:[Object.keys(w.permissions.domains).length," domains"]})}),Object.keys(((_=w.permissions)==null?void 0:_.entities)||{}).length>0&&M(Kt,{title:M("div",{children:[M("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Entities:"}),Object.keys(w.permissions.entities).map(k=>M("div",{style:{fontSize:"12px"},children:["• ",k]},k))]}),placement:"top",children:M(na,{color:"green",children:[Object.keys(w.permissions.entities).length," entities"]})}),Object.keys(((T=w.permissions)==null?void 0:T.panels)||{}).length>0&&M(Kt,{title:M("div",{children:[M("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Dashboards:"}),Object.keys(w.permissions.panels).map(k=>M("div",{style:{fontSize:"12px"},children:["• ",k]},k))]}),placement:"top",children:M(na,{color:"green",children:[Object.keys(w.permissions.panels).length," panels"]})})]})]})})},$)})}),M(vt,{type:"dashed",icon:M($o,{}),onClick:g,disabled:i,style:{width:"100%",marginTop:16},children:"Add Role"}),M(ev,{visible:!!l,onCancel:S,onSave:b,roleName:l,roleConfig:u,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services,panels:t.panels}),M(ev,{visible:f,onCancel:C,onSave:x,roleName:null,roleConfig:null,availableRoles:Object.keys(a),domains:t.domains,entities:t.entities,services:t.services,panels:t.panels})]})}const UY=()=>{try{const t=document.querySelector("home-assistant");return t&&t.hass?t.hass:window.hass?window.hass:window.parent&&window.parent!==window&&window.parent.hass?window.parent.hass:null}catch(t){return console.error("Error getting hass object:",t),null}},aR=async()=>{try{const t=UY();if(t&&t.auth){if(t.auth.data&&t.auth.data.access_token)return{access_token:t.auth.data.access_token,token_type:"Bearer"};if(t.auth.access_token)return{access_token:t.auth.access_token,token_type:"Bearer"}}const e=localStorage.getItem("hassTokens");if(e)return{access_token:JSON.parse(e).access_token,token_type:"Bearer"};const n=sessionStorage.getItem("hassTokens");if(n)return{access_token:JSON.parse(n).access_token,token_type:"Bearer"};const r=await fetch("/auth/token");if(!r.ok)throw new Error("Not authenticated");return await r.json()}catch(t){return console.error("Error getting HA auth:",t),null}},Zr=async(t,e={})=>{const n=await aR();if(!n)throw new Error("Not authenticated with Home Assistant");const r={headers:{Authorization:`Bearer ${n.access_token}`,"Content-Type":"application/json",...e.headers}};return fetch(t,{...r,...e})};function KY({data:t,onSuccess:e,onError:n,onDataChange:r,isDarkMode:i=!1}){const[o,a]=K(!1),[s,l]=K({}),[c,u]=K(null),[d,f]=K(null);be(()=>{var b;if((b=t.config)!=null&&b.users){const x={};Object.entries(t.config.users).forEach(([$,w])=>{x[$]=w.role||"user"}),l(x)}},[t.config]);const h=b=>{var w;const x=s[b.id];if(!x||!((w=t.config)!=null&&w.roles))return!1;const $=t.config.roles[x];return($==null?void 0:$.admin)===!0},p=b=>{if(!b)return{};const x=i?"#262626":"white";return{border:"2px solid transparent",background:`linear-gradient(${x}, ${x}) padding-box, linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57) border-box`,animation:"adminGlow 2s ease-in-out infinite alternate",boxShadow:"0 0 20px rgba(255, 107, 107, 0.3)"}},m=async(b,x)=>{var $;a(!0);try{if(!(await Zr("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"assign_user_role",userId:b,roleName:x})})).ok)throw new Error("Failed to assign role");const P={...s,[b]:x};l(P);const _={...(($=t.config)==null?void 0:$.users)||{}};_[b]||(_[b]={}),_[b].role=x,r({...t,config:{...t.config,users:_}});const T=t.users.find(R=>R.id===b),k=T?T.name:b;e(`Role "${x}" assigned to ${k} successfully!`)}catch(w){console.error("Error assigning role:",w),n(w.message)}finally{a(!1)}},g=()=>{var x;const b=Object.keys(((x=t.config)==null?void 0:x.roles)||{});return b.includes("admin")||b.unshift("admin"),b.includes("user")||b.push("user"),b.includes("guest")||b.push("guest"),b},v=b=>{const x=s[b];return g().includes(x)},O=b=>b.name||b.username||b.id,S=b=>b.entity_picture?b.entity_picture:b.id?`/api/image/serve/${b.id}/512x512`:null,C=()=>{u(null),f(null)};return M("div",{children:[M("style",{children:` @keyframes adminGlow { 0% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.3); @@ -327,9 +327,9 @@ html body { .role-selector-container .ant-space-item:last-child { margin-left: auto !important; } - `}),A(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Assign roles to users to control their access permissions."}),t.users&&t.users.length>0?A(xs,{gutter:[16,16],children:t.users.map(b=>A(Mr,{xs:24,sm:12,children:A(Sa,{size:"small",style:{height:"100%",...p(h(b))},children:A(jo,{align:"center",style:{width:"100%",height:"80px"},className:"role-selector-container",children:[A(p0,{src:S(b),size:48,children:O(b).charAt(0).toUpperCase()}),A(jo,{direction:"vertical",style:{flex:1},children:[A(yn.Text,{strong:!0,children:O(b)}),A(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:["ID: ",b.id]})]}),A("div",{children:A(jn,{value:v(b.id)?s[b.id]||"user":void 0,onChange:C=>m(b.id,C),disabled:o,style:{minWidth:120},size:"small",status:v(b.id)?"":"error",placeholder:v(b.id)?void 0:"Select Role...",children:g().map(C=>A(jn.Option,{value:C,children:C.charAt(0).toUpperCase()+C.slice(1)},C))})})]})})},b.id))}):A(yn.Text,{type:"secondary",style:{textAlign:"center",display:"block",padding:"40px 0"},children:"No users found."}),A(Jg,{isOpen:!!c,onClose:x,roleName:c,roleData:d,data:t,onSuccess:e,onError:n,onDataChange:r})]})}const{TextArea:JY}=bi,{Title:WU,Text:eU}=yn;function tU({visible:t,onClose:e}){const[n,r]=J(!1),[i,o]=J(""),[a,s]=J(null),l=U(!0);be(()=>()=>{l.current=!1},[]);const c=async()=>{try{const h=localStorage.getItem("hassTokens");if(h)return JSON.parse(h).access_token;const p=sessionStorage.getItem("hassTokens");return p?JSON.parse(p).access_token:null}catch(h){return console.error("Auth error:",h),null}},u=async()=>{try{r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const p=await fetch("/api/rbac/deny-log",{headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!p.ok){const g=await p.json();throw new Error(g.message||"Failed to fetch deny log")}const m=await p.json();if(m.success)l.current&&o(m.contents);else throw new Error(m.error||"Failed to fetch deny log")}catch(h){console.error("Error fetching deny log:",h),l.current&&(s(h.message),o(""))}finally{l.current&&r(!1)}};return be(()=>{t&&(l.current=!0,u())},[t]),A(ur,{title:A("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[A(DB,{}),A("span",{children:"Access Denial Log"})]}),open:t,onCancel:e,width:800,footer:[A(vt,{danger:!0,icon:A(eW,{}),onClick:()=>{ur.confirm({title:"Clear Deny Log",content:"Are you sure you want to clear the deny log? This action cannot be undone.",okText:"Clear",okType:"danger",cancelText:"Cancel",onOk:async()=>{try{if(!l.current)return;r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const p=await fetch("/api/rbac/deny-log",{method:"DELETE",headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!p.ok){const g=await p.json();throw new Error(g.message||"Failed to clear deny log")}const m=await p.json();if(m.success)l.current&&o("");else throw new Error(m.error||"Failed to clear deny log")}catch(h){console.error("Error clearing deny log:",h),l.current&&(s(h.message),ur.error({title:"Clear Failed",content:`Failed to clear deny log: ${h.message}`,getContainer:!1}))}finally{l.current&&r(!1)}}})},children:"Clear Log"},"clear"),A(vt,{icon:A(wl,{}),onClick:u,loading:n,children:"Refresh"},"refresh"),A(vt,{type:"primary",onClick:e,children:"Close"},"close")],style:{top:20},children:[A("div",{style:{marginBottom:"16px"},children:A(oa,{message:"Deny Log Information",description:"This log shows all access denials when deny list logging is enabled. Entries are shown with newest first.",type:"info",showIcon:!0,style:{marginBottom:"16px"}})}),a&&A(oa,{message:"Error Loading Log",description:a,type:"error",showIcon:!0,style:{marginBottom:"16px"}}),A("div",{style:{position:"relative"},children:[n&&A("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10},children:A(QP,{size:"large"})}),A(JY,{value:(h=>!h||h.trim()===""?"No deny log entries found.":h.trim().split(` + `}),M(yn.Paragraph,{type:"secondary",style:{marginBottom:24},children:"Assign roles to users to control their access permissions."}),t.users&&t.users.length>0?M(ha,{gutter:[16,16],children:t.users.map(b=>M(Hn,{xs:24,sm:12,children:M(Ca,{size:"small",style:{height:"100%",...p(h(b))},children:M(Do,{align:"center",style:{width:"100%",height:"80px"},className:"role-selector-container",children:[M(m0,{src:S(b),size:48,children:O(b).charAt(0).toUpperCase()}),M(Do,{direction:"vertical",style:{flex:1},children:[M(yn.Text,{strong:!0,children:O(b)}),M(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:["ID: ",b.id]})]}),M("div",{children:M(Rn,{value:v(b.id)?s[b.id]||"user":void 0,onChange:x=>m(b.id,x),disabled:o,style:{minWidth:120},size:"small",status:v(b.id)?"":"error",placeholder:v(b.id)?void 0:"Select Role...",children:g().map(x=>M(Rn.Option,{value:x,children:x.charAt(0).toUpperCase()+x.slice(1)},x))})})]})})},b.id))}):M(yn.Text,{type:"secondary",style:{textAlign:"center",display:"block",padding:"40px 0"},children:"No users found."}),M(ev,{isOpen:!!c,onClose:C,roleName:c,roleData:d,data:t,onSuccess:e,onError:n,onDataChange:r})]})}const{TextArea:JY}=bi,{Title:WU,Text:eU}=yn;function tU({visible:t,onClose:e}){const[n,r]=K(!1),[i,o]=K(""),[a,s]=K(null),l=Y(!0);be(()=>()=>{l.current=!1},[]);const c=async()=>{try{const h=localStorage.getItem("hassTokens");if(h)return JSON.parse(h).access_token;const p=sessionStorage.getItem("hassTokens");return p?JSON.parse(p).access_token:null}catch(h){return console.error("Auth error:",h),null}},u=async()=>{try{r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const p=await fetch("/api/rbac/deny-log",{headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!p.ok){const g=await p.json();throw new Error(g.message||"Failed to fetch deny log")}const m=await p.json();if(m.success)l.current&&o(m.contents);else throw new Error(m.error||"Failed to fetch deny log")}catch(h){console.error("Error fetching deny log:",h),l.current&&(s(h.message),o(""))}finally{l.current&&r(!1)}};return be(()=>{t&&(l.current=!0,u())},[t]),M(dr,{title:M("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[M(DB,{}),M("span",{children:"Access Denial Log"})]}),open:t,onCancel:e,width:800,footer:[M(vt,{danger:!0,icon:M(eW,{}),onClick:()=>{dr.confirm({title:"Clear Deny Log",content:"Are you sure you want to clear the deny log? This action cannot be undone.",okText:"Clear",okType:"danger",cancelText:"Cancel",onOk:async()=>{try{if(!l.current)return;r(!0),s(null);const h=await c();if(!h)throw new Error("Not authenticated");const p=await fetch("/api/rbac/deny-log",{method:"DELETE",headers:{Authorization:`Bearer ${h}`,"Content-Type":"application/json"}});if(!p.ok){const g=await p.json();throw new Error(g.message||"Failed to clear deny log")}const m=await p.json();if(m.success)l.current&&o("");else throw new Error(m.error||"Failed to clear deny log")}catch(h){console.error("Error clearing deny log:",h),l.current&&(s(h.message),dr.error({title:"Clear Failed",content:`Failed to clear deny log: ${h.message}`,getContainer:!1}))}finally{l.current&&r(!1)}}})},children:"Clear Log"},"clear"),M(vt,{icon:M(wl,{}),onClick:u,loading:n,children:"Refresh"},"refresh"),M(vt,{type:"primary",onClick:e,children:"Close"},"close")],style:{top:20},children:[M("div",{style:{marginBottom:"16px"},children:M(aa,{message:"Deny Log Information",description:"This log shows all access denials when deny list logging is enabled. Entries are shown with newest first.",type:"info",showIcon:!0,style:{marginBottom:"16px"}})}),a&&M(aa,{message:"Error Loading Log",description:a,type:"error",showIcon:!0,style:{marginBottom:"16px"}}),M("div",{style:{position:"relative"},children:[n&&M("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:10},children:M(QP,{size:"large"})}),M(JY,{value:(h=>!h||h.trim()===""?"No deny log entries found.":h.trim().split(` `).reverse().join(` -`))(i),readOnly:!0,rows:20,style:{fontFamily:'Monaco, Consolas, "Courier New", monospace',fontSize:"12px",lineHeight:"1.4",backgroundColor:"#f5f5f5",opacity:n?.5:1},placeholder:"No deny log entries found. Access denials will appear here when deny list logging is enabled."})]}),A("div",{style:{marginTop:"12px",fontSize:"12px",color:"#666"},children:A(eU,{type:"secondary",children:"Log file location: custom_components/rbac/deny_list.log"})})]})}const Za=63,Vx=64,nU=1,rU=2,sR=3,iU=4,lR=5,oU=6,aU=7,cR=65,sU=66,lU=8,cU=9,uU=10,dU=11,fU=12,uR=13,hU=19,pU=20,mU=29,gU=33,vU=34,OU=47,bU=0,bO=1,ev=2,hc=3,tv=4;class ia{constructor(e,n,r){this.parent=e,this.depth=n,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+r}}ia.top=new ia(null,-1,bU);function El(t,e){for(let n=0,r=e-t.pos-1;;r--,n++){let i=t.peek(r);if(mo(i)||i==-1)return n}}function nv(t){return t==32||t==9}function mo(t){return t==10||t==13}function dR(t){return nv(t)||mo(t)}function ua(t){return t<0||dR(t)}const yU=new Uk({start:ia.top,reduce(t,e){return t.type==hc&&(e==pU||e==vU)?t.parent:t},shift(t,e,n,r){if(e==sR)return new ia(t,El(r,r.pos),bO);if(e==cR||e==lR)return new ia(t,El(r,r.pos),ev);if(e==Za)return t.parent;if(e==hU||e==gU)return new ia(t,0,hc);if(e==uR&&t.type==tv)return t.parent;if(e==OU){let i=/[1-9]/.exec(r.read(r.pos,n.pos));if(i)return new ia(t,t.depth+ +i[0],tv)}return t},hash(t){return t.hash}});function Is(t,e,n=0){return t.peek(n)==e&&t.peek(n+1)==e&&t.peek(n+2)==e&&ua(t.peek(n+3))}const SU=new bo((t,e)=>{if(t.next==-1&&e.canShift(Vx))return t.acceptToken(Vx);let n=t.peek(-1);if((mo(n)||n<0)&&e.context.type!=hc){if(Is(t,45))if(e.canShift(Za))t.acceptToken(Za);else return t.acceptToken(nU,3);if(Is(t,46))if(e.canShift(Za))t.acceptToken(Za);else return t.acceptToken(rU,3);let r=0;for(;t.next==32;)r++,t.advance();(r{if(e.context.type==hc){t.next==63&&(t.advance(),ua(t.next)&&t.acceptToken(aU));return}if(t.next==45)t.advance(),ua(t.next)&&t.acceptToken(e.context.type==bO&&e.context.depth==El(t,t.pos-1)?iU:sR);else if(t.next==63)t.advance(),ua(t.next)&&t.acceptToken(e.context.type==ev&&e.context.depth==El(t,t.pos-1)?oU:lR);else{let n=t.pos;for(;;)if(nv(t.next)){if(t.pos==n)return;t.advance()}else if(t.next==33)fR(t);else if(t.next==38)rv(t);else if(t.next==42){rv(t);break}else if(t.next==39||t.next==34){if(yO(t,!0))break;return}else if(t.next==91||t.next==123){if(!$U(t))return;break}else{hR(t,!0,!1,0);break}for(;nv(t.next);)t.advance();if(t.next==58){if(t.pos==n&&e.canShift(mU))return;let r=t.peek(1);ua(r)&&t.acceptTokenTo(e.context.type==ev&&e.context.depth==El(t,n)?sU:cR,n)}}},{contextual:!0});function CU(t){return t>32&&t<127&&t!=34&&t!=37&&t!=44&&t!=60&&t!=62&&t!=92&&t!=94&&t!=96&&t!=123&&t!=124&&t!=125}function Hx(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function Xx(t,e){return t.next==37?(t.advance(),Hx(t.next)&&t.advance(),Hx(t.next)&&t.advance(),!0):CU(t.next)||e&&t.next==44?(t.advance(),!0):!1}function fR(t){if(t.advance(),t.next==60){for(t.advance();;)if(!Xx(t,!0)){t.next==62&&t.advance();break}}else for(;Xx(t,!1););}function rv(t){for(t.advance();!ua(t.next)&&sf(t.tag)!="f";)t.advance()}function yO(t,e){let n=t.next,r=!1,i=t.pos;for(t.advance();;){let o=t.next;if(o<0)break;if(t.advance(),o==n)if(o==39)if(t.next==39)t.advance();else break;else break;else if(o==92&&n==34)t.next>=0&&t.advance();else if(mo(o)){if(e)return!1;r=!0}else if(e&&t.pos>=i+1024)return!1}return!r}function $U(t){for(let e=[],n=t.pos+1024;;)if(t.next==91||t.next==123)e.push(t.next),t.advance();else if(t.next==39||t.next==34){if(!yO(t,!0))return!1}else if(t.next==93||t.next==125){if(e[e.length-1]!=t.next-2)return!1;if(e.pop(),t.advance(),!e.length)return!0}else{if(t.next<0||t.pos>n||mo(t.next))return!1;t.advance()}}const wU="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function sf(t){return t<33?"u":t>125?"s":wU[t-33]}function jp(t,e){let n=sf(t);return n!="u"&&!(e&&n=="f")}function hR(t,e,n,r){if(sf(t.next)=="s"||(t.next==63||t.next==58||t.next==45)&&jp(t.peek(1),n))t.advance();else return!1;let i=t.pos;for(;;){let o=t.next,a=0,s=r+1;for(;dR(o);){if(mo(o)){if(e)return!1;s=0}else s++;o=t.peek(++a)}if(!(o>=0&&(o==58?jp(t.peek(a+1),n):o==35?t.peek(a-1)!=32:jp(o,n)))||!n&&s<=r||s==0&&!n&&(Is(t,45,a)||Is(t,46,a)))break;if(e&&sf(o)=="f")return!1;for(let c=a;c>=0;c--)t.advance();if(e&&t.pos>i+1024)return!1}return!0}const PU=new bo((t,e)=>{if(t.next==33)fR(t),t.acceptToken(fU);else if(t.next==38||t.next==42){let n=t.next==38?uU:dU;rv(t),t.acceptToken(n)}else t.next==39||t.next==34?(yO(t,!1),t.acceptToken(cU)):hR(t,!1,e.context.type==hc,e.context.depth)&&t.acceptToken(lU)}),_U=new bo((t,e)=>{let n=e.context.type==tv?e.context.depth:-1,r=t.pos;e:for(;;){let i=0,o=t.next;for(;o==32;)o=t.peek(++i);if(!i&&(Is(t,45,i)||Is(t,46,i))||!mo(o)&&(n<0&&(n=Math.max(e.context.depth+1,i)),iYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:yU,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[TU],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[SU,xU,PU,_U,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),RU=ic.define({name:"yaml",parser:kU.configure({props:[eO.add({Stream:t=>{for(let e=t.node.resolve(t.pos,-1);e&&e.to>=t.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.fromt.pos)return null}}return null},FlowMapping:jg({closing:"}"}),FlowSequence:jg({closing:"]"})}),nO.add({"FlowMapping FlowSequence":AT,"Item Pair BlockLiteral":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function IU(){return new IT(RU)}const{Text:MU}=yn;function EU({visible:t,onClose:e,onSuccess:n}){const[r,i]=J(""),[o,a]=J(!1),[s,l]=J(!1);be(()=>{t&&c()},[t]);const c=async()=>{a(!0);try{const f=await oi("/api/rbac/yaml-editor",{method:"GET"});if(!f.ok){const p=await f.json();throw new Error(p.error||"Failed to load YAML content")}const h=await f.json();i(h.yaml_content||"")}catch(f){console.error("Error loading YAML content:",f),ar.error({message:"Error Loading YAML",description:f.message,placement:"bottomRight",duration:5})}finally{a(!1)}},u=async()=>{l(!0);try{const f=await oi("/api/rbac/yaml-editor",{method:"POST",body:JSON.stringify({yaml_content:r})}),h=await f.json();if(!f.ok)throw new Error(h.error||"Failed to save YAML content");ar.success({message:"YAML Updated Successfully",description:h.message||"Configuration has been saved",placement:"bottomRight",duration:3}),n==null||n(),e()}catch(f){console.error("Error saving YAML content:",f),ar.error({message:"Error Saving YAML",description:f.message,placement:"bottomRight",duration:5})}finally{l(!1)}},d=()=>{e()};return A(ur,{title:A(jo,{children:[A(Yu,{style:{color:"#1890ff"}}),A("span",{children:"Edit YAML Configuration"})]}),open:t,onCancel:d,width:"90%",style:{maxWidth:"1200px"},footer:A(jo,{children:[A(vt,{icon:A(wl,{}),onClick:c,loading:o,disabled:s,children:"Reload"}),A(vt,{onClick:d,disabled:s,children:"Cancel"}),A(vt,{type:"primary",icon:A(xW,{}),onClick:u,loading:s,disabled:o,children:"Save Changes"})]}),children:[A("div",{style:{marginBottom:16},children:A(MU,{type:"secondary",children:"Edit the access_control.yaml configuration directly. Changes will be validated before saving."})}),A("div",{style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"},children:A(OO,{value:r,height:"calc(100vh - 300px)",onChange:f=>{i(f)},editable:!o,extensions:[IU()],basicSetup:{lineNumbers:!0,foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,highlightSelectionMatches:!1,searchKeymap:!0}})})]})}function AU(){return A("div",{class:"loading",children:[A("h2",{children:"Loading RBAC Configuration..."}),A("p",{children:"Please wait while we load your access control settings."})]})}let ld=!1;function pR(){return ld=localStorage.getItem("rbac-theme")==="dark",mR(ld),ld}function mR(t){ld=t;const e=document.documentElement;t?(e.classList.add("dark-theme"),e.classList.remove("light-theme")):(e.classList.add("light-theme"),e.classList.remove("dark-theme")),NU(t)}function QU(t){localStorage.setItem("rbac-theme",t?"dark":"light")}function NU(t){let e=document.querySelector('meta[name="theme-color"]');e||(e=document.createElement("meta"),e.name="theme-color",document.head.appendChild(e)),e.content=t?"#2a2a2a":"#ffffff"}pR();function zU(){var ue,de;const[t,e]=J(!0),[n,r]=J(!1),[i,o]=J(!0),[a,s]=J(null),[l,c]=J(!0),[u,d]=J(!0),[f,h]=J(!1),[p,m]=J(!1),[g,v]=J(!1),[O,S]=J(!1),[x,b]=J(!1),[C,$]=J(!1),[w,P]=J(!1),[_,T]=J(null),[R,k]=J(!1),[I,Q]=J({last_rejection:null,last_user_rejected:null}),[M,E]=J({users:[],domains:[],entities:[],services:[],config:null}),[N,z]=J({settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1}),L={algorithm:w?E1.darkAlgorithm:E1.defaultAlgorithm,token:{colorPrimary:"#1890ff",borderRadius:6}};be(()=>{B(),V(),F()},[]);const F=()=>{try{const j=pR();P(j)}catch(j){console.warn("Could not load theme:",j)}},H=()=>{const j=!w;P(j),mR(j),QU(j)},V=()=>{try{const j=localStorage.getItem("rbac-collapsed-sections");if(j){const ee=JSON.parse(j);z({...{settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1},...ee})}}catch(j){console.warn("Could not load collapsed state from localStorage:",j)}},X=j=>{try{localStorage.setItem("rbac-collapsed-sections",JSON.stringify(j))}catch(ee){console.warn("Could not save collapsed state to localStorage:",ee)}},B=async(j=!1)=>{try{s(null),j?r(!0):e(!0),console.log("Starting to load data...");const ee=await aR();if(console.log("Auth result:",ee),!ee)throw k(!1),new Error("Not authenticated with Home Assistant");k(!0);const he=await le(ee);T(he);const ve=await me(ee);ve&&Q(ve),console.log("Making API calls...");const[Y,ce,te,Oe,ye]=await Promise.all([oi("/api/rbac/users"),oi("/api/rbac/domains"),oi("/api/rbac/entities"),oi("/api/rbac/services"),oi("/api/rbac/config")]);if(console.log("API responses:",{usersRes:Y,domainsRes:ce,entitiesRes:te,servicesRes:Oe,configRes:ye}),Y.status===403||ce.status===403||te.status===403||Oe.status===403||ye.status===403){const Ie=await ye.json();s("Admin access required"),ar.error({message:"Access Denied",description:"Only administrators can access RBAC configuration. You will be redirected to the main page.",placement:"bottomRight",duration:5}),setTimeout(()=>{window.location.href=Ie.redirect_url||"/"},5e3);return}if(Y.status===404||ce.status===404||te.status===404||Oe.status===404||ye.status===404){o(!1),j?r(!1):e(!1);return}if(!Y.ok||!ce.ok||!te.ok||!Oe.ok||!ye.ok)throw new Error("Failed to load data from API");const[pe,Qe,Me,De,we]=await Promise.all([Y.json(),ce.json(),te.json(),Oe.json(),ye.json()]);console.log("Loaded data:",{users:pe,domains:Qe,entities:Me,services:De,config:we}),E({users:pe,domains:Qe,entities:Me,services:De,config:we}),o(!0),we&&we.enabled!==void 0&&c(we.enabled),we&&(d(we.show_notifications!==void 0?we.show_notifications:!0),h(we.send_event!==void 0?we.send_event:!1),m(we.frontend_blocking_enabled!==void 0?we.frontend_blocking_enabled:!1),v(we.log_deny_list!==void 0?we.log_deny_list:!1),S(we.allow_chained_actions!==void 0?we.allow_chained_actions:!1)),j&&ar.success({message:"Data Reloaded",description:"RBAC configuration has been refreshed successfully.",placement:"bottomRight",duration:2})}catch(ee){console.error("Error loading data:",ee),ee.message.includes("404")||ee.message.includes("Not Found")?o(!1):(s(ee.message),ar.error({message:"Error Loading Data",description:ee.message,placement:"bottomRight",duration:5}))}finally{j?r(!1):e(!1)}},G=()=>{B(!0)},se=async j=>{try{if(!(await oi("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",enabled:j})})).ok)throw new Error("Failed to update enabled state");c(j),ar.success({message:"Settings Updated",description:`RBAC is now ${j?"enabled":"disabled"}`,placement:"bottomRight",duration:3})}catch(ee){console.error("Error updating enabled state:",ee),ar.error({message:"Error",description:ee.message,placement:"bottomRight",duration:5})}},re=async j=>{try{if(!(await oi("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",...j})})).ok)throw new Error("Failed to update settings");j.show_notifications!==void 0&&d(j.show_notifications),j.send_event!==void 0&&h(j.send_event),j.frontend_blocking_enabled!==void 0&&m(j.frontend_blocking_enabled),j.log_deny_list!==void 0&&v(j.log_deny_list),j.allow_chained_actions!==void 0&&S(j.allow_chained_actions),ar.success({message:"Settings Updated",description:"RBAC settings have been updated",placement:"bottomRight",duration:3})}catch(ee){console.error("Error updating settings:",ee),ar.error({message:"Error",description:ee.message,placement:"bottomRight",duration:5})}},le=async j=>{try{const ee=await oi("/api/rbac/current-user");if(ee.ok){const he=await ee.json();return console.log("Current user data received:",he),he}return null}catch(ee){return console.error("Error fetching current user:",ee),null}},me=async j=>{try{const ee=await oi("/api/rbac/sensors");return ee.ok?await ee.json():null}catch(ee){return console.error("Error fetching sensors:",ee),null}},ie=j=>{ar.success({message:"Success",description:j,placement:"bottomRight",duration:3}),setTimeout(()=>{B(!0)},500)},ne=j=>{ar.error({message:"Error",description:j,placement:"bottomRight",duration:5})};if(t)return A(AU,{});if(!R)return A(Gr,{theme:L,children:A(Zr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(oa,{message:A("div",{style:{textAlign:"center"},children:"Authentication Required"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:"You must be logged into Home Assistant to access RBAC configuration."}),A(vt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant Login"}),A(vt,{onClick:()=>B(),icon:A(wl,{}),children:"Retry Authentication"})]}),type:"warning",showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(!i)return A(Gr,{theme:L,children:A(Zr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(oa,{message:A("div",{style:{textAlign:"center"},children:"RBAC Integration Required"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:"Please configure the RBAC integration first."}),A(vt,{type:"primary",icon:A(XP,{}),size:"large",onClick:()=>{const j=window.location.hostname,ee=window.location.protocol,he=window.location.port?`:${window.location.port}`:"",ve=`${ee}//${j}${he}/config/integrations/integration/rbac`;window.open(ve,"_blank")},children:"Configure Integration"})]}),type:"error",icon:A(Yu,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(a){const j=a==="Admin access required";return A(Gr,{theme:L,children:A(Zr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_}),A("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:A(oa,{message:A("div",{style:{textAlign:"center"},children:j?"Admin Access Required":"Failed to Load RBAC Data"}),description:A("div",{style:{textAlign:"center"},children:[A("p",{style:{marginBottom:"24px"},children:j?"Only administrators can access RBAC configuration. Please contact your system administrator or log in with an admin account.":a}),j?A(vt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant"}):A(vt,{type:"primary",icon:A(wl,{}),size:"large",onClick:()=>B(!0),children:"Retry Loading"})]}),type:"error",icon:A(Yu,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})})}return A(Gr,{theme:L,children:[A("style",{children:` +`))(i),readOnly:!0,rows:20,style:{fontFamily:'Monaco, Consolas, "Courier New", monospace',fontSize:"12px",lineHeight:"1.4",backgroundColor:"#f5f5f5",opacity:n?.5:1},placeholder:"No deny log entries found. Access denials will appear here when deny list logging is enabled."})]}),M("div",{style:{marginTop:"12px",fontSize:"12px",color:"#666"},children:M(eU,{type:"secondary",children:"Log file location: custom_components/rbac/deny_list.log"})})]})}const Ga=63,Vx=64,nU=1,rU=2,sR=3,iU=4,lR=5,oU=6,aU=7,cR=65,sU=66,lU=8,cU=9,uU=10,dU=11,fU=12,uR=13,hU=19,pU=20,mU=29,gU=33,vU=34,OU=47,bU=0,yO=1,tv=2,hc=3,nv=4;class oa{constructor(e,n,r){this.parent=e,this.depth=n,this.type=r,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+r}}oa.top=new oa(null,-1,bU);function El(t,e){for(let n=0,r=e-t.pos-1;;r--,n++){let i=t.peek(r);if(mo(i)||i==-1)return n}}function rv(t){return t==32||t==9}function mo(t){return t==10||t==13}function dR(t){return rv(t)||mo(t)}function da(t){return t<0||dR(t)}const yU=new Uk({start:oa.top,reduce(t,e){return t.type==hc&&(e==pU||e==vU)?t.parent:t},shift(t,e,n,r){if(e==sR)return new oa(t,El(r,r.pos),yO);if(e==cR||e==lR)return new oa(t,El(r,r.pos),tv);if(e==Ga)return t.parent;if(e==hU||e==gU)return new oa(t,0,hc);if(e==uR&&t.type==nv)return t.parent;if(e==OU){let i=/[1-9]/.exec(r.read(r.pos,n.pos));if(i)return new oa(t,t.depth+ +i[0],nv)}return t},hash(t){return t.hash}});function Is(t,e,n=0){return t.peek(n)==e&&t.peek(n+1)==e&&t.peek(n+2)==e&&da(t.peek(n+3))}const SU=new bo((t,e)=>{if(t.next==-1&&e.canShift(Vx))return t.acceptToken(Vx);let n=t.peek(-1);if((mo(n)||n<0)&&e.context.type!=hc){if(Is(t,45))if(e.canShift(Ga))t.acceptToken(Ga);else return t.acceptToken(nU,3);if(Is(t,46))if(e.canShift(Ga))t.acceptToken(Ga);else return t.acceptToken(rU,3);let r=0;for(;t.next==32;)r++,t.advance();(r{if(e.context.type==hc){t.next==63&&(t.advance(),da(t.next)&&t.acceptToken(aU));return}if(t.next==45)t.advance(),da(t.next)&&t.acceptToken(e.context.type==yO&&e.context.depth==El(t,t.pos-1)?iU:sR);else if(t.next==63)t.advance(),da(t.next)&&t.acceptToken(e.context.type==tv&&e.context.depth==El(t,t.pos-1)?oU:lR);else{let n=t.pos;for(;;)if(rv(t.next)){if(t.pos==n)return;t.advance()}else if(t.next==33)fR(t);else if(t.next==38)iv(t);else if(t.next==42){iv(t);break}else if(t.next==39||t.next==34){if(SO(t,!0))break;return}else if(t.next==91||t.next==123){if(!$U(t))return;break}else{hR(t,!0,!1,0);break}for(;rv(t.next);)t.advance();if(t.next==58){if(t.pos==n&&e.canShift(mU))return;let r=t.peek(1);da(r)&&t.acceptTokenTo(e.context.type==tv&&e.context.depth==El(t,n)?sU:cR,n)}}},{contextual:!0});function CU(t){return t>32&&t<127&&t!=34&&t!=37&&t!=44&&t!=60&&t!=62&&t!=92&&t!=94&&t!=96&&t!=123&&t!=124&&t!=125}function Hx(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function Xx(t,e){return t.next==37?(t.advance(),Hx(t.next)&&t.advance(),Hx(t.next)&&t.advance(),!0):CU(t.next)||e&&t.next==44?(t.advance(),!0):!1}function fR(t){if(t.advance(),t.next==60){for(t.advance();;)if(!Xx(t,!0)){t.next==62&&t.advance();break}}else for(;Xx(t,!1););}function iv(t){for(t.advance();!da(t.next)&&cf(t.tag)!="f";)t.advance()}function SO(t,e){let n=t.next,r=!1,i=t.pos;for(t.advance();;){let o=t.next;if(o<0)break;if(t.advance(),o==n)if(o==39)if(t.next==39)t.advance();else break;else break;else if(o==92&&n==34)t.next>=0&&t.advance();else if(mo(o)){if(e)return!1;r=!0}else if(e&&t.pos>=i+1024)return!1}return!r}function $U(t){for(let e=[],n=t.pos+1024;;)if(t.next==91||t.next==123)e.push(t.next),t.advance();else if(t.next==39||t.next==34){if(!SO(t,!0))return!1}else if(t.next==93||t.next==125){if(e[e.length-1]!=t.next-2)return!1;if(e.pop(),t.advance(),!e.length)return!0}else{if(t.next<0||t.pos>n||mo(t.next))return!1;t.advance()}}const wU="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function cf(t){return t<33?"u":t>125?"s":wU[t-33]}function Bp(t,e){let n=cf(t);return n!="u"&&!(e&&n=="f")}function hR(t,e,n,r){if(cf(t.next)=="s"||(t.next==63||t.next==58||t.next==45)&&Bp(t.peek(1),n))t.advance();else return!1;let i=t.pos;for(;;){let o=t.next,a=0,s=r+1;for(;dR(o);){if(mo(o)){if(e)return!1;s=0}else s++;o=t.peek(++a)}if(!(o>=0&&(o==58?Bp(t.peek(a+1),n):o==35?t.peek(a-1)!=32:Bp(o,n)))||!n&&s<=r||s==0&&!n&&(Is(t,45,a)||Is(t,46,a)))break;if(e&&cf(o)=="f")return!1;for(let c=a;c>=0;c--)t.advance();if(e&&t.pos>i+1024)return!1}return!0}const PU=new bo((t,e)=>{if(t.next==33)fR(t),t.acceptToken(fU);else if(t.next==38||t.next==42){let n=t.next==38?uU:dU;iv(t),t.acceptToken(n)}else t.next==39||t.next==34?(SO(t,!1),t.acceptToken(cU)):hR(t,!1,e.context.type==hc,e.context.depth)&&t.acceptToken(lU)}),_U=new bo((t,e)=>{let n=e.context.type==nv?e.context.depth:-1,r=t.pos;e:for(;;){let i=0,o=t.next;for(;o==32;)o=t.peek(++i);if(!i&&(Is(t,45,i)||Is(t,46,i))||!mo(o)&&(n<0&&(n=Math.max(e.context.depth+1,i)),iYAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:yU,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[TU],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[SU,xU,PU,_U,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),RU=ic.define({name:"yaml",parser:kU.configure({props:[tO.add({Stream:t=>{for(let e=t.node.resolve(t.pos,-1);e&&e.to>=t.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.fromt.pos)return null}}return null},FlowMapping:Dg({closing:"}"}),FlowSequence:Dg({closing:"]"})}),rO.add({"FlowMapping FlowSequence":AT,"Item Pair BlockLiteral":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function IU(){return new IT(RU)}const{Text:MU}=yn;function EU({visible:t,onClose:e,onSuccess:n}){const[r,i]=K(""),[o,a]=K(!1),[s,l]=K(!1);be(()=>{t&&c()},[t]);const c=async()=>{a(!0);try{const f=await Zr("/api/rbac/yaml-editor",{method:"GET"});if(!f.ok){const p=await f.json();throw new Error(p.error||"Failed to load YAML content")}const h=await f.json();i(h.yaml_content||"")}catch(f){console.error("Error loading YAML content:",f),sr.error({message:"Error Loading YAML",description:f.message,placement:"bottomRight",duration:5})}finally{a(!1)}},u=async()=>{l(!0);try{const f=await Zr("/api/rbac/yaml-editor",{method:"POST",body:JSON.stringify({yaml_content:r})}),h=await f.json();if(!f.ok)throw new Error(h.error||"Failed to save YAML content");sr.success({message:"YAML Updated Successfully",description:h.message||"Configuration has been saved",placement:"bottomRight",duration:3}),n==null||n(),e()}catch(f){console.error("Error saving YAML content:",f),sr.error({message:"Error Saving YAML",description:f.message,placement:"bottomRight",duration:5})}finally{l(!1)}},d=()=>{e()};return M(dr,{title:M(Do,{children:[M(Ku,{style:{color:"#1890ff"}}),M("span",{children:"Edit YAML Configuration"})]}),open:t,onCancel:d,width:"90%",style:{maxWidth:"1200px"},footer:M(Do,{children:[M(vt,{icon:M(wl,{}),onClick:c,loading:o,disabled:s,children:"Reload"}),M(vt,{onClick:d,disabled:s,children:"Cancel"}),M(vt,{type:"primary",icon:M(xW,{}),onClick:u,loading:s,disabled:o,children:"Save Changes"})]}),children:[M("div",{style:{marginBottom:16},children:M(MU,{type:"secondary",children:"Edit the access_control.yaml configuration directly. Changes will be validated before saving."})}),M("div",{style:{border:"1px solid #d9d9d9",borderRadius:"6px",overflow:"hidden"},children:M(bO,{value:r,height:"calc(100vh - 300px)",onChange:f=>{i(f)},editable:!o,extensions:[IU()],basicSetup:{lineNumbers:!0,foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!0,bracketMatching:!0,closeBrackets:!0,autocompletion:!0,highlightSelectionMatches:!1,searchKeymap:!0}})})]})}function AU(){return M("div",{class:"loading",children:[M("h2",{children:"Loading RBAC Configuration..."}),M("p",{children:"Please wait while we load your access control settings."})]})}let ud=!1;function pR(){return ud=localStorage.getItem("rbac-theme")==="dark",mR(ud),ud}function mR(t){ud=t;const e=document.documentElement;t?(e.classList.add("dark-theme"),e.classList.remove("light-theme")):(e.classList.add("light-theme"),e.classList.remove("dark-theme")),NU(t)}function QU(t){localStorage.setItem("rbac-theme",t?"dark":"light")}function NU(t){let e=document.querySelector('meta[name="theme-color"]');e||(e=document.createElement("meta"),e.name="theme-color",document.head.appendChild(e)),e.content=t?"#2a2a2a":"#ffffff"}pR();function zU(){var ce,ue;const[t,e]=K(!0),[n,r]=K(!1),[i,o]=K(!0),[a,s]=K(null),[l,c]=K(!0),[u,d]=K(!0),[f,h]=K(!1),[p,m]=K(!1),[g,v]=K(!1),[O,S]=K(!1),[C,b]=K(!1),[x,$]=K(!1),[w,P]=K(!1),[_,T]=K(null),[k,R]=K(!1),[I,Q]=K({last_rejection:null,last_user_rejected:null}),[E,A]=K({users:[],domains:[],entities:[],panels:[],services:[],config:null}),[N,L]=K({settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1}),z={algorithm:w?A1.darkAlgorithm:A1.defaultAlgorithm,token:{colorPrimary:"#1890ff",borderRadius:6}};be(()=>{B(),F(),V()},[]);const V=()=>{try{const j=pR();P(j)}catch(j){console.warn("Could not load theme:",j)}},X=()=>{const j=!w;P(j),mR(j),QU(j)},F=()=>{try{const j=localStorage.getItem("rbac-collapsed-sections");if(j){const J=JSON.parse(j);L({...{settings:!1,defaultRestrictions:!1,rolesManagement:!1,userAssignments:!1},...J})}}catch(j){console.warn("Could not load collapsed state from localStorage:",j)}},H=j=>{try{localStorage.setItem("rbac-collapsed-sections",JSON.stringify(j))}catch(J){console.warn("Could not save collapsed state to localStorage:",J)}},B=async(j=!1)=>{try{s(null),j?r(!0):e(!0),console.log("Starting to load data...");const J=await aR();if(console.log("Auth result:",J),!J)throw R(!1),new Error("Not authenticated with Home Assistant");R(!0);const he=await le(J);T(he);const ge=await pe(J);ge&&Q(ge),console.log("Making API calls...");const[$e,Te,Ce,Ie,_e,ve]=await Promise.all([Zr("/api/rbac/users"),Zr("/api/rbac/domains"),Zr("/api/rbac/entities"),Zr("/api/rbac/panels"),Zr("/api/rbac/services"),Zr("/api/rbac/config")]);if(console.log("API responses:",{usersRes:$e,domainsRes:Te,entitiesRes:Ce,panelsRes:Ie,servicesRes:_e,configRes:ve}),$e.status===403||Te.status===403||Ce.status===403||Ie.status===403||_e.status===403||ve.status===403){const we=await ve.json();s("Admin access required"),sr.error({message:"Access Denied",description:"Only administrators can access RBAC configuration. You will be redirected to the main page.",placement:"bottomRight",duration:5}),setTimeout(()=>{window.location.href=we.redirect_url||"/"},5e3);return}if($e.status===404||Te.status===404||Ce.status===404||Ie.status===404||_e.status===404||ve.status===404){o(!1),j?r(!1):e(!1);return}if(!$e.ok||!Te.ok||!Ce.ok||!Ie.ok||!_e.ok||!ve.ok)throw new Error("Failed to load data from API");const[Ne,ze,re,fe,te,Oe]=await Promise.all([$e.json(),Te.json(),Ce.json(),Ie.json(),_e.json(),ve.json()]);console.log("Loaded data:",{users:Ne,domains:ze,entities:re,panels:fe,services:te,config:Oe}),A({users:Ne,domains:ze,entities:re,panels:fe,services:te,config:Oe}),o(!0),Oe&&Oe.enabled!==void 0&&c(Oe.enabled),Oe&&(d(Oe.show_notifications!==void 0?Oe.show_notifications:!0),h(Oe.send_event!==void 0?Oe.send_event:!1),m(Oe.frontend_blocking_enabled!==void 0?Oe.frontend_blocking_enabled:!1),v(Oe.log_deny_list!==void 0?Oe.log_deny_list:!1),S(Oe.allow_chained_actions!==void 0?Oe.allow_chained_actions:!1)),j&&sr.success({message:"Data Reloaded",description:"RBAC configuration has been refreshed successfully.",placement:"bottomRight",duration:2})}catch(J){console.error("Error loading data:",J),J.message.includes("404")||J.message.includes("Not Found")?o(!1):(s(J.message),sr.error({message:"Error Loading Data",description:J.message,placement:"bottomRight",duration:5}))}finally{j?r(!1):e(!1)}},G=()=>{B(!0)},se=async j=>{try{if(!(await Zr("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",enabled:j})})).ok)throw new Error("Failed to update enabled state");c(j),sr.success({message:"Settings Updated",description:`RBAC is now ${j?"enabled":"disabled"}`,placement:"bottomRight",duration:3})}catch(J){console.error("Error updating enabled state:",J),sr.error({message:"Error",description:J.message,placement:"bottomRight",duration:5})}},ie=async j=>{try{if(!(await Zr("/api/rbac/config",{method:"POST",body:JSON.stringify({action:"update_settings",...j})})).ok)throw new Error("Failed to update settings");j.show_notifications!==void 0&&d(j.show_notifications),j.send_event!==void 0&&h(j.send_event),j.frontend_blocking_enabled!==void 0&&m(j.frontend_blocking_enabled),j.log_deny_list!==void 0&&v(j.log_deny_list),j.allow_chained_actions!==void 0&&S(j.allow_chained_actions),sr.success({message:"Settings Updated",description:"RBAC settings have been updated",placement:"bottomRight",duration:3})}catch(J){console.error("Error updating settings:",J),sr.error({message:"Error",description:J.message,placement:"bottomRight",duration:5})}},le=async j=>{try{const J=await Zr("/api/rbac/current-user");if(J.ok){const he=await J.json();return console.log("Current user data received:",he),he}return null}catch(J){return console.error("Error fetching current user:",J),null}},pe=async j=>{try{const J=await Zr("/api/rbac/sensors");return J.ok?await J.json():null}catch(J){return console.error("Error fetching sensors:",J),null}},ne=j=>{sr.success({message:"Success",description:j,placement:"bottomRight",duration:3}),setTimeout(()=>{B(!0)},500)},ee=j=>{sr.error({message:"Error",description:j,placement:"bottomRight",duration:5})};if(t)return M(AU,{});if(!k)return M(Yr,{theme:z,children:M(qr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:M(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[M(du,{currentUser:_}),M("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:M(aa,{message:M("div",{style:{textAlign:"center"},children:"Authentication Required"}),description:M("div",{style:{textAlign:"center"},children:[M("p",{style:{marginBottom:"24px"},children:"You must be logged into Home Assistant to access RBAC configuration."}),M(vt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant Login"}),M(vt,{onClick:()=>B(),icon:M(wl,{}),children:"Retry Authentication"})]}),type:"warning",showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(!i)return M(Yr,{theme:z,children:M(qr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:M(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[M(du,{currentUser:_}),M("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:M(aa,{message:M("div",{style:{textAlign:"center"},children:"RBAC Integration Required"}),description:M("div",{style:{textAlign:"center"},children:[M("p",{style:{marginBottom:"24px"},children:"Please configure the RBAC integration first."}),M(vt,{type:"primary",icon:M(XP,{}),size:"large",onClick:()=>{const j=window.location.hostname,J=window.location.protocol,he=window.location.port?`:${window.location.port}`:"",ge=`${J}//${j}${he}/config/integrations/integration/rbac`;window.open(ge,"_blank")},children:"Configure Integration"})]}),type:"error",icon:M(Ku,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})});if(a){const j=a==="Admin access required";return M(Yr,{theme:z,children:M(qr,{style:{minHeight:"100vh",background:w?"#141414":"#f0f2f5"},children:M(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[M(du,{currentUser:_}),M("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"24px"},children:M(aa,{message:M("div",{style:{textAlign:"center"},children:j?"Admin Access Required":"Failed to Load RBAC Data"}),description:M("div",{style:{textAlign:"center"},children:[M("p",{style:{marginBottom:"24px"},children:j?"Only administrators can access RBAC configuration. Please contact your system administrator or log in with an admin account.":a}),j?M(vt,{type:"primary",onClick:()=>window.location.href="/",style:{marginRight:"12px"},children:"Go to Home Assistant"}):M(vt,{type:"primary",icon:M(wl,{}),size:"large",onClick:()=>B(!0),children:"Retry Loading"})]}),type:"error",icon:M(Ku,{}),showIcon:!0,style:{maxWidth:"500px",width:"100%"}})})]})})})}return M(Yr,{theme:z,children:[M("style",{children:` /* Dark theme background styles */ html.dark-theme { background: #141414 !important; @@ -513,4 +513,4 @@ html body { filter: blur(0px); } } - `}),A(Zr,{style:{minHeight:"100vh",background:"#f0f2f5"},children:A(Zr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[A(uu,{currentUser:_,isDarkMode:w,onThemeToggle:H}),!l&&A(oa,{message:"RBAC is Disabled",description:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[A("span",{children:"Role-based access control is currently disabled. All users have full access to all services and entities."}),A(vt,{type:"primary",onClick:()=>se(!0),style:{marginLeft:"16px"},children:"Enable RBAC"})]}),type:"warning",showIcon:!0,style:{marginBottom:"24px",animation:"bannerSlideIn 0.5s ease-out",transform:"translateY(0)",opacity:1}}),A(Us,{activeKey:Object.keys(N).filter(j=>!N[j]),onChange:j=>{const ee={};Object.keys(N).forEach(he=>{ee[he]=!j.includes(he)}),z(ee),X(ee)},style:{marginBottom:24},expandIconPosition:"right",children:[A(Us.Panel,{header:A("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[A("span",{children:"Settings"}),A("div",{style:{display:"flex",gap:"8px"},children:[A(on,{title:"Edit the access_control.yaml configuration file directly",children:A(vt,{type:"default",icon:A(Yu,{}),onClick:j=>{j.stopPropagation(),$(!0)},size:"small",style:{borderColor:"#1890ff",color:"#1890ff",backgroundColor:"transparent"},onMouseEnter:j=>{j.currentTarget.style.backgroundColor="#1890ff",j.currentTarget.style.color="white"},onMouseLeave:j=>{j.currentTarget.style.backgroundColor="transparent",j.currentTarget.style.color="#1890ff"},children:"Edit YAML"})}),A(vt,{type:"primary",icon:A(wl,{}),onClick:j=>{j.stopPropagation(),G()},loading:n,size:"small",children:"Reload"})]})]}),children:[A(Sa,{size:"small",children:A("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:l?"RBAC is currently enabled":"RBAC is currently disabled",children:A(Oi,{checked:l,onChange:se,checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666"},children:["RBAC is ",l?"Enabled":"Disabled"]})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:u?"Notifications are enabled":"Notifications are disabled",children:A(Oi,{checked:u,onChange:j=>re({show_notifications:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666",fontSize:"14px"},children:"Show Notifications"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:f?"Events are enabled":"Events are disabled",children:A(Oi,{checked:f,onChange:j=>re({send_event:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A("span",{style:{color:"#666",fontSize:"14px"},children:"Send Event"}),f&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Event: rbac_access_denied"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:p?"Frontend blocking is enabled":"Frontend blocking is disabled",children:A(Oi,{checked:p,onChange:j=>re({frontend_blocking_enabled:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Restricts the ha-quick-bar to only allowed entities",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Frontend Blocking"})}),p&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Add frontend script to www/community/rbac/rbac.js"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:g?"Deny list logging is enabled":"Deny list logging is disabled",children:A(Oi,{checked:g,onChange:j=>re({log_deny_list:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Logs all access denials to deny_list.log file",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Deny List Logging"})}),g&&A(vt,{size:"small",type:"link",onClick:()=>b(!0),style:{padding:"0 4px",height:"auto",fontSize:"12px"},children:"View Logs"}),g&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"File: custom_components/rbac/deny_list.log"})]}),A("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[A(on,{title:O?"Chained actions are allowed":"Chained actions are blocked",children:A(Oi,{checked:O,onChange:j=>re({allow_chained_actions:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),A(on,{title:"Allow actions within scripts/automations to run if the parent script/automation was allowed",children:A("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Allow Chained Actions"})}),O&&A("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Actions in allowed scripts/automations bypass RBAC"})]})]})}),A(Sa,{size:"small",style:{marginTop:"16px"},children:[A(yn.Title,{level:5,style:{marginBottom:"16px"},children:"RBAC Status Sensors"}),A("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"⏰"}),A("div",{children:[A(yn.Text,{strong:!0,children:"Last Rejection"}),A("br",{}),A(yn.Text,{type:"secondary",children:((ue=I.last_rejection)==null?void 0:ue.state)||"Never"})]})]}),A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"👤"}),A("div",{children:[A(yn.Text,{strong:!0,children:"Last User Rejected"}),A("br",{}),A(yn.Text,{type:"secondary",children:((de=I.last_user_rejected)==null?void 0:de.state)||"None"})]})]}),A("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[A("span",{style:{fontSize:"16px"},children:"🌐"}),A("div",{children:[A(yn.Text,{strong:!0,children:"Config URL"}),A("br",{}),A(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:"/api/rbac/static/config.html"})]})]})]})]})]},"settings"),A(Us.Panel,{header:"Default Restrictions",children:A(MW,{data:M,onSuccess:ie,onError:ne})},"defaultRestrictions"),A(Us.Panel,{header:"Roles Management",children:A(YY,{data:M,onSuccess:ie,onError:ne,onDataChange:E})},"rolesManagement"),A(Us.Panel,{header:"User Role Assignments",children:A(KY,{data:M,onSuccess:ie,onError:ne,onDataChange:E,isDarkMode:w})},"userAssignments")]})]})}),A(tU,{visible:x,onClose:()=>b(!1)}),A(EU,{visible:C,onClose:()=>$(!1),onSuccess:()=>{G()}})]})}hs(A(zU,{}),document.getElementById("app")); + `}),M(qr,{style:{minHeight:"100vh",background:"#f0f2f5"},children:M(qr.Content,{style:{padding:"24px",maxWidth:"1200px",margin:"0 auto",width:"100%"},children:[M(du,{currentUser:_,isDarkMode:w,onThemeToggle:X}),!l&&M(aa,{message:"RBAC is Disabled",description:M("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[M("span",{children:"Role-based access control is currently disabled. All users have full access to all services and entities."}),M(vt,{type:"primary",onClick:()=>se(!0),style:{marginLeft:"16px"},children:"Enable RBAC"})]}),type:"warning",showIcon:!0,style:{marginBottom:"24px",animation:"bannerSlideIn 0.5s ease-out",transform:"translateY(0)",opacity:1}}),M(Us,{activeKey:Object.keys(N).filter(j=>!N[j]),onChange:j=>{const J={};Object.keys(N).forEach(he=>{J[he]=!j.includes(he)}),L(J),H(J)},style:{marginBottom:24},expandIconPosition:"right",children:[M(Us.Panel,{header:M("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"},children:[M("span",{children:"Settings"}),M("div",{style:{display:"flex",gap:"8px"},children:[M(Kt,{title:"Edit the access_control.yaml configuration file directly",children:M(vt,{type:"default",icon:M(Ku,{}),onClick:j=>{j.stopPropagation(),$(!0)},size:"small",style:{borderColor:"#1890ff",color:"#1890ff",backgroundColor:"transparent"},onMouseEnter:j=>{j.currentTarget.style.backgroundColor="#1890ff",j.currentTarget.style.color="white"},onMouseLeave:j=>{j.currentTarget.style.backgroundColor="transparent",j.currentTarget.style.color="#1890ff"},children:"Edit YAML"})}),M(vt,{type:"primary",icon:M(wl,{}),onClick:j=>{j.stopPropagation(),G()},loading:n,size:"small",children:"Reload"})]})]}),children:[M(Ca,{size:"small",children:M("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[M("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[M(Kt,{title:l?"RBAC is currently enabled":"RBAC is currently disabled",children:M(si,{checked:l,onChange:se,checkedChildren:"On",unCheckedChildren:"Off"})}),M("span",{style:{color:"#666"},children:["RBAC is ",l?"Enabled":"Disabled"]})]}),M("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[M(Kt,{title:u?"Notifications are enabled":"Notifications are disabled",children:M(si,{checked:u,onChange:j=>ie({show_notifications:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),M("span",{style:{color:"#666",fontSize:"14px"},children:"Show Notifications"})]}),M("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[M(Kt,{title:f?"Events are enabled":"Events are disabled",children:M(si,{checked:f,onChange:j=>ie({send_event:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),M("span",{style:{color:"#666",fontSize:"14px"},children:"Send Event"}),f&&M("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Event: rbac_access_denied"})]}),M("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[M(Kt,{title:p?"Frontend blocking is enabled":"Frontend blocking is disabled",children:M(si,{checked:p,onChange:j=>ie({frontend_blocking_enabled:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),M(Kt,{title:"Restricts the ha-quick-bar to only allowed entities",children:M("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Frontend Blocking"})}),p&&M("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Add frontend script to www/community/rbac/rbac.js"})]}),M("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[M(Kt,{title:g?"Deny list logging is enabled":"Deny list logging is disabled",children:M(si,{checked:g,onChange:j=>ie({log_deny_list:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),M(Kt,{title:"Logs all access denials to deny_list.log file",children:M("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Deny List Logging"})}),g&&M(vt,{size:"small",type:"link",onClick:()=>b(!0),style:{padding:"0 4px",height:"auto",fontSize:"12px"},children:"View Logs"}),g&&M("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"File: custom_components/rbac/deny_list.log"})]}),M("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[M(Kt,{title:O?"Chained actions are allowed":"Chained actions are blocked",children:M(si,{checked:O,onChange:j=>ie({allow_chained_actions:j}),checkedChildren:"On",unCheckedChildren:"Off"})}),M(Kt,{title:"Allow actions within scripts/automations to run if the parent script/automation was allowed",children:M("span",{style:{color:"#666",fontSize:"14px",cursor:"help"},children:"Allow Chained Actions"})}),O&&M("span",{style:{fontSize:"12px",color:"#999",fontStyle:"italic"},children:"Actions in allowed scripts/automations bypass RBAC"})]})]})}),M(Ca,{size:"small",style:{marginTop:"16px"},children:[M(yn.Title,{level:5,style:{marginBottom:"16px"},children:"RBAC Status Sensors"}),M("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[M("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[M("span",{style:{fontSize:"16px"},children:"⏰"}),M("div",{children:[M(yn.Text,{strong:!0,children:"Last Rejection"}),M("br",{}),M(yn.Text,{type:"secondary",children:((ce=I.last_rejection)==null?void 0:ce.state)||"Never"})]})]}),M("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[M("span",{style:{fontSize:"16px"},children:"👤"}),M("div",{children:[M(yn.Text,{strong:!0,children:"Last User Rejected"}),M("br",{}),M(yn.Text,{type:"secondary",children:((ue=I.last_user_rejected)==null?void 0:ue.state)||"None"})]})]}),M("div",{className:"rbac-sensor-card",style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px",borderRadius:"8px",border:"2px solid transparent",cursor:"pointer",transition:"all 0.3s ease"},children:[M("span",{style:{fontSize:"16px"},children:"🌐"}),M("div",{children:[M(yn.Text,{strong:!0,children:"Config URL"}),M("br",{}),M(yn.Text,{type:"secondary",style:{fontSize:"12px"},children:"/api/rbac/static/config.html"})]})]})]})]})]},"settings"),M(Us.Panel,{header:"Default Restrictions",children:M(MW,{data:E,onSuccess:ne,onError:ee})},"defaultRestrictions"),M(Us.Panel,{header:"Roles Management",children:M(YY,{data:E,onSuccess:ne,onError:ee,onDataChange:A})},"rolesManagement"),M(Us.Panel,{header:"User Role Assignments",children:M(KY,{data:E,onSuccess:ne,onError:ee,onDataChange:A,isDarkMode:w})},"userAssignments")]})]})}),M(tU,{visible:C,onClose:()=>b(!1)}),M(EU,{visible:x,onClose:()=>$(!1),onSuccess:()=>{G()}})]})}ps(M(zU,{}),document.getElementById("app")); diff --git a/frontend/src/components/App.jsx b/frontend/src/components/App.jsx index 7fc0e5a..7645d18 100644 --- a/frontend/src/components/App.jsx +++ b/frontend/src/components/App.jsx @@ -35,6 +35,7 @@ export function App() { users: [], domains: [], entities: [], + panels: [], services: [], config: null }); @@ -144,19 +145,20 @@ export function App() { } console.log('Making API calls...'); - const [usersRes, domainsRes, entitiesRes, servicesRes, configRes] = await Promise.all([ + const [usersRes, domainsRes, entitiesRes, panelsRes, servicesRes, configRes] = await Promise.all([ makeAuthenticatedRequest('/api/rbac/users'), makeAuthenticatedRequest('/api/rbac/domains'), makeAuthenticatedRequest('/api/rbac/entities'), + makeAuthenticatedRequest('/api/rbac/panels'), makeAuthenticatedRequest('/api/rbac/services'), makeAuthenticatedRequest('/api/rbac/config') ]); - console.log('API responses:', { usersRes, domainsRes, entitiesRes, servicesRes, configRes }); + console.log('API responses:', { usersRes, domainsRes, entitiesRes, panelsRes, servicesRes, configRes }); // Check for admin access denied (403) - if (usersRes.status === 403 || domainsRes.status === 403 || entitiesRes.status === 403 || - servicesRes.status === 403 || configRes.status === 403) { + if (usersRes.status === 403 || domainsRes.status === 403 || entitiesRes.status === 403 || + panelsRes.status === 403 || servicesRes.status === 403 || configRes.status === 403) { const errorData = await configRes.json(); // Set admin access denied state @@ -178,8 +180,8 @@ export function App() { } // Check if any API call returns 404 or indicates integration not configured - if (usersRes.status === 404 || domainsRes.status === 404 || entitiesRes.status === 404 || - servicesRes.status === 404 || configRes.status === 404) { + if (usersRes.status === 404 || domainsRes.status === 404 || entitiesRes.status === 404 || + panelsRes.status === 404 || servicesRes.status === 404 || configRes.status === 404) { setIntegrationConfigured(false); if (isManualReload) { setReloading(false); @@ -189,20 +191,21 @@ export function App() { return; } - if (!usersRes.ok || !domainsRes.ok || !entitiesRes.ok || !servicesRes.ok || !configRes.ok) { + if (!usersRes.ok || !domainsRes.ok || !entitiesRes.ok || !panelsRes.ok || !servicesRes.ok || !configRes.ok) { throw new Error('Failed to load data from API'); } - const [users, domains, entities, services, config] = await Promise.all([ + const [users, domains, entities, panels, services, config] = await Promise.all([ usersRes.json(), domainsRes.json(), entitiesRes.json(), + panelsRes.json(), servicesRes.json(), configRes.json() ]); - console.log('Loaded data:', { users, domains, entities, services, config }); - setData({ users, domains, entities, services, config }); + console.log('Loaded data:', { users, domains, entities, panels, services, config }); + setData({ users, domains, entities, panels, services, config }); setIntegrationConfigured(true); // Load enabled state from config diff --git a/frontend/src/components/DefaultRestrictions.jsx b/frontend/src/components/DefaultRestrictions.jsx index bbe5e21..42a7569 100644 --- a/frontend/src/components/DefaultRestrictions.jsx +++ b/frontend/src/components/DefaultRestrictions.jsx @@ -13,7 +13,8 @@ export function DefaultRestrictions({ data, onSuccess, onError }) { const [loading, setLoading] = useState(false); const [restrictions, setRestrictions] = useState({ domains: [], - entities: [] + entities: [], + panels: [] }); // Initialize restrictions from config @@ -22,7 +23,8 @@ export function DefaultRestrictions({ data, onSuccess, onError }) { const defaultRestrictions = data.config.default_restrictions; setRestrictions({ domains: Object.keys(defaultRestrictions.domains || {}), - entities: Object.keys(defaultRestrictions.entities || {}) + entities: Object.keys(defaultRestrictions.entities || {}), + panels: Object.keys(defaultRestrictions.panels || {}) }); } }, [data.config]); @@ -39,7 +41,8 @@ export function DefaultRestrictions({ data, onSuccess, onError }) { const defaultRestrictions = { domains: {}, entities: {}, - services: {} + services: {}, + panels: {} }; // Add domain restrictions @@ -58,6 +61,13 @@ export function DefaultRestrictions({ data, onSuccess, onError }) { }; }); + // Add entity restrictions + restrictions.panels.forEach(panel => { + defaultRestrictions.panels[panel] = { + hide: true, + }; + }); + const response = await fetch('/api/rbac/config', { method: 'POST', headers: { @@ -164,6 +174,16 @@ export function DefaultRestrictions({ data, onSuccess, onError }) { disabled={loading} /> + + + setRestrictions(prev => ({ ...prev, panels }))} + placeholder="Select panels to restrict..." + disabled={loading} + /> + diff --git a/frontend/src/components/RoleEditModal.jsx b/frontend/src/components/RoleEditModal.jsx index 930392b..b6ef24a 100644 --- a/frontend/src/components/RoleEditModal.jsx +++ b/frontend/src/components/RoleEditModal.jsx @@ -16,12 +16,14 @@ export function RoleEditModal({ availableRoles = [], domains = [], entities = [], - services = {} + services = {}, + panels = [] }) { const [form] = Form.useForm(); const [showTemplate, setShowTemplate] = useState(false); const [domainRestrictions, setDomainRestrictions] = useState([]); const [entityRestrictions, setEntityRestrictions] = useState([]); + const [panelRestrictions, setPanelRestrictions] = useState([]); const [isAdmin, setIsAdmin] = useState(false); const [denyAll, setDenyAll] = useState(false); const [templateTestResult, setTemplateTestResult] = useState(null); // null, 'loading', 'true', 'false', 'error' @@ -31,6 +33,7 @@ export function RoleEditModal({ const [currentUserEntity, setCurrentUserEntity] = useState(null); const [showDomainSelects, setShowDomainSelects] = useState({}); const [showEntitySelects, setShowEntitySelects] = useState({}); + const [showPanelSelects, setShowPanelSelects] = useState({}); useEffect(() => { if (visible && roleConfig) { @@ -41,12 +44,14 @@ export function RoleEditModal({ deny_all: roleConfig.deny_all || false, fallbackRole: roleConfig.fallbackRole || '', domains: roleConfig.permissions?.domains || {}, - entities: roleConfig.permissions?.entities || {} + entities: roleConfig.permissions?.entities || {}, + panels: roleConfig.permissions?.panels || {}, }); // Initialize restrictions arrays const domainRestrictions = []; const entityRestrictions = []; + const panelRestrictions = []; if (roleConfig.permissions?.domains) { Object.entries(roleConfig.permissions.domains).forEach(([domain, config]) => { @@ -68,8 +73,18 @@ export function RoleEditModal({ }); } + if (roleConfig.permissions?.panels) { + Object.entries(roleConfig.permissions.panels).forEach(([panel, config]) => { + panelRestrictions.push({ + panel, + allow: config.allow || false + }); + }); + } + setDomainRestrictions(domainRestrictions); setEntityRestrictions(entityRestrictions); + setPanelRestrictions(panelRestrictions); setShowTemplate(!!roleConfig.template); setIsAdmin(roleConfig.admin || false); setDenyAll(roleConfig.deny_all || false); @@ -138,12 +153,18 @@ export function RoleEditModal({ ...restriction, allow: true })); + const updatedPanelRestrictions = panelRestrictions.map(restriction => ({ + ...restriction, + allow: true + })); setDomainRestrictions(updatedDomainRestrictions); setEntityRestrictions(updatedEntityRestrictions); + setPanelRestrictions(updatedPanelRestrictions); } else if (choice === 'clear') { // Clear all restrictions setDomainRestrictions([]); setEntityRestrictions([]); + setPanelRestrictions([]); } else if (choice === 'cancel') { // Cancel - disable deny_all and keep existing restrictions setDenyAll(false); @@ -158,6 +179,7 @@ export function RoleEditModal({ // Convert restrictions arrays back to objects const domains = {}; const entities = {}; + const panels = {}; domainRestrictions.forEach(restriction => { domains[restriction.domain] = { @@ -173,13 +195,20 @@ export function RoleEditModal({ }; }); + panelRestrictions.forEach(restriction => { + panels[restriction.panel] = { + allow: restriction.allow || false + }; + }); + const roleData = { description: values.description, admin: values.admin || false, deny_all: values.deny_all || false, permissions: { domains, - entities + entities, + panels } }; @@ -263,6 +292,36 @@ export function RoleEditModal({ setEntityRestrictions(updated); }; + const addPanelRestriction = () => { + const newIndex = panelRestrictions.length; + setPanelRestrictions([...panelRestrictions, { panel: '', allow: denyAll }]); + setShowPanelSelects({ ...showPanelSelects, [newIndex]: false }); + }; + + const removePanelRestriction = (index) => { + setPanelRestrictions(panelRestrictions.filter((_, i) => i !== index)); + // Clean up show state for removed restriction + const newShowStates = { ...showPanelSelects }; + delete newShowStates[index]; + // Reindex remaining states + const reindexedStates = {}; + Object.keys(newShowStates).forEach(key => { + const keyIndex = parseInt(key); + if (keyIndex > index) { + reindexedStates[keyIndex - 1] = newShowStates[key]; + } else if (keyIndex < index) { + reindexedStates[keyIndex] = newShowStates[key]; + } + }); + setShowPanelSelects(reindexedStates); + }; + + const updatePanelRestriction = (index, field, value) => { + const updated = [...panelRestrictions]; + updated[index] = { ...updated[index], [field]: value }; + setPanelRestrictions(updated); + }; + const showDomainSelect = (index) => { setShowDomainSelects({ ...showDomainSelects, [index]: true }); }; @@ -271,6 +330,10 @@ export function RoleEditModal({ setShowEntitySelects({ ...showEntitySelects, [index]: true }); }; + const showPanelSelect = (index) => { + setShowPanelSelects({ ...showPanelSelects, [index]: true }); + }; + const getServicesForDomain = (domain) => { return services.domains?.[domain] || []; }; @@ -467,8 +530,8 @@ export function RoleEditModal({ setDenyAll(checked); form.setFieldsValue({ deny_all: checked }); if (checked) { - // Check if there are existing domains/entities with allow=false to convert - const hasBlockingRestrictions = domainRestrictions.some(r => !r.allow) || entityRestrictions.some(r => !r.allow); + // Check if there are existing domains/entities/panels with allow=false to convert + const hasBlockingRestrictions = domainRestrictions.some(r => !r.allow) || entityRestrictions.some(r => !r.allow) || panelRestrictions.some(r => !r.allow); if (hasBlockingRestrictions) { // Show conversion warning dialog showConversionWarning(); @@ -933,11 +996,68 @@ export function RoleEditModal({ > Add Entity + + Dashboards + + {panelRestrictions.map((restriction, index) => ( +
+ + + + + + + updatePanelRestriction(index, 'allow', checked)} + checkedChildren="✓" + unCheckedChildren="✗" + disabled={denyAll && restriction.allow} + style={{ + backgroundColor: restriction.allow ? '#52c41a' : '#ff4d4f' + }} + /> + + + +
+ ))} + + )} - + {/* Conversion Warning Modal */} ); -} \ No newline at end of file +} diff --git a/frontend/src/components/RolesManagement.jsx b/frontend/src/components/RolesManagement.jsx index 6666a3e..518ee78 100644 --- a/frontend/src/components/RolesManagement.jsx +++ b/frontend/src/components/RolesManagement.jsx @@ -412,6 +412,23 @@ export function RolesManagement({ data, onSuccess, onError, onDataChange }) { )} + {Object.keys(role.permissions?.panels || {}).length > 0 && ( + +
Dashboards:
+ {Object.keys(role.permissions.panels).map(panel => ( +
• {panel}
+ ))} + + } + placement="top" + > + + {Object.keys(role.permissions.panels).length} panels + +
+ )}
@@ -442,6 +459,7 @@ export function RolesManagement({ data, onSuccess, onError, onDataChange }) { domains={data.domains} entities={data.entities} services={data.services} + panels={data.panels} /> {/* Role Create Modal */} @@ -455,6 +473,7 @@ export function RolesManagement({ data, onSuccess, onError, onDataChange }) { domains={data.domains} entities={data.entities} services={data.services} + panels={data.panels} /> );