struggle-annotator 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,48 @@
1
+ import os
2
+ import streamlit.components.v1 as components
3
+
4
+ # Set to False during local frontend development (points at Vite dev server).
5
+ _RELEASE = True
6
+
7
+ if not _RELEASE:
8
+ _component_func = components.declare_component(
9
+ "txt_annotator",
10
+ url="http://localhost:5173",
11
+ )
12
+ else:
13
+ _build_dir = os.path.join(
14
+ os.path.dirname(os.path.abspath(__file__)), "frontend", "build"
15
+ )
16
+ _component_func = components.declare_component("txt_annotator", path=_build_dir)
17
+
18
+
19
+ def txt_annotator(text: str, label_dict: dict, key: str | None = None) -> dict:
20
+ """Interactive NER-style text annotation component.
21
+
22
+ Parameters
23
+ ----------
24
+ text:
25
+ The raw text to annotate. Offsets are code-point–based Python str indices.
26
+ label_dict:
27
+ Entity definitions. Keys are label names; values must contain ``color``
28
+ (any valid CSS color) and optionally ``annotation`` (list of
29
+ ``{"start": int, "end": int, "value": str}`` dicts).
30
+ key:
31
+ Standard Streamlit component key — required when rendering multiple
32
+ annotators on the same page.
33
+
34
+ Returns
35
+ -------
36
+ dict
37
+ Updated ``label_dict`` with each entity's ``annotation`` list reflecting
38
+ the current UI state. Annotations within each entity are sorted by ``start``.
39
+ """
40
+ normalised = {
41
+ label: {
42
+ "color": cfg["color"],
43
+ "annotation": list(cfg.get("annotation", [])),
44
+ }
45
+ for label, cfg in label_dict.items()
46
+ }
47
+ result = _component_func(text=text, label_dict=normalised, key=key, default=normalised)
48
+ return result if result is not None else normalised
@@ -0,0 +1,22 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,ee=Object.prototype.hasOwnProperty,te={current:null},ne={key:!0,ref:!0,__self:!0,__source:!0};function re(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)ee.call(n,i)&&!ne.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:te.current}}function ie(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ae(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function oe(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var se=/\/+/g;function ce(e,t){return typeof e==`object`&&e&&e.key!=null?oe(``+e.key):t.toString(36)}function le(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+ce(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(se,`$&/`)+`/`),le(o,r,i,``,function(e){return e})):o!=null&&(ae(o)&&(o=ie(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(se,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+ce(s,l);c+=le(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+ce(s,l++),c+=le(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function ue(e,t,n){if(e==null)return e;var r=[],i=0;return le(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function de(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var fe={current:null},pe={transition:null},me={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:pe,ReactCurrentOwner:te};function he(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:ue,forEach:function(e,t,n){ue(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ue(e,function(){t++}),t},toArray:function(e){return ue(e,function(e){return e})||[]},only:function(e){if(!ae(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=me,e.act=he,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=te.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)ee.call(n,l)&&!ne.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=re,e.createFactory=function(e){var t=re.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ae,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:de}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=pe.transition;pe.transition={};try{e()}finally{pe.transition=t}},e.unstable_act=he,e.useCallback=function(e,t){return fe.current.useCallback(e,t)},e.useContext=function(e){return fe.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return fe.current.useDeferredValue(e)},e.useEffect=function(e,t){return fe.current.useEffect(e,t)},e.useId=function(){return fe.current.useId()},e.useImperativeHandle=function(e,t,n){return fe.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return fe.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return fe.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return fe.current.useMemo(e,t)},e.useReducer=function(e,t,n){return fe.current.useReducer(e,t,n)},e.useRef=function(e){return fe.current.useRef(e)},e.useState=function(e){return fe.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return fe.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return fe.current.useTransition()},e.version=`18.3.1`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,ue(x);else{var t=n(l);t!==null&&de(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(ne),ne=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ae());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&de(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var ee=!1,te=null,ne=-1,re=5,ie=-1;function ae(){return!(e.unstable_now()-ie<re)}function oe(){if(te!==null){var t=e.unstable_now();ie=t;var n=!0;try{n=te(!0,t)}finally{n?se():(ee=!1,te=null)}}else ee=!1}var se;if(typeof v==`function`)se=function(){v(oe)};else if(typeof MessageChannel<`u`){var ce=new MessageChannel,le=ce.port2;ce.port1.onmessage=oe,se=function(){le.postMessage(null)}}else se=function(){g(oe,0)};function ue(e){te=e,ee||(ee=!0,se())}function de(t,n){ne=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,ue(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):re=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(ne),ne=-1):h=!0,de(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ue(x))),r},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u(),n=f();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function h(e){return l.call(m,e)?!0:l.call(p,e)?!1:d.test(e)?m[e]=!0:(p[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function ee(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var te=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ne=Symbol.for(`react.element`),re=Symbol.for(`react.portal`),ie=Symbol.for(`react.fragment`),ae=Symbol.for(`react.strict_mode`),oe=Symbol.for(`react.profiler`),se=Symbol.for(`react.provider`),ce=Symbol.for(`react.context`),le=Symbol.for(`react.forward_ref`),ue=Symbol.for(`react.suspense`),de=Symbol.for(`react.suspense_list`),fe=Symbol.for(`react.memo`),pe=Symbol.for(`react.lazy`),me=Symbol.for(`react.offscreen`),he=Symbol.iterator;function ge(e){return typeof e!=`object`||!e?null:(e=he&&e[he]||e[`@@iterator`],typeof e==`function`?e:null)}var S=Object.assign,_e;function ve(e){if(_e===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||``}return`
2
+ `+_e+e}var ye=!1;function be(e,t){if(!e||ye)return``;ye=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
3
+ `),a=r.stack.split(`
4
+ `),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
5
+ `+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ye=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ve(e):``}function xe(e){switch(e.tag){case 5:return ve(e.type);case 16:return ve(`Lazy`);case 13:return ve(`Suspense`);case 19:return ve(`SuspenseList`);case 0:case 2:case 15:return e=be(e.type,!1),e;case 11:return e=be(e.type.render,!1),e;case 1:return e=be(e.type,!0),e;default:return``}}function Se(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ie:return`Fragment`;case re:return`Portal`;case oe:return`Profiler`;case ae:return`StrictMode`;case ue:return`Suspense`;case de:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ce:return(e.displayName||`Context`)+`.Consumer`;case se:return(e._context.displayName||`Context`)+`.Provider`;case le:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case fe:return t=e.displayName||null,t===null?Se(e.type)||`Memo`:t;case pe:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}function Ce(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return Se(t);case 8:return t===ae?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function we(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Te(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ee(e){var t=Te(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function De(e){e._valueTracker||=Ee(e)}function Oe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Te(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ke(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ae(e,t){var n=t.checked;return S({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function je(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=we(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Me(e,t){t=t.checked,t!=null&&ee(e,`checked`,t,!1)}function C(e,t){Me(e,t);var n=we(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?w(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&w(e,t.type,we(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ne(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function w(e,t,n){(t!==`number`||ke(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Pe=Array.isArray;function Fe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+we(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ie(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return S({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Le(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Pe(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:we(n)}}function Re(e,t){var n=we(t.value),r=we(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function ze(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Be(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Ve(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Be(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var He,Ue=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(He||=document.createElement(`div`),He.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=He.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function We(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ge={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ke=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ge).forEach(function(e){Ke.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ge[t]=Ge[e]})});function qe(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ge.hasOwnProperty(e)&&Ge[e]?(``+t).trim():t+`px`}function Je(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=qe(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ye=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xe(e,t){if(t){if(Ye[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ze(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Qe=null;function T(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $e=null,E=null,D=null;function et(e){if(e=Vi(e)){if(typeof $e!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Ui(t),$e(e.stateNode,e.type,t))}}function tt(e){E?D?D.push(e):D=[e]:E=e}function nt(){if(E){var e=E,t=D;if(D=E=null,et(e),t)for(e=0;e<t.length;e++)et(t[e])}}function rt(e,t){return e(t)}function it(){}var at=!1;function ot(e,t,n){if(at)return e(t,n);at=!0;try{return rt(e,t,n)}finally{at=!1,(E!==null||D!==null)&&(it(),nt())}}function st(e,t){var n=e.stateNode;if(n===null)return null;var i=Ui(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var ct=!1;if(c)try{var lt={};Object.defineProperty(lt,"passive",{get:function(){ct=!0}}),window.addEventListener(`test`,lt,lt),window.removeEventListener(`test`,lt,lt)}catch{ct=!1}function ut(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var dt=!1,ft=null,pt=!1,mt=null,ht={onError:function(e){dt=!0,ft=e}};function gt(e,t,n,r,i,a,o,s,c){dt=!1,ft=null,ut.apply(ht,arguments)}function _t(e,t,n,i,a,o,s,c,l){if(gt.apply(this,arguments),dt){if(dt){var u=ft;dt=!1,ft=null}else throw Error(r(198));pt||(pt=!0,mt=u)}}function vt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function yt(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function bt(e){if(vt(e)!==e)throw Error(r(188))}function xt(e){var t=e.alternate;if(!t){if(t=vt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return bt(a),e;if(o===i)return bt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function St(e){return e=xt(e),e===null?null:Ct(e)}function Ct(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ct(e);if(t!==null)return t;e=e.sibling}return null}var wt=n.unstable_scheduleCallback,Tt=n.unstable_cancelCallback,Et=n.unstable_shouldYield,Dt=n.unstable_requestPaint,Ot=n.unstable_now,kt=n.unstable_getCurrentPriorityLevel,At=n.unstable_ImmediatePriority,jt=n.unstable_UserBlockingPriority,O=n.unstable_NormalPriority,Mt=n.unstable_LowPriority,Nt=n.unstable_IdlePriority,Pt=null,Ft=null;function It(e){if(Ft&&typeof Ft.onCommitFiberRoot==`function`)try{Ft.onCommitFiberRoot(Pt,e,void 0,(e.current.flags&128)==128)}catch{}}var Lt=Math.clz32?Math.clz32:Bt,Rt=Math.log,zt=Math.LN2;function Bt(e){return e>>>=0,e===0?32:31-(Rt(e)/zt|0)|0}var Vt=64,Ht=4194304;function Ut(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Ut(a))):r=Ut(s)}else o=n&~i,o===0?a!==0&&(r=Ut(a)):r=Ut(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Lt(t),i=1<<n,r|=e[n],t&=~i;return r}function Gt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Kt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Lt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Gt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function qt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Jt(){var e=Vt;return Vt<<=1,!(Vt&4194240)&&(Vt=64),e}function Yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=n}function Zt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Lt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Qt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Lt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var k=0;function $t(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var en,tn,nn,rn,an,on=!1,sn=[],cn=null,A=null,ln=null,un=new Map,dn=new Map,fn=[],pn=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function mn(e,t){switch(e){case`focusin`:case`focusout`:cn=null;break;case`dragenter`:case`dragleave`:A=null;break;case`mouseover`:case`mouseout`:ln=null;break;case`pointerover`:case`pointerout`:un.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:dn.delete(t.pointerId)}}function hn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Vi(t),t!==null&&tn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function j(e,t,n,r,i){switch(t){case`focusin`:return cn=hn(cn,e,t,n,r,i),!0;case`dragenter`:return A=hn(A,e,t,n,r,i),!0;case`mouseover`:return ln=hn(ln,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return un.set(a,hn(un.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,dn.set(a,hn(dn.get(a)||null,e,t,n,r,i)),!0}return!1}function M(e){var t=Bi(e.target);if(t!==null){var n=vt(t);if(n!==null){if(t=n.tag,t===13){if(t=yt(n),t!==null){e.blockedOn=t,an(e.priority,function(){nn(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qe=r,n.target.dispatchEvent(r),Qe=null}else return t=Vi(n),t!==null&&tn(t),e.blockedOn=n,!1;t.shift()}return!0}function _n(e,t,n){gn(e)&&n.delete(t)}function vn(){on=!1,cn!==null&&gn(cn)&&(cn=null),A!==null&&gn(A)&&(A=null),ln!==null&&gn(ln)&&(ln=null),un.forEach(_n),dn.forEach(_n)}function yn(e,t){e.blockedOn===t&&(e.blockedOn=null,on||(on=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vn)))}function bn(e){function t(t){return yn(t,e)}if(0<sn.length){yn(sn[0],e);for(var n=1;n<sn.length;n++){var r=sn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(cn!==null&&yn(cn,e),A!==null&&yn(A,e),ln!==null&&yn(ln,e),un.forEach(t),dn.forEach(t),n=0;n<fn.length;n++)r=fn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<fn.length&&(n=fn[0],n.blockedOn===null);)M(n),n.blockedOn===null&&fn.shift()}var xn=te.ReactCurrentBatchConfig,Sn=!0;function Cn(e,t,n,r){var i=k,a=xn.transition;xn.transition=null;try{k=1,Tn(e,t,n,r)}finally{k=i,xn.transition=a}}function wn(e,t,n,r){var i=k,a=xn.transition;xn.transition=null;try{k=4,Tn(e,t,n,r)}finally{k=i,xn.transition=a}}function Tn(e,t,n,r){if(Sn){var i=Dn(e,t,n,r);if(i===null)vi(e,t,r,En,n),mn(e,r);else if(j(i,e,t,n,r))r.stopPropagation();else if(mn(e,r),t&4&&-1<pn.indexOf(e)){for(;i!==null;){var a=Vi(i);if(a!==null&&en(a),a=Dn(e,t,n,r),a===null&&vi(e,t,r,En,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var En=null;function Dn(e,t,n,r){if(En=null,e=T(r),e=Bi(e),e!==null)if(t=vt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=yt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return En=e,null}function On(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(kt()){case At:return 1;case jt:return 4;case O:case Mt:return 16;case Nt:return 536870912;default:return 16}default:return 16}}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return jn=i.slice(e,1<r?1-r:void 0)}function Nn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Pn(){return!0}function Fn(){return!1}function In(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Pn:Fn,this.isPropagationStopped=Fn,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=S({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=S({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(S({},Wn,{dataTransfer:0})),qn=In(S({},zn,{relatedTarget:0})),Jn=In(S({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(S({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(S({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(S({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(S({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(S({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),ar=In(S({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=In(S({},Wn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),sr=[9,13,27,32],cr=c&&`CompositionEvent`in window,lr=null;c&&`documentMode`in document&&(lr=document.documentMode);var N=c&&`TextEvent`in window&&!lr,P=c&&(!cr||lr&&8<lr&&11>=lr),ur=` `,dr=!1;function fr(e,t){switch(e){case`keyup`:return sr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var mr=!1;function hr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(dr=!0,ur):null;case`textInput`:return e=t.data,e===ur&&dr?null:e;default:return null}}function gr(e,t){if(mr)return e===`compositionend`||!cr&&fr(e,t)?(e=Mn(),jn=An=kn=null,mr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return P&&t.locale!==`ko`?null:t.data;default:return null}}var _r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!_r[e.type]:t===`textarea`}function yr(e,t,n,r){tt(r),t=bi(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var br=null,xr=null;function Sr(e){pi(e,0)}function Cr(e){if(Oe(Hi(e)))return e}function wr(e,t){if(e===`change`)return t}var Tr=!1;if(c){var Er;if(c){var Dr=`oninput`in document;if(!Dr){var Or=document.createElement(`div`);Or.setAttribute(`oninput`,`return;`),Dr=typeof Or.oninput==`function`}Er=Dr}else Er=!1;Tr=Er&&(!document.documentMode||9<document.documentMode)}function kr(){br&&(br.detachEvent(`onpropertychange`,Ar),xr=br=null)}function Ar(e){if(e.propertyName===`value`&&Cr(xr)){var t=[];yr(t,xr,e,T(e)),ot(Sr,t)}}function jr(e,t,n){e===`focusin`?(kr(),br=t,xr=n,br.attachEvent(`onpropertychange`,Ar)):e===`focusout`&&kr()}function Mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Cr(xr)}function Nr(e,t){if(e===`click`)return Cr(t)}function Pr(e,t){if(e===`input`||e===`change`)return Cr(t)}function Fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ir=typeof Object.is==`function`?Object.is:Fr;function Lr(e,t){if(Ir(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Ir(e[i],t[i]))return!1}return!0}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var n=Rr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Rr(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vr(){for(var e=window,t=ke();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ke(e.document)}return t}function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Ur(e){var t=Vr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Br(n.ownerDocument.documentElement,n)){if(r!==null&&Hr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=zr(n,a);var o=zr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Wr=c&&`documentMode`in document&&11>=document.documentMode,Gr=null,Kr=null,qr=null,Jr=!1;function Yr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Gr==null||Gr!==ke(r)||(r=Gr,`selectionStart`in r&&Hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qr&&Lr(qr,r)||(qr=r,r=bi(Kr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Gr)))}function Xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Zr={animationend:Xr(`Animation`,`AnimationEnd`),animationiteration:Xr(`Animation`,`AnimationIteration`),animationstart:Xr(`Animation`,`AnimationStart`),transitionend:Xr(`Transition`,`TransitionEnd`)},Qr={},$r={};c&&($r=document.createElement(`div`).style,`AnimationEvent`in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),`TransitionEvent`in window||delete Zr.transitionend.transition);function ei(e){if(Qr[e])return Qr[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $r)return Qr[e]=t[n];return e}var ti=ei(`animationend`),ni=ei(`animationiteration`),ri=ei(`animationstart`),ii=ei(`transitionend`),ai=new Map,oi=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function si(e,t){ai.set(e,t),o(t,[e])}for(var ci=0;ci<oi.length;ci++){var li=oi[ci];si(li.toLowerCase(),`on`+(li[0].toUpperCase()+li.slice(1)))}si(ti,`onAnimationEnd`),si(ni,`onAnimationIteration`),si(ri,`onAnimationStart`),si(`dblclick`,`onDoubleClick`),si(`focusin`,`onFocus`),si(`focusout`,`onBlur`),si(ii,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ui=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),di=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ui));function fi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,_t(r,t,void 0,e),e.currentTarget=null}function pi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;fi(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;fi(i,s,l),a=c}}}if(pt)throw e=mt,pt=!1,mt=null,e}function F(e,t){var n=t[V];n===void 0&&(n=t[V]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(di.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(On(t)){case 1:var i=Cn;break;case 4:i=wn;break;default:i=Tn}n=i.bind(null,t,n,e),i=void 0,!ct||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Bi(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}ot(function(){var r=a,i=T(n),o=[];a:{var s=ai.get(e);if(s!==void 0){var c=Rn,l=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:c=nr;break;case`focusin`:l=`focus`,c=qn;break;case`focusout`:l=`blur`,c=qn;break;case`beforeblur`:case`afterblur`:c=qn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=ir;break;case ti:case ni:case ri:c=Jn;break;case ii:c=ar;break;case`scroll`:c=Bn;break;case`wheel`:c=or;break;case`copy`:case`cut`:case`paste`:c=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=rr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=st(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Qe&&(l=n.relatedTarget||n.fromElement)&&(Bi(l)||l[B]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Bi(l):null,l!==null&&(d=vt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Gn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=rr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Hi(c),m=l==null?s:Hi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Bi(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Hi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=wr;else if(vr(s))if(Tr)g=Pr;else{g=Mr;var _=jr}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Nr);if(g&&=g(e,r)){yr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&w(s,`number`,s.value)}switch(_=r?Hi(r):window,e){case`focusin`:(vr(_)||_.contentEditable===`true`)&&(Gr=_,Kr=r,qr=null);break;case`focusout`:qr=Kr=Gr=null;break;case`mousedown`:Jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Jr=!1,Yr(o,n,i);break;case`selectionchange`:if(Wr)break;case`keydown`:case`keyup`:Yr(o,n,i)}var v;if(cr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else mr?fr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(P&&n.locale!==`ko`&&(mr||y!==`onCompositionStart`?y===`onCompositionEnd`&&mr&&(v=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,mr=!0)),_=bi(r,y),0<_.length&&(y=new Xn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=pr(n),v!==null&&(y.data=v)))),(v=N?hr(e,n):gr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}pi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=st(e,n),a!=null&&r.unshift(yi(e,a,i)),a=st(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=st(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=st(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,I=/\u0000|\uFFFD/g;function wi(e){return(typeof e==`string`?e:``+e).replace(Ci,`
6
+ `).replace(I,``)}function L(e,t,n){if(t=wi(t),wi(e)!==t&&n)throw Error(r(425))}function Ti(){}var Ei=null,Di=null;function Oi(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ki=typeof setTimeout==`function`?setTimeout:void 0,Ai=typeof clearTimeout==`function`?clearTimeout:void 0,ji=typeof Promise==`function`?Promise:void 0,Mi=typeof queueMicrotask==`function`?queueMicrotask:ji===void 0?ki:function(e){return ji.resolve(null).then(e).catch(Ni)};function Ni(e){setTimeout(function(){throw e})}function R(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),bn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);bn(t)}function Pi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Fi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var z=Math.random().toString(36).slice(2),Ii=`__reactFiber$`+z,Li=`__reactProps$`+z,B=`__reactContainer$`+z,V=`__reactEvents$`+z,Ri=`__reactListeners$`+z,zi=`__reactHandles$`+z;function Bi(e){var t=e[Ii];if(t)return t;for(var n=e.parentNode;n;){if(t=n[B]||n[Ii]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fi(e);e!==null;){if(n=e[Ii])return n;e=Fi(e)}return t}e=n,n=e.parentNode}return null}function Vi(e){return e=e[Ii]||e[B],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Hi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Ui(e){return e[Li]||null}var Wi=[],Gi=-1;function Ki(e){return{current:e}}function H(e){0>Gi||(e.current=Wi[Gi],Wi[Gi]=null,Gi--)}function U(e,t){Gi++,Wi[Gi]=e.current,e.current=t}var qi={},Ji=Ki(qi),Yi=Ki(!1),Xi=qi;function W(e,t){var n=e.type.contextTypes;if(!n)return qi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Zi(e){return e=e.childContextTypes,e!=null}function Qi(){H(Yi),H(Ji)}function $i(e,t,n){if(Ji.current!==qi)throw Error(r(168));U(Ji,t),U(Yi,n)}function ea(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,Ce(e)||`Unknown`,a));return S({},n,i)}function ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qi,Xi=Ji.current,U(Ji,e),U(Yi,Yi.current),!0}function na(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ea(e,t,Xi),i.__reactInternalMemoizedMergedChildContext=e,H(Yi),H(Ji),U(Ji,e)):H(Yi),U(Yi,n)}var ra=null,ia=!1,aa=!1;function oa(e){ra===null?ra=[e]:ra.push(e)}function sa(e){ia=!0,oa(e)}function ca(){if(!aa&&ra!==null){aa=!0;var e=0,t=k;try{var n=ra;for(k=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ra=null,ia=!1}catch(t){throw ra!==null&&(ra=ra.slice(e+1)),wt(At,ca),t}finally{k=t,aa=!1}}return null}var la=[],ua=0,da=null,fa=0,pa=[],ma=0,ha=null,ga=1,_a=``;function va(e,t){la[ua++]=fa,la[ua++]=da,da=e,fa=t}function ya(e,t,n){pa[ma++]=ga,pa[ma++]=_a,pa[ma++]=ha,ha=e;var r=ga;e=_a;var i=32-Lt(r)-1;r&=~(1<<i),n+=1;var a=32-Lt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ga=1<<32-Lt(t)+i|n<<i|r,_a=a+e}else ga=1<<a|n<<i|r,_a=e}function ba(e){e.return!==null&&(va(e,1),ya(e,1,0))}function xa(e){for(;e===da;)da=la[--ua],la[ua]=null,fa=la[--ua],la[ua]=null;for(;e===ha;)ha=pa[--ma],pa[ma]=null,_a=pa[--ma],pa[ma]=null,ga=pa[--ma],pa[ma]=null}var Sa=null,Ca=null,G=!1,wa=null;function Ta(e,t){var n=Kl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ea(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,Sa=e,Ca=Pi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,Sa=e,Ca=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=ha===null?null:{id:ga,overflow:_a},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Kl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Sa=e,Ca=null,!0);default:return!1}}function Da(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Oa(e){if(G){var t=Ca;if(t){var n=t;if(!Ea(e,t)){if(Da(e))throw Error(r(418));t=Pi(n.nextSibling);var i=Sa;t&&Ea(e,t)?Ta(i,n):(e.flags=e.flags&-4097|2,G=!1,Sa=e)}}else{if(Da(e))throw Error(r(418));e.flags=e.flags&-4097|2,G=!1,Sa=e}}}function ka(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Sa=e}function Aa(e){if(e!==Sa)return!1;if(!G)return ka(e),G=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Oi(e.type,e.memoizedProps)),t&&=Ca){if(Da(e))throw ja(),Error(r(418));for(;t;)Ta(e,t),t=Pi(t.nextSibling)}if(ka(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ca=Pi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ca=null}}else Ca=Sa?Pi(e.stateNode.nextSibling):null;return!0}function ja(){for(var e=Ca;e;)e=Pi(e.nextSibling)}function Ma(){Ca=Sa=null,G=!1}function K(e){wa===null?wa=[e]:wa.push(e)}var Na=te.ReactCurrentBatchConfig;function Pa(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Fa(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function q(e){var t=e._init;return t(e._payload)}function J(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=Yl(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=$l(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===ie?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===pe&&q(i)===t.type)?(r=a(t,n.props),r.ref=Pa(e,t,n),r.return=e,r):(r=Xl(n.type,n.key,n.props,null,e.mode,r),r.ref=Pa(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=eu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Zl(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=$l(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case ne:return n=Xl(t.type,t.key,t.props,null,e.mode,n),n.ref=Pa(e,null,t),n.return=e,n;case re:return t=eu(t,e.mode,n),t.return=e,t;case pe:var r=t._init;return f(e,r(t._payload),n)}if(Pe(t)||ge(t))return t=Zl(t,e.mode,n,null),t.return=e,t;Fa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case ne:return n.key===i?l(e,t,n,r):null;case re:return n.key===i?u(e,t,n,r):null;case pe:return i=n._init,p(e,t,i(n._payload),r)}if(Pe(n)||ge(n))return i===null?d(e,t,n,r,null):null;Fa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case ne:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case re:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case pe:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Pe(r)||ge(r))return e=e.get(n)||null,d(t,e,r,i,null);Fa(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),G&&va(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return G&&va(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),G&&va(r,h),l}function g(a,s,c,l){var u=ge(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),G&&va(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return G&&va(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),G&&va(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===ie&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case ne:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===ie){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===pe&&q(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Pa(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===ie?(r=Zl(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=Xl(i.type,i.key,i.props,null,e.mode,o),o.ref=Pa(e,r,i),o.return=e,e=o)}return s(e);case re:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=eu(i,e.mode,o),r.return=e,e=r}return s(e);case pe:return l=i._init,_(e,r,l(i._payload),o)}if(Pe(i))return h(e,r,i,o);if(ge(i))return g(e,r,i,o);Fa(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=$l(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ia=J(!0),La=J(!1),Ra=Ki(null),za=null,Ba=null,Va=null;function Ha(){Va=Ba=za=null}function Ua(e){var t=Ra.current;H(Ra),e._currentValue=t}function Wa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ga(e,t){za=e,Va=Ba=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ms=!0),e.firstContext=null)}function Ka(e){var t=e._currentValue;if(Va!==e)if(e={context:e,memoizedValue:t,next:null},Ba===null){if(za===null)throw Error(r(308));Ba=e,za.dependencies={lanes:0,firstContext:e}}else Ba=Ba.next=e;return t}var qa=null;function Ja(e){qa===null?qa=[e]:qa.push(e)}function Ya(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ja(t)):(n.next=i.next,i.next=n),t.interleaved=n,Xa(e,r)}function Xa(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Za=!1;function Qa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $a(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function eo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function to(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Xa(e,n)}return i=r.interleaved,i===null?(t.next=t,Ja(r)):(t.next=i.next,i.next=t),r.interleaved=t,Xa(e,n)}function no(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qt(e,n)}}function ro(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function io(e,t,n,r){var i=e.updateQueue;Za=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=S({},d,f);break a;case 2:Za=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Jc|=o,e.lanes=o,e.memoizedState=d}}function ao(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var Y={},oo=Ki(Y),so=Ki(Y),co=Ki(Y);function lo(e){if(e===Y)throw Error(r(174));return e}function uo(e,t){switch(U(co,t),U(so,e),U(oo,Y),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ve(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ve(t,e)}H(oo),U(oo,t)}function X(){H(oo),H(so),H(co)}function fo(e){lo(co.current);var t=lo(oo.current),n=Ve(t,e.type);t!==n&&(U(so,e),U(oo,n))}function po(e){so.current===e&&(H(oo),H(so))}var Z=Ki(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=[];function go(){for(var e=0;e<ho.length;e++)ho[e]._workInProgressVersionPrimary=null;ho.length=0}var _o=te.ReactCurrentDispatcher,vo=te.ReactCurrentBatchConfig,yo=0,bo=null,xo=null,So=null,Co=!1,wo=!1,To=0,Eo=0;function Do(){throw Error(r(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ir(e[n],t[n]))return!1;return!0}function ko(e,t,n,i,a,o){if(yo=o,bo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_o.current=e===null||e.memoizedState===null?fs:ps,e=n(i,a),wo){o=0;do{if(wo=!1,To=0,25<=o)throw Error(r(301));o+=1,So=xo=null,t.updateQueue=null,_o.current=ms,e=n(i,a)}while(wo)}if(_o.current=ds,t=xo!==null&&xo.next!==null,yo=0,So=xo=bo=null,Co=!1,t)throw Error(r(300));return e}function Ao(){var e=To!==0;return To=0,e}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return So===null?bo.memoizedState=So=e:So=So.next=e,So}function Mo(){if(xo===null){var e=bo.alternate;e=e===null?null:e.memoizedState}else e=xo.next;var t=So===null?bo.memoizedState:So.next;if(t!==null)So=t,xo=e;else{if(e===null)throw Error(r(310));xo=e,e={memoizedState:xo.memoizedState,baseState:xo.baseState,baseQueue:xo.baseQueue,queue:xo.queue,next:null},So===null?bo.memoizedState=So=e:So=So.next=e}return So}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){var t=Mo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=xo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((yo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,bo.lanes|=d,Jc|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Ir(i,t.memoizedState)||(Ms=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,bo.lanes|=o,Jc|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ir(o,t.memoizedState)||(Ms=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Io(){}function Lo(e,t){var n=bo,i=Mo(),a=t(),o=!Ir(i.memoizedState,a);if(o&&(i.memoizedState=a,Ms=!0),i=i.queue,Yo(Bo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||So!==null&&So.memoizedState.tag&1){if(n.flags|=2048,Wo(9,zo.bind(null,n,i,a,t),void 0,null),Vc===null)throw Error(r(349));yo&30||Ro(n,t,a)}return a}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=bo.updateQueue,t===null?(t={lastEffect:null,stores:null},bo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ir(e,n)}catch{return!0}}function Ho(e){var t=Xa(e,1);t!==null&&ml(t,e,1,-1)}function Uo(e){var t=jo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t.queue=e,e=e.dispatch=ss.bind(null,bo,e),[t.memoizedState,e]}function Wo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=bo.updateQueue,t===null?(t={lastEffect:null,stores:null},bo.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Go(){return Mo().memoizedState}function Ko(e,t,n,r){var i=jo();bo.flags|=e,i.memoizedState=Wo(1|t,n,void 0,r===void 0?null:r)}function qo(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=void 0;if(xo!==null){var o=xo.memoizedState;if(a=o.destroy,r!==null&&Oo(r,o.deps)){i.memoizedState=Wo(t,n,a,r);return}}bo.flags|=e,i.memoizedState=Wo(1|t,n,a,r)}function Jo(e,t){return Ko(8390656,8,e,t)}function Yo(e,t){return qo(2048,8,e,t)}function Xo(e,t){return qo(4,2,e,t)}function Zo(e,t){return qo(4,4,e,t)}function Qo(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $o(e,t,n){return n=n==null?null:n.concat([e]),qo(4,4,Qo.bind(null,t,e),n)}function es(){}function ts(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ns(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rs(e,t,n){return yo&21?(Ir(n,t)||(n=Jt(),bo.lanes|=n,Jc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ms=!0),e.memoizedState=n)}function is(e,t){var n=k;k=n!==0&&4>n?n:4,e(!0);var r=vo.transition;vo.transition={};try{e(!1),t()}finally{k=n,vo.transition=r}}function as(){return Mo().memoizedState}function os(e,t,n){var r=pl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cs(e))ls(t,n);else if(n=Ya(e,t,n,r),n!==null){var i=fl();ml(n,e,r,i),us(n,t,r)}}function ss(e,t,n){var r=pl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cs(e))ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ir(s,o)){var c=t.interleaved;c===null?(i.next=i,Ja(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=Ya(e,t,i,r),n!==null&&(i=fl(),ml(n,e,r,i),us(n,t,r))}}function cs(e){var t=e.alternate;return e===bo||t!==null&&t===bo}function ls(e,t){wo=Co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function us(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qt(e,n)}}var ds={readContext:Ka,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useInsertionEffect:Do,useLayoutEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useMutableSource:Do,useSyncExternalStore:Do,useId:Do,unstable_isNewReconciler:!1},fs={readContext:Ka,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:Ka,useEffect:Jo,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),Ko(4194308,4,Qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ko(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ko(4,2,e,t)},useMemo:function(e,t){var n=jo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=os.bind(null,bo,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:Uo,useDebugValue:es,useDeferredValue:function(e){return jo().memoizedState=e},useTransition:function(){var e=Uo(!1),t=e[0];return e=is.bind(null,e[1]),jo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=bo,a=jo();if(G){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Vc===null)throw Error(r(349));yo&30||Ro(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Jo(Bo.bind(null,i,o,e),[e]),i.flags|=2048,Wo(9,zo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=jo(),t=Vc.identifierPrefix;if(G){var n=_a,r=ga;n=(r&~(1<<32-Lt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=To++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Eo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},ps={readContext:Ka,useCallback:ts,useContext:Ka,useEffect:Yo,useImperativeHandle:$o,useInsertionEffect:Xo,useLayoutEffect:Zo,useMemo:ns,useReducer:Po,useRef:Go,useState:function(){return Po(No)},useDebugValue:es,useDeferredValue:function(e){return rs(Mo(),xo.memoizedState,e)},useTransition:function(){return[Po(No)[0],Mo().memoizedState]},useMutableSource:Io,useSyncExternalStore:Lo,useId:as,unstable_isNewReconciler:!1},ms={readContext:Ka,useCallback:ts,useContext:Ka,useEffect:Yo,useImperativeHandle:$o,useInsertionEffect:Xo,useLayoutEffect:Zo,useMemo:ns,useReducer:Fo,useRef:Go,useState:function(){return Fo(No)},useDebugValue:es,useDeferredValue:function(e){var t=Mo();return xo===null?t.memoizedState=e:rs(t,xo.memoizedState,e)},useTransition:function(){return[Fo(No)[0],Mo().memoizedState]},useMutableSource:Io,useSyncExternalStore:Lo,useId:as,unstable_isNewReconciler:!1};function hs(e,t){if(e&&e.defaultProps){for(var n in t=S({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _s={isMounted:function(e){return(e=e._reactInternals)?vt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),a=eo(r,i);a.payload=t,n!=null&&(a.callback=n),t=to(e,a,i),t!==null&&(ml(t,e,i,r),no(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),a=eo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=to(e,a,i),t!==null&&(ml(t,e,i,r),no(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fl(),r=pl(e),i=eo(n,r);i.tag=2,t!=null&&(i.callback=t),t=to(e,i,r),t!==null&&(ml(t,e,r,n),no(t,e,r))}};function vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Lr(n,r)||!Lr(i,a):!0}function ys(e,t,n){var r=!1,i=qi,a=t.contextType;return typeof a==`object`&&a?a=Ka(a):(i=Zi(t)?Xi:Ji.current,r=t.contextTypes,a=(r=r!=null)?W(e,i):qi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_s,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function bs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_s.enqueueReplaceState(t,t.state,null)}function xs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Qa(e);var a=t.contextType;typeof a==`object`&&a?i.context=Ka(a):(a=Zi(t)?Xi:Ji.current,i.context=W(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(gs(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&_s.enqueueReplaceState(i,i.state,null),io(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Ss(e,t){try{var n=``,r=t;do n+=xe(r),r=r.return;while(r);var i=n}catch(e){i=`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}return{value:e,source:t,stack:i,digest:null}}function Cs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ws(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ts=typeof WeakMap==`function`?WeakMap:Map;function Es(e,t,n){n=eo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nl||(nl=!0,rl=r),ws(e,t)},n}function Ds(e,t,n){n=eo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ws(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){ws(e,t),typeof r!=`function`&&(il===null?il=new Set([this]):il.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Os(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ts;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zl.bind(null,e,t,n),t.then(e,e))}function ks(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function As(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=eo(-1,1),t.tag=2,to(n,t,1))),n.lanes|=1),e)}var js=te.ReactCurrentOwner,Ms=!1;function Ns(e,t,n,r){t.child=e===null?La(t,null,n,r):Ia(t,e.child,n,r)}function Ps(e,t,n,r,i){n=n.render;var a=t.ref;return Ga(t,i),r=ko(e,t,n,r,a,i),n=Ao(),e!==null&&!Ms?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(G&&n&&ba(t),t.flags|=1,Ns(e,t,r,i),t.child)}function Fs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ql(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Is(e,t,a,r,i)):(e=Xl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Lr:n,n(o,r)&&e.ref===t.ref)return ec(e,t,i)}return t.flags|=1,e=Yl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Is(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Lr(a,r)&&e.ref===t.ref)if(Ms=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ms=!0);else return t.lanes=e.lanes,ec(e,t,i)}return zs(e,t,n,r,i)}function Ls(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},U(Gc,Wc),Wc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,U(Gc,Wc),Wc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,U(Gc,Wc),Wc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),U(Gc,Wc),Wc|=r;return Ns(e,t,i,n),t.child}function Rs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zs(e,t,n,r,i){var a=Zi(n)?Xi:Ji.current;return a=W(t,a),Ga(t,i),n=ko(e,t,n,r,a,i),r=Ao(),e!==null&&!Ms?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(G&&r&&ba(t),t.flags|=1,Ns(e,t,n,i),t.child)}function Bs(e,t,n,r,i){if(Zi(n)){var a=!0;ta(t)}else a=!1;if(Ga(t,i),t.stateNode===null)$s(e,t),ys(t,n,r),xs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Ka(l):(l=Zi(n)?Xi:Ji.current,l=W(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&bs(t,o,r,l),Za=!1;var f=t.memoizedState;o.state=f,io(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Yi.current||Za?(typeof u==`function`&&(gs(t,n,u,r),c=t.memoizedState),(s=Za||vs(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,$a(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:hs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Ka(c):(c=Zi(n)?Xi:Ji.current,c=W(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&bs(t,o,r,c),Za=!1,f=t.memoizedState,o.state=f,io(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Yi.current||Za?(typeof p==`function`&&(gs(t,n,p,r),m=t.memoizedState),(l=Za||vs(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Vs(e,t,n,r,a,i)}function Vs(e,t,n,r,i,a){Rs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&na(t,n,!1),ec(e,t,a);r=t.stateNode,js.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ia(t,e.child,null,a),t.child=Ia(t,null,s,a)):Ns(e,t,s,a),t.memoizedState=r.state,i&&na(t,n,!0),t.child}function Hs(e){var t=e.stateNode;t.pendingContext?$i(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$i(e,t.context,!1),uo(e,t.containerInfo)}function Us(e,t,n,r,i){return Ma(),K(i),t.flags|=256,Ns(e,t,n,r),t.child}var Ws={dehydrated:null,treeContext:null,retryLane:0};function Gs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ks(e,t,n){var r=t.pendingProps,i=Z.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),U(Z,i&1),e===null)return Oa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ql(o,r,0,null),e=Zl(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Gs(n),t.memoizedState=Ws,e):qs(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Ys(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yl(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=Zl(a,o,n,null),a.flags|=2):a=Yl(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Gs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Ws,r}return a=e.child,e=a.sibling,r=Yl(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function qs(e,t){return t=Ql({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function Js(e,t,n,r){return r!==null&&K(r),Ia(t,e.child,null,n),e=qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ys(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Cs(Error(r(422))),Js(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=Ql({mode:`visible`,children:i.children},a,0,null),o=Zl(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ia(t,e.child,null,s),t.child.memoizedState=Gs(s),t.memoizedState=Ws,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return Js(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Cs(o,i,void 0),Js(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ms||c){if(i=Vc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,Xa(e,a),ml(i,e,a,-1))}return Ol(),i=Cs(Error(r(421))),Js(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Vl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ca=Pi(a.nextSibling),Sa=t,G=!0,wa=null,e!==null&&(pa[ma++]=ga,pa[ma++]=_a,pa[ma++]=ha,ga=e.id,_a=e.overflow,ha=t),t=qs(t,i.children),t.flags|=4096,t)}function Xs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wa(e.return,t,n)}function Zs(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Qs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ns(e,t,r.children,n),r=Z.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xs(e,n,t);else if(e.tag===19)Xs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(U(Z,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Zs(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Zs(t,!0,n,null,a);break;case`together`:Zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $s(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Yl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function tc(e,t,n){switch(t.tag){case 3:Hs(t),Ma();break;case 5:fo(t);break;case 1:Zi(t.type)&&ta(t);break;case 4:uo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;U(Ra,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(U(Z,Z.current&1),e=ec(e,t,n),e===null?null:e.sibling):Ks(e,t,n):(U(Z,Z.current&1),t.flags|=128,null);U(Z,Z.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Qs(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(Z,Z.current),r)break;return null;case 22:case 23:return t.lanes=0,Ls(e,t,n)}return ec(e,t,n)}var nc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},rc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,lo(oo.current);var o=null;switch(n){case`input`:i=Ae(e,i),r=Ae(e,r),o=[];break;case`select`:i=S({},i,{value:void 0}),r=S({},r,{value:void 0}),o=[];break;case`textarea`:i=Ie(e,i),r=Ie(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Ti)}Xe(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&F(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},ic=function(e,t,n,r){n!==r&&(t.flags|=4)};function ac(e,t){if(!G)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function oc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function sc(e,t,n){var i=t.pendingProps;switch(xa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oc(t),null;case 1:return Zi(t.type)&&Qi(),oc(t),null;case 3:return i=t.stateNode,X(),H(Yi),H(Ji),go(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Aa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,wa!==null&&(vl(wa),wa=null))),oc(t),null;case 5:po(t);var o=lo(co.current);if(n=t.type,e!==null&&t.stateNode!=null)rc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return oc(t),null}if(e=lo(oo.current),Aa(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Ii]=t,i[Li]=s,e=(t.mode&1)!=0,n){case`dialog`:F(`cancel`,i),F(`close`,i);break;case`iframe`:case`object`:case`embed`:F(`load`,i);break;case`video`:case`audio`:for(o=0;o<ui.length;o++)F(ui[o],i);break;case`source`:F(`error`,i);break;case`img`:case`image`:case`link`:F(`error`,i),F(`load`,i);break;case`details`:F(`toggle`,i);break;case`input`:je(i,s),F(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},F(`invalid`,i);break;case`textarea`:Le(i,s),F(`invalid`,i)}for(var c in Xe(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&L(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&L(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&F(`scroll`,i)}switch(n){case`input`:De(i),Ne(i,s,!0);break;case`textarea`:De(i),ze(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Ti)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Be(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Ii]=t,e[Li]=i,nc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ze(n,i),n){case`dialog`:F(`cancel`,e),F(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:F(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ui.length;o++)F(ui[o],e);o=i;break;case`source`:F(`error`,e),o=i;break;case`img`:case`image`:case`link`:F(`error`,e),F(`load`,e),o=i;break;case`details`:F(`toggle`,e),o=i;break;case`input`:je(e,i),o=Ae(e,i),F(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=S({},i,{value:void 0}),F(`invalid`,e);break;case`textarea`:Le(e,i),o=Ie(e,i),F(`invalid`,e);break;default:o=i}for(s in Xe(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Je(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ue(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&We(e,u):typeof u==`number`&&We(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&F(`scroll`,e):u!=null&&ee(e,s,u,c))}switch(n){case`input`:De(e),Ne(e,i,!1);break;case`textarea`:De(e),ze(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+we(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Fe(e,!!i.multiple,i.defaultValue,!0):Fe(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Ti)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return oc(t),null;case 6:if(e&&t.stateNode!=null)ic(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=lo(co.current),lo(oo.current),Aa(t)){if(i=t.stateNode,n=t.memoizedProps,i[Ii]=t,(s=i.nodeValue!==n)&&(e=Sa,e!==null))switch(e.tag){case 3:L(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&L(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ii]=t,t.stateNode=i}return oc(t),null;case 13:if(H(Z),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(G&&Ca!==null&&t.mode&1&&!(t.flags&128))ja(),Ma(),t.flags|=98560,s=!1;else if(s=Aa(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Ii]=t}else Ma(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;oc(t),s=!1}else wa!==null&&(vl(wa),wa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Z.current&1?Kc===0&&(Kc=3):Ol())),t.updateQueue!==null&&(t.flags|=4),oc(t),null);case 4:return X(),e===null&&gi(t.stateNode.containerInfo),oc(t),null;case 10:return Ua(t.type._context),oc(t),null;case 17:return Zi(t.type)&&Qi(),oc(t),null;case 19:if(H(Z),s=t.memoizedState,s===null)return oc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)ac(s,!1);else{if(Kc!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=mo(e),c!==null){for(t.flags|=128,ac(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return U(Z,Z.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ot()>el&&(t.flags|=128,i=!0,ac(s,!1),t.lanes=4194304)}else{if(!i)if(e=mo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ac(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!G)return oc(t),null}else 2*Ot()-s.renderingStartTime>el&&n!==1073741824&&(t.flags|=128,i=!0,ac(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(oc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ot(),t.sibling=null,n=Z.current,U(Z,i?n&1|2:n&1),t);case 22:case 23:return wl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Wc&1073741824&&(oc(t),t.subtreeFlags&6&&(t.flags|=8192)):oc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function cc(e,t){switch(xa(t),t.tag){case 1:return Zi(t.type)&&Qi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return X(),H(Yi),H(Ji),go(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return po(t),null;case 13:if(H(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Z),null;case 4:return X(),null;case 10:return Ua(t.type._context),null;case 22:case 23:return wl(),null;case 24:return null;default:return null}}var lc=!1,uc=!1,dc=typeof WeakSet==`function`?WeakSet:Set,Q=null;function fc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Rl(e,t,n)}else n.current=null}function pc(e,t,n){try{n()}catch(n){Rl(e,t,n)}}var mc=!1;function hc(e,t){if(Ei=Sn,e=Vr(),Hr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Di={focusedElem:e,selectionRange:n},Sn=!1,Q=t;Q!==null;)if(t=Q,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:hs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Rl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return h=mc,mc=!1,h}function gc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&pc(t,n,a)}i=i.next}while(i!==r)}}function _c(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function vc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function yc(e){var t=e.alternate;t!==null&&(e.alternate=null,yc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ii],delete t[Li],delete t[V],delete t[Ri],delete t[zi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function bc(e){return e.tag===5||e.tag===3||e.tag===4}function xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||bc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ti));else if(r!==4&&(e=e.child,e!==null))for(Sc(e,t,n),e=e.sibling;e!==null;)Sc(e,t,n),e=e.sibling}function Cc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Cc(e,t,n),e=e.sibling;e!==null;)Cc(e,t,n),e=e.sibling}var wc=null,Tc=!1;function Ec(e,t,n){for(n=n.child;n!==null;)Dc(e,t,n),n=n.sibling}function Dc(e,t,n){if(Ft&&typeof Ft.onCommitFiberUnmount==`function`)try{Ft.onCommitFiberUnmount(Pt,n)}catch{}switch(n.tag){case 5:uc||fc(n,t);case 6:var r=wc,i=Tc;wc=null,Ec(e,t,n),wc=r,Tc=i,wc!==null&&(Tc?(e=wc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wc.removeChild(n.stateNode));break;case 18:wc!==null&&(Tc?(e=wc,n=n.stateNode,e.nodeType===8?R(e.parentNode,n):e.nodeType===1&&R(e,n),bn(e)):R(wc,n.stateNode));break;case 4:r=wc,i=Tc,wc=n.stateNode.containerInfo,Tc=!0,Ec(e,t,n),wc=r,Tc=i;break;case 0:case 11:case 14:case 15:if(!uc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&pc(n,t,o),i=i.next}while(i!==r)}Ec(e,t,n);break;case 1:if(!uc&&(fc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Rl(n,t,e)}Ec(e,t,n);break;case 21:Ec(e,t,n);break;case 22:n.mode&1?(uc=(r=uc)||n.memoizedState!==null,Ec(e,t,n),uc=r):Ec(e,t,n);break;default:Ec(e,t,n)}}function Oc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dc),t.forEach(function(t){var r=Hl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function kc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:wc=c.stateNode,Tc=!1;break a;case 3:wc=c.stateNode.containerInfo,Tc=!0;break a;case 4:wc=c.stateNode.containerInfo,Tc=!0;break a}c=c.return}if(wc===null)throw Error(r(160));Dc(o,s,a),wc=null,Tc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Rl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ac(t,e),t=t.sibling}function Ac(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kc(t,e),jc(e),i&4){try{gc(3,e,e.return),_c(3,e)}catch(t){Rl(e,e.return,t)}try{gc(5,e,e.return)}catch(t){Rl(e,e.return,t)}}break;case 1:kc(t,e),jc(e),i&512&&n!==null&&fc(n,n.return);break;case 5:if(kc(t,e),jc(e),i&512&&n!==null&&fc(n,n.return),e.flags&32){var a=e.stateNode;try{We(a,``)}catch(t){Rl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Me(a,o),Ze(c,s);var u=Ze(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Je(a,f):d===`dangerouslySetInnerHTML`?Ue(a,f):d===`children`?We(a,f):ee(a,d,f,u)}switch(c){case`input`:C(a,o);break;case`textarea`:Re(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Fe(a,!!o.multiple,o.multiple?[]:``,!1):Fe(a,!!o.multiple,o.defaultValue,!0)):Fe(a,!!o.multiple,m,!1)}a[Li]=o}catch(t){Rl(e,e.return,t)}}break;case 6:if(kc(t,e),jc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Rl(e,e.return,t)}}break;case 3:if(kc(t,e),jc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{bn(t.containerInfo)}catch(t){Rl(e,e.return,t)}break;case 4:kc(t,e),jc(e);break;case 13:kc(t,e),jc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||($c=Ot())),i&4&&Oc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(uc=(u=uc)||d,kc(t,e),uc=u):kc(t,e),jc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Q=e,d=e.child;d!==null;){for(f=Q=d;Q!==null;){switch(p=Q,m=p.child,p.tag){case 0:case 11:case 14:case 15:gc(4,p,p.return);break;case 1:fc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Rl(i,n,e)}}break;case 5:fc(p,p.return);break;case 22:if(p.memoizedState!==null){Fc(f);continue}}m===null?Fc(f):(m.return=p,Q=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=qe(`display`,s))}catch(t){Rl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Rl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:kc(t,e),jc(e),i&4&&Oc(e);break;case 21:break;default:kc(t,e),jc(e)}}function jc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(bc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(We(a,``),i.flags&=-33),Cc(e,xc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Sc(e,xc(e),o);break;default:throw Error(r(161))}}catch(t){Rl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mc(e,t,n){Q=e,Nc(e,t,n)}function Nc(e,t,n){for(var r=(e.mode&1)!=0;Q!==null;){var i=Q,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||lc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||uc;s=lc;var l=uc;if(lc=o,(uc=c)&&!l)for(Q=i;Q!==null;)o=Q,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Ic(i):(c.return=o,Q=c);for(;a!==null;)Q=a,Nc(a,t,n),a=a.sibling;Q=i,lc=s,uc=l}Pc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Q=a):Pc(e,t,n)}}function Pc(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:uc||_c(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!uc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:hs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ao(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ao(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&bn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}uc||t.flags&512&&vc(t)}catch(e){Rl(t,t.return,e)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Fc(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Ic(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{_c(4,t)}catch(e){Rl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Rl(t,i,e)}}var a=t.return;try{vc(t)}catch(e){Rl(t,a,e)}break;case 5:var o=t.return;try{vc(t)}catch(e){Rl(t,o,e)}}}catch(e){Rl(t,t.return,e)}if(t===e){Q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Q=s;break}Q=t.return}}var Lc=Math.ceil,Rc=te.ReactCurrentDispatcher,zc=te.ReactCurrentOwner,Bc=te.ReactCurrentBatchConfig,$=0,Vc=null,Hc=null,Uc=0,Wc=0,Gc=Ki(0),Kc=0,qc=null,Jc=0,Yc=0,Xc=0,Zc=null,Qc=null,$c=0,el=1/0,tl=null,nl=!1,rl=null,il=null,al=!1,ol=null,sl=0,cl=0,ll=null,ul=-1,dl=0;function fl(){return $&6?Ot():ul===-1?ul=Ot():ul}function pl(e){return e.mode&1?$&2&&Uc!==0?Uc&-Uc:Na.transition===null?(e=k,e===0?(e=window.event,e=e===void 0?16:On(e.type),e):e):(dl===0&&(dl=Jt()),dl):1}function ml(e,t,n,i){if(50<cl)throw cl=0,ll=null,Error(r(185));Xt(e,n,i),(!($&2)||e!==Vc)&&(e===Vc&&(!($&2)&&(Yc|=n),Kc===4&&bl(e,Uc)),hl(e,i),n===1&&$===0&&!(t.mode&1)&&(el=Ot()+500,ia&&ca()))}function hl(e,t){var n=e.callbackNode;Kt(e,t);var r=Wt(e,e===Vc?Uc:0);if(r===0)n!==null&&Tt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tt(n),t===1)e.tag===0?sa(xl.bind(null,e)):oa(xl.bind(null,e)),Mi(function(){!($&6)&&ca()}),n=null;else{switch($t(r)){case 1:n=At;break;case 4:n=jt;break;case 16:n=O;break;case 536870912:n=Nt;break;default:n=O}n=Wl(n,gl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function gl(e,t){if(ul=-1,dl=0,$&6)throw Error(r(327));var n=e.callbackNode;if(Il()&&e.callbackNode!==n)return null;var i=Wt(e,e===Vc?Uc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=kl(e,i);else{t=i;var a=$;$|=2;var o=Dl();(Vc!==e||Uc!==t)&&(tl=null,el=Ot()+500,Tl(e,t));do try{jl();break}catch(t){El(e,t)}while(1);Ha(),Rc.current=o,$=a,Hc===null?(Vc=null,Uc=0,t=Kc):t=0}if(t!==0){if(t===2&&(a=qt(e),a!==0&&(i=a,t=_l(e,a))),t===1)throw n=qc,Tl(e,0),bl(e,i),hl(e,Ot()),n;if(t===6)bl(e,i);else{if(a=e.current.alternate,!(i&30)&&!yl(a)&&(t=kl(e,i),t===2&&(o=qt(e),o!==0&&(i=o,t=_l(e,o))),t===1))throw n=qc,Tl(e,0),bl(e,i),hl(e,Ot()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Pl(e,Qc,tl);break;case 3:if(bl(e,i),(i&130023424)===i&&(t=$c+500-Ot(),10<t)){if(Wt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){fl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ki(Pl.bind(null,e,Qc,tl),t);break}Pl(e,Qc,tl);break;case 4:if(bl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Lt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=Ot()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Lc(i/1960))-i,10<i){e.timeoutHandle=ki(Pl.bind(null,e,Qc,tl),i);break}Pl(e,Qc,tl);break;case 5:Pl(e,Qc,tl);break;default:throw Error(r(329))}}}return hl(e,Ot()),e.callbackNode===n?gl.bind(null,e):null}function _l(e,t){var n=Zc;return e.current.memoizedState.isDehydrated&&(Tl(e,t).flags|=256),e=kl(e,t),e!==2&&(t=Qc,Qc=n,t!==null&&vl(t)),e}function vl(e){Qc===null?Qc=e:Qc.push.apply(Qc,e)}function yl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ir(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bl(e,t){for(t&=~Xc,t&=~Yc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Lt(t),r=1<<n;e[n]=-1,t&=~r}}function xl(e){if($&6)throw Error(r(327));Il();var t=Wt(e,0);if(!(t&1))return hl(e,Ot()),null;var n=kl(e,t);if(e.tag!==0&&n===2){var i=qt(e);i!==0&&(t=i,n=_l(e,i))}if(n===1)throw n=qc,Tl(e,0),bl(e,t),hl(e,Ot()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pl(e,Qc,tl),hl(e,Ot()),null}function Sl(e,t){var n=$;$|=1;try{return e(t)}finally{$=n,$===0&&(el=Ot()+500,ia&&ca())}}function Cl(e){ol!==null&&ol.tag===0&&!($&6)&&Il();var t=$;$|=1;var n=Bc.transition,r=k;try{if(Bc.transition=null,k=1,e)return e()}finally{k=r,Bc.transition=n,$=t,!($&6)&&ca()}}function wl(){Wc=Gc.current,H(Gc)}function Tl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ai(n)),Hc!==null)for(n=Hc.return;n!==null;){var r=n;switch(xa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qi();break;case 3:X(),H(Yi),H(Ji),go();break;case 5:po(r);break;case 4:X();break;case 13:H(Z);break;case 19:H(Z);break;case 10:Ua(r.type._context);break;case 22:case 23:wl()}n=n.return}if(Vc=e,Hc=e=Yl(e.current,null),Uc=Wc=t,Kc=0,qc=null,Xc=Yc=Jc=0,Qc=Zc=null,qa!==null){for(t=0;t<qa.length;t++)if(n=qa[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}qa=null}return e}function El(e,t){do{var n=Hc;try{if(Ha(),_o.current=ds,Co){for(var i=bo.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Co=!1}if(yo=0,So=xo=bo=null,wo=!1,To=0,zc.current=null,n===null||n.return===null){Kc=1,qc=t,Hc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Uc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=ks(s);if(m!==null){m.flags&=-257,As(m,s,c,o,t),m.mode&1&&Os(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Os(o,u,t),Ol();break a}l=Error(r(426))}}else if(G&&c.mode&1){var _=ks(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),As(_,s,c,o,t),K(Ss(l,c));break a}}o=l=Ss(l,c),Kc!==4&&(Kc=2),Zc===null?Zc=[o]:Zc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Es(o,l,t);ro(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(il===null||!il.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Ds(o,c,t);ro(o,x);break a}}o=o.return}while(o!==null)}Nl(n)}catch(e){t=e,Hc===n&&n!==null&&(Hc=n=n.return);continue}break}while(1)}function Dl(){var e=Rc.current;return Rc.current=ds,e===null?ds:e}function Ol(){(Kc===0||Kc===3||Kc===2)&&(Kc=4),Vc===null||!(Jc&268435455)&&!(Yc&268435455)||bl(Vc,Uc)}function kl(e,t){var n=$;$|=2;var i=Dl();(Vc!==e||Uc!==t)&&(tl=null,Tl(e,t));do try{Al();break}catch(t){El(e,t)}while(1);if(Ha(),$=n,Rc.current=i,Hc!==null)throw Error(r(261));return Vc=null,Uc=0,Kc}function Al(){for(;Hc!==null;)Ml(Hc)}function jl(){for(;Hc!==null&&!Et();)Ml(Hc)}function Ml(e){var t=Ul(e.alternate,e,Wc);e.memoizedProps=e.pendingProps,t===null?Nl(e):Hc=t,zc.current=null}function Nl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=cc(n,t),n!==null){n.flags&=32767,Hc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Kc=6,Hc=null;return}}else if(n=sc(n,t,Wc),n!==null){Hc=n;return}if(t=t.sibling,t!==null){Hc=t;return}Hc=t=e}while(t!==null);Kc===0&&(Kc=5)}function Pl(e,t,n){var r=k,i=Bc.transition;try{Bc.transition=null,k=1,Fl(e,t,n,r)}finally{Bc.transition=i,k=r}return null}function Fl(e,t,n,i){do Il();while(ol!==null);if($&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Zt(e,o),e===Vc&&(Hc=Vc=null,Uc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||al||(al=!0,Wl(O,function(){return Il(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Bc.transition,Bc.transition=null;var s=k;k=1;var c=$;$|=4,zc.current=null,hc(e,n),Ac(n,e),Ur(Di),Sn=!!Ei,Di=Ei=null,e.current=n,Mc(n,e,a),Dt(),$=c,k=s,Bc.transition=o}else e.current=n;if(al&&(al=!1,ol=e,sl=a),o=e.pendingLanes,o===0&&(il=null),It(n.stateNode,i),hl(e,Ot()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(nl)throw nl=!1,e=rl,rl=null,e;return sl&1&&e.tag!==0&&Il(),o=e.pendingLanes,o&1?e===ll?cl++:(cl=0,ll=e):cl=0,ca(),null}function Il(){if(ol!==null){var e=$t(sl),t=Bc.transition,n=k;try{if(Bc.transition=null,k=16>e?16:e,ol===null)var i=!1;else{if(e=ol,ol=null,sl=0,$&6)throw Error(r(331));var a=$;for($|=4,Q=e.current;Q!==null;){var o=Q,s=o.child;if(Q.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(Q=u;Q!==null;){var d=Q;switch(d.tag){case 0:case 11:case 15:gc(8,d,o)}var f=d.child;if(f!==null)f.return=d,Q=f;else for(;Q!==null;){d=Q;var p=d.sibling,m=d.return;if(yc(d),d===u){Q=null;break}if(p!==null){p.return=m,Q=p;break}Q=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}Q=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Q=s;else b:for(;Q!==null;){if(o=Q,o.flags&2048)switch(o.tag){case 0:case 11:case 15:gc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,Q=v;break b}Q=o.return}}var y=e.current;for(Q=y;Q!==null;){s=Q;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,Q=b;else b:for(s=y;Q!==null;){if(c=Q,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:_c(9,c)}}catch(e){Rl(c,c.return,e)}if(c===s){Q=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,Q=x;break b}Q=c.return}}if($=a,ca(),Ft&&typeof Ft.onPostCommitFiberRoot==`function`)try{Ft.onPostCommitFiberRoot(Pt,e)}catch{}i=!0}return i}finally{k=n,Bc.transition=t}}return!1}function Ll(e,t,n){t=Ss(n,t),t=Es(e,t,1),e=to(e,t,1),t=fl(),e!==null&&(Xt(e,1,t),hl(e,t))}function Rl(e,t,n){if(e.tag===3)Ll(e,e,n);else for(;t!==null;){if(t.tag===3){Ll(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(il===null||!il.has(r))){e=Ss(n,e),e=Ds(t,e,1),t=to(t,e,1),e=fl(),t!==null&&(Xt(t,1,e),hl(t,e));break}}t=t.return}}function zl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fl(),e.pingedLanes|=e.suspendedLanes&n,Vc===e&&(Uc&n)===n&&(Kc===4||Kc===3&&(Uc&130023424)===Uc&&500>Ot()-$c?Tl(e,0):Xc|=n),hl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Ht,Ht<<=1,!(Ht&130023424)&&(Ht=4194304)):t=1);var n=fl();e=Xa(e,t),e!==null&&(Xt(e,t,n),hl(e,n))}function Vl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bl(e,n)}function Hl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Bl(e,n)}var Ul=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Yi.current)Ms=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ms=!1,tc(e,t,n);Ms=!!(e.flags&131072)}else Ms=!1,G&&t.flags&1048576&&ya(t,fa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;$s(e,t),e=t.pendingProps;var a=W(t,Ji.current);Ga(t,n),a=ko(null,t,i,e,a,n);var o=Ao();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Zi(i)?(o=!0,ta(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Qa(t),a.updater=_s,t.stateNode=a,a._reactInternals=t,xs(t,i,e,n),t=Vs(null,t,i,!0,o,n)):(t.tag=0,G&&o&&ba(t),Ns(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch($s(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=hs(i,e),a){case 0:t=zs(null,t,i,e,n);break a;case 1:t=Bs(null,t,i,e,n);break a;case 11:t=Ps(null,t,i,e,n);break a;case 14:t=Fs(null,t,i,hs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),zs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),Bs(e,t,i,a,n);case 3:a:{if(Hs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,$a(e,t),io(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Ss(Error(r(423)),t),t=Us(e,t,i,n,a);break a}else if(i!==a){a=Ss(Error(r(424)),t),t=Us(e,t,i,n,a);break a}else for(Ca=Pi(t.stateNode.containerInfo.firstChild),Sa=t,G=!0,wa=null,n=La(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ma(),i===a){t=ec(e,t,n);break a}Ns(e,t,i,n)}t=t.child}return t;case 5:return fo(t),e===null&&Oa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Oi(i,a)?s=null:o!==null&&Oi(i,o)&&(t.flags|=32),Rs(e,t),Ns(e,t,s,n),t.child;case 6:return e===null&&Oa(t),null;case 13:return Ks(e,t,n);case 4:return uo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ia(t,null,i,n):Ns(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),Ps(e,t,i,a,n);case 7:return Ns(e,t,t.pendingProps,n),t.child;case 8:return Ns(e,t,t.pendingProps.children,n),t.child;case 12:return Ns(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,U(Ra,i._currentValue),i._currentValue=s,o!==null)if(Ir(o.value,s)){if(o.children===a.children&&!Yi.current){t=ec(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=eo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Wa(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Wa(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ns(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Ga(t,n),a=Ka(a),i=i(a),t.flags|=1,Ns(e,t,i,n),t.child;case 14:return i=t.type,a=hs(i,t.pendingProps),a=hs(i.type,a),Fs(e,t,i,a,n);case 15:return Is(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),$s(e,t),t.tag=1,Zi(i)?(e=!0,ta(t)):e=!1,Ga(t,n),ys(t,i,a),xs(t,i,a,n),Vs(null,t,i,!0,e,n);case 19:return Qs(e,t,n);case 22:return Ls(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return wt(e,t)}function Gl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kl(e,t,n,r){return new Gl(e,t,n,r)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jl(e){if(typeof e==`function`)return+!!ql(e);if(e!=null){if(e=e.$$typeof,e===le)return 11;if(e===fe)return 14}return 2}function Yl(e,t){var n=e.alternate;return n===null?(n=Kl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ql(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case ie:return Zl(n.children,a,o,t);case ae:s=8,a|=8;break;case oe:return e=Kl(12,n,t,a|2),e.elementType=oe,e.lanes=o,e;case ue:return e=Kl(13,n,t,a),e.elementType=ue,e.lanes=o,e;case de:return e=Kl(19,n,t,a),e.elementType=de,e.lanes=o,e;case me:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case se:s=10;break a;case ce:s=9;break a;case le:s=11;break a;case fe:s=14;break a;case pe:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Kl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Zl(e,t,n,r){return e=Kl(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Kl(22,e,r,t),e.elementType=me,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=Kl(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Kl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yt(0),this.expirationTimes=Yt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,i,a,o,s,c){return e=new tu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qa(a),e}function ru(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function iu(e){if(!e)return qi;e=e._reactInternals;a:{if(vt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(Zi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(Zi(n))return ea(e,n,t)}return t}function au(e,t,n,r,i,a,o,s,c){return e=nu(n,r,!0,e,i,a,o,s,c),e.context=iu(null),n=e.current,r=fl(),i=pl(n),a=eo(r,i),a.callback=t??null,to(n,a,i),e.current.lanes=i,Xt(e,i,r),hl(e,r),e}function ou(e,t,n,r){var i=t.current,a=fl(),o=pl(i);return n=iu(n),t.context===null?t.context=n:t.pendingContext=n,t=eo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=to(i,t,o),e!==null&&(ml(e,i,o,a),no(e,i,o)),o}function su(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lu(e,t){cu(e,t),(e=e.alternate)&&cu(e,t)}function uu(){return null}var du=typeof reportError==`function`?reportError:function(e){console.error(e)};function fu(e){this._internalRoot=e}pu.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));ou(e,t,null,null)},pu.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cl(function(){ou(null,e,null,null)}),t[B]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=rn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fn.length&&t!==0&&t<fn[n].priority;n++);fn.splice(n,0,e),n===0&&M(e)}};function mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function gu(){}function _u(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=su(o);a.call(e)}}var o=au(t,r,e,0,null,!1,!1,``,gu);return e._reactRootContainer=o,e[B]=o.current,gi(e.nodeType===8?e.parentNode:e),Cl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=su(c);s.call(e)}}var c=nu(e,0,!1,null,null,!1,!1,``,gu);return e._reactRootContainer=c,e[B]=c.current,gi(e.nodeType===8?e.parentNode:e),Cl(function(){ou(t,c,n,r)}),c}function vu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=su(o);s.call(e)}}ou(t,o,e,i)}else o=_u(n,t,e,i,r);return su(o)}en=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ut(t.pendingLanes);n!==0&&(Qt(t,n|1),hl(t,Ot()),!($&6)&&(el=Ot()+500,ca()))}break;case 13:Cl(function(){var t=Xa(e,1);t!==null&&ml(t,e,1,fl())}),lu(e,1)}},tn=function(e){if(e.tag===13){var t=Xa(e,134217728);t!==null&&ml(t,e,134217728,fl()),lu(e,134217728)}},nn=function(e){if(e.tag===13){var t=pl(e),n=Xa(e,t);n!==null&&ml(n,e,t,fl()),lu(e,t)}},rn=function(){return k},an=function(e,t){var n=k;try{return k=e,t()}finally{k=n}},$e=function(e,t,n){switch(t){case`input`:if(C(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Ui(i);if(!a)throw Error(r(90));Oe(i),C(i,a)}}}break;case`textarea`:Re(e,n);break;case`select`:t=n.value,t!=null&&Fe(e,!!n.multiple,t,!1)}},rt=Sl,it=Cl;var yu={usingClientEntryPoint:!1,Events:[Vi,Hi,Ui,tt,nt,Sl]},bu={findFiberByHostInstance:Bi,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},xu={bundleType:bu.bundleType,version:bu.version,rendererPackageName:bu.rendererPackageName,rendererConfig:bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:te.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=St(e),e===null?null:e.stateNode},findFiberByHostInstance:bu.findFiberByHostInstance||uu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{Pt=Su.inject(xu),Ft=Su}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mu(t))throw Error(r(200));return ru(e,t,null,n)},e.createRoot=function(e,t){if(!mu(e))throw Error(r(299));var n=!1,i=``,a=du;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=nu(e,1,!1,null,null,n,!1,i,a),e[B]=t.current,gi(e.nodeType===8?e.parentNode:e),new fu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=St(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Cl(e)},e.hydrate=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!mu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=du;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=au(t,null,e,1,n??null,a,!1,o,s),e[B]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new pu(t)},e.render=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!hu(e))throw Error(r(40));return e._reactRootContainer?(Cl(function(){vu(null,null,e,!1,function(){e._reactRootContainer=null,e[B]=null})}),!0):!1},e.unstable_batchedUpdates=Sl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!hu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return vu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=m();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),g=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),_=o(((e,t)=>{t.exports=g()})),v=o(((e,t)=>{var n=_(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function y(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function b(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function x(e){return this instanceof x?(this.v=e,this):new x(e)}function ee(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof x?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function te(e){var t,n;return t={},r(`next`),r(`throw`,function(e){throw e}),r(`return`),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:x(e[r](t)),done:!1}:i?i(t):t}:i}}function ne(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof b==`function`?b(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}var re=new TextDecoder(`utf-8`),ie=e=>re.decode(e),ae=new TextEncoder,oe=e=>ae.encode(e),[se,ce]=(()=>{let e=()=>{throw Error(`BigInt is not available in this environment`)};function t(){throw e()}return t.asIntN=()=>{throw e()},t.asUintN=()=>{throw e()},typeof BigInt<`u`?[BigInt,!0]:[t,!1]})(),[le,ue]=(()=>{let e=()=>{throw Error(`BigInt64Array is not available in this environment`)};class t{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}}return typeof BigInt64Array<`u`?[BigInt64Array,!0]:[t,!1]})(),[de,fe]=(()=>{let e=()=>{throw Error(`BigUint64Array is not available in this environment`)};class t{static get BYTES_PER_ELEMENT(){return 8}static of(){throw e()}static from(){throw e()}constructor(){throw e()}}return typeof BigUint64Array<`u`?[BigUint64Array,!0]:[t,!1]})(),pe=e=>typeof e==`number`,me=e=>typeof e==`boolean`,he=e=>typeof e==`function`,ge=e=>e!=null&&Object(e)===e,S=e=>ge(e)&&he(e.then),_e=e=>ge(e)&&he(e[Symbol.iterator]),ve=e=>ge(e)&&he(e[Symbol.asyncIterator]),ye=e=>ge(e)&&ge(e.schema),be=e=>ge(e)&&`done`in e&&`value`in e,xe=e=>ge(e)&&he(e.stat)&&pe(e.fd),Se=e=>ge(e)&&Te(e.body),Ce=e=>`_getDOMStream`in e&&`_getNodeStream`in e,we=e=>ge(e)&&he(e.abort)&&he(e.getWriter)&&!Ce(e),Te=e=>ge(e)&&he(e.cancel)&&he(e.getReader)&&!Ce(e),Ee=e=>ge(e)&&he(e.end)&&he(e.write)&&me(e.writable)&&!Ce(e),De=e=>ge(e)&&he(e.read)&&he(e.pipe)&&me(e.readable)&&!Ce(e),Oe=e=>ge(e)&&he(e.clear)&&he(e.bytes)&&he(e.position)&&he(e.setPosition)&&he(e.capacity)&&he(e.getBufferIdentifier)&&he(e.createLong),ke=typeof SharedArrayBuffer<`u`?SharedArrayBuffer:ArrayBuffer;function Ae(e){let t=e[0]?[e[0]]:[],n,r,i,a;for(let o,s,c=0,l=0,u=e.length;++c<u;){if(o=t[l],s=e[c],!o||!s||o.buffer!==s.buffer||s.byteOffset<o.byteOffset){s&&(t[++l]=s);continue}if({byteOffset:n,byteLength:i}=o,{byteOffset:r,byteLength:a}=s,n+i<r||r+a<n){s&&(t[++l]=s);continue}t[l]=new Uint8Array(o.buffer,n,r-n+a)}return t}function je(e,t,n=0,r=t.byteLength){let i=e.byteLength,a=new Uint8Array(e.buffer,e.byteOffset,i),o=new Uint8Array(t.buffer,t.byteOffset,Math.min(r,i));return a.set(o,n),e}function Me(e,t){let n=Ae(e),r=n.reduce((e,t)=>e+t.byteLength,0),i,a,o,s=0,c=-1,l=Math.min(t||1/0,r);for(let e=n.length;++c<e;){if(i=n[c],a=i.subarray(0,Math.min(i.length,l-s)),l<=s+a.length){a.length<i.length?n[c]=i.subarray(a.length):a.length===i.length&&c++,o?je(o,a,s):o=a;break}je(o||=new Uint8Array(l),a,s),s+=a.length}return[o||new Uint8Array,n.slice(c),r-(o?o.byteLength:0)]}function C(e,t){let n=be(t)?t.value:t;return n instanceof e?e===Uint8Array?new e(n.buffer,n.byteOffset,n.byteLength):n:n?(typeof n==`string`&&(n=oe(n)),n instanceof ArrayBuffer||n instanceof ke?new e(n):Oe(n)?C(e,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new e(0):new e(n.buffer,n.byteOffset,n.byteLength/e.BYTES_PER_ELEMENT):e.from(n)):new e(0)}var Ne=e=>C(Int32Array,e),w=e=>C(Uint8Array,e),Pe=e=>(e.next(),e);function*Fe(e,t){let n=function*(e){yield e};return yield*Pe((function*(t){let n=null;do n=t.next(yield C(e,n));while(!n.done)})((typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ke?n(t):_e(t)?t:n(t))[Symbol.iterator]())),new e}var Ie=e=>Fe(Uint8Array,e);function Le(e,t){return ee(this,arguments,function*(){if(S(t))return yield x(yield x(yield*te(ne(Le(e,yield x(t))))));let n=function(e){return ee(this,arguments,function*(){yield yield x(yield x(e))})};return yield x(yield*te(ne(Pe((function(t){return ee(this,arguments,function*(){let n=null;do n=yield x(t.next(yield yield x(C(e,n))));while(!n.done)})})((typeof t==`string`||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ke?n(t):_e(t)?function(e){return ee(this,arguments,function*(){yield x(yield*te(ne(Pe((function*(e){let t=null;do t=e.next(yield t?.value);while(!t.done)})(e[Symbol.iterator]())))))})}(t):ve(t)?t:n(t))[Symbol.asyncIterator]()))))),yield x(new e)})}var Re=e=>Le(Uint8Array,e);function ze(e,t,n){if(e!==0){n=n.slice(0,t+1);for(let r=-1;++r<=t;)n[r]+=e}return n}function Be(e,t){let n=0,r=e.length;if(r!==t.length)return!1;if(r>0)do if(e[n]!==t[n])return!1;while(++n<r);return!0}var Ve={fromIterable(e){return He(Ue(e))},fromAsyncIterable(e){return He(We(e))},fromDOMStream(e){return He(Ge(e))},fromNodeStream(e){return He(Je(e))},toDOMStream(e,t){throw Error(`"toDOMStream" not available in this environment`)},toNodeStream(e,t){throw Error(`"toNodeStream" not available in this environment`)}},He=e=>(e.next(),e);function*Ue(e){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?Me(r,o)[0]:([i,r,s]=Me(r,o),i)}({cmd:a,size:o}=yield null);let l=Ie(e)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?l.next():l.next(o-s),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield c());while(o<s);while(!t)}catch(e){(n=!0)&&typeof l.throw==`function`&&l.throw(e)}finally{n===!1&&typeof l.return==`function`&&l.return(null)}return null}function We(e){return ee(this,arguments,function*(){let t,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?Me(r,o)[0]:([i,r,s]=Me(r,o),i)}({cmd:a,size:o}=yield yield x(null));let l=Re(e)[Symbol.asyncIterator]();try{do if({done:t,value:i}=Number.isNaN(o-s)?yield x(l.next()):yield x(l.next(o-s)),!t&&i.byteLength>0&&(r.push(i),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield x(c()));while(o<s);while(!t)}catch(e){(n=!0)&&typeof l.throw==`function`&&(yield x(l.throw(e)))}finally{n===!1&&typeof l.return==`function`&&(yield x(l.return(new Uint8Array)))}return yield x(null)})}function Ge(e){return ee(this,arguments,function*(){let t=!1,n=!1,r=[],i,a,o,s=0;function c(){return a===`peek`?Me(r,o)[0]:([i,r,s]=Me(r,o),i)}({cmd:a,size:o}=yield yield x(null));let l=new Ke(e);try{do if({done:t,value:i}=Number.isNaN(o-s)?yield x(l.read()):yield x(l.read(o-s)),!t&&i.byteLength>0&&(r.push(w(i)),s+=i.byteLength),t||o<=s)do({cmd:a,size:o}=yield yield x(c()));while(o<s);while(!t)}catch(e){(n=!0)&&(yield x(l.cancel(e)))}finally{n===!1?yield x(l.cancel()):e.locked&&l.releaseLock()}return yield x(null)})}var Ke=class{constructor(e){this.source=e,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch(()=>{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return y(this,void 0,void 0,function*(){let{reader:t,source:n}=this;t&&(yield t.cancel(e).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(e){return y(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array};let t=yield this.reader.read();return!t.done&&(t.value=w(t)),t})}},qe=(e,t)=>{let n=e=>r([t,e]),r;return[t,n,new Promise(i=>(r=i)&&e.once(t,n))]};function Je(e){return ee(this,arguments,function*(){let t=[],n=`error`,r=!1,i=null,a,o,s=0,c=[],l;function u(){return a===`peek`?Me(c,o)[0]:([l,c,s]=Me(c,o),l)}if({cmd:a,size:o}=yield yield x(null),e.isTTY)return yield yield x(new Uint8Array),yield x(null);try{t[0]=qe(e,`end`),t[1]=qe(e,`error`);do{if(t[2]=qe(e,`readable`),[n,i]=yield x(Promise.race(t.map(e=>e[2]))),n===`error`)break;if((r=n===`end`)||(Number.isFinite(o-s)?(l=w(e.read(o-s)),l.byteLength<o-s&&(l=w(e.read()))):l=w(e.read()),l.byteLength>0&&(c.push(l),s+=l.byteLength)),r||o<=s)do({cmd:a,size:o}=yield yield x(u()));while(o<s)}while(!r)}finally{yield x(d(t,n===`error`?i:null))}return yield x(null);function d(t,n){return l=c=null,new Promise((r,i)=>{for(let[n,r]of t)e.off(n,r);try{let t=e.destroy;t&&t.call(e,n),n=void 0}catch(e){n=e||n}finally{n==null?r():i(n)}})}})}var Ye;(function(e){e[e.V1=0]=`V1`,e[e.V2=1]=`V2`,e[e.V3=2]=`V3`,e[e.V4=3]=`V4`,e[e.V5=4]=`V5`})(Ye||={});var Xe;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(Xe||={});var Ze;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(Ze||={});var Qe;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(Qe||={});var T;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(T||={});var $e;(function(e){e[e.YEAR_MONTH=0]=`YEAR_MONTH`,e[e.DAY_TIME=1]=`DAY_TIME`,e[e.MONTH_DAY_NANO=2]=`MONTH_DAY_NANO`})($e||={});var E;(function(e){e[e.NONE=0]=`NONE`,e[e.Schema=1]=`Schema`,e[e.DictionaryBatch=2]=`DictionaryBatch`,e[e.RecordBatch=3]=`RecordBatch`,e[e.Tensor=4]=`Tensor`,e[e.SparseTensor=5]=`SparseTensor`})(E||={});var D;(function(e){e[e.NONE=0]=`NONE`,e[e.Null=1]=`Null`,e[e.Int=2]=`Int`,e[e.Float=3]=`Float`,e[e.Binary=4]=`Binary`,e[e.Utf8=5]=`Utf8`,e[e.Bool=6]=`Bool`,e[e.Decimal=7]=`Decimal`,e[e.Date=8]=`Date`,e[e.Time=9]=`Time`,e[e.Timestamp=10]=`Timestamp`,e[e.Interval=11]=`Interval`,e[e.List=12]=`List`,e[e.Struct=13]=`Struct`,e[e.Union=14]=`Union`,e[e.FixedSizeBinary=15]=`FixedSizeBinary`,e[e.FixedSizeList=16]=`FixedSizeList`,e[e.Map=17]=`Map`,e[e.Dictionary=-1]=`Dictionary`,e[e.Int8=-2]=`Int8`,e[e.Int16=-3]=`Int16`,e[e.Int32=-4]=`Int32`,e[e.Int64=-5]=`Int64`,e[e.Uint8=-6]=`Uint8`,e[e.Uint16=-7]=`Uint16`,e[e.Uint32=-8]=`Uint32`,e[e.Uint64=-9]=`Uint64`,e[e.Float16=-10]=`Float16`,e[e.Float32=-11]=`Float32`,e[e.Float64=-12]=`Float64`,e[e.DateDay=-13]=`DateDay`,e[e.DateMillisecond=-14]=`DateMillisecond`,e[e.TimestampSecond=-15]=`TimestampSecond`,e[e.TimestampMillisecond=-16]=`TimestampMillisecond`,e[e.TimestampMicrosecond=-17]=`TimestampMicrosecond`,e[e.TimestampNanosecond=-18]=`TimestampNanosecond`,e[e.TimeSecond=-19]=`TimeSecond`,e[e.TimeMillisecond=-20]=`TimeMillisecond`,e[e.TimeMicrosecond=-21]=`TimeMicrosecond`,e[e.TimeNanosecond=-22]=`TimeNanosecond`,e[e.DenseUnion=-23]=`DenseUnion`,e[e.SparseUnion=-24]=`SparseUnion`,e[e.IntervalDayTime=-25]=`IntervalDayTime`,e[e.IntervalYearMonth=-26]=`IntervalYearMonth`})(D||={});var et;(function(e){e[e.OFFSET=0]=`OFFSET`,e[e.DATA=1]=`DATA`,e[e.VALIDITY=2]=`VALIDITY`,e[e.TYPE=3]=`TYPE`})(et||={});var tt=void 0;function nt(e){if(e===null)return`null`;if(e===tt)return`undefined`;switch(typeof e){case`number`:return`${e}`;case`bigint`:return`${e}`;case`string`:return`"${e}"`}return typeof e[Symbol.toPrimitive]==`function`?e[Symbol.toPrimitive](`string`):ArrayBuffer.isView(e)?e instanceof le||e instanceof de?`[${[...e].map(e=>nt(e))}]`:`[${e}]`:ArrayBuffer.isView(e)?`[${e}]`:JSON.stringify(e,(e,t)=>typeof t==`bigint`?`${t}`:t)}var rt=Symbol.for(`isArrowBigNum`);function it(e,...t){return t.length===0?Object.setPrototypeOf(C(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}it.prototype[rt]=!0,it.prototype.toJSON=function(){return`"${lt(this)}"`},it.prototype.valueOf=function(){return ct(this)},it.prototype.toString=function(){return lt(this)},it.prototype[Symbol.toPrimitive]=function(e=`default`){switch(e){case`number`:return ct(this);case`string`:return lt(this);case`default`:return ut(this)}return lt(this)};function at(...e){return it.apply(this,e)}function ot(...e){return it.apply(this,e)}function st(...e){return it.apply(this,e)}Object.setPrototypeOf(at.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(ot.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(st.prototype,Object.create(Uint32Array.prototype)),Object.assign(at.prototype,it.prototype,{constructor:at,signed:!0,TypedArray:Int32Array,BigIntArray:le}),Object.assign(ot.prototype,it.prototype,{constructor:ot,signed:!1,TypedArray:Uint32Array,BigIntArray:de}),Object.assign(st.prototype,it.prototype,{constructor:st,signed:!0,TypedArray:Uint32Array,BigIntArray:de});function ct(e){let{buffer:t,byteOffset:n,length:r,signed:i}=e,a=new de(t,n,r),o=i&&a[a.length-1]&BigInt(1)<<BigInt(63),s=BigInt(+!!o),c=BigInt(0);if(o){for(let e of a)s+=~e*(BigInt(1)<<BigInt(32)*c++);s*=BigInt(-1)}else for(let e of a)s+=e*(BigInt(1)<<BigInt(32)*c++);return s}var lt,ut;ce?(ut=(e=>e.byteLength===8?new e.BigIntArray(e.buffer,e.byteOffset,1)[0]:dt(e)),lt=(e=>e.byteLength===8?`${new e.BigIntArray(e.buffer,e.byteOffset,1)[0]}`:dt(e))):(lt=dt,ut=lt);function dt(e){let t=``,n=new Uint32Array(2),r=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),i=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),a=-1,o=r.length-1;do{for(n[0]=r[a=0];a<o;)r[a++]=n[1]=n[0]/10,n[0]=(n[0]-n[1]*10<<16)+r[a];r[a]=n[1]=n[0]/10,n[0]-=n[1]*10,t=`${n[0]}${t}`}while(i[0]||i[1]||i[2]||i[3]);return t??`0`}var ft=class e{static new(e,t){switch(t){case!0:return new at(e);case!1:return new ot(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case le:return new at(e)}return e.byteLength===16?new st(e):new ot(e)}static signed(e){return new at(e)}static unsigned(e){return new ot(e)}static decimal(e){return new st(e)}constructor(t,n){return e.new(t,n)}},pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,O=class e{static isNull(e){return e?.typeId===D.Null}static isInt(e){return e?.typeId===D.Int}static isFloat(e){return e?.typeId===D.Float}static isBinary(e){return e?.typeId===D.Binary}static isUtf8(e){return e?.typeId===D.Utf8}static isBool(e){return e?.typeId===D.Bool}static isDecimal(e){return e?.typeId===D.Decimal}static isDate(e){return e?.typeId===D.Date}static isTime(e){return e?.typeId===D.Time}static isTimestamp(e){return e?.typeId===D.Timestamp}static isInterval(e){return e?.typeId===D.Interval}static isList(e){return e?.typeId===D.List}static isStruct(e){return e?.typeId===D.Struct}static isUnion(e){return e?.typeId===D.Union}static isFixedSizeBinary(e){return e?.typeId===D.FixedSizeBinary}static isFixedSizeList(e){return e?.typeId===D.FixedSizeList}static isMap(e){return e?.typeId===D.Map}static isDictionary(e){return e?.typeId===D.Dictionary}static isDenseUnion(t){return e.isUnion(t)&&t.mode===Xe.Dense}static isSparseUnion(t){return e.isUnion(t)&&t.mode===Xe.Sparse}get typeId(){return D.NONE}};pt=Symbol.toStringTag,O[pt]=(e=>(e.children=null,e.ArrayType=Array,e[Symbol.toStringTag]=`DataType`))(O.prototype);var Mt=class extends O{toString(){return`Null`}get typeId(){return D.Null}};mt=Symbol.toStringTag,Mt[mt]=(e=>e[Symbol.toStringTag]=`Null`)(Mt.prototype);var Nt=class extends O{constructor(e,t){super(),this.isSigned=e,this.bitWidth=t}get typeId(){return D.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?le:de}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?`I`:`Ui`}nt${this.bitWidth}`}};ht=Symbol.toStringTag,Nt[ht]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]=`Int`))(Nt.prototype);var Pt=class extends Nt{constructor(){super(!0,8)}get ArrayType(){return Int8Array}},Ft=class extends Nt{constructor(){super(!0,16)}get ArrayType(){return Int16Array}},It=class extends Nt{constructor(){super(!0,32)}get ArrayType(){return Int32Array}},Lt=class extends Nt{constructor(){super(!0,64)}get ArrayType(){return le}},Rt=class extends Nt{constructor(){super(!1,8)}get ArrayType(){return Uint8Array}},zt=class extends Nt{constructor(){super(!1,16)}get ArrayType(){return Uint16Array}},Bt=class extends Nt{constructor(){super(!1,32)}get ArrayType(){return Uint32Array}},Vt=class extends Nt{constructor(){super(!1,64)}get ArrayType(){return de}};Object.defineProperty(Pt.prototype,"ArrayType",{value:Int8Array}),Object.defineProperty(Ft.prototype,"ArrayType",{value:Int16Array}),Object.defineProperty(It.prototype,"ArrayType",{value:Int32Array}),Object.defineProperty(Lt.prototype,"ArrayType",{value:le}),Object.defineProperty(Rt.prototype,"ArrayType",{value:Uint8Array}),Object.defineProperty(zt.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Bt.prototype,"ArrayType",{value:Uint32Array}),Object.defineProperty(Vt.prototype,"ArrayType",{value:de});var Ht=class extends O{constructor(e){super(),this.precision=e}get typeId(){return D.Float}get ArrayType(){switch(this.precision){case Ze.HALF:return Uint16Array;case Ze.SINGLE:return Float32Array;case Ze.DOUBLE:return Float64Array}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};gt=Symbol.toStringTag,Ht[gt]=(e=>(e.precision=null,e[Symbol.toStringTag]=`Float`))(Ht.prototype);var Ut=class extends Ht{constructor(){super(Ze.HALF)}},Wt=class extends Ht{constructor(){super(Ze.SINGLE)}},Gt=class extends Ht{constructor(){super(Ze.DOUBLE)}};Object.defineProperty(Ut.prototype,"ArrayType",{value:Uint16Array}),Object.defineProperty(Wt.prototype,"ArrayType",{value:Float32Array}),Object.defineProperty(Gt.prototype,"ArrayType",{value:Float64Array});var Kt=class extends O{constructor(){super()}get typeId(){return D.Binary}toString(){return`Binary`}};_t=Symbol.toStringTag,Kt[_t]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Binary`))(Kt.prototype);var qt=class extends O{constructor(){super()}get typeId(){return D.Utf8}toString(){return`Utf8`}};vt=Symbol.toStringTag,qt[vt]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Utf8`))(qt.prototype);var Jt=class extends O{constructor(){super()}get typeId(){return D.Bool}toString(){return`Bool`}};yt=Symbol.toStringTag,Jt[yt]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`Bool`))(Jt.prototype);var Yt=class extends O{constructor(e,t,n=128){super(),this.scale=e,this.precision=t,this.bitWidth=n}get typeId(){return D.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?`+`:``}${this.scale}]`}};bt=Symbol.toStringTag,Yt[bt]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]=`Decimal`))(Yt.prototype);var Xt=class extends O{constructor(e){super(),this.unit=e}get typeId(){return D.Date}toString(){return`Date${(this.unit+1)*32}<${Qe[this.unit]}>`}};xt=Symbol.toStringTag,Xt[xt]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Date`))(Xt.prototype);var Zt=class extends O{constructor(e,t){super(),this.unit=e,this.bitWidth=t}get typeId(){return D.Time}toString(){return`Time${this.bitWidth}<${T[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return le}throw Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};St=Symbol.toStringTag,Zt[St]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]=`Time`))(Zt.prototype);var Qt=class extends O{constructor(e,t){super(),this.unit=e,this.timezone=t}get typeId(){return D.Timestamp}toString(){return`Timestamp<${T[this.unit]}${this.timezone?`, ${this.timezone}`:``}>`}};Ct=Symbol.toStringTag,Qt[Ct]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Timestamp`))(Qt.prototype);var k=class extends O{constructor(e){super(),this.unit=e}get typeId(){return D.Interval}toString(){return`Interval<${$e[this.unit]}>`}};wt=Symbol.toStringTag,k[wt]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]=`Interval`))(k.prototype);var $t=class extends O{constructor(e){super(),this.children=[e]}get typeId(){return D.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};Tt=Symbol.toStringTag,$t[Tt]=(e=>(e.children=null,e[Symbol.toStringTag]=`List`))($t.prototype);var en=class extends O{constructor(e){super(),this.children=e}get typeId(){return D.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};Et=Symbol.toStringTag,en[Et]=(e=>(e.children=null,e[Symbol.toStringTag]=`Struct`))(en.prototype);var tn=class extends O{constructor(e,t,n){super(),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((e,t,n)=>(e[t]=n)&&e||e,Object.create(null))}get typeId(){return D.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(` | `)}>`}};Dt=Symbol.toStringTag,tn[Dt]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]=`Union`))(tn.prototype);var nn=class extends O{constructor(e){super(),this.byteWidth=e}get typeId(){return D.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Ot=Symbol.toStringTag,nn[Ot]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]=`FixedSizeBinary`))(nn.prototype);var rn=class extends O{constructor(e,t){super(),this.listSize=e,this.children=[t]}get typeId(){return D.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};kt=Symbol.toStringTag,rn[kt]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]=`FixedSizeList`))(rn.prototype);var an=class extends O{constructor(e,t=!1){super(),this.children=[e],this.keysSorted=t}get typeId(){return D.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(`, `)}}>`}};At=Symbol.toStringTag,an[At]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]=`Map_`))(an.prototype);var on=(e=>()=>++e)(-1),sn=class extends O{constructor(e,t,n,r){super(),this.indices=t,this.dictionary=e,this.isOrdered=r||!1,this.id=n==null?on():typeof n==`number`?n:n.low}get typeId(){return D.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};jt=Symbol.toStringTag,sn[jt]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]=`Dictionary`))(sn.prototype);function cn(e){let t=e;switch(e.typeId){case D.Decimal:return e.bitWidth/32;case D.Timestamp:return 2;case D.Date:return 1+t.unit;case D.Interval:return 1+t.unit;case D.FixedSizeList:return t.listSize;case D.FixedSizeBinary:return t.byteWidth;default:return 1}}var A=class{visitMany(e,...t){return e.map((e,n)=>this.visit(e,...t.map(e=>e[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return ln(this,e,t)}getVisitFnByTypeId(e,t=!0){return un(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function ln(e,t,n=!0){return typeof t==`number`?un(e,t,n):typeof t==`string`&&t in D?un(e,D[t],n):t&&t instanceof O?un(e,dn(t),n):t?.type&&t.type instanceof O?un(e,dn(t.type),n):un(e,D.NONE,n)}function un(e,t,n=!0){let r=null;switch(t){case D.Null:r=e.visitNull;break;case D.Bool:r=e.visitBool;break;case D.Int:r=e.visitInt;break;case D.Int8:r=e.visitInt8||e.visitInt;break;case D.Int16:r=e.visitInt16||e.visitInt;break;case D.Int32:r=e.visitInt32||e.visitInt;break;case D.Int64:r=e.visitInt64||e.visitInt;break;case D.Uint8:r=e.visitUint8||e.visitInt;break;case D.Uint16:r=e.visitUint16||e.visitInt;break;case D.Uint32:r=e.visitUint32||e.visitInt;break;case D.Uint64:r=e.visitUint64||e.visitInt;break;case D.Float:r=e.visitFloat;break;case D.Float16:r=e.visitFloat16||e.visitFloat;break;case D.Float32:r=e.visitFloat32||e.visitFloat;break;case D.Float64:r=e.visitFloat64||e.visitFloat;break;case D.Utf8:r=e.visitUtf8;break;case D.Binary:r=e.visitBinary;break;case D.FixedSizeBinary:r=e.visitFixedSizeBinary;break;case D.Date:r=e.visitDate;break;case D.DateDay:r=e.visitDateDay||e.visitDate;break;case D.DateMillisecond:r=e.visitDateMillisecond||e.visitDate;break;case D.Timestamp:r=e.visitTimestamp;break;case D.TimestampSecond:r=e.visitTimestampSecond||e.visitTimestamp;break;case D.TimestampMillisecond:r=e.visitTimestampMillisecond||e.visitTimestamp;break;case D.TimestampMicrosecond:r=e.visitTimestampMicrosecond||e.visitTimestamp;break;case D.TimestampNanosecond:r=e.visitTimestampNanosecond||e.visitTimestamp;break;case D.Time:r=e.visitTime;break;case D.TimeSecond:r=e.visitTimeSecond||e.visitTime;break;case D.TimeMillisecond:r=e.visitTimeMillisecond||e.visitTime;break;case D.TimeMicrosecond:r=e.visitTimeMicrosecond||e.visitTime;break;case D.TimeNanosecond:r=e.visitTimeNanosecond||e.visitTime;break;case D.Decimal:r=e.visitDecimal;break;case D.List:r=e.visitList;break;case D.Struct:r=e.visitStruct;break;case D.Union:r=e.visitUnion;break;case D.DenseUnion:r=e.visitDenseUnion||e.visitUnion;break;case D.SparseUnion:r=e.visitSparseUnion||e.visitUnion;break;case D.Dictionary:r=e.visitDictionary;break;case D.Interval:r=e.visitInterval;break;case D.IntervalDayTime:r=e.visitIntervalDayTime||e.visitInterval;break;case D.IntervalYearMonth:r=e.visitIntervalYearMonth||e.visitInterval;break;case D.FixedSizeList:r=e.visitFixedSizeList;break;case D.Map:r=e.visitMap;break}if(typeof r==`function`)return r;if(!n)return()=>null;throw Error(`Unrecognized type '${D[t]}'`)}function dn(e){switch(e.typeId){case D.Null:return D.Null;case D.Int:{let{bitWidth:t,isSigned:n}=e;switch(t){case 8:return n?D.Int8:D.Uint8;case 16:return n?D.Int16:D.Uint16;case 32:return n?D.Int32:D.Uint32;case 64:return n?D.Int64:D.Uint64}return D.Int}case D.Float:switch(e.precision){case Ze.HALF:return D.Float16;case Ze.SINGLE:return D.Float32;case Ze.DOUBLE:return D.Float64}return D.Float;case D.Binary:return D.Binary;case D.Utf8:return D.Utf8;case D.Bool:return D.Bool;case D.Decimal:return D.Decimal;case D.Time:switch(e.unit){case T.SECOND:return D.TimeSecond;case T.MILLISECOND:return D.TimeMillisecond;case T.MICROSECOND:return D.TimeMicrosecond;case T.NANOSECOND:return D.TimeNanosecond}return D.Time;case D.Timestamp:switch(e.unit){case T.SECOND:return D.TimestampSecond;case T.MILLISECOND:return D.TimestampMillisecond;case T.MICROSECOND:return D.TimestampMicrosecond;case T.NANOSECOND:return D.TimestampNanosecond}return D.Timestamp;case D.Date:switch(e.unit){case Qe.DAY:return D.DateDay;case Qe.MILLISECOND:return D.DateMillisecond}return D.Date;case D.Interval:switch(e.unit){case $e.DAY_TIME:return D.IntervalDayTime;case $e.YEAR_MONTH:return D.IntervalYearMonth}return D.Interval;case D.Map:return D.Map;case D.List:return D.List;case D.Struct:return D.Struct;case D.Union:switch(e.mode){case Xe.Dense:return D.DenseUnion;case Xe.Sparse:return D.SparseUnion}return D.Union;case D.FixedSizeBinary:return D.FixedSizeBinary;case D.FixedSizeList:return D.FixedSizeList;case D.Dictionary:return D.Dictionary}throw Error(`Unrecognized type '${D[e.typeId]}'`)}A.prototype.visitInt8=null,A.prototype.visitInt16=null,A.prototype.visitInt32=null,A.prototype.visitInt64=null,A.prototype.visitUint8=null,A.prototype.visitUint16=null,A.prototype.visitUint32=null,A.prototype.visitUint64=null,A.prototype.visitFloat16=null,A.prototype.visitFloat32=null,A.prototype.visitFloat64=null,A.prototype.visitDateDay=null,A.prototype.visitDateMillisecond=null,A.prototype.visitTimestampSecond=null,A.prototype.visitTimestampMillisecond=null,A.prototype.visitTimestampMicrosecond=null,A.prototype.visitTimestampNanosecond=null,A.prototype.visitTimeSecond=null,A.prototype.visitTimeMillisecond=null,A.prototype.visitTimeMicrosecond=null,A.prototype.visitTimeNanosecond=null,A.prototype.visitDenseUnion=null,A.prototype.visitSparseUnion=null,A.prototype.visitIntervalDayTime=null,A.prototype.visitIntervalYearMonth=null;var fn=new Float64Array(1),pn=new Uint32Array(fn.buffer);function mn(e){let t=(e&31744)>>10,n=(e&1023)/1024,r=(-1)**((e&32768)>>15);switch(t){case 31:return r*(n?NaN:1/0);case 0:return r*(n?6103515625e-14*n:0)}return r*2**(t-15)*(1+n)}function hn(e){if(e!==e)return 32256;fn[0]=e;let t=(pn[1]&2147483648)>>16&65535,n=pn[1]&2146435072,r=0;return n>=1089470464?pn[0]>0?n=31744:(n=(n&2080374784)>>16,r=(pn[1]&1048575)>>10):n<=1056964608?(r=1048576+(pn[1]&1048575),r=1048576+(r<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,r=(pn[1]&1048575)+512>>10),t|n|r&65535}var j=class extends A{};function M(e){return(t,n,r)=>{if(t.setValid(n,r!=null))return e(t,n,r)}}var gn=(e,t,n)=>{e[t]=Math.trunc(n/864e5)},_n=(e,t,n)=>{e[t]=Math.trunc(n%4294967296),e[t+1]=Math.trunc(n/4294967296)},vn=(e,t,n)=>{e[t]=Math.trunc(n*1e3%4294967296),e[t+1]=Math.trunc(n*1e3/4294967296)},yn=(e,t,n)=>{e[t]=Math.trunc(n*1e6%4294967296),e[t+1]=Math.trunc(n*1e6/4294967296)},bn=(e,t,n,r)=>{if(n+1<t.length){let{[n]:i,[n+1]:a}=t;e.set(r.subarray(0,a-i),i)}},xn=({offset:e,values:t},n,r)=>{let i=e+n;r?t[i>>3]|=1<<i%8:t[i>>3]&=~(1<<i%8)},Sn=({values:e},t,n)=>{e[t]=n},Cn=({values:e},t,n)=>{e[t]=n},wn=({values:e},t,n)=>{e[t]=hn(n)},Tn=(e,t,n)=>{switch(e.type.precision){case Ze.HALF:return wn(e,t,n);case Ze.SINGLE:case Ze.DOUBLE:return Cn(e,t,n)}},En=({values:e},t,n)=>{gn(e,t,n.valueOf())},Dn=({values:e},t,n)=>{_n(e,t*2,n.valueOf())},On=({stride:e,values:t},n,r)=>{t.set(r.subarray(0,e),e*n)},kn=({values:e,valueOffsets:t},n,r)=>bn(e,t,n,r),An=({values:e,valueOffsets:t},n,r)=>{bn(e,t,n,oe(r))},jn=(e,t,n)=>{e.type.unit===Qe.DAY?En(e,t,n):Dn(e,t,n)},Mn=({values:e},t,n)=>_n(e,t*2,n/1e3),Nn=({values:e},t,n)=>_n(e,t*2,n),Pn=({values:e},t,n)=>vn(e,t*2,n),Fn=({values:e},t,n)=>yn(e,t*2,n),In=(e,t,n)=>{switch(e.type.unit){case T.SECOND:return Mn(e,t,n);case T.MILLISECOND:return Nn(e,t,n);case T.MICROSECOND:return Pn(e,t,n);case T.NANOSECOND:return Fn(e,t,n)}},Ln=({values:e},t,n)=>{e[t]=n},Rn=({values:e},t,n)=>{e[t]=n},zn=({values:e},t,n)=>{e[t]=n},Bn=({values:e},t,n)=>{e[t]=n},Vn=(e,t,n)=>{switch(e.type.unit){case T.SECOND:return Ln(e,t,n);case T.MILLISECOND:return Rn(e,t,n);case T.MICROSECOND:return zn(e,t,n);case T.NANOSECOND:return Bn(e,t,n)}},Hn=({values:e,stride:t},n,r)=>{e.set(r.subarray(0,t),t*n)},Un=(e,t,n)=>{let r=e.children[0],i=e.valueOffsets,a=ir.getVisitFn(r);if(Array.isArray(n))for(let e=-1,o=i[t],s=i[t+1];o<s;)a(r,o++,n[++e]);else for(let e=-1,o=i[t],s=i[t+1];o<s;)a(r,o++,n.get(++e))},Wn=(e,t,n)=>{let r=e.children[0],{valueOffsets:i}=e,a=ir.getVisitFn(r),{[t]:o,[t+1]:s}=i,c=n instanceof Map?n.entries():Object.entries(n);for(let e of c)if(a(r,o,e),++o>=s)break},Gn=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[a]),Kn=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(a)),qn=(e,t)=>(n,r,i,a)=>r&&n(r,e,t.get(i.name)),Jn=(e,t)=>(n,r,i,a)=>r&&n(r,e,t[i.name]),Yn=(e,t,n)=>{let r=e.type.children.map(e=>ir.getVisitFn(e.type)),i=n instanceof Map?qn(t,n):n instanceof W?Kn(t,n):Array.isArray(n)?Gn(t,n):Jn(t,n);e.type.children.forEach((t,n)=>i(r[n],e.children[n],t,n))},Xn=(e,t,n)=>{e.type.mode===Xe.Dense?Zn(e,t,n):Qn(e,t,n)},Zn=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];ir.visit(i,e.valueOffsets[t],n)},Qn=(e,t,n)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],i=e.children[r];ir.visit(i,t,n)},$n=(e,t,n)=>{var r;(r=e.dictionary)==null||r.set(e.values[t],n)},er=(e,t,n)=>{e.type.unit===$e.DAY_TIME?tr(e,t,n):nr(e,t,n)},tr=({values:e},t,n)=>{e.set(n.subarray(0,2),2*t)},nr=({values:e},t,n)=>{e[t]=n[0]*12+n[1]%12},rr=(e,t,n)=>{let{stride:r}=e,i=e.children[0],a=ir.getVisitFn(i);if(Array.isArray(n))for(let e=-1,o=t*r;++e<r;)a(i,o+e,n[e]);else for(let e=-1,o=t*r;++e<r;)a(i,o+e,n.get(e))};j.prototype.visitBool=M(xn),j.prototype.visitInt=M(Sn),j.prototype.visitInt8=M(Sn),j.prototype.visitInt16=M(Sn),j.prototype.visitInt32=M(Sn),j.prototype.visitInt64=M(Sn),j.prototype.visitUint8=M(Sn),j.prototype.visitUint16=M(Sn),j.prototype.visitUint32=M(Sn),j.prototype.visitUint64=M(Sn),j.prototype.visitFloat=M(Tn),j.prototype.visitFloat16=M(wn),j.prototype.visitFloat32=M(Cn),j.prototype.visitFloat64=M(Cn),j.prototype.visitUtf8=M(An),j.prototype.visitBinary=M(kn),j.prototype.visitFixedSizeBinary=M(On),j.prototype.visitDate=M(jn),j.prototype.visitDateDay=M(En),j.prototype.visitDateMillisecond=M(Dn),j.prototype.visitTimestamp=M(In),j.prototype.visitTimestampSecond=M(Mn),j.prototype.visitTimestampMillisecond=M(Nn),j.prototype.visitTimestampMicrosecond=M(Pn),j.prototype.visitTimestampNanosecond=M(Fn),j.prototype.visitTime=M(Vn),j.prototype.visitTimeSecond=M(Ln),j.prototype.visitTimeMillisecond=M(Rn),j.prototype.visitTimeMicrosecond=M(zn),j.prototype.visitTimeNanosecond=M(Bn),j.prototype.visitDecimal=M(Hn),j.prototype.visitList=M(Un),j.prototype.visitStruct=M(Yn),j.prototype.visitUnion=M(Xn),j.prototype.visitDenseUnion=M(Zn),j.prototype.visitSparseUnion=M(Qn),j.prototype.visitDictionary=M($n),j.prototype.visitInterval=M(er),j.prototype.visitIntervalDayTime=M(tr),j.prototype.visitIntervalYearMonth=M(nr),j.prototype.visitFixedSizeList=M(rr),j.prototype.visitMap=M(Wn);var ir=new j,ar=Symbol.for(`parent`),or=Symbol.for(`rowIndex`),sr=class{constructor(e,t){return this[ar]=e,this[or]=t,new Proxy(this,new lr)}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[or],t=this[ar],n=t.type.children,r={};for(let i=-1,a=n.length;++i<a;)r[n[i].name]=$r.visit(t.children[i],e);return r}toString(){return`{${[...this].map(([e,t])=>`${nt(e)}: ${nt(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}[Symbol.iterator](){return new cr(this[ar],this[or])}},cr=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return e<this.numChildren?(this.childIndex=e+1,{done:!1,value:[this.childFields[e].name,$r.visit(this.children[e],this.rowIndex)]}):{done:!0,value:null}}};Object.defineProperties(sr.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[ar]:{writable:!0,enumerable:!1,configurable:!1,value:null},[or]:{writable:!0,enumerable:!1,configurable:!1,value:-1}});var lr=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[ar].type.children.map(e=>e.name)}has(e,t){return e[ar].type.children.findIndex(e=>e.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[ar].type.children.findIndex(e=>e.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[ar].type.children.findIndex(e=>e.name===t);if(n!==-1){let r=$r.visit(e[ar].children[n],e[or]);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[ar].type.children.findIndex(e=>e.name===t);return r===-1?Reflect.has(e,t)||typeof t==`symbol`?Reflect.set(e,t,n):!1:(ir.visit(e[ar].children[r],e[or],n),Reflect.set(e,t,n))}},N=class extends A{};function P(e){return(t,n)=>t.getValid(n)?e(t,n):null}var ur=(e,t)=>864e5*e[t],dr=(e,t)=>4294967296*e[t+1]+(e[t]>>>0),fr=(e,t)=>4294967296*(e[t+1]/1e3)+(e[t]>>>0)/1e3,pr=(e,t)=>4294967296*(e[t+1]/1e6)+(e[t]>>>0)/1e6,mr=e=>new Date(e),hr=(e,t)=>mr(ur(e,t)),gr=(e,t)=>mr(dr(e,t)),_r=(e,t)=>null,vr=(e,t,n)=>{if(n+1>=t.length)return null;let r=t[n],i=t[n+1];return e.subarray(r,i)},yr=({offset:e,values:t},n)=>{let r=e+n;return(t[r>>3]&1<<r%8)!=0},br=({values:e},t)=>hr(e,t),xr=({values:e},t)=>gr(e,t*2),Sr=({stride:e,values:t},n)=>t[e*n],Cr=({stride:e,values:t},n)=>mn(t[e*n]),wr=({values:e},t)=>e[t],Tr=({stride:e,values:t},n)=>t.subarray(e*n,e*(n+1)),Er=({values:e,valueOffsets:t},n)=>vr(e,t,n),Dr=({values:e,valueOffsets:t},n)=>{let r=vr(e,t,n);return r===null?null:ie(r)},Or=({values:e},t)=>e[t],kr=({type:e,values:t},n)=>e.precision===Ze.HALF?mn(t[n]):t[n],Ar=(e,t)=>e.type.unit===Qe.DAY?br(e,t):xr(e,t),jr=({values:e},t)=>1e3*dr(e,t*2),Mr=({values:e},t)=>dr(e,t*2),Nr=({values:e},t)=>fr(e,t*2),Pr=({values:e},t)=>pr(e,t*2),Fr=(e,t)=>{switch(e.type.unit){case T.SECOND:return jr(e,t);case T.MILLISECOND:return Mr(e,t);case T.MICROSECOND:return Nr(e,t);case T.NANOSECOND:return Pr(e,t)}},Ir=({values:e},t)=>e[t],Lr=({values:e},t)=>e[t],Rr=({values:e},t)=>e[t],zr=({values:e},t)=>e[t],Br=(e,t)=>{switch(e.type.unit){case T.SECOND:return Ir(e,t);case T.MILLISECOND:return Lr(e,t);case T.MICROSECOND:return Rr(e,t);case T.NANOSECOND:return zr(e,t)}},Vr=({values:e,stride:t},n)=>ft.decimal(e.subarray(t*n,t*(n+1))),Hr=(e,t)=>{let{valueOffsets:n,stride:r,children:i}=e,{[t*r]:a,[t*r+1]:o}=n;return new W([i[0].slice(a,o-a)])},Ur=(e,t)=>{let{valueOffsets:n,children:r}=e,{[t]:i,[t+1]:a}=n,o=r[0];return new ni(o.slice(i,a-i))},Wr=(e,t)=>new sr(e,t),Gr=(e,t)=>e.type.mode===Xe.Dense?Kr(e,t):qr(e,t),Kr=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return $r.visit(r,e.valueOffsets[t])},qr=(e,t)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],r=e.children[n];return $r.visit(r,t)},Jr=(e,t)=>e.dictionary?.get(e.values[t]),Yr=(e,t)=>e.type.unit===$e.DAY_TIME?Xr(e,t):Zr(e,t),Xr=({values:e},t)=>e.subarray(2*t,2*(t+1)),Zr=({values:e},t)=>{let n=e[t],r=new Int32Array(2);return r[0]=Math.trunc(n/12),r[1]=Math.trunc(n%12),r},Qr=(e,t)=>{let{stride:n,children:r}=e;return new W([r[0].slice(t*n,n)])};N.prototype.visitNull=P(_r),N.prototype.visitBool=P(yr),N.prototype.visitInt=P(Or),N.prototype.visitInt8=P(Sr),N.prototype.visitInt16=P(Sr),N.prototype.visitInt32=P(Sr),N.prototype.visitInt64=P(wr),N.prototype.visitUint8=P(Sr),N.prototype.visitUint16=P(Sr),N.prototype.visitUint32=P(Sr),N.prototype.visitUint64=P(wr),N.prototype.visitFloat=P(kr),N.prototype.visitFloat16=P(Cr),N.prototype.visitFloat32=P(Sr),N.prototype.visitFloat64=P(Sr),N.prototype.visitUtf8=P(Dr),N.prototype.visitBinary=P(Er),N.prototype.visitFixedSizeBinary=P(Tr),N.prototype.visitDate=P(Ar),N.prototype.visitDateDay=P(br),N.prototype.visitDateMillisecond=P(xr),N.prototype.visitTimestamp=P(Fr),N.prototype.visitTimestampSecond=P(jr),N.prototype.visitTimestampMillisecond=P(Mr),N.prototype.visitTimestampMicrosecond=P(Nr),N.prototype.visitTimestampNanosecond=P(Pr),N.prototype.visitTime=P(Br),N.prototype.visitTimeSecond=P(Ir),N.prototype.visitTimeMillisecond=P(Lr),N.prototype.visitTimeMicrosecond=P(Rr),N.prototype.visitTimeNanosecond=P(zr),N.prototype.visitDecimal=P(Vr),N.prototype.visitList=P(Hr),N.prototype.visitStruct=P(Wr),N.prototype.visitUnion=P(Gr),N.prototype.visitDenseUnion=P(Kr),N.prototype.visitSparseUnion=P(qr),N.prototype.visitDictionary=P(Jr),N.prototype.visitInterval=P(Yr),N.prototype.visitIntervalDayTime=P(Xr),N.prototype.visitIntervalYearMonth=P(Zr),N.prototype.visitFixedSizeList=P(Qr),N.prototype.visitMap=P(Ur);var $r=new N,ei=Symbol.for(`keys`),ti=Symbol.for(`vals`),ni=class{constructor(e){return this[ei]=new W([e.children[0]]).memoize(),this[ti]=e.children[1],new Proxy(this,new ii)}[Symbol.iterator](){return new ri(this[ei],this[ti])}get size(){return this[ei].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[ei],t=this[ti],n={};for(let r=-1,i=e.length;++r<i;)n[e.get(r)]=$r.visit(t,r);return n}toString(){return`{${[...this].map(([e,t])=>`${nt(e)}: ${nt(t)}`).join(`, `)}}`}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.toString()}},ri=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),$r.visit(this.vals,e)]})}},ii=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[ei].toArray().map(String)}has(e,t){return e[ei].includes(t)}getOwnPropertyDescriptor(e,t){if(e[ei].indexOf(t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let n=e[ei].indexOf(t);if(n!==-1){let r=$r.visit(Reflect.get(e,ti),n);return Reflect.set(e,t,r),r}}set(e,t,n){let r=e[ei].indexOf(t);return r===-1?Reflect.has(e,t)?Reflect.set(e,t,n):!1:(ir.visit(Reflect.get(e,ti),r,n),Reflect.set(e,t,n))}};Object.defineProperties(ni.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:`Row`},[ei]:{writable:!0,enumerable:!1,configurable:!1,value:null},[ti]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var ai;function oi(e,t,n,r){let{length:i=0}=e,a=typeof t==`number`?t:0,o=typeof n==`number`?n:i;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),o<a&&(ai=a,a=o,o=ai),o>i&&(o=i),r?r(e,a,o):[a,o]}var si=e=>e!==e;function ci(e){if(typeof e!=`object`||!e)return si(e)?si:t=>t===e;if(e instanceof Date){let t=e.valueOf();return e=>e instanceof Date?e.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?Be(e,t):!1:e instanceof Map?ui(e):Array.isArray(e)?li(e):e instanceof W?di(e):fi(e,!0)}function li(e){let t=[];for(let n=-1,r=e.length;++n<r;)t[n]=ci(e[n]);return pi(t)}function ui(e){let t=-1,n=[];for(let r of e.values())n[++t]=ci(r);return pi(n)}function di(e){let t=[];for(let n=-1,r=e.length;++n<r;)t[n]=ci(e.get(n));return pi(t)}function fi(e,t=!1){let n=Object.keys(e);if(!t&&n.length===0)return()=>!1;let r=[];for(let t=-1,i=n.length;++t<i;)r[t]=ci(e[n[t]]);return pi(r,n)}function pi(e,t){return n=>{if(!n||typeof n!=`object`)return!1;switch(n.constructor){case Array:return F(e,n);case Map:return hi(e,n,n.keys());case ni:case sr:case Object:case void 0:return hi(e,n,t||Object.keys(n))}return n instanceof W?mi(e,n):!1}}function F(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r<n;)if(!e[r](t[r]))return!1;return!0}function mi(e,t){let n=e.length;if(t.length!==n)return!1;for(let r=-1;++r<n;)if(!e[r](t.get(r)))return!1;return!0}function hi(e,t,n){let r=n[Symbol.iterator](),i=t instanceof Map?t.keys():Object.keys(t)[Symbol.iterator](),a=t instanceof Map?t.values():Object.values(t)[Symbol.iterator](),o=0,s=e.length,c=a.next(),l=r.next(),u=i.next();for(;o<s&&!l.done&&!u.done&&!c.done&&!(l.value!==u.value||!e[o](c.value));++o,l=r.next(),u=i.next(),c=a.next());return o===s&&l.done&&u.done&&c.done?!0:(r.return&&r.return(),i.return&&i.return(),a.return&&a.return(),!1)}function gi(e,t,n,r){return(n&1<<r)!=0}function _i(e,t,n,r){return(n&1<<r)>>r}function vi(e,t,n){let r=n.byteLength+7&-8;if(e>0||n.byteLength<r){let i=new Uint8Array(r);return i.set(e%8==0?n.subarray(e>>3):yi(new bi(n,e,t,null,gi)).subarray(0,r)),i}return n}function yi(e){let t=[],n=0,r=0,i=0;for(let a of e)a&&(i|=1<<r),++r===8&&(t[n++]=i,i=r=0);(n===0||r>0)&&(t[n++]=i);let a=new Uint8Array(t.length+7&-8);return a.set(t),a}var bi=class{constructor(e,t,n,r,i){this.bytes=e,this.length=n,this.context=r,this.get=i,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};function xi(e,t,n){if(n-t<=0)return 0;if(n-t<8){let r=0;for(let i of new bi(e,t,n-t,e,_i))r+=i;return r}let r=n>>3<<3,i=t+(t%8==0?0:8-t%8);return xi(e,t,i)+xi(e,r,n)+Si(e,i>>3,r-i>>3)}function Si(e,t,n){let r=0,i=Math.trunc(t),a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=n===void 0?e.byteLength:i+n;for(;o-i>=4;)r+=Ci(a.getUint32(i)),i+=4;for(;o-i>=2;)r+=Ci(a.getUint16(i)),i+=2;for(;o-i>=1;)r+=Ci(a.getUint8(i)),i+=1;return r}function Ci(e){let t=Math.trunc(e);return t-=t>>>1&1431655765,t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}var I=class e{constructor(t,n,r,i,a,o=[],s){this.type=t,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(n||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let c;a instanceof e?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=cn(t),a&&((c=a[0])&&(this.valueOffsets=c),(c=a[1])&&(this.values=c),(c=a[2])&&(this.nullBitmap=c),(c=a[3])&&(this.typeIds=c))),this.nullable=this._nullCount!==0&&this.nullBitmap&&this.nullBitmap.byteLength>0}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0,{valueOffsets:t,values:n,nullBitmap:r,typeIds:i}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),r&&(e+=r.byteLength),i&&(e+=i.byteLength),this.children.reduce((e,t)=>e+t.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-xi(t,this.offset,this.offset+this.length)),e}getValid(e){if(this.nullable&&this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!=0}return!0}setValid(e,t){if(!this.nullable)return t;if(!this.nullBitmap||this.nullBitmap.byteLength<=e>>3){let{nullBitmap:e}=this._changeLengthAndBackfillNullBitmap(this.length);Object.assign(this,{nullBitmap:e,_nullCount:0})}let{nullBitmap:n,offset:r}=this,i=r+e>>3,a=(r+e)%8,o=n[i]>>a&1;return t?o===0&&(n[i]|=1<<a,this._nullCount=this.nullCount+1):o===1&&(n[i]&=~(1<<a),this._nullCount=this.nullCount-1),t}clone(t=this.type,n=this.offset,r=this.length,i=this._nullCount,a=this,o=this.children){return new e(t,n,r,i,a,o,this.dictionary)}slice(e,t){let{stride:n,typeId:r,children:i}=this,a=(this._nullCount===0)-1,o=r===16?n:1,s=this._sliceBuffers(e,t,n,r);return this.clone(this.type,this.offset+e,t,a,s,i.length===0||this.valueOffsets?i:this._sliceChildren(i,o*e,o*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===D.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:n}=this,r=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);r[t>>3]=(1<<t-(t&-8))-1,n>0&&r.set(vi(this.offset,t,this.nullBitmap),0);let i=this.buffers;return i[et.VALIDITY]=r,this.clone(this.type,0,e,n+(e-t),i)}_sliceBuffers(e,t,n,r){let i,{buffers:a}=this;return(i=a[et.TYPE])&&(a[et.TYPE]=i.subarray(e,e+t)),(i=a[et.OFFSET])&&(a[et.OFFSET]=i.subarray(e,e+t+1))||(i=a[et.DATA])&&(a[et.DATA]=r===6?i:i.subarray(n*e,n*(e+t))),a}_sliceChildren(e,t,n){return e.map(e=>e.slice(t,n))}};I.prototype.children=Object.freeze([]);var wi=class e extends A{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){let{type:t,offset:n=0,length:r=0}=e;return new I(t,n,r,0)}visitBool(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length>>3,nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitInt(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitFloat(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length,nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitUtf8(e){let{type:t,offset:n=0}=e,r=w(e.data),i=w(e.nullBitmap),a=Ne(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new I(t,n,o,s,[a,r,i])}visitBinary(e){let{type:t,offset:n=0}=e,r=w(e.data),i=w(e.nullBitmap),a=Ne(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new I(t,n,o,s,[a,r,i])}visitFixedSizeBinary(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length/cn(t),nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitDate(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length/cn(t),nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitTimestamp(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length/cn(t),nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitTime(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length/cn(t),nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitDecimal(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length/cn(t),nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitList(e){let{type:t,offset:n=0,child:r}=e,i=w(e.nullBitmap),a=Ne(e.valueOffsets),{length:o=a.length-1,nullCount:s=e.nullBitmap?-1:0}=e;return new I(t,n,o,s,[a,void 0,i],[r])}visitStruct(e){let{type:t,offset:n=0,children:r=[]}=e,i=w(e.nullBitmap),{length:a=r.reduce((e,{length:t})=>Math.max(e,t),0),nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,void 0,i],r)}visitUnion(e){let{type:t,offset:n=0,children:r=[]}=e,i=w(e.nullBitmap),a=C(t.ArrayType,e.typeIds),{length:o=a.length,nullCount:s=e.nullBitmap?-1:0}=e;return O.isSparseUnion(t)?new I(t,n,o,s,[void 0,void 0,i,a],r):new I(t,n,o,s,[Ne(e.valueOffsets),void 0,i,a],r)}visitDictionary(t){let{type:n,offset:r=0}=t,i=w(t.nullBitmap),a=C(n.indices.ArrayType,t.data),{dictionary:o=new W([new e().visit({type:n.dictionary})])}=t,{length:s=a.length,nullCount:c=t.nullBitmap?-1:0}=t;return new I(n,r,s,c,[void 0,a,i],[],o)}visitInterval(e){let{type:t,offset:n=0}=e,r=w(e.nullBitmap),i=C(t.ArrayType,e.data),{length:a=i.length/cn(t),nullCount:o=e.nullBitmap?-1:0}=e;return new I(t,n,a,o,[void 0,i,r])}visitFixedSizeList(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.valueType})}=t,a=w(t.nullBitmap),{length:o=i.length/cn(n),nullCount:s=t.nullBitmap?-1:0}=t;return new I(n,r,o,s,[void 0,void 0,a],[i])}visitMap(t){let{type:n,offset:r=0,child:i=new e().visit({type:n.childType})}=t,a=w(t.nullBitmap),o=Ne(t.valueOffsets),{length:s=o.length-1,nullCount:c=t.nullBitmap?-1:0}=t;return new I(n,r,s,c,[o,void 0,a],[i])}};function L(e){return new wi().visit(e)}var Ti=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){let e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}};function Ei(e){return e.reduce((e,t)=>e+t.nullCount,0)}function Di(e){return e.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(e.length+1))}function Oi(e,t,n,r){let i=[];for(let a=-1,o=e.length;++a<o;){let o=e[a],s=t[a],{length:c}=o;if(s>=r)break;if(n>=s+c)continue;if(s>=n&&s+c<=r){i.push(o);continue}let l=Math.max(0,n-s),u=Math.min(r-s,c);i.push(o.slice(l,u-l))}return i.length===0&&i.push(e[0].slice(0,0)),i}function ki(e,t,n,r){let i=0,a=0,o=t.length-1;do{if(i>=o-1)return n<t[o]?r(e,i,n-t[i]):null;a=i+Math.trunc((o-i)*.5),n<t[a]?o=a:i=a}while(i<o)}function Ai(e,t){return e.getValid(t)}function ji(e){function t(t,n,r){return e(t[n],r)}return function(e){let n=this.data;return ki(n,this._offsets,e,t)}}function Mi(e){let t;function n(n,r,i){return e(n[r],i,t)}return function(e,r){let i=this.data;t=r;let a=ki(i,this._offsets,e,n);return t=void 0,a}}function Ni(e){let t;function n(n,r,i){let a=i,o=0,s=0;for(let i=r-1,c=n.length;++i<c;){let r=n[i];if(~(o=e(r,t,a)))return s+o;a=0,s+=r.length}return-1}return function(e,r){t=e;let i=this.data,a=typeof r==`number`?ki(i,this._offsets,r,n):n(i,0,0);return t=void 0,a}}var R=class extends A{};function Pi(e,t){return t===null&&e.length>0?0:-1}function Fi(e,t){let{nullBitmap:n}=e;if(!n||e.nullCount<=0)return-1;let r=0;for(let i of new bi(n,e.offset+(t||0),e.length,n,gi)){if(!i)return r;++r}return-1}function z(e,t,n){if(t===void 0)return-1;if(t===null)return Fi(e,n);let r=$r.getVisitFn(e),i=ci(t);for(let t=(n||0)-1,a=e.length;++t<a;)if(i(r(e,t)))return t;return-1}function Ii(e,t,n){let r=$r.getVisitFn(e),i=ci(t);for(let t=(n||0)-1,a=e.length;++t<a;)if(i(r(e,t)))return t;return-1}R.prototype.visitNull=Pi,R.prototype.visitBool=z,R.prototype.visitInt=z,R.prototype.visitInt8=z,R.prototype.visitInt16=z,R.prototype.visitInt32=z,R.prototype.visitInt64=z,R.prototype.visitUint8=z,R.prototype.visitUint16=z,R.prototype.visitUint32=z,R.prototype.visitUint64=z,R.prototype.visitFloat=z,R.prototype.visitFloat16=z,R.prototype.visitFloat32=z,R.prototype.visitFloat64=z,R.prototype.visitUtf8=z,R.prototype.visitBinary=z,R.prototype.visitFixedSizeBinary=z,R.prototype.visitDate=z,R.prototype.visitDateDay=z,R.prototype.visitDateMillisecond=z,R.prototype.visitTimestamp=z,R.prototype.visitTimestampSecond=z,R.prototype.visitTimestampMillisecond=z,R.prototype.visitTimestampMicrosecond=z,R.prototype.visitTimestampNanosecond=z,R.prototype.visitTime=z,R.prototype.visitTimeSecond=z,R.prototype.visitTimeMillisecond=z,R.prototype.visitTimeMicrosecond=z,R.prototype.visitTimeNanosecond=z,R.prototype.visitDecimal=z,R.prototype.visitList=z,R.prototype.visitStruct=z,R.prototype.visitUnion=z,R.prototype.visitDenseUnion=Ii,R.prototype.visitSparseUnion=Ii,R.prototype.visitDictionary=z,R.prototype.visitInterval=z,R.prototype.visitIntervalDayTime=z,R.prototype.visitIntervalYearMonth=z,R.prototype.visitFixedSizeList=z,R.prototype.visitMap=z;var Li=new R,B=class extends A{};function V(e){let{type:t}=e;if(e.nullCount===0&&e.stride===1&&(t.typeId===D.Timestamp||t instanceof Nt&&t.bitWidth!==64||t instanceof Zt&&t.bitWidth!==64||t instanceof Ht&&t.precision!==Ze.HALF))return new Ti(e.data.length,t=>{let n=e.data[t];return n.values.subarray(0,n.length)[Symbol.iterator]()});let n=0;return new Ti(e.data.length,t=>{let r=e.data[t].length,i=e.slice(n,n+r);return n+=r,new Ri(i)})}var Ri=class{constructor(e){this.vector=e,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};B.prototype.visitNull=V,B.prototype.visitBool=V,B.prototype.visitInt=V,B.prototype.visitInt8=V,B.prototype.visitInt16=V,B.prototype.visitInt32=V,B.prototype.visitInt64=V,B.prototype.visitUint8=V,B.prototype.visitUint16=V,B.prototype.visitUint32=V,B.prototype.visitUint64=V,B.prototype.visitFloat=V,B.prototype.visitFloat16=V,B.prototype.visitFloat32=V,B.prototype.visitFloat64=V,B.prototype.visitUtf8=V,B.prototype.visitBinary=V,B.prototype.visitFixedSizeBinary=V,B.prototype.visitDate=V,B.prototype.visitDateDay=V,B.prototype.visitDateMillisecond=V,B.prototype.visitTimestamp=V,B.prototype.visitTimestampSecond=V,B.prototype.visitTimestampMillisecond=V,B.prototype.visitTimestampMicrosecond=V,B.prototype.visitTimestampNanosecond=V,B.prototype.visitTime=V,B.prototype.visitTimeSecond=V,B.prototype.visitTimeMillisecond=V,B.prototype.visitTimeMicrosecond=V,B.prototype.visitTimeNanosecond=V,B.prototype.visitDecimal=V,B.prototype.visitList=V,B.prototype.visitStruct=V,B.prototype.visitUnion=V,B.prototype.visitDenseUnion=V,B.prototype.visitSparseUnion=V,B.prototype.visitDictionary=V,B.prototype.visitInterval=V,B.prototype.visitIntervalDayTime=V,B.prototype.visitIntervalYearMonth=V,B.prototype.visitFixedSizeList=V,B.prototype.visitMap=V;var zi=new B,Bi=(e,t)=>e+t,Vi=class extends A{visitNull(e,t){return 0}visitInt(e,t){return e.type.bitWidth/8}visitFloat(e,t){return e.type.ArrayType.BYTES_PER_ELEMENT}visitBool(e,t){return 1/8}visitDecimal(e,t){return e.type.bitWidth/8}visitDate(e,t){return(e.type.unit+1)*4}visitTime(e,t){return e.type.bitWidth/8}visitTimestamp(e,t){return e.type.unit===T.SECOND?4:8}visitInterval(e,t){return(e.type.unit+1)*4}visitStruct(e,t){return e.children.reduce((e,n)=>e+qi.visit(n,t),0)}visitFixedSizeBinary(e,t){return e.type.byteWidth}visitMap(e,t){return 8+e.children.reduce((e,n)=>e+qi.visit(n,t),0)}visitDictionary(e,t){return e.type.indices.bitWidth/8+(e.dictionary?.getByteLength(e.values[t])||0)}},Hi=({valueOffsets:e},t)=>8+(e[t+1]-e[t]),Ui=({valueOffsets:e},t)=>8+(e[t+1]-e[t]),Wi=({valueOffsets:e,stride:t,children:n},r)=>{let i=n[0],{[r*t]:a}=e,{[r*t+1]:o}=e,s=qi.getVisitFn(i.type),c=i.slice(a,o-a),l=8;for(let e=-1,t=o-a;++e<t;)l+=s(c,e);return l},Gi=({stride:e,children:t},n)=>{let r=t[0],i=r.slice(n*e,e),a=qi.getVisitFn(r.type),o=0;for(let e=-1,t=i.length;++e<t;)o+=a(i,e);return o},Ki=(e,t)=>e.type.mode===Xe.Dense?H(e,t):U(e,t),H=({type:e,children:t,typeIds:n,valueOffsets:r},i)=>{let a=e.typeIdToChildIndex[n[i]];return 8+qi.visit(t[a],r[i])},U=({children:e},t)=>4+qi.visitMany(e,e.map(()=>t)).reduce(Bi,0);Vi.prototype.visitUtf8=Hi,Vi.prototype.visitBinary=Ui,Vi.prototype.visitList=Wi,Vi.prototype.visitFixedSizeList=Gi,Vi.prototype.visitUnion=Ki,Vi.prototype.visitDenseUnion=H,Vi.prototype.visitSparseUnion=U;var qi=new Vi,Ji,Yi={},Xi={},W=class e{constructor(t){let n=t[0]instanceof e?t.flatMap(e=>e.data):t;if(n.length===0||n.some(e=>!(e instanceof I)))throw TypeError(`Vector constructor expects an Array of Data instances.`);let r=n[0]?.type;switch(n.length){case 0:this._offsets=[0];break;case 1:{let{get:e,set:t,indexOf:i,byteLength:a}=Yi[r.typeId],o=n[0];this.isValid=e=>Ai(o,e),this.get=t=>e(o,t),this.set=(e,n)=>t(o,e,n),this.indexOf=e=>i(o,e),this.getByteLength=e=>a(o,e),this._offsets=[0,o.length];break}default:Object.setPrototypeOf(this,Xi[r.typeId]),this._offsets=Di(n);break}this.data=n,this.type=r,this.stride=cn(r),this.numChildren=r.children?.length??0,this.length=this._offsets[this._offsets.length-1]}get byteLength(){return this._byteLength===-1&&(this._byteLength=this.data.reduce((e,t)=>e+t.byteLength,0)),this._byteLength}get nullCount(){return this._nullCount===-1&&(this._nullCount=Ei(this.data)),this._nullCount}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${D[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>0}getByteLength(e){return 0}[Symbol.iterator](){return zi.visit(this)}concat(...t){return new e(this.data.concat(t.flatMap(e=>e.data).flat(1/0)))}slice(t,n){return new e(oi(this,t,n,({data:e,_offsets:t},n,r)=>Oi(e,t,n,r)))}toJSON(){return[...this]}toArray(){let{type:e,data:t,length:n,stride:r,ArrayType:i}=this;switch(e.typeId){case D.Int:case D.Float:case D.Decimal:case D.Time:case D.Timestamp:switch(t.length){case 0:return new i;case 1:return t[0].values.subarray(0,n*r);default:return t.reduce((e,{values:t,length:n})=>(e.array.set(t.subarray(0,n*r),e.offset),e.offset+=n*r,e),{array:new i(n*r),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(`,`)}]`}getChild(e){return this.getChildAt(this.type.children?.findIndex(t=>t.name===e))}getChildAt(t){return t>-1&&t<this.numChildren?new e(this.data.map(({children:e})=>e[t])):null}get isMemoized(){return O.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(O.isDictionary(this.type)){let t=new Zi(this.data[0].dictionary);return new e(this.data.map(e=>{let n=e.clone();return n.dictionary=t,n}))}return new Zi(this)}unmemoize(){if(O.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize();return new e(this.data.map(e=>{let n=e.clone();return n.dictionary=t,n}))}return this}};Ji=Symbol.toStringTag,W[Ji]=(e=>{e.type=O.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._nullCount=-1,e._byteLength=-1,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(D).map(e=>D[e]).filter(e=>typeof e==`number`&&e!==D.NONE);for(let n of t)Yi[n]={get:$r.getVisitFnByTypeId(n),set:ir.getVisitFnByTypeId(n),indexOf:Li.getVisitFnByTypeId(n),byteLength:qi.getVisitFnByTypeId(n)},Xi[n]=Object.create(e,{isValid:{value:ji(Ai)},get:{value:ji($r.getVisitFnByTypeId(n))},set:{value:Mi(ir.getVisitFnByTypeId(n))},indexOf:{value:Ni(Li.getVisitFnByTypeId(n))},getByteLength:{value:ji(qi.getVisitFnByTypeId(n))}});return`Vector`})(W.prototype);var Zi=class e extends W{constructor(t){super(t.data);let n=this.get,r=this.set,i=this.slice,a=Array(this.length);Object.defineProperty(this,"get",{value(e){let t=a[e];if(t!==void 0)return t;let r=n.call(this,e);return a[e]=r,r}}),Object.defineProperty(this,"set",{value(e,t){r.call(this,e,t),a[e]=t}}),Object.defineProperty(this,"slice",{value:(t,n)=>new e(i.call(this,t,n))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new W(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}},Qi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,n,r){return e.prep(8,24),e.writeInt64(r),e.pad(4),e.writeInt32(n),e.writeInt64(t),e.offset()}},$i=new Int32Array(2),ea=new Float32Array($i.buffer),ta=new Float64Array($i.buffer),na=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1,ra=class e{constructor(e,t){this.low=e|0,this.high=t|0}static create(t,n){return t==0&&n==0?e.ZERO:new e(t,n)}toFloat64(){return(this.low>>>0)+this.high*4294967296}equals(e){return this.low==e.low&&this.high==e.high}};ra.ZERO=new ra(0,0);var ia;(function(e){e[e.UTF8_BYTES=1]=`UTF8_BYTES`,e[e.UTF16_STRING=2]=`UTF16_STRING`})(ia||={});var aa=class e{constructor(e){this.bytes_=e,this.position_=0}static allocate(t){return new e(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return new ra(this.readInt32(e),this.readInt32(e+4))}readUint64(e){return new ra(this.readUint32(e),this.readUint32(e+4))}readFloat32(e){return $i[0]=this.readInt32(e),ea[0]}readFloat64(e){return $i[+!na]=this.readInt32(e),$i[+!!na]=this.readInt32(e+4),ta[0]}writeInt8(e,t){this.bytes_[e]=t}writeUint8(e,t){this.bytes_[e]=t}writeInt16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,t.low),this.writeInt32(e+4,t.high)}writeUint64(e,t){this.writeUint32(e,t.low),this.writeUint32(e+4,t.high)}writeFloat32(e,t){ea[0]=t,this.writeInt32(e,$i[0])}writeFloat64(e,t){ta[0]=t,this.writeInt32(e,$i[+!na]),this.writeInt32(e+4,$i[+!!na])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw Error(`FlatBuffers: ByteBuffer is too short to contain an identifier.`);let e=``;for(let t=0;t<4;t++)e+=String.fromCharCode(this.readInt8(this.position_+4+t));return e}__offset(e,t){let n=e-this.readInt32(e);return t<this.readInt16(n)?this.readInt16(n+t):0}__union(e,t){return e.bb_pos=t+this.readInt32(t),e.bb=this,e}__string(e,t){e+=this.readInt32(e);let n=this.readInt32(e),r=``,i=0;if(e+=4,t===ia.UTF8_BYTES)return this.bytes_.subarray(e,e+n);for(;i<n;){let t,n=this.readUint8(e+ i++);if(n<192)t=n;else{let r=this.readUint8(e+ i++);if(n<224)t=(n&31)<<6|r&63;else{let a=this.readUint8(e+ i++);if(n<240)t=(n&15)<<12|(r&63)<<6|a&63;else{let o=this.readUint8(e+ i++);t=(n&7)<<18|(r&63)<<12|(a&63)<<6|o&63}}}t<65536?r+=String.fromCharCode(t):(t-=65536,r+=String.fromCharCode((t>>10)+55296,(t&1023)+56320))}return r}__union_with_string(e,t){return typeof e==`string`?this.__string(t):this.__union(e,t)}__indirect(e){return e+this.readInt32(e)}__vector(e){return e+this.readInt32(e)+4}__vector_len(e){return this.readInt32(e+this.readInt32(e))}__has_identifier(e){if(e.length!=4)throw Error(`FlatBuffers: file identifier must be length 4`);for(let t=0;t<4;t++)if(e.charCodeAt(t)!=this.readInt8(this.position()+4+t))return!1;return!0}createLong(e,t){return ra.create(e,t)}createScalarList(e,t){let n=[];for(let r=0;r<t;++r)e(r)!==null&&n.push(e(r));return n}createObjList(e,t){let n=[];for(let r=0;r<t;++r){let t=e(r);t!==null&&n.push(t.unpack())}return n}},oa=class e{constructor(e){this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null;let t;t=e||1024,this.bb=aa.allocate(t),this.space=t}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(e){this.force_defaults=e}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(t,n){t>this.minalign&&(this.minalign=t);let r=~(this.bb.capacity()-this.space+n)+1&t-1;for(;this.space<r+t+n;){let t=this.bb.capacity();this.bb=e.growByteBuffer(this.bb),this.space+=this.bb.capacity()-t}this.pad(r)}pad(e){for(let t=0;t<e;t++)this.bb.writeInt8(--this.space,0)}writeInt8(e){this.bb.writeInt8(--this.space,e)}writeInt16(e){this.bb.writeInt16(this.space-=2,e)}writeInt32(e){this.bb.writeInt32(this.space-=4,e)}writeInt64(e){this.bb.writeInt64(this.space-=8,e)}writeFloat32(e){this.bb.writeFloat32(this.space-=4,e)}writeFloat64(e){this.bb.writeFloat64(this.space-=8,e)}addInt8(e){this.prep(1,0),this.writeInt8(e)}addInt16(e){this.prep(2,0),this.writeInt16(e)}addInt32(e){this.prep(4,0),this.writeInt32(e)}addInt64(e){this.prep(8,0),this.writeInt64(e)}addFloat32(e){this.prep(4,0),this.writeFloat32(e)}addFloat64(e){this.prep(8,0),this.writeFloat64(e)}addFieldInt8(e,t,n){(this.force_defaults||t!=n)&&(this.addInt8(t),this.slot(e))}addFieldInt16(e,t,n){(this.force_defaults||t!=n)&&(this.addInt16(t),this.slot(e))}addFieldInt32(e,t,n){(this.force_defaults||t!=n)&&(this.addInt32(t),this.slot(e))}addFieldInt64(e,t,n){(this.force_defaults||!t.equals(n))&&(this.addInt64(t),this.slot(e))}addFieldFloat32(e,t,n){(this.force_defaults||t!=n)&&(this.addFloat32(t),this.slot(e))}addFieldFloat64(e,t,n){(this.force_defaults||t!=n)&&(this.addFloat64(t),this.slot(e))}addFieldOffset(e,t,n){(this.force_defaults||t!=n)&&(this.addOffset(t),this.slot(e))}addFieldStruct(e,t,n){t!=n&&(this.nested(t),this.slot(e))}nested(e){if(e!=this.offset())throw Error(`FlatBuffers: struct must be serialized inline.`)}notNested(){if(this.isNested)throw Error(`FlatBuffers: object serialization must not be nested.`)}slot(e){this.vtable!==null&&(this.vtable[e]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(e){let t=e.capacity();if(t&3221225472)throw Error(`FlatBuffers: cannot grow buffer beyond 2 gigabytes.`);let n=t<<1,r=aa.allocate(n);return r.setPosition(n-t),r.bytes().set(e.bytes(),n-t),r}addOffset(e){this.prep(4,0),this.writeInt32(this.offset()-e+4)}startObject(e){this.notNested(),this.vtable??=[],this.vtable_in_use=e;for(let t=0;t<e;t++)this.vtable[t]=0;this.isNested=!0,this.object_start=this.offset()}endObject(){if(this.vtable==null||!this.isNested)throw Error(`FlatBuffers: endObject called without startObject`);this.addInt32(0);let e=this.offset(),t=this.vtable_in_use-1;for(;t>=0&&this.vtable[t]==0;t--);let n=t+1;for(;t>=0;t--)this.addInt16(this.vtable[t]==0?0:e-this.vtable[t]);this.addInt16(e-this.object_start);let r=(n+2)*2;this.addInt16(r);let i=0,a=this.space;outer_loop:for(t=0;t<this.vtables.length;t++){let e=this.bb.capacity()-this.vtables[t];if(r==this.bb.readInt16(e)){for(let t=2;t<r;t+=2)if(this.bb.readInt16(a+t)!=this.bb.readInt16(e+t))continue outer_loop;i=this.vtables[t];break}}return i?(this.space=this.bb.capacity()-e,this.bb.writeInt32(this.space,i-e)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-e,this.offset()-e)),this.isNested=!1,e}finish(e,t,n){let r=n?4:0;if(t){let e=t;if(this.prep(this.minalign,8+r),e.length!=4)throw Error(`FlatBuffers: file identifier must be length 4`);for(let t=3;t>=0;t--)this.writeInt8(e.charCodeAt(t))}this.prep(this.minalign,4+r),this.addOffset(e),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,t){this.finish(e,t,!0)}requiredField(e,t){let n=this.bb.capacity()-e,r=n-this.bb.readInt32(n);if(this.bb.readInt16(r+t)==0)throw Error(`FlatBuffers: field `+t+` must be set`)}startVector(e,t,n){this.notNested(),this.vector_num_elems=t,this.prep(4,e*t),this.prep(n,e*t)}endVector(){return this.writeInt32(this.vector_num_elems),this.offset()}createSharedString(e){if(!e)return 0;if(this.string_maps||=new Map,this.string_maps.has(e))return this.string_maps.get(e);let t=this.createString(e);return this.string_maps.set(e,t),t}createString(e){if(!e)return 0;let t;if(e instanceof Uint8Array)t=e;else{t=[];let n=0;for(;n<e.length;){let r,i=e.charCodeAt(n++);if(i<55296||i>=56320)r=i;else{let t=e.charCodeAt(n++);r=(i<<10)+t+-56613888}r<128?t.push(r):(r<2048?t.push(r>>6&31|192):(r<65536?t.push(r>>12&15|224):t.push(r>>18&7|240,r>>12&63|128),t.push(r>>6&63|128)),t.push(r&63|128))}}this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length);for(let e=0,n=this.space,r=this.bb.bytes();e<t.length;e++)r[n++]=t[e];return this.endVector()}createLong(e,t){return ra.create(e,t)}createObjectOffset(e){return e===null?0:typeof e==`string`?this.createString(e):e.pack(this)}createObjectOffsetList(e){let t=[];for(let n=0;n<e.length;++n){let r=e[n];if(r!==null)t.push(this.createObjectOffset(r));else throw Error(`FlatBuffers: Argument for createObjectOffsetList cannot contain null.`)}return t}createStructOffsetList(e,t){return t(this,e.length),this.createObjectOffsetList(e),this.endVector()}},sa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsKeyValue(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(t,n,r){return e.startKeyValue(t),e.addKey(t,n),e.addValue(t,r),e.endKeyValue(t)}},ca;(function(e){e[e.V1=0]=`V1`,e[e.V2=1]=`V2`,e[e.V3=2]=`V3`,e[e.V4=3]=`V4`,e[e.V5=4]=`V5`})(ca||={});var la;(function(e){e[e.Little=0]=`Little`,e[e.Big=1]=`Big`})(la||={});var ua;(function(e){e[e.DenseArray=0]=`DenseArray`})(ua||={});var da=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInt(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(t,n,r){return e.startInt(t),e.addBitWidth(t,n),e.addIsSigned(t,r),e.endInt(t)}},fa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryEncoding(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new da).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):ua.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,ua.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}},pa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBinary(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(t){return e.startBinary(t),e.endBinary(t)}},ma=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBool(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(t){return e.startBool(t),e.endBool(t)}},ha;(function(e){e[e.DAY=0]=`DAY`,e[e.MILLISECOND=1]=`MILLISECOND`})(ha||={});var ga=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDate(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ha.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,ha.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(t,n){return e.startDate(t),e.addUnit(t,n),e.endDate(t)}},_a=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDecimal(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(t,n,r,i){return e.startDecimal(t),e.addPrecision(t,n),e.addScale(t,r),e.addBitWidth(t,i),e.endDecimal(t)}},va;(function(e){e[e.SECOND=0]=`SECOND`,e[e.MILLISECOND=1]=`MILLISECOND`,e[e.MICROSECOND=2]=`MICROSECOND`,e[e.NANOSECOND=3]=`NANOSECOND`})(va||={});var ya=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFixedSizeBinary(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(t,n){return e.startFixedSizeBinary(t),e.addByteWidth(t,n),e.endFixedSizeBinary(t)}},ba=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFixedSizeList(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(t,n){return e.startFixedSizeList(t),e.addListSize(t,n),e.endFixedSizeList(t)}},xa;(function(e){e[e.HALF=0]=`HALF`,e[e.SINGLE=1]=`SINGLE`,e[e.DOUBLE=2]=`DOUBLE`})(xa||={});var Sa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFloatingPoint(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):xa.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,xa.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(t,n){return e.startFloatingPoint(t),e.addPrecision(t,n),e.endFloatingPoint(t)}},Ca;(function(e){e[e.YEAR_MONTH=0]=`YEAR_MONTH`,e[e.DAY_TIME=1]=`DAY_TIME`,e[e.MONTH_DAY_NANO=2]=`MONTH_DAY_NANO`})(Ca||={});var G=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInterval(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Ca.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Ca.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(t,n){return e.startInterval(t),e.addUnit(t,n),e.endInterval(t)}},wa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsList(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(t){return e.startList(t),e.endList(t)}},Ta=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMap(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(t,n){return e.startMap(t),e.addKeysSorted(t,n),e.endMap(t)}},Ea=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsNull(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(t){return e.startNull(t),e.endNull(t)}},Da=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsStruct_(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(t){return e.startStruct_(t),e.endStruct_(t)}},Oa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTime(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):va.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,va.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(t,n,r){return e.startTime(t),e.addUnit(t,n),e.addBitWidth(t,r),e.endTime(t)}},ka=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTimestamp(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):va.SECOND}timezone(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,va.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(t,n,r){return e.startTimestamp(t),e.addUnit(t,n),e.addTimezone(t,r),e.endTimestamp(t)}},Aa;(function(e){e[e.Sparse=0]=`Sparse`,e[e.Dense=1]=`Dense`})(Aa||={});var ja=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUnion(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Aa.Sparse}typeIds(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,Aa.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(t,n,r){return e.startUnion(t),e.addMode(t,n),e.addTypeIds(t,r),e.endUnion(t)}},Ma=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(t){return e.startUtf8(t),e.endUtf8(t)}},K;(function(e){e[e.NONE=0]=`NONE`,e[e.Null=1]=`Null`,e[e.Int=2]=`Int`,e[e.FloatingPoint=3]=`FloatingPoint`,e[e.Binary=4]=`Binary`,e[e.Utf8=5]=`Utf8`,e[e.Bool=6]=`Bool`,e[e.Decimal=7]=`Decimal`,e[e.Date=8]=`Date`,e[e.Time=9]=`Time`,e[e.Timestamp=10]=`Timestamp`,e[e.Interval=11]=`Interval`,e[e.List=12]=`List`,e[e.Struct_=13]=`Struct_`,e[e.Union=14]=`Union`,e[e.FixedSizeBinary=15]=`FixedSizeBinary`,e[e.FixedSizeList=16]=`FixedSizeList`,e[e.Map=17]=`Map`,e[e.Duration=18]=`Duration`,e[e.LargeBinary=19]=`LargeBinary`,e[e.LargeUtf8=20]=`LargeUtf8`,e[e.LargeList=21]=`LargeList`})(K||={});var Na=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):K.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new fa).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(t,n){let r=this.bb.__offset(this.bb_pos,14);return r?(n||new e).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,16);return n?(t||new sa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,K.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}},Pa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):la.Little}fields(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new Na).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new sa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):this.bb.createLong(0,0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,la.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(t,n,r,i,a){return e.startSchema(t),e.addEndianness(t,n),e.addFields(t,r),e.addCustomMetadata(t,i),e.addFeatures(t,a),e.endSchema(t)}},Fa=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ca.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Pa).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new Qi).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let n=this.bb.__offset(this.bb_pos,10);return n?(t||new Qi).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new sa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,ca.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}},q=class e{constructor(e=[],t,n){this.fields=e||[],this.metadata=t||new Map,n||=La(e),this.dictionaries=n}get[Symbol.toStringTag](){return`Schema`}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(`, `)} }>`}select(t){let n=new Set(t);return new e(this.fields.filter(e=>n.has(e.name)),this.metadata)}selectAt(t){return new e(t.map(e=>this.fields[e]).filter(Boolean),this.metadata)}assign(...t){let n=t[0]instanceof e?t[0]:Array.isArray(t[0])?new e(t[0]):new e(t),r=[...this.fields],i=Ia(Ia(new Map,this.metadata),n.metadata),a=n.fields.filter(e=>{let t=r.findIndex(t=>t.name===e.name);return~t?(r[t]=e.clone({metadata:Ia(Ia(new Map,r[t].metadata),e.metadata)}))&&!1:!0}),o=La(a,new Map);return new e([...r,...a],i,new Map([...this.dictionaries,...o]))}};q.prototype.fields=null,q.prototype.metadata=null,q.prototype.dictionaries=null;var J=class e{constructor(e,t,n=!1,r){this.name=e,this.type=t,this.nullable=n,this.metadata=r||new Map}static new(...t){let[n,r,i,a]=t;return t[0]&&typeof t[0]==`object`&&({name:n}=t[0],r===void 0&&(r=t[0].type),i===void 0&&(i=t[0].nullable),a===void 0&&(a=t[0].metadata)),new e(`${n}`,r,i,a)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return`Field`}toString(){return`${this.name}: ${this.type}`}clone(...t){let[n,r,i,a]=t;return!t[0]||typeof t[0]!=`object`?[n=this.name,r=this.type,i=this.nullable,a=this.metadata]=t:{name:n=this.name,type:r=this.type,nullable:i=this.nullable,metadata:a=this.metadata}=t[0],e.new(n,r,i,a)}};J.prototype.type=null,J.prototype.name=null,J.prototype.nullable=null,J.prototype.metadata=null;function Ia(e,t){return new Map([...e||new Map,...t||new Map])}function La(e,t=new Map){for(let n=-1,r=e.length;++n<r;){let r=e[n].type;if(O.isDictionary(r)){if(!t.has(r.id))t.set(r.id,r.dictionary);else if(t.get(r.id)!==r.dictionary)throw Error(`Cannot create Schema containing two different dictionaries with the same Id`)}r.children&&r.children.length>0&&La(r.children,t)}return t}var Ra=ra,za=oa,Ba=aa,Va=class{constructor(e,t=Ye.V4,n,r){this.schema=e,this.version=t,n&&(this._recordBatches=n),r&&(this._dictionaryBatches=r)}static decode(e){e=new Ba(w(e));let t=Fa.getRootAsFooter(e);return new Ha(q.decode(t.schema()),t)}static encode(e){let t=new za,n=q.encode(t,e.schema);Fa.startRecordBatchesVector(t,e.numRecordBatches);for(let n of[...e.recordBatches()].slice().reverse())Ua.encode(t,n);let r=t.endVector();Fa.startDictionariesVector(t,e.numDictionaries);for(let n of[...e.dictionaryBatches()].slice().reverse())Ua.encode(t,n);let i=t.endVector();return Fa.startFooter(t),Fa.addSchema(t,n),Fa.addVersion(t,Ye.V4),Fa.addRecordBatches(t,r),Fa.addDictionaries(t,i),Fa.finishFooterBuffer(t,Fa.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t<n;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,n=this.numDictionaries;++t<n;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}},Ha=class extends Va{constructor(e,t){super(e,t.version()),this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){let t=this._footer.recordBatches(e);if(t)return Ua.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return Ua.decode(t)}return null}},Ua=class e{constructor(e,t,n){this.metaDataLength=e,this.offset=typeof n==`number`?n:n.low,this.bodyLength=typeof t==`number`?t:t.low}static decode(t){return new e(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(e,t){let{metaDataLength:n}=t,r=new Ra(t.offset,0),i=new Ra(t.bodyLength,0);return Qi.createBlock(e,r,n,i)}},Wa=Object.freeze({done:!0,value:void 0}),Ga=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}},Ka=class{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||=this.toDOMStream()}_getNodeStream(){return this._nodeStream||=this.toNodeStream()}},qa=class extends Ka{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return y(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(Wa);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Ve.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Ve.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return y(this,void 0,void 0,function*(){return yield this.abort(e),Wa})}return(e){return y(this,void 0,void 0,function*(){return yield this.close(),Wa})}read(e){return y(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return y(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,t)=>{this.resolvers.push({resolve:e,reject:t})}):Promise.resolve(Wa)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw Error(`AsyncQueue is closed`)}},Ja=class extends qa{write(e){if((e=w(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?ie(this.toUint8Array(!0)):this.toUint8Array(!1).then(ie)}toUint8Array(e=!1){return e?Me(this._values)[0]:y(this,void 0,void 0,function*(){var e,t;let n=[],r=0;try{for(var i=ne(this),a;a=yield i.next(),!a.done;){let e=a.value;n.push(e),r+=e.byteLength}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&(yield t.call(i))}finally{if(e)throw e.error}}return Me(n,r)[0]})}},Ya=class{constructor(e){e&&(this.source=new Za(Ve.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},Xa=class e{constructor(t){t instanceof e?this.source=t.source:t instanceof Ja?this.source=new Qa(Ve.fromAsyncIterable(t)):De(t)?this.source=new Qa(Ve.fromNodeStream(t)):Te(t)?this.source=new Qa(Ve.fromDOMStream(t)):Se(t)?this.source=new Qa(Ve.fromDOMStream(t.body)):_e(t)?this.source=new Qa(Ve.fromIterable(t)):(S(t)||ve(t))&&(this.source=new Qa(Ve.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},Za=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,`peek`).value}read(e){return this.next(e,`read`).value}next(e,t=`read`){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||Wa)}return(e){return Object.create(this.source.return&&this.source.return(e)||Wa)}},Qa=class{constructor(e){this.source=e,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(e){return y(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return y(this,void 0,void 0,function*(){return(yield this.next(e,`read`)).value})}peek(e){return y(this,void 0,void 0,function*(){return(yield this.next(e,`peek`)).value})}next(e,t=`read`){return y(this,void 0,void 0,function*(){return yield this.source.next({cmd:t,size:e})})}throw(e){return y(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||Wa;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return y(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||Wa;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},$a=class extends Ya{constructor(e,t){super(),this.position=0,this.buffer=w(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:n,position:r}=this;return t&&r<n?(typeof e!=`number`&&(e=1/0),this.position=Math.min(n,r+Math.min(n-r,e)),t.subarray(r,this.position)):null}readAt(e,t){let n=this.buffer,r=Math.min(this.size,e+t);return n?n.subarray(e,r):new Uint8Array(t)}close(){this.buffer&&=null}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}},eo=class extends Xa{constructor(e,t){super(),this.position=0,this._handle=e,typeof t==`number`?this.size=t:this._pending=y(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending})}readInt32(e){return y(this,void 0,void 0,function*(){let{buffer:t,byteOffset:n}=yield this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)})}seek(e){return y(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return y(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:t,size:n,position:r}=this;if(t&&r<n){typeof e!=`number`&&(e=1/0);let i=r,a=0,o=0,s=Math.min(n,i+Math.min(n-i,e)),c=new Uint8Array(Math.max(0,(this.position=s)-i));for(;(i+=o)<s&&(a+=o)<c.byteLength;)({bytesRead:o}=yield t.read(c,a,c.byteLength-a,i));return c}return null})}readAt(e,t){return y(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:n,size:r}=this;if(n&&e+t<r){let i=Math.min(r,e+t),a=new Uint8Array(i-e);return(yield n.read(a,0,t,e)).buffer}return new Uint8Array(t)})}close(){return y(this,void 0,void 0,function*(){let e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return y(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return y(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}},to=65536;function no(e){return e<0&&(e=4294967295+e+1),`0x${e.toString(16)}`}var ro=8,io=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],ao=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),r=t[3]*n[3];this.buffer[0]=r&65535;let i=r>>>16;return r=t[2]*n[3],i+=r,r=t[3]*n[2]>>>0,i+=r,this.buffer[0]+=i<<16,this.buffer[1]=i>>>0<r?to:0,this.buffer[1]+=i>>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${no(this.buffer[1])} ${no(this.buffer[0])}`}},Y=class e extends ao{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(t,n=new Uint32Array(2)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(2)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(2)){let r=t.length,i=new e(n);for(let n=0;n<r;){let a=ro<r-n?ro:r-n,o=new e(new Uint32Array([Number.parseInt(t.slice(n,n+a),10),0])),s=new e(new Uint32Array([io[a],0]));i.times(s),i.plus(o),n+=a}return i}static convertArray(t){let n=new Uint32Array(t.length*2);for(let r=-1,i=t.length;++r<i;)e.from(t[r],new Uint32Array(n.buffer,n.byteOffset+2*r*4,2));return n}static multiply(t,n){return new e(new Uint32Array(t.buffer)).times(n)}static add(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}},oo=class e extends ao{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,n=e.buffer[1]<<0;return t<n||t===n&&this.buffer[0]<e.buffer[0]}static from(t,n=new Uint32Array(2)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(2)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(2)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=+!!r;n<i;){let r=ro<i-n?ro:i-n,o=new e(new Uint32Array([Number.parseInt(t.slice(n,n+r),10),0])),s=new e(new Uint32Array([io[r],0]));a.times(s),a.plus(o),n+=r}return r?a.negate():a}static convertArray(t){let n=new Uint32Array(t.length*2);for(let r=-1,i=t.length;++r<i;)e.from(t[r],new Uint32Array(n.buffer,n.byteOffset+2*r*4,2));return n}static multiply(t,n){return new e(new Uint32Array(t.buffer)).times(n)}static add(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}},so=class e{constructor(e){this.buffer=e}high(){return new oo(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new oo(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){let t=new Y(new Uint32Array([this.buffer[3],0])),n=new Y(new Uint32Array([this.buffer[2],0])),r=new Y(new Uint32Array([this.buffer[1],0])),i=new Y(new Uint32Array([this.buffer[0],0])),a=new Y(new Uint32Array([e.buffer[3],0])),o=new Y(new Uint32Array([e.buffer[2],0])),s=new Y(new Uint32Array([e.buffer[1],0])),c=new Y(new Uint32Array([e.buffer[0],0])),l=Y.multiply(i,c);this.buffer[0]=l.low();let u=new Y(new Uint32Array([l.high(),0]));return l=Y.multiply(r,c),u.plus(l),l=Y.multiply(i,s),u.plus(l),this.buffer[1]=u.low(),this.buffer[3]=+!!u.lessThan(l),this.buffer[2]=u.high(),new Y(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(Y.multiply(n,c)).plus(Y.multiply(r,s)).plus(Y.multiply(i,o)),this.buffer[3]+=Y.multiply(t,c).plus(Y.multiply(n,s)).plus(Y.multiply(r,o)).plus(Y.multiply(i,a)).low(),this}plus(e){let t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${no(this.buffer[3])} ${no(this.buffer[2])} ${no(this.buffer[1])} ${no(this.buffer[0])}`}static multiply(t,n){return new e(new Uint32Array(t.buffer)).times(n)}static add(t,n){return new e(new Uint32Array(t.buffer)).plus(n)}static from(t,n=new Uint32Array(4)){return e.fromString(typeof t==`string`?t:t.toString(),n)}static fromNumber(t,n=new Uint32Array(4)){return e.fromString(t.toString(),n)}static fromString(t,n=new Uint32Array(4)){let r=t.startsWith(`-`),i=t.length,a=new e(n);for(let n=+!!r;n<i;){let r=ro<i-n?ro:i-n,o=new e(new Uint32Array([Number.parseInt(t.slice(n,n+r),10),0,0,0])),s=new e(new Uint32Array([io[r],0,0,0]));a.times(s),a.plus(o),n+=r}return r?a.negate():a}static convertArray(t){let n=new Uint32Array(t.length*4);for(let r=-1,i=t.length;++r<i;)e.from(t[r],new Uint32Array(n.buffer,n.byteOffset+16*r,4));return n}},co=class extends A{constructor(e,t,n,r){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=n,this.dictionaries=r}visit(e){return super.visit(e instanceof J?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return L({type:e,length:t})}visitBool(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitInt(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFloat(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitUtf8(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),data:this.readData(e)})}visitFixedSizeBinary(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDate(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTimestamp(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitTime(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitDecimal(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitList(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}visitStruct(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),children:this.visitMany(e.children)})}visitUnion(e){return e.mode===Xe.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),typeIds:this.readTypeIds(e),valueOffsets:this.readOffsets(e),children:this.visitMany(e.children)})}visitSparseUnion(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),typeIds:this.readTypeIds(e),children:this.visitMany(e.children)})}visitDictionary(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e.indices),dictionary:this.readDictionary(e)})}visitInterval(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),data:this.readData(e)})}visitFixedSizeList(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),child:this.visit(e.children[0])})}visitMap(e,{length:t,nullCount:n}=this.nextFieldNode()){return L({type:e,length:t,nullCount:n,nullBitmap:this.readNullBitmap(e,n),valueOffsets:this.readOffsets(e),child:this.visit(e.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,n=this.nextBufferRange()){return t>0&&this.readData(e,n)||new Uint8Array}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}},lo=class extends co{constructor(e,t,n,r){super(new Uint8Array,t,n,r),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array:yi(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return C(Uint8Array,C(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return C(Uint8Array,C(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:n}=this;return O.isTimestamp(e)||(O.isInt(e)||O.isTime(e))&&e.bitWidth===64||O.isDate(e)&&e.unit===Qe.MILLISECOND?C(Uint8Array,oo.convertArray(n[t])):O.isDecimal(e)?C(Uint8Array,so.convertArray(n[t])):O.isBinary(e)||O.isFixedSizeBinary(e)?uo(n[t]):O.isBool(e)?yi(n[t]):O.isUtf8(e)?oe(n[t].join(``)):C(Uint8Array,C(e.ArrayType,n[t].map(e=>+e)))}};function uo(e){let t=e.join(``),n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e>>1]=Number.parseInt(t.slice(e,e+2),16);return n}var X=class extends A{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>this.compareFields(e,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function fo(e,t){return t instanceof e.constructor}function po(e,t){return e===t||fo(e,t)}function Z(e,t){return e===t||fo(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function mo(e,t){return e===t||fo(e,t)&&e.precision===t.precision}function ho(e,t){return e===t||fo(e,t)&&e.byteWidth===t.byteWidth}function go(e,t){return e===t||fo(e,t)&&e.unit===t.unit}function _o(e,t){return e===t||fo(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function vo(e,t){return e===t||fo(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function yo(e,t){return e===t||fo(e,t)&&e.children.length===t.children.length&&Eo.compareManyFields(e.children,t.children)}function bo(e,t){return e===t||fo(e,t)&&e.children.length===t.children.length&&Eo.compareManyFields(e.children,t.children)}function xo(e,t){return e===t||fo(e,t)&&e.mode===t.mode&&e.typeIds.every((e,n)=>e===t.typeIds[n])&&Eo.compareManyFields(e.children,t.children)}function So(e,t){return e===t||fo(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Eo.visit(e.indices,t.indices)&&Eo.visit(e.dictionary,t.dictionary)}function Co(e,t){return e===t||fo(e,t)&&e.unit===t.unit}function wo(e,t){return e===t||fo(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Eo.compareManyFields(e.children,t.children)}function To(e,t){return e===t||fo(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Eo.compareManyFields(e.children,t.children)}X.prototype.visitNull=po,X.prototype.visitBool=po,X.prototype.visitInt=Z,X.prototype.visitInt8=Z,X.prototype.visitInt16=Z,X.prototype.visitInt32=Z,X.prototype.visitInt64=Z,X.prototype.visitUint8=Z,X.prototype.visitUint16=Z,X.prototype.visitUint32=Z,X.prototype.visitUint64=Z,X.prototype.visitFloat=mo,X.prototype.visitFloat16=mo,X.prototype.visitFloat32=mo,X.prototype.visitFloat64=mo,X.prototype.visitUtf8=po,X.prototype.visitBinary=po,X.prototype.visitFixedSizeBinary=ho,X.prototype.visitDate=go,X.prototype.visitDateDay=go,X.prototype.visitDateMillisecond=go,X.prototype.visitTimestamp=_o,X.prototype.visitTimestampSecond=_o,X.prototype.visitTimestampMillisecond=_o,X.prototype.visitTimestampMicrosecond=_o,X.prototype.visitTimestampNanosecond=_o,X.prototype.visitTime=vo,X.prototype.visitTimeSecond=vo,X.prototype.visitTimeMillisecond=vo,X.prototype.visitTimeMicrosecond=vo,X.prototype.visitTimeNanosecond=vo,X.prototype.visitDecimal=po,X.prototype.visitList=yo,X.prototype.visitStruct=bo,X.prototype.visitUnion=xo,X.prototype.visitDenseUnion=xo,X.prototype.visitSparseUnion=xo,X.prototype.visitDictionary=So,X.prototype.visitInterval=Co,X.prototype.visitIntervalDayTime=Co,X.prototype.visitIntervalYearMonth=Co,X.prototype.visitFixedSizeList=wo,X.prototype.visitMap=To;var Eo=new X;function Do(e,t){return Eo.compareSchemas(e,t)}function Oo(e,t){return ko(e,t.map(e=>e.data.concat()))}function ko(e,t){let n=[...e.fields],r=[],i={numBatches:t.reduce((e,t)=>Math.max(e,t.length),0)},a=0,o=0,s=-1,c=t.length,l,u=[];for(;i.numBatches-- >0;){for(o=1/0,s=-1;++s<c;)u[s]=l=t[s].shift(),o=Math.min(o,l?l.length:o);Number.isFinite(o)&&(u=Ao(n,o,u,t,i),o>0&&(r[a++]=L({type:new en(n),length:o,nullCount:0,children:u.slice()})))}return[e=e.assign(n),r.map(t=>new Po(e,t))]}function Ao(e,t,n,r,i){let a=(t+63&-64)>>3;for(let o=-1,s=r.length;++o<s;){let s=n[o],c=s?.length;if(c>=t)c===t?n[o]=s:(n[o]=s.slice(0,t),i.numBatches=Math.max(i.numBatches,r[o].unshift(s.slice(t,c-t))));else{let r=e[o];e[o]=r.clone({nullable:!0}),n[o]=s?._changeLengthAndBackfillNullBitmap(t)??L({type:r.type,length:t,nullCount:t,nullBitmap:new Uint8Array(a)})}}return n}var jo,Mo=class e{constructor(...t){if(t.length===0)return this.batches=[],this.schema=new q([]),this._offsets=[0],this;let n,r;t[0]instanceof q&&(n=t.shift()),t[t.length-1]instanceof Uint32Array&&(r=t.pop());let i=t=>{if(t){if(t instanceof Po)return[t];if(t instanceof e)return t.batches;if(t instanceof I){if(t.type instanceof en)return[new Po(new q(t.type.children),t)]}else if(Array.isArray(t))return t.flatMap(e=>i(e));else if(typeof t[Symbol.iterator]==`function`)return[...t].flatMap(e=>i(e));else if(typeof t==`object`){let e=Object.keys(t),n=e.map(e=>new W([t[e]])),[,r]=Oo(new q(e.map((e,t)=>new J(String(e),n[t].type))),n);return r.length===0?[new Po(t)]:r}}return[]},a=t.flatMap(e=>i(e));if(n=n??a[0]?.schema??new q([]),!(n instanceof q))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);for(let e of a){if(!(e instanceof Po))throw TypeError(`Table constructor expects a [Schema, RecordBatch[]] pair.`);if(!Do(n,e.schema))throw TypeError(`Table and inner RecordBatch schemas must be equivalent.`)}this.schema=n,this.batches=a,this._offsets=r??Di(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>e+t.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=Ei(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}set(e,t){}indexOf(e,t){return-1}getByteLength(e){return 0}[Symbol.iterator](){return this.batches.length>0?zi.visit(new W(this.data)):[][Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(`,
9
+ `)}\n]`}concat(...t){let n=this.schema;return new e(n,this.data.concat(t.flatMap(({data:e})=>e)).map(e=>new Po(n,e)))}slice(t,n){let r=this.schema;return[t,n]=oi({length:this.numRows},t,n),new e(r,Oi(this.data,this._offsets,t,n).map(e=>new Po(r,e)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&e<this.schema.fields.length){let t=this.data.map(t=>t.children[e]);if(t.length===0){let{type:n}=this.schema.fields[e],r=L({type:n,length:0,nullCount:0});t.push(r._changeLengthAndBackfillNullBitmap(this.numRows))}return new W(t)}return null}setChild(e,t){return this.setChildAt(this.schema.fields?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=[...this.batches];if(t>-1&&t<this.numCols){n||=new W([L({type:new Mt,length:this.numRows})]);let e=r.fields.slice(),a=e[t].clone({type:n.type}),o=this.schema.fields.map((e,t)=>this.getChildAt(t));[e[t],o[t]]=[a,n],[r,i]=Oo(r,o)}return new e(r,i)}select(e){let t=this.schema.fields.reduce((e,t,n)=>e.set(t.name,n),new Map);return this.selectAt(e.map(e=>t.get(e)).filter(e=>e>-1))}selectAt(t){return new e(this.schema.selectAt(t),this.batches.map(e=>e.selectAt(t)))}assign(t){let n=this.schema.fields,[r,i]=t.schema.fields.reduce((e,t,r)=>{let[i,a]=e,o=n.findIndex(e=>e.name===t.name);return~o?a[o]=r:i.push(r),e},[[],[]]);return new e(...Oo(this.schema.assign(t.schema),[...n.map((e,t)=>[t,i[t]]).map(([e,n])=>n===void 0?this.getChildAt(e):t.getChildAt(n)),...r.map(e=>t.getChildAt(e))].filter(Boolean)))}};jo=Symbol.toStringTag,Mo[jo]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=ji(Ai),e.get=ji($r.getVisitFn(D.Struct)),e.set=Mi(ir.getVisitFn(D.Struct)),e.indexOf=Ni(Li.getVisitFn(D.Struct)),e.getByteLength=ji(qi.getVisitFn(D.Struct)),`Table`))(Mo.prototype);var No,Po=class e{constructor(...e){switch(e.length){case 2:if([this.schema]=e,!(this.schema instanceof q)||([,this.data=L({nullCount:0,type:new en(this.schema.fields),children:this.schema.fields.map(e=>L({type:e.type,nullCount:0}))})]=e,!(this.data instanceof I)))throw TypeError(`RecordBatch constructor expects a [Schema, Data] pair.`);[this.schema,this.data]=Fo(this.schema,this.data.children);break;case 1:{let[t]=e,{fields:n,children:r,length:i}=Object.keys(t).reduce((e,n,r)=>(e.children[r]=t[n],e.length=Math.max(e.length,t[n].length),e.fields[r]=J.new({name:n,type:t[n].type,nullable:!0}),e),{length:0,fields:[],children:[]}),a=new q(n),o=L({type:new en(n),length:i,children:r,nullCount:0});[this.schema,this.data]=Fo(a,o.children,i);break}default:throw TypeError(`RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.`)}}get dictionaries(){return this._dictionaries||=Io(this.schema.fields,this.data.children)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return $r.visit(this.data,e)}set(e,t){return ir.visit(this.data,e,t)}indexOf(e,t){return Li.visit(this.data,e,t)}getByteLength(e){return qi.visit(this.data,e)}[Symbol.iterator](){return zi.visit(new W([this.data]))}toArray(){return[...this]}concat(...e){return new Mo(this.schema,[this,...e])}slice(t,n){let[r]=new W([this.data]).slice(t,n).data;return new e(this.schema,r)}getChild(e){return this.getChildAt(this.schema.fields?.findIndex(t=>t.name===e))}getChildAt(e){return e>-1&&e<this.schema.fields.length?new W([this.data.children[e]]):null}setChild(e,t){return this.setChildAt(this.schema.fields?.findIndex(t=>t.name===e),t)}setChildAt(t,n){let r=this.schema,i=this.data;if(t>-1&&t<this.numCols){n||=new W([L({type:new Mt,length:this.numRows})]);let e=r.fields.slice(),a=i.children.slice(),o=e[t].clone({type:n.type});[e[t],a[t]]=[o,n.data[0]],r=new q(e,new Map(this.schema.metadata)),i=L({type:new en(e),children:a})}return new e(r,i)}select(t){let n=this.schema.select(t),r=new en(n.fields),i=[];for(let e of t){let t=this.schema.fields.findIndex(t=>t.name===e);~t&&(i[t]=this.data.children[t])}return new e(n,L({type:r,length:this.numRows,children:i}))}selectAt(t){let n=this.schema.selectAt(t),r=t.map(e=>this.data.children[e]).filter(Boolean);return new e(n,L({type:new en(n.fields),length:this.numRows,children:r}))}};No=Symbol.toStringTag,Po[No]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,`RecordBatch`))(Po.prototype);function Fo(e,t,n=t.reduce((e,t)=>Math.max(e,t.length),0)){let r=[...e.fields],i=[...t],a=(n+63&-64)>>3;for(let[o,s]of e.fields.entries()){let e=t[o];(!e||e.length!==n)&&(r[o]=s.clone({nullable:!0}),i[o]=e?._changeLengthAndBackfillNullBitmap(n)??L({type:s.type,length:n,nullCount:n,nullBitmap:new Uint8Array(a)}))}return[e.assign(r),L({type:new en(r),length:n,children:i})]}function Io(e,t,n=new Map){for(let r=-1,i=e.length;++r<i;){let i=e[r].type,a=t[r];if(O.isDictionary(i)){if(!n.has(i.id))a.dictionary&&n.set(i.id,a.dictionary);else if(n.get(i.id)!==a.dictionary)throw Error(`Cannot create Schema containing two different dictionaries with the same Id`)}i.children&&i.children.length>0&&Io(i.children,a.children,n)}return n}var Lo=class extends Po{constructor(e){let t=e.fields.map(e=>L({type:e.type})),n=L({type:new en(e.fields),nullCount:0,children:t});super(e,n)}},Ro;(function(e){e[e.BUFFER=0]=`BUFFER`})(Ro||={});var zo;(function(e){e[e.LZ4_FRAME=0]=`LZ4_FRAME`,e[e.ZSTD=1]=`ZSTD`})(zo||={});var Bo=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBodyCompression(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):zo.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):Ro.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,zo.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,Ro.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(t,n,r){return e.startBodyCompression(t),e.addCodec(t,n),e.addMethod(t,r),e.endBodyCompression(t)}},Vo=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}},Ho=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(e,t,n){return e.prep(8,16),e.writeInt64(n),e.writeInt64(t),e.offset()}},Uo=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsRecordBatch(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){let n=this.bb.__offset(this.bb_pos,6);return n?(t||new Ho).__init(this.bb.__vector(this.bb_pos+n)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let n=this.bb.__offset(this.bb_pos,8);return n?(t||new Vo).__init(this.bb.__vector(this.bb_pos+n)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new Bo).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}},Wo=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryBatch(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new Uo).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}},Go;(function(e){e[e.NONE=0]=`NONE`,e[e.Schema=1]=`Schema`,e[e.DictionaryBatch=2]=`DictionaryBatch`,e[e.RecordBatch=3]=`RecordBatch`,e[e.Tensor=4]=`Tensor`,e[e.SparseTensor=5]=`SparseTensor`})(Go||={});var Ko=class e{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(t,n){return(n||new e).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,n){return t.setPosition(t.position()+4),(n||new e).__init(t.readInt32(t.position())+t.position(),t)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ca.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Go.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){let n=this.bb.__offset(this.bb_pos,12);return n?(t||new sa).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,ca.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Go.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(t,n,r,i,a,o){return e.startMessage(t),e.addVersion(t,n),e.addHeaderType(t,r),e.addHeader(t,i),e.addBodyLength(t,a),e.addCustomMetadata(t,o),e.endMessage(t)}},qo=ra,Jo=new class extends A{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Ea.startNull(t),Ea.endNull(t)}visitInt(e,t){return da.startInt(t),da.addBitWidth(t,e.bitWidth),da.addIsSigned(t,e.isSigned),da.endInt(t)}visitFloat(e,t){return Sa.startFloatingPoint(t),Sa.addPrecision(t,e.precision),Sa.endFloatingPoint(t)}visitBinary(e,t){return pa.startBinary(t),pa.endBinary(t)}visitBool(e,t){return ma.startBool(t),ma.endBool(t)}visitUtf8(e,t){return Ma.startUtf8(t),Ma.endUtf8(t)}visitDecimal(e,t){return _a.startDecimal(t),_a.addScale(t,e.scale),_a.addPrecision(t,e.precision),_a.addBitWidth(t,e.bitWidth),_a.endDecimal(t)}visitDate(e,t){return ga.startDate(t),ga.addUnit(t,e.unit),ga.endDate(t)}visitTime(e,t){return Oa.startTime(t),Oa.addUnit(t,e.unit),Oa.addBitWidth(t,e.bitWidth),Oa.endTime(t)}visitTimestamp(e,t){let n=e.timezone&&t.createString(e.timezone)||void 0;return ka.startTimestamp(t),ka.addUnit(t,e.unit),n!==void 0&&ka.addTimezone(t,n),ka.endTimestamp(t)}visitInterval(e,t){return G.startInterval(t),G.addUnit(t,e.unit),G.endInterval(t)}visitList(e,t){return wa.startList(t),wa.endList(t)}visitStruct(e,t){return Da.startStruct_(t),Da.endStruct_(t)}visitUnion(e,t){ja.startTypeIdsVector(t,e.typeIds.length);let n=ja.createTypeIdsVector(t,e.typeIds);return ja.startUnion(t),ja.addMode(t,e.mode),ja.addTypeIds(t,n),ja.endUnion(t)}visitDictionary(e,t){let n=this.visit(e.indices,t);return fa.startDictionaryEncoding(t),fa.addId(t,new qo(e.id,0)),fa.addIsOrdered(t,e.isOrdered),n!==void 0&&fa.addIndexType(t,n),fa.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return ya.startFixedSizeBinary(t),ya.addByteWidth(t,e.byteWidth),ya.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return ba.startFixedSizeList(t),ba.addListSize(t,e.listSize),ba.endFixedSizeList(t)}visitMap(e,t){return Ta.startMap(t),Ta.addKeysSorted(t,e.keysSorted),Ta.endMap(t)}};function Yo(e,t=new Map){return new q(Qo(e,t),is(e.customMetadata),t)}function Xo(e){return new ds(e.count,es(e.columns),ts(e.columns))}function Zo(e){return new fs(Xo(e.data),e.id,e.isDelta)}function Qo(e,t){return(e.fields||[]).filter(Boolean).map(e=>J.fromJSON(e,t))}function $o(e,t){return(e.children||[]).filter(Boolean).map(e=>J.fromJSON(e,t))}function es(e){return(e||[]).reduce((e,t)=>[...e,new ms(t.count,ns(t.VALIDITY)),...es(t.children)],[])}function ts(e,t=[]){for(let n=-1,r=(e||[]).length;++n<r;){let r=e[n];r.VALIDITY&&t.push(new ps(t.length,r.VALIDITY.length)),r.TYPE&&t.push(new ps(t.length,r.TYPE.length)),r.OFFSET&&t.push(new ps(t.length,r.OFFSET.length)),r.DATA&&t.push(new ps(t.length,r.DATA.length)),t=ts(r.children,t)}return t}function ns(e){return(e||[]).reduce((e,t)=>e+ +(t===0),0)}function rs(e,t){let n,r,i,a,o,s;return!t||!(a=e.dictionary)?(o=os(e,$o(e,t)),i=new J(e.name,o,e.nullable,is(e.customMetadata))):t.has(n=a.id)?(r=(r=a.indexType)?as(r):new It,s=new sn(t.get(n),r,n,a.isOrdered),i=new J(e.name,s,e.nullable,is(e.customMetadata))):(r=(r=a.indexType)?as(r):new It,t.set(n,o=os(e,$o(e,t))),s=new sn(o,r,n,a.isOrdered),i=new J(e.name,s,e.nullable,is(e.customMetadata))),i||null}function is(e){return new Map(Object.entries(e||{}))}function as(e){return new Nt(e.isSigned,e.bitWidth)}function os(e,t){let n=e.type.name;switch(n){case`NONE`:return new Mt;case`null`:return new Mt;case`binary`:return new Kt;case`utf8`:return new qt;case`bool`:return new Jt;case`list`:return new $t((t||[])[0]);case`struct`:return new en(t||[]);case`struct_`:return new en(t||[])}switch(n){case`int`:{let t=e.type;return new Nt(t.isSigned,t.bitWidth)}case`floatingpoint`:{let t=e.type;return new Ht(Ze[t.precision])}case`decimal`:{let t=e.type;return new Yt(t.scale,t.precision,t.bitWidth)}case`date`:{let t=e.type;return new Xt(Qe[t.unit])}case`time`:{let t=e.type;return new Zt(T[t.unit],t.bitWidth)}case`timestamp`:{let t=e.type;return new Qt(T[t.unit],t.timezone)}case`interval`:{let t=e.type;return new k($e[t.unit])}case`union`:{let n=e.type;return new tn(Xe[n.mode],n.typeIds||[],t||[])}case`fixedsizebinary`:{let t=e.type;return new nn(t.byteWidth)}case`fixedsizelist`:{let n=e.type;return new rn(n.listSize,(t||[])[0])}case`map`:{let n=e.type;return new an((t||[])[0],n.keysSorted)}}throw Error(`Unrecognized type: "${n}"`)}var ss=ra,cs=oa,ls=aa,us=class e{constructor(e,t,n,r){this._version=t,this._headerType=n,this.body=new Uint8Array,r&&(this._createHeader=()=>r),this._bodyLength=typeof e==`number`?e:e.low}static fromJSON(t,n){let r=new e(0,Ye.V4,n);return r._createHeader=hs(t,n),r}static decode(t){t=new ls(w(t));let n=Ko.getRootAsMessage(t),r=n.bodyLength(),i=n.version(),a=n.headerType(),o=new e(r,i,a);return o._createHeader=gs(n,a),o}static encode(e){let t=new cs,n=-1;return e.isSchema()?n=q.encode(t,e.header()):e.isRecordBatch()?n=ds.encode(t,e.header()):e.isDictionaryBatch()&&(n=fs.encode(t,e.header())),Ko.startMessage(t),Ko.addVersion(t,Ye.V4),Ko.addHeader(t,n),Ko.addHeaderType(t,e.headerType),Ko.addBodyLength(t,new ss(e.bodyLength,0)),Ko.finishMessageBuffer(t,Ko.endMessage(t)),t.asUint8Array()}static from(t,n=0){if(t instanceof q)return new e(0,Ye.V4,E.Schema,t);if(t instanceof ds)return new e(n,Ye.V4,E.RecordBatch,t);if(t instanceof fs)return new e(n,Ye.V4,E.DictionaryBatch,t);throw Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===E.Schema}isRecordBatch(){return this.headerType===E.RecordBatch}isDictionaryBatch(){return this.headerType===E.DictionaryBatch}},ds=class{constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=typeof e==`number`?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}},fs=class{constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id=typeof t==`number`?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}},ps=class{constructor(e,t){this.offset=typeof e==`number`?e:e.low,this.length=typeof t==`number`?t:t.low}},ms=class{constructor(e,t){this.length=typeof e==`number`?e:e.low,this.nullCount=typeof t==`number`?t:t.low}};function hs(e,t){return(()=>{switch(t){case E.Schema:return q.fromJSON(e);case E.RecordBatch:return ds.fromJSON(e);case E.DictionaryBatch:return fs.fromJSON(e)}throw Error(`Unrecognized Message type: { name: ${E[t]}, type: ${t} }`)})}function gs(e,t){return(()=>{switch(t){case E.Schema:return q.decode(e.header(new Pa));case E.RecordBatch:return ds.decode(e.header(new Uo),e.version());case E.DictionaryBatch:return fs.decode(e.header(new Wo),e.version())}throw Error(`Unrecognized Message type: { name: ${E[t]}, type: ${t} }`)})}J.encode=js,J.decode=Es,J.fromJSON=rs,q.encode=As,q.decode=_s,q.fromJSON=Yo,ds.encode=Ms,ds.decode=vs,ds.fromJSON=Xo,fs.encode=Ns,fs.decode=ys,fs.fromJSON=Zo,ms.encode=Ps,ms.decode=xs,ps.encode=Fs,ps.decode=bs;function _s(e,t=new Map){return new q(ws(e,t),Ds(e),t)}function vs(e,t=Ye.V4){if(e.compression()!==null)throw Error(`Record batch compression not implemented`);return new ds(e.length(),Ss(e),Cs(e,t))}function ys(e,t=Ye.V4){return new fs(ds.decode(e.data(),t),e.id(),e.isDelta())}function bs(e){return new ps(e.offset(),e.length())}function xs(e){return new ms(e.length(),e.nullCount())}function Ss(e){let t=[];for(let n,r=-1,i=-1,a=e.nodesLength();++r<a;)(n=e.nodes(r))&&(t[++i]=ms.decode(n));return t}function Cs(e,t){let n=[];for(let r,i=-1,a=-1,o=e.buffersLength();++i<o;)(r=e.buffers(i))&&(t<Ye.V4&&(r.bb_pos+=8*(i+1)),n[++a]=ps.decode(r));return n}function ws(e,t){let n=[];for(let r,i=-1,a=-1,o=e.fieldsLength();++i<o;)(r=e.fields(i))&&(n[++a]=J.decode(r,t));return n}function Ts(e,t){let n=[];for(let r,i=-1,a=-1,o=e.childrenLength();++i<o;)(r=e.children(i))&&(n[++a]=J.decode(r,t));return n}function Es(e,t){let n,r,i,a,o,s;return!t||!(s=e.dictionary())?(i=ks(e,Ts(e,t)),r=new J(e.name(),i,e.nullable(),Ds(e))):t.has(n=s.id().low)?(a=(a=s.indexType())?Os(a):new It,o=new sn(t.get(n),a,n,s.isOrdered()),r=new J(e.name(),o,e.nullable(),Ds(e))):(a=(a=s.indexType())?Os(a):new It,t.set(n,i=ks(e,Ts(e,t))),o=new sn(i,a,n,s.isOrdered()),r=new J(e.name(),o,e.nullable(),Ds(e))),r||null}function Ds(e){let t=new Map;if(e)for(let n,r,i=-1,a=Math.trunc(e.customMetadataLength());++i<a;)(n=e.customMetadata(i))&&(r=n.key())!=null&&t.set(r,n.value());return t}function Os(e){return new Nt(e.isSigned(),e.bitWidth())}function ks(e,t){let n=e.typeType();switch(n){case K.NONE:return new Mt;case K.Null:return new Mt;case K.Binary:return new Kt;case K.Utf8:return new qt;case K.Bool:return new Jt;case K.List:return new $t((t||[])[0]);case K.Struct_:return new en(t||[])}switch(n){case K.Int:{let t=e.type(new da);return new Nt(t.isSigned(),t.bitWidth())}case K.FloatingPoint:return new Ht(e.type(new Sa).precision());case K.Decimal:{let t=e.type(new _a);return new Yt(t.scale(),t.precision(),t.bitWidth())}case K.Date:return new Xt(e.type(new ga).unit());case K.Time:{let t=e.type(new Oa);return new Zt(t.unit(),t.bitWidth())}case K.Timestamp:{let t=e.type(new ka);return new Qt(t.unit(),t.timezone())}case K.Interval:return new k(e.type(new G).unit());case K.Union:{let n=e.type(new ja);return new tn(n.mode(),n.typeIdsArray()||[],t||[])}case K.FixedSizeBinary:return new nn(e.type(new ya).byteWidth());case K.FixedSizeList:return new rn(e.type(new ba).listSize(),(t||[])[0]);case K.Map:{let n=e.type(new Ta);return new an((t||[])[0],n.keysSorted())}}throw Error(`Unrecognized type: "${K[n]}" (${n})`)}function As(e,t){let n=t.fields.map(t=>J.encode(e,t));Pa.startFieldsVector(e,n.length);let r=Pa.createFieldsVector(e,n),i=t.metadata&&t.metadata.size>0?Pa.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return sa.startKeyValue(e),sa.addKey(e,r),sa.addValue(e,i),sa.endKeyValue(e)})):-1;return Pa.startSchema(e),Pa.addFields(e,r),Pa.addEndianness(e,Is?la.Little:la.Big),i!==-1&&Pa.addCustomMetadata(e,i),Pa.endSchema(e)}function js(e,t){let n=-1,r=-1,i=-1,a=t.type,o=t.typeId;O.isDictionary(a)?(o=a.dictionary.typeId,i=Jo.visit(a,e),r=Jo.visit(a.dictionary,e)):r=Jo.visit(a,e);let s=(a.children||[]).map(t=>J.encode(e,t)),c=Na.createChildrenVector(e,s),l=t.metadata&&t.metadata.size>0?Na.createCustomMetadataVector(e,[...t.metadata].map(([t,n])=>{let r=e.createString(`${t}`),i=e.createString(`${n}`);return sa.startKeyValue(e),sa.addKey(e,r),sa.addValue(e,i),sa.endKeyValue(e)})):-1;return t.name&&(n=e.createString(t.name)),Na.startField(e),Na.addType(e,r),Na.addTypeType(e,o),Na.addChildren(e,c),Na.addNullable(e,!!t.nullable),n!==-1&&Na.addName(e,n),i!==-1&&Na.addDictionary(e,i),l!==-1&&Na.addCustomMetadata(e,l),Na.endField(e)}function Ms(e,t){let n=t.nodes||[],r=t.buffers||[];Uo.startNodesVector(e,n.length);for(let t of n.slice().reverse())ms.encode(e,t);let i=e.endVector();Uo.startBuffersVector(e,r.length);for(let t of r.slice().reverse())ps.encode(e,t);let a=e.endVector();return Uo.startRecordBatch(e),Uo.addLength(e,new ss(t.length,0)),Uo.addNodes(e,i),Uo.addBuffers(e,a),Uo.endRecordBatch(e)}function Ns(e,t){let n=ds.encode(e,t.data);return Wo.startDictionaryBatch(e),Wo.addId(e,new ss(t.id,0)),Wo.addIsDelta(e,t.isDelta),Wo.addData(e,n),Wo.endDictionaryBatch(e)}function Ps(e,t){return Ho.createFieldNode(e,new ss(t.length,0),new ss(t.nullCount,0))}function Fs(e,t){return Vo.createBuffer(e,new ss(t.offset,0),new ss(t.length,0))}var Is=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),Ls=e=>`Expected ${E[e]} Message in stream, but was null or length 0.`,Rs=e=>`Header pointer of flatbuffer-encoded ${E[e]} Message is null or length 0.`,zs=(e,t)=>`Expected to read ${e} metadata bytes, but only read ${t}.`,Bs=(e,t)=>`Expected to read ${e} bytes for message body, but only read ${t}.`,Vs=class{constructor(e){this.source=e instanceof Ya?e:new Ya(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Wa:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(Ls(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array;let t=w(this.source.read(e));if(t.byteLength<e)throw Error(Bs(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=E.Schema,n=this.readMessage(t)?.header();if(e&&!n)throw Error(Rs(t));return n}readMetadataLength(){let e=this.source.read(4),t=(e&&new aa(e))?.readInt32(0)||0;return{done:t===0,value:t}}readMetadata(e){let t=this.source.read(e);if(!t)return Wa;if(t.byteLength<e)throw Error(zs(e,t.byteLength));return{done:!1,value:us.decode(t)}}},Hs=class{constructor(e,t){this.source=e instanceof Xa?e:xe(e)?new eo(e,t):new Xa(e)}[Symbol.asyncIterator](){return this}next(){return y(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?Wa:e})}throw(e){return y(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return y(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return y(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(Ls(e));return t.value})}readMessageBody(e){return y(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array;let t=w(yield this.source.read(e));if(t.byteLength<e)throw Error(Bs(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(e=!1){return y(this,void 0,void 0,function*(){let t=E.Schema,n=(yield this.readMessage(t))?.header();if(e&&!n)throw Error(Rs(t));return n})}readMetadataLength(){return y(this,void 0,void 0,function*(){let e=yield this.source.read(4),t=(e&&new aa(e))?.readInt32(0)||0;return{done:t===0,value:t}})}readMetadata(e){return y(this,void 0,void 0,function*(){let t=yield this.source.read(e);if(!t)return Wa;if(t.byteLength<e)throw Error(zs(e,t.byteLength));return{done:!1,value:us.decode(t)}})}},Us=class extends Vs{constructor(e){super(new Uint8Array),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Ga?e:new Ga(e)}next(){let{_json:e}=this;if(!this._schema)return this._schema=!0,{done:!1,value:us.fromJSON(e.schema,E.Schema)};if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];return this._body=t.data.columns,{done:!1,value:us.fromJSON(t,E.DictionaryBatch)}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];return this._body=t.columns,{done:!1,value:us.fromJSON(t,E.RecordBatch)}}return this._body=[],Wa}readMessageBody(e){return t(this._body);function t(e){return(e||[]).reduce((e,n)=>[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE&&[n.TYPE]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw Error(Ls(e));return t.value}readSchema(){let e=E.Schema,t=this.readMessage(e),n=t?.header();if(!t||!n)throw Error(Rs(e));return n}},Ws=`ARROW1`,Gs=new Uint8Array(6);for(let e=0;e<6;e+=1)Gs[e]=Ws.codePointAt(e);function Ks(e,t=0){for(let n=-1,r=Gs.length;++n<r;)if(Gs[n]!==e[t+n])return!1;return!0}var qs=Gs.length,Js=qs+4,Ys=qs*2+4,Xs=class e extends Ka{constructor(e){super(),this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return S(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Ve.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Ve.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}static from(t){return t instanceof e?t:ye(t)?uc(t):xe(t)?fc(t):S(t)?y(this,void 0,void 0,function*(){return yield e.from(yield t)}):Se(t)||Te(t)||De(t)||ve(t)?Q(new Xa(t)):dc(new Ya(t))}static readAll(t){return t instanceof e?t.isSync()?cc(t):lc(t):ye(t)||ArrayBuffer.isView(t)||_e(t)||be(t)?cc(t):lc(t)}},Zs=class extends Xs{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return ee(this,arguments,function*(){yield x(yield*te(ne(this[Symbol.iterator]())))})}},Qs=class extends Xs{constructor(e){super(e),this._impl=e}readAll(){var e,t;return y(this,void 0,void 0,function*(){let n=[];try{for(var r=ne(this),i;i=yield r.next(),!i.done;){let e=i.value;n.push(e)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&(yield t.call(r))}finally{if(e)throw e.error}}return n})}[Symbol.iterator](){throw Error(`AsyncRecordBatchStreamReader is not Iterable`)}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},$s=class extends Zs{constructor(e){super(e),this._impl=e}},ec=class extends Qs{constructor(e){super(e),this._impl=e}},tc=class{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){let n=this._loadVectors(e,t,this.schema.fields),r=L({type:new en(this.schema.fields),length:e.length,children:n});return new Po(this.schema,r)}_loadDictionaryBatch(e,t){let{id:n,isDelta:r}=e,{dictionaries:i,schema:a}=this,o=i.get(n);if(r||!o){let i=a.dictionaries.get(n),s=this._loadVectors(e.data,t,[i]);return(o&&r?o.concat(new W(s)):new W(s)).memoize()}return o.memoize()}_loadVectors(e,t,n){return new co(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}},nc=class extends tc{constructor(e,t){super(t),this._reader=ye(e)?new Us(this._handle=e):new Vs(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=sc(this,e),(this.schema||=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Wa}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Wa}next(){if(this.closed)return Wa;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Lo(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},rc=class extends tc{constructor(e,t){super(t),this._reader=new Hs(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return y(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return y(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=sc(this,e),(this.schema||=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return y(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Wa})}return(e){return y(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Wa})}next(){return y(this,void 0,void 0,function*(){if(this.closed)return Wa;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,r)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let n=e.header(),r=yield t.readMessageBody(e.bodyLength),i=this._loadDictionaryBatch(n,r);this.dictionaries.set(n.id,i)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Lo(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return y(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},ic=class extends nc{constructor(e,t){super(e instanceof $a?e:new $a(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer?.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let e=this._reader.readMessage(E.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null}_readDictionaryBatch(e){let t=this._footer?.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let e=this._reader.readMessage(E.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}}_readFooter(){let{_handle:e}=this,t=e.size-Js,n=e.readInt32(t),r=e.readAt(t-n,n);return Va.decode(r)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer?.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},ac=class extends rc{constructor(e,...t){let n=typeof t[0]==`number`?void 0:t.shift(),r=t[0]instanceof Map?t.shift():void 0;super(e instanceof eo?e:new eo(e,n),r)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return y(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let e of this._footer.dictionaryBatches())e&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return y(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer?.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let e=yield this._reader.readMessage(E.RecordBatch);if(e?.isRecordBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength);return this._loadRecordBatch(t,n)}}return null})}_readDictionaryBatch(e){return y(this,void 0,void 0,function*(){let t=this._footer?.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let e=yield this._reader.readMessage(E.DictionaryBatch);if(e?.isDictionaryBatch()){let t=e.header(),n=yield this._reader.readMessageBody(e.bodyLength),r=this._loadDictionaryBatch(t,n);this.dictionaries.set(t.id,r)}}})}_readFooter(){return y(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Js,n=yield e.readInt32(t),r=yield e.readAt(t-n,n);return Va.decode(r)})}_readNextMessageAndValidate(e){return y(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},oc=class extends nc{constructor(e,t){super(e,t)}_loadVectors(e,t,n){return new lo(t,e.nodes,e.buffers,this.dictionaries).visitMany(n)}};function sc(e,t){return t&&typeof t.autoDestroy==`boolean`?t.autoDestroy:e.autoDestroy}function*cc(e){let t=Xs.from(e);try{if(!t.open({autoDestroy:!1}).closed)do yield t;while(!t.reset().open().closed)}finally{t.cancel()}}function lc(e){return ee(this,arguments,function*(){let t=yield x(Xs.from(e));try{if(!(yield x(t.open({autoDestroy:!1}))).closed)do yield yield x(t);while(!(yield x(t.reset().open())).closed)}finally{yield x(t.cancel())}})}function uc(e){return new Zs(new oc(e))}function dc(e){let t=e.peek(qs+7&-8);return t&&t.byteLength>=4?Ks(t)?new $s(new ic(e.read())):new Zs(new nc(e)):new Zs(new nc(function*(){}()))}function Q(e){return y(this,void 0,void 0,function*(){let t=yield e.peek(qs+7&-8);return t&&t.byteLength>=4?Ks(t)?new $s(new ic(yield e.read())):new Qs(new rc(e)):new Qs(new rc(function(){return ee(this,arguments,function*(){})}()))})}function fc(e){return y(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),n=new eo(e,t);return t>=Ys&&Ks(yield n.readAt(0,qs+7&-8))?new ec(new ac(n)):new Qs(new rc(n))})}var pc=class e extends A{constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...t){let n=e=>e.flatMap(e=>Array.isArray(e)?n(e):e instanceof Po?e.data.children:e.data),r=new e;return r.visitMany(n(t)),r}visit(e){if(e instanceof W)return this.visitMany(e.data),this;let{type:t}=e;if(!O.isDictionary(t)){let{length:n,nullCount:r}=e;if(n>2147483647)throw RangeError(`Cannot write arrays larger than 2^31 - 1 in length`);O.isNull(t)||mc.call(this,r<=0?new Uint8Array:vi(e.offset,n,e.nullBitmap)),this.nodes.push(new ms(n,r))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};function mc(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new ps(this._byteLength,t)),this._byteLength+=t,this}function hc(e){let{type:t,length:n,typeIds:r,valueOffsets:i}=e;if(mc.call(this,r),t.mode===Xe.Sparse)return bc.call(this,e);if(t.mode===Xe.Dense){if(e.offset<=0)return mc.call(this,i),bc.call(this,e);{let a=r.reduce((e,t)=>Math.max(e,t),r[0]),o=new Int32Array(a+1),s=new Int32Array(a+1).fill(-1),c=new Int32Array(n),l=ze(-i[0],n,i);for(let e,t,i=-1;++i<n;)(t=s[e=r[i]])===-1&&(t=s[e]=l[e]),c[i]=l[i]-t,++o[e];mc.call(this,c);for(let r,i=-1,a=t.children.length;++i<a;)if(r=e.children[i]){let e=t.typeIds[i],a=Math.min(n,o[e]);this.visit(r.slice(s[e],a))}}}return this}function gc(e){let t;return e.nullCount>=e.length?mc.call(this,new Uint8Array):(t=e.values)instanceof Uint8Array?mc.call(this,vi(e.offset,e.length,t)):mc.call(this,yi(e.values))}function _c(e){return mc.call(this,e.values.subarray(0,e.length*e.stride))}function vc(e){let{length:t,values:n,valueOffsets:r}=e,i=r[0],a=r[t],o=Math.min(a-i,n.byteLength-i);return mc.call(this,ze(-r[0],t,r)),mc.call(this,n.subarray(i,i+o)),this}function yc(e){let{length:t,valueOffsets:n}=e;return n&&mc.call(this,ze(n[0],t,n)),this.visit(e.children[0])}function bc(e){return this.visitMany(e.type.children.map((t,n)=>e.children[n]).filter(Boolean))[0]}pc.prototype.visitBool=gc,pc.prototype.visitInt=_c,pc.prototype.visitFloat=_c,pc.prototype.visitUtf8=vc,pc.prototype.visitBinary=vc,pc.prototype.visitFixedSizeBinary=_c,pc.prototype.visitDate=_c,pc.prototype.visitTimestamp=_c,pc.prototype.visitTime=_c,pc.prototype.visitDecimal=_c,pc.prototype.visitList=yc,pc.prototype.visitStruct=bc,pc.prototype.visitUnion=hc,pc.prototype.visitInterval=_c,pc.prototype.visitFixedSizeList=yc,pc.prototype.visitMap=yc;var xc=class extends Ka{constructor(e){super(),this._position=0,this._started=!1,this._sink=new Ja,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,ge(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy==`boolean`?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat==`boolean`?e.writeLegacyIpcFormat:!1}static throughNode(e){throw Error(`"throughNode" not available in this environment`)}static throughDOM(e,t){throw Error(`"throughDOM" not available in this environment`)}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return S(e)?e.then(e=>this.writeAll(e)):ve(e)?Tc(this,e):wc(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof Ja?this._sink=e:(this._sink=new Ja,e&&we(e)?this.toDOMStream({type:`bytes`}).pipeTo(e):e&&Ee(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,(!t||!Do(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(!this._sink)throw Error(`RecordBatchWriter is closed`);if(e==null||e instanceof Mo&&!(t=e.schema)||e instanceof Po&&!(t=e.schema))return this.finish()&&void 0;if(t&&!Do(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Po?e instanceof Lo||this._writeRecordBatch(e):e instanceof Mo?this.writeAll(e.batches):_e(e)&&this.writeAll(e)}_writeMessage(e,t=8){let n=t-1,r=us.encode(e),i=r.byteLength,a=this._writeLegacyIpcFormat?4:8,o=i+a+n&~n,s=o-i-a;return e.headerType===E.RecordBatch?this._recordBatchBlocks.push(new Ua(o,e.bodyLength,this._position)):e.headerType===E.DictionaryBatch&&this._dictionaryBlocks.push(new Ua(o,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(o-a)),i>0&&this._write(r),this._writePadding(s)}_write(e){if(this._started){let t=w(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(us.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Gs)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:n,bufferRegions:r,buffers:i}=pc.assemble(e),a=new ds(e.numRows,n,r),o=us.from(a,t);return this._writeDictionaries(e)._writeMessage(o)._writeBodyBuffers(i)}_writeDictionaryBatch(e,t,n=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:r,nodes:i,bufferRegions:a,buffers:o}=pc.assemble(new W([e])),s=new fs(new ds(e.length,i,a),t,n),c=us.from(s,r);return this._writeMessage(c)._writeBodyBuffers(o)}_writeBodyBuffers(e){let t,n,r;for(let i=-1,a=e.length;++i<a;)(t=e[i])&&(n=t.byteLength)>0&&(this._write(t),(r=(n+7&-8)-n)>0&&this._writePadding(r));return this}_writeDictionaries(e){for(let[t,n]of e.dictionaries){let e=this._dictionaryDeltaOffsets.get(t)||0;if(e===0||(n=n?.slice(e)).length>0)for(let r of n.data)this._writeDictionaryBatch(r,t,e>0),e+=r.length}return this}},Sc=class e extends xc{static writeAll(t,n){let r=new e(n);return S(t)?t.then(e=>r.writeAll(e)):ve(t)?Tc(r,t):wc(r,t)}},Cc=class e extends xc{static writeAll(t){let n=new e;return S(t)?t.then(e=>n.writeAll(e)):ve(t)?Tc(n,t):wc(n,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Va.encode(new Va(e,Ye.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};function wc(e,t){let n=t;t instanceof Mo&&(n=t.batches,e.reset(void 0,t.schema));for(let t of n)e.write(t);return e.finish()}function Tc(e,t){var n,r,i,a;return y(this,void 0,void 0,function*(){try{for(n=ne(t);r=yield n.next(),!r.done;){let t=r.value;e.write(t)}}catch(e){i={error:e}}finally{try{r&&!r.done&&(a=n.return)&&(yield a.call(n))}finally{if(i)throw i.error}}return e.finish()})}function Ec(e){let t=Xs.from(e);return S(t)?t.then(e=>Ec(e)):t.isAsync()?t.readAll().then(e=>new Mo(e)):new Mo(t.readAll())}function Dc(e,t=`stream`){return(t===`stream`?Sc:Cc).writeAll(e).toUint8Array(!0)}var Oc=c(u()),kc=c(h()),Ac=c(v()),jc=function(){function e(e,t,n,r){var i=this;this.getCell=function(e,t){var n=e<i.headerRows&&t<i.headerColumns,r=e>=i.headerRows&&t<i.headerColumns,a=e<i.headerRows&&t>=i.headerColumns;if(n){var o=[`blank`];return t>0&&o.push(`level`+e),{type:`blank`,classNames:o.join(` `),content:``}}else if(a){var s=t-i.headerColumns,o=[`col_heading`,`level`+e,`col`+s];return{type:`columns`,classNames:o.join(` `),content:i.getContent(i.columnsTable,s,e)}}else if(r){var c=e-i.headerRows,o=[`row_heading`,`level`+t,`row`+c];return{type:`index`,id:`T_${i.uuid}level${t}_row${c}`,classNames:o.join(` `),content:i.getContent(i.indexTable,c,t)}}else{var c=e-i.headerRows,s=t-i.headerColumns,o=[`data`,`row`+c,`col`+s],l=i.styler?i.getContent(i.styler.displayValuesTable,c,s):i.getContent(i.dataTable,c,s);return{type:`data`,id:`T_${i.uuid}row${c}_col${s}`,classNames:o.join(` `),content:l}}},this.getContent=function(e,t,n){var r=e.getChildAt(n);if(r===null)return``;switch(i.getColumnTypeId(e,n)){case D.Timestamp:return i.nanosToDate(r.get(t));default:return r.get(t)}},this.dataTable=Ec(e),this.indexTable=Ec(t),this.columnsTable=Ec(n),this.styler=r?{caption:r.caption,displayValuesTable:Ec(r.displayValues),styles:r.styles,uuid:r.uuid}:void 0}return Object.defineProperty(e.prototype,"rows",{get:function(){return this.indexTable.numRows+this.columnsTable.numCols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return this.indexTable.numCols+this.columnsTable.numRows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerRows",{get:function(){return this.rows-this.dataRows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headerColumns",{get:function(){return this.columns-this.dataColumns},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataRows",{get:function(){return this.dataTable.numRows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataColumns",{get:function(){return this.dataTable.numCols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uuid",{get:function(){return this.styler&&this.styler.uuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"caption",{get:function(){return this.styler&&this.styler.caption},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return this.styler&&this.styler.styles},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"table",{get:function(){return this.dataTable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.indexTable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnTable",{get:function(){return this.columnsTable},enumerable:!1,configurable:!0}),e.prototype.serialize=function(){return{data:Dc(this.dataTable),index:Dc(this.indexTable),columns:Dc(this.columnsTable)}},e.prototype.getColumnTypeId=function(e,t){return e.schema.fields[t].type.typeId},e.prototype.nanosToDate=function(e){return new Date(e/1e6)},e}(),Mc=function(){return Mc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mc.apply(this,arguments)},Nc;(function(e){e.COMPONENT_READY=`streamlit:componentReady`,e.SET_COMPONENT_VALUE=`streamlit:setComponentValue`,e.SET_FRAME_HEIGHT=`streamlit:setFrameHeight`})(Nc||={});var Pc=function(){function e(){}return e.API_VERSION=1,e.RENDER_EVENT=`streamlit:render`,e.events=new EventTarget,e.registeredMessageListener=!1,e.setComponentReady=function(){e.registeredMessageListener||=(window.addEventListener(`message`,e.onMessageEvent),!0),e.sendBackMsg(Nc.COMPONENT_READY,{apiVersion:e.API_VERSION})},e.setFrameHeight=function(t){t===void 0&&(t=document.body.scrollHeight),t!==e.lastFrameHeight&&(e.lastFrameHeight=t,e.sendBackMsg(Nc.SET_FRAME_HEIGHT,{height:t}))},e.setComponentValue=function(t){var n;t instanceof jc?(n=`dataframe`,t=t.serialize()):Ic(t)?(n=`bytes`,t=new Uint8Array(t.buffer)):t instanceof ArrayBuffer?(n=`bytes`,t=new Uint8Array(t)):n=`json`,e.sendBackMsg(Nc.SET_COMPONENT_VALUE,{value:t,dataType:n})},e.onMessageEvent=function(t){switch(t.data.type){case e.RENDER_EVENT:e.onRenderMessage(t.data);break}},e.onRenderMessage=function(t){var n=t.args;n??=(console.error(`Got null args in onRenderMessage. This should never happen`),{});var r=t.dfs&&t.dfs.length>0?e.argsDataframeToObject(t.dfs):{};n=Mc(Mc({},n),r);var i=!!t.disabled,a=t.theme;a&&Fc(a);var o={disabled:i,args:n,theme:a},s=new CustomEvent(e.RENDER_EVENT,{detail:o});e.events.dispatchEvent(s)},e.argsDataframeToObject=function(t){var n=t.map(function(t){var n=t.key,r=t.value;return[n,e.toArrowTable(r)]});return Object.fromEntries(n)},e.toArrowTable=function(e){var t,n=(t=e.data,t.data),r=t.index,i=t.columns,a=t.styler;return new jc(n,r,i,a)},e.sendBackMsg=function(e,t){window.parent.postMessage(Mc({isStreamlitMessage:!0,type:e},t),`*`)},e}(),Fc=function(e){var t=document.createElement(`style`);document.head.appendChild(t),t.innerHTML=`
10
+ :root {
11
+ --primary-color: ${e.primaryColor};
12
+ --background-color: ${e.backgroundColor};
13
+ --secondary-background-color: ${e.secondaryBackgroundColor};
14
+ --text-color: ${e.textColor};
15
+ --font: ${e.font};
16
+ }
17
+
18
+ body {
19
+ background-color: var(--background-color);
20
+ color: var(--text-color);
21
+ }
22
+ `};function Ic(e){var t=!1;try{t=e instanceof BigInt64Array||e instanceof BigUint64Array}catch{}return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array||t}var Lc=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();(function(e){Lc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){Pc.setFrameHeight()},t.prototype.componentDidUpdate=function(){Pc.setFrameHeight()},t})(Oc.PureComponent);function Rc(e){return(0,Ac.default)(function(t){Lc(n,t);function n(e){var n=t.call(this,e)||this;return n.componentDidMount=function(){Pc.events.addEventListener(Pc.RENDER_EVENT,n.onRenderEvent),Pc.setComponentReady()},n.componentDidUpdate=function(){n.state.componentError!=null&&Pc.setFrameHeight()},n.componentWillUnmount=function(){Pc.events.removeEventListener(Pc.RENDER_EVENT,n.onRenderEvent)},n.onRenderEvent=function(e){n.setState({renderData:e.detail})},n.state={renderData:void 0,componentError:void 0},n}return n.prototype.render=function(){return this.state.componentError==null?this.state.renderData==null?null:Oc.createElement(e,{width:window.innerWidth,disabled:this.state.renderData.disabled,args:this.state.renderData.args,theme:this.state.renderData.theme}):Oc.createElement(`div`,null,Oc.createElement(`h1`,null,`Component Error`),Oc.createElement(`span`,null,this.state.componentError.message))},n.getDerivedStateFromError=function(e){return{componentError:e}},n}(Oc.PureComponent),e)}var zc=o((e=>{var t=u(),n=Symbol.for(`react.element`),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(e,t,o){var s,c={},l=null,u=null;for(s in o!==void 0&&(l=``+o),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)r.call(t,s)&&!a.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:i.current}}e.jsx=o,e.jsxs=o})),Bc=o(((e,t)=>{t.exports=zc()}))();function $(e,t,n){let r=0,i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){let e=i.currentNode;if(e===t)return r+n;r+=e.textContent?.length??0}return r+n}function Vc(e,t,n){for(let{annotation:r}of Object.values(n))for(let n of r)if(e<n.end&&t>n.start)return!0;return!1}function Hc(e,t){let n=[];for(let[e,{color:r,annotation:i}]of Object.entries(t))i.forEach((t,i)=>n.push({...t,label:e,color:r,annIdx:i}));n.sort((e,t)=>e.start-t.start);let r=[],i=0;for(let t of n)i>t.start||(t.start>i&&r.push({kind:`plain`,start:i,end:t.start,text:e.slice(i,t.start)}),r.push({kind:`annotated`,start:t.start,end:t.end,text:e.slice(t.start,t.end),label:t.label,color:t.color,annIdx:t.annIdx}),i=t.end);return i<e.length&&r.push({kind:`plain`,start:i,end:e.length,text:e.slice(i)}),r}function Uc({args:e}){let{text:t,label_dict:n}=e,[r,i]=(0,Oc.useState)(()=>{let e={};for(let[t,r]of Object.entries(n))e[t]={color:r.color,annotation:r.annotation??[]};return e}),[a,o]=(0,Oc.useState)(null),[s,c]=(0,Oc.useState)(`Select an entity, then highlight text.`),l=(0,Oc.useRef)(null),u=(0,Oc.useRef)(null);(0,Oc.useEffect)(()=>{Pc.setComponentValue(r)},[r]),(0,Oc.useEffect)(()=>{Pc.setFrameHeight()});let d=(0,Oc.useCallback)((e,t)=>{i(n=>{let r=n[e],i=[...r.annotation,t].sort((e,t)=>e.start-t.start);return{...n,[e]:{...r,annotation:i}}})},[]),f=(0,Oc.useCallback)((e,t)=>{i(n=>{let r=n[e];return{...n,[e]:{...r,annotation:r.annotation.filter((e,n)=>n!==t)}}})},[]),p=(0,Oc.useCallback)(e=>{let t=e.target,n=t.getAttribute(`data-label`),r=t.getAttribute(`data-ann-idx`);u.current=n!==null&&r!==null?{label:n,annIdx:parseInt(r,10)}:null},[]),m=(0,Oc.useCallback)(e=>{let n=window.getSelection();if(!(n?.toString()??``)){let t=e.target,r=t.getAttribute(`data-label`),i=t.getAttribute(`data-ann-idx`),a=u.current;r!==null&&i!==null&&a?.label===r&&a.annIdx===parseInt(i,10)&&(f(r,parseInt(i,10)),c(`Removed annotation from "${r}".`)),n?.removeAllRanges();return}if(!a){c(`Select an entity first.`),n?.removeAllRanges();return}let i=l.current;if(!i||!n||n.rangeCount===0)return;let o=n.getRangeAt(0),s=$(i,o.startContainer,o.startOffset),p=$(i,o.endContainer,o.endOffset);for(s>p&&([s,p]=[p,s]);s<p&&/\s/.test(t[s]);)s++;for(;p>s&&/\s/.test(t[p-1]);)p--;if(s>=p){n.removeAllRanges();return}if(/\w/.test(t[s]))for(;s>0&&/\w/.test(t[s-1]);)s--;if(p>0&&/\w/.test(t[p-1]))for(;p<t.length&&/\w/.test(t[p]);)p++;if(Vc(s,p,r)){c(`Warning: span overlaps an existing annotation.`),n.removeAllRanges();return}let m=t.slice(s,p);d(a,{start:s,end:p,value:m}),c(`"${m}" → ${a}`),n.removeAllRanges()},[a,r,t,d,f]),h=Hc(t,r);return(0,Bc.jsxs)(`div`,{style:{fontFamily:`sans-serif`,padding:`8px 12px`},children:[(0,Bc.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`8px`,marginBottom:`12px`},children:Object.entries(r).map(([e,{color:t}])=>{let n=a===e;return(0,Bc.jsx)(`button`,{onClick:()=>o(n?null:e),style:{background:t,color:`#fff`,border:n?`2px solid #000`:`2px solid transparent`,borderRadius:`4px`,padding:`4px 12px`,cursor:`pointer`,fontWeight:n?`bold`:`normal`,transform:n?`scale(1.05)`:`scale(1)`,transition:`transform 0.1s, border-color 0.1s`,textShadow:`0 1px 2px rgba(0,0,0,0.4)`},children:e},e)})}),(0,Bc.jsx)(`div`,{ref:l,onMouseDown:p,onMouseUp:m,style:{whiteSpace:`pre-wrap`,lineHeight:`1.9`,fontSize:`14px`,border:`1px solid #ddd`,borderRadius:`4px`,padding:`12px`,cursor:`text`,userSelect:`text`},children:h.map((e,t)=>e.kind===`annotated`?(0,Bc.jsx)(`span`,{"data-start":e.start,"data-end":e.end,"data-label":e.label,"data-ann-idx":e.annIdx,title:`${e.label} — click to remove`,style:{backgroundColor:e.color,borderRadius:`3px`,padding:`1px 3px`,cursor:`pointer`,color:`#fff`,textShadow:`0 1px 2px rgba(0,0,0,0.35)`},children:e.text},t):(0,Bc.jsx)(`span`,{"data-start":e.start,"data-end":e.end,children:e.text},t))}),(0,Bc.jsx)(`div`,{style:{marginTop:`6px`,fontSize:`12px`,color:`#666`,minHeight:`16px`,fontStyle:`italic`},children:s})]})}var Wc=Rc(Uc);kc.createRoot(document.getElementById(`root`)).render((0,Bc.jsx)(Oc.StrictMode,{children:(0,Bc.jsx)(Wc,{})}));
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Struggle Annotator</title>
7
+ <script type="module" crossorigin src="/assets/index-YXQVbJmE.js"></script>
8
+ </head>
9
+ <body>
10
+ <div id="root"></div>
11
+ </body>
12
+ </html>
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.4
2
+ Name: struggle-annotator
3
+ Version: 0.1.0
4
+ Summary: Streamlit custom component for interactive NER-style text annotation
5
+ License: MIT
6
+ Requires-Python: >=3.9
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: streamlit>=1.28
9
+ Provides-Extra: dev
10
+ Requires-Dist: build; extra == "dev"
11
+ Requires-Dist: twine; extra == "dev"
12
+
13
+ # Struggle Annotator
14
+
15
+ A Streamlit custom component for interactive text annotation, useful for NER-style labeling tasks. The Python wrapper is published as `struggle_annotator`; the frontend is built with TypeScript and React per the standard Streamlit Components pattern.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install struggle-annotator
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ```python
26
+ import streamlit as st
27
+ from struggle_annotator import txt_annotator
28
+
29
+ text = (
30
+ "Yesterday, at 3 PM, Emily Johnson and Michael Smith met at the Central Park "
31
+ "in New York to discuss the merger between TechCorp and Global Solutions.\n\n"
32
+ "The deal, worth approximately 500 million dollars, is expected to "
33
+ "significantly impact the tech industry. Later, at 6 PM, they joined a "
34
+ "conference call with the CEO of TechCorp, David Brown, who was in London "
35
+ "for a technology summit. During the call, they discussed the market trends "
36
+ "in Asia and Europe and planned for the next quarterly meeting, which is "
37
+ "scheduled for January 15th, 2024, in Paris."
38
+ )
39
+
40
+ label_dict = {
41
+ "Personal names": {"color": "red"},
42
+ "Organizations": {"color": "blue"},
43
+ "Locations": {"color": "green"},
44
+ "Time": {"color": "orange"},
45
+ "Money": {"color": "purple"},
46
+ }
47
+
48
+ label_dict = txt_annotator(text, label_dict)
49
+ st.json(label_dict)
50
+ ```
51
+
52
+ ## UI Layout
53
+
54
+ The component renders two stacked regions:
55
+
56
+ 1. **Top — Entity legend.** One button per entity, styled with that entity's color. Clicking a button makes it the *active* entity; the active button is visually emphasized (border + slight scale).
57
+ 2. **Bottom — Annotatable document.** The full `text` is shown with any existing annotations highlighted in their entity's color. Below the text, a live status line shows the currently selected span and the active label.
58
+
59
+ ## API
60
+
61
+ ### Signature
62
+
63
+ ```python
64
+ txt_annotator(text: str, label_dict: dict, key: str | None = None) -> dict
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ - **`text`** (`str`): The raw text to annotate. Treated as a Python string; offsets are measured in Python `str` indices (UTF-16-independent, code-point–based).
70
+ - **`label_dict`** (`dict[str, dict]`): Defines entities. Each key is the label name; each value must contain:
71
+ - `color` (`str`, required): Any valid CSS color (`"red"`, `"#ff8800"`, `"rgb(0, 128, 255)"`).
72
+ - `annotation` (`list[dict]`, optional): Pre-existing spans rendered on load. Each entry has the shape `{"start": int, "end": int, "value": str}`. If omitted, it is initialized to `[]`.
73
+ - **`key`** (`str`, optional): Standard Streamlit component key. Required if you render multiple annotators on the same page.
74
+
75
+ ### Returns
76
+
77
+ The same `label_dict` shape, with every entity's `annotation` list reflecting the current state of the UI. The function returns on every interaction (Streamlit's standard component re-run model), so the latest annotations are always available after the call.
78
+
79
+ ### Offsets
80
+
81
+ - Half-open interval `[start, end)`, matching Python slicing: `text[start:end] == value`.
82
+ - Indices are over the raw `text` string, including newlines and whitespace.
83
+
84
+ ## Annotation Workflow
85
+
86
+ 1. The user clicks an entity button in the legend. That entity becomes active.
87
+ 2. The user selects a span of text with the mouse.
88
+ 3. On `mouseup`, leading/trailing whitespace is trimmed from the selection. If the trimmed span is empty, the selection is ignored.
89
+ 4. The trimmed span is highlighted in the active entity's color and appended to that entity's `annotation` list.
90
+ 5. The status line below the text updates to show the selected text and label.
91
+ 6. To remove an annotation, the user clicks an existing highlighted span (a single click with no drag). The highlight is removed and the corresponding entry is deleted from `label_dict`.
92
+
93
+ If text is selected while **no** entity is active, the selection is ignored and a hint is shown in the status line ("Select an entity first").
94
+
95
+ ### Overlap Policy
96
+
97
+ New spans that overlap an existing annotation are **rejected** by default, and a brief warning is shown in the status line. This avoids ambiguous nested annotations in v1. (Allowing nesting or replacement is out of scope for the initial release; see *Non-goals* below.)
98
+
99
+ ### Click vs. Drag
100
+
101
+ A click on a highlighted span is interpreted as "remove" only when the `mousedown` and `mouseup` positions are within the same span and no selection range was produced. Any drag that produces a non-empty selection is treated as a new annotation attempt, never as a remove.
102
+
103
+ ## State Model
104
+
105
+ The component uses Streamlit's standard component value mechanism. Internally, the frontend keeps its own annotation state and sends the updated `label_dict` back to Python on every change. Streamlit re-runs the script with the new return value; no `st.session_state` plumbing is required from the caller.
106
+
107
+ If you want to persist annotations across page reloads or sessions, store the returned `label_dict` in `st.session_state` or write it to disk yourself.
108
+
109
+ ## Data Examples
110
+
111
+ ### Input
112
+
113
+ ```python
114
+ label_dict = {
115
+ "Personal names": {"color": "red"},
116
+ "Organizations": {"color": "blue"},
117
+ "Locations": {"color": "green"},
118
+ "Time": {"color": "orange"},
119
+ "Money": {"color": "purple"},
120
+ }
121
+ ```
122
+
123
+ ### Output (after annotation)
124
+
125
+ ```python
126
+ {
127
+ "Personal names": {
128
+ "color": "red",
129
+ "annotation": [
130
+ {"start": 20, "end": 33, "value": "Emily Johnson"},
131
+ {"start": 38, "end": 51, "value": "Michael Smith"},
132
+ {"start": 327, "end": 338, "value": "David Brown"},
133
+ ],
134
+ },
135
+ "Organizations": {
136
+ "color": "blue",
137
+ "annotation": [
138
+ {"start": 118, "end": 126, "value": "TechCorp"},
139
+ {"start": 131, "end": 147, "value": "Global Solutions"},
140
+ ],
141
+ },
142
+ "Locations": {
143
+ "color": "green",
144
+ "annotation": [
145
+ {"start": 63, "end": 75, "value": "Central Park"},
146
+ {"start": 79, "end": 87, "value": "New York"},
147
+ {"start": 351, "end": 357, "value": "London"},
148
+ {"start": 436, "end": 440, "value": "Asia"},
149
+ {"start": 445, "end": 451, "value": "Europe"},
150
+ {"start": 542, "end": 547, "value": "Paris"},
151
+ ],
152
+ },
153
+ "Time": {
154
+ "color": "orange",
155
+ "annotation": [
156
+ {"start": 0, "end": 9, "value": "Yesterday"},
157
+ {"start": 14, "end": 18, "value": "3 PM"},
158
+ {"start": 265, "end": 269, "value": "6 PM"},
159
+ {"start": 519, "end": 531, "value": "January 15th"},
160
+ {"start": 533, "end": 537, "value": "2024"},
161
+ ],
162
+ },
163
+ "Money": {
164
+ "color": "purple",
165
+ "annotation": [
166
+ {"start": 179, "end": 198, "value": "500 million dollars"},
167
+ ],
168
+ },
169
+ }
170
+ ```
171
+
172
+ Annotations within each entity are sorted by `start` ascending. Key order within each annotation is `start`, `end`, `value`.
173
+
174
+ ## Non-goals (v1)
175
+
176
+ - Nested or overlapping annotations.
177
+ - Relation annotation between spans.
178
+ - Multi-document workflows or document navigation.
179
+ - Keyboard shortcuts (planned for a future release).
180
+ - Annotation history / undo-redo beyond the most recent action.
181
+
182
+ ## Development
183
+
184
+ The frontend lives in `frontend/` (TypeScript + React, built with Vite). The Python wrapper in `struggle_annotator/__init__.py` declares the component via `streamlit.components.v1.declare_component` and re-exports `txt_annotator`.
185
+
186
+ ```bash
187
+ # Frontend dev
188
+ cd frontend
189
+ npm install
190
+ npm run dev
191
+
192
+ # Python (editable install)
193
+ pip install -e .
194
+ ```
195
+
196
+ Set `_RELEASE = False` in `struggle_annotator/__init__.py` during local development to point at the Vite dev server.
@@ -0,0 +1,7 @@
1
+ struggle_annotator/__init__.py,sha256=M-ZuAjKDaQ4cgRJecf8CFu6Z4chkasxniD27OqLzYGM,1650
2
+ struggle_annotator/frontend/build/index.html,sha256=SuXZZYlO_i_PCPyvYPWW2bZWq4z1Ftk1DVV_NQEvSIA,329
3
+ struggle_annotator/frontend/build/assets/index-YXQVbJmE.js,sha256=MTCig9Ekfok5zAkH1Yv61lwRARlA1Waty6udoq7B4lQ,321050
4
+ struggle_annotator-0.1.0.dist-info/METADATA,sha256=svX3f6sYz0Q8aJCXlXCN6UsafRRMcgVUlVw6rEl037o,8178
5
+ struggle_annotator-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ struggle_annotator-0.1.0.dist-info/top_level.txt,sha256=9rPSEUFqz1OZC-iZpuvuNLL-1mlH4dNbGw4vLXS8aIc,19
7
+ struggle_annotator-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ struggle_annotator