diff --git a/assets/data_table/main.js b/assets/data_table/main.js index b4b827cf..30402304 100644 --- a/assets/data_table/main.js +++ b/assets/data_table/main.js @@ -41,6 +41,7 @@ const headerIcons = { number: GridColumnIcon.HeaderNumber, uri: GridColumnIcon.HeaderUri, date: GridColumnIcon.HeaderDate, + list: GridColumnIcon.HeaderNumber, }; const cellKind = { @@ -48,6 +49,7 @@ const cellKind = { number: GridCellKind.Number, uri: GridCellKind.Uri, date: GridCellKind.Text, + list: GridCellKind.Number, }; const theme = { @@ -95,7 +97,7 @@ function App({ ctx, data }) { id: id, type: column.type, icon: headerIcons[column.type] || GridColumnIcon.HeaderString, - hasMenu: true, + hasMenu: column.type !== "list", summary: summary, }; }); @@ -568,7 +570,7 @@ function SearchButton({ toggleSearch }) { aria-label="search" onClick={toggleSearch} > - + ); diff --git a/lib/assets/data_table/build/main.js b/lib/assets/data_table/build/main.js index 70207aea..4db86fb5 100644 --- a/lib/assets/data_table/build/main.js +++ b/lib/assets/data_table/build/main.js @@ -1,15 +1,15 @@ -var Xm=Object.create;var ho=Object.defineProperty;var Ym=Object.getOwnPropertyDescriptor;var Qm=Object.getOwnPropertyNames;var Zm=Object.getPrototypeOf,Jm=Object.prototype.hasOwnProperty;var co=(t,a)=>()=>(t&&(a=t(t=0)),a);var B=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports),tM=(t,a)=>{for(var e in a)ho(t,e,{get:a[e],enumerable:!0})},aM=(t,a,e,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of Qm(a))!Jm.call(t,n)&&n!==e&&ho(t,n,{get:()=>a[n],enumerable:!(r=Ym(a,n))||r.enumerable});return t};var F1=(t,a,e)=>(e=t!=null?Xm(Zm(t)):{},aM(a||!t||!t.__esModule?ho(e,"default",{value:t,enumerable:!0}):e,t));var L6=B(vt=>{"use strict";var Fr=Symbol.for("react.element"),eM=Symbol.for("react.portal"),rM=Symbol.for("react.fragment"),nM=Symbol.for("react.strict_mode"),iM=Symbol.for("react.profiler"),lM=Symbol.for("react.provider"),oM=Symbol.for("react.context"),hM=Symbol.for("react.forward_ref"),cM=Symbol.for("react.suspense"),vM=Symbol.for("react.memo"),gM=Symbol.for("react.lazy"),s6=Symbol.iterator;function dM(t){return t===null||typeof t!="object"?null:(t=s6&&t[s6]||t["@@iterator"],typeof t=="function"?t:null)}var p6={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z6=Object.assign,m6={};function M4(t,a,e){this.props=t,this.context=a,this.refs=m6,this.updater=e||p6}M4.prototype.isReactComponent={};M4.prototype.setState=function(t,a){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,a,"setState")};M4.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function M6(){}M6.prototype=M4.prototype;function go(t,a,e){this.props=t,this.context=a,this.refs=m6,this.updater=e||p6}var so=go.prototype=new M6;so.constructor=go;z6(so,M4.prototype);so.isPureReactComponent=!0;var u6=Array.isArray,H6=Object.prototype.hasOwnProperty,uo={current:null},x6={key:!0,ref:!0,__self:!0,__source:!0};function w6(t,a,e){var r,n={},i=null,l=null;if(a!=null)for(r in a.ref!==void 0&&(l=a.ref),a.key!==void 0&&(i=""+a.key),a)H6.call(a,r)&&!x6.hasOwnProperty(r)&&(n[r]=a[r]);var o=arguments.length-2;if(o===1)n.children=e;else if(1{"use strict";V6.exports=L6()});var E6=B(Tt=>{"use strict";function Mo(t,a){var e=t.length;t.push(a);t:for(;0>>1,n=t[r];if(0>>1;rLi(o,e))hLi(c,o)?(t[r]=c,t[h]=e,r=h):(t[r]=o,t[l]=e,r=l);else if(hLi(c,e))t[r]=c,t[h]=e,r=h;else break t}}return a}function Li(t,a){var e=t.sortIndex-a.sortIndex;return e!==0?e:t.id-a.id}typeof performance=="object"&&typeof performance.now=="function"?(R6=performance,Tt.unstable_now=function(){return R6.now()}):(po=Date,y6=po.now(),Tt.unstable_now=function(){return po.now()-y6});var R6,po,y6,va=[],Ka=[],zM=1,A2=null,I0=3,yi=!1,Ie=!1,br=!1,S6=typeof setTimeout=="function"?setTimeout:null,A6=typeof clearTimeout=="function"?clearTimeout:null,C6=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ho(t){for(var a=$2(Ka);a!==null;){if(a.callback===null)Ri(Ka);else if(a.startTime<=t)Ri(Ka),a.sortIndex=a.expirationTime,Mo(va,a);else break;a=$2(Ka)}}function xo(t){if(br=!1,Ho(t),!Ie)if($2(va)!==null)Ie=!0,Lo(wo);else{var a=$2(Ka);a!==null&&Vo(xo,a.startTime-t)}}function wo(t,a){Ie=!1,br&&(br=!1,A6(Er),Er=-1),yi=!0;var e=I0;try{for(Ho(a),A2=$2(va);A2!==null&&(!(A2.expirationTime>a)||t&&!b6());){var r=A2.callback;if(typeof r=="function"){A2.callback=null,I0=A2.priorityLevel;var n=r(A2.expirationTime<=a);a=Tt.unstable_now(),typeof n=="function"?A2.callback=n:A2===$2(va)&&Ri(va),Ho(a)}else Ri(va);A2=$2(va)}if(A2!==null)var i=!0;else{var l=$2(Ka);l!==null&&Vo(xo,l.startTime-a),i=!1}return i}finally{A2=null,I0=e,yi=!1}}var Ci=!1,Vi=null,Er=-1,F6=5,k6=-1;function b6(){return!(Tt.unstable_now()-k6t||125r?(t.sortIndex=e,Mo(Ka,t),$2(va)===null&&t===$2(Ka)&&(br?(A6(Er),Er=-1):br=!0,Vo(xo,e-r))):(t.sortIndex=n,Mo(va,t),Ie||yi||(Ie=!0,Lo(wo))),t};Tt.unstable_shouldYield=b6;Tt.unstable_wrapCallback=function(t){var a=I0;return function(){var e=I0;I0=a;try{return t.apply(this,arguments)}finally{I0=e}}}});var T6=B((tT,_6)=>{"use strict";_6.exports=E6()});var $c=B(x2=>{"use strict";var U7=U1(),M2=T6();function Q(t){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+t,e=1;e"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Go=Object.prototype.hasOwnProperty,mM=/^[: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]*$/,P6={},I6={};function MM(t){return Go.call(I6,t)?!0:Go.call(P6,t)?!1:mM.test(t)?I6[t]=!0:(P6[t]=!0,!1)}function HM(t,a,e,r){if(e!==null&&e.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return r?!1:e!==null?!e.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function xM(t,a,e,r){if(a===null||typeof a>"u"||HM(t,a,e,r))return!0;if(r)return!1;if(e!==null)switch(e.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function Y0(t,a,e,r,n,i,l){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=e,this.propertyName=t,this.type=a,this.sanitizeURL=i,this.removeEmptyString=l}var _0={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_0[t]=new Y0(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var a=t[0];_0[a]=new Y0(a,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_0[t]=new Y0(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_0[t]=new Y0(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){_0[t]=new Y0(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_0[t]=new Y0(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_0[t]=new Y0(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_0[t]=new Y0(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_0[t]=new Y0(t,5,!1,t.toLowerCase(),null,!1,!1)});var O3=/[\-:]([a-z])/g;function D3(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var a=t.replace(O3,D3);_0[a]=new Y0(a,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var a=t.replace(O3,D3);_0[a]=new Y0(a,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var a=t.replace(O3,D3);_0[a]=new Y0(a,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_0[t]=new Y0(t,1,!1,t.toLowerCase(),null,!1,!1)});_0.xlinkHref=new Y0("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_0[t]=new Y0(t,1,!1,t.toLowerCase(),null,!0,!0)});function N3(t,a,e,r){var n=_0.hasOwnProperty(a)?_0[a]:null;(n!==null?n.type!==0:r||!(2()=>(t&&(a=t(t=0)),a);var B=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports),tM=(t,a)=>{for(var e in a)ho(t,e,{get:a[e],enumerable:!0})},aM=(t,a,e,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of Qm(a))!Jm.call(t,n)&&n!==e&&ho(t,n,{get:()=>a[n],enumerable:!(r=Ym(a,n))||r.enumerable});return t};var F1=(t,a,e)=>(e=t!=null?Xm(Zm(t)):{},aM(a||!t||!t.__esModule?ho(e,"default",{value:t,enumerable:!0}):e,t));var L6=B(vt=>{"use strict";var Fr=Symbol.for("react.element"),eM=Symbol.for("react.portal"),rM=Symbol.for("react.fragment"),nM=Symbol.for("react.strict_mode"),iM=Symbol.for("react.profiler"),lM=Symbol.for("react.provider"),oM=Symbol.for("react.context"),hM=Symbol.for("react.forward_ref"),cM=Symbol.for("react.suspense"),vM=Symbol.for("react.memo"),gM=Symbol.for("react.lazy"),s6=Symbol.iterator;function dM(t){return t===null||typeof t!="object"?null:(t=s6&&t[s6]||t["@@iterator"],typeof t=="function"?t:null)}var p6={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z6=Object.assign,m6={};function M4(t,a,e){this.props=t,this.context=a,this.refs=m6,this.updater=e||p6}M4.prototype.isReactComponent={};M4.prototype.setState=function(t,a){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,a,"setState")};M4.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function M6(){}M6.prototype=M4.prototype;function go(t,a,e){this.props=t,this.context=a,this.refs=m6,this.updater=e||p6}var so=go.prototype=new M6;so.constructor=go;z6(so,M4.prototype);so.isPureReactComponent=!0;var u6=Array.isArray,H6=Object.prototype.hasOwnProperty,uo={current:null},x6={key:!0,ref:!0,__self:!0,__source:!0};function w6(t,a,e){var r,n={},i=null,l=null;if(a!=null)for(r in a.ref!==void 0&&(l=a.ref),a.key!==void 0&&(i=""+a.key),a)H6.call(a,r)&&!x6.hasOwnProperty(r)&&(n[r]=a[r]);var o=arguments.length-2;if(o===1)n.children=e;else if(1{"use strict";V6.exports=L6()});var E6=B(Tt=>{"use strict";function Mo(t,a){var e=t.length;t.push(a);t:for(;0>>1,n=t[r];if(0>>1;rLi(o,e))hLi(c,o)?(t[r]=c,t[h]=e,r=h):(t[r]=o,t[l]=e,r=l);else if(hLi(c,e))t[r]=c,t[h]=e,r=h;else break t}}return a}function Li(t,a){var e=t.sortIndex-a.sortIndex;return e!==0?e:t.id-a.id}typeof performance=="object"&&typeof performance.now=="function"?(R6=performance,Tt.unstable_now=function(){return R6.now()}):(po=Date,y6=po.now(),Tt.unstable_now=function(){return po.now()-y6});var R6,po,y6,va=[],Xa=[],zM=1,A2=null,I0=3,yi=!1,Ie=!1,br=!1,S6=typeof setTimeout=="function"?setTimeout:null,A6=typeof clearTimeout=="function"?clearTimeout:null,C6=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ho(t){for(var a=$2(Xa);a!==null;){if(a.callback===null)Ri(Xa);else if(a.startTime<=t)Ri(Xa),a.sortIndex=a.expirationTime,Mo(va,a);else break;a=$2(Xa)}}function xo(t){if(br=!1,Ho(t),!Ie)if($2(va)!==null)Ie=!0,Lo(wo);else{var a=$2(Xa);a!==null&&Vo(xo,a.startTime-t)}}function wo(t,a){Ie=!1,br&&(br=!1,A6(Er),Er=-1),yi=!0;var e=I0;try{for(Ho(a),A2=$2(va);A2!==null&&(!(A2.expirationTime>a)||t&&!b6());){var r=A2.callback;if(typeof r=="function"){A2.callback=null,I0=A2.priorityLevel;var n=r(A2.expirationTime<=a);a=Tt.unstable_now(),typeof n=="function"?A2.callback=n:A2===$2(va)&&Ri(va),Ho(a)}else Ri(va);A2=$2(va)}if(A2!==null)var i=!0;else{var l=$2(Xa);l!==null&&Vo(xo,l.startTime-a),i=!1}return i}finally{A2=null,I0=e,yi=!1}}var Ci=!1,Vi=null,Er=-1,F6=5,k6=-1;function b6(){return!(Tt.unstable_now()-k6t||125r?(t.sortIndex=e,Mo(Xa,t),$2(va)===null&&t===$2(Xa)&&(br?(A6(Er),Er=-1):br=!0,Vo(xo,e-r))):(t.sortIndex=n,Mo(va,t),Ie||yi||(Ie=!0,Lo(wo))),t};Tt.unstable_shouldYield=b6;Tt.unstable_wrapCallback=function(t){var a=I0;return function(){var e=I0;I0=a;try{return t.apply(this,arguments)}finally{I0=e}}}});var T6=B((tT,_6)=>{"use strict";_6.exports=E6()});var $c=B(x2=>{"use strict";var U7=U1(),M2=T6();function Q(t){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+t,e=1;e"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Go=Object.prototype.hasOwnProperty,mM=/^[: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]*$/,P6={},I6={};function MM(t){return Go.call(I6,t)?!0:Go.call(P6,t)?!1:mM.test(t)?I6[t]=!0:(P6[t]=!0,!1)}function HM(t,a,e,r){if(e!==null&&e.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return r?!1:e!==null?!e.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function xM(t,a,e,r){if(a===null||typeof a>"u"||HM(t,a,e,r))return!0;if(r)return!1;if(e!==null)switch(e.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function Y0(t,a,e,r,n,i,l){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=r,this.attributeNamespace=n,this.mustUseProperty=e,this.propertyName=t,this.type=a,this.sanitizeURL=i,this.removeEmptyString=l}var _0={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){_0[t]=new Y0(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var a=t[0];_0[a]=new Y0(a,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){_0[t]=new Y0(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){_0[t]=new Y0(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){_0[t]=new Y0(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){_0[t]=new Y0(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){_0[t]=new Y0(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){_0[t]=new Y0(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){_0[t]=new Y0(t,5,!1,t.toLowerCase(),null,!1,!1)});var O3=/[\-:]([a-z])/g;function D3(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var a=t.replace(O3,D3);_0[a]=new Y0(a,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var a=t.replace(O3,D3);_0[a]=new Y0(a,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var a=t.replace(O3,D3);_0[a]=new Y0(a,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){_0[t]=new Y0(t,1,!1,t.toLowerCase(),null,!1,!1)});_0.xlinkHref=new Y0("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){_0[t]=new Y0(t,1,!1,t.toLowerCase(),null,!0,!0)});function N3(t,a,e,r){var n=_0.hasOwnProperty(a)?_0[a]:null;(n!==null?n.type!==0:r||!(2o||n[l]!==i[o]){var h=` -`+n[l].replace(" at new "," at ");return t.displayName&&h.includes("")&&(h=h.replace("",t.displayName)),h}while(1<=l&&0<=o);break}}}finally{yo=!1,Error.prepareStackTrace=e}return(t=t?t.displayName||t.name:"")?Ur(t):""}function wM(t){switch(t.tag){case 5:return Ur(t.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return t=Co(t.type,!1),t;case 11:return t=Co(t.type.render,!1),t;case 1:return t=Co(t.type,!0),t;default:return""}}function Qo(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case L4:return"Fragment";case w4:return"Portal";case Ko:return"Profiler";case $3:return"StrictMode";case Xo:return"Suspense";case Yo:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case q7:return(t.displayName||"Context")+".Consumer";case j7:return(t._context.displayName||"Context")+".Provider";case U3:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case W3:return a=t.displayName||null,a!==null?a:Qo(t.type)||"Memo";case Ya:a=t._payload,t=t._init;try{return Qo(t(a))}catch{}}return null}function LM(t){var a=t.type;switch(t.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=a.render,t=t.displayName||t.name||"",a.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qo(a);case 8:return a===$3?"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 a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function ve(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function K7(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function VM(t){var a=K7(t)?"checked":"value",e=Object.getOwnPropertyDescriptor(t.constructor.prototype,a),r=""+t[a];if(!t.hasOwnProperty(a)&&typeof e<"u"&&typeof e.get=="function"&&typeof e.set=="function"){var n=e.get,i=e.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return n.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(t,a,{enumerable:e.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Si(t){t._valueTracker||(t._valueTracker=VM(t))}function X7(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var e=a.getValue(),r="";return t&&(r=K7(t)?t.checked?"true":"false":t.value),t=r,t!==e?(a.setValue(t),!0):!1}function rl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Zo(t,a){var e=a.checked;return Qt({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:e??t._wrapperState.initialChecked})}function D6(t,a){var e=a.defaultValue==null?"":a.defaultValue,r=a.checked!=null?a.checked:a.defaultChecked;e=ve(a.value!=null?a.value:e),t._wrapperState={initialChecked:r,initialValue:e,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function Y7(t,a){a=a.checked,a!=null&&N3(t,"checked",a,!1)}function Jo(t,a){Y7(t,a);var e=ve(a.value),r=a.type;if(e!=null)r==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+e):t.value!==""+e&&(t.value=""+e);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}a.hasOwnProperty("value")?t3(t,a.type,e):a.hasOwnProperty("defaultValue")&&t3(t,a.type,ve(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(t.defaultChecked=!!a.defaultChecked)}function N6(t,a,e){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var r=a.type;if(!(r!=="submit"&&r!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+t._wrapperState.initialValue,e||a===t.value||(t.value=a),t.defaultValue=a}e=t.name,e!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,e!==""&&(t.name=e)}function t3(t,a,e){(a!=="number"||rl(t.ownerDocument)!==t)&&(e==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+e&&(t.defaultValue=""+e))}var Wr=Array.isArray;function E4(t,a,e,r){if(t=t.options,a){a={};for(var n=0;n"+a.valueOf().toString()+"",a=Ai.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;a.firstChild;)t.appendChild(a.firstChild)}});function rn(t,a){if(a){var e=t.firstChild;if(e&&e===t.lastChild&&e.nodeType===3){e.nodeValue=a;return}}t.textContent=a}var Gr={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},RM=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(t){RM.forEach(function(a){a=a+t.charAt(0).toUpperCase()+t.substring(1),Gr[a]=Gr[t]})});function t9(t,a,e){return a==null||typeof a=="boolean"||a===""?"":e||typeof a!="number"||a===0||Gr.hasOwnProperty(t)&&Gr[t]?(""+a).trim():a+"px"}function a9(t,a){t=t.style;for(var e in a)if(a.hasOwnProperty(e)){var r=e.indexOf("--")===0,n=t9(e,a[e],r);e==="float"&&(e="cssFloat"),r?t.setProperty(e,n):t[e]=n}}var yM=Qt({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 r3(t,a){if(a){if(yM[t]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(Q(137,t));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(Q(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(Q(61))}if(a.style!=null&&typeof a.style!="object")throw Error(Q(62))}}function n3(t,a){if(t.indexOf("-")===-1)return typeof a.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var i3=null;function j3(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var l3=null,_4=null,T4=null;function W6(t){if(t=wn(t)){if(typeof l3!="function")throw Error(Q(280));var a=t.stateNode;a&&(a=Fl(a),l3(t.stateNode,t.type,a))}}function e9(t){_4?T4?T4.push(t):T4=[t]:_4=t}function r9(){if(_4){var t=_4,a=T4;if(T4=_4=null,W6(t),a)for(t=0;t>>=0,t===0?32:31-(PM(t)/IM|0)|0}var Fi=64,ki=4194304;function jr(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ol(t,a){var e=t.pendingLanes;if(e===0)return 0;var r=0,n=t.suspendedLanes,i=t.pingedLanes,l=e&268435455;if(l!==0){var o=l&~n;o!==0?r=jr(o):(i&=l,i!==0&&(r=jr(i)))}else l=e&~n,l!==0?r=jr(l):i!==0&&(r=jr(i));if(r===0)return 0;if(a!==0&&a!==r&&(a&n)===0&&(n=r&-r,i=a&-a,n>=i||n===16&&(i&4194240)!==0))return a;if((r&4)!==0&&(r|=e&16),a=t.entangledLanes,a!==0)for(t=t.entanglements,a&=r;0e;e++)a.push(t);return a}function Hn(t,a,e){t.pendingLanes|=a,a!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,a=31-G2(a),t[a]=e}function $M(t,a){var e=t.pendingLanes&~a;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=a,t.mutableReadLanes&=a,t.entangledLanes&=a,a=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Xr),J6=String.fromCharCode(32),t7=!1;function L9(t,a){switch(t){case"keyup":return pH.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V9(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var V4=!1;function mH(t,a){switch(t){case"compositionend":return V9(a);case"keypress":return a.which!==32?null:(t7=!0,J6);case"textInput":return t=a.data,t===J6&&t7?null:t;default:return null}}function MH(t,a){if(V4)return t==="compositionend"||!J3&&L9(t,a)?(t=x9(),Ki=Y3=te=null,V4=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1=a)return{node:e,offset:a-t};t=r}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=r7(e)}}function B9(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?B9(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function S9(){for(var t=window,a=rl();a instanceof t.HTMLIFrameElement;){try{var e=typeof a.contentWindow.location.href=="string"}catch{e=!1}if(e)t=a.contentWindow;else break;a=rl(t.document)}return a}function th(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}function BH(t){var a=S9(),e=t.focusedElem,r=t.selectionRange;if(a!==e&&e&&e.ownerDocument&&B9(e.ownerDocument.documentElement,e)){if(r!==null&&th(e)){if(a=r.start,t=r.end,t===void 0&&(t=a),"selectionStart"in e)e.selectionStart=a,e.selectionEnd=Math.min(t,e.value.length);else if(t=(a=e.ownerDocument||document)&&a.defaultView||window,t.getSelection){t=t.getSelection();var n=e.textContent.length,i=Math.min(r.start,n);r=r.end===void 0?i:Math.min(r.end,n),!t.extend&&i>r&&(n=r,r=i,i=n),n=n7(e,i);var l=n7(e,r);n&&l&&(t.rangeCount!==1||t.anchorNode!==n.node||t.anchorOffset!==n.offset||t.focusNode!==l.node||t.focusOffset!==l.offset)&&(a=a.createRange(),a.setStart(n.node,n.offset),t.removeAllRanges(),i>r?(t.addRange(a),t.extend(l.node,l.offset)):(a.setEnd(l.node,l.offset),t.addRange(a)))}}for(a=[],t=e;t=t.parentNode;)t.nodeType===1&&a.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,R4=null,d3=null,Qr=null,s3=!1;function i7(t,a,e){var r=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;s3||R4==null||R4!==rl(r)||(r=R4,"selectionStart"in r&&th(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&&vn(Qr,r)||(Qr=r,r=vl(d3,"onSelect"),0B4||(t.current=M3[B4],M3[B4]=null,B4--)}function Pt(t,a){B4++,M3[B4]=t.current,t.current=a}var ge={},$0=se(ge),e2=se(!1),qe=ge;function N4(t,a){var e=t.type.contextTypes;if(!e)return ge;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===a)return r.__reactInternalMemoizedMaskedChildContext;var n={},i;for(i in e)n[i]=a[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=a,t.__reactInternalMemoizedMaskedChildContext=n),n}function r2(t){return t=t.childContextTypes,t!=null}function dl(){Nt(e2),Nt($0)}function u7(t,a,e){if($0.current!==ge)throw Error(Q(168));Pt($0,a),Pt(e2,e)}function I9(t,a,e){var r=t.stateNode;if(a=a.childContextTypes,typeof r.getChildContext!="function")return e;r=r.getChildContext();for(var n in r)if(!(n in a))throw Error(Q(108,LM(t)||"Unknown",n));return Qt({},e,r)}function sl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ge,qe=$0.current,Pt($0,t),Pt(e2,e2.current),!0}function f7(t,a,e){var r=t.stateNode;if(!r)throw Error(Q(169));e?(t=I9(t,a,qe),r.__reactInternalMemoizedMergedChildContext=t,Nt(e2),Nt($0),Pt($0,t)):Nt(e2),Pt(e2,e)}var Aa=null,kl=!1,Io=!1;function O9(t){Aa===null?Aa=[t]:Aa.push(t)}function IH(t){kl=!0,O9(t)}function ue(){if(!Io&&Aa!==null){Io=!0;var t=0,a=yt;try{var e=Aa;for(yt=1;t>=l,n-=l,Fa=1<<32-G2(a)+n|e<L?(V=R,R=null):V=R.sibling;var C=d(s,R,m[L],H);if(C===null){R===null&&(R=V);break}t&&R&&C.alternate===null&&a(s,R),f=i(C,f,L),y===null?x=C:y.sibling=C,y=C,R=V}if(L===m.length)return e(s,R),Wt&&Oe(s,L),x;if(R===null){for(;LL?(V=R,R=null):V=R.sibling;var k=d(s,R,C.value,H);if(k===null){R===null&&(R=V);break}t&&R&&k.alternate===null&&a(s,R),f=i(k,f,L),y===null?x=k:y.sibling=k,y=k,R=V}if(C.done)return e(s,R),Wt&&Oe(s,L),x;if(R===null){for(;!C.done;L++,C=m.next())C=g(s,C.value,H),C!==null&&(f=i(C,f,L),y===null?x=C:y.sibling=C,y=C);return Wt&&Oe(s,L),x}for(R=r(s,R);!C.done;L++,C=m.next())C=u(R,s,L,C.value,H),C!==null&&(t&&C.alternate!==null&&R.delete(C.key===null?L:C.key),f=i(C,f,L),y===null?x=C:y.sibling=C,y=C);return t&&R.forEach(function(b){return a(s,b)}),Wt&&Oe(s,L),x}function w(s,f,m,H){if(typeof m=="object"&&m!==null&&m.type===L4&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Bi:t:{for(var x=m.key,y=f;y!==null;){if(y.key===x){if(x=m.type,x===L4){if(y.tag===7){e(s,y.sibling),f=n(y,m.props.children),f.return=s,s=f;break t}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ya&&w7(x)===y.type){e(s,y.sibling),f=n(y,m.props),f.ref=Or(s,y,m),f.return=s,s=f;break t}e(s,y);break}else a(s,y);y=y.sibling}m.type===L4?(f=je(m.props.children,s.mode,H,m.key),f.return=s,s=f):(H=el(m.type,m.key,m.props,null,s.mode,H),H.ref=Or(s,f,m),H.return=s,s=H)}return l(s);case w4:t:{for(y=m.key;f!==null;){if(f.key===y)if(f.tag===4&&f.stateNode.containerInfo===m.containerInfo&&f.stateNode.implementation===m.implementation){e(s,f.sibling),f=n(f,m.children||[]),f.return=s,s=f;break t}else{e(s,f);break}else a(s,f);f=f.sibling}f=qo(m,s.mode,H),f.return=s,s=f}return l(s);case Ya:return y=m._init,w(s,f,y(m._payload),H)}if(Wr(m))return p(s,f,m,H);if(_r(m))return z(s,f,m,H);Ui(s,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,f!==null&&f.tag===6?(e(s,f.sibling),f=n(f,m),f.return=s,s=f):(e(s,f),f=jo(m,s.mode,H),f.return=s,s=f),l(s)):e(s,f)}return w}var U4=G9(!0),K9=G9(!1),Ln={},fa=se(Ln),un=se(Ln),fn=se(Ln);function Ue(t){if(t===Ln)throw Error(Q(174));return t}function ch(t,a){switch(Pt(fn,a),Pt(un,t),Pt(fa,Ln),t=a.nodeType,t){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:e3(null,"");break;default:t=t===8?a.parentNode:a,a=t.namespaceURI||null,t=t.tagName,a=e3(a,t)}Nt(fa),Pt(fa,a)}function W4(){Nt(fa),Nt(un),Nt(fn)}function X9(t){Ue(fn.current);var a=Ue(fa.current),e=e3(a,t.type);a!==e&&(Pt(un,t),Pt(fa,e))}function vh(t){un.current===t&&(Nt(fa),Nt(un))}var Xt=se(0);function Ml(t){for(var a=t;a!==null;){if(a.tag===13){var e=a.memoizedState;if(e!==null&&(e=e.dehydrated,e===null||e.data==="$?"||e.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Oo=[];function gh(){for(var t=0;te?e:4,t(!0);var r=Do.transition;Do.transition={};try{t(!1),a()}finally{yt=e,Do.transition=r}}function gc(){return T2().memoizedState}function $H(t,a,e){var r=he(t);if(e={lane:r,action:e,hasEagerState:!1,eagerState:null,next:null},dc(t))sc(a,e);else if(e=U9(t,a,e,r),e!==null){var n=X0();K2(e,t,r,n),uc(e,a,r)}}function UH(t,a,e){var r=he(t),n={lane:r,action:e,hasEagerState:!1,eagerState:null,next:null};if(dc(t))sc(a,n);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=a.lastRenderedReducer,i!==null))try{var l=a.lastRenderedState,o=i(l,e);if(n.hasEagerState=!0,n.eagerState=o,X2(o,l)){var h=a.interleaved;h===null?(n.next=n,oh(a)):(n.next=h.next,h.next=n),a.interleaved=n;return}}catch{}finally{}e=U9(t,a,n,r),e!==null&&(n=X0(),K2(e,t,r,n),uc(e,a,r))}}function dc(t){var a=t.alternate;return t===Yt||a!==null&&a===Yt}function sc(t,a){Zr=Hl=!0;var e=t.pending;e===null?a.next=a:(a.next=e.next,e.next=a),t.pending=a}function uc(t,a,e){if((e&4194240)!==0){var r=a.lanes;r&=t.pendingLanes,e|=r,a.lanes=e,G3(t,e)}}var xl={readContext:_2,useCallback:O0,useContext:O0,useEffect:O0,useImperativeHandle:O0,useInsertionEffect:O0,useLayoutEffect:O0,useMemo:O0,useReducer:O0,useRef:O0,useState:O0,useDebugValue:O0,useDeferredValue:O0,useTransition:O0,useMutableSource:O0,useSyncExternalStore:O0,useId:O0,unstable_isNewReconciler:!1},WH={readContext:_2,useCallback:function(t,a){return da().memoizedState=[t,a===void 0?null:a],t},useContext:_2,useEffect:V7,useImperativeHandle:function(t,a,e){return e=e!=null?e.concat([t]):null,Zi(4194308,4,lc.bind(null,a,t),e)},useLayoutEffect:function(t,a){return Zi(4194308,4,t,a)},useInsertionEffect:function(t,a){return Zi(4,2,t,a)},useMemo:function(t,a){var e=da();return a=a===void 0?null:a,t=t(),e.memoizedState=[t,a],t},useReducer:function(t,a,e){var r=da();return a=e!==void 0?e(a):a,r.memoizedState=r.baseState=a,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},r.queue=t,t=t.dispatch=$H.bind(null,Yt,t),[r.memoizedState,t]},useRef:function(t){var a=da();return t={current:t},a.memoizedState=t},useState:L7,useDebugValue:ph,useDeferredValue:function(t){return da().memoizedState=t},useTransition:function(){var t=L7(!1),a=t[0];return t=NH.bind(null,t[1]),da().memoizedState=t,[a,t]},useMutableSource:function(){},useSyncExternalStore:function(t,a,e){var r=Yt,n=da();if(Wt){if(e===void 0)throw Error(Q(407));e=e()}else{if(e=a(),w0===null)throw Error(Q(349));(Ke&30)!==0||Z9(r,a,e)}n.memoizedState=e;var i={value:e,getSnapshot:a};return n.queue=i,V7(tc.bind(null,r,i,t),[t]),r.flags|=2048,mn(9,J9.bind(null,r,i,e,a),void 0,null),e},useId:function(){var t=da(),a=w0.identifierPrefix;if(Wt){var e=ka,r=Fa;e=(r&~(1<<32-G2(r)-1)).toString(32)+e,a=":"+a+"R"+e,e=pn++,0")&&(h=h.replace("",t.displayName)),h}while(1<=l&&0<=o);break}}}finally{yo=!1,Error.prepareStackTrace=e}return(t=t?t.displayName||t.name:"")?Ur(t):""}function wM(t){switch(t.tag){case 5:return Ur(t.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return t=Co(t.type,!1),t;case 11:return t=Co(t.type.render,!1),t;case 1:return t=Co(t.type,!0),t;default:return""}}function Qo(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case L4:return"Fragment";case w4:return"Portal";case Ko:return"Profiler";case $3:return"StrictMode";case Xo:return"Suspense";case Yo:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case q7:return(t.displayName||"Context")+".Consumer";case j7:return(t._context.displayName||"Context")+".Provider";case U3:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case W3:return a=t.displayName||null,a!==null?a:Qo(t.type)||"Memo";case Qa:a=t._payload,t=t._init;try{return Qo(t(a))}catch{}}return null}function LM(t){var a=t.type;switch(t.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=a.render,t=t.displayName||t.name||"",a.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qo(a);case 8:return a===$3?"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 a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function ge(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function K7(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function VM(t){var a=K7(t)?"checked":"value",e=Object.getOwnPropertyDescriptor(t.constructor.prototype,a),r=""+t[a];if(!t.hasOwnProperty(a)&&typeof e<"u"&&typeof e.get=="function"&&typeof e.set=="function"){var n=e.get,i=e.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return n.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(t,a,{enumerable:e.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Si(t){t._valueTracker||(t._valueTracker=VM(t))}function X7(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var e=a.getValue(),r="";return t&&(r=K7(t)?t.checked?"true":"false":t.value),t=r,t!==e?(a.setValue(t),!0):!1}function rl(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Zo(t,a){var e=a.checked;return Qt({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:e??t._wrapperState.initialChecked})}function D6(t,a){var e=a.defaultValue==null?"":a.defaultValue,r=a.checked!=null?a.checked:a.defaultChecked;e=ge(a.value!=null?a.value:e),t._wrapperState={initialChecked:r,initialValue:e,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function Y7(t,a){a=a.checked,a!=null&&N3(t,"checked",a,!1)}function Jo(t,a){Y7(t,a);var e=ge(a.value),r=a.type;if(e!=null)r==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+e):t.value!==""+e&&(t.value=""+e);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}a.hasOwnProperty("value")?t3(t,a.type,e):a.hasOwnProperty("defaultValue")&&t3(t,a.type,ge(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(t.defaultChecked=!!a.defaultChecked)}function N6(t,a,e){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var r=a.type;if(!(r!=="submit"&&r!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+t._wrapperState.initialValue,e||a===t.value||(t.value=a),t.defaultValue=a}e=t.name,e!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,e!==""&&(t.name=e)}function t3(t,a,e){(a!=="number"||rl(t.ownerDocument)!==t)&&(e==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+e&&(t.defaultValue=""+e))}var Wr=Array.isArray;function E4(t,a,e,r){if(t=t.options,a){a={};for(var n=0;n"+a.valueOf().toString()+"",a=Ai.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;a.firstChild;)t.appendChild(a.firstChild)}});function rn(t,a){if(a){var e=t.firstChild;if(e&&e===t.lastChild&&e.nodeType===3){e.nodeValue=a;return}}t.textContent=a}var Gr={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},RM=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(t){RM.forEach(function(a){a=a+t.charAt(0).toUpperCase()+t.substring(1),Gr[a]=Gr[t]})});function t9(t,a,e){return a==null||typeof a=="boolean"||a===""?"":e||typeof a!="number"||a===0||Gr.hasOwnProperty(t)&&Gr[t]?(""+a).trim():a+"px"}function a9(t,a){t=t.style;for(var e in a)if(a.hasOwnProperty(e)){var r=e.indexOf("--")===0,n=t9(e,a[e],r);e==="float"&&(e="cssFloat"),r?t.setProperty(e,n):t[e]=n}}var yM=Qt({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 r3(t,a){if(a){if(yM[t]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(Q(137,t));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(Q(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(Q(61))}if(a.style!=null&&typeof a.style!="object")throw Error(Q(62))}}function n3(t,a){if(t.indexOf("-")===-1)return typeof a.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var i3=null;function j3(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var l3=null,_4=null,T4=null;function W6(t){if(t=wn(t)){if(typeof l3!="function")throw Error(Q(280));var a=t.stateNode;a&&(a=Fl(a),l3(t.stateNode,t.type,a))}}function e9(t){_4?T4?T4.push(t):T4=[t]:_4=t}function r9(){if(_4){var t=_4,a=T4;if(T4=_4=null,W6(t),a)for(t=0;t>>=0,t===0?32:31-(PM(t)/IM|0)|0}var Fi=64,ki=4194304;function jr(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ol(t,a){var e=t.pendingLanes;if(e===0)return 0;var r=0,n=t.suspendedLanes,i=t.pingedLanes,l=e&268435455;if(l!==0){var o=l&~n;o!==0?r=jr(o):(i&=l,i!==0&&(r=jr(i)))}else l=e&~n,l!==0?r=jr(l):i!==0&&(r=jr(i));if(r===0)return 0;if(a!==0&&a!==r&&(a&n)===0&&(n=r&-r,i=a&-a,n>=i||n===16&&(i&4194240)!==0))return a;if((r&4)!==0&&(r|=e&16),a=t.entangledLanes,a!==0)for(t=t.entanglements,a&=r;0e;e++)a.push(t);return a}function Hn(t,a,e){t.pendingLanes|=a,a!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,a=31-G2(a),t[a]=e}function $M(t,a){var e=t.pendingLanes&~a;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=a,t.mutableReadLanes&=a,t.entangledLanes&=a,a=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=Xr),J6=String.fromCharCode(32),t7=!1;function L9(t,a){switch(t){case"keyup":return pH.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V9(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var V4=!1;function mH(t,a){switch(t){case"compositionend":return V9(a);case"keypress":return a.which!==32?null:(t7=!0,J6);case"textInput":return t=a.data,t===J6&&t7?null:t;default:return null}}function MH(t,a){if(V4)return t==="compositionend"||!J3&&L9(t,a)?(t=x9(),Ki=Y3=ae=null,V4=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1=a)return{node:e,offset:a-t};t=r}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=r7(e)}}function B9(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?B9(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function S9(){for(var t=window,a=rl();a instanceof t.HTMLIFrameElement;){try{var e=typeof a.contentWindow.location.href=="string"}catch{e=!1}if(e)t=a.contentWindow;else break;a=rl(t.document)}return a}function th(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}function BH(t){var a=S9(),e=t.focusedElem,r=t.selectionRange;if(a!==e&&e&&e.ownerDocument&&B9(e.ownerDocument.documentElement,e)){if(r!==null&&th(e)){if(a=r.start,t=r.end,t===void 0&&(t=a),"selectionStart"in e)e.selectionStart=a,e.selectionEnd=Math.min(t,e.value.length);else if(t=(a=e.ownerDocument||document)&&a.defaultView||window,t.getSelection){t=t.getSelection();var n=e.textContent.length,i=Math.min(r.start,n);r=r.end===void 0?i:Math.min(r.end,n),!t.extend&&i>r&&(n=r,r=i,i=n),n=n7(e,i);var l=n7(e,r);n&&l&&(t.rangeCount!==1||t.anchorNode!==n.node||t.anchorOffset!==n.offset||t.focusNode!==l.node||t.focusOffset!==l.offset)&&(a=a.createRange(),a.setStart(n.node,n.offset),t.removeAllRanges(),i>r?(t.addRange(a),t.extend(l.node,l.offset)):(a.setEnd(l.node,l.offset),t.addRange(a)))}}for(a=[],t=e;t=t.parentNode;)t.nodeType===1&&a.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,R4=null,d3=null,Qr=null,s3=!1;function i7(t,a,e){var r=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;s3||R4==null||R4!==rl(r)||(r=R4,"selectionStart"in r&&th(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&&vn(Qr,r)||(Qr=r,r=vl(d3,"onSelect"),0B4||(t.current=M3[B4],M3[B4]=null,B4--)}function Pt(t,a){B4++,M3[B4]=t.current,t.current=a}var de={},$0=ue(de),e2=ue(!1),qe=de;function N4(t,a){var e=t.type.contextTypes;if(!e)return de;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===a)return r.__reactInternalMemoizedMaskedChildContext;var n={},i;for(i in e)n[i]=a[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=a,t.__reactInternalMemoizedMaskedChildContext=n),n}function r2(t){return t=t.childContextTypes,t!=null}function dl(){Nt(e2),Nt($0)}function u7(t,a,e){if($0.current!==de)throw Error(Q(168));Pt($0,a),Pt(e2,e)}function I9(t,a,e){var r=t.stateNode;if(a=a.childContextTypes,typeof r.getChildContext!="function")return e;r=r.getChildContext();for(var n in r)if(!(n in a))throw Error(Q(108,LM(t)||"Unknown",n));return Qt({},e,r)}function sl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||de,qe=$0.current,Pt($0,t),Pt(e2,e2.current),!0}function f7(t,a,e){var r=t.stateNode;if(!r)throw Error(Q(169));e?(t=I9(t,a,qe),r.__reactInternalMemoizedMergedChildContext=t,Nt(e2),Nt($0),Pt($0,t)):Nt(e2),Pt(e2,e)}var Aa=null,kl=!1,Io=!1;function O9(t){Aa===null?Aa=[t]:Aa.push(t)}function IH(t){kl=!0,O9(t)}function fe(){if(!Io&&Aa!==null){Io=!0;var t=0,a=yt;try{var e=Aa;for(yt=1;t>=l,n-=l,Fa=1<<32-G2(a)+n|e<L?(V=R,R=null):V=R.sibling;var C=d(s,R,m[L],H);if(C===null){R===null&&(R=V);break}t&&R&&C.alternate===null&&a(s,R),f=i(C,f,L),y===null?x=C:y.sibling=C,y=C,R=V}if(L===m.length)return e(s,R),Wt&&Oe(s,L),x;if(R===null){for(;LL?(V=R,R=null):V=R.sibling;var k=d(s,R,C.value,H);if(k===null){R===null&&(R=V);break}t&&R&&k.alternate===null&&a(s,R),f=i(k,f,L),y===null?x=k:y.sibling=k,y=k,R=V}if(C.done)return e(s,R),Wt&&Oe(s,L),x;if(R===null){for(;!C.done;L++,C=m.next())C=g(s,C.value,H),C!==null&&(f=i(C,f,L),y===null?x=C:y.sibling=C,y=C);return Wt&&Oe(s,L),x}for(R=r(s,R);!C.done;L++,C=m.next())C=u(R,s,L,C.value,H),C!==null&&(t&&C.alternate!==null&&R.delete(C.key===null?L:C.key),f=i(C,f,L),y===null?x=C:y.sibling=C,y=C);return t&&R.forEach(function(b){return a(s,b)}),Wt&&Oe(s,L),x}function w(s,f,m,H){if(typeof m=="object"&&m!==null&&m.type===L4&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Bi:t:{for(var x=m.key,y=f;y!==null;){if(y.key===x){if(x=m.type,x===L4){if(y.tag===7){e(s,y.sibling),f=n(y,m.props.children),f.return=s,s=f;break t}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Qa&&w7(x)===y.type){e(s,y.sibling),f=n(y,m.props),f.ref=Or(s,y,m),f.return=s,s=f;break t}e(s,y);break}else a(s,y);y=y.sibling}m.type===L4?(f=je(m.props.children,s.mode,H,m.key),f.return=s,s=f):(H=el(m.type,m.key,m.props,null,s.mode,H),H.ref=Or(s,f,m),H.return=s,s=H)}return l(s);case w4:t:{for(y=m.key;f!==null;){if(f.key===y)if(f.tag===4&&f.stateNode.containerInfo===m.containerInfo&&f.stateNode.implementation===m.implementation){e(s,f.sibling),f=n(f,m.children||[]),f.return=s,s=f;break t}else{e(s,f);break}else a(s,f);f=f.sibling}f=qo(m,s.mode,H),f.return=s,s=f}return l(s);case Qa:return y=m._init,w(s,f,y(m._payload),H)}if(Wr(m))return p(s,f,m,H);if(_r(m))return z(s,f,m,H);Ui(s,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,f!==null&&f.tag===6?(e(s,f.sibling),f=n(f,m),f.return=s,s=f):(e(s,f),f=jo(m,s.mode,H),f.return=s,s=f),l(s)):e(s,f)}return w}var U4=G9(!0),K9=G9(!1),Ln={},fa=ue(Ln),un=ue(Ln),fn=ue(Ln);function Ue(t){if(t===Ln)throw Error(Q(174));return t}function ch(t,a){switch(Pt(fn,a),Pt(un,t),Pt(fa,Ln),t=a.nodeType,t){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:e3(null,"");break;default:t=t===8?a.parentNode:a,a=t.namespaceURI||null,t=t.tagName,a=e3(a,t)}Nt(fa),Pt(fa,a)}function W4(){Nt(fa),Nt(un),Nt(fn)}function X9(t){Ue(fn.current);var a=Ue(fa.current),e=e3(a,t.type);a!==e&&(Pt(un,t),Pt(fa,e))}function vh(t){un.current===t&&(Nt(fa),Nt(un))}var Xt=ue(0);function Ml(t){for(var a=t;a!==null;){if(a.tag===13){var e=a.memoizedState;if(e!==null&&(e=e.dehydrated,e===null||e.data==="$?"||e.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Oo=[];function gh(){for(var t=0;te?e:4,t(!0);var r=Do.transition;Do.transition={};try{t(!1),a()}finally{yt=e,Do.transition=r}}function gc(){return T2().memoizedState}function $H(t,a,e){var r=ce(t);if(e={lane:r,action:e,hasEagerState:!1,eagerState:null,next:null},dc(t))sc(a,e);else if(e=U9(t,a,e,r),e!==null){var n=X0();K2(e,t,r,n),uc(e,a,r)}}function UH(t,a,e){var r=ce(t),n={lane:r,action:e,hasEagerState:!1,eagerState:null,next:null};if(dc(t))sc(a,n);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=a.lastRenderedReducer,i!==null))try{var l=a.lastRenderedState,o=i(l,e);if(n.hasEagerState=!0,n.eagerState=o,X2(o,l)){var h=a.interleaved;h===null?(n.next=n,oh(a)):(n.next=h.next,h.next=n),a.interleaved=n;return}}catch{}finally{}e=U9(t,a,n,r),e!==null&&(n=X0(),K2(e,t,r,n),uc(e,a,r))}}function dc(t){var a=t.alternate;return t===Yt||a!==null&&a===Yt}function sc(t,a){Zr=Hl=!0;var e=t.pending;e===null?a.next=a:(a.next=e.next,e.next=a),t.pending=a}function uc(t,a,e){if((e&4194240)!==0){var r=a.lanes;r&=t.pendingLanes,e|=r,a.lanes=e,G3(t,e)}}var xl={readContext:_2,useCallback:O0,useContext:O0,useEffect:O0,useImperativeHandle:O0,useInsertionEffect:O0,useLayoutEffect:O0,useMemo:O0,useReducer:O0,useRef:O0,useState:O0,useDebugValue:O0,useDeferredValue:O0,useTransition:O0,useMutableSource:O0,useSyncExternalStore:O0,useId:O0,unstable_isNewReconciler:!1},WH={readContext:_2,useCallback:function(t,a){return da().memoizedState=[t,a===void 0?null:a],t},useContext:_2,useEffect:V7,useImperativeHandle:function(t,a,e){return e=e!=null?e.concat([t]):null,Zi(4194308,4,lc.bind(null,a,t),e)},useLayoutEffect:function(t,a){return Zi(4194308,4,t,a)},useInsertionEffect:function(t,a){return Zi(4,2,t,a)},useMemo:function(t,a){var e=da();return a=a===void 0?null:a,t=t(),e.memoizedState=[t,a],t},useReducer:function(t,a,e){var r=da();return a=e!==void 0?e(a):a,r.memoizedState=r.baseState=a,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},r.queue=t,t=t.dispatch=$H.bind(null,Yt,t),[r.memoizedState,t]},useRef:function(t){var a=da();return t={current:t},a.memoizedState=t},useState:L7,useDebugValue:ph,useDeferredValue:function(t){return da().memoizedState=t},useTransition:function(){var t=L7(!1),a=t[0];return t=NH.bind(null,t[1]),da().memoizedState=t,[a,t]},useMutableSource:function(){},useSyncExternalStore:function(t,a,e){var r=Yt,n=da();if(Wt){if(e===void 0)throw Error(Q(407));e=e()}else{if(e=a(),w0===null)throw Error(Q(349));(Ke&30)!==0||Z9(r,a,e)}n.memoizedState=e;var i={value:e,getSnapshot:a};return n.queue=i,V7(tc.bind(null,r,i,t),[t]),r.flags|=2048,mn(9,J9.bind(null,r,i,e,a),void 0,null),e},useId:function(){var t=da(),a=w0.identifierPrefix;if(Wt){var e=ka,r=Fa;e=(r&~(1<<32-G2(r)-1)).toString(32)+e,a=":"+a+"R"+e,e=pn++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=l.createElement(e,{is:r.is}):(t=l.createElement(e),e==="select"&&(l=t,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):t=l.createElementNS(t,e),t[sa]=a,t[sn]=r,Lc(t,a,!1,!1),a.stateNode=t;t:{switch(l=n3(e,r),e){case"dialog":Dt("cancel",t),Dt("close",t),n=r;break;case"iframe":case"object":case"embed":Dt("load",t),n=r;break;case"video":case"audio":for(n=0;nq4&&(a.flags|=128,r=!0,Dr(i,!1),a.lanes=4194304)}else{if(!r)if(t=Ml(l),t!==null){if(a.flags|=128,r=!0,e=t.updateQueue,e!==null&&(a.updateQueue=e,a.flags|=4),Dr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Wt)return D0(a),null}else 2*l0()-i.renderingStartTime>q4&&e!==1073741824&&(a.flags|=128,r=!0,Dr(i,!1),a.lanes=4194304);i.isBackwards?(l.sibling=a.child,a.child=l):(e=i.last,e!==null?e.sibling=l:a.child=l,i.last=l)}return i.tail!==null?(a=i.tail,i.rendering=a,i.tail=a.sibling,i.renderingStartTime=l0(),a.sibling=null,e=Xt.current,Pt(Xt,r?e&1|2:e&1),a):(D0(a),null);case 22:case 23:return wh(),r=a.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(a.flags|=8192),r&&(a.mode&1)!==0?(p2&1073741824)!==0&&(D0(a),a.subtreeFlags&6&&(a.flags|=8192)):D0(a),null;case 24:return null;case 25:return null}throw Error(Q(156,a.tag))}function ZH(t,a){switch(eh(a),a.tag){case 1:return r2(a.type)&&dl(),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return W4(),Nt(e2),Nt($0),gh(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 5:return vh(a),null;case 13:if(Nt(Xt),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(Q(340));$4()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return Nt(Xt),null;case 4:return W4(),null;case 10:return lh(a.type._context),null;case 22:case 23:return wh(),null;case 24:return null;default:return null}}var ji=!1,N0=!1,JH=typeof WeakSet=="function"?WeakSet:Set,V1=null;function k4(t,a){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){e0(t,a,r)}else e.current=null}function F3(t,a,e){try{e()}catch(r){e0(t,a,r)}}var b7=!1;function tx(t,a){if(u3=hl,t=S9(),th(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var r=e.getSelection&&e.getSelection();if(r&&r.rangeCount!==0){e=r.anchorNode;var n=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{e.nodeType,i.nodeType}catch{e=null;break t}var l=0,o=-1,h=-1,c=0,v=0,g=t,d=null;a:for(;;){for(var u;g!==e||n!==0&&g.nodeType!==3||(o=l+n),g!==i||r!==0&&g.nodeType!==3||(h=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(u=g.firstChild)!==null;)d=g,g=u;for(;;){if(g===t)break a;if(d===e&&++c===n&&(o=l),d===i&&++v===r&&(h=l),(u=g.nextSibling)!==null)break;g=d,d=g.parentNode}g=u}e=o===-1||h===-1?null:{start:o,end:h}}else e=null}e=e||{start:0,end:0}}else e=null;for(f3={focusedElem:t,selectionRange:e},hl=!1,V1=a;V1!==null;)if(a=V1,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,V1=t;else for(;V1!==null;){a=V1;try{var p=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var z=p.memoizedProps,w=p.memoizedState,s=a.stateNode,f=s.getSnapshotBeforeUpdate(a.elementType===a.type?z:W2(a.type,z),w);s.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var m=a.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(H){e0(a,a.return,H)}if(t=a.sibling,t!==null){t.return=a.return,V1=t;break}V1=a.return}return p=b7,b7=!1,p}function Jr(t,a,e){var r=a.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&t)===t){var i=n.destroy;n.destroy=void 0,i!==void 0&&F3(a,e,i)}n=n.next}while(n!==r)}}function _l(t,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var e=a=a.next;do{if((e.tag&t)===t){var r=e.create;e.destroy=r()}e=e.next}while(e!==a)}}function k3(t){var a=t.ref;if(a!==null){var e=t.stateNode;switch(t.tag){case 5:t=e;break;default:t=e}typeof a=="function"?a(t):a.current=t}}function yc(t){var a=t.alternate;a!==null&&(t.alternate=null,yc(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&(delete a[sa],delete a[sn],delete a[m3],delete a[TH],delete a[PH])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Cc(t){return t.tag===5||t.tag===3||t.tag===4}function E7(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Cc(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function b3(t,a,e){var r=t.tag;if(r===5||r===6)t=t.stateNode,a?e.nodeType===8?e.parentNode.insertBefore(t,a):e.insertBefore(t,a):(e.nodeType===8?(a=e.parentNode,a.insertBefore(t,e)):(a=e,a.appendChild(t)),e=e._reactRootContainer,e!=null||a.onclick!==null||(a.onclick=gl));else if(r!==4&&(t=t.child,t!==null))for(b3(t,a,e),t=t.sibling;t!==null;)b3(t,a,e),t=t.sibling}function E3(t,a,e){var r=t.tag;if(r===5||r===6)t=t.stateNode,a?e.insertBefore(t,a):e.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(E3(t,a,e),t=t.sibling;t!==null;)E3(t,a,e),t=t.sibling}var b0=null,j2=!1;function Xa(t,a,e){for(e=e.child;e!==null;)Bc(t,a,e),e=e.sibling}function Bc(t,a,e){if(ua&&typeof ua.onCommitFiberUnmount=="function")try{ua.onCommitFiberUnmount(Cl,e)}catch{}switch(e.tag){case 5:N0||k4(e,a);case 6:var r=b0,n=j2;b0=null,Xa(t,a,e),b0=r,j2=n,b0!==null&&(j2?(t=b0,e=e.stateNode,t.nodeType===8?t.parentNode.removeChild(e):t.removeChild(e)):b0.removeChild(e.stateNode));break;case 18:b0!==null&&(j2?(t=b0,e=e.stateNode,t.nodeType===8?Po(t.parentNode,e):t.nodeType===1&&Po(t,e),hn(t)):Po(b0,e.stateNode));break;case 4:r=b0,n=j2,b0=e.stateNode.containerInfo,j2=!0,Xa(t,a,e),b0=r,j2=n;break;case 0:case 11:case 14:case 15:if(!N0&&(r=e.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){n=r=r.next;do{var i=n,l=i.destroy;i=i.tag,l!==void 0&&((i&2)!==0||(i&4)!==0)&&F3(e,a,l),n=n.next}while(n!==r)}Xa(t,a,e);break;case 1:if(!N0&&(k4(e,a),r=e.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(o){e0(e,a,o)}Xa(t,a,e);break;case 21:Xa(t,a,e);break;case 22:e.mode&1?(N0=(r=N0)||e.memoizedState!==null,Xa(t,a,e),N0=r):Xa(t,a,e);break;default:Xa(t,a,e)}}function _7(t){var a=t.updateQueue;if(a!==null){t.updateQueue=null;var e=t.stateNode;e===null&&(e=t.stateNode=new JH),a.forEach(function(r){var n=cx.bind(null,t,r);e.has(r)||(e.add(r),r.then(n,n))})}}function U2(t,a){var e=a.deletions;if(e!==null)for(var r=0;rn&&(n=l),r&=~i}if(r=n,r=l0()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ex(r/1960))-r,10t?16:t,ae===null)var r=!1;else{if(t=ae,ae=null,Vl=0,(pt&6)!==0)throw Error(Q(331));var n=pt;for(pt|=4,V1=t.current;V1!==null;){var i=V1,l=i.child;if((V1.flags&16)!==0){var o=i.deletions;if(o!==null){for(var h=0;hl0()-Hh?We(t,0):Mh|=e),n2(t,a)}function Tc(t,a){a===0&&((t.mode&1)===0?a=1:(a=ki,ki<<=1,(ki&130023424)===0&&(ki=4194304)));var e=X0();t=Ta(t,a),t!==null&&(Hn(t,a,e),n2(t,e))}function hx(t){var a=t.memoizedState,e=0;a!==null&&(e=a.retryLane),Tc(t,e)}function cx(t,a){var e=0;switch(t.tag){case 13:var r=t.stateNode,n=t.memoizedState;n!==null&&(e=n.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(a),Tc(t,e)}var Pc;Pc=function(t,a,e){if(t!==null)if(t.memoizedProps!==a.pendingProps||e2.current)a2=!0;else{if((t.lanes&e)===0&&(a.flags&128)===0)return a2=!1,YH(t,a,e);a2=(t.flags&131072)!==0}else a2=!1,Wt&&(a.flags&1048576)!==0&&D9(a,fl,a.index);switch(a.lanes=0,a.tag){case 2:var r=a.type;Ji(t,a),t=a.pendingProps;var n=N4(a,$0.current);I4(a,e),n=sh(null,a,r,t,n,e);var i=uh();return a.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,r2(r)?(i=!0,sl(a)):i=!1,a.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,hh(a),n.updater=bl,a.stateNode=n,n._reactInternals=a,V3(a,r,t,e),a=C3(null,a,r,!0,i,e)):(a.tag=0,Wt&&i&&ah(a),K0(null,a,n,e),a=a.child),a;case 16:r=a.elementType;t:{switch(Ji(t,a),t=a.pendingProps,n=r._init,r=n(r._payload),a.type=r,n=a.tag=gx(r),t=W2(r,t),n){case 0:a=y3(null,a,r,t,e);break t;case 1:a=A7(null,a,r,t,e);break t;case 11:a=B7(null,a,r,t,e);break t;case 14:a=S7(null,a,r,W2(r.type,t),e);break t}throw Error(Q(306,r,""))}return a;case 0:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),y3(t,a,r,n,e);case 1:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),A7(t,a,r,n,e);case 3:t:{if(Hc(a),t===null)throw Error(Q(387));r=a.pendingProps,i=a.memoizedState,n=i.element,W9(t,a),ml(a,r,null,e);var l=a.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},a.updateQueue.baseState=i,a.memoizedState=i,a.flags&256){n=j4(Error(Q(423)),a),a=F7(t,a,r,e,n);break t}else if(r!==n){n=j4(Error(Q(424)),a),a=F7(t,a,r,e,n);break t}else for(z2=ie(a.stateNode.containerInfo.firstChild),m2=a,Wt=!0,q2=null,e=K9(a,null,r,e),a.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling;else{if($4(),r===n){a=Pa(t,a,e);break t}K0(t,a,r,e)}a=a.child}return a;case 5:return X9(a),t===null&&x3(a),r=a.type,n=a.pendingProps,i=t!==null?t.memoizedProps:null,l=n.children,p3(r,n)?l=null:i!==null&&p3(r,i)&&(a.flags|=32),Mc(t,a),K0(t,a,l,e),a.child;case 6:return t===null&&x3(a),null;case 13:return xc(t,a,e);case 4:return ch(a,a.stateNode.containerInfo),r=a.pendingProps,t===null?a.child=U4(a,null,r,e):K0(t,a,r,e),a.child;case 11:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),B7(t,a,r,n,e);case 7:return K0(t,a,a.pendingProps,e),a.child;case 8:return K0(t,a,a.pendingProps.children,e),a.child;case 12:return K0(t,a,a.pendingProps.children,e),a.child;case 10:t:{if(r=a.type._context,n=a.pendingProps,i=a.memoizedProps,l=n.value,Pt(pl,r._currentValue),r._currentValue=l,i!==null)if(X2(i.value,l)){if(i.children===n.children&&!e2.current){a=Pa(t,a,e);break t}}else for(i=a.child,i!==null&&(i.return=a);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var h=o.firstContext;h!==null;){if(h.context===r){if(i.tag===1){h=ba(-1,e&-e),h.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var v=c.pending;v===null?h.next=h:(h.next=v.next,v.next=h),c.pending=h}}i.lanes|=e,h=i.alternate,h!==null&&(h.lanes|=e),w3(i.return,e,a),o.lanes|=e;break}h=h.next}}else if(i.tag===10)l=i.type===a.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(Q(341));l.lanes|=e,o=l.alternate,o!==null&&(o.lanes|=e),w3(l,e,a),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===a){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}K0(t,a,n.children,e),a=a.child}return a;case 9:return n=a.type,r=a.pendingProps.children,I4(a,e),n=_2(n),r=r(n),a.flags|=1,K0(t,a,r,e),a.child;case 14:return r=a.type,n=W2(r,a.pendingProps),n=W2(r.type,n),S7(t,a,r,n,e);case 15:return zc(t,a,a.type,a.pendingProps,e);case 17:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),Ji(t,a),a.tag=1,r2(r)?(t=!0,sl(a)):t=!1,I4(a,e),q9(a,r,n),V3(a,r,n,e),C3(null,a,r,!0,t,e);case 19:return wc(t,a,e);case 22:return mc(t,a,e)}throw Error(Q(156,a.tag))};function Ic(t,a){return v9(t,a)}function vx(t,a,e,r){this.tag=t,this.key=e,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,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 b2(t,a,e,r){return new vx(t,a,e,r)}function Vh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function gx(t){if(typeof t=="function")return Vh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===U3)return 11;if(t===W3)return 14}return 2}function ce(t,a){var e=t.alternate;return e===null?(e=b2(t.tag,a,t.key,t.mode),e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.alternate=t,t.alternate=e):(e.pendingProps=a,e.type=t.type,e.flags=0,e.subtreeFlags=0,e.deletions=null),e.flags=t.flags&14680064,e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,a=t.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e}function el(t,a,e,r,n,i){var l=2;if(r=t,typeof t=="function")Vh(t)&&(l=1);else if(typeof t=="string")l=5;else t:switch(t){case L4:return je(e.children,n,i,a);case $3:l=8,n|=8;break;case Ko:return t=b2(12,e,a,n|2),t.elementType=Ko,t.lanes=i,t;case Xo:return t=b2(13,e,a,n),t.elementType=Xo,t.lanes=i,t;case Yo:return t=b2(19,e,a,n),t.elementType=Yo,t.lanes=i,t;case G7:return Pl(e,n,i,a);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j7:l=10;break t;case q7:l=9;break t;case U3:l=11;break t;case W3:l=14;break t;case Ya:l=16,r=null;break t}throw Error(Q(130,t==null?t:typeof t,""))}return a=b2(l,e,a,n),a.elementType=t,a.type=r,a.lanes=i,a}function je(t,a,e,r){return t=b2(7,t,r,a),t.lanes=e,t}function Pl(t,a,e,r){return t=b2(22,t,r,a),t.elementType=G7,t.lanes=e,t.stateNode={isHidden:!1},t}function jo(t,a,e){return t=b2(6,t,null,a),t.lanes=e,t}function qo(t,a,e){return a=b2(4,t.children!==null?t.children:[],t.key,a),a.lanes=e,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}function dx(t,a,e,r,n){this.tag=a,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=So(0),this.expirationTimes=So(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=So(0),this.identifierPrefix=r,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Rh(t,a,e,r,n,i,l,o,h){return t=new dx(t,a,e,o,h),a===1?(a=1,i===!0&&(a|=8)):a=0,i=b2(3,null,null,a),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:e,cache:null,transitions:null,pendingSuspenseBoundaries:null},hh(i),t}function sx(t,a,e){var r=3{"use strict";function Uc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uc)}catch(t){console.error(t)}}Uc(),Wc.exports=$c()});var qc=B(Sh=>{"use strict";var jc=$l();Sh.createRoot=jc.createRoot,Sh.hydrateRoot=jc.hydrateRoot;var rT});function mx(t){var a={};return function(e){return a[e]===void 0&&(a[e]=t(e)),a[e]}}function yx(t,a,e){let r=Kc(a,e);return typeof t=="string"&&t.indexOf("-")===-1&&!Vx(t[0])&&Object.keys(r).forEach(n=>{wx(n)||delete r[n]}),r}function Bx(t){return a=>{if(Array.isArray(a))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');let e=(n,i)=>{let{as:l=t,class:o}=n,h=yx(l,n,["as","class"]);h.ref=i,h.className=a.atomic?Gc(a.class,h.className||o):Gc(h.className||o,a.class);let{vars:c}=a;if(c){let v={};for(let u in c){let p=c[u],z=p[0],w=p[1]||"",s=typeof z=="function"?z(n):z;Cx(s,a.name),v[`--${u}`]=`${s}${w}`}let g=h.style||{},d=Object.keys(g);d.length>0&&d.forEach(u=>{v[u]=g[u]}),h.style=v}return t.__linaria&&t!==l?(h.as=l,Vn.default.createElement(t,h)):Vn.default.createElement(l,h)},r=Vn.default.forwardRef?Vn.default.forwardRef(e):n=>{let i=Kc(n,["innerRef"]);return e(i,n.innerRef)};return r.displayName=a.name,r.__linaria={className:a.class,extends:t},r}}var Vn,Mx,Hx,xx,wx,Lx,Gc,Vx,Rx,Kc,Cx,L0,Ah=co(()=>{Vn=F1(U1(),1);Mx=mx,Hx=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xx=Mx(function(t){return Hx.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),wx=xx,Lx=function(){let a=Array.prototype.slice.call(arguments).filter(Boolean),e={},r=[];a.forEach(i=>{(i?i.split(" "):[]).forEach(o=>{if(o.startsWith("atm_")){let[,h]=o.split("_");e[h]=o}else r.push(o)})});let n=[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.push(e[i]);return n.push(...r),n.join(" ")},Gc=Lx,Vx=t=>t.toUpperCase()===t,Rx=t=>a=>t.indexOf(a)===-1,Kc=(t,a)=>{let e={};return Object.keys(t).filter(Rx(a)).forEach(r=>{e[r]=t[r]}),e};Cx=(t,a)=>{{if(typeof t=="string"||typeof t=="number"&&isFinite(t))return;let e=typeof t=="object"?JSON.stringify(t):String(t);console.warn(`An interpolation evaluated to '${e}' in the component '${a}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}};L0=new Proxy(Bx,{get(t,a){return t(a)}})});var Yc=B((lT,Xc)=>{function Sx(t,a,e){return t===t&&(e!==void 0&&(t=t<=e?t:e),a!==void 0&&(t=t>=a?t:a)),t}Xc.exports=Sx});var Zc=B((oT,Qc)=>{var Ax=/\s/;function Fx(t){for(var a=t.length;a--&&Ax.test(t.charAt(a)););return a}Qc.exports=Fx});var tv=B((hT,Jc)=>{var kx=Zc(),bx=/^\s+/;function Ex(t){return t&&t.slice(0,kx(t)+1).replace(bx,"")}Jc.exports=Ex});var fe=B((cT,av)=>{function _x(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}av.exports=_x});var Fh=B((vT,ev)=>{var Tx=typeof global=="object"&&global&&global.Object===Object&&global;ev.exports=Tx});var Y2=B((gT,rv)=>{var Px=Fh(),Ix=typeof self=="object"&&self&&self.Object===Object&&self,Ox=Px||Ix||Function("return this")();rv.exports=Ox});var X4=B((dT,nv)=>{var Dx=Y2(),Nx=Dx.Symbol;nv.exports=Nx});var hv=B((sT,ov)=>{var iv=X4(),lv=Object.prototype,$x=lv.hasOwnProperty,Ux=lv.toString,Rn=iv?iv.toStringTag:void 0;function Wx(t){var a=$x.call(t,Rn),e=t[Rn];try{t[Rn]=void 0;var r=!0}catch{}var n=Ux.call(t);return r&&(a?t[Rn]=e:delete t[Rn]),n}ov.exports=Wx});var vv=B((uT,cv)=>{var jx=Object.prototype,qx=jx.toString;function Gx(t){return qx.call(t)}cv.exports=Gx});var Y4=B((fT,sv)=>{var gv=X4(),Kx=hv(),Xx=vv(),Yx="[object Null]",Qx="[object Undefined]",dv=gv?gv.toStringTag:void 0;function Zx(t){return t==null?t===void 0?Qx:Yx:dv&&dv in Object(t)?Kx(t):Xx(t)}sv.exports=Zx});var Q4=B((pT,uv)=>{function Jx(t){return t!=null&&typeof t=="object"}uv.exports=Jx});var yn=B((zT,fv)=>{var tw=Y4(),aw=Q4(),ew="[object Symbol]";function rw(t){return typeof t=="symbol"||aw(t)&&tw(t)==ew}fv.exports=rw});var Ul=B((mT,mv)=>{var nw=tv(),pv=fe(),iw=yn(),zv=0/0,lw=/^[-+]0x[0-9a-f]+$/i,ow=/^0b[01]+$/i,hw=/^0o[0-7]+$/i,cw=parseInt;function vw(t){if(typeof t=="number")return t;if(iw(t))return zv;if(pv(t)){var a=typeof t.valueOf=="function"?t.valueOf():t;t=pv(a)?a+"":a}if(typeof t!="string")return t===0?t:+t;t=nw(t);var e=ow.test(t);return e||hw.test(t)?cw(t.slice(2),e?2:8):lw.test(t)?zv:+t}mv.exports=vw});var Z4=B((MT,Mv)=>{var gw=Yc(),kh=Ul();function dw(t,a,e){return e===void 0&&(e=a,a=void 0),e!==void 0&&(e=kh(e),e=e===e?e:0),a!==void 0&&(a=kh(a),a=a===a?a:0),gw(kh(t),a,e)}Mv.exports=dw});var bh=B((HT,Hv)=>{var sw=Y4(),uw=fe(),fw="[object AsyncFunction]",pw="[object Function]",zw="[object GeneratorFunction]",mw="[object Proxy]";function Mw(t){if(!uw(t))return!1;var a=sw(t);return a==pw||a==zw||a==fw||a==mw}Hv.exports=Mw});var wv=B((xT,xv)=>{var Hw=Y2(),xw=Hw["__core-js_shared__"];xv.exports=xw});var Rv=B((wT,Vv)=>{var Eh=wv(),Lv=function(){var t=/[^.]+$/.exec(Eh&&Eh.keys&&Eh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ww(t){return!!Lv&&Lv in t}Vv.exports=ww});var _h=B((LT,yv)=>{var Lw=Function.prototype,Vw=Lw.toString;function Rw(t){if(t!=null){try{return Vw.call(t)}catch{}try{return t+""}catch{}}return""}yv.exports=Rw});var Bv=B((VT,Cv)=>{var yw=bh(),Cw=Rv(),Bw=fe(),Sw=_h(),Aw=/[\\^$.*+?()[\]{}|]/g,Fw=/^\[object .+?Constructor\]$/,kw=Function.prototype,bw=Object.prototype,Ew=kw.toString,_w=bw.hasOwnProperty,Tw=RegExp("^"+Ew.call(_w).replace(Aw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pw(t){if(!Bw(t)||Cw(t))return!1;var a=yw(t)?Tw:Fw;return a.test(Sw(t))}Cv.exports=Pw});var Av=B((RT,Sv)=>{function Iw(t,a){return t?.[a]}Sv.exports=Iw});var pe=B((yT,Fv)=>{var Ow=Bv(),Dw=Av();function Nw(t,a){var e=Dw(t,a);return Ow(e)?e:void 0}Fv.exports=Nw});var Cn=B((CT,kv)=>{var $w=pe(),Uw=$w(Object,"create");kv.exports=Uw});var _v=B((BT,Ev)=>{var bv=Cn();function Ww(){this.__data__=bv?bv(null):{},this.size=0}Ev.exports=Ww});var Pv=B((ST,Tv)=>{function jw(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}Tv.exports=jw});var Ov=B((AT,Iv)=>{var qw=Cn(),Gw="__lodash_hash_undefined__",Kw=Object.prototype,Xw=Kw.hasOwnProperty;function Yw(t){var a=this.__data__;if(qw){var e=a[t];return e===Gw?void 0:e}return Xw.call(a,t)?a[t]:void 0}Iv.exports=Yw});var Nv=B((FT,Dv)=>{var Qw=Cn(),Zw=Object.prototype,Jw=Zw.hasOwnProperty;function tL(t){var a=this.__data__;return Qw?a[t]!==void 0:Jw.call(a,t)}Dv.exports=tL});var Uv=B((kT,$v)=>{var aL=Cn(),eL="__lodash_hash_undefined__";function rL(t,a){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=aL&&a===void 0?eL:a,this}$v.exports=rL});var jv=B((bT,Wv)=>{var nL=_v(),iL=Pv(),lL=Ov(),oL=Nv(),hL=Uv();function J4(t){var a=-1,e=t==null?0:t.length;for(this.clear();++a{function cL(){this.__data__=[],this.size=0}qv.exports=cL});var Wl=B((_T,Kv)=>{function vL(t,a){return t===a||t!==t&&a!==a}Kv.exports=vL});var Bn=B((TT,Xv)=>{var gL=Wl();function dL(t,a){for(var e=t.length;e--;)if(gL(t[e][0],a))return e;return-1}Xv.exports=dL});var Qv=B((PT,Yv)=>{var sL=Bn(),uL=Array.prototype,fL=uL.splice;function pL(t){var a=this.__data__,e=sL(a,t);if(e<0)return!1;var r=a.length-1;return e==r?a.pop():fL.call(a,e,1),--this.size,!0}Yv.exports=pL});var Jv=B((IT,Zv)=>{var zL=Bn();function mL(t){var a=this.__data__,e=zL(a,t);return e<0?void 0:a[e][1]}Zv.exports=mL});var ag=B((OT,tg)=>{var ML=Bn();function HL(t){return ML(this.__data__,t)>-1}tg.exports=HL});var rg=B((DT,eg)=>{var xL=Bn();function wL(t,a){var e=this.__data__,r=xL(e,t);return r<0?(++this.size,e.push([t,a])):e[r][1]=a,this}eg.exports=wL});var Sn=B((NT,ng)=>{var LL=Gv(),VL=Qv(),RL=Jv(),yL=ag(),CL=rg();function tr(t){var a=-1,e=t==null?0:t.length;for(this.clear();++a{var BL=pe(),SL=Y2(),AL=BL(SL,"Map");ig.exports=AL});var hg=B((UT,og)=>{var lg=jv(),FL=Sn(),kL=jl();function bL(){this.size=0,this.__data__={hash:new lg,map:new(kL||FL),string:new lg}}og.exports=bL});var vg=B((WT,cg)=>{function EL(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}cg.exports=EL});var An=B((jT,gg)=>{var _L=vg();function TL(t,a){var e=t.__data__;return _L(a)?e[typeof a=="string"?"string":"hash"]:e.map}gg.exports=TL});var sg=B((qT,dg)=>{var PL=An();function IL(t){var a=PL(this,t).delete(t);return this.size-=a?1:0,a}dg.exports=IL});var fg=B((GT,ug)=>{var OL=An();function DL(t){return OL(this,t).get(t)}ug.exports=DL});var zg=B((KT,pg)=>{var NL=An();function $L(t){return NL(this,t).has(t)}pg.exports=$L});var Mg=B((XT,mg)=>{var UL=An();function WL(t,a){var e=UL(this,t),r=e.size;return e.set(t,a),this.size+=e.size==r?0:1,this}mg.exports=WL});var ql=B((YT,Hg)=>{var jL=hg(),qL=sg(),GL=fg(),KL=zg(),XL=Mg();function ar(t){var a=-1,e=t==null?0:t.length;for(this.clear();++a{var YL="__lodash_hash_undefined__";function QL(t){return this.__data__.set(t,YL),this}xg.exports=QL});var Vg=B((ZT,Lg)=>{function ZL(t){return this.__data__.has(t)}Lg.exports=ZL});var Th=B((JT,Rg)=>{var JL=ql(),tV=wg(),aV=Vg();function Gl(t){var a=-1,e=t==null?0:t.length;for(this.__data__=new JL;++a{function eV(t,a,e,r){for(var n=t.length,i=e+(r?1:-1);r?i--:++i{function rV(t){return t!==t}Bg.exports=rV});var Fg=B((eP,Ag)=>{function nV(t,a,e){for(var r=e-1,n=t.length;++r{var iV=Cg(),lV=Sg(),oV=Fg();function hV(t,a,e){return a===a?oV(t,a,e):iV(t,lV,e)}kg.exports=hV});var _g=B((nP,Eg)=>{var cV=bg();function vV(t,a){var e=t==null?0:t.length;return!!e&&cV(t,a,0)>-1}Eg.exports=vV});var Pg=B((iP,Tg)=>{function gV(t,a,e){for(var r=-1,n=t==null?0:t.length;++r{function dV(t,a){return t.has(a)}Ig.exports=dV});var Ih=B((oP,Og)=>{var sV=pe(),uV=Y2(),fV=sV(uV,"Set");Og.exports=fV});var Ng=B((hP,Dg)=>{function pV(){}Dg.exports=pV});var Kl=B((cP,$g)=>{function zV(t){var a=-1,e=Array(t.size);return t.forEach(function(r){e[++a]=r}),e}$g.exports=zV});var Wg=B((vP,Ug)=>{var Oh=Ih(),mV=Ng(),MV=Kl(),HV=1/0,xV=Oh&&1/MV(new Oh([,-0]))[1]==HV?function(t){return new Oh(t)}:mV;Ug.exports=xV});var qg=B((gP,jg)=>{var wV=Th(),LV=_g(),VV=Pg(),RV=Ph(),yV=Wg(),CV=Kl(),BV=200;function SV(t,a,e){var r=-1,n=LV,i=t.length,l=!0,o=[],h=o;if(e)l=!1,n=VV;else if(i>=BV){var c=a?null:yV(t);if(c)return CV(c);l=!1,n=RV,h=new wV}else h=a?[]:o;t:for(;++r{var AV=qg();function FV(t){return t&&t.length?AV(t):[]}Gg.exports=FV});var Dh=B((sP,Xg)=>{function kV(t,a){for(var e=-1,r=a.length,n=t.length;++e{var bV=Y4(),EV=Q4(),_V="[object Arguments]";function TV(t){return EV(t)&&bV(t)==_V}Yg.exports=TV});var Xl=B((fP,td)=>{var Zg=Qg(),PV=Q4(),Jg=Object.prototype,IV=Jg.hasOwnProperty,OV=Jg.propertyIsEnumerable,DV=Zg(function(){return arguments}())?Zg:function(t){return PV(t)&&IV.call(t,"callee")&&!OV.call(t,"callee")};td.exports=DV});var Q2=B((pP,ad)=>{var NV=Array.isArray;ad.exports=NV});var id=B((zP,nd)=>{var ed=X4(),$V=Xl(),UV=Q2(),rd=ed?ed.isConcatSpreadable:void 0;function WV(t){return UV(t)||$V(t)||!!(rd&&t&&t[rd])}nd.exports=WV});var hd=B((mP,od)=>{var jV=Dh(),qV=id();function ld(t,a,e,r,n){var i=-1,l=t.length;for(e||(e=qV),n||(n=[]);++i0&&e(o)?a>1?ld(o,a-1,e,r,n):jV(n,o):r||(n[n.length]=o)}return n}od.exports=ld});var vd=B((MP,cd)=>{var GV=hd();function KV(t){var a=t==null?0:t.length;return a?GV(t,1):[]}cd.exports=KV});var dd=B((HP,gd)=>{var XV=Math.ceil,YV=Math.max;function QV(t,a,e,r){for(var n=-1,i=YV(XV((a-t)/(e||1)),0),l=Array(i);i--;)l[r?i:++n]=t,t+=e;return l}gd.exports=QV});var Yl=B((xP,sd)=>{var ZV=9007199254740991;function JV(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ZV}sd.exports=JV});var Ql=B((wP,ud)=>{var tR=bh(),aR=Yl();function eR(t){return t!=null&&aR(t.length)&&!tR(t)}ud.exports=eR});var Zl=B((LP,fd)=>{var rR=9007199254740991,nR=/^(?:0|[1-9]\d*)$/;function iR(t,a){var e=typeof t;return a=a??rR,!!a&&(e=="number"||e!="symbol"&&nR.test(t))&&t>-1&&t%1==0&&t{var lR=Wl(),oR=Ql(),hR=Zl(),cR=fe();function vR(t,a,e){if(!cR(e))return!1;var r=typeof a;return(r=="number"?oR(e)&&hR(a,e.length):r=="string"&&a in e)?lR(e[a],t):!1}pd.exports=vR});var Hd=B((RP,Md)=>{var gR=Ul(),md=1/0,dR=17976931348623157e292;function sR(t){if(!t)return t===0?t:0;if(t=gR(t),t===md||t===-md){var a=t<0?-1:1;return a*dR}return t===t?t:0}Md.exports=sR});var wd=B((yP,xd)=>{var uR=dd(),fR=zd(),Nh=Hd();function pR(t){return function(a,e,r){return r&&typeof r!="number"&&fR(a,e,r)&&(e=r=void 0),a=Nh(a),e===void 0?(e=a,a=0):e=Nh(e),r=r===void 0?a{var zR=wd(),mR=zR();Ld.exports=mR});var Rd=B((BP,Vd)=>{var MR=Y2(),HR=function(){return MR.Date.now()};Vd.exports=HR});var Jl=B((SP,Cd)=>{var xR=fe(),Uh=Rd(),yd=Ul(),wR="Expected a function",LR=Math.max,VR=Math.min;function RR(t,a,e){var r,n,i,l,o,h,c=0,v=!1,g=!1,d=!0;if(typeof t!="function")throw new TypeError(wR);a=yd(a)||0,xR(e)&&(v=!!e.leading,g="maxWait"in e,i=g?LR(yd(e.maxWait)||0,a):i,d="trailing"in e?!!e.trailing:d);function u(y){var R=r,L=n;return r=n=void 0,c=y,l=t.apply(L,R),l}function p(y){return c=y,o=setTimeout(s,a),v?u(y):l}function z(y){var R=y-h,L=y-c,V=a-R;return g?VR(V,i-L):V}function w(y){var R=y-h,L=y-c;return h===void 0||R>=a||R<0||g&&L>=i}function s(){var y=Uh();if(w(y))return f(y);o=setTimeout(s,z(y))}function f(y){return o=void 0,d&&r?u(y):(r=n=void 0,l)}function m(){o!==void 0&&clearTimeout(o),c=0,r=h=n=o=void 0}function H(){return o===void 0?l:f(Uh())}function x(){var y=Uh(),R=w(y);if(r=arguments,n=this,h=y,R){if(o===void 0)return p(h);if(g)return clearTimeout(o),o=setTimeout(s,a),u(h)}return o===void 0&&(o=setTimeout(s,a)),l}return x.cancel=m,x.flush=H,x}Cd.exports=RR});var Sd=B((AP,Bd)=>{var yR=Object.prototype,CR=yR.hasOwnProperty;function BR(t,a){return t!=null&&CR.call(t,a)}Bd.exports=BR});var t5=B((FP,Ad)=>{var SR=Q2(),AR=yn(),FR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kR=/^\w*$/;function bR(t,a){if(SR(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||AR(t)?!0:kR.test(t)||!FR.test(t)||a!=null&&t in Object(a)}Ad.exports=bR});var bd=B((kP,kd)=>{var Fd=ql(),ER="Expected a function";function Wh(t,a){if(typeof t!="function"||a!=null&&typeof a!="function")throw new TypeError(ER);var e=function(){var r=arguments,n=a?a.apply(this,r):r[0],i=e.cache;if(i.has(n))return i.get(n);var l=t.apply(this,r);return e.cache=i.set(n,l)||i,l};return e.cache=new(Wh.Cache||Fd),e}Wh.Cache=Fd;kd.exports=Wh});var _d=B((bP,Ed)=>{var _R=bd(),TR=500;function PR(t){var a=_R(t,function(r){return e.size===TR&&e.clear(),r}),e=a.cache;return a}Ed.exports=PR});var Pd=B((EP,Td)=>{var IR=_d(),OR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DR=/\\(\\)?/g,NR=IR(function(t){var a=[];return t.charCodeAt(0)===46&&a.push(""),t.replace(OR,function(e,r,n,i){a.push(n?i.replace(DR,"$1"):r||e)}),a});Td.exports=NR});var Od=B((_P,Id)=>{function $R(t,a){for(var e=-1,r=t==null?0:t.length,n=Array(r);++e{var Dd=X4(),UR=Od(),WR=Q2(),jR=yn(),qR=1/0,Nd=Dd?Dd.prototype:void 0,$d=Nd?Nd.toString:void 0;function Ud(t){if(typeof t=="string")return t;if(WR(t))return UR(t,Ud)+"";if(jR(t))return $d?$d.call(t):"";var a=t+"";return a=="0"&&1/t==-qR?"-0":a}Wd.exports=Ud});var Gd=B((PP,qd)=>{var GR=jd();function KR(t){return t==null?"":GR(t)}qd.exports=KR});var jh=B((IP,Kd)=>{var XR=Q2(),YR=t5(),QR=Pd(),ZR=Gd();function JR(t,a){return XR(t)?t:YR(t,a)?[t]:QR(ZR(t))}Kd.exports=JR});var Fn=B((OP,Xd)=>{var ty=yn(),ay=1/0;function ey(t){if(typeof t=="string"||ty(t))return t;var a=t+"";return a=="0"&&1/t==-ay?"-0":a}Xd.exports=ey});var qh=B((DP,Yd)=>{var ry=jh(),ny=Xl(),iy=Q2(),ly=Zl(),oy=Yl(),hy=Fn();function cy(t,a,e){a=ry(a,t);for(var r=-1,n=a.length,i=!1;++r{var vy=Sd(),gy=qh();function dy(t,a){return t!=null&&gy(t,a,vy)}Qd.exports=dy});var ts=B(($P,Jd)=>{var sy=Jl(),uy=fe(),fy="Expected a function";function py(t,a,e){var r=!0,n=!0;if(typeof t!="function")throw new TypeError(fy);return uy(e)&&(r="leading"in e?!!e.leading:r,n="trailing"in e?!!e.trailing:n),sy(t,a,{leading:r,maxWait:a,trailing:n})}Jd.exports=py});var ns=B((WP,rs)=>{var Hy=pe(),xy=function(){try{var t=Hy(Object,"defineProperty");return t({},"",{}),t}catch{}}();rs.exports=xy});var os=B((jP,ls)=>{var is=ns();function wy(t,a,e){a=="__proto__"&&is?is(t,a,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[a]=e}ls.exports=wy});var cs=B((qP,hs)=>{function Ly(t,a,e,r){for(var n=-1,i=t==null?0:t.length;++n{function Vy(t){return function(a,e,r){for(var n=-1,i=Object(a),l=r(a),o=l.length;o--;){var h=l[t?o:++n];if(e(i[h],h,i)===!1)break}return a}}vs.exports=Vy});var ss=B((KP,ds)=>{var Ry=gs(),yy=Ry();ds.exports=yy});var fs=B((XP,us)=>{function Cy(t,a){for(var e=-1,r=Array(t);++e{function By(){return!1}ps.exports=By});var Kh=B((bn,nr)=>{var Sy=Y2(),Ay=zs(),Hs=typeof bn=="object"&&bn&&!bn.nodeType&&bn,ms=Hs&&typeof nr=="object"&&nr&&!nr.nodeType&&nr,Fy=ms&&ms.exports===Hs,Ms=Fy?Sy.Buffer:void 0,ky=Ms?Ms.isBuffer:void 0,by=ky||Ay;nr.exports=by});var ws=B((QP,xs)=>{var Ey=Y4(),_y=Yl(),Ty=Q4(),Py="[object Arguments]",Iy="[object Array]",Oy="[object Boolean]",Dy="[object Date]",Ny="[object Error]",$y="[object Function]",Uy="[object Map]",Wy="[object Number]",jy="[object Object]",qy="[object RegExp]",Gy="[object Set]",Ky="[object String]",Xy="[object WeakMap]",Yy="[object ArrayBuffer]",Qy="[object DataView]",Zy="[object Float32Array]",Jy="[object Float64Array]",tC="[object Int8Array]",aC="[object Int16Array]",eC="[object Int32Array]",rC="[object Uint8Array]",nC="[object Uint8ClampedArray]",iC="[object Uint16Array]",lC="[object Uint32Array]",$t={};$t[Zy]=$t[Jy]=$t[tC]=$t[aC]=$t[eC]=$t[rC]=$t[nC]=$t[iC]=$t[lC]=!0;$t[Py]=$t[Iy]=$t[Yy]=$t[Oy]=$t[Qy]=$t[Dy]=$t[Ny]=$t[$y]=$t[Uy]=$t[Wy]=$t[jy]=$t[qy]=$t[Gy]=$t[Ky]=$t[Xy]=!1;function oC(t){return Ty(t)&&_y(t.length)&&!!$t[Ey(t)]}xs.exports=oC});var Vs=B((ZP,Ls)=>{function hC(t){return function(a){return t(a)}}Ls.exports=hC});var ys=B((En,ir)=>{var cC=Fh(),Rs=typeof En=="object"&&En&&!En.nodeType&&En,_n=Rs&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,vC=_n&&_n.exports===Rs,Xh=vC&&cC.process,gC=function(){try{var t=_n&&_n.require&&_n.require("util").types;return t||Xh&&Xh.binding&&Xh.binding("util")}catch{}}();ir.exports=gC});var Yh=B((JP,Ss)=>{var dC=ws(),sC=Vs(),Cs=ys(),Bs=Cs&&Cs.isTypedArray,uC=Bs?sC(Bs):dC;Ss.exports=uC});var Fs=B((tI,As)=>{var fC=fs(),pC=Xl(),zC=Q2(),mC=Kh(),MC=Zl(),HC=Yh(),xC=Object.prototype,wC=xC.hasOwnProperty;function LC(t,a){var e=zC(t),r=!e&&pC(t),n=!e&&!r&&mC(t),i=!e&&!r&&!n&&HC(t),l=e||r||n||i,o=l?fC(t.length,String):[],h=o.length;for(var c in t)(a||wC.call(t,c))&&!(l&&(c=="length"||n&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||MC(c,h)))&&o.push(c);return o}As.exports=LC});var bs=B((aI,ks)=>{var VC=Object.prototype;function RC(t){var a=t&&t.constructor,e=typeof a=="function"&&a.prototype||VC;return t===e}ks.exports=RC});var _s=B((eI,Es)=>{function yC(t,a){return function(e){return t(a(e))}}Es.exports=yC});var Ps=B((rI,Ts)=>{var CC=_s(),BC=CC(Object.keys,Object);Ts.exports=BC});var Os=B((nI,Is)=>{var SC=bs(),AC=Ps(),FC=Object.prototype,kC=FC.hasOwnProperty;function bC(t){if(!SC(t))return AC(t);var a=[];for(var e in Object(t))kC.call(t,e)&&e!="constructor"&&a.push(e);return a}Is.exports=bC});var a5=B((iI,Ds)=>{var EC=Fs(),_C=Os(),TC=Ql();function PC(t){return TC(t)?EC(t):_C(t)}Ds.exports=PC});var $s=B((lI,Ns)=>{var IC=ss(),OC=a5();function DC(t,a){return t&&IC(t,a,OC)}Ns.exports=DC});var Ws=B((oI,Us)=>{var NC=Ql();function $C(t,a){return function(e,r){if(e==null)return e;if(!NC(e))return t(e,r);for(var n=e.length,i=a?n:-1,l=Object(e);(a?i--:++i{var UC=$s(),WC=Ws(),jC=WC(UC);js.exports=jC});var Ks=B((cI,Gs)=>{var qC=qs();function GC(t,a,e,r){return qC(t,function(n,i,l){a(r,n,e(n),l)}),r}Gs.exports=GC});var Ys=B((vI,Xs)=>{var KC=Sn();function XC(){this.__data__=new KC,this.size=0}Xs.exports=XC});var Zs=B((gI,Qs)=>{function YC(t){var a=this.__data__,e=a.delete(t);return this.size=a.size,e}Qs.exports=YC});var tu=B((dI,Js)=>{function QC(t){return this.__data__.get(t)}Js.exports=QC});var eu=B((sI,au)=>{function ZC(t){return this.__data__.has(t)}au.exports=ZC});var nu=B((uI,ru)=>{var JC=Sn(),tB=jl(),aB=ql(),eB=200;function rB(t,a){var e=this.__data__;if(e instanceof JC){var r=e.__data__;if(!tB||r.length{var nB=Sn(),iB=Ys(),lB=Zs(),oB=tu(),hB=eu(),cB=nu();function lr(t){var a=this.__data__=new nB(t);this.size=a.size}lr.prototype.clear=iB;lr.prototype.delete=lB;lr.prototype.get=oB;lr.prototype.has=hB;lr.prototype.set=cB;iu.exports=lr});var ou=B((pI,lu)=>{function vB(t,a){for(var e=-1,r=t==null?0:t.length;++e{var gB=Th(),dB=ou(),sB=Ph(),uB=1,fB=2;function pB(t,a,e,r,n,i){var l=e&uB,o=t.length,h=a.length;if(o!=h&&!(l&&h>o))return!1;var c=i.get(t),v=i.get(a);if(c&&v)return c==a&&v==t;var g=-1,d=!0,u=e&fB?new gB:void 0;for(i.set(t,a),i.set(a,t);++g{var zB=Y2(),mB=zB.Uint8Array;cu.exports=mB});var du=B((MI,gu)=>{function MB(t){var a=-1,e=Array(t.size);return t.forEach(function(r,n){e[++a]=[n,r]}),e}gu.exports=MB});var zu=B((HI,pu)=>{var su=X4(),uu=vu(),HB=Wl(),xB=Zh(),wB=du(),LB=Kl(),VB=1,RB=2,yB="[object Boolean]",CB="[object Date]",BB="[object Error]",SB="[object Map]",AB="[object Number]",FB="[object RegExp]",kB="[object Set]",bB="[object String]",EB="[object Symbol]",_B="[object ArrayBuffer]",TB="[object DataView]",fu=su?su.prototype:void 0,Jh=fu?fu.valueOf:void 0;function PB(t,a,e,r,n,i,l){switch(e){case TB:if(t.byteLength!=a.byteLength||t.byteOffset!=a.byteOffset)return!1;t=t.buffer,a=a.buffer;case _B:return!(t.byteLength!=a.byteLength||!i(new uu(t),new uu(a)));case yB:case CB:case AB:return HB(+t,+a);case BB:return t.name==a.name&&t.message==a.message;case FB:case bB:return t==a+"";case SB:var o=wB;case kB:var h=r&VB;if(o||(o=LB),t.size!=a.size&&!h)return!1;var c=l.get(t);if(c)return c==a;r|=RB,l.set(t,a);var v=xB(o(t),o(a),r,n,i,l);return l.delete(t),v;case EB:if(Jh)return Jh.call(t)==Jh.call(a)}return!1}pu.exports=PB});var Mu=B((xI,mu)=>{var IB=Dh(),OB=Q2();function DB(t,a,e){var r=a(t);return OB(t)?r:IB(r,e(t))}mu.exports=DB});var xu=B((wI,Hu)=>{function NB(t,a){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{function $B(){return[]}wu.exports=$B});var yu=B((VI,Ru)=>{var UB=xu(),WB=Lu(),jB=Object.prototype,qB=jB.propertyIsEnumerable,Vu=Object.getOwnPropertySymbols,GB=Vu?function(t){return t==null?[]:(t=Object(t),UB(Vu(t),function(a){return qB.call(t,a)}))}:WB;Ru.exports=GB});var Bu=B((RI,Cu)=>{var KB=Mu(),XB=yu(),YB=a5();function QB(t){return KB(t,YB,XB)}Cu.exports=QB});var Fu=B((yI,Au)=>{var Su=Bu(),ZB=1,JB=Object.prototype,tS=JB.hasOwnProperty;function aS(t,a,e,r,n,i){var l=e&ZB,o=Su(t),h=o.length,c=Su(a),v=c.length;if(h!=v&&!l)return!1;for(var g=h;g--;){var d=o[g];if(!(l?d in a:tS.call(a,d)))return!1}var u=i.get(t),p=i.get(a);if(u&&p)return u==a&&p==t;var z=!0;i.set(t,a),i.set(a,t);for(var w=l;++g{var eS=pe(),rS=Y2(),nS=eS(rS,"DataView");ku.exports=nS});var _u=B((BI,Eu)=>{var iS=pe(),lS=Y2(),oS=iS(lS,"Promise");Eu.exports=oS});var Pu=B((SI,Tu)=>{var hS=pe(),cS=Y2(),vS=hS(cS,"WeakMap");Tu.exports=vS});var ju=B((AI,Wu)=>{var t8=bu(),a8=jl(),e8=_u(),r8=Ih(),n8=Pu(),Uu=Y4(),or=_h(),Iu="[object Map]",gS="[object Object]",Ou="[object Promise]",Du="[object Set]",Nu="[object WeakMap]",$u="[object DataView]",dS=or(t8),sS=or(a8),uS=or(e8),fS=or(r8),pS=or(n8),Je=Uu;(t8&&Je(new t8(new ArrayBuffer(1)))!=$u||a8&&Je(new a8)!=Iu||e8&&Je(e8.resolve())!=Ou||r8&&Je(new r8)!=Du||n8&&Je(new n8)!=Nu)&&(Je=function(t){var a=Uu(t),e=a==gS?t.constructor:void 0,r=e?or(e):"";if(r)switch(r){case dS:return $u;case sS:return Iu;case uS:return Ou;case fS:return Du;case pS:return Nu}return a});Wu.exports=Je});var Ju=B((FI,Zu)=>{var i8=Qh(),zS=Zh(),mS=zu(),MS=Fu(),qu=ju(),Gu=Q2(),Ku=Kh(),HS=Yh(),xS=1,Xu="[object Arguments]",Yu="[object Array]",e5="[object Object]",wS=Object.prototype,Qu=wS.hasOwnProperty;function LS(t,a,e,r,n,i){var l=Gu(t),o=Gu(a),h=l?Yu:qu(t),c=o?Yu:qu(a);h=h==Xu?e5:h,c=c==Xu?e5:c;var v=h==e5,g=c==e5,d=h==c;if(d&&Ku(t)){if(!Ku(a))return!1;l=!0,v=!1}if(d&&!v)return i||(i=new i8),l||HS(t)?zS(t,a,e,r,n,i):mS(t,a,h,e,r,n,i);if(!(e&xS)){var u=v&&Qu.call(t,"__wrapped__"),p=g&&Qu.call(a,"__wrapped__");if(u||p){var z=u?t.value():t,w=p?a.value():a;return i||(i=new i8),n(z,w,e,r,i)}}return d?(i||(i=new i8),MS(t,a,e,r,n,i)):!1}Zu.exports=LS});var l8=B((kI,ef)=>{var VS=Ju(),tf=Q4();function af(t,a,e,r,n){return t===a?!0:t==null||a==null||!tf(t)&&!tf(a)?t!==t&&a!==a:VS(t,a,e,r,af,n)}ef.exports=af});var nf=B((bI,rf)=>{var RS=Qh(),yS=l8(),CS=1,BS=2;function SS(t,a,e,r){var n=e.length,i=n,l=!r;if(t==null)return!i;for(t=Object(t);n--;){var o=e[n];if(l&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n{var AS=fe();function FS(t){return t===t&&!AS(t)}lf.exports=FS});var hf=B((_I,of)=>{var kS=o8(),bS=a5();function ES(t){for(var a=bS(t),e=a.length;e--;){var r=a[e],n=t[r];a[e]=[r,n,kS(n)]}return a}of.exports=ES});var h8=B((TI,cf)=>{function _S(t,a){return function(e){return e==null?!1:e[t]===a&&(a!==void 0||t in Object(e))}}cf.exports=_S});var gf=B((PI,vf)=>{var TS=nf(),PS=hf(),IS=h8();function OS(t){var a=PS(t);return a.length==1&&a[0][2]?IS(a[0][0],a[0][1]):function(e){return e===t||TS(e,t,a)}}vf.exports=OS});var c8=B((II,df)=>{var DS=jh(),NS=Fn();function $S(t,a){a=DS(a,t);for(var e=0,r=a.length;t!=null&&e{var US=c8();function WS(t,a,e){var r=t==null?void 0:US(t,a);return r===void 0?e:r}sf.exports=WS});var pf=B((DI,ff)=>{function jS(t,a){return t!=null&&a in Object(t)}ff.exports=jS});var mf=B((NI,zf)=>{var qS=pf(),GS=qh();function KS(t,a){return t!=null&&GS(t,a,qS)}zf.exports=KS});var Hf=B(($I,Mf)=>{var XS=l8(),YS=uf(),QS=mf(),ZS=t5(),JS=o8(),tA=h8(),aA=Fn(),eA=1,rA=2;function nA(t,a){return ZS(t)&&JS(a)?tA(aA(t),a):function(e){var r=YS(e,t);return r===void 0&&r===a?QS(e,t):XS(a,r,eA|rA)}}Mf.exports=nA});var wf=B((UI,xf)=>{function iA(t){return t}xf.exports=iA});var Vf=B((WI,Lf)=>{function lA(t){return function(a){return a?.[t]}}Lf.exports=lA});var yf=B((jI,Rf)=>{var oA=c8();function hA(t){return function(a){return oA(a,t)}}Rf.exports=hA});var Bf=B((qI,Cf)=>{var cA=Vf(),vA=yf(),gA=t5(),dA=Fn();function sA(t){return gA(t)?cA(dA(t)):vA(t)}Cf.exports=sA});var Af=B((GI,Sf)=>{var uA=gf(),fA=Hf(),pA=wf(),zA=Q2(),mA=Bf();function MA(t){return typeof t=="function"?t:t==null?pA:typeof t=="object"?zA(t)?fA(t[0],t[1]):uA(t):mA(t)}Sf.exports=MA});var kf=B((KI,Ff)=>{var HA=cs(),xA=Ks(),wA=Af(),LA=Q2();function VA(t,a){return function(e,r){var n=LA(e)?HA:xA,i=a?a():{};return n(e,t,wA(r,2),i)}}Ff.exports=VA});var Ef=B((XI,bf)=>{var RA=os(),yA=kf(),CA=Object.prototype,BA=CA.hasOwnProperty,SA=yA(function(t,a,e){BA.call(t,e)?t[e].push(a):RA(t,e,[a])});bf.exports=SA});var Tf=B((YI,_f)=>{"use strict";var AA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";_f.exports=AA});var Df=B((QI,Of)=>{"use strict";var FA=Tf();function Pf(){}function If(){}If.resetWarningCache=Pf;Of.exports=function(){function t(r,n,i,l,o,h){if(h!==FA){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function a(){return t}var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:a,element:t,elementType:t,instanceOf:a,node:t,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:If,resetWarningCache:Pf};return e.PropTypes=e,e}});var $f=B((tO,Nf)=>{Nf.exports=Df()();var ZI,JI});var Uf=B(r5=>{(function(t,a){if(typeof define=="function"&&define.amd)define(["exports","react","prop-types"],a);else if(typeof r5<"u")a(r5,U1(),$f());else{var e={exports:{}};a(e.exports,t.react,t.propTypes),t.reactSwipe=e.exports}})(r5,function(t,a,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=u;var r=i(a),n=i(e);function i(s){return s&&s.__esModule?s:{default:s}}var l=Object.assign||function(s){for(var f=1;f=0||!Object.prototype.hasOwnProperty.call(s,H)||(m[H]=s[H]);return m}function h(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")}var c=function(){function s(f,m){for(var H=0;H0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return d?s:s.capture}function z(s){if("touches"in s){var f=s.touches[0],m=f.pageX,H=f.pageY;return{x:m,y:H}}var x=s.screenX,y=s.screenY;return{x,y}}var w=function(s){g(f,s);function f(){var m;h(this,f);for(var H=arguments.length,x=Array(H),y=0;yx&&this.props.onSwipeRight(1,H),this.movePosition.deltaY<-x?this.props.onSwipeUp(1,H):this.movePosition.deltaY>x&&this.props.onSwipeDown(1,H)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(H){this.swiper=H,this.props.innerRef(H)}},{key:"render",value:function(){var H=this.props,x=H.tagName,y=H.className,R=H.style,L=H.children,V=H.allowMouseEvents,C=H.onSwipeUp,k=H.onSwipeDown,b=H.onSwipeLeft,F=H.onSwipeRight,_=H.onSwipeStart,j=H.onSwipeMove,n1=H.onSwipeEnd,Z=H.innerRef,d1=H.tolerance,O=o(H,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return r.default.createElement(this.props.tagName,l({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:y,style:R},O),L)}}]),f}(a.Component);w.displayName="ReactSwipe",w.propTypes={tagName:n.default.string,className:n.default.string,style:n.default.object,children:n.default.node,allowMouseEvents:n.default.bool,onSwipeUp:n.default.func,onSwipeDown:n.default.func,onSwipeLeft:n.default.func,onSwipeRight:n.default.func,onSwipeStart:n.default.func,onSwipeMove:n.default.func,onSwipeEnd:n.default.func,innerRef:n.default.func,tolerance:n.default.number.isRequired},w.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=w})});var v8=B(n5=>{(function(t,a){if(typeof define=="function"&&define.amd)define(["exports","./react-swipe"],a);else if(typeof n5<"u")a(n5,Uf());else{var e={exports:{}};a(e.exports,t.reactSwipe),t.index=e.exports}})(n5,function(t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=r(a);function r(n){return n&&n.__esModule?n:{default:n}}t.default=e.default})});var Wf=B((rO,i5)=>{(function(){"use strict";var t={}.hasOwnProperty,a="[native code]";function e(){for(var r=[],n=0;n{"use strict";Object.defineProperty(l5,"__esModule",{value:!0});l5.default=void 0;var ze=kA(Wf());function kA(t){return t&&t.__esModule?t:{default:t}}function bA(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}var EA={ROOT:function(a){return(0,ze.default)(bA({"carousel-root":!0},a||"",!!a))},CAROUSEL:function(a){return(0,ze.default)({carousel:!0,"carousel-slider":a})},WRAPPER:function(a,e){return(0,ze.default)({"thumbs-wrapper":!a,"slider-wrapper":a,"axis-horizontal":e==="horizontal","axis-vertical":e!=="horizontal"})},SLIDER:function(a,e){return(0,ze.default)({thumbs:!a,slider:a,animated:!e})},ITEM:function(a,e,r){return(0,ze.default)({thumb:!a,slide:a,selected:e,previous:r})},ARROW_PREV:function(a){return(0,ze.default)({"control-arrow control-prev":!0,"control-disabled":a})},ARROW_NEXT:function(a){return(0,ze.default)({"control-arrow control-next":!0,"control-disabled":a})},DOT:function(a){return(0,ze.default)({dot:!0,selected:a})}};l5.default=EA});var jf=B(o5=>{"use strict";Object.defineProperty(o5,"__esModule",{value:!0});o5.outerWidth=void 0;var _A=function(a){var e=a.offsetWidth,r=getComputedStyle(a);return e+=parseInt(r.marginLeft)+parseInt(r.marginRight),e};o5.outerWidth=_A});var c5=B(h5=>{"use strict";Object.defineProperty(h5,"__esModule",{value:!0});h5.default=void 0;var TA=function(a,e,r){var n=a===0?a:a+e,i=r==="horizontal"?[n,0,0]:[0,n,0],l="translate3d",o="("+i.join(",")+")";return l+o};h5.default=TA});var d8=B(v5=>{"use strict";Object.defineProperty(v5,"__esModule",{value:!0});v5.default=void 0;var PA=function(){return window};v5.default=PA});var p8=B(u5=>{"use strict";Object.defineProperty(u5,"__esModule",{value:!0});u5.default=void 0;var Z2=DA(U1()),t4=s5(g8()),IA=jf(),qf=s5(c5()),OA=s5(v8()),g5=s5(d8());function s5(t){return t&&t.__esModule?t:{default:t}}function Kf(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return Kf=function(){return t},t}function DA(t){if(t&&t.__esModule)return t;if(t===null||Tn(t)!=="object"&&typeof t!="function")return{default:t};var a=Kf();if(a&&a.has(t))return a.get(t);var e={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=r?Object.getOwnPropertyDescriptor(t,n):null;i&&(i.get||i.set)?Object.defineProperty(e,n,i):e[n]=t[n]}return e.default=t,a&&a.set(t,e),e}function Tn(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tn=function(e){return typeof e}:Tn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tn(t)}function s8(){return s8=Object.assign||function(t){for(var a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function d5(t){return d5=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d5(t)}function U0(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}var GA=function(a){return a.hasOwnProperty("key")},f8=function(t){UA(e,t);var a=WA(e);function e(r){var n;return NA(this,e),n=a.call(this,r),U0(Q0(n),"itemsWrapperRef",void 0),U0(Q0(n),"itemsListRef",void 0),U0(Q0(n),"thumbsRef",void 0),U0(Q0(n),"setItemsWrapperRef",function(i){n.itemsWrapperRef=i}),U0(Q0(n),"setItemsListRef",function(i){n.itemsListRef=i}),U0(Q0(n),"setThumbsRef",function(i,l){n.thumbsRef||(n.thumbsRef=[]),n.thumbsRef[l]=i}),U0(Q0(n),"updateSizes",function(){if(!(!n.props.children||!n.itemsWrapperRef||!n.thumbsRef)){var i=Z2.Children.count(n.props.children),l=n.itemsWrapperRef.clientWidth,o=n.props.thumbWidth?n.props.thumbWidth:(0,IA.outerWidth)(n.thumbsRef[0]),h=Math.floor(l/o),c=h0&&(l=0),c===g&&l<0&&(l=0);var d=n.itemsWrapperRef.clientWidth,u=c+100/(d/l);return n.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(p){n.itemsListRef.style[p]=(0,qf.default)(u,"%",n.props.axis)}),!0}),U0(Q0(n),"slideRight",function(i){n.moveTo(n.state.firstItem-(typeof i=="number"?i:1))}),U0(Q0(n),"slideLeft",function(i){n.moveTo(n.state.firstItem+(typeof i=="number"?i:1))}),U0(Q0(n),"moveTo",function(i){i=i<0?0:i,i=i>=n.state.lastPosition?n.state.lastPosition:i,n.setState({firstItem:i})}),n.state={selectedItem:r.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},n}return $A(e,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(n){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==n.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,g5.default)().addEventListener("resize",this.updateSizes),(0,g5.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,g5.default)().removeEventListener("resize",this.updateSizes),(0,g5.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(n){var i=n;return n>=this.state.lastPosition&&(i=this.state.lastPosition),n1,l=this.state.showArrows&&this.state.firstItem>0,o=this.state.showArrows&&this.state.firstItem{"use strict";Object.defineProperty(f5,"__esModule",{value:!0});f5.default=void 0;var KA=function(){return document};f5.default=KA});var z8=B(P2=>{"use strict";Object.defineProperty(P2,"__esModule",{value:!0});P2.setPosition=P2.getPosition=P2.isKeyboardEvent=P2.defaultStatusFormatter=P2.noop=void 0;var XA=U1(),YA=QA(c5());function QA(t){return t&&t.__esModule?t:{default:t}}var ZA=function(){};P2.noop=ZA;var JA=function(a,e){return"".concat(a," of ").concat(e)};P2.defaultStatusFormatter=JA;var tF=function(a){return a?a.hasOwnProperty("key"):!1};P2.isKeyboardEvent=tF;var aF=function(a,e){if(e.infiniteLoop&&++a,a===0)return 0;var r=XA.Children.count(e.children);if(e.centerMode&&e.axis==="horizontal"){var n=-a*e.centerSlidePercentage,i=r-1;return a&&(a!==i||e.infiniteLoop)?n+=(100-e.centerSlidePercentage)/2:a===i&&(n+=100-e.centerSlidePercentage),n}return-a*100};P2.getPosition=aF;var eF=function(a,e){var r={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(n){r[n]=(0,YA.default)(a,"%",e)}),r};P2.setPosition=eF});var Zf=B(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.fadeAnimationHandler=za.slideStopSwipingHandler=za.slideSwipeAnimationHandler=za.slideAnimationHandler=void 0;var Qf=U1(),rF=nF(c5()),pa=z8();function nF(t){return t&&t.__esModule?t:{default:t}}function Yf(t,a){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,r)}return e}function a4(t){for(var a=1;al);if(o)return i<0?a.centerMode&&a.centerSlidePercentage&&a.axis==="horizontal"?r.itemListStyle=(0,pa.setPosition)(-(l+2)*a.centerSlidePercentage-(100-a.centerSlidePercentage)/2,a.axis):r.itemListStyle=(0,pa.setPosition)(-(l+2)*100,a.axis):i>l&&(r.itemListStyle=(0,pa.setPosition)(0,a.axis)),r;var h=(0,pa.getPosition)(n,a),c=(0,rF.default)(h,"%",a.axis),v=a.transitionTime+"ms";return r.itemListStyle={WebkitTransform:c,msTransform:c,OTransform:c,transform:c},e.swiping||(r.itemListStyle=a4(a4({},r.itemListStyle),{},{WebkitTransitionDuration:v,MozTransitionDuration:v,OTransitionDuration:v,transitionDuration:v,msTransitionDuration:v})),r};za.slideAnimationHandler=lF;var oF=function(a,e,r,n){var i={},l=e.axis==="horizontal",o=Qf.Children.count(e.children),h=0,c=(0,pa.getPosition)(r.selectedItem,e),v=e.infiniteLoop?(0,pa.getPosition)(o-1,e)-100:(0,pa.getPosition)(o-1,e),g=l?a.x:a.y,d=g;c===h&&g>0&&(d=0),c===v&&g<0&&(d=0);var u=c+100/(r.itemSize/d),p=Math.abs(g)>e.swipeScrollTolerance;return e.infiniteLoop&&p&&(r.selectedItem===0&&u>-100?u-=o*100:r.selectedItem===o-1&&u<-o*100&&(u+=o*100)),(!e.preventMovementUntilSwipeScrollTolerance||p||r.swipeMovementStarted)&&(r.swipeMovementStarted||n({swipeMovementStarted:!0}),i.itemListStyle=(0,pa.setPosition)(u,e.axis)),p&&!r.cancelClick&&n({cancelClick:!0}),i};za.slideSwipeAnimationHandler=oF;var hF=function(a,e){var r=(0,pa.getPosition)(e.selectedItem,a),n=(0,pa.setPosition)(r,a.axis);return{itemListStyle:n}};za.slideStopSwipingHandler=hF;var cF=function(a,e){var r=a.transitionTime+"ms",n="ease-in-out",i={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:n,msTransitionTimingFunction:n,MozTransitionTimingFunction:n,WebkitTransitionTimingFunction:n,OTransitionTimingFunction:n};return e.swiping||(i=a4(a4({},i),{},{WebkitTransitionDuration:r,MozTransitionDuration:r,OTransitionDuration:r,transitionDuration:r,msTransitionDuration:r})),{slideStyle:i,selectedStyle:a4(a4({},i),{},{opacity:1,position:"relative"}),prevStyle:a4({},i)}};za.fadeAnimationHandler=cF});var ep=B(H5=>{"use strict";Object.defineProperty(H5,"__esModule",{value:!0});H5.default=void 0;var Ct=dF(U1()),vF=On(v8()),Oa=On(g8()),gF=On(p8()),p5=On(Xf()),z5=On(d8()),Pn=z8(),m5=Zf();function On(t){return t&&t.__esModule?t:{default:t}}function ap(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return ap=function(){return t},t}function dF(t){if(t&&t.__esModule)return t;if(t===null||In(t)!=="object"&&typeof t!="function")return{default:t};var a=ap();if(a&&a.has(t))return a.get(t);var e={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=r?Object.getOwnPropertyDescriptor(t,n):null;i&&(i.get||i.set)?Object.defineProperty(e,n,i):e[n]=t[n]}return e.default=t,a&&a.set(t,e),e}function In(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?In=function(e){return typeof e}:In=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(t)}function m8(){return m8=Object.assign||function(t){for(var a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function M5(t){return M5=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},M5(t)}function nt(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}var H8=function(t){fF(e,t);var a=pF(e);function e(r){var n;sF(this,e),n=a.call(this,r),nt(it(n),"thumbsRef",void 0),nt(it(n),"carouselWrapperRef",void 0),nt(it(n),"listRef",void 0),nt(it(n),"itemsRef",void 0),nt(it(n),"timer",void 0),nt(it(n),"animationHandler",void 0),nt(it(n),"setThumbsRef",function(l){n.thumbsRef=l}),nt(it(n),"setCarouselWrapperRef",function(l){n.carouselWrapperRef=l}),nt(it(n),"setListRef",function(l){n.listRef=l}),nt(it(n),"setItemsRef",function(l,o){n.itemsRef||(n.itemsRef=[]),n.itemsRef[o]=l}),nt(it(n),"autoPlay",function(){Ct.Children.count(n.props.children)<=1||(n.clearAutoPlay(),n.props.autoPlay&&(n.timer=setTimeout(function(){n.increment()},n.props.interval)))}),nt(it(n),"clearAutoPlay",function(){n.timer&&clearTimeout(n.timer)}),nt(it(n),"resetAutoPlay",function(){n.clearAutoPlay(),n.autoPlay()}),nt(it(n),"stopOnHover",function(){n.setState({isMouseEntered:!0},n.clearAutoPlay)}),nt(it(n),"startOnLeave",function(){n.setState({isMouseEntered:!1},n.autoPlay)}),nt(it(n),"isFocusWithinTheCarousel",function(){return n.carouselWrapperRef?!!((0,p5.default)().activeElement===n.carouselWrapperRef||n.carouselWrapperRef.contains((0,p5.default)().activeElement)):!1}),nt(it(n),"navigateWithKeyboard",function(l){if(!!n.isFocusWithinTheCarousel()){var o=n.props.axis,h=o==="horizontal",c={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},v=h?c.ArrowRight:c.ArrowDown,g=h?c.ArrowLeft:c.ArrowUp;v===l.keyCode?n.increment():g===l.keyCode&&n.decrement()}}),nt(it(n),"updateSizes",function(){if(!(!n.state.initialized||!n.itemsRef||n.itemsRef.length===0)){var l=n.props.axis==="horizontal",o=n.itemsRef[0];if(!!o){var h=l?o.clientWidth:o.clientHeight;n.setState({itemSize:h}),n.thumbsRef&&n.thumbsRef.updateSizes()}}}),nt(it(n),"setMountState",function(){n.setState({hasMount:!0}),n.updateSizes()}),nt(it(n),"handleClickItem",function(l,o){if(Ct.Children.count(n.props.children)!==0){if(n.state.cancelClick){n.setState({cancelClick:!1});return}n.props.onClickItem(l,o),l!==n.state.selectedItem&&n.setState({selectedItem:l})}}),nt(it(n),"handleOnChange",function(l,o){Ct.Children.count(n.props.children)<=1||n.props.onChange(l,o)}),nt(it(n),"handleClickThumb",function(l,o){n.props.onClickThumb(l,o),n.moveTo(l)}),nt(it(n),"onSwipeStart",function(l){n.setState({swiping:!0}),n.props.onSwipeStart(l)}),nt(it(n),"onSwipeEnd",function(l){n.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),n.props.onSwipeEnd(l),n.clearAutoPlay(),n.state.autoPlay&&n.autoPlay()}),nt(it(n),"onSwipeMove",function(l,o){n.props.onSwipeMove(o);var h=n.props.swipeAnimationHandler(l,n.props,n.state,n.setState.bind(it(n)));return n.setState(J2({},h)),!!Object.keys(h).length}),nt(it(n),"decrement",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;n.moveTo(n.state.selectedItem-(typeof l=="number"?l:1))}),nt(it(n),"increment",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;n.moveTo(n.state.selectedItem+(typeof l=="number"?l:1))}),nt(it(n),"moveTo",function(l){if(typeof l=="number"){var o=Ct.Children.count(n.props.children)-1;l<0&&(l=n.props.infiniteLoop?o:0),l>o&&(l=n.props.infiniteLoop?0:o),n.selectItem({selectedItem:l}),n.state.autoPlay&&n.state.isMouseEntered===!1&&n.resetAutoPlay()}}),nt(it(n),"onClickNext",function(){n.increment(1)}),nt(it(n),"onClickPrev",function(){n.decrement(1)}),nt(it(n),"onSwipeForward",function(){n.increment(1),n.props.emulateTouch&&n.setState({cancelClick:!0})}),nt(it(n),"onSwipeBackwards",function(){n.decrement(1),n.props.emulateTouch&&n.setState({cancelClick:!0})}),nt(it(n),"changeItem",function(l){return function(o){(!(0,Pn.isKeyboardEvent)(o)||o.key==="Enter")&&n.moveTo(l)}}),nt(it(n),"selectItem",function(l){n.setState(J2({previousItem:n.state.selectedItem},l),function(){n.setState(n.animationHandler(n.props,n.state))}),n.handleOnChange(l.selectedItem,Ct.Children.toArray(n.props.children)[l.selectedItem])}),nt(it(n),"getInitialImage",function(){var l=n.props.selectedItem,o=n.itemsRef&&n.itemsRef[l],h=o&&o.getElementsByTagName("img")||[];return h[0]}),nt(it(n),"getVariableItemHeight",function(l){var o=n.itemsRef&&n.itemsRef[l];if(n.state.hasMount&&o&&o.children.length){var h=o.children[0].getElementsByTagName("img")||[];if(h.length>0){var c=h[0];if(!c.complete){var v=function u(){n.forceUpdate(),c.removeEventListener("load",u)};c.addEventListener("load",v)}}var g=h[0]||o.children[0],d=g.clientHeight;return d>0?d:null}return null});var i={initialized:!1,previousItem:r.selectedItem,selectedItem:r.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:r.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return n.animationHandler=typeof r.animationHandler=="function"&&r.animationHandler||r.animationHandler==="fade"&&m5.fadeAnimationHandler||m5.slideAnimationHandler,n.state=J2(J2({},i),n.animationHandler(r,i)),n}return uF(e,[{key:"componentDidMount",value:function(){!this.props.children||this.setupCarousel()}},{key:"componentDidUpdate",value:function(n,i){!n.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!n.autoFocus&&this.props.autoFocus&&this.forceFocus(),i.swiping&&!this.state.swiping&&this.setState(J2({},this.props.stopSwipingHandler(this.props,this.state))),(n.selectedItem!==this.props.selectedItem||n.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),n.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var n=this;this.bindEvents(),this.state.autoPlay&&Ct.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var i=n.getInitialImage();i&&!i.complete?i.addEventListener("load",n.setMountState):n.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var n=this.carouselWrapperRef;this.props.stopOnHover&&n&&(n.addEventListener("mouseenter",this.stopOnHover),n.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var n=this.carouselWrapperRef;this.props.stopOnHover&&n&&(n.removeEventListener("mouseenter",this.stopOnHover),n.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,z5.default)().addEventListener("resize",this.updateSizes),(0,z5.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,p5.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,z5.default)().removeEventListener("resize",this.updateSizes),(0,z5.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var n=this.getInitialImage();n&&n.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,p5.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var n;(n=this.carouselWrapperRef)===null||n===void 0||n.focus()}},{key:"renderItems",value:function(n){var i=this;return this.props.children?Ct.Children.map(this.props.children,function(l,o){var h=o===i.state.selectedItem,c=o===i.state.previousItem,v=h&&i.state.selectedStyle||c&&i.state.prevStyle||i.state.slideStyle||{};i.props.centerMode&&i.props.axis==="horizontal"&&(v=J2(J2({},v),{},{minWidth:i.props.centerSlidePercentage+"%"})),i.state.swiping&&i.state.swipeMovementStarted&&(v=J2(J2({},v),{},{pointerEvents:"none"}));var g={ref:function(u){return i.setItemsRef(u,o)},key:"itemKey"+o+(n?"clone":""),className:Oa.default.ITEM(!0,o===i.state.selectedItem,o===i.state.previousItem),onClick:i.handleClickItem.bind(i,o,l),style:v};return Ct.default.createElement("li",g,i.props.renderItem(l,{isSelected:o===i.state.selectedItem,isPrevious:o===i.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var n=this,i=this.props,l=i.showIndicators,o=i.labels,h=i.renderIndicator,c=i.children;return l?Ct.default.createElement("ul",{className:"control-dots"},Ct.Children.map(c,function(v,g){return h&&h(n.changeItem(g),g===n.state.selectedItem,g,o.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?Ct.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,Ct.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||Ct.Children.count(this.props.children)===0?null:Ct.default.createElement(gF.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var n=this;if(!this.props.children||Ct.Children.count(this.props.children)===0)return null;var i=this.props.swipeable&&Ct.Children.count(this.props.children)>1,l=this.props.axis==="horizontal",o=this.props.showArrows&&Ct.Children.count(this.props.children)>1,h=o&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,c=o&&(this.state.selectedItem{"use strict"});var ip=B(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Object.defineProperty(Dn,"Carousel",{enumerable:!0,get:function(){return MF.default}});Object.defineProperty(Dn,"CarouselProps",{enumerable:!0,get:function(){return HF.CarouselProps}});Object.defineProperty(Dn,"Thumbs",{enumerable:!0,get:function(){return xF.default}});var MF=np(ep()),HF=rp(),xF=np(p8());function np(t){return t&&t.__esModule?t:{default:t}}});function Hp(t,a){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&a.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n=o?n=n+fp("0",l-o):n=(n.substring(0,l)||"0")+"."+n.substring(l),e+n}function pp(t,a,e){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||e)&&a,n=x8(t),i=n.beforeDecimal,l=n.afterDecimal,o=n.hasNegation,h=parseFloat("0."+(l||"0")),c=l.length<=a?"0."+l:h.toFixed(a),v=c.split("."),g=i.split("").reverse().reduce(function(z,w,s){return z.length>s?(Number(z[0])+Number(w)).toString()+z.substring(1,z.length):w+z},v[0]),d=Lp(v[1]||"",a,e),u=o?"-":"",p=r?".":"";return""+u+g+p+d}function cr(t,a){if(t.value=t.value,t!==null){if(t.createTextRange){var e=t.createTextRange();return e.move("character",a),e.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(a,a),!0):(t.focus(),!1)}}function UF(t,a){for(var e=0,r=0,n=t.length,i=a.length;t[e]===a[e]&&ee&&n-r>e;)r++;return{from:{start:e,end:n-r},to:{start:e,end:i-r}}}function WF(t,a,e){return Math.min(Math.max(t,a),e)}function zp(t){return Math.max(t.selectionStart,t.selectionEnd)}function jF(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function qF(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function GF(t,a,e,r,n,i){var l=n.findIndex(function(f){return f}),o=t.slice(0,l);!a&&!e.startsWith(o)&&(e=o+e,r=r+o.length);for(var h=e.length,c=t.length,v={},g=new Array(h),d=0;d0&&g[z]===-1;)z--;var s=z===-1||g[z]===-1?0:g[z]+1;return s>w?w:r-s=0&&!e[a];)a--;a===-1&&(a=e.indexOf(!0))}else{for(;a<=n&&!e[a];)a++;a>n&&(a=e.lastIndexOf(!0))}return a===-1&&(a=n),a}function KF(t){for(var a=Array.from({length:t.length+1}).map(function(){return!0}),e=0,r=a.length;et.length-i.length&&(f=v),t=t.substring(0,f),t=ZF(w?"-"+t:t,r),t=(t.match(JF(u,!0))||[]).join("");var H=t.indexOf(u);t=t.replace(new RegExp(wp(u),"g"),function(V,C){return C===H?".":""});var x=x8(t,r),y=x.beforeDecimal,R=x.afterDecimal,L=x.addNegation;return h.end-h.start<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=l.createElement(e,{is:r.is}):(t=l.createElement(e),e==="select"&&(l=t,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):t=l.createElementNS(t,e),t[sa]=a,t[sn]=r,Lc(t,a,!1,!1),a.stateNode=t;t:{switch(l=n3(e,r),e){case"dialog":Dt("cancel",t),Dt("close",t),n=r;break;case"iframe":case"object":case"embed":Dt("load",t),n=r;break;case"video":case"audio":for(n=0;nq4&&(a.flags|=128,r=!0,Dr(i,!1),a.lanes=4194304)}else{if(!r)if(t=Ml(l),t!==null){if(a.flags|=128,r=!0,e=t.updateQueue,e!==null&&(a.updateQueue=e,a.flags|=4),Dr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Wt)return D0(a),null}else 2*l0()-i.renderingStartTime>q4&&e!==1073741824&&(a.flags|=128,r=!0,Dr(i,!1),a.lanes=4194304);i.isBackwards?(l.sibling=a.child,a.child=l):(e=i.last,e!==null?e.sibling=l:a.child=l,i.last=l)}return i.tail!==null?(a=i.tail,i.rendering=a,i.tail=a.sibling,i.renderingStartTime=l0(),a.sibling=null,e=Xt.current,Pt(Xt,r?e&1|2:e&1),a):(D0(a),null);case 22:case 23:return wh(),r=a.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(a.flags|=8192),r&&(a.mode&1)!==0?(p2&1073741824)!==0&&(D0(a),a.subtreeFlags&6&&(a.flags|=8192)):D0(a),null;case 24:return null;case 25:return null}throw Error(Q(156,a.tag))}function ZH(t,a){switch(eh(a),a.tag){case 1:return r2(a.type)&&dl(),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return W4(),Nt(e2),Nt($0),gh(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 5:return vh(a),null;case 13:if(Nt(Xt),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(Q(340));$4()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return Nt(Xt),null;case 4:return W4(),null;case 10:return lh(a.type._context),null;case 22:case 23:return wh(),null;case 24:return null;default:return null}}var ji=!1,N0=!1,JH=typeof WeakSet=="function"?WeakSet:Set,V1=null;function k4(t,a){var e=t.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){e0(t,a,r)}else e.current=null}function F3(t,a,e){try{e()}catch(r){e0(t,a,r)}}var b7=!1;function tx(t,a){if(u3=hl,t=S9(),th(t)){if("selectionStart"in t)var e={start:t.selectionStart,end:t.selectionEnd};else t:{e=(e=t.ownerDocument)&&e.defaultView||window;var r=e.getSelection&&e.getSelection();if(r&&r.rangeCount!==0){e=r.anchorNode;var n=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{e.nodeType,i.nodeType}catch{e=null;break t}var l=0,o=-1,h=-1,c=0,v=0,g=t,d=null;a:for(;;){for(var u;g!==e||n!==0&&g.nodeType!==3||(o=l+n),g!==i||r!==0&&g.nodeType!==3||(h=l+r),g.nodeType===3&&(l+=g.nodeValue.length),(u=g.firstChild)!==null;)d=g,g=u;for(;;){if(g===t)break a;if(d===e&&++c===n&&(o=l),d===i&&++v===r&&(h=l),(u=g.nextSibling)!==null)break;g=d,d=g.parentNode}g=u}e=o===-1||h===-1?null:{start:o,end:h}}else e=null}e=e||{start:0,end:0}}else e=null;for(f3={focusedElem:t,selectionRange:e},hl=!1,V1=a;V1!==null;)if(a=V1,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,V1=t;else for(;V1!==null;){a=V1;try{var p=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var z=p.memoizedProps,w=p.memoizedState,s=a.stateNode,f=s.getSnapshotBeforeUpdate(a.elementType===a.type?z:W2(a.type,z),w);s.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var m=a.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(H){e0(a,a.return,H)}if(t=a.sibling,t!==null){t.return=a.return,V1=t;break}V1=a.return}return p=b7,b7=!1,p}function Jr(t,a,e){var r=a.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var n=r=r.next;do{if((n.tag&t)===t){var i=n.destroy;n.destroy=void 0,i!==void 0&&F3(a,e,i)}n=n.next}while(n!==r)}}function _l(t,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var e=a=a.next;do{if((e.tag&t)===t){var r=e.create;e.destroy=r()}e=e.next}while(e!==a)}}function k3(t){var a=t.ref;if(a!==null){var e=t.stateNode;switch(t.tag){case 5:t=e;break;default:t=e}typeof a=="function"?a(t):a.current=t}}function yc(t){var a=t.alternate;a!==null&&(t.alternate=null,yc(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&(delete a[sa],delete a[sn],delete a[m3],delete a[TH],delete a[PH])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Cc(t){return t.tag===5||t.tag===3||t.tag===4}function E7(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Cc(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function b3(t,a,e){var r=t.tag;if(r===5||r===6)t=t.stateNode,a?e.nodeType===8?e.parentNode.insertBefore(t,a):e.insertBefore(t,a):(e.nodeType===8?(a=e.parentNode,a.insertBefore(t,e)):(a=e,a.appendChild(t)),e=e._reactRootContainer,e!=null||a.onclick!==null||(a.onclick=gl));else if(r!==4&&(t=t.child,t!==null))for(b3(t,a,e),t=t.sibling;t!==null;)b3(t,a,e),t=t.sibling}function E3(t,a,e){var r=t.tag;if(r===5||r===6)t=t.stateNode,a?e.insertBefore(t,a):e.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(E3(t,a,e),t=t.sibling;t!==null;)E3(t,a,e),t=t.sibling}var b0=null,j2=!1;function Ya(t,a,e){for(e=e.child;e!==null;)Bc(t,a,e),e=e.sibling}function Bc(t,a,e){if(ua&&typeof ua.onCommitFiberUnmount=="function")try{ua.onCommitFiberUnmount(Cl,e)}catch{}switch(e.tag){case 5:N0||k4(e,a);case 6:var r=b0,n=j2;b0=null,Ya(t,a,e),b0=r,j2=n,b0!==null&&(j2?(t=b0,e=e.stateNode,t.nodeType===8?t.parentNode.removeChild(e):t.removeChild(e)):b0.removeChild(e.stateNode));break;case 18:b0!==null&&(j2?(t=b0,e=e.stateNode,t.nodeType===8?Po(t.parentNode,e):t.nodeType===1&&Po(t,e),hn(t)):Po(b0,e.stateNode));break;case 4:r=b0,n=j2,b0=e.stateNode.containerInfo,j2=!0,Ya(t,a,e),b0=r,j2=n;break;case 0:case 11:case 14:case 15:if(!N0&&(r=e.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){n=r=r.next;do{var i=n,l=i.destroy;i=i.tag,l!==void 0&&((i&2)!==0||(i&4)!==0)&&F3(e,a,l),n=n.next}while(n!==r)}Ya(t,a,e);break;case 1:if(!N0&&(k4(e,a),r=e.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(o){e0(e,a,o)}Ya(t,a,e);break;case 21:Ya(t,a,e);break;case 22:e.mode&1?(N0=(r=N0)||e.memoizedState!==null,Ya(t,a,e),N0=r):Ya(t,a,e);break;default:Ya(t,a,e)}}function _7(t){var a=t.updateQueue;if(a!==null){t.updateQueue=null;var e=t.stateNode;e===null&&(e=t.stateNode=new JH),a.forEach(function(r){var n=cx.bind(null,t,r);e.has(r)||(e.add(r),r.then(n,n))})}}function U2(t,a){var e=a.deletions;if(e!==null)for(var r=0;rn&&(n=l),r&=~i}if(r=n,r=l0()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ex(r/1960))-r,10t?16:t,ee===null)var r=!1;else{if(t=ee,ee=null,Vl=0,(pt&6)!==0)throw Error(Q(331));var n=pt;for(pt|=4,V1=t.current;V1!==null;){var i=V1,l=i.child;if((V1.flags&16)!==0){var o=i.deletions;if(o!==null){for(var h=0;hl0()-Hh?We(t,0):Mh|=e),n2(t,a)}function Tc(t,a){a===0&&((t.mode&1)===0?a=1:(a=ki,ki<<=1,(ki&130023424)===0&&(ki=4194304)));var e=X0();t=Ta(t,a),t!==null&&(Hn(t,a,e),n2(t,e))}function hx(t){var a=t.memoizedState,e=0;a!==null&&(e=a.retryLane),Tc(t,e)}function cx(t,a){var e=0;switch(t.tag){case 13:var r=t.stateNode,n=t.memoizedState;n!==null&&(e=n.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(a),Tc(t,e)}var Pc;Pc=function(t,a,e){if(t!==null)if(t.memoizedProps!==a.pendingProps||e2.current)a2=!0;else{if((t.lanes&e)===0&&(a.flags&128)===0)return a2=!1,YH(t,a,e);a2=(t.flags&131072)!==0}else a2=!1,Wt&&(a.flags&1048576)!==0&&D9(a,fl,a.index);switch(a.lanes=0,a.tag){case 2:var r=a.type;Ji(t,a),t=a.pendingProps;var n=N4(a,$0.current);I4(a,e),n=sh(null,a,r,t,n,e);var i=uh();return a.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,r2(r)?(i=!0,sl(a)):i=!1,a.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,hh(a),n.updater=bl,a.stateNode=n,n._reactInternals=a,V3(a,r,t,e),a=C3(null,a,r,!0,i,e)):(a.tag=0,Wt&&i&&ah(a),K0(null,a,n,e),a=a.child),a;case 16:r=a.elementType;t:{switch(Ji(t,a),t=a.pendingProps,n=r._init,r=n(r._payload),a.type=r,n=a.tag=gx(r),t=W2(r,t),n){case 0:a=y3(null,a,r,t,e);break t;case 1:a=A7(null,a,r,t,e);break t;case 11:a=B7(null,a,r,t,e);break t;case 14:a=S7(null,a,r,W2(r.type,t),e);break t}throw Error(Q(306,r,""))}return a;case 0:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),y3(t,a,r,n,e);case 1:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),A7(t,a,r,n,e);case 3:t:{if(Hc(a),t===null)throw Error(Q(387));r=a.pendingProps,i=a.memoizedState,n=i.element,W9(t,a),ml(a,r,null,e);var l=a.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},a.updateQueue.baseState=i,a.memoizedState=i,a.flags&256){n=j4(Error(Q(423)),a),a=F7(t,a,r,e,n);break t}else if(r!==n){n=j4(Error(Q(424)),a),a=F7(t,a,r,e,n);break t}else for(z2=le(a.stateNode.containerInfo.firstChild),m2=a,Wt=!0,q2=null,e=K9(a,null,r,e),a.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling;else{if($4(),r===n){a=Pa(t,a,e);break t}K0(t,a,r,e)}a=a.child}return a;case 5:return X9(a),t===null&&x3(a),r=a.type,n=a.pendingProps,i=t!==null?t.memoizedProps:null,l=n.children,p3(r,n)?l=null:i!==null&&p3(r,i)&&(a.flags|=32),Mc(t,a),K0(t,a,l,e),a.child;case 6:return t===null&&x3(a),null;case 13:return xc(t,a,e);case 4:return ch(a,a.stateNode.containerInfo),r=a.pendingProps,t===null?a.child=U4(a,null,r,e):K0(t,a,r,e),a.child;case 11:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),B7(t,a,r,n,e);case 7:return K0(t,a,a.pendingProps,e),a.child;case 8:return K0(t,a,a.pendingProps.children,e),a.child;case 12:return K0(t,a,a.pendingProps.children,e),a.child;case 10:t:{if(r=a.type._context,n=a.pendingProps,i=a.memoizedProps,l=n.value,Pt(pl,r._currentValue),r._currentValue=l,i!==null)if(X2(i.value,l)){if(i.children===n.children&&!e2.current){a=Pa(t,a,e);break t}}else for(i=a.child,i!==null&&(i.return=a);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var h=o.firstContext;h!==null;){if(h.context===r){if(i.tag===1){h=ba(-1,e&-e),h.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var v=c.pending;v===null?h.next=h:(h.next=v.next,v.next=h),c.pending=h}}i.lanes|=e,h=i.alternate,h!==null&&(h.lanes|=e),w3(i.return,e,a),o.lanes|=e;break}h=h.next}}else if(i.tag===10)l=i.type===a.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(Q(341));l.lanes|=e,o=l.alternate,o!==null&&(o.lanes|=e),w3(l,e,a),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===a){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}K0(t,a,n.children,e),a=a.child}return a;case 9:return n=a.type,r=a.pendingProps.children,I4(a,e),n=_2(n),r=r(n),a.flags|=1,K0(t,a,r,e),a.child;case 14:return r=a.type,n=W2(r,a.pendingProps),n=W2(r.type,n),S7(t,a,r,n,e);case 15:return zc(t,a,a.type,a.pendingProps,e);case 17:return r=a.type,n=a.pendingProps,n=a.elementType===r?n:W2(r,n),Ji(t,a),a.tag=1,r2(r)?(t=!0,sl(a)):t=!1,I4(a,e),q9(a,r,n),V3(a,r,n,e),C3(null,a,r,!0,t,e);case 19:return wc(t,a,e);case 22:return mc(t,a,e)}throw Error(Q(156,a.tag))};function Ic(t,a){return v9(t,a)}function vx(t,a,e,r){this.tag=t,this.key=e,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,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 b2(t,a,e,r){return new vx(t,a,e,r)}function Vh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function gx(t){if(typeof t=="function")return Vh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===U3)return 11;if(t===W3)return 14}return 2}function ve(t,a){var e=t.alternate;return e===null?(e=b2(t.tag,a,t.key,t.mode),e.elementType=t.elementType,e.type=t.type,e.stateNode=t.stateNode,e.alternate=t,t.alternate=e):(e.pendingProps=a,e.type=t.type,e.flags=0,e.subtreeFlags=0,e.deletions=null),e.flags=t.flags&14680064,e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,a=t.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},e.sibling=t.sibling,e.index=t.index,e.ref=t.ref,e}function el(t,a,e,r,n,i){var l=2;if(r=t,typeof t=="function")Vh(t)&&(l=1);else if(typeof t=="string")l=5;else t:switch(t){case L4:return je(e.children,n,i,a);case $3:l=8,n|=8;break;case Ko:return t=b2(12,e,a,n|2),t.elementType=Ko,t.lanes=i,t;case Xo:return t=b2(13,e,a,n),t.elementType=Xo,t.lanes=i,t;case Yo:return t=b2(19,e,a,n),t.elementType=Yo,t.lanes=i,t;case G7:return Pl(e,n,i,a);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j7:l=10;break t;case q7:l=9;break t;case U3:l=11;break t;case W3:l=14;break t;case Qa:l=16,r=null;break t}throw Error(Q(130,t==null?t:typeof t,""))}return a=b2(l,e,a,n),a.elementType=t,a.type=r,a.lanes=i,a}function je(t,a,e,r){return t=b2(7,t,r,a),t.lanes=e,t}function Pl(t,a,e,r){return t=b2(22,t,r,a),t.elementType=G7,t.lanes=e,t.stateNode={isHidden:!1},t}function jo(t,a,e){return t=b2(6,t,null,a),t.lanes=e,t}function qo(t,a,e){return a=b2(4,t.children!==null?t.children:[],t.key,a),a.lanes=e,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}function dx(t,a,e,r,n){this.tag=a,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=So(0),this.expirationTimes=So(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=So(0),this.identifierPrefix=r,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Rh(t,a,e,r,n,i,l,o,h){return t=new dx(t,a,e,o,h),a===1?(a=1,i===!0&&(a|=8)):a=0,i=b2(3,null,null,a),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:e,cache:null,transitions:null,pendingSuspenseBoundaries:null},hh(i),t}function sx(t,a,e){var r=3{"use strict";function Uc(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uc)}catch(t){console.error(t)}}Uc(),Wc.exports=$c()});var qc=B(Sh=>{"use strict";var jc=$l();Sh.createRoot=jc.createRoot,Sh.hydrateRoot=jc.hydrateRoot;var rT});function mx(t){var a={};return function(e){return a[e]===void 0&&(a[e]=t(e)),a[e]}}function yx(t,a,e){let r=Kc(a,e);return typeof t=="string"&&t.indexOf("-")===-1&&!Vx(t[0])&&Object.keys(r).forEach(n=>{wx(n)||delete r[n]}),r}function Bx(t){return a=>{if(Array.isArray(a))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');let e=(n,i)=>{let{as:l=t,class:o}=n,h=yx(l,n,["as","class"]);h.ref=i,h.className=a.atomic?Gc(a.class,h.className||o):Gc(h.className||o,a.class);let{vars:c}=a;if(c){let v={};for(let u in c){let p=c[u],z=p[0],w=p[1]||"",s=typeof z=="function"?z(n):z;Cx(s,a.name),v[`--${u}`]=`${s}${w}`}let g=h.style||{},d=Object.keys(g);d.length>0&&d.forEach(u=>{v[u]=g[u]}),h.style=v}return t.__linaria&&t!==l?(h.as=l,Vn.default.createElement(t,h)):Vn.default.createElement(l,h)},r=Vn.default.forwardRef?Vn.default.forwardRef(e):n=>{let i=Kc(n,["innerRef"]);return e(i,n.innerRef)};return r.displayName=a.name,r.__linaria={className:a.class,extends:t},r}}var Vn,Mx,Hx,xx,wx,Lx,Gc,Vx,Rx,Kc,Cx,L0,Ah=co(()=>{Vn=F1(U1(),1);Mx=mx,Hx=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,xx=Mx(function(t){return Hx.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),wx=xx,Lx=function(){let a=Array.prototype.slice.call(arguments).filter(Boolean),e={},r=[];a.forEach(i=>{(i?i.split(" "):[]).forEach(o=>{if(o.startsWith("atm_")){let[,h]=o.split("_");e[h]=o}else r.push(o)})});let n=[];for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.push(e[i]);return n.push(...r),n.join(" ")},Gc=Lx,Vx=t=>t.toUpperCase()===t,Rx=t=>a=>t.indexOf(a)===-1,Kc=(t,a)=>{let e={};return Object.keys(t).filter(Rx(a)).forEach(r=>{e[r]=t[r]}),e};Cx=(t,a)=>{{if(typeof t=="string"||typeof t=="number"&&isFinite(t))return;let e=typeof t=="object"?JSON.stringify(t):String(t);console.warn(`An interpolation evaluated to '${e}' in the component '${a}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}};L0=new Proxy(Bx,{get(t,a){return t(a)}})});var Yc=B((lT,Xc)=>{function Sx(t,a,e){return t===t&&(e!==void 0&&(t=t<=e?t:e),a!==void 0&&(t=t>=a?t:a)),t}Xc.exports=Sx});var Zc=B((oT,Qc)=>{var Ax=/\s/;function Fx(t){for(var a=t.length;a--&&Ax.test(t.charAt(a)););return a}Qc.exports=Fx});var tv=B((hT,Jc)=>{var kx=Zc(),bx=/^\s+/;function Ex(t){return t&&t.slice(0,kx(t)+1).replace(bx,"")}Jc.exports=Ex});var pe=B((cT,av)=>{function _x(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}av.exports=_x});var Fh=B((vT,ev)=>{var Tx=typeof global=="object"&&global&&global.Object===Object&&global;ev.exports=Tx});var Y2=B((gT,rv)=>{var Px=Fh(),Ix=typeof self=="object"&&self&&self.Object===Object&&self,Ox=Px||Ix||Function("return this")();rv.exports=Ox});var X4=B((dT,nv)=>{var Dx=Y2(),Nx=Dx.Symbol;nv.exports=Nx});var hv=B((sT,ov)=>{var iv=X4(),lv=Object.prototype,$x=lv.hasOwnProperty,Ux=lv.toString,Rn=iv?iv.toStringTag:void 0;function Wx(t){var a=$x.call(t,Rn),e=t[Rn];try{t[Rn]=void 0;var r=!0}catch{}var n=Ux.call(t);return r&&(a?t[Rn]=e:delete t[Rn]),n}ov.exports=Wx});var vv=B((uT,cv)=>{var jx=Object.prototype,qx=jx.toString;function Gx(t){return qx.call(t)}cv.exports=Gx});var Y4=B((fT,sv)=>{var gv=X4(),Kx=hv(),Xx=vv(),Yx="[object Null]",Qx="[object Undefined]",dv=gv?gv.toStringTag:void 0;function Zx(t){return t==null?t===void 0?Qx:Yx:dv&&dv in Object(t)?Kx(t):Xx(t)}sv.exports=Zx});var Q4=B((pT,uv)=>{function Jx(t){return t!=null&&typeof t=="object"}uv.exports=Jx});var yn=B((zT,fv)=>{var tw=Y4(),aw=Q4(),ew="[object Symbol]";function rw(t){return typeof t=="symbol"||aw(t)&&tw(t)==ew}fv.exports=rw});var Ul=B((mT,mv)=>{var nw=tv(),pv=pe(),iw=yn(),zv=0/0,lw=/^[-+]0x[0-9a-f]+$/i,ow=/^0b[01]+$/i,hw=/^0o[0-7]+$/i,cw=parseInt;function vw(t){if(typeof t=="number")return t;if(iw(t))return zv;if(pv(t)){var a=typeof t.valueOf=="function"?t.valueOf():t;t=pv(a)?a+"":a}if(typeof t!="string")return t===0?t:+t;t=nw(t);var e=ow.test(t);return e||hw.test(t)?cw(t.slice(2),e?2:8):lw.test(t)?zv:+t}mv.exports=vw});var Z4=B((MT,Mv)=>{var gw=Yc(),kh=Ul();function dw(t,a,e){return e===void 0&&(e=a,a=void 0),e!==void 0&&(e=kh(e),e=e===e?e:0),a!==void 0&&(a=kh(a),a=a===a?a:0),gw(kh(t),a,e)}Mv.exports=dw});var bh=B((HT,Hv)=>{var sw=Y4(),uw=pe(),fw="[object AsyncFunction]",pw="[object Function]",zw="[object GeneratorFunction]",mw="[object Proxy]";function Mw(t){if(!uw(t))return!1;var a=sw(t);return a==pw||a==zw||a==fw||a==mw}Hv.exports=Mw});var wv=B((xT,xv)=>{var Hw=Y2(),xw=Hw["__core-js_shared__"];xv.exports=xw});var Rv=B((wT,Vv)=>{var Eh=wv(),Lv=function(){var t=/[^.]+$/.exec(Eh&&Eh.keys&&Eh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ww(t){return!!Lv&&Lv in t}Vv.exports=ww});var _h=B((LT,yv)=>{var Lw=Function.prototype,Vw=Lw.toString;function Rw(t){if(t!=null){try{return Vw.call(t)}catch{}try{return t+""}catch{}}return""}yv.exports=Rw});var Bv=B((VT,Cv)=>{var yw=bh(),Cw=Rv(),Bw=pe(),Sw=_h(),Aw=/[\\^$.*+?()[\]{}|]/g,Fw=/^\[object .+?Constructor\]$/,kw=Function.prototype,bw=Object.prototype,Ew=kw.toString,_w=bw.hasOwnProperty,Tw=RegExp("^"+Ew.call(_w).replace(Aw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pw(t){if(!Bw(t)||Cw(t))return!1;var a=yw(t)?Tw:Fw;return a.test(Sw(t))}Cv.exports=Pw});var Av=B((RT,Sv)=>{function Iw(t,a){return t?.[a]}Sv.exports=Iw});var ze=B((yT,Fv)=>{var Ow=Bv(),Dw=Av();function Nw(t,a){var e=Dw(t,a);return Ow(e)?e:void 0}Fv.exports=Nw});var Cn=B((CT,kv)=>{var $w=ze(),Uw=$w(Object,"create");kv.exports=Uw});var _v=B((BT,Ev)=>{var bv=Cn();function Ww(){this.__data__=bv?bv(null):{},this.size=0}Ev.exports=Ww});var Pv=B((ST,Tv)=>{function jw(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}Tv.exports=jw});var Ov=B((AT,Iv)=>{var qw=Cn(),Gw="__lodash_hash_undefined__",Kw=Object.prototype,Xw=Kw.hasOwnProperty;function Yw(t){var a=this.__data__;if(qw){var e=a[t];return e===Gw?void 0:e}return Xw.call(a,t)?a[t]:void 0}Iv.exports=Yw});var Nv=B((FT,Dv)=>{var Qw=Cn(),Zw=Object.prototype,Jw=Zw.hasOwnProperty;function tL(t){var a=this.__data__;return Qw?a[t]!==void 0:Jw.call(a,t)}Dv.exports=tL});var Uv=B((kT,$v)=>{var aL=Cn(),eL="__lodash_hash_undefined__";function rL(t,a){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=aL&&a===void 0?eL:a,this}$v.exports=rL});var jv=B((bT,Wv)=>{var nL=_v(),iL=Pv(),lL=Ov(),oL=Nv(),hL=Uv();function J4(t){var a=-1,e=t==null?0:t.length;for(this.clear();++a{function cL(){this.__data__=[],this.size=0}qv.exports=cL});var Wl=B((_T,Kv)=>{function vL(t,a){return t===a||t!==t&&a!==a}Kv.exports=vL});var Bn=B((TT,Xv)=>{var gL=Wl();function dL(t,a){for(var e=t.length;e--;)if(gL(t[e][0],a))return e;return-1}Xv.exports=dL});var Qv=B((PT,Yv)=>{var sL=Bn(),uL=Array.prototype,fL=uL.splice;function pL(t){var a=this.__data__,e=sL(a,t);if(e<0)return!1;var r=a.length-1;return e==r?a.pop():fL.call(a,e,1),--this.size,!0}Yv.exports=pL});var Jv=B((IT,Zv)=>{var zL=Bn();function mL(t){var a=this.__data__,e=zL(a,t);return e<0?void 0:a[e][1]}Zv.exports=mL});var ag=B((OT,tg)=>{var ML=Bn();function HL(t){return ML(this.__data__,t)>-1}tg.exports=HL});var rg=B((DT,eg)=>{var xL=Bn();function wL(t,a){var e=this.__data__,r=xL(e,t);return r<0?(++this.size,e.push([t,a])):e[r][1]=a,this}eg.exports=wL});var Sn=B((NT,ng)=>{var LL=Gv(),VL=Qv(),RL=Jv(),yL=ag(),CL=rg();function tr(t){var a=-1,e=t==null?0:t.length;for(this.clear();++a{var BL=ze(),SL=Y2(),AL=BL(SL,"Map");ig.exports=AL});var hg=B((UT,og)=>{var lg=jv(),FL=Sn(),kL=jl();function bL(){this.size=0,this.__data__={hash:new lg,map:new(kL||FL),string:new lg}}og.exports=bL});var vg=B((WT,cg)=>{function EL(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}cg.exports=EL});var An=B((jT,gg)=>{var _L=vg();function TL(t,a){var e=t.__data__;return _L(a)?e[typeof a=="string"?"string":"hash"]:e.map}gg.exports=TL});var sg=B((qT,dg)=>{var PL=An();function IL(t){var a=PL(this,t).delete(t);return this.size-=a?1:0,a}dg.exports=IL});var fg=B((GT,ug)=>{var OL=An();function DL(t){return OL(this,t).get(t)}ug.exports=DL});var zg=B((KT,pg)=>{var NL=An();function $L(t){return NL(this,t).has(t)}pg.exports=$L});var Mg=B((XT,mg)=>{var UL=An();function WL(t,a){var e=UL(this,t),r=e.size;return e.set(t,a),this.size+=e.size==r?0:1,this}mg.exports=WL});var ql=B((YT,Hg)=>{var jL=hg(),qL=sg(),GL=fg(),KL=zg(),XL=Mg();function ar(t){var a=-1,e=t==null?0:t.length;for(this.clear();++a{var YL="__lodash_hash_undefined__";function QL(t){return this.__data__.set(t,YL),this}xg.exports=QL});var Vg=B((ZT,Lg)=>{function ZL(t){return this.__data__.has(t)}Lg.exports=ZL});var Th=B((JT,Rg)=>{var JL=ql(),tV=wg(),aV=Vg();function Gl(t){var a=-1,e=t==null?0:t.length;for(this.__data__=new JL;++a{function eV(t,a,e,r){for(var n=t.length,i=e+(r?1:-1);r?i--:++i{function rV(t){return t!==t}Bg.exports=rV});var Fg=B((eP,Ag)=>{function nV(t,a,e){for(var r=e-1,n=t.length;++r{var iV=Cg(),lV=Sg(),oV=Fg();function hV(t,a,e){return a===a?oV(t,a,e):iV(t,lV,e)}kg.exports=hV});var _g=B((nP,Eg)=>{var cV=bg();function vV(t,a){var e=t==null?0:t.length;return!!e&&cV(t,a,0)>-1}Eg.exports=vV});var Pg=B((iP,Tg)=>{function gV(t,a,e){for(var r=-1,n=t==null?0:t.length;++r{function dV(t,a){return t.has(a)}Ig.exports=dV});var Ih=B((oP,Og)=>{var sV=ze(),uV=Y2(),fV=sV(uV,"Set");Og.exports=fV});var Ng=B((hP,Dg)=>{function pV(){}Dg.exports=pV});var Kl=B((cP,$g)=>{function zV(t){var a=-1,e=Array(t.size);return t.forEach(function(r){e[++a]=r}),e}$g.exports=zV});var Wg=B((vP,Ug)=>{var Oh=Ih(),mV=Ng(),MV=Kl(),HV=1/0,xV=Oh&&1/MV(new Oh([,-0]))[1]==HV?function(t){return new Oh(t)}:mV;Ug.exports=xV});var qg=B((gP,jg)=>{var wV=Th(),LV=_g(),VV=Pg(),RV=Ph(),yV=Wg(),CV=Kl(),BV=200;function SV(t,a,e){var r=-1,n=LV,i=t.length,l=!0,o=[],h=o;if(e)l=!1,n=VV;else if(i>=BV){var c=a?null:yV(t);if(c)return CV(c);l=!1,n=RV,h=new wV}else h=a?[]:o;t:for(;++r{var AV=qg();function FV(t){return t&&t.length?AV(t):[]}Gg.exports=FV});var Dh=B((sP,Xg)=>{function kV(t,a){for(var e=-1,r=a.length,n=t.length;++e{var bV=Y4(),EV=Q4(),_V="[object Arguments]";function TV(t){return EV(t)&&bV(t)==_V}Yg.exports=TV});var Xl=B((fP,td)=>{var Zg=Qg(),PV=Q4(),Jg=Object.prototype,IV=Jg.hasOwnProperty,OV=Jg.propertyIsEnumerable,DV=Zg(function(){return arguments}())?Zg:function(t){return PV(t)&&IV.call(t,"callee")&&!OV.call(t,"callee")};td.exports=DV});var Q2=B((pP,ad)=>{var NV=Array.isArray;ad.exports=NV});var id=B((zP,nd)=>{var ed=X4(),$V=Xl(),UV=Q2(),rd=ed?ed.isConcatSpreadable:void 0;function WV(t){return UV(t)||$V(t)||!!(rd&&t&&t[rd])}nd.exports=WV});var hd=B((mP,od)=>{var jV=Dh(),qV=id();function ld(t,a,e,r,n){var i=-1,l=t.length;for(e||(e=qV),n||(n=[]);++i0&&e(o)?a>1?ld(o,a-1,e,r,n):jV(n,o):r||(n[n.length]=o)}return n}od.exports=ld});var vd=B((MP,cd)=>{var GV=hd();function KV(t){var a=t==null?0:t.length;return a?GV(t,1):[]}cd.exports=KV});var dd=B((HP,gd)=>{var XV=Math.ceil,YV=Math.max;function QV(t,a,e,r){for(var n=-1,i=YV(XV((a-t)/(e||1)),0),l=Array(i);i--;)l[r?i:++n]=t,t+=e;return l}gd.exports=QV});var Yl=B((xP,sd)=>{var ZV=9007199254740991;function JV(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ZV}sd.exports=JV});var Ql=B((wP,ud)=>{var tR=bh(),aR=Yl();function eR(t){return t!=null&&aR(t.length)&&!tR(t)}ud.exports=eR});var Zl=B((LP,fd)=>{var rR=9007199254740991,nR=/^(?:0|[1-9]\d*)$/;function iR(t,a){var e=typeof t;return a=a??rR,!!a&&(e=="number"||e!="symbol"&&nR.test(t))&&t>-1&&t%1==0&&t{var lR=Wl(),oR=Ql(),hR=Zl(),cR=pe();function vR(t,a,e){if(!cR(e))return!1;var r=typeof a;return(r=="number"?oR(e)&&hR(a,e.length):r=="string"&&a in e)?lR(e[a],t):!1}pd.exports=vR});var Hd=B((RP,Md)=>{var gR=Ul(),md=1/0,dR=17976931348623157e292;function sR(t){if(!t)return t===0?t:0;if(t=gR(t),t===md||t===-md){var a=t<0?-1:1;return a*dR}return t===t?t:0}Md.exports=sR});var wd=B((yP,xd)=>{var uR=dd(),fR=zd(),Nh=Hd();function pR(t){return function(a,e,r){return r&&typeof r!="number"&&fR(a,e,r)&&(e=r=void 0),a=Nh(a),e===void 0?(e=a,a=0):e=Nh(e),r=r===void 0?a{var zR=wd(),mR=zR();Ld.exports=mR});var Rd=B((BP,Vd)=>{var MR=Y2(),HR=function(){return MR.Date.now()};Vd.exports=HR});var Jl=B((SP,Cd)=>{var xR=pe(),Uh=Rd(),yd=Ul(),wR="Expected a function",LR=Math.max,VR=Math.min;function RR(t,a,e){var r,n,i,l,o,h,c=0,v=!1,g=!1,d=!0;if(typeof t!="function")throw new TypeError(wR);a=yd(a)||0,xR(e)&&(v=!!e.leading,g="maxWait"in e,i=g?LR(yd(e.maxWait)||0,a):i,d="trailing"in e?!!e.trailing:d);function u(y){var R=r,L=n;return r=n=void 0,c=y,l=t.apply(L,R),l}function p(y){return c=y,o=setTimeout(s,a),v?u(y):l}function z(y){var R=y-h,L=y-c,V=a-R;return g?VR(V,i-L):V}function w(y){var R=y-h,L=y-c;return h===void 0||R>=a||R<0||g&&L>=i}function s(){var y=Uh();if(w(y))return f(y);o=setTimeout(s,z(y))}function f(y){return o=void 0,d&&r?u(y):(r=n=void 0,l)}function m(){o!==void 0&&clearTimeout(o),c=0,r=h=n=o=void 0}function H(){return o===void 0?l:f(Uh())}function x(){var y=Uh(),R=w(y);if(r=arguments,n=this,h=y,R){if(o===void 0)return p(h);if(g)return clearTimeout(o),o=setTimeout(s,a),u(h)}return o===void 0&&(o=setTimeout(s,a)),l}return x.cancel=m,x.flush=H,x}Cd.exports=RR});var Sd=B((AP,Bd)=>{var yR=Object.prototype,CR=yR.hasOwnProperty;function BR(t,a){return t!=null&&CR.call(t,a)}Bd.exports=BR});var t5=B((FP,Ad)=>{var SR=Q2(),AR=yn(),FR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kR=/^\w*$/;function bR(t,a){if(SR(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||AR(t)?!0:kR.test(t)||!FR.test(t)||a!=null&&t in Object(a)}Ad.exports=bR});var bd=B((kP,kd)=>{var Fd=ql(),ER="Expected a function";function Wh(t,a){if(typeof t!="function"||a!=null&&typeof a!="function")throw new TypeError(ER);var e=function(){var r=arguments,n=a?a.apply(this,r):r[0],i=e.cache;if(i.has(n))return i.get(n);var l=t.apply(this,r);return e.cache=i.set(n,l)||i,l};return e.cache=new(Wh.Cache||Fd),e}Wh.Cache=Fd;kd.exports=Wh});var _d=B((bP,Ed)=>{var _R=bd(),TR=500;function PR(t){var a=_R(t,function(r){return e.size===TR&&e.clear(),r}),e=a.cache;return a}Ed.exports=PR});var Pd=B((EP,Td)=>{var IR=_d(),OR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DR=/\\(\\)?/g,NR=IR(function(t){var a=[];return t.charCodeAt(0)===46&&a.push(""),t.replace(OR,function(e,r,n,i){a.push(n?i.replace(DR,"$1"):r||e)}),a});Td.exports=NR});var Od=B((_P,Id)=>{function $R(t,a){for(var e=-1,r=t==null?0:t.length,n=Array(r);++e{var Dd=X4(),UR=Od(),WR=Q2(),jR=yn(),qR=1/0,Nd=Dd?Dd.prototype:void 0,$d=Nd?Nd.toString:void 0;function Ud(t){if(typeof t=="string")return t;if(WR(t))return UR(t,Ud)+"";if(jR(t))return $d?$d.call(t):"";var a=t+"";return a=="0"&&1/t==-qR?"-0":a}Wd.exports=Ud});var Gd=B((PP,qd)=>{var GR=jd();function KR(t){return t==null?"":GR(t)}qd.exports=KR});var jh=B((IP,Kd)=>{var XR=Q2(),YR=t5(),QR=Pd(),ZR=Gd();function JR(t,a){return XR(t)?t:YR(t,a)?[t]:QR(ZR(t))}Kd.exports=JR});var Fn=B((OP,Xd)=>{var ty=yn(),ay=1/0;function ey(t){if(typeof t=="string"||ty(t))return t;var a=t+"";return a=="0"&&1/t==-ay?"-0":a}Xd.exports=ey});var qh=B((DP,Yd)=>{var ry=jh(),ny=Xl(),iy=Q2(),ly=Zl(),oy=Yl(),hy=Fn();function cy(t,a,e){a=ry(a,t);for(var r=-1,n=a.length,i=!1;++r{var vy=Sd(),gy=qh();function dy(t,a){return t!=null&&gy(t,a,vy)}Qd.exports=dy});var ts=B(($P,Jd)=>{var sy=Jl(),uy=pe(),fy="Expected a function";function py(t,a,e){var r=!0,n=!0;if(typeof t!="function")throw new TypeError(fy);return uy(e)&&(r="leading"in e?!!e.leading:r,n="trailing"in e?!!e.trailing:n),sy(t,a,{leading:r,maxWait:a,trailing:n})}Jd.exports=py});var ns=B((WP,rs)=>{var Hy=ze(),xy=function(){try{var t=Hy(Object,"defineProperty");return t({},"",{}),t}catch{}}();rs.exports=xy});var os=B((jP,ls)=>{var is=ns();function wy(t,a,e){a=="__proto__"&&is?is(t,a,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[a]=e}ls.exports=wy});var cs=B((qP,hs)=>{function Ly(t,a,e,r){for(var n=-1,i=t==null?0:t.length;++n{function Vy(t){return function(a,e,r){for(var n=-1,i=Object(a),l=r(a),o=l.length;o--;){var h=l[t?o:++n];if(e(i[h],h,i)===!1)break}return a}}vs.exports=Vy});var ss=B((KP,ds)=>{var Ry=gs(),yy=Ry();ds.exports=yy});var fs=B((XP,us)=>{function Cy(t,a){for(var e=-1,r=Array(t);++e{function By(){return!1}ps.exports=By});var Kh=B((bn,nr)=>{var Sy=Y2(),Ay=zs(),Hs=typeof bn=="object"&&bn&&!bn.nodeType&&bn,ms=Hs&&typeof nr=="object"&&nr&&!nr.nodeType&&nr,Fy=ms&&ms.exports===Hs,Ms=Fy?Sy.Buffer:void 0,ky=Ms?Ms.isBuffer:void 0,by=ky||Ay;nr.exports=by});var ws=B((QP,xs)=>{var Ey=Y4(),_y=Yl(),Ty=Q4(),Py="[object Arguments]",Iy="[object Array]",Oy="[object Boolean]",Dy="[object Date]",Ny="[object Error]",$y="[object Function]",Uy="[object Map]",Wy="[object Number]",jy="[object Object]",qy="[object RegExp]",Gy="[object Set]",Ky="[object String]",Xy="[object WeakMap]",Yy="[object ArrayBuffer]",Qy="[object DataView]",Zy="[object Float32Array]",Jy="[object Float64Array]",tC="[object Int8Array]",aC="[object Int16Array]",eC="[object Int32Array]",rC="[object Uint8Array]",nC="[object Uint8ClampedArray]",iC="[object Uint16Array]",lC="[object Uint32Array]",$t={};$t[Zy]=$t[Jy]=$t[tC]=$t[aC]=$t[eC]=$t[rC]=$t[nC]=$t[iC]=$t[lC]=!0;$t[Py]=$t[Iy]=$t[Yy]=$t[Oy]=$t[Qy]=$t[Dy]=$t[Ny]=$t[$y]=$t[Uy]=$t[Wy]=$t[jy]=$t[qy]=$t[Gy]=$t[Ky]=$t[Xy]=!1;function oC(t){return Ty(t)&&_y(t.length)&&!!$t[Ey(t)]}xs.exports=oC});var Vs=B((ZP,Ls)=>{function hC(t){return function(a){return t(a)}}Ls.exports=hC});var ys=B((En,ir)=>{var cC=Fh(),Rs=typeof En=="object"&&En&&!En.nodeType&&En,_n=Rs&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,vC=_n&&_n.exports===Rs,Xh=vC&&cC.process,gC=function(){try{var t=_n&&_n.require&&_n.require("util").types;return t||Xh&&Xh.binding&&Xh.binding("util")}catch{}}();ir.exports=gC});var Yh=B((JP,Ss)=>{var dC=ws(),sC=Vs(),Cs=ys(),Bs=Cs&&Cs.isTypedArray,uC=Bs?sC(Bs):dC;Ss.exports=uC});var Fs=B((tI,As)=>{var fC=fs(),pC=Xl(),zC=Q2(),mC=Kh(),MC=Zl(),HC=Yh(),xC=Object.prototype,wC=xC.hasOwnProperty;function LC(t,a){var e=zC(t),r=!e&&pC(t),n=!e&&!r&&mC(t),i=!e&&!r&&!n&&HC(t),l=e||r||n||i,o=l?fC(t.length,String):[],h=o.length;for(var c in t)(a||wC.call(t,c))&&!(l&&(c=="length"||n&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||MC(c,h)))&&o.push(c);return o}As.exports=LC});var bs=B((aI,ks)=>{var VC=Object.prototype;function RC(t){var a=t&&t.constructor,e=typeof a=="function"&&a.prototype||VC;return t===e}ks.exports=RC});var _s=B((eI,Es)=>{function yC(t,a){return function(e){return t(a(e))}}Es.exports=yC});var Ps=B((rI,Ts)=>{var CC=_s(),BC=CC(Object.keys,Object);Ts.exports=BC});var Os=B((nI,Is)=>{var SC=bs(),AC=Ps(),FC=Object.prototype,kC=FC.hasOwnProperty;function bC(t){if(!SC(t))return AC(t);var a=[];for(var e in Object(t))kC.call(t,e)&&e!="constructor"&&a.push(e);return a}Is.exports=bC});var a5=B((iI,Ds)=>{var EC=Fs(),_C=Os(),TC=Ql();function PC(t){return TC(t)?EC(t):_C(t)}Ds.exports=PC});var $s=B((lI,Ns)=>{var IC=ss(),OC=a5();function DC(t,a){return t&&IC(t,a,OC)}Ns.exports=DC});var Ws=B((oI,Us)=>{var NC=Ql();function $C(t,a){return function(e,r){if(e==null)return e;if(!NC(e))return t(e,r);for(var n=e.length,i=a?n:-1,l=Object(e);(a?i--:++i{var UC=$s(),WC=Ws(),jC=WC(UC);js.exports=jC});var Ks=B((cI,Gs)=>{var qC=qs();function GC(t,a,e,r){return qC(t,function(n,i,l){a(r,n,e(n),l)}),r}Gs.exports=GC});var Ys=B((vI,Xs)=>{var KC=Sn();function XC(){this.__data__=new KC,this.size=0}Xs.exports=XC});var Zs=B((gI,Qs)=>{function YC(t){var a=this.__data__,e=a.delete(t);return this.size=a.size,e}Qs.exports=YC});var tu=B((dI,Js)=>{function QC(t){return this.__data__.get(t)}Js.exports=QC});var eu=B((sI,au)=>{function ZC(t){return this.__data__.has(t)}au.exports=ZC});var nu=B((uI,ru)=>{var JC=Sn(),tB=jl(),aB=ql(),eB=200;function rB(t,a){var e=this.__data__;if(e instanceof JC){var r=e.__data__;if(!tB||r.length{var nB=Sn(),iB=Ys(),lB=Zs(),oB=tu(),hB=eu(),cB=nu();function lr(t){var a=this.__data__=new nB(t);this.size=a.size}lr.prototype.clear=iB;lr.prototype.delete=lB;lr.prototype.get=oB;lr.prototype.has=hB;lr.prototype.set=cB;iu.exports=lr});var ou=B((pI,lu)=>{function vB(t,a){for(var e=-1,r=t==null?0:t.length;++e{var gB=Th(),dB=ou(),sB=Ph(),uB=1,fB=2;function pB(t,a,e,r,n,i){var l=e&uB,o=t.length,h=a.length;if(o!=h&&!(l&&h>o))return!1;var c=i.get(t),v=i.get(a);if(c&&v)return c==a&&v==t;var g=-1,d=!0,u=e&fB?new gB:void 0;for(i.set(t,a),i.set(a,t);++g{var zB=Y2(),mB=zB.Uint8Array;cu.exports=mB});var du=B((MI,gu)=>{function MB(t){var a=-1,e=Array(t.size);return t.forEach(function(r,n){e[++a]=[n,r]}),e}gu.exports=MB});var zu=B((HI,pu)=>{var su=X4(),uu=vu(),HB=Wl(),xB=Zh(),wB=du(),LB=Kl(),VB=1,RB=2,yB="[object Boolean]",CB="[object Date]",BB="[object Error]",SB="[object Map]",AB="[object Number]",FB="[object RegExp]",kB="[object Set]",bB="[object String]",EB="[object Symbol]",_B="[object ArrayBuffer]",TB="[object DataView]",fu=su?su.prototype:void 0,Jh=fu?fu.valueOf:void 0;function PB(t,a,e,r,n,i,l){switch(e){case TB:if(t.byteLength!=a.byteLength||t.byteOffset!=a.byteOffset)return!1;t=t.buffer,a=a.buffer;case _B:return!(t.byteLength!=a.byteLength||!i(new uu(t),new uu(a)));case yB:case CB:case AB:return HB(+t,+a);case BB:return t.name==a.name&&t.message==a.message;case FB:case bB:return t==a+"";case SB:var o=wB;case kB:var h=r&VB;if(o||(o=LB),t.size!=a.size&&!h)return!1;var c=l.get(t);if(c)return c==a;r|=RB,l.set(t,a);var v=xB(o(t),o(a),r,n,i,l);return l.delete(t),v;case EB:if(Jh)return Jh.call(t)==Jh.call(a)}return!1}pu.exports=PB});var Mu=B((xI,mu)=>{var IB=Dh(),OB=Q2();function DB(t,a,e){var r=a(t);return OB(t)?r:IB(r,e(t))}mu.exports=DB});var xu=B((wI,Hu)=>{function NB(t,a){for(var e=-1,r=t==null?0:t.length,n=0,i=[];++e{function $B(){return[]}wu.exports=$B});var yu=B((VI,Ru)=>{var UB=xu(),WB=Lu(),jB=Object.prototype,qB=jB.propertyIsEnumerable,Vu=Object.getOwnPropertySymbols,GB=Vu?function(t){return t==null?[]:(t=Object(t),UB(Vu(t),function(a){return qB.call(t,a)}))}:WB;Ru.exports=GB});var Bu=B((RI,Cu)=>{var KB=Mu(),XB=yu(),YB=a5();function QB(t){return KB(t,YB,XB)}Cu.exports=QB});var Fu=B((yI,Au)=>{var Su=Bu(),ZB=1,JB=Object.prototype,tS=JB.hasOwnProperty;function aS(t,a,e,r,n,i){var l=e&ZB,o=Su(t),h=o.length,c=Su(a),v=c.length;if(h!=v&&!l)return!1;for(var g=h;g--;){var d=o[g];if(!(l?d in a:tS.call(a,d)))return!1}var u=i.get(t),p=i.get(a);if(u&&p)return u==a&&p==t;var z=!0;i.set(t,a),i.set(a,t);for(var w=l;++g{var eS=ze(),rS=Y2(),nS=eS(rS,"DataView");ku.exports=nS});var _u=B((BI,Eu)=>{var iS=ze(),lS=Y2(),oS=iS(lS,"Promise");Eu.exports=oS});var Pu=B((SI,Tu)=>{var hS=ze(),cS=Y2(),vS=hS(cS,"WeakMap");Tu.exports=vS});var ju=B((AI,Wu)=>{var t8=bu(),a8=jl(),e8=_u(),r8=Ih(),n8=Pu(),Uu=Y4(),or=_h(),Iu="[object Map]",gS="[object Object]",Ou="[object Promise]",Du="[object Set]",Nu="[object WeakMap]",$u="[object DataView]",dS=or(t8),sS=or(a8),uS=or(e8),fS=or(r8),pS=or(n8),Je=Uu;(t8&&Je(new t8(new ArrayBuffer(1)))!=$u||a8&&Je(new a8)!=Iu||e8&&Je(e8.resolve())!=Ou||r8&&Je(new r8)!=Du||n8&&Je(new n8)!=Nu)&&(Je=function(t){var a=Uu(t),e=a==gS?t.constructor:void 0,r=e?or(e):"";if(r)switch(r){case dS:return $u;case sS:return Iu;case uS:return Ou;case fS:return Du;case pS:return Nu}return a});Wu.exports=Je});var Ju=B((FI,Zu)=>{var i8=Qh(),zS=Zh(),mS=zu(),MS=Fu(),qu=ju(),Gu=Q2(),Ku=Kh(),HS=Yh(),xS=1,Xu="[object Arguments]",Yu="[object Array]",e5="[object Object]",wS=Object.prototype,Qu=wS.hasOwnProperty;function LS(t,a,e,r,n,i){var l=Gu(t),o=Gu(a),h=l?Yu:qu(t),c=o?Yu:qu(a);h=h==Xu?e5:h,c=c==Xu?e5:c;var v=h==e5,g=c==e5,d=h==c;if(d&&Ku(t)){if(!Ku(a))return!1;l=!0,v=!1}if(d&&!v)return i||(i=new i8),l||HS(t)?zS(t,a,e,r,n,i):mS(t,a,h,e,r,n,i);if(!(e&xS)){var u=v&&Qu.call(t,"__wrapped__"),p=g&&Qu.call(a,"__wrapped__");if(u||p){var z=u?t.value():t,w=p?a.value():a;return i||(i=new i8),n(z,w,e,r,i)}}return d?(i||(i=new i8),MS(t,a,e,r,n,i)):!1}Zu.exports=LS});var l8=B((kI,ef)=>{var VS=Ju(),tf=Q4();function af(t,a,e,r,n){return t===a?!0:t==null||a==null||!tf(t)&&!tf(a)?t!==t&&a!==a:VS(t,a,e,r,af,n)}ef.exports=af});var nf=B((bI,rf)=>{var RS=Qh(),yS=l8(),CS=1,BS=2;function SS(t,a,e,r){var n=e.length,i=n,l=!r;if(t==null)return!i;for(t=Object(t);n--;){var o=e[n];if(l&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n{var AS=pe();function FS(t){return t===t&&!AS(t)}lf.exports=FS});var hf=B((_I,of)=>{var kS=o8(),bS=a5();function ES(t){for(var a=bS(t),e=a.length;e--;){var r=a[e],n=t[r];a[e]=[r,n,kS(n)]}return a}of.exports=ES});var h8=B((TI,cf)=>{function _S(t,a){return function(e){return e==null?!1:e[t]===a&&(a!==void 0||t in Object(e))}}cf.exports=_S});var gf=B((PI,vf)=>{var TS=nf(),PS=hf(),IS=h8();function OS(t){var a=PS(t);return a.length==1&&a[0][2]?IS(a[0][0],a[0][1]):function(e){return e===t||TS(e,t,a)}}vf.exports=OS});var c8=B((II,df)=>{var DS=jh(),NS=Fn();function $S(t,a){a=DS(a,t);for(var e=0,r=a.length;t!=null&&e{var US=c8();function WS(t,a,e){var r=t==null?void 0:US(t,a);return r===void 0?e:r}sf.exports=WS});var pf=B((DI,ff)=>{function jS(t,a){return t!=null&&a in Object(t)}ff.exports=jS});var mf=B((NI,zf)=>{var qS=pf(),GS=qh();function KS(t,a){return t!=null&&GS(t,a,qS)}zf.exports=KS});var Hf=B(($I,Mf)=>{var XS=l8(),YS=uf(),QS=mf(),ZS=t5(),JS=o8(),tA=h8(),aA=Fn(),eA=1,rA=2;function nA(t,a){return ZS(t)&&JS(a)?tA(aA(t),a):function(e){var r=YS(e,t);return r===void 0&&r===a?QS(e,t):XS(a,r,eA|rA)}}Mf.exports=nA});var wf=B((UI,xf)=>{function iA(t){return t}xf.exports=iA});var Vf=B((WI,Lf)=>{function lA(t){return function(a){return a?.[t]}}Lf.exports=lA});var yf=B((jI,Rf)=>{var oA=c8();function hA(t){return function(a){return oA(a,t)}}Rf.exports=hA});var Bf=B((qI,Cf)=>{var cA=Vf(),vA=yf(),gA=t5(),dA=Fn();function sA(t){return gA(t)?cA(dA(t)):vA(t)}Cf.exports=sA});var Af=B((GI,Sf)=>{var uA=gf(),fA=Hf(),pA=wf(),zA=Q2(),mA=Bf();function MA(t){return typeof t=="function"?t:t==null?pA:typeof t=="object"?zA(t)?fA(t[0],t[1]):uA(t):mA(t)}Sf.exports=MA});var kf=B((KI,Ff)=>{var HA=cs(),xA=Ks(),wA=Af(),LA=Q2();function VA(t,a){return function(e,r){var n=LA(e)?HA:xA,i=a?a():{};return n(e,t,wA(r,2),i)}}Ff.exports=VA});var Ef=B((XI,bf)=>{var RA=os(),yA=kf(),CA=Object.prototype,BA=CA.hasOwnProperty,SA=yA(function(t,a,e){BA.call(t,e)?t[e].push(a):RA(t,e,[a])});bf.exports=SA});var Tf=B((YI,_f)=>{"use strict";var AA="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";_f.exports=AA});var Df=B((QI,Of)=>{"use strict";var FA=Tf();function Pf(){}function If(){}If.resetWarningCache=Pf;Of.exports=function(){function t(r,n,i,l,o,h){if(h!==FA){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function a(){return t}var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:a,element:t,elementType:t,instanceOf:a,node:t,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:If,resetWarningCache:Pf};return e.PropTypes=e,e}});var $f=B((tO,Nf)=>{Nf.exports=Df()();var ZI,JI});var Uf=B(r5=>{(function(t,a){if(typeof define=="function"&&define.amd)define(["exports","react","prop-types"],a);else if(typeof r5<"u")a(r5,U1(),$f());else{var e={exports:{}};a(e.exports,t.react,t.propTypes),t.reactSwipe=e.exports}})(r5,function(t,a,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setHasSupportToCaptureOption=u;var r=i(a),n=i(e);function i(s){return s&&s.__esModule?s:{default:s}}var l=Object.assign||function(s){for(var f=1;f=0||!Object.prototype.hasOwnProperty.call(s,H)||(m[H]=s[H]);return m}function h(s,f){if(!(s instanceof f))throw new TypeError("Cannot call a class as a function")}var c=function(){function s(f,m){for(var H=0;H0&&arguments[0]!==void 0?arguments[0]:{capture:!0};return d?s:s.capture}function z(s){if("touches"in s){var f=s.touches[0],m=f.pageX,H=f.pageY;return{x:m,y:H}}var x=s.screenX,y=s.screenY;return{x,y}}var w=function(s){g(f,s);function f(){var m;h(this,f);for(var H=arguments.length,x=Array(H),y=0;yx&&this.props.onSwipeRight(1,H),this.movePosition.deltaY<-x?this.props.onSwipeUp(1,H):this.movePosition.deltaY>x&&this.props.onSwipeDown(1,H)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function(H){this.swiper=H,this.props.innerRef(H)}},{key:"render",value:function(){var H=this.props,x=H.tagName,y=H.className,R=H.style,L=H.children,V=H.allowMouseEvents,C=H.onSwipeUp,k=H.onSwipeDown,b=H.onSwipeLeft,F=H.onSwipeRight,_=H.onSwipeStart,j=H.onSwipeMove,i1=H.onSwipeEnd,Z=H.innerRef,d1=H.tolerance,O=o(H,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]);return r.default.createElement(this.props.tagName,l({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:y,style:R},O),L)}}]),f}(a.Component);w.displayName="ReactSwipe",w.propTypes={tagName:n.default.string,className:n.default.string,style:n.default.object,children:n.default.node,allowMouseEvents:n.default.bool,onSwipeUp:n.default.func,onSwipeDown:n.default.func,onSwipeLeft:n.default.func,onSwipeRight:n.default.func,onSwipeStart:n.default.func,onSwipeMove:n.default.func,onSwipeEnd:n.default.func,innerRef:n.default.func,tolerance:n.default.number.isRequired},w.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function(){},onSwipeDown:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},onSwipeStart:function(){},onSwipeMove:function(){},onSwipeEnd:function(){},innerRef:function(){},tolerance:0},t.default=w})});var v8=B(n5=>{(function(t,a){if(typeof define=="function"&&define.amd)define(["exports","./react-swipe"],a);else if(typeof n5<"u")a(n5,Uf());else{var e={exports:{}};a(e.exports,t.reactSwipe),t.index=e.exports}})(n5,function(t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=r(a);function r(n){return n&&n.__esModule?n:{default:n}}t.default=e.default})});var Wf=B((rO,i5)=>{(function(){"use strict";var t={}.hasOwnProperty,a="[native code]";function e(){for(var r=[],n=0;n{"use strict";Object.defineProperty(l5,"__esModule",{value:!0});l5.default=void 0;var me=kA(Wf());function kA(t){return t&&t.__esModule?t:{default:t}}function bA(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}var EA={ROOT:function(a){return(0,me.default)(bA({"carousel-root":!0},a||"",!!a))},CAROUSEL:function(a){return(0,me.default)({carousel:!0,"carousel-slider":a})},WRAPPER:function(a,e){return(0,me.default)({"thumbs-wrapper":!a,"slider-wrapper":a,"axis-horizontal":e==="horizontal","axis-vertical":e!=="horizontal"})},SLIDER:function(a,e){return(0,me.default)({thumbs:!a,slider:a,animated:!e})},ITEM:function(a,e,r){return(0,me.default)({thumb:!a,slide:a,selected:e,previous:r})},ARROW_PREV:function(a){return(0,me.default)({"control-arrow control-prev":!0,"control-disabled":a})},ARROW_NEXT:function(a){return(0,me.default)({"control-arrow control-next":!0,"control-disabled":a})},DOT:function(a){return(0,me.default)({dot:!0,selected:a})}};l5.default=EA});var jf=B(o5=>{"use strict";Object.defineProperty(o5,"__esModule",{value:!0});o5.outerWidth=void 0;var _A=function(a){var e=a.offsetWidth,r=getComputedStyle(a);return e+=parseInt(r.marginLeft)+parseInt(r.marginRight),e};o5.outerWidth=_A});var c5=B(h5=>{"use strict";Object.defineProperty(h5,"__esModule",{value:!0});h5.default=void 0;var TA=function(a,e,r){var n=a===0?a:a+e,i=r==="horizontal"?[n,0,0]:[0,n,0],l="translate3d",o="("+i.join(",")+")";return l+o};h5.default=TA});var d8=B(v5=>{"use strict";Object.defineProperty(v5,"__esModule",{value:!0});v5.default=void 0;var PA=function(){return window};v5.default=PA});var p8=B(u5=>{"use strict";Object.defineProperty(u5,"__esModule",{value:!0});u5.default=void 0;var Z2=DA(U1()),t4=s5(g8()),IA=jf(),qf=s5(c5()),OA=s5(v8()),g5=s5(d8());function s5(t){return t&&t.__esModule?t:{default:t}}function Kf(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return Kf=function(){return t},t}function DA(t){if(t&&t.__esModule)return t;if(t===null||Tn(t)!=="object"&&typeof t!="function")return{default:t};var a=Kf();if(a&&a.has(t))return a.get(t);var e={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=r?Object.getOwnPropertyDescriptor(t,n):null;i&&(i.get||i.set)?Object.defineProperty(e,n,i):e[n]=t[n]}return e.default=t,a&&a.set(t,e),e}function Tn(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tn=function(e){return typeof e}:Tn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tn(t)}function s8(){return s8=Object.assign||function(t){for(var a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function d5(t){return d5=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d5(t)}function U0(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}var GA=function(a){return a.hasOwnProperty("key")},f8=function(t){UA(e,t);var a=WA(e);function e(r){var n;return NA(this,e),n=a.call(this,r),U0(Q0(n),"itemsWrapperRef",void 0),U0(Q0(n),"itemsListRef",void 0),U0(Q0(n),"thumbsRef",void 0),U0(Q0(n),"setItemsWrapperRef",function(i){n.itemsWrapperRef=i}),U0(Q0(n),"setItemsListRef",function(i){n.itemsListRef=i}),U0(Q0(n),"setThumbsRef",function(i,l){n.thumbsRef||(n.thumbsRef=[]),n.thumbsRef[l]=i}),U0(Q0(n),"updateSizes",function(){if(!(!n.props.children||!n.itemsWrapperRef||!n.thumbsRef)){var i=Z2.Children.count(n.props.children),l=n.itemsWrapperRef.clientWidth,o=n.props.thumbWidth?n.props.thumbWidth:(0,IA.outerWidth)(n.thumbsRef[0]),h=Math.floor(l/o),c=h0&&(l=0),c===g&&l<0&&(l=0);var d=n.itemsWrapperRef.clientWidth,u=c+100/(d/l);return n.itemsListRef&&["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(p){n.itemsListRef.style[p]=(0,qf.default)(u,"%",n.props.axis)}),!0}),U0(Q0(n),"slideRight",function(i){n.moveTo(n.state.firstItem-(typeof i=="number"?i:1))}),U0(Q0(n),"slideLeft",function(i){n.moveTo(n.state.firstItem+(typeof i=="number"?i:1))}),U0(Q0(n),"moveTo",function(i){i=i<0?0:i,i=i>=n.state.lastPosition?n.state.lastPosition:i,n.setState({firstItem:i})}),n.state={selectedItem:r.selectedItem,swiping:!1,showArrows:!1,firstItem:0,visibleItems:0,lastPosition:0},n}return $A(e,[{key:"componentDidMount",value:function(){this.setupThumbs()}},{key:"componentDidUpdate",value:function(n){this.props.selectedItem!==this.state.selectedItem&&this.setState({selectedItem:this.props.selectedItem,firstItem:this.getFirstItem(this.props.selectedItem)}),this.props.children!==n.children&&this.updateSizes()}},{key:"componentWillUnmount",value:function(){this.destroyThumbs()}},{key:"setupThumbs",value:function(){(0,g5.default)().addEventListener("resize",this.updateSizes),(0,g5.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.updateSizes()}},{key:"destroyThumbs",value:function(){(0,g5.default)().removeEventListener("resize",this.updateSizes),(0,g5.default)().removeEventListener("DOMContentLoaded",this.updateSizes)}},{key:"getFirstItem",value:function(n){var i=n;return n>=this.state.lastPosition&&(i=this.state.lastPosition),n1,l=this.state.showArrows&&this.state.firstItem>0,o=this.state.showArrows&&this.state.firstItem{"use strict";Object.defineProperty(f5,"__esModule",{value:!0});f5.default=void 0;var KA=function(){return document};f5.default=KA});var z8=B(P2=>{"use strict";Object.defineProperty(P2,"__esModule",{value:!0});P2.setPosition=P2.getPosition=P2.isKeyboardEvent=P2.defaultStatusFormatter=P2.noop=void 0;var XA=U1(),YA=QA(c5());function QA(t){return t&&t.__esModule?t:{default:t}}var ZA=function(){};P2.noop=ZA;var JA=function(a,e){return"".concat(a," of ").concat(e)};P2.defaultStatusFormatter=JA;var tF=function(a){return a?a.hasOwnProperty("key"):!1};P2.isKeyboardEvent=tF;var aF=function(a,e){if(e.infiniteLoop&&++a,a===0)return 0;var r=XA.Children.count(e.children);if(e.centerMode&&e.axis==="horizontal"){var n=-a*e.centerSlidePercentage,i=r-1;return a&&(a!==i||e.infiniteLoop)?n+=(100-e.centerSlidePercentage)/2:a===i&&(n+=100-e.centerSlidePercentage),n}return-a*100};P2.getPosition=aF;var eF=function(a,e){var r={};return["WebkitTransform","MozTransform","MsTransform","OTransform","transform","msTransform"].forEach(function(n){r[n]=(0,YA.default)(a,"%",e)}),r};P2.setPosition=eF});var Zf=B(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.fadeAnimationHandler=za.slideStopSwipingHandler=za.slideSwipeAnimationHandler=za.slideAnimationHandler=void 0;var Qf=U1(),rF=nF(c5()),pa=z8();function nF(t){return t&&t.__esModule?t:{default:t}}function Yf(t,a){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);a&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),e.push.apply(e,r)}return e}function a4(t){for(var a=1;al);if(o)return i<0?a.centerMode&&a.centerSlidePercentage&&a.axis==="horizontal"?r.itemListStyle=(0,pa.setPosition)(-(l+2)*a.centerSlidePercentage-(100-a.centerSlidePercentage)/2,a.axis):r.itemListStyle=(0,pa.setPosition)(-(l+2)*100,a.axis):i>l&&(r.itemListStyle=(0,pa.setPosition)(0,a.axis)),r;var h=(0,pa.getPosition)(n,a),c=(0,rF.default)(h,"%",a.axis),v=a.transitionTime+"ms";return r.itemListStyle={WebkitTransform:c,msTransform:c,OTransform:c,transform:c},e.swiping||(r.itemListStyle=a4(a4({},r.itemListStyle),{},{WebkitTransitionDuration:v,MozTransitionDuration:v,OTransitionDuration:v,transitionDuration:v,msTransitionDuration:v})),r};za.slideAnimationHandler=lF;var oF=function(a,e,r,n){var i={},l=e.axis==="horizontal",o=Qf.Children.count(e.children),h=0,c=(0,pa.getPosition)(r.selectedItem,e),v=e.infiniteLoop?(0,pa.getPosition)(o-1,e)-100:(0,pa.getPosition)(o-1,e),g=l?a.x:a.y,d=g;c===h&&g>0&&(d=0),c===v&&g<0&&(d=0);var u=c+100/(r.itemSize/d),p=Math.abs(g)>e.swipeScrollTolerance;return e.infiniteLoop&&p&&(r.selectedItem===0&&u>-100?u-=o*100:r.selectedItem===o-1&&u<-o*100&&(u+=o*100)),(!e.preventMovementUntilSwipeScrollTolerance||p||r.swipeMovementStarted)&&(r.swipeMovementStarted||n({swipeMovementStarted:!0}),i.itemListStyle=(0,pa.setPosition)(u,e.axis)),p&&!r.cancelClick&&n({cancelClick:!0}),i};za.slideSwipeAnimationHandler=oF;var hF=function(a,e){var r=(0,pa.getPosition)(e.selectedItem,a),n=(0,pa.setPosition)(r,a.axis);return{itemListStyle:n}};za.slideStopSwipingHandler=hF;var cF=function(a,e){var r=a.transitionTime+"ms",n="ease-in-out",i={position:"absolute",display:"block",zIndex:-2,minHeight:"100%",opacity:0,top:0,right:0,left:0,bottom:0,transitionTimingFunction:n,msTransitionTimingFunction:n,MozTransitionTimingFunction:n,WebkitTransitionTimingFunction:n,OTransitionTimingFunction:n};return e.swiping||(i=a4(a4({},i),{},{WebkitTransitionDuration:r,MozTransitionDuration:r,OTransitionDuration:r,transitionDuration:r,msTransitionDuration:r})),{slideStyle:i,selectedStyle:a4(a4({},i),{},{opacity:1,position:"relative"}),prevStyle:a4({},i)}};za.fadeAnimationHandler=cF});var ep=B(H5=>{"use strict";Object.defineProperty(H5,"__esModule",{value:!0});H5.default=void 0;var Ct=dF(U1()),vF=On(v8()),Oa=On(g8()),gF=On(p8()),p5=On(Xf()),z5=On(d8()),Pn=z8(),m5=Zf();function On(t){return t&&t.__esModule?t:{default:t}}function ap(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return ap=function(){return t},t}function dF(t){if(t&&t.__esModule)return t;if(t===null||In(t)!=="object"&&typeof t!="function")return{default:t};var a=ap();if(a&&a.has(t))return a.get(t);var e={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=r?Object.getOwnPropertyDescriptor(t,n):null;i&&(i.get||i.set)?Object.defineProperty(e,n,i):e[n]=t[n]}return e.default=t,a&&a.set(t,e),e}function In(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?In=function(e){return typeof e}:In=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(t)}function m8(){return m8=Object.assign||function(t){for(var a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function M5(t){return M5=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},M5(t)}function nt(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}var H8=function(t){fF(e,t);var a=pF(e);function e(r){var n;sF(this,e),n=a.call(this,r),nt(it(n),"thumbsRef",void 0),nt(it(n),"carouselWrapperRef",void 0),nt(it(n),"listRef",void 0),nt(it(n),"itemsRef",void 0),nt(it(n),"timer",void 0),nt(it(n),"animationHandler",void 0),nt(it(n),"setThumbsRef",function(l){n.thumbsRef=l}),nt(it(n),"setCarouselWrapperRef",function(l){n.carouselWrapperRef=l}),nt(it(n),"setListRef",function(l){n.listRef=l}),nt(it(n),"setItemsRef",function(l,o){n.itemsRef||(n.itemsRef=[]),n.itemsRef[o]=l}),nt(it(n),"autoPlay",function(){Ct.Children.count(n.props.children)<=1||(n.clearAutoPlay(),n.props.autoPlay&&(n.timer=setTimeout(function(){n.increment()},n.props.interval)))}),nt(it(n),"clearAutoPlay",function(){n.timer&&clearTimeout(n.timer)}),nt(it(n),"resetAutoPlay",function(){n.clearAutoPlay(),n.autoPlay()}),nt(it(n),"stopOnHover",function(){n.setState({isMouseEntered:!0},n.clearAutoPlay)}),nt(it(n),"startOnLeave",function(){n.setState({isMouseEntered:!1},n.autoPlay)}),nt(it(n),"isFocusWithinTheCarousel",function(){return n.carouselWrapperRef?!!((0,p5.default)().activeElement===n.carouselWrapperRef||n.carouselWrapperRef.contains((0,p5.default)().activeElement)):!1}),nt(it(n),"navigateWithKeyboard",function(l){if(!!n.isFocusWithinTheCarousel()){var o=n.props.axis,h=o==="horizontal",c={ArrowUp:38,ArrowRight:39,ArrowDown:40,ArrowLeft:37},v=h?c.ArrowRight:c.ArrowDown,g=h?c.ArrowLeft:c.ArrowUp;v===l.keyCode?n.increment():g===l.keyCode&&n.decrement()}}),nt(it(n),"updateSizes",function(){if(!(!n.state.initialized||!n.itemsRef||n.itemsRef.length===0)){var l=n.props.axis==="horizontal",o=n.itemsRef[0];if(!!o){var h=l?o.clientWidth:o.clientHeight;n.setState({itemSize:h}),n.thumbsRef&&n.thumbsRef.updateSizes()}}}),nt(it(n),"setMountState",function(){n.setState({hasMount:!0}),n.updateSizes()}),nt(it(n),"handleClickItem",function(l,o){if(Ct.Children.count(n.props.children)!==0){if(n.state.cancelClick){n.setState({cancelClick:!1});return}n.props.onClickItem(l,o),l!==n.state.selectedItem&&n.setState({selectedItem:l})}}),nt(it(n),"handleOnChange",function(l,o){Ct.Children.count(n.props.children)<=1||n.props.onChange(l,o)}),nt(it(n),"handleClickThumb",function(l,o){n.props.onClickThumb(l,o),n.moveTo(l)}),nt(it(n),"onSwipeStart",function(l){n.setState({swiping:!0}),n.props.onSwipeStart(l)}),nt(it(n),"onSwipeEnd",function(l){n.setState({swiping:!1,cancelClick:!1,swipeMovementStarted:!1}),n.props.onSwipeEnd(l),n.clearAutoPlay(),n.state.autoPlay&&n.autoPlay()}),nt(it(n),"onSwipeMove",function(l,o){n.props.onSwipeMove(o);var h=n.props.swipeAnimationHandler(l,n.props,n.state,n.setState.bind(it(n)));return n.setState(J2({},h)),!!Object.keys(h).length}),nt(it(n),"decrement",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;n.moveTo(n.state.selectedItem-(typeof l=="number"?l:1))}),nt(it(n),"increment",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;n.moveTo(n.state.selectedItem+(typeof l=="number"?l:1))}),nt(it(n),"moveTo",function(l){if(typeof l=="number"){var o=Ct.Children.count(n.props.children)-1;l<0&&(l=n.props.infiniteLoop?o:0),l>o&&(l=n.props.infiniteLoop?0:o),n.selectItem({selectedItem:l}),n.state.autoPlay&&n.state.isMouseEntered===!1&&n.resetAutoPlay()}}),nt(it(n),"onClickNext",function(){n.increment(1)}),nt(it(n),"onClickPrev",function(){n.decrement(1)}),nt(it(n),"onSwipeForward",function(){n.increment(1),n.props.emulateTouch&&n.setState({cancelClick:!0})}),nt(it(n),"onSwipeBackwards",function(){n.decrement(1),n.props.emulateTouch&&n.setState({cancelClick:!0})}),nt(it(n),"changeItem",function(l){return function(o){(!(0,Pn.isKeyboardEvent)(o)||o.key==="Enter")&&n.moveTo(l)}}),nt(it(n),"selectItem",function(l){n.setState(J2({previousItem:n.state.selectedItem},l),function(){n.setState(n.animationHandler(n.props,n.state))}),n.handleOnChange(l.selectedItem,Ct.Children.toArray(n.props.children)[l.selectedItem])}),nt(it(n),"getInitialImage",function(){var l=n.props.selectedItem,o=n.itemsRef&&n.itemsRef[l],h=o&&o.getElementsByTagName("img")||[];return h[0]}),nt(it(n),"getVariableItemHeight",function(l){var o=n.itemsRef&&n.itemsRef[l];if(n.state.hasMount&&o&&o.children.length){var h=o.children[0].getElementsByTagName("img")||[];if(h.length>0){var c=h[0];if(!c.complete){var v=function u(){n.forceUpdate(),c.removeEventListener("load",u)};c.addEventListener("load",v)}}var g=h[0]||o.children[0],d=g.clientHeight;return d>0?d:null}return null});var i={initialized:!1,previousItem:r.selectedItem,selectedItem:r.selectedItem,hasMount:!1,isMouseEntered:!1,autoPlay:r.autoPlay,swiping:!1,swipeMovementStarted:!1,cancelClick:!1,itemSize:1,itemListStyle:{},slideStyle:{},selectedStyle:{},prevStyle:{}};return n.animationHandler=typeof r.animationHandler=="function"&&r.animationHandler||r.animationHandler==="fade"&&m5.fadeAnimationHandler||m5.slideAnimationHandler,n.state=J2(J2({},i),n.animationHandler(r,i)),n}return uF(e,[{key:"componentDidMount",value:function(){!this.props.children||this.setupCarousel()}},{key:"componentDidUpdate",value:function(n,i){!n.children&&this.props.children&&!this.state.initialized&&this.setupCarousel(),!n.autoFocus&&this.props.autoFocus&&this.forceFocus(),i.swiping&&!this.state.swiping&&this.setState(J2({},this.props.stopSwipingHandler(this.props,this.state))),(n.selectedItem!==this.props.selectedItem||n.centerMode!==this.props.centerMode)&&(this.updateSizes(),this.moveTo(this.props.selectedItem)),n.autoPlay!==this.props.autoPlay&&(this.props.autoPlay?this.setupAutoPlay():this.destroyAutoPlay(),this.setState({autoPlay:this.props.autoPlay}))}},{key:"componentWillUnmount",value:function(){this.destroyCarousel()}},{key:"setupCarousel",value:function(){var n=this;this.bindEvents(),this.state.autoPlay&&Ct.Children.count(this.props.children)>1&&this.setupAutoPlay(),this.props.autoFocus&&this.forceFocus(),this.setState({initialized:!0},function(){var i=n.getInitialImage();i&&!i.complete?i.addEventListener("load",n.setMountState):n.setMountState()})}},{key:"destroyCarousel",value:function(){this.state.initialized&&(this.unbindEvents(),this.destroyAutoPlay())}},{key:"setupAutoPlay",value:function(){this.autoPlay();var n=this.carouselWrapperRef;this.props.stopOnHover&&n&&(n.addEventListener("mouseenter",this.stopOnHover),n.addEventListener("mouseleave",this.startOnLeave))}},{key:"destroyAutoPlay",value:function(){this.clearAutoPlay();var n=this.carouselWrapperRef;this.props.stopOnHover&&n&&(n.removeEventListener("mouseenter",this.stopOnHover),n.removeEventListener("mouseleave",this.startOnLeave))}},{key:"bindEvents",value:function(){(0,z5.default)().addEventListener("resize",this.updateSizes),(0,z5.default)().addEventListener("DOMContentLoaded",this.updateSizes),this.props.useKeyboardArrows&&(0,p5.default)().addEventListener("keydown",this.navigateWithKeyboard)}},{key:"unbindEvents",value:function(){(0,z5.default)().removeEventListener("resize",this.updateSizes),(0,z5.default)().removeEventListener("DOMContentLoaded",this.updateSizes);var n=this.getInitialImage();n&&n.removeEventListener("load",this.setMountState),this.props.useKeyboardArrows&&(0,p5.default)().removeEventListener("keydown",this.navigateWithKeyboard)}},{key:"forceFocus",value:function(){var n;(n=this.carouselWrapperRef)===null||n===void 0||n.focus()}},{key:"renderItems",value:function(n){var i=this;return this.props.children?Ct.Children.map(this.props.children,function(l,o){var h=o===i.state.selectedItem,c=o===i.state.previousItem,v=h&&i.state.selectedStyle||c&&i.state.prevStyle||i.state.slideStyle||{};i.props.centerMode&&i.props.axis==="horizontal"&&(v=J2(J2({},v),{},{minWidth:i.props.centerSlidePercentage+"%"})),i.state.swiping&&i.state.swipeMovementStarted&&(v=J2(J2({},v),{},{pointerEvents:"none"}));var g={ref:function(u){return i.setItemsRef(u,o)},key:"itemKey"+o+(n?"clone":""),className:Oa.default.ITEM(!0,o===i.state.selectedItem,o===i.state.previousItem),onClick:i.handleClickItem.bind(i,o,l),style:v};return Ct.default.createElement("li",g,i.props.renderItem(l,{isSelected:o===i.state.selectedItem,isPrevious:o===i.state.previousItem}))}):[]}},{key:"renderControls",value:function(){var n=this,i=this.props,l=i.showIndicators,o=i.labels,h=i.renderIndicator,c=i.children;return l?Ct.default.createElement("ul",{className:"control-dots"},Ct.Children.map(c,function(v,g){return h&&h(n.changeItem(g),g===n.state.selectedItem,g,o.item)})):null}},{key:"renderStatus",value:function(){return this.props.showStatus?Ct.default.createElement("p",{className:"carousel-status"},this.props.statusFormatter(this.state.selectedItem+1,Ct.Children.count(this.props.children))):null}},{key:"renderThumbs",value:function(){return!this.props.showThumbs||!this.props.children||Ct.Children.count(this.props.children)===0?null:Ct.default.createElement(gF.default,{ref:this.setThumbsRef,onSelectItem:this.handleClickThumb,selectedItem:this.state.selectedItem,transitionTime:this.props.transitionTime,thumbWidth:this.props.thumbWidth,labels:this.props.labels,emulateTouch:this.props.emulateTouch},this.props.renderThumbs(this.props.children))}},{key:"render",value:function(){var n=this;if(!this.props.children||Ct.Children.count(this.props.children)===0)return null;var i=this.props.swipeable&&Ct.Children.count(this.props.children)>1,l=this.props.axis==="horizontal",o=this.props.showArrows&&Ct.Children.count(this.props.children)>1,h=o&&(this.state.selectedItem>0||this.props.infiniteLoop)||!1,c=o&&(this.state.selectedItem{"use strict"});var ip=B(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Object.defineProperty(Dn,"Carousel",{enumerable:!0,get:function(){return MF.default}});Object.defineProperty(Dn,"CarouselProps",{enumerable:!0,get:function(){return HF.CarouselProps}});Object.defineProperty(Dn,"Thumbs",{enumerable:!0,get:function(){return xF.default}});var MF=np(ep()),HF=rp(),xF=np(p8());function np(t){return t&&t.__esModule?t:{default:t}}});function Hp(t,a){var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&a.indexOf(r)<0&&(e[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n=o?n=n+fp("0",l-o):n=(n.substring(0,l)||"0")+"."+n.substring(l),e+n}function pp(t,a,e){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||e)&&a,n=x8(t),i=n.beforeDecimal,l=n.afterDecimal,o=n.hasNegation,h=parseFloat("0."+(l||"0")),c=l.length<=a?"0."+l:h.toFixed(a),v=c.split("."),g=i.split("").reverse().reduce(function(z,w,s){return z.length>s?(Number(z[0])+Number(w)).toString()+z.substring(1,z.length):w+z},v[0]),d=Lp(v[1]||"",a,e),u=o?"-":"",p=r?".":"";return""+u+g+p+d}function cr(t,a){if(t.value=t.value,t!==null){if(t.createTextRange){var e=t.createTextRange();return e.move("character",a),e.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(a,a),!0):(t.focus(),!1)}}function UF(t,a){for(var e=0,r=0,n=t.length,i=a.length;t[e]===a[e]&&ee&&n-r>e;)r++;return{from:{start:e,end:n-r},to:{start:e,end:i-r}}}function WF(t,a,e){return Math.min(Math.max(t,a),e)}function zp(t){return Math.max(t.selectionStart,t.selectionEnd)}function jF(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function qF(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function GF(t,a,e,r,n,i){var l=n.findIndex(function(f){return f}),o=t.slice(0,l);!a&&!e.startsWith(o)&&(e=o+e,r=r+o.length);for(var h=e.length,c=t.length,v={},g=new Array(h),d=0;d0&&g[z]===-1;)z--;var s=z===-1||g[z]===-1?0:g[z]+1;return s>w?w:r-s=0&&!e[a];)a--;a===-1&&(a=e.indexOf(!0))}else{for(;a<=n&&!e[a];)a++;a>n&&(a=e.lastIndexOf(!0))}return a===-1&&(a=n),a}function KF(t){for(var a=Array.from({length:t.length+1}).map(function(){return!0}),e=0,r=a.length;et.length-i.length&&(f=v),t=t.substring(0,f),t=ZF(w?"-"+t:t,r),t=(t.match(JF(u,!0))||[]).join("");var H=t.indexOf(u);t=t.replace(new RegExp(wp(u),"g"),function(V,C){return C===H?".":""});var x=x8(t,r),y=x.beforeDecimal,R=x.afterDecimal,L=x.addNegation;return h.end-h.start{r0=F1(U1());(function(t){t.event="event",t.props="prop"})(Wn||(Wn={}))});var Sp={};tM(Sp,{default:()=>ok});function Bp(){var t,a,e;let n=(e=(a=(t=Intl.NumberFormat())==null?void 0:t.formatToParts(1.1))==null?void 0:a.find(i=>i.type==="decimal"))==null?void 0:e.value;return n??"."}function ik(){return Bp()==="."?",":"."}var e4,nk,lk,ok,Ap=co(()=>{Ah();e4=F1(U1(),1);Cp();nk=L0("div")({name:"NumberOverlayEditorStyle",class:"n1czszh3"});lk=t=>{let{value:a,onChange:e,disabled:r,highlight:n,validatedSelection:i,fixedDecimals:l,allowNegative:o,thousandSeparator:h,decimalSeparator:c}=t,v=e4.useRef();return e4.useLayoutEffect(()=>{var g;if(i!==void 0){let d=typeof i=="number"?[i,null]:i;(g=v.current)==null||g.setSelectionRange(d[0],d[1])}},[i]),e4.createElement(nk,null,e4.createElement(yp,{autoFocus:!0,getInputRef:v,className:"gdg-input",onFocus:g=>g.target.setSelectionRange(n?0:g.target.value.length,g.target.value.length),disabled:r===!0,decimalScale:l,allowNegative:o,thousandSeparator:h??ik(),decimalSeparator:c??Bp(),value:Object.is(a,-0)?"-":a??"",onValueChange:e}))},ok=lk});var g1=F1(U1()),Lm=F1(qc());Ah();var $=F1(U1(),1),Gn=F1(Z4(),1),tz=F1(Kg(),1),B8=F1(vd(),1),i4=F1($h(),1),az=F1(Jl(),1),o0=F1(U1(),1),ez=F1($l(),1),pr=F1(U1(),1),nz=F1(U1(),1),hz=F1(Zd(),1),ma=F1(U1(),1),q1=F1(U1(),1),d0=F1(U1(),1),dz=F1(Z4(),1),It=F1(U1(),1),r1=F1(U1(),1),sz=F1(ts(),1),Zt=F1(U1(),1),pz=F1(Jl(),1),Lz=F1(U1(),1);var er=new Map,rr=new Map,Gh=new Map;function as(){er.clear(),Gh.clear(),rr.clear()}function zy(t,a,e,r,n){var i,l,o;let h=0,c={};for(let g of t)h+=(i=e.get(g))!=null?i:n,c[g]=((l=c[g])!=null?l:0)+1;let v=a-h;for(let g of Object.keys(c)){let d=c[g],u=(o=e.get(g))!=null?o:n,p=u*d/h,z=v*p*r/d,w=u+z;e.set(g,w)}}function my(t,a){var e;let r=new Map,n=0;for(let c of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let v=t.measureText(c).width;r.set(c,v),n+=v}let i=n/r.size,l=3,o=(a/i+l)/(l+1),h=r.keys();for(let c of h)r.set(c,((e=r.get(c))!=null?e:i)*o);return r}function kn(t,a,e,r){var n,i;let l=rr.get(e);if(r&&l!==void 0&&l.count>2e4){let c=Gh.get(e);if(c===void 0&&(c=my(t,l.size),Gh.set(e,c)),l.count>5e5){let g=0;for(let d of a)g+=(n=c.get(d))!=null?n:l.size;return g*1.01}let v=t.measureText(a);return zy(a,v.width,c,Math.max(.05,1-l.count/2e5),l.size),rr.set(e,{count:l.count+a.length,size:l.size}),v.width}let o=t.measureText(a),h=o.width/a.length;if(((i=l?.count)!=null?i:0)>2e4)return o.width;if(l===void 0)rr.set(e,{count:a.length,size:h});else{let c=h-l.size,v=a.length/(l.count+a.length),g=l.size+c*v;rr.set(e,{count:l.count+a.length,size:g})}return o.width}function My(t,a,e,r,n,i,l,o){if(a.length<=1)return a.length;if(ne;){let g=v!==void 0?0:a.lastIndexOf(" ",h-1);g>0?h=g:h--,c=kn(t,a.slice(0,Math.max(0,h)),r,l)}if(a[h]!==" "){let g=0;if(v===void 0)g=a.lastIndexOf(" ",h);else for(let d of v){if(d>h)break;g=d}g>0&&(h=g)}return h}function es(t,a,e,r,n,i){let l=`${a}_${e}_${r}px`,o=er.get(l);if(o!==void 0)return o;if(r<=0)return[];let h=[],c=a.split(` + `)}function rk(t){var a=t.decimalSeparator;a===void 0&&(a=".");var e=t.allowedDecimalSeparators,r=t.thousandsGroupStyle,n=t.suffix,i=t.allowNegative,l=t.allowLeadingZeros,o=t.onKeyDown;o===void 0&&(o=Me);var h=t.onBlur;h===void 0&&(h=Me);var c=t.thousandSeparator,v=t.decimalScale,g=t.fixedDecimalScale,d=t.prefix;d===void 0&&(d="");var u=t.defaultValue,p=t.value,z=t.valueIsNumericString,w=t.onValueChange,s=Hp(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]);ek(t);var f=function(_){return Mp(_,t)},m=function(_,j){return tk(_,j,t)},H=z;Un(p)?Un(u)||(H=z??typeof u=="number"):H=z??typeof p=="number";var x=function(_){return Un(_)||xp(_)?_:(typeof _=="number"&&(_=Vp(_)),H&&typeof v=="number"?pp(_,v,Boolean(g)):_)},y=Rp(x(p),x(u),Boolean(H),f,m,w),R=y[0],L=R.numAsString,V=R.formattedValue,C=y[1],k=function(_){var j=_.target,i1=_.key,Z=j.selectionStart,d1=j.selectionEnd,O=j.value;if(O===void 0&&(O=""),Z!==d1){o(_);return}i1==="Backspace"&&O[0]==="-"&&Z===d.length+1&&cr(j,1);var a1=C5(t),W=a1.decimalSeparator;i1==="Backspace"&&O[Z-1]===W&&v&&g&&(cr(j,Z-1),_.preventDefault());var L1=c===!0?",":c;i1==="Backspace"&&O[Z-1]===L1&&cr(j,Z-1),i1==="Delete"&&O[Z]===L1&&cr(j,Z+1),o(_)},b=function(_){var j=L;if(j.match(/\d/g)||(j=""),l||(j=$F(j)),g&&v&&(j=pp(j,v,g)),j!==L){var i1=Mp(j,t);C({formattedValue:i1,value:j,floatValue:parseFloat(j)},{event:_,source:Wn.event})}h(_)},F=function(_){return _===a?!0:y5(_)};return Object.assign(Object.assign({},s),{value:V,valueIsNumericString:!1,isValidInputCharacter:F,onValueChange:C,format:f,removeFormatting:m,getCaretBoundary:function(_){return ak(_,t)},onKeyDown:k,onBlur:b})}function yp(t){var a=rk(t);return r0.default.createElement(QF,Object.assign({},a))}var r0,Wn,Cp=co(()=>{r0=F1(U1());(function(t){t.event="event",t.props="prop"})(Wn||(Wn={}))});var Sp={};tM(Sp,{default:()=>ok});function Bp(){var t,a,e;let n=(e=(a=(t=Intl.NumberFormat())==null?void 0:t.formatToParts(1.1))==null?void 0:a.find(i=>i.type==="decimal"))==null?void 0:e.value;return n??"."}function ik(){return Bp()==="."?",":"."}var e4,nk,lk,ok,Ap=co(()=>{Ah();e4=F1(U1(),1);Cp();nk=L0("div")({name:"NumberOverlayEditorStyle",class:"n1czszh3"});lk=t=>{let{value:a,onChange:e,disabled:r,highlight:n,validatedSelection:i,fixedDecimals:l,allowNegative:o,thousandSeparator:h,decimalSeparator:c}=t,v=e4.useRef();return e4.useLayoutEffect(()=>{var g;if(i!==void 0){let d=typeof i=="number"?[i,null]:i;(g=v.current)==null||g.setSelectionRange(d[0],d[1])}},[i]),e4.createElement(nk,null,e4.createElement(yp,{autoFocus:!0,getInputRef:v,className:"gdg-input",onFocus:g=>g.target.setSelectionRange(n?0:g.target.value.length,g.target.value.length),disabled:r===!0,decimalScale:l,allowNegative:o,thousandSeparator:h??ik(),decimalSeparator:c??Bp(),value:Object.is(a,-0)?"-":a??"",onValueChange:e}))},ok=lk});var g1=F1(U1()),Lm=F1(qc());Ah();var $=F1(U1(),1),Gn=F1(Z4(),1),tz=F1(Kg(),1),B8=F1(vd(),1),i4=F1($h(),1),az=F1(Jl(),1),o0=F1(U1(),1),ez=F1($l(),1),pr=F1(U1(),1),nz=F1(U1(),1),hz=F1(Zd(),1),ma=F1(U1(),1),q1=F1(U1(),1),d0=F1(U1(),1),dz=F1(Z4(),1),It=F1(U1(),1),r1=F1(U1(),1),sz=F1(ts(),1),Zt=F1(U1(),1),pz=F1(Jl(),1),Lz=F1(U1(),1);var er=new Map,rr=new Map,Gh=new Map;function as(){er.clear(),Gh.clear(),rr.clear()}function zy(t,a,e,r,n){var i,l,o;let h=0,c={};for(let g of t)h+=(i=e.get(g))!=null?i:n,c[g]=((l=c[g])!=null?l:0)+1;let v=a-h;for(let g of Object.keys(c)){let d=c[g],u=(o=e.get(g))!=null?o:n,p=u*d/h,z=v*p*r/d,w=u+z;e.set(g,w)}}function my(t,a){var e;let r=new Map,n=0;for(let c of"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890,.-+=?"){let v=t.measureText(c).width;r.set(c,v),n+=v}let i=n/r.size,l=3,o=(a/i+l)/(l+1),h=r.keys();for(let c of h)r.set(c,((e=r.get(c))!=null?e:i)*o);return r}function kn(t,a,e,r){var n,i;let l=rr.get(e);if(r&&l!==void 0&&l.count>2e4){let c=Gh.get(e);if(c===void 0&&(c=my(t,l.size),Gh.set(e,c)),l.count>5e5){let g=0;for(let d of a)g+=(n=c.get(d))!=null?n:l.size;return g*1.01}let v=t.measureText(a);return zy(a,v.width,c,Math.max(.05,1-l.count/2e5),l.size),rr.set(e,{count:l.count+a.length,size:l.size}),v.width}let o=t.measureText(a),h=o.width/a.length;if(((i=l?.count)!=null?i:0)>2e4)return o.width;if(l===void 0)rr.set(e,{count:a.length,size:h});else{let c=h-l.size,v=a.length/(l.count+a.length),g=l.size+c*v;rr.set(e,{count:l.count+a.length,size:g})}return o.width}function My(t,a,e,r,n,i,l,o){if(a.length<=1)return a.length;if(ne;){let g=v!==void 0?0:a.lastIndexOf(" ",h-1);g>0?h=g:h--,c=kn(t,a.slice(0,Math.max(0,h)),r,l)}if(a[h]!==" "){let g=0;if(v===void 0)g=a.lastIndexOf(" ",h);else for(let d of v){if(d>h)break;g=d}g>0&&(h=g)}return h}function es(t,a,e,r,n,i){let l=`${a}_${e}_${r}px`,o=er.get(l);if(o!==void 0)return o;if(r<=0)return[];let h=[],c=a.split(` `),v=rr.get(e),g=v===void 0?a.length:r/v.size*1.5,d=n&&v!==void 0&&v.count>2e4;for(let u of c){let p=kn(t,u.slice(0,Math.max(0,g)),e,d),z=Math.min(u.length,g);if(p<=r)h.push(u);else{for(;p>r;){let w=My(t,u,r,e,p,z,d,i),s=u.slice(0,Math.max(0,w));u=u.slice(s.length),h.push(s),p=kn(t,u.slice(0,Math.max(0,g)),e,d),z=Math.min(u.length,g)}p>0&&h.push(u)}}return h=h.map((u,p)=>p===0?u.trimEnd():u.trim()),er.set(l,h),er.size>500&&er.delete(er.keys().next().value),h}var F8=F1(Z4(),1),Cz=F1($h(),1),Bz=F1(Ef(),1),b8=F1(Z4(),1),l4=F1(U1(),1),lt=F1(U1(),1),zr=F1(U1(),1),Pz=F1(Z4(),1),_5=F1(U1(),1),l2=F1(U1(),1),T5=F1(U1(),1),_8=F1(U1(),1),Dz=F1(U1(),1),T8=F1(U1(),1),$z=F1(U1(),1),P5=F1(U1(),1),Uz=F1(U1(),1),Xn=F1(U1(),1),Wz=F1(U1(),1),n4=F1(U1(),1),jz=F1(ip(),1),qz=F1(U1(),1),R0=F1(U1(),1),P8=F1(U1(),1);function dp(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var hr=dp();function wF(t){hr=t}var LF=/[&<>"']/,VF=/[&<>"']/g,RF=/[<>"']|&(?!#?\w+;)/,yF=/[<>"']|&(?!#?\w+;)/g,CF={"&":"&","<":"<",">":">",'"':""","'":"'"},lp=t=>CF[t];function V0(t,a){if(a){if(LF.test(t))return t.replace(VF,lp)}else if(RF.test(t))return t.replace(yF,lp);return t}var BF=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function sp(t){return t.replace(BF,(a,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}var SF=/(^|[^\[])\^/g;function bt(t,a){t=typeof t=="string"?t:t.source,a=a||"";let e={replace:(r,n)=>(n=n.source||n,n=n.replace(SF,"$1"),t=t.replace(r,n),e),getRegex:()=>new RegExp(t,a)};return e}var AF=/[^\w:]/g,FF=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function op(t,a,e){if(t){let r;try{r=decodeURIComponent(sp(e)).replace(AF,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}a&&!FF.test(e)&&(e=_F(a,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}var x5={},kF=/^[^:]+:\/*[^/]*$/,bF=/^([^:]+:)[\s\S]*$/,EF=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _F(t,a){x5[" "+t]||(kF.test(t)?x5[" "+t]=t+"/":x5[" "+t]=w5(t,"/",!0)),t=x5[" "+t];let e=t.indexOf(":")===-1;return a.substring(0,2)==="//"?e?a:t.replace(bF,"$1")+a:a.charAt(0)==="/"?e?a:t.replace(EF,"$1")+a:t+a}var L5={exec:function(){}};function aa(t){let a=1,e,r;for(;a{let h=!1,c=l;for(;--c>=0&&o[c]==="\\";)h=!h;return h?"|":" |"}),r=e.split(/ \|/),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>a)r.splice(a);else for(;r.length1;)a&1&&(e+=t),a>>=1,t+=t;return e+t}function vp(t,a,e,r){let n=a.href,i=a.title?V0(a.title):null,l=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;let o={type:"link",raw:e,href:n,title:i,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}return{type:"image",raw:e,href:n,title:i,text:V0(l)}}function PF(t,a){let e=t.match(/^(\s+)(?:```)/);if(e===null)return a;let r=e[1];return a.split(` `).map(n=>{let i=n.match(/^\s+/);if(i===null)return n;let[l]=i;return l.length>=r.length?n.slice(r.length):n}).join(` `)}var Nn=class{constructor(a){this.options=a||hr}space(a){let e=this.rules.block.newline.exec(a);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(a){let e=this.rules.block.code.exec(a);if(e){let r=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:w5(r,` @@ -57,8 +57,8 @@ ${a} `}strong(a){return`${a}`}em(a){return`${a}`}codespan(a){return`${a}`}br(){return this.options.xhtml?"
":"
"}del(a){return`${a}`}link(a,e,r){if(a=op(this.options.sanitize,this.options.baseUrl,a),a===null)return r;let n='",n}image(a,e,r){if(a=op(this.options.sanitize,this.options.baseUrl,a),a===null)return r;let n=`${r}":">",n}text(a){return a}},V5=class{strong(a){return a}em(a){return a}codespan(a){return a}del(a){return a}html(a){return a}text(a){return a}link(a,e,r){return""+r}image(a,e,r){return""+r}br(){return""}},R5=class{constructor(){this.seen={}}serialize(a){return a.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(a,e){let r=a,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[a];do n++,r=a+"-"+n;while(this.seen.hasOwnProperty(r))}return e||(this.seen[a]=n,this.seen[r]=0),r}slug(a,e={}){let r=this.serialize(a);return this.getNextSafeSlug(r,e.dryrun)}},I2=class{constructor(a){this.options=a||hr,this.options.renderer=this.options.renderer||new $n,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new V5,this.slugger=new R5}static parse(a,e){return new I2(e).parse(a)}static parseInline(a,e){return new I2(e).parseInline(a)}parse(a,e=!0){let r="",n,i,l,o,h,c,v,g,d,u,p,z,w,s,f,m,H,x,y,R=a.length;for(n=0;n0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=x+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=x+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:x}):s+=x),s+=this.parse(f.tokens,w),d+=this.renderer.listitem(s,H,m);r+=this.renderer.list(d,p,z);continue}case"html":{r+=this.renderer.html(u.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(u.tokens));continue}case"text":{for(d=u.tokens?this.parseInline(u.tokens):u.text;n+1"u"||t===null)throw new Error("marked(): input parameter is undefined or null");if(typeof t!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if(typeof a=="function"&&(e=a,a=null),a=aa({},j1.defaults,a||{}),up(a),e){let n=a.highlight,i;try{i=ta.lex(t,a)}catch(h){return e(h)}let l=function(h){let c;if(!h)try{a.walkTokens&&j1.walkTokens(i,a.walkTokens),c=I2.parse(i,a)}catch(v){h=v}return a.highlight=n,h?e(h):e(null,c)};if(!n||n.length<3||(delete a.highlight,!i.length))return l();let o=0;j1.walkTokens(i,function(h){h.type==="code"&&(o++,setTimeout(()=>{n(h.text,h.lang,function(c,v){if(c)return l(c);v!=null&&v!==h.text&&(h.text=v,h.escaped=!0),o--,o===0&&l()})},0))}),o===0&&l();return}function r(n){if(n.message+=` Please report this to https://github.com/markedjs/marked.`,a.silent)return"

An error occurred:

"+V0(n.message+"",!0)+"
";throw n}try{let n=ta.lex(t,a);if(a.walkTokens){if(a.async)return Promise.all(j1.walkTokens(n,a.walkTokens)).then(()=>I2.parse(n,a)).catch(r);j1.walkTokens(n,a.walkTokens)}return I2.parse(n,a)}catch(n){r(n)}}j1.options=j1.setOptions=function(t){return aa(j1.defaults,t),wF(j1.defaults),j1};j1.getDefaults=dp;j1.defaults=hr;j1.use=function(...t){let a=aa({},...t),e=j1.defaults.extensions||{renderers:{},childTokens:{}},r;t.forEach(n=>{if(n.extensions&&(r=!0,n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){let l=e.renderers?e.renderers[i.name]:null;l?e.renderers[i.name]=function(...o){let h=i.renderer.apply(this,o);return h===!1&&(h=l.apply(this,o)),h}:e.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[i.level]?e[i.level].unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}i.childTokens&&(e.childTokens[i.name]=i.childTokens)})),n.renderer){let i=j1.defaults.renderer||new $n;for(let l in n.renderer){let o=i[l];i[l]=(...h)=>{let c=n.renderer[l].apply(i,h);return c===!1&&(c=o.apply(i,h)),c}}a.renderer=i}if(n.tokenizer){let i=j1.defaults.tokenizer||new Nn;for(let l in n.tokenizer){let o=i[l];i[l]=(...h)=>{let c=n.tokenizer[l].apply(i,h);return c===!1&&(c=o.apply(i,h)),c}}a.tokenizer=i}if(n.walkTokens){let i=j1.defaults.walkTokens;a.walkTokens=function(l){let o=[];return o.push(n.walkTokens.call(this,l)),i&&(o=o.concat(i.call(this,l))),o}}r&&(a.extensions=e),j1.setOptions(a)})};j1.walkTokens=function(t,a){let e=[];for(let r of t)switch(e=e.concat(a.call(j1,r)),r.type){case"table":{for(let n of r.header)e=e.concat(j1.walkTokens(n.tokens,a));for(let n of r.rows)for(let i of n)e=e.concat(j1.walkTokens(i.tokens,a));break}case"list":{e=e.concat(j1.walkTokens(r.items,a));break}default:j1.defaults.extensions&&j1.defaults.extensions.childTokens&&j1.defaults.extensions.childTokens[r.type]?j1.defaults.extensions.childTokens[r.type].forEach(function(n){e=e.concat(j1.walkTokens(r[n],a))}):r.tokens&&(e=e.concat(j1.walkTokens(r.tokens,a)))}return e};j1.parseInline=function(t,a){if(typeof t>"u"||t===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof t!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");a=aa({},j1.defaults,a||{}),up(a);try{let e=ta.lexInline(t,a);return a.walkTokens&&j1.walkTokens(e,a.walkTokens),I2.parseInline(e,a)}catch(e){if(e.message+=` -Please report this to https://github.com/markedjs/marked.`,a.silent)return"

An error occurred:

"+V0(e.message+"",!0)+"
";throw e}};j1.Parser=I2;j1.parser=I2.parse;j1.Renderer=$n;j1.TextRenderer=V5;j1.Lexer=ta;j1.lexer=ta.lex;j1.Tokenizer=Nn;j1.Slugger=R5;j1.parse=j1;var pO=j1.options,zO=j1.setOptions,mO=j1.use,MO=j1.walkTokens,HO=j1.parseInline;var xO=I2.parse,wO=ta.lex;var h2=F1(U1(),1),o4=F1(U1(),1),Gz=F1(U1(),1),Kz=F1(U1(),1),Xz=F1(U1(),1),ea=F1(U1(),1),m_=F1(U1(),1);function Jp(t="This should not happen"){throw new Error(t)}function i2(t,a="Assertion failed"){if(!t)return Jp(a)}function sr(t,a){return Jp(a??"Hell froze over")}function hk(t,a){try{return t()}catch{return a}}var Fp=Object.prototype.hasOwnProperty;function I5(t,a){let e,r;if(t===a)return!0;if(t&&a&&(e=t.constructor)===a.constructor){if(e===Date)return t.getTime()===a.getTime();if(e===RegExp)return t.toString()===a.toString();if(e===Array){if((r=t.length)===a.length)for(;r--&&I5(t[r],a[r]););return r===-1}if(!e||typeof t=="object"){r=0;for(e in t)if(Fp.call(t,e)&&++r&&!Fp.call(a,e)||!(e in a)||!I5(t[e],a[e]))return!1;return Object.keys(a).length===r}}return t!==t&&a!==a}var rz=class extends pr.PureComponent{constructor(){super(...arguments),this.wrapperRef=pr.createRef(),this.clickOutside=t=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(t))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(t.target)){let a=t.target;for(;a!==null;){if(a.classList.contains("click-outside-ignore"))return;a=a.parentElement}this.props.onClickOutside()}}}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){let{onClickOutside:t,isOutsideClick:a,...e}=this.props;return pr.createElement("div",{...e,ref:this.wrapperRef},this.props.children)}};function iz(t){var a,e;return{"--gdg-accent-color":t.accentColor,"--gdg-accent-fg":t.accentFg,"--gdg-accent-light":t.accentLight,"--gdg-text-dark":t.textDark,"--gdg-text-medium":t.textMedium,"--gdg-text-light":t.textLight,"--gdg-text-bubble":t.textBubble,"--gdg-bg-icon-header":t.bgIconHeader,"--gdg-fg-icon-header":t.fgIconHeader,"--gdg-text-header":t.textHeader,"--gdg-text-group-header":(a=t.textGroupHeader)!=null?a:t.textHeader,"--gdg-text-header-selected":t.textHeaderSelected,"--gdg-bg-cell":t.bgCell,"--gdg-bg-cell-medium":t.bgCellMedium,"--gdg-bg-header":t.bgHeader,"--gdg-bg-header-has-focus":t.bgHeaderHasFocus,"--gdg-bg-header-hovered":t.bgHeaderHovered,"--gdg-bg-bubble":t.bgBubble,"--gdg-bg-bubble-selected":t.bgBubbleSelected,"--gdg-bg-search-result":t.bgSearchResult,"--gdg-border-color":t.borderColor,"--gdg-horizontal-border-color":(e=t.horizontalBorderColor)!=null?e:t.borderColor,"--gdg-drilldown-border":t.drilldownBorder,"--gdg-link-color":t.linkColor,"--gdg-cell-horizontal-padding":`${t.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${t.cellVerticalPadding}px`,"--gdg-header-font-style":t.headerFontStyle,"--gdg-base-font-style":t.baseFontStyle,"--gdg-marker-font-style":t.markerFontStyle,"--gdg-font-family":t.fontFamily,"--gdg-editor-font-size":t.editorFontSize}}var lz={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#4F5DFF",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function kp(){return lz}var oz=nz.default.createContext(lz);function ck(t,a){let[e,r]=a;if(t.columns.hasIndex(e)||t.rows.hasIndex(r))return!0;if(t.current!==void 0){if(t.current.cell[0]===e&&t.current.cell[1]===r)return!0;let n=[t.current.range,...t.current.rangeStack];for(let i of n)if(e>=i.x&&e=i.y&&r{if(a===0)return this;let e=this.items.map(r=>[r[0]+a,r[1]+a]);return new dr(e)},this.add=a=>{let e=typeof a=="number"?[a,a+1]:a,r=gk([...this.items,e]);return new dr(r)},this.remove=a=>{let e=[...this.items],r=typeof a=="number"?a:a[0],n=typeof a=="number"?a+1:a[1];for(let[i,l]of e.entries()){let[o,h]=l;if(o<=n&&r<=h){let c=[];o{if(this.items.length!==0)return this.items[0][0]},this.last=()=>{if(this.items.length!==0)return this.items.slice(-1)[0][1]-1},this.hasIndex=a=>{for(let e=0;e=r&&a{for(let e=a[0];e{for(let e of this)if(a(e))return!0;return!1},this.equals=a=>{if(a===this)return!0;if(a.items.length!==this.items.length)return!1;for(let e=0;e{let a=[];for(let[e,r]of this.items)for(let n=e;nw8??(w8=new dr([]));mt.fromSingleSelection=t=>dr.empty().add(t);var dk=()=>t=>t.targetY,sk=()=>t=>t.targetX-1,uk=()=>t=>t.targetY-1,fk=()=>t=>t.targetWidth+2,pk=()=>t=>t.targetHeight+2,zk=()=>t=>t.targetY+10,mk=()=>t=>Math.max(0,(t.targetHeight-28)/2),Mk=L0("div")({name:"DataGridOverlayEditorStyle",class:"d1t1th9s",vars:{"d1t1th9s-0":[dk(),"px"],"d1t1th9s-1":[sk(),"px"],"d1t1th9s-2":[uk(),"px"],"d1t1th9s-3":[fk(),"px"],"d1t1th9s-4":[pk(),"px"],"d1t1th9s-5":[zk(),"px"],"d1t1th9s-6":[mk(),"px"]}});function Hk(){let[t,a]=ma.useState();return[t??void 0,a]}function xk(){let[t,a]=Hk(),[e,r]=ma.useState(0),[n,i]=ma.useState(!0);ma.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;let o=new IntersectionObserver(h=>{h.length!==0&&i(h[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),ma.useEffect(()=>{if(n||t===void 0)return;let o,h=()=>{let{right:c}=t.getBoundingClientRect();r(v=>Math.min(v+window.innerWidth-c-10,0)),o=requestAnimationFrame(h)};return o=requestAnimationFrame(h),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,n]);let l=ma.useMemo(()=>({transform:`translateX(${e}px)`}),[e]);return{ref:a,style:l}}var wk=t=>{let{target:a,content:e,onFinishEditing:r,forceEditMode:n,initialValue:i,imageEditorOverride:l,markdownDivCreateNode:o,highlight:h,className:c,theme:v,id:g,cell:d,validateCell:u,getCellRenderer:p,provideEditor:z,isOutsideClick:w}=t,[s,f]=o0.useState(n?e:void 0),m=o0.useRef(s??e);m.current=s??e;let[H,x]=o0.useState(()=>u===void 0?!0:!(Da(e)&&u?.(d,e,m.current)===!1)),y=o0.useCallback((o1,H1)=>{r(H?o1:void 0,H1)},[H,r]),R=o0.useCallback(o1=>{if(u!==void 0&&o1!==void 0&&Da(o1)){let H1=u(d,o1,m.current);H1===!1?x(!1):(typeof H1=="object"&&(o1=H1),x(!0))}f(o1)},[d,u]),L=o0.useRef(!1),V=o0.useRef(void 0),C=o0.useCallback(()=>{y(s,[0,0]),L.current=!0},[s,y]),k=o0.useCallback((o1,H1)=>{var P1;y(o1,(P1=H1??V.current)!=null?P1:[0,0]),L.current=!0},[y]),b=o0.useCallback(async o1=>{let H1=!1;o1.key==="Escape"?(o1.stopPropagation(),o1.preventDefault(),V.current=[0,0]):o1.key==="Enter"&&!o1.shiftKey?(o1.stopPropagation(),o1.preventDefault(),V.current=[0,1],H1=!0):o1.key==="Tab"&&(o1.stopPropagation(),o1.preventDefault(),V.current=[o1.shiftKey?-1:1,0],H1=!0),window.setTimeout(()=>{!L.current&&V.current!==void 0&&(y(H1?s:void 0,V.current),L.current=!0)},0)},[y,s]),F=s??e,[_,j]=o0.useMemo(()=>{var o1,H1;if(we(e))return[];let P1=z?.(e);return P1!==void 0?[P1,!1]:[(H1=(o1=p(e))==null?void 0:o1.provideEditor)==null?void 0:H1.call(o1,e),!1]},[e,p,z]),{ref:n1,style:Z}=xk(),d1=!0,O,a1=!0,W;if(_!==void 0){d1=_.disablePadding!==!0,a1=_.disableStyling!==!0;let o1=gz(_);o1&&(W=_.styleOverride);let H1=o1?_.editor:_;O=o0.createElement(H1,{isHighlighted:h,onChange:R,value:F,initialValue:i,onFinishedEditing:k,validatedSelection:Da(F)?F.selectionRange:void 0,forceEditMode:n,target:a,imageEditorOverride:l,markdownDivCreateNode:o,isValid:H})}W={...W,...Z};let L1=document.getElementById("portal");if(L1===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `
` as the last child of your ``.'),null;let p1=a1?"gdg-style":"gdg-unstyle";return H||(p1+=" invalid"),d1&&(p1+=" pad"),(0,ez.createPortal)(o0.createElement(oz.Provider,{value:v},o0.createElement(rz,{style:iz(v),className:c,onClickOutside:C,isOutsideClick:w},o0.createElement(Mk,{ref:n1,id:g,className:p1,style:W,as:j===!0?"label":void 0,targetX:a.x,targetY:a.y,targetWidth:a.width,targetHeight:a.height},o0.createElement("div",{className:"clip-region",onKeyDown:b},O)))),L1)},Lk=wk,O8=1<<16,L8=[];function Ep(t,a){return a*O8+t}function uz(t){return t%O8}function fz(t,a){return(t-a)/O8}function Vk(t){let a=uz(t),e=fz(t,a);return[a,e]}var Rk=class{constructor(){this.imageLoaded=()=>{},this.loadedLocations=[],this.visibleWindow={x:0,y:0,width:0,height:0},this.freezeCols=0,this.isInWindow=t=>{let a=uz(t),e=fz(t,a),r=this.visibleWindow;return a=r.y&&e<=r.y+r.height?!0:a>=r.x&&a<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},this.cache={},this.sendLoaded=(0,sz.default)(()=>{this.imageLoaded(this.loadedLocations),this.loadedLocations=[]},20),this.clearOutOfWindow=()=>{let t=Object.keys(this.cache);for(let a of t){let e=this.cache[a],r=!1;for(let n=0;n{o||(o=!0,L8.length<12?L8.unshift(l):i||(l.src=""))}},c=new Promise(v=>l.addEventListener("load",()=>v(null)));requestAnimationFrame(async()=>{try{l.src=t,await c,await l.decode();let v=this.cache[r];if(v!==void 0&&!o){v.img=l;for(let g of v.cells)this.loadedLocations.push(Vk(g));i=!0,this.sendLoaded()}}catch{h.cancel()}}),this.cache[r]=h}loadOrGetImage(t,a,e){let r=t,n=this.cache[r];if(n!==void 0){let i=Ep(a,e);return n.cells.includes(i)||n.cells.push(i),n.img}else this.loadImage(t,a,e,r)}},yk=Rk;function W0(t,a,e,r,n=!1){let i=Zt.useRef();i.current=a,Zt.useEffect(()=>{if(e===null||e.addEventListener===void 0)return;let l=e,o=h=>{var c;(c=i.current)==null||c.call(l,h)};return l.addEventListener(t,o,{passive:r,capture:n}),()=>{l.removeEventListener(t,o,{capture:n})}},[t,e,r,n])}function jn(t,a){return t===void 0?void 0:a}var Ck=Math.PI;function _p(t){return t*Ck/180}var zz=(t,a,e)=>({x1:t-e/2,y1:a-e/2,x2:t+e/2,y2:a+e/2}),mz=(t,a,e,r,n)=>{switch(t){case"left":return Math.floor(a)+r+n/2;case"center":return Math.floor(a+e/2);case"right":return Math.floor(a+e)-r-n/2}},Mz=(t,a,e)=>Math.min(t,a-e*2),Hz=(t,a,e)=>e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2,D8=t=>{var a;let e=(a=t.fgColor)!=null?a:"currentColor";return Zt.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zt.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),Zt.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},Bk=t=>{var a;let e=(a=t.fgColor)!=null?a:"currentColor";return Zt.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zt.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Sk(t,a,e){let[r,n]=Zt.useState(t),i=Zt.useRef(!0);Zt.useEffect(()=>()=>{i.current=!1},[]);let l=Zt.useRef((0,pz.default)(o=>{i.current&&n(o)},e));return Zt.useLayoutEffect(()=>{i.current&&l.current(()=>t())},a),r}var xz="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",wz="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",Ak=new RegExp("^[^"+wz+"]*["+xz+"]"),Fk=new RegExp("^[^"+xz+"]*["+wz+"]");function N8(t){return Ak.test(t)?"rtl":Fk.test(t)?"ltr":"neutral"}var S5=void 0;function kk(){if(S5!==void 0)return S5;let t=document.createElement("p");t.style.width="100%",t.style.height="200px";let a=document.createElement("div");a.id="testScrollbar",a.style.position="absolute",a.style.top="0px",a.style.left="0px",a.style.visibility="hidden",a.style.width="200px",a.style.height="150px",a.style.overflow="hidden",a.append(t),document.body.append(a);let e=t.offsetWidth;a.style.overflow="scroll";let r=t.offsetWidth;return e===r&&(r=a.clientWidth),a.remove(),S5=e-r,S5}var r4=Symbol();function bk(t){let a=Zt.useRef([r4,t]);a.current[1]!==t&&(a.current[0]=t),a.current[1]=t;let[e,r]=Zt.useState(t),[,n]=Zt.useState(),i=Zt.useCallback(o=>{let h=a.current[0];h!==r4&&(o=typeof o=="function"?o(h):o,o===h)||(h!==r4&&n({}),r(c=>typeof o=="function"?o(h===r4?c:h):o),a.current[0]=r4)},[]),l=Zt.useCallback(()=>{a.current[0]=r4,n({})},[]);return[a.current[0]===r4?e:a.current[0],i,l]}function Ek(t,a){return Lz.default.useMemo(()=>t.map((e,r)=>({...e,sourceIndex:r,sticky:r=a.span[0]&&r<=a.span[1]}function Tp(t,a,e){let r=e.x,n=e.x+e.width-1,i=e.y,l=e.y+e.height-1,[o,h]=t;if(hl)return!1;if(a.span===void 0)return o>=r&&o<=n;let[c,v]=a.span;return c>=r&&c<=n||v>=r&&c<=n||cn}function Tk(t,a,e){let r=0;if(e.current===void 0)return r;Tp(t,a,e.current.range)&&r++;for(let n of e.current.rangeStack)Tp(t,a,n)&&r++;return r}function Vz(t,a){let e=t;if(a!==void 0){let r=[...t],n=e[a.src];a.src>a.dest?(r.splice(a.src,1),r.splice(a.dest,0,n)):(r.splice(a.dest+1,0,n),r.splice(a.src,1)),r=r.map((i,l)=>({...i,sticky:t[l].sticky})),e=r}return e}function ur(t,a){let e=0,r=Vz(t,a);for(let n=0;n0)for(let c of l)e-=c.width;let o=a,h=n??0;for(;h<=e&&oa-g)return i-1;let d=i-(c?1:0),u=t-(h??0);if(typeof l=="number"){let p=Math.floor((u-v)/l)+o;return p>=d?void 0:p}else{let p=v;for(let z=o;z"u";async function Dk(){var t;Ok||((t=document?.fonts)==null?void 0:t.ready)===void 0||(await document.fonts.ready,k5=0,b5={},as())}Dk();function Nk(t,a,e,r){return`${t}_${r??a.font}_${e}`}function $8(t,a,e){let r=Nk(t,a,"middle",e),n=b5[r];return n===void 0&&(n=a.measureText(t),b5[r]=n,k5++),k5>1e4&&(b5={},k5=0),n}function Na(t,a){return typeof a!="string"&&(a=`${a.baseFontStyle} ${a.fontFamily}`),$k(t,a)}function Pp(t,a){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";t.save(),t.textBaseline=a;let r=t.measureText(e);return t.restore(),r}var Ip=[];function $k(t,a){for(let i of Ip)if(i.key===a)return i.val;let e=Pp(t,"alphabetic"),n=-(Pp(t,"middle").actualBoundingBoxDescent-e.actualBoundingBoxDescent)+e.actualBoundingBoxAscent/2;return Ip.push({key:a,val:n}),n}function Uk(t,a,e,r,n){let{ctx:i,rect:l,theme:o}=t,h=Number.MAX_SAFE_INTEGER,c=500;if(a!==void 0&&(h=e-a,hp&&(a=a.slice(0,p))}let d=Na(i,o),u=N8(a)==="rtl";if(e===void 0&&u&&(e="right"),u&&(i.direction="rtl"),a.length>0){let p=!1;if(e==="right"?(i.textAlign="right",p=!0):e!==void 0&&e!=="left"&&(i.textAlign=e,p=!0),!r)Op(i,a,h,c,v,g,d,o,e);else{let z=`${o.fontFamily} ${o.baseFontStyle}`,w=es(i,a,z,v-o.cellHorizontalPadding*2,n??!1),s=Rz(i,z),f=o.lineHeight*s,m=s+f*(w.length-1),H=m+o.cellVerticalPadding>g;H&&(i.save(),i.rect(h,c,v,g),i.clip());let x=c+g/2-m/2,y=Math.max(c+o.cellVerticalPadding,x);for(let R of w)if(Op(i,R,h,y,v,s,d,o,e),y+=f,y>c+g)break;H&&i.restore()}p&&(i.textAlign="start"),u&&(i.direction="inherit")}}function Wk(t,a,e){let{ctx:r,rect:n,hoverAmount:i,theme:l,spriteManager:o}=t,{x:h,y:c,width:v,height:g}=n;r.beginPath(),r.globalAlpha=i,r.rect(h,c,v,g),r.fillStyle=l.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();let d=a!=="",u=0;if(e!==void 0){let z=g-8,w=h+8/2,s=c+8/2;o.drawSprite(e,"normal",r,w,s,z,l,d?1:i),u=z}else{u=24;let p=12,z=d?p:i*p,w=d?0:(1-i)*p*.5,s=l.cellHorizontalPadding+4;z>0&&(r.moveTo(h+s+w,c+g/2),r.lineTo(h+s+w+z,c+g/2),r.moveTo(h+s+w+z*.5,c+g/2-z*.5),r.lineTo(h+s+w+z*.5,c+g/2+z*.5),r.lineWidth=2,r.strokeStyle=l.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=l.textMedium,r.fillText(a,u+h+l.cellHorizontalPadding+.5,c+g/2+Na(r,l)),r.beginPath()}function U8(t,a,e,r,n,i,l,o,h=-20,c=-20,v=32,g="center"){let d=Math.floor(n+l/2),u=4,p=Mz(v,l,a.cellVerticalPadding),z=p/2,w=mz(g,r,i,a.cellHorizontalPadding,p),s=zz(w,d,p),f=Hz(r+h,n+c,s);switch(e){case!0:{t.beginPath(),Ve(t,w-p/2,d-p/2,p,p,u),t.fillStyle=o?a.accentColor:a.textMedium,t.fill(),t.beginPath(),t.moveTo(w-z+p/4.23,d-z+p/1.97),t.lineTo(w-z+p/2.42,d-z+p/1.44),t.lineTo(w-z+p/1.29,d-z+p/3.25),t.strokeStyle=a.bgCell,t.lineJoin="round",t.lineCap="round",t.lineWidth=1.9,t.stroke();break}case Qn:case!1:{t.beginPath(),Ve(t,w-p/2+.5,d-p/2+.5,p-1,p-1,u),t.lineWidth=1,t.strokeStyle=f?a.textDark:a.textMedium,t.stroke();break}case I8:{t.beginPath(),Ve(t,w-p/2,d-p/2,p,p,u),t.fillStyle=f?a.textMedium:a.textLight,t.fill(),t.beginPath(),t.moveTo(w-p/3,d),t.lineTo(w+p/3,d),t.strokeStyle=a.bgCell,t.lineCap="round",t.lineWidth=1.9,t.stroke();break}default:sr(e)}}function jk(t,a){let{ctx:e,theme:r}=t,n=`9px ${r.fontFamily}`,i=a??{};return i?.font!==n&&(e.font=n,i.font=n),i.deprep=qk,e.textAlign="center",i}function qk(t){let{ctx:a}=t;a.textAlign="start"}function Gk(t,a,e,r,n){let{ctx:i,rect:l,hoverAmount:o,theme:h}=t,{x:c,y:v,width:g,height:d}=l,u=e?1:r==="checkbox-visible"?.6+.4*o:o;if(r!=="number"&&u>0){i.globalAlpha=u;let p=7*(e?o:1);if(U8(i,h,e,n?c+p:c,v,n?g-p:g,d,!0,void 0,void 0,18),n){i.globalAlpha=o,i.beginPath();for(let z of[3,6])for(let w of[-5,-1,3])i.rect(c+z,v+d/2+w,2,2);i.fillStyle=h.textLight,i.fill(),i.beginPath()}i.globalAlpha=1}if(r==="number"||r==="both"&&!e){let p=a.toString(),z=`${h.markerFontStyle} ${h.fontFamily}`,w=c+g/2;r==="both"&&o!==0&&(i.globalAlpha=1-o),i.fillStyle=h.textLight,i.font=z,i.fillText(p,w,v+d/2+Na(i,z)),o!==0&&(i.globalAlpha=1)}}function Kk(t){let{ctx:a,theme:e,rect:r}=t,{x:n,y:i,height:l}=r;a.beginPath();let o=2.5,h=n+e.cellHorizontalPadding+o,c=i+l/2,v=Math.cos(_p(30))*o,g=Math.sin(_p(30))*o;for(let d=0;d<12;d++)a.moveTo(h,c-o),a.lineTo(h,c+o),a.moveTo(h+v,c-g),a.lineTo(h-v,c+g),a.moveTo(h-v,c-g),a.lineTo(h+v,c+g),h+=8;a.lineWidth=1.1,a.lineCap="square",a.strokeStyle=e.textLight,a.stroke()}function Ve(t,a,e,r,n,i){typeof i=="number"&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.min(i.tl,n/2,r/2),tr:Math.min(i.tr,n/2,r/2),bl:Math.min(i.bl,n/2,r/2),br:Math.min(i.br,n/2,r/2)},t.moveTo(a+i.tl,e),t.arcTo(a+r,e,a+r,e+i.tr,i.tr),t.arcTo(a+r,e+n,a+r-i.br,e+n,i.br),t.arcTo(a,e+n,a,e+n-i.bl,i.bl),t.arcTo(a,e,a+i.tl,e,i.tl)}function Xk(t,a,e,r){if(!e&&a===Qn)return;let{ctx:n,hoverAmount:i,theme:l,rect:o,highlighted:h,hoverX:c,hoverY:v,cell:{contentAlign:g}}=t,{x:d,y:u,width:p,height:z}=o,w=.35,s=e?1-w+w*i:.4;a===Qn&&(s*=i),s!==0&&(n.globalAlpha=s,U8(n,l,a,d,u,p,z,h,c,v,r,g),n.globalAlpha=1)}var Yn=4;function Yk(t,a){let{rect:e,theme:r,ctx:n,highlighted:i}=t,{x:l,y:o,width:h,height:c}=e,v=20,g=8,d=Yn,u=l+r.cellHorizontalPadding,p=[];for(let z of a){if(u>l+h)break;let w=$8(z,n,`${r.baseFontStyle} ${r.fontFamily}`).width;p.push({x:u,width:w}),u+=w+g*2+d}n.beginPath();for(let z of p)Ve(n,z.x,o+(c-v)/2,z.width+g*2,v,v/2);n.fillStyle=i?r.bgBubbleSelected:r.bgBubble,n.fill();for(let[z,w]of p.entries())n.beginPath(),n.fillStyle=r.textBubble,n.fillText(a[z],w.x+g,o+c/2+Na(n,r))}var V8={};function Qk(t,a,e){let r=Math.ceil(window.devicePixelRatio),n=5,i=e-n*2,l=4,o=6,h=e*r,c=o+n,v=o*3,g=(v+n*2)*r,d=`${t},${a},${r},${e}`;if(V8[d]!==void 0)return{el:V8[d],height:h,width:g,middleWidth:l*r,sideWidth:c*r,padding:n*r,dpr:r};let u=document.createElement("canvas"),p=u.getContext("2d");if(p===null)return null;u.width=g,u.height=h,p.scale(r,r),V8[d]=u;let z=Math.min(o,v/2,i/2);return p.beginPath(),Ve(p,n,n,v,i,z),p.shadowColor="rgba(24, 25, 34, 0.4)",p.shadowBlur=1,p.fillStyle=t,p.fill(),p.shadowColor="rgba(24, 25, 34, 0.3)",p.shadowOffsetY=1,p.shadowBlur=5,p.fillStyle=t,p.fill(),p.shadowOffsetY=0,p.shadowBlur=0,p.shadowBlur=0,p.beginPath(),Ve(p,n+.5,n+.5,v,i,z),p.strokeStyle=a,p.lineWidth=1,p.stroke(),{el:u,height:h,width:g,sideWidth:c*r,middleWidth:o*r,padding:n*r,dpr:r}}function Zk(t,a){let{rect:e,theme:r,ctx:n,imageLoader:i,col:l,row:o}=t,{x:h,width:c}=e,v=`${r.baseFontStyle} ${r.fontFamily}`,g=Rz(n,v),d=Math.min(e.height,Math.max(16,Math.ceil(g*r.lineHeight)*2)),u=Math.floor(e.y+(e.height-d)/2),p=d-10,z=8,w=Yn,s=h+r.cellHorizontalPadding,f=Qk(r.bgCell,r.drilldownBorder,d),m=[];for(let H of a){if(s>h+c)break;let y=$8(H.text,n,v).width,R=0;H.img!==void 0&&i.loadOrGetImage(H.img,l,o)!==void 0&&(R=p-8+4);let L=y+R+z*2;m.push({x:s,width:L}),s+=L+w}if(f!==null){let{el:H,height:x,middleWidth:y,sideWidth:R,width:L,dpr:V,padding:C}=f,k=R/V,b=C/V;for(let F of m){let _=Math.floor(F.x),j=Math.floor(F.width),n1=j-(k-b)*2;n.imageSmoothingEnabled=!1,n.drawImage(H,0,0,R,x,_-b,u,k,d),n1>0&&n.drawImage(H,R,0,y,x,_+(k-b),u,n1,d),n.drawImage(H,L-R,0,R,x,_+j-(k-b),u,k,d),n.imageSmoothingEnabled=!0}}n.beginPath();for(let[H,x]of m.entries()){let y=a[H],R=x.x+z;if(y.img!==void 0){let L=i.loadOrGetImage(y.img,l,o);if(L!==void 0){let V=p-8,C=0,k=0,b=L.width,F=L.height;b>F?(C+=(b-F)/2,b=F):F>b&&(k+=(F-b)/2,F=b),n.beginPath(),Ve(n,R,u+d/2-V/2,V,V,3),n.save(),n.clip(),n.drawImage(L,C,k,b,F,R,u+d/2-V/2,V,V),n.restore(),R+=V+4}}n.beginPath(),n.fillStyle=r.textBubble,n.fillText(y.text,R,u+d/2+Na(n,r))}}function Jk(t,a,e=4,r){let{rect:n,col:i,row:l,theme:o,ctx:h,imageLoader:c}=t,{x:v,y:g,height:d,width:u}=n,p=d-o.cellVerticalPadding*2,z=[],w=0;for(let f=0;f0&&(Ve(h,s,g+o.cellVerticalPadding,m,p,e),h.save(),h.clip()),h.drawImage(f,s,g+o.cellVerticalPadding,m,p),e>0&&h.restore(),s+=m+Yn}}function tb(t,a,e){let r=function(o,h){let c=h.x-o.x,v=h.y-o.y,g=Math.sqrt(c*c+v*v),d=c/g,u=v/g;return{x:c,y:h.y-o.y,len:g,nx:d,ny:u,ang:Math.atan2(u,d)}},n,i=a.length,l=a[i-1];for(let o=0;o1?1:d),z=1,w=!1;u<0?p<0?p=Math.PI+p:(p=Math.PI-p,z=-1,w=!0):p>0&&(z=-1,w=!0),n=h.radius!==void 0?h.radius:e;let s=p/2,f=Math.abs(Math.cos(s)*n/Math.sin(s)),m;f>Math.min(v.len/2,g.len/2)?(f=Math.min(v.len/2,g.len/2),m=Math.abs(f*Math.sin(s)/Math.cos(s))):m=n;let H=h.x+g.nx*f,x=h.y+g.ny*f;H+=-g.ny*m*z,x+=g.nx*m*z,t.arc(H,x,m,v.ang+Math.PI/2*z,g.ang-Math.PI/2*z,w),l=h,h=c}t.closePath()}function Kn(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p){let z={x:0,y:i+c,width:0,height:0},w=i-n;if(t>=g){let s=l>t?-1:1,f=ur(u);z.x+=f+h;for(let m=l;m!==t;m+=s)z.x+=u[s===1?m:m-1].width*s}else for(let s=0;s0&&Zn(u[s-1].group,f)&&u[s-1].sticky===m;){let x=u[s-1];z.x-=x.width,z.width+=x.width,s--}let H=t;for(;H+1e&&(z.width=e-z.x)}}else if(d&&a===v-1){let s=typeof p=="number"?p:p(a);z.y=r-s,z.height=s}else{let s=o>a?-1:1;if(typeof p=="number"){let f=a-o;z.y+=f*p}else for(let f=o;f!==a;f+=s)z.y+=p(f)*s;z.height=(typeof p=="number"?p:p(a))+1}return z}var Ot='',ab=t=>{let a=t.fgColor,e=t.bgColor;return` +Please report this to https://github.com/markedjs/marked.`,a.silent)return"

An error occurred:

"+V0(e.message+"",!0)+"
";throw e}};j1.Parser=I2;j1.parser=I2.parse;j1.Renderer=$n;j1.TextRenderer=V5;j1.Lexer=ta;j1.lexer=ta.lex;j1.Tokenizer=Nn;j1.Slugger=R5;j1.parse=j1;var pO=j1.options,zO=j1.setOptions,mO=j1.use,MO=j1.walkTokens,HO=j1.parseInline;var xO=I2.parse,wO=ta.lex;var h2=F1(U1(),1),o4=F1(U1(),1),Gz=F1(U1(),1),Kz=F1(U1(),1),Xz=F1(U1(),1),ea=F1(U1(),1),m_=F1(U1(),1);function Jp(t="This should not happen"){throw new Error(t)}function i2(t,a="Assertion failed"){if(!t)return Jp(a)}function sr(t,a){return Jp(a??"Hell froze over")}function hk(t,a){try{return t()}catch{return a}}var Fp=Object.prototype.hasOwnProperty;function I5(t,a){let e,r;if(t===a)return!0;if(t&&a&&(e=t.constructor)===a.constructor){if(e===Date)return t.getTime()===a.getTime();if(e===RegExp)return t.toString()===a.toString();if(e===Array){if((r=t.length)===a.length)for(;r--&&I5(t[r],a[r]););return r===-1}if(!e||typeof t=="object"){r=0;for(e in t)if(Fp.call(t,e)&&++r&&!Fp.call(a,e)||!(e in a)||!I5(t[e],a[e]))return!1;return Object.keys(a).length===r}}return t!==t&&a!==a}var rz=class extends pr.PureComponent{constructor(){super(...arguments),this.wrapperRef=pr.createRef(),this.clickOutside=t=>{if(!(this.props.isOutsideClick&&!this.props.isOutsideClick(t))&&this.wrapperRef.current!==null&&!this.wrapperRef.current.contains(t.target)){let a=t.target;for(;a!==null;){if(a.classList.contains("click-outside-ignore"))return;a=a.parentElement}this.props.onClickOutside()}}}componentDidMount(){document.addEventListener("touchend",this.clickOutside,!0),document.addEventListener("mousedown",this.clickOutside,!0),document.addEventListener("contextmenu",this.clickOutside,!0)}componentWillUnmount(){document.removeEventListener("touchend",this.clickOutside,!0),document.removeEventListener("mousedown",this.clickOutside,!0),document.removeEventListener("contextmenu",this.clickOutside,!0)}render(){let{onClickOutside:t,isOutsideClick:a,...e}=this.props;return pr.createElement("div",{...e,ref:this.wrapperRef},this.props.children)}};function iz(t){var a,e;return{"--gdg-accent-color":t.accentColor,"--gdg-accent-fg":t.accentFg,"--gdg-accent-light":t.accentLight,"--gdg-text-dark":t.textDark,"--gdg-text-medium":t.textMedium,"--gdg-text-light":t.textLight,"--gdg-text-bubble":t.textBubble,"--gdg-bg-icon-header":t.bgIconHeader,"--gdg-fg-icon-header":t.fgIconHeader,"--gdg-text-header":t.textHeader,"--gdg-text-group-header":(a=t.textGroupHeader)!=null?a:t.textHeader,"--gdg-text-header-selected":t.textHeaderSelected,"--gdg-bg-cell":t.bgCell,"--gdg-bg-cell-medium":t.bgCellMedium,"--gdg-bg-header":t.bgHeader,"--gdg-bg-header-has-focus":t.bgHeaderHasFocus,"--gdg-bg-header-hovered":t.bgHeaderHovered,"--gdg-bg-bubble":t.bgBubble,"--gdg-bg-bubble-selected":t.bgBubbleSelected,"--gdg-bg-search-result":t.bgSearchResult,"--gdg-border-color":t.borderColor,"--gdg-horizontal-border-color":(e=t.horizontalBorderColor)!=null?e:t.borderColor,"--gdg-drilldown-border":t.drilldownBorder,"--gdg-link-color":t.linkColor,"--gdg-cell-horizontal-padding":`${t.cellHorizontalPadding}px`,"--gdg-cell-vertical-padding":`${t.cellVerticalPadding}px`,"--gdg-header-font-style":t.headerFontStyle,"--gdg-base-font-style":t.baseFontStyle,"--gdg-marker-font-style":t.markerFontStyle,"--gdg-font-family":t.fontFamily,"--gdg-editor-font-size":t.editorFontSize}}var lz={accentColor:"#4F5DFF",accentFg:"#FFFFFF",accentLight:"rgba(62, 116, 253, 0.1)",textDark:"#313139",textMedium:"#737383",textLight:"#B2B2C0",textBubble:"#313139",bgIconHeader:"#737383",fgIconHeader:"#FFFFFF",textHeader:"#313139",textGroupHeader:"#313139BB",textHeaderSelected:"#FFFFFF",bgCell:"#FFFFFF",bgCellMedium:"#FAFAFB",bgHeader:"#F7F7F8",bgHeaderHasFocus:"#E9E9EB",bgHeaderHovered:"#EFEFF1",bgBubble:"#EDEDF3",bgBubbleSelected:"#FFFFFF",bgSearchResult:"#fff9e3",borderColor:"rgba(115, 116, 131, 0.16)",drilldownBorder:"rgba(0, 0, 0, 0)",linkColor:"#4F5DFF",cellHorizontalPadding:8,cellVerticalPadding:3,headerIconSize:18,headerFontStyle:"600 13px",baseFontStyle:"13px",markerFontStyle:"9px",fontFamily:"Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif",editorFontSize:"13px",lineHeight:1.4};function kp(){return lz}var oz=nz.default.createContext(lz);function ck(t,a){let[e,r]=a;if(t.columns.hasIndex(e)||t.rows.hasIndex(r))return!0;if(t.current!==void 0){if(t.current.cell[0]===e&&t.current.cell[1]===r)return!0;let n=[t.current.range,...t.current.rangeStack];for(let i of n)if(e>=i.x&&e=i.y&&r{if(a===0)return this;let e=this.items.map(r=>[r[0]+a,r[1]+a]);return new dr(e)},this.add=a=>{let e=typeof a=="number"?[a,a+1]:a,r=gk([...this.items,e]);return new dr(r)},this.remove=a=>{let e=[...this.items],r=typeof a=="number"?a:a[0],n=typeof a=="number"?a+1:a[1];for(let[i,l]of e.entries()){let[o,h]=l;if(o<=n&&r<=h){let c=[];o{if(this.items.length!==0)return this.items[0][0]},this.last=()=>{if(this.items.length!==0)return this.items.slice(-1)[0][1]-1},this.hasIndex=a=>{for(let e=0;e=r&&a{for(let e=a[0];e{for(let e of this)if(a(e))return!0;return!1},this.equals=a=>{if(a===this)return!0;if(a.items.length!==this.items.length)return!1;for(let e=0;e{let a=[];for(let[e,r]of this.items)for(let n=e;nw8??(w8=new dr([]));mt.fromSingleSelection=t=>dr.empty().add(t);var dk=()=>t=>t.targetY,sk=()=>t=>t.targetX-1,uk=()=>t=>t.targetY-1,fk=()=>t=>t.targetWidth+2,pk=()=>t=>t.targetHeight+2,zk=()=>t=>t.targetY+10,mk=()=>t=>Math.max(0,(t.targetHeight-28)/2),Mk=L0("div")({name:"DataGridOverlayEditorStyle",class:"d1t1th9s",vars:{"d1t1th9s-0":[dk(),"px"],"d1t1th9s-1":[sk(),"px"],"d1t1th9s-2":[uk(),"px"],"d1t1th9s-3":[fk(),"px"],"d1t1th9s-4":[pk(),"px"],"d1t1th9s-5":[zk(),"px"],"d1t1th9s-6":[mk(),"px"]}});function Hk(){let[t,a]=ma.useState();return[t??void 0,a]}function xk(){let[t,a]=Hk(),[e,r]=ma.useState(0),[n,i]=ma.useState(!0);ma.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;let o=new IntersectionObserver(h=>{h.length!==0&&i(h[0].isIntersecting)},{threshold:1});return o.observe(t),()=>o.disconnect()},[t]),ma.useEffect(()=>{if(n||t===void 0)return;let o,h=()=>{let{right:c}=t.getBoundingClientRect();r(v=>Math.min(v+window.innerWidth-c-10,0)),o=requestAnimationFrame(h)};return o=requestAnimationFrame(h),()=>{o!==void 0&&cancelAnimationFrame(o)}},[t,n]);let l=ma.useMemo(()=>({transform:`translateX(${e}px)`}),[e]);return{ref:a,style:l}}var wk=t=>{let{target:a,content:e,onFinishEditing:r,forceEditMode:n,initialValue:i,imageEditorOverride:l,markdownDivCreateNode:o,highlight:h,className:c,theme:v,id:g,cell:d,validateCell:u,getCellRenderer:p,provideEditor:z,isOutsideClick:w}=t,[s,f]=o0.useState(n?e:void 0),m=o0.useRef(s??e);m.current=s??e;let[H,x]=o0.useState(()=>u===void 0?!0:!(Da(e)&&u?.(d,e,m.current)===!1)),y=o0.useCallback((o1,H1)=>{r(H?o1:void 0,H1)},[H,r]),R=o0.useCallback(o1=>{if(u!==void 0&&o1!==void 0&&Da(o1)){let H1=u(d,o1,m.current);H1===!1?x(!1):(typeof H1=="object"&&(o1=H1),x(!0))}f(o1)},[d,u]),L=o0.useRef(!1),V=o0.useRef(void 0),C=o0.useCallback(()=>{y(s,[0,0]),L.current=!0},[s,y]),k=o0.useCallback((o1,H1)=>{var P1;y(o1,(P1=H1??V.current)!=null?P1:[0,0]),L.current=!0},[y]),b=o0.useCallback(async o1=>{let H1=!1;o1.key==="Escape"?(o1.stopPropagation(),o1.preventDefault(),V.current=[0,0]):o1.key==="Enter"&&!o1.shiftKey?(o1.stopPropagation(),o1.preventDefault(),V.current=[0,1],H1=!0):o1.key==="Tab"&&(o1.stopPropagation(),o1.preventDefault(),V.current=[o1.shiftKey?-1:1,0],H1=!0),window.setTimeout(()=>{!L.current&&V.current!==void 0&&(y(H1?s:void 0,V.current),L.current=!0)},0)},[y,s]),F=s??e,[_,j]=o0.useMemo(()=>{var o1,H1;if(Le(e))return[];let P1=z?.(e);return P1!==void 0?[P1,!1]:[(H1=(o1=p(e))==null?void 0:o1.provideEditor)==null?void 0:H1.call(o1,e),!1]},[e,p,z]),{ref:i1,style:Z}=xk(),d1=!0,O,a1=!0,W;if(_!==void 0){d1=_.disablePadding!==!0,a1=_.disableStyling!==!0;let o1=gz(_);o1&&(W=_.styleOverride);let H1=o1?_.editor:_;O=o0.createElement(H1,{isHighlighted:h,onChange:R,value:F,initialValue:i,onFinishedEditing:k,validatedSelection:Da(F)?F.selectionRange:void 0,forceEditMode:n,target:a,imageEditorOverride:l,markdownDivCreateNode:o,isValid:H})}W={...W,...Z};let L1=document.getElementById("portal");if(L1===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `
` as the last child of your ``.'),null;let p1=a1?"gdg-style":"gdg-unstyle";return H||(p1+=" invalid"),d1&&(p1+=" pad"),(0,ez.createPortal)(o0.createElement(oz.Provider,{value:v},o0.createElement(rz,{style:iz(v),className:c,onClickOutside:C,isOutsideClick:w},o0.createElement(Mk,{ref:i1,id:g,className:p1,style:W,as:j===!0?"label":void 0,targetX:a.x,targetY:a.y,targetWidth:a.width,targetHeight:a.height},o0.createElement("div",{className:"clip-region",onKeyDown:b},O)))),L1)},Lk=wk,O8=1<<16,L8=[];function Ep(t,a){return a*O8+t}function uz(t){return t%O8}function fz(t,a){return(t-a)/O8}function Vk(t){let a=uz(t),e=fz(t,a);return[a,e]}var Rk=class{constructor(){this.imageLoaded=()=>{},this.loadedLocations=[],this.visibleWindow={x:0,y:0,width:0,height:0},this.freezeCols=0,this.isInWindow=t=>{let a=uz(t),e=fz(t,a),r=this.visibleWindow;return a=r.y&&e<=r.y+r.height?!0:a>=r.x&&a<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},this.cache={},this.sendLoaded=(0,sz.default)(()=>{this.imageLoaded(this.loadedLocations),this.loadedLocations=[]},20),this.clearOutOfWindow=()=>{let t=Object.keys(this.cache);for(let a of t){let e=this.cache[a],r=!1;for(let n=0;n{o||(o=!0,L8.length<12?L8.unshift(l):i||(l.src=""))}},c=new Promise(v=>l.addEventListener("load",()=>v(null)));requestAnimationFrame(async()=>{try{l.src=t,await c,await l.decode();let v=this.cache[r];if(v!==void 0&&!o){v.img=l;for(let g of v.cells)this.loadedLocations.push(Vk(g));i=!0,this.sendLoaded()}}catch{h.cancel()}}),this.cache[r]=h}loadOrGetImage(t,a,e){let r=t,n=this.cache[r];if(n!==void 0){let i=Ep(a,e);return n.cells.includes(i)||n.cells.push(i),n.img}else this.loadImage(t,a,e,r)}},yk=Rk;function W0(t,a,e,r,n=!1){let i=Zt.useRef();i.current=a,Zt.useEffect(()=>{if(e===null||e.addEventListener===void 0)return;let l=e,o=h=>{var c;(c=i.current)==null||c.call(l,h)};return l.addEventListener(t,o,{passive:r,capture:n}),()=>{l.removeEventListener(t,o,{capture:n})}},[t,e,r,n])}function jn(t,a){return t===void 0?void 0:a}var Ck=Math.PI;function _p(t){return t*Ck/180}var zz=(t,a,e)=>({x1:t-e/2,y1:a-e/2,x2:t+e/2,y2:a+e/2}),mz=(t,a,e,r,n)=>{switch(t){case"left":return Math.floor(a)+r+n/2;case"center":return Math.floor(a+e/2);case"right":return Math.floor(a+e)-r-n/2}},Mz=(t,a,e)=>Math.min(t,a-e*2),Hz=(t,a,e)=>e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2,D8=t=>{var a;let e=(a=t.fgColor)!=null?a:"currentColor";return Zt.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zt.createElement("path",{d:"M12.7073 7.05029C7.87391 11.8837 10.4544 9.30322 6.03024 13.7273C5.77392 13.9836 5.58981 14.3071 5.50189 14.6587L4.52521 18.5655C4.38789 19.1148 4.88543 19.6123 5.43472 19.475L9.34146 18.4983C9.69313 18.4104 10.0143 18.2286 10.2706 17.9722L16.9499 11.2929",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}),Zt.createElement("path",{d:"M20.4854 4.92901L19.0712 3.5148C18.2901 2.73375 17.0238 2.73375 16.2428 3.5148L14.475 5.28257C15.5326 7.71912 16.4736 8.6278 18.7176 9.52521L20.4854 7.75744C21.2665 6.97639 21.2665 5.71006 20.4854 4.92901Z",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",vectorEffect:"non-scaling-stroke"}))},Bk=t=>{var a;let e=(a=t.fgColor)!=null?a:"currentColor";return Zt.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Zt.createElement("path",{d:"M19 6L10.3802 17L5.34071 11.8758",vectorEffect:"non-scaling-stroke",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};function Sk(t,a,e){let[r,n]=Zt.useState(t),i=Zt.useRef(!0);Zt.useEffect(()=>()=>{i.current=!1},[]);let l=Zt.useRef((0,pz.default)(o=>{i.current&&n(o)},e));return Zt.useLayoutEffect(()=>{i.current&&l.current(()=>t())},a),r}var xz="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",wz="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",Ak=new RegExp("^[^"+wz+"]*["+xz+"]"),Fk=new RegExp("^[^"+xz+"]*["+wz+"]");function N8(t){return Ak.test(t)?"rtl":Fk.test(t)?"ltr":"neutral"}var S5=void 0;function kk(){if(S5!==void 0)return S5;let t=document.createElement("p");t.style.width="100%",t.style.height="200px";let a=document.createElement("div");a.id="testScrollbar",a.style.position="absolute",a.style.top="0px",a.style.left="0px",a.style.visibility="hidden",a.style.width="200px",a.style.height="150px",a.style.overflow="hidden",a.append(t),document.body.append(a);let e=t.offsetWidth;a.style.overflow="scroll";let r=t.offsetWidth;return e===r&&(r=a.clientWidth),a.remove(),S5=e-r,S5}var r4=Symbol();function bk(t){let a=Zt.useRef([r4,t]);a.current[1]!==t&&(a.current[0]=t),a.current[1]=t;let[e,r]=Zt.useState(t),[,n]=Zt.useState(),i=Zt.useCallback(o=>{let h=a.current[0];h!==r4&&(o=typeof o=="function"?o(h):o,o===h)||(h!==r4&&n({}),r(c=>typeof o=="function"?o(h===r4?c:h):o),a.current[0]=r4)},[]),l=Zt.useCallback(()=>{a.current[0]=r4,n({})},[]);return[a.current[0]===r4?e:a.current[0],i,l]}function Ek(t,a){return Lz.default.useMemo(()=>t.map((e,r)=>({...e,sourceIndex:r,sticky:r=a.span[0]&&r<=a.span[1]}function Tp(t,a,e){let r=e.x,n=e.x+e.width-1,i=e.y,l=e.y+e.height-1,[o,h]=t;if(hl)return!1;if(a.span===void 0)return o>=r&&o<=n;let[c,v]=a.span;return c>=r&&c<=n||v>=r&&c<=n||cn}function Tk(t,a,e){let r=0;if(e.current===void 0)return r;Tp(t,a,e.current.range)&&r++;for(let n of e.current.rangeStack)Tp(t,a,n)&&r++;return r}function Vz(t,a){let e=t;if(a!==void 0){let r=[...t],n=e[a.src];a.src>a.dest?(r.splice(a.src,1),r.splice(a.dest,0,n)):(r.splice(a.dest+1,0,n),r.splice(a.src,1)),r=r.map((i,l)=>({...i,sticky:t[l].sticky})),e=r}return e}function ur(t,a){let e=0,r=Vz(t,a);for(let n=0;n0)for(let c of l)e-=c.width;let o=a,h=n??0;for(;h<=e&&oa-g)return i-1;let d=i-(c?1:0),u=t-(h??0);if(typeof l=="number"){let p=Math.floor((u-v)/l)+o;return p>=d?void 0:p}else{let p=v;for(let z=o;z"u";async function Dk(){var t;Ok||((t=document?.fonts)==null?void 0:t.ready)===void 0||(await document.fonts.ready,k5=0,b5={},as())}Dk();function Nk(t,a,e,r){return`${t}_${r??a.font}_${e}`}function $8(t,a,e){let r=Nk(t,a,"middle",e),n=b5[r];return n===void 0&&(n=a.measureText(t),b5[r]=n,k5++),k5>1e4&&(b5={},k5=0),n}function $a(t,a){return typeof a!="string"&&(a=`${a.baseFontStyle} ${a.fontFamily}`),$k(t,a)}function Pp(t,a){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ";t.save(),t.textBaseline=a;let r=t.measureText(e);return t.restore(),r}var Ip=[];function $k(t,a){for(let i of Ip)if(i.key===a)return i.val;let e=Pp(t,"alphabetic"),n=-(Pp(t,"middle").actualBoundingBoxDescent-e.actualBoundingBoxDescent)+e.actualBoundingBoxAscent/2;return Ip.push({key:a,val:n}),n}function Uk(t,a,e,r,n){let{ctx:i,rect:l,theme:o}=t,h=Number.MAX_SAFE_INTEGER,c=500;if(a!==void 0&&(h=e-a,hp&&(a=a.slice(0,p))}let d=$a(i,o),u=N8(a)==="rtl";if(e===void 0&&u&&(e="right"),u&&(i.direction="rtl"),a.length>0){let p=!1;if(e==="right"?(i.textAlign="right",p=!0):e!==void 0&&e!=="left"&&(i.textAlign=e,p=!0),!r)Op(i,a,h,c,v,g,d,o,e);else{let z=`${o.fontFamily} ${o.baseFontStyle}`,w=es(i,a,z,v-o.cellHorizontalPadding*2,n??!1),s=Rz(i,z),f=o.lineHeight*s,m=s+f*(w.length-1),H=m+o.cellVerticalPadding>g;H&&(i.save(),i.rect(h,c,v,g),i.clip());let x=c+g/2-m/2,y=Math.max(c+o.cellVerticalPadding,x);for(let R of w)if(Op(i,R,h,y,v,s,d,o,e),y+=f,y>c+g)break;H&&i.restore()}p&&(i.textAlign="start"),u&&(i.direction="inherit")}}function Wk(t,a,e){let{ctx:r,rect:n,hoverAmount:i,theme:l,spriteManager:o}=t,{x:h,y:c,width:v,height:g}=n;r.beginPath(),r.globalAlpha=i,r.rect(h,c,v,g),r.fillStyle=l.bgHeaderHovered,r.fill(),r.globalAlpha=1,r.beginPath();let d=a!=="",u=0;if(e!==void 0){let z=g-8,w=h+8/2,s=c+8/2;o.drawSprite(e,"normal",r,w,s,z,l,d?1:i),u=z}else{u=24;let p=12,z=d?p:i*p,w=d?0:(1-i)*p*.5,s=l.cellHorizontalPadding+4;z>0&&(r.moveTo(h+s+w,c+g/2),r.lineTo(h+s+w+z,c+g/2),r.moveTo(h+s+w+z*.5,c+g/2-z*.5),r.lineTo(h+s+w+z*.5,c+g/2+z*.5),r.lineWidth=2,r.strokeStyle=l.bgIconHeader,r.lineCap="round",r.stroke())}r.fillStyle=l.textMedium,r.fillText(a,u+h+l.cellHorizontalPadding+.5,c+g/2+$a(r,l)),r.beginPath()}function U8(t,a,e,r,n,i,l,o,h=-20,c=-20,v=32,g="center"){let d=Math.floor(n+l/2),u=4,p=Mz(v,l,a.cellVerticalPadding),z=p/2,w=mz(g,r,i,a.cellHorizontalPadding,p),s=zz(w,d,p),f=Hz(r+h,n+c,s);switch(e){case!0:{t.beginPath(),Re(t,w-p/2,d-p/2,p,p,u),t.fillStyle=o?a.accentColor:a.textMedium,t.fill(),t.beginPath(),t.moveTo(w-z+p/4.23,d-z+p/1.97),t.lineTo(w-z+p/2.42,d-z+p/1.44),t.lineTo(w-z+p/1.29,d-z+p/3.25),t.strokeStyle=a.bgCell,t.lineJoin="round",t.lineCap="round",t.lineWidth=1.9,t.stroke();break}case Qn:case!1:{t.beginPath(),Re(t,w-p/2+.5,d-p/2+.5,p-1,p-1,u),t.lineWidth=1,t.strokeStyle=f?a.textDark:a.textMedium,t.stroke();break}case I8:{t.beginPath(),Re(t,w-p/2,d-p/2,p,p,u),t.fillStyle=f?a.textMedium:a.textLight,t.fill(),t.beginPath(),t.moveTo(w-p/3,d),t.lineTo(w+p/3,d),t.strokeStyle=a.bgCell,t.lineCap="round",t.lineWidth=1.9,t.stroke();break}default:sr(e)}}function jk(t,a){let{ctx:e,theme:r}=t,n=`9px ${r.fontFamily}`,i=a??{};return i?.font!==n&&(e.font=n,i.font=n),i.deprep=qk,e.textAlign="center",i}function qk(t){let{ctx:a}=t;a.textAlign="start"}function Gk(t,a,e,r,n){let{ctx:i,rect:l,hoverAmount:o,theme:h}=t,{x:c,y:v,width:g,height:d}=l,u=e?1:r==="checkbox-visible"?.6+.4*o:o;if(r!=="number"&&u>0){i.globalAlpha=u;let p=7*(e?o:1);if(U8(i,h,e,n?c+p:c,v,n?g-p:g,d,!0,void 0,void 0,18),n){i.globalAlpha=o,i.beginPath();for(let z of[3,6])for(let w of[-5,-1,3])i.rect(c+z,v+d/2+w,2,2);i.fillStyle=h.textLight,i.fill(),i.beginPath()}i.globalAlpha=1}if(r==="number"||r==="both"&&!e){let p=a.toString(),z=`${h.markerFontStyle} ${h.fontFamily}`,w=c+g/2;r==="both"&&o!==0&&(i.globalAlpha=1-o),i.fillStyle=h.textLight,i.font=z,i.fillText(p,w,v+d/2+$a(i,z)),o!==0&&(i.globalAlpha=1)}}function Kk(t){let{ctx:a,theme:e,rect:r}=t,{x:n,y:i,height:l}=r;a.beginPath();let o=2.5,h=n+e.cellHorizontalPadding+o,c=i+l/2,v=Math.cos(_p(30))*o,g=Math.sin(_p(30))*o;for(let d=0;d<12;d++)a.moveTo(h,c-o),a.lineTo(h,c+o),a.moveTo(h+v,c-g),a.lineTo(h-v,c+g),a.moveTo(h-v,c-g),a.lineTo(h+v,c+g),h+=8;a.lineWidth=1.1,a.lineCap="square",a.strokeStyle=e.textLight,a.stroke()}function Re(t,a,e,r,n,i){typeof i=="number"&&(i={tl:i,tr:i,br:i,bl:i}),i={tl:Math.min(i.tl,n/2,r/2),tr:Math.min(i.tr,n/2,r/2),bl:Math.min(i.bl,n/2,r/2),br:Math.min(i.br,n/2,r/2)},t.moveTo(a+i.tl,e),t.arcTo(a+r,e,a+r,e+i.tr,i.tr),t.arcTo(a+r,e+n,a+r-i.br,e+n,i.br),t.arcTo(a,e+n,a,e+n-i.bl,i.bl),t.arcTo(a,e,a+i.tl,e,i.tl)}function Xk(t,a,e,r){if(!e&&a===Qn)return;let{ctx:n,hoverAmount:i,theme:l,rect:o,highlighted:h,hoverX:c,hoverY:v,cell:{contentAlign:g}}=t,{x:d,y:u,width:p,height:z}=o,w=.35,s=e?1-w+w*i:.4;a===Qn&&(s*=i),s!==0&&(n.globalAlpha=s,U8(n,l,a,d,u,p,z,h,c,v,r,g),n.globalAlpha=1)}var Yn=4;function Yk(t,a){let{rect:e,theme:r,ctx:n,highlighted:i}=t,{x:l,y:o,width:h,height:c}=e,v=20,g=8,d=Yn,u=l+r.cellHorizontalPadding,p=[];for(let z of a){if(u>l+h)break;let w=$8(z,n,`${r.baseFontStyle} ${r.fontFamily}`).width;p.push({x:u,width:w}),u+=w+g*2+d}n.beginPath();for(let z of p)Re(n,z.x,o+(c-v)/2,z.width+g*2,v,v/2);n.fillStyle=i?r.bgBubbleSelected:r.bgBubble,n.fill();for(let[z,w]of p.entries())n.beginPath(),n.fillStyle=r.textBubble,n.fillText(a[z],w.x+g,o+c/2+$a(n,r))}var V8={};function Qk(t,a,e){let r=Math.ceil(window.devicePixelRatio),n=5,i=e-n*2,l=4,o=6,h=e*r,c=o+n,v=o*3,g=(v+n*2)*r,d=`${t},${a},${r},${e}`;if(V8[d]!==void 0)return{el:V8[d],height:h,width:g,middleWidth:l*r,sideWidth:c*r,padding:n*r,dpr:r};let u=document.createElement("canvas"),p=u.getContext("2d");if(p===null)return null;u.width=g,u.height=h,p.scale(r,r),V8[d]=u;let z=Math.min(o,v/2,i/2);return p.beginPath(),Re(p,n,n,v,i,z),p.shadowColor="rgba(24, 25, 34, 0.4)",p.shadowBlur=1,p.fillStyle=t,p.fill(),p.shadowColor="rgba(24, 25, 34, 0.3)",p.shadowOffsetY=1,p.shadowBlur=5,p.fillStyle=t,p.fill(),p.shadowOffsetY=0,p.shadowBlur=0,p.shadowBlur=0,p.beginPath(),Re(p,n+.5,n+.5,v,i,z),p.strokeStyle=a,p.lineWidth=1,p.stroke(),{el:u,height:h,width:g,sideWidth:c*r,middleWidth:o*r,padding:n*r,dpr:r}}function Zk(t,a){let{rect:e,theme:r,ctx:n,imageLoader:i,col:l,row:o}=t,{x:h,width:c}=e,v=`${r.baseFontStyle} ${r.fontFamily}`,g=Rz(n,v),d=Math.min(e.height,Math.max(16,Math.ceil(g*r.lineHeight)*2)),u=Math.floor(e.y+(e.height-d)/2),p=d-10,z=8,w=Yn,s=h+r.cellHorizontalPadding,f=Qk(r.bgCell,r.drilldownBorder,d),m=[];for(let H of a){if(s>h+c)break;let y=$8(H.text,n,v).width,R=0;H.img!==void 0&&i.loadOrGetImage(H.img,l,o)!==void 0&&(R=p-8+4);let L=y+R+z*2;m.push({x:s,width:L}),s+=L+w}if(f!==null){let{el:H,height:x,middleWidth:y,sideWidth:R,width:L,dpr:V,padding:C}=f,k=R/V,b=C/V;for(let F of m){let _=Math.floor(F.x),j=Math.floor(F.width),i1=j-(k-b)*2;n.imageSmoothingEnabled=!1,n.drawImage(H,0,0,R,x,_-b,u,k,d),i1>0&&n.drawImage(H,R,0,y,x,_+(k-b),u,i1,d),n.drawImage(H,L-R,0,R,x,_+j-(k-b),u,k,d),n.imageSmoothingEnabled=!0}}n.beginPath();for(let[H,x]of m.entries()){let y=a[H],R=x.x+z;if(y.img!==void 0){let L=i.loadOrGetImage(y.img,l,o);if(L!==void 0){let V=p-8,C=0,k=0,b=L.width,F=L.height;b>F?(C+=(b-F)/2,b=F):F>b&&(k+=(F-b)/2,F=b),n.beginPath(),Re(n,R,u+d/2-V/2,V,V,3),n.save(),n.clip(),n.drawImage(L,C,k,b,F,R,u+d/2-V/2,V,V),n.restore(),R+=V+4}}n.beginPath(),n.fillStyle=r.textBubble,n.fillText(y.text,R,u+d/2+$a(n,r))}}function Jk(t,a,e=4,r){let{rect:n,col:i,row:l,theme:o,ctx:h,imageLoader:c}=t,{x:v,y:g,height:d,width:u}=n,p=d-o.cellVerticalPadding*2,z=[],w=0;for(let f=0;f0&&(Re(h,s,g+o.cellVerticalPadding,m,p,e),h.save(),h.clip()),h.drawImage(f,s,g+o.cellVerticalPadding,m,p),e>0&&h.restore(),s+=m+Yn}}function tb(t,a,e){let r=function(o,h){let c=h.x-o.x,v=h.y-o.y,g=Math.sqrt(c*c+v*v),d=c/g,u=v/g;return{x:c,y:h.y-o.y,len:g,nx:d,ny:u,ang:Math.atan2(u,d)}},n,i=a.length,l=a[i-1];for(let o=0;o1?1:d),z=1,w=!1;u<0?p<0?p=Math.PI+p:(p=Math.PI-p,z=-1,w=!0):p>0&&(z=-1,w=!0),n=h.radius!==void 0?h.radius:e;let s=p/2,f=Math.abs(Math.cos(s)*n/Math.sin(s)),m;f>Math.min(v.len/2,g.len/2)?(f=Math.min(v.len/2,g.len/2),m=Math.abs(f*Math.sin(s)/Math.cos(s))):m=n;let H=h.x+g.nx*f,x=h.y+g.ny*f;H+=-g.ny*m*z,x+=g.nx*m*z,t.arc(H,x,m,v.ang+Math.PI/2*z,g.ang-Math.PI/2*z,w),l=h,h=c}t.closePath()}function Kn(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p){let z={x:0,y:i+c,width:0,height:0},w=i-n;if(t>=g){let s=l>t?-1:1,f=ur(u);z.x+=f+h;for(let m=l;m!==t;m+=s)z.x+=u[s===1?m:m-1].width*s}else for(let s=0;s0&&Zn(u[s-1].group,f)&&u[s-1].sticky===m;){let x=u[s-1];z.x-=x.width,z.width+=x.width,s--}let H=t;for(;H+1e&&(z.width=e-z.x)}}else if(d&&a===v-1){let s=typeof p=="number"?p:p(a);z.y=r-s,z.height=s}else{let s=o>a?-1:1;if(typeof p=="number"){let f=a-o;z.y+=f*p}else for(let f=o;f!==a;f+=s)z.y+=p(f)*s;z.height=(typeof p=="number"?p:p(a))+1}return z}var Ot='',ab=t=>{let a=t.fgColor,e=t.bgColor;return` ${Ot}`},eb=t=>{let a=t.fgColor,e=t.bgColor;return` ${Ot}`},rb=t=>{let a=t.fgColor,e=t.bgColor;return`${Ot} @@ -173,19 +173,19 @@ Please report this to https://github.com/markedjs/marked.`,a.silent)return"

An -`},Sb={headerRowID:ab,headerNumber:rb,headerCode:eb,headerString:nb,headerBoolean:ib,headerAudioUri:ob,headerVideoUri:hb,headerEmoji:cb,headerImage:vb,headerUri:yz,headerPhone:gb,headerMarkdown:db,headerDate:sb,headerTime:ub,headerEmail:fb,headerReference:pb,headerIfThenElse:zb,headerSingleValue:mb,headerLookup:Mb,headerTextTemplate:Hb,headerMath:xb,headerRollup:wb,headerJoinStrings:Lb,headerSplitString:Vb,headerGeoDistance:Rb,headerArray:yb,rowOwnerOverlay:Cb,protectedColumnOverlay:Bb,renameIcon:lb};function Ab(t,a){return t==="normal"?[a.bgIconHeader,a.fgIconHeader]:t==="selected"?["white",a.accentColor]:[a.accentColor,a.bgHeader]}var Fb=class{constructor(t,a){this.onSettled=a,this.spriteMap=new Map,this.inFlight=0,this.headerIcons={...Sb,...t}}drawSprite(t,a,e,r,n,i,l,o=1){let[h,c]=Ab(a,l),v=i*Math.ceil(window.devicePixelRatio),g=`${h}_${c}_${v}_${t}`,d=this.spriteMap.get(g);if(d===void 0){let u=this.headerIcons[t];if(u===void 0)return;d=document.createElement("canvas");let p=d.getContext("2d");if(p===null)return;let z=new Image;z.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(u({fgColor:c,bgColor:h}))}`,this.spriteMap.set(g,d);let w=z.decode();if(w===void 0)return;this.inFlight++,w.then(()=>{p.drawImage(z,0,0,v,v)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else o<1&&(e.globalAlpha=o),e.drawImage(d,0,0,v,v,r,n,i,i),o<1&&(e.globalAlpha=1)}},R8={},Me=null;function kb(){let t=document.createElement("div");return t.style.opacity="0",t.style.pointerEvents="none",t.style.position="fixed",document.body.append(t),t}function k8(t){let a=t.toLowerCase().trim();if(R8[a]!==void 0)return R8[a];Me=Me||kb(),Me.style.color="#000",Me.style.color=a;let e=getComputedStyle(Me).color;Me.style.color="#fff",Me.style.color=a;let r=getComputedStyle(Me).color;if(r!==e)return[0,0,0,1];let n=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return n.length<4&&n.push(1),n=n.map(i=>{let l=Number.isNaN(i);return l&&console.warn("Could not parse color",t),l?0:i}),R8[a]=n,n}function fr(t,a){let[e,r,n]=k8(t);return`rgba(${e}, ${r}, ${n}, ${a})`}function Le(t,a){if(a===void 0)return t;let[e,r,n,i]=k8(t);if(i===1)return t;let[l,o,h,c]=k8(a),v=i+c*(1-i),g=(i*e+c*l*(1-i))/v,d=(i*r+c*o*(1-i))/v,u=(i*n+c*h*(1-i))/v;return`rgba(${g}, ${d}, ${u}, ${v})`}var bb={kind:l1.Loading,allowOverlay:!1};function Sz(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s,f,m){let H,x;p!==void 0&&p[0][0]===r&&p[0][1]===a&&(H=p[1][0],x=p[1][1]);let y,R={ctx:t,theme:c,col:r,row:a,cell:e,rect:{x:n,y:i,width:l,height:o},highlighted:h,hoverAmount:u,hoverX:H,hoverY:x,imageLoader:g,spriteManager:d,hyperWrapping:z,requestAnimationFrame:()=>{L=!0}},L=!1;return(Uk(R,e.lastUpdated,w,s,()=>{var C,k;if(!(we(e)?!1:v?.(R)===!0)){let F=m(e);if(F!==void 0){s?.renderer!==F&&((C=s?.deprep)==null||C.call(s,R),s=void 0);let _=(k=F.drawPrep)==null?void 0:k.call(F,R,s);F.draw(R,e),y={deprep:_?.deprep,fillStyle:_?.fillStyle,font:_?.font,renderer:F}}}})||L)&&f?.([r,a]),y}function Eb(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w){let s=[],f=!1;t.imageSmoothingEnabled=!1;let m=Math.min(e.cellYOffset,n),H=Math.max(e.cellYOffset,n),x=0;if(typeof z=="number")x+=(H-m)*z;else for(let F=m;Fe.cellYOffset&&(x=-x),x+=l-e.translateY;let y=Math.min(e.cellXOffset,r),R=Math.max(e.cellXOffset,r),L=0;for(let F=y;Fe.cellXOffset&&(L=-L),L+=i-e.translateX;let V=ur(p);if(V>0&&V++,L!==0&&x!==0)return{regions:[],yOnly:!1};let C=o?typeof z=="number"?z:z(v-1):0,k=h-V-Math.abs(L),b=c-g-C-Math.abs(x)-1;if(k>150&&b>150){f=L===0;let F={sx:0,sy:0,sw:h*d,sh:c*d,dx:0,dy:0,dw:h*d,dh:c*d};x>0?(F.sy=(g+1)*d,F.sh=b*d,F.dy=(x+g+1)*d,F.dh=b*d,s.push({x:0,y:g,width:h,height:x+1})):x<0&&(F.sy=(-x+g+1)*d,F.sh=b*d,F.dy=(g+1)*d,F.dh=b*d,s.push({x:0,y:c+x-C,width:h,height:-x+C})),L>0?(F.sx=V*d,F.sw=k*d,F.dx=(L+V)*d,F.dw=k*d,s.push({x:V-1,y:0,width:L+2,height:c})):L<0&&(F.sx=(V-L)*d,F.sw=k*d,F.dx=V*d,F.dw=k*d,s.push({x:h+L,y:0,width:-L,height:c})),t.setTransform(1,0,0,1,0,0),V>0&&L!==0&&x===0&&w&&t.drawImage(a,0,0,V*d,c*d,0,0,V*d,c*d),t.drawImage(a,F.sx,F.sy,F.sw,F.sh,F.dx,F.dy,F.dw,F.dh),t.scale(d,d)}return t.imageSmoothingEnabled=!0,{regions:s,yOnly:f}}function _b(t,a,e,r,n,i,l,o,h,c){let v=[];return a!==t.cellXOffset||e!==t.cellYOffset||r!==t.translateX||n!==t.translateY||h4(h,e,r,n,o,(g,d,u,p)=>{if(g.sourceIndex===c){let z=Math.max(d,p)+1;return v.push({x:z,y:0,width:i-z,height:l}),!0}}),v}function Dp(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s=!1){var f,m,H;if(h!==void 0){t.beginPath(),t.save(),t.rect(0,0,i,l);for(let Z of h)t.rect(Z.x+1,Z.y+1,Z.width-1,Z.height-1);t.clip("evenodd")}let x=(f=w.horizontalBorderColor)!=null?f:w.borderColor,y=w.borderColor,R=0,L=i,V=0,C=l;if(o!==void 0&&o.length>0){R=Number.MAX_SAFE_INTEGER,V=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,C=Number.MIN_SAFE_INTEGER;for(let Z of o)R=Math.min(R,Z.x-1),L=Math.max(L,Z.x+Z.width+1),V=Math.min(V,Z.y-1),C=Math.max(C,Z.y+Z.height+1)}let k=[];t.beginPath();let b=.5;for(let Z=0;Z=R&&O<=L&&u(Z+1)&&k.push({x1:O,y1:Math.max(c,V),x2:O,y2:Math.min(l,C),color:y})}let F=g(z-1),_=l-F+.5,j=p==="sticky";if(j&&k.push({x1:R,y1:_,x2:L,y2:_,color:x}),s!==!0){let Z=v+.5,d1=e,O=j?l-F:l;for(;Z+n<=O;){let a1=Z+n;if(a1>=V&&a1<=C-1&&(!j||d1!==z-1||Math.abs(a1-_)>1)){let W=d?.(d1);k.push({x1:R,y1:a1,x2:L,y2:a1,color:(H=(m=W?.horizontalBorderColor)!=null?m:W?.borderColor)!=null?H:x})}Z+=g(d1),d1++}}let n1=(0,Bz.default)(k,Z=>Z.color);for(let Z of Object.keys(n1)){t.strokeStyle=Z;for(let d1 of n1[Z])t.moveTo(d1.x1,d1.y1),t.lineTo(d1.x2,d1.y2);t.stroke(),t.beginPath()}h!==void 0&&t.restore()}function Az(t,a){let e=[],r=t.x+t.width-26*a.length,n=t.y+t.height/2-13,i=26,l=26;for(let o=0;o=t.x&&a<=t.x+t.width&&e>=t.y&&e<=t.y+t.height}function Tb(t,a,e,r,n,i,l,o,h,c,v,g){var d;let[p,z]=(d=i?.[0])!=null?d:[],w=0;_z(a,e,r,n,(s,f,m,H,x,y)=>{var R,L;if(g!==void 0&&!g.some(F=>F[1]===-2&&F[0]>=s[0]&&F[0]<=s[1]))return;t.save(),t.beginPath(),t.rect(m,H,x,y),t.clip();let V=v(f),C=V?.overrideTheme===void 0?l:{...l,...V.overrideTheme},k=z===-2&&p!==void 0&&p>=s[0]&&p<=s[1],b=k?C.bgHeaderHovered:C.bgHeader;if(b!==l.bgHeader&&(t.fillStyle=b,t.fill()),t.fillStyle=(R=C.textGroupHeader)!=null?R:C.textHeader,V!==void 0){let F=m;if(V.icon!==void 0&&(o.drawSprite(V.icon,"normal",t,F+8,(n-20)/2,20,C),F+=26),t.fillText(V.name,F+8,n/2+Na(t,`${l.headerFontStyle} ${l.fontFamily}`)),V.actions!==void 0&&k){let _=Az({x:m,y:H,width:x,height:y},V.actions);t.beginPath();let j=_[0].x-10,n1=m+x-j;t.rect(j,0,n1,n);let Z=t.createLinearGradient(j,0,j+n1,0),d1=fr(b,0);Z.addColorStop(0,d1),Z.addColorStop(10/n1,b),Z.addColorStop(1,b),t.fillStyle=Z,t.fill(),t.globalAlpha=.6;let[O,a1]=(L=i?.[1])!=null?L:[-1,-1];for(let W=0;W35){let R=z?35:r-35,L=z?35*.7:r-35*.7,V=R/r,C=L/r,k=t.createLinearGradient(a,0,a+r,0),b=fr(f,0);k.addColorStop(z?1:0,f),k.addColorStop(V,f),k.addColorStop(C,b),k.addColorStop(z?0:1,b),t.fillStyle=k}else t.fillStyle=f;if(z&&(t.textAlign="right"),t.fillText(i.title,x,e+n/2+Na(t,`${o.headerFontStyle} ${o.fontFamily}`)),z&&(t.textAlign="left"),m&&i.hasMenu===!0){t.beginPath();let y=w.x+w.width/2-5.5,R=w.y+w.height/2-3;tb(t,[{x:y,y:R},{x:y+11,y:R},{x:y+5.5,y:R+6}],1),t.fillStyle=f,t.fill()}}function Pb(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s,f){var m;let H=l+o;if(H<=0)return;t.fillStyle=g.bgHeader,t.fillRect(0,0,n,H);let[x,y]=(m=r?.[0])!=null?m:[],R=`${g.headerFontStyle} ${g.fontFamily}`;t.font=R,h4(a,0,i,0,H,(L,V,C,k)=>{var b,F,_;if(w!==void 0&&!w.some(K1=>K1[1]===-1&&K1[0]===L.sourceIndex))return;let j=Math.max(0,k-V);t.save(),t.beginPath(),t.rect(V+j,o,L.width-j,l),t.clip();let n1=z((b=L.group)!=null?b:"").overrideTheme,Z=L.themeOverride===void 0&&n1===void 0?g:{...g,...n1,...L.themeOverride};Z.bgHeader!==g.bgHeader&&(t.fillStyle=Z.bgHeader,t.fill());let d1=`${Z.headerFontStyle} ${Z.fontFamily}`;R!==d1&&(t.font=d1);let O=v.columns.hasIndex(L.sourceIndex),a1=h!==void 0||c,W=!a1&&y===-1&&x===L.sourceIndex,L1=a1?0:(_=(F=u.find(K1=>K1.item[0]===L.sourceIndex&&K1.item[1]===-1))==null?void 0:F.hoverAmount)!=null?_:0,p1=v?.current!==void 0&&v.current.cell[0]===L.sourceIndex,o1=O?Z.accentColor:p1?Z.bgHeaderHasFocus:Z.bgHeader,H1=e?o:0,P1=L.sourceIndex===0?0:1;O?(t.fillStyle=o1,t.fillRect(V+P1,H1,L.width-P1,l)):(p1||L1>0)&&(t.beginPath(),t.rect(V+P1,H1,L.width-P1,l),p1&&(t.fillStyle=Z.bgHeaderHasFocus,t.fill()),L1>0&&(t.globalAlpha=L1,t.fillStyle=Z.bgHeaderHovered,t.fill(),t.globalAlpha=1)),bz(t,V,H1,L.width,l,L,O,Z,W,p1,L1,d,s,f),t.restore()}),e&&Tb(t,a,n,i,o,r,g,d,u,p,z,w)}function Re(t,a,e,r,n,i,l,o){return t<=n+l&&n<=t+e&&a<=i+o&&i<=a+r}function Np(t,a,e,r,n,i,l,o,h,c,v,g,d,u){if(d===void 0||d.length===0)return;let p=g==="sticky"?v(c-1):0;t.beginPath(),_z(a,e,l,n,(z,w,s,f,m,H)=>{for(let x=0;x=z[0]&&y[0]<=z[1]){t.rect(s,f,m,H);break}}}),h4(a,h,l,o,i,(z,w,s,f,m)=>{let H=Math.max(0,f-w),x=w+H+1,y=z.width-H-1;for(let R=0;R{let k=!1;for(let b=0;b0&&t.rect(x,b,y,_)}})}),t.clip()}function Ez(t,a,e,r,n,i,l){var o,h;let[c,v]=t,g,d,u=(h=(o=l.find(p=>!p.sticky))==null?void 0:o.sourceIndex)!=null?h:0;if(v>u){let p=Math.max(c,u),z=a,w=r;for(let s=i.sourceIndex-1;s>=p;s--)z-=l[s].width,w+=l[s].width;for(let s=i.sourceIndex+1;s<=v;s++)w+=l[s].width;d={x:z,y:e,width:w,height:n}}if(u>c){let p=Math.min(v,u-1),z=a,w=r;for(let s=i.sourceIndex-1;s>=c;s--)z-=l[s].width,w+=l[s].width;for(let s=i.sourceIndex+1;s<=p;s++)w+=l[s].width;g={x:z,y:e,width:w,height:n}}return[g,d]}function $p(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s,f,m,H,x,y,R,L,V,C,k,b,F,_){var j;let n1=(j=f?.length)!=null?j:Number.MAX_SAFE_INTEGER,Z=performance.now(),d1=`${b.baseFontStyle} ${b.fontFamily}`;t.font=d1;let O,a1=new Set;return h4(a,o,i,l,n,(W,L1,p1,o1,H1)=>{var P1;let K1=Math.max(0,o1-L1),W1=L1+K1,Bt=n+1,T1=W.width-K1,X1=r-n-1;if(s.length>0){let v1=!1;for(let D=0;D{t.save(),t.beginPath(),t.rect(W1,Bt,T1,X1),t.clip()},N=m.columns.hasIndex(W.sourceIndex),s1=g((P1=W.group)!=null?P1:"").overrideTheme,x1=W.themeOverride===void 0&&s1===void 0?b:{...b,...s1,...W.themeOverride},f1=`${x1.baseFontStyle} ${x1.fontFamily}`;f1!==d1&&(d1=f1,t.font=f1),Y();let U;return ai(H1,p1,r,h,c,w,(v1,D,I,C1,D1)=>{var et,B1,c1,e1;if(D<0)return;if(f!==void 0){let dt=!1;for(let At=0;At0){let dt=!1;for(let At=0;AtI1.span!==void 0&&dt>=I1.span[0]&&dt<=I1.span[1]);Mt&&!p&&z?C0=0:Mt&&(C0=Math.max(C0,1)),Z0&&C0++,Mt||(u1&&C0++,N&&!C1&&C0++);let B0=I1.kind===l1.Protected?J1.bgCellMedium:J1.bgCell,t0;if((C1||B0!==b.bgCell)&&(t0=Le(B0,t0)),C0>0||M1){M1&&(t0=Le(J1.bgHeader,t0));for(let dt=0;dtdt[0]===W.sourceIndex&&dt[1]===D)===!0&&(t0=Le(J1.bgSearchResult,t0));if(x!==void 0)for(let dt of x){let At=dt.range;At.x<=W.sourceIndex&&W.sourceIndexdt.item[0]===W.sourceIndex&&dt.item[1]===D);if(St>10&&!Ut){let dt=`${J1.baseFontStyle} ${J1.fontFamily}`;dt!==d1&&(t.font=dt,d1=dt),U=Sz(t,D,I1,W.sourceIndex,Q1,v1,St,I,C0>0,J1,y,R,L,(c1=Ma?.hoverAmount)!=null?c1:0,C,k,Z,U,F,_)}return I1.style==="faded"&&(t.globalAlpha=1),n1--,jt&&(t.restore(),(e1=U?.deprep)==null||e1.call(U,{ctx:t}),U=void 0,Y(),d1=f1,t.font=f1),n1<=0}),t.restore(),n1<=0}),O}function Ib(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s){w!==void 0||a[a.length-1]!==e[a.length-1]||h4(a,h,l,o,i,(f,m,H,x,y)=>{if(f!==a[a.length-1])return;m+=f.width;let R=Math.max(m,x);R>r||(t.save(),t.beginPath(),t.rect(R,i+1,1e4,n-i-1),t.clip(),ai(y,H,n,c,v,p,(L,V,C,k)=>{if(!k&&z.length>0&&!z.some(n1=>Re(m,L,1e4,C,n1.x,n1.y,n1.width,n1.height)))return;let b=d.hasIndex(V),F=u.hasIndex(V);t.beginPath();let _=g?.(V),j=_===void 0?s:{...s,..._};j.bgCell!==s.bgCell&&(t.fillStyle=j.bgCell,t.fillRect(m,L,1e4,C)),F&&(t.fillStyle=j.bgHeader,t.fillRect(m,L,1e4,C)),b&&(t.fillStyle=j.accentLight,t.fillRect(m,L,1e4,C))}),t.restore())})}function Ob(t,a,e,r,n,i,l,o,h){var c;let v=!1;for(let p of a)if(!p.sticky){v=l(p.sourceIndex);break}let g=(c=h.horizontalBorderColor)!=null?c:h.borderColor,d=h.borderColor,u=v?ur(a):0;if(u!==0&&(t.beginPath(),t.moveTo(u+.5,0),t.lineTo(u+.5,r),t.strokeStyle=Le(d,h.bgCell),t.stroke()),n){let p=o(i-1);t.beginPath(),t.moveTo(0,r-p+.5),t.lineTo(e,r-p+.5),t.strokeStyle=Le(g,h.bgCell),t.stroke()}}function Db(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p){let z=p?.filter(m=>m.style!=="no-outline");if(z===void 0||z.length===0)return;let w=z.map(m=>{var H,x,y,R,L;let V=m.range,C=Kn(V.x,V.y,a,e,v,c+v,r,n,i,l,u,h,d,o,g);if(V.width===1&&V.height===1)return V.x=h){let b=Kn(h-1,V.y+V.height-1,a,e,v,c+v,r,n,i,l,u,h,d,o,g),F=Kn(h,V.y+V.height-1,a,e,v,c+v,r,n,i,l,u,h,d,o,g);return[{color:m.color,style:(y=m.style)!=null?y:"dashed",rect:{x:C.x,y:C.y,width:b.x+b.width-C.x,height:b.y+b.height-C.y}},{color:m.color,style:(R=m.style)!=null?R:"dashed",rect:{x:F.x,y:F.y,width:k.x+k.width-F.x,height:k.y+k.height-F.y}}]}else return[void 0,{color:m.color,style:(L=m.style)!=null?L:"dashed",rect:{x:C.x,y:C.y,width:k.x+k.width-C.x,height:k.y+k.height-C.y}}]}),s=ur(o),f=()=>{t.beginPath(),t.save();let m=!1,H=y=>{m!==y&&(t.setLineDash(y?[5,3]:[]),m=y)};t.lineWidth=1;for(let y of w){let[R]=y;R!==void 0&&Re(0,0,a,e,R.rect.x,R.rect.y,R.rect.width,R.rect.height)&&(H(R.style==="dashed"),t.strokeStyle=fr(R.color,1),t.strokeRect(R.rect.x+1,R.rect.y+1,R.rect.width-2,R.rect.height-2))}let x=!1;for(let y of w){let[,R]=y;R!==void 0&&Re(0,0,a,e,R.rect.x,R.rect.y,R.rect.width,R.rect.height)&&(H(R.style==="dashed"),!x&&R.rect.x{var C;return V.sourceIndex===((C=v.current)==null?void 0:C.cell[0])}))return;let[s,f]=v.current.cell,m=d(v.current.cell),H=(w=m.span)!=null?w:[s,s],x=u==="sticky"&&f===z-1,y=u==="sticky"&&!x?g(z-1)-1:0,R;if(h4(l,r,n,i,c,(V,C,k,b,F)=>{if(!(V.sticky&&s>V.sourceIndex)&&!(V.sourceIndexH[1]))return ai(F,k,e,z,g,u,(_,j,n1)=>{if(j!==f)return;let Z=C,d1=V.width;if(m.span!==void 0){let O=Ez(m.span,C,_,V.width,n1,V,o),a1=V.sticky?O[0]:O[1];a1!==void 0&&(Z=a1.x,d1=a1.width)}return R=()=>{var O,a1,W,L1;b>Z&&!V.sticky&&(t.beginPath(),t.rect(b,0,a-b,e),t.clip()),t.beginPath(),t.rect(Z+.5,_+.5,d1,n1),t.strokeStyle=(a1=(O=V.themeOverride)==null?void 0:O.accentColor)!=null?a1:h.accentColor,t.lineWidth=1,t.stroke(),p&&(t.beginPath(),t.rect(Z+d1-4,_+n1-4,4,4),t.fillStyle=(L1=(W=V.themeOverride)==null?void 0:W.accentColor)!=null?L1:h.accentColor,t.fill())},!0}),!0}),R===void 0)return;let L=()=>{t.save(),t.beginPath(),t.rect(0,c,a,e-c-y),t.clip(),R?.(),t.restore()};return L(),L}function Nb(t,a,e,r,n,i,l,o,h){let c=0;return h4(t,i,r,n,e,(v,g,d,u,p)=>(ai(p,d,a,l,o,h,(z,w,s,f)=>{f||(c=Math.max(w,c))}),!0)),c}function $b(t,a){if(a===void 0||t.width!==a.width||t.height!==a.height||t.theme!==a.theme||t.headerHeight!==a.headerHeight||t.rowHeight!==a.rowHeight||t.rows!==a.rows||t.getRowThemeOverride!==a.getRowThemeOverride||t.isFocused!==a.isFocused||t.isResizing!==a.isResizing||t.verticalBorder!==a.verticalBorder||t.getCellContent!==a.getCellContent||t.highlightRegions!==a.highlightRegions||t.selection!==a.selection||t.dragAndDropState!==a.dragAndDropState||t.prelightCells!==a.prelightCells||t.touchMode!==a.touchMode||t.scrolling!==a.scrolling)return!1;if(t.mappedColumns!==a.mappedColumns){if(t.mappedColumns.length>100||t.mappedColumns.length!==a.mappedColumns.length)return!1;let e;for(let r=0;rx:x;D1.save(),D1.beginPath(),B1.save(),B1.beginPath(),D1.textBaseline="middle",B1.textBaseline="middle",x1!==1&&(D1.scale(x1,x1),B1.scale(x1,x1));let u1=A8(d,h,l,z,v),M1=[],I1=s&&((r=L.current)==null?void 0:r.cell[1])===c&&g===0,Q1=()=>{var ot,J1;Pb(D1,u1,u,o1,l,v,f,m,z,R,L,w,H1,L1,y,F,N,Z,K1),Dp(D1,u1,c,v,g,l,o,void 0,void 0,m,v1,e1,_,y,C,k,w,!0),D1.beginPath(),D1.moveTo(0,D-.5),D1.lineTo(l,D-.5),D1.strokeStyle=Le((J1=(ot=w.headerBottomBorderColor)!=null?ot:w.horizontalBorderColor)!=null?J1:w.borderColor,w.bgHeader),D1.stroke(),I1&&y8(D1,l,o,c,v,g,u1,d,w,v1,L,e1,b,C,V,k)};if(N!==void 0){let ot=!1;N=N.filter(J1=>(ot=ot||J1[1]<0,J1[1]<0||Re(h,c,u1.length,300,J1[0],J1[1],1,1)||Re(0,c,p,300,J1[0],J1[1],1,1)||C&&Re(h,k-1,u1.length,1,J1[0],J1[1],1,1))),N.length>0&&(Np(B1,u1,l,o,m,v1,v,g,c,k,e1,C,N,!0),B1.fillStyle=w.bgCell,B1.fillRect(0,v1+1,l,o-v1-1),$p(B1,u1,d,o,v1,v,g,c,k,e1,b,F,_,H,j,s,C,M1,N,L,d1,O,n1,a1,H1,L1,o1,p1,w,W1,Bt),V&&s&&L.current!==void 0&&N.some(J1=>{var Jt,Mt;return J1[0]===((Jt=L.current)==null?void 0:Jt.cell[0])&&J1[1]===((Mt=L.current)==null?void 0:Mt.cell[1])})&&y8(B1,l,o,c,v,g,u1,d,w,v1,L,e1,b,C,V,k)),ot&&(Np(D1,u1,l,v1,m,v1,v,g,c,k,e1,C,N,!1),Q1()),B1.restore(),D1.restore(),C1!==null&&(C1.fillStyle=w.bgCell,C1.fillRect(0,0,l,o),C1.drawImage(B1.canvas,0,0));return}if((f1!==!0||h!==I?.cellXOffset||v!==I?.translateX||I1!==I?.mustDrawFocusOnHeader)&&Q1(),f1===!0){i2(c1!==void 0&&I!==void 0);let{regions:ot}=Eb(B1,c1,I,h,c,v,g,C==="sticky",l,o,k,v1,x1,d,u1,x,s1);M1=ot}else f1!==!1&&(i2(I!==void 0),M1=_b(I,h,c,v,g,l,o,v1,u1,f1));Ob(B1,u1,l,o,C==="sticky",k,y,e1,w);let St=s?y8(B1,l,o,c,v,g,u1,d,w,v1,L,e1,b,C,V,k):void 0,jt=Db(B1,l,o,h,c,v,g,d,p,f,m,x,C==="sticky",k,O);if(B1.fillStyle=w.bgCell,M1.length>0){B1.beginPath();for(let ot of M1)B1.rect(ot.x,ot.y,ot.width,ot.height);B1.clip(),B1.fill(),B1.beginPath()}else B1.fillRect(0,0,l,o);let Ut=$p(B1,u1,d,o,v1,v,g,c,k,e1,b,F,_,H,j,s,C,M1,N,L,d1,O,n1,a1,H1,L1,o1,p1,w,W1,Bt);Ib(B1,u1,d,l,o,v1,v,g,c,k,e1,_,L.rows,H,C,M1,N,w),Dp(B1,u1,c,v,g,l,o,M1,Ut,m,v1,e1,_,y,C,k,w),St?.(),jt?.(),C1!==null&&(C1.fillStyle=w.bgCell,C1.fillRect(0,0,l,o),C1.drawImage(B1.canvas,0,0));let Et=Nb(u1,o,v1,v,g,c,k,e1,C);a1?.setWindow({x:h,y:c,width:u1.length,height:Et-c},p),W.current={cellXOffset:h,cellYOffset:c,translateX:v,translateY:g,mustDrawFocusOnHeader:I1,lastBuffer:s1?et===X1?"a":"b":void 0},B1.restore(),D1.restore()}function ai(t,a,e,r,n,i,l){let o=a,h=t,c=i==="sticky";for(;o=e;v&&(c=!1,h=r-1);let g=n(h);if(v&&(o=e-g),!(c&&h===r-1)&&l(o,h,g,v,i!=="none"&&h===r-1)===!0||v)break;o+=g,h++}}function h4(t,a,e,r,n,i){let l=0,o=0,h=n+r;for(let c of t){let v=c.sticky?o:l+e;if(i(c,v,h,o,a)===!0)break;l+=c.width,o+=c.sticky?c.width:0}}function _z(t,a,e,r,n){var i;let l=0,o=0;for(let h=0;ha?.[0]===e?.[0]&&a?.[1]===e?.[1],this.addToLeavingItems=a=>{this.leavingItems.some(r=>this.areSameItems(r.item,a.item))||this.leavingItems.push(a)},this.removeFromLeavingItems=a=>{var e;let r=this.leavingItems.find(n=>this.areSameItems(n.item,a));return this.leavingItems=this.leavingItems.filter(n=>n!==r),(e=r?.hoverAmount)!=null?e:0},this.cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter(a=>a.hoverAmount>0)},this.shouldStep=()=>{let a=this.leavingItems.length>0,e=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return a||e},this.getAnimatingItems=()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(a=>({...a,hoverAmount:Wb(a.hoverAmount)})),this.step=a=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=a;else{let r=(a-this.lastAnimationTime)/Ub;for(let i of this.leavingItems)i.hoverAmount=(0,b8.default)(i.hoverAmount-r,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=(0,b8.default)(this.currentHoveredItem.hoverAmount+r,0,1));let n=this.getAnimatingItems();this.callback(n),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=a,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0},this.setHovered=a=>{var e;if(!this.areSameItems((e=this.currentHoveredItem)==null?void 0:e.item,a)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),a!==void 0){let r=this.removeFromLeavingItems(a);this.currentHoveredItem={item:a,hoverAmount:r}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}}}},qb=class{constructor(t){this.fn=t}get value(){var t;return(t=this.val)!=null?t:this.val=this.fn()}};function W8(t){return new qb(t)}var Gb=W8(()=>window.navigator.userAgent.includes("Firefox")),Tz=W8(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),E5=W8(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function Kb(t,a){for(let e of t)if(e[0]===a[0]&&e[1]===a[1])return!0;return!1}function Xb(t){let a=l4.useRef([]),e=l4.useRef(0),r=l4.useRef(t);r.current=t;let n=l4.useCallback(()=>{let i=()=>window.requestAnimationFrame(l),l=()=>{let o=a.current;a.current=[],r.current(o),a.current.length>0?e.current++:e.current=0};window.requestAnimationFrame(e.current>600?i:l)},[]);return l4.useCallback(i=>{Kb(a.current,i)||(a.current.length===0&&n(),a.current.push(i))},[n])}var Yb=(t,a)=>{var e;if(t.kind===l1.Custom)return t.copyData;let r=a?.(t);return(e=r?.getAccessibilityString(t))!=null?e:""},Qb=(t,a)=>{var e,r,n,i,l,o,h,c;let{width:v,height:g,accessibilityHeight:d,columns:u,cellXOffset:p,cellYOffset:z,headerHeight:w,fillHandle:s=!1,groupHeaderHeight:f,rowHeight:m,rows:H,getCellContent:x,getRowThemeOverride:y,onHeaderMenuClick:R,enableGroups:L,isFilling:V,onCanvasFocused:C,onCanvasBlur:k,isFocused:b,selection:F,freezeColumns:_,onContextMenu:j,trailingRowType:n1,fixedShadowX:Z=!0,fixedShadowY:d1=!0,drawFocusRing:O=!0,onMouseDown:a1,onMouseUp:W,onMouseMoveRaw:L1,onMouseMove:p1,onItemHovered:o1,dragAndDropState:H1,firstColAccessible:P1,onKeyDown:K1,onKeyUp:W1,highlightRegions:Bt,canvasRef:T1,onDragStart:X1,onDragEnd:Y,eventTargetRef:N,isResizing:s1,isDragging:x1,isDraggable:f1=!1,allowResize:U,disabledRows:v1,getGroupDetails:D,theme:I,prelightCells:C1,headerIcons:D1,verticalBorder:et,drawHeader:B1,drawCustomCell:c1,onCellFocused:e1,onDragOverCell:u1,onDrop:M1,onDragLeave:I1,imageWindowLoader:Q1,smoothScrollX:St=!1,smoothScrollY:jt=!1,experimental:Ut,getCellRenderer:Et}=t,ot=(e=t.translateX)!=null?e:0,J1=(r=t.translateY)!=null?r:0,Jt=Math.max(_,Math.min(u.length-1,p)),Mt=r1.useRef(null),C0=r1.useMemo(()=>new yk,[]),Z0=Q1??C0,B0=r1.useRef(),[t0,Ma]=r1.useState(!1),dt=r1.useRef([]),At=r1.useRef(),[h0,wt]=r1.useState(),[Ft,qt]=r1.useState(),c2=r1.useRef(null),[v2,$a]=r1.useState(!1),O2=r1.useRef(v2);O2.current=v2;let j0=r1.useMemo(()=>new Fb(D1,()=>{la.current=void 0,oa.current()}),[D1]),g2=L?f+w:w,D2=r1.useRef(-1),ri=Ut?.enableFirefoxRescaling!==!0;r1.useLayoutEffect(()=>{!Gb.value||window.devicePixelRatio===1||ri||(D2.current!==-1&&Ma(!0),window.clearTimeout(D2.current),D2.current=window.setTimeout(()=>{Ma(!1),D2.current=-1},200))},[z,Jt,ot,J1,ri]);let u0=Ek(u,_),Ht=r1.useCallback((S,G,b1)=>{let z1=S.getBoundingClientRect();if(G>=u0.length||b1>=H)return;let E1=z1.width/v,h1=Kn(G,b1,v,g,f,g2,Jt,z,ot,J1,H,_,n1==="sticky",u0,m);return E1!==1&&(h1.x*=E1,h1.y*=E1,h1.width*=E1,h1.height*=E1),h1.x+=z1.x,h1.y+=z1.y,h1},[v,g,f,g2,Jt,z,ot,J1,H,_,n1,u0,m]),m0=r1.useCallback((S,G,b1,z1)=>{var E1,h1;let $1=S.getBoundingClientRect(),st=$1.width/v,S1=(G-$1.left)/st,_1=(b1-$1.top)/st,a0=5,tt=A8(u0,Jt,v,void 0,ot),ut=0;z1 instanceof MouseEvent&&(ut=z1.button);let ht=Pk(S1,tt,ot),xt=Ik(_1,g,L,w,f,H,m,z,J1,n1==="sticky"),_t=z1?.shiftKey===!0,Ca=z1?.ctrlKey===!0,y2=z1?.metaKey===!0,C2=z1!==void 0&&!(z1 instanceof MouseEvent)||z1?.pointerType==="touch",N2=20,B2=[Math.abs(S1)v||_1>g){let G1=S1>v?-1:S1<0?1:0,Gt=_1>g?1:_1<0?-1:0,n0=!1;if(ht===-1&&xt===-1){let A0=Ht(S,u0.length-1,-1);i2(A0!==void 0),n0=G=0?(Gt=!0,G1=Ht(S,n0,xt),i2(G1!==void 0),u2={kind:L&&xt===-2?w2:xe,location:[n0,xt],bounds:G1,group:(E1=u0[n0].group)!=null?E1:"",isEdge:Gt,shiftKey:_t,ctrlKey:Ca,metaKey:y2,isTouch:C2,localEventX:G-G1.x,localEventY:b1-G1.y,button:ut,scrollEdge:B2}):u2={kind:L&&xt===-2?w2:xe,group:(h1=u0[ht].group)!=null?h1:"",location:[ht,xt],bounds:G1,isEdge:Gt,shiftKey:_t,ctrlKey:Ca,metaKey:y2,isTouch:C2,localEventX:G-G1.x,localEventY:b1-G1.y,button:ut,scrollEdge:B2}}else{let G1=Ht(S,ht,xt);i2(G1!==void 0);let Gt=G1!==void 0&&G1.x+G1.width-G{}),xr=r1.useRef(h0);xr.current=h0;let[Se,Ae]=r1.useMemo(()=>{let S=document.createElement("canvas"),G=document.createElement("canvas");return S.style.display="none",S.style.opacity="0",S.style.position="fixed",G.style.display="none",G.style.opacity="0",G.style.position="fixed",[S,G]},[]);r1.useLayoutEffect(()=>(document.documentElement.append(Se),document.documentElement.append(Ae),()=>{Se.remove(),Ae.remove()}),[Se,Ae]);let la=r1.useRef(),Ha=r1.useCallback(()=>{var S,G;let b1=Mt.current,z1=c2.current;if(b1===null||z1===null)return;let E1=la.current,h1={canvas:b1,bufferA:Se,bufferB:Ae,headerCanvas:z1,width:v,height:g,cellXOffset:Jt,cellYOffset:z,translateX:Math.round(ot),translateY:Math.round(J1),mappedColumns:u0,enableGroups:L,freezeColumns:_,dragAndDropState:H1,theme:I,headerHeight:w,groupHeaderHeight:f,disabledRows:v1??mt.empty(),rowHeight:m,verticalBorder:et,isResizing:s1,isFocused:b,selection:F,fillHandle:s,lastRowSticky:n1,rows:H,drawFocus:O,getCellContent:x,getGroupDetails:D??($1=>({name:$1})),getRowThemeOverride:y,drawCustomCell:c1,drawHeaderCallback:B1,prelightCells:C1,highlightRegions:Bt,imageLoader:Z0,lastBlitData:At,damage:B0.current,hoverValues:dt.current,hoverInfo:xr.current,spriteManager:j0,scrolling:t0,hyperWrapping:(S=Ut?.hyperWrapping)!=null?S:!1,touchMode:v2,enqueue:ni.current,renderStrategy:(G=Ut?.renderStrategy)!=null?G:Tz.value?"double-buffer":"single-buffer",getCellRenderer:Et};h1.damage===void 0?(la.current=h1,Up(h1,E1)):Up(h1,void 0)},[Se,Ae,v,g,Jt,z,ot,J1,u0,L,_,H1,I,w,f,v1,m,et,s1,b,F,s,n1,H,O,x,D,y,c1,B1,C1,Bt,Z0,j0,t0,Ut?.hyperWrapping,Ut?.renderStrategy,v2,Et]),oa=r1.useRef(Ha);r1.useLayoutEffect(()=>{Ha(),oa.current=Ha},[Ha]),r1.useLayoutEffect(()=>{(async()=>{var G;((G=document?.fonts)==null?void 0:G.ready)!==void 0&&(await document.fonts.ready,la.current=void 0,oa.current())})()},[]);let xa=r1.useCallback(S=>{B0.current=S,oa.current(),B0.current=void 0},[]),q5=Xb(xa);ni.current=q5;let ii=r1.useCallback(S=>{xa(S.map(G=>G.cell))},[xa]);Z0.setCallback(xa);let[G5,li]=r1.useState(!1),[c4,Fe]=ia??[],oi=c4!==void 0&&Fe===-1,wr=c4!==void 0&&Fe===-2,ke=!1,v4=!1,d2;if(c4!==void 0&&Fe!==void 0&&Fe>-1){let S=x([c4,Fe],!0);ke=S.kind===o2.NewRow||S.kind===o2.Marker&&S.markerKind!=="number",v4=S.kind===l1.Boolean&&S8(S),d2=S.cursor}let wa=x1?"grabbing":(Ft??!1)||s1?"col-resize":G5||V?"crosshair":d2!==void 0?d2:oi||ke||v4||wr?"pointer":"default",Ua=r1.useMemo(()=>({contain:"strict",display:"block",cursor:wa}),[wa]),hi=r1.useRef("default"),ci=N?.current;ci!=null&&hi.current!==Ua.cursor&&(ci.style.cursor=hi.current=Ua.cursor);let La=r1.useCallback((S,G,b1,z1)=>{if(D===void 0)return;let E1=D(S);if(E1.actions!==void 0){let h1=Az(G,E1.actions);for(let[$1,st]of h1.entries())if(Fz(st,b1+G.x,z1+st.y))return E1.actions[$1]}},[D]),ha=r1.useCallback((S,G,b1,z1)=>{let E1=u[G];if(!x1&&!s1&&E1.hasMenu===!0&&!(Ft??!1)){let h1=Ht(S,G,-1);i2(h1!==void 0);let $1=kz(h1.x,h1.y,h1.width,h1.height,N8(E1.title)==="rtl");if(b1>$1.x&&b1<$1.x+$1.width&&z1>$1.y&&z1<$1.y+$1.height)return h1}},[u,Ht,Ft,x1,s1]),M0=r1.useRef(0),Va=r1.useRef(),g4=r1.useRef(!1),Lr=r1.useCallback(S=>{let G=Mt.current,b1=N?.current;if(G===null||S.target!==G&&S.target!==b1)return;g4.current=!0;let z1,E1;if(S instanceof MouseEvent?(z1=S.clientX,E1=S.clientY):(z1=S.touches[0].clientX,E1=S.touches[0].clientY),S.target===b1&&b1!==null){let $1=b1.getBoundingClientRect();if(z1>$1.right||E1>$1.bottom)return}let h1=m0(G,z1,E1,S);Va.current=h1.location,h1.isTouch&&(M0.current=Date.now()),O2.current!==h1.isTouch&&$a(h1.isTouch),!(h1.kind===xe&&ha(G,h1.location[0],z1,E1)!==void 0)&&(h1.kind===w2&&La(h1.group,h1.bounds,h1.localEventX,h1.localEventY)!==void 0||(a1?.(h1),!h1.isTouch&&f1!==!0&&f1!==h1.kind&&S.preventDefault()))},[N,f1,m0,La,ha,a1]);W0("touchstart",Lr,window,!1),W0("mousedown",Lr,window,!1);let vi=r1.useCallback(S=>{var G,b1;let z1=Mt.current;if(g4.current=!1,W===void 0||z1===null)return;let E1=N?.current,h1=S.target!==z1&&S.target!==E1,$1,st;if(S instanceof MouseEvent){if($1=S.clientX,st=S.clientY,S.pointerType==="touch")return}else $1=S.changedTouches[0].clientX,st=S.changedTouches[0].clientY;let S1=m0(z1,$1,st,S);S1.isTouch&&M0.current!==0&&Date.now()-M0.current>500&&(S1={...S1,isLongTouch:!0}),O2.current!==S1.isTouch&&$a(S1.isTouch),!h1&&S.cancelable&&S.preventDefault();let[_1]=S1.location,a0=ha(z1,_1,$1,st);if(S1.kind===xe&&a0!==void 0){(S1.button!==0||((G=Va.current)==null?void 0:G[0])!==_1||((b1=Va.current)==null?void 0:b1[1])!==-1)&&W(S1,!0);return}else if(S1.kind===w2){let tt=La(S1.group,S1.bounds,S1.localEventX,S1.localEventY);if(tt!==void 0){S1.button===0&&tt.onClick(S1);return}}W(S1,h1)},[W,N,m0,ha,La]);W0("mouseup",vi,window,!1),W0("touchend",vi,window,!1);let K5=r1.useCallback(S=>{var G,b1;let z1=Mt.current;if(z1===null)return;let E1=N?.current,h1=S.target!==z1&&S.target!==E1,$1,st;S instanceof MouseEvent?($1=S.clientX,st=S.clientY):($1=S.changedTouches[0].clientX,st=S.changedTouches[0].clientY);let S1=m0(z1,$1,st,S);O2.current!==S1.isTouch&&$a(S1.isTouch),!h1&&S.cancelable&&S.preventDefault();let[_1]=S1.location,a0=ha(z1,_1,$1,st);if(S1.kind===xe&&a0!==void 0)S1.button===0&&((G=Va.current)==null?void 0:G[0])===_1&&((b1=Va.current)==null?void 0:b1[1])===-1&&R?.(_1,a0);else if(S1.kind===w2){let tt=La(S1.group,S1.bounds,S1.localEventX,S1.localEventY);tt!==void 0&&S1.button===0&&tt.onClick(S1)}},[N,m0,ha,R,La]);W0("click",K5,window,!1);let Lt=r1.useCallback(S=>{let G=Mt.current;if(G===null||j===void 0)return;let b1=m0(G,S.clientX,S.clientY,S);j(b1,()=>{S.cancelable&&S.preventDefault()})},[m0,j]);W0("contextmenu",Lt,(n=N?.current)!=null?n:null,!1);let Wa=r1.useCallback(S=>{B0.current=S.map(G=>G.item),dt.current=S,oa.current(),B0.current=void 0},[]),s2=r1.useMemo(()=>new jb(Wa),[Wa]),P=r1.useRef(s2);P.current=s2,r1.useLayoutEffect(()=>{let S=P.current;if(ia===void 0||ia[1]<0){S.setHovered(ia);return}let G=x(ia),b1=Et(G);S.setHovered(b1===void 0&&G.kind===l1.Custom||b1?.needsHover===!0?ia:void 0)},[x,Et,ia]);let H0=r1.useRef(),V2=r1.useCallback(S=>{var G;let b1=Mt.current;if(b1===null)return;let z1=N?.current,E1=S.target!==b1&&S.target!==z1,h1=m0(b1,S.clientX,S.clientY,S);if(h1.kind!=="out-of-bounds"&&E1&&!g4.current&&!h1.isTouch)return;if(!j5(h1,H0.current))o1?.(h1),wt(h1.kind===O5?void 0:[h1.location,[h1.localEventX,h1.localEventY]]),H0.current=h1;else if(h1.kind==="cell"||h1.kind===xe||h1.kind===w2){let st=[h1.location,[h1.localEventX,h1.localEventY]];if(wt(st),xr.current=st,h1.kind==="cell"){let S1=x(h1.location);(S1.kind===l1.Custom||((G=Et(S1))==null?void 0:G.needsHoverPosition)===!0)&&xa([h1.location])}else h1.kind===w2&&xa([h1.location])}let $1=h1.location[0]>=(P1?0:1);if(qt(h1.kind===xe&&h1.isEdge&&$1&&U===!0),s&&F.current!==void 0){let[st,S1]=F.current.cell,_1=Ht(b1,st,S1),a0=S.clientX,tt=S.clientY;i2(_1!==void 0),li(a0>=_1.x+_1.width-6&&a0<=_1.x+_1.width&&tt>=_1.y+_1.height-6&&tt<=_1.y+_1.height)}else li(!1);L1?.(S),p1(h1)},[N,m0,P1,U,s,F,L1,p1,o1,x,Et,xa,Ht]);W0("mousemove",V2,window,!0);let X5=r1.useCallback(S=>{let G=Mt.current;if(G===null)return;let b1,z1;F.current!==void 0&&(b1=Ht(G,F.current.cell[0],F.current.cell[1]),z1=F.current.cell),K1?.({bounds:b1,stopPropagation:()=>S.stopPropagation(),preventDefault:()=>S.preventDefault(),cancel:()=>{},ctrlKey:S.ctrlKey,metaKey:S.metaKey,shiftKey:S.shiftKey,altKey:S.altKey,key:S.key,keyCode:S.keyCode,rawEvent:S,location:z1})},[K1,F,Ht]),gi=r1.useCallback(S=>{let G=Mt.current;if(G===null)return;let b1,z1;F.current!==void 0&&(b1=Ht(G,F.current.cell[0],F.current.cell[1]),z1=F.current.cell),W1?.({bounds:b1,stopPropagation:()=>S.stopPropagation(),preventDefault:()=>S.preventDefault(),cancel:()=>{},ctrlKey:S.ctrlKey,metaKey:S.metaKey,shiftKey:S.shiftKey,altKey:S.altKey,key:S.key,keyCode:S.keyCode,rawEvent:S,location:z1})},[W1,F,Ht]),Y5=r1.useCallback(S=>{Mt.current=S,T1!==void 0&&(T1.current=S)},[T1]),Q5=r1.useCallback(S=>{let G=Mt.current;if(G===null||f1===!1||s1){S.preventDefault();return}let b1,z1,E1=m0(G,S.clientX,S.clientY);if(f1!==!0&&E1.kind!==f1){S.preventDefault();return}let h1=(tt,ut)=>{b1=tt,z1=ut},$1,st,S1,_1=(tt,ut,ht)=>{$1=tt,st=ut,S1=ht},a0=!1;if(X1?.({...E1,setData:h1,setDragImage:_1,preventDefault:()=>a0=!0,defaultPrevented:()=>a0}),!a0&&b1!==void 0&&z1!==void 0&&S.dataTransfer!==null)if(S.dataTransfer.setData(b1,z1),S.dataTransfer.effectAllowed="copyLink",$1!==void 0&&st!==void 0&&S1!==void 0)S.dataTransfer.setDragImage($1,st,S1);else{let[tt,ut]=E1.location;if(ut!==void 0){let ht=document.createElement("canvas"),xt=Ht(G,tt,ut);i2(xt!==void 0),ht.width=xt.width,ht.height=xt.height;let _t=ht.getContext("2d");_t!==null&&(_t.textBaseline="middle",ut===-1?(_t.font=`${I.headerFontStyle} ${I.fontFamily}`,_t.fillStyle=I.bgHeader,_t.fillRect(0,0,ht.width,ht.height),bz(_t,0,0,xt.width,xt.height,u0[tt],!1,I,!1,!1,0,j0,B1,!1)):(_t.font=`${I.baseFontStyle} ${I.fontFamily}`,_t.fillStyle=I.bgCell,_t.fillRect(0,0,ht.width,ht.height),Sz(_t,ut,x([tt,ut]),0,0,0,xt.width,xt.height,!1,I,c1,Z0,j0,1,void 0,!1,0,void 0,void 0,Et))),ht.style.left="-100%",ht.style.position="absolute",document.body.append(ht),S.dataTransfer.setDragImage(ht,xt.width/2,xt.height/2),window.setTimeout(()=>{ht.remove()},0)}}else S.preventDefault()},[f1,s1,m0,X1,Ht,I,u0,j0,B1,x,c1,Z0,Et]);W0("dragstart",Q5,(i=N?.current)!=null?i:null,!1,!1);let d4=r1.useRef(),q=r1.useCallback(S=>{var G;let b1=Mt.current;if(M1!==void 0&&S.preventDefault(),b1===null||u1===void 0)return;let z1=m0(b1,S.clientX,S.clientY),[E1,h1]=z1.location,$1=E1-(P1?0:1),[st,S1]=(G=d4.current)!=null?G:[];(st!==$1||S1!==h1)&&(d4.current=[$1,h1],u1([$1,h1],S.dataTransfer))},[P1,m0,u1,M1]);W0("dragover",q,(l=N?.current)!=null?l:null,!1,!1);let R2=r1.useCallback(()=>{d4.current=void 0,Y?.()},[Y]);W0("dragend",R2,(o=N?.current)!=null?o:null,!1,!1);let P0=r1.useCallback(S=>{let G=Mt.current;if(G===null||M1===void 0)return;S.preventDefault();let b1=m0(G,S.clientX,S.clientY),[z1,E1]=b1.location,h1=z1-(P1?0:1);M1([h1,E1],S.dataTransfer)},[P1,m0,M1]);W0("drop",P0,(h=N?.current)!=null?h:null,!1,!1);let Z5=r1.useCallback(()=>{I1?.()},[I1]);W0("dragleave",Z5,(c=N?.current)!=null?c:null,!1,!1);let di=r1.useRef(F);di.current=F;let Ra=r1.useRef(null),J0=r1.useCallback(S=>{var G;Mt.current===null||!Mt.current.contains(document.activeElement)||(S===null&&di.current.current!==void 0?(G=T1?.current)==null||G.focus({preventScroll:!0}):S!==null&&S.focus({preventScroll:!0}),Ra.current=S)},[T1]);r1.useImperativeHandle(a,()=>({focus:()=>{var S;let G=Ra.current;G===null||!document.contains(G)?(S=T1?.current)==null||S.focus({preventScroll:!0}):G.focus({preventScroll:!0})},getBounds:(S,G)=>{if(!(T1===void 0||T1.current===null))return Ht(T1.current,S,G??-1)},damage:ii}),[T1,ii,Ht]);let ya=r1.useRef(),J5=Sk(()=>{var S,G,b1,z1;if(v<50)return null;let E1=A8(u0,Jt,v,H1,ot),h1=P1?0:-1;!P1&&((S=E1[0])==null?void 0:S.sourceIndex)===0&&(E1=E1.slice(1));let[$1,st]=(b1=(G=F.current)==null?void 0:G.cell)!=null?b1:[],S1=(z1=F.current)==null?void 0:z1.range,_1=E1.map(tt=>tt.sourceIndex),a0=(0,Cz.default)(z,Math.min(H,z+d));return $1!==void 0&&st!==void 0&&!(_1.includes($1)&&a0.includes(st))&&J0(null),r1.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":H+1,"aria-multiselectable":"true","aria-colcount":u0.length+h1},r1.createElement("thead",{role:"rowgroup"},r1.createElement("tr",{role:"row","aria-rowindex":1},E1.map(tt=>r1.createElement("th",{role:"columnheader","aria-selected":F.columns.hasIndex(tt.sourceIndex),"aria-colindex":tt.sourceIndex+1+h1,tabIndex:-1,onFocus:ut=>{if(ut.target!==Ra.current)return e1?.([tt.sourceIndex,-1])},key:tt.sourceIndex},tt.title)))),r1.createElement("tbody",{role:"rowgroup"},a0.map(tt=>r1.createElement("tr",{role:"row","aria-selected":F.rows.hasIndex(tt),key:tt,"aria-rowindex":tt+2},E1.map(ut=>{let ht=ut.sourceIndex,xt=`${ht},${tt}`,_t=$1===ht&&st===tt,Ca=S1!==void 0&&ht>=S1.x&&ht=S1.y&&tt{let B2=T1?.current;if(B2!=null)return K1?.({bounds:Ht(B2,ht,tt),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:C2})},onFocusCapture:B2=>{var u2,G1;if(!(B2.target===Ra.current||((u2=ya.current)==null?void 0:u2[0])===ht&&((G1=ya.current)==null?void 0:G1[1])===tt))return ya.current=C2,e1?.(C2)},ref:_t?J0:void 0,tabIndex:-1},Yb(N2,Et))})))))},[v,u0,Jt,H1,ot,H,z,d,F,J0,x,T1,K1,Ht,e1],200),Vr=Z?ur(u0,H1):0,s4=_===0||!Z?0:Jt>_?1:(0,F8.default)(-ot/100,0,1),Rr=-z*32+J1,c0=d1?(0,F8.default)(-Rr/100,0,1):0,S0=r1.useMemo(()=>{if(!s4&&!c0)return null;let S={position:"absolute",top:0,left:Vr,width:v-Vr,height:g,opacity:s4,pointerEvents:"none",transition:St?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},G={position:"absolute",top:g2,left:0,width:v,height:g,opacity:c0,pointerEvents:"none",transition:jt?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return r1.createElement(r1.Fragment,null,s4>0&&r1.createElement("div",{id:"shadow-x",style:S}),c0>0&&r1.createElement("div",{id:"shadow-y",style:G}))},[s4,c0,Vr,v,St,g2,g,jt]),v0=r1.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return r1.createElement(r1.Fragment,null,r1.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:X5,onKeyUp:gi,onFocus:C,onBlur:k,ref:Y5,style:Ua},J5),r1.createElement("canvas",{ref:c2,style:v0}),S0)},Zb=r1.memo(r1.forwardRef(Qb));function qn(t,a,e,r){var n;return(0,dz.default)(Math.round(a-((n=t.growOffset)!=null?n:0)),Math.ceil(e),Math.floor(r))}var Jb=t=>{var a;let[e,r]=It.useState(),[n,i]=It.useState(),[l,o]=It.useState(),[h,c]=It.useState(),[v,g]=It.useState(!1),[d,u]=It.useState(),[p,z]=It.useState(),[w,s]=It.useState(),[f,m]=It.useState(!1),[H,x]=It.useState(),{onHeaderMenuClick:y,getCellContent:R,onColumnMoved:L,onColumnResize:V,onColumnResizeStart:C,onColumnResizeEnd:k,gridRef:b,maxColumnWidth:F,minColumnWidth:_,onRowMoved:j,lockColumns:n1,onMouseDown:Z,onMouseUp:d1,onItemHovered:O,onDragStart:a1,canvasRef:W}=t,L1=((a=V??k)!=null?a:C)!==void 0,{columns:p1,selection:o1}=t,H1=o1.columns,P1=It.useCallback(U=>{let[v1,D]=U.location;l!==void 0&&h!==v1&&v1>=n1?(g(!0),c(v1)):p!==void 0&&D!==void 0?(m(!0),s(Math.max(0,D))):O?.(U)},[l,p,h,O,n1]),K1=L!==void 0,W1=It.useCallback(U=>{var v1,D;if(U.button===0){let[I,C1]=U.location;if(U.kind==="out-of-bounds"&&U.isEdge&&L1){let D1=(v1=b?.current)==null?void 0:v1.getBounds(p1.length-1,-1);D1!==void 0&&(r(D1.x),i(p1.length-1))}else if(U.kind==="header"&&I>=n1){let D1=W?.current;if(U.isEdge&&L1&&D1){r(U.bounds.x),i(I);let B1=D1.getBoundingClientRect().width/D1.offsetWidth,c1=U.bounds.width/B1;C?.(p1[I],c1,I,c1+((D=p1[I].growOffset)!=null?D:0))}else U.kind==="header"&&K1&&(u(U.bounds.x),o(I))}else U.kind==="cell"&&n1>0&&I===0&&C1!==void 0&&j!==void 0&&(x(U.bounds.y),z(C1))}Z?.(U)},[Z,L1,n1,j,b,p1,K1,C,W]),Bt=It.useCallback((U,v1)=>{v||f||y?.(U,v1)},[v,f,y]),T1=It.useRef(-1),X1=It.useCallback(()=>{T1.current=-1,z(void 0),s(void 0),x(void 0),m(!1),o(void 0),c(void 0),u(void 0),g(!1),i(void 0),r(void 0)},[]),Y=It.useCallback((U,v1)=>{var D,I,C1;if(U.button===0){if(n!==void 0){if(H1?.hasIndex(n)===!0)for(let et of H1){if(et===n)continue;let B1=p1[et],c1=qn(B1,T1.current,_,F);V?.(B1,c1,et,c1+((D=B1.growOffset)!=null?D:0))}let D1=qn(p1[n],T1.current,_,F);if(k?.(p1[n],D1,n,D1+((I=p1[n].growOffset)!=null?I:0)),H1.hasIndex(n))for(let et of H1){if(et===n)continue;let B1=p1[et],c1=qn(B1,T1.current,_,F);k?.(B1,c1,et,c1+((C1=B1.growOffset)!=null?C1:0))}}X1(),l!==void 0&&h!==void 0&&L?.(l,h),p!==void 0&&w!==void 0&&j?.(p,w)}d1?.(U,v1)},[d1,n,l,h,p,w,H1,k,p1,_,F,V,L,j,X1]),N=It.useMemo(()=>{if(!(l===void 0||h===void 0)&&l!==h)return{src:l,dest:h}},[l,h]),s1=It.useCallback(U=>{var v1,D;let I=W?.current;if(l!==void 0&&d!==void 0)Math.abs(U.clientX-d)>20&&g(!0);else if(p!==void 0&&H!==void 0)Math.abs(U.clientY-H)>20&&m(!0);else if(n!==void 0&&e!==void 0&&I){let D1=I.getBoundingClientRect().width/I.offsetWidth,et=(U.clientX-e)/D1,B1=p1[n],c1=qn(B1,et,_,F);if(V?.(B1,c1,n,c1+((v1=B1.growOffset)!=null?v1:0)),T1.current=et,H1?.first()===n)for(let e1 of H1){if(e1===n)continue;let u1=p1[e1],M1=qn(u1,T1.current,_,F);V?.(u1,M1,e1,M1+((D=u1.growOffset)!=null?D:0))}}},[l,d,p,H,n,e,p1,_,F,V,H1,W]),x1=It.useCallback((U,v1)=>{if(p===void 0||w===void 0)return R(U,v1);let[D,I]=U;return I===w?I=p:(I>w&&(I-=1),I>=p&&(I+=1)),R([D,I],v1)},[p,w,R]),f1=It.useCallback(U=>{a1?.(U),U.defaultPrevented()||X1()},[X1,a1]);return It.createElement(Zb,{accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,columns:t.columns,disabledRows:t.disabledRows,drawCustomCell:t.drawCustomCell,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,enableGroups:t.enableGroups,eventTargetRef:t.eventTargetRef,experimental:t.experimental,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,headerIcons:t.headerIcons,height:t.height,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,isDraggable:t.isDraggable,isFilling:t.isFilling,isFocused:t.isFocused,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDrop:t.onDrop,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseMove:t.onMouseMove,prelightCells:t.prelightCells,rowHeight:t.rowHeight,rows:t.rows,selection:t.selection,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,theme:t.theme,trailingRowType:t.trailingRowType,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,width:t.width,getCellContent:x1,isResizing:n!==void 0,onHeaderMenuClick:Bt,isDragging:v,onItemHovered:P1,onDragStart:f1,onMouseDown:W1,allowResize:L1,onMouseUp:Y,dragAndDropState:N,onMouseMoveRaw:s1,ref:b})},tE=Jb;function aE(t){let a=(0,zr.useRef)(null),[e,r]=(0,zr.useState)({width:t?.[0],height:t?.[1]});return(0,zr.useLayoutEffect)(()=>{let n=l=>{for(let o of l){let{width:h,height:c}=o&&o.contentRect||{};r(v=>v.width===h&&v.height===c?v:{width:h,height:c})}},i=new window.ResizeObserver(n);return a.current&&i.observe(a.current,void 0),()=>{i.disconnect()}},[a.current]),{ref:a,...e}}var eE=()=>t=>t.isSafari?"scroll":"auto",rE=L0("div")({name:"ScrollRegionStyle",class:"s1jz82f8",vars:{"s1jz82f8-0":[eE()]}});function C8(t){t.stopPropagation()}function nE(t){let[a,e]=lt.useState(!1),r=lt.useRef(0);return W0("touchstart",lt.useCallback(()=>{window.clearTimeout(r.current),e(!0)},[]),window,!0,!1),W0("touchend",lt.useCallback(n=>{n.touches.length===0&&(r.current=window.setTimeout(()=>e(!1),t))},[t]),window,!0,!1),a}var iE=t=>{var a,e,r,n;let{children:i,clientHeight:l,scrollHeight:o,scrollWidth:h,update:c,draggable:v,className:g,preventDiagonalScrolling:d=!1,paddingBottom:u=0,paddingRight:p=0,rightElement:z,rightElementProps:w,scrollRef:s,scrollToEnd:f,initialSize:m,minimap:H}=t,x=[],y=(a=w?.sticky)!=null?a:!1,R=(e=w?.fill)!=null?e:!1,L=lt.useRef(0),V=lt.useRef(0),C=lt.useRef(null),k=window.devicePixelRatio;lt.useEffect(()=>{let W1=C.current;W1===null||f!==!0||(W1.scrollLeft=W1.scrollWidth-W1.clientWidth)},[f]);let b=lt.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),F=lt.useRef(null),_=nE(200),[j,n1]=lt.useState(!0),Z=lt.useRef(0);lt.useEffect(()=>{if(!j||_||b.current.lockDirection===void 0)return;let W1=C.current;if(W1===null)return;let[Bt,T1]=b.current.lockDirection;Bt!==void 0?W1.scrollLeft=Bt:T1!==void 0&&(W1.scrollTop=T1),b.current.lockDirection=void 0},[_,j]);let d1=lt.useCallback(()=>{var W1,Bt,T1,X1;let Y=C.current;if(Y===null)return;let N=Y.scrollTop,s1=Y.scrollLeft,x1=b.current.scrollTop,f1=b.current.scrollLeft,U=s1-f1,v1=N-x1;_&&U!==0&&v1!==0&&(Math.abs(U)>3||Math.abs(v1)>3)&&d&&b.current.lockDirection===void 0&&(b.current.lockDirection=Math.abs(U)0&&(Math.abs(C1)>2e3||I===0||I===D1)&&o>Y.scrollHeight+5){let et=I/D1,B1=(o-Y.clientHeight)*et;L.current=B1-I}D!==void 0&&(window.clearTimeout(Z.current),n1(!1),Z.current=window.setTimeout(()=>n1(!0),200)),c({x:s1,y:I+L.current,width:Y.clientWidth-p,height:Y.clientHeight-u,paddingRight:(X1=(T1=F.current)==null?void 0:T1.clientWidth)!=null?X1:0})},[u,p,o,c,d,_]),O=lt.useRef(d1);O.current=d1;let a1=lt.useRef(),W=lt.useRef(!1);lt.useEffect(()=>{W.current?d1():W.current=!0},[d1,u,p]);let L1=lt.useCallback(W1=>{C.current=W1,s!==void 0&&(s.current=W1)},[s]),p1=0,o1=0;for(x.push(lt.createElement("div",{key:p1++,style:{width:h,height:0}}));o1O.current(),0),a1.current={width:P1,height:K1}),(P1??0)===0||(K1??0)===0?lt.createElement("div",{ref:H1}):lt.createElement("div",{ref:H1},lt.createElement(rE,{isSafari:Tz.value},H,lt.createElement("div",{className:"dvn-underlay"},i),lt.createElement("div",{ref:L1,style:a1.current,draggable:v,onDragStart:W1=>{v||(W1.stopPropagation(),W1.preventDefault())},className:"dvn-scroller "+(g??""),onScroll:d1},lt.createElement("div",{className:"dvn-scroll-inner"+(z===void 0?" hidden":"")},lt.createElement("div",{className:"dvn-stack"},x),z!==void 0&<.createElement(lt.Fragment,null,!R&<.createElement("div",{className:"dvn-spacer"}),lt.createElement("div",{ref:F,onMouseDown:C8,onMouseUp:C8,onMouseMove:C8,style:{height:K1,maxHeight:l-Math.ceil(k%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:p,flexGrow:R?1:void 0,right:y?p??0:void 0,pointerEvents:"auto"}},z))))))},lE=L0("div")({name:"MinimapStyle",class:"m15w2ly5"}),oE=t=>{var a,e,r;let{columns:n,rows:i,rowHeight:l,headerHeight:o,groupHeaderHeight:h,enableGroups:c,freezeColumns:v,experimental:g,clientSize:d,className:u,onVisibleRegionChanged:p,scrollToEnd:z,scrollRef:w,preventDiagonalScrolling:s,rightElement:f,rightElementProps:m,overscrollX:H,overscrollY:x,showMinimap:y=!1,initialSize:R,smoothScrollX:L=!1,smoothScrollY:V=!1,isDraggable:C}=t,{paddingRight:k,paddingBottom:b}=g??{},[F,_]=d,j=d0.useRef(),n1=d0.useRef(),Z=d0.useRef(),d1=d0.useRef(),O=d0.useMemo(()=>{let f1=Math.max(0,H??0);for(let U of n)f1+=U.width;return f1},[n,H]),a1=c?o+h:o;if(typeof l=="number")a1+=i*l;else for(let f1=0;f1{var f1,U,v1;if(W.current===void 0)return;let D={...W.current},I=0,C1=D.x<0?-D.x:0,D1=0,et=0;D.x=D.x<0?0:D.x;let B1=0;for(let Q1=0;Q1=St+Q1.width)I+=Q1.width,et++,D1++;else if(D.x>St)I+=Q1.width,L?C1+=St-D.x:et++,D1++;else if(D.x+D.width>St)I+=Q1.width,D1++;else break}let c1=0,e1=0,u1=0;if(typeof l=="number")V?(e1=Math.floor(D.y/l),c1=e1*l-D.y):e1=Math.ceil(D.y/l),u1=Math.ceil(D.height/l)+e1,c1<0&&u1++;else{let Q1=0;for(let St=0;St=Q1+jt)Q1+=jt,e1++,u1++;else if(D.y>Ut)Q1+=jt,V?c1+=Ut-D.y:e1++,u1++;else if(D.y+D.height>jt/2+Q1)Q1+=jt,u1++;else break}}let M1={x:et,y:e1,width:D1-et,height:u1-e1},I1=j.current;(I1===void 0||I1.y!==M1.y||I1.x!==M1.x||I1.height!==M1.height||I1.width!==M1.width||n1.current!==C1||Z.current!==c1||D.width!==((f1=d1.current)==null?void 0:f1[0])||D.height!==((U=d1.current)==null?void 0:U[1]))&&(p?.({x:et,y:e1,width:D1-et,height:u1-e1},D.width,D.height,(v1=D.paddingRight)!=null?v1:0,C1,c1),j.current=M1,n1.current=C1,Z.current=c1,d1.current=[D.width,D.height])},[n,l,i,p,v,L,V]),p1=d0.useCallback(f1=>{W.current=f1,L1()},[L1]);d0.useEffect(()=>{L1()},[L1]);let o1=(a=w?.current)!=null?a:void 0,H1=(0,Pz.default)(O/a1,2/3,1.5),P1=200,K1=H1>1?P1:Math.ceil(P1*H1),W1=H1>1?Math.ceil(P1/H1):P1,Bt=K1/O,T1=W1/a1,X1=Math.min(F*Math.max(Bt,.01),K1),Y=Math.min(_*Math.max(T1,.01),W1),N=((e=o1?.scrollLeft)!=null?e:0)/(O-F)*(K1-X1),s1=((r=o1?.scrollTop)!=null?r:0)/(a1-_)*(W1-Y),x1=d0.useMemo(()=>{if(!y||X1===0||Y===0)return;let f1=U=>{if(o1===void 0)return;let v1=U.currentTarget.getBoundingClientRect(),D=U.clientX-v1.x-X1/2,I=U.clientY-v1.y-Y/2,C1=(O-o1.clientWidth)*(D/(K1-X1)),D1=(a1-o1.clientHeight)*(I/(W1-Y));o1.scrollTo({left:C1,top:D1,behavior:U.type==="mousemove"?"auto":"smooth"})};return d0.createElement(lE,{style:{width:K1,height:W1},"data-testid":"minimap-container",onMouseMove:U=>{U.buttons===1&&f1(U)},onClick:f1},d0.createElement("div",{className:"header"}),d0.createElement("div",{className:"locationMarker",onDragStart:U=>U.preventDefault(),style:{left:N,top:s1,width:X1,height:Y,borderRadius:Math.min(X1,Y*.2,9)}}))},[W1,a1,N,o1,y,s1,Y,X1,K1,O]);return d0.createElement(iE,{scrollRef:w,minimap:x1,className:u,preventDiagonalScrolling:s,draggable:C===!0||typeof C=="string",scrollWidth:O+(k??0),scrollHeight:a1+(b??0),clientHeight:_,rightElement:f,paddingBottom:b,paddingRight:k,rightElementProps:m,update:p1,initialSize:R,scrollToEnd:z},d0.createElement(tE,{eventTargetRef:w,width:F,height:_,accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,columns:t.columns,disabledRows:t.disabledRows,enableGroups:t.enableGroups,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellContent:t.getCellContent,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,isFilling:t.isFilling,isFocused:t.isFocused,lockColumns:t.lockColumns,maxColumnWidth:t.maxColumnWidth,minColumnWidth:t.minColumnWidth,onHeaderMenuClick:t.onHeaderMenuClick,onMouseMove:t.onMouseMove,prelightCells:t.prelightCells,rowHeight:t.rowHeight,rows:t.rows,selection:t.selection,theme:t.theme,trailingRowType:t.trailingRowType,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,drawCustomCell:t.drawCustomCell,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,experimental:t.experimental,gridRef:t.gridRef,headerIcons:t.headerIcons,isDraggable:t.isDraggable,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onColumnMoved:t.onColumnMoved,onColumnResize:t.onColumnResize,onColumnResizeEnd:t.onColumnResizeEnd,onColumnResizeStart:t.onColumnResizeStart,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDragStart:t.onDragStart,onDrop:t.onDrop,onItemHovered:t.onItemHovered,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onRowMoved:t.onRowMoved,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY}))},hE=oE,cE=()=>t=>t.showSearch?0:400,vE=L0("div")({name:"SearchWrapper",class:"sxep88s",vars:{"sxep88s-0":[cE(),"px"]}}),gE=q1.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},q1.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),dE=q1.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},q1.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),sE=q1.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},q1.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),uE=10,fE=t=>{let{canvasRef:a,cellYOffset:e,rows:r,columns:n,searchInputRef:i,searchValue:l,searchResults:o,onSearchValueChange:h,getCellsForSelection:c,onSearchResultsChanged:v,showSearch:g=!1,onSearchClose:d}=t,[u]=q1.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[p,z]=q1.useState(""),w=l??p,s=q1.useCallback(O=>{z(O),h?.(O)},[h]),[f,m]=q1.useState(),H=q1.useRef(f);H.current=f,q1.useEffect(()=>{o!==void 0&&(o.length>0?m(O=>{var a1;return{rowsSearched:r,results:o.length,selectedIndex:(a1=O?.selectedIndex)!=null?a1:-1}}):m(void 0))},[r,o]);let x=q1.useRef(new AbortController),y=q1.useRef(),[R,L]=q1.useState([]),V=o??R,C=q1.useCallback(()=>{y.current!==void 0&&(window.cancelAnimationFrame(y.current),y.current=void 0,x.current.abort())},[]),k=q1.useRef(e);k.current=e;let b=q1.useCallback(O=>{let a1=new RegExp(O.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i"),W=k.current,L1=Math.min(10,r),p1=0;m(void 0),L([]);let o1=[],H1=async()=>{var P1,K1;if(c===void 0)return;let W1=performance.now(),Bt=r-p1,T1=c({x:0,y:W,width:n.length,height:Math.min(L1,Bt,r-W)},x.current.signal);typeof T1=="function"&&(T1=await T1());let X1=!1;for(let[U,v1]of T1.entries())for(let[D,I]of v1.entries()){let C1;switch(I.kind){case l1.Text:case l1.Number:C1=I.displayData;break;case l1.Uri:case l1.Markdown:C1=I.data;break;case l1.Boolean:C1=typeof I.data=="boolean"?I.data.toString():void 0;break;case l1.Image:case l1.Bubble:C1=I.data.join("\u{1F433}");break;case l1.Custom:C1=I.copyData;break}C1!==void 0&&a1.test(C1)&&(o1.push([D,U+W]),X1=!0)}let Y=performance.now();X1&&L([...o1]),p1+=T1.length,i2(p1<=r);let N=(K1=(P1=H.current)==null?void 0:P1.selectedIndex)!=null?K1:-1;m({results:o1.length,rowsSearched:p1,selectedIndex:N}),v?.(o1,N),W+L1>=r?W=0:W+=L1;let s1=Y-W1,x1=Math.max(s1,1),f1=uE/x1;L1=Math.ceil(L1*f1),p1{var O;d?.(),m(void 0),L([]),v?.([],-1),C(),(O=a?.current)==null||O.focus()},[C,a,d,v]),_=q1.useCallback(O=>{s(O.target.value),o===void 0&&(O.target.value===""?(m(void 0),L([]),C()):b(O.target.value))},[b,C,s,o]);q1.useEffect(()=>{g&&i.current!==null&&(s(""),i.current.focus({preventScroll:!0}))},[g,i,s]);let j=q1.useCallback(O=>{var a1;if((a1=O?.stopPropagation)==null||a1.call(O),f===void 0)return;let W=(f.selectedIndex+1)%f.results;m({...f,selectedIndex:W}),v?.(V,W)},[f,v,V]),n1=q1.useCallback(O=>{var a1;if((a1=O?.stopPropagation)==null||a1.call(O),f===void 0)return;let W=(f.selectedIndex-1)%f.results;W<0&&(W+=f.results),m({...f,selectedIndex:W}),v?.(V,W)},[v,V,f]),Z=q1.useCallback(O=>{(O.ctrlKey||O.metaKey)&&O.nativeEvent.code==="KeyF"||O.key==="Escape"?(F(),O.stopPropagation(),O.preventDefault()):O.key==="Enter"&&(O.shiftKey?n1():j())},[F,j,n1]);q1.useEffect(()=>()=>{C()},[C]);let d1=q1.useMemo(()=>{var O,a1,W;let L1;f!==void 0&&(L1=f.results>=1e3?"over 1000":`${f.results} result${f.results!==1?"s":""}`,f.selectedIndex>=0&&(L1=`${f.selectedIndex+1} of ${L1}`));let p1=P1=>{P1.stopPropagation()},H1={width:`${Math.floor(((O=f?.rowsSearched)!=null?O:0)/r*100)}%`};return q1.createElement(vE,{showSearch:g,onMouseDown:p1,onMouseMove:p1,onMouseUp:p1,onClick:p1},q1.createElement("div",{className:"search-bar-inner"},q1.createElement("input",{id:u,"aria-hidden":!g,"data-testid":"search-input",ref:i,onChange:_,value:w,tabIndex:g?void 0:-1,onKeyDownCapture:Z}),q1.createElement("button",{"aria-label":"Previous Result","aria-hidden":!g,tabIndex:g?void 0:-1,onClick:n1,disabled:((a1=f?.results)!=null?a1:0)===0},gE),q1.createElement("button",{"aria-label":"Next Result","aria-hidden":!g,tabIndex:g?void 0:-1,onClick:j,disabled:((W=f?.results)!=null?W:0)===0},dE),d!==void 0&&q1.createElement("button",{"aria-label":"Close Search","aria-hidden":!g,"data-testid":"search-close-button",tabIndex:g?void 0:-1,onClick:F},sE)),f!==void 0?q1.createElement(q1.Fragment,null,q1.createElement("div",{className:"search-status"},q1.createElement("div",{"data-testid":"search-result-area"},L1)),q1.createElement("div",{className:"search-progress",style:H1})):q1.createElement("div",{className:"search-status"},q1.createElement("label",{htmlFor:u},"Type to search")))},[F,j,n1,_,d,Z,r,f,w,g,u,i]);return q1.createElement(q1.Fragment,null,q1.createElement(hE,{prelightCells:V,accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,className:t.className,clientSize:t.clientSize,columns:t.columns,disabledRows:t.disabledRows,enableGroups:t.enableGroups,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellContent:t.getCellContent,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,initialSize:t.initialSize,isFilling:t.isFilling,isFocused:t.isFocused,lockColumns:t.lockColumns,maxColumnWidth:t.maxColumnWidth,minColumnWidth:t.minColumnWidth,onHeaderMenuClick:t.onHeaderMenuClick,onMouseMove:t.onMouseMove,onVisibleRegionChanged:t.onVisibleRegionChanged,overscrollX:t.overscrollX,overscrollY:t.overscrollY,preventDiagonalScrolling:t.preventDiagonalScrolling,rightElement:t.rightElement,rightElementProps:t.rightElementProps,rowHeight:t.rowHeight,rows:t.rows,scrollRef:t.scrollRef,selection:t.selection,showMinimap:t.showMinimap,theme:t.theme,trailingRowType:t.trailingRowType,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,drawCustomCell:t.drawCustomCell,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,experimental:t.experimental,gridRef:t.gridRef,headerIcons:t.headerIcons,isDraggable:t.isDraggable,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onColumnMoved:t.onColumnMoved,onColumnResize:t.onColumnResize,onColumnResizeEnd:t.onColumnResizeEnd,onColumnResizeStart:t.onColumnResizeStart,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDragStart:t.onDragStart,onDrop:t.onDrop,onItemHovered:t.onItemHovered,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onRowMoved:t.onRowMoved,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,scrollToEnd:t.scrollToEnd}),d1)},pE=fE,zE=()=>t=>Math.max(16,t.targetHeight-10),mE=L0("input")({name:"RenameInput",class:"r1kzy40b",vars:{"r1kzy40b-0":[zE(),"px"]}}),ME=t=>{let{bounds:a,group:e,onClose:r,canvasBounds:n,onFinish:i}=t,[l,o]=_5.default.useState(e);return _5.default.createElement(rz,{style:{position:"absolute",left:a.x-n.left+1,top:a.y-n.top,width:a.width-2,height:a.height},className:"c1sqdbw3",onClickOutside:r},_5.default.createElement(mE,{targetHeight:a.height,"data-testid":"group-rename-input",value:l,onBlur:r,onFocus:h=>h.target.setSelectionRange(0,l.length),onChange:h=>o(h.target.value),onKeyDown:h=>{h.key==="Enter"?i(l):h.key==="Escape"&&r()},autoFocus:!0}))},E8=150;function HE(t,a,e,r){var n,i;let l=r(a);return(i=(n=l?.measure)==null?void 0:n.call(l,t,a,e))!=null?i:E8}function Iz(t,a,e,r,n,i,l,o,h){let c=[];if(n!==void 0&&c.push(...n.map(d=>d[r]).map(d=>HE(t,d,a,h))),c.length>5&&o){let d=c.reduce((u,p)=>u+p)/c.length;c=c.filter(u=>u{if(typeof window>"u")return[null,null];let f=document.createElement("canvas");return f.style.display="none",f.style.opacity="0",f.style.position="fixed",[f,f.getContext("2d",{alpha:!1})]},[]);l2.useLayoutEffect(()=>(d&&document.documentElement.append(d),()=>{d?.remove()}),[d]);let p=l2.useRef({}),z=l2.useRef(),[w,s]=l2.useState();return l2.useLayoutEffect(()=>{let f=v.current;if(f===void 0||t.every(B5))return;let m=Math.max(1,10-Math.floor(t.length/1e4)),H=0;m1&&(m--,H=1);let x={x:0,y:0,width:t.length,height:Math.min(c.current,m)},y={x:0,y:c.current-1,width:t.length,height:1};(async()=>{let L=f(x,h.signal),V=H>0?f(y,h.signal):void 0,C;typeof L=="object"?C=L:C=await bp(L),V!==void 0&&(typeof V=="object"?C=[...C,...V]:C=[...C,...await bp(V)]),z.current=t,s(C)})()},[h.signal,t]),l2.useMemo(()=>{var f;let H=(()=>t.every(B5)?t:u===null?t.map(L=>B5(L)?L:{...L,width:E8}):(u.font=`${g.current.baseFontStyle} ${g.current.fontFamily}`,t.map((L,V)=>{if(B5(L))return L;if(p.current[L.id]!==void 0)return{...L,width:p.current[L.id]};if(w===void 0||z.current!==t||L.id===void 0)return{...L,width:E8};let C=Iz(u,l,L,V,w,n,i,!0,o);return p.current[L.id]=C.width,C})))(),x=0,y=0,R=[];for(let[L,V]of H.entries())x+=V.width,V.grow!==void 0&&V.grow>0&&(y+=V.grow,R.push(L));if(x0){let L=[...H],V=r-x,C=V;for(let k=0;k1&&t.startsWith("_")){if(Number.parseInt(t.slice(1))!==a.keyCode)return!1}else if(t!==a.key)return!1;return!0}function T0(t,a){if(t.length===0)return!1;let e=!1,r=!1,n=!1,i=!1,l=t.split("+"),o=l.pop();if(!wE(o,a))return!1;for(let h of l)switch(h){case"ctrl":e=!0;break;case"shift":r=!0;break;case"alt":n=!0;break;case"meta":i=!0;break;case"primary":E5.value?i=!0:e=!0;break}return a.altKey===n&&a.ctrlKey===e&&a.shiftKey===r&&a.metaKey===i}function LE(t,a,e,r,n,i){let l=T5.default.useCallback((c,v,g,d)=>{var u,p;(i==="cell"||i==="multi-cell")&&c!==void 0&&(c={...c,range:{x:c.cell[0],y:c.cell[1],width:1,height:1}});let z=e==="mixed"&&(g||d==="drag"),w=r==="mixed"&&z,s=n==="mixed"&&z,f={current:c===void 0?void 0:{...c,rangeStack:d==="drag"?(p=(u=t.current)==null?void 0:u.rangeStack)!=null?p:[]:[]},columns:w?t.columns:mt.empty(),rows:s?t.rows:mt.empty()};g&&(i==="multi-rect"||i==="multi-cell")&&f.current!==void 0&&t.current!==void 0&&(f={...f,current:{...f.current,rangeStack:[...t.current.rangeStack,t.current.range]}}),a(f,v)},[r,t,e,i,n,a]),o=T5.default.useCallback((c,v,g)=>{c=c??t.rows,v!==void 0&&(c=c.add(v));let d;if(n==="exclusive"&&c.length>0)d={current:void 0,columns:mt.empty(),rows:c};else{let u=g&&e==="mixed",p=g&&r==="mixed";d={current:u?t.current:void 0,columns:p?t.columns:mt.empty(),rows:c}}a(d,!1)},[r,t,e,n,a]),h=T5.default.useCallback((c,v,g)=>{c=c??t.columns,v!==void 0&&(c=c.add(v));let d;if(r==="exclusive"&&c.length>0)d={current:void 0,rows:mt.empty(),columns:c};else{let u=g&&e==="mixed",p=g&&n==="mixed";d={current:u?t.current:void 0,rows:p?t.rows:mt.empty(),columns:c}}a(d,!1)},[r,t,e,n,a]);return[l,o,h]}function VE(t,a,e,r,n){let i=_8.useCallback(c=>{var v;if(t===!0){let g=[];for(let d=c.y;d=n?u.push({kind:l1.Loading,allowOverlay:!1}):u.push(a([p,d]));g.push(u)}return g}return(v=t?.(c,r.signal))!=null?v:[]},[r.signal,a,t,n]),l=t!==void 0?i:void 0,o=_8.useCallback(c=>{if(l===void 0)return[];let v={...c,x:c.x-e};if(v.x<0){v.x=0,v.width--;let g=l(v,r.signal);return typeof g=="function"?async()=>(await g()).map(d=>[{kind:l1.Loading,allowOverlay:!1},...d]):g.map(d=>[{kind:l1.Loading,allowOverlay:!1},...d])}return l(v,r.signal)},[r.signal,l,e]);return[t!==void 0?o:void 0,l]}function RE(t,a,e,r,n){var i,l;let o=t;if(r==="allowPartial"||t.current===void 0)return t;if(a!==void 0){let h=!1;do{if(t?.current===void 0)break;let c=(i=t.current)==null?void 0:i.range,v=[];if(c.width>2){let u=a({x:c.x,y:c.y,width:1,height:c.height},n.signal);if(typeof u=="function")return o;v.push(...u);let p=a({x:c.x+c.width-1,y:c.y,width:1,height:c.height},n.signal);if(typeof p=="function")return o;v.push(...p)}else{let u=a({x:c.x,y:c.y,width:c.width,height:c.height},n.signal);if(typeof u=="function")return o;v.push(...u)}let g=c.x-e,d=c.x+c.width-1-e;for(let u of v)for(let p of u)p.span!==void 0&&(g=Math.min(p.span[0],g),d=Math.max(p.span[1],d));g===c.x-e&&d===c.x+c.width-1-e?h=!0:t={current:{cell:(l=t.current.cell)!=null?l:[0,0],range:{x:g+e,y:c.y,width:d-g+1,height:c.height},rangeStack:t.current.rangeStack},columns:t.columns,rows:t.rows}}while(!h)}return t}function Wp(t){return t.startsWith('"')&&t.endsWith('"')&&(t=t.slice(1,-1).replace(/""/g,'"')),t}function yE(t){var a;(function(o){o[o.None=0]="None",o[o.inString=1]="inString",o[o.inStringPostQuote=2]="inStringPostQuote"})(a||(a={}));let e=[],r=[],n=0,i=0;t=t.replace(/\r\n/g,` +`},Sb={headerRowID:ab,headerNumber:rb,headerCode:eb,headerString:nb,headerBoolean:ib,headerAudioUri:ob,headerVideoUri:hb,headerEmoji:cb,headerImage:vb,headerUri:yz,headerPhone:gb,headerMarkdown:db,headerDate:sb,headerTime:ub,headerEmail:fb,headerReference:pb,headerIfThenElse:zb,headerSingleValue:mb,headerLookup:Mb,headerTextTemplate:Hb,headerMath:xb,headerRollup:wb,headerJoinStrings:Lb,headerSplitString:Vb,headerGeoDistance:Rb,headerArray:yb,rowOwnerOverlay:Cb,protectedColumnOverlay:Bb,renameIcon:lb};function Ab(t,a){return t==="normal"?[a.bgIconHeader,a.fgIconHeader]:t==="selected"?["white",a.accentColor]:[a.accentColor,a.bgHeader]}var Fb=class{constructor(t,a){this.onSettled=a,this.spriteMap=new Map,this.inFlight=0,this.headerIcons={...Sb,...t}}drawSprite(t,a,e,r,n,i,l,o=1){let[h,c]=Ab(a,l),v=i*Math.ceil(window.devicePixelRatio),g=`${h}_${c}_${v}_${t}`,d=this.spriteMap.get(g);if(d===void 0){let u=this.headerIcons[t];if(u===void 0)return;d=document.createElement("canvas");let p=d.getContext("2d");if(p===null)return;let z=new Image;z.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(u({fgColor:c,bgColor:h}))}`,this.spriteMap.set(g,d);let w=z.decode();if(w===void 0)return;this.inFlight++,w.then(()=>{p.drawImage(z,0,0,v,v)}).finally(()=>{this.inFlight--,this.inFlight===0&&this.onSettled()})}else o<1&&(e.globalAlpha=o),e.drawImage(d,0,0,v,v,r,n,i,i),o<1&&(e.globalAlpha=1)}},R8={},He=null;function kb(){let t=document.createElement("div");return t.style.opacity="0",t.style.pointerEvents="none",t.style.position="fixed",document.body.append(t),t}function k8(t){let a=t.toLowerCase().trim();if(R8[a]!==void 0)return R8[a];He=He||kb(),He.style.color="#000",He.style.color=a;let e=getComputedStyle(He).color;He.style.color="#fff",He.style.color=a;let r=getComputedStyle(He).color;if(r!==e)return[0,0,0,1];let n=r.replace(/[^\d.,]/g,"").split(",").map(Number.parseFloat);return n.length<4&&n.push(1),n=n.map(i=>{let l=Number.isNaN(i);return l&&console.warn("Could not parse color",t),l?0:i}),R8[a]=n,n}function fr(t,a){let[e,r,n]=k8(t);return`rgba(${e}, ${r}, ${n}, ${a})`}function Ve(t,a){if(a===void 0)return t;let[e,r,n,i]=k8(t);if(i===1)return t;let[l,o,h,c]=k8(a),v=i+c*(1-i),g=(i*e+c*l*(1-i))/v,d=(i*r+c*o*(1-i))/v,u=(i*n+c*h*(1-i))/v;return`rgba(${g}, ${d}, ${u}, ${v})`}var bb={kind:n1.Loading,allowOverlay:!1};function Sz(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s,f,m){let H,x;p!==void 0&&p[0][0]===r&&p[0][1]===a&&(H=p[1][0],x=p[1][1]);let y,R={ctx:t,theme:c,col:r,row:a,cell:e,rect:{x:n,y:i,width:l,height:o},highlighted:h,hoverAmount:u,hoverX:H,hoverY:x,imageLoader:g,spriteManager:d,hyperWrapping:z,requestAnimationFrame:()=>{L=!0}},L=!1;return(Uk(R,e.lastUpdated,w,s,()=>{var C,k;if(!(Le(e)?!1:v?.(R)===!0)){let F=m(e);if(F!==void 0){s?.renderer!==F&&((C=s?.deprep)==null||C.call(s,R),s=void 0);let _=(k=F.drawPrep)==null?void 0:k.call(F,R,s);F.draw(R,e),y={deprep:_?.deprep,fillStyle:_?.fillStyle,font:_?.font,renderer:F}}}})||L)&&f?.([r,a]),y}function Eb(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w){let s=[],f=!1;t.imageSmoothingEnabled=!1;let m=Math.min(e.cellYOffset,n),H=Math.max(e.cellYOffset,n),x=0;if(typeof z=="number")x+=(H-m)*z;else for(let F=m;Fe.cellYOffset&&(x=-x),x+=l-e.translateY;let y=Math.min(e.cellXOffset,r),R=Math.max(e.cellXOffset,r),L=0;for(let F=y;Fe.cellXOffset&&(L=-L),L+=i-e.translateX;let V=ur(p);if(V>0&&V++,L!==0&&x!==0)return{regions:[],yOnly:!1};let C=o?typeof z=="number"?z:z(v-1):0,k=h-V-Math.abs(L),b=c-g-C-Math.abs(x)-1;if(k>150&&b>150){f=L===0;let F={sx:0,sy:0,sw:h*d,sh:c*d,dx:0,dy:0,dw:h*d,dh:c*d};x>0?(F.sy=(g+1)*d,F.sh=b*d,F.dy=(x+g+1)*d,F.dh=b*d,s.push({x:0,y:g,width:h,height:x+1})):x<0&&(F.sy=(-x+g+1)*d,F.sh=b*d,F.dy=(g+1)*d,F.dh=b*d,s.push({x:0,y:c+x-C,width:h,height:-x+C})),L>0?(F.sx=V*d,F.sw=k*d,F.dx=(L+V)*d,F.dw=k*d,s.push({x:V-1,y:0,width:L+2,height:c})):L<0&&(F.sx=(V-L)*d,F.sw=k*d,F.dx=V*d,F.dw=k*d,s.push({x:h+L,y:0,width:-L,height:c})),t.setTransform(1,0,0,1,0,0),V>0&&L!==0&&x===0&&w&&t.drawImage(a,0,0,V*d,c*d,0,0,V*d,c*d),t.drawImage(a,F.sx,F.sy,F.sw,F.sh,F.dx,F.dy,F.dw,F.dh),t.scale(d,d)}return t.imageSmoothingEnabled=!0,{regions:s,yOnly:f}}function _b(t,a,e,r,n,i,l,o,h,c){let v=[];return a!==t.cellXOffset||e!==t.cellYOffset||r!==t.translateX||n!==t.translateY||h4(h,e,r,n,o,(g,d,u,p)=>{if(g.sourceIndex===c){let z=Math.max(d,p)+1;return v.push({x:z,y:0,width:i-z,height:l}),!0}}),v}function Dp(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s=!1){var f,m,H;if(h!==void 0){t.beginPath(),t.save(),t.rect(0,0,i,l);for(let Z of h)t.rect(Z.x+1,Z.y+1,Z.width-1,Z.height-1);t.clip("evenodd")}let x=(f=w.horizontalBorderColor)!=null?f:w.borderColor,y=w.borderColor,R=0,L=i,V=0,C=l;if(o!==void 0&&o.length>0){R=Number.MAX_SAFE_INTEGER,V=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,C=Number.MIN_SAFE_INTEGER;for(let Z of o)R=Math.min(R,Z.x-1),L=Math.max(L,Z.x+Z.width+1),V=Math.min(V,Z.y-1),C=Math.max(C,Z.y+Z.height+1)}let k=[];t.beginPath();let b=.5;for(let Z=0;Z=R&&O<=L&&u(Z+1)&&k.push({x1:O,y1:Math.max(c,V),x2:O,y2:Math.min(l,C),color:y})}let F=g(z-1),_=l-F+.5,j=p==="sticky";if(j&&k.push({x1:R,y1:_,x2:L,y2:_,color:x}),s!==!0){let Z=v+.5,d1=e,O=j?l-F:l;for(;Z+n<=O;){let a1=Z+n;if(a1>=V&&a1<=C-1&&(!j||d1!==z-1||Math.abs(a1-_)>1)){let W=d?.(d1);k.push({x1:R,y1:a1,x2:L,y2:a1,color:(H=(m=W?.horizontalBorderColor)!=null?m:W?.borderColor)!=null?H:x})}Z+=g(d1),d1++}}let i1=(0,Bz.default)(k,Z=>Z.color);for(let Z of Object.keys(i1)){t.strokeStyle=Z;for(let d1 of i1[Z])t.moveTo(d1.x1,d1.y1),t.lineTo(d1.x2,d1.y2);t.stroke(),t.beginPath()}h!==void 0&&t.restore()}function Az(t,a){let e=[],r=t.x+t.width-26*a.length,n=t.y+t.height/2-13,i=26,l=26;for(let o=0;o=t.x&&a<=t.x+t.width&&e>=t.y&&e<=t.y+t.height}function Tb(t,a,e,r,n,i,l,o,h,c,v,g){var d;let[p,z]=(d=i?.[0])!=null?d:[],w=0;_z(a,e,r,n,(s,f,m,H,x,y)=>{var R,L;if(g!==void 0&&!g.some(F=>F[1]===-2&&F[0]>=s[0]&&F[0]<=s[1]))return;t.save(),t.beginPath(),t.rect(m,H,x,y),t.clip();let V=v(f),C=V?.overrideTheme===void 0?l:{...l,...V.overrideTheme},k=z===-2&&p!==void 0&&p>=s[0]&&p<=s[1],b=k?C.bgHeaderHovered:C.bgHeader;if(b!==l.bgHeader&&(t.fillStyle=b,t.fill()),t.fillStyle=(R=C.textGroupHeader)!=null?R:C.textHeader,V!==void 0){let F=m;if(V.icon!==void 0&&(o.drawSprite(V.icon,"normal",t,F+8,(n-20)/2,20,C),F+=26),t.fillText(V.name,F+8,n/2+$a(t,`${l.headerFontStyle} ${l.fontFamily}`)),V.actions!==void 0&&k){let _=Az({x:m,y:H,width:x,height:y},V.actions);t.beginPath();let j=_[0].x-10,i1=m+x-j;t.rect(j,0,i1,n);let Z=t.createLinearGradient(j,0,j+i1,0),d1=fr(b,0);Z.addColorStop(0,d1),Z.addColorStop(10/i1,b),Z.addColorStop(1,b),t.fillStyle=Z,t.fill(),t.globalAlpha=.6;let[O,a1]=(L=i?.[1])!=null?L:[-1,-1];for(let W=0;W35){let R=z?35:r-35,L=z?35*.7:r-35*.7,V=R/r,C=L/r,k=t.createLinearGradient(a,0,a+r,0),b=fr(f,0);k.addColorStop(z?1:0,f),k.addColorStop(V,f),k.addColorStop(C,b),k.addColorStop(z?0:1,b),t.fillStyle=k}else t.fillStyle=f;if(z&&(t.textAlign="right"),t.fillText(i.title,x,e+n/2+$a(t,`${o.headerFontStyle} ${o.fontFamily}`)),z&&(t.textAlign="left"),m&&i.hasMenu===!0){t.beginPath();let y=w.x+w.width/2-5.5,R=w.y+w.height/2-3;tb(t,[{x:y,y:R},{x:y+11,y:R},{x:y+5.5,y:R+6}],1),t.fillStyle=f,t.fill()}}function Pb(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s,f){var m;let H=l+o;if(H<=0)return;t.fillStyle=g.bgHeader,t.fillRect(0,0,n,H);let[x,y]=(m=r?.[0])!=null?m:[],R=`${g.headerFontStyle} ${g.fontFamily}`;t.font=R,h4(a,0,i,0,H,(L,V,C,k)=>{var b,F,_;if(w!==void 0&&!w.some(K1=>K1[1]===-1&&K1[0]===L.sourceIndex))return;let j=Math.max(0,k-V);t.save(),t.beginPath(),t.rect(V+j,o,L.width-j,l),t.clip();let i1=z((b=L.group)!=null?b:"").overrideTheme,Z=L.themeOverride===void 0&&i1===void 0?g:{...g,...i1,...L.themeOverride};Z.bgHeader!==g.bgHeader&&(t.fillStyle=Z.bgHeader,t.fill());let d1=`${Z.headerFontStyle} ${Z.fontFamily}`;R!==d1&&(t.font=d1);let O=v.columns.hasIndex(L.sourceIndex),a1=h!==void 0||c,W=!a1&&y===-1&&x===L.sourceIndex,L1=a1?0:(_=(F=u.find(K1=>K1.item[0]===L.sourceIndex&&K1.item[1]===-1))==null?void 0:F.hoverAmount)!=null?_:0,p1=v?.current!==void 0&&v.current.cell[0]===L.sourceIndex,o1=O?Z.accentColor:p1?Z.bgHeaderHasFocus:Z.bgHeader,H1=e?o:0,P1=L.sourceIndex===0?0:1;O?(t.fillStyle=o1,t.fillRect(V+P1,H1,L.width-P1,l)):(p1||L1>0)&&(t.beginPath(),t.rect(V+P1,H1,L.width-P1,l),p1&&(t.fillStyle=Z.bgHeaderHasFocus,t.fill()),L1>0&&(t.globalAlpha=L1,t.fillStyle=Z.bgHeaderHovered,t.fill(),t.globalAlpha=1)),bz(t,V,H1,L.width,l,L,O,Z,W,p1,L1,d,s,f),t.restore()}),e&&Tb(t,a,n,i,o,r,g,d,u,p,z,w)}function ye(t,a,e,r,n,i,l,o){return t<=n+l&&n<=t+e&&a<=i+o&&i<=a+r}function Np(t,a,e,r,n,i,l,o,h,c,v,g,d,u){if(d===void 0||d.length===0)return;let p=g==="sticky"?v(c-1):0;t.beginPath(),_z(a,e,l,n,(z,w,s,f,m,H)=>{for(let x=0;x=z[0]&&y[0]<=z[1]){t.rect(s,f,m,H);break}}}),h4(a,h,l,o,i,(z,w,s,f,m)=>{let H=Math.max(0,f-w),x=w+H+1,y=z.width-H-1;for(let R=0;R{let k=!1;for(let b=0;b0&&t.rect(x,b,y,_)}})}),t.clip()}function Ez(t,a,e,r,n,i,l){var o,h;let[c,v]=t,g,d,u=(h=(o=l.find(p=>!p.sticky))==null?void 0:o.sourceIndex)!=null?h:0;if(v>u){let p=Math.max(c,u),z=a,w=r;for(let s=i.sourceIndex-1;s>=p;s--)z-=l[s].width,w+=l[s].width;for(let s=i.sourceIndex+1;s<=v;s++)w+=l[s].width;d={x:z,y:e,width:w,height:n}}if(u>c){let p=Math.min(v,u-1),z=a,w=r;for(let s=i.sourceIndex-1;s>=c;s--)z-=l[s].width,w+=l[s].width;for(let s=i.sourceIndex+1;s<=p;s++)w+=l[s].width;g={x:z,y:e,width:w,height:n}}return[g,d]}function $p(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s,f,m,H,x,y,R,L,V,C,k,b,F,_){var j;let i1=(j=f?.length)!=null?j:Number.MAX_SAFE_INTEGER,Z=performance.now(),d1=`${b.baseFontStyle} ${b.fontFamily}`;t.font=d1;let O,a1=new Set;return h4(a,o,i,l,n,(W,L1,p1,o1,H1)=>{var P1;let K1=Math.max(0,o1-L1),W1=L1+K1,Bt=n+1,T1=W.width-K1,X1=r-n-1;if(s.length>0){let v1=!1;for(let D=0;D{t.save(),t.beginPath(),t.rect(W1,Bt,T1,X1),t.clip()},N=m.columns.hasIndex(W.sourceIndex),s1=g((P1=W.group)!=null?P1:"").overrideTheme,x1=W.themeOverride===void 0&&s1===void 0?b:{...b,...s1,...W.themeOverride},f1=`${x1.baseFontStyle} ${x1.fontFamily}`;f1!==d1&&(d1=f1,t.font=f1),Y();let U;return ai(H1,p1,r,h,c,w,(v1,D,I,C1,D1)=>{var et,B1,h1,e1;if(D<0)return;if(f!==void 0){let dt=!1;for(let At=0;At0){let dt=!1;for(let At=0;AtI1.span!==void 0&&dt>=I1.span[0]&&dt<=I1.span[1]);Mt&&!p&&z?C0=0:Mt&&(C0=Math.max(C0,1)),Z0&&C0++,Mt||(u1&&C0++,N&&!C1&&C0++);let B0=I1.kind===n1.Protected?J1.bgCellMedium:J1.bgCell,t0;if((C1||B0!==b.bgCell)&&(t0=Ve(B0,t0)),C0>0||M1){M1&&(t0=Ve(J1.bgHeader,t0));for(let dt=0;dtdt[0]===W.sourceIndex&&dt[1]===D)===!0&&(t0=Ve(J1.bgSearchResult,t0));if(x!==void 0)for(let dt of x){let At=dt.range;At.x<=W.sourceIndex&&W.sourceIndexdt.item[0]===W.sourceIndex&&dt.item[1]===D);if(St>10&&!Ut){let dt=`${J1.baseFontStyle} ${J1.fontFamily}`;dt!==d1&&(t.font=dt,d1=dt),U=Sz(t,D,I1,W.sourceIndex,Q1,v1,St,I,C0>0,J1,y,R,L,(h1=Ma?.hoverAmount)!=null?h1:0,C,k,Z,U,F,_)}return I1.style==="faded"&&(t.globalAlpha=1),i1--,jt&&(t.restore(),(e1=U?.deprep)==null||e1.call(U,{ctx:t}),U=void 0,Y(),d1=f1,t.font=f1),i1<=0}),t.restore(),i1<=0}),O}function Ib(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p,z,w,s){w!==void 0||a[a.length-1]!==e[a.length-1]||h4(a,h,l,o,i,(f,m,H,x,y)=>{if(f!==a[a.length-1])return;m+=f.width;let R=Math.max(m,x);R>r||(t.save(),t.beginPath(),t.rect(R,i+1,1e4,n-i-1),t.clip(),ai(y,H,n,c,v,p,(L,V,C,k)=>{if(!k&&z.length>0&&!z.some(i1=>ye(m,L,1e4,C,i1.x,i1.y,i1.width,i1.height)))return;let b=d.hasIndex(V),F=u.hasIndex(V);t.beginPath();let _=g?.(V),j=_===void 0?s:{...s,..._};j.bgCell!==s.bgCell&&(t.fillStyle=j.bgCell,t.fillRect(m,L,1e4,C)),F&&(t.fillStyle=j.bgHeader,t.fillRect(m,L,1e4,C)),b&&(t.fillStyle=j.accentLight,t.fillRect(m,L,1e4,C))}),t.restore())})}function Ob(t,a,e,r,n,i,l,o,h){var c;let v=!1;for(let p of a)if(!p.sticky){v=l(p.sourceIndex);break}let g=(c=h.horizontalBorderColor)!=null?c:h.borderColor,d=h.borderColor,u=v?ur(a):0;if(u!==0&&(t.beginPath(),t.moveTo(u+.5,0),t.lineTo(u+.5,r),t.strokeStyle=Ve(d,h.bgCell),t.stroke()),n){let p=o(i-1);t.beginPath(),t.moveTo(0,r-p+.5),t.lineTo(e,r-p+.5),t.strokeStyle=Ve(g,h.bgCell),t.stroke()}}function Db(t,a,e,r,n,i,l,o,h,c,v,g,d,u,p){let z=p?.filter(m=>m.style!=="no-outline");if(z===void 0||z.length===0)return;let w=z.map(m=>{var H,x,y,R,L;let V=m.range,C=Kn(V.x,V.y,a,e,v,c+v,r,n,i,l,u,h,d,o,g);if(V.width===1&&V.height===1)return V.x=h){let b=Kn(h-1,V.y+V.height-1,a,e,v,c+v,r,n,i,l,u,h,d,o,g),F=Kn(h,V.y+V.height-1,a,e,v,c+v,r,n,i,l,u,h,d,o,g);return[{color:m.color,style:(y=m.style)!=null?y:"dashed",rect:{x:C.x,y:C.y,width:b.x+b.width-C.x,height:b.y+b.height-C.y}},{color:m.color,style:(R=m.style)!=null?R:"dashed",rect:{x:F.x,y:F.y,width:k.x+k.width-F.x,height:k.y+k.height-F.y}}]}else return[void 0,{color:m.color,style:(L=m.style)!=null?L:"dashed",rect:{x:C.x,y:C.y,width:k.x+k.width-C.x,height:k.y+k.height-C.y}}]}),s=ur(o),f=()=>{t.beginPath(),t.save();let m=!1,H=y=>{m!==y&&(t.setLineDash(y?[5,3]:[]),m=y)};t.lineWidth=1;for(let y of w){let[R]=y;R!==void 0&&ye(0,0,a,e,R.rect.x,R.rect.y,R.rect.width,R.rect.height)&&(H(R.style==="dashed"),t.strokeStyle=fr(R.color,1),t.strokeRect(R.rect.x+1,R.rect.y+1,R.rect.width-2,R.rect.height-2))}let x=!1;for(let y of w){let[,R]=y;R!==void 0&&ye(0,0,a,e,R.rect.x,R.rect.y,R.rect.width,R.rect.height)&&(H(R.style==="dashed"),!x&&R.rect.x{var C;return V.sourceIndex===((C=v.current)==null?void 0:C.cell[0])}))return;let[s,f]=v.current.cell,m=d(v.current.cell),H=(w=m.span)!=null?w:[s,s],x=u==="sticky"&&f===z-1,y=u==="sticky"&&!x?g(z-1)-1:0,R;if(h4(l,r,n,i,c,(V,C,k,b,F)=>{if(!(V.sticky&&s>V.sourceIndex)&&!(V.sourceIndexH[1]))return ai(F,k,e,z,g,u,(_,j,i1)=>{if(j!==f)return;let Z=C,d1=V.width;if(m.span!==void 0){let O=Ez(m.span,C,_,V.width,i1,V,o),a1=V.sticky?O[0]:O[1];a1!==void 0&&(Z=a1.x,d1=a1.width)}return R=()=>{var O,a1,W,L1;b>Z&&!V.sticky&&(t.beginPath(),t.rect(b,0,a-b,e),t.clip()),t.beginPath(),t.rect(Z+.5,_+.5,d1,i1),t.strokeStyle=(a1=(O=V.themeOverride)==null?void 0:O.accentColor)!=null?a1:h.accentColor,t.lineWidth=1,t.stroke(),p&&(t.beginPath(),t.rect(Z+d1-4,_+i1-4,4,4),t.fillStyle=(L1=(W=V.themeOverride)==null?void 0:W.accentColor)!=null?L1:h.accentColor,t.fill())},!0}),!0}),R===void 0)return;let L=()=>{t.save(),t.beginPath(),t.rect(0,c,a,e-c-y),t.clip(),R?.(),t.restore()};return L(),L}function Nb(t,a,e,r,n,i,l,o,h){let c=0;return h4(t,i,r,n,e,(v,g,d,u,p)=>(ai(p,d,a,l,o,h,(z,w,s,f)=>{f||(c=Math.max(w,c))}),!0)),c}function $b(t,a){if(a===void 0||t.width!==a.width||t.height!==a.height||t.theme!==a.theme||t.headerHeight!==a.headerHeight||t.rowHeight!==a.rowHeight||t.rows!==a.rows||t.getRowThemeOverride!==a.getRowThemeOverride||t.isFocused!==a.isFocused||t.isResizing!==a.isResizing||t.verticalBorder!==a.verticalBorder||t.getCellContent!==a.getCellContent||t.highlightRegions!==a.highlightRegions||t.selection!==a.selection||t.dragAndDropState!==a.dragAndDropState||t.prelightCells!==a.prelightCells||t.touchMode!==a.touchMode||t.scrolling!==a.scrolling)return!1;if(t.mappedColumns!==a.mappedColumns){if(t.mappedColumns.length>100||t.mappedColumns.length!==a.mappedColumns.length)return!1;let e;for(let r=0;rx:x;D1.save(),D1.beginPath(),B1.save(),B1.beginPath(),D1.textBaseline="middle",B1.textBaseline="middle",x1!==1&&(D1.scale(x1,x1),B1.scale(x1,x1));let u1=A8(d,h,l,z,v),M1=[],I1=s&&((r=L.current)==null?void 0:r.cell[1])===c&&g===0,Q1=()=>{var ot,J1;Pb(D1,u1,u,o1,l,v,f,m,z,R,L,w,H1,L1,y,F,N,Z,K1),Dp(D1,u1,c,v,g,l,o,void 0,void 0,m,v1,e1,_,y,C,k,w,!0),D1.beginPath(),D1.moveTo(0,D-.5),D1.lineTo(l,D-.5),D1.strokeStyle=Ve((J1=(ot=w.headerBottomBorderColor)!=null?ot:w.horizontalBorderColor)!=null?J1:w.borderColor,w.bgHeader),D1.stroke(),I1&&y8(D1,l,o,c,v,g,u1,d,w,v1,L,e1,b,C,V,k)};if(N!==void 0){let ot=!1;N=N.filter(J1=>(ot=ot||J1[1]<0,J1[1]<0||ye(h,c,u1.length,300,J1[0],J1[1],1,1)||ye(0,c,p,300,J1[0],J1[1],1,1)||C&&ye(h,k-1,u1.length,1,J1[0],J1[1],1,1))),N.length>0&&(Np(B1,u1,l,o,m,v1,v,g,c,k,e1,C,N,!0),B1.fillStyle=w.bgCell,B1.fillRect(0,v1+1,l,o-v1-1),$p(B1,u1,d,o,v1,v,g,c,k,e1,b,F,_,H,j,s,C,M1,N,L,d1,O,i1,a1,H1,L1,o1,p1,w,W1,Bt),V&&s&&L.current!==void 0&&N.some(J1=>{var Jt,Mt;return J1[0]===((Jt=L.current)==null?void 0:Jt.cell[0])&&J1[1]===((Mt=L.current)==null?void 0:Mt.cell[1])})&&y8(B1,l,o,c,v,g,u1,d,w,v1,L,e1,b,C,V,k)),ot&&(Np(D1,u1,l,v1,m,v1,v,g,c,k,e1,C,N,!1),Q1()),B1.restore(),D1.restore(),C1!==null&&(C1.fillStyle=w.bgCell,C1.fillRect(0,0,l,o),C1.drawImage(B1.canvas,0,0));return}if((f1!==!0||h!==I?.cellXOffset||v!==I?.translateX||I1!==I?.mustDrawFocusOnHeader)&&Q1(),f1===!0){i2(h1!==void 0&&I!==void 0);let{regions:ot}=Eb(B1,h1,I,h,c,v,g,C==="sticky",l,o,k,v1,x1,d,u1,x,s1);M1=ot}else f1!==!1&&(i2(I!==void 0),M1=_b(I,h,c,v,g,l,o,v1,u1,f1));Ob(B1,u1,l,o,C==="sticky",k,y,e1,w);let St=s?y8(B1,l,o,c,v,g,u1,d,w,v1,L,e1,b,C,V,k):void 0,jt=Db(B1,l,o,h,c,v,g,d,p,f,m,x,C==="sticky",k,O);if(B1.fillStyle=w.bgCell,M1.length>0){B1.beginPath();for(let ot of M1)B1.rect(ot.x,ot.y,ot.width,ot.height);B1.clip(),B1.fill(),B1.beginPath()}else B1.fillRect(0,0,l,o);let Ut=$p(B1,u1,d,o,v1,v,g,c,k,e1,b,F,_,H,j,s,C,M1,N,L,d1,O,i1,a1,H1,L1,o1,p1,w,W1,Bt);Ib(B1,u1,d,l,o,v1,v,g,c,k,e1,_,L.rows,H,C,M1,N,w),Dp(B1,u1,c,v,g,l,o,M1,Ut,m,v1,e1,_,y,C,k,w),St?.(),jt?.(),C1!==null&&(C1.fillStyle=w.bgCell,C1.fillRect(0,0,l,o),C1.drawImage(B1.canvas,0,0));let Et=Nb(u1,o,v1,v,g,c,k,e1,C);a1?.setWindow({x:h,y:c,width:u1.length,height:Et-c},p),W.current={cellXOffset:h,cellYOffset:c,translateX:v,translateY:g,mustDrawFocusOnHeader:I1,lastBuffer:s1?et===X1?"a":"b":void 0},B1.restore(),D1.restore()}function ai(t,a,e,r,n,i,l){let o=a,h=t,c=i==="sticky";for(;o=e;v&&(c=!1,h=r-1);let g=n(h);if(v&&(o=e-g),!(c&&h===r-1)&&l(o,h,g,v,i!=="none"&&h===r-1)===!0||v)break;o+=g,h++}}function h4(t,a,e,r,n,i){let l=0,o=0,h=n+r;for(let c of t){let v=c.sticky?o:l+e;if(i(c,v,h,o,a)===!0)break;l+=c.width,o+=c.sticky?c.width:0}}function _z(t,a,e,r,n){var i;let l=0,o=0;for(let h=0;ha?.[0]===e?.[0]&&a?.[1]===e?.[1],this.addToLeavingItems=a=>{this.leavingItems.some(r=>this.areSameItems(r.item,a.item))||this.leavingItems.push(a)},this.removeFromLeavingItems=a=>{var e;let r=this.leavingItems.find(n=>this.areSameItems(n.item,a));return this.leavingItems=this.leavingItems.filter(n=>n!==r),(e=r?.hoverAmount)!=null?e:0},this.cleanUpLeavingElements=()=>{this.leavingItems=this.leavingItems.filter(a=>a.hoverAmount>0)},this.shouldStep=()=>{let a=this.leavingItems.length>0,e=this.currentHoveredItem!==void 0&&this.currentHoveredItem.hoverAmount<1;return a||e},this.getAnimatingItems=()=>this.currentHoveredItem!==void 0?[...this.leavingItems,this.currentHoveredItem]:this.leavingItems.map(a=>({...a,hoverAmount:Wb(a.hoverAmount)})),this.step=a=>{if(this.lastAnimationTime===void 0)this.lastAnimationTime=a;else{let r=(a-this.lastAnimationTime)/Ub;for(let i of this.leavingItems)i.hoverAmount=(0,b8.default)(i.hoverAmount-r,0,1);this.currentHoveredItem!==void 0&&(this.currentHoveredItem.hoverAmount=(0,b8.default)(this.currentHoveredItem.hoverAmount+r,0,1));let n=this.getAnimatingItems();this.callback(n),this.cleanUpLeavingElements()}this.shouldStep()?(this.lastAnimationTime=a,window.requestAnimationFrame(this.step)):this.lastAnimationTime=void 0},this.setHovered=a=>{var e;if(!this.areSameItems((e=this.currentHoveredItem)==null?void 0:e.item,a)){if(this.currentHoveredItem!==void 0&&this.addToLeavingItems(this.currentHoveredItem),a!==void 0){let r=this.removeFromLeavingItems(a);this.currentHoveredItem={item:a,hoverAmount:r}}else this.currentHoveredItem=void 0;this.lastAnimationTime===void 0&&window.requestAnimationFrame(this.step)}}}},qb=class{constructor(t){this.fn=t}get value(){var t;return(t=this.val)!=null?t:this.val=this.fn()}};function W8(t){return new qb(t)}var Gb=W8(()=>window.navigator.userAgent.includes("Firefox")),Tz=W8(()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")),E5=W8(()=>window.navigator.platform.toLowerCase().startsWith("mac"));function Kb(t,a){for(let e of t)if(e[0]===a[0]&&e[1]===a[1])return!0;return!1}function Xb(t){let a=l4.useRef([]),e=l4.useRef(0),r=l4.useRef(t);r.current=t;let n=l4.useCallback(()=>{let i=()=>window.requestAnimationFrame(l),l=()=>{let o=a.current;a.current=[],r.current(o),a.current.length>0?e.current++:e.current=0};window.requestAnimationFrame(e.current>600?i:l)},[]);return l4.useCallback(i=>{Kb(a.current,i)||(a.current.length===0&&n(),a.current.push(i))},[n])}var Yb=(t,a)=>{var e;if(t.kind===n1.Custom)return t.copyData;let r=a?.(t);return(e=r?.getAccessibilityString(t))!=null?e:""},Qb=(t,a)=>{var e,r,n,i,l,o,h,c;let{width:v,height:g,accessibilityHeight:d,columns:u,cellXOffset:p,cellYOffset:z,headerHeight:w,fillHandle:s=!1,groupHeaderHeight:f,rowHeight:m,rows:H,getCellContent:x,getRowThemeOverride:y,onHeaderMenuClick:R,enableGroups:L,isFilling:V,onCanvasFocused:C,onCanvasBlur:k,isFocused:b,selection:F,freezeColumns:_,onContextMenu:j,trailingRowType:i1,fixedShadowX:Z=!0,fixedShadowY:d1=!0,drawFocusRing:O=!0,onMouseDown:a1,onMouseUp:W,onMouseMoveRaw:L1,onMouseMove:p1,onItemHovered:o1,dragAndDropState:H1,firstColAccessible:P1,onKeyDown:K1,onKeyUp:W1,highlightRegions:Bt,canvasRef:T1,onDragStart:X1,onDragEnd:Y,eventTargetRef:N,isResizing:s1,isDragging:x1,isDraggable:f1=!1,allowResize:U,disabledRows:v1,getGroupDetails:D,theme:I,prelightCells:C1,headerIcons:D1,verticalBorder:et,drawHeader:B1,drawCustomCell:h1,onCellFocused:e1,onDragOverCell:u1,onDrop:M1,onDragLeave:I1,imageWindowLoader:Q1,smoothScrollX:St=!1,smoothScrollY:jt=!1,experimental:Ut,getCellRenderer:Et}=t,ot=(e=t.translateX)!=null?e:0,J1=(r=t.translateY)!=null?r:0,Jt=Math.max(_,Math.min(u.length-1,p)),Mt=r1.useRef(null),C0=r1.useMemo(()=>new yk,[]),Z0=Q1??C0,B0=r1.useRef(),[t0,Ma]=r1.useState(!1),dt=r1.useRef([]),At=r1.useRef(),[h0,wt]=r1.useState(),[Ft,qt]=r1.useState(),c2=r1.useRef(null),[v2,Ua]=r1.useState(!1),O2=r1.useRef(v2);O2.current=v2;let j0=r1.useMemo(()=>new Fb(D1,()=>{la.current=void 0,oa.current()}),[D1]),g2=L?f+w:w,D2=r1.useRef(-1),ri=Ut?.enableFirefoxRescaling!==!0;r1.useLayoutEffect(()=>{!Gb.value||window.devicePixelRatio===1||ri||(D2.current!==-1&&Ma(!0),window.clearTimeout(D2.current),D2.current=window.setTimeout(()=>{Ma(!1),D2.current=-1},200))},[z,Jt,ot,J1,ri]);let u0=Ek(u,_),Ht=r1.useCallback((S,G,b1)=>{let z1=S.getBoundingClientRect();if(G>=u0.length||b1>=H)return;let E1=z1.width/v,c1=Kn(G,b1,v,g,f,g2,Jt,z,ot,J1,H,_,i1==="sticky",u0,m);return E1!==1&&(c1.x*=E1,c1.y*=E1,c1.width*=E1,c1.height*=E1),c1.x+=z1.x,c1.y+=z1.y,c1},[v,g,f,g2,Jt,z,ot,J1,H,_,i1,u0,m]),m0=r1.useCallback((S,G,b1,z1)=>{var E1,c1;let $1=S.getBoundingClientRect(),st=$1.width/v,S1=(G-$1.left)/st,_1=(b1-$1.top)/st,a0=5,tt=A8(u0,Jt,v,void 0,ot),ut=0;z1 instanceof MouseEvent&&(ut=z1.button);let ht=Pk(S1,tt,ot),xt=Ik(_1,g,L,w,f,H,m,z,J1,i1==="sticky"),_t=z1?.shiftKey===!0,Ca=z1?.ctrlKey===!0,y2=z1?.metaKey===!0,C2=z1!==void 0&&!(z1 instanceof MouseEvent)||z1?.pointerType==="touch",N2=20,B2=[Math.abs(S1)v||_1>g){let G1=S1>v?-1:S1<0?1:0,Gt=_1>g?1:_1<0?-1:0,n0=!1;if(ht===-1&&xt===-1){let A0=Ht(S,u0.length-1,-1);i2(A0!==void 0),n0=G=0?(Gt=!0,G1=Ht(S,n0,xt),i2(G1!==void 0),u2={kind:L&&xt===-2?w2:we,location:[n0,xt],bounds:G1,group:(E1=u0[n0].group)!=null?E1:"",isEdge:Gt,shiftKey:_t,ctrlKey:Ca,metaKey:y2,isTouch:C2,localEventX:G-G1.x,localEventY:b1-G1.y,button:ut,scrollEdge:B2}):u2={kind:L&&xt===-2?w2:we,group:(c1=u0[ht].group)!=null?c1:"",location:[ht,xt],bounds:G1,isEdge:Gt,shiftKey:_t,ctrlKey:Ca,metaKey:y2,isTouch:C2,localEventX:G-G1.x,localEventY:b1-G1.y,button:ut,scrollEdge:B2}}else{let G1=Ht(S,ht,xt);i2(G1!==void 0);let Gt=G1!==void 0&&G1.x+G1.width-G{}),xr=r1.useRef(h0);xr.current=h0;let[Se,Ae]=r1.useMemo(()=>{let S=document.createElement("canvas"),G=document.createElement("canvas");return S.style.display="none",S.style.opacity="0",S.style.position="fixed",G.style.display="none",G.style.opacity="0",G.style.position="fixed",[S,G]},[]);r1.useLayoutEffect(()=>(document.documentElement.append(Se),document.documentElement.append(Ae),()=>{Se.remove(),Ae.remove()}),[Se,Ae]);let la=r1.useRef(),Ha=r1.useCallback(()=>{var S,G;let b1=Mt.current,z1=c2.current;if(b1===null||z1===null)return;let E1=la.current,c1={canvas:b1,bufferA:Se,bufferB:Ae,headerCanvas:z1,width:v,height:g,cellXOffset:Jt,cellYOffset:z,translateX:Math.round(ot),translateY:Math.round(J1),mappedColumns:u0,enableGroups:L,freezeColumns:_,dragAndDropState:H1,theme:I,headerHeight:w,groupHeaderHeight:f,disabledRows:v1??mt.empty(),rowHeight:m,verticalBorder:et,isResizing:s1,isFocused:b,selection:F,fillHandle:s,lastRowSticky:i1,rows:H,drawFocus:O,getCellContent:x,getGroupDetails:D??($1=>({name:$1})),getRowThemeOverride:y,drawCustomCell:h1,drawHeaderCallback:B1,prelightCells:C1,highlightRegions:Bt,imageLoader:Z0,lastBlitData:At,damage:B0.current,hoverValues:dt.current,hoverInfo:xr.current,spriteManager:j0,scrolling:t0,hyperWrapping:(S=Ut?.hyperWrapping)!=null?S:!1,touchMode:v2,enqueue:ni.current,renderStrategy:(G=Ut?.renderStrategy)!=null?G:Tz.value?"double-buffer":"single-buffer",getCellRenderer:Et};c1.damage===void 0?(la.current=c1,Up(c1,E1)):Up(c1,void 0)},[Se,Ae,v,g,Jt,z,ot,J1,u0,L,_,H1,I,w,f,v1,m,et,s1,b,F,s,i1,H,O,x,D,y,h1,B1,C1,Bt,Z0,j0,t0,Ut?.hyperWrapping,Ut?.renderStrategy,v2,Et]),oa=r1.useRef(Ha);r1.useLayoutEffect(()=>{Ha(),oa.current=Ha},[Ha]),r1.useLayoutEffect(()=>{(async()=>{var G;((G=document?.fonts)==null?void 0:G.ready)!==void 0&&(await document.fonts.ready,la.current=void 0,oa.current())})()},[]);let xa=r1.useCallback(S=>{B0.current=S,oa.current(),B0.current=void 0},[]),q5=Xb(xa);ni.current=q5;let ii=r1.useCallback(S=>{xa(S.map(G=>G.cell))},[xa]);Z0.setCallback(xa);let[G5,li]=r1.useState(!1),[c4,Fe]=ia??[],oi=c4!==void 0&&Fe===-1,wr=c4!==void 0&&Fe===-2,ke=!1,v4=!1,d2;if(c4!==void 0&&Fe!==void 0&&Fe>-1){let S=x([c4,Fe],!0);ke=S.kind===o2.NewRow||S.kind===o2.Marker&&S.markerKind!=="number",v4=S.kind===n1.Boolean&&S8(S),d2=S.cursor}let wa=x1?"grabbing":(Ft??!1)||s1?"col-resize":G5||V?"crosshair":d2!==void 0?d2:oi||ke||v4||wr?"pointer":"default",Wa=r1.useMemo(()=>({contain:"strict",display:"block",cursor:wa}),[wa]),hi=r1.useRef("default"),ci=N?.current;ci!=null&&hi.current!==Wa.cursor&&(ci.style.cursor=hi.current=Wa.cursor);let La=r1.useCallback((S,G,b1,z1)=>{if(D===void 0)return;let E1=D(S);if(E1.actions!==void 0){let c1=Az(G,E1.actions);for(let[$1,st]of c1.entries())if(Fz(st,b1+G.x,z1+st.y))return E1.actions[$1]}},[D]),ha=r1.useCallback((S,G,b1,z1)=>{let E1=u[G];if(!x1&&!s1&&E1.hasMenu===!0&&!(Ft??!1)){let c1=Ht(S,G,-1);i2(c1!==void 0);let $1=kz(c1.x,c1.y,c1.width,c1.height,N8(E1.title)==="rtl");if(b1>$1.x&&b1<$1.x+$1.width&&z1>$1.y&&z1<$1.y+$1.height)return c1}},[u,Ht,Ft,x1,s1]),M0=r1.useRef(0),Va=r1.useRef(),g4=r1.useRef(!1),Lr=r1.useCallback(S=>{let G=Mt.current,b1=N?.current;if(G===null||S.target!==G&&S.target!==b1)return;g4.current=!0;let z1,E1;if(S instanceof MouseEvent?(z1=S.clientX,E1=S.clientY):(z1=S.touches[0].clientX,E1=S.touches[0].clientY),S.target===b1&&b1!==null){let $1=b1.getBoundingClientRect();if(z1>$1.right||E1>$1.bottom)return}let c1=m0(G,z1,E1,S);Va.current=c1.location,c1.isTouch&&(M0.current=Date.now()),O2.current!==c1.isTouch&&Ua(c1.isTouch),!(c1.kind===we&&ha(G,c1.location[0],z1,E1)!==void 0)&&(c1.kind===w2&&La(c1.group,c1.bounds,c1.localEventX,c1.localEventY)!==void 0||(a1?.(c1),!c1.isTouch&&f1!==!0&&f1!==c1.kind&&S.preventDefault()))},[N,f1,m0,La,ha,a1]);W0("touchstart",Lr,window,!1),W0("mousedown",Lr,window,!1);let vi=r1.useCallback(S=>{var G,b1;let z1=Mt.current;if(g4.current=!1,W===void 0||z1===null)return;let E1=N?.current,c1=S.target!==z1&&S.target!==E1,$1,st;if(S instanceof MouseEvent){if($1=S.clientX,st=S.clientY,S.pointerType==="touch")return}else $1=S.changedTouches[0].clientX,st=S.changedTouches[0].clientY;let S1=m0(z1,$1,st,S);S1.isTouch&&M0.current!==0&&Date.now()-M0.current>500&&(S1={...S1,isLongTouch:!0}),O2.current!==S1.isTouch&&Ua(S1.isTouch),!c1&&S.cancelable&&S.preventDefault();let[_1]=S1.location,a0=ha(z1,_1,$1,st);if(S1.kind===we&&a0!==void 0){(S1.button!==0||((G=Va.current)==null?void 0:G[0])!==_1||((b1=Va.current)==null?void 0:b1[1])!==-1)&&W(S1,!0);return}else if(S1.kind===w2){let tt=La(S1.group,S1.bounds,S1.localEventX,S1.localEventY);if(tt!==void 0){S1.button===0&&tt.onClick(S1);return}}W(S1,c1)},[W,N,m0,ha,La]);W0("mouseup",vi,window,!1),W0("touchend",vi,window,!1);let K5=r1.useCallback(S=>{var G,b1;let z1=Mt.current;if(z1===null)return;let E1=N?.current,c1=S.target!==z1&&S.target!==E1,$1,st;S instanceof MouseEvent?($1=S.clientX,st=S.clientY):($1=S.changedTouches[0].clientX,st=S.changedTouches[0].clientY);let S1=m0(z1,$1,st,S);O2.current!==S1.isTouch&&Ua(S1.isTouch),!c1&&S.cancelable&&S.preventDefault();let[_1]=S1.location,a0=ha(z1,_1,$1,st);if(S1.kind===we&&a0!==void 0)S1.button===0&&((G=Va.current)==null?void 0:G[0])===_1&&((b1=Va.current)==null?void 0:b1[1])===-1&&R?.(_1,a0);else if(S1.kind===w2){let tt=La(S1.group,S1.bounds,S1.localEventX,S1.localEventY);tt!==void 0&&S1.button===0&&tt.onClick(S1)}},[N,m0,ha,R,La]);W0("click",K5,window,!1);let Lt=r1.useCallback(S=>{let G=Mt.current;if(G===null||j===void 0)return;let b1=m0(G,S.clientX,S.clientY,S);j(b1,()=>{S.cancelable&&S.preventDefault()})},[m0,j]);W0("contextmenu",Lt,(n=N?.current)!=null?n:null,!1);let ja=r1.useCallback(S=>{B0.current=S.map(G=>G.item),dt.current=S,oa.current(),B0.current=void 0},[]),s2=r1.useMemo(()=>new jb(ja),[ja]),P=r1.useRef(s2);P.current=s2,r1.useLayoutEffect(()=>{let S=P.current;if(ia===void 0||ia[1]<0){S.setHovered(ia);return}let G=x(ia),b1=Et(G);S.setHovered(b1===void 0&&G.kind===n1.Custom||b1?.needsHover===!0?ia:void 0)},[x,Et,ia]);let H0=r1.useRef(),V2=r1.useCallback(S=>{var G;let b1=Mt.current;if(b1===null)return;let z1=N?.current,E1=S.target!==b1&&S.target!==z1,c1=m0(b1,S.clientX,S.clientY,S);if(c1.kind!=="out-of-bounds"&&E1&&!g4.current&&!c1.isTouch)return;if(!j5(c1,H0.current))o1?.(c1),wt(c1.kind===O5?void 0:[c1.location,[c1.localEventX,c1.localEventY]]),H0.current=c1;else if(c1.kind==="cell"||c1.kind===we||c1.kind===w2){let st=[c1.location,[c1.localEventX,c1.localEventY]];if(wt(st),xr.current=st,c1.kind==="cell"){let S1=x(c1.location);(S1.kind===n1.Custom||((G=Et(S1))==null?void 0:G.needsHoverPosition)===!0)&&xa([c1.location])}else c1.kind===w2&&xa([c1.location])}let $1=c1.location[0]>=(P1?0:1);if(qt(c1.kind===we&&c1.isEdge&&$1&&U===!0),s&&F.current!==void 0){let[st,S1]=F.current.cell,_1=Ht(b1,st,S1),a0=S.clientX,tt=S.clientY;i2(_1!==void 0),li(a0>=_1.x+_1.width-6&&a0<=_1.x+_1.width&&tt>=_1.y+_1.height-6&&tt<=_1.y+_1.height)}else li(!1);L1?.(S),p1(c1)},[N,m0,P1,U,s,F,L1,p1,o1,x,Et,xa,Ht]);W0("mousemove",V2,window,!0);let X5=r1.useCallback(S=>{let G=Mt.current;if(G===null)return;let b1,z1;F.current!==void 0&&(b1=Ht(G,F.current.cell[0],F.current.cell[1]),z1=F.current.cell),K1?.({bounds:b1,stopPropagation:()=>S.stopPropagation(),preventDefault:()=>S.preventDefault(),cancel:()=>{},ctrlKey:S.ctrlKey,metaKey:S.metaKey,shiftKey:S.shiftKey,altKey:S.altKey,key:S.key,keyCode:S.keyCode,rawEvent:S,location:z1})},[K1,F,Ht]),gi=r1.useCallback(S=>{let G=Mt.current;if(G===null)return;let b1,z1;F.current!==void 0&&(b1=Ht(G,F.current.cell[0],F.current.cell[1]),z1=F.current.cell),W1?.({bounds:b1,stopPropagation:()=>S.stopPropagation(),preventDefault:()=>S.preventDefault(),cancel:()=>{},ctrlKey:S.ctrlKey,metaKey:S.metaKey,shiftKey:S.shiftKey,altKey:S.altKey,key:S.key,keyCode:S.keyCode,rawEvent:S,location:z1})},[W1,F,Ht]),Y5=r1.useCallback(S=>{Mt.current=S,T1!==void 0&&(T1.current=S)},[T1]),Q5=r1.useCallback(S=>{let G=Mt.current;if(G===null||f1===!1||s1){S.preventDefault();return}let b1,z1,E1=m0(G,S.clientX,S.clientY);if(f1!==!0&&E1.kind!==f1){S.preventDefault();return}let c1=(tt,ut)=>{b1=tt,z1=ut},$1,st,S1,_1=(tt,ut,ht)=>{$1=tt,st=ut,S1=ht},a0=!1;if(X1?.({...E1,setData:c1,setDragImage:_1,preventDefault:()=>a0=!0,defaultPrevented:()=>a0}),!a0&&b1!==void 0&&z1!==void 0&&S.dataTransfer!==null)if(S.dataTransfer.setData(b1,z1),S.dataTransfer.effectAllowed="copyLink",$1!==void 0&&st!==void 0&&S1!==void 0)S.dataTransfer.setDragImage($1,st,S1);else{let[tt,ut]=E1.location;if(ut!==void 0){let ht=document.createElement("canvas"),xt=Ht(G,tt,ut);i2(xt!==void 0),ht.width=xt.width,ht.height=xt.height;let _t=ht.getContext("2d");_t!==null&&(_t.textBaseline="middle",ut===-1?(_t.font=`${I.headerFontStyle} ${I.fontFamily}`,_t.fillStyle=I.bgHeader,_t.fillRect(0,0,ht.width,ht.height),bz(_t,0,0,xt.width,xt.height,u0[tt],!1,I,!1,!1,0,j0,B1,!1)):(_t.font=`${I.baseFontStyle} ${I.fontFamily}`,_t.fillStyle=I.bgCell,_t.fillRect(0,0,ht.width,ht.height),Sz(_t,ut,x([tt,ut]),0,0,0,xt.width,xt.height,!1,I,h1,Z0,j0,1,void 0,!1,0,void 0,void 0,Et))),ht.style.left="-100%",ht.style.position="absolute",document.body.append(ht),S.dataTransfer.setDragImage(ht,xt.width/2,xt.height/2),window.setTimeout(()=>{ht.remove()},0)}}else S.preventDefault()},[f1,s1,m0,X1,Ht,I,u0,j0,B1,x,h1,Z0,Et]);W0("dragstart",Q5,(i=N?.current)!=null?i:null,!1,!1);let d4=r1.useRef(),q=r1.useCallback(S=>{var G;let b1=Mt.current;if(M1!==void 0&&S.preventDefault(),b1===null||u1===void 0)return;let z1=m0(b1,S.clientX,S.clientY),[E1,c1]=z1.location,$1=E1-(P1?0:1),[st,S1]=(G=d4.current)!=null?G:[];(st!==$1||S1!==c1)&&(d4.current=[$1,c1],u1([$1,c1],S.dataTransfer))},[P1,m0,u1,M1]);W0("dragover",q,(l=N?.current)!=null?l:null,!1,!1);let R2=r1.useCallback(()=>{d4.current=void 0,Y?.()},[Y]);W0("dragend",R2,(o=N?.current)!=null?o:null,!1,!1);let P0=r1.useCallback(S=>{let G=Mt.current;if(G===null||M1===void 0)return;S.preventDefault();let b1=m0(G,S.clientX,S.clientY),[z1,E1]=b1.location,c1=z1-(P1?0:1);M1([c1,E1],S.dataTransfer)},[P1,m0,M1]);W0("drop",P0,(h=N?.current)!=null?h:null,!1,!1);let Z5=r1.useCallback(()=>{I1?.()},[I1]);W0("dragleave",Z5,(c=N?.current)!=null?c:null,!1,!1);let di=r1.useRef(F);di.current=F;let Ra=r1.useRef(null),J0=r1.useCallback(S=>{var G;Mt.current===null||!Mt.current.contains(document.activeElement)||(S===null&&di.current.current!==void 0?(G=T1?.current)==null||G.focus({preventScroll:!0}):S!==null&&S.focus({preventScroll:!0}),Ra.current=S)},[T1]);r1.useImperativeHandle(a,()=>({focus:()=>{var S;let G=Ra.current;G===null||!document.contains(G)?(S=T1?.current)==null||S.focus({preventScroll:!0}):G.focus({preventScroll:!0})},getBounds:(S,G)=>{if(!(T1===void 0||T1.current===null))return Ht(T1.current,S,G??-1)},damage:ii}),[T1,ii,Ht]);let ya=r1.useRef(),J5=Sk(()=>{var S,G,b1,z1;if(v<50)return null;let E1=A8(u0,Jt,v,H1,ot),c1=P1?0:-1;!P1&&((S=E1[0])==null?void 0:S.sourceIndex)===0&&(E1=E1.slice(1));let[$1,st]=(b1=(G=F.current)==null?void 0:G.cell)!=null?b1:[],S1=(z1=F.current)==null?void 0:z1.range,_1=E1.map(tt=>tt.sourceIndex),a0=(0,Cz.default)(z,Math.min(H,z+d));return $1!==void 0&&st!==void 0&&!(_1.includes($1)&&a0.includes(st))&&J0(null),r1.createElement("table",{key:"access-tree",role:"grid","aria-rowcount":H+1,"aria-multiselectable":"true","aria-colcount":u0.length+c1},r1.createElement("thead",{role:"rowgroup"},r1.createElement("tr",{role:"row","aria-rowindex":1},E1.map(tt=>r1.createElement("th",{role:"columnheader","aria-selected":F.columns.hasIndex(tt.sourceIndex),"aria-colindex":tt.sourceIndex+1+c1,tabIndex:-1,onFocus:ut=>{if(ut.target!==Ra.current)return e1?.([tt.sourceIndex,-1])},key:tt.sourceIndex},tt.title)))),r1.createElement("tbody",{role:"rowgroup"},a0.map(tt=>r1.createElement("tr",{role:"row","aria-selected":F.rows.hasIndex(tt),key:tt,"aria-rowindex":tt+2},E1.map(ut=>{let ht=ut.sourceIndex,xt=`${ht},${tt}`,_t=$1===ht&&st===tt,Ca=S1!==void 0&&ht>=S1.x&&ht=S1.y&&tt{let B2=T1?.current;if(B2!=null)return K1?.({bounds:Ht(B2,ht,tt),cancel:()=>{},preventDefault:()=>{},stopPropagation:()=>{},ctrlKey:!1,key:"Enter",keyCode:13,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:C2})},onFocusCapture:B2=>{var u2,G1;if(!(B2.target===Ra.current||((u2=ya.current)==null?void 0:u2[0])===ht&&((G1=ya.current)==null?void 0:G1[1])===tt))return ya.current=C2,e1?.(C2)},ref:_t?J0:void 0,tabIndex:-1},Yb(N2,Et))})))))},[v,u0,Jt,H1,ot,H,z,d,F,J0,x,T1,K1,Ht,e1],200),Vr=Z?ur(u0,H1):0,s4=_===0||!Z?0:Jt>_?1:(0,F8.default)(-ot/100,0,1),Rr=-z*32+J1,c0=d1?(0,F8.default)(-Rr/100,0,1):0,S0=r1.useMemo(()=>{if(!s4&&!c0)return null;let S={position:"absolute",top:0,left:Vr,width:v-Vr,height:g,opacity:s4,pointerEvents:"none",transition:St?void 0:"opacity 0.2s",boxShadow:"inset 13px 0 10px -13px rgba(0, 0, 0, 0.2)"},G={position:"absolute",top:g2,left:0,width:v,height:g,opacity:c0,pointerEvents:"none",transition:jt?void 0:"opacity 0.2s",boxShadow:"inset 0 13px 10px -13px rgba(0, 0, 0, 0.2)"};return r1.createElement(r1.Fragment,null,s4>0&&r1.createElement("div",{id:"shadow-x",style:S}),c0>0&&r1.createElement("div",{id:"shadow-y",style:G}))},[s4,c0,Vr,v,St,g2,g,jt]),v0=r1.useMemo(()=>({position:"absolute",top:0,left:0}),[]);return r1.createElement(r1.Fragment,null,r1.createElement("canvas",{"data-testid":"data-grid-canvas",tabIndex:0,onKeyDown:X5,onKeyUp:gi,onFocus:C,onBlur:k,ref:Y5,style:Wa},J5),r1.createElement("canvas",{ref:c2,style:v0}),S0)},Zb=r1.memo(r1.forwardRef(Qb));function qn(t,a,e,r){var n;return(0,dz.default)(Math.round(a-((n=t.growOffset)!=null?n:0)),Math.ceil(e),Math.floor(r))}var Jb=t=>{var a;let[e,r]=It.useState(),[n,i]=It.useState(),[l,o]=It.useState(),[h,c]=It.useState(),[v,g]=It.useState(!1),[d,u]=It.useState(),[p,z]=It.useState(),[w,s]=It.useState(),[f,m]=It.useState(!1),[H,x]=It.useState(),{onHeaderMenuClick:y,getCellContent:R,onColumnMoved:L,onColumnResize:V,onColumnResizeStart:C,onColumnResizeEnd:k,gridRef:b,maxColumnWidth:F,minColumnWidth:_,onRowMoved:j,lockColumns:i1,onMouseDown:Z,onMouseUp:d1,onItemHovered:O,onDragStart:a1,canvasRef:W}=t,L1=((a=V??k)!=null?a:C)!==void 0,{columns:p1,selection:o1}=t,H1=o1.columns,P1=It.useCallback(U=>{let[v1,D]=U.location;l!==void 0&&h!==v1&&v1>=i1?(g(!0),c(v1)):p!==void 0&&D!==void 0?(m(!0),s(Math.max(0,D))):O?.(U)},[l,p,h,O,i1]),K1=L!==void 0,W1=It.useCallback(U=>{var v1,D;if(U.button===0){let[I,C1]=U.location;if(U.kind==="out-of-bounds"&&U.isEdge&&L1){let D1=(v1=b?.current)==null?void 0:v1.getBounds(p1.length-1,-1);D1!==void 0&&(r(D1.x),i(p1.length-1))}else if(U.kind==="header"&&I>=i1){let D1=W?.current;if(U.isEdge&&L1&&D1){r(U.bounds.x),i(I);let B1=D1.getBoundingClientRect().width/D1.offsetWidth,h1=U.bounds.width/B1;C?.(p1[I],h1,I,h1+((D=p1[I].growOffset)!=null?D:0))}else U.kind==="header"&&K1&&(u(U.bounds.x),o(I))}else U.kind==="cell"&&i1>0&&I===0&&C1!==void 0&&j!==void 0&&(x(U.bounds.y),z(C1))}Z?.(U)},[Z,L1,i1,j,b,p1,K1,C,W]),Bt=It.useCallback((U,v1)=>{v||f||y?.(U,v1)},[v,f,y]),T1=It.useRef(-1),X1=It.useCallback(()=>{T1.current=-1,z(void 0),s(void 0),x(void 0),m(!1),o(void 0),c(void 0),u(void 0),g(!1),i(void 0),r(void 0)},[]),Y=It.useCallback((U,v1)=>{var D,I,C1;if(U.button===0){if(n!==void 0){if(H1?.hasIndex(n)===!0)for(let et of H1){if(et===n)continue;let B1=p1[et],h1=qn(B1,T1.current,_,F);V?.(B1,h1,et,h1+((D=B1.growOffset)!=null?D:0))}let D1=qn(p1[n],T1.current,_,F);if(k?.(p1[n],D1,n,D1+((I=p1[n].growOffset)!=null?I:0)),H1.hasIndex(n))for(let et of H1){if(et===n)continue;let B1=p1[et],h1=qn(B1,T1.current,_,F);k?.(B1,h1,et,h1+((C1=B1.growOffset)!=null?C1:0))}}X1(),l!==void 0&&h!==void 0&&L?.(l,h),p!==void 0&&w!==void 0&&j?.(p,w)}d1?.(U,v1)},[d1,n,l,h,p,w,H1,k,p1,_,F,V,L,j,X1]),N=It.useMemo(()=>{if(!(l===void 0||h===void 0)&&l!==h)return{src:l,dest:h}},[l,h]),s1=It.useCallback(U=>{var v1,D;let I=W?.current;if(l!==void 0&&d!==void 0)Math.abs(U.clientX-d)>20&&g(!0);else if(p!==void 0&&H!==void 0)Math.abs(U.clientY-H)>20&&m(!0);else if(n!==void 0&&e!==void 0&&I){let D1=I.getBoundingClientRect().width/I.offsetWidth,et=(U.clientX-e)/D1,B1=p1[n],h1=qn(B1,et,_,F);if(V?.(B1,h1,n,h1+((v1=B1.growOffset)!=null?v1:0)),T1.current=et,H1?.first()===n)for(let e1 of H1){if(e1===n)continue;let u1=p1[e1],M1=qn(u1,T1.current,_,F);V?.(u1,M1,e1,M1+((D=u1.growOffset)!=null?D:0))}}},[l,d,p,H,n,e,p1,_,F,V,H1,W]),x1=It.useCallback((U,v1)=>{if(p===void 0||w===void 0)return R(U,v1);let[D,I]=U;return I===w?I=p:(I>w&&(I-=1),I>=p&&(I+=1)),R([D,I],v1)},[p,w,R]),f1=It.useCallback(U=>{a1?.(U),U.defaultPrevented()||X1()},[X1,a1]);return It.createElement(Zb,{accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,columns:t.columns,disabledRows:t.disabledRows,drawCustomCell:t.drawCustomCell,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,enableGroups:t.enableGroups,eventTargetRef:t.eventTargetRef,experimental:t.experimental,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,headerIcons:t.headerIcons,height:t.height,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,isDraggable:t.isDraggable,isFilling:t.isFilling,isFocused:t.isFocused,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDrop:t.onDrop,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseMove:t.onMouseMove,prelightCells:t.prelightCells,rowHeight:t.rowHeight,rows:t.rows,selection:t.selection,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,theme:t.theme,trailingRowType:t.trailingRowType,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,width:t.width,getCellContent:x1,isResizing:n!==void 0,onHeaderMenuClick:Bt,isDragging:v,onItemHovered:P1,onDragStart:f1,onMouseDown:W1,allowResize:L1,onMouseUp:Y,dragAndDropState:N,onMouseMoveRaw:s1,ref:b})},tE=Jb;function aE(t){let a=(0,zr.useRef)(null),[e,r]=(0,zr.useState)({width:t?.[0],height:t?.[1]});return(0,zr.useLayoutEffect)(()=>{let n=l=>{for(let o of l){let{width:h,height:c}=o&&o.contentRect||{};r(v=>v.width===h&&v.height===c?v:{width:h,height:c})}},i=new window.ResizeObserver(n);return a.current&&i.observe(a.current,void 0),()=>{i.disconnect()}},[a.current]),{ref:a,...e}}var eE=()=>t=>t.isSafari?"scroll":"auto",rE=L0("div")({name:"ScrollRegionStyle",class:"s1jz82f8",vars:{"s1jz82f8-0":[eE()]}});function C8(t){t.stopPropagation()}function nE(t){let[a,e]=lt.useState(!1),r=lt.useRef(0);return W0("touchstart",lt.useCallback(()=>{window.clearTimeout(r.current),e(!0)},[]),window,!0,!1),W0("touchend",lt.useCallback(n=>{n.touches.length===0&&(r.current=window.setTimeout(()=>e(!1),t))},[t]),window,!0,!1),a}var iE=t=>{var a,e,r,n;let{children:i,clientHeight:l,scrollHeight:o,scrollWidth:h,update:c,draggable:v,className:g,preventDiagonalScrolling:d=!1,paddingBottom:u=0,paddingRight:p=0,rightElement:z,rightElementProps:w,scrollRef:s,scrollToEnd:f,initialSize:m,minimap:H}=t,x=[],y=(a=w?.sticky)!=null?a:!1,R=(e=w?.fill)!=null?e:!1,L=lt.useRef(0),V=lt.useRef(0),C=lt.useRef(null),k=window.devicePixelRatio;lt.useEffect(()=>{let W1=C.current;W1===null||f!==!0||(W1.scrollLeft=W1.scrollWidth-W1.clientWidth)},[f]);let b=lt.useRef({scrollLeft:0,scrollTop:0,lockDirection:void 0}),F=lt.useRef(null),_=nE(200),[j,i1]=lt.useState(!0),Z=lt.useRef(0);lt.useEffect(()=>{if(!j||_||b.current.lockDirection===void 0)return;let W1=C.current;if(W1===null)return;let[Bt,T1]=b.current.lockDirection;Bt!==void 0?W1.scrollLeft=Bt:T1!==void 0&&(W1.scrollTop=T1),b.current.lockDirection=void 0},[_,j]);let d1=lt.useCallback(()=>{var W1,Bt,T1,X1;let Y=C.current;if(Y===null)return;let N=Y.scrollTop,s1=Y.scrollLeft,x1=b.current.scrollTop,f1=b.current.scrollLeft,U=s1-f1,v1=N-x1;_&&U!==0&&v1!==0&&(Math.abs(U)>3||Math.abs(v1)>3)&&d&&b.current.lockDirection===void 0&&(b.current.lockDirection=Math.abs(U)0&&(Math.abs(C1)>2e3||I===0||I===D1)&&o>Y.scrollHeight+5){let et=I/D1,B1=(o-Y.clientHeight)*et;L.current=B1-I}D!==void 0&&(window.clearTimeout(Z.current),i1(!1),Z.current=window.setTimeout(()=>i1(!0),200)),c({x:s1,y:I+L.current,width:Y.clientWidth-p,height:Y.clientHeight-u,paddingRight:(X1=(T1=F.current)==null?void 0:T1.clientWidth)!=null?X1:0})},[u,p,o,c,d,_]),O=lt.useRef(d1);O.current=d1;let a1=lt.useRef(),W=lt.useRef(!1);lt.useEffect(()=>{W.current?d1():W.current=!0},[d1,u,p]);let L1=lt.useCallback(W1=>{C.current=W1,s!==void 0&&(s.current=W1)},[s]),p1=0,o1=0;for(x.push(lt.createElement("div",{key:p1++,style:{width:h,height:0}}));o1O.current(),0),a1.current={width:P1,height:K1}),(P1??0)===0||(K1??0)===0?lt.createElement("div",{ref:H1}):lt.createElement("div",{ref:H1},lt.createElement(rE,{isSafari:Tz.value},H,lt.createElement("div",{className:"dvn-underlay"},i),lt.createElement("div",{ref:L1,style:a1.current,draggable:v,onDragStart:W1=>{v||(W1.stopPropagation(),W1.preventDefault())},className:"dvn-scroller "+(g??""),onScroll:d1},lt.createElement("div",{className:"dvn-scroll-inner"+(z===void 0?" hidden":"")},lt.createElement("div",{className:"dvn-stack"},x),z!==void 0&<.createElement(lt.Fragment,null,!R&<.createElement("div",{className:"dvn-spacer"}),lt.createElement("div",{ref:F,onMouseDown:C8,onMouseUp:C8,onMouseMove:C8,style:{height:K1,maxHeight:l-Math.ceil(k%1),position:"sticky",top:0,paddingLeft:1,marginBottom:-40,marginRight:p,flexGrow:R?1:void 0,right:y?p??0:void 0,pointerEvents:"auto"}},z))))))},lE=L0("div")({name:"MinimapStyle",class:"m15w2ly5"}),oE=t=>{var a,e,r;let{columns:n,rows:i,rowHeight:l,headerHeight:o,groupHeaderHeight:h,enableGroups:c,freezeColumns:v,experimental:g,clientSize:d,className:u,onVisibleRegionChanged:p,scrollToEnd:z,scrollRef:w,preventDiagonalScrolling:s,rightElement:f,rightElementProps:m,overscrollX:H,overscrollY:x,showMinimap:y=!1,initialSize:R,smoothScrollX:L=!1,smoothScrollY:V=!1,isDraggable:C}=t,{paddingRight:k,paddingBottom:b}=g??{},[F,_]=d,j=d0.useRef(),i1=d0.useRef(),Z=d0.useRef(),d1=d0.useRef(),O=d0.useMemo(()=>{let f1=Math.max(0,H??0);for(let U of n)f1+=U.width;return f1},[n,H]),a1=c?o+h:o;if(typeof l=="number")a1+=i*l;else for(let f1=0;f1{var f1,U,v1;if(W.current===void 0)return;let D={...W.current},I=0,C1=D.x<0?-D.x:0,D1=0,et=0;D.x=D.x<0?0:D.x;let B1=0;for(let Q1=0;Q1=St+Q1.width)I+=Q1.width,et++,D1++;else if(D.x>St)I+=Q1.width,L?C1+=St-D.x:et++,D1++;else if(D.x+D.width>St)I+=Q1.width,D1++;else break}let h1=0,e1=0,u1=0;if(typeof l=="number")V?(e1=Math.floor(D.y/l),h1=e1*l-D.y):e1=Math.ceil(D.y/l),u1=Math.ceil(D.height/l)+e1,h1<0&&u1++;else{let Q1=0;for(let St=0;St=Q1+jt)Q1+=jt,e1++,u1++;else if(D.y>Ut)Q1+=jt,V?h1+=Ut-D.y:e1++,u1++;else if(D.y+D.height>jt/2+Q1)Q1+=jt,u1++;else break}}let M1={x:et,y:e1,width:D1-et,height:u1-e1},I1=j.current;(I1===void 0||I1.y!==M1.y||I1.x!==M1.x||I1.height!==M1.height||I1.width!==M1.width||i1.current!==C1||Z.current!==h1||D.width!==((f1=d1.current)==null?void 0:f1[0])||D.height!==((U=d1.current)==null?void 0:U[1]))&&(p?.({x:et,y:e1,width:D1-et,height:u1-e1},D.width,D.height,(v1=D.paddingRight)!=null?v1:0,C1,h1),j.current=M1,i1.current=C1,Z.current=h1,d1.current=[D.width,D.height])},[n,l,i,p,v,L,V]),p1=d0.useCallback(f1=>{W.current=f1,L1()},[L1]);d0.useEffect(()=>{L1()},[L1]);let o1=(a=w?.current)!=null?a:void 0,H1=(0,Pz.default)(O/a1,2/3,1.5),P1=200,K1=H1>1?P1:Math.ceil(P1*H1),W1=H1>1?Math.ceil(P1/H1):P1,Bt=K1/O,T1=W1/a1,X1=Math.min(F*Math.max(Bt,.01),K1),Y=Math.min(_*Math.max(T1,.01),W1),N=((e=o1?.scrollLeft)!=null?e:0)/(O-F)*(K1-X1),s1=((r=o1?.scrollTop)!=null?r:0)/(a1-_)*(W1-Y),x1=d0.useMemo(()=>{if(!y||X1===0||Y===0)return;let f1=U=>{if(o1===void 0)return;let v1=U.currentTarget.getBoundingClientRect(),D=U.clientX-v1.x-X1/2,I=U.clientY-v1.y-Y/2,C1=(O-o1.clientWidth)*(D/(K1-X1)),D1=(a1-o1.clientHeight)*(I/(W1-Y));o1.scrollTo({left:C1,top:D1,behavior:U.type==="mousemove"?"auto":"smooth"})};return d0.createElement(lE,{style:{width:K1,height:W1},"data-testid":"minimap-container",onMouseMove:U=>{U.buttons===1&&f1(U)},onClick:f1},d0.createElement("div",{className:"header"}),d0.createElement("div",{className:"locationMarker",onDragStart:U=>U.preventDefault(),style:{left:N,top:s1,width:X1,height:Y,borderRadius:Math.min(X1,Y*.2,9)}}))},[W1,a1,N,o1,y,s1,Y,X1,K1,O]);return d0.createElement(iE,{scrollRef:w,minimap:x1,className:u,preventDiagonalScrolling:s,draggable:C===!0||typeof C=="string",scrollWidth:O+(k??0),scrollHeight:a1+(b??0),clientHeight:_,rightElement:f,paddingBottom:b,paddingRight:k,rightElementProps:m,update:p1,initialSize:R,scrollToEnd:z},d0.createElement(tE,{eventTargetRef:w,width:F,height:_,accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,columns:t.columns,disabledRows:t.disabledRows,enableGroups:t.enableGroups,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellContent:t.getCellContent,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,isFilling:t.isFilling,isFocused:t.isFocused,lockColumns:t.lockColumns,maxColumnWidth:t.maxColumnWidth,minColumnWidth:t.minColumnWidth,onHeaderMenuClick:t.onHeaderMenuClick,onMouseMove:t.onMouseMove,prelightCells:t.prelightCells,rowHeight:t.rowHeight,rows:t.rows,selection:t.selection,theme:t.theme,trailingRowType:t.trailingRowType,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,drawCustomCell:t.drawCustomCell,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,experimental:t.experimental,gridRef:t.gridRef,headerIcons:t.headerIcons,isDraggable:t.isDraggable,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onColumnMoved:t.onColumnMoved,onColumnResize:t.onColumnResize,onColumnResizeEnd:t.onColumnResizeEnd,onColumnResizeStart:t.onColumnResizeStart,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDragStart:t.onDragStart,onDrop:t.onDrop,onItemHovered:t.onItemHovered,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onRowMoved:t.onRowMoved,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY}))},hE=oE,cE=()=>t=>t.showSearch?0:400,vE=L0("div")({name:"SearchWrapper",class:"sxep88s",vars:{"sxep88s-0":[cE(),"px"]}}),gE=q1.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},q1.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 244l144-144 144 144M256 120v292"})),dE=q1.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},q1.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M112 268l144 144 144-144M256 392V100"})),sE=q1.createElement("svg",{className:"button-icon",viewBox:"0 0 512 512"},q1.createElement("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M368 368L144 144M368 144L144 368"})),uE=10,fE=t=>{let{canvasRef:a,cellYOffset:e,rows:r,columns:n,searchInputRef:i,searchValue:l,searchResults:o,onSearchValueChange:h,getCellsForSelection:c,onSearchResultsChanged:v,showSearch:g=!1,onSearchClose:d}=t,[u]=q1.useState(()=>"search-box-"+Math.round(Math.random()*1e3)),[p,z]=q1.useState(""),w=l??p,s=q1.useCallback(O=>{z(O),h?.(O)},[h]),[f,m]=q1.useState(),H=q1.useRef(f);H.current=f,q1.useEffect(()=>{o!==void 0&&(o.length>0?m(O=>{var a1;return{rowsSearched:r,results:o.length,selectedIndex:(a1=O?.selectedIndex)!=null?a1:-1}}):m(void 0))},[r,o]);let x=q1.useRef(new AbortController),y=q1.useRef(),[R,L]=q1.useState([]),V=o??R,C=q1.useCallback(()=>{y.current!==void 0&&(window.cancelAnimationFrame(y.current),y.current=void 0,x.current.abort())},[]),k=q1.useRef(e);k.current=e;let b=q1.useCallback(O=>{let a1=new RegExp(O.replace(/([$()*+.?[\\\]^{|}-])/g,"\\$1"),"i"),W=k.current,L1=Math.min(10,r),p1=0;m(void 0),L([]);let o1=[],H1=async()=>{var P1,K1;if(c===void 0)return;let W1=performance.now(),Bt=r-p1,T1=c({x:0,y:W,width:n.length,height:Math.min(L1,Bt,r-W)},x.current.signal);typeof T1=="function"&&(T1=await T1());let X1=!1;for(let[U,v1]of T1.entries())for(let[D,I]of v1.entries()){let C1;switch(I.kind){case n1.Text:case n1.Number:C1=I.displayData;break;case n1.Uri:case n1.Markdown:C1=I.data;break;case n1.Boolean:C1=typeof I.data=="boolean"?I.data.toString():void 0;break;case n1.Image:case n1.Bubble:C1=I.data.join("\u{1F433}");break;case n1.Custom:C1=I.copyData;break}C1!==void 0&&a1.test(C1)&&(o1.push([D,U+W]),X1=!0)}let Y=performance.now();X1&&L([...o1]),p1+=T1.length,i2(p1<=r);let N=(K1=(P1=H.current)==null?void 0:P1.selectedIndex)!=null?K1:-1;m({results:o1.length,rowsSearched:p1,selectedIndex:N}),v?.(o1,N),W+L1>=r?W=0:W+=L1;let s1=Y-W1,x1=Math.max(s1,1),f1=uE/x1;L1=Math.ceil(L1*f1),p1{var O;d?.(),m(void 0),L([]),v?.([],-1),C(),(O=a?.current)==null||O.focus()},[C,a,d,v]),_=q1.useCallback(O=>{s(O.target.value),o===void 0&&(O.target.value===""?(m(void 0),L([]),C()):b(O.target.value))},[b,C,s,o]);q1.useEffect(()=>{g&&i.current!==null&&(s(""),i.current.focus({preventScroll:!0}))},[g,i,s]);let j=q1.useCallback(O=>{var a1;if((a1=O?.stopPropagation)==null||a1.call(O),f===void 0)return;let W=(f.selectedIndex+1)%f.results;m({...f,selectedIndex:W}),v?.(V,W)},[f,v,V]),i1=q1.useCallback(O=>{var a1;if((a1=O?.stopPropagation)==null||a1.call(O),f===void 0)return;let W=(f.selectedIndex-1)%f.results;W<0&&(W+=f.results),m({...f,selectedIndex:W}),v?.(V,W)},[v,V,f]),Z=q1.useCallback(O=>{(O.ctrlKey||O.metaKey)&&O.nativeEvent.code==="KeyF"||O.key==="Escape"?(F(),O.stopPropagation(),O.preventDefault()):O.key==="Enter"&&(O.shiftKey?i1():j())},[F,j,i1]);q1.useEffect(()=>()=>{C()},[C]);let d1=q1.useMemo(()=>{var O,a1,W;let L1;f!==void 0&&(L1=f.results>=1e3?"over 1000":`${f.results} result${f.results!==1?"s":""}`,f.selectedIndex>=0&&(L1=`${f.selectedIndex+1} of ${L1}`));let p1=P1=>{P1.stopPropagation()},H1={width:`${Math.floor(((O=f?.rowsSearched)!=null?O:0)/r*100)}%`};return q1.createElement(vE,{showSearch:g,onMouseDown:p1,onMouseMove:p1,onMouseUp:p1,onClick:p1},q1.createElement("div",{className:"search-bar-inner"},q1.createElement("input",{id:u,"aria-hidden":!g,"data-testid":"search-input",ref:i,onChange:_,value:w,tabIndex:g?void 0:-1,onKeyDownCapture:Z}),q1.createElement("button",{"aria-label":"Previous Result","aria-hidden":!g,tabIndex:g?void 0:-1,onClick:i1,disabled:((a1=f?.results)!=null?a1:0)===0},gE),q1.createElement("button",{"aria-label":"Next Result","aria-hidden":!g,tabIndex:g?void 0:-1,onClick:j,disabled:((W=f?.results)!=null?W:0)===0},dE),d!==void 0&&q1.createElement("button",{"aria-label":"Close Search","aria-hidden":!g,"data-testid":"search-close-button",tabIndex:g?void 0:-1,onClick:F},sE)),f!==void 0?q1.createElement(q1.Fragment,null,q1.createElement("div",{className:"search-status"},q1.createElement("div",{"data-testid":"search-result-area"},L1)),q1.createElement("div",{className:"search-progress",style:H1})):q1.createElement("div",{className:"search-status"},q1.createElement("label",{htmlFor:u},"Type to search")))},[F,j,i1,_,d,Z,r,f,w,g,u,i]);return q1.createElement(q1.Fragment,null,q1.createElement(hE,{prelightCells:V,accessibilityHeight:t.accessibilityHeight,canvasRef:t.canvasRef,cellXOffset:t.cellXOffset,cellYOffset:t.cellYOffset,className:t.className,clientSize:t.clientSize,columns:t.columns,disabledRows:t.disabledRows,enableGroups:t.enableGroups,fillHandle:t.fillHandle,firstColAccessible:t.firstColAccessible,fixedShadowX:t.fixedShadowX,fixedShadowY:t.fixedShadowY,freezeColumns:t.freezeColumns,getCellContent:t.getCellContent,getCellRenderer:t.getCellRenderer,getGroupDetails:t.getGroupDetails,getRowThemeOverride:t.getRowThemeOverride,groupHeaderHeight:t.groupHeaderHeight,headerHeight:t.headerHeight,highlightRegions:t.highlightRegions,imageWindowLoader:t.imageWindowLoader,initialSize:t.initialSize,isFilling:t.isFilling,isFocused:t.isFocused,lockColumns:t.lockColumns,maxColumnWidth:t.maxColumnWidth,minColumnWidth:t.minColumnWidth,onHeaderMenuClick:t.onHeaderMenuClick,onMouseMove:t.onMouseMove,onVisibleRegionChanged:t.onVisibleRegionChanged,overscrollX:t.overscrollX,overscrollY:t.overscrollY,preventDiagonalScrolling:t.preventDiagonalScrolling,rightElement:t.rightElement,rightElementProps:t.rightElementProps,rowHeight:t.rowHeight,rows:t.rows,scrollRef:t.scrollRef,selection:t.selection,showMinimap:t.showMinimap,theme:t.theme,trailingRowType:t.trailingRowType,translateX:t.translateX,translateY:t.translateY,verticalBorder:t.verticalBorder,drawCustomCell:t.drawCustomCell,drawFocusRing:t.drawFocusRing,drawHeader:t.drawHeader,experimental:t.experimental,gridRef:t.gridRef,headerIcons:t.headerIcons,isDraggable:t.isDraggable,onCanvasBlur:t.onCanvasBlur,onCanvasFocused:t.onCanvasFocused,onCellFocused:t.onCellFocused,onColumnMoved:t.onColumnMoved,onColumnResize:t.onColumnResize,onColumnResizeEnd:t.onColumnResizeEnd,onColumnResizeStart:t.onColumnResizeStart,onContextMenu:t.onContextMenu,onDragEnd:t.onDragEnd,onDragLeave:t.onDragLeave,onDragOverCell:t.onDragOverCell,onDragStart:t.onDragStart,onDrop:t.onDrop,onItemHovered:t.onItemHovered,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,onMouseDown:t.onMouseDown,onMouseUp:t.onMouseUp,onRowMoved:t.onRowMoved,smoothScrollX:t.smoothScrollX,smoothScrollY:t.smoothScrollY,scrollToEnd:t.scrollToEnd}),d1)},pE=fE,zE=()=>t=>Math.max(16,t.targetHeight-10),mE=L0("input")({name:"RenameInput",class:"r1kzy40b",vars:{"r1kzy40b-0":[zE(),"px"]}}),ME=t=>{let{bounds:a,group:e,onClose:r,canvasBounds:n,onFinish:i}=t,[l,o]=_5.default.useState(e);return _5.default.createElement(rz,{style:{position:"absolute",left:a.x-n.left+1,top:a.y-n.top,width:a.width-2,height:a.height},className:"c1sqdbw3",onClickOutside:r},_5.default.createElement(mE,{targetHeight:a.height,"data-testid":"group-rename-input",value:l,onBlur:r,onFocus:h=>h.target.setSelectionRange(0,l.length),onChange:h=>o(h.target.value),onKeyDown:h=>{h.key==="Enter"?i(l):h.key==="Escape"&&r()},autoFocus:!0}))},E8=150;function HE(t,a,e,r){var n,i;let l=r(a);return(i=(n=l?.measure)==null?void 0:n.call(l,t,a,e))!=null?i:E8}function Iz(t,a,e,r,n,i,l,o,h){let c=[];if(n!==void 0&&c.push(...n.map(d=>d[r]).map(d=>HE(t,d,a,h))),c.length>5&&o){let d=c.reduce((u,p)=>u+p)/c.length;c=c.filter(u=>u{if(typeof window>"u")return[null,null];let f=document.createElement("canvas");return f.style.display="none",f.style.opacity="0",f.style.position="fixed",[f,f.getContext("2d",{alpha:!1})]},[]);l2.useLayoutEffect(()=>(d&&document.documentElement.append(d),()=>{d?.remove()}),[d]);let p=l2.useRef({}),z=l2.useRef(),[w,s]=l2.useState();return l2.useLayoutEffect(()=>{let f=v.current;if(f===void 0||t.every(B5))return;let m=Math.max(1,10-Math.floor(t.length/1e4)),H=0;m1&&(m--,H=1);let x={x:0,y:0,width:t.length,height:Math.min(c.current,m)},y={x:0,y:c.current-1,width:t.length,height:1};(async()=>{let L=f(x,h.signal),V=H>0?f(y,h.signal):void 0,C;typeof L=="object"?C=L:C=await bp(L),V!==void 0&&(typeof V=="object"?C=[...C,...V]:C=[...C,...await bp(V)]),z.current=t,s(C)})()},[h.signal,t]),l2.useMemo(()=>{var f;let H=(()=>t.every(B5)?t:u===null?t.map(L=>B5(L)?L:{...L,width:E8}):(u.font=`${g.current.baseFontStyle} ${g.current.fontFamily}`,t.map((L,V)=>{if(B5(L))return L;if(p.current[L.id]!==void 0)return{...L,width:p.current[L.id]};if(w===void 0||z.current!==t||L.id===void 0)return{...L,width:E8};let C=Iz(u,l,L,V,w,n,i,!0,o);return p.current[L.id]=C.width,C})))(),x=0,y=0,R=[];for(let[L,V]of H.entries())x+=V.width,V.grow!==void 0&&V.grow>0&&(y+=V.grow,R.push(L));if(x0){let L=[...H],V=r-x,C=V;for(let k=0;k1&&t.startsWith("_")){if(Number.parseInt(t.slice(1))!==a.keyCode)return!1}else if(t!==a.key)return!1;return!0}function T0(t,a){if(t.length===0)return!1;let e=!1,r=!1,n=!1,i=!1,l=t.split("+"),o=l.pop();if(!wE(o,a))return!1;for(let h of l)switch(h){case"ctrl":e=!0;break;case"shift":r=!0;break;case"alt":n=!0;break;case"meta":i=!0;break;case"primary":E5.value?i=!0:e=!0;break}return a.altKey===n&&a.ctrlKey===e&&a.shiftKey===r&&a.metaKey===i}function LE(t,a,e,r,n,i){let l=T5.default.useCallback((c,v,g,d)=>{var u,p;(i==="cell"||i==="multi-cell")&&c!==void 0&&(c={...c,range:{x:c.cell[0],y:c.cell[1],width:1,height:1}});let z=e==="mixed"&&(g||d==="drag"),w=r==="mixed"&&z,s=n==="mixed"&&z,f={current:c===void 0?void 0:{...c,rangeStack:d==="drag"?(p=(u=t.current)==null?void 0:u.rangeStack)!=null?p:[]:[]},columns:w?t.columns:mt.empty(),rows:s?t.rows:mt.empty()};g&&(i==="multi-rect"||i==="multi-cell")&&f.current!==void 0&&t.current!==void 0&&(f={...f,current:{...f.current,rangeStack:[...t.current.rangeStack,t.current.range]}}),a(f,v)},[r,t,e,i,n,a]),o=T5.default.useCallback((c,v,g)=>{c=c??t.rows,v!==void 0&&(c=c.add(v));let d;if(n==="exclusive"&&c.length>0)d={current:void 0,columns:mt.empty(),rows:c};else{let u=g&&e==="mixed",p=g&&r==="mixed";d={current:u?t.current:void 0,columns:p?t.columns:mt.empty(),rows:c}}a(d,!1)},[r,t,e,n,a]),h=T5.default.useCallback((c,v,g)=>{c=c??t.columns,v!==void 0&&(c=c.add(v));let d;if(r==="exclusive"&&c.length>0)d={current:void 0,rows:mt.empty(),columns:c};else{let u=g&&e==="mixed",p=g&&n==="mixed";d={current:u?t.current:void 0,rows:p?t.rows:mt.empty(),columns:c}}a(d,!1)},[r,t,e,n,a]);return[l,o,h]}function VE(t,a,e,r,n){let i=_8.useCallback(c=>{var v;if(t===!0){let g=[];for(let d=c.y;d=n?u.push({kind:n1.Loading,allowOverlay:!1}):u.push(a([p,d]));g.push(u)}return g}return(v=t?.(c,r.signal))!=null?v:[]},[r.signal,a,t,n]),l=t!==void 0?i:void 0,o=_8.useCallback(c=>{if(l===void 0)return[];let v={...c,x:c.x-e};if(v.x<0){v.x=0,v.width--;let g=l(v,r.signal);return typeof g=="function"?async()=>(await g()).map(d=>[{kind:n1.Loading,allowOverlay:!1},...d]):g.map(d=>[{kind:n1.Loading,allowOverlay:!1},...d])}return l(v,r.signal)},[r.signal,l,e]);return[t!==void 0?o:void 0,l]}function RE(t,a,e,r,n){var i,l;let o=t;if(r==="allowPartial"||t.current===void 0)return t;if(a!==void 0){let h=!1;do{if(t?.current===void 0)break;let c=(i=t.current)==null?void 0:i.range,v=[];if(c.width>2){let u=a({x:c.x,y:c.y,width:1,height:c.height},n.signal);if(typeof u=="function")return o;v.push(...u);let p=a({x:c.x+c.width-1,y:c.y,width:1,height:c.height},n.signal);if(typeof p=="function")return o;v.push(...p)}else{let u=a({x:c.x,y:c.y,width:c.width,height:c.height},n.signal);if(typeof u=="function")return o;v.push(...u)}let g=c.x-e,d=c.x+c.width-1-e;for(let u of v)for(let p of u)p.span!==void 0&&(g=Math.min(p.span[0],g),d=Math.max(p.span[1],d));g===c.x-e&&d===c.x+c.width-1-e?h=!0:t={current:{cell:(l=t.current.cell)!=null?l:[0,0],range:{x:g+e,y:c.y,width:d-g+1,height:c.height},rangeStack:t.current.rangeStack},columns:t.columns,rows:t.rows}}while(!h)}return t}function Wp(t){return t.startsWith('"')&&t.endsWith('"')&&(t=t.slice(1,-1).replace(/""/g,'"')),t}function yE(t){var a;(function(o){o[o.None=0]="None",o[o.inString=1]="inString",o[o.inStringPostQuote=2]="inStringPostQuote"})(a||(a={}));let e=[],r=[],n=0,i=0;t=t.replace(/\r\n/g,` `);let l=0;for(let o of t){switch(i){case 0:o===" "||o===` `?(r.push(t.slice(n,l)),n=l+1,o===` `&&(e.push(r),r=[])):o==='"'&&(i=1);break;case 1:o==='"'&&(i=2);break;case 2:o==='"'?i=1:((o===" "||o===` `)&&(r.push(Wp(t.slice(n,l))),n=l+1,o===` -`&&(e.push(r),r=[])),i=0);break}l++}return n0;){let l=r.pop();if(l===void 0)break;l instanceof HTMLTableElement||l.nodeName==="TBODY"?r.push(...[...l.children].reverse()):l instanceof HTMLTableRowElement?(i!==void 0&&n.push(i),i=[],r.push(...[...l.children].reverse())):l instanceof HTMLTableCellElement&&i?.push((e=(a=l.innerText)!=null?a:l.textContent)!=null?e:"")}return i!==void 0&&n.push(i),n}function He(t){return/[\t\n",]/.test(t)&&(t=`"${t.replace(/"/g,'""')}"`),t}var CE=t=>{switch(t){case!0:return"TRUE";case!1:return"FALSE";case I8:return"INDETERMINATE";case Qn:return"";default:sr(t,`A boolean was formated with invalid type: ${typeof t}`)}};function Oz(t,a,e,r){var n,i;let l=r[a];if(t.span!==void 0&&t.span[0]!==l)return"";if(t.copyData!==void 0)return He(t.copyData);switch(t.kind){case l1.Text:case l1.Number:return He(e?(i=(n=t.data)==null?void 0:n.toString())!=null?i:"":t.displayData);case l1.Markdown:case l1.RowID:case l1.Uri:return He(t.data);case l1.Image:case l1.Bubble:return t.data.length===0?"":t.data.reduce((o,h)=>`${He(o)},${He(h)}`);case l1.Boolean:return CE(t.data);case l1.Loading:return e?"":"#LOADING";case l1.Protected:return e?"":"************";case l1.Drilldown:return t.data.length===0?"":t.data.map(o=>o.text).reduce((o,h)=>`${He(o)},${He(h)}`);case l1.Custom:return He(t.copyData);default:sr(t,`A cell was passed with an invalid kind: ${t.kind}`)}}function BE(t,a){return t.map(e=>e.map((r,n)=>Oz(r,n,!1,a)).join(" ")).join(` -`)}function qp(t,a,e){var r,n,i,l;let o=BE(t,a);if(((r=window.navigator.clipboard)==null?void 0:r.write)!==void 0||e!==void 0){let h=document.createElement("tbody");for(let c of t){let v=document.createElement("tr");for(let[g,d]of c.entries()){let u=document.createElement("td");if(d.kind===l1.Uri){let p=document.createElement("a");p.href=d.data,p.innerText=d.data,u.append(p)}else u.innerText=Oz(d,g,!0,a);v.append(u)}h.append(v)}if(((n=window.navigator.clipboard)==null?void 0:n.write)!==void 0)window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([`${h.outerHTML}
`],{type:"text/html"})})]);else if(e!==void 0&&e?.clipboardData!==null)try{e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",`${h.outerHTML}
`)}catch{(i=window.navigator.clipboard)==null||i.writeText(o)}}else(l=window.navigator.clipboard)==null||l.writeText(o);e?.preventDefault()}function Gp(t){return typeof t=="string"?t:`${t}px`}var SE=()=>t=>t.innerWidth,AE=()=>t=>t.innerHeight,FE=L0("div")({name:"Wrapper",class:"wzg2m5k",vars:{"wzg2m5k-0":[SE()],"wzg2m5k-1":[AE()]}}),kE=t=>{let{inWidth:a,inHeight:e,children:r,...n}=t;return Dz.createElement(FE,{innerHeight:Gp(e),innerWidth:Gp(a),...n},r)};function Nz(t){return t!==!0}var Kp=20,bE={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:"false"},kind:l1.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:t=>{var a;return Xk(t,t.cell.data,S8(t.cell),(a=t.cell.maxSize)!=null?a:Kp)},onDelete:t=>({...t,data:!1}),onClick:t=>{var a,e;let{cell:r,posX:n,posY:i,bounds:l,theme:o}=t,{width:h,height:c,x:v,y:g}=l,d=(a=r.maxSize)!=null?a:Kp,u=Math.floor(l.y+c/2),p=Mz(d,c,o.cellVerticalPadding),z=mz((e=r.contentAlign)!=null?e:"center",v,h,o.cellHorizontalPadding,p),w=zz(z,u,p),s=Hz(v+n,g+i,w);if(S8(r)&&s)return{...r,data:Nz(r.data)}},onPaste:(t,a)=>{let e=Qn;return t.toLowerCase()==="true"?e=!0:t.toLowerCase()==="false"?e=!1:t.toLowerCase()==="indeterminate"&&(e=I8),e===a.data?void 0:{...a,data:e}}},EE=2,_E=1300;function TE(t,a){let e=T8.default.useRef(0),[r,n]=t??[0,0];T8.default.useEffect(()=>{if(r===0&&n===0){e.current=0;return}let i=0,l=h=>{var c;if(i===0)i=h;else{let v=h-i;e.current=Math.min(1,e.current+v/_E);let g=e.current**1.618*v*EE;(c=a.current)==null||c.scrollBy(r*g,n*g),i=h}o=window.requestAnimationFrame(l)},o=window.requestAnimationFrame(l);return()=>window.cancelAnimationFrame(o)},[a,r,n])}var PE=L0("div")({name:"BubblesOverlayEditorStyle",class:"b1bqsp5z"}),IE=t=>{let{bubbles:a}=t;return P5.createElement(PE,null,a.map((e,r)=>P5.createElement("div",{key:r,className:"boe-bubble"},e)),P5.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},OE=IE,DE={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:l1.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(t,a,e)=>a.data.reduce((r,n)=>t.measureText(n).width+r+20,0)+2*e.cellHorizontalPadding-4,draw:t=>Yk(t,t.cell.data),provideEditor:()=>t=>{let{value:a}=t;return $z.createElement(OE,{bubbles:a.data})},onPaste:()=>{}},NE=L0("div")({name:"DrilldownOverlayEditorStyle",class:"df2kt4a"}),$E=t=>{let{drilldowns:a}=t;return Xn.createElement(NE,null,a.map((e,r)=>Xn.createElement("div",{key:r,className:"doe-bubble"},e.img!==void 0&&Xn.createElement("img",{src:e.img}),Xn.createElement("div",null,e.text))))},UE=$E,WE={getAccessibilityString:t=>t.data.map(a=>a.text).join(", "),kind:l1.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(t,a,e)=>a.data.reduce((r,n)=>t.measureText(n.text).width+r+20+(n.img!==void 0?18:0),0)+2*e.cellHorizontalPadding-4,draw:t=>Zk(t,t.cell.data),provideEditor:()=>t=>{let{value:a}=t;return Uz.createElement(UE,{drilldowns:a.data})},onPaste:()=>{}},jE=L0("div")({name:"ImageOverlayEditorStyle",class:"i1eozt10"}),qE=t=>{let{urls:a,canWrite:e,onEditClick:r,renderImage:n}=t,i=a.filter(o=>o!=="");if(i.length===0)return null;let l=i.length>1;return n4.createElement(jE,{"data-testid":"GDG-default-image-overlay-editor"},n4.createElement(jz.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(o=>{var h;let c=(h=n?.(o))!=null?h:n4.createElement("img",{draggable:!1,src:o});return n4.createElement("div",{className:"centering-container",key:o},c)})),e&&r&&n4.createElement("button",{className:"edit-icon",onClick:r},n4.createElement(D8,null)))},GE={getAccessibilityString:t=>t.data.join(", "),kind:l1.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:t=>{var a;return Jk(t,(a=t.cell.displayData)!=null?a:t.cell.data,t.cell.rounding,t.cell.contentAlign)},measure:(t,a)=>a.data.length*50,onDelete:t=>({...t,data:[]}),provideEditor:()=>t=>{let{value:a,onFinishedEditing:e,imageEditorOverride:r}=t;return Wz.createElement(r??qE,{urls:a.data,canWrite:a.allowAdd,onCancel:e,onChange:i=>{e({...a,data:[i]})}})},onPaste:(t,a)=>{t=t.trim();let r=t.split(",").map(n=>{try{return new URL(n),n}catch{return}}).filter(n=>n!==void 0);if(!(r.length===a.data.length&&r.every((n,i)=>n===a.data[i])))return{...a,data:r}}},KE={getAccessibilityString:()=>"",kind:l1.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:()=>{},onPaste:()=>{}},XE=L0("div")({name:"MarkdownContainer",class:"mlbeo71"}),YE=class extends P8.default.PureComponent{constructor(){super(...arguments),this.targetElement=null,this.containerRefHook=t=>{this.targetElement=t,this.renderMarkdownIntoDiv()}}renderMarkdownIntoDiv(){let{targetElement:t,props:a}=this;if(t===null)return;let{contents:e,createNode:r}=a,n=j1(e),i=document.createRange();i.selectNodeContents(t),i.deleteContents();let l=r?.(n);if(l===void 0){let h=document.createElement("template");h.innerHTML=n,l=h.content}t.append(l);let o=t.getElementsByTagName("a");for(let h of o)h.target="_blank",h.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),P8.default.createElement(XE,{ref:this.containerRefHook})}},QE=L0("textarea")({name:"InputBox",class:"ijuk0po"}),ZE=L0("div")({name:"ShadowBox",class:"saq3p5l"}),JE=L0("div")({name:"GrowingEntryStyle",class:"gf8vzix"}),Xp=0,N5=t=>{let{placeholder:a,value:e,onKeyDown:r,highlight:n,altNewline:i,validatedSelection:l,...o}=t,{onChange:h,className:c}=o,v=h2.useRef(null),g=e??"";i2(h!==void 0,"GrowingEntry must be a controlled input area");let[d]=h2.useState(()=>"input-box-"+(Xp=(Xp+1)%1e7));h2.useEffect(()=>{let p=v.current;if(p===null||p.disabled)return;let z=g.toString().length;p.focus(),p.setSelectionRange(n?0:z,z)},[]),h2.useLayoutEffect(()=>{var p;if(l!==void 0){let z=typeof l=="number"?[l,null]:l;(p=v.current)==null||p.setSelectionRange(z[0],z[1])}},[l]);let u=h2.useCallback(p=>{p.key==="Enter"&&p.shiftKey&&i===!0||r?.(p)},[i,r]);return h2.createElement(JE,{className:"gdg-growing-entry"},h2.createElement(ZE,{className:c},g+` -`),h2.createElement(QE,{...o,className:(c??"")+" gdg-input",id:d,ref:v,onKeyDown:u,value:g,placeholder:a,dir:"auto"}))},t_=()=>t=>t.targetWidth,Yp=L0("div")({name:"MarkdownOverlayEditorStyle",class:"mdwzdl1",vars:{"mdwzdl1-0":[t_(),"px"]}}),a_=t=>{let{value:a,onChange:e,forceEditMode:r,createNode:n,targetRect:i,onFinish:l,validatedSelection:o}=t,h=a.data,c=a.readonly===!0,[v,g]=R0.useState(h===""||r),d=R0.useCallback(()=>{g(p=>!p)},[]),u=h?"ml-6":"";return v?R0.createElement(Yp,{targetWidth:i.width-20},R0.createElement(N5,{autoFocus:!0,highlight:!1,validatedSelection:o,value:h,onKeyDown:p=>{p.key==="Enter"&&p.stopPropagation()},onChange:e}),R0.createElement("div",{className:`edit-icon checkmark-hover ${u}`,onClick:()=>l(a)},R0.createElement(Bk,null))):R0.createElement(Yp,{targetWidth:i.width},R0.createElement(YE,{contents:h,createNode:n}),!c&&R0.createElement(R0.Fragment,null,R0.createElement("div",{className:"spacer"}),R0.createElement("div",{className:`edit-icon edit-hover ${u}`,onClick:d},R0.createElement(D8,null))),R0.createElement("textarea",{className:"md-edit-textarea gdg-input",autoFocus:!0}))},e_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:l1.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Jn,measure:(t,a,e)=>{let r=a.data.split(` -`)[0];return t.measureText(r).width+2*e.cellHorizontalPadding},draw:t=>ti(t,t.cell.data,t.cell.contentAlign),onDelete:t=>({...t,data:""}),provideEditor:()=>t=>{let{onChange:a,value:e,target:r,onFinishedEditing:n,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:o}=t;return qz.createElement(a_,{onFinish:n,targetRect:r,value:e,validatedSelection:o,onChange:h=>a({...e,data:h.target.value}),forceEditMode:l,createNode:i})},onPaste:(t,a)=>t===a.data?void 0:{...a,data:t}},r_={getAccessibilityString:t=>t.row.toString(),kind:o2.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:jk,measure:()=>44,draw:t=>Gk(t,t.cell.row,t.cell.checked,t.cell.markerKind,t.cell.drawHandle),onClick:t=>{let{bounds:a,cell:e,posX:r,posY:n}=t,{width:i,height:l}=a,o=e.drawHandle?7+(i-7)/2:i/2,h=l/2;if(Math.abs(r-o)<=10&&Math.abs(n-h)<=10)return{...e,checked:!e.checked}},onPaste:()=>{}},n_={getAccessibilityString:()=>"",kind:o2.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:t=>Wk(t,t.cell.hint,t.cell.icon),onPaste:()=>{}},i_=o4.lazy(async()=>await Promise.resolve().then(()=>(Ap(),Sp))),l_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:l1.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Jn,draw:t=>ti(t,t.cell.displayData,t.cell.contentAlign),measure:(t,a)=>t.measureText(a.displayData).width+16,onDelete:t=>({...t,data:void 0}),provideEditor:()=>t=>{let{isHighlighted:a,onChange:e,value:r,validatedSelection:n}=t;return o4.createElement(o4.Suspense,{fallback:null},o4.createElement(i_,{highlight:a,disabled:r.readonly===!0,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:n,onChange:i=>{var l;return e({...r,data:Number.isNaN((l=i.floatValue)!=null?l:0)?0:i.floatValue})}}))},onPaste:(t,a)=>{let e=Number.parseFloat(t);if(!(Number.isNaN(e)||a.data===e))return{...a,data:e}}},o_={getAccessibilityString:()=>"",measure:()=>108,kind:l1.Protected,needsHover:!1,needsHoverPosition:!1,draw:Kk,onPaste:()=>{}},h_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:l1.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(t,a)=>Jn(t,a,t.theme.textLight),draw:t=>ti(t,t.cell.data,t.cell.contentAlign),measure:(t,a)=>t.measureText(a.data).width+16,provideEditor:()=>t=>{let{isHighlighted:a,onChange:e,value:r,validatedSelection:n}=t;return Gz.default.createElement(N5,{highlight:a,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:n,onChange:i=>e({...r,data:i.target.value})})},onPaste:()=>{}},c_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:l1.Text,needsHover:!1,needsHoverPosition:!1,drawPrep:Jn,useLabel:!0,draw:t=>(ti(t,t.cell.displayData,t.cell.contentAlign,t.cell.allowWrapping,t.hyperWrapping),!0),measure:(t,a,e)=>{let r=a.displayData.split(` -`).slice(0,a.allowWrapping===!0?void 0:1);return Math.max(...r.map(n=>t.measureText(n).width+2*e.cellHorizontalPadding))},onDelete:t=>({...t,data:""}),provideEditor:t=>({disablePadding:t.allowWrapping===!0,editor:a=>{let{isHighlighted:e,onChange:r,value:n,validatedSelection:i}=a;return Kz.createElement(N5,{style:t.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:e,autoFocus:n.readonly!==!0,disabled:n.readonly===!0,altNewline:!0,value:n.data,validatedSelection:i,onChange:l=>r({...n,data:l.target.value})})}}),onPaste:(t,a)=>t===a.data?void 0:{...a,data:t}},v_=L0("div")({name:"UriOverlayEditorStyle",class:"uf0sjo8"}),g_=t=>{let{uri:a,onChange:e,forceEditMode:r,readonly:n,validatedSelection:i,preview:l}=t,[o,h]=ea.useState(a===""||r),c=ea.useCallback(()=>{h(!0)},[]);return o?ea.createElement(N5,{validatedSelection:i,highlight:!0,autoFocus:!0,value:a,onChange:e}):ea.createElement(v_,null,ea.createElement("a",{className:"link-area",href:a,target:"_blank",rel:"noopener noreferrer"},l),!n&&ea.createElement("div",{className:"edit-icon",onClick:c},ea.createElement(D8,null)),ea.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},d_=g_,s_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:l1.Uri,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Jn,draw:t=>ti(t,t.cell.data,t.cell.contentAlign),measure:(t,a,e)=>t.measureText(a.data).width+e.cellHorizontalPadding*2,onDelete:t=>({...t,data:""}),provideEditor:()=>t=>{var a;let{onChange:e,value:r,forceEditMode:n,validatedSelection:i}=t;return Xz.createElement(d_,{forceEditMode:n,uri:r.data,preview:(a=r.displayData)!=null?a:r.data,validatedSelection:i,readonly:r.readonly===!0,onChange:l=>e({...r,data:l.target.value})})},onPaste:(t,a)=>t===a.data?void 0:{...a,data:t}},u_={[o2.Marker]:r_,[o2.NewRow]:n_,[l1.Boolean]:bE,[l1.Bubble]:DE,[l1.Drilldown]:WE,[l1.Image]:GE,[l1.Loading]:KE,[l1.Markdown]:e_,[l1.Number]:l_,[l1.Protected]:o_,[l1.RowID]:h_,[l1.Text]:c_,[l1.Uri]:s_},f_=0;function p_(t){return(0,tz.default)((0,B8.default)((0,B8.default)(t).filter(a=>a.span!==void 0).map(a=>{var e,r,n,i;return(0,i4.default)(((r=(e=a.span)==null?void 0:e[0])!=null?r:0)+1,((i=(n=a.span)==null?void 0:n[1])!=null?i:0)+1)})))}function A5(t,a){return t===void 0||a===0||t.columns.length===0&&t.current===void 0?t:{current:t.current===void 0?void 0:{cell:[t.current.cell[0]+a,t.current.cell[1]],range:{...t.current.range,x:t.current.range.x+a},rangeStack:t.current.rangeStack.map(e=>({...e,x:e.x+a}))},rows:t.rows,columns:t.columns.offset(a)}}var Qp={selectAll:!0,selectRow:!0,selectColumn:!0,downFill:!1,rightFill:!1,pageUp:!1,pageDown:!1,clear:!0,copy:!0,paste:!0,search:!1,first:!0,last:!0},Zp={kind:l1.Loading,allowOverlay:!1},F5={columns:mt.empty(),rows:mt.empty(),current:void 0},z_=(t,a)=>{var e,r,n,i,l;let[o,h]=$.useState(F5),[c,v]=$.useState(),g=$.useRef(null),d=$.useRef(null),[u,p]=$.useState(),z=$.useRef(null),w=$.useRef(),{rowMarkers:s="none",rowMarkerWidth:f,imageEditorOverride:m,getRowThemeOverride:H,markdownDivCreateNode:x,width:y,height:R,columns:L,rows:V,getCellContent:C,onCellClicked:k,onCellActivated:b,onFinishedEditing:F,coercePasteValue:_,drawHeader:j,onHeaderClicked:n1,spanRangeBehavior:Z="default",onGroupHeaderClicked:d1,onCellContextMenu:O,className:a1,onHeaderContextMenu:W,getCellsForSelection:L1,onGroupHeaderContextMenu:p1,onGroupHeaderRenamed:o1,onCellEdited:H1,onCellsEdited:P1,onSearchResultsChanged:K1,searchResults:W1,onSearchValueChange:Bt,searchValue:T1,onKeyDown:X1,onKeyUp:Y,keybindings:N,onRowAppended:s1,onColumnMoved:x1,validateCell:f1,highlightRegions:U,drawCell:v1,rangeSelect:D="rect",columnSelect:I="multi",rowSelect:C1="multi",rangeSelectionBlending:D1="exclusive",columnSelectionBlending:et="exclusive",rowSelectionBlending:B1="exclusive",onDelete:c1,onDragStart:e1,onMouseMove:u1,onPaste:M1,copyHeaders:I1=!1,freezeColumns:Q1=0,rowSelectionMode:St="auto",rowMarkerStartIndex:jt=1,rowMarkerTheme:Ut,onHeaderMenuClick:Et,getGroupDetails:ot,onSearchClose:J1,onItemHovered:Jt,onSelectionCleared:Mt,showSearch:C0,onVisibleRegionChanged:Z0,gridSelection:B0,onGridSelectionChange:t0,minColumnWidth:Ma=50,maxColumnWidth:dt=500,maxColumnAutoWidth:At,provideEditor:h0,trailingRowOptions:wt,scrollOffsetX:Ft,scrollOffsetY:qt,verticalBorder:c2,onDragOverCell:v2,onDrop:$a,onColumnResize:O2,onColumnResizeEnd:j0,onColumnResizeStart:g2,customRenderers:D2,fillHandle:ri,drawFocusRing:u0,experimental:Ht,fixedShadowX:m0,fixedShadowY:j5,headerIcons:ia,imageWindowLoader:ni,initialSize:xr,isDraggable:Se,onDragLeave:Ae,onRowMoved:la,overscrollX:Ha,overscrollY:oa,preventDiagonalScrolling:xa,rightElement:q5,rightElementProps:ii,showMinimap:G5,smoothScrollX:li,smoothScrollY:c4,scrollToEnd:Fe,scaleToRem:oi=!1,rowHeight:wr=34,headerHeight:ke=36,groupHeaderHeight:v4=ke,theme:d2,isOutsideClick:J8}=t,wa=Math.max(Ma,20),Ua=Math.max(dt,wa),hi=Math.max(At??Ua,wa),La=$.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]).fontSize,ha=$.useMemo(()=>Number.parseFloat(La),[La]),[M0,Va,g4,Lr,vi,K5]=$.useMemo(()=>{var M,A,E;if(!oi||ha===16)return[wr,ke,v4,d2,Ha,oa];let T=ha/16,J=wr,K=kp();return[typeof J=="number"?J*T:X=>Math.ceil(J(X)*T),Math.ceil(ke*T),Math.ceil(v4*T),{...d2,headerIconSize:((M=d2?.headerIconSize)!=null?M:K.headerIconSize)*T,cellHorizontalPadding:((A=d2?.cellHorizontalPadding)!=null?A:K.cellHorizontalPadding)*T,cellVerticalPadding:((E=d2?.cellVerticalPadding)!=null?E:K.cellVerticalPadding)*T},Math.ceil((Ha??0)*T),Math.ceil((oa??0)*T)]},[v4,ke,Ha,oa,ha,wr,oi,d2]),Lt=$.useMemo(()=>N===void 0?Qp:{...Qp,...N},[N]),Wa=f??(V>1e4?48:V>1e3?44:V>100?36:32),s2=s!=="none",P=s2?1:0,H0=s1!==void 0,V2=wt?.sticky===!0,[X5,gi]=$.useState(!1),Y5=C0??X5,Q5=$.useCallback(()=>{J1!==void 0?J1():gi(!1)},[J1]),d4=$.useMemo(()=>B0===void 0?void 0:A5(B0,P),[B0,P]),q=d4??o,R2=$.useRef(new AbortController);$.useEffect(()=>()=>{R2?.current.abort()},[]);let[P0,Z5]=VE(L1,C,P,R2.current,V),di=$.useCallback((M,A,E)=>{if(f1===void 0)return!0;let T=[M[0]-P,M[1]];return f1?.(T,A,E)},[P,f1]),Ra=$.useRef(B0),J0=$.useCallback((M,A)=>{A&&(M=RE(M,P0,P,Z,R2.current)),t0!==void 0?(Ra.current=A5(M,-P),t0(Ra.current)):h(M)},[t0,P0,P,Z]),ya=jn(O2,$.useCallback((M,A,E,T)=>{O2?.(L[E-P],A,E-P,T)},[O2,P,L])),J5=jn(j0,$.useCallback((M,A,E,T)=>{j0?.(L[E-P],A,E-P,T)},[j0,P,L])),Vr=jn(g2,$.useCallback((M,A,E,T)=>{g2?.(L[E-P],A,E-P,T)},[g2,P,L])),s4=jn(j,$.useCallback(M=>{var A;return(A=j?.({...M,columnIndex:M.columnIndex-P}))!=null?A:!1},[j,P])),Rr=$.useCallback(M=>{if(c1!==void 0){let A=c1(A5(M,-P));return typeof A=="boolean"?A:A5(A,P)}return!0},[c1,P]),[c0,S0,v0]=LE(q,J0,D1,et,B1,D),S=$.useMemo(()=>({...kp(),...Lr}),[Lr]),[G,b1]=$.useState([10,10,0]),z1=$.useCallback(M=>M.kind!==l1.Custom?u_[M.kind]:D2?.find(A=>A.isMatch(M)),[D2]),E1=xE(L,V,Z5,G[0]-(P===0?0:Wa)-G[2],wa,hi,S,z1,R2.current),h1=$.useMemo(()=>E1.some(M=>M.group!==void 0),[E1]),$1=h1?Va+g4:Va,st=q.rows.length,S1=s==="none"?"":st===0?vz:st===V?cz:vk,_1=$.useMemo(()=>s==="none"?E1:[{title:S1,width:Wa,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Ut},...E1],[E1,Wa,s,S1,Ut]),[a0,tt]=$.useMemo(()=>[qt!==void 0&&typeof M0=="number"?Math.floor(qt/M0):0,qt!==void 0&&typeof M0=="number"?-(qt%M0):0],[qt,M0]),ut=$.useRef({height:1,width:1,x:0,y:0}),ht=$.useMemo(()=>{var M,A;return{x:ut.current.x,y:a0,width:(M=ut.current.width)!=null?M:1,height:(A=ut.current.height)!=null?A:1,ty:tt}},[tt,a0]),xt=$.useRef(!1),[_t,Ca,y2]=bk(ht),C2=((e=_t.height)!=null?e:1)>1;$.useLayoutEffect(()=>{if(qt!==void 0&&z.current!==null&&C2){if(z.current.scrollTop===qt)return;z.current.scrollTop=qt,z.current.scrollTop!==qt&&y2(),xt.current=!0}},[qt,C2,y2]);let N2=((r=_t.width)!=null?r:1)>1;$.useLayoutEffect(()=>{if(Ft!==void 0&&z.current!==null&&N2){if(z.current.scrollLeft===Ft)return;z.current.scrollLeft=Ft,z.current.scrollLeft!==Ft&&y2(),xt.current=!0}},[Ft,N2,y2]);let B2=_t.x+P,u2=_t.y,G1=$.useRef(null),Gt=$.useCallback(M=>{var A;M===!0?(A=G1.current)==null||A.focus():window.requestAnimationFrame(()=>{var E;(E=G1.current)==null||E.focus()})},[]),n0=H0?V+1:V,A0=$.useCallback(M=>{let A=P===0?M:M.map(T=>({...T,location:[T.location[0]-P,T.location[1]]})),E=P1?.(A);if(E!==!0)for(let T of A)H1?.(T.location,T.value);return E},[H1,P1,P]),Vm=$.useMemo(()=>{if(U!==void 0)return P===0?U:U.map(M=>{let A=_1.length-M.range.x-P;if(!(A<=0))return{color:M.color,range:{...M.range,x:M.range.x+P,width:Math.min(A,M.range.width)},style:M.style}}).filter(M=>M!==void 0)},[U,_1.length,P]),t6=$.useRef(_1);t6.current=_1;let F0=$.useCallback(([M,A],E=!1)=>{var T,J,K,X,i1,t1,m1,y1,N1,Y1;let w1=H0&&A===n0-1;if(M===0&&s2)return w1?Zp:{kind:o2.Marker,allowOverlay:!1,checked:q?.rows.hasIndex(A)===!0,markerKind:s==="clickable-number"?"number":s,row:jt+A,drawHandle:la!==void 0,cursor:s==="clickable-number"?"pointer":void 0};if(w1){let ct=M===P&&(T=wt?.hint)!=null?T:"",k1=t6.current[M];if(((J=k1?.trailingRowOptions)==null?void 0:J.disabled)===!0)return Zp;{let rt=(X=(K=k1?.trailingRowOptions)==null?void 0:K.hint)!=null?X:ct,gt=(t1=(i1=k1?.trailingRowOptions)==null?void 0:i1.addIcon)!=null?t1:wt?.addIcon;return{kind:o2.NewRow,hint:rt,allowOverlay:!1,icon:gt}}}else{let at=M-P;if(E||Ht?.strict===!0){let k1=ut.current,rt=k1.x>at||at>k1.x+k1.width||k1.y>A||A>k1.y+k1.height,gt=at===((y1=(m1=k1.extras)==null?void 0:m1.selected)==null?void 0:y1[0])&&A===((N1=k1.extras)==null?void 0:N1.selected[1]),Vt=((Y1=k1.extras)==null?void 0:Y1.freezeRegion)===void 0||k1.extras.freezeRegion.x>at||at>k1.extras.freezeRegion.x+k1.extras.freezeRegion.width||k1.extras.freezeRegion.y>A||A>k1.extras.freezeRegion.y+k1.extras.freezeRegion.height;if(rt&&!gt&&Vt)return{kind:l1.Loading,allowOverlay:!1}}let ct=C([at,A]);return P!==0&&ct.span!==void 0&&(ct={...ct,span:[ct.span[0]+P,ct.span[1]+P]}),ct}},[H0,n0,s2,q?.rows,la,s,P,wt?.hint,wt?.addIcon,Ht?.strict,C,jt]),to=$.useCallback(M=>{var A,E;let T=(A=ot?.(M))!=null?A:{name:M};return o1!==void 0&&M!==""&&(T={icon:T.icon,name:T.name,overrideTheme:T.overrideTheme,actions:[...(E=T.actions)!=null?E:[],{title:"Rename",icon:"renameIcon",onClick:J=>ro({group:T.name,bounds:J.bounds})}]}),T},[ot,o1]),si=$.useCallback(M=>{var A;let[E,T]=M.cell,J=_1[E],K=J?.group!==void 0?(A=to(J.group))==null?void 0:A.overrideTheme:void 0,X=J?.themeOverride,i1=H?.(T);v({...M,theme:{...S,...K,...X,...i1,...M.content.themeOverride}})},[H,_1,to,S]),yr=$.useCallback((M,A,E)=>{var T;if(q.current===void 0)return;let[J,K]=q.current.cell,X=F0([J,K]);if(X.kind!==l1.Boolean&&X.allowOverlay){let i1=X;if(E!==void 0)switch(i1.kind){case l1.Number:{let t1=hk(()=>E==="-"?-0:Number.parseFloat(E),0);i1={...i1,data:Number.isNaN(t1)?0:t1};break}case l1.Text:case l1.Markdown:case l1.Uri:i1={...i1,data:E};break}si({target:M,content:i1,initialValue:E,cell:[J,K],highlight:E===void 0,forceEditMode:E!==void 0})}else X.kind===l1.Boolean&&A&&X.readonly!==!0&&(A0([{location:q.current.cell,value:{...X,data:Nz(X.data)}}]),(T=G1.current)==null||T.damage([{cell:q.current.cell}]))},[F0,q,A0,si]),a6=$.useCallback((M,A)=>{var E;let T=(E=G1.current)==null?void 0:E.getBounds(M,A);if(T===void 0||z.current===null)return;let J=F0([M,A]);!J.allowOverlay||si({target:T,content:J,initialValue:void 0,highlight:!0,cell:[M,A],forceEditMode:!0})},[F0,si]),Kt=$.useCallback((M,A,E="both",T=0,J=0,K=void 0)=>{var X;if(z.current!==null){let i1=G1.current,t1=d.current,m1=typeof M!="number"?M.unit==="cell"?M.amount:void 0:M,y1=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,N1=typeof M!="number"&&M.unit==="px"?M.amount:void 0,Y1=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(i1!==null&&t1!==null){let w1={x:0,y:0,width:0,height:0},A1=0,at=0;if((m1!==void 0||y1!==void 0)&&(w1=(X=i1.getBounds((m1??0)+P,y1??0))!=null?X:w1,w1.width===0||w1.height===0))return;let ct=t1.getBoundingClientRect(),k1=ct.width/t1.offsetWidth;if(N1!==void 0&&(w1={...w1,x:N1-ct.left-z.current.scrollLeft,width:1}),Y1!==void 0&&(w1={...w1,y:Y1+ct.top-z.current.scrollTop,height:1}),w1!==void 0){let rt={x:w1.x-T,y:w1.y-J,width:w1.width+2*T,height:w1.height+2*J},gt=0;for(let zt=0;ztrt.x?A1=rt.x-kt:i0rt.y?at=rt.y-Rt:ft{var E;let T=_1[M];if(((E=T?.trailingRowOptions)==null?void 0:E.disabled)===!0)return;let J=s1?.(),K,X=!0;J!==void 0&&(K=await J,K==="top"&&(X=!1),typeof K=="number"&&(X=!1));let i1=0,t1=()=>{if(n6.current<=V){i1<500&&window.setTimeout(t1,i1),i1=50+i1*2;return}let m1=typeof K=="number"?K:X?V:0;Kt(M-P,m1),c0({cell:[M,m1],range:{x:M,y:m1,width:1,height:1}},!1,!1,"edit");let y1=r6.current([M-P,m1]);y1.allowOverlay&&gr(y1)&&y1.readonly!==!0&&A&&window.setTimeout(()=>{e6.current(M,m1)},0)};t1()},[_1,s1,P,V,Kt,c0]),ui=$.useCallback(M=>{var A,E,T;let J=(T=(E=(A=E1[M])==null?void 0:A.trailingRowOptions)==null?void 0:E.targetColumn)!=null?T:wt?.targetColumn;if(typeof J=="number")return J+(s2?1:0);if(typeof J=="object"){let K=L.indexOf(J);if(K>=0)return K+(s2?1:0)}},[E1,L,s2,wt?.targetColumn]),ja=$.useRef(),f4=$.useRef(),Cr=$.useCallback((M,A)=>{var E;let[T,J]=A;return{...S,...(E=_1[T])==null?void 0:E.themeOverride,...H?.(J),...M.themeOverride}},[H,_1,S]),Br=$.useCallback(M=>{var A,E,T,J;let K=E5.value?M.metaKey:M.ctrlKey,X=K&&C1==="multi",i1=K&&I==="multi",[t1,m1]=M.location,y1=q.columns,N1=q.rows,[Y1,w1]=(E=(A=q.current)==null?void 0:A.cell)!=null?E:[];if(M.kind==="cell"){if(f4.current=void 0,be.current=[t1,m1],t1===0&&s2){if(H0===!0&&m1===V||s==="number"||C1==="none")return;let A1=F0(M.location);if(A1.kind!==o2.Marker)return;if(la!==void 0){let k1=z1(A1);i2(k1?.kind===o2.Marker);let rt=(T=k1?.onClick)==null?void 0:T.call(k1,{...M,cell:A1,posX:M.localEventX,posY:M.localEventY,bounds:M.bounds,theme:Cr(A1,M.location),preventDefault:()=>{}});if(rt===void 0||rt.checked===A1.checked)return}v(void 0),Gt();let at=N1.hasIndex(m1),ct=ja.current;if(C1==="multi"&&(M.shiftKey||M.isLongTouch===!0)&&ct!==void 0&&N1.hasIndex(ct)){let k1=[Math.min(ct,m1),Math.max(ct,m1)+1];X||St==="multi"?S0(void 0,k1,!0):S0(mt.fromSingleSelection(k1),void 0,X)}else X||M.isTouch||St==="multi"?at?S0(N1.remove(m1),void 0,!0):(S0(void 0,m1,!0),ja.current=m1):at&&N1.length===1?S0(mt.empty(),void 0,K):(S0(mt.fromSingleSelection(m1),void 0,K),ja.current=m1)}else if(t1>=P&&H0&&m1===V){let A1=ui(t1);u4(A1??t1)}else if(Y1!==t1||w1!==m1){let A1=F0(M.location),at=z1(A1);if(at?.onSelect!==void 0){let rt=!1;if(at.onSelect({...M,cell:A1,posX:M.localEventX,posY:M.localEventY,bounds:M.bounds,preventDefault:()=>rt=!0,theme:Cr(A1,M.location)}),rt)return}let ct=V2&&m1===V,k1=V2&&q!==void 0&&((J=q.current)==null?void 0:J.cell[1])===V;if((M.shiftKey||M.isLongTouch===!0)&&Y1!==void 0&&w1!==void 0&&q.current!==void 0&&!k1){if(ct)return;let rt=Math.min(t1,Y1),gt=Math.max(t1,Y1),Vt=Math.min(m1,w1),kt=Math.max(m1,w1);c0({...q.current,range:{x:rt,y:Vt,width:gt-rt+1,height:kt-Vt+1}},!0,K,"click"),ja.current=void 0,Gt()}else c0({cell:[t1,m1],range:{x:t1,y:m1,width:1,height:1}},!0,K,"click"),ja.current=void 0,v(void 0),Gt()}}else if(M.kind==="header")if(be.current=[t1,m1],v(void 0),s2&&t1===0)ja.current=void 0,f4.current=void 0,C1==="multi"&&(N1.length!==V?S0(mt.fromSingleSelection([0,V]),void 0,K):S0(mt.empty(),void 0,K),Gt());else{let A1=f4.current;if(I==="multi"&&(M.shiftKey||M.isLongTouch===!0)&&A1!==void 0&&y1.hasIndex(A1)){let at=[Math.min(A1,t1),Math.max(A1,t1)+1];i1?v0(void 0,at,K):v0(mt.fromSingleSelection(at),void 0,K)}else i1?(y1.hasIndex(t1)?v0(y1.remove(t1),void 0,K):v0(void 0,t1,K),f4.current=t1):I!=="none"&&(v0(mt.fromSingleSelection(t1),void 0,K),f4.current=t1);ja.current=void 0,Gt()}else M.kind===w2?be.current=[t1,m1]:M.kind===O5&&(J0(F5,!1),v(void 0),Gt(),Mt?.(),ja.current=void 0,f4.current=void 0)},[u4,I,Gt,z1,ui,F0,q,s2,V2,Mt,la,P,s,C1,St,V,c0,J0,v0,S0,H0,Cr]),ao=$.useRef(!1),be=$.useRef(),i6=$.useRef(_t),f2=$.useRef(),Rm=$.useCallback(M=>{var A,E;if(p4.current=!1,i6.current=ut.current,M.button!==0&&M.button!==1){f2.current=void 0;return}let T=performance.now(),J=T-((E=(A=f2.current)==null?void 0:A.time)!=null?E:-1e3)<250;f2.current={wasDoubleClick:J,button:M.button,time:T,location:M.location},M?.kind==="header"&&(ao.current=!0);let K=M.kind==="cell"&&M.isFillHandle;!K&&M.kind!=="cell"&&M.isEdge||(p({previousSelection:q,fillHandle:K}),be.current=void 0,!M.isTouch&&M.button===0?Br(M):!M.isTouch&&M.button===1&&(be.current=M.location))},[q,Br]),[eo,ro]=$.useState(),l6=$.useCallback(M=>{if(M.kind!==w2||I!=="multi")return;let A=E5.value?M.metaKey:M.ctrlKey,[E]=M.location,T=q.columns;if(E=P&&Zn(J.group,_1[i1].group);i1--)K--;for(let i1=E+1;i1<_1.length&&Zn(J.group,_1[i1].group);i1++)X++;if(Gt(),A)if(T.hasAll([K,X+1])){let i1=T;for(let t1=K;t1<=X;t1++)i1=i1.remove(t1);v0(i1,void 0,A)}else v0(void 0,[K,X+1],A);else v0(mt.fromSingleSelection([K,X+1]),void 0,A)},[I,Gt,q.columns,_1,P,v0]),fi=$.useCallback(M=>{var A;if(q.current===void 0)return;let E=[],T=q.current.range;for(let J=0;J({cell:J.location})))},[F0,q,A0]),p4=$.useRef(!1),pi=$.useCallback(async(M,A=!1)=>{var E;if((((E=f2.current)==null?void 0:E.wasDoubleClick)===!0||A)&&P0!==void 0&&ya!==void 0){let T=ut.current.y,J=ut.current.height,K=P0({x:M,y:T,width:1,height:Math.min(J,V-T)},R2.current.signal);typeof K!="object"&&(K=await K());let X=E1[M-P],t1=document.createElement("canvas").getContext("2d",{alpha:!1});if(t1!==null){t1.font=`${S.baseFontStyle} ${S.fontFamily}`;let m1=Iz(t1,S,X,0,K,wa,Ua,!1,z1);ya?.(X,m1.width,M,m1.width)}}},[E1,P0,Ua,S,wa,ya,P,V,z1]),[ym,o6]=$.useState(),Cm=$.useCallback((M,A)=>{var E,T,J;let K=u;if(p(void 0),o6(void 0),ao.current=!1,A)return;if(K?.fillHandle===!0&&q.current!==void 0){fi(q.current.cell[1]!==q.current.range.y);return}let[X,i1]=M.location,[t1,m1]=(E=be.current)!=null?E:[],y1=()=>{p4.current=!0},N1=w1=>{var A1,at,ct;if((w1.isTouch||t1===X&&m1===i1)&&k?.([X-P,i1],{...w1,preventDefault:y1}),w1.button===1)return!p4.current;if(!p4.current){let k1=F0(M.location),rt=z1(k1);if(rt!==void 0&&rt.onClick!==void 0){let gt=rt.onClick({...w1,cell:k1,posX:w1.localEventX,posY:w1.localEventY,bounds:w1.bounds,theme:Cr(k1,M.location),preventDefault:y1});gt!==void 0&&!we(gt)&&Da(gt)&&(A0([{location:w1.location,value:gt}]),(A1=G1.current)==null||A1.damage([{cell:w1.location}]))}if(!p4.current&&((ct=(at=K?.previousSelection)==null?void 0:at.current)==null?void 0:ct.cell)!==void 0&&q.current!==void 0){let[gt,Vt]=q.current.cell,[kt,i0]=K.previousSelection.current.cell;if(X===gt&&X===kt&&i1===Vt&&i1===i0)return b?.([X-P,i1]),yr(w1.bounds,!1),!0}}return!1},Y1=M.location[0]-P;if(M.isTouch){let w1=ut.current,A1=i6.current;if(w1.x!==A1.x||w1.y!==A1.y)return;if(M.isLongTouch===!0){if(M.kind==="cell"&&((T=q?.current)==null?void 0:T.cell[0])===X&&((J=q?.current)==null?void 0:J.cell[1])===i1){O?.([Y1,M.location[1]],{...M,preventDefault:y1});return}else if(M.kind==="header"&&q.columns.hasIndex(X)){W?.(Y1,{...M,preventDefault:y1});return}else if(M.kind===w2){if(Y1<0)return;p1?.(Y1,{...M,preventDefault:y1});return}}M.kind==="cell"?N1(M)||Br(M):M.kind===w2?d1?.(Y1,{...M,preventDefault:y1}):(M.kind===xe&&n1?.(Y1,{...M,preventDefault:y1}),Br(M));return}if(M.kind==="header"){if(Y1<0)return;M.isEdge?pi(X):M.button===0&&X===t1&&i1===m1&&n1?.(Y1,{...M,preventDefault:y1})}if(M.kind===w2){if(Y1<0)return;M.button===0&&X===t1&&i1===m1&&(d1?.(Y1,{...M,preventDefault:y1}),p4.current||l6(M))}M.kind==="cell"&&(M.button===0||M.button===1)&&N1(M),be.current=void 0},[u,P,q,k,fi,F0,z1,Cr,A0,b,yr,O,W,p1,Br,d1,pi,n1,l6]),Bm=$.useCallback(M=>{let A={...M,location:[M.location[0]-P,M.location[1]]};u1?.(A),o6(E=>{var T,J;return ao.current?[M.scrollEdge[0],0]:M.scrollEdge[0]===E?.[0]&&M.scrollEdge[1]===E[1]?E:u===void 0||((J=(T=f2.current)==null?void 0:T.location[0])!=null?J:0){Et?.(M-P,A)},[Et,P]),Ba=(n=q?.current)==null?void 0:n.cell,Am=$.useCallback((M,A,E,T,J,K)=>{xt.current=!1;let X=Ba;X!==void 0&&(X=[X[0]-P,X[1]]);let i1={x:M.x-P,y:M.y,width:M.width,height:H0&&M.y+M.height>=V?M.height-1:M.height,tx:J,ty:K,extras:{selected:X,freezeRegion:Q1===0?void 0:{x:0,y:M.y,width:Q1,height:M.height}}};ut.current=i1,Ca(i1),b1([A,E,T]),Z0?.(i1,i1.tx,i1.ty,i1.extras)},[Ba,P,H0,V,Q1,Ca,Z0]),Fm=jn(x1,$.useCallback((M,A)=>{x1?.(M-P,A-P),I!=="none"&&v0(mt.fromSingleSelection(A),void 0,!0)},[I,x1,P,v0])),no=$.useRef(!1),km=$.useCallback(M=>{if(M.location[0]===0&&P>0){M.preventDefault();return}e1?.({...M,location:[M.location[0]-P,M.location[1]]}),M.defaultPrevented()||(no.current=!0),p(void 0)},[e1,P]),bm=$.useCallback(()=>{no.current=!1},[]),Em=$.useCallback(M=>{var A,E;if(!(((A=f2?.current)==null?void 0:A.button)!==void 0&&f2.current.button>=1)){if(u!==void 0&&((E=f2.current)==null?void 0:E.location[0])===0&&M.location[0]===0&&P===1&&C1==="multi"&&u.previousSelection&&!u.previousSelection.rows.hasIndex(f2.current.location[1])&&q.rows.hasIndex(f2.current.location[1])){let T=Math.min(f2.current.location[1],M.location[1]),J=Math.max(f2.current.location[1],M.location[1])+1;S0(mt.fromSingleSelection([T,J]),void 0,!1)}if(u!==void 0&&q.current!==void 0&&!no.current&&(D==="rect"||D==="multi-rect")){let[T,J]=q.current.cell,[K,X]=M.location;if(X<0&&(X=ut.current.y),V2&&J===V)return;if(V2&&X===V)if(M.kind===O5)X--;else return;K=Math.max(K,P);let m1=K-T,y1=X-J,N1={x:m1>=0?T:K,y:y1>=0?J:X,width:Math.abs(m1)+1,height:Math.abs(y1)+1};c0({...q.current,range:N1},!0,!1,"drag")}Jt?.({...M,location:[M.location[0]-P,M.location[1]]})}},[u,P,C1,q,D,Jt,S0,V2,V,c0]),Ee=$.useCallback(M=>{if(q.current===void 0)return;let[A,E]=M,[T,J]=q.current.cell,K=q.current.range,X=K.x,i1=K.x+K.width,t1=K.y,m1=K.y+K.height;if(E!==0)switch(E){case 2:{m1=V,t1=J,Kt(0,m1,"vertical");break}case-2:{t1=0,m1=J+1,Kt(0,t1,"vertical");break}case 1:{t1J+1?(m1--,Kt(0,m1,"vertical")):(t1=Math.max(0,t1-1),Kt(0,t1,"vertical"));break}default:sr(E)}if(A!==0)if(A===2)i1=_1.length,X=T,Kt(i1-1-P,0,"horizontal");else if(A===-2)X=P,i1=T+1,Kt(X-P,0,"horizontal");else{let y1=[];if(P0!==void 0){let N1=P0({x:X,y:t1,width:i1-X-P,height:m1-t1},R2.current.signal);typeof N1=="object"&&(y1=p_(N1))}if(A===1){let N1=!1;if(X0){let Y1=(0,i4.default)(X+1,T+1).find(w1=>!y1.includes(w1-P));Y1!==void 0&&(X=Y1,N1=!0)}else X++,N1=!0;N1&&Kt(X,0,"horizontal")}N1||(i1=Math.min(_1.length,i1+1),Kt(i1-1-P,0,"horizontal"))}else if(A===-1){let N1=!1;if(i1>T+1){if(y1.length>0){let Y1=(0,i4.default)(i1-1,T,-1).find(w1=>!y1.includes(w1-P));Y1!==void 0&&(i1=Y1,N1=!0)}else i1--,N1=!0;N1&&Kt(i1-P,0,"horizontal")}N1||(X=Math.max(P,X-1),Kt(X-P,0,"horizontal"))}else sr(A)}c0({cell:q.current.cell,range:{x:X,y:t1,width:i1-X,height:m1-t1}},!0,!1,"keyboard-select")},[P0,q,_1.length,P,V,Kt,c0]),qa=$.useCallback((M,A,E,T)=>{let J=n0-(E?0:1);if(M=(0,Gn.default)(M,P,E1.length-1+P),A=(0,Gn.default)(A,0,J),M===Ba?.[0]&&A===Ba?.[1])return!1;if(T&&q.current!==void 0){let K=[...q.current.rangeStack];(q.current.range.width>1||q.current.range.height>1)&&K.push(q.current.range),J0({...q,current:{cell:[M,A],range:{x:M,y:A,width:1,height:1},rangeStack:K}},!0)}else c0({cell:[M,A],range:{x:M,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return w.current!==void 0&&w.current[0]===M&&w.current[1]===A&&(w.current=void 0),Kt(M-P,A),!0},[n0,P,E1.length,Ba,q,Kt,J0,c0]),_m=$.useCallback((M,A)=>{c?.cell!==void 0&&M!==void 0&&Da(M)&&(A0([{location:c.cell,value:M}]),window.requestAnimationFrame(()=>{var J;(J=G1.current)==null||J.damage([{cell:c.cell}])})),Gt(!0),v(void 0);let[E,T]=A;if(q.current!==void 0&&(E!==0||T!==0)){let J=q.current.cell[1]===n0-1&&M!==void 0;qa((0,Gn.default)(q.current.cell[0]+E,0,_1.length-1),(0,Gn.default)(q.current.cell[1]+T,0,n0-1),J,!1)}F?.(M,A)},[c?.cell,Gt,q,F,A0,n0,qa,_1.length]),io=$.useMemo(()=>`gdg-overlay-${f_++}`,[]),Sr=$.useCallback(M=>{(async()=>{var E,T,J,K,X;let i1=!1;if(X1!==void 0&&X1({...M,cancel:()=>{i1=!0}}),i1)return;let t1=()=>{M.stopPropagation(),M.preventDefault()},m1=c!==void 0,{altKey:y1,shiftKey:N1,metaKey:Y1,ctrlKey:w1,key:A1,bounds:at}=M,ct=E5.value,k1=ct?Y1:w1,rt=A1==="Delete"||ct&&A1==="Backspace",gt=ut.current,Vt=q.columns,kt=q.rows;if(A1==="Escape"){m1?v(void 0):Lt.clear&&(J0(F5,!1),Mt?.());return}else if(T0("primary+a",M)&&Lt.selectAll){if(!m1)J0({columns:mt.empty(),rows:mt.empty(),current:{cell:(T=(E=q.current)==null?void 0:E.cell)!=null?T:[P,0],range:{x:P,y:0,width:L.length,height:V},rangeStack:[]}},!1);else{let zt=document.getElementById(io);if(zt!==null){let f0=window.getSelection(),k0=document.createRange();k0.selectNodeContents(zt),f0?.removeAllRanges(),f0?.addRange(k0)}}t1();return}else T0("primary+f",M)&&Lt.search&&(t1(),(J=g?.current)==null||J.focus({preventScroll:!0}),gi(!0));function i0(zt){var f0,k0,Ar,z4;Gt();let _e=[];for(let Te=zt.x;Te({cell:Te.location})))}if(rt){let zt=(K=Rr?.(q))!=null?K:!0;if(t1(),zt!==!1){let f0=zt===!0?q:zt;if(f0.current!==void 0){i0(f0.current.range);for(let k0 of f0.current.rangeStack)i0(k0)}for(let k0 of f0.rows)i0({x:P,y:k0,width:_1.length-P,height:1});for(let k0 of f0.columns)i0({x:k0,y:0,width:1,height:V})}return}if(q.current===void 0)return;let[Rt,ft]=q.current.cell,q0=!1;if(Lt.selectColumn&&T0("ctrl+ ",M)&&I!=="none")Vt.hasIndex(Rt)?v0(Vt.remove(Rt),void 0,!0):I==="single"?v0(mt.fromSingleSelection(Rt),void 0,!0):v0(void 0,Rt,!0);else if(Lt.selectRow&&T0("shift+ ",M)&&C1!=="none")kt.hasIndex(ft)?S0(kt.remove(ft),void 0,!0):C1==="single"?S0(mt.fromSingleSelection(ft),void 0,!0):S0(void 0,ft,!0);else if((T0("Enter",M)||T0(" ",M)||T0("shift+Enter",M))&&at!==void 0)m1?(v(void 0),T0("Enter",M)?ft++:T0("shift+Enter",M)&&ft--):ft===V&&H0?window.setTimeout(()=>{let zt=ui(Rt);u4(zt??Rt)},0):(b?.([Rt-P,ft]),yr(at,!0),t1());else if(Lt.downFill&&T0("primary+_68",M)&&q.current.range.height>1)fi(!1),t1();else if(Lt.rightFill&&T0("primary+_82",M)&&q.current.range.width>1){let zt=[],f0=q.current.range;for(let k0=0;k0({cell:k0.location}))),t1()}else if(Lt.pageDown&&T0("PageDown",M))ft+=Math.max(1,ut.current.height-4),t1();else if(Lt.pageUp&&T0("PageUp",M))ft-=Math.max(1,ut.current.height-4),t1();else if(Lt.first&&T0("primary+Home",M))v(void 0),ft=0,Rt=0;else if(Lt.last&&T0("primary+End",M))v(void 0),ft=Number.MAX_SAFE_INTEGER,Rt=Number.MAX_SAFE_INTEGER;else if(Lt.first&&T0("primary+shift+Home",M))v(void 0),Ee([-2,-2]);else if(Lt.last&&T0("primary+shift+End",M))v(void 0),Ee([2,2]);else if(A1==="ArrowDown"){if(w1&&y1)return;v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([0,k1&&!y1?2:1]):(y1&&!k1&&(q0=!0),k1&&!y1?ft=V-1:ft+=1)}else if(A1==="ArrowUp"||A1==="Home"){let zt=A1==="Home"||k1;v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([0,zt&&!y1?-2:-1]):(y1&&!zt&&(q0=!0),ft+=zt&&!y1?Number.MIN_SAFE_INTEGER:-1)}else if(A1==="ArrowRight"||A1==="End"){let zt=A1==="End"||k1;v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([zt&&!y1?2:1,0]):(y1&&!zt&&(q0=!0),Rt+=zt&&!y1?Number.MAX_SAFE_INTEGER:1)}else if(A1==="ArrowLeft")v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([k1&&!y1?-2:-1,0]):(y1&&!k1&&(q0=!0),Rt+=k1&&!y1?Number.MIN_SAFE_INTEGER:-1);else if(A1==="Tab")v(void 0),N1?Rt--:Rt++;else if(!Y1&&!w1&&q.current!==void 0&&A1.length===1&&/[ -~]/g.test(A1)&&at!==void 0&&gr(C([Rt-P,Math.max(0,ft-1)]))){if((!V2||ft!==V)&&(gt.y>ft||ft>gt.y+gt.height||gt.x>Rt||Rt>gt.x+gt.width))return;yr(at,!0,A1),t1()}qa(Rt,ft,!1,q0)&&t1()})()},[X1,c,q,Lt.selectAll,Lt.search,Lt.selectColumn,Lt.selectRow,Lt.downFill,Lt.rightFill,Lt.pageDown,Lt.pageUp,Lt.first,Lt.last,Lt.clear,I,C1,C,P,qa,J0,Mt,L.length,V,io,Gt,A0,z1,Rr,_1.length,v0,S0,H0,ui,u4,b,yr,fi,F0,Ee,D,V2]),Tm=$.useCallback((M,A)=>{let E=M.location[0]-P;if(M.kind==="header"&&W?.(E,{...M,preventDefault:A}),M.kind===w2){if(E<0)return;p1?.(E,{...M,preventDefault:A})}if(M.kind==="cell"){let[T,J]=M.location;O?.([E,J],{...M,preventDefault:A}),ck(q,M.location)||qa(T,J,!1,!1)}},[q,O,p1,W,P,qa]),lo=$.useCallback(async M=>{var A,E,T,J,K,X,i1;if(!Lt.paste)return;function t1(w1,A1,at){var ct,k1;if(!we(w1)&&gr(w1)&&w1.readonly!==!0){let rt=_?.(at,w1);if(rt!==void 0&&Da(rt))return rt.kind!==w1.kind&&console.warn("Coercion should not change cell kind."),{location:A1,value:rt};let gt=z1(w1);if(gt===void 0)return;if(gt.kind===l1.Custom){i2(w1.kind===l1.Custom);let Vt=(ct=gt.onPaste)==null?void 0:ct.call(gt,at,w1.data);return Vt===void 0?void 0:{location:A1,value:{...w1,data:Vt}}}else{let Vt=(k1=gt.onPaste)==null?void 0:k1.call(gt,at,w1);return Vt===void 0?void 0:(i2(Vt.kind===w1.kind),{location:A1,value:Vt})}}}let m1=q.columns,y1=q.rows,N1=((A=z.current)==null?void 0:A.contains(document.activeElement))===!0||((E=d.current)==null?void 0:E.contains(document.activeElement))===!0,Y1=(T=q.current)==null?void 0:T.cell;if(Y1===void 0&&m1.length===1&&(Y1=[(J=m1.first())!=null?J:0,0]),Y1===void 0&&y1.length===1&&(Y1=[P,(K=y1.first())!=null?K:0]),N1&&Y1!==void 0){let w1,A1,at="text/plain",ct="text/html";if(navigator.clipboard.read!==void 0){let Vt=await navigator.clipboard.read();for(let kt of Vt){if(kt.types.includes(ct)){let Rt=await(await kt.getType(ct)).text(),ft=document.createElement("html");ft.innerHTML=Rt;let q0=ft.querySelector("table");if(q0!==null){w1=jp(q0);break}}kt.types.includes(at)&&(A1=await(await kt.getType(at)).text())}}else if(navigator.clipboard.readText!==void 0)A1=await navigator.clipboard.readText();else if(M!==void 0&&M?.clipboardData!==null){if(M.clipboardData.types.includes(ct)){let Vt=M.clipboardData.getData(ct),kt=document.createElement("html");kt.innerHTML=Vt;let i0=kt.querySelector("table");i0!==null&&(w1=jp(i0))}w1===void 0&&M.clipboardData.types.includes(at)&&(A1=M.clipboardData.getData(at))}else return;let[k1,rt]=Y1,gt=[];do{if(M1===void 0){let Vt=F0(Y1),kt=t1(Vt,Y1,(X=A1??w1?.map(i0=>i0.join(" ")).join(" "))!=null?X:"");kt!==void 0&>.push(kt);break}if(w1===void 0){if(A1===void 0)return;w1=yE(A1)}if(M1===!1||typeof M1=="function"&&M1?.([Y1[0]-P,Y1[1]],w1)!==!0)return;for(let[Vt,kt]of w1.entries()){if(Vt+rt>=V)break;for(let[i0,Rt]of kt.entries()){let ft=[i0+k1,Vt+rt],q0=F0(ft),Ga=t1(q0,ft,Rt);Ga!==void 0&>.push(Ga)}}}while(!1);A0(gt),(i1=G1.current)==null||i1.damage(gt.map(Vt=>({cell:Vt.location})))}},[_,z1,F0,q,Lt.paste,A0,M1,P,V]);W0("paste",lo,window,!1,!0);let oo=$.useCallback(async(M,A)=>{var E,T;if(!Lt.copy)return;let J=A===!0||((E=z.current)==null?void 0:E.contains(document.activeElement))===!0||((T=d.current)==null?void 0:T.contains(document.activeElement))===!0,K=q.columns,X=q.rows,i1=(t1,m1)=>{if(!I1)qp(t1,m1,M);else{let y1=m1.map(N1=>({kind:l1.Text,data:L[N1].title,displayData:L[N1].title,allowOverlay:!1}));qp([y1,...t1],m1,M)}};if(J&&P0!==void 0){if(q.current!==void 0){let t1=P0(q.current.range,R2.current.signal);typeof t1!="object"&&(t1=await t1()),i1(t1,(0,i4.default)(q.current.range.x-P,q.current.range.x+q.current.range.width-P))}else if(X!==void 0&&X.length>0){let m1=[...X].map(y1=>{let N1=P0({x:P,y:y1,width:L.length,height:1},R2.current.signal);return typeof N1=="object"?N1[0]:N1().then(Y1=>Y1[0])});if(m1.some(y1=>y1 instanceof Promise)){let y1=await Promise.all(m1);i1(y1,(0,i4.default)(L.length))}else i1(m1,(0,i4.default)(L.length))}else if(K.length>0){let t1=[],m1=[];for(let y1 of K){let N1=P0({x:y1,y:0,width:1,height:V},R2.current.signal);typeof N1!="object"&&(N1=await N1()),t1.push(N1),m1.push(y1-P)}if(t1.length===1)i1(t1[0],m1);else{let y1=t1.reduce((N1,Y1)=>N1.map((w1,A1)=>[...w1,...Y1[A1]]));i1(y1,m1)}}}},[L,P0,q,Lt.copy,P,V,I1]);W0("copy",oo,window,!1,!1);let Pm=$.useCallback((M,A)=>{if(K1!==void 0){P!==0&&(M=M.map(J=>[J[0]-P,J[1]])),K1(M,A);return}if(M.length===0||A===-1)return;let[E,T]=M[A];w.current!==void 0&&w.current[0]===E&&w.current[1]===T||(w.current=[E,T],qa(E,T,!1,!1))},[K1,P,qa]),[zi,mi]=(l=(i=B0?.current)==null?void 0:i.cell)!=null?l:[],h6=$.useRef(Kt);h6.current=Kt,$.useLayoutEffect(()=>{var M,A,E,T;!xt.current&&zi!==void 0&&mi!==void 0&&(zi!==((A=(M=Ra.current)==null?void 0:M.current)==null?void 0:A.cell[0])||mi!==((T=(E=Ra.current)==null?void 0:E.current)==null?void 0:T.cell[1]))&&h6.current(zi,mi),xt.current=!1},[zi,mi]);let c6=q.current!==void 0&&(q.current.cell[0]>=_1.length||q.current.cell[1]>=n0);$.useLayoutEffect(()=>{c6&&J0(F5,!1)},[c6,J0]);let Im=$.useMemo(()=>H0===!0&&wt?.tint===!0?mt.fromSingleSelection(n0-1):mt.empty(),[n0,H0,wt?.tint]),Om=$.useCallback(M=>{var A;return typeof c2=="boolean"?c2:(A=c2?.(M-P))!=null?A:!0},[P,c2]),Dm=$.useMemo(()=>{if(eo===void 0||d.current===null)return null;let{bounds:M,group:A}=eo,E=d.current.getBoundingClientRect();return $.createElement(ME,{bounds:M,group:A,canvasBounds:E,onClose:()=>ro(void 0),onFinish:T=>{ro(void 0),o1?.(A,T)}})},[o1,eo]),Nm=Math.min(_1.length,Q1+(s2?1:0));$.useImperativeHandle(a,()=>({appendRow:(M,A)=>u4(M+P,A),updateCells:M=>{var A;return P!==0&&(M=M.map(E=>({cell:[E.cell[0]+P,E.cell[1]]}))),(A=G1.current)==null?void 0:A.damage(M)},getBounds:(M,A)=>{var E;return(E=G1.current)==null?void 0:E.getBounds(M+P,A)},focus:()=>{var M;return(M=G1.current)==null?void 0:M.focus()},emit:async M=>{switch(M){case"delete":Sr({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Sr({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Sr({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await oo(void 0,!0);break;case"paste":await lo();break}},scrollTo:Kt,remeasureColumns:M=>{for(let A of M)pi(A+P,!0)}}),[u4,pi,oo,Sr,lo,P,Kt]);let[v6,g6]=Ba??[],$m=$.useCallback(M=>{let[A,E]=M;if(E===-1){I!=="none"&&(v0(mt.fromSingleSelection(A),void 0,!1),Gt());return}v6===A&&g6===E||(c0({cell:M,range:{x:A,y:E,width:1,height:1}},!0,!1,"keyboard-nav"),Kt(A,E))},[I,Gt,Kt,v6,g6,c0,v0]),[Um,Wm]=$.useState(!1),d6=$.useRef((0,az.default)(M=>{Wm(M)},5)),jm=$.useCallback(()=>{d6.current(!0),q.current===void 0&&q.columns.length===0&&q.rows.length===0&&u===void 0&&c0({cell:[P,u2],range:{x:P,y:u2,width:1,height:1}},!0,!1,"keyboard-select")},[u2,q,u,P,c0]),qm=$.useCallback(()=>{d6.current(!1)},[]),[Gm,Km]=$.useMemo(()=>{var M;let A,E=(M=Ht?.scrollbarWidthOverride)!=null?M:kk(),T=V+(H0?1:0);if(typeof M0=="number")A=$1+T*M0;else{let K=0,X=Math.min(T,10);for(let i1=0;i1X.width+K,0)+E;return[`${Math.min(1e5,J)}px`,`${Math.min(1e5,A)}px`]},[_1,Ht?.scrollbarWidthOverride,M0,V,H0,$1]);return $.createElement(oz.Provider,{value:S},$.createElement(kE,{style:iz(S),className:a1,inWidth:y??Gm,inHeight:R??Km},$.createElement(pE,{fillHandle:ri,drawFocusRing:u0,experimental:Ht,fixedShadowX:m0,fixedShadowY:j5,getRowThemeOverride:H,headerIcons:ia,imageWindowLoader:ni,initialSize:xr,isDraggable:Se,onDragLeave:Ae,onRowMoved:la,overscrollX:vi,overscrollY:K5,preventDiagonalScrolling:xa,rightElement:q5,rightElementProps:ii,showMinimap:G5,smoothScrollX:li,smoothScrollY:c4,className:a1,enableGroups:h1,onCanvasFocused:jm,onCanvasBlur:qm,canvasRef:d,onContextMenu:Tm,theme:S,cellXOffset:B2,cellYOffset:u2,accessibilityHeight:_t.height,onDragEnd:bm,columns:_1,drawCustomCell:v1,drawHeader:s4,disabledRows:Im,freezeColumns:Nm,lockColumns:P,firstColAccessible:P===0,getCellContent:F0,minColumnWidth:wa,maxColumnWidth:Ua,searchInputRef:g,showSearch:Y5,onSearchClose:Q5,highlightRegions:Vm,getCellsForSelection:P0,getGroupDetails:to,headerHeight:Va,isFocused:Um,groupHeaderHeight:h1?g4:0,trailingRowType:H0?wt?.sticky===!0?"sticky":"appended":"none",onColumnResize:ya,onColumnResizeEnd:J5,onColumnResizeStart:Vr,onCellFocused:$m,onColumnMoved:Fm,onDragStart:km,onHeaderMenuClick:Sm,onItemHovered:Em,isFilling:u?.fillHandle===!0,onMouseMove:Bm,onKeyDown:Sr,onKeyUp:Y,onMouseDown:Rm,onMouseUp:Cm,onDragOverCell:v2,onDrop:$a,onSearchResultsChanged:Pm,onVisibleRegionChanged:Am,clientSize:[G[0],G[1]],rowHeight:M0,searchResults:W1,searchValue:T1,onSearchValueChange:Bt,rows:n0,scrollRef:z,selection:q,translateX:_t.tx,translateY:_t.ty,verticalBorder:Om,gridRef:G1,getCellRenderer:z1,scrollToEnd:Fe}),Dm,c!==void 0&&$.createElement(Lk,{...c,validateCell:di,id:io,getCellRenderer:z1,className:Ht?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:h0,imageEditorOverride:m,onFinishEditing:_m,markdownDivCreateNode:x,isOutsideClick:J8})))},Yz=$.forwardRef(z_);var mr=F1(U1());var j8=F1(U1()),q8={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},G8=j8.default.createContext&&j8.default.createContext(q8);var Ce=function(){return Ce=Object.assign||function(t){for(var a,e=1,r=arguments.length;et.length)&&(a=t.length);for(var e=0,r=new Array(a);e=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +`&&(e.push(r),r=[])),i=0);break}l++}return n0;){let l=r.pop();if(l===void 0)break;l instanceof HTMLTableElement||l.nodeName==="TBODY"?r.push(...[...l.children].reverse()):l instanceof HTMLTableRowElement?(i!==void 0&&n.push(i),i=[],r.push(...[...l.children].reverse())):l instanceof HTMLTableCellElement&&i?.push((e=(a=l.innerText)!=null?a:l.textContent)!=null?e:"")}return i!==void 0&&n.push(i),n}function xe(t){return/[\t\n",]/.test(t)&&(t=`"${t.replace(/"/g,'""')}"`),t}var CE=t=>{switch(t){case!0:return"TRUE";case!1:return"FALSE";case I8:return"INDETERMINATE";case Qn:return"";default:sr(t,`A boolean was formated with invalid type: ${typeof t}`)}};function Oz(t,a,e,r){var n,i;let l=r[a];if(t.span!==void 0&&t.span[0]!==l)return"";if(t.copyData!==void 0)return xe(t.copyData);switch(t.kind){case n1.Text:case n1.Number:return xe(e?(i=(n=t.data)==null?void 0:n.toString())!=null?i:"":t.displayData);case n1.Markdown:case n1.RowID:case n1.Uri:return xe(t.data);case n1.Image:case n1.Bubble:return t.data.length===0?"":t.data.reduce((o,h)=>`${xe(o)},${xe(h)}`);case n1.Boolean:return CE(t.data);case n1.Loading:return e?"":"#LOADING";case n1.Protected:return e?"":"************";case n1.Drilldown:return t.data.length===0?"":t.data.map(o=>o.text).reduce((o,h)=>`${xe(o)},${xe(h)}`);case n1.Custom:return xe(t.copyData);default:sr(t,`A cell was passed with an invalid kind: ${t.kind}`)}}function BE(t,a){return t.map(e=>e.map((r,n)=>Oz(r,n,!1,a)).join(" ")).join(` +`)}function qp(t,a,e){var r,n,i,l;let o=BE(t,a);if(((r=window.navigator.clipboard)==null?void 0:r.write)!==void 0||e!==void 0){let h=document.createElement("tbody");for(let c of t){let v=document.createElement("tr");for(let[g,d]of c.entries()){let u=document.createElement("td");if(d.kind===n1.Uri){let p=document.createElement("a");p.href=d.data,p.innerText=d.data,u.append(p)}else u.innerText=Oz(d,g,!0,a);v.append(u)}h.append(v)}if(((n=window.navigator.clipboard)==null?void 0:n.write)!==void 0)window.navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([`${h.outerHTML}
`],{type:"text/html"})})]);else if(e!==void 0&&e?.clipboardData!==null)try{e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",`${h.outerHTML}
`)}catch{(i=window.navigator.clipboard)==null||i.writeText(o)}}else(l=window.navigator.clipboard)==null||l.writeText(o);e?.preventDefault()}function Gp(t){return typeof t=="string"?t:`${t}px`}var SE=()=>t=>t.innerWidth,AE=()=>t=>t.innerHeight,FE=L0("div")({name:"Wrapper",class:"wzg2m5k",vars:{"wzg2m5k-0":[SE()],"wzg2m5k-1":[AE()]}}),kE=t=>{let{inWidth:a,inHeight:e,children:r,...n}=t;return Dz.createElement(FE,{innerHeight:Gp(e),innerWidth:Gp(a),...n},r)};function Nz(t){return t!==!0}var Kp=20,bE={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:"false"},kind:n1.Boolean,needsHover:!0,useLabel:!1,needsHoverPosition:!0,measure:()=>50,draw:t=>{var a;return Xk(t,t.cell.data,S8(t.cell),(a=t.cell.maxSize)!=null?a:Kp)},onDelete:t=>({...t,data:!1}),onClick:t=>{var a,e;let{cell:r,posX:n,posY:i,bounds:l,theme:o}=t,{width:h,height:c,x:v,y:g}=l,d=(a=r.maxSize)!=null?a:Kp,u=Math.floor(l.y+c/2),p=Mz(d,c,o.cellVerticalPadding),z=mz((e=r.contentAlign)!=null?e:"center",v,h,o.cellHorizontalPadding,p),w=zz(z,u,p),s=Hz(v+n,g+i,w);if(S8(r)&&s)return{...r,data:Nz(r.data)}},onPaste:(t,a)=>{let e=Qn;return t.toLowerCase()==="true"?e=!0:t.toLowerCase()==="false"?e=!1:t.toLowerCase()==="indeterminate"&&(e=I8),e===a.data?void 0:{...a,data:e}}},EE=2,_E=1300;function TE(t,a){let e=T8.default.useRef(0),[r,n]=t??[0,0];T8.default.useEffect(()=>{if(r===0&&n===0){e.current=0;return}let i=0,l=h=>{var c;if(i===0)i=h;else{let v=h-i;e.current=Math.min(1,e.current+v/_E);let g=e.current**1.618*v*EE;(c=a.current)==null||c.scrollBy(r*g,n*g),i=h}o=window.requestAnimationFrame(l)},o=window.requestAnimationFrame(l);return()=>window.cancelAnimationFrame(o)},[a,r,n])}var PE=L0("div")({name:"BubblesOverlayEditorStyle",class:"b1bqsp5z"}),IE=t=>{let{bubbles:a}=t;return P5.createElement(PE,null,a.map((e,r)=>P5.createElement("div",{key:r,className:"boe-bubble"},e)),P5.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},OE=IE,DE={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:n1.Bubble,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(t,a,e)=>a.data.reduce((r,n)=>t.measureText(n).width+r+20,0)+2*e.cellHorizontalPadding-4,draw:t=>Yk(t,t.cell.data),provideEditor:()=>t=>{let{value:a}=t;return $z.createElement(OE,{bubbles:a.data})},onPaste:()=>{}},NE=L0("div")({name:"DrilldownOverlayEditorStyle",class:"df2kt4a"}),$E=t=>{let{drilldowns:a}=t;return Xn.createElement(NE,null,a.map((e,r)=>Xn.createElement("div",{key:r,className:"doe-bubble"},e.img!==void 0&&Xn.createElement("img",{src:e.img}),Xn.createElement("div",null,e.text))))},UE=$E,WE={getAccessibilityString:t=>t.data.map(a=>a.text).join(", "),kind:n1.Drilldown,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:(t,a,e)=>a.data.reduce((r,n)=>t.measureText(n.text).width+r+20+(n.img!==void 0?18:0),0)+2*e.cellHorizontalPadding-4,draw:t=>Zk(t,t.cell.data),provideEditor:()=>t=>{let{value:a}=t;return Uz.createElement(UE,{drilldowns:a.data})},onPaste:()=>{}},jE=L0("div")({name:"ImageOverlayEditorStyle",class:"i1eozt10"}),qE=t=>{let{urls:a,canWrite:e,onEditClick:r,renderImage:n}=t,i=a.filter(o=>o!=="");if(i.length===0)return null;let l=i.length>1;return n4.createElement(jE,{"data-testid":"GDG-default-image-overlay-editor"},n4.createElement(jz.Carousel,{showArrows:l,showThumbs:!1,swipeable:l,emulateTouch:l,infiniteLoop:l},i.map(o=>{var h;let c=(h=n?.(o))!=null?h:n4.createElement("img",{draggable:!1,src:o});return n4.createElement("div",{className:"centering-container",key:o},c)})),e&&r&&n4.createElement("button",{className:"edit-icon",onClick:r},n4.createElement(D8,null)))},GE={getAccessibilityString:t=>t.data.join(", "),kind:n1.Image,needsHover:!1,useLabel:!1,needsHoverPosition:!1,draw:t=>{var a;return Jk(t,(a=t.cell.displayData)!=null?a:t.cell.data,t.cell.rounding,t.cell.contentAlign)},measure:(t,a)=>a.data.length*50,onDelete:t=>({...t,data:[]}),provideEditor:()=>t=>{let{value:a,onFinishedEditing:e,imageEditorOverride:r}=t;return Wz.createElement(r??qE,{urls:a.data,canWrite:a.allowAdd,onCancel:e,onChange:i=>{e({...a,data:[i]})}})},onPaste:(t,a)=>{t=t.trim();let r=t.split(",").map(n=>{try{return new URL(n),n}catch{return}}).filter(n=>n!==void 0);if(!(r.length===a.data.length&&r.every((n,i)=>n===a.data[i])))return{...a,data:r}}},KE={getAccessibilityString:()=>"",kind:n1.Loading,needsHover:!1,useLabel:!1,needsHoverPosition:!1,measure:()=>120,draw:()=>{},onPaste:()=>{}},XE=L0("div")({name:"MarkdownContainer",class:"mlbeo71"}),YE=class extends P8.default.PureComponent{constructor(){super(...arguments),this.targetElement=null,this.containerRefHook=t=>{this.targetElement=t,this.renderMarkdownIntoDiv()}}renderMarkdownIntoDiv(){let{targetElement:t,props:a}=this;if(t===null)return;let{contents:e,createNode:r}=a,n=j1(e),i=document.createRange();i.selectNodeContents(t),i.deleteContents();let l=r?.(n);if(l===void 0){let h=document.createElement("template");h.innerHTML=n,l=h.content}t.append(l);let o=t.getElementsByTagName("a");for(let h of o)h.target="_blank",h.rel="noreferrer noopener"}render(){return this.renderMarkdownIntoDiv(),P8.default.createElement(XE,{ref:this.containerRefHook})}},QE=L0("textarea")({name:"InputBox",class:"ijuk0po"}),ZE=L0("div")({name:"ShadowBox",class:"saq3p5l"}),JE=L0("div")({name:"GrowingEntryStyle",class:"gf8vzix"}),Xp=0,N5=t=>{let{placeholder:a,value:e,onKeyDown:r,highlight:n,altNewline:i,validatedSelection:l,...o}=t,{onChange:h,className:c}=o,v=h2.useRef(null),g=e??"";i2(h!==void 0,"GrowingEntry must be a controlled input area");let[d]=h2.useState(()=>"input-box-"+(Xp=(Xp+1)%1e7));h2.useEffect(()=>{let p=v.current;if(p===null||p.disabled)return;let z=g.toString().length;p.focus(),p.setSelectionRange(n?0:z,z)},[]),h2.useLayoutEffect(()=>{var p;if(l!==void 0){let z=typeof l=="number"?[l,null]:l;(p=v.current)==null||p.setSelectionRange(z[0],z[1])}},[l]);let u=h2.useCallback(p=>{p.key==="Enter"&&p.shiftKey&&i===!0||r?.(p)},[i,r]);return h2.createElement(JE,{className:"gdg-growing-entry"},h2.createElement(ZE,{className:c},g+` +`),h2.createElement(QE,{...o,className:(c??"")+" gdg-input",id:d,ref:v,onKeyDown:u,value:g,placeholder:a,dir:"auto"}))},t_=()=>t=>t.targetWidth,Yp=L0("div")({name:"MarkdownOverlayEditorStyle",class:"mdwzdl1",vars:{"mdwzdl1-0":[t_(),"px"]}}),a_=t=>{let{value:a,onChange:e,forceEditMode:r,createNode:n,targetRect:i,onFinish:l,validatedSelection:o}=t,h=a.data,c=a.readonly===!0,[v,g]=R0.useState(h===""||r),d=R0.useCallback(()=>{g(p=>!p)},[]),u=h?"ml-6":"";return v?R0.createElement(Yp,{targetWidth:i.width-20},R0.createElement(N5,{autoFocus:!0,highlight:!1,validatedSelection:o,value:h,onKeyDown:p=>{p.key==="Enter"&&p.stopPropagation()},onChange:e}),R0.createElement("div",{className:`edit-icon checkmark-hover ${u}`,onClick:()=>l(a)},R0.createElement(Bk,null))):R0.createElement(Yp,{targetWidth:i.width},R0.createElement(YE,{contents:h,createNode:n}),!c&&R0.createElement(R0.Fragment,null,R0.createElement("div",{className:"spacer"}),R0.createElement("div",{className:`edit-icon edit-hover ${u}`,onClick:d},R0.createElement(D8,null))),R0.createElement("textarea",{className:"md-edit-textarea gdg-input",autoFocus:!0}))},e_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:n1.Markdown,needsHover:!1,needsHoverPosition:!1,drawPrep:Jn,measure:(t,a,e)=>{let r=a.data.split(` +`)[0];return t.measureText(r).width+2*e.cellHorizontalPadding},draw:t=>ti(t,t.cell.data,t.cell.contentAlign),onDelete:t=>({...t,data:""}),provideEditor:()=>t=>{let{onChange:a,value:e,target:r,onFinishedEditing:n,markdownDivCreateNode:i,forceEditMode:l,validatedSelection:o}=t;return qz.createElement(a_,{onFinish:n,targetRect:r,value:e,validatedSelection:o,onChange:h=>a({...e,data:h.target.value}),forceEditMode:l,createNode:i})},onPaste:(t,a)=>t===a.data?void 0:{...a,data:t}},r_={getAccessibilityString:t=>t.row.toString(),kind:o2.Marker,needsHover:!0,needsHoverPosition:!1,drawPrep:jk,measure:()=>44,draw:t=>Gk(t,t.cell.row,t.cell.checked,t.cell.markerKind,t.cell.drawHandle),onClick:t=>{let{bounds:a,cell:e,posX:r,posY:n}=t,{width:i,height:l}=a,o=e.drawHandle?7+(i-7)/2:i/2,h=l/2;if(Math.abs(r-o)<=10&&Math.abs(n-h)<=10)return{...e,checked:!e.checked}},onPaste:()=>{}},n_={getAccessibilityString:()=>"",kind:o2.NewRow,needsHover:!0,needsHoverPosition:!1,measure:()=>200,draw:t=>Wk(t,t.cell.hint,t.cell.icon),onPaste:()=>{}},i_=o4.lazy(async()=>await Promise.resolve().then(()=>(Ap(),Sp))),l_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:n1.Number,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Jn,draw:t=>ti(t,t.cell.displayData,t.cell.contentAlign),measure:(t,a)=>t.measureText(a.displayData).width+16,onDelete:t=>({...t,data:void 0}),provideEditor:()=>t=>{let{isHighlighted:a,onChange:e,value:r,validatedSelection:n}=t;return o4.createElement(o4.Suspense,{fallback:null},o4.createElement(i_,{highlight:a,disabled:r.readonly===!0,value:r.data,fixedDecimals:r.fixedDecimals,allowNegative:r.allowNegative,thousandSeparator:r.thousandSeparator,decimalSeparator:r.decimalSeparator,validatedSelection:n,onChange:i=>{var l;return e({...r,data:Number.isNaN((l=i.floatValue)!=null?l:0)?0:i.floatValue})}}))},onPaste:(t,a)=>{let e=Number.parseFloat(t);if(!(Number.isNaN(e)||a.data===e))return{...a,data:e}}},o_={getAccessibilityString:()=>"",measure:()=>108,kind:n1.Protected,needsHover:!1,needsHoverPosition:!1,draw:Kk,onPaste:()=>{}},h_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:n1.RowID,needsHover:!1,needsHoverPosition:!1,drawPrep:(t,a)=>Jn(t,a,t.theme.textLight),draw:t=>ti(t,t.cell.data,t.cell.contentAlign),measure:(t,a)=>t.measureText(a.data).width+16,provideEditor:()=>t=>{let{isHighlighted:a,onChange:e,value:r,validatedSelection:n}=t;return Gz.default.createElement(N5,{highlight:a,autoFocus:r.readonly!==!0,disabled:r.readonly!==!1,value:r.data,validatedSelection:n,onChange:i=>e({...r,data:i.target.value})})},onPaste:()=>{}},c_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:n1.Text,needsHover:!1,needsHoverPosition:!1,drawPrep:Jn,useLabel:!0,draw:t=>(ti(t,t.cell.displayData,t.cell.contentAlign,t.cell.allowWrapping,t.hyperWrapping),!0),measure:(t,a,e)=>{let r=a.displayData.split(` +`).slice(0,a.allowWrapping===!0?void 0:1);return Math.max(...r.map(n=>t.measureText(n).width+2*e.cellHorizontalPadding))},onDelete:t=>({...t,data:""}),provideEditor:t=>({disablePadding:t.allowWrapping===!0,editor:a=>{let{isHighlighted:e,onChange:r,value:n,validatedSelection:i}=a;return Kz.createElement(N5,{style:t.allowWrapping===!0?{padding:"3px 8.5px"}:void 0,highlight:e,autoFocus:n.readonly!==!0,disabled:n.readonly===!0,altNewline:!0,value:n.data,validatedSelection:i,onChange:l=>r({...n,data:l.target.value})})}}),onPaste:(t,a)=>t===a.data?void 0:{...a,data:t}},v_=L0("div")({name:"UriOverlayEditorStyle",class:"uf0sjo8"}),g_=t=>{let{uri:a,onChange:e,forceEditMode:r,readonly:n,validatedSelection:i,preview:l}=t,[o,h]=ea.useState(a===""||r),c=ea.useCallback(()=>{h(!0)},[]);return o?ea.createElement(N5,{validatedSelection:i,highlight:!0,autoFocus:!0,value:a,onChange:e}):ea.createElement(v_,null,ea.createElement("a",{className:"link-area",href:a,target:"_blank",rel:"noopener noreferrer"},l),!n&&ea.createElement("div",{className:"edit-icon",onClick:c},ea.createElement(D8,null)),ea.createElement("textarea",{className:"gdg-input",autoFocus:!0}))},d_=g_,s_={getAccessibilityString:t=>{var a,e;return(e=(a=t.data)==null?void 0:a.toString())!=null?e:""},kind:n1.Uri,needsHover:!1,needsHoverPosition:!1,useLabel:!0,drawPrep:Jn,draw:t=>ti(t,t.cell.data,t.cell.contentAlign),measure:(t,a,e)=>t.measureText(a.data).width+e.cellHorizontalPadding*2,onDelete:t=>({...t,data:""}),provideEditor:()=>t=>{var a;let{onChange:e,value:r,forceEditMode:n,validatedSelection:i}=t;return Xz.createElement(d_,{forceEditMode:n,uri:r.data,preview:(a=r.displayData)!=null?a:r.data,validatedSelection:i,readonly:r.readonly===!0,onChange:l=>e({...r,data:l.target.value})})},onPaste:(t,a)=>t===a.data?void 0:{...a,data:t}},u_={[o2.Marker]:r_,[o2.NewRow]:n_,[n1.Boolean]:bE,[n1.Bubble]:DE,[n1.Drilldown]:WE,[n1.Image]:GE,[n1.Loading]:KE,[n1.Markdown]:e_,[n1.Number]:l_,[n1.Protected]:o_,[n1.RowID]:h_,[n1.Text]:c_,[n1.Uri]:s_},f_=0;function p_(t){return(0,tz.default)((0,B8.default)((0,B8.default)(t).filter(a=>a.span!==void 0).map(a=>{var e,r,n,i;return(0,i4.default)(((r=(e=a.span)==null?void 0:e[0])!=null?r:0)+1,((i=(n=a.span)==null?void 0:n[1])!=null?i:0)+1)})))}function A5(t,a){return t===void 0||a===0||t.columns.length===0&&t.current===void 0?t:{current:t.current===void 0?void 0:{cell:[t.current.cell[0]+a,t.current.cell[1]],range:{...t.current.range,x:t.current.range.x+a},rangeStack:t.current.rangeStack.map(e=>({...e,x:e.x+a}))},rows:t.rows,columns:t.columns.offset(a)}}var Qp={selectAll:!0,selectRow:!0,selectColumn:!0,downFill:!1,rightFill:!1,pageUp:!1,pageDown:!1,clear:!0,copy:!0,paste:!0,search:!1,first:!0,last:!0},Zp={kind:n1.Loading,allowOverlay:!1},F5={columns:mt.empty(),rows:mt.empty(),current:void 0},z_=(t,a)=>{var e,r,n,i,l;let[o,h]=$.useState(F5),[c,v]=$.useState(),g=$.useRef(null),d=$.useRef(null),[u,p]=$.useState(),z=$.useRef(null),w=$.useRef(),{rowMarkers:s="none",rowMarkerWidth:f,imageEditorOverride:m,getRowThemeOverride:H,markdownDivCreateNode:x,width:y,height:R,columns:L,rows:V,getCellContent:C,onCellClicked:k,onCellActivated:b,onFinishedEditing:F,coercePasteValue:_,drawHeader:j,onHeaderClicked:i1,spanRangeBehavior:Z="default",onGroupHeaderClicked:d1,onCellContextMenu:O,className:a1,onHeaderContextMenu:W,getCellsForSelection:L1,onGroupHeaderContextMenu:p1,onGroupHeaderRenamed:o1,onCellEdited:H1,onCellsEdited:P1,onSearchResultsChanged:K1,searchResults:W1,onSearchValueChange:Bt,searchValue:T1,onKeyDown:X1,onKeyUp:Y,keybindings:N,onRowAppended:s1,onColumnMoved:x1,validateCell:f1,highlightRegions:U,drawCell:v1,rangeSelect:D="rect",columnSelect:I="multi",rowSelect:C1="multi",rangeSelectionBlending:D1="exclusive",columnSelectionBlending:et="exclusive",rowSelectionBlending:B1="exclusive",onDelete:h1,onDragStart:e1,onMouseMove:u1,onPaste:M1,copyHeaders:I1=!1,freezeColumns:Q1=0,rowSelectionMode:St="auto",rowMarkerStartIndex:jt=1,rowMarkerTheme:Ut,onHeaderMenuClick:Et,getGroupDetails:ot,onSearchClose:J1,onItemHovered:Jt,onSelectionCleared:Mt,showSearch:C0,onVisibleRegionChanged:Z0,gridSelection:B0,onGridSelectionChange:t0,minColumnWidth:Ma=50,maxColumnWidth:dt=500,maxColumnAutoWidth:At,provideEditor:h0,trailingRowOptions:wt,scrollOffsetX:Ft,scrollOffsetY:qt,verticalBorder:c2,onDragOverCell:v2,onDrop:Ua,onColumnResize:O2,onColumnResizeEnd:j0,onColumnResizeStart:g2,customRenderers:D2,fillHandle:ri,drawFocusRing:u0,experimental:Ht,fixedShadowX:m0,fixedShadowY:j5,headerIcons:ia,imageWindowLoader:ni,initialSize:xr,isDraggable:Se,onDragLeave:Ae,onRowMoved:la,overscrollX:Ha,overscrollY:oa,preventDiagonalScrolling:xa,rightElement:q5,rightElementProps:ii,showMinimap:G5,smoothScrollX:li,smoothScrollY:c4,scrollToEnd:Fe,scaleToRem:oi=!1,rowHeight:wr=34,headerHeight:ke=36,groupHeaderHeight:v4=ke,theme:d2,isOutsideClick:J8}=t,wa=Math.max(Ma,20),Wa=Math.max(dt,wa),hi=Math.max(At??Wa,wa),La=$.useMemo(()=>typeof window>"u"?{fontSize:"16px"}:window.getComputedStyle(document.documentElement),[]).fontSize,ha=$.useMemo(()=>Number.parseFloat(La),[La]),[M0,Va,g4,Lr,vi,K5]=$.useMemo(()=>{var M,A,E;if(!oi||ha===16)return[wr,ke,v4,d2,Ha,oa];let T=ha/16,J=wr,K=kp();return[typeof J=="number"?J*T:X=>Math.ceil(J(X)*T),Math.ceil(ke*T),Math.ceil(v4*T),{...d2,headerIconSize:((M=d2?.headerIconSize)!=null?M:K.headerIconSize)*T,cellHorizontalPadding:((A=d2?.cellHorizontalPadding)!=null?A:K.cellHorizontalPadding)*T,cellVerticalPadding:((E=d2?.cellVerticalPadding)!=null?E:K.cellVerticalPadding)*T},Math.ceil((Ha??0)*T),Math.ceil((oa??0)*T)]},[v4,ke,Ha,oa,ha,wr,oi,d2]),Lt=$.useMemo(()=>N===void 0?Qp:{...Qp,...N},[N]),ja=f??(V>1e4?48:V>1e3?44:V>100?36:32),s2=s!=="none",P=s2?1:0,H0=s1!==void 0,V2=wt?.sticky===!0,[X5,gi]=$.useState(!1),Y5=C0??X5,Q5=$.useCallback(()=>{J1!==void 0?J1():gi(!1)},[J1]),d4=$.useMemo(()=>B0===void 0?void 0:A5(B0,P),[B0,P]),q=d4??o,R2=$.useRef(new AbortController);$.useEffect(()=>()=>{R2?.current.abort()},[]);let[P0,Z5]=VE(L1,C,P,R2.current,V),di=$.useCallback((M,A,E)=>{if(f1===void 0)return!0;let T=[M[0]-P,M[1]];return f1?.(T,A,E)},[P,f1]),Ra=$.useRef(B0),J0=$.useCallback((M,A)=>{A&&(M=RE(M,P0,P,Z,R2.current)),t0!==void 0?(Ra.current=A5(M,-P),t0(Ra.current)):h(M)},[t0,P0,P,Z]),ya=jn(O2,$.useCallback((M,A,E,T)=>{O2?.(L[E-P],A,E-P,T)},[O2,P,L])),J5=jn(j0,$.useCallback((M,A,E,T)=>{j0?.(L[E-P],A,E-P,T)},[j0,P,L])),Vr=jn(g2,$.useCallback((M,A,E,T)=>{g2?.(L[E-P],A,E-P,T)},[g2,P,L])),s4=jn(j,$.useCallback(M=>{var A;return(A=j?.({...M,columnIndex:M.columnIndex-P}))!=null?A:!1},[j,P])),Rr=$.useCallback(M=>{if(h1!==void 0){let A=h1(A5(M,-P));return typeof A=="boolean"?A:A5(A,P)}return!0},[h1,P]),[c0,S0,v0]=LE(q,J0,D1,et,B1,D),S=$.useMemo(()=>({...kp(),...Lr}),[Lr]),[G,b1]=$.useState([10,10,0]),z1=$.useCallback(M=>M.kind!==n1.Custom?u_[M.kind]:D2?.find(A=>A.isMatch(M)),[D2]),E1=xE(L,V,Z5,G[0]-(P===0?0:ja)-G[2],wa,hi,S,z1,R2.current),c1=$.useMemo(()=>E1.some(M=>M.group!==void 0),[E1]),$1=c1?Va+g4:Va,st=q.rows.length,S1=s==="none"?"":st===0?vz:st===V?cz:vk,_1=$.useMemo(()=>s==="none"?E1:[{title:S1,width:ja,icon:void 0,hasMenu:!1,style:"normal",themeOverride:Ut},...E1],[E1,ja,s,S1,Ut]),[a0,tt]=$.useMemo(()=>[qt!==void 0&&typeof M0=="number"?Math.floor(qt/M0):0,qt!==void 0&&typeof M0=="number"?-(qt%M0):0],[qt,M0]),ut=$.useRef({height:1,width:1,x:0,y:0}),ht=$.useMemo(()=>{var M,A;return{x:ut.current.x,y:a0,width:(M=ut.current.width)!=null?M:1,height:(A=ut.current.height)!=null?A:1,ty:tt}},[tt,a0]),xt=$.useRef(!1),[_t,Ca,y2]=bk(ht),C2=((e=_t.height)!=null?e:1)>1;$.useLayoutEffect(()=>{if(qt!==void 0&&z.current!==null&&C2){if(z.current.scrollTop===qt)return;z.current.scrollTop=qt,z.current.scrollTop!==qt&&y2(),xt.current=!0}},[qt,C2,y2]);let N2=((r=_t.width)!=null?r:1)>1;$.useLayoutEffect(()=>{if(Ft!==void 0&&z.current!==null&&N2){if(z.current.scrollLeft===Ft)return;z.current.scrollLeft=Ft,z.current.scrollLeft!==Ft&&y2(),xt.current=!0}},[Ft,N2,y2]);let B2=_t.x+P,u2=_t.y,G1=$.useRef(null),Gt=$.useCallback(M=>{var A;M===!0?(A=G1.current)==null||A.focus():window.requestAnimationFrame(()=>{var E;(E=G1.current)==null||E.focus()})},[]),n0=H0?V+1:V,A0=$.useCallback(M=>{let A=P===0?M:M.map(T=>({...T,location:[T.location[0]-P,T.location[1]]})),E=P1?.(A);if(E!==!0)for(let T of A)H1?.(T.location,T.value);return E},[H1,P1,P]),Vm=$.useMemo(()=>{if(U!==void 0)return P===0?U:U.map(M=>{let A=_1.length-M.range.x-P;if(!(A<=0))return{color:M.color,range:{...M.range,x:M.range.x+P,width:Math.min(A,M.range.width)},style:M.style}}).filter(M=>M!==void 0)},[U,_1.length,P]),t6=$.useRef(_1);t6.current=_1;let F0=$.useCallback(([M,A],E=!1)=>{var T,J,K,X,l1,t1,m1,y1,N1,Y1;let w1=H0&&A===n0-1;if(M===0&&s2)return w1?Zp:{kind:o2.Marker,allowOverlay:!1,checked:q?.rows.hasIndex(A)===!0,markerKind:s==="clickable-number"?"number":s,row:jt+A,drawHandle:la!==void 0,cursor:s==="clickable-number"?"pointer":void 0};if(w1){let ct=M===P&&(T=wt?.hint)!=null?T:"",k1=t6.current[M];if(((J=k1?.trailingRowOptions)==null?void 0:J.disabled)===!0)return Zp;{let rt=(X=(K=k1?.trailingRowOptions)==null?void 0:K.hint)!=null?X:ct,gt=(t1=(l1=k1?.trailingRowOptions)==null?void 0:l1.addIcon)!=null?t1:wt?.addIcon;return{kind:o2.NewRow,hint:rt,allowOverlay:!1,icon:gt}}}else{let at=M-P;if(E||Ht?.strict===!0){let k1=ut.current,rt=k1.x>at||at>k1.x+k1.width||k1.y>A||A>k1.y+k1.height,gt=at===((y1=(m1=k1.extras)==null?void 0:m1.selected)==null?void 0:y1[0])&&A===((N1=k1.extras)==null?void 0:N1.selected[1]),Vt=((Y1=k1.extras)==null?void 0:Y1.freezeRegion)===void 0||k1.extras.freezeRegion.x>at||at>k1.extras.freezeRegion.x+k1.extras.freezeRegion.width||k1.extras.freezeRegion.y>A||A>k1.extras.freezeRegion.y+k1.extras.freezeRegion.height;if(rt&&!gt&&Vt)return{kind:n1.Loading,allowOverlay:!1}}let ct=C([at,A]);return P!==0&&ct.span!==void 0&&(ct={...ct,span:[ct.span[0]+P,ct.span[1]+P]}),ct}},[H0,n0,s2,q?.rows,la,s,P,wt?.hint,wt?.addIcon,Ht?.strict,C,jt]),to=$.useCallback(M=>{var A,E;let T=(A=ot?.(M))!=null?A:{name:M};return o1!==void 0&&M!==""&&(T={icon:T.icon,name:T.name,overrideTheme:T.overrideTheme,actions:[...(E=T.actions)!=null?E:[],{title:"Rename",icon:"renameIcon",onClick:J=>ro({group:T.name,bounds:J.bounds})}]}),T},[ot,o1]),si=$.useCallback(M=>{var A;let[E,T]=M.cell,J=_1[E],K=J?.group!==void 0?(A=to(J.group))==null?void 0:A.overrideTheme:void 0,X=J?.themeOverride,l1=H?.(T);v({...M,theme:{...S,...K,...X,...l1,...M.content.themeOverride}})},[H,_1,to,S]),yr=$.useCallback((M,A,E)=>{var T;if(q.current===void 0)return;let[J,K]=q.current.cell,X=F0([J,K]);if(X.kind!==n1.Boolean&&X.allowOverlay){let l1=X;if(E!==void 0)switch(l1.kind){case n1.Number:{let t1=hk(()=>E==="-"?-0:Number.parseFloat(E),0);l1={...l1,data:Number.isNaN(t1)?0:t1};break}case n1.Text:case n1.Markdown:case n1.Uri:l1={...l1,data:E};break}si({target:M,content:l1,initialValue:E,cell:[J,K],highlight:E===void 0,forceEditMode:E!==void 0})}else X.kind===n1.Boolean&&A&&X.readonly!==!0&&(A0([{location:q.current.cell,value:{...X,data:Nz(X.data)}}]),(T=G1.current)==null||T.damage([{cell:q.current.cell}]))},[F0,q,A0,si]),a6=$.useCallback((M,A)=>{var E;let T=(E=G1.current)==null?void 0:E.getBounds(M,A);if(T===void 0||z.current===null)return;let J=F0([M,A]);!J.allowOverlay||si({target:T,content:J,initialValue:void 0,highlight:!0,cell:[M,A],forceEditMode:!0})},[F0,si]),Kt=$.useCallback((M,A,E="both",T=0,J=0,K=void 0)=>{var X;if(z.current!==null){let l1=G1.current,t1=d.current,m1=typeof M!="number"?M.unit==="cell"?M.amount:void 0:M,y1=typeof A!="number"?A.unit==="cell"?A.amount:void 0:A,N1=typeof M!="number"&&M.unit==="px"?M.amount:void 0,Y1=typeof A!="number"&&A.unit==="px"?A.amount:void 0;if(l1!==null&&t1!==null){let w1={x:0,y:0,width:0,height:0},A1=0,at=0;if((m1!==void 0||y1!==void 0)&&(w1=(X=l1.getBounds((m1??0)+P,y1??0))!=null?X:w1,w1.width===0||w1.height===0))return;let ct=t1.getBoundingClientRect(),k1=ct.width/t1.offsetWidth;if(N1!==void 0&&(w1={...w1,x:N1-ct.left-z.current.scrollLeft,width:1}),Y1!==void 0&&(w1={...w1,y:Y1+ct.top-z.current.scrollTop,height:1}),w1!==void 0){let rt={x:w1.x-T,y:w1.y-J,width:w1.width+2*T,height:w1.height+2*J},gt=0;for(let zt=0;ztrt.x?A1=rt.x-kt:i0rt.y?at=rt.y-Rt:ft{var E;let T=_1[M];if(((E=T?.trailingRowOptions)==null?void 0:E.disabled)===!0)return;let J=s1?.(),K,X=!0;J!==void 0&&(K=await J,K==="top"&&(X=!1),typeof K=="number"&&(X=!1));let l1=0,t1=()=>{if(n6.current<=V){l1<500&&window.setTimeout(t1,l1),l1=50+l1*2;return}let m1=typeof K=="number"?K:X?V:0;Kt(M-P,m1),c0({cell:[M,m1],range:{x:M,y:m1,width:1,height:1}},!1,!1,"edit");let y1=r6.current([M-P,m1]);y1.allowOverlay&&gr(y1)&&y1.readonly!==!0&&A&&window.setTimeout(()=>{e6.current(M,m1)},0)};t1()},[_1,s1,P,V,Kt,c0]),ui=$.useCallback(M=>{var A,E,T;let J=(T=(E=(A=E1[M])==null?void 0:A.trailingRowOptions)==null?void 0:E.targetColumn)!=null?T:wt?.targetColumn;if(typeof J=="number")return J+(s2?1:0);if(typeof J=="object"){let K=L.indexOf(J);if(K>=0)return K+(s2?1:0)}},[E1,L,s2,wt?.targetColumn]),qa=$.useRef(),f4=$.useRef(),Cr=$.useCallback((M,A)=>{var E;let[T,J]=A;return{...S,...(E=_1[T])==null?void 0:E.themeOverride,...H?.(J),...M.themeOverride}},[H,_1,S]),Br=$.useCallback(M=>{var A,E,T,J;let K=E5.value?M.metaKey:M.ctrlKey,X=K&&C1==="multi",l1=K&&I==="multi",[t1,m1]=M.location,y1=q.columns,N1=q.rows,[Y1,w1]=(E=(A=q.current)==null?void 0:A.cell)!=null?E:[];if(M.kind==="cell"){if(f4.current=void 0,be.current=[t1,m1],t1===0&&s2){if(H0===!0&&m1===V||s==="number"||C1==="none")return;let A1=F0(M.location);if(A1.kind!==o2.Marker)return;if(la!==void 0){let k1=z1(A1);i2(k1?.kind===o2.Marker);let rt=(T=k1?.onClick)==null?void 0:T.call(k1,{...M,cell:A1,posX:M.localEventX,posY:M.localEventY,bounds:M.bounds,theme:Cr(A1,M.location),preventDefault:()=>{}});if(rt===void 0||rt.checked===A1.checked)return}v(void 0),Gt();let at=N1.hasIndex(m1),ct=qa.current;if(C1==="multi"&&(M.shiftKey||M.isLongTouch===!0)&&ct!==void 0&&N1.hasIndex(ct)){let k1=[Math.min(ct,m1),Math.max(ct,m1)+1];X||St==="multi"?S0(void 0,k1,!0):S0(mt.fromSingleSelection(k1),void 0,X)}else X||M.isTouch||St==="multi"?at?S0(N1.remove(m1),void 0,!0):(S0(void 0,m1,!0),qa.current=m1):at&&N1.length===1?S0(mt.empty(),void 0,K):(S0(mt.fromSingleSelection(m1),void 0,K),qa.current=m1)}else if(t1>=P&&H0&&m1===V){let A1=ui(t1);u4(A1??t1)}else if(Y1!==t1||w1!==m1){let A1=F0(M.location),at=z1(A1);if(at?.onSelect!==void 0){let rt=!1;if(at.onSelect({...M,cell:A1,posX:M.localEventX,posY:M.localEventY,bounds:M.bounds,preventDefault:()=>rt=!0,theme:Cr(A1,M.location)}),rt)return}let ct=V2&&m1===V,k1=V2&&q!==void 0&&((J=q.current)==null?void 0:J.cell[1])===V;if((M.shiftKey||M.isLongTouch===!0)&&Y1!==void 0&&w1!==void 0&&q.current!==void 0&&!k1){if(ct)return;let rt=Math.min(t1,Y1),gt=Math.max(t1,Y1),Vt=Math.min(m1,w1),kt=Math.max(m1,w1);c0({...q.current,range:{x:rt,y:Vt,width:gt-rt+1,height:kt-Vt+1}},!0,K,"click"),qa.current=void 0,Gt()}else c0({cell:[t1,m1],range:{x:t1,y:m1,width:1,height:1}},!0,K,"click"),qa.current=void 0,v(void 0),Gt()}}else if(M.kind==="header")if(be.current=[t1,m1],v(void 0),s2&&t1===0)qa.current=void 0,f4.current=void 0,C1==="multi"&&(N1.length!==V?S0(mt.fromSingleSelection([0,V]),void 0,K):S0(mt.empty(),void 0,K),Gt());else{let A1=f4.current;if(I==="multi"&&(M.shiftKey||M.isLongTouch===!0)&&A1!==void 0&&y1.hasIndex(A1)){let at=[Math.min(A1,t1),Math.max(A1,t1)+1];l1?v0(void 0,at,K):v0(mt.fromSingleSelection(at),void 0,K)}else l1?(y1.hasIndex(t1)?v0(y1.remove(t1),void 0,K):v0(void 0,t1,K),f4.current=t1):I!=="none"&&(v0(mt.fromSingleSelection(t1),void 0,K),f4.current=t1);qa.current=void 0,Gt()}else M.kind===w2?be.current=[t1,m1]:M.kind===O5&&(J0(F5,!1),v(void 0),Gt(),Mt?.(),qa.current=void 0,f4.current=void 0)},[u4,I,Gt,z1,ui,F0,q,s2,V2,Mt,la,P,s,C1,St,V,c0,J0,v0,S0,H0,Cr]),ao=$.useRef(!1),be=$.useRef(),i6=$.useRef(_t),f2=$.useRef(),Rm=$.useCallback(M=>{var A,E;if(p4.current=!1,i6.current=ut.current,M.button!==0&&M.button!==1){f2.current=void 0;return}let T=performance.now(),J=T-((E=(A=f2.current)==null?void 0:A.time)!=null?E:-1e3)<250;f2.current={wasDoubleClick:J,button:M.button,time:T,location:M.location},M?.kind==="header"&&(ao.current=!0);let K=M.kind==="cell"&&M.isFillHandle;!K&&M.kind!=="cell"&&M.isEdge||(p({previousSelection:q,fillHandle:K}),be.current=void 0,!M.isTouch&&M.button===0?Br(M):!M.isTouch&&M.button===1&&(be.current=M.location))},[q,Br]),[eo,ro]=$.useState(),l6=$.useCallback(M=>{if(M.kind!==w2||I!=="multi")return;let A=E5.value?M.metaKey:M.ctrlKey,[E]=M.location,T=q.columns;if(E=P&&Zn(J.group,_1[l1].group);l1--)K--;for(let l1=E+1;l1<_1.length&&Zn(J.group,_1[l1].group);l1++)X++;if(Gt(),A)if(T.hasAll([K,X+1])){let l1=T;for(let t1=K;t1<=X;t1++)l1=l1.remove(t1);v0(l1,void 0,A)}else v0(void 0,[K,X+1],A);else v0(mt.fromSingleSelection([K,X+1]),void 0,A)},[I,Gt,q.columns,_1,P,v0]),fi=$.useCallback(M=>{var A;if(q.current===void 0)return;let E=[],T=q.current.range;for(let J=0;J({cell:J.location})))},[F0,q,A0]),p4=$.useRef(!1),pi=$.useCallback(async(M,A=!1)=>{var E;if((((E=f2.current)==null?void 0:E.wasDoubleClick)===!0||A)&&P0!==void 0&&ya!==void 0){let T=ut.current.y,J=ut.current.height,K=P0({x:M,y:T,width:1,height:Math.min(J,V-T)},R2.current.signal);typeof K!="object"&&(K=await K());let X=E1[M-P],t1=document.createElement("canvas").getContext("2d",{alpha:!1});if(t1!==null){t1.font=`${S.baseFontStyle} ${S.fontFamily}`;let m1=Iz(t1,S,X,0,K,wa,Wa,!1,z1);ya?.(X,m1.width,M,m1.width)}}},[E1,P0,Wa,S,wa,ya,P,V,z1]),[ym,o6]=$.useState(),Cm=$.useCallback((M,A)=>{var E,T,J;let K=u;if(p(void 0),o6(void 0),ao.current=!1,A)return;if(K?.fillHandle===!0&&q.current!==void 0){fi(q.current.cell[1]!==q.current.range.y);return}let[X,l1]=M.location,[t1,m1]=(E=be.current)!=null?E:[],y1=()=>{p4.current=!0},N1=w1=>{var A1,at,ct;if((w1.isTouch||t1===X&&m1===l1)&&k?.([X-P,l1],{...w1,preventDefault:y1}),w1.button===1)return!p4.current;if(!p4.current){let k1=F0(M.location),rt=z1(k1);if(rt!==void 0&&rt.onClick!==void 0){let gt=rt.onClick({...w1,cell:k1,posX:w1.localEventX,posY:w1.localEventY,bounds:w1.bounds,theme:Cr(k1,M.location),preventDefault:y1});gt!==void 0&&!Le(gt)&&Da(gt)&&(A0([{location:w1.location,value:gt}]),(A1=G1.current)==null||A1.damage([{cell:w1.location}]))}if(!p4.current&&((ct=(at=K?.previousSelection)==null?void 0:at.current)==null?void 0:ct.cell)!==void 0&&q.current!==void 0){let[gt,Vt]=q.current.cell,[kt,i0]=K.previousSelection.current.cell;if(X===gt&&X===kt&&l1===Vt&&l1===i0)return b?.([X-P,l1]),yr(w1.bounds,!1),!0}}return!1},Y1=M.location[0]-P;if(M.isTouch){let w1=ut.current,A1=i6.current;if(w1.x!==A1.x||w1.y!==A1.y)return;if(M.isLongTouch===!0){if(M.kind==="cell"&&((T=q?.current)==null?void 0:T.cell[0])===X&&((J=q?.current)==null?void 0:J.cell[1])===l1){O?.([Y1,M.location[1]],{...M,preventDefault:y1});return}else if(M.kind==="header"&&q.columns.hasIndex(X)){W?.(Y1,{...M,preventDefault:y1});return}else if(M.kind===w2){if(Y1<0)return;p1?.(Y1,{...M,preventDefault:y1});return}}M.kind==="cell"?N1(M)||Br(M):M.kind===w2?d1?.(Y1,{...M,preventDefault:y1}):(M.kind===we&&i1?.(Y1,{...M,preventDefault:y1}),Br(M));return}if(M.kind==="header"){if(Y1<0)return;M.isEdge?pi(X):M.button===0&&X===t1&&l1===m1&&i1?.(Y1,{...M,preventDefault:y1})}if(M.kind===w2){if(Y1<0)return;M.button===0&&X===t1&&l1===m1&&(d1?.(Y1,{...M,preventDefault:y1}),p4.current||l6(M))}M.kind==="cell"&&(M.button===0||M.button===1)&&N1(M),be.current=void 0},[u,P,q,k,fi,F0,z1,Cr,A0,b,yr,O,W,p1,Br,d1,pi,i1,l6]),Bm=$.useCallback(M=>{let A={...M,location:[M.location[0]-P,M.location[1]]};u1?.(A),o6(E=>{var T,J;return ao.current?[M.scrollEdge[0],0]:M.scrollEdge[0]===E?.[0]&&M.scrollEdge[1]===E[1]?E:u===void 0||((J=(T=f2.current)==null?void 0:T.location[0])!=null?J:0){Et?.(M-P,A)},[Et,P]),Ba=(n=q?.current)==null?void 0:n.cell,Am=$.useCallback((M,A,E,T,J,K)=>{xt.current=!1;let X=Ba;X!==void 0&&(X=[X[0]-P,X[1]]);let l1={x:M.x-P,y:M.y,width:M.width,height:H0&&M.y+M.height>=V?M.height-1:M.height,tx:J,ty:K,extras:{selected:X,freezeRegion:Q1===0?void 0:{x:0,y:M.y,width:Q1,height:M.height}}};ut.current=l1,Ca(l1),b1([A,E,T]),Z0?.(l1,l1.tx,l1.ty,l1.extras)},[Ba,P,H0,V,Q1,Ca,Z0]),Fm=jn(x1,$.useCallback((M,A)=>{x1?.(M-P,A-P),I!=="none"&&v0(mt.fromSingleSelection(A),void 0,!0)},[I,x1,P,v0])),no=$.useRef(!1),km=$.useCallback(M=>{if(M.location[0]===0&&P>0){M.preventDefault();return}e1?.({...M,location:[M.location[0]-P,M.location[1]]}),M.defaultPrevented()||(no.current=!0),p(void 0)},[e1,P]),bm=$.useCallback(()=>{no.current=!1},[]),Em=$.useCallback(M=>{var A,E;if(!(((A=f2?.current)==null?void 0:A.button)!==void 0&&f2.current.button>=1)){if(u!==void 0&&((E=f2.current)==null?void 0:E.location[0])===0&&M.location[0]===0&&P===1&&C1==="multi"&&u.previousSelection&&!u.previousSelection.rows.hasIndex(f2.current.location[1])&&q.rows.hasIndex(f2.current.location[1])){let T=Math.min(f2.current.location[1],M.location[1]),J=Math.max(f2.current.location[1],M.location[1])+1;S0(mt.fromSingleSelection([T,J]),void 0,!1)}if(u!==void 0&&q.current!==void 0&&!no.current&&(D==="rect"||D==="multi-rect")){let[T,J]=q.current.cell,[K,X]=M.location;if(X<0&&(X=ut.current.y),V2&&J===V)return;if(V2&&X===V)if(M.kind===O5)X--;else return;K=Math.max(K,P);let m1=K-T,y1=X-J,N1={x:m1>=0?T:K,y:y1>=0?J:X,width:Math.abs(m1)+1,height:Math.abs(y1)+1};c0({...q.current,range:N1},!0,!1,"drag")}Jt?.({...M,location:[M.location[0]-P,M.location[1]]})}},[u,P,C1,q,D,Jt,S0,V2,V,c0]),Ee=$.useCallback(M=>{if(q.current===void 0)return;let[A,E]=M,[T,J]=q.current.cell,K=q.current.range,X=K.x,l1=K.x+K.width,t1=K.y,m1=K.y+K.height;if(E!==0)switch(E){case 2:{m1=V,t1=J,Kt(0,m1,"vertical");break}case-2:{t1=0,m1=J+1,Kt(0,t1,"vertical");break}case 1:{t1J+1?(m1--,Kt(0,m1,"vertical")):(t1=Math.max(0,t1-1),Kt(0,t1,"vertical"));break}default:sr(E)}if(A!==0)if(A===2)l1=_1.length,X=T,Kt(l1-1-P,0,"horizontal");else if(A===-2)X=P,l1=T+1,Kt(X-P,0,"horizontal");else{let y1=[];if(P0!==void 0){let N1=P0({x:X,y:t1,width:l1-X-P,height:m1-t1},R2.current.signal);typeof N1=="object"&&(y1=p_(N1))}if(A===1){let N1=!1;if(X0){let Y1=(0,i4.default)(X+1,T+1).find(w1=>!y1.includes(w1-P));Y1!==void 0&&(X=Y1,N1=!0)}else X++,N1=!0;N1&&Kt(X,0,"horizontal")}N1||(l1=Math.min(_1.length,l1+1),Kt(l1-1-P,0,"horizontal"))}else if(A===-1){let N1=!1;if(l1>T+1){if(y1.length>0){let Y1=(0,i4.default)(l1-1,T,-1).find(w1=>!y1.includes(w1-P));Y1!==void 0&&(l1=Y1,N1=!0)}else l1--,N1=!0;N1&&Kt(l1-P,0,"horizontal")}N1||(X=Math.max(P,X-1),Kt(X-P,0,"horizontal"))}else sr(A)}c0({cell:q.current.cell,range:{x:X,y:t1,width:l1-X,height:m1-t1}},!0,!1,"keyboard-select")},[P0,q,_1.length,P,V,Kt,c0]),Ga=$.useCallback((M,A,E,T)=>{let J=n0-(E?0:1);if(M=(0,Gn.default)(M,P,E1.length-1+P),A=(0,Gn.default)(A,0,J),M===Ba?.[0]&&A===Ba?.[1])return!1;if(T&&q.current!==void 0){let K=[...q.current.rangeStack];(q.current.range.width>1||q.current.range.height>1)&&K.push(q.current.range),J0({...q,current:{cell:[M,A],range:{x:M,y:A,width:1,height:1},rangeStack:K}},!0)}else c0({cell:[M,A],range:{x:M,y:A,width:1,height:1}},!0,!1,"keyboard-nav");return w.current!==void 0&&w.current[0]===M&&w.current[1]===A&&(w.current=void 0),Kt(M-P,A),!0},[n0,P,E1.length,Ba,q,Kt,J0,c0]),_m=$.useCallback((M,A)=>{c?.cell!==void 0&&M!==void 0&&Da(M)&&(A0([{location:c.cell,value:M}]),window.requestAnimationFrame(()=>{var J;(J=G1.current)==null||J.damage([{cell:c.cell}])})),Gt(!0),v(void 0);let[E,T]=A;if(q.current!==void 0&&(E!==0||T!==0)){let J=q.current.cell[1]===n0-1&&M!==void 0;Ga((0,Gn.default)(q.current.cell[0]+E,0,_1.length-1),(0,Gn.default)(q.current.cell[1]+T,0,n0-1),J,!1)}F?.(M,A)},[c?.cell,Gt,q,F,A0,n0,Ga,_1.length]),io=$.useMemo(()=>`gdg-overlay-${f_++}`,[]),Sr=$.useCallback(M=>{(async()=>{var E,T,J,K,X;let l1=!1;if(X1!==void 0&&X1({...M,cancel:()=>{l1=!0}}),l1)return;let t1=()=>{M.stopPropagation(),M.preventDefault()},m1=c!==void 0,{altKey:y1,shiftKey:N1,metaKey:Y1,ctrlKey:w1,key:A1,bounds:at}=M,ct=E5.value,k1=ct?Y1:w1,rt=A1==="Delete"||ct&&A1==="Backspace",gt=ut.current,Vt=q.columns,kt=q.rows;if(A1==="Escape"){m1?v(void 0):Lt.clear&&(J0(F5,!1),Mt?.());return}else if(T0("primary+a",M)&&Lt.selectAll){if(!m1)J0({columns:mt.empty(),rows:mt.empty(),current:{cell:(T=(E=q.current)==null?void 0:E.cell)!=null?T:[P,0],range:{x:P,y:0,width:L.length,height:V},rangeStack:[]}},!1);else{let zt=document.getElementById(io);if(zt!==null){let f0=window.getSelection(),k0=document.createRange();k0.selectNodeContents(zt),f0?.removeAllRanges(),f0?.addRange(k0)}}t1();return}else T0("primary+f",M)&&Lt.search&&(t1(),(J=g?.current)==null||J.focus({preventScroll:!0}),gi(!0));function i0(zt){var f0,k0,Ar,z4;Gt();let _e=[];for(let Te=zt.x;Te({cell:Te.location})))}if(rt){let zt=(K=Rr?.(q))!=null?K:!0;if(t1(),zt!==!1){let f0=zt===!0?q:zt;if(f0.current!==void 0){i0(f0.current.range);for(let k0 of f0.current.rangeStack)i0(k0)}for(let k0 of f0.rows)i0({x:P,y:k0,width:_1.length-P,height:1});for(let k0 of f0.columns)i0({x:k0,y:0,width:1,height:V})}return}if(q.current===void 0)return;let[Rt,ft]=q.current.cell,q0=!1;if(Lt.selectColumn&&T0("ctrl+ ",M)&&I!=="none")Vt.hasIndex(Rt)?v0(Vt.remove(Rt),void 0,!0):I==="single"?v0(mt.fromSingleSelection(Rt),void 0,!0):v0(void 0,Rt,!0);else if(Lt.selectRow&&T0("shift+ ",M)&&C1!=="none")kt.hasIndex(ft)?S0(kt.remove(ft),void 0,!0):C1==="single"?S0(mt.fromSingleSelection(ft),void 0,!0):S0(void 0,ft,!0);else if((T0("Enter",M)||T0(" ",M)||T0("shift+Enter",M))&&at!==void 0)m1?(v(void 0),T0("Enter",M)?ft++:T0("shift+Enter",M)&&ft--):ft===V&&H0?window.setTimeout(()=>{let zt=ui(Rt);u4(zt??Rt)},0):(b?.([Rt-P,ft]),yr(at,!0),t1());else if(Lt.downFill&&T0("primary+_68",M)&&q.current.range.height>1)fi(!1),t1();else if(Lt.rightFill&&T0("primary+_82",M)&&q.current.range.width>1){let zt=[],f0=q.current.range;for(let k0=0;k0({cell:k0.location}))),t1()}else if(Lt.pageDown&&T0("PageDown",M))ft+=Math.max(1,ut.current.height-4),t1();else if(Lt.pageUp&&T0("PageUp",M))ft-=Math.max(1,ut.current.height-4),t1();else if(Lt.first&&T0("primary+Home",M))v(void 0),ft=0,Rt=0;else if(Lt.last&&T0("primary+End",M))v(void 0),ft=Number.MAX_SAFE_INTEGER,Rt=Number.MAX_SAFE_INTEGER;else if(Lt.first&&T0("primary+shift+Home",M))v(void 0),Ee([-2,-2]);else if(Lt.last&&T0("primary+shift+End",M))v(void 0),Ee([2,2]);else if(A1==="ArrowDown"){if(w1&&y1)return;v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([0,k1&&!y1?2:1]):(y1&&!k1&&(q0=!0),k1&&!y1?ft=V-1:ft+=1)}else if(A1==="ArrowUp"||A1==="Home"){let zt=A1==="Home"||k1;v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([0,zt&&!y1?-2:-1]):(y1&&!zt&&(q0=!0),ft+=zt&&!y1?Number.MIN_SAFE_INTEGER:-1)}else if(A1==="ArrowRight"||A1==="End"){let zt=A1==="End"||k1;v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([zt&&!y1?2:1,0]):(y1&&!zt&&(q0=!0),Rt+=zt&&!y1?Number.MAX_SAFE_INTEGER:1)}else if(A1==="ArrowLeft")v(void 0),N1&&(D==="rect"||D==="multi-rect")?Ee([k1&&!y1?-2:-1,0]):(y1&&!k1&&(q0=!0),Rt+=k1&&!y1?Number.MIN_SAFE_INTEGER:-1);else if(A1==="Tab")v(void 0),N1?Rt--:Rt++;else if(!Y1&&!w1&&q.current!==void 0&&A1.length===1&&/[ -~]/g.test(A1)&&at!==void 0&&gr(C([Rt-P,Math.max(0,ft-1)]))){if((!V2||ft!==V)&&(gt.y>ft||ft>gt.y+gt.height||gt.x>Rt||Rt>gt.x+gt.width))return;yr(at,!0,A1),t1()}Ga(Rt,ft,!1,q0)&&t1()})()},[X1,c,q,Lt.selectAll,Lt.search,Lt.selectColumn,Lt.selectRow,Lt.downFill,Lt.rightFill,Lt.pageDown,Lt.pageUp,Lt.first,Lt.last,Lt.clear,I,C1,C,P,Ga,J0,Mt,L.length,V,io,Gt,A0,z1,Rr,_1.length,v0,S0,H0,ui,u4,b,yr,fi,F0,Ee,D,V2]),Tm=$.useCallback((M,A)=>{let E=M.location[0]-P;if(M.kind==="header"&&W?.(E,{...M,preventDefault:A}),M.kind===w2){if(E<0)return;p1?.(E,{...M,preventDefault:A})}if(M.kind==="cell"){let[T,J]=M.location;O?.([E,J],{...M,preventDefault:A}),ck(q,M.location)||Ga(T,J,!1,!1)}},[q,O,p1,W,P,Ga]),lo=$.useCallback(async M=>{var A,E,T,J,K,X,l1;if(!Lt.paste)return;function t1(w1,A1,at){var ct,k1;if(!Le(w1)&&gr(w1)&&w1.readonly!==!0){let rt=_?.(at,w1);if(rt!==void 0&&Da(rt))return rt.kind!==w1.kind&&console.warn("Coercion should not change cell kind."),{location:A1,value:rt};let gt=z1(w1);if(gt===void 0)return;if(gt.kind===n1.Custom){i2(w1.kind===n1.Custom);let Vt=(ct=gt.onPaste)==null?void 0:ct.call(gt,at,w1.data);return Vt===void 0?void 0:{location:A1,value:{...w1,data:Vt}}}else{let Vt=(k1=gt.onPaste)==null?void 0:k1.call(gt,at,w1);return Vt===void 0?void 0:(i2(Vt.kind===w1.kind),{location:A1,value:Vt})}}}let m1=q.columns,y1=q.rows,N1=((A=z.current)==null?void 0:A.contains(document.activeElement))===!0||((E=d.current)==null?void 0:E.contains(document.activeElement))===!0,Y1=(T=q.current)==null?void 0:T.cell;if(Y1===void 0&&m1.length===1&&(Y1=[(J=m1.first())!=null?J:0,0]),Y1===void 0&&y1.length===1&&(Y1=[P,(K=y1.first())!=null?K:0]),N1&&Y1!==void 0){let w1,A1,at="text/plain",ct="text/html";if(navigator.clipboard.read!==void 0){let Vt=await navigator.clipboard.read();for(let kt of Vt){if(kt.types.includes(ct)){let Rt=await(await kt.getType(ct)).text(),ft=document.createElement("html");ft.innerHTML=Rt;let q0=ft.querySelector("table");if(q0!==null){w1=jp(q0);break}}kt.types.includes(at)&&(A1=await(await kt.getType(at)).text())}}else if(navigator.clipboard.readText!==void 0)A1=await navigator.clipboard.readText();else if(M!==void 0&&M?.clipboardData!==null){if(M.clipboardData.types.includes(ct)){let Vt=M.clipboardData.getData(ct),kt=document.createElement("html");kt.innerHTML=Vt;let i0=kt.querySelector("table");i0!==null&&(w1=jp(i0))}w1===void 0&&M.clipboardData.types.includes(at)&&(A1=M.clipboardData.getData(at))}else return;let[k1,rt]=Y1,gt=[];do{if(M1===void 0){let Vt=F0(Y1),kt=t1(Vt,Y1,(X=A1??w1?.map(i0=>i0.join(" ")).join(" "))!=null?X:"");kt!==void 0&>.push(kt);break}if(w1===void 0){if(A1===void 0)return;w1=yE(A1)}if(M1===!1||typeof M1=="function"&&M1?.([Y1[0]-P,Y1[1]],w1)!==!0)return;for(let[Vt,kt]of w1.entries()){if(Vt+rt>=V)break;for(let[i0,Rt]of kt.entries()){let ft=[i0+k1,Vt+rt],q0=F0(ft),Ka=t1(q0,ft,Rt);Ka!==void 0&>.push(Ka)}}}while(!1);A0(gt),(l1=G1.current)==null||l1.damage(gt.map(Vt=>({cell:Vt.location})))}},[_,z1,F0,q,Lt.paste,A0,M1,P,V]);W0("paste",lo,window,!1,!0);let oo=$.useCallback(async(M,A)=>{var E,T;if(!Lt.copy)return;let J=A===!0||((E=z.current)==null?void 0:E.contains(document.activeElement))===!0||((T=d.current)==null?void 0:T.contains(document.activeElement))===!0,K=q.columns,X=q.rows,l1=(t1,m1)=>{if(!I1)qp(t1,m1,M);else{let y1=m1.map(N1=>({kind:n1.Text,data:L[N1].title,displayData:L[N1].title,allowOverlay:!1}));qp([y1,...t1],m1,M)}};if(J&&P0!==void 0){if(q.current!==void 0){let t1=P0(q.current.range,R2.current.signal);typeof t1!="object"&&(t1=await t1()),l1(t1,(0,i4.default)(q.current.range.x-P,q.current.range.x+q.current.range.width-P))}else if(X!==void 0&&X.length>0){let m1=[...X].map(y1=>{let N1=P0({x:P,y:y1,width:L.length,height:1},R2.current.signal);return typeof N1=="object"?N1[0]:N1().then(Y1=>Y1[0])});if(m1.some(y1=>y1 instanceof Promise)){let y1=await Promise.all(m1);l1(y1,(0,i4.default)(L.length))}else l1(m1,(0,i4.default)(L.length))}else if(K.length>0){let t1=[],m1=[];for(let y1 of K){let N1=P0({x:y1,y:0,width:1,height:V},R2.current.signal);typeof N1!="object"&&(N1=await N1()),t1.push(N1),m1.push(y1-P)}if(t1.length===1)l1(t1[0],m1);else{let y1=t1.reduce((N1,Y1)=>N1.map((w1,A1)=>[...w1,...Y1[A1]]));l1(y1,m1)}}}},[L,P0,q,Lt.copy,P,V,I1]);W0("copy",oo,window,!1,!1);let Pm=$.useCallback((M,A)=>{if(K1!==void 0){P!==0&&(M=M.map(J=>[J[0]-P,J[1]])),K1(M,A);return}if(M.length===0||A===-1)return;let[E,T]=M[A];w.current!==void 0&&w.current[0]===E&&w.current[1]===T||(w.current=[E,T],Ga(E,T,!1,!1))},[K1,P,Ga]),[zi,mi]=(l=(i=B0?.current)==null?void 0:i.cell)!=null?l:[],h6=$.useRef(Kt);h6.current=Kt,$.useLayoutEffect(()=>{var M,A,E,T;!xt.current&&zi!==void 0&&mi!==void 0&&(zi!==((A=(M=Ra.current)==null?void 0:M.current)==null?void 0:A.cell[0])||mi!==((T=(E=Ra.current)==null?void 0:E.current)==null?void 0:T.cell[1]))&&h6.current(zi,mi),xt.current=!1},[zi,mi]);let c6=q.current!==void 0&&(q.current.cell[0]>=_1.length||q.current.cell[1]>=n0);$.useLayoutEffect(()=>{c6&&J0(F5,!1)},[c6,J0]);let Im=$.useMemo(()=>H0===!0&&wt?.tint===!0?mt.fromSingleSelection(n0-1):mt.empty(),[n0,H0,wt?.tint]),Om=$.useCallback(M=>{var A;return typeof c2=="boolean"?c2:(A=c2?.(M-P))!=null?A:!0},[P,c2]),Dm=$.useMemo(()=>{if(eo===void 0||d.current===null)return null;let{bounds:M,group:A}=eo,E=d.current.getBoundingClientRect();return $.createElement(ME,{bounds:M,group:A,canvasBounds:E,onClose:()=>ro(void 0),onFinish:T=>{ro(void 0),o1?.(A,T)}})},[o1,eo]),Nm=Math.min(_1.length,Q1+(s2?1:0));$.useImperativeHandle(a,()=>({appendRow:(M,A)=>u4(M+P,A),updateCells:M=>{var A;return P!==0&&(M=M.map(E=>({cell:[E.cell[0]+P,E.cell[1]]}))),(A=G1.current)==null?void 0:A.damage(M)},getBounds:(M,A)=>{var E;return(E=G1.current)==null?void 0:E.getBounds(M+P,A)},focus:()=>{var M;return(M=G1.current)==null?void 0:M.focus()},emit:async M=>{switch(M){case"delete":Sr({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!1,key:"Delete",keyCode:46,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-right":Sr({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"r",keyCode:82,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"fill-down":Sr({bounds:void 0,cancel:()=>{},stopPropagation:()=>{},preventDefault:()=>{},ctrlKey:!0,key:"d",keyCode:68,metaKey:!1,shiftKey:!1,altKey:!1,rawEvent:void 0,location:void 0});break;case"copy":await oo(void 0,!0);break;case"paste":await lo();break}},scrollTo:Kt,remeasureColumns:M=>{for(let A of M)pi(A+P,!0)}}),[u4,pi,oo,Sr,lo,P,Kt]);let[v6,g6]=Ba??[],$m=$.useCallback(M=>{let[A,E]=M;if(E===-1){I!=="none"&&(v0(mt.fromSingleSelection(A),void 0,!1),Gt());return}v6===A&&g6===E||(c0({cell:M,range:{x:A,y:E,width:1,height:1}},!0,!1,"keyboard-nav"),Kt(A,E))},[I,Gt,Kt,v6,g6,c0,v0]),[Um,Wm]=$.useState(!1),d6=$.useRef((0,az.default)(M=>{Wm(M)},5)),jm=$.useCallback(()=>{d6.current(!0),q.current===void 0&&q.columns.length===0&&q.rows.length===0&&u===void 0&&c0({cell:[P,u2],range:{x:P,y:u2,width:1,height:1}},!0,!1,"keyboard-select")},[u2,q,u,P,c0]),qm=$.useCallback(()=>{d6.current(!1)},[]),[Gm,Km]=$.useMemo(()=>{var M;let A,E=(M=Ht?.scrollbarWidthOverride)!=null?M:kk(),T=V+(H0?1:0);if(typeof M0=="number")A=$1+T*M0;else{let K=0,X=Math.min(T,10);for(let l1=0;l1X.width+K,0)+E;return[`${Math.min(1e5,J)}px`,`${Math.min(1e5,A)}px`]},[_1,Ht?.scrollbarWidthOverride,M0,V,H0,$1]);return $.createElement(oz.Provider,{value:S},$.createElement(kE,{style:iz(S),className:a1,inWidth:y??Gm,inHeight:R??Km},$.createElement(pE,{fillHandle:ri,drawFocusRing:u0,experimental:Ht,fixedShadowX:m0,fixedShadowY:j5,getRowThemeOverride:H,headerIcons:ia,imageWindowLoader:ni,initialSize:xr,isDraggable:Se,onDragLeave:Ae,onRowMoved:la,overscrollX:vi,overscrollY:K5,preventDiagonalScrolling:xa,rightElement:q5,rightElementProps:ii,showMinimap:G5,smoothScrollX:li,smoothScrollY:c4,className:a1,enableGroups:c1,onCanvasFocused:jm,onCanvasBlur:qm,canvasRef:d,onContextMenu:Tm,theme:S,cellXOffset:B2,cellYOffset:u2,accessibilityHeight:_t.height,onDragEnd:bm,columns:_1,drawCustomCell:v1,drawHeader:s4,disabledRows:Im,freezeColumns:Nm,lockColumns:P,firstColAccessible:P===0,getCellContent:F0,minColumnWidth:wa,maxColumnWidth:Wa,searchInputRef:g,showSearch:Y5,onSearchClose:Q5,highlightRegions:Vm,getCellsForSelection:P0,getGroupDetails:to,headerHeight:Va,isFocused:Um,groupHeaderHeight:c1?g4:0,trailingRowType:H0?wt?.sticky===!0?"sticky":"appended":"none",onColumnResize:ya,onColumnResizeEnd:J5,onColumnResizeStart:Vr,onCellFocused:$m,onColumnMoved:Fm,onDragStart:km,onHeaderMenuClick:Sm,onItemHovered:Em,isFilling:u?.fillHandle===!0,onMouseMove:Bm,onKeyDown:Sr,onKeyUp:Y,onMouseDown:Rm,onMouseUp:Cm,onDragOverCell:v2,onDrop:Ua,onSearchResultsChanged:Pm,onVisibleRegionChanged:Am,clientSize:[G[0],G[1]],rowHeight:M0,searchResults:W1,searchValue:T1,onSearchValueChange:Bt,rows:n0,scrollRef:z,selection:q,translateX:_t.tx,translateY:_t.ty,verticalBorder:Om,gridRef:G1,getCellRenderer:z1,scrollToEnd:Fe}),Dm,c!==void 0&&$.createElement(Lk,{...c,validateCell:di,id:io,getCellRenderer:z1,className:Ht?.isSubGrid===!0?"click-outside-ignore":void 0,provideEditor:h0,imageEditorOverride:m,onFinishEditing:_m,markdownDivCreateNode:x,isOutsideClick:J8})))},Yz=$.forwardRef(z_);var mr=F1(U1());var j8=F1(U1()),q8={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},G8=j8.default.createContext&&j8.default.createContext(q8);var Ce=function(){return Ce=Object.assign||function(t){for(var a,e=1,r=arguments.length;et.length)&&(a=t.length);for(var e=0,r=new Array(a);e=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function om(t){var a=(0,Z1.useRef)(null);function e(r){!r||r===a.current||(a.current=r,t(r))}return e}function L_(t){var a=(0,Z1.useRef)(t);return(0,Z1.useMemo)(function(){function e(n){typeof n=="function"?a.current=n(a.current):a.current=n}function r(){return a.current}return[r,e]},[])}function V_(){var t=(0,Z1.useRef)([]);return(0,Z1.useMemo)(function(){function a(){return t.current.length>0}function e(){for(var n=Hr(t.current),i;!(i=n()).done;){var l=i.value;l()}t.current=[]}function r(n){t.current.push(n)}return{hasEventSubscriptions:a,removeAllEventSubscriptions:e,addEventSubscription:r}},[])}var K8=typeof window<"u"?Z1.useLayoutEffect:Z1.useEffect;function R_(t,a){var e=(0,Z1.useRef)(t);return a?(e.current=t,e):(e.current=null,e)}function ei(t){return parseFloat(t.replace("px",""))}function Y8(t,a,e){return te?e:t}function hm(t){return t!=null}function cm(){for(var t=arguments.length,a=new Array(t),e=0;e"u"))return a||t.ResizeObserver}function mm(t,a){var e=[];if(!t||!a||t===document.body)return e;var r=a.getComputedStyle(t),n=r.overflow,i=r.overflowX,l=r.overflowY;return[n,i,l].some(function(o){return["auto","scroll"].includes(o)})&&e.push(t),[].concat(e,mm(t.parentElement,a))}function $5(t){return"react-laag: Could not find a valid reference for the "+t+` element. There might be 2 causes: - Make sure that the 'ref' is set correctly on the `+t+` element when isOpen: true. Also make sure your component forwards the ref with "forwardRef()". - - Make sure that you are actually rendering the `+t+" when the isOpen prop is set to true"}function C_(t){var a=t.enabled,e=t.onChange,r=t.environment,n=t.ResizeObserverPolyfill,i=t.overflowContainer,l=t.triggerOption,o=y_(r,n);(0,Z1.useEffect)(function(){},[o]);var h=(0,Z1.useRef)(null),c=Boolean(l),v=L_({scrollContainers:[],trigger:null,layer:null}),g=v[0],d=v[1],u=V_(),p=u.hasEventSubscriptions,z=u.addEventSubscription,w=u.removeAllEventSubscriptions,s=(0,Z1.useCallback)(function(){var V=g(),C=V.layer,k=V.trigger,b=V.scrollContainers,F=b[0];if(!C)throw new Error($5("layer"));if(!k&&!c)throw new Error($5("trigger"));var _={top:0,left:0};if(F){var j=F.scrollLeft,n1=F.scrollTop;_={top:n1,left:j}}else{var Z=r.scrollX,d1=r.scrollY;_={top:d1,left:Z}}var O={left:0,top:0};if(F){var a1=r.getComputedStyle(F),W=a1.borderLeftWidth,L1=a1.borderTopWidth;O={left:ei(W)||0,top:ei(L1)||0}}e({layer:C,trigger:k,scrollContainers:b,arrow:h.current},_,O)},[g,e,r,h,c]),f=(0,Z1.useCallback)(function(){var V=g(),C=V.trigger,k=V.layer,b=V.scrollContainers;if(!k)throw new Error($5("layer"));if(!C&&!c)throw new Error($5("trigger"));if(o){for(var F=!1,_=function(){if(!F){F=!0;return}s()},j=new o(_),n1=0,Z=[C,k,document.body];n1=0})}},{key:"negativeSides",get:function(){var e=this;return Object.fromEntries(U5.filter(function(r){return e[r]<0}).map(function(r){return[r,e[r]]}))}}]),t}();function vm(){for(var t=arguments.length,a=new Array(t),e=0;ef?f-y:0;z[x.prop]=Y8(y+r+R,s,f),z[x.opposite.prop]=z[x.prop]+i.factor(h[d])}z.width=z.right-z.left,z.height=z.bottom-z.top;var L=na.create(z);return r===0&&(this._cachedLayerBounds=L),L},a.getLayerCollisionBounds=function(){var r=this.offsets.container;return this.getLayerBounds().mapSides(function(n,i){return i-=n.factor(r)}).merge(function(n){var i=n.width,l=n.height;return{width:i+r*2,height:l+r*2}})},a.getContainerOffsets=function(r){if(this._cachedContainerOffsets&&!r)return this._cachedContainerOffsets;var n=this.subjectsBounds.merge({layer:r||this.getLayerCollisionBounds()}),i=Z8.mergeSmallestSides(n.layerOffsetsToScrollContainers);return r||(this._cachedContainerOffsets=i),i},W5(t,[{key:"type",get:function(){return this.primary.prop+"-"+(this.secondary.prop==="center"?"center":["bottom","right"].includes(this.secondary.prop)?"end":"start")}},{key:"triggerIsBigger",get:function(){var r=this.secondary.isHorizontal,n=this.subjectsBounds,i=n.triggerHasBiggerWidth,l=n.triggerHasBiggerHeight;return r&&i||!r&&l}},{key:"fitsContainer",get:function(){return this.getContainerOffsets().allSidesArePositive}},{key:"visibleSurface",get:function(){var r=this.getLayerBounds(),n=this.getContainerOffsets(r),i=n.negativeSides;for(var l in i)i[l]=-i[l];return r.substract(i).surface}},{key:"secondaryOffsetSide",get:function(){var r,n,i=this,l=this.getContainerOffsets(),o=(r=(n=Object.entries(l.negativeSides).map(function(c){var v=c[0],g=c[1];return[y0[v],g]}).filter(function(c){var v=c[0];return i.primary.isOppositeDirection(v)}).sort(function(c,v){var g=c[1],d=v[1];return d-g}))==null?void 0:n[0])!=null?r:[],h=o[0];return h||null}}]),t}(),gm=function(t){x_(a,t);function a(){return t.apply(this,arguments)||this}var e=a.prototype;return e.getLayerBounds=function(){var n=this.subjectsBounds,i=n.trigger,l=n.layer,o=na.empty();return o.top=i.top+i.height/2-l.height/2,o.bottom=o.top+l.height,o.left=i.left+i.width/2-l.width/2,o.right=o.left+l.width,o.width=o.right-o.left,o.height=o.bottom-o.top,o},a}(Hm);function __(t,a,e){var r=t.layer,n=t.trigger,i=t.arrow,l=a.primary.oppositeSizeProp,o=a.primary.isHorizontal?["top","bottom"]:["left","right"],h=o[0],c=o[1],v=r[h]+r[l]/2-n[h]-i[l]/2-e,g=r[c]-r[l]/2-n[c]+i[l]/2+e;return(v<0?-v:0)+(g>0?-g:0)}var dm={position:"absolute",willChange:"top, left",left:null,right:null,top:null,bottom:null};function T_(t,a,e){var r;if(a.primary.isCenter)return dm;var n=t.layer,i=t.trigger,l=t.arrow,o=a.primary.oppositeSizeProp,h=i[o]>n[o],c=e+l[o]/2,v=n[o]-l[o]/2-e,g=__(t,a,e),d=a.primary.prop,u=a.primary.oppositeCssProp,p=h?n[o]/2+g:i[u]+i[o]/2-n[u];return L2({},dm,(r={},r[d]="100%",r[u]=Y8(p,c,v),r))}var sm=function(){function t(e,r,n){this.placements=void 0,this.config=void 0,this.subjectsBounds=void 0,this.placements=e,this.config=r,this.subjectsBounds=n}t.getSidesFromPlacementType=function(r){var n=r.split("-"),i=n[0],l=n[1],o=y0[i],h;return l==="center"?h=s0.center:o.isHorizontal?h=l==="start"?s0.top:s0.bottom:h=l==="start"?s0.left:s0.right,[o,h]},t.create=function(r,n){var i={arrow:n.arrowOffset,container:n.containerOffset,trigger:n.triggerOffset};function l(o){o===void 0&&(o=n.placement);var h=t.getSidesFromPlacementType(o),c=h[0],v=h[1],g=y0[c.isHorizontal?n.preferY:n.preferX],d=!c.isHorizontal&&r.triggerHasBiggerWidth||c.isHorizontal&&r.triggerHasBiggerHeight;function u(z,w){return new Hm(z,w,r,n.layerDimensions,i)}var p=[];return p[0]=u(c,v),p[1]=u(c,v.isCenter?g:s0.center),p[2]=u(c,s0[(v.opposite.isCenter?g.opposite:v.opposite).prop]),p[3]=u(g,d?c:s0[c.opposite.prop]),p[4]=u(g,s0.center),p[5]=u(g,d?s0[c.opposite.prop]:c),p[6]=u(y0[g.opposite.prop],d?c:s0[c.opposite.prop]),p[7]=u(y0[g.opposite.prop],s0.center),p[8]=u(y0[g.opposite.prop],d?s0[c.opposite.prop]:c),p[9]=u(y0[c.opposite.prop],v),p[10]=u(y0[c.opposite.prop],v.isCenter?g:s0.center),p[11]=u(y0[c.opposite.prop],s0[(v.opposite.isCenter?g.opposite:v.opposite).prop]),p=p.filter(function(z){return z.type===n.placement||n.possiblePlacements.includes(z.type)}),p}return n.placement==="center"?new t([new gm(s0.center,s0.center,r,n.layerDimensions,i)].concat(l(n.preferY+"-"+n.preferX)),n,r):new t(l(),n,r)};var a=t.prototype;return a.filterPlacementsBySide=function(r){return this.placements.filter(function(n){return n.primary===r})},a.findFirstPlacementThatFits=function(){return this.placements.find(function(r){return r.fitsContainer})},a.placementWithBiggestVisibleSurface=function(){var r=this.placements.map(function(i){return{placement:i,surface:i.visibleSurface}}).sort(function(i,l){return l.surface-i.surface}),n=r[0].placement;return n},a.findSuitablePlacement=function(){return this.config.auto?this.findFirstPlacementThatFits()||this.placementWithBiggestVisibleSurface():this.placements[0]},a.getSecondaryOffset=function(r){var n=this.config,i=n.auto,l=n.snap;if(!i||l||r instanceof gm)return 0;var o=this.filterPlacementsBySide(r.primary),h=o.indexOf(r)===0;if(h&&r.fitsContainer)return 0;var c=o.find(function(z){return!z.fitsContainer});if(!c)return 0;var v=c.secondaryOffsetSide;if(!v)return 0;var g=r.getContainerOffsets(),d=r.secondary,u;r.triggerIsBigger||c===r?u=v.isPush?-1:1:u=d===s0.left||[s0.top,s0.center].includes(d)&&v.isPush?-1:1;var p=g[v.prop];return p*u},a.getStyles=function(r,n,i,l){var o={willChange:"top, left, width, height"},h=T_(this.subjectsBounds.merge({layer:r}),n,this.config.arrowOffset),c=this.config.overflowContainer?L2({},o,{position:"fixed",top:r.top,left:r.left}):L2({},o,{position:"absolute",top:r.top-this.subjectsBounds.parent.top+i.top-l.top,left:r.left-this.subjectsBounds.parent.left+i.left-l.left});return{arrow:h,layer:c}},a.getHasDisappeared=function(r){var n=this.config.overflowContainer?this.subjectsBounds.trigger:r,i=Z8.mergeSmallestSides(this.subjectsBounds.offsetsToScrollContainers(n,!0)),l=Object.entries(i.negativeSides),o=l.some(function(h){var c=h[0],v=h[1],g=y0[c];return v<=-n[g.sizeProp]});return o?"full":i.allSidesArePositive?null:"partial"},a.result=function(r,n){var i=this.findSuitablePlacement(),l=this.getSecondaryOffset(i),o=i.getLayerBounds(l),h=this.getStyles(o,i,r,n),c=i.primary.prop;return{styles:h,layerSide:c,placement:i,layerBounds:o,hasDisappeared:this.getHasDisappeared(o)}},t}(),P_=function(){function t(e,r){this.overflowContainer=void 0,this.trigger=void 0,this.layer=void 0,this.arrow=void 0,this.parent=void 0,this.window=void 0,this.scrollContainers=void 0,this.overflowContainer=r,Object.assign(this,e)}t.create=function(r,n,i,l,o,h,c,v){var g=na.fromWindow(r);return new t({layer:na.fromElement(n,{environment:r,withTransform:!1}),trigger:v?na.create(Q8(v())):na.fromElement(i),arrow:o?na.fromElement(o):na.empty(),parent:l?na.fromElement(l):g,window:g,scrollContainers:[g].concat(h.map(function(d){return na.fromElement(d,{withScrollbars:!1})}))},c)};var a=t.prototype;return a.merge=function(r){return new t(L2({},this,r),this.overflowContainer)},a.offsetsToScrollContainers=function(r,n){n===void 0&&(n=!1);var i=this.overflowContainer&&!n?[this.window]:this.scrollContainers;return i.map(function(l){return l.offsetsTo(r)})},W5(t,[{key:"layerOffsetsToScrollContainers",get:function(){return this.offsetsToScrollContainers(this.layer)}},{key:"triggerHasBiggerWidth",get:function(){return this.trigger.width>this.layer.width}},{key:"triggerHasBiggerHeight",get:function(){return this.trigger.height>this.layer.height}}]),t}(),um=null;var ra={auto:!1,arrowOffset:0,containerOffset:10,triggerOffset:0,overflowContainer:!0,placement:"top-center",possiblePlacements:F_,preferX:"right",preferY:"bottom",snap:!1,container:void 0,trigger:void 0};function xm(t){var a,e=t.isOpen,r=e===void 0?!1:e,n=t.overflowContainer,i=n===void 0?ra.overflowContainer:n,l=t.environment,o=l===void 0?typeof window<"u"?window:void 0:l,h=t.ResizeObserver,c=t.placement,v=c===void 0?ra.placement:c,g=t.possiblePlacements,d=g===void 0?ra.possiblePlacements:g,u=t.preferX,p=u===void 0?ra.preferX:u,z=t.preferY,w=z===void 0?ra.preferY:z,s=t.auto,f=s===void 0?ra.auto:s,m=t.snap,H=m===void 0?ra.snap:m,x=t.triggerOffset,y=x===void 0?ra.triggerOffset:x,R=t.containerOffset,L=R===void 0?ra.containerOffset:R,V=t.arrowOffset,C=V===void 0?ra.arrowOffset:V,k=t.container,b=k===void 0?ra.container:k,F=t.layerDimensions,_=F===void 0?null:F,j=t.onDisappear,n1=t.onOutsideClick,Z=t.onParentClose,d1=t.trigger,O=(0,Z1.useState)(function(){return{layerSide:v==="center"?"center":sm.getSidesFromPlacementType(v)[0].prop,styles:{layer:{position:i?"fixed":"absolute",top:0,left:0},arrow:{position:"absolute",top:0,left:0}}}}),a1=O[0],W=O[1],L1=(0,Z1.useRef)(null),p1=R_(a1,r),o1=(0,Z1.useRef)({cancelled:!1});(0,Z1.useEffect)(function(){return function(){o1.current.cancelled=!0}},[]);var H1=(0,Z1.useCallback)(function(f1,U,v1){var D=f1.arrow,I=f1.layer,C1=f1.scrollContainers,D1=f1.trigger,et=C1[0],B1=P_.create(o,I,D1,et,D,C1,i,d1?.getBounds),c1={placement:v,possiblePlacements:d,auto:f,layerDimensions:_,arrowOffset:C,containerOffset:L,triggerOffset:y,preferX:p,preferY:w,snap:H,overflowContainer:i},e1=sm.create(B1,c1).result(U,v1),u1=e1.hasDisappeared,M1=e1.layerSide,I1=e1.styles,Q1={layerSide:M1,styles:I1};if(!p1.current||I_(p1.current,Q1)){p1.current=Q1,o1.current.cancelled=!0;var St={cancelled:!1};o1.current=St,Promise.resolve().then(function(){St.cancelled||W(Q1)})}hm(u1)&&hm(j)&&j(u1)},[C,f,L,o,_,j,i,v,d,p,w,H,y,p1,d1]),P1=C_({ResizeObserverPolyfill:h,environment:o,enabled:r,overflowContainer:i,onChange:H1,triggerOption:d1}),K1=P1.triggerRef,W1=P1.layerRef,Bt=P1.arrowRef,T1=P1.closestScrollContainer,X1=A_({isOpen:r,onOutsideClick:n1,onParentClose:Z}),Y=X1.closeOnOutsideClickRefs,N=X1.registrations,s1={triggerProps:Boolean(d1)?{}:{ref:cm(K1,Y.trigger,L1)},layerProps:{ref:cm(W1,Y.layer),style:a1.styles.layer},arrowProps:{ref:Bt,style:a1.styles.arrow,layerSide:a1.layerSide},layerSide:a1.layerSide,triggerBounds:r?d1?d1.getBounds():(a=L1.current)==null?void 0:a.getBoundingClientRect():null,renderLayer:function(f1){return typeof document<"u"?(0,zm.createPortal)((0,Z1.createElement)(B_,{registrations:N,children:f1}),i||!T1?O_(b):T1):null}};return s1}function I_(t,a){if(t.layerSide!==a.layerSide)return!0;for(var e=["position","top","left","right","bottom"],r=0,n=e;r=0})}},{key:"negativeSides",get:function(){var e=this;return Object.fromEntries(U5.filter(function(r){return e[r]<0}).map(function(r){return[r,e[r]]}))}}]),t}();function vm(){for(var t=arguments.length,a=new Array(t),e=0;ef?f-y:0;z[x.prop]=Y8(y+r+R,s,f),z[x.opposite.prop]=z[x.prop]+i.factor(h[d])}z.width=z.right-z.left,z.height=z.bottom-z.top;var L=na.create(z);return r===0&&(this._cachedLayerBounds=L),L},a.getLayerCollisionBounds=function(){var r=this.offsets.container;return this.getLayerBounds().mapSides(function(n,i){return i-=n.factor(r)}).merge(function(n){var i=n.width,l=n.height;return{width:i+r*2,height:l+r*2}})},a.getContainerOffsets=function(r){if(this._cachedContainerOffsets&&!r)return this._cachedContainerOffsets;var n=this.subjectsBounds.merge({layer:r||this.getLayerCollisionBounds()}),i=Z8.mergeSmallestSides(n.layerOffsetsToScrollContainers);return r||(this._cachedContainerOffsets=i),i},W5(t,[{key:"type",get:function(){return this.primary.prop+"-"+(this.secondary.prop==="center"?"center":["bottom","right"].includes(this.secondary.prop)?"end":"start")}},{key:"triggerIsBigger",get:function(){var r=this.secondary.isHorizontal,n=this.subjectsBounds,i=n.triggerHasBiggerWidth,l=n.triggerHasBiggerHeight;return r&&i||!r&&l}},{key:"fitsContainer",get:function(){return this.getContainerOffsets().allSidesArePositive}},{key:"visibleSurface",get:function(){var r=this.getLayerBounds(),n=this.getContainerOffsets(r),i=n.negativeSides;for(var l in i)i[l]=-i[l];return r.substract(i).surface}},{key:"secondaryOffsetSide",get:function(){var r,n,i=this,l=this.getContainerOffsets(),o=(r=(n=Object.entries(l.negativeSides).map(function(c){var v=c[0],g=c[1];return[y0[v],g]}).filter(function(c){var v=c[0];return i.primary.isOppositeDirection(v)}).sort(function(c,v){var g=c[1],d=v[1];return d-g}))==null?void 0:n[0])!=null?r:[],h=o[0];return h||null}}]),t}(),gm=function(t){x_(a,t);function a(){return t.apply(this,arguments)||this}var e=a.prototype;return e.getLayerBounds=function(){var n=this.subjectsBounds,i=n.trigger,l=n.layer,o=na.empty();return o.top=i.top+i.height/2-l.height/2,o.bottom=o.top+l.height,o.left=i.left+i.width/2-l.width/2,o.right=o.left+l.width,o.width=o.right-o.left,o.height=o.bottom-o.top,o},a}(Hm);function __(t,a,e){var r=t.layer,n=t.trigger,i=t.arrow,l=a.primary.oppositeSizeProp,o=a.primary.isHorizontal?["top","bottom"]:["left","right"],h=o[0],c=o[1],v=r[h]+r[l]/2-n[h]-i[l]/2-e,g=r[c]-r[l]/2-n[c]+i[l]/2+e;return(v<0?-v:0)+(g>0?-g:0)}var dm={position:"absolute",willChange:"top, left",left:null,right:null,top:null,bottom:null};function T_(t,a,e){var r;if(a.primary.isCenter)return dm;var n=t.layer,i=t.trigger,l=t.arrow,o=a.primary.oppositeSizeProp,h=i[o]>n[o],c=e+l[o]/2,v=n[o]-l[o]/2-e,g=__(t,a,e),d=a.primary.prop,u=a.primary.oppositeCssProp,p=h?n[o]/2+g:i[u]+i[o]/2-n[u];return L2({},dm,(r={},r[d]="100%",r[u]=Y8(p,c,v),r))}var sm=function(){function t(e,r,n){this.placements=void 0,this.config=void 0,this.subjectsBounds=void 0,this.placements=e,this.config=r,this.subjectsBounds=n}t.getSidesFromPlacementType=function(r){var n=r.split("-"),i=n[0],l=n[1],o=y0[i],h;return l==="center"?h=s0.center:o.isHorizontal?h=l==="start"?s0.top:s0.bottom:h=l==="start"?s0.left:s0.right,[o,h]},t.create=function(r,n){var i={arrow:n.arrowOffset,container:n.containerOffset,trigger:n.triggerOffset};function l(o){o===void 0&&(o=n.placement);var h=t.getSidesFromPlacementType(o),c=h[0],v=h[1],g=y0[c.isHorizontal?n.preferY:n.preferX],d=!c.isHorizontal&&r.triggerHasBiggerWidth||c.isHorizontal&&r.triggerHasBiggerHeight;function u(z,w){return new Hm(z,w,r,n.layerDimensions,i)}var p=[];return p[0]=u(c,v),p[1]=u(c,v.isCenter?g:s0.center),p[2]=u(c,s0[(v.opposite.isCenter?g.opposite:v.opposite).prop]),p[3]=u(g,d?c:s0[c.opposite.prop]),p[4]=u(g,s0.center),p[5]=u(g,d?s0[c.opposite.prop]:c),p[6]=u(y0[g.opposite.prop],d?c:s0[c.opposite.prop]),p[7]=u(y0[g.opposite.prop],s0.center),p[8]=u(y0[g.opposite.prop],d?s0[c.opposite.prop]:c),p[9]=u(y0[c.opposite.prop],v),p[10]=u(y0[c.opposite.prop],v.isCenter?g:s0.center),p[11]=u(y0[c.opposite.prop],s0[(v.opposite.isCenter?g.opposite:v.opposite).prop]),p=p.filter(function(z){return z.type===n.placement||n.possiblePlacements.includes(z.type)}),p}return n.placement==="center"?new t([new gm(s0.center,s0.center,r,n.layerDimensions,i)].concat(l(n.preferY+"-"+n.preferX)),n,r):new t(l(),n,r)};var a=t.prototype;return a.filterPlacementsBySide=function(r){return this.placements.filter(function(n){return n.primary===r})},a.findFirstPlacementThatFits=function(){return this.placements.find(function(r){return r.fitsContainer})},a.placementWithBiggestVisibleSurface=function(){var r=this.placements.map(function(i){return{placement:i,surface:i.visibleSurface}}).sort(function(i,l){return l.surface-i.surface}),n=r[0].placement;return n},a.findSuitablePlacement=function(){return this.config.auto?this.findFirstPlacementThatFits()||this.placementWithBiggestVisibleSurface():this.placements[0]},a.getSecondaryOffset=function(r){var n=this.config,i=n.auto,l=n.snap;if(!i||l||r instanceof gm)return 0;var o=this.filterPlacementsBySide(r.primary),h=o.indexOf(r)===0;if(h&&r.fitsContainer)return 0;var c=o.find(function(z){return!z.fitsContainer});if(!c)return 0;var v=c.secondaryOffsetSide;if(!v)return 0;var g=r.getContainerOffsets(),d=r.secondary,u;r.triggerIsBigger||c===r?u=v.isPush?-1:1:u=d===s0.left||[s0.top,s0.center].includes(d)&&v.isPush?-1:1;var p=g[v.prop];return p*u},a.getStyles=function(r,n,i,l){var o={willChange:"top, left, width, height"},h=T_(this.subjectsBounds.merge({layer:r}),n,this.config.arrowOffset),c=this.config.overflowContainer?L2({},o,{position:"fixed",top:r.top,left:r.left}):L2({},o,{position:"absolute",top:r.top-this.subjectsBounds.parent.top+i.top-l.top,left:r.left-this.subjectsBounds.parent.left+i.left-l.left});return{arrow:h,layer:c}},a.getHasDisappeared=function(r){var n=this.config.overflowContainer?this.subjectsBounds.trigger:r,i=Z8.mergeSmallestSides(this.subjectsBounds.offsetsToScrollContainers(n,!0)),l=Object.entries(i.negativeSides),o=l.some(function(h){var c=h[0],v=h[1],g=y0[c];return v<=-n[g.sizeProp]});return o?"full":i.allSidesArePositive?null:"partial"},a.result=function(r,n){var i=this.findSuitablePlacement(),l=this.getSecondaryOffset(i),o=i.getLayerBounds(l),h=this.getStyles(o,i,r,n),c=i.primary.prop;return{styles:h,layerSide:c,placement:i,layerBounds:o,hasDisappeared:this.getHasDisappeared(o)}},t}(),P_=function(){function t(e,r){this.overflowContainer=void 0,this.trigger=void 0,this.layer=void 0,this.arrow=void 0,this.parent=void 0,this.window=void 0,this.scrollContainers=void 0,this.overflowContainer=r,Object.assign(this,e)}t.create=function(r,n,i,l,o,h,c,v){var g=na.fromWindow(r);return new t({layer:na.fromElement(n,{environment:r,withTransform:!1}),trigger:v?na.create(Q8(v())):na.fromElement(i),arrow:o?na.fromElement(o):na.empty(),parent:l?na.fromElement(l):g,window:g,scrollContainers:[g].concat(h.map(function(d){return na.fromElement(d,{withScrollbars:!1})}))},c)};var a=t.prototype;return a.merge=function(r){return new t(L2({},this,r),this.overflowContainer)},a.offsetsToScrollContainers=function(r,n){n===void 0&&(n=!1);var i=this.overflowContainer&&!n?[this.window]:this.scrollContainers;return i.map(function(l){return l.offsetsTo(r)})},W5(t,[{key:"layerOffsetsToScrollContainers",get:function(){return this.offsetsToScrollContainers(this.layer)}},{key:"triggerHasBiggerWidth",get:function(){return this.trigger.width>this.layer.width}},{key:"triggerHasBiggerHeight",get:function(){return this.trigger.height>this.layer.height}}]),t}(),um=null;var ra={auto:!1,arrowOffset:0,containerOffset:10,triggerOffset:0,overflowContainer:!0,placement:"top-center",possiblePlacements:F_,preferX:"right",preferY:"bottom",snap:!1,container:void 0,trigger:void 0};function xm(t){var a,e=t.isOpen,r=e===void 0?!1:e,n=t.overflowContainer,i=n===void 0?ra.overflowContainer:n,l=t.environment,o=l===void 0?typeof window<"u"?window:void 0:l,h=t.ResizeObserver,c=t.placement,v=c===void 0?ra.placement:c,g=t.possiblePlacements,d=g===void 0?ra.possiblePlacements:g,u=t.preferX,p=u===void 0?ra.preferX:u,z=t.preferY,w=z===void 0?ra.preferY:z,s=t.auto,f=s===void 0?ra.auto:s,m=t.snap,H=m===void 0?ra.snap:m,x=t.triggerOffset,y=x===void 0?ra.triggerOffset:x,R=t.containerOffset,L=R===void 0?ra.containerOffset:R,V=t.arrowOffset,C=V===void 0?ra.arrowOffset:V,k=t.container,b=k===void 0?ra.container:k,F=t.layerDimensions,_=F===void 0?null:F,j=t.onDisappear,i1=t.onOutsideClick,Z=t.onParentClose,d1=t.trigger,O=(0,Z1.useState)(function(){return{layerSide:v==="center"?"center":sm.getSidesFromPlacementType(v)[0].prop,styles:{layer:{position:i?"fixed":"absolute",top:0,left:0},arrow:{position:"absolute",top:0,left:0}}}}),a1=O[0],W=O[1],L1=(0,Z1.useRef)(null),p1=R_(a1,r),o1=(0,Z1.useRef)({cancelled:!1});(0,Z1.useEffect)(function(){return function(){o1.current.cancelled=!0}},[]);var H1=(0,Z1.useCallback)(function(f1,U,v1){var D=f1.arrow,I=f1.layer,C1=f1.scrollContainers,D1=f1.trigger,et=C1[0],B1=P_.create(o,I,D1,et,D,C1,i,d1?.getBounds),h1={placement:v,possiblePlacements:d,auto:f,layerDimensions:_,arrowOffset:C,containerOffset:L,triggerOffset:y,preferX:p,preferY:w,snap:H,overflowContainer:i},e1=sm.create(B1,h1).result(U,v1),u1=e1.hasDisappeared,M1=e1.layerSide,I1=e1.styles,Q1={layerSide:M1,styles:I1};if(!p1.current||I_(p1.current,Q1)){p1.current=Q1,o1.current.cancelled=!0;var St={cancelled:!1};o1.current=St,Promise.resolve().then(function(){St.cancelled||W(Q1)})}hm(u1)&&hm(j)&&j(u1)},[C,f,L,o,_,j,i,v,d,p,w,H,y,p1,d1]),P1=C_({ResizeObserverPolyfill:h,environment:o,enabled:r,overflowContainer:i,onChange:H1,triggerOption:d1}),K1=P1.triggerRef,W1=P1.layerRef,Bt=P1.arrowRef,T1=P1.closestScrollContainer,X1=A_({isOpen:r,onOutsideClick:i1,onParentClose:Z}),Y=X1.closeOnOutsideClickRefs,N=X1.registrations,s1={triggerProps:Boolean(d1)?{}:{ref:cm(K1,Y.trigger,L1)},layerProps:{ref:cm(W1,Y.layer),style:a1.styles.layer},arrowProps:{ref:Bt,style:a1.styles.arrow,layerSide:a1.layerSide},layerSide:a1.layerSide,triggerBounds:r?d1?d1.getBounds():(a=L1.current)==null?void 0:a.getBoundingClientRect():null,renderLayer:function(f1){return typeof document<"u"?(0,zm.createPortal)((0,Z1.createElement)(B_,{registrations:N,children:f1}),i||!T1?O_(b):T1):null}};return s1}function I_(t,a){if(t.layerSide!==a.layerSide)return!0;for(var e=["position","top","left","right","bottom"],r=0,n=e;r`,arrowDown:t=>` - `},N_={text:ye.HeaderString,number:ye.HeaderNumber,uri:ye.HeaderUri,date:ye.HeaderDate},$_={text:l1.Text,number:l1.Number,uri:l1.Uri,date:l1.Text},wm={fontFamily:"JetBrains Mono",bgHeader:"white",textDark:"#61758a",textHeader:"#304254",headerFontStyle:"bold 14px",baseFontStyle:"14px",borderColor:"#E1E8F0",horizontalBorderColor:"#E1E8F0",accentColor:"#3E64FF",accentLight:"#ECF0FF",bgHeaderHovered:"#F0F5F9",bgHeaderHasFocus:"#E1E8F0",bgSearchResult:"#FFF7EC",headerIconSize:22};function nD(t,a){t.importCSS("main.css"),t.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"),t.importCSS("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap"),(0,Lm.createRoot)(t.root).render(g1.default.createElement(U_,{ctx:t,data:a}))}function U_({ctx:t,data:a}){let e=[],r=[],n=a.content.columns.map(c1=>{let e1=c1.summary,u1=c1.label,M1=c1.key;return r.push({[u1]:250}),e1&&e.push(e1.keys.length),{title:u1,id:M1,type:c1.type,icon:N_[c1.type]||ye.HeaderString,hasMenu:!0,summary:e1}}),i=a.features.includes("refetch"),l=a.features.includes("export"),o=a.content.columns.length!==0,h=e.length>0,c=a.features.includes("sorting"),v=l?a.export?.formats:null,g=l&&v,d={rows:mt.empty(),columns:mt.empty()},[u,p]=(0,g1.useState)(a.content),[z,w]=(0,g1.useState)(!1),[s,f]=(0,g1.useState)(n),[m,H]=(0,g1.useState)(r),[x,y]=(0,g1.useState)(null),[R,L]=(0,g1.useState)(!1),[V,C]=(0,g1.useState)(d),[k,b]=(0,g1.useState)(0),[F,_]=(0,g1.useState)(null),j=u.total_rows,n1=o&&j>0,Z=a.features.includes("pagination")&&(j===null||j>0),d1=u.limit===j,O=44,a1=h&&n1?Math.max(...e):0,W=O+a1*22,L1=c?140:70,p1=440+W,H1=j&&j<(c?3:2)&&x?L1+W:null,P1=j>=10&&d1?p1:H1,K1=(u.page-1)*u.limit+1,W1=h?150:50,Bt=a.content.columns.length===1?800:350,T1=u.page_length,X1=(0,g1.useCallback)(c1=>{let{ctx:e1,theme:u1,rect:M1,column:I1,menuBounds:Q1,isHovered:St,isSelected:jt,spriteManager:Ut}=c1;if(I1.sourceIndex===0)return!0;if(!n1)return!1;e1.rect(M1.x,M1.y,M1.width,M1.height);let Et=10,ot=19,J1=jt?u1.textHeaderSelected:u1.textHeader,Jt=jt?u1.accentLight:u1.textDark,Mt=I1.hasMenu===!0&&St,C0=!!I1.summary,Z0=35,B0=M1.width-Z0,t0=M1.width-Z0*.7,Ma=B0/M1.width,dt=t0/M1.width,At=e1.createLinearGradient(M1.x,0,M1.x+M1.width,0),h0=fr(J1,0),wt=Na(e1,`${u1.headerFontStyle} ${u1.fontFamily}`);if(At.addColorStop(0,J1),At.addColorStop(Ma,J1),At.addColorStop(dt,h0),At.addColorStop(1,h0),e1.fillStyle=Mt?At:J1,I1.icon){let Ft=jt?"selected":I1.style==="highlight"?"special":"normal",qt=u1.headerIconSize;Ut.drawSprite(I1.icon,Ft,e1,M1.x+Et,M1.y+Et,qt,u1),I1.overlayIcon&&Ut.drawSprite(I1.overlayIcon,jt?"selected":"special",e1,M1.x+Et+ot/2,M1.y+Et+ot/2,ot,u1)}if(e1.fillText(I1.title,Q1.x-M1.width+u1.headerIconSize*2.5+14,C0?M1.y+Et+u1.headerIconSize/2+wt:Q1.y+Q1.height/2+wt),C0){let Ft=u.columns[I1.sourceIndex-1].summary,qt=Object.fromEntries(Ft.keys.map((j0,g2)=>[j0,Ft.values[g2]])),c2=13,v2=c2+Et,$a=`${c2}px ${u1.fontFamily}`,O2=`bold ${$a}`;e1.fillStyle=Jt,Object.entries(qt).forEach(([j0,g2],D2)=>{e1.font=O2,e1.fillText(`${j0}:`,M1.x+v2/2,M1.y+v2*(D2+1)+v2),e1.font=$a,e1.fillText(g2,M1.x+e1.measureText(j0).width+v2,M1.y+v2*(D2+1)+v2)})}if(Mt){e1.fillStyle=At;let Ft=Q1.x+Q1.width/2-Et*1.5,qt=u1.headerIconSize/2-2,c2=new Path2D("M12 16l-6-6h12z");e1.translate(Ft,qt),e1.fill(c2)}return!0},[u]),Y=(0,g1.useCallback)(([c1,e1])=>{let u1=$_[u.columns[c1].type]||l1.Text,I1=u.data_orientation==="columns"?u.data[c1][e1]:u.data[e1][c1];return{kind:u1,data:I1,displayData:I1,allowOverlay:!0,allowWrapping:!1,readonly:!0}},[u]),N=()=>{w(!z)},s1=c1=>{let e1=c1!=="none"?x.columnKey:null;t.pushEvent("order_by",{key:e1,direction:c1??"asc"}),y(null)},x1=()=>{t.pushEvent("show_page",{page:u.page-1}),C({...d,columns:V.columns})},f1=()=>{t.pushEvent("show_page",{page:u.page+1}),C({...d,columns:V.columns})},U=()=>{let c1={...d,columns:mt.fromSingleSelection(x.column)};C(c1),y(null)},{layerProps:v1,renderLayer:D}=xm({isOpen:R,auto:!0,placement:"bottom-end",possiblePlacements:["bottom-end","bottom-center","bottom-start"],triggerOffset:0,onOutsideClick:()=>y(null),trigger:{getBounds:()=>({left:x?.bounds.x??0,top:x?.bounds.y??0,width:x?.bounds.width??0,height:x?.bounds.height??0,right:(x?.bounds.x??0)+(x?.bounds.width??0),bottom:(x?.bounds.y??0)+(x?.bounds.height??0)})}}),I=(0,g1.useCallback)((c1,e1)=>{H(u1=>({...u1,[c1.title]:e1}))},[]),C1=(0,g1.useCallback)((c1,e1)=>{let{summary:u1,id:M1,type:I1}=s[c1];u1||y({column:c1,bounds:e1,columnKey:M1,columnType:I1})},[]),D1=(0,g1.useCallback)((c1,{bounds:e1})=>{let{id:u1,type:M1}=s[c1];y({column:c1,bounds:e1,columnKey:u1,columnType:M1})},[]),et=(0,g1.useCallback)(c1=>{let[e1,u1]=c1.location;u1===-1&&e1===-1&&c1.kind==="header"?_([...Array.from({length:T1},(M1,I1)=>I1)]):e1===-1&&c1.kind==="cell"?_([u1]):_(null)},[T1]),B1=(0,g1.useCallback)(c1=>F?.includes(c1)?{bgCell:wm.bgHeaderHovered}:null,[F]);return(0,g1.useEffect)(()=>{V.rows?.items.length>0?b(1):b(0)},[V]),(0,g1.useEffect)(()=>{t.handleEvent("update_content",c1=>{p(c1)}),t.handleEvent("download_content",([c1,e1])=>{let u1=new Blob([e1],{type:c1.type}),M1=document.createElement("a");M1.href=window.URL.createObjectURL(u1),M1.download=`${c1.filename}-${+new Date}${c1.format}`,M1.click()})},[]),(0,g1.useEffect)(()=>{let c1=u.order?.direction==="asc"?"arrowUp":"arrowDown",e1=s.map(u1=>({...u1,overlayIcon:u1.id===u.order?.key?c1:null}));f(e1)},[u.order?.direction,u.order?.key]),(0,g1.useEffect)(()=>{let c1=s.map(e1=>({...e1,width:m[e1.title]}));f(c1)},[m]),(0,g1.useEffect)(()=>{let c1=x?.columnKey,e1={bgHeader:"#F0F5F9"},u1=s.map(M1=>({...M1,themeOverride:M1.id===c1?e1:null}));f(u1),L(!!x)},[x]),g1.default.createElement("div",{className:"app"},g1.default.createElement("div",{className:"navigation"},g1.default.createElement("div",{className:"navigation__info"},g1.default.createElement("h2",{className:"navigation__name"},a.name),g1.default.createElement("span",{className:"navigation__details"},j||"?"," ",j===1?"entry":"entries"),jt.pushEvent("download",{format:c1})}),g1.default.createElement("div",{className:"navigation__space"}),i&&g1.default.createElement(j_,{onRefetch:()=>t.pushEvent("refetch")}),g1.default.createElement(q_,{toggleSearch:N}),g1.default.createElement(G_,{limit:u.limit,totalRows:j,onChange:c1=>t.pushEvent("limit",{limit:c1})}),Z&&g1.default.createElement(K_,{page:u.page,maxPage:u.max_page,onPrev:x1,onNext:f1,rows:T1})),o&&g1.default.createElement(Yz,{className:"table-container",theme:wm,getCellContent:Y,columns:s,rows:T1,width:"100%",height:P1,rowHeight:44,headerHeight:W,drawHeader:X1,verticalBorder:!1,rowMarkers:"clickable-number",rowMarkerWidth:32,onHeaderMenuClick:C1,onHeaderClicked:D1,showSearch:z,getCellsForSelection:!0,onSearchClose:N,headerIcons:D_,overscrollX:100,isDraggable:!1,smoothScrollX:!0,smoothScrollY:!0,onColumnResize:I,columnSelect:"none",gridSelection:V,onGridSelectionChange:c1=>C(c1),rowMarkerStartIndex:K1,minColumnWidth:W1,maxColumnAutoWidth:Bt,fillHandle:!0,onItemHovered:et,getRowThemeOverride:B1}),R&&D(g1.default.createElement(X_,{layerProps:v1,menu:x,orderBy:s1,selectAllCurrent:U,hasSorting:c})),!o&&g1.default.createElement("p",{className:"no-data"},"No data"),g1.default.createElement("div",{id:"portal"}))}function W_({supportedFormats:t,onDownload:a}){let e=t.map(r=>g1.default.createElement("option",null,r));return g1.default.createElement("div",{className:"download"},g1.default.createElement("span",{className:"tooltip right","data-tooltip":"Export to"},g1.default.createElement("form",null,g1.default.createElement("select",{className:"input__icon",value:"",onChange:r=>a(r.target.value)},g1.default.createElement("option",{selected:!0,disabled:!0,value:""},"Export to"),e))))}function j_({onRefetch:t}){return g1.default.createElement("button",{className:"icon-button","aria-label":"refresh",onClick:t},g1.default.createElement(rm,null))}function q_({toggleSearch:t}){return g1.default.createElement("span",{className:"tooltip right","data-tooltip":"Current page search"},g1.default.createElement("button",{className:"icon-button search","aria-label":"search",onClick:t},g1.default.createElement(nm,{className:"search-icon"})))}function G_({limit:t,totalRows:a,onChange:e}){return g1.default.createElement("div",null,g1.default.createElement("form",null,g1.default.createElement("label",{className:"input-label"},"Show"),g1.default.createElement("select",{className:"input",value:t,onChange:r=>e(parseInt(r.target.value))},g1.default.createElement("option",{value:"10"},"10"),g1.default.createElement("option",{value:"20"},"20"),g1.default.createElement("option",{value:"50"},"50"),g1.default.createElement("option",{value:"100"},"100"),a?g1.default.createElement("option",{value:a},"All"):null)))}function K_({page:t,maxPage:a,onPrev:e,onNext:r,rows:n}){return g1.default.createElement("div",{className:"pagination"},g1.default.createElement("button",{className:"pagination__button",onClick:e,disabled:t===1},g1.default.createElement(am,null),g1.default.createElement("span",null,"Prev")),g1.default.createElement("div",{className:"pagination__info"},g1.default.createElement("span",null,t," of ",a||"?")),g1.default.createElement("button",{className:"pagination__button",onClick:r,disabled:t===a||n===0},g1.default.createElement("span",null,"Next"),g1.default.createElement(em,null)))}function X_({layerProps:t,selectAllCurrent:a,hasSorting:e,orderBy:r}){return g1.default.createElement("div",{className:"header-menu",...t},g1.default.createElement("button",{className:"header-menu-item button",onClick:a},"Select this column"),e&&g1.default.createElement(g1.default.Fragment,null,g1.default.createElement("div",{className:"header-menu-item",onClick:()=>r("asc")},g1.default.createElement(Jz,null),g1.default.createElement("span",null,"Sort: ascending")),g1.default.createElement("div",{className:"header-menu-item",onClick:()=>r("desc")},g1.default.createElement(tm,null),g1.default.createElement("span",null,"Sort: descending")),g1.default.createElement("div",{className:"header-menu-item",onClick:()=>r("none")},g1.default.createElement(Zz,null),g1.default.createElement("span",null,"Sort: none"))))}export{nD as init}; + `},N_={text:Na.HeaderString,number:Na.HeaderNumber,uri:Na.HeaderUri,date:Na.HeaderDate,list:Na.HeaderNumber},$_={text:n1.Text,number:n1.Number,uri:n1.Uri,date:n1.Text,list:n1.Number},wm={fontFamily:"JetBrains Mono",bgHeader:"white",textDark:"#61758a",textHeader:"#304254",headerFontStyle:"bold 14px",baseFontStyle:"14px",borderColor:"#E1E8F0",horizontalBorderColor:"#E1E8F0",accentColor:"#3E64FF",accentLight:"#ECF0FF",bgHeaderHovered:"#F0F5F9",bgHeaderHasFocus:"#E1E8F0",bgSearchResult:"#FFF7EC",headerIconSize:22};function nD(t,a){t.importCSS("main.css"),t.importCSS("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"),t.importCSS("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap"),(0,Lm.createRoot)(t.root).render(g1.default.createElement(U_,{ctx:t,data:a}))}function U_({ctx:t,data:a}){let e=[],r=[],n=a.content.columns.map(h1=>{let e1=h1.summary,u1=h1.label,M1=h1.key;return r.push({[u1]:250}),e1&&e.push(e1.keys.length),{title:u1,id:M1,type:h1.type,icon:N_[h1.type]||Na.HeaderString,hasMenu:h1.type!=="list",summary:e1}}),i=a.features.includes("refetch"),l=a.features.includes("export"),o=a.content.columns.length!==0,h=e.length>0,c=a.features.includes("sorting"),v=l?a.export?.formats:null,g=l&&v,d={rows:mt.empty(),columns:mt.empty()},[u,p]=(0,g1.useState)(a.content),[z,w]=(0,g1.useState)(!1),[s,f]=(0,g1.useState)(n),[m,H]=(0,g1.useState)(r),[x,y]=(0,g1.useState)(null),[R,L]=(0,g1.useState)(!1),[V,C]=(0,g1.useState)(d),[k,b]=(0,g1.useState)(0),[F,_]=(0,g1.useState)(null),j=u.total_rows,i1=o&&j>0,Z=a.features.includes("pagination")&&(j===null||j>0),d1=u.limit===j,O=44,a1=h&&i1?Math.max(...e):0,W=O+a1*22,L1=c?140:70,p1=440+W,H1=j&&j<(c?3:2)&&x?L1+W:null,P1=j>=10&&d1?p1:H1,K1=(u.page-1)*u.limit+1,W1=h?150:50,Bt=a.content.columns.length===1?800:350,T1=u.page_length,X1=(0,g1.useCallback)(h1=>{let{ctx:e1,theme:u1,rect:M1,column:I1,menuBounds:Q1,isHovered:St,isSelected:jt,spriteManager:Ut}=h1;if(I1.sourceIndex===0)return!0;if(!i1)return!1;e1.rect(M1.x,M1.y,M1.width,M1.height);let Et=10,ot=19,J1=jt?u1.textHeaderSelected:u1.textHeader,Jt=jt?u1.accentLight:u1.textDark,Mt=I1.hasMenu===!0&&St,C0=!!I1.summary,Z0=35,B0=M1.width-Z0,t0=M1.width-Z0*.7,Ma=B0/M1.width,dt=t0/M1.width,At=e1.createLinearGradient(M1.x,0,M1.x+M1.width,0),h0=fr(J1,0),wt=$a(e1,`${u1.headerFontStyle} ${u1.fontFamily}`);if(At.addColorStop(0,J1),At.addColorStop(Ma,J1),At.addColorStop(dt,h0),At.addColorStop(1,h0),e1.fillStyle=Mt?At:J1,I1.icon){let Ft=jt?"selected":I1.style==="highlight"?"special":"normal",qt=u1.headerIconSize;Ut.drawSprite(I1.icon,Ft,e1,M1.x+Et,M1.y+Et,qt,u1),I1.overlayIcon&&Ut.drawSprite(I1.overlayIcon,jt?"selected":"special",e1,M1.x+Et+ot/2,M1.y+Et+ot/2,ot,u1)}if(e1.fillText(I1.title,Q1.x-M1.width+u1.headerIconSize*2.5+14,C0?M1.y+Et+u1.headerIconSize/2+wt:Q1.y+Q1.height/2+wt),C0){let Ft=u.columns[I1.sourceIndex-1].summary,qt=Object.fromEntries(Ft.keys.map((j0,g2)=>[j0,Ft.values[g2]])),c2=13,v2=c2+Et,Ua=`${c2}px ${u1.fontFamily}`,O2=`bold ${Ua}`;e1.fillStyle=Jt,Object.entries(qt).forEach(([j0,g2],D2)=>{e1.font=O2,e1.fillText(`${j0}:`,M1.x+v2/2,M1.y+v2*(D2+1)+v2),e1.font=Ua,e1.fillText(g2,M1.x+e1.measureText(j0).width+v2,M1.y+v2*(D2+1)+v2)})}if(Mt){e1.fillStyle=At;let Ft=Q1.x+Q1.width/2-Et*1.5,qt=u1.headerIconSize/2-2,c2=new Path2D("M12 16l-6-6h12z");e1.translate(Ft,qt),e1.fill(c2)}return!0},[u]),Y=(0,g1.useCallback)(([h1,e1])=>{let u1=$_[u.columns[h1].type]||n1.Text,I1=u.data_orientation==="columns"?u.data[h1][e1]:u.data[e1][h1];return{kind:u1,data:I1,displayData:I1,allowOverlay:!0,allowWrapping:!1,readonly:!0}},[u]),N=()=>{w(!z)},s1=h1=>{let e1=h1!=="none"?x.columnKey:null;t.pushEvent("order_by",{key:e1,direction:h1??"asc"}),y(null)},x1=()=>{t.pushEvent("show_page",{page:u.page-1}),C({...d,columns:V.columns})},f1=()=>{t.pushEvent("show_page",{page:u.page+1}),C({...d,columns:V.columns})},U=()=>{let h1={...d,columns:mt.fromSingleSelection(x.column)};C(h1),y(null)},{layerProps:v1,renderLayer:D}=xm({isOpen:R,auto:!0,placement:"bottom-end",possiblePlacements:["bottom-end","bottom-center","bottom-start"],triggerOffset:0,onOutsideClick:()=>y(null),trigger:{getBounds:()=>({left:x?.bounds.x??0,top:x?.bounds.y??0,width:x?.bounds.width??0,height:x?.bounds.height??0,right:(x?.bounds.x??0)+(x?.bounds.width??0),bottom:(x?.bounds.y??0)+(x?.bounds.height??0)})}}),I=(0,g1.useCallback)((h1,e1)=>{H(u1=>({...u1,[h1.title]:e1}))},[]),C1=(0,g1.useCallback)((h1,e1)=>{let{summary:u1,id:M1,type:I1}=s[h1];u1||y({column:h1,bounds:e1,columnKey:M1,columnType:I1})},[]),D1=(0,g1.useCallback)((h1,{bounds:e1})=>{let{id:u1,type:M1}=s[h1];y({column:h1,bounds:e1,columnKey:u1,columnType:M1})},[]),et=(0,g1.useCallback)(h1=>{let[e1,u1]=h1.location;u1===-1&&e1===-1&&h1.kind==="header"?_([...Array.from({length:T1},(M1,I1)=>I1)]):e1===-1&&h1.kind==="cell"?_([u1]):_(null)},[T1]),B1=(0,g1.useCallback)(h1=>F?.includes(h1)?{bgCell:wm.bgHeaderHovered}:null,[F]);return(0,g1.useEffect)(()=>{V.rows?.items.length>0?b(1):b(0)},[V]),(0,g1.useEffect)(()=>{t.handleEvent("update_content",h1=>{p(h1)}),t.handleEvent("download_content",([h1,e1])=>{let u1=new Blob([e1],{type:h1.type}),M1=document.createElement("a");M1.href=window.URL.createObjectURL(u1),M1.download=`${h1.filename}-${+new Date}${h1.format}`,M1.click()})},[]),(0,g1.useEffect)(()=>{let h1=u.order?.direction==="asc"?"arrowUp":"arrowDown",e1=s.map(u1=>({...u1,overlayIcon:u1.id===u.order?.key?h1:null}));f(e1)},[u.order?.direction,u.order?.key]),(0,g1.useEffect)(()=>{let h1=s.map(e1=>({...e1,width:m[e1.title]}));f(h1)},[m]),(0,g1.useEffect)(()=>{let h1=x?.columnKey,e1={bgHeader:"#F0F5F9"},u1=s.map(M1=>({...M1,themeOverride:M1.id===h1?e1:null}));f(u1),L(!!x)},[x]),g1.default.createElement("div",{className:"app"},g1.default.createElement("div",{className:"navigation"},g1.default.createElement("div",{className:"navigation__info"},g1.default.createElement("h2",{className:"navigation__name"},a.name),g1.default.createElement("span",{className:"navigation__details"},j||"?"," ",j===1?"entry":"entries"),jt.pushEvent("download",{format:h1})}),g1.default.createElement("div",{className:"navigation__space"}),i&&g1.default.createElement(j_,{onRefetch:()=>t.pushEvent("refetch")}),g1.default.createElement(q_,{toggleSearch:N}),g1.default.createElement(G_,{limit:u.limit,totalRows:j,onChange:h1=>t.pushEvent("limit",{limit:h1})}),Z&&g1.default.createElement(K_,{page:u.page,maxPage:u.max_page,onPrev:x1,onNext:f1,rows:T1})),o&&g1.default.createElement(Yz,{className:"table-container",theme:wm,getCellContent:Y,columns:s,rows:T1,width:"100%",height:P1,rowHeight:44,headerHeight:W,drawHeader:X1,verticalBorder:!1,rowMarkers:"clickable-number",rowMarkerWidth:32,onHeaderMenuClick:C1,onHeaderClicked:D1,showSearch:z,getCellsForSelection:!0,onSearchClose:N,headerIcons:D_,overscrollX:100,isDraggable:!1,smoothScrollX:!0,smoothScrollY:!0,onColumnResize:I,columnSelect:"none",gridSelection:V,onGridSelectionChange:h1=>C(h1),rowMarkerStartIndex:K1,minColumnWidth:W1,maxColumnAutoWidth:Bt,fillHandle:!0,onItemHovered:et,getRowThemeOverride:B1}),R&&D(g1.default.createElement(X_,{layerProps:v1,menu:x,orderBy:s1,selectAllCurrent:U,hasSorting:c})),!o&&g1.default.createElement("p",{className:"no-data"},"No data"),g1.default.createElement("div",{id:"portal"}))}function W_({supportedFormats:t,onDownload:a}){let e=t.map(r=>g1.default.createElement("option",null,r));return g1.default.createElement("div",{className:"download"},g1.default.createElement("span",{className:"tooltip right","data-tooltip":"Export to"},g1.default.createElement("form",null,g1.default.createElement("select",{className:"input__icon",value:"",onChange:r=>a(r.target.value)},g1.default.createElement("option",{selected:!0,disabled:!0,value:""},"Export to"),e))))}function j_({onRefetch:t}){return g1.default.createElement("button",{className:"icon-button","aria-label":"refresh",onClick:t},g1.default.createElement(rm,null))}function q_({toggleSearch:t}){return g1.default.createElement("span",{className:"tooltip right","data-tooltip":"Current page search"},g1.default.createElement("button",{className:"icon-button search","aria-label":"search",onClick:t},g1.default.createElement(nm,{className:"search-icon"})))}function G_({limit:t,totalRows:a,onChange:e}){return g1.default.createElement("div",null,g1.default.createElement("form",null,g1.default.createElement("label",{className:"input-label"},"Show"),g1.default.createElement("select",{className:"input",value:t,onChange:r=>e(parseInt(r.target.value))},g1.default.createElement("option",{value:"10"},"10"),g1.default.createElement("option",{value:"20"},"20"),g1.default.createElement("option",{value:"50"},"50"),g1.default.createElement("option",{value:"100"},"100"),a?g1.default.createElement("option",{value:a},"All"):null)))}function K_({page:t,maxPage:a,onPrev:e,onNext:r,rows:n}){return g1.default.createElement("div",{className:"pagination"},g1.default.createElement("button",{className:"pagination__button",onClick:e,disabled:t===1},g1.default.createElement(am,null),g1.default.createElement("span",null,"Prev")),g1.default.createElement("div",{className:"pagination__info"},g1.default.createElement("span",null,t," of ",a||"?")),g1.default.createElement("button",{className:"pagination__button",onClick:r,disabled:t===a||n===0},g1.default.createElement("span",null,"Next"),g1.default.createElement(em,null)))}function X_({layerProps:t,selectAllCurrent:a,hasSorting:e,orderBy:r}){return g1.default.createElement("div",{className:"header-menu",...t},g1.default.createElement("button",{className:"header-menu-item button",onClick:a},"Select this column"),e&&g1.default.createElement(g1.default.Fragment,null,g1.default.createElement("div",{className:"header-menu-item",onClick:()=>r("asc")},g1.default.createElement(Jz,null),g1.default.createElement("span",null,"Sort: ascending")),g1.default.createElement("div",{className:"header-menu-item",onClick:()=>r("desc")},g1.default.createElement(tm,null),g1.default.createElement("span",null,"Sort: descending")),g1.default.createElement("div",{className:"header-menu-item",onClick:()=>r("none")},g1.default.createElement(Zz,null),g1.default.createElement("span",null,"Sort: none"))))}export{nD as init}; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see