@epam/ai-dial-ui-kit 0.13.0-dev.9 → 0.14.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/dist/CHANGELOG.md +48 -1
- package/dist/{JsonEditor-CRSkEnWP.cjs → JsonEditor-pyqbLZZf.cjs} +1 -1
- package/dist/{JsonEditor-Djt1V27V.js → JsonEditor-v9m_npfK.js} +1 -1
- package/dist/MarkdownEditor-5UpxUtXf.js +75 -0
- package/dist/{MarkdownEditor-BbGX2uA9.cjs → MarkdownEditor-9aPIyyuu.cjs} +1 -1
- package/dist/MarkdownEditor-BjqdSHPU.cjs +1 -0
- package/dist/{MarkdownEditor-DtKScLM2.js → MarkdownEditor-CWZVSR--.js} +1 -1
- package/dist/components-manifest.json +3420 -391
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +201 -148
- package/dist/{index-JVDPW40K.js → index-DKDaSZqV.js} +24490 -21241
- package/dist/index-xlqMH2Q1.cjs +71 -0
- package/dist/index.css +6 -2
- package/dist/mcp-server.cjs +29 -9
- package/dist/migration-guides/0.13.0/caption-semi-text-lead-rename.md +82 -0
- package/dist/migration-guides/0.13.0/field-label-props-unification.md +94 -0
- package/dist/migration-guides/0.13.0/focus-border-token-rename.md +106 -0
- package/dist/migration-guides/0.13.0/progress-bar-2-0-rewrite.md +103 -0
- package/dist/migration-guides/0.13.0/spinner-dial-prefix-removal.md +69 -0
- package/dist/migration-guides/0.13.0/typography-heading-scale-shift.md +93 -0
- package/dist/migration-guides/README.md +6 -0
- package/dist/src/components/Accordion/Accordion.d.ts +1 -0
- package/dist/src/components/Analytics/Bar/Bar.d.ts +12 -7
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +23 -16
- package/dist/src/components/Analytics/Card/Card.d.ts +14 -3
- package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +1 -0
- package/dist/src/components/Analytics/Histogram/Histogram.d.ts +9 -6
- package/dist/src/components/Analytics/Histogram/utils.d.ts +10 -0
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +1 -0
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +3 -0
- package/dist/src/components/Button/Button.d.ts +1 -0
- package/dist/src/components/Button/ButtonWrappers.d.ts +1 -15
- package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/dist/src/components/CaptionText/CaptionText.d.ts +1 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/src/components/CloseButton/CloseButton.d.ts +1 -0
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +1 -0
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +1 -0
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +1 -0
- package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +1 -0
- package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +1 -0
- package/dist/src/components/FabButton/FabButton.d.ts +8 -3
- package/dist/src/components/FileIcon/FileIcon.d.ts +1 -0
- package/dist/src/components/FileManager/FileManager.d.ts +3 -0
- package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +3 -0
- package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +3 -0
- package/dist/src/components/FileManager/hooks/use-file-manager-context.d.ts +2 -0
- package/dist/src/components/FileManager/hooks/use-file-manager-tabs.d.ts +3 -0
- package/dist/src/components/FileName/FileName.d.ts +1 -0
- package/dist/src/components/FolderName/FolderName.d.ts +1 -0
- package/dist/src/components/FormItem/FormItem.d.ts +1 -0
- package/dist/src/components/FormPopup/FormPopup.d.ts +1 -0
- package/dist/src/components/Grid/Grid.d.ts +1 -0
- package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +1 -0
- package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +1 -0
- package/dist/src/components/Icon/Icon.d.ts +1 -0
- package/dist/src/components/IconButton/IconButton.d.ts +5 -0
- package/dist/src/components/IconButton/IconButtonWrappers.d.ts +1 -0
- package/dist/src/components/Input/Input.d.ts +1 -0
- package/dist/src/components/InputPopup/InputPopup.d.ts +1 -0
- package/dist/src/components/JsonEditor/JsonEditor.d.ts +1 -0
- package/dist/src/components/Label/Label.d.ts +1 -0
- package/dist/src/components/LabelledText/LabelledText.d.ts +1 -0
- package/dist/src/components/LoadFileArea/LoadFileArea.d.ts +1 -0
- package/dist/src/components/LoadFileArea/LoadFileAreaField.d.ts +1 -0
- package/dist/src/components/Loader/Loader.d.ts +1 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +1 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +71 -0
- package/dist/src/components/New/Button/Button.d.ts +66 -0
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +94 -0
- package/dist/src/components/New/Button/__tests__/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Button/constants.d.ts +2 -0
- package/dist/src/components/New/Button/utils.d.ts +2 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +24 -0
- package/dist/src/components/New/ButtonDropdown/constants.d.ts +1 -0
- package/dist/src/components/New/Calendar/Calendar.d.ts +55 -0
- package/dist/src/components/New/Calendar/constants.d.ts +17 -0
- package/dist/src/components/New/Calendar/utils.d.ts +25 -0
- package/dist/src/components/New/Calendar/utils.spec.d.ts +1 -0
- package/dist/src/components/New/CaptionText/CaptionText.d.ts +21 -0
- package/dist/src/components/New/CardShell/CardShell.d.ts +14 -0
- package/dist/src/components/New/CloseButton/CloseButton.d.ts +33 -0
- package/dist/src/components/New/ConfirmationPopup/ConfirmationPopup.d.ts +55 -0
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +14 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +87 -0
- package/dist/src/components/New/Dropdown/DropdownSubMenuItem.d.ts +8 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +9 -0
- package/dist/src/components/New/FileDropzone/FileDropzone.d.ts +81 -0
- package/dist/src/components/New/FolderPath/FolderPath.d.ts +32 -0
- package/dist/src/components/New/Highlight/Highlight.d.ts +19 -0
- package/dist/src/components/New/IconButton/IconButton.d.ts +48 -0
- package/dist/src/components/New/IconButton/IconButtonWrappers.d.ts +71 -0
- package/dist/src/components/New/InfoButton/InfoButton.d.ts +26 -0
- package/dist/src/components/New/InfoButton/InfoButton.stories.d.ts +6 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +51 -0
- package/dist/src/components/New/Input/Button/InputButton.d.ts +25 -0
- package/dist/src/components/New/Input/Button/constants.d.ts +1 -0
- package/dist/src/components/New/Input/Input.d.ts +67 -0
- package/dist/src/components/New/Input/utils.d.ts +2 -0
- package/dist/src/components/New/Label/Label.d.ts +33 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +33 -0
- package/dist/src/components/New/MarkdownEditor/constants.d.ts +20 -0
- package/dist/src/components/New/Notification/Notification.d.ts +7 -0
- package/dist/src/components/New/Notification/constants.d.ts +12 -1
- package/dist/src/components/New/NumberInput/NumberInput.d.ts +36 -0
- package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +33 -0
- package/dist/src/components/New/Popup/Popup.d.ts +72 -0
- package/dist/src/components/New/Popup/constants.d.ts +10 -0
- package/dist/src/components/New/Search/Search.d.ts +42 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +17 -0
- package/dist/src/components/New/Select/Select.d.ts +110 -0
- package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +8 -0
- package/dist/src/components/New/Select/constants.d.ts +32 -0
- package/dist/src/components/New/Switch/Switch.d.ts +38 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +63 -0
- package/dist/src/components/New/Tag/Tag.d.ts +45 -0
- package/dist/src/components/New/TagInput/TagInput.d.ts +72 -0
- package/dist/src/components/New/TagInput/utils.d.ts +21 -0
- package/dist/src/components/New/TagInput/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Textarea/Textarea.d.ts +39 -0
- package/dist/src/components/New/constants/overlay.d.ts +24 -0
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +1 -0
- package/dist/src/components/Notification/Notification.d.ts +1 -0
- package/dist/src/components/NumberInput/NumberInput.d.ts +1 -0
- package/dist/src/components/Pagination/Pagination.d.ts +3 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +1 -0
- package/dist/src/components/Popup/Popup.d.ts +2 -1
- package/dist/src/components/ProgressBar/ProgressBar.d.ts +51 -10
- package/dist/src/components/RadioButton/RadioButton.d.ts +1 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +1 -0
- package/dist/src/components/RemoveButton/RemoveButton.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +1 -0
- package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +1 -0
- package/dist/src/components/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +9 -1
- package/dist/src/components/SchemaRenderer/types.d.ts +6 -1
- package/dist/src/components/SchemaRenderer/utils.d.ts +1 -0
- package/dist/src/components/Search/Search.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +1 -0
- package/dist/src/components/Select/Select.d.ts +1 -0
- package/dist/src/components/SelectField/SelectField.d.ts +1 -0
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +1 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts +19 -18
- package/dist/src/components/Skeleton/utils.d.ts +2 -2
- package/dist/src/components/Slider/Slider.d.ts +1 -0
- package/dist/src/components/Spinner/Spinner.d.ts +5 -2
- package/dist/src/components/Steps/Steps.d.ts +1 -0
- package/dist/src/components/Switch/Switch.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.d.ts +1 -0
- package/dist/src/components/Tag/Tag.d.ts +1 -0
- package/dist/src/components/TagInput/TagInput.d.ts +1 -0
- package/dist/src/components/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipContainer.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipContent.d.ts +1 -0
- package/dist/src/components/Tooltip/TooltipTrigger.d.ts +1 -0
- package/dist/src/index.d.ts +89 -13
- package/dist/src/mcp/types.d.ts +12 -0
- package/dist/src/models/dropdown.d.ts +27 -0
- package/dist/src/types/button.d.ts +1 -0
- package/dist/src/types/calendar.d.ts +6 -0
- package/dist/src/types/skeleton.d.ts +3 -3
- package/dist/src/utils/__tests__/accessible-name.spec.d.ts +1 -0
- package/dist/src/utils/__tests__/file-accept.spec.d.ts +1 -0
- package/dist/src/utils/accessible-name.d.ts +19 -0
- package/dist/src/utils/file-accept.d.ts +16 -0
- package/dist/src/utils/sub-menu-floating.d.ts +15 -2
- package/package.json +4 -2
- package/dist/index-CmA_N28F.cjs +0 -71
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";const g=require("react"),pe=require("classnames"),z=require("@tabler/icons-react"),de=require("@floating-ui/react"),Jo=require("react-dom");function ey(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const Ie=ey(g);function ty(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sy(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var s=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),s}var gl={exports:{}},Er={};var cf;function ny(){if(cf)return Er;cf=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(n,i,o){var r=null;if(o!==void 0&&(r=""+o),i.key!==void 0&&(r=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:e,type:n,key:r,ref:i!==void 0?i:null,props:o}}return Er.Fragment=t,Er.jsx=s,Er.jsxs=s,Er}var Dr={};var df;function iy(){return df||(df=1,process.env.NODE_ENV!=="production"&&(function(){function e(N){if(N==null)return null;if(typeof N=="function")return N.$$typeof===D?null:N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case C:return"Fragment";case b:return"Profiler";case w:return"StrictMode";case R:return"Suspense";case E:return"SuspenseList";case k:return"Activity"}if(typeof N=="object")switch(typeof N.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),N.$$typeof){case v:return"Portal";case S:return N.displayName||"Context";case x:return(N._context.displayName||"Context")+".Consumer";case y:var W=N.render;return N=N.displayName,N||(N=W.displayName||W.name||"",N=N!==""?"ForwardRef("+N+")":"ForwardRef"),N;case F:return W=N.displayName||null,W!==null?W:e(N.type)||"Memo";case P:W=N._payload,N=N._init;try{return e(N(W))}catch{}}return null}function t(N){return""+N}function s(N){try{t(N);var W=!1}catch{W=!0}if(W){W=console;var Y=W.error,te=typeof Symbol=="function"&&Symbol.toStringTag&&N[Symbol.toStringTag]||N.constructor.name||"Object";return Y.call(W,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",te),t(N)}}function n(N){if(N===C)return"<>";if(typeof N=="object"&&N!==null&&N.$$typeof===P)return"<...>";try{var W=e(N);return W?"<"+W+">":"<...>"}catch{return"<...>"}}function i(){var N=T.A;return N===null?null:N.getOwner()}function o(){return Error("react-stack-top-frame")}function r(N){if(I.call(N,"key")){var W=Object.getOwnPropertyDescriptor(N,"key").get;if(W&&W.isReactWarning)return!1}return N.key!==void 0}function a(N,W){function Y(){O||(O=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",W))}Y.isReactWarning=!0,Object.defineProperty(N,"key",{get:Y,configurable:!0})}function l(){var N=e(this.type);return G[N]||(G[N]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),N=this.props.ref,N!==void 0?N:null}function c(N,W,Y,te,we,Q){var ve=Y.ref;return N={$$typeof:m,type:N,key:W,props:Y,_owner:te},(ve!==void 0?ve:null)!==null?Object.defineProperty(N,"ref",{enumerable:!1,get:l}):Object.defineProperty(N,"ref",{enumerable:!1,value:null}),N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(N,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(N,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:we}),Object.defineProperty(N,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N}function d(N,W,Y,te,we,Q){var ve=W.children;if(ve!==void 0)if(te)if(H(ve)){for(te=0;te<ve.length;te++)u(ve[te]);Object.freeze&&Object.freeze(ve)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(ve);if(I.call(W,"key")){ve=e(N);var Pe=Object.keys(W).filter(function(ge){return ge!=="key"});te=0<Pe.length?"{key: someKey, "+Pe.join(": ..., ")+": ...}":"{key: someKey}",B[ve+te]||(Pe=0<Pe.length?"{"+Pe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
2
|
+
let props = %s;
|
|
3
|
+
<%s {...props} />
|
|
4
|
+
React keys must be passed directly to JSX without using spread:
|
|
5
|
+
let props = %s;
|
|
6
|
+
<%s key={someKey} {...props} />`,te,ve,Pe,ve),B[ve+te]=!0)}if(ve=null,Y!==void 0&&(s(Y),ve=""+Y),r(W)&&(s(W.key),ve=""+W.key),"key"in W){Y={};for(var J in W)J!=="key"&&(Y[J]=W[J])}else Y=W;return ve&&a(Y,typeof N=="function"?N.displayName||N.name||"Unknown":N),c(N,ve,Y,i(),we,Q)}function u(N){p(N)?N._store&&(N._store.validated=1):typeof N=="object"&&N!==null&&N.$$typeof===P&&(N._payload.status==="fulfilled"?p(N._payload.value)&&N._payload.value._store&&(N._payload.value._store.validated=1):N._store&&(N._store.validated=1))}function p(N){return typeof N=="object"&&N!==null&&N.$$typeof===m}var f=g,m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),S=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),D=Symbol.for("react.client.reference"),T=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=Object.prototype.hasOwnProperty,H=Array.isArray,A=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(N){return N()}};var O,G={},L=f.react_stack_bottom_frame.bind(f,o)(),U=A(n(o)),B={};Dr.Fragment=C,Dr.jsx=function(N,W,Y){var te=1e4>T.recentlyCreatedOwnerStacks++;return d(N,W,Y,!1,te?Error("react-stack-top-frame"):L,te?A(n(N)):U)},Dr.jsxs=function(N,W,Y){var te=1e4>T.recentlyCreatedOwnerStacks++;return d(N,W,Y,!0,te?Error("react-stack-top-frame"):L,te?A(n(N)):U)}})()),Dr}var uf;function oy(){return uf||(uf=1,process.env.NODE_ENV==="production"?gl.exports=ny():gl.exports=iy()),gl.exports}var h=oy();const ry=(e,t)=>{const s=new Array(e.length+t.length);for(let n=0;n<e.length;n++)s[n]=e[n];for(let n=0;n<t.length;n++)s[e.length+n]=t[n];return s},ay=(e,t)=>({classGroupId:e,validator:t}),rC=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),tc="-",hf=[],ly="arbitrary..",cy=e=>{const t=uy(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return dy(r);const a=r.split(tc),l=a[0]===""&&a.length>1?1:0;return aC(a,l,t)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=n[r],c=s[r];return l?c?ry(c,l):l:c||hf}return s[r]||hf}}},aC=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const i=e[t],o=s.nextPart.get(i);if(o){const c=aC(e,t+1,o);if(c)return c}const r=s.validators;if(r===null)return;const a=t===0?e.join(tc):e.slice(t).join(tc),l=r.length;for(let c=0;c<l;c++){const d=r[c];if(d.validator(a))return d.classGroupId}},dy=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),s=t.indexOf(":"),n=t.slice(0,s);return n?ly+n:void 0})(),uy=e=>{const{theme:t,classGroups:s}=e;return hy(s,t)},hy=(e,t)=>{const s=rC();for(const n in e){const i=e[n];lp(i,s,n,t)}return s},lp=(e,t,s,n)=>{const i=e.length;for(let o=0;o<i;o++){const r=e[o];py(r,t,s,n)}},py=(e,t,s,n)=>{if(typeof e=="string"){gy(e,t,s);return}if(typeof e=="function"){fy(e,t,s,n);return}my(e,t,s,n)},gy=(e,t,s)=>{const n=e===""?t:lC(t,e);n.classGroupId=s},fy=(e,t,s,n)=>{if(vy(e)){lp(e(n),t,s,n);return}t.validators===null&&(t.validators=[]),t.validators.push(ay(s,e))},my=(e,t,s,n)=>{const i=Object.entries(e),o=i.length;for(let r=0;r<o;r++){const[a,l]=i[r];lp(l,lC(t,a),s,n)}},lC=(e,t)=>{let s=e;const n=t.split(tc),i=n.length;for(let o=0;o<i;o++){const r=n[o];let a=s.nextPart.get(r);a||(a=rC(),s.nextPart.set(r,a)),s=a}return s},vy=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Cy=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),n=Object.create(null);const i=(o,r)=>{s[o]=r,t++,t>e&&(t=0,n=s,s=Object.create(null))};return{get(o){let r=s[o];if(r!==void 0)return r;if((r=n[o])!==void 0)return i(o,r),r},set(o,r){o in s?s[o]=r:i(o,r)}}},rh="!",pf=":",wy=[],gf=(e,t,s,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:n,isExternal:i}),by=e=>{const{prefix:t,experimentalParseClassName:s}=e;let n=i=>{const o=[];let r=0,a=0,l=0,c;const d=i.length;for(let v=0;v<d;v++){const C=i[v];if(r===0&&a===0){if(C===pf){o.push(i.slice(l,v)),l=v+1;continue}if(C==="/"){c=v;continue}}C==="["?r++:C==="]"?r--:C==="("?a++:C===")"&&a--}const u=o.length===0?i:i.slice(l);let p=u,f=!1;u.endsWith(rh)?(p=u.slice(0,-1),f=!0):u.startsWith(rh)&&(p=u.slice(1),f=!0);const m=c&&c>l?c-l:void 0;return gf(o,f,p,m)};if(t){const i=t+pf,o=n;n=r=>r.startsWith(i)?o(r.slice(i.length)):gf(wy,!1,r,void 0,!0)}if(s){const i=n;n=o=>s({className:o,parseClassName:i})}return n},xy=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((s,n)=>{t.set(s,1e6+n)}),s=>{const n=[];let i=[];for(let o=0;o<s.length;o++){const r=s[o],a=r[0]==="[",l=t.has(r);a||l?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(r)):i.push(r)}return i.length>0&&(i.sort(),n.push(...i)),n}},yy=e=>({cache:Cy(e.cacheSize),parseClassName:by(e),sortModifiers:xy(e),...cy(e)}),Sy=/\s+/,Ry=(e,t)=>{const{parseClassName:s,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,r=[],a=e.trim().split(Sy);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:u,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:v}=s(d);if(u){l=d+(l.length>0?" "+l:l);continue}let C=!!v,w=n(C?m.substring(0,v):m);if(!w){if(!C){l=d+(l.length>0?" "+l:l);continue}if(w=n(m),!w){l=d+(l.length>0?" "+l:l);continue}C=!1}const b=p.length===0?"":p.length===1?p[0]:o(p).join(":"),x=f?b+rh:b,S=x+w;if(r.indexOf(S)>-1)continue;r.push(S);const y=i(w,C);for(let R=0;R<y.length;++R){const E=y[R];r.push(x+E)}l=d+(l.length>0?" "+l:l)}return l},Fy=(...e)=>{let t=0,s,n,i="";for(;t<e.length;)(s=e[t++])&&(n=cC(s))&&(i&&(i+=" "),i+=n);return i},cC=e=>{if(typeof e=="string")return e;let t,s="";for(let n=0;n<e.length;n++)e[n]&&(t=cC(e[n]))&&(s&&(s+=" "),s+=t);return s},Ey=(e,...t)=>{let s,n,i,o;const r=l=>{const c=t.reduce((d,u)=>u(d),e());return s=yy(c),n=s.cache.get,i=s.cache.set,o=a,a(l)},a=l=>{const c=n(l);if(c)return c;const d=Ry(l,s);return i(l,d),d};return o=r,(...l)=>o(Fy(...l))},Dy=[],yt=e=>{const t=s=>s[e]||Dy;return t.isThemeGetter=!0,t},dC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Py=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ty=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ky=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Iy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,My=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ay=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,In=e=>Py.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),Mn=e=>!!e&&Number.isInteger(Number(e)),Jd=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),sn=e=>Ty.test(e),hC=()=>!0,Ly=e=>ky.test(e)&&!Iy.test(e),cp=()=>!1,Ny=e=>My.test(e),Oy=e=>Ay.test(e),Hy=e=>!Fe(e)&&!Ee(e),By=e=>ti(e,fC,cp),Fe=e=>dC.test(e),fi=e=>ti(e,mC,Ly),ff=e=>ti(e,$y,Ge),Gy=e=>ti(e,CC,hC),Vy=e=>ti(e,vC,cp),mf=e=>ti(e,pC,cp),jy=e=>ti(e,gC,Oy),fl=e=>ti(e,wC,Ny),Ee=e=>uC.test(e),Pr=e=>Zi(e,mC),zy=e=>Zi(e,vC),vf=e=>Zi(e,pC),Wy=e=>Zi(e,fC),_y=e=>Zi(e,gC),ml=e=>Zi(e,wC,!0),Uy=e=>Zi(e,CC,!0),ti=(e,t,s)=>{const n=dC.exec(e);return n?n[1]?t(n[1]):s(n[2]):!1},Zi=(e,t,s=!1)=>{const n=uC.exec(e);return n?n[1]?t(n[1]):s:!1},pC=e=>e==="position"||e==="percentage",gC=e=>e==="image"||e==="url",fC=e=>e==="length"||e==="size"||e==="bg-size",mC=e=>e==="length",$y=e=>e==="number",vC=e=>e==="family-name",CC=e=>e==="number"||e==="weight",wC=e=>e==="shadow",qy=()=>{const e=yt("color"),t=yt("font"),s=yt("text"),n=yt("font-weight"),i=yt("tracking"),o=yt("leading"),r=yt("breakpoint"),a=yt("container"),l=yt("spacing"),c=yt("radius"),d=yt("shadow"),u=yt("inset-shadow"),p=yt("text-shadow"),f=yt("drop-shadow"),m=yt("blur"),v=yt("perspective"),C=yt("aspect"),w=yt("ease"),b=yt("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...S(),Ee,Fe],R=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],F=()=>[Ee,Fe,l],P=()=>[In,"full","auto",...F()],k=()=>[Mn,"none","subgrid",Ee,Fe],D=()=>["auto",{span:["full",Mn,Ee,Fe]},Mn,Ee,Fe],T=()=>[Mn,"auto",Ee,Fe],I=()=>["auto","min","max","fr",Ee,Fe],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],A=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...F()],G=()=>[In,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...F()],L=()=>[In,"screen","full","dvw","lvw","svw","min","max","fit",...F()],U=()=>[In,"screen","full","lh","dvh","lvh","svh","min","max","fit",...F()],B=()=>[e,Ee,Fe],N=()=>[...S(),vf,mf,{position:[Ee,Fe]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",Wy,By,{size:[Ee,Fe]}],te=()=>[Jd,Pr,fi],we=()=>["","none","full",c,Ee,Fe],Q=()=>["",Ge,Pr,fi],ve=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ge,Jd,vf,mf],ge=()=>["","none",m,Ee,Fe],V=()=>["none",Ge,Ee,Fe],$=()=>["none",Ge,Ee,Fe],K=()=>[Ge,Ee,Fe],ce=()=>[In,"full",...F()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[sn],breakpoint:[sn],color:[hC],container:[sn],"drop-shadow":[sn],ease:["in","out","in-out"],font:[Hy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[sn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[sn],shadow:[sn],spacing:["px",Ge],text:[sn],"text-shadow":[sn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",In,Fe,Ee,C]}],container:["container"],columns:[{columns:[Ge,Fe,Ee,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Mn,"auto",Ee,Fe]}],basis:[{basis:[In,"full","auto",a,...F()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,In,"auto","initial","none",Fe]}],grow:[{grow:["",Ge,Ee,Fe]}],shrink:[{shrink:["",Ge,Ee,Fe]}],order:[{order:[Mn,"first","last","none",Ee,Fe]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:F()}],"gap-x":[{"gap-x":F()}],"gap-y":[{"gap-y":F()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...A(),"normal"]}],"justify-self":[{"justify-self":["auto",...A()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...A(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...A(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...A(),"baseline"]}],"place-self":[{"place-self":["auto",...A()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pbs:[{pbs:F()}],pbe:[{pbe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":F()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":F()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...U()]}],"min-block-size":[{"min-block":["auto",...U()]}],"max-block-size":[{"max-block":["none",...U()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",s,Pr,fi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Uy,Gy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jd,Fe]}],"font-family":[{font:[zy,Vy,t]}],"font-features":[{"font-features":[Fe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ee,Fe]}],"line-clamp":[{"line-clamp":[Ge,"none",Ee,ff]}],leading:[{leading:[o,...F()]}],"list-image":[{"list-image":["none",Ee,Fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ee,Fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",Ee,fi]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ge,"auto",Ee,Fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee,Fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee,Fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Mn,Ee,Fe],radial:["",Ee,Fe],conic:[Mn,Ee,Fe]},_y,jy]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:we()}],"rounded-s":[{"rounded-s":we()}],"rounded-e":[{"rounded-e":we()}],"rounded-t":[{"rounded-t":we()}],"rounded-r":[{"rounded-r":we()}],"rounded-b":[{"rounded-b":we()}],"rounded-l":[{"rounded-l":we()}],"rounded-ss":[{"rounded-ss":we()}],"rounded-se":[{"rounded-se":we()}],"rounded-ee":[{"rounded-ee":we()}],"rounded-es":[{"rounded-es":we()}],"rounded-tl":[{"rounded-tl":we()}],"rounded-tr":[{"rounded-tr":we()}],"rounded-br":[{"rounded-br":we()}],"rounded-bl":[{"rounded-bl":we()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,Ee,Fe]}],"outline-w":[{outline:["",Ge,Pr,fi]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",d,ml,fl]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",u,ml,fl]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ge,fi]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",p,ml,fl]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ge,Ee,Fe]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[Ee,Fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ee,Fe]}],filter:[{filter:["","none",Ee,Fe]}],blur:[{blur:ge()}],brightness:[{brightness:[Ge,Ee,Fe]}],contrast:[{contrast:[Ge,Ee,Fe]}],"drop-shadow":[{"drop-shadow":["","none",f,ml,fl]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ge,Ee,Fe]}],"hue-rotate":[{"hue-rotate":[Ge,Ee,Fe]}],invert:[{invert:["",Ge,Ee,Fe]}],saturate:[{saturate:[Ge,Ee,Fe]}],sepia:[{sepia:["",Ge,Ee,Fe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ee,Fe]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,Ee,Fe]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,Ee,Fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,Ee,Fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,Ee,Fe]}],"backdrop-invert":[{"backdrop-invert":["",Ge,Ee,Fe]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,Ee,Fe]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,Ee,Fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,Ee,Fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":F()}],"border-spacing-x":[{"border-spacing-x":F()}],"border-spacing-y":[{"border-spacing-y":F()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ee,Fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",Ee,Fe]}],ease:[{ease:["linear","initial",w,Ee,Fe]}],delay:[{delay:[Ge,Ee,Fe]}],animate:[{animate:["none",b,Ee,Fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ee,Fe]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:V()}],"rotate-x":[{"rotate-x":V()}],"rotate-y":[{"rotate-y":V()}],"rotate-z":[{"rotate-z":V()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:K()}],"skew-x":[{"skew-x":K()}],"skew-y":[{"skew-y":K()}],transform:[{transform:[Ee,Fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee,Fe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mbs":[{"scroll-mbs":F()}],"scroll-mbe":[{"scroll-mbe":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pbs":[{"scroll-pbs":F()}],"scroll-pbe":[{"scroll-pbe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee,Fe]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Ge,Pr,fi,ff]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ky=Ey(qy);function M(...e){return Ky(pe(e))}var Ni=(e=>(e.Description="description",e.Error="error",e))(Ni||{});const Fa=({text:e,className:t,variant:s=Ni.Description,...n})=>e?h.jsx("span",{...n,role:"alert",className:M("dial-tiny-text",s===Ni.Error?"text-error":"text-secondary",t),children:e}):null,Ht=({...e})=>h.jsx(Fa,{...e,variant:Ni.Error}),Le=({icon:e,className:t})=>e?h.jsx("span",{className:pe("flex-shrink-0",t),children:e}):null;var Me=(e=>(e.Primary="primary",e.Neutral="neutral",e.Danger="danger",e.Static="static",e.Success="success",e.Secondary="secondary",e.Tertiary="tertiary",e))(Me||{}),ye=(e=>(e.Solid="solid",e.Outlined="outlined",e.Ghost="ghost",e.Link="link",e))(ye||{});const Cf={[Me.Primary]:{[ye.Solid]:"dial-primary-solid-button",[ye.Ghost]:"dial-primary-ghost-button",[ye.Link]:"dial-primary-link-button"},[Me.Neutral]:{[ye.Outlined]:"dial-neutral-outlined-button"},[Me.Danger]:{[ye.Solid]:"dial-danger-solid-button",[ye.Ghost]:"dial-danger-ghost-button",[ye.Outlined]:"dial-danger-outlined-button"},[Me.Success]:{[ye.Ghost]:"dial-success-ghost-button"},[Me.Secondary]:{[ye.Ghost]:"dial-secondary-ghost-button"},[Me.Tertiary]:{[ye.Ghost]:"dial-tertiary-ghost-button"},[Me.Static]:{}},bC=(e=Me.Primary,t=ye.Solid)=>{const s=Cf[e]?.[t];return s||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${t}. Using default primary solid button styles.`),Cf[Me.Primary][ye.Solid])};var me=(e=>(e.Small="small",e.Standard="standard",e.Large="large",e))(me||{});const Yy=7,Zy=2,xC=g.createContext(null),yC=()=>{const e=g.useContext(xC);if(e==null)throw new Error("Tooltip components must be wrapped in <Tooltip />");return e},Xy=({initialOpen:e=!1,placement:t="bottom",isTriggerClickable:s=!1,open:n,onOpenChange:i}={})=>{const[o,r]=g.useState(e),a=g.useRef(null),l=n??o,c=i??r,d=de.useFloating({placement:t,open:l,onOpenChange:c,whileElementsMounted:de.autoUpdate,middleware:[de.offset(Yy+Zy),de.flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:5}),de.shift({padding:5}),de.arrow({element:a})]}),u=de.useHover(d.context,{move:!1,enabled:n==null,mouseOnly:s,delay:{open:500,close:0}}),p=de.useFocus(d.context,{enabled:n==null}),f=de.useDismiss(d.context),m=de.useRole(d.context,{role:"tooltip"}),v=de.useInteractions([u,p,f,m]);return g.useEffect(()=>{if(!l)return;const C=d.refs.reference.current;if(!(C instanceof Element))return;const w=new IntersectionObserver(([b])=>{b.isIntersecting||c(!1)},{root:null,threshold:0});return w.observe(C),()=>w.disconnect()},[l,d.refs.reference,c]),g.useMemo(()=>({open:l,setOpen:c,arrowRef:a,...v,...d}),[l,c,v,d])},Bc=({children:e,...t})=>{const s=Xy(t);return h.jsx(xC.Provider,{value:s,children:e})};var Vn=(e=>(e.Undefined="undefined",e.Mobile="mobile",e.Tablet="tablet",e.Desktop="desktop",e))(Vn||{});const wf=()=>typeof window<"u"&&window.innerWidth<1279,bf=()=>typeof window<"u"&&window.innerWidth<640,eu=()=>{if(typeof window>"u")return Vn.Undefined;const e=window.innerWidth;return e>=1024?Vn.Desktop:e<640?Vn.Mobile:Vn.Tablet},Ea=()=>{const[e,t]=g.useState(bf());return g.useEffect(()=>{const s=()=>t(bf());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},Gc=({style:e,...t})=>{const s=yC(),n=Ea(),i=g.useRef(null),o=de.useMergeRefs([s.refs.setFloating,i]);return!s.open||n?null:h.jsx(de.FloatingPortal,{id:"tooltip-portal",children:h.jsxs("div",{ref:o,style:{...s.floatingStyles,...e},...s.getFloatingProps(t),className:pe("z-[55] whitespace-pre-wrap break-words rounded border border-primary bg-layer-0 px-2 py-1 dial-tiny-text shadow max-w-[300px]",s.getFloatingProps(t).className),children:[t.children,h.jsx(de.FloatingArrow,{ref:s.arrowRef,context:s.context,fill:"currentColor",strokeWidth:1,className:"stroke-primary text-[var(--bg-layer-0,_#000000)]"})]})})},Vc=({children:e,asChild:t=!1,...s})=>{const n=yC(),i=t&&g.isValidElement(e),o=i?e.props?.ref:null,r=de.useMergeRefs([n.refs.setReference,...o?[o]:[]]);return i?g.cloneElement(e,n.getReferenceProps({...e.props,...s,ref:r})):h.jsx("span",{ref:r,...n.getReferenceProps(s),className:s.className??"dial-tooltip-trigger text-start",children:e})},ct=({hideTooltip:e,tooltip:t,children:s,triggerClassName:n,contentClassName:i,...o})=>h.jsxs(Bc,{...o,children:[h.jsx(Vc,{className:pe(n,"truncate"),children:s}),h.jsx(Gc,{className:pe("text-primary",i,"max-w-[300px]",(e||!t)&&"hidden"),children:t})]}),Ks=({label:e,variant:t,appearance:s=ye.Solid,size:n=me.Standard,className:i,textClassName:o,iconAfter:r,iconBefore:a,hideTitleOnMobile:l,type:c="button",tooltipProps:d,...u})=>{const p=pe(l?"hidden sm:inline":"inline",o),f=M(t&&bC(t,s),n===me.Small?"dial-tiny-semi-text":"dial-small-semi-text",s!==ye.Link&&(n===me.Small?"h-[24px] px-2":"h-[40px] px-3"),n!==me.Small&&s!==ye.Link&&"dial-kit-enhanced-target","disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus-black outline-offset-0",i),m=h.jsxs("button",{...u,type:c,className:f,"aria-label":typeof e=="string"&&e||u["aria-label"],children:[h.jsx(Le,{icon:a}),e&&h.jsx("span",{className:p,children:e}),h.jsx(Le,{icon:r})]});return d?h.jsx(ct,{...d,children:m}):m},Qy="text-primary",it=({text:e,className:t,contentClassName:s,hideTooltip:n,id:i,customTooltipContent:o,...r})=>{const a=g.useRef(null),[l,c]=g.useState(!1),[d,u]=g.useState(""),p=g.useRef(null),f=()=>{const w=a.current;if(!w)return;u(w.textContent??"");const b=w.clientWidth,x=w.scrollWidth,S=Math.ceil(w.getBoundingClientRect().width);c(x>b||x>S)},m=g.useCallback(()=>{p.current&&cancelAnimationFrame(p.current),p.current=requestAnimationFrame(f)},[]);g.useEffect(()=>{m();const w=()=>m();window.addEventListener("resize",w);let b=null;return"ResizeObserver"in window&&a.current&&(b=new ResizeObserver(()=>m()),b.observe(a.current)),()=>{window.removeEventListener("resize",w),b&&b.disconnect(),p.current&&cancelAnimationFrame(p.current)}},[e,m]);const v=g.useMemo(()=>typeof e=="string"?e:d,[d,e]),C=g.useMemo(()=>n?"":o||(l?v:""),[o,v,n,l]);return h.jsxs(Bc,{...r,children:[h.jsx(Vc,{asChild:!0,onMouseEnter:m,onFocusCapture:m,children:h.jsx("span",{id:i,className:M("block truncate flex-1 min-w-0 max-w-full text-start",t),"aria-label":l?v:void 0,onMouseEnter:m,onFocus:m,ref:a,children:e})}),h.jsx(Gc,{className:M(Qy,s,!C&&"hidden"),children:C})]})};var Ne=(e=>(e[e.LG=24]="LG",e[e.MD=20]="MD",e[e.SM=16]="SM",e))(Ne||{});const os=18,ae={size:os,stroke:2},jn=({label:e,className:t,icon:s,selected:n,closable:i,onClick:o,onRemove:r})=>{const a=M("flex items-center gap-1 cursor-pointer dial-tiny-text px-2 h-[24px] border text-primary rounded-[8px]",n?"hover:bg-controls-accent-primary-alpha-active bg-accent-primary-alpha border-accent-primary":"bg-neutral border-primary",t);return h.jsxs("div",{className:a,onClick:o,children:[h.jsx(Le,{icon:s}),h.jsx(it,{text:e}),i&&r&&h.jsx(Ks,{className:"p-0",iconAfter:h.jsx(z.IconX,{size:Ne.SM}),onClick:l=>r(l)})]},e)},dp=({label:e="Error",className:t})=>h.jsx(jn,{label:e,className:M("dial-tiny-semi-text cursor-default rounded-[120px] border-transparent bg-error text-error",t)}),Jy="flex items-center justify-center text-secondary",eS="shrink-0 grow-0 basis-auto animate-spin-steps",tS=e=>Ie.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Ie.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Ie.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Ie.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Ie.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Ie.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Ie.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Ie.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),bn=({size:e=18,className:t,iconClassName:s,fullWidth:n=!0,ariaLabel:i="Loading"})=>h.jsx("div",{role:"status",className:pe({[Jy]:!0,"w-full h-full":n,[t||""]:!!t}),children:h.jsx(Le,{icon:h.jsx(tS,{width:e,height:e,className:pe(eS,s),role:"img","aria-label":i})})});var na=(e=>(e.Default="default",e.Compact="compact",e))(na||{});const sS={[na.Default]:{container:"bg-layer-3",title:"dial-small-text text-secondary",value:"dial-display2-text text-primary",showDescription:!0},[na.Compact]:{container:"bg-layer-2",title:"dial-tiny-text text-secondary",value:"dial-body-semi-text text-primary",showDescription:!1}},nS=({title:e,value:t,description:s,variant:n=na.Default,error:i,isLoading:o,className:r,delta:a,deltaPositive:l,deltaUnit:c,compareValues:d})=>{const u=sS[n],p=l!==void 0?l:(a??0)>=0,f=a===void 0?null:`${a>=0?`+${a}`:String(a)}${c??""}`;return h.jsxs("div",{className:M("flex flex-col rounded-lg border border-secondary p-4",i||o?"gap-2":"gap-1",u.container,r),children:[a!==void 0?h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:u.title,children:e}),h.jsx("span",{className:M("dial-tiny-semi-text rounded-[120px] border border-transparent px-2",p?"bg-success text-success":"bg-error text-error"),children:f})]}):h.jsx("span",{className:u.title,children:e}),i?h.jsx(dp,{className:"self-start"}):o?h.jsx(bn,{fullWidth:!1,className:"self-start"}):d?h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[h.jsx(it,{text:d[0].title,className:"dial-tiny-text text-secondary"}),h.jsx("span",{className:u.value,children:d[0].value})]}),h.jsx("div",{className:"h-4 w-px flex-shrink-0 bg-controls-disable-accent"}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[h.jsx(it,{text:d[1].title,className:"dial-tiny-text text-secondary"}),h.jsx("span",{className:u.value,children:d[1].value})]})]}):h.jsx("span",{className:u.value,children:t}),!i&&!o&&u.showDescription&&s!=null&&s!==!1&&h.jsx("span",{className:"dial-tiny-text text-secondary",children:s})]})},up=[{from:0,to:.1,color:"#F26B5B"},{from:.1,to:.2,color:"#E5764A"},{from:.2,to:.3,color:"#E08C3F"},{from:.3,to:.4,color:"#D9A638"},{from:.4,to:.5,color:"#D4BE3A"},{from:.5,to:.6,color:"#B8C94A"},{from:.6,to:.7,color:"#7EC96B"},{from:.7,to:.8,color:"#4ECBA8"},{from:.8,to:.9,color:"#4EC5C5"},{from:.9,to:1,color:"#4DC87A"},{from:1,to:1,color:"#30E070"}],iS=(e,t)=>t<=0?0:Math.min(Math.max(e/t,0),1),oS=(e,t)=>{if(e<=0)return;let s;for(const n of t)(n.from===n.to?e>=n.from:e>n.from&&e<=n.to)&&(s=n.color);return s},Hl=({value:e,maxValue:t=1,error:s,isLoading:n,title:i,valueLabel:o,colorMap:r=up,className:a,titleClassName:l,valueClassName:c,inline:d,ariaLabel:u})=>{const p=e==null,f=!!(s||n||!p),m=iS(p?0:e,t),v=oS(m,r),C=o??(p?"—":e),w=u??(typeof i=="string"?i:void 0),b=s||n,x=s?h.jsx(dp,{}):n?h.jsx(bn,{fullWidth:!1}):h.jsx("span",{className:M("shrink-0 tabular-nums text-end",d?"dial-small-text min-w-[5ch] text-primary":"dial-small-semi-text text-primary",c),children:C}),S=f?h.jsx("div",{role:"progressbar","aria-valuenow":s||n||typeof e!="number"?void 0:e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":w,className:M("w-full overflow-hidden rounded-sm",d?"h-1":"h-2",s?"bg-error":"bg-layer-1"),children:!b&&h.jsx("div",{className:"h-full rounded-sm transition-[width] duration-300",style:{width:`${m*100}%`,backgroundColor:v}})}):null,y=h.jsx("span",{className:M("dial-small-text text-primary",l),children:i});return d?h.jsxs("div",{className:M("flex flex-row items-center gap-2",a),children:[h.jsx("div",{className:"w-1/2 min-w-0",children:y}),h.jsxs("div",{className:"flex w-1/2 flex-row items-center gap-2",children:[h.jsx("div",{className:"min-w-0 flex-1",children:S}),x]})]}):h.jsxs("div",{className:M("flex flex-col gap-1",a),children:[h.jsxs("div",{className:"flex flex-row items-center justify-between gap-2",children:[y,x]}),S]})},SC=({title:e,description:t,children:s,expanded:n,defaultExpanded:i=!1,disabled:o,nonCollapsible:r,onToggle:a,className:l,headerClassName:c,contentClassName:d})=>{const u=n!==void 0,[p,f]=g.useState(i),m=r?!0:u?n:p,v=g.useId(),C=()=>{if(o)return;const w=!m;u||f(w),a?.(w)};return h.jsxs("div",{className:M("rounded border border-secondary",l),children:[h.jsxs("button",{type:"button","aria-expanded":m,"aria-controls":v,disabled:o||r,onClick:C,className:M("flex w-full items-center gap-2 p-4 text-left",o?"cursor-not-allowed":"cursor-pointer",r&&"cursor-default",c),children:[!r&&h.jsx(Le,{className:pe("text-secondary transition-transform",m&&"rotate-90"),icon:h.jsx(z.IconChevronRight,{size:Ne.SM})}),h.jsx("span",{className:"dial-body-text text-primary",children:e}),t!=null&&t!==!1&&h.jsx("span",{className:"dial-tiny-text text-secondary",children:t})]}),m&&h.jsx("div",{id:v,role:"region",className:M("px-4 pb-4",d),children:s})]})},rS=({title:e,titleTooltip:t,description:s,data:n,compareData:i,compareLabels:o,maxValue:r,colorMap:a,defaultExpanded:l=!0,nonCollapsible:c,isLoading:d,onBarClick:u,inline:p,barTitleClassName:f,barValueClassName:m,barClassName:v,barDescriptions:C,className:w})=>{const b=Object.entries(n),x=p?M("text-secondary",f):f,S=o?"dial-tiny-text text-secondary":void 0,y=t?h.jsx(ct,{tooltip:t,children:e}):e,R=i?[...new Set([...Object.keys(n),...Object.keys(i)])]:[],E="cursor-pointer rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-primary";return h.jsx(SC,{title:y,description:s,defaultExpanded:l,nonCollapsible:c,className:w,children:h.jsx("div",{className:M("flex flex-col",i?"gap-4":p?"gap-2":"gap-3"),children:d?h.jsx(bn,{fullWidth:!1,className:"self-center"}):i?R.map(F=>{const P=F in n?n[F]:null,k=F in i?i[F]:null,T=typeof P=="number"&&typeof k=="number"?parseFloat((k-P).toFixed(3)):null,I=T!=null&&T!==0,H=I&&T>0,A=I?H?`+${T}`:String(T):null,O=C?.[F],G=h.jsx("span",{className:"dial-small-text text-secondary",children:F}),L=h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-2",children:[O?h.jsx(ct,{tooltip:O,children:G}):G,A!=null&&h.jsx("span",{className:M("dial-tiny-semi-text rounded-[120px] border border-transparent px-2",H?"bg-success text-success":"bg-error text-error"),children:A})]}),h.jsxs("div",{className:"flex flex-col gap-1.5 pl-2",children:[h.jsx(Hl,{title:o?.[0],value:P,maxValue:r,colorMap:a,inline:p,titleClassName:S,className:v,ariaLabel:F}),h.jsx(Hl,{title:o?.[1],value:k,maxValue:r,colorMap:a,inline:p,titleClassName:S,className:v,ariaLabel:`${F} compare`})]})]});return u?h.jsx("button",{type:"button",onClick:()=>u(F,P),className:M("flex flex-col gap-1.5",E),children:L},F):h.jsx("div",{className:"flex flex-col gap-1.5",children:L},F)}):b.map(([F,P])=>{const k=h.jsx(Hl,{title:F,value:P,maxValue:r,colorMap:a,inline:p,titleClassName:x,valueClassName:m,className:v}),D=u?h.jsx("button",{type:"button",onClick:()=>u(F,P),className:E,children:k}):k,T=C?.[F];return T?h.jsx(ct,{tooltip:T,triggerClassName:"flex flex-col",children:D},F):h.jsx(g.Fragment,{children:D},F)})})})},aS="#FF4E50",lS=(e,t)=>{let s=-1;return t.forEach((n,i)=>{(n.from===n.to?e>=n.from:e>n.from&&e<=n.to)&&(s=i)}),s},xf=(e,t)=>{const s=t.map(()=>0);let n=0;e.forEach(l=>{if(l<=0){n+=1;return}const c=lS(l,t);c>=0&&(s[c]+=1)});const i=Math.max(0,n,...s),o=l=>i>0?l/i:0,r={from:0,to:0,color:aS,count:n,ratio:o(n),isZeroBucket:!0},a=t.map((l,c)=>({from:l.from,to:l.to,color:l.color,count:s[c],ratio:o(s[c]),isZeroBucket:!1}));return[r,...a]},RC=e=>e<=0?2:e%2===0?e:e+1,cS=e=>{const t=RC(e);return[t,t/2,0]},tu=e=>`${Math.round(e*100)/100}`,FC=(e,t)=>e===t?tu(e):`${tu(e)}-${tu(t)}`,su=128,dS=(e,t)=>{const s=FC(e,t);return e===t?`scored ${s}`:`scored between ${s}`},yf=(e,t,s,n,i)=>h.jsxs("div",{className:"flex flex-col gap-0.5",children:[e&&h.jsx("strong",{children:e}),h.jsxs("span",{children:[t," out of ",s," ",n]}),h.jsx("span",{children:dS(i.from,i.to)})]}),uS=({title:e,values:t,colorMap:s=up,valueTitle:n="values",showCount:i,isLoading:o,className:r,compareValues:a,valueSetLabel:l,compareValueSetLabel:c})=>{const d=xf(t,s),u=a?xf(a,s):void 0,p=t.length,f=a?.length??0,m=Math.max(p,f),v=RC(m),C=cS(m),w=y=>y.map(R=>({...R,ratio:v>0?R.count/v:0})),b=w(d),x=u?w(u):void 0,S=(y,R,E,F)=>{if(y.count===0)return h.jsx("div",{className:"flex h-full flex-1 items-end","aria-hidden":"true",children:h.jsx("div",{className:"min-h-2 w-full rounded-sm",style:{height:`${y.ratio*100}%`}})});const P=F?{backgroundImage:`repeating-linear-gradient(135deg, ${y.color} 0px, ${y.color} 1px, transparent 1px, transparent 4px)`,borderColor:y.color}:{backgroundColor:y.color};return h.jsx(ct,{placement:"bottom",tooltip:R,triggerClassName:"flex h-full flex-1 items-end",children:h.jsx("div",{role:"img","aria-label":E,className:"flex min-h-2 w-full items-center justify-center rounded-sm border border-transparent",style:{height:`${y.ratio*100}%`,...P},children:i&&h.jsx("span",{className:"dial-tiny-semi-text text-primary",children:y.count})})})};return h.jsxs("div",{className:M("flex flex-col gap-2",r),children:[h.jsx("span",{className:"dial-small-text text-primary",children:e}),o?h.jsx("div",{className:"flex items-center justify-center",style:{height:su},children:h.jsx(bn,{fullWidth:!1})}):h.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-1",children:[h.jsx("div",{"data-histogram-y-axis":!0,"aria-hidden":"true",className:"relative",style:{height:su},children:C.map((y,R)=>h.jsx("span",{className:"dial-tiny-text absolute right-0 whitespace-nowrap text-secondary",style:{top:`${R/(C.length-1)*100}%`,transform:"translateY(-50%)"},children:y},y))}),h.jsxs("div",{className:"relative min-w-0",children:[C.map((y,R)=>h.jsx("div",{"data-histogram-grid":!0,className:"pointer-events-none absolute inset-x-0 border-t border-primary",style:{top:`${R/(C.length-1)*100}%`}},y)),h.jsx("div",{className:"relative flex items-end gap-1",style:{height:su},children:x?b.map((y,R)=>{const E=x[R],F=`${y.count} out of ${p} ${n}`,P=`${E.count} out of ${f} ${n}`;return h.jsxs("div",{className:"flex h-full flex-1 items-end",children:[S(y,yf(l,y.count,p,n,y),F,!0),S(E,yf(c,E.count,f,n,E),P,!1)]},R)}):b.map((y,R)=>{const E=`${y.count} out of ${p} ${n}`;return y.count===0?h.jsx("div",{className:"flex h-full flex-1 items-end","aria-hidden":"true",children:h.jsx("div",{className:"min-h-2 w-full rounded-sm",style:{height:`${y.ratio*100}%`}})},R):h.jsx(ct,{placement:"bottom",tooltip:E,triggerClassName:"flex h-full flex-1 items-end",children:h.jsx("div",{role:"img","aria-label":E,className:M("flex min-h-2 w-full items-center justify-center rounded-sm border","border-transparent"),style:{height:`${y.ratio*100}%`,backgroundColor:y.color},children:i&&y.count>0&&h.jsx("span",{className:"dial-tiny-semi-text text-primary",children:y.count})})},R)})})]}),h.jsx("div",{}),h.jsx("div",{"data-histogram-x-axis":!0,className:"flex gap-1",children:b.map((y,R)=>h.jsx("span",{className:"dial-caption-text flex-1 text-center text-secondary",children:FC(y.from,y.to)},R))})]})]})},Ws=(...e)=>e.find(t=>typeof t=="string"&&t.length>0),hn=({variant:e,appearance:t=ye.Solid,size:s=me.Standard,className:n,icon:i,tooltipProps:o,type:r="button",...a})=>{const l=M(e&&bC(e,t),s===me.Small?"h-[24px] w-[24px]":"h-[40px] w-[40px] dial-kit-enhanced-target","dial-icon-button disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus-black outline-offset-0 disabled:text-controls-secondary-disable",n),c=h.jsx("button",{...a,type:r,className:l,"aria-label":Ws(a["aria-label"],o?.tooltip),children:i});return o?h.jsx(ct,{...o,children:c}):c},hS="w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active",EC=({caption:e,onClick:t})=>{if(!e)return null;const s=h.jsx(hn,{"aria-label":e,className:hS,icon:h.jsx(z.IconInfoCircle,{size:Ne.SM}),onClick:t});return e?h.jsx(ct,{tooltip:e,triggerClassName:"flex justify-center items-center",children:s}):s},si=({label:e,required:t,className:s,caption:n,...i})=>e?h.jsxs("label",{...i,className:M("dial-tiny-text text-secondary flex items-center gap-1",s),children:[typeof e=="string"?h.jsx("span",{className:"min-h-4",children:e}):e,t&&h.jsx("span",{className:"text-accent-primary",children:"*"}),h.jsx(EC,{caption:n})]}):null;var Ye=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Loading="loading",e))(Ye||{}),Ot=(e=>(e.Toast="toast",e.SectionMessage="section-message",e))(Ot||{});const er=(e,t)=>({appearance:n,...i})=>h.jsx(hn,{...i,variant:e,appearance:n||t}),pS=(e,t)=>({variant:n,...i})=>h.jsx(hn,{...i,variant:n||t,appearance:e}),gS=er(Me.Primary,ye.Solid),fS=er(Me.Neutral,ye.Outlined),DC=er(Me.Danger,ye.Outlined),mS=er(Me.Secondary,ye.Ghost),vS=er(Me.Tertiary,ye.Ghost),CS=er(Me.Success,ye.Ghost),jc=pS(ye.Ghost,Me.Primary),zc=({size:e=40,className:t,fullWidth:s=!1,ariaLabel:n="Loading"})=>h.jsx("div",{role:"status",className:M("flex items-center justify-center",{"size-full":s},t),children:h.jsx("div",{role:"img","aria-label":n,style:{width:e,height:e},className:"rounded-full border-2 border-secondary border-t-info animate-spin-steps shrink-0"})}),wS=e=>({info:h.jsx(z.IconInfoCircleFilled,{size:e.size}),error:h.jsx(z.IconAlertCircleFilled,{size:e.size}),warning:h.jsx(z.IconAlertTriangleFilled,{size:e.size}),success:h.jsx(z.IconCircleCheckFilled,{size:e.size}),loading:h.jsx(zc,{size:e.size})}),bS={[Ye.Info]:"bg-info border-info text-info",[Ye.Success]:"bg-success border-success text-success",[Ye.Warning]:"bg-warning border-warning text-warning",[Ye.Error]:"bg-error border-error text-error",[Ye.Loading]:"bg-info border-info text-info"},xS="items-center justify-between relative gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex",PC=({variant:e=Ye.Info,title:t,message:s,className:n,iconSize:i=24,iconStroke:o=2,closable:r=!1,onClose:a,children:l,textClassName:c="flex-col",...d})=>{const u=g.useMemo(()=>wS({size:i})[e],[e,i,o]);return h.jsxs("div",{...d,role:"alert",className:M(xS,bS[e],n),children:[h.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[h.jsx(Le,{icon:u}),t?h.jsxs("div",{className:M("flex flex-col gap-1 text-primary",c),children:[h.jsx("div",{className:"dial-small-semi-text",children:t}),h.jsx("div",{className:"dial-small-text",children:s})]}):h.jsx("div",{className:"dial-small-text text-primary",children:s})]}),l,r&&h.jsx("div",{className:"relative size-[40px]",children:h.jsx(jc,{className:"absolute top-0 right-0 size-auto","aria-label":"Close notification",icon:h.jsx(z.IconX,{size:Ne.SM}),onClick:a})})]})},Sf={[Me.Primary]:{[ye.Solid]:"dial-kit-primary-solid-button",[ye.Ghost]:"dial-kit-primary-ghost-button",[ye.Link]:"dial-kit-primary-link-button"},[Me.Neutral]:{[ye.Solid]:"dial-kit-neutral-solid-button",[ye.Outlined]:"dial-kit-neutral-outlined-button"},[Me.Danger]:{[ye.Solid]:"dial-kit-danger-solid-button",[ye.Ghost]:"dial-kit-danger-ghost-button",[ye.Outlined]:"dial-kit-danger-outlined-button"},[Me.Static]:{[ye.Solid]:"dial-kit-static-solid-button"},[Me.Success]:{},[Me.Secondary]:{},[Me.Tertiary]:{}},TC=(e=Me.Primary,t=ye.Solid)=>{const s=Sf[e]?.[t];return s||(console.warn(`Could not find Button styles for variant: ${e} and appearance: ${t}. Using default primary solid button styles.`),Sf[Me.Primary][ye.Solid])},yS={[me.Small]:"size-[24px]",[me.Standard]:"size-[40px] dial-kit-enhanced-target",[me.Large]:"size-[48px] dial-kit-enhanced-target"},Da=({variant:e,appearance:t=ye.Solid,size:s=me.Standard,className:n,icon:i,tooltipProps:o,type:r="button",...a})=>{const l=M("dial-kit-base-icon-button dial-kit-base-button",e&&TC(e,t),yS[s],n),c=h.jsx("button",{...a,type:r,className:l,"aria-label":Ws(a["aria-label"],o?.tooltip),children:i});return o?h.jsx(ct,{...o,children:c}):c},kC=({caption:e,onClick:t,"aria-label":s})=>{if(!e)return null;const n=M("text-secondary hover:text-control-blue-hover active:text-control-blue-active","focus-visible:outline focus-visible:outline-focus-black");return h.jsx(Da,{"aria-label":s,className:n,icon:h.jsx(z.IconInfoCircle,{size:Ne.SM,"aria-hidden":"true"}),onClick:t,size:me.Small,tooltipProps:{tooltip:e,triggerClassName:"flex justify-center items-center"}})},ni=({label:e,required:t,className:s,caption:n,size:i=me.Small,...o})=>e?h.jsxs("span",{className:"flex items-center gap-0.5",children:[h.jsxs("label",{...o,className:M("text-secondary flex items-center gap-0.5",i===me.Small?"dial-tiny-semi-text":"dial-small-text",s),children:[typeof e=="string"?h.jsx("span",{className:"min-h-4",children:e}):e,t&&h.jsxs(h.Fragment,{children:[h.jsx("span",{"aria-hidden":"true",className:"text-error dial-tiny-text",children:"*"}),h.jsx("span",{className:"sr-only",children:"(required)"})]})]}),h.jsx(kC,{caption:n})]}):null,SS=({value:e,max:t=100,size:s=me.Standard,labelProps:n,valueLabel:i,id:o,className:r,"aria-label":a,...l})=>{const c=g.useId(),d=o??c,u=!!n?.label,p=u?n?.id??`${d}-label`:void 0,f=t>0?t:0,m=Number.isFinite(e)?e:0,v=Math.min(Math.max(m,0),f),C=f>0?v/f*100:0,w=h.jsx("div",{...l,id:d,role:"progressbar","aria-valuenow":v,"aria-valuemin":0,"aria-valuemax":f,"aria-labelledby":p,"aria-label":Ws(a,u?void 0:"Progress"),className:M("w-full overflow-hidden rounded-full bg-control-disable",s===me.Small?"h-1":"h-2",r),children:h.jsx("div",{style:{width:`${C}%`},className:"h-full rounded-full bg-control-accent transition-[width] duration-300 motion-reduce:transition-none"})});return!u&&!i?w:h.jsxs("div",{className:"flex w-full flex-col gap-1",children:[h.jsxs("div",{className:"flex items-baseline gap-2",children:[n&&h.jsx(ni,{...n,id:p}),i&&h.jsx("span",{className:"dial-tiny-text text-secondary ml-auto shrink-0",children:i})]}),w]})},RS=7,FS=2,ES=e=>e<=0?[]:Array.from({length:e},(t,s)=>s+1);var Bl=(e=>(e.Active="active",e.Adjacent="adjacent",e.Far="far",e))(Bl||{});const DS=(e,t,s)=>e===t?"active":s<RS||Math.abs(e-t)<=FS?"adjacent":"far",PS=({page:e,totalPages:t,onPageChange:s,className:n})=>{const i=ES(t);return h.jsxs("nav",{"aria-label":"Pagination",className:M("flex items-center gap-2",n),children:[h.jsx(hn,{icon:h.jsx(z.IconCaretLeftFilled,{size:Ne.SM,className:"text-secondary"}),size:me.Small,className:"!p-0 items-center flex justify-center",disabled:e<=1,onClick:()=>s(e-1),"aria-label":"Previous page"}),h.jsx("div",{className:"flex flex-row items-center gap-2",children:i.map(o=>{const r=DS(o,e,t);return h.jsx("button",{type:"button",onClick:()=>s(o),"aria-label":`Page ${o}`,"aria-current":o===e?"page":void 0,className:M("dial-pagination-dot rounded-full focus-visible:outline outline-offset-0 transition-all duration-300 ease-in-out",r===Bl.Active&&"h-[8px] w-[32px]",r===Bl.Adjacent&&"size-[8px]",r===Bl.Far&&"size-[4px]")},o)})}),h.jsx(hn,{icon:h.jsx(z.IconCaretRightFilled,{size:Ne.SM,className:"text-secondary"}),size:me.Small,className:"!p-0 items-center flex justify-center",disabled:e>=t,onClick:()=>s(e+1),"aria-label":"Next page"})]})},ah="checkbox-container",ia=({label:e,id:t,checked:s,indeterminate:n,disabled:i,ariaLabel:o,onChange:r,className:a,...l})=>{const c=g.useCallback(f=>{r?.(f.target.checked,t)},[r,t]),d=pe("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||n?"":'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded'}`,i?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",a),u=pe("border rounded",i?"bg-layer-4 border-icon-secondary":""),p=()=>n?h.jsx(z.IconMinus,{className:u,...ae}):s?h.jsx(z.IconCheck,{className:u,...ae}):null;return h.jsxs("label",{...l,className:d,htmlFor:t,"aria-description":l["aria-description"]||ah,children:[p(),e&&(typeof e=="string"?h.jsx(it,{text:e,className:"ml-2 text-primary"}):e),h.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:c,id:t,checked:s,"aria-checked":n?"mixed":s,"aria-disabled":i||void 0,"aria-label":e?void 0:o,className:"invisible size-0"})]})};var as=(e=>(e.VALID="valid",e.ERROR="error",e))(as||{});const TS=(e,t)=>{if(t===e.id)switch(e.status){case as.VALID:return"border-accent-secondary text-primary";case as.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case as.VALID:return"border-primary text-primary";case as.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},kS=(e,t)=>{if(t===e.id)switch(e.status){case as.VALID:return"bg-accent-secondary";case as.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case as.VALID:return"bg-accent-secondary";case as.ERROR:return"bg-red-400";default:return"bg-layer-4"}},IS=({step:e,index:t,currentStep:s,onChangeStep:n})=>{const i="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text cursor-pointer dial-step",o="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white",r=()=>s===e.id&&e.status===as.ERROR?h.jsx(z.IconExclamationCircle,{stroke:2,size:Ne.SM}):s!==e.id&&e.status===as.VALID?h.jsx(z.IconCheck,{stroke:2,size:Ne.SM}):t+1;return h.jsxs("button",{className:pe(i,TS(e,s)),onClick:()=>n(e.id),children:[h.jsx("span",{className:pe(o,kS(e,s)),children:r()}),h.jsx("span",{children:e.name})]})},MS=({steps:e,currentStep:t,onChangeStep:s})=>{const n=i=>{const o=e.findIndex(l=>l.id===t),r=e.findIndex(l=>l.id===i);if(i===t)return;(e.slice(0,r).every(l=>l.status===as.VALID)||r<o)&&s(i)};return h.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((i,o)=>h.jsx(IS,{currentStep:t,onChangeStep:n,step:i,index:o},i.id))})},Ei=({name:e,value:t,label:s,description:n,checked:i=!1,inputId:o,className:r,labelClassName:a,disabled:l,onChange:c,descriptionClassName:d,containerClassName:u,caption:p,oneLineCaption:f=!1})=>{const m=`${o}-desc`,v=pe("dial-small-text cursor-pointer py-[1px]",l?"text-secondary":"text-primary",a,l&&"cursor-not-allowed"),C=pe("cursor-pointer dial-input-radio",!!s&&"mr-2",r,l&&"!cursor-not-allowed"),w=pe("flex flex-col",!!n&&"mb-2",l&&"cursor-not-allowed",u),b=pe("dial-tiny-text mt-2 ml-[26px] text-secondary",d,l&&"cursor-not-allowed"),x=S=>{l||S.target.checked&&c?.(t)};return h.jsxs("div",{className:w,children:[h.jsxs("div",{className:pe("flex flex-row",(!p||f)&&"items-center"),children:[h.jsx("input",{type:"radio",id:o,name:e,value:t,checked:i,disabled:l,"aria-describedby":i&&n?m:void 0,className:C,onChange:x}),(s||p)&&h.jsxs("div",{className:pe("flex",f?"flex-1 flex-row items-center gap-2":"flex-col gap-1"),children:[s&&h.jsx("label",{className:v,htmlFor:o,"aria-describedby":p?"caption":"",children:s}),p&&h.jsx("span",{id:"caption",className:pe("dial-tiny-text text-secondary",f&&"ml-auto"),children:p})]})]}),i&&n&&h.jsx("div",{id:m,className:b,children:n})]})};var oa=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(oa||{});const AS="w-full flex gap-1",LS={[oa.Vertical]:"flex-col",[oa.Horizontal]:"flex-row items-end"},Wc=({id:e,label:t,required:s,description:n,error:i,orientation:o=oa.Vertical,labelVisuallyHidden:r=!1,className:a,labelClassName:l,errorClassName:c,childrenClassName:d,captionDescription:u,readonly:p,value:f,defaultEmptyText:m,children:v})=>{const C=`${e}-label`,w=n?`${e}-desc`:void 0,b=i?`${e}-err`:void 0,x=`${e}-caption-desc`,S=[w,b].filter(Boolean).join(" ")||void 0,y=g.useCallback(()=>typeof i=="boolean"?null:typeof i=="string"||typeof i>"u"?i?h.jsx("div",{id:b,"aria-live":"polite",className:c,children:h.jsx(Ht,{text:i})}):null:h.jsx("div",{id:b,role:"alert","aria-live":"polite",className:c,children:i}),[i,c,b]),R=g.useCallback(()=>f?typeof f=="string"||typeof f=="number"?h.jsx("span",{"aria-readonly":"true",children:f}):f:h.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:m??"None"}),[f,m]);return h.jsxs("div",{role:"group","aria-labelledby":t?C:void 0,"aria-describedby":S,className:M(AS,LS[o],"gap-3",a),children:[t&&h.jsx("div",{id:C,className:M(o==="horizontal"&&"shrink-0"),children:h.jsx(si,{htmlFor:e,label:t,required:s,className:M(r&&"sr-only",l),caption:n})}),h.jsxs("div",{className:M("min-w-0 w-full",d),children:[p?h.jsx("div",{className:"dial-input px-3 py-2",children:R()}):v,u&&h.jsx("div",{id:x,className:M({"dial-tiny-text text-secondary mt-1":!0,"text-error":!!i}),children:u}),y()]})]})};var Oi=(e=>(e.Row="Row",e.Column="Column",e))(Oi||{});const NS="flex",OS="pb-1 mt-2",HS={[Oi.Column]:"flex-col gap-y-2",[Oi.Row]:"flex-row gap-x-4"},sc=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:n,selectedLabelClassName:i,radioGroupClassName:o,inputContainerClassName:r,selectedInputContainerClassName:a,groupLabelClassName:l,formItemChildrenClassName:c,labelClassName:d,disabled:u,elementId:p,radioButtons:f,activeRadioButton:m,orientation:v,labelDescription:C,onChange:w})=>h.jsx(Wc,{id:p,label:e,labelClassName:l||d,description:C,className:s,childrenClassName:c,children:h.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":u||void 0,className:M(NS,HS[v],o),children:f.map(b=>h.jsxs("div",{className:M("flex flex-col",r,b.id===m&&a),children:[h.jsx(Ei,{name:p,value:b.id,inputId:`${p}-${b.id}`,disabled:u,className:t,labelClassName:M(d,b.id===m&&i),label:b.name,caption:b.caption,checked:b.id===m,onChange:()=>w(b.id)}),b.id===m&&b.content?h.jsx("div",{className:M(OS,n),children:b.content}):null]},b.id))})}),nu=e=>(e.toString().split(".")[1]??"").length,BS=({value:e,min:t=0,max:s=1,step:n=.1,disabled:i=!1,labelProps:o,labels:r,formatValue:a,onChange:l,className:c,trackClassName:d,fillClassName:u,thumbClassName:p,labelsClassName:f,"aria-label":m,"aria-labelledby":v,...C})=>{const w=g.useRef(null),b=Math.max(0,Math.min(100,(e-t)/(s-t)*100)),x=nu(n),S=a?a(e):e.toFixed(x),y=g.useCallback(P=>{const k=w.current;if(!k)return e;const D=k.getBoundingClientRect(),T=(P-D.left)/D.width,I=t+T*(s-t),H=nu(n),A=parseFloat((Math.round((I-t)/n)*n+t).toFixed(H));return Math.min(s,Math.max(t,A))},[t,s,n,e]),R=g.useCallback(P=>{i||(P.currentTarget.setPointerCapture(P.pointerId),l?.(y(P.clientX)))},[i,y,l]),E=g.useCallback(P=>{i||P.buttons===0||l?.(y(P.clientX))},[i,y,l]),F=g.useCallback(P=>{if(i)return;const k=nu(n),D=H=>parseFloat((Math.round((H-t)/n)*n+t).toFixed(k)),T=H=>Math.min(s,Math.max(t,H));let I=e;switch(P.key){case"ArrowRight":case"ArrowUp":I=T(D(e+n));break;case"ArrowLeft":case"ArrowDown":I=T(D(e-n));break;case"Home":I=t;break;case"End":I=s;break;default:return}P.preventDefault(),I!==e&&l?.(I)},[i,e,n,t,s,l]);return h.jsxs("div",{className:M("flex flex-col",i&&"pointer-events-none opacity-50",c),...C,children:[o&&h.jsx(si,{...o,htmlFor:C.id}),h.jsxs("div",{ref:w,className:"relative flex h-[38px] cursor-pointer items-center",onPointerDown:R,onPointerMove:E,children:[h.jsx("div",{className:M("pointer-events-none absolute inset-x-0 h-3 rounded-[10px] bg-layer-1",d)}),h.jsx("div",{className:M("pointer-events-none absolute left-0 h-3 rounded-[10px] bg-controls-accent-primary",u),style:{width:`${b}%`}}),h.jsx("div",{role:"slider",tabIndex:i?-1:0,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":s,"aria-disabled":i||void 0,"aria-label":m,"aria-labelledby":v,className:M("dial-small-text absolute -translate-x-1/2 flex size-[38px] cursor-grab select-none items-center justify-center rounded-full bg-layer-3 text-primary shadow focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-black",p),style:{left:`${b}%`},onKeyDown:F,children:S})]}),r&&h.jsx("div",{className:M("dial-tiny-text flex text-secondary",f),children:r.length===3?h.jsxs(h.Fragment,{children:[h.jsx("span",{children:r[0]}),h.jsx("span",{className:"flex-1 text-center",children:r[1]}),h.jsx("span",{children:r[2]})]}):h.jsxs(h.Fragment,{children:[h.jsx("span",{children:r[0]}),h.jsx("span",{className:"ml-auto",children:r[1]})]})})]})},tr=({icon:e,title:t,description:s,containerClassName:n,titleClassName:i,descriptionClassName:o})=>h.jsxs("div",{className:M("h-full w-full flex flex-col items-center justify-center text-secondary",n),"aria-label":"no-data-container",children:[e||h.jsx(z.IconClipboardX,{width:60,height:60,stroke:.5}),h.jsx("span",{className:M("dial-small-text mt-2 text-primary",i),"aria-label":"no-results-title",children:t}),s&&h.jsx("span",{className:M("mt-1 text-primary",o),"aria-label":"no-results-description",children:s})]}),iu=48,IC=({containerClassName:e,children:t,width:s=280,title:n,iconSize:i=24,iconStroke:o=1.5,titleClassName:r,additionalButtons:a,isOpened:l,onToggle:c})=>{const[d,u]=g.useState(s),[p,f]=g.useState(!0),m=g.useMemo(()=>typeof l=="boolean",[l]),v=m?l:p;g.useEffect(()=>{m&&u(l?s:iu)},[m,l,s]);const C=M(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",v&&"hidden",r]),w=M(["flex flex-row gap-2 cursor-pointer text-secondary py-2 items-center",v?"justify-end px-4":"justify-center"]),b=x=>{const S=!v;if(m){u(S?s:iu),c?.(S,x);return}u(S?s:iu),f(S)};return h.jsxs("div",{className:M(["rounded flex flex-col justify-between",e]),style:{width:`${d}px`},"aria-label":"collapsible-sidebar",children:[h.jsx("div",{className:M(["flex-1 p-4 min-h-0 overflow-auto",!v&&"hidden"]),children:t}),h.jsx("div",{className:C,children:n}),h.jsxs("div",{className:M("border-t border-tertiary h-12",w),children:[v&&a,h.jsx(hn,{className:"hover:text-accent-primary",onClick:b,"aria-label":"sidebar-state",size:me.Small,icon:v?h.jsx(z.IconChevronsLeft,{size:i,stroke:o}):h.jsx(z.IconChevronsRight,{size:i,stroke:o})})]})]})},GS=({label:e,text:t,tooltip:s,children:n,postfix:i,className:o})=>h.jsxs("div",{className:M("flex flex-col",n?"":"max-w-[200px]",o),children:[e&&h.jsx("label",{className:"dial-tiny-text mb-2 text-secondary",children:e}),n||h.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[h.jsx(ct,{triggerClassName:"text-primary flex-1 min-w-0",tooltip:s||t,children:t}),i||null]})]}),MC=g.createContext({dragDropManager:void 0});function ps(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Rf=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ff=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ef={INIT:"@@redux/INIT"+Ff(),REPLACE:"@@redux/REPLACE"+Ff()};function VS(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function jS(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(_S(e))return"date";if(WS(e))return"error";var s=zS(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function zS(e){return typeof e.constructor=="function"?e.constructor.name:null}function WS(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function _S(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function mo(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=jS(e)),t}function AC(e,t,s){var n;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ps(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof s>"u"&&(s=t,t=void 0),typeof s<"u"){if(typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?ps(1):"Expected the enhancer to be a function. Instead, received: '"+mo(s)+"'");return s(AC)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ps(2):"Expected the root reducer to be a function. Instead, received: '"+mo(e)+"'");var i=e,o=t,r=[],a=r,l=!1;function c(){a===r&&(a=r.slice())}function d(){if(l)throw new Error(process.env.NODE_ENV==="production"?ps(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function u(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ps(4):"Expected the listener to be a function. Instead, received: '"+mo(v)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?ps(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var C=!0;return c(),a.push(v),function(){if(C){if(l)throw new Error(process.env.NODE_ENV==="production"?ps(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");C=!1,c();var b=a.indexOf(v);a.splice(b,1),r=null}}}function p(v){if(!VS(v))throw new Error(process.env.NODE_ENV==="production"?ps(7):"Actions must be plain objects. Instead, the actual type was: '"+mo(v)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof v.type>"u")throw new Error(process.env.NODE_ENV==="production"?ps(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?ps(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,v)}finally{l=!1}for(var C=r=a,w=0;w<C.length;w++){var b=C[w];b()}return v}function f(v){if(typeof v!="function")throw new Error(process.env.NODE_ENV==="production"?ps(10):"Expected the nextReducer to be a function. Instead, received: '"+mo(v));i=v,p({type:Ef.REPLACE})}function m(){var v,C=u;return v={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?ps(11):"Expected the observer to be an object. Instead, received: '"+mo(b)+"'");function x(){b.next&&b.next(d())}x();var S=C(x);return{unsubscribe:S}}},v[Rf]=function(){return this},v}return p({type:Ef.INIT}),n={dispatch:p,subscribe:u,getState:d,replaceReducer:f},n[Rf]=m,n}function Be(e,t,...s){if(US()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=new Error(t.replace(/%s/g,function(){return s[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function US(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function $S(e,t,s){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:s||null,e)}function qS(e,t){return e.filter(s=>s!==t)}function LC(e){return typeof e=="object"}function KS(e,t){const s=new Map,n=o=>{s.set(o,s.has(o)?s.get(o)+1:1)};e.forEach(n),t.forEach(n);const i=[];return s.forEach((o,r)=>{o===1&&i.push(r)}),i}function YS(e,t){return e.filter(s=>t.indexOf(s)>-1)}const hp="dnd-core/INIT_COORDS",_c="dnd-core/BEGIN_DRAG",pp="dnd-core/PUBLISH_DRAG_SOURCE",Uc="dnd-core/HOVER",$c="dnd-core/DROP",qc="dnd-core/END_DRAG";function Df(e,t){return{type:hp,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const ZS={type:hp,payload:{clientOffset:null,sourceClientOffset:null}};function XS(e){return function(s=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:r}=n,a=e.getMonitor(),l=e.getRegistry();e.dispatch(Df(o)),QS(s,a,l);const c=t2(s,a);if(c==null){e.dispatch(ZS);return}let d=null;if(o){if(!r)throw new Error("getSourceClientOffset must be defined");JS(r),d=r(c)}e.dispatch(Df(o,d));const p=l.getSource(c).beginDrag(a,c);if(p==null)return;e2(p),l.pinSource(c);const f=l.getSourceType(c);return{type:_c,payload:{itemType:f,item:p,sourceId:c,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function QS(e,t,s){Be(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){Be(s.getSource(n),"Expected sourceIds to be registered.")})}function JS(e){Be(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function e2(e){Be(LC(e),"Item must be an object.")}function t2(e,t){let s=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){s=e[n];break}return s}function s2(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function n2(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){s2(e,i,s[i])})}return e}function i2(e){return function(s={}){const n=e.getMonitor(),i=e.getRegistry();o2(n),l2(n).forEach((r,a)=>{const l=r2(r,a,i,n),c={type:$c,payload:{dropResult:n2({},s,l)}};e.dispatch(c)})}}function o2(e){Be(e.isDragging(),"Cannot call drop while not dragging."),Be(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function r2(e,t,s,n){const i=s.getTarget(e);let o=i?i.drop(n,e):void 0;return a2(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function a2(e){Be(typeof e>"u"||LC(e),"Drop result must either be an object or undefined.")}function l2(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function c2(e){return function(){const s=e.getMonitor(),n=e.getRegistry();d2(s);const i=s.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(s,i),n.unpinSource()),{type:qc}}}function d2(e){Be(e.isDragging(),"Cannot call endDrag while not dragging.")}function lh(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function u2(e){return function(s,{clientOffset:n}={}){h2(s);const i=s.slice(0),o=e.getMonitor(),r=e.getRegistry(),a=o.getItemType();return g2(i,r,a),p2(i,o,r),f2(i,o,r),{type:Uc,payload:{targetIds:i,clientOffset:n||null}}}}function h2(e){Be(Array.isArray(e),"Expected targetIds to be an array.")}function p2(e,t,s){Be(t.isDragging(),"Cannot call hover while not dragging."),Be(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const i=e[n];Be(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=s.getTarget(i);Be(o,"Expected targetIds to be registered.")}}function g2(e,t,s){for(let n=e.length-1;n>=0;n--){const i=e[n],o=t.getTargetType(i);lh(o,s)||e.splice(n,1)}}function f2(e,t,s){e.forEach(function(n){s.getTarget(n).hover(t,n)})}function m2(e){return function(){if(e.getMonitor().isDragging())return{type:pp}}}function v2(e){return{beginDrag:XS(e),publishDragSource:m2(e),hover:u2(e),drop:i2(e),endDrag:c2(e)}}class C2{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:s}=this.store;function n(o){return(...r)=>{const a=o.apply(t,r);typeof a<"u"&&s(a)}}const i=v2(this);return Object.keys(i).reduce((o,r)=>{const a=i[r];return o[r]=n(a),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function w2(e,t){return{x:e.x+t.x,y:e.y+t.y}}function NC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function b2(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:n}=e;return!t||!s||!n?null:NC(w2(t,n),s)}function x2(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:NC(t,s)}const Wr=[],gp=[];Wr.__IS_NONE__=!0;gp.__IS_ALL__=!0;function y2(e,t){return e===Wr?!1:e===gp||typeof t>"u"?!0:YS(t,e).length>0}class S2{subscribeToStateChange(t,s={}){const{handlerIds:n}=s;Be(typeof t=="function","listener must be a function."),Be(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const r=this.store.getState(),a=r.stateId;try{a===i||a===i+1&&!y2(r.dirtyHandlerIds,n)||t()}finally{i=a}};return this.store.subscribe(o)}subscribeToOffsetChange(t){Be(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==s&&(s=i,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return Be(s,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:s.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const s=this.registry.getTarget(t);if(Be(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),i=this.getItemType();return lh(n,i)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(Be(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),i=this.getItemType();return n!==i?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:n}=s;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!lh(i,o))return!1;const r=this.getTargetIds();if(!r.length)return!1;const a=r.indexOf(t);return n?a===r.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return b2(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return x2(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const Pf=typeof global<"u"?global:self,OC=Pf.MutationObserver||Pf.WebKitMutationObserver;function HC(e){return function(){const s=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(s),clearInterval(n),e()}}}function R2(e){let t=1;const s=new OC(e),n=document.createTextNode("");return s.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const F2=typeof OC=="function"?R2:HC;class E2{enqueueTask(t){const{queue:s,requestFlush:n}=this;s.length||(n(),this.flushing=!0),s[s.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const s=this.index;if(this.index++,t[s].call(),this.index>this.capacity){for(let n=0,i=t.length-this.index;n<i;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=F2(this.flush),this.requestErrorThrow=HC(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class D2{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,s){this.onError=t,this.release=s,this.task=null}}class P2{create(t){const s=this.freeTasks,n=s.length?s.pop():new D2(this.onError,i=>s[s.length]=i);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const BC=new E2,T2=new P2(BC.registerPendingError);function k2(e){BC.enqueueTask(T2.create(e))}const fp="dnd-core/ADD_SOURCE",mp="dnd-core/ADD_TARGET",vp="dnd-core/REMOVE_SOURCE",Kc="dnd-core/REMOVE_TARGET";function I2(e){return{type:fp,payload:{sourceId:e}}}function M2(e){return{type:mp,payload:{targetId:e}}}function A2(e){return{type:vp,payload:{sourceId:e}}}function L2(e){return{type:Kc,payload:{targetId:e}}}function N2(e){Be(typeof e.canDrag=="function","Expected canDrag to be a function."),Be(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Be(typeof e.endDrag=="function","Expected endDrag to be a function.")}function O2(e){Be(typeof e.canDrop=="function","Expected canDrop to be a function."),Be(typeof e.hover=="function","Expected hover to be a function."),Be(typeof e.drop=="function","Expected beginDrag to be a function.")}function ch(e,t){if(t&&Array.isArray(e)){e.forEach(s=>ch(s,!1));return}Be(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ms;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ms||(ms={}));let H2=0;function B2(){return H2++}function G2(e){const t=B2().toString();switch(e){case ms.SOURCE:return`S${t}`;case ms.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Tf(e){switch(e[0]){case"S":return ms.SOURCE;case"T":return ms.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function kf(e,t){const s=e.entries();let n=!1;do{const{done:i,value:[,o]}=s.next();if(o===t)return!0;n=!!i}while(!n);return!1}class V2{addSource(t,s){ch(t),N2(s);const n=this.addHandler(ms.SOURCE,t,s);return this.store.dispatch(I2(n)),n}addTarget(t,s){ch(t,!0),O2(s);const n=this.addHandler(ms.TARGET,t,s);return this.store.dispatch(M2(n)),n}containsHandler(t){return kf(this.dragSources,t)||kf(this.dropTargets,t)}getSource(t,s=!1){return Be(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Be(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Be(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Be(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Tf(t)===ms.SOURCE}isTargetId(t){return Tf(t)===ms.TARGET}removeSource(t){Be(this.getSource(t),"Expected an existing source."),this.store.dispatch(A2(t)),k2(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Be(this.getTarget(t),"Expected an existing target."),this.store.dispatch(L2(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);Be(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){Be(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,n){const i=G2(t);return this.types.set(i,s),t===ms.SOURCE?this.dragSources.set(i,n):t===ms.TARGET&&this.dropTargets.set(i,n),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const j2=(e,t)=>e===t;function z2(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function W2(e,t,s=j2){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!s(e[n],t[n]))return!1;return!0}function _2(e=Wr,t){switch(t.type){case Uc:break;case fp:case mp:case Kc:case vp:return Wr;case _c:case pp:case qc:case $c:default:return gp}const{targetIds:s=[],prevTargetIds:n=[]}=t.payload,i=KS(s,n);if(!(i.length>0||!W2(s,n)))return Wr;const r=n[n.length-1],a=s[s.length-1];return r!==a&&(r&&i.push(r),a&&i.push(a)),i}function U2(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function $2(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){U2(e,i,s[i])})}return e}const If={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function q2(e=If,t){const{payload:s}=t;switch(t.type){case hp:case _c:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case Uc:return z2(e.clientOffset,s.clientOffset)?e:$2({},e,{clientOffset:s.clientOffset});case qc:case $c:return If;default:return e}}function K2(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function vo(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){K2(e,i,s[i])})}return e}const Y2={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Z2(e=Y2,t){const{payload:s}=t;switch(t.type){case _c:return vo({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case pp:return vo({},e,{isSourcePublic:!0});case Uc:return vo({},e,{targetIds:s.targetIds});case Kc:return e.targetIds.indexOf(s.targetId)===-1?e:vo({},e,{targetIds:qS(e.targetIds,s.targetId)});case $c:return vo({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case qc:return vo({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function X2(e=0,t){switch(t.type){case fp:case mp:return e+1;case vp:case Kc:return e-1;default:return e}}function Q2(e=0){return e+1}function J2(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function eR(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){J2(e,i,s[i])})}return e}function tR(e={},t){return{dirtyHandlerIds:_2(e.dirtyHandlerIds,{type:t.type,payload:eR({},t.payload,{prevTargetIds:$S(e,"dragOperation.targetIds",[])})}),dragOffset:q2(e.dragOffset,t),refCount:X2(e.refCount,t),dragOperation:Z2(e.dragOperation,t),stateId:Q2(e.stateId)}}function sR(e,t=void 0,s={},n=!1){const i=nR(n),o=new S2(i,new V2(i)),r=new C2(i,o),a=e(r,t,s);return r.receiveBackend(a),r}function nR(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return AC(tR,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function iR(e,t){if(e==null)return{};var s=oR(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function oR(e,t){if(e==null)return{};var s={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(s[i]=e[i]);return s}let Mf=0;const Gl=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var rR=g.memo(function(t){var{children:s}=t,n=iR(t,["children"]);const[i,o]=aR(n);return g.useEffect(()=>{if(o){const r=GC();return++Mf,()=>{--Mf===0&&(r[Gl]=null)}}},[]),h.jsx(MC.Provider,{value:i,children:s})});function aR(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=lR(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function lR(e,t=GC(),s,n){const i=t;return i[Gl]||(i[Gl]={dragDropManager:sR(e,t,s,n)}),i[Gl]}function GC(){return typeof global<"u"?global:window}var ou,Af;function cR(){return Af||(Af=1,ou=function e(t,s){if(t===s)return!0;if(t&&s&&typeof t=="object"&&typeof s=="object"){if(t.constructor!==s.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=s.length)return!1;for(i=n;i--!==0;)if(!e(t[i],s[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(s).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,o[i]))return!1;for(i=n;i--!==0;){var r=o[i];if(!e(t[r],s[r]))return!1}return!0}return t!==t&&s!==s}),ou}var dR=cR();const uR=ty(dR),Hi=typeof window<"u"?g.useLayoutEffect:g.useEffect;function hR(e,t,s){const[n,i]=g.useState(()=>t(e)),o=g.useCallback(()=>{const r=t(e);uR(n,r)||(i(r),s&&s())},[n,e,s]);return Hi(o),[n,o]}function pR(e,t,s){const[n,i]=hR(e,t,s);return Hi(function(){const r=e.getHandlerId();if(r!=null)return e.subscribeToStateChange(i,{handlerIds:[r]})},[e,i]),n}function VC(e,t,s){return pR(t,e||(()=>({})),()=>s.reconnect())}function jC(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),g.useMemo(()=>typeof e=="function"?e():e,s)}function gR(e){return g.useMemo(()=>e.hooks.dragSource(),[e])}function fR(e){return g.useMemo(()=>e.hooks.dragPreview(),[e])}let ru=!1,au=!1;class mR{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Be(!ru,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ru=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{ru=!1}}isDragging(){if(!this.sourceId)return!1;Be(!au,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return au=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{au=!1}}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,s){return this.internalMonitor.isOverTarget(t,s)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let lu=!1;class vR{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;Be(!lu,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return lu=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{lu=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function CR(e,t,s){const n=s.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function wR(e,t,s){const n=s.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function dh(e,t,s,n){let i;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l<o.length;l++){const c=o[l];if(!a(c))return!1;const d=e[c],u=t[c];if(i=void 0,i===!1||i===void 0&&d!==u)return!1}return!0}function uh(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function bR(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function xR(e){return(t=null,s=null)=>{if(!g.isValidElement(t)){const o=t;return e(o,s),o}const n=t;return bR(n),yR(n,s?o=>e(o,s):e)}}function zC(e){const t={};return Object.keys(e).forEach(s=>{const n=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const i=xR(n);t[s]=()=>i}}),t}function Lf(e,t){typeof e=="function"?e(t):e.current=t}function yR(e,t){const s=e.ref;return Be(typeof s!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),s?g.cloneElement(e,{ref:n=>{Lf(s,n),Lf(t,n)}}):g.cloneElement(e,{ref:t})}class SR{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,s=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return s&&this.disconnectDragSource(),this.handlerId?t?(s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),s):(this.lastConnectedDragSource=t,s):s}reconnectDragPreview(t=!1){const s=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=s,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,s,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!dh(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!dh(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=zC({dragSource:(s,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,uh(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,uh(s)?this.dragPreviewRef=s:this.dragPreviewNode=s,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class RR{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const s=this.dropTarget;if(this.handlerId){if(!s){this.lastConnectedDropTarget=s;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=s,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,s,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!dh(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=zC({dropTarget:(s,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,uh(s)?this.dropTargetRef=s:this.dropTargetNode=s,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function sr(){const{dragDropManager:e}=g.useContext(MC);return Be(e!=null,"Expected drag drop context"),e}function FR(e,t){const s=sr(),n=g.useMemo(()=>new SR(s.getBackend()),[s]);return Hi(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),Hi(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function ER(){const e=sr();return g.useMemo(()=>new mR(e),[e])}class DR{beginDrag(){const t=this.spec,s=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(s):n={},n??null}canDrag(){const t=this.spec,s=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(s):!0}isDragging(t,s){const n=this.spec,i=this.monitor,{isDragging:o}=n;return o?o(i):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,n=this.connector,{end:i}=t;i&&i(s.getItem(),s),n.reconnect()}constructor(t,s,n){this.spec=t,this.monitor=s,this.connector=n}}function PR(e,t,s){const n=g.useMemo(()=>new DR(e,t,s),[t,s]);return g.useEffect(()=>{n.spec=e},[e]),n}function TR(e){return g.useMemo(()=>{const t=e.type;return Be(t!=null,"spec.type must be defined"),t},[e])}function kR(e,t,s){const n=sr(),i=PR(e,t,s),o=TR(e);Hi(function(){if(o!=null){const[a,l]=wR(o,i,n);return t.receiveHandlerId(a),s.receiveHandlerId(a),l}},[n,t,s,i,o])}function IR(e,t){const s=jC(e,t);Be(!s.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=ER(),i=FR(s.options,s.previewOptions);return kR(s,n,i),[VC(s.collect,n,i),gR(i),fR(i)]}function MR(e){return g.useMemo(()=>e.hooks.dropTarget(),[e])}function AR(e){const t=sr(),s=g.useMemo(()=>new RR(t.getBackend()),[t]);return Hi(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function LR(){const e=sr();return g.useMemo(()=>new vR(e),[e])}function NR(e){const{accept:t}=e;return g.useMemo(()=>(Be(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class OR{canDrop(){const t=this.spec,s=this.monitor;return t.canDrop?t.canDrop(s.getItem(),s):!0}hover(){const t=this.spec,s=this.monitor;t.hover&&t.hover(s.getItem(),s)}drop(){const t=this.spec,s=this.monitor;if(t.drop)return t.drop(s.getItem(),s)}constructor(t,s){this.spec=t,this.monitor=s}}function HR(e,t){const s=g.useMemo(()=>new OR(e,t),[t]);return g.useEffect(()=>{s.spec=e},[e]),s}function BR(e,t,s){const n=sr(),i=HR(e,t),o=NR(e);Hi(function(){const[a,l]=CR(o,i,n);return t.receiveHandlerId(a),s.receiveHandlerId(a),l},[n,t,i,s,o.map(r=>r.toString()).join("|")])}function Cp(e,t){const s=jC(e,t),n=LR(),i=AR(s.options);return BR(s,n,i),[VC(s.collect,n,i),MR(i)]}const Nf="column",GR="flex items-center",VR="mr-3 cursor-move text-secondary",jR=({id:e,children:t,className:s,onFind:n,onMove:i,ariaLabel:o="Drag item"})=>{const r=g.useRef(null),a=g.useRef(null),l=typeof n=="function"?n(e):-1,[{isDragging:c},d,u]=IR(()=>({type:Nf,item:{id:e,originalIndex:l},collect:f=>{const m=f.getItem();return{isDragging:f.isDragging()&&m?.id===e}},end:(f,m)=>{if(!f)return;!m.didDrop()&&typeof i=="function"&&f.originalIndex>-1&&i(f.id,f.originalIndex)}}),[e,l,i]),[,p]=Cp(()=>({accept:Nf,hover:f=>{if(!(!f||f.id===e)&&typeof n=="function"&&typeof i=="function"){const m=n(e);i(f.id,m)}}}),[n,i,e]);return u(p(a)),d(r),h.jsxs("div",{ref:a,className:M(GR,s),style:{opacity:c?0:1},"aria-roledescription":"Draggable item",children:[h.jsx("div",{ref:r,className:VR,"aria-label":o,children:h.jsx(z.IconGripVertical,{...ae})}),t]})},zR=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M3.68628 10.3945C3.91003 10.408 4.10927 10.4422 4.2832 10.4978L4.28394 10.4971C4.5167 10.5698 4.71621 10.6662 4.87939 10.7871C4.9994 10.876 5.10332 10.974 5.18994 11.0815L5.27051 11.1929L5.27197 11.1943L5.34009 11.3079C5.38301 11.3838 5.42067 11.4597 5.45288 11.5356L5.49683 11.6492L5.49756 11.6514L5.53198 11.7649C5.56274 11.877 5.5838 11.9867 5.59497 12.0938C5.61194 12.23 5.62059 12.3501 5.62061 12.4534C5.62061 12.6166 5.57231 12.7639 5.47559 12.8906C5.41544 12.9694 5.325 13.0198 5.21997 13.0503C5.11455 13.0809 4.98537 13.0942 4.83691 13.0942C4.73711 13.0942 4.62608 13.0838 4.50439 13.0635C4.37577 13.0415 4.26002 12.9966 4.16089 12.9272L4.15869 12.9258C4.04118 12.8396 3.98657 12.7121 3.98657 12.5625C3.98655 12.2721 3.94576 12.0552 3.87231 11.9033L3.87158 11.9011C3.81572 11.7798 3.69406 11.7026 3.45337 11.7026C3.33114 11.7027 3.25307 11.7292 3.20435 11.7671C3.14221 11.8149 3.10061 11.864 3.07617 11.9128C3.04149 11.985 3.02355 12.0599 3.02124 12.1384V14.7905L3.02637 14.8652C3.03466 14.9384 3.05266 15.0073 3.07983 15.0725L3.10254 15.1201C3.12874 15.1672 3.16488 15.2124 3.21167 15.2556C3.2602 15.2978 3.33572 15.3259 3.45337 15.3259C3.56813 15.3259 3.65533 15.3041 3.71997 15.2673C3.78314 15.2313 3.83208 15.1772 3.86646 15.0996C3.94535 14.9186 3.98655 14.7002 3.98657 14.4412C3.98657 14.3004 4.04381 14.1839 4.1499 14.0991L4.19824 14.0647C4.33673 13.9762 4.55866 13.9431 4.83691 13.9431C5.09384 13.9431 5.30559 13.9858 5.43604 14.1013C5.55182 14.204 5.62061 14.3293 5.62061 14.4749C5.62057 14.7549 5.57953 15.0125 5.49536 15.2461L5.45654 15.3442C5.36294 15.5677 5.23261 15.7627 5.06543 15.928L4.99146 15.9968C4.58057 16.3629 4.03856 16.541 3.37793 16.541L3.12671 16.5278C3.00679 16.5188 2.87303 16.495 2.72607 16.4575C2.61505 16.4287 2.50136 16.3894 2.38696 16.3396L2.27197 16.2861C2.1155 16.2094 1.9705 16.0983 1.83691 15.9558L1.83618 15.9551C1.70598 15.8128 1.59909 15.6391 1.51392 15.4365L1.51318 15.4351C1.42797 15.2251 1.38722 14.9736 1.38721 14.6843V12.345C1.38721 12.1069 1.41644 11.892 1.47656 11.7026C1.52068 11.5616 1.57629 11.4337 1.64355 11.3196L1.7146 11.2097C1.81013 11.07 1.92167 10.9524 2.04932 10.8582C2.17206 10.7676 2.29884 10.6909 2.42871 10.6289L2.54297 10.5798C2.81231 10.4716 3.11394 10.4081 3.44678 10.3879L3.45337 10.3872L3.68628 10.3945Z",fill:"currentColor"}),Ie.createElement("path",{d:"M8.10791 11.7371C8.33261 11.7371 8.5218 11.8023 8.61255 11.9758C8.68772 12.1131 8.72383 12.2741 8.72388 12.4534V12.7522H9.03003C9.21461 12.7522 9.37781 12.7845 9.5127 12.8562C9.68704 12.9456 9.7463 13.149 9.74634 13.3843C9.74634 13.612 9.68105 13.8034 9.50537 13.894L9.5061 13.8948C9.36923 13.9665 9.20861 14.0002 9.03003 14.0002H8.72388V14.3064C8.72388 14.4941 8.68994 14.6588 8.61768 14.7942L8.61841 14.7949C8.5293 14.9647 8.334 15.0226 8.10791 15.0227C7.87257 15.0227 7.66761 14.9685 7.5769 14.8L7.57617 14.7993C7.50612 14.6659 7.47583 14.4988 7.47583 14.3064V14.0002H7.18579C6.99507 14.0002 6.82804 13.9669 6.69214 13.894C6.52182 13.8026 6.46069 13.6102 6.46069 13.3843C6.46073 13.1491 6.51509 12.944 6.68335 12.8533L6.68481 12.8525L6.79102 12.8079C6.90305 12.7697 7.03293 12.7522 7.177 12.7522H7.47583V12.4534C7.47587 12.2683 7.50712 12.1056 7.57617 11.9707L7.5769 11.9685L7.61646 11.9092C7.72038 11.7825 7.90134 11.7371 8.10791 11.7371Z",fill:"currentColor"}),Ie.createElement("path",{d:"M12.728 11.7371C12.9527 11.7371 13.1419 11.8023 13.2327 11.9758C13.3078 12.1131 13.3439 12.2741 13.344 12.4534V12.7522H13.6501C13.8347 12.7522 13.9979 12.7845 14.1328 12.8562C14.3072 12.9456 14.3664 13.149 14.3665 13.3843C14.3665 13.612 14.3012 13.8034 14.1255 13.894L14.1262 13.8948C13.9894 13.9665 13.8287 14.0002 13.6501 14.0002H13.344V14.3064C13.344 14.4941 13.3101 14.6588 13.2378 14.7942L13.2385 14.7949C13.1494 14.9647 12.9541 15.0226 12.728 15.0227C12.4927 15.0227 12.2877 14.9685 12.197 14.8L12.1963 14.7993C12.1262 14.6659 12.0959 14.4988 12.0959 14.3064V14.0002H11.8059C11.6152 14.0002 11.4482 13.9669 11.3123 13.894C11.1419 13.8026 11.0808 13.6102 11.0808 13.3843C11.0808 13.1491 11.1352 12.944 11.3035 12.8533L11.3049 12.8525L11.4111 12.8079C11.5232 12.7697 11.653 12.7522 11.7971 12.7522H12.0959V12.4534C12.096 12.2683 12.1272 12.1056 12.1963 11.9707L12.197 11.9685L12.2366 11.9092C12.3405 11.7825 12.5215 11.7371 12.728 11.7371Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),WR=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M4.29639 10.3945C4.50665 10.4083 4.69413 10.4433 4.85815 10.5L4.85889 10.4993C5.07789 10.5733 5.26574 10.6715 5.41919 10.7944C5.53204 10.8849 5.62958 10.9843 5.71069 11.0933L5.78613 11.2053L5.78687 11.2068L5.85059 11.3218C5.89058 11.3983 5.92606 11.4746 5.95605 11.551L5.99707 11.666L5.9978 11.6682L6.05566 11.8945C6.0708 11.9689 6.08168 12.0422 6.08862 12.1143C6.10449 12.252 6.11279 12.3734 6.11279 12.4775C6.11276 12.6403 6.06824 12.7876 5.97803 12.9155C5.92155 12.9956 5.83545 13.0472 5.73486 13.0789C5.63441 13.1104 5.51212 13.1243 5.37231 13.1243C5.32505 13.1243 5.27524 13.1215 5.2229 13.1162L5.05811 13.0928C4.93553 13.0701 4.82533 13.024 4.73145 12.9529L4.72998 12.9514C4.61882 12.8632 4.56958 12.7352 4.56958 12.5874C4.56955 12.2926 4.5312 12.0715 4.46191 11.9165L4.46045 11.9143C4.4319 11.8474 4.38931 11.8003 4.33154 11.7686C4.27185 11.7358 4.18944 11.7158 4.07812 11.7158C3.96626 11.7158 3.89622 11.7421 3.85254 11.7788C3.79519 11.8265 3.75637 11.8759 3.73315 11.926C3.70026 11.9999 3.68262 12.0771 3.68042 12.1582V14.8425L3.68555 14.9187C3.69337 14.9937 3.71038 15.0643 3.73608 15.1311L3.75732 15.1802C3.78176 15.2276 3.81496 15.2727 3.85767 15.3157L3.89575 15.3442C3.93843 15.3699 3.99697 15.386 4.07812 15.386C4.18296 15.386 4.26146 15.3647 4.31982 15.3289C4.37727 15.2935 4.4233 15.2389 4.45605 15.1589C4.53037 14.9746 4.56957 14.7522 4.56958 14.4888C4.56958 14.3307 4.63662 14.2007 4.7666 14.1116L4.82007 14.0801C4.95284 14.0119 5.14337 13.9856 5.37231 13.9856C5.61445 13.9856 5.81633 14.0298 5.94067 14.1489C6.04986 14.2536 6.11274 14.379 6.11279 14.5225C6.11279 14.8453 6.06245 15.1386 5.95972 15.3999C5.85998 15.6574 5.71501 15.8781 5.52466 16.0598L5.52393 16.0591C5.13817 16.4307 4.62871 16.6128 4.00708 16.6128C3.95774 16.6128 3.87811 16.6081 3.77124 16.5996C3.65793 16.5904 3.53127 16.5659 3.39331 16.5278C3.28866 16.4984 3.18149 16.4584 3.07397 16.4077L2.96631 16.3535C2.81858 16.2752 2.68196 16.1624 2.55688 16.0181L2.55615 16.0166C2.43435 15.8725 2.33453 15.6972 2.25513 15.4929L2.25439 15.4915C2.17508 15.28 2.13721 15.0267 2.13721 14.7349V12.3669C2.13721 12.1269 2.16476 11.9109 2.2207 11.7202L2.26538 11.5825C2.3136 11.4491 2.37234 11.3289 2.44263 11.2229C2.53187 11.0816 2.63607 10.9621 2.7561 10.8662C2.87117 10.7743 2.98996 10.6964 3.11206 10.6333L3.11353 10.6326L3.22046 10.5828C3.47384 10.4727 3.75793 10.4085 4.0708 10.3879L4.07812 10.3872L4.29639 10.3945Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H8.625C8.21079 16.5 7.875 16.1642 7.875 15.75C7.875 15.3358 8.21079 15 8.625 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),_R=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M3.62109 10.571C3.83849 10.5842 4.03206 10.618 4.20117 10.6721L4.2019 10.6714C4.42776 10.742 4.62121 10.8352 4.77979 10.9526C4.89663 11.0392 4.99793 11.135 5.08228 11.2397L5.16064 11.3474L5.16211 11.3489L5.22803 11.4595C5.26973 11.5332 5.30659 11.6069 5.33789 11.6807L5.38037 11.7905L5.3811 11.7935L5.44116 12.0117C5.45675 12.0826 5.46834 12.1524 5.47559 12.2212L5.49463 12.4087C5.49888 12.4674 5.50049 12.5222 5.50049 12.5728C5.50045 12.7317 5.45415 12.8755 5.35986 12.999C5.30088 13.0762 5.2117 13.1246 5.10938 13.1543C5.0067 13.1841 4.88146 13.1975 4.7373 13.1975C4.64029 13.1975 4.53244 13.1872 4.41431 13.1675C4.28898 13.1461 4.17557 13.1026 4.07886 13.0349L4.07739 13.0334C3.96236 12.9491 3.90894 12.8243 3.90894 12.6782C3.90893 12.3968 3.86925 12.187 3.79834 12.0403L3.79761 12.0381C3.74418 11.922 3.62816 11.847 3.39551 11.8469C3.27715 11.8469 3.20179 11.873 3.15527 11.9092C3.09597 11.9548 3.05572 12.0012 3.03223 12.0476L3.03296 12.0483C2.99919 12.1182 2.98102 12.1906 2.97876 12.2666V14.8396L2.98389 14.9114C2.99188 14.9821 3.00888 15.049 3.03516 15.1121L3.05786 15.1582C3.08304 15.2033 3.11768 15.2464 3.1626 15.2878C3.2089 15.3285 3.28115 15.356 3.39551 15.356C3.50633 15.3559 3.58982 15.3349 3.65186 15.2996C3.71249 15.2651 3.75936 15.2131 3.79248 15.1384L3.84302 15.0007C3.88665 14.8554 3.90893 14.6891 3.90894 14.5005C3.90894 14.363 3.96502 14.2494 4.0686 14.1665L4.11621 14.1328C4.25147 14.0465 4.46739 14.0134 4.7373 14.0134C4.98658 14.0134 5.19278 14.0552 5.32031 14.168C5.43323 14.268 5.5004 14.3903 5.50049 14.5327C5.50049 14.8049 5.46077 15.0556 5.37891 15.2827L5.34155 15.3779C5.23762 15.6261 5.08621 15.8373 4.88892 16.0115L4.88965 16.0122C4.49029 16.3681 3.96383 16.541 3.32227 16.541C3.27168 16.541 3.18935 16.5367 3.07837 16.5286C3.02014 16.5242 2.95789 16.5158 2.89307 16.5044L2.68799 16.4597C2.5801 16.4317 2.47025 16.3938 2.35913 16.3455L2.2478 16.2935C2.09553 16.2188 1.95433 16.1112 1.82446 15.9727L1.82373 15.9712C1.69712 15.8328 1.593 15.6642 1.51025 15.4673L1.50952 15.4658C1.42669 15.2616 1.38721 15.0172 1.38721 14.7363V12.4666C1.38723 12.2355 1.41597 12.0273 1.47437 11.8433C1.53119 11.6615 1.60684 11.502 1.70361 11.3665L1.77686 11.2676C1.85263 11.1732 1.9374 11.0913 2.03101 11.0222C2.15024 10.9342 2.27322 10.8598 2.39941 10.7996L2.40015 10.7988L2.51074 10.7512C2.77229 10.6462 3.0652 10.5848 3.38818 10.5652L3.39551 10.5645L3.62109 10.571Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36914 11.28C9.50263 11.28 9.62352 11.3063 9.72583 11.3643L9.7251 11.365C9.85906 11.4379 9.90454 11.5838 9.90454 11.7429C9.9045 11.7567 9.90157 11.7778 9.89941 11.7935C9.89658 11.814 9.89242 11.8422 9.88696 11.8777C9.87611 11.9455 9.8639 12.0222 9.85034 12.1062C9.84553 12.136 9.84018 12.1643 9.83569 12.1912H10.0525C10.1919 12.1912 10.3171 12.2148 10.4216 12.2688L10.4209 12.2695C10.5686 12.3412 10.6128 12.5089 10.6128 12.6863C10.6128 12.8587 10.5617 13.0123 10.4194 13.0898L10.4187 13.0906C10.3122 13.1472 10.1885 13.1726 10.0525 13.1726H9.67529L9.55225 13.8589H9.75952C9.89706 13.8589 10.0206 13.8819 10.1243 13.9343C10.2748 14.005 10.3198 14.1752 10.3198 14.354C10.3198 14.5291 10.2702 14.6875 10.1243 14.7627L10.1235 14.7634C10.0176 14.8164 9.89461 14.8403 9.75952 14.8403H9.38452L9.33398 15.1677L9.33325 15.1714C9.30492 15.3271 9.26297 15.4669 9.20728 15.5903L9.20801 15.5911C9.17656 15.6626 9.13001 15.7228 9.06592 15.7646C9.00162 15.8065 8.92683 15.8247 8.84839 15.8247C8.72 15.8247 8.60307 15.8041 8.50122 15.7581L8.49976 15.7573C8.35755 15.6908 8.31299 15.5386 8.31299 15.3787C8.31299 15.3406 8.31787 15.2939 8.32617 15.241L8.35913 15.0242C8.36863 14.9624 8.37948 14.9012 8.38989 14.8403H7.92847L7.87793 15.1677L7.8772 15.1714C7.84887 15.3271 7.80691 15.4669 7.75122 15.5903L7.75195 15.5911C7.72046 15.6627 7.6734 15.7228 7.60913 15.7646C7.54487 15.8064 7.47071 15.8247 7.39233 15.8247C7.26394 15.8247 7.14702 15.8041 7.04517 15.7581L7.0437 15.7573C6.90149 15.6908 6.85693 15.5387 6.85693 15.3787C6.85694 15.3406 6.86181 15.2939 6.87012 15.241L6.90308 15.0242C6.91257 14.9624 6.92342 14.9012 6.93384 14.8403H6.6687C6.52906 14.8403 6.40313 14.8167 6.29663 14.7634L6.29297 14.762C6.15355 14.6853 6.10844 14.5261 6.1084 14.354C6.1084 14.1782 6.1487 14.0079 6.29297 13.9358C6.39784 13.882 6.52535 13.8589 6.6687 13.8589H7.09497L7.21802 13.1726H6.95361C6.81311 13.1726 6.68646 13.1475 6.57935 13.0906L6.57788 13.0898C6.43874 13.0135 6.39332 12.8568 6.39331 12.6863C6.39331 12.5105 6.43361 12.3402 6.57788 12.2681C6.68271 12.2144 6.81036 12.1912 6.95361 12.1912H7.38721L7.46045 11.7561C7.47174 11.6625 7.50842 11.5673 7.56372 11.4712C7.63824 11.3418 7.76255 11.2801 7.91309 11.28C8.04657 11.28 8.16746 11.3063 8.26978 11.3643L8.26904 11.365C8.403 11.4379 8.44849 11.5838 8.44849 11.7429C8.44844 11.7567 8.44552 11.7778 8.44336 11.7935C8.44053 11.814 8.43636 11.8422 8.43091 11.8777C8.42006 11.9455 8.40784 12.0222 8.39429 12.1062C8.38947 12.136 8.38413 12.1643 8.37964 12.1912H8.84326L8.9165 11.7561C8.92779 11.6625 8.96448 11.5673 9.01978 11.4712C9.0943 11.3418 9.21861 11.2801 9.36914 11.28ZM8.09619 13.8589H8.55103L8.67407 13.1726H8.21924L8.09619 13.8589Z",fill:"currentColor"})),UR=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M4.43188 10.4409C4.65285 10.4409 4.85471 10.4869 4.99951 10.6152L4.99878 10.6159C5.13097 10.7305 5.21409 10.881 5.25146 11.0576C5.28474 11.2148 5.30052 11.3869 5.30054 11.5724V15.4323C5.30054 15.6193 5.28417 15.7927 5.25146 15.9516L5.2522 15.9523C5.21779 16.1313 5.13551 16.2842 4.99951 16.3976L4.99878 16.3969C4.85386 16.52 4.65269 16.5646 4.43188 16.5646C4.21337 16.5646 4.01411 16.5195 3.86792 16.3976L3.86353 16.394C3.73466 16.2798 3.65263 16.1299 3.6123 15.9553L3.61157 15.9516C3.57826 15.7941 3.5625 15.6205 3.5625 15.4323V11.5724C3.56252 11.3869 3.5783 11.2148 3.61157 11.0576C3.64882 10.8815 3.72996 10.7302 3.85986 10.6152L3.86133 10.6137C4.00804 10.4875 4.2103 10.4409 4.43188 10.4409Z",fill:"currentColor"}),Ie.createElement("path",{d:"M8.07129 10.4474C8.18434 10.4599 8.28945 10.4924 8.3811 10.55L8.38184 10.5493C8.45754 10.5942 8.52569 10.6451 8.58472 10.7016L8.64111 10.7602L8.64331 10.7631L8.69385 10.8298C8.72596 10.8768 8.75504 10.9284 8.78101 10.9836L8.81763 11.0685L8.81909 11.0729L9.85986 13.8928V11.2692C9.85986 11.0565 9.89522 10.8654 9.98291 10.7119L9.98364 10.7104L10.0349 10.6393C10.1656 10.4886 10.3781 10.4409 10.5974 10.4409C10.8635 10.4409 11.125 10.4947 11.2529 10.6965C11.3535 10.8508 11.3928 11.0487 11.3928 11.2692V15.4323C11.3928 15.6163 11.3809 15.7863 11.3577 15.9413L11.3584 15.9421C11.3349 16.1167 11.2678 16.2708 11.1467 16.3881C11.0102 16.5202 10.8106 16.5646 10.5974 16.5646H10.0554C9.86994 16.5646 9.69972 16.5199 9.56104 16.416C9.44129 16.3261 9.3452 16.215 9.27466 16.0842C9.21353 15.9706 9.16292 15.8593 9.12378 15.7509L8.14893 13.1091V15.7363C8.14893 15.9493 8.11322 16.1406 8.02661 16.2958L8.02588 16.2973C7.90706 16.5052 7.66112 16.5646 7.41138 16.5646C7.14233 16.5646 6.88122 16.5106 6.75 16.312C6.64812 16.1572 6.60791 15.9581 6.60791 15.7363V11.5724C6.60792 11.3882 6.61818 11.2193 6.63867 11.0671V11.0641L6.66724 10.9367C6.7042 10.8142 6.76699 10.706 6.85986 10.6188C6.9982 10.4862 7.19704 10.4409 7.41138 10.4409H7.95337L8.07129 10.4474Z",fill:"currentColor"}),Ie.createElement("path",{d:"M13.5688 10.4409C13.7898 10.4409 13.9917 10.4869 14.1365 10.6152L14.1357 10.6159C14.2679 10.7305 14.3511 10.881 14.3884 11.0576C14.4217 11.2148 14.4375 11.3869 14.4375 11.5724V15.4323C14.4375 15.6193 14.4211 15.7927 14.3884 15.9516L14.3892 15.9523C14.3548 16.1313 14.2725 16.2842 14.1365 16.3976L14.1357 16.3969C13.9908 16.52 13.7897 16.5646 13.5688 16.5646C13.3503 16.5646 13.1511 16.5195 13.0049 16.3976L13.0005 16.394C12.8716 16.2798 12.7896 16.1299 12.7493 15.9553L12.7485 15.9516C12.7152 15.7941 12.6995 15.6205 12.6995 15.4323V11.5724C12.6995 11.3869 12.7153 11.2148 12.7485 11.0576C12.7858 10.8815 12.8669 10.7302 12.9968 10.6152L12.9983 10.6137C13.145 10.4875 13.3473 10.4409 13.5688 10.4409Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50385C10.7457 1.52087 10.9072 1.59681 11.0303 1.71991L14.7803 5.46991C14.9208 5.61054 15 5.80136 15 6.00018V9.00018C14.9998 9.41423 14.6641 9.75018 14.25 9.75018C13.8359 9.75018 13.5002 9.41423 13.5 9.00018V6.75018H11.25C10.8523 6.75018 10.4707 6.59192 10.1895 6.31073C9.90824 6.02951 9.7501 5.64788 9.75 5.25018V3.00018H5.25C5.05109 3.00018 4.86038 3.07926 4.71973 3.21991C4.57919 3.36054 4.5 3.55136 4.5 3.75018V9.00018C4.4998 9.41423 4.16409 9.75018 3.75 9.75018C3.33591 9.75018 3.0002 9.41423 3 9.00018V3.75018C3 3.15353 3.23734 2.5813 3.65918 2.15936C4.08114 1.73741 4.65326 1.50018 5.25 1.50018H10.5L10.574 1.50385ZM11.25 5.25018H12.4395L11.25 4.06073V5.25018Z",fill:"currentColor"})),$R=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M6.76831 10.8267C6.93291 10.8267 7.08404 10.8408 7.22021 10.8691L7.35205 10.9021L7.35278 10.9028L7.46851 10.9431C7.57872 10.986 7.67614 11.038 7.75928 11.0991C7.84245 11.1591 7.91481 11.2265 7.97388 11.3005L8.02881 11.3767L8.02954 11.3774L8.11011 11.5254C8.13317 11.5747 8.15233 11.6249 8.16797 11.6755C8.19815 11.7711 8.21863 11.8631 8.22656 11.9502C8.23376 12.0294 8.23755 12.096 8.23755 12.1479C8.23753 12.318 8.17338 12.4626 8.04639 12.572C7.92503 12.676 7.77653 12.7265 7.60913 12.7266C7.4711 12.7266 7.34146 12.6749 7.22241 12.583C7.1027 12.4905 7.02328 12.3741 7.02319 12.2329C7.02319 12.0468 6.98759 11.9498 6.94775 11.907L6.94629 11.9055C6.90561 11.8606 6.83878 11.8294 6.72583 11.8293C6.58234 11.8293 6.48534 11.856 6.42334 11.896C6.4086 11.9056 6.38747 11.9281 6.37061 11.981C6.35372 12.0341 6.34351 12.1099 6.34351 12.2117C6.34581 12.2878 6.36799 12.3546 6.40869 12.4153C6.45761 12.4821 6.52298 12.549 6.60718 12.6138L6.73608 12.7053C6.78632 12.7386 6.84449 12.7751 6.9104 12.8145C7.04454 12.8945 7.16167 12.9644 7.2605 13.0232L7.44507 13.1426C7.50565 13.1844 7.56597 13.2284 7.62524 13.2744C7.74715 13.3666 7.8562 13.4715 7.95337 13.5886C8.05276 13.7085 8.13297 13.8432 8.1936 13.9922C8.25599 14.1456 8.28891 14.3172 8.29395 14.5049V14.5364C8.29395 14.7339 8.26896 14.9141 8.21777 15.0754V15.0776C8.11696 15.3776 7.94914 15.6082 7.7124 15.761L7.71313 15.7617C7.62701 15.8179 7.53944 15.8644 7.45166 15.9016L7.36304 15.936C7.30225 15.9571 7.24075 15.9753 7.1792 15.9902L6.99243 16.0261C6.87331 16.0431 6.75886 16.0529 6.65039 16.0554H6.61304C6.41017 16.0554 6.22414 16.0345 6.05786 15.9917C5.89914 15.9495 5.75823 15.8922 5.63892 15.8196L5.63745 15.8188C5.52025 15.7449 5.42093 15.6589 5.34155 15.561C5.26338 15.4674 5.20001 15.3681 5.15332 15.2644C5.10802 15.1659 5.07431 15.0659 5.05371 14.9656C5.03361 14.8676 5.02297 14.7738 5.02295 14.6851C5.02295 14.5014 5.0798 14.3447 5.20898 14.2375L5.20972 14.2368L5.30493 14.1731C5.40409 14.1186 5.51594 14.0918 5.63745 14.0918C5.79553 14.0919 5.94175 14.1407 6.07251 14.2354L6.12451 14.2764C6.2216 14.3622 6.27861 14.4745 6.2959 14.6067L6.30103 14.6741L6.31055 14.7847C6.32502 14.8796 6.35383 14.9312 6.38306 14.9568C6.43071 14.9963 6.50789 15.0238 6.63135 15.0242C6.76743 15.0198 6.85874 14.9863 6.91772 14.9355L6.91846 14.9341L6.95361 14.8938C6.98575 14.8434 7.00924 14.7604 7.00928 14.6287C7.00928 14.4903 6.96843 14.3706 6.8877 14.2661L6.88696 14.2646C6.80068 14.1504 6.68858 14.0439 6.55078 13.946L6.55005 13.9453C6.40626 13.841 6.25592 13.7396 6.10034 13.6421C5.93262 13.5343 5.77326 13.4207 5.62427 13.303L5.62354 13.3022C5.46846 13.1772 5.34021 13.0351 5.24121 12.8752C5.13746 12.7076 5.0852 12.514 5.08008 12.2988V12.2388L5.0874 12.0505C5.10126 11.869 5.13388 11.7086 5.18628 11.5708V11.5693L5.2478 11.4382C5.31532 11.3136 5.40255 11.2077 5.51074 11.1233L5.62207 11.0464C5.73813 10.9764 5.87099 10.9263 6.01831 10.894C6.21201 10.8494 6.43196 10.8267 6.67603 10.8267H6.76831Z",fill:"currentColor"}),Ie.createElement("path",{d:"M14.2266 10.8062C14.3565 10.8062 14.4736 10.8329 14.5693 10.8933L14.5701 10.8926L14.5715 10.894L14.5737 10.8948L14.573 10.8955C14.6342 10.9321 14.6895 10.9722 14.7363 11.0171L14.781 11.064L14.7825 11.0662L14.8235 11.1204C14.8363 11.1392 14.8492 11.159 14.8608 11.1797L14.9246 11.3159L14.9253 11.3181L15.9163 14.0024V11.4705C15.9163 11.2922 15.9461 11.1369 16.0159 11.0149L16.054 10.9607C16.1527 10.8467 16.3175 10.8062 16.5022 10.8062C16.7284 10.8062 16.9271 10.8532 17.0229 11.0017C17.1032 11.1237 17.1379 11.2847 17.1379 11.4705V15.0535C17.1379 15.21 17.1275 15.3541 17.1079 15.4849L17.1086 15.4856C17.0896 15.6273 17.0355 15.7491 16.9409 15.8408C16.837 15.9414 16.6806 15.9784 16.5022 15.9785H16.0356C15.8837 15.9785 15.7483 15.9422 15.6394 15.8606C15.5419 15.7874 15.4638 15.6974 15.4065 15.5911C15.3549 15.4953 15.3125 15.4018 15.2798 15.3113L14.3459 12.7815V15.3149C14.3459 15.4932 14.316 15.6489 14.2471 15.7727L14.2463 15.7734C14.158 15.9281 13.9711 15.9784 13.76 15.9785C13.53 15.9785 13.3292 15.9315 13.2312 15.783C13.151 15.6609 13.1169 15.5006 13.1169 15.3149V11.7319C13.117 11.575 13.126 11.4319 13.1433 11.3035V11.3013L13.166 11.1987C13.1955 11.1009 13.2454 11.0157 13.3176 10.9475L13.3594 10.9124C13.4627 10.8363 13.6027 10.8062 13.76 10.8062H14.2266Z",fill:"currentColor"}),Ie.createElement("path",{d:"M3.62183 10.73C3.8058 10.73 3.96571 10.7696 4.07959 10.8677C4.185 10.9586 4.25306 11.0796 4.28613 11.2229C4.31675 11.3557 4.33154 11.5018 4.33154 11.6602V14.3606C4.33154 14.617 4.29481 14.8413 4.21655 15.0293C4.15993 15.1652 4.09098 15.286 4.00928 15.3896L3.92285 15.4878C3.80762 15.6056 3.67869 15.6971 3.5376 15.7625L3.53833 15.7632C3.40115 15.8269 3.27011 15.872 3.14722 15.8979L3.14795 15.8987C3.09669 15.9112 3.04501 15.9213 2.99414 15.9294L2.8418 15.9478C2.74998 15.9548 2.68156 15.9587 2.64111 15.9587C2.3706 15.9587 2.13396 15.928 1.93506 15.8643C1.73937 15.8022 1.56914 15.7204 1.42749 15.6174C1.28776 15.5158 1.17335 15.3984 1.08691 15.2651L1.02686 15.1685C0.970789 15.0715 0.926873 14.9732 0.895752 14.874L0.896484 14.8733C0.852315 14.745 0.821564 14.6203 0.806396 14.499L0.805664 14.4968C0.793555 14.3806 0.786621 14.2779 0.786621 14.1899C0.786659 14.0481 0.829716 13.9196 0.914062 13.8091C0.968035 13.7386 1.04873 13.6949 1.13965 13.6685C1.231 13.642 1.34202 13.6297 1.46851 13.6296C1.55651 13.6297 1.65224 13.6393 1.75415 13.6567C1.8653 13.6758 1.96539 13.7157 2.05151 13.7783C2.15785 13.853 2.20677 13.9666 2.20679 14.0977C2.20679 14.3421 2.24112 14.5246 2.302 14.6528L2.32178 14.6865C2.37332 14.7613 2.46833 14.8095 2.64111 14.8096C2.74386 14.8095 2.80532 14.7883 2.8396 14.762L2.84106 14.7605L2.90552 14.7019C2.92253 14.6822 2.9356 14.6623 2.94507 14.6426L2.97803 14.5518C2.98565 14.5209 2.98953 14.4889 2.99048 14.4565V11.9641H2.17236C2.0293 11.9641 1.8922 11.9536 1.76221 11.9312L1.76001 11.9304C1.62252 11.9035 1.50268 11.8482 1.40698 11.7612L1.40625 11.7598C1.30008 11.6602 1.25688 11.5177 1.25684 11.3547C1.25684 11.1882 1.29936 11.0419 1.40625 10.9417C1.49986 10.8517 1.6187 10.7951 1.75635 10.7681L1.9585 10.7395C2.02775 10.7333 2.09935 10.73 2.17236 10.73H3.62183Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0061 10.8398C11.1058 10.8474 11.2146 10.8676 11.3313 10.8984L11.332 10.8977C11.4562 10.9275 11.5817 10.9747 11.7078 11.0376L11.803 11.0896C11.8653 11.1277 11.926 11.1727 11.9839 11.2244L12.0688 11.3071L12.0696 11.3079L12.1472 11.4001C12.2197 11.4965 12.2807 11.608 12.3303 11.7327L12.3772 11.8674C12.417 12.0081 12.4358 12.1667 12.4358 12.3406V14.4111C12.4358 14.649 12.4035 14.8579 12.3347 15.0337L12.334 15.0352C12.2654 15.204 12.1782 15.349 12.071 15.4666C11.9653 15.5823 11.8439 15.6747 11.7085 15.7412L11.7078 15.7405C11.5864 15.8034 11.4622 15.8534 11.335 15.8877C11.2172 15.9189 11.1066 15.9387 11.0061 15.9463C10.9136 15.9532 10.8413 15.9573 10.793 15.9573H10.675L10.4626 15.9463C10.362 15.9387 10.2518 15.919 10.1338 15.8877C10.0122 15.8554 9.8873 15.8055 9.75952 15.7405C9.62706 15.6742 9.50578 15.5832 9.39624 15.4688L9.39551 15.468C9.28579 15.3506 9.19561 15.2056 9.12451 15.0366L9.12378 15.0352C9.05226 14.8589 9.01835 14.6495 9.01831 14.4111V12.3406C9.01831 12.105 9.05259 11.8998 9.12451 11.7297C9.19368 11.5618 9.28389 11.4184 9.39697 11.3027C9.50677 11.1905 9.62826 11.1014 9.76099 11.0376C9.82393 11.0062 9.88688 10.9792 9.94849 10.957L9.94922 10.9563L10.1323 10.8992L10.1345 10.8984L10.3066 10.8604C10.3612 10.8506 10.4136 10.8436 10.4626 10.8398L10.675 10.8289H10.793C10.8413 10.8289 10.9136 10.8329 11.0061 10.8398ZM10.738 11.9473C10.6399 11.9473 10.5796 11.9688 10.5439 11.9963L10.5432 11.9971C10.4934 12.0354 10.4596 12.0746 10.4385 12.1135L10.4377 12.1143C10.4103 12.1641 10.3949 12.222 10.3931 12.2886V14.5393L10.4062 14.6309L10.4385 14.7151L10.4392 14.7158L10.481 14.7766C10.4976 14.7958 10.5181 14.8147 10.5417 14.833L10.5732 14.8521C10.6101 14.8689 10.6637 14.8806 10.738 14.8806C10.8345 14.8805 10.8925 14.8598 10.9255 14.8345C10.9743 14.7969 11.0075 14.7565 11.0288 14.7158C11.054 14.6605 11.0699 14.5993 11.0757 14.5327V12.2944L11.0588 12.197C11.051 12.167 11.0406 12.138 11.0281 12.1106C11.0069 12.0728 10.9738 12.0343 10.9255 11.9971L10.9233 11.9949C10.8905 11.9684 10.8335 11.9474 10.738 11.9473Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),qR=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),Ie.createElement("path",{d:"M2.39355 10.5C2.53545 10.5 2.6592 10.5122 2.75757 10.5417C2.88987 10.5815 2.99161 10.6954 3.07251 10.8289L3.15747 10.9885L3.25195 11.2031L3.25269 11.2046L3.35229 11.4683C3.38786 11.5664 3.42601 11.6752 3.46655 11.7942L3.76318 12.6665L3.76392 12.6687L3.76904 12.6848L3.79907 12.5911L3.94849 12.1348C3.99515 11.9948 4.03674 11.8689 4.073 11.7576L4.07373 11.7561L4.1814 11.4434C4.21489 11.3495 4.24596 11.265 4.27515 11.1907L4.36084 10.9849C4.38855 10.9239 4.41584 10.8705 4.44214 10.8252C4.51581 10.6953 4.61188 10.5823 4.74243 10.5417H4.7439L4.82153 10.5227C4.90321 10.5069 4.99686 10.5 5.09985 10.5H5.67041C5.87137 10.5 6.05265 10.5425 6.17505 10.6619L6.17944 10.6655C6.29073 10.7714 6.35329 10.9108 6.375 11.072C6.39695 11.2133 6.40721 11.3701 6.40723 11.5415V15.5149C6.4072 15.7232 6.3696 15.9065 6.27686 16.0474C6.16065 16.2235 5.92578 16.2751 5.67041 16.2751C5.43573 16.2751 5.21924 16.2184 5.11157 16.0378L5.10938 16.0342C5.03005 15.8921 4.9966 15.7149 4.99658 15.5149V12.8335L4.4436 14.4456L4.44141 14.4521C4.39239 14.576 4.32667 14.6919 4.24658 14.8008L4.24731 14.8015C4.14341 14.9438 3.9882 15.008 3.80933 15.0081H3.73096C3.55351 15.008 3.40015 14.9437 3.29004 14.8081L3.28857 14.8066C3.20076 14.6954 3.13356 14.575 3.08862 14.4463L2.53564 12.8496V15.5149C2.53562 15.7149 2.50218 15.8921 2.42285 16.0342L2.42212 16.0356C2.31692 16.2193 2.09741 16.2751 1.86182 16.2751C1.60639 16.2751 1.37154 16.2236 1.25537 16.0474C1.16263 15.9065 1.12502 15.7232 1.125 15.5149V11.5415C1.12501 11.3697 1.13426 11.2129 1.15356 11.072L1.1543 11.0691L1.17993 10.9526C1.21308 10.8409 1.26884 10.7425 1.35059 10.6633L1.39966 10.6223C1.52082 10.5332 1.68333 10.5 1.86182 10.5H2.39355Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.1106 10.5C9.62746 10.5 10.0624 10.6251 10.4026 10.8875L10.5256 10.9944C10.6405 11.1071 10.7342 11.238 10.8062 11.3862C10.9039 11.5876 10.9497 11.8187 10.9497 12.074V14.4983C10.9497 14.7119 10.927 14.9051 10.8779 15.0754C10.8306 15.2398 10.7676 15.3875 10.689 15.5156L10.6875 15.5186C10.6079 15.6408 10.5165 15.7481 10.4143 15.8386C10.3155 15.9261 10.2132 15.9989 10.1074 16.0547L10.1067 16.054C9.86566 16.1854 9.58987 16.2585 9.28271 16.2751H7.97681C7.77408 16.2751 7.59145 16.2335 7.46704 16.1169C7.35471 16.0115 7.2898 15.8714 7.26489 15.7097C7.24266 15.5651 7.23194 15.4033 7.23193 15.2256V11.5415C7.23195 11.3663 7.2426 11.2069 7.26489 11.0647C7.28985 10.9032 7.35482 10.7635 7.46704 10.6582C7.59145 10.5416 7.77403 10.5 7.97681 10.5H9.1106ZM8.72095 15.0447H9.07544C9.15931 15.0426 9.23737 15.0225 9.31055 14.9839L9.31348 14.9817L9.35815 14.9553C9.40066 14.926 9.43743 14.8876 9.46802 14.8381L9.46875 14.8367L9.49438 14.7861C9.51748 14.7305 9.53172 14.6593 9.53174 14.5686V12.2615C9.53174 12.1256 9.50631 12.0248 9.46509 11.9517L9.46362 11.9495C9.42061 11.8696 9.36785 11.8162 9.30762 11.7825C9.25706 11.7542 9.19978 11.7342 9.1355 11.7231L9.06885 11.7151H8.72095V15.0447Z",fill:"currentColor"})),KR=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6416 10.3784C3.95675 10.4068 4.24355 10.4808 4.49927 10.6033L4.68896 10.7058C4.75102 10.7437 4.81209 10.7853 4.87207 10.8303C4.99897 10.9227 5.10899 11.0375 5.20459 11.1724C5.30765 11.311 5.38613 11.4733 5.44116 11.6558L5.47998 11.8008C5.51306 11.9504 5.52903 12.1125 5.52905 12.2856C5.52905 12.6011 5.47828 12.8867 5.37305 13.1382L5.37378 13.1389C5.28434 13.3557 5.15787 13.5441 4.99512 13.7014L4.92334 13.7666C4.52343 14.1103 3.97203 14.269 3.2959 14.269H2.95166V15.4292C2.95165 15.614 2.93964 15.7845 2.91577 15.9397C2.8883 16.1182 2.81511 16.2739 2.68652 16.3909L2.68579 16.3901C2.54556 16.5202 2.34254 16.5645 2.12329 16.5645C1.90696 16.5644 1.70685 16.5194 1.56738 16.3887L1.56519 16.3865C1.44288 16.2679 1.37145 16.1152 1.34399 15.9404L1.34326 15.936C1.32257 15.7822 1.31251 15.613 1.3125 15.4292V11.5042C1.31251 11.3204 1.3225 11.1524 1.34326 11.001L1.34399 10.9973L1.37256 10.8691C1.40991 10.7455 1.47366 10.6362 1.56738 10.5483C1.70673 10.4148 1.90677 10.3689 2.12329 10.3689H3.50464L3.6416 10.3784ZM2.95166 12.9053H3.31787C3.43267 12.8984 3.53116 12.8714 3.61597 12.8269C3.69435 12.7857 3.75967 12.7244 3.81226 12.6387L3.84448 12.5728C3.8728 12.5 3.88989 12.4058 3.88989 12.2856C3.88984 12.1374 3.85971 12.0411 3.81812 11.9795L3.81519 11.9744C3.76419 11.8937 3.70357 11.8366 3.63428 11.7979C3.56584 11.7635 3.47692 11.7377 3.36328 11.7253H2.95166V12.9053Z",fill:"currentColor"}),Ie.createElement("path",{d:"M9.85181 10.3689C9.96017 10.369 10.0701 10.3945 10.1792 10.4392L10.2876 10.4897L10.2935 10.4927L10.2993 10.4963C10.4209 10.5712 10.5226 10.6619 10.5879 10.7725C10.6503 10.8716 10.6882 10.9809 10.6882 11.0969C10.6882 11.1892 10.6526 11.2993 10.6077 11.4089L10.6069 11.4082C10.5828 11.4685 10.5524 11.5379 10.5154 11.6147C10.4774 11.6937 10.4326 11.7792 10.3813 11.8704L9.1582 14.0391V15.4373C9.1582 15.6164 9.14303 15.7853 9.11279 15.9426C9.07918 16.1138 9.00547 16.2635 8.88647 16.3799L8.88721 16.3806C8.75142 16.5164 8.5562 16.5644 8.34668 16.5645C8.13595 16.5644 7.94219 16.5154 7.80249 16.3843L7.80103 16.3828C7.68055 16.2661 7.60635 16.1157 7.57251 15.9434C7.54226 15.786 7.52783 15.6164 7.52783 15.4373V14.0398L6.12085 11.5283L6.11938 11.5261C6.0459 11.3891 6.00587 11.2453 6.00586 11.0969C6.00589 10.986 6.03681 10.8798 6.09155 10.7812L6.09302 10.7791L6.15015 10.6963C6.21492 10.6176 6.30071 10.5509 6.39771 10.4941L6.4043 10.4905L6.5127 10.4392C6.6213 10.3943 6.73162 10.369 6.84155 10.3689C7.06446 10.369 7.25232 10.4649 7.39307 10.6399L7.48096 10.752C7.5635 10.8656 7.6337 10.9873 7.69263 11.116L8.34668 12.4878L9.00073 11.116C9.07902 10.945 9.177 10.7867 9.29443 10.6421L9.29517 10.6414L9.35083 10.5791C9.48615 10.443 9.65571 10.3689 9.85181 10.3689Z",fill:"currentColor"}),Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),lt=(e,t)=>h.jsx(e,{size:t.size??ae.size,stroke:t.stroke??ae.stroke,className:t.className}),mi=(e,t)=>h.jsx(e,{width:Number(t.size??ae.size),height:Number(t.size??ae.size),className:t.className}),Of={".bmp":e=>lt(z.IconFileTypeBmp,e),".cpp":e=>mi(zR,e),".c":e=>mi(WR,e),".cs":e=>mi(_R,e),".css":e=>lt(z.IconFileTypeCss,e),".csv":e=>lt(z.IconFileTypeCsv,e),".doc":e=>lt(z.IconFileTypeDoc,e),".docx":e=>lt(z.IconFileTypeDocx,e),".html":e=>lt(z.IconFileTypeHtml,e),".ini":e=>mi(UR,e),".jpg":e=>lt(z.IconFileTypeJpg,e),".js":e=>lt(z.IconFileTypeJs,e),".json":e=>mi($R,e),".jsx":e=>lt(z.IconFileTypeJsx,e),".md":e=>mi(qR,e),".pdf":e=>lt(z.IconFileTypePdf,e),".php":e=>lt(z.IconFileTypePhp,e),".png":e=>lt(z.IconFileTypePng,e),".ppt":e=>lt(z.IconFileTypePpt,e),".py":e=>mi(KR,e),".rs":e=>lt(z.IconFileTypeRs,e),".sql":e=>lt(z.IconFileTypeSql,e),".svg":e=>lt(z.IconFileTypeSvg,e),".ts":e=>lt(z.IconFileTypeTs,e),".tsx":e=>lt(z.IconFileTypeTsx,e),".txt":e=>lt(z.IconFileTypeTxt,e),".vue":e=>lt(z.IconFileTypeVue,e),".xls":e=>lt(z.IconFileTypeXls,e),".xml":e=>lt(z.IconFileTypeXml,e),".zip":e=>lt(z.IconFileTypeZip,e),default:e=>lt(z.IconFile,e)},wp=({extension:e,size:t=ae.size,stroke:s=ae.stroke,className:n,decorative:i=!1,label:o,indicator:r})=>{const a=(()=>{if(!e)return"";const u=e.trim().toLowerCase();return u.startsWith(".")?u:`.${u}`})(),c=(Of[a]??Of.default)({size:t,stroke:s}),d=typeof o=="string"?o:`${a.slice(1).toUpperCase()} file icon`;return h.jsxs("span",{className:pe("inline-flex relative",n),...i?{"aria-hidden":!0}:{role:"img","aria-label":d},children:[h.jsx(Le,{icon:c,className:"inline-block align-middle"}),r&&h.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:r})]})},ra=({label:e="Shared entity",size:t=14,className:s,containerClassName:n,stroke:i=1.5,sharedIndicatorTooltip:o})=>h.jsx(ct,{tooltip:o||"Shared",children:h.jsx(Le,{className:M("text-accent-primary flex bg-layer-3",n),icon:h.jsx(z.IconArrowUpRight,{size:t,stroke:i,"aria-label":typeof e=="string"?e:void 0,className:s,role:"img"})})}),Yc=({name:e,className:t,shared:s=!1,iconSize:n=os,details:i,sharedIndicatorClassName:o,sharedIndicatorTooltip:r,fileExtension:a,hideTooltip:l=!1,isInvalidName:c=!1,tooltipContent:d})=>{const u=a||(e.includes(".")?e.split(".").pop():void 0);return h.jsxs("div",{className:M("flex items-center gap-2 w-full",t),children:[h.jsx(wp,{extension:u,size:n,className:"text-secondary",indicator:s?h.jsx(ra,{className:o,sharedIndicatorTooltip:r}):null,label:"File type icon"}),h.jsxs("div",{className:pe(["w-full flex min-w-0",i&&"flex-col gap-1"]),children:[h.jsx(it,{className:pe(["dial-small-text flex-1 min-w-0",c?"text-secondary":"text-primary"]),text:e,id:"name",hideTooltip:l,customTooltipContent:d}),i]})]})},Zc=({name:e,className:t,shared:s=!1,loading:n=!1,iconSize:i=os,sharedIndicatorClassName:o,sharedIndicatorTooltip:r,hideTooltip:a=!1,isInvalidName:l=!1,tooltipContent:c})=>{const d=()=>n?h.jsx(bn,{size:i}):h.jsx(Le,{icon:h.jsx(z.IconFolder,{...ae,size:i}),className:"inline-block align-middle"});return h.jsxs("div",{className:M("flex items-center gap-2 w-full",t),children:[h.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[d(),s&&h.jsx("span",{className:"absolute z-50 -bottom-0.5 -left-0.5",children:h.jsx(ra,{className:o,sharedIndicatorTooltip:r})})]}),h.jsx(it,{className:pe("dial-small-text flex-1 min-w-0",l?"text-secondary":"text-primary"),text:e,id:"name",hideTooltip:a,customTooltipContent:c})]})};var aa=(e=>(e.Left="left",e.Right="right",e))(aa||{}),bt=function(){return bt=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bt.apply(this,arguments)},Hf={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Bf={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},vl={width:"20px",height:"20px",position:"absolute",zIndex:1},YR={top:bt(bt({},Hf),{top:"-5px"}),right:bt(bt({},Bf),{left:void 0,right:"-5px"}),bottom:bt(bt({},Hf),{top:void 0,bottom:"-5px"}),left:bt(bt({},Bf),{left:"-5px"}),topRight:bt(bt({},vl),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:bt(bt({},vl),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:bt(bt({},vl),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:bt(bt({},vl),{left:"-10px",top:"-10px",cursor:"nw-resize"})},ZR=g.memo(function(e){var t=e.onResizeStart,s=e.direction,n=e.children,i=e.replaceStyles,o=e.className,r=g.useCallback(function(c){t(c,s)},[t,s]),a=g.useCallback(function(c){t(c,s)},[t,s]),l=g.useMemo(function(){return bt(bt({position:"absolute",userSelect:"none"},YR[s]),i??{})},[i,s]);return h.jsx("div",{className:o||void 0,style:l,onMouseDown:r,onTouchStart:a,children:n})}),XR=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function n(){this.constructor=t}t.prototype=s===null?Object.create(s):(n.prototype=s.prototype,new n)}})(),Ns=function(){return Ns=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ns.apply(this,arguments)},QR={width:"auto",height:"auto"},Cl=function(e,t,s){return Math.max(Math.min(e,s),t)},Gf=function(e,t,s){var n=Math.round(e/t);return n*t+s*(n-1)},Co=function(e,t){return new RegExp(e,"i").test(t)},wl=function(e){return!!(e.touches&&e.touches.length)},JR=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Vf=function(e,t,s){s===void 0&&(s=0);var n=t.reduce(function(o,r,a){return Math.abs(r-e)<Math.abs(t[o]-e)?a:o},0),i=Math.abs(t[n]-e);return s===0||i<s?t[n]:e},cu=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},bl=function(e,t,s,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return s*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return n*i}}return e},e3=function(e,t,s,n,i,o,r){return n=bl(n,e.width,t,s),i=bl(i,e.height,t,s),o=bl(o,e.width,t,s),r=bl(r,e.height,t,s),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof r>"u"?void 0:Number(r)}},t3=function(e){return Array.isArray(e)?e:[e,e]},s3=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],jf="__resizable_base__",n3=(function(e){XR(t,e);function t(s){var n,i,o,r,a=e.call(this,s)||this;return a.ratio=1,a.resizable=null,a.parentLeft=0,a.parentTop=0,a.resizableLeft=0,a.resizableRight=0,a.resizableTop=0,a.resizableBottom=0,a.targetLeft=0,a.targetTop=0,a.delta={width:0,height:0},a.appendBase=function(){if(!a.resizable||!a.window)return null;var l=a.parentNode;if(!l)return null;var c=a.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(jf):c.className+=jf,l.appendChild(c),c},a.removeBase=function(l){var c=a.parentNode;c&&c.removeChild(l)},a.state={isResizing:!1,width:(i=(n=a.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(r=(o=a.propsSize)===null||o===void 0?void 0:o.height)!==null&&r!==void 0?r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},a.onResizeStart=a.onResizeStart.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.onMouseUp=a.onMouseUp.bind(a),a}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||QR},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,r=this.resizable.style.position;r!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=r}return{width:s,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,n=this.props.size,i=function(a){var l;if(typeof s.state[a]>"u"||s.state[a]==="auto")return"auto";if(s.propsSize&&s.propsSize[a]&&(!((l=s.propsSize[a])===null||l===void 0)&&l.toString().endsWith("%"))){if(s.state[a].toString().endsWith("%"))return s.state[a].toString();var c=s.getParentSize(),d=Number(s.state[a].toString().replace("px","")),u=d/c[a]*100;return"".concat(u,"%")}return cu(s.state[a])},o=n&&typeof n.width<"u"&&!this.state.isResizing?cu(n.width):i("width"),r=n&&typeof n.height<"u"&&!this.state.isResizing?cu(n.height):i("height");return{width:o,height:r}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var s=this.appendBase();if(!s)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var o={width:s.offsetWidth,height:s.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(s),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var s=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:s.flexBasis!=="auto"?s.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(s,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===s&&(typeof i>"u"||i==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,n){var i=this.props.boundsByDirection,o=this.state.direction,r=i&&Co("left",o),a=i&&Co("top",o),l,c;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(l=r?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),c=a?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=r?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=r?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(s=s&&s<l?s:l),c&&Number.isFinite(c)&&(n=n&&n<c?n:c),{maxWidth:s,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(s,n){var i=this.props.scale||1,o=t3(this.props.resizeRatio||1),r=o[0],a=o[1],l=this.state,c=l.direction,d=l.original,u=this.props,p=u.lockAspectRatio,f=u.lockAspectRatioExtraHeight,m=u.lockAspectRatioExtraWidth,v=d.width,C=d.height,w=f||0,b=m||0;return Co("right",c)&&(v=d.width+(s-d.x)*r/i,p&&(C=(v-b)/this.ratio+w)),Co("left",c)&&(v=d.width-(s-d.x)*r/i,p&&(C=(v-b)/this.ratio+w)),Co("bottom",c)&&(C=d.height+(n-d.y)*a/i,p&&(v=(C-w)*this.ratio+b)),Co("top",c)&&(C=d.height-(n-d.y)*a/i,p&&(v=(C-w)*this.ratio+b)),{newWidth:v,newHeight:C}},t.prototype.calculateNewSizeFromAspectRatio=function(s,n,i,o){var r=this.props,a=r.lockAspectRatio,l=r.lockAspectRatioExtraHeight,c=r.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,u=typeof i.width>"u"||i.width<0?s:i.width,p=typeof o.height>"u"?10:o.height,f=typeof i.height>"u"||i.height<0?n:i.height,m=l||0,v=c||0;if(a){var C=(p-m)*this.ratio+v,w=(f-m)*this.ratio+v,b=(d-v)/this.ratio+m,x=(u-v)/this.ratio+m,S=Math.max(d,C),y=Math.min(u,w),R=Math.max(p,b),E=Math.min(f,x);s=Cl(s,S,y),n=Cl(n,R,E)}else s=Cl(s,d,u),n=Cl(n,p,f);return{newWidth:s,newHeight:n}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*s,this.parentTop=i.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*s,this.targetTop=o.top*s}if(this.resizable){var r=this.resizable.getBoundingClientRect(),a=r.left,l=r.top,c=r.right,d=r.bottom;this.resizableLeft=a*s,this.resizableRight=c*s,this.resizableTop=l*s,this.resizableBottom=d*s}},t.prototype.onResizeStart=function(s,n){if(!(!this.resizable||!this.window)){var i=0,o=0;if(s.nativeEvent&&JR(s.nativeEvent)?(i=s.nativeEvent.clientX,o=s.nativeEvent.clientY):s.nativeEvent&&wl(s.nativeEvent)&&(i=s.nativeEvent.touches[0].clientX,o=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var r=this.props.onResizeStart(s,n,this.resizable);if(r===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var a,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var d=this.window.getComputedStyle(c).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",a=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var u={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Ns(Ns({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:n,flexBasis:a};this.setState(u)}},t.prototype.onMouseMove=function(s){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&wl(s))try{s.preventDefault(),s.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,r=i.maxHeight,a=i.minWidth,l=i.minHeight,c=wl(s)?s.touches[0].clientX:s.clientX,d=wl(s)?s.touches[0].clientY:s.clientY,u=this.state,p=u.direction,f=u.original,m=u.width,v=u.height,C=this.getParentSize(),w=e3(C,this.window.innerWidth,this.window.innerHeight,o,r,a,l);o=w.maxWidth,r=w.maxHeight,a=w.minWidth,l=w.minHeight;var b=this.calculateNewSizeFromDirection(c,d),x=b.newHeight,S=b.newWidth,y=this.calculateNewMaxFromBoundary(o,r);this.props.snap&&this.props.snap.x&&(S=Vf(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(x=Vf(x,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(S,x,{width:y.maxWidth,height:y.maxHeight},{width:a,height:l});if(S=R.newWidth,x=R.newHeight,this.props.grid){var E=Gf(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),F=Gf(x,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),P=this.props.snapGap||0,k=P===0||Math.abs(E-S)<=P?E:S,D=P===0||Math.abs(F-x)<=P?F:x;S=k,x=D}var T={width:S-f.width,height:x-f.height};if(this.delta=T,m&&typeof m=="string"){if(m.endsWith("%")){var I=S/C.width*100;S="".concat(I,"%")}else if(m.endsWith("vw")){var H=S/this.window.innerWidth*100;S="".concat(H,"vw")}else if(m.endsWith("vh")){var A=S/this.window.innerHeight*100;S="".concat(A,"vh")}}if(v&&typeof v=="string"){if(v.endsWith("%")){var I=x/C.height*100;x="".concat(I,"%")}else if(v.endsWith("vw")){var H=x/this.window.innerWidth*100;x="".concat(H,"vw")}else if(v.endsWith("vh")){var A=x/this.window.innerHeight*100;x="".concat(A,"vh")}}var O={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(x,"height")};this.flexDir==="row"?O.flexBasis=O.width:this.flexDir==="column"&&(O.flexBasis=O.height);var G=this.state.width!==O.width,L=this.state.height!==O.height,U=this.state.flexBasis!==O.flexBasis,B=G||L||U;B&&Jo.flushSync(function(){n.setState(O)}),this.props.onResize&&B&&this.props.onResize(s,p,this.resizable,T)}},t.prototype.onMouseUp=function(s){var n,i,o=this.state,r=o.isResizing,a=o.direction;o.original,!(!r||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,a,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Ns(Ns({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var n,i;this.setState({width:(n=s.width)!==null&&n!==void 0?n:"auto",height:(i=s.height)!==null&&i!==void 0?i:"auto"})},t.prototype.renderResizer=function(){var s=this,n=this.props,i=n.enable,o=n.handleStyles,r=n.handleClasses,a=n.handleWrapperStyle,l=n.handleWrapperClass,c=n.handleComponent;if(!i)return null;var d=Object.keys(i).map(function(u){return i[u]!==!1?h.jsx(ZR,{direction:u,onResizeStart:s.onResizeStart,replaceStyles:o&&o[u],className:r&&r[u],children:c&&c[u]?c[u]:null},u):null});return h.jsx("div",{className:l,style:a,children:d})},t.prototype.render=function(){var s=this,n=Object.keys(this.props).reduce(function(r,a){return s3.indexOf(a)!==-1||(r[a]=s.props[a]),r},{}),i=Ns(Ns(Ns({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return h.jsxs(o,Ns({style:i,className:this.props.className},n,{ref:function(r){r&&(s.resizable=r)},children:[this.state.isResizing&&h.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(g.PureComponent);const i3=({side:e,className:t})=>{const s=e===aa.Left,n=s?z.IconChevronLeft:z.IconChevronRight;return h.jsx("div",{className:t,children:h.jsx(n,{className:pe("h-full",s&&"-ml-6")})})},o3=({side:e,isResizing:t,customHandler:s,handlerClassName:n})=>{const i=M("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",n),o=h.jsx(i3,{side:e,className:i});return s?h.jsx("div",{className:i,children:s}):o},WC=({children:e,minWidth:t,maxWidth:s,width:n,defaultWidth:i,onResizeStop:o,onResize:r,side:a=aa.Right,resizeHandlerClassName:l,resizeHandler:c})=>{const[d,u]=g.useState(!1),[p,f]=g.useState(i),m=n!==void 0,v=m?n:p,C=g.useRef(null),w=g.useCallback(()=>{u(!0)},[]),b=g.useCallback(()=>{u(!1);const S=C.current?.resizable?.getBoundingClientRect(),y=S?Math.round(S.width):t;m||f(y),o?.(y)},[o,m,t]),x=g.useMemo(()=>{const S=a===aa.Left,y=h.jsx(o3,{side:a,isResizing:d,customHandler:c,handlerClassName:l});return{size:m?{width:v,height:"100%"}:void 0,defaultSize:m?void 0:{width:v,height:"100%"},minWidth:t,maxWidth:s,enable:{left:S,right:!S},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:S?y:void 0,right:S?void 0:y},onResizeStart:w,onResize:(R,E,F)=>{const P=Math.round(F.offsetWidth);r?.(P)},onResizeStop:b}},[a,m,v,t,s,c,l,d,w,b,r]);return h.jsx(n3,{ref:C,...x,children:h.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},_C=({enabled:e=!0,children:t,...s})=>e?h.jsx(WC,{...s,children:t}):t;var Cs=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(Cs||{}),_r=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(_r||{}),nc=(e=>(e.Circle="circle",e.Square="square",e))(nc||{});const r3=e=>{if(typeof e=="number")return e;switch(e){case _r.Small:return 32;case _r.Large:return 64;case _r.Default:default:return 40}},xo=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:n=!0,loading:i=!0,children:o,variant:r=Cs.Default,width:a,height:l,overlay:c,color:d,className:u,...p})=>{if(!i&&o)return h.jsx(h.Fragment,{children:o});const f=M("bg-layer-raised",e&&"animate-pulse",u);if(r!==Cs.Default){const k=M(f,r===Cs.Circular&&"rounded-full",r===Cs.Rectangular&&"rounded",r===Cs.Text&&"rounded",!!c&&"relative"),D={};return a&&(D.width=typeof a=="number"?`${a}px`:a),l&&(D.height=typeof l=="number"?`${l}px`:l),d&&(D.backgroundColor=d),h.jsx("div",{className:k,style:D,...p,children:c&&h.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:c})})}const m=!!s,v=!!n,C=!!t,w=typeof s=="object"?s:{},b=typeof n=="object"?n:{},x=typeof t=="object"?t:{},S=r3(w.size),y=w.shape??nc.Circle,R=b.width??"38%",E=x.rows??3,F=x.width,P=k=>F?Array.isArray(F)?F[k]??"100%":F:k===E-1?"61%":"100%";return h.jsxs("div",{...p,className:M("flex gap-4",!!c&&"relative",u),children:[m&&h.jsx("div",{className:M(f,y===nc.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:S,height:S,...d&&{backgroundColor:d}}}),h.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[v&&h.jsx("div",{className:M(f,"h-4 rounded"),style:{width:R,...d&&{backgroundColor:d}}}),C&&h.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:E}).map((k,D)=>h.jsx("div",{className:M(f,"h-4 rounded"),style:{width:P(D),...d&&{backgroundColor:d}}},D))})]}),c&&h.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:c})]})};function et(e){if(e?.length)return e[e.length-1]}function ii(e,t,s){if(e===t)return!0;if(!e||!t)return e==null&&t==null;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i]&&!s?.(e[i],t[i]))return!1;return!0}function Tr(e,t){if(e){for(const s of e)if(t(s))return!0}}function _s(e,t){const s=e.indexOf(t);s>=0&&e.splice(s,1)}function a3(e,t){let s=0,n=0;for(;s<e.length;s++)t.includes(e[s])||(e[n]=e[s],n++);for(;n<e.length;)e.pop()}function zf(e,t,s){for(let n=0;n<t.length;n++)_s(e,t[n]);for(let n=t.length-1;n>=0;n--)e.splice(s,0,t[n])}var ln=e=>e==null||e===""?null:e;function le(e){return e!=null&&e!==""}function ht(e){return!le(e)}var hh=e=>e!=null&&typeof e.toString=="function"?e.toString():null,la=(e,t)=>{const s=e?JSON.stringify(e):null,n=t?JSON.stringify(t):null;return s===n},l3=(e,t,s=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e=="object"&&e.toNumber&&(e=e.toNumber()),typeof t=="object"&&t.toNumber&&(t=t.toNumber()),!s||typeof e!="string"?e>t?1:e<t?-1:0:e.localeCompare(t)),Bi=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,s){const n=t?this.allAsyncListeners:this.allSyncListeners;let i=n.get(e);return!i&&s&&(i=new Set,n.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,s=!1){this.getListeners(e,s,!0).add(t)}removeEventListener(e,t,s=!1){const n=this.getListeners(e,s,!1);n&&(n.delete(t),n.size===0&&(s?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const s=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const{frameworkOverrides:n}=this,i=a=>{const l=n?()=>n.wrapIncoming(a):a;t?this.dispatchAsync(l):l()},o=this.getListeners(s,t,!1);if((o?.size??0)>0){const a=new Set(o);for(const l of a)o?.has(l)&&i(()=>l(e))}const r=this.getGlobalListeners(t);if(r.size>0){const a=new Set(r);for(const l of a)i(()=>l(s,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},s=this.frameworkOverrides;s?s.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const t of e)t()}},c3=/[&<>"']/g,d3={"&":"&","<":"<",">":">",'"':""","'":"'"};function nr(e){return e?.toString().toString()??null}function Ur(e){return nr(e)?.replace(c3,t=>d3[t])??null}function Wf(e){return typeof e=="string"&&e.startsWith("=")&&e.length>1}function u3(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,s=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(s,"$1 $2$3").replace(/\./g," ").split(" ").map(i=>i.substring(0,1).toUpperCase()+(i.length>1?i.substring(1,i.length):"")).join(" ")}function Rs(e){return e.eRootDiv.getRootNode()}function dt(e){return Rs(e).activeElement}function Et(e){const{gos:t,eRootDiv:s}=e;let n=null;const i=t.get("getDocument");return i&&le(i)?n=i():s&&(n=s.ownerDocument),n&&le(n)?n:document}function bp(e){const t=dt(e);return t===null||t===Et(e).body}function xp(e){return Et(e).defaultView||window}function yp(e){let t=null,s=null;try{t=Et(e).fullscreenElement}catch{}finally{t||(t=Rs(e));const n=t.querySelector("body");n?s=n:t instanceof ShadowRoot?s=t:t instanceof Document?s=t?.documentElement:s=t}return s}function h3(e){return yp(e)?.clientWidth??(window.innerWidth||-1)}function p3(e){return yp(e)?.clientHeight??(window.innerHeight||-1)}function ks(e,t,s){s==null||typeof s=="string"&&s==""?UC(e,t):Is(e,t,s)}function Is(e,t,s){e.setAttribute($C(t),s.toString())}function UC(e,t){e.removeAttribute($C(t))}function $C(e){return`aria-${e}`}function Gi(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function g3(e){const t=e?.direction;return t==="asc"?"ascending":t==="desc"?"descending":t==="mixed"?"other":"none"}function f3(e){return e.getAttribute("aria-label")}function $o(e,t){ks(e,"label",t)}function ca(e,t){ks(e,"labelledby",t)}function qC(e,t){ks(e,"live",t)}function m3(e,t){ks(e,"atomic",t)}function v3(e,t){ks(e,"relevant",t)}function Sp(e,t){ks(e,"invalid",t)}function C3(e,t){ks(e,"disabled",t)}function KC(e,t){ks(e,"hidden",t)}function ph(e,t){Is(e,"expanded",t)}function w3(e,t){Is(e,"setsize",t)}function b3(e,t){Is(e,"posinset",t)}function x3(e,t){Is(e,"rowcount",t)}function Rp(e,t){Is(e,"rowindex",t)}function y3(e,t){Is(e,"rowspan",t)}function S3(e,t){Is(e,"colcount",t)}function YC(e,t){Is(e,"colindex",t)}function R3(e,t){Is(e,"colspan",t)}function F3(e,t){Is(e,"sort",t)}function E3(e){UC(e,"sort")}function ZC(e,t){ks(e,"selected",t)}function D3(e,t){ks(e,"controls",t)}function P3(e,t){D3(e,t.id),ca(t,e.id)}function _f(e,t){ks(e,"owns",t)}function Xc(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var T3="[tabindex], input, select, button, textarea, [href]",XC="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function $r(e){return!e||!e.matches("input, select, button, textarea")||!e.matches(XC)?!1:Ts(e)}function st(e,t,s={}){const{skipAriaHidden:n}=s;e.classList.toggle("ag-hidden",!t),n||KC(e,!t)}function k3(e,t,s={}){const{skipAriaHidden:n}=s;e.classList.toggle("ag-invisible",!t),n||KC(e,!t)}function da(e,t){const s="disabled",n=t?o=>o.setAttribute(s,""):o=>o.removeAttribute(s);n(e);const i=e.querySelectorAll("input")??[];for(const o of i)n(o)}function Di(e,t,s){let n=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof s=="number"){if(++n>s)break}else if(e===s)break}return!1}function Xi(e){const{height:t,width:s,borderTopWidth:n,borderRightWidth:i,borderBottomWidth:o,borderLeftWidth:r,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:d,marginTop:u,marginRight:p,marginBottom:f,marginLeft:m,boxSizing:v}=window.getComputedStyle(e),C=Number.parseFloat;return{height:C(t||"0"),width:C(s||"0"),borderTopWidth:C(n||"0"),borderRightWidth:C(i||"0"),borderBottomWidth:C(o||"0"),borderLeftWidth:C(r||"0"),paddingTop:C(a||"0"),paddingRight:C(l||"0"),paddingBottom:C(c||"0"),paddingLeft:C(d||"0"),marginTop:C(u||"0"),marginRight:C(p||"0"),marginBottom:C(f||"0"),marginLeft:C(m||"0"),boxSizing:v}}function Fp(e){const t=Xi(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ua(e){const t=Xi(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function QC(e){const{height:t,marginBottom:s,marginTop:n}=Xi(e);return Math.floor(t+s+n)}function ic(e){const{width:t,marginLeft:s,marginRight:n}=Xi(e);return Math.floor(t+s+n)}function JC(e){const t=e.getBoundingClientRect(),{borderTopWidth:s,borderLeftWidth:n,borderRightWidth:i,borderBottomWidth:o}=Xi(e);return{top:t.top+(s||0),left:t.left+(n||0),right:t.right+(i||0),bottom:t.bottom+(o||0)}}function oc(e,t){let s=e.scrollLeft;return t&&(s=Math.abs(s)),s}function rc(e,t,s){s&&(t*=-1),e.scrollLeft=t}function Jt(e){for(;e?.firstChild;)e.firstChild.remove()}function pn(e){e?.parentNode&&e.remove()}function ew(e){return!!e.offsetParent}function Ts(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!ew(e)||window.getComputedStyle(e).visibility!=="visible")}function Ep(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function ha(e){return()=>{const t=e();return t?tw(t)||I3(t):!0}}function tw(e){return e.clientWidth<e.scrollWidth}function I3(e){return e.clientHeight<e.scrollHeight}function ac(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):Vs(e,t)}function Vs(e,t){t=Dp(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function qr(e,t){t=Dp(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Dp(e){return typeof e=="number"?`${e}px`:e}function Pp(e){return e instanceof Node||e instanceof HTMLElement}function Zt(e,t,s){s==null||s===""?e.removeAttribute(t):e.setAttribute(t,s.toString())}function M3(e,t){if(!t.isContentEditable)return;const s=xp(e).getSelection();if(!s)return;const n=Et(e).createRange();n.selectNodeContents(t),n.collapse(!1),s.removeAllRanges(),s.addRange(n)}function xn(e,t,s){const i=xp(e).ResizeObserver,o=i?new i(s):null;return o?.observe(t),()=>o?.disconnect()}function yn(e,t){const s=xp(e);s.requestAnimationFrame?s.requestAnimationFrame(t):s.webkitRequestAnimationFrame?s.webkitRequestAnimationFrame(t):s.setTimeout(t,0)}var sw="data-ref",du;function Uf(){return du??(du=document.createTextNode(" ")),du.cloneNode()}function Vi(e){const{attrs:t,children:s,cls:n,ref:i,role:o,tag:r}=e,a=document.createElement(r);if(n&&(a.className=n),i&&a.setAttribute(sw,i),o&&a.setAttribute("role",o),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(s)if(typeof s=="string")a.textContent=s;else{let l=!0;for(const c of s)c&&(typeof c=="string"?(a.appendChild(document.createTextNode(c)),l=!1):typeof c=="function"?a.appendChild(c()):(l&&(a.appendChild(Uf()),l=!1),a.append(Vi(c)),a.appendChild(Uf())))}return a}var A3=["touchstart","touchend","touchmove","touchcancel","scroll"],L3=["wheel"],uu={},lc=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return s=>{if(typeof uu[s]=="boolean")return uu[s];const n=document.createElement(e[s]||"div");return s="on"+s,uu[s]=s in n}})();function N3(e,t){return!t||!e?!1:H3(t).indexOf(e)>=0}function O3(e){const t=[];let s=e.target;for(;s;)t.push(s),s=s.parentElement;return t}function H3(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():O3(t)}function B3(e,t,s){const n=G3(t);let i;n!=null&&(i={passive:n}),e.addEventListener(t,s,i)}var G3=e=>{const t=A3.includes(e),s=L3.includes(e);if(t)return!0;if(s)return!1};function nw(e,t,s){if(s===0)return!1;const n=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(n,i)<=s}var Mo=(e,t)=>{const s=e.identifier;for(let n=0,i=t.length;n<i;++n){const o=t[n];if(o.identifier===s)return o}return null};function pa(e,t){return e.gos.isElementInThisInstance(t.target)}function V3(e,t,s){const i=e.getBoundingClientRect().height,o=h3(s)-2,r=p3(s)-2;if(!e.offsetParent)return;const l=JC(e.offsetParent),{clientY:c,clientX:d}=t;let u=c-l.top-i/2,p=d-l.left-10;const f=Et(s),m=f.defaultView||window,v=m.pageYOffset||f.documentElement.scrollTop,C=m.pageXOffset||f.documentElement.scrollLeft;o>0&&p+e.clientWidth>o+C&&(p=o+C-e.clientWidth),p<0&&(p=0),r>0&&u+e.clientHeight>r+v&&(u=r+v-e.clientHeight),u<0&&(u=0),e.style.left=`${p}px`,e.style.top=`${u}px`}var Vl=(e,...t)=>{for(const s of t){const[n,i,o,r]=s;n.addEventListener(i,o,r),e.push(s)}},Tp=e=>{if(e){for(const[t,s,n,i]of e)t.removeEventListener(s,n,i);e.length=0}},zn=e=>{e.cancelable&&e.preventDefault()};function j3(e,t){return t}function iw(e){return e?.getLocaleTextFunc()??j3}function z3(e,t,s,n){const i=t[s];return e.getLocaleTextFunc()(s,typeof i=="function"?i(n):i,n)}function W3(e){return(t,s,n)=>e({key:t,defaultValue:s,variableValues:n})}function _3(e){return(t,s,n)=>{let i=e?.[t];if(i&&n?.length){let o=0;for(;!(o>=n.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",n[o++])}return i??s}}var qt=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,s){this.localEventService||(this.localEventService=new Bi),this.localEventService.addEventListener(e,t,s)}removeEventListener(e,t,s){this.localEventService?.removeEventListener(e,t,s)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const s=[];for(const n of Object.keys(t)){const i=t[n];i&&s.push(this._setupListener(e,n,i))}return s}_setupListener(e,t,s){if(this.destroyed)return()=>null;let n;if(U3(e))e.__addEventListener(t,s),n=()=>(e.__removeEventListener(t,s),null);else{const i=$3(e);e instanceof HTMLElement?B3(e,t,s):i?e.addListener(t,s):e.addEventListener(t,s),n=i?()=>(e.removeListener(t,s),null):()=>(e.removeEventListener(t,s),null)}return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==n),null)}setupPropertyListener(e,t){const{gos:s}=this;s.addPropertyEventListener(e,t);const n=()=>(s.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==n),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const s=e.join("-")+this.propertyListenerId++,n=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[s])return;this.lastChangeSetIdLookup[s]=i.changeSet.id}const o={type:"propertyChanged",changeSet:i.changeSet,source:i.source};t(o)};for(const i of e)this.setupPropertyListener(i,n)}getLocaleTextFunc(){return iw(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const s=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),s}createBean(e,t,s){return(t||this.stubContext).createBean(e,s)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function U3(e){return e.__addEventListener!==void 0}function $3(e){return e.eventServiceType==="global"}var _=class extends qt{},gh=new Set,Qc=(e,t)=>{gh.has(t)||(gh.add(t),e())};Qc._set=gh;var q3={pending:!1,funcs:[]},K3={pending:!1,funcs:[]};function fh(e,t="setTimeout",s){const n=t==="raf"?K3:q3;if(n.funcs.push(e),n.pending)return;n.pending=!0;const i=()=>{const o=n.funcs.slice();n.funcs.length=0,n.pending=!1;for(const r of o)r()};t==="raf"?yn(s,i):window.setTimeout(i,0)}function xt(e,t,s){let n;return function(...i){const o=this;return window.clearTimeout(n),n=window.setTimeout(function(){e.isAlive()&&t.apply(o,i)},s),n}}function $f(e,t){let s=0;return function(...n){const i=this,o=Date.now();o-s<t||(s=o,e.apply(i,n))}}function Y3(e,t,s,n=100){const i=Date.now();let o=null,r=!1;const a=()=>{o!=null&&(window.clearInterval(o),o=null)};e.addDestroyFunc(a);const l=()=>{const c=Date.now()-i>n;(t()||c)&&(s(),r=!0,a())};l(),r||(o=window.setInterval(l,10))}var ow=new Set(["__proto__","constructor","prototype"]);function Z3(e,t){if(e!=null){if(Array.isArray(e)){for(let s=0;s<e.length;s++)t(s.toString(),e[s]);return}for(const s of Object.keys(e).filter(n=>!ow.has(n)))t(s,e[s])}}function Wt(e,t,s=!0,n=!1){le(t)&&Z3(t,(i,o)=>{let r=e[i];r!==o&&(n&&r==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(r={},e[i]=r),qf(o)&&qf(r)&&!Array.isArray(r)?Wt(r,o,s,n):(s||o!==void 0)&&(e[i]=o))})}function qf(e){return typeof e=="object"&&e!==null}var kp=class nn{static applyGlobalGridOptions(t){if(!nn.gridOptions)return{...t};let s={};return Wt(s,nn.gridOptions,!0,!0),nn.mergeStrategy==="deep"?Wt(s,t,!0,!0):s={...s,...t},nn.gridOptions.context&&(s.context=nn.gridOptions.context),t.context&&(nn.mergeStrategy==="deep"&&s.context&&Wt(t.context,s.context,!0,!0),s.context=t.context),s}static applyGlobalGridOption(t,s){if(nn.mergeStrategy==="deep"){const n=rw(t);if(n&&typeof n=="object"&&typeof s=="object")return nn.applyGlobalGridOptions({[t]:s})[t]}return s}};kp.gridOptions=void 0;kp.mergeStrategy="shallow";var Ip=kp;function rw(e){return Ip.gridOptions?.[e]}var aw={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},lw="https://www.ag-grid.com";function ji(e,t,...s){e.get("debug")&&console.log("AG Grid: "+t,...s)}function Kr(e,...t){Qc(()=>cw(e,...t),e+t?.join(""))}function Ao(e,...t){Qc(()=>X3(e,...t),e+t?.join(""))}function X3(e,...t){console.error("AG Grid: "+e,...t)}function cw(e,...t){console.warn("AG Grid: "+e,...t)}var dw=new Set,cc={},Pi={},jl,uw=!1,hw=!1,Q3=!1;function J3(e){const[t,s]=e.version.split(".")||[],[n,i]=jl.split(".")||[];return t===n&&s===i}function eF(e){jl||(jl=e.version);const t=n=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${n} Please update all modules to the same version.`;e.version?J3(e)||Ao(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${jl}.`)):Ao(t(`'${e.moduleName}' is incompatible.`));const s=e.validate?.();s&&!s.isValid&&Ao(`${s.message}`)}function ga(e,t,s=!1){s||(uw=!0),eF(e);const n=e.rowModels??["all"];dw.add(e);let i;t!==void 0?(hw=!0,Pi[t]===void 0&&(Pi[t]={}),i=Pi[t]):i=cc;for(const o of n)i[o]===void 0&&(i[o]={}),i[o][e.moduleName]=e;if(e.dependsOn)for(const o of e.dependsOn)ga(o,t,s)}function tF(e){delete Pi[e]}function mh(e,t,s){const n=i=>!!cc[i]?.[e]||!!Pi[t]?.[i]?.[e];return n(s)||n("all")}function Mp(){return hw}function sF(e,t){const s=Pi[e]??{};return[...Object.values(cc.all??{}),...Object.values(s.all??{}),...Object.values(cc[t]??{}),...Object.values(s[t]??{})]}function nF(){return new Set(dw)}function iF(e,t){const s=Pi[e]??{};return[...Object.values(s.all??{}),...Object.values(s[t]??{})]}function oF(){return uw}function pw(){return Q3}var gw=class{static register(e){ga(e,void 0)}static registerModules(e){for(const t of e)ga(t,void 0)}};function fw(e){for(const t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){const s=fw(t.dependsOn);if(s)return s}}}var ie="35.2.1",Kf=2e3,Yf=100,mw="_version_",vw=null,Lo=`${lw}/javascript-data-grid`;function rF(e){vw=e}function aF(e){Lo=e}function Cw(e,t,s){return vw?.(e,t)??[uF(e,t,s)]}function Ap(e,t,s,n,i){e(`${n?"warning":"error"} #${t}`,...Cw(t,s,i))}function lF(e){if(!e)return String(e);const t={};for(const s of Object.keys(e))typeof e[s]!="object"&&typeof e[s]!="function"&&(t[s]=e[s]);return JSON.stringify(t)}function cF(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=lF(e)),t}function zl(e){return e===void 0?"undefined":e===null?"null":e}function vh(e,t){return`${e}?${t.toString()}`}function dF(e,t,s){const n=Array.from(t.entries()).sort((o,r)=>r[1].length-o[1].length);let i=vh(e,t);for(const[o,r]of n){if(o===mw)continue;const a=i.length-s;if(a<=0)break;const l="...",c=a+l.length,d=r.length-c>Yf?r.slice(0,r.length-c)+l:r.slice(0,Yf)+l;t.set(o,d),i=vh(e,t)}return i}function ww(e,t){const s=new URLSearchParams;if(s.append(mw,ie),t)for(const o of Object.keys(t))s.append(o,cF(t[o]));const n=`${Lo}/errors/${e}`,i=vh(n,s);return i.length<=Kf?i:dF(n,s,Kf)}var uF=(e,t,s)=>{const n=ww(e,t);return`${`${s?s+`
|
|
7
|
+
`:""}Visit ${n}`}${s?"":`
|
|
8
|
+
Alternatively register the ValidationModule to see the full message in the console.`}`};function X(...e){Ap(Kr,e[0],e[1],!0)}function Je(...e){Ap(Ao,e[0],e[1],!1)}function Br(e,t,s){Ap(Ao,e,t,!1,s)}function hF(e,t){const s=t[0];return`error #${s} `+Cw(s,t[1],e).join(" ")}function js(...e){return hF(void 0,e)}function bw(e,t){return e.get("rowModelType")===t}function gt(e,t){return bw(e,"clientSide")}function ir(e,t){return bw(e,"serverSide")}function At(e,t){return e.get("domLayout")===t}function Ti(e){return hc(e)!==void 0}function xw(e){return typeof e.get("getRowHeight")=="function"}function pF(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function gF({gos:e,formula:t}){const s=e.get("rowNumbers");return s||!!t?.active&&s!==!1}function Kn(e,t,s=!1,n){const{gos:i,environment:o}=e;if(n==null&&(n=o.getDefaultRowHeight()),xw(i)){if(s)return{height:n,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(Ch(c))return c===0&&X(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return fF(i);const r=i.get("rowHeight");return{height:r&&Ch(r)?r:n,estimated:!1}}function fF(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return Ch(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ki(e){const{environment:t,gos:s}=e,n=s.get("rowHeight");if(!n||ht(n))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(X(24),t.getDefaultRowHeight())}function Ch(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function yw(e,t,s){const n=t[e.getDomDataKey()];return n?n[s]:void 0}function zi(e,t,s,n){const i=e.getDomDataKey();let o=t[i];ht(o)&&(o={},t[i]=o),o[s]=n}function No(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Sw(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||At(e,"print"))}function rn(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function dc(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Rw(e){return e.get("grandTotalRow")}function mF(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function vF(e){return mF(e)&&e.get("groupHideColumnsUntilExpanded")&>(e)}function Fw(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Ew(e,t,s){return!!t.group&&!t.footer&&Fw(e,s)}function qo(e){const t=e.getCallback("getRowId");return t===void 0?t:s=>{let n=t(s);return typeof n!="string"&&(Qc(()=>X(25,{id:n}),"getRowIdString"),n=String(n)),n}}function CF(e,t){const s=e.get("groupHideParentOfSingleChild");return!!(s===!0||s==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function wF(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Oo(e){return e?.checkboxes??!0}function Wl(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function uc(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function hu(e){return e?.hideDisabledCheckboxes??!1}function bF(e){return typeof e.get("rowSelection")!="string"}function Yn(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function Ho(e){const t=e.get("cellSelection")??!1;return(typeof t=="object"&&t.enableColumnSelection)??!1}function Dw(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const s=e.get("suppressRowClickSelection"),n=e.get("suppressRowDeselection");return s&&n?!1:s?"enableDeselection":n?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function xF(e){const t=Dw(e);return t===!0||t==="enableSelection"}function yF(e){const t=Dw(e);return t===!0||t==="enableDeselection"}function wh(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function hc(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function pc(e){return hc(e)==="multiRow"}function SF(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function gc(e){const t=e.get("rowSelection");if(typeof t=="string"){const s=e.get("groupSelectsChildren"),n=e.get("groupSelectsFiltered");return s&&n?"filteredDescendants":s?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Pw(e,t=!0){const s=e.get("rowSelection");return typeof s!="object"?t?"all":void 0:s.mode==="multiRow"?s.selectAll:"all"}function RF(e){const t=e.get("rowSelection");return typeof t=="string"?!1:t?.mode==="multiRow"?t.ctrlASelectsRows??!1:!1}function fa(e){const t=gc(e);return t==="descendants"||t==="filteredDescendants"}function Zf(e){const t=e.get("rowSelection");return typeof t=="object"&&t.masterSelects||"self"}function FF(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Xt(e){return e.get("columnMenu")==="legacy"}function EF(e){return!Xt(e)}function DF(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function PF(e,t,s){typeof e!="object"&&(e={});const n={...e};for(const i of s){const o=t[i];typeof o<"u"&&(n[i]=o)}return n}function TF(e,t){if(!e)return;const s={};let n=!1;for(const r of Object.keys(e))s[r]=e[r],n=!0;if(!n)return;const i={type:"gridOptionsChanged",options:s};t.dispatchEvent(i);const o={type:"componentStateChanged",...s};t.dispatchEvent(o)}function Te(e,t){return e.addCommon(t)}function _l(e,t){return e[t]??e.gridOptions?.[t]??rw(t)??aw[t]}function kF({gos:e},t){return t.button===2||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}var IF={resizable:!0,sortable:!0},MF=0;function Tw(){return MF++}function Zn(e){return e instanceof Qi}var AF=["asc","desc",null],LF=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],Qi=class extends _{constructor(e,t,s,n){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=s,this.primary=n,this.isColumn=!0,this.instanceId=Tw(),this.autoHeaderHeight=null,this.sortDef=ws(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new Bi,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Ur(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:s,colFlex:n}}=this;t?.initCol(this);const i=e.hide;i!==void 0?this.visible=!i:this.visible=!e.initialHide,s?.initCol(this),n?.initCol(this)}setColDef(e,t,s){const n=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),n&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",s)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:s}}=this,n=e.get("suppressFieldDotNotation");this.fieldContainsDots=le(t)&&t.includes(".")&&!n,this.tooltipFieldContainsDots=le(s)&&s.includes(".")&&!n}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;!e||!t||this.addManagedListeners(t,{colDefChanged:s=>{const n=e.recreateColDef(this.colDef);this.setColDef(n,n,s.source)}})}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){const t=e.width??e.initialWidth??200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const s=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,s)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,s)}createColumnFunctionCallbackParams(e){return Te(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??IF[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const s=this.createColumnFunctionCallbackParams(e);return t(s)}return!1}createColumnEvent(e,t){return Te(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){const e=[],{sort:t,initialSort:s}=this.colDef,n=t===null?t:gn(t?.type),i=s===null?s:gn(s?.type);return n&&e.push(n),i&&e.push(i),e}getSortingOrder(){const e=this.getColDefAllowedSortTypes().includes("absolute")?LF:AF;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(t=>ws(t))}getAvailableSortTypes(){const e=this.getSortingOrder().reduce((t,s)=>(s.direction&&t.push(s.type),t),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.getSort()==="asc"}isSortDescending(){return this.getSort()==="desc"}isSortNone(){return ht(this.getSort())}isSorting(){return le(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return X(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const s=e===!0;this.visible!==s&&(this.visible=s,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let s=!0;for(;e;){if(!e.isPadding()){s=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:s}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return Te(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(ht(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.colSpan(t);return Math.max(s,1)}getRowSpan(e){if(ht(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),s=this.colDef.rowSpan(t);return Math.max(s,1)}setActualWidth(e,t,s=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),s||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,s){const n=this.createColumnEvent(e,t);s&&Wt(n,s),this.colEventSvc.dispatchEvent(n)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ws(e){return Bo(e)?{direction:e.direction,type:e.type}:{direction:Jc(e),type:gn(e)}}function $n(e){return e==="asc"||e==="desc"||e===null}function Lp(e){return e==="default"||e==="absolute"}function Bo(e){if(!e||typeof e!="object")return!1;const t=e;return Lp(t.type)&&$n(t.direction)}function Ul(e,t){return e?t?e.type===t.type&&e.direction===t.direction:e?e.direction===null:!0:t?t.direction===null:!0}function Jc(e){return $n(e)?e:null}function gn(e){return Lp(e)?e:"default"}function NF(e,t,s){const i=s?.()??t.sortSvc.getDisplaySortForColumn(e),o=gn(i?.type),r=Jc(i?.direction),a=e.getAvailableSortTypes(),l=a.has("default"),c=a.has("absolute");return{isDefaultSortAllowed:l,isAbsoluteSortAllowed:c,isAbsoluteSort:o==="absolute",isDefaultSort:o==="default",isAscending:r==="asc",isDescending:r==="desc",direction:r}}function Nt(e){return e instanceof $l}var $l=class extends _{constructor(e,t,s,n){super(),this.colGroupDef=e,this.groupId=t,this.padding=s,this.level=n,this.isColumn=!1,this.expandable=!1,this.instanceId=Tw(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(const t of this.children)Zn(t)?e(t):Nt(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(const t of this.children)Zn(t)?e.push(t):Nt(t)&&t.addLeafColumns(e)}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);for(const t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(const t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,s=!1;const n=this.findChildrenRemovingPadding();for(let o=0,r=n.length;o<r;o++){const a=n[o];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,s=!0):l==="closed"?(t=!0,s=!0):(e=!0,t=!0)}const i=e&&t&&s;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=s=>{for(const n of s)Nt(n)&&n.isPadding()?t(n.children):e.push(n)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},OF={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function Xf(e,t,s){const n={},i=e.gos;return Object.assign(n,i.get("defaultColGroupDef")),Object.assign(n,t),i.validateColDef(n,s),n}var HF=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=hh(e);let s=0;for(;;){let n=e??t;if(n?s!==0&&(n+="_"+s):n=s,!this.existingKeys[n]){const i=String(n);return e&&s>0&&X(273,{providedId:e,usedId:i}),this.existingKeys[i]=!0,i}s++}}},BF=(e,t)=>{Nt(e)&&e.setupExpandable(),e.originalParent=t};function GF(e,t=null,s,n,i){const o=new HF,{existingCols:r,existingGroups:a,existingColKeys:l}=VF(n);o.addExistingKeys(l);const c=kw(e,t,0,s,r,o,a,i),{colGroupSvc:d}=e,u=d?.findMaxDepth(c,0)??0,p=d?d.balanceColumnTree(c,0,u,o):c;return cn(null,p,BF),{columnTree:p,treeDepth:u}}function VF(e){const t=[],s=[],n=[];return e&&cn(null,e,i=>{if(Nt(i)){const o=i;s.push(o)}else{const o=i;n.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:s,existingColKeys:n}}function kw(e,t,s,n,i,o,r,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let d=0;d<c.length;d++){const u=t[d];l&&$F(u)?c[d]=l.createProvidedColumnGroup(n,u,s,i,o,r,a):c[d]=jF(e,n,u,i,o,a)}return c}function jF(e,t,s,n,i,o){const r=WF(s,n);r&&n?.splice(r.idx,1);let a=r?.column;if(a){const l=bh(e,s,a.getColId());a.setColDef(l,s,o),zF(e,a,l,o)}else{const l=i.getUniqueKey(s.colId,s.field),c=bh(e,s,l);a=new Qi(c,s,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Iw(e,t,s,n,i,o,r,a){const{sortSvc:l,pinnedCols:c,colFlex:d}=e;s!==void 0&&t.setVisible(!s,a),l&&(l.updateColSort(t,n,a),i!==void 0&&l.setColSortIndex(t,i)),o!==void 0&&c?.setColPinned(t,o),r!==void 0&&d?.setColFlex(t,r)}function zF(e,t,s,n){Iw(e,t,s.hide,s.sort,s.sortIndex,s.pinned,s.flex,n);const i=t.getFlex();if(!(i!=null&&i>0))if(s.width!=null)t.setActualWidth(s.width,n);else{const o=t.getActualWidth();t.setActualWidth(o,n)}}function WF(e,t){if(t)for(let s=0;s<t.length;s++){const n=t[s].getUserProvidedColDef();if(!n)continue;if(e.colId!=null){if(t[s].getId()===e.colId)return{idx:s,column:t[s]};continue}if(e.field!=null){if(n.field===e.field)return{idx:s,column:t[s]};continue}if(n===e)return{idx:s,column:t[s]}}}function bh(e,t,s,n){const{gos:i,dataTypeSvc:o}=e,r={},a=i.get("defaultColDef");Wt(r,a,!1,!0);const l=_F(e,r,t,s);l&&UF(e,l,r);const c=r.cellDataType;Wt(r,t,!1,!0),c!==void 0&&(r.cellDataType=c);const d=i.get("autoGroupColumnDef"),u=rn(i);return t.rowGroup&&d&&u&&Wt(r,{sort:d.sort,initialSort:d.initialSort},!1,!0),o?.postProcess(r),o?.validateColDef(r,t,a,s),i.validateColDef(r,s,n),r}function _F(e,t,s,n){const i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,s,n),o=s.type??i??t.type;return t.type=o,o?mc(o):void 0}function UF(e,t,s){if(!t.length)return;const n=Object.assign({},OF),i=e.gos.get("columnTypes")||{};for(const o of Object.keys(i)){const r=i[o];o in n?X(34,{key:o}):(r.type&&X(35),n[o]=r)}for(const o of t){const r=n[o.trim()];r?Wt(s,r,!1,!0):X(36,{t:o})}}function $F(e){return e.children!==void 0}function cn(e,t,s){if(t)for(let n=0;n<t.length;n++){const i=t[n];Nt(i)&&cn(i,i.getChildren(),s),s(i,e)}}var Wn="ag-Grid-AutoColumn",Np="ag-Grid-SelectionColumn",Op="ag-Grid-RowNumbersColumn";function Mw(e){const t=[],s=n=>{for(let i=0;i<n.length;i++){const o=n[i];Zn(o)?t.push(o):Nt(o)&&s(o.getChildren())}};return s(e),t}function on(e){return e.reduce((t,s)=>t+s.getActualWidth(),0)}function fc(e,t,s){const n={};if(!t)return;cn(null,t,o=>{n[o.getInstanceId()]=o}),s&&cn(null,s,o=>{n[o.getInstanceId()]=null});const i=Object.values(n).filter(o=>o!=null);e.context.destroyBeans(i)}function Hp(e){return e.getId().startsWith(Wn)}function oi(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Np)??!1}function _t(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Op)??!1}function qF(e){return oi(e)||_t(e)}function mc(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function KF(e,t){return ii(e,t,(s,n)=>s.getColId()===n.getColId())}function YF(e){e.map={};for(const t of e.list)e.map[t.getId()]=t}function Go(e){return e==="optionsUpdated"?"gridOptionsChanged":e}function Yr(e,t){return e===t||e.colId==t||e.getColDef()===t}var ZF=(e,t)=>(s,n)=>{const i={value1:void 0,value2:void 0};let o=!1;return e&&(e[s]!==void 0&&(i.value1=e[s],o=!0),le(n)&&e[n]!==void 0&&(i.value2=e[n],o=!0)),!o&&t&&(t[s]!==void 0&&(i.value1=t[s]),le(n)&&t[n]!==void 0&&(i.value2=t[n])),i};function XF(e,t){const s={...e,sort:void 0,colId:t},n=Aw(e);return n&&(s.sort=n.direction,s.sortType=n.type),s}function Aw(e){const{sort:t,initialSort:s}=e,n=Bo(t)||$n(t),i=Bo(s)||$n(s);return n?ws(t):i?ws(s):null}function Lw(e,t){return e+"_"+t}function vt(e){return e instanceof ma}var ma=class extends _{constructor(e,t,s,n){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=s,this.pinned=n,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=Ur(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Lw(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){for(const e of this.displayedChildren)vt(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=et(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(const t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(const t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(const t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(const t of this.displayedChildren??[])Zn(t)?e.push(t):vt(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(const t of this.children??[])Zn(t)?e.push(t):vt(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(const s of this.children??[]){if(vt(s)&&!s.displayedChildren?.length)continue;switch(s.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(s);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(s);break;default:this.displayedChildren.push(s);break}}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},j={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},QF=65,JF=67,eE=86,tE=68,sE=90,nE=89;function Nw(e){const{keyCode:t}=e;let s;switch(t){case QF:s=j.A;break;case JF:s=j.C;break;case eE:s=j.V;break;case tE:s=j.D;break;case sE:s=j.Z;break;case nE:s=j.Y;break;default:s=e.code}return s}function iE(e,t){return new We(s=>{s(window.setInterval(e,t))})}var We=class Gr{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(s=>this.onDone(s),s=>this.onReject(s))}static all(t){return t.length?new Gr(s=>{let n=t.length;const i=new Array(n);t.forEach((o,r)=>{o.then(a=>{i[r]=a,n--,n===0&&s(i)})})}):Gr.resolve()}static resolve(t=null){return new Gr(s=>s(t))}then(t){return new Gr(s=>{this.status===1?s(t(this.resolution)):this.waiters.push(n=>s(t(n)))})}onDone(t){this.status=1,this.resolution=t;for(const s of this.waiters)s(t)}onReject(t){}},oE=class extends qt{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){const s={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:n=>this.onDragStart(e,n),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(s),this.beans.dragSvc.addDragSource(s)}setDragImageCompIcon(e,t=!1){const s=this.dragImageComp;s&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,s.setIcon(e,t))}removeDragSource(e){const{dragSourceAndParamsList:t,beans:s}=this;for(let n=0,i=t.length;n<i;n++)if(t[n].dragSource===e){const o=t[n];s.dragSvc?.removeDragSource(o),t.splice(n,1);break}}destroy(){const{dragSourceAndParamsList:e,dropTargets:t,beans:s}=this,n=s.dragSvc;for(const i of e)n?.removeDragSource(i);e.length=0,t.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();const s=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-s.left,this.dragInitialSourcePointerOffsetY=t.clientY-s.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){const{dragSource:t,lastDropTarget:s}=this;if(t?.onDragStopped?.(),s){const n=this.dropTargetEvent(s,e,!1);s.onDragStop?.(n)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t,lastMouseEvent:s}=this;if(e?.onDragCancelled?.(),t&&s){const n=this.dropTargetEvent(t,s,!1);t.onDragCancel?.(n)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);const s=this.findCurrentDropTarget(e),{lastDropTarget:n,dragSource:i,dragItem:o}=this;let r=!1;if(s!==n){if(r=!0,n){const a=this.dropTargetEvent(n,e,t);n.onDragLeave?.(a)}if(n!==null&&!s?this.handleExit(i,o):n===null&&s&&this.handleEnter(i,o),s){const a=this.dropTargetEvent(s,e,t);s.onDragEnter?.(a)}this.lastDropTarget=s}else if(s){const a=this.dropTargetEvent(s,e,t);s.onDragging?.(a),a?.changed&&(r=!0)}this.lastMouseEvent=e,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){const t=e.getContainer(),s=e.getSecondaryContainers?.(),n=s?.length;if(!n)return[[t]];const i=new Array(n+1);i[0]=[t];for(let o=0;o<n;++o)i[o+1]=s[o];return i}isMouseOnDropTarget(e,t){const s=this.getAllContainersFromDropTarget(t);let n=!1;const i=(a,l)=>{for(const c of l){const{width:d,height:u,left:p,right:f,top:m,bottom:v}=c.getBoundingClientRect();if(d===0||u===0)return!1;const C=a.clientX>=p&&a.clientX<f,w=a.clientY>=m&&a.clientY<v;if(!C||!w)return!1}return!0};for(const a of s)if(i(e,a)){n=!0;break}const{eElement:o,type:r}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(o)?!1:n&&t.isInterestedIn(r,o)}findCurrentDropTarget(e){const t=[],s=this.dropTargets;for(let r=0,a=s.length;r<a;++r){const l=s[r];this.isMouseOnDropTarget(e,l)&&t.push(l)}const n=t.length;if(n===0)return null;if(n===1)return t[0];const o=Rs(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let r=0,a=o.length;r<a;++r){const l=o[r];for(let c=0,d=t.length;c<d;c++){const u=t[c],p=this.getAllContainersFromDropTarget(u);let f=!1;for(let m=0,v=p.length;m<v&&!f;m++){const C=p[m];for(let w=0,b=C.length;w<b;w++)if(C[w]===l){f=!0;break}}if(f)return u}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){const t=e.getContainer(),s=this.dropTargets;let n=0;for(let i=0,o=s.length;i<o;++i){const r=s[i];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}n!==i&&(s[n]=r),++n}s.length=n}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){const t=this.dropTargets;for(let s=0,n=t.length;s<n;++s){const i=t[s];if(i.external&&i.getContainer()===e)return i}return null}dropTargetEvent(e,t,s){const{dragSource:n,dragItem:i,lastDraggingEvent:o,lastMouseEvent:r,dragInitialSourcePointerOffsetX:a,dragInitialSourcePointerOffsetY:l}=this,c=e.getContainer(),d=c.getBoundingClientRect(),{clientX:u,clientY:p}=t,f=u-(r?.clientX||0),m=p-(r?.clientY||0),v=this.createEvent({event:t,x:u-d.left,y:p-d.top,vDirection:m>0?"down":m<0?"up":null,hDirection:f<0?"left":f>0?"right":null,initialSourcePointerOffsetX:a,initialSourcePointerOffsetY:l,dragSource:n,fromNudge:s,dragItem:i,dropZoneTarget:c,dropTarget:o?.dropTarget??null,changed:!!o?.changed});return this.lastDraggingEvent=v,v}positionDragImageComp(e){const t=this.dragImageComp?.getGui();t&&V3(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){const t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(s=>{const n=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!n||!this.isAlive()){this.destroyBean(s);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const i=this.dragImageComp;i!==s&&(this.dragImageComp=s,this.removeDragImageComp(i)),s&&(this.appendDragImageComp(s),this.updateDragImageComp(),this.positionDragImageComp(n))})}appendDragImageComp(e){const t=e.getGui(),s=t.style;s.position="absolute",s.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(s.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),s.top="20px",s.left="20px";const n=yp(this.beans);n?n.appendChild(t):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:e,dragSource:t,lastDropTarget:s,lastDraggingEvent:n,dragImageLastLabel:i}=this;if(!e)return;this.setDragImageCompIcon(s?.getIconName?.(n)??null);let o=t?.dragItemName;typeof o=="function"&&(o=o(n)),o||(o=""),i!==o&&(this.dragImageLastLabel=o,e.setLabel(o))}};function Ow(e){return typeof e=="object"&&!!e.component}function rE(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Hw(e,t,s,n){const{name:i}=s;let o,r,a,l,c,d;if(t){const u=t,p=u[i+"Selector"],f=p?p(n):null,m=v=>{typeof v=="string"?o=v:v!=null&&v!==!0&&(e.isFrameworkComponent(v)?a=v:r=v)};f?(m(f.component),l=f.params,c=f.popup,d=f.popupPosition):m(u[i])}return{compName:o,jsComp:r,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:d}}var aE=class extends _{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,s,n=!1){return this.getCompDetails(this.gridOptions,e,t,s,n)}getCompDetails(e,t,s,n,i=!1){const{name:o,cellRenderer:r}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:d,popupFromSelector:u,popupPositionFromSelector:p}=Hw(this.beans.frameworkOverrides,e,t,n),f,m;const v=x=>{const S=this.registry.getUserComponent(o,x);S&&(l=S.componentFromFramework?void 0:S.component,c=S.componentFromFramework?S.component:void 0,f=S.params,m=S.processParams)};if(a!=null&&v(a),l==null&&c==null&&s!=null&&v(s),l&&r&&!rE(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!c){const{validation:x}=this.beans;i&&(a!==s||!s)?a?x?.isProvidedUserComp(a)||Je(50,{compName:a}):s?x||Je(260,{...this.gos.getModuleErrorParams(),propName:o,compName:s}):Je(216,{name:o}):s&&!x&&Je(146,{comp:s});return}const C=this.mergeParams(e,t,n,d,f,m),w=l==null,b=l??c;return{componentFromFramework:w,componentClass:b,params:C,type:t,popupFromSelector:u,popupPositionFromSelector:p,newAgStackInstance:()=>this.newAgStackInstance(b,w,C,t)}}newAgStackInstance(e,t,s,n){const i=!t;let o;i?o=new e:o=this.frameworkCompWrapper.wrap(e,n.mandatoryMethods,n.optionalMethods,n),this.createBean(o);const r=o.init?.(s);return r==null?We.resolve(o):r.then(()=>o)}mergeParams(e,t,s,n=null,i,o){const r={...s,...i},l=e?.[t.name+"Params"];if(typeof l=="function"){const c=l(s);Wt(r,c)}else typeof l=="object"&&Wt(r,l);return Wt(r,n),o?o(r):r}},lE={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},cE={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},dE={name:"headerComponent",optionalMethods:["refresh"]},uE={name:"innerHeaderComponent"},hE={name:"innerHeaderGroupComponent"},pE={name:"headerGroupComponent"},gE={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},fE={name:"loadingCellRenderer",cellRenderer:!0},mE={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},vE={name:"tooltipComponent"},Bp={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},CE={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},wE={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},bE={name:"loadingCellRenderer",cellRenderer:!0},xE={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},yE={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function SE(e,t){return e.getCompDetailsFromGridOptions(cE,"agDragAndDropImage",t,!0)}function RE(e,t,s){return e.getCompDetails(t,dE,"agColumnHeader",s)}function FE(e,t,s){return e.getCompDetails(t,uE,void 0,s)}function EE(e,t){const s=t.columnGroup.getColGroupDef();return e.getCompDetails(s,pE,"agColumnGroupHeader",t)}function DE(e,t,s){return e.getCompDetails(t,hE,void 0,s)}function PE(e,t){return e.getCompDetailsFromGridOptions(wE,void 0,t,!0)}function TE(e,t){return e.getCompDetailsFromGridOptions(bE,"agLoadingCellRenderer",t,!0)}function kE(e,t){return e.getCompDetailsFromGridOptions(xE,"agGroupRowRenderer",t,!0)}function IE(e,t){return e.getCompDetailsFromGridOptions(yE,"agDetailCellRenderer",t,!0)}function Qf(e,t,s){return e.getCompDetails(t,gE,void 0,s)}function Jf(e,t,s){return e.getCompDetails(t,fE,"agSkeletonCellRenderer",s,!0)}function Bw(e,t,s){return e.getCompDetails(t,mE,"agCellEditor",s,!0)}function ME(e,t,s,n){const i=t.filter;return Ow(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,Bp,n,s,!0)}function AE(e,t,s){return e.getCompDetails(t,lE,"agDateInput",s,!0)}function LE(e,t){return e.getCompDetails(t.colDef,vE,"agTooltipComponent",t,!0)}function NE(e,t,s,n){return e.getCompDetails(t,CE,n,s)}function Gw(e,t){return Hw(e,t,Bp)}function pu(e,t,s){return e.mergeParams(t,Bp,s)}var OE=class extends oE{createEvent(e){return Te(this.gos,e)}createDragImageComp(e){const{gos:t,beans:s}=this;return SE(s.userCompFactory,Te(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){X(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){const s={getContainer:e,isInterestedIn:n=>n===1||n===0,getIconName:()=>"notAllowed"};this.addDropTarget(s),t.addDestroyFunc(()=>this.removeDropTarget(s))}};function Vw(e){return!!e.operator}var jw="ag-resizer-wrapper",An=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),HE={tag:"div",cls:jw,children:[An("eTopLeft","topLeft"),An("eTop","top"),An("eTopRight","topRight"),An("eRight","right"),An("eBottomRight","bottomRight"),An("eBottom","bottom"),An("eBottomLeft","bottomLeft"),An("eLeft","left")]},BE=class extends qt{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){const{clientHeight:t,clientWidth:s}=this.offsetParent,n=s/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(n,i,e)}initialisePosition(e){if(this.positioned)return;const{centered:t,forcePopupParentAsOffsetParent:s,minWidth:n,width:i,minHeight:o,height:r,x:a,y:l}=this.config;this.offsetParent||this.setOffsetParent();let c=0,d=0;const u=Ts(this.element);if(u){const p=this.findBoundaryElement(),f=window.getComputedStyle(p);if(f.minWidth!=null){const m=p.offsetWidth-this.element.offsetWidth;d=Number.parseInt(f.minWidth,10)-m}if(f.minHeight!=null){const m=p.offsetHeight-this.element.offsetHeight;c=Number.parseInt(f.minHeight,10)-m}}if(this.minHeight=o||c,this.minWidth=n||d,i&&this.setWidth(i),r&&this.setHeight(r),(!i||!r)&&this.refreshSize(),t)this.center(e);else if(a||l)this.offsetElement(a,l,e);else if(u&&s){let p=this.boundaryEl,f=!0;if(p||(p=this.findBoundaryElement(),f=!1),p){const m=Number.parseFloat(p.style.top),v=Number.parseFloat(p.style.left);f?this.offsetElement(Number.isNaN(v)?0:v,Number.isNaN(m)?0:m,e):this.setPosition(v,m)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;const s=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(s),this.moveElementDragListener=s):(this.dragSvc?.removeDragSource(s),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(const t of Object.keys(e)){const s=!!e[t],n=this.getResizerElement(t),i={dragStartPixels:0,eElement:n,onDragStart:o=>this.onResizeStart(o,t),onDragging:this.onResize.bind(this),onDragStop:o=>this.onResizeEnd(o,t)};(s||!this.isAlive()&&!s)&&(s?(this.dragSvc?.addDragSource(i),this.resizeListeners.push(i),n.style.pointerEvents="all"):n.style.pointerEvents="none",this.resizable[t]=s)}}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,s=this.element;let n=!1;if(typeof e=="string"&&e.includes("%"))qr(s,e),e=QC(s),n=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(n?(s.style.maxHeight="unset",s.style.minHeight="unset"):t?qr(s,e):(s.style.height=`${e}px`,s.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:Number.parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:s}=this.offsetParent;if(!s)return null;const n=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),o=e?this.position.y:n.top,r=e?0:i.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:d}=c.getBoundingClientRect();a=d-n.bottom}}return s+r-o-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:s}=this.config;let n=!1;if(typeof e=="string"&&e.includes("%"))Vs(t,e),e=ic(t),n=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:i}=this.offsetParent,o=s?this.position.x:this.element.getBoundingClientRect().left;i&&e+o>i&&(e=i-o)}this.getWidth()!==e&&(n?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Vs(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,s){const{forcePopupParentAsOffsetParent:n}=this.config,i=n?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:s}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const s=this.getAvailableHeight();this.element.style.setProperty("max-height",`${s}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=xn(this.beans,this.popupSvc?.getPopupParent(),t)):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:s,isTop:n,anywhereWithin:i,topBuffer:o}=e,r=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!s,!!i,r)?0:r,c=this.shouldSkipY(t,!!n,o,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,s,n){const i=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:i.left;let l=a<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=r.right;return l?!0:(t?l=n<0&&e.clientX>a+o.left||n>0&&e.clientX<a+o.left:s?l=n<0&&e.clientX>r.right||n>0&&e.clientX<a+o.left:l=n<0&&e.clientX>r.right||n>0&&e.clientX<r.right,l)}shouldSkipY(e,t,s=0,n){const i=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:i.top;let l=a<=0&&o.top>=e.clientY||o.bottom<=e.clientY&&o.bottom<=r.bottom;return l?!0:(t?l=n<0&&e.clientY>a+o.top+s||n>0&&e.clientY<a+o.top:l=n<0&&e.clientY>r.bottom||n>0&&e.clientY<r.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(Vi(HE)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${jw}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:s,forcePopupParentAsOffsetParent:n}=this.config;!s&&!n&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(s=>!s.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,s=0;for(const n of e){const i=!!n.style.flex&&n.style.flex!=="0 0 auto";if(n===this.element)continue;let o=this.minHeight||0,r=this.minWidth||0;if(i){const a=window.getComputedStyle(n);a.minHeight&&(o=Number.parseInt(a.minHeight,10)),a.minWidth&&(r=Number.parseInt(a.minWidth,10))}else o=n.offsetHeight,r=n.offsetWidth;t+=o,s+=r}return{height:t,width:s}}applySizeToSiblings(e){let t=null;const s=this.getSiblings();if(s){for(let n=0;n<s.length;n++){const i=s[n];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex="0 0 auto",i===this.element&&(t=s[n+1]))}t&&(t.style.removeProperty("height"),t.style.removeProperty("min-height"),t.style.removeProperty("max-height"),t.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:s}=this.config,{isTop:n,isRight:i,isBottom:o,isLeft:r}=this.currentResizer,a=i||r,l=o||n,{movementX:c,movementY:d}=this.calculateMouseMovement({e,isLeft:r,isTop:n}),u=this.position.x,p=this.position.y;let f=0,m=0;if(a&&c){const v=r?-1:1,C=this.getWidth(),w=C+c*v;let b=!1;r&&(f=C-w,(u+f<=0||w<=this.minWidth)&&(b=!0,f=0)),b||this.setWidth(w)}if(l&&d){const v=n?-1:1,C=this.getHeight(),w=C+d*v;let b=!1;n?(m=C-w,(p+m<=0||w<=this.minHeight)&&(b=!0,m=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||s)&&f||m)&&this.offsetElement(u+f,p+m)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:s}=this.position;let n;this.config.calculateTopBuffer&&(n=this.config.calculateTopBuffer());const{movementX:i,movementY:o}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:n});this.offsetElement(t+i,s+o),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},GE=class extends BE{},xe=null;function em(e){return typeof e?.getGui=="function"}var Pa=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(!e)return;if(e.includes(" ")){const n=(e||"").split(" ");if(n.length>1){for(const i of n)this.toggleCss(i,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}},VE=0,or=class extends qt{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=VE++,this.cssManager=new Pa(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(s=>[s.selector,s])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(sw):null}applyElementsToComponent(e,t,s,n=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===xe)this[t]=n??e;else{const o=s?.[t];if(!this.suppressDataRefValidation&&!o)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){const s=[];for(const n of e.childNodes??[])s.push(n);for(const n of s){if(!(n instanceof HTMLElement))continue;const i=this.createComponentFromElement(n,o=>{const r=o.getGui();if(r)for(const a of n.attributes??[])r.setAttribute(a.name,a.value)},t);if(i){if(i.addItems&&n.children.length){this.createChildComponentsFromTags(n,t);const o=Array.prototype.slice.call(n.children);i.addItems(o)}this.swapComponentForNode(i,e,n)}else n.childNodes&&this.createChildComponentsFromTags(n,t)}}createComponentFromElement(e,t,s){const n=e.nodeName,i=this.getDataRefAttribute(e),o=n.indexOf("AG-")===0,r=o?this.componentSelectors.get(n):null;let a=null;if(r){const l=s&&i?s[i]:void 0;a=new r.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(o)throw new Error(`selector: ${n}`);return this.applyElementsToComponent(e,i,s,a),a}swapComponentForNode(e,t,s){const n=e.getGui();t.replaceChild(n,s),t.insertBefore(document.createComment(s.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){const s=t??this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui());for(const n of e)n.setAttribute("tabindex",s.toString())}setTemplate(e,t,s){let n;typeof e=="string"||e==null?n=Ep(e):n=Vi(e),this.setTemplateFromElement(n,t,s)}setTemplateFromElement(e,t,s,n=!1){if(this.eGui=e,this.suppressDataRefValidation=n,t)for(let i=0;i<t.length;i++){const o=t[i];this.componentSelectors.set(o.selector,o)}this.wireTemplate(e,s)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let s=t;return e==null?null:(s||(s=this.eGui),Pp(e)?{element:e,parent:s}:{element:e.getGui(),parent:s})}prependChild(e,t){const{element:s,parent:n}=this.getContainerAndElement(e,t)||{};!s||!n||n.prepend(s)}appendChild(e,t){const{element:s,parent:n}=this.getContainerAndElement(e,t)||{};!s||!n||n.appendChild(s)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:s}=t;k3(this.eGui,e,{skipAriaHidden:s})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:s}=t;st(this.eGui,e,{skipAriaHidden:s});const n={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(n)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,s){this.eGui.addEventListener(e,t,s),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css===tm?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=tm}},tm=Symbol(),ft=class extends or{},gu,fu,mu,vu,xh,yh,Cu;function ri(){return gu===void 0&&(gu=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),gu}function Ko(){return fu===void 0&&(fu=/(firefox)/i.test(navigator.userAgent)),fu}function zw(){return mu===void 0&&(mu=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),mu}function Ii(){return vu===void 0&&(vu=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),vu}function Sh(e){if(!e)return null;const t=e.tabIndex,s=e.getAttribute("tabIndex");return t===-1&&(s===null||s===""&&!Ko())?null:t.toString()}function jE(){if(Cu!==void 0)return Cu;if(!document.body)return-1;let e=1e6;const t=Ko()?6e6:1e9,s=document.createElement("div");for(document.body.appendChild(s);;){const n=e*2;if(s.style.height=n+"px",n>t||s.clientHeight!==n)break;e=n}return s.remove(),Cu=e,e}function Gp(){return yh==null&&Ww(),yh}function Ww(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let s=t.offsetWidth-t.clientWidth;s===0&&t.clientWidth===0&&(s=null),t.parentNode&&t.remove(),s!=null&&(yh=s,xh=s===0)}function _w(){return xh==null&&Ww(),xh}var Rh=!1,vc=0;function zE(e){vc>0||(e.addEventListener("keydown",Cc),e.addEventListener("mousedown",Cc))}function WE(e){vc>0||(e.removeEventListener("keydown",Cc),e.removeEventListener("mousedown",Cc))}function Cc(e){const t=Rh,s=e.type==="keydown";s&&(e.ctrlKey||e.metaKey||e.altKey)||t!==s&&(Rh=s)}function _E(e){const t=Et(e);return zE(t),vc++,()=>{vc--,WE(t)}}function Uw(){return Rh}function Mi(e,t,s=!1){const n=T3;let i=XC;t&&(i+=", "+t),s&&(i+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(n)).filter(l=>Ts(l)),r=Array.prototype.slice.apply(e.querySelectorAll(i));return r.length?((l,c)=>l.filter(d=>c.indexOf(d)===-1))(o,r):o}function Wi(e,t=!1,s=!1,n=!1){const i=Mi(e,n?".ag-tab-guard":null,s),o=t?et(i):i[0];return o?(o.focus({preventScroll:!0}),!0):!1}function Ji(e,t,s,n){const i=Mi(t,s?':not([tabindex="-1"])':null),o=dt(e);let r;s?r=i.findIndex(l=>l.contains(o)):r=i.indexOf(o);const a=r+(n?-1:1);return a<0||a>=i.length?null:i[a]}function $w(e,t=5){let s=0;for(;e&&Sh(e)===null&&++s<=t;)e=e.parentElement;return Sh(e)===null?null:e}var UE="ag-focus-managed",qw=class extends qt{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},s={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=s,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:n=>{if(n.defaultPrevented)return;const i=Ji(this.beans,this.eFocusable,!1,n.shiftKey);i&&(i.focus(),n.preventDefault())},...s}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:s}}=this;e.classList.add(UE),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),s&&this.addManagedElementListeners(e,{focusout:s})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(t))return;const{callbacks:s}=this;if(s.shouldStopEventPropagation(t)){this.stopPropagationCallbacks.stopPropagation(t);return}t.key===j.TAB?s.onTabKeyDown(t):s.handleKeyDown&&s.handleKeyDown(t)}})}},Kw="__ag_Grid_Stop_Propagation";function _i(e){e[Kw]=!0}function dn(e){return e[Kw]===!0}var Vp={isStopPropagation:dn,stopPropagation:_i},Ta=class extends qw{constructor(e,t){super(e,Vp,t)}},$E={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function Es(e,t,s){return z3(e,$E,t,s)}function jp(e,t){const{debounceMs:s}=e;return ed(e)?(s!=null&&X(71),0):s??t}function ed(e){return(e.buttons?.indexOf("apply")??-1)>=0}function Yw(e,t,s,n){let i=Es(e,s);if(typeof t=="function"){const o=Es(e,n);i=t({filterOptionKey:n,filterOption:o,placeholder:i})}else typeof t=="string"&&(i=t);return i}var qE=class extends ft{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new Ta(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new GE(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){const t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){const t=e,s=this.params;this.params=t;const{source:n,state:i,additionalEventAttributes:o}=t;n==="colDef"&&this.updateParams(t,s);const r=this.state;this.state=i;const a=o?.fromAction;return(a&&a!=="apply"||i.model!==r.model||!this.areStatesEqual(i.state,r.state))&&this.setModelIntoUi(i.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=ed(e),this.setupApplyDebounced()}doesFilterPass(e){X(283);const{getHandler:t,model:s,column:n}=this.params;return t().doesFilterPass({...e,model:s,handlerParams:this.beans.colFilter.getHandlerParams(n)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return X(284),this.params.model!=null}setupApplyDebounced(){const e=jp(this.params,this.defaultDebounceMs),t=xt(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return X(285),this.params.model}setModel(e){X(286);const{beans:t,params:s}=this;return t.colFilter.setModelForColumnLegacy(s.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){const{params:t,state:{valid:s=!0,model:n}}=this;if(!s)return!1;const i=!this.areModelsEqual(t.model,n);return i&&t.onAction("apply",e),i}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();const s=this.getModelFromUi(),n={model:s,state:this.getState(),valid:this.canApply(s)};this.state=n;const{params:i,gos:o,eventSvc:r,applyActive:a}=this;i.onStateChange(n),i.onUiChange(this.getUiChangeEventParams()),o.get("enableFilterHandlers")||r.dispatchEvent({type:"filterModified",column:i.column,filterInstance:this}),n.valid&&(e??(e=a?void 0:"debounce"),e==="immediately"?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e==="debounce"&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:s}=this;if(!t)return;const n=e==="floatingFilter"||e==="columnFilter";n?(t.restoreLastSize(),t.setResizable(s.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(n)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return Es(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},zp=class extends or{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},td=class extends zp{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function Ys(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function sd(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function KE(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var sm="row-group-",Wp="t-",_p="b-",YE=0,Xn=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=YE++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){const e=this._groupData;return e!==void 0?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this;const{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){const e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){const e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1?!0:!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:s,eventSvc:n}=this.beans,i=this.data;this.data=e,s?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const o=this.createDataChangedEvent(e,i,t);if(this.__localEventService?.dispatchEvent(o),this.sibling){this.sibling.data=e;const a=this.sibling.createDataChangedEvent(e,i,t);this.sibling.__localEventService?.dispatchEvent(a)}n.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=e,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(e,i,t)),n.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,s){return{type:"dataChanged",node:this,oldData:t,newData:e,update:s}}getRowIndexString(){return this.rowIndex==null?(Je(13),null):this.rowPinned==="top"?Wp+this.rowIndex:this.rowPinned==="bottom"?_p+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:s}=this.beans,n=s?.createDaemonNode?.(this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),s&&(s.updateRowSelectable(this),s.syncInRowNode(this,n));const o=this.createDataChangedEvent(e,i,!1);this.__localEventService?.dispatchEvent(o)}setId(e){const t=qo(this.beans.gos);if(t)if(this.data){const s=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:s.length>0?s:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(sm)&&Je(14,{groupPrefix:sm})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");const t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,s){this.beans.expansionSvc?.setExpanded(this,e,t,s)}setDataValue(e,t,s){const{colModel:n,valueSvc:i,gos:o,editSvc:r}=this.beans;if(e==null)return!1;let a=n.getCol(e)??n.getColDefCol(e);if(!a)return!1;if(!this.group){const d=a.getColDef();d.pivotValueColumn&&(a=d.pivotValueColumn)}const l=i.getValueForDisplay({column:a,node:this,from:"data"}).value;if(o.get("readOnlyEdit")){const{beans:{eventSvc:d},data:u,rowIndex:p,rowPinned:f}=this;return d.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:p,rowPinned:f,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:s}),!1}if(s!=="data"&&r&&!r.committing){const d=r.setDataValue({rowNode:this,column:a},t,s);if(d!=null)return d}const c=i.setValue(this,a,t,s);return this.dispatchCellChangedEvent(a,t,l),c&&this.pinnedSibling?.dispatchCellChangedEvent(a,t,l),c}getDataValue(e,t="data"){const{colModel:s,valueSvc:n,formula:i}=this.beans;if(e==null)return;const o=s.getCol(e)??s.getColDefCol(e);if(!o)return;const r=t==="data-raw",a=r||t==="value"?"data":t;let l=n.getValue(o,this,a,r);if(!r&&(i&&o.isAllowFormula()&&i.isFormula(l)&&(l=i.resolveValue(o,this)),t!=="data"&&o.getAggFunc()&&typeof l=="object"&&l!=null)){if(typeof l.toNumber=="function")return l.toNumber();if("value"in l)return l.value}return l}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,s){const n={type:"cellChanged",node:this,column:e,newValue:t,oldValue:s};this.__localEventService?.dispatchEvent(n)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){const t=this.childrenAfterGroup;if(t)for(let s=0,n=t.length;s<n;++s)t[s].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){const s=this.beans;return s.aggChildrenSvc?.getAggregatedChildren(this,s.colModel.getCol(e),t)??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,s="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:s})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??(this.__localEventService=new Bi)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);const s=this.__localEventService??(this.__localEventService=new Bi);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,s);const n=this.frameworkEventListenerService?.wrap(e,t)??t;s.addEventListener(e,n)}removeEventListener(e,t){const s=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,s)}removeLocalListener(e,t){const s=this.__localEventService;s&&(s.removeEventListener(e,t),s.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(X(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;const t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){const s=this.detailNode;s&&s._destroy(e);const n=this.sibling;n&&n._destroy(e)}return!0}};function ZE(e,t,s){return Te(t,{type:s,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var XE=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),QE=(e,t)=>{const s=new Xn(t);for(const n of Object.keys(e))XE.has(n)||(s[n]=e[n]);return s.oldRowTop=null,s},Fh=(e,t,s)=>{if(!s)return;let n=s.rowIndex;if(n==null)return;n+=t;const i=e.getRowCount();for(;n>=0&&n<i;){const o=e.getRow(n);if(!o||!o.footer&&!o.detail)return o;n+=t}},nm=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){const{all:t,visible:s,order:n}=this;t.has(e)||(t.add(e),s.add(e),n.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),_s(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(const t of this.visible)if(t.id==e)return t}clear(){const{all:e,visible:t,order:s,queued:n}=this;e.clear(),n.clear(),t.clear(),s.length=0}sort(){const{sortSvc:e,rowNodeSorter:t,gos:s}=this.beans,n=e?.getSortOptions()??[],i=this.order,o=tD(i);if(i.sort((a,l)=>t?.compareRowNodes(n,a,l)||(a.pinnedSibling?.rowIndex??0)-(l.pinnedSibling?.rowIndex??0)),!o)return;const r=Rw(s);r==="bottom"||r==="pinnedBottom"?this.order.push(o):this.order.unshift(o)}hide(e){const{all:t,visible:s}=this,n=s.size;return t.forEach(i=>e(i)?s.delete(i):s.add(i)),this.order=Array.from(s),this.sort(),n!=s.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function Zw(e){if(e.level===-1)return!0;const t=e.parent;return t?.childrenAfterSort?.some(s=>s==e)?Zw(t):!1}function wu(e,t){const{gos:s,rowModel:n,filterManager:i}=e;return ir(s)?!n.getRowNode(t.id):i?.isAnyFilterPresent()?!Zw(t):s.get("pivotMode")?!t.group:!1}function JE(e){return!!e.footer&&e.level===-1}function eD(e){return!!e.pinnedSibling&&JE(e.pinnedSibling)}function tD(e){const t=e.findIndex(eD);if(t>-1)return e.splice(t,1)?.[0]}var im=class extends _{constructor(){super(...arguments),this.csrm=null}postConstruct(){const{gos:e,beans:t}=this;this.top=new nm(t,"top"),this.bottom=new nm(t,"bottom"),this.csrm=Ys(t)??null;const s=i=>wu(t,i.pinnedSibling),n=()=>{const i=e.get("isRowPinned");i&&e.get("enableRowPinning")&&t.rowModel.forEachNode(o=>this.pinRow(o,i(o)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:i})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let o=!1;this.forContainers(a=>{o||(o=a.hide(s))});const r=this.refreshRowPositions();(!i||r||o)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(nD),this.refreshRowPositions()},rowNodeDataChanged:({node:i})=>{(e.get("isRowPinnable")?.(i)??!0)||this.pinRow(i,null)},firstDataRendered:n}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(i=>i.hide(s)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:i})=>{this._grandTotalPinned=i==="pinnedBottom"?"bottom":i==="pinnedTop"?"top":null}),this.addManagedPropertyListener("isRowPinned",n)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(t=>{const s=[];t.forEach(n=>s.push(n)),s.forEach(n=>this.pinRow(n,null)),t.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,s){if(t!=null&&e.destroyed)return;if(e.footer){const r=e.level;if(r>-1)return;if(r===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}const n=e.rowPinned??e.pinnedSibling?.rowPinned;if(n!=null&&t!=null&&t!=n){const r=e.rowPinned?e:e.pinnedSibling,a=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,s),this.pinRow(a,t,s);return}const o=s&&iD(this.beans,e,s);if(o){o.forEach(r=>this.pinRow(r,t));return}if(t==null){const r=e.rowPinned?e:e.pinnedSibling,a=this.findPinnedRowNode(r);if(!a)return;a.delete(r);const l=r.pinnedSibling;bu(r),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(l)}else{const r=om(this.beans,e,t),a=this.getContainer(t);a.add(r),wu(this.beans,e)&&a.hide(l=>wu(this.beans,l.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0;const s=n=>{if(n.rowHeightEstimated){const i=Kn(this.beans,n);n.setRowTop(t),n.setRowHeight(i.height),t+=i.height,e=!0}};return this.bottom.forEach(s),t=0,this.top.forEach(s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}getPinnedTopTotalHeight(){return rm(this.top)}getPinnedBottomTotalHeight(){return rm(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){const e=t=>{const s=[];return this.forEachPinnedRow(t,n=>{const i=n.pinnedSibling?.id;i!=null&&s.push(i)}),s};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,s)=>{for(const n of e[s]){const i=this.beans.rowModel.getRowNode(n);i?this.pinRow(i,s):t.queue(n)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{const s=new Set;e.forEachQueued(n=>{const i=this.beans.rowModel.getRowNode(n);i&&s.add(i)});for(const n of s)e.unqueue(n.id),this.pinRow(n,t)})}pinGrandTotalRow(){const{csrm:e,beans:t,_grandTotalPinned:s}=this;if(!e)return;const n=e.rootNode?.sibling;if(!n)return;const i=n.pinnedSibling,o=i&&this.findPinnedRowNode(i);if(s){if(o&&o.floating!==s&&(bu(i),o.delete(i)),!o||o.floating!==s){const r=om(t,n,s);this.getContainer(s).add(r)}}else{if(!o)return;bu(i),o.delete(i)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(t=>t.forEach(s=>s.setRowHeight(s.rowHeight,!0)))}getContainer(e){return e==="top"?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){const t=n=>sD(this.beans,n);if(e)return t(this.getContainer(e));let s=!1;return this.forContainers(n=>{const i=t(n);s||(s=i)}),s}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function sD(e,t){let s=0,n=!1;return t.forEach((i,o)=>{if(n||(n=i.rowTop!==s),i.setRowTop(s),i.rowHeightEstimated||i.rowHeight==null){const r=Kn(e,i).height;n||(n=i.rowHeight!==r),i.setRowHeight(r)}i.setRowIndex(o),s+=i.rowHeight}),n}function om(e,t,s){if(t.pinnedSibling)return t.pinnedSibling;const n=QE(t,e);n.setRowTop(null),n.setRowIndex(null),n.rowPinned=s;const i=s==="top"?Wp:_p;return n.id=`${i}${s}-${t.id}`,n.pinnedSibling=t,t.pinnedSibling=n,n}function bu(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);const t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function nD(e){const t=new Set;e.forEach(s=>{s.group&&t.add(s)}),t.forEach(s=>e.delete(s))}function iD(e,t,s){const{rowSpanSvc:n}=e,i=(s&&n?.isCellSpanning(s,t))??!1;if(s&&i)return n?.getCellSpan(s,t)?.spannedNodes}function rm(e){const t=e.size();if(t===0)return 0;const s=e.getByIndex(t-1);return s===void 0?0:s.rowTop+s.rowHeight}var am=class extends _{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const e=this.gos;this.setPinnedRowData(e.get("pinnedTopRowData"),"top"),this.setPinnedRowData(e.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",t=>this.setPinnedRowData(t.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",t=>this.setPinnedRowData(t.currentValue,"bottom")),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){const t=s=>{s.setRowHeight(s.rowHeight,!0)};kr(this.pinnedBottomRows,t),kr(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let e=!1,t=0;const s=n=>{if(n.rowHeightEstimated){const i=Kn(this.beans,n);n.setRowTop(t),n.setRowHeight(i.height),t+=i.height,e=!0}};return kr(this.pinnedBottomRows,s),t=0,kr(this.pinnedTopRows,s),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(e,t){const s=this.getCache(t);if(e===void 0){s.order.length=0,s.cache={};return}const n=qo(this.gos),i=t==="top"?Wp:_p,o=new Set(s.order),r=[],a=new Set;let l=0,c=-1;for(const d of e){const u=n?.({data:d,level:0,rowPinned:t})??i+this.nextId++;if(a.has(u)){X(96,{id:u,data:d});continue}c++,a.add(u),r.push(u);const p=Zr(s,u);if(p!==void 0)p.data!==d&&p.updateData(d),l+=this.setRowTopAndRowIndex(p,l,c),o.delete(u);else{const f=new Xn(this.beans);f.id=u,f.data=d,f.rowPinned=t,l+=this.setRowTopAndRowIndex(f,l,c),s.cache[u]=f,s.order.push(u)}}for(const d of o)Zr(s,d)?.clearRowTopAndRowIndex(),delete s.cache[d];s.order=r}setRowTopAndRowIndex(e,t,s){return e.setRowTop(t),e.setRowHeight(Kn(this.beans,e).height),e.setRowIndex(s),e.rowHeight}getPinnedTopTotalHeight(){return lm(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return lm(this.pinnedBottomRows)}getPinnedTopRowCount(){return Dh(this.pinnedTopRows)}getPinnedBottomRowCount(){return Dh(this.pinnedBottomRows)}getPinnedTopRow(e){return Eh(this.pinnedTopRows,e)}getPinnedBottomRow(e){return Eh(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return Zr(this.getCache(t),e)}forEachPinnedRow(e,t){return kr(this.getCache(e),t)}getCache(e){return e==="top"?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function lm(e){const t=Dh(e);if(t===0)return 0;const s=Eh(e,t-1);return s===void 0?0:s.rowTop+s.rowHeight}function Zr(e,t){return e.cache[t]}function Eh(e,t){return Zr(e,e.order[t])}function kr(e,t){e.order.forEach((s,n)=>{const i=Zr(e,s);i&&t(i,n)})}function Dh(e){return e.order.length}var oD=class extends _{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:e}=this,t=()=>{const s=e.get("enableRowPinning"),n=Rw(e),o=!!s||(n==="pinnedBottom"||n==="pinnedTop"),r=o?this.inner instanceof am:this.inner instanceof im;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(o?new im:new am))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,s){return this.inner.pinRow(e,t,s)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},rD=500,aD=550,xl,lD=e=>{if(!xl)xl=new WeakSet;else if(xl.has(e))return!1;return xl.add(e),!0},wi=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let s=this.eventSvc;if(!s){if(s===null)return;this.eventSvc=s=new Bi;const n=this.onTouchStart.bind(this);this.startListener=n,this.eElement.addEventListener("touchstart",n,{passive:!0})}s.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!lD(e))return;const t=e.touches[0];this.touchStart=t;const s=this.handlers;if(!s.length){const n=this.eElement,i=n.ownerDocument,o=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),l={passive:!0},c={passive:!1};Vl(s,[n,"touchmove",o,l],[i,"touchcancel",a,l],[i,"touchend",r,c],[i,"contextmenu",zn,c])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},aD)}onTouchMove(e){const{moved:t,touchStart:s}=this;if(!t&&s){const n=Mo(s,e.touches);n&&!nw(n,s,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){const t=this.touchStart;!t||!Mo(t,e.changedTouches)||(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&zn(e),this.cancel())}onTouchCancel(e){const t=this.touchStart;!t||!Mo(t,e.changedTouches)||(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now();const s=this.lastTapTime;s&&t-s>rD&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),Tp(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},cD=1,dD=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=cD++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(const t of e.beanClasses){const s=new t;s.beanName?this.beans[s.beanName]=s:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(s)}for(const t of e.derivedBeans??[]){const{beanName:s,bean:n}=t(this);this.beans[s]=n,this.createdBeans.push(n)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){const s=this.beans;for(const n of e)n.preWireBeans?.(s),n.wireBeans?.(s);for(const n of e)n.preConstruct?.();t&&e.forEach(t);for(const n of e)n.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function uD(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var hD=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],cm=Object.fromEntries(hD.map((e,t)=>[e,t]));function pD(e,t){const s=(e.beanName?cm[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,n=(t.beanName?cm[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return s-n}function gD(e,t){return e?.beanName==="gridDestroySvc"?-1:t?.beanName==="gridDestroySvc"?1:0}function fD(e){const{rowIndex:t,rowPinned:s,column:n}=e;return`${t}.${s??"null"}.${n.getId()}`}function Up(e,t){const s=e.column===t.column,n=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return s&&n&&i}function mD(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(le(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function vD(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function dm(e){let t=0,s;const{pinnedRowModel:n,rowModel:i,pageBounds:o}=e;return n?.getPinnedTopRowCount()?s="top":i.getRowCount()?(s=null,t=o.getFirstRow()):n?.getPinnedBottomRowCount()&&(s="bottom"),s===void 0?null:{rowIndex:t,rowPinned:s}}function um(e){let t,s=null;const{pinnedRowModel:n,pageBounds:i}=e,o=n?.getPinnedBottomRowCount(),r=n?.getPinnedTopRowCount();return o?(s="bottom",t=o-1):e.rowModel.getRowCount()?t=i.getLastRow():r&&(s="top",t=r-1),t===void 0?null:{rowIndex:t,rowPinned:s}}function Us(e,t){switch(t.rowPinned){case"top":return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case"bottom":return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function Eo(e,t){const s=e.spannedRowRenderer?.getCellByPosition(t);if(s)return s;const n=e.rowRenderer.getRowByPosition(t);return n?n.getCellCtrl(t.column):null}function CD(e,t,s){const{rowModel:n,pinnedRowModel:i}=e;let o;return o??(o=n?.getRowNode(t)),s?o??(o=i?.getPinnedRowById(t,s)):(o??(o=i?.getPinnedRowById(t,"top")),o??(o=i?.getPinnedRowById(t,"bottom"))),o}function wc(e,t,s=!1){const{rowIndex:n,rowPinned:i}=t,{pageBounds:o,pinnedRowModel:r,rowModel:a}=e;if(n===0)return i==="top"?null:i==="bottom"&&a.isRowsToRender()?{rowIndex:o.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null;if(s){const l=i?void 0:a.getRow(n);return Xw(e,l,!0)??{rowIndex:n-1,rowPinned:i}}return{rowIndex:n-1,rowPinned:i}}function hm(e,t,s=!1){const{rowIndex:n,rowPinned:i}=t,{pageBounds:o,pinnedRowModel:r,rowModel:a}=e;if(wD(e,t))return i==="bottom"?null:i==="top"&&a.isRowsToRender()?{rowIndex:o.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;if(s){const l=i?void 0:a.getRow(n);return Xw(e,l)??{rowIndex:n+1,rowPinned:i}}return{rowIndex:n+1,rowPinned:i}}function Xw(e,t,s=!1){const{gos:n,rowRenderer:i}=e;if(!t?.sticky||!Sw(n))return;const o=i.getStickyTopRowCtrls(),r=i.getStickyBottomRowCtrls(),a=!r.some(u=>u.rowNode.rowIndex===t.rowIndex),l=a?o:r,c=(s?-1:1)*(a?-1:1);let d;for(let u=0;u<l.length;u++)if(l[u].rowNode.rowIndex===t.rowIndex){d=l[u+c];break}return d?{rowIndex:d.rowNode.rowIndex,rowPinned:null}:void 0}function wD(e,t){const{rowPinned:s,rowIndex:n}=t,{pinnedRowModel:i,pageBounds:o}=e;return s==="top"?(i?.getPinnedTopRowCount()??0)-1<=n:s==="bottom"?(i?.getPinnedBottomRowCount()??0)-1<=n:o.getLastRow()<=n}function bD(e,t,s){t.addManagedElementListeners(s,{keydown:n=>{if(!n.defaultPrevented&&!FD(n)&&n.key===j.TAB){const i=n.shiftKey;Ji(e,s,!1,i)||Yo(e,i)&&n.preventDefault()}}})}function xD(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Fs(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function va(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function Yo(e,t,s=!1){const n=e.ctrlsSvc.get("gridCtrl"),i=n.focusNextInnerContainer(t);return i===!0?!0:i===!1?i:((s||!t&&!n.isDetailGrid()&&n.isFocusInsideGridBody())&&n.forceFocusOutOfContainer(t),!1)}function yD(e,t){const s=e.focusSvc,n=s.getFocusedCell();if(n&&t&&Up(n,t)){const{rowIndex:i,rowPinned:o,column:r}=t;bp(e)&&s.setFocusedCell({rowIndex:i,column:r,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!Uw()})}}function SD(e,t){const s=e.getFocusableContainerName();return s==="gridBody"?t():Qw(e,()=>Mi(e.getGui(),".ag-tab-guard").length>0)?s:null}function Qw(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var RD="__ag_Grid_Skip_Focusable_Container";function FD(e){return e[RD]===!0}function vs(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function $p(e){const t=[],s=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const n of s){if(!n)continue;const i=n.getGroupRowCount()||0;for(let o=0;o<i;o++){const r=n.getGroupRowCtrlAtIndex(o),a=t[o];if(r){const l=ED(e,r);(a==null||l>a)&&(t[o]=l)}}}return t}function ED(e,t){let n=e.colModel.isPivotMode()?PD(e):eb(e);const i=t.getHeaderCellCtrls();for(const o of i){const{column:r}=o,a=r.getAutoHeaderHeight();a!=null&&a>n&&r.isAutoHeaderHeight()&&(n=a)}return n}function qp(e){let s=e.colModel.isPivotMode()?DD(e):ka(e);return e.colModel.forAllCols(n=>{const i=n.getAutoHeaderHeight();i!=null&&i>s&&n.isAutoHeaderHeight()&&(s=i)}),s}function ka(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Jw(e){return e.gos.get("floatingFiltersHeight")??ka(e)}function eb(e){return e.gos.get("groupHeaderHeight")??ka(e)}function DD(e){return e.gos.get("pivotHeaderHeight")??ka(e)}function PD(e){return e.gos.get("pivotGroupHeaderHeight")??eb(e)}function TD(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function kD(e){return e?.headerRowIndex!=null}var ID=class extends _{setComp(e,t,s){this.comp=e,this.eGui=t;const{beans:n}=this,{headerNavigation:i,touchSvc:o,ctrlsSvc:r}=n;i&&this.createManagedBean(new Ta(s,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,n),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,n)}),this.onPivotModeChanged(n),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),o?.mockHeaderContextMenu(this,a),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>yn(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const s=$p(e).reduce((r,a)=>r+a,0),n=qp(e);e.filterManager?.hasFloatingFilters()&&(t+=Jw(e)),t+=s,t+=n;const i=e.environment.getHeaderRowBorderWidth(),o=t+i;if(this.headerHeightWithBorder!==o){this.headerHeightWithBorder=o;const r=`${o}px`;this.comp.setHeightAndMinHeight(r)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",t),this.comp.toggleCss("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const s=e.visibleCols.allCols.some(n=>n.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",s)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),s=e.shiftKey,n=s!==t?"LEFT":"RIGHT",{beans:i}=this,{headerNavigation:o,focusSvc:r}=i;(o.navigateHorizontally(n,!0,e)||!s&&r.focusOverlay(!1)||Yo(i,s,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:s}=this.beans;switch(e.key){case j.LEFT:t="LEFT";case j.RIGHT:{le(t)||(t="RIGHT"),s.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case j.UP:t="UP";case j.DOWN:{le(t)||(t="DOWN"),s.navigateVertically(t,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:s,beans:n}=this;!t&&s.contains(dt(n))||s.contains(t)||(n.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,s){const{menuSvc:n,ctrlsSvc:i}=this.beans;if(!e&&!s||!n?.isHeaderContextMenuEnabled())return;const{target:o}=e??t;(o===this.eGui||o===i.getHeaderRowContainerCtrl()?.eViewport)&&n.showHeaderContextMenu(void 0,e,s)}},Kp=class extends _{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=At(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:s}=this.beans,n=t.bodyWidth,i=t.getColsLeftWidth(),o=t.getDisplayedColumnsRightWidth();let r;e?r=n+i+o:(r=n,this.addSpacer&&(this.gos.get("enableRtl")?i:o)===0&&s.verticalScrollShowing&&(r+=s.getScrollbarWidth())),this.callback(r)}},rr=class extends _{};function Ia(e,t,s){return s&&e.addDestroyFunc(()=>t.destroyBean(s)),s??e}var Yp=class extends _{constructor(e,t,s,n){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=n,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=s}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?et(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,s=e.get("suppressColumnMoveAnimation"),n=le(this.columnOrGroup.getOldLeft());t?.isActive()&&n&&!s?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),s=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=s,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===s&&this.setLeft(s)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:s,visibleCols:n}=this.beans;if(!At(s,"print")||e.getPinned()==="left")return t;const o=n.getColsLeftWidth();if(e.getPinned()==="right"){const r=n.bodyWidth;return o+r+t}return o+t}setLeft(e){if(le(e)&&(this.eCell.style.left=`${e}px`),vt(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&R3(this.ariaEl,t.length)}}},MD="ag-column-first",AD="ag-column-last";function tb(e,t,s,n){return ht(e)?[]:ND(e.headerClass,e,t,s,n)}function sb(e,t,s){e.toggleCss(MD,s.isColAtEdge(t,"first")),e.toggleCss(AD,s.isColAtEdge(t,"last"))}function LD(e,t,s,n){return Te(t,{colDef:e,column:s,columnGroup:n})}function ND(e,t,s,n,i){if(ht(e))return[];let o;if(typeof e=="function"){const r=LD(t,s,n,i);o=e(r)}else o=e;return typeof o=="string"?[o]:Array.isArray(o)?[...o]:[]}var OD=0,nb="headerCtrl",Zp=class extends _{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+OD++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,s,n,i){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,s,n,i),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){const{headerRowIndex:t,column:s}=this.beans.focusSvc.focusedHeader,n=s.getDefinition(),i=n?.suppressHeaderKeyboardEvent;if(!le(i))return!1;const o=Te(this.gos,{colDef:n,column:s,headerRowIndex:t,event:e});return!!i(o)}getWrapperHasFocus(){return dt(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let s;if(typeof t=="function"){const n=this.getHeaderClassParams();s=t(n)}else s=t;s&&this.comp.setUserStyles(s)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:s,compBean:n}=e,{beans:i}=this,o=u=>{if(!this.isAlive()||!n.isAlive())return;const{paddingTop:p,paddingBottom:f,borderBottomWidth:m,borderTopWidth:v}=Xi(this.eGui),C=p+f+m+v,b=t.offsetHeight+C;if(u<5){const S=!Et(i)?.contains(t),y=b==0;if(S||y){fh(()=>o(u+1),"raf",i);return}}this.setColHeaderHeight(this.column,b)};let r=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!r&&c(),!u&&r&&d()},c=()=>{r=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),o(0),a=xn(this.beans,t,()=>o(0))},d=()=>{r=!1,a&&a(),this.comp.toggleCss("ag-header-cell-auto-height",!1),a=void 0};l(),n.addDestroyFunc(()=>d()),n.addManagedListeners(this.column,{widthChanged:()=>r&&o(0)}),n.addManagedEventListeners({sortChanged:()=>{r&&window.setTimeout(()=>o(0))}}),s&&s(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:s,eGui:n}=this;!e||!t||!n||(sb(e,t,s.visibleCols),YC(n,s.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Fs(this.beans);this.eGui&&Zt(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=dt(this.beans),s=e.key===j.LEFT||e.key===j.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||s)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&Nw(e)===j.C)return this.beans.clipboardSvc?.copyToClipboard();if(!s)return;const o=e.key===j.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const r=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(r,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:s}=this.beans;return s?s.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:s}=this;let n=e.key===j.LEFT!==t.get("enableRtl");const i=s.getPinned(),o=t.get("enableRtl");return i&&o!==(i==="right")&&(n=!n),(n?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case j.PAGE_DOWN:case j.PAGE_UP:case j.PAGE_HOME:case j.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=nb,{eGui:s,gos:n}=this;zi(n,s,t,this),e.addDestroyFunc(()=>zi(n,s,t,null))}focus(e){if(!this.isAlive())return!1;const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,s){const n=e??t,{menuSvc:i,gos:o}=this.beans;o.get("preventDefaultOnContextMenu")&&n.preventDefault(),i?.isHeaderContextMenuEnabled(s)&&i.showHeaderContextMenu(s,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",s)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:s}=this;e.isColumn?s.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):s.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},HD=class extends Zp{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,s,n,i){this.comp=e;const{rowCtrl:o,column:r,beans:a}=this,{colResize:l,context:c,colHover:d,rangeSvc:u}=a,p=Ia(this,c,i);this.setGui(t,p),this.updateState(),this.setupWidth(p),this.setupMovingCss(p),this.setupMenuClass(p),this.setupSortableClass(p),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:n,checkMeasuringCallback:m=>this.setRefreshFunction("measuring",m),compBean:p}),this.addColumnHoverListener(p),this.setupFilterClass(p),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(p),this.setupSelectAll(p),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=p.createManagedBean(l.createResizeFeature(o.pinned,r,s,e,this)):st(s,!1),d?.createHoverFeature(p,[r],t),u?.createRangeHighlightFeature(p,r,e),p.createManagedBean(new Yp(r,t,a)),p.createManagedBean(new Ta(t,{shouldStopEventPropagation:m=>this.shouldStopEventPropagation(m),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(p),p.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),p.addManagedListeners(r,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const f=()=>this.checkDisplayName();p.addManagedEventListeners({columnValueChanged:f,columnRowGroupChanged:f,columnPivotChanged:f,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),p.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return Te(t.gos,{colDef:s,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return RE(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:s,gos:n}=this.beans;return Te(n,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!s&&(!this.openFilterEnabled||Xt(this.gos)),showColumnMenu:(o,r)=>{e?.showColumnMenu({column:this.column,buttonElement:o,positionBy:"button",onClosedCallback:r})},showColumnMenuAfterMouseClick:(o,r)=>{e?.showColumnMenu({column:this.column,mouseEvent:o,positionBy:"mouse",onClosedCallback:r})},showFilter:o=>{e?.showFilterMenu({column:this.column,buttonElement:o,containerType:"columnFilter",positionBy:"button"})},progressSort:o=>{t?.progressSort(this.column,!!o,"uiColumnSorted")},setSort:(o,r)=>{t?.setSortForColumn(this.column,ws(o),!!r,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(o,r)=>{n.assertModuleRegistered("Tooltip",3),this.setupTooltip(o,r)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{const s=t.createSelectAllFeature(this.column);s&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(s),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!s&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===j.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===j.ENTER?this.onEnterKeyDown(e):e.key===j.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){const{column:t,gos:s,sortable:n,beans:i}=this;let o=!1;(e.ctrlKey||e.metaKey)&&(o=this.showMenuOnKeyPress(e,!0)),o||(!e.altKey&&Ho(s)?i.rangeSvc?.handleColumnSelection(t,e):n&&i.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const s=this.comp.getUserCompInstance();return pm(s)&&s.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),Uw()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),s=tb(t,this.gos,this.column,null),n=this.userHeaderClasses;this.userHeaderClasses=new Set(s);for(const i of s)n.has(i)?n.delete(i):this.comp.toggleCss(i,!0);for(const i of n)this.comp.toggleCss(i,!1)};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const s=this.column.getActualWidth();this.comp.setWidth(`${s}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const s=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",s),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,s=e===1;this.comp.toggleCss("ag-header-highlight-before",t),this.comp.toggleCss("ag-header-highlight-after",s)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:s,beans:n}=this,i=$p(this.beans),o=i.reduce((p,f)=>p+f,0)===0;if(s.toggleCss("ag-header-parent-hidden",o),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),s.toggleCss("ag-header-span-height",!1),s.toggleCss("ag-header-span-total",!1);return}const{numberOfParents:r,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();s.toggleCss("ag-header-span-height",r>0);const l=qp(n);if(r===0){s.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}s.toggleCss("ag-header-span-total",a);const c=(this.column.getFirstRealParent()?.getLevel()??-1)+1,d=i.length-c;let u=0;for(let p=0;p<d;p++)u+=i[i.length-1-p];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${l+u}px`)}refreshAriaSort(){let e=null;const{beans:t,column:s,comp:n,sortable:i}=this;if(i){const o=this.getLocaleTextFunc(),r=t.sortSvc?.getDisplaySortForColumn(s)??null;n.setAriaSort(g3(r)),e=o("ariaSortableColumn","Press ENTER to sort")}else n.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null;const{openFilterEnabled:t,gos:s}=this;t&&!Xt(s)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null;const{gos:t,column:s}=this;Ho(t)&&!_t(s)&&(e=this.getLocaleTextFunc()("ariaColumnCellSelection","Press Enter to toggle selection for all visible cells in this column")),this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){const s=this.ariaDescriptionProperties;t!=null?s.set(e,t):s.delete(e)}announceAriaDescription(){const{beans:e,eGui:t,ariaDescriptionProperties:s}=this;if(!t.contains(dt(e)))return;const n=Array.from(s.keys()).sort((i,o)=>i==="filter"?-1:o.charCodeAt(0)-i.charCodeAt(0)).map(i=>s.get(i)).join(". ");e.ariaAnnounce?.announceValue(n,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),s=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},n=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:s,contextmenu:n})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.toggleCss("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return pm(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function pm(e){return typeof e?.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var BD=0,xu=class extends _{constructor(e,t,s){super(),this.rowIndex=e,this.pinned=t,this.type=s,this.instanceId=BD++,this.comp=null,this.allCtrls=[];let n="ag-header-row-column";s==="group"?n="ag-header-row-group":s==="filter"&&(n="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${n}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=At(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,s=!0){this.comp=e,t=Ia(this,this.beans.context,t),s&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),s=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:s,virtualColumnsChanged:n=>this.onVirtualColumnsChanged(n.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",s),e.addManagedPropertyListener("ensureDomOrder",n=>this.isEnsureDomOrder=n.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=At(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0;const t=$p(this.beans);for(let i=0;i<t.length;i++){if(i===this.rowIndex&&this.type==="group")return{topOffset:e,rowHeight:t[i]};e+=t[i]}const s=qp(this.beans);if(this.type==="column")return{topOffset:e,rowHeight:s};e+=s;const n=Jw(this.beans);return{topOffset:e,rowHeight:n}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;const t=this.getUpdatedHeaderCtrls(),s=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,s,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const n of t)this.recycleAndCreateHeaderCtrls(n,this.ctrlsById,e);const s=n=>{const{focusSvc:i,visibleCols:o}=this.beans;return i.isHeaderWrapperFocused(n)?o.isVisible(n.column):!1};if(e)for(const[n,i]of e)s(i)?this.ctrlsById.set(n,i):this.destroyBean(i);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,s){if(e.isEmptyGroup())return;const n=e.getUniqueId();let i;if(s&&(i=s.get(n),s.delete(n)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case"filter":{i=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":i=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:i=this.createBean(new HD(e,this));break}t.set(n,i)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const e=[];for(const t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type==="group"?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){const s=this.allCtrls.find(i=>i.column==e);return s?s.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},GD=class extends _{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:s,ctrlsSvc:n,colModel:i,colMoves:o}=this.beans;this.setupCenterWidth(),s?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(o,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r});const a=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;n.register(a,this),i.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,filterManager:s,visibleCols:n}=this.beans;let i=0;const o=t.getFocusHeaderToUseAfterRefresh(),r=()=>{const u=n.headerGroupRowCount;i=u,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const p=this.groupsRowCtrls.length;if(p!==u){if(p>u){for(let f=u;f<p;f++)this.destroyBean(this.groupsRowCtrls[f]);this.groupsRowCtrls.length=u;return}for(let f=p;f<u;f++){const m=this.createBean(new xu(f,this.pinned,"group"));this.groupsRowCtrls.push(m)}}},a=()=>{const u=i++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new xu(u,this.pinned,"column"))):this.columnsRowCtrl.rowIndex!==u&&this.columnsRowCtrl.setRowIndex(u)},l=()=>{this.includeFloatingFilter=!!s?.hasFloatingFilters()&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}e||u();const p=i++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==p&&this.filtersRowCtrl.setRowIndex(p):this.filtersRowCtrl=this.createBean(new xu(p,this.pinned,"filter"))},c=this.getAllCtrls();r(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,o),c.length!==d.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){const t=s=>s?.getHeaderCellCtrls().find(n=>n.column===e);if(Zn(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let s=0;s<this.groupsRowCtrls.length;s++){const n=t(this.groupsRowCtrls[s]);if(n)return n}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,s){const i=this.getAllCtrls()[e];return i?i.focusHeader(t,s):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const s=e?.createBodyDropTarget(this.pinned,t);s&&this.createManagedBean(s)}restoreFocusOnHeader(e,t){if(!t)return;const{column:s}=t;s.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new Kp(e=>this.comp.setCenterWidth(`${e}px`),!0))}},ql={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Xp=class extends _{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},s=t.autoHeight?ql.AUTO_HEIGHT:t.print?ql.PRINT:ql.NORMAL;this.view.updateLayoutClasses(s,t)}},ib=class extends ft{constructor(e,t){super(),this.direction=t,this.eViewport=xe,this.eContainer=xe,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",zw()||Ii())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=_w(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.toggleCss("ag-scrollbar-active",!0),s=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:s,touchend:s})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),yn(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;Y3(this,()=>Ts(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},VD={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},jD=class extends ib{constructor(){super(VD,"horizontal"),this.eLeftSpacer=xe,this.eRightSpacer=xe,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new Kp(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const s=!this.enableRtl&&e,n=this.scrollVisibleSvc.getScrollbarWidth();s&&(t+=n),Vs(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=n);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=n),Vs(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle("ag-scroller-corner",i<=n)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,s=this.gos.get("suppressHorizontalScroll"),n=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,o=s?0:n===0&&t?16:n,r=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),qr(this.getGui(),o),qr(this.eViewport,o),qr(this.eContainer,o),o||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(r,100):r()}getScrollPosition(){return oc(this.eViewport,this.enableRtl)}setScrollPosition(e){Ts(this.eViewport)||this.attemptSettingScrollPosition(e),rc(this.eViewport,e,this.enableRtl)}},ob=class extends _{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,s=t!=null?`${t}px`:"";this.eContainer.style.height=s,this.eViewport&&(this.eViewport.style.height=s)}},zD={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},WD=class extends ib{constructor(){super(zD,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new ob(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,s=this.invisibleScrollbar,n=t&&e.getScrollbarWidth()||0,i=n===0&&s?16:n;this.toggleCss("ag-scrollbar-invisible",s),Vs(this.getGui(),i),Vs(this.eViewport,i),Vs(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const s=e.getGridBodyCtrl().eBodyViewport,n=this.getScrollPosition(),i=s.scrollTop;n!=i&&this.setScrollPosition(i,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!Ts(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Ln="Viewport",gm="fakeVScrollComp",yu=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],fm=100,Su=150,_D=class extends _{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=xt(this,()=>this.lastScrollSource[1]=null,Su),this.resetLastVScrollDebounced=xt(this,()=>this.lastScrollSource[0]=null,Su)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,s=>{this.centerRowsCtrl=s.center,this.fakeVScrollComp=s.fakeVScrollComp,this.fakeHScrollComp=s.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,Ln)});for(const e of yu){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.gos.get("debounceVerticalScrollbar"),t=e?xt(this,this.onVScroll.bind(this,Ln),fm):this.onVScroll.bind(this,Ln),s=e?xt(this,this.onVScroll.bind(this,gm),fm):this.onVScroll.bind(this,gm);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,s)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...yu,Ln]){if(this.lastScrollSource[1]===t)continue;const s=this.getViewportForSource(t);rc(s,e,this.enableRtl)}}getViewportForSource(e){return e===Ln?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:s}=t;if(this.shouldBlockScrollUpdate(1,s,!0))return;const n=oc(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(n),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;const t=e===Ln?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition();let s=t;if(this.shouldBlockScrollUpdate(0,s,!0))return;e===Ln?this.fakeVScrollComp.setScrollPosition(s):(this.eBodyViewport.scrollTop=t,s=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),s!==t&&this.fakeVScrollComp.setScrollPosition(s,!0));const{animationFrameSvc:n}=this;n?.setScrollTop(s),this.nextScrollTop=s,n?.active?n.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.fakeHScrollComp.getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Su)}shouldBlockScrollUpdate(e,t,s=!1){return s&&!Ii()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Fp(this.eBodyViewport),{scrollHeight:s}=this.eBodyViewport;return e<0||e+t>s}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:s}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>s}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const e=this.scrollLeft;let t=!1;for(const s of yu)if(this.getViewportForSource(s).scrollLeft!==e){t=!0;break}t&&this.onHScroll(Ln)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const n=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:n:e=Math.min(Math.max(e,0),n)),rc(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:s,lastScrollTop:n}=this;return{top:n,bottom:n+s}}this.isVerticalPositionInvalidated=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){const{rowModel:s}=this.beans,n=s.getRowCount();let i=-1;for(let o=0;o<n;o++){const r=s.getRow(o);if(typeof e=="function"){if(r&&e(r)){i=o;break}}else if(e===r||e===r.data){i=o;break}}i>=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t,s=0){if(At(this.gos,"print"))return;const{rowModel:n}=this.beans,i=n.getRowCount();if(typeof e!="number"||e<0||e>=i){X(88,{index:e});return}this.clearRetryListeners();const{frameworkOverrides:o,pageBounds:r,rowContainerHeight:a,rowRenderer:l}=this.beans;o.wrapIncoming(()=>{const c=this.ctrlsSvc.getGridBodyCtrl(),d=n.getRow(e);let u,p,f=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:m,stickyBottomHeight:v}=c,C=d.rowTop,w=d.rowHeight,b=r.getPixelOffset(),x=d.rowTop-b,S=x+d.rowHeight,y=this.getVScrollPosition(),R=a.divStretchOffset,E=y.top+R,F=y.bottom+R,P=F-E,k=a.getScrollPositionForPixel(x),D=a.getScrollPositionForPixel(S-P),T=Math.min((k+D)/2,x),I=E+m>x,H=F-v<S;let A=null;t==="top"?A=k-m:t==="bottom"?A=D+v:t==="middle"?A=T:I?A=k-m:H&&(D-k>P?A=k-m:A=D+v),A!==null&&(this.setVerticalScrollPosition(A),l.redraw({afterScroll:!0})),u=C!==d.rowTop||w!==d.rowHeight,p=m!==c.stickyTopHeight||v!==c.stickyBottomHeight,f++}while((u||p)&&f<10);if(this.animationFrameSvc?.flushAllFrames(),s<10&&(d?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const m=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const v=this.getVScrollPosition().top;m!==v&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=n.getRowCount())&&this.ensureIndexVisible(e,t,s+1)}})}})}clearRetryListeners(){for(const e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){const{colModel:s,frameworkOverrides:n}=this.beans,i=s.getCol(e);if(!i||i.isPinned()||!this.visibleCols.isColDisplayed(i))return;const o=this.getPositionedHorizontalScroll(i,t);n.wrapIncoming(()=>{o!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(o),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:s,columnAfterEnd:n}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),o=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let a=(r?s:n)||i,l=r?n:s;t!=="auto"&&(a=t==="start",l=t==="end");const c=t==="middle";if(a||l||c){const{colLeft:d,colMiddle:u,colRight:p}=this.getColumnBounds(e);return c?u-o/2:a?r?p:d:r?d-o:p-o}return null}isColumnOutsideViewport(e){const{start:t,end:s}=this.getViewportBounds(),{colLeft:n,colRight:i}=this.getColumnBounds(e),o=this.enableRtl,r=o?t>i:s<i,a=o?s<n:t>n;return{columnBeforeStart:r,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,s=this.visibleCols.bodyWidth,n=e.getActualWidth(),i=e.getLeft(),o=t?-1:1,r=t?s-i:i,a=r+n*o,l=r+n/2*o;return{colLeft:r,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),s=t,n=e+t;return{start:s,end:n,width:e}}},mm={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function UD(e,t,s=Gp()||0,n,i){return rb(e,t,"horizontal",s,n,i)}function $D(e,t,s=Gp()||0,n,i){return rb(e,t,"vertical",s,n,i)}function rb(e,t,s,n,i,o){const r=mm[s],a=mm[r.opposite],l=i?Ts(i):!0,c=o?Ts(o):!0,d=r.overflow(e);if(d<=0)return!1;if(!t||n===0)return!0;const u=a.overflow(t);if(u<=0)return!0;if(d<=n){if(l&&c&&qD({candidateOverflow:u,candidateScrollSize:a.scrollSize(t),candidateClientSize:a.clientSize(t),scrollbarWidth:n}))return!1;const p=r.clientSize(e)+n;return r.scrollSize(e)<=p}return!0}function qD({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:s,scrollbarWidth:n}){if(e<=0||e>n)return!1;const i=s+n;return t>s&&t<=i}var KD=class extends _{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:s}=this,n=()=>{yn(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(n),s.registerBodyViewportResizeListener(n)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const s=this.centerContainerCtrl.getCenterWidth();s!==this.centerWidth&&(this.centerWidth=s,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=Fp(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const{centerContainerCtrl:e,beans:t}=this,s=e.getCenterWidth(),n=e.getViewportScrollLeft();t.colViewport.setScrollPosition(s,n)}};function ab(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function Kl(e,t,s,n){const i=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return lb(e,t,s,n,i)}function YD(e,t,s,n){const i=t?.suppressMouseEventHandling;return lb(e,void 0,s,n,i)}function lb(e,t,s,n,i){return i?i(Te(e,{column:t,node:s,event:n})):!1}function cb(e,t,s){let n=t;for(;n;){const i=yw(e,n,s);if(i)return i;n=n.parentElement}return null}var bc="cellCtrl";function Qp(e,t){return cb(e,t,bc)}var xc="renderedRow";function ZD(e,t){return cb(e,t,xc)}function Ph(e,t,s,n,i){const o=n?n.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const r=Te(e,{event:t,editing:i,column:n,node:s,data:s.data,colDef:n.getColDef()});return!!(o&&o(r))}function XD(e){const{pinnedRowModel:t,rowModel:s,rangeSvc:n,visibleCols:i}=e;if(!n||i.allCols.length===0)return;const o=t?.isEmpty("top")??!0,r=t?.isEmpty("bottom")??!0,a=o?null:"top";let l,c;r?(l=null,c=s.getRowCount()-1):(l="bottom",c=t?.getPinnedBottomRowCount()??-1),n.setCellRange({rowStartIndex:0,rowStartPinned:a,rowEndIndex:c,rowEndPinned:l})}var QD=class extends _{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";lc("pointerdown")?e="pointerdown":lc("touchstart")&&(e="touchstart");const t=["dblclick","contextmenu","mouseover","mouseout","click",e];for(const s of t){const n=this.processMouseEvent.bind(this,s);this.addManagedElementListeners(this.element,{[s]:n})}}processMouseEvent(e,t){if(!pa(this.beans,t)||dn(t))return;const{cellCtrl:s,rowCtrl:n}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(s?.column&&s.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,n,s)):(s&&s.onMouseEvent(e,t),n&&n.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:Qp(t,e),rowCtrl:ZD(t,e)}}processKeyboardEvent(e,t){const{cellCtrl:s,rowCtrl:n}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(s?this.processCellKeyboardEvent(s,e,t):n?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(n,e,t))}processCellKeyboardEvent(e,t,s){const n=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!Ph(this.gos,s,e.rowNode,e.column,n)&&t==="keydown"&&(!n&&this.beans.navigation?.handlePageScrollingKey(s)||e.onKeyDown(s),this.doGridOperations(s,n),ab(s)&&e.processCharacter(s)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(s,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,s){const{rowNode:n}=e,{focusSvc:i,navigation:o}=this.beans,a=i.getFocusedCell()?.column;if(!Ph(this.gos,s,n,a,!1)){const c=s.key;if(t==="keydown")switch(c){case j.PAGE_HOME:case j.PAGE_END:case j.PAGE_UP:case j.PAGE_DOWN:o?.handlePageScrollingKey(s,!0);break;case j.LEFT:case j.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case j.UP:case j.DOWN:e.onKeyboardNavigate(s);break;case j.TAB:e.onTabKeyDown(s);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",s))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!pa(this.beans,e))return;const s=Nw(e),{clipboardSvc:n,undoRedo:i}=this.beans;if(s===j.A)return this.onCtrlAndA(e);if(s===j.C)return this.onCtrlAndC(n,e);if(s===j.D)return this.onCtrlAndD(n,e);if(s===j.V)return this.onCtrlAndV(n,e);if(s===j.X)return this.onCtrlAndX(n,e);if(s===j.Y)return this.onCtrlAndY(i);if(s===j.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:s,selectionSvc:n},gos:i}=this;s&&Yn(i)&&!RF(i)&&t.isRowsToRender()?XD(this.beans):n&&n.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Pw(i)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:s}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(s,{withOpenEditor:!0})||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},yl=e=>e.topRowCtrls,Sl=e=>e.getStickyTopRowCtrls(),Rl=e=>e.getStickyBottomRowCtrls(),Fl=e=>e.bottomRowCtrls,El=e=>e.allRowCtrls,Ru=e=>e.getCtrls("top"),Fu=e=>e.getCtrls("center"),Eu=e=>e.getCtrls("bottom"),JD={center:{type:"center",name:"center-cols",getRowCtrls:El,getSpannedRowCtrls:Fu},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:El,getSpannedRowCtrls:Fu},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:El,getSpannedRowCtrls:Fu},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:El},topCenter:{type:"center",name:"floating-top",getRowCtrls:yl,getSpannedRowCtrls:Ru},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:yl,getSpannedRowCtrls:Ru},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:yl,getSpannedRowCtrls:Ru},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:yl},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:Sl},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:Sl},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:Sl},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:Sl},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:Rl},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:Rl},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:Rl},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:Rl},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:Fl,getSpannedRowCtrls:Eu},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:Fl,getSpannedRowCtrls:Eu},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:Fl,getSpannedRowCtrls:Eu},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:Fl}};function db(e){return`ag-${Ma(e).name}-viewport`}function ub(e){const t=Ma(e);return t.container??`ag-${t.name}-container`}function e5(e){return`ag-${Ma(e).name}-spanned-cells-container`}function Ma(e){return JD[e]}var t5=["topCenter","topLeft","topRight"],s5=["bottomCenter","bottomLeft","bottomRight"],n5=["center","left","right"],i5=["center","left","right","fullWidth"],o5=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],r5=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],a5=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],hb=["stickyTopCenter","stickyTopLeft","stickyTopRight"],pb=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],l5=[...hb,"stickyTopFullWidth",...pb,"stickyBottomFullWidth"],c5=[...t5,...s5,...n5,...hb,...pb],d5=class extends _{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=Ma(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new KD(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,s,n){this.comp=e,this.eContainer=t,this.eSpannedContainer=s,this.eViewport=n,this.createManagedBean(new QD(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:i,rangeSvc:o}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(r5,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})}),this.forContainers(a5,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})}),this.forContainers(i5,()=>this.createManagedBean(new ob(this.eContainer,this.name==="center"?n:void 0))),o&&this.forContainers(c5,()=>this.createManagedBean(o.createDragListenerFeature(this.eContainer))),this.forContainers(o5,()=>this.createManagedBean(new Kp(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans,s=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:s,displayedColumnsWidthChanged:s,displayedRowsChanged:n=>this.onDisplayedRowsChanged(n.afterScroll)}),s(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const n=this.options.getSpannedRowCtrls(e);n&&this.comp.setSpannedRowCtrls(n,!1)}})}listenOnDomOrder(){if(l5.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const s=this.gos.get("ensureDomOrder"),n=At(this.gos,"print");this.comp.setDomOrder(s||n)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=s=>{e.dragging&&s.cancelable&&s.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),s=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,s,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return ua(this.eViewport)}getCenterViewportScrollLeft(){return oc(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=xn(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return ew(this.eViewport)}getViewportScrollLeft(){return oc(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){const{beans:e,gos:t,eViewport:s}=this,n=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:i}=e,o=i.getGridBodyCtrl()?.eBodyViewport,r=i.get("fakeHScrollComp")?.getGui(),a=i.get("fakeVScrollComp")?.getGui();return n||UD(s,o,void 0,r,a)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){rc(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const s=At(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||s,o=t.filter(r=>{const a=r.isFullWidth();return this.options.fullWidth?!i&&a:i||!a});this.comp.setRowCtrls({rowCtrls:o,useFlushSync:e})}},u5="ag-force-vertical-scroll",h5="ag-selectable",p5="ag-column-moving",g5=class extends _{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,s,n,i,o,r){this.comp=e,this.eGridBody=t,this.eBodyViewport=s,this.eTop=n,this.eBottom=i,this.eStickyTop=o,this.eStickyBottom=r,this.eCenterColsViewport=s.querySelector(`.${db("center")}`),this.eFullWidthContainer=s.querySelector(`.${ub("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new Xp(this.comp)),this.scrollFeature=this.createManagedBean(new _D(s)),this.beans.rowDragSvc?.setupRowDrag(s,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([n,s,i,o,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(n),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),s=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:s,rowResizeEnded:s}),this.addManagedPropertyListener("treeData",t)}toggleRowResizeStyles(e){const t=e.type==="rowResizeStarted";this.eBodyViewport.classList.toggle("ag-prevent-animation",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const s=t&&e.getScrollbarWidth()||0,n=_w()?16:0,i=`calc(100% + ${s+n}px)`;yn(this.beans,()=>this.comp.setBodyViewportWidth(i)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t,gos:s}=this;let n=s.get("treeData");if(!n){const i=t.isPivotMode();n=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(n?"treegrid":"grid")}addFocusListeners(e){for(const t of e)this.addManagedElementListeners(t,{focusin:s=>{const{target:n}=s,i=Di(n,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:s=>{const{target:n,relatedTarget:i}=s,o=t.contains(i),r=Di(i,"ag-root",t);Di(n,"ag-root",t)||(!o||r)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(p5,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(h5,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,s=t.isLastRowIndexKnown()?t.getRowCount():-1,n=s===-1?-1:e+s;this.comp.setRowCount(n)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const{gos:e,comp:t,ctrlsSvc:s}=this,n=e.get("alwaysShowVerticalScroll"),i=n?u5:null,o=At(e,"normal");t.setAlwaysVerticalScrollClass(i,n);const r=s.get("center")?.eViewport,a=s.get("fakeHScrollComp")?.getGui(),l=s.get("fakeVScrollComp")?.getGui();return n||o&&$D(this.eBodyViewport,r,void 0,l,a)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let s=t.sizesMeasured;const n=()=>{const i=s&&No(this.gos)&&!e.stretching,o=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(o,i)};n(),this.addManagedEventListeners({heightScaleChanged:n}),this.addManagedPropertyListener("animateRows",n),this.addManagedEventListeners({stylesChanged:()=>{!s&&t.sizesMeasured&&(s=!0,n())}})}addBodyViewportListener(){const{eBodyViewport:e,eStickyTop:t,eStickyBottom:s,eTop:n,eBottom:i,beans:{popupSvc:o,touchSvc:r}}=this,a=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:a}),r?.mockBodyContextMenu(this,a),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,o)});const l=this.onStickyWheel.bind(this);for(const d of[t,s,n,i])this.addManagedElementListeners(d,{wheel:l});const c=this.onHorizontalWheel.bind(this);for(const d of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(d).eContainer,{wheel:c});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:s,shiftKey:n}=e;(n||Math.abs(t)>Math.abs(s))&&pa(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){const{deltaX:t,deltaY:s,shiftKey:n}=e;(n||Math.abs(t)>Math.abs(s))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:s}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||s})}onBodyViewportContextMenu(e,t,s){if(!e&&!s)return;this.gos.get("preventDefaultOnContextMenu")&&(e||s).preventDefault();const{target:n}=e||t;(n===this.eBodyViewport||n===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:s,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e,beans:{environment:t}}=this,s=e?.getPinnedTopTotalHeight(),n=e?.getPinnedBottomTotalHeight(),i=t.getPinnedRowBorderWidth(),o=t.getRowBorderWidth(),r=i-o,a=s?r+s:0,l=n?r+n:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(l),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(l<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),s=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let n=0;t>0&&(n+=t),s>0&&(n+=s),n>0&&(n+=1),this.comp.setStickyTopTop(`${n}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:s}=this,n=e?.getPinnedBottomTotalHeight()??0,o=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,r=n+o;s.setStickyBottomBottom(`${r}px`)}};function cs(e){return Vi(e)}var Vo={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},gb=class extends qt{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:s,eTopGuard:n,eBottomGuard:i,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:r,isFocusableContainer:a,focusInnerElement:l,onFocusIn:c,onFocusOut:d,shouldStopEventPropagation:u,onTabKeyDown:p,handleKeyDown:f,isEmpty:m,eFocusableElement:v}=e;this.comp=s,this.eTopGuard=n,this.eBottomGuard=i,this.providedFocusInnerElement=l,this.eFocusableElement=v,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!r,this.isFocusableContainer=!!a,this.providedFocusIn=c,this.providedFocusOut=d,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=p,this.providedHandleKeyDown=f,this.providedIsEmpty=m}postConstruct(){this.createManagedBean(new qw(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(const e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Mi(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=Et(this.beans),s=Mi(t.body,null,!0),n=s.indexOf(e?this.eTopGuard:this.eBottomGuard);if(n===-1)return;let i,o;e?(i=0,o=n):(i=n+1,o=s.length);const r=s.slice(i,o),a=this.gos.get("tabIndex");r.sort((l,c)=>{const d=Number.parseInt(l.getAttribute("tabindex")||"0"),u=Number.parseInt(c.getAttribute("tabindex")||"0");return u===a?1:d===a?-1:d===0?1:u===0?-1:d-u}),r[e?r.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const s=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),s&&(s.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Mi(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Ji(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},f5=class extends qt{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:s,eFocusableElement:n,stopPropagationCallbacks:i}=this,o=[t,s],r={setTabIndex:w=>{for(const b of o)w==null?b.removeAttribute("tabindex"):b.setAttribute("tabindex",w)}};this.addTabGuards(t,s);const{focusTrapActive:a=!1,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:p,shouldStopEventPropagation:f,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:v,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new gb({comp:r,focusTrapActive:a,eTopGuard:t,eBottomGuard:s,eFocusableElement:n,onFocusIn:l,onFocusOut:c,focusInnerElement:d,handleKeyDown:u,onTabKeyDown:p,shouldStopEventPropagation:f,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:v,isFocusableContainer:C},i))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Et(this.beans).createElement("div"),s=e==="top"?Vo.TAB_GUARD_TOP:Vo.TAB_GUARD_BOTTOM;return t.classList.add(Vo.TAB_GUARD,s),Gi(t,"presentation"),t}addTabGuards(e,t){const s=this.eFocusableElement;s.prepend(e),s.append(t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Jt(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,s){Pp(t)||(t=t.getGui());const{eBottomGuard:n}=this;n?n.before(t):e(t,s)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;pn(e),pn(t),super.destroy()}},m5=class extends or{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new f5(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},v5=class extends m5{initialiseTabGuard(t){super.initialiseTabGuard(t,Vp)}},vm=(e,t)=>Qw(e,()=>Wi(e.getGui(),t,!1,!0)),Cm=e=>e?.getFocusableContainerName()??"external",C5=e=>e==null?"external":typeof e=="string"?e:"gridBody",w5=class extends _{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,s){this.view=e,this.eGridHostDiv=t,this.eGui=s,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:n,ctrlsSvc:i}=this.beans;n?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new Xp(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const o=xn(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>o()),i.register("gridCtrl",this)}isDetailGrid(){return $w(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){const{view:t}=this;e===!1?t.setCursor(null):t.setCursor(e===1?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:s,nextIndex:n}=this.getNextFocusableIndex(t,e),i=s===-1?e?t.length-1:0:n,{gos:o,beans:{focusSvc:r,navigation:a}}=this,l=o.getCallback("tabToNextGridContainer");if(l){const c=r.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:i}),d=Cm(t[i]),u=c==null&&d==="gridBody"?"gridBody":C5(c),p=l({backwards:e,previousContainer:Cm(t[s]),nextContainer:u,defaultTarget:c});if(p!==void 0){if(typeof p=="boolean")return p;if(typeof p=="string"){if(p==="gridBody")return this.focusGridBodyDefault(e)||void 0;const f=t.find(m=>m.getFocusableContainerName()===p);if(!f){cw(`tabToNextGridContainer - ${p} container not found`);return}return vm(f,e)?!0:void 0}return kD(p)?r.focusHeaderPosition({headerPosition:p})||void 0:(a?.ensureCellVisible(p),r.setFocusedCell({...p,forceBrowserFocus:!0}),r.isCellFocused(p)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:s,nextIndex:i})||void 0}focusInnerElement(e){const{gos:t,beans:s,beans:{focusSvc:n,visibleCols:i}}=this;if(t.getCallback("focusGridInnerElement")?.({fromBottom:!!e}))return!0;const r=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:r,indexWithFocus:r.length,nextIndex:r.length-1})?!0:n.focusGridView({column:et(i.allCols),backwards:!0});const a=i.allCols;if(t.get("headerHeight")===0||Fs(s)){if(n.focusGridView({column:a[0],backwards:e}))return!0;for(let l=1;l<r.length;l++)if(Wi(r[l].getGui(),e))return!0;return!1}return n.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}isFocusInsideGridBody(){const e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()==="gridBody"}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{indexWithFocus:s,nextIndex:n}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:s,nextIndex:n})||this.forceFocusOutOfContainer(e)}isFocusable(){const e=this.beans;return!va(e)||!Fs(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const s=dt(this.beans),n=e.findIndex(i=>i.getGui().contains(s));return{indexWithFocus:n,nextIndex:n+(t?-1:1)}}focusGridBodyDefault(e){const{gos:t,beans:s,beans:{focusSvc:n,visibleCols:{allCols:i}}}=this;return e?n.focusGridView({column:et(i),backwards:!0}):t.get("headerHeight")===0||Fs(s)?n.focusGridView({column:i[0]}):n.focusFirstHeader()}focusNextInnerContainerDefault(e){const{backwards:t,focusableContainers:s,indexWithFocus:n}=e,i=t?-1:1;for(let o=e.nextIndex;o>=0&&o<s.length;o+=i){const r=s[o];if(r.getFocusableContainerName()==="gridBody"&&(n===-1||(t?n>o:n<o))){if(this.focusGridBodyDefault(t))return!0;continue}if(vm(r,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},He=(e,t)=>{for(const s of Object.keys(t))t[s]=e;return t},wm={dispatchEvent:"CommunityCore",...He("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...He("GridState",{getState:0,setState:0}),...He("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...He("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...He("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...He("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...He("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...He("ValueCache",{expireValueCache:0}),...He("CellApi",{getCellValue:0}),...He("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...He("Sort",{onSortChanged:0}),...He("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...He("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...He("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...He("HighlightChanges",{flashCells:0}),...He("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...He("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...He("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...He("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...He("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...He("ColumnResize",{setColumnWidths:0}),...He("ColumnHover",{isColumnHovered:0}),...He("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...He("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...He("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...He("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...He("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...He("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...He("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...He("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...He("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...He("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...He("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...He("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...He("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...He("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...He("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...He("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...He("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...He("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...He("ContextMenu",{showContextMenu:0}),...He("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...He("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...He("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...He("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...He("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...He("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...He("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...He("StatusBar",{getStatusPanel:0}),...He("AiToolkit",{getStructuredSchema:0})},Du={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},b5=(e,t)=>e.eventSvc.dispatchEvent(t),fb=class{};Reflect.defineProperty(fb,"name",{value:"GridApi"});var x5=class extends _{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new fb,this.fns={...Du,dispatchEvent:b5},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(wm))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:s,beans:n}=this;s!==Du&&(s[e]=n?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:s,fns:{[e]:n}}=this;return n?n(s,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:s,preDestroyLink:n}=this;if(!t)X(26,{fnName:e,preDestroyLink:n});else{const i=wm[e];s.assertModuleRegistered(i,`api.${e}`)&&X(27,{fnName:e,module:i})}}destroy(){super.destroy(),this.fns=Du,this.beans=null}};function mb(e){return e.context.getId()}function y5(e){e.gridDestroySvc.destroy()}function S5(e){return e.gridDestroySvc.destroyCalled}function R5(e,t){return e.gos.get(t)}function F5(e,t,s){vb(e,{[t]:s})}function vb(e,t){e.gos.updateGridOptions({options:t})}function E5(e,t){const s=t.replace(/Module$/,"");return e.gos.isModuleRegistered(s)}function D5(e,t,s){const n=Qt(e,t,s);if(n){const{className:o}=n;if(typeof o=="string"&&o.includes("ag-icon")||typeof o=="object"&&o["ag-icon"])return n}const i=cs({tag:"span"});return i.appendChild(n),i}function Qt(e,t,s){let n=null;e==="smallDown"?X(262):e==="smallLeft"?X(263):e==="smallRight"&&X(264);const i=s?.getColDef().icons;if(i&&(n=i[e]),t.gos&&!n){const o=t.gos.get("icons");o&&(n=o[e])}if(n){let o;if(typeof n=="function")o=n();else if(typeof n=="string")o=n;else{X(38,{iconName:e});return}if(typeof o=="string")return Ep(o);if(Pp(o))return o;X(133,{iconName:e});return}else{const o=t.registry.getIcon(e);return o||t.validation?.validateIcon(e),cs({tag:"span",cls:`ag-icon ag-icon-${o??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var P5={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},T5=class extends ft{constructor(e,t,s){super(P5),this.rowNode=e,this.column=t,this.eCell=s}postConstruct(){this.getGui().appendChild(Qt("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",t=>{t.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){const{rowNode:t,column:s,eCell:n,gos:i}=this,o=s.getColDef().dndSourceOnRowDrag,r=e.dataTransfer;if(r.setDragImage(n,0,0),o){const a=Te(i,{rowNode:t,dragEvent:e});o(a)}else try{const a=JSON.stringify(t.data);r.setData("application/json",a),r.setData("text/plain",a)}catch{}}checkVisibility(){const e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},k5=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}",I5={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},M5=class extends ft{constructor(){super(),this.dragSource=null,this.eIcon=xe,this.eLabel=xe,this.eGhost=xe,this.registerCSS(k5)}postConstruct(){const e=t=>D5(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(I5),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eGhost:s,eIcon:n,dragSource:i,dropIconMap:o,gos:r}=this;Jt(n);let a=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),a=o[e],s.classList.toggle("ag-dnd-ghost-not-allowed",e==="notAllowed"),n.classList.toggle("ag-shake-left-to-right",t),!(a===o.hide&&r.get("suppressDragLeaveHidesColumns"))&&a&&n.appendChild(a)}setLabel(e){this.eLabel.textContent=e}};function A5(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function L5(e,t){const s=e.dragAndDrop?.findExternalZone(t.getContainer());s&&e.dragAndDrop?.removeDropTarget(s)}function N5(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function O5(e){const t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}}function H5(e,t){const s=e.rowDropHighlightSvc;if(!s)return;const n=t?.row;let i=t?.dropIndicatorPosition;i!=="above"&&i!=="below"&&i!=="inside"&&(i="none");const o=n?.rowIndex;o==null||i==="none"?s.clear():s.set(n,i)}var Cb=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},B5=(e,t)=>{if(typeof PointerEvent>"u"||!(t instanceof PointerEvent))return null;const s=t.pointerId;if(!Cb(e,s))return null;const n={eElement:e,pointerId:s,onLost(i){V5(n,i)}};return e.addEventListener("lostpointercapture",n.onLost),n},G5=e=>{if(!e)return;wb(e);const{eElement:t,pointerId:s}=e;if(t){try{t.releasePointerCapture(s)}catch{}e.eElement=null}},wb=e=>{const{eElement:t,onLost:s}=e;t&&s&&(t.removeEventListener("lostpointercapture",s),e.onLost=null)},V5=(e,t)=>{wb(e);const{eElement:s,pointerId:n}=e;s&&t.pointerId===n&&Cb(s,n)},wo,Do,Pu={passive:!0},Nn={passive:!1},Ms=e=>{if(!Do)Do=new WeakSet;else if(Do.has(e))return!1;return Do.add(e),!0},j5=class extends qt{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!wo?.has(Rs(this.beans))}hasPointerCapture(){const e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();const e=this.dragSources;for(const t of e)bm(t);e.length=0,super.destroy()}removeDragSource(e){const t=this.dragSources;for(let s=0,n=t.length;s<n;++s){const i=t[s];if(i.params===e){t.splice(s,1),bm(i);break}}}addDragSource(e){if(!this.isAlive())return;const{eElement:t,includeTouch:s}=e,n=[];let i;if(s){const c=t.style;c&&(i=c.touchAction,c.touchAction="none")}const o={handlers:n,params:e,oldTouchAction:i};this.dragSources.push(o),Vl(n,[t,"pointerdown",c=>this.onPointerDown(e,c),Nn],[t,"mousedown",c=>this.onMouseDown(e,c)]);const l=this.gos.get("suppressTouch");s&&!l&&Vl(n,[t,"touchstart",d=>this.onTouchStart(e,d),Nn])}cancelDrag(e){const t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){const t=e.type;return(t==="mousemove"||t==="pointermove")&&e.cancelable&&pa(this.beans,e)&&!$r(ku(e))}initDrag(e,...t){this.drag=e;const s=this.beans,n=a=>this.onScroll(a),i=a=>this.onKeyDown(a),o=Rs(s),r=Et(s);Vl(e.handlers,[o,"contextmenu",zn],[o,"keydown",i],[r,"scroll",n,{capture:!0}],[r.defaultView||window,"scroll",n],...t)}destroyDrag(){this.dragging=!1;const e=this.drag;if(e){const t=e.rootEl;wo?.get(t)===e&&wo.delete(t),this.drag=null,G5(e.pointerCapture),Tp(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;const s=this.beans;if(Do?.has(t))return;const n=t.pointerType;if(n==="touch"&&(s.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),$r(ku(t))))||!t.isPrimary||n==="mouse"&&t.button!==0)return;this.destroyDrag();const i=Rs(s),o=e.eElement,r=t.pointerId,a=new Tu(i,e,t,r);wo??(wo=new WeakMap),wo.set(i,a);const l=p=>{p.pointerId===r&&this.onMouseOrPointerMove(p)},c=p=>{p.pointerId===r&&this.onMouseOrPointerUp(p)},d=p=>{p.pointerId===r&&Ms(p)&&this.cancelDrag()},u=p=>this.draggingPreventDefault(p);this.initDrag(a,[i,"pointerup",c],[i,"pointercancel",d],[i,"pointermove",l,Nn],[i,"touchmove",u,Nn],[o,"mousemove",u,Nn]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Ms(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!Ms(t)||$r(ku(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&zn(t);return}this.destroyDrag();const n=this.beans,i=Rs(n),o=new Tu(i,e,t.touches[0]),r=p=>this.onTouchMove(p),a=p=>this.onTouchUp(p),l=p=>this.onTouchCancel(p),c=p=>this.draggingPreventDefault(p),d=Rs(n),u=t.target??e.eElement;this.initDrag(o,[u,"touchmove",r,Pu],[u,"touchend",a,Pu],[u,"touchcancel",l,Pu],[d,"touchmove",c,Nn],[d,"touchend",a,Nn],[d,"touchcancel",l,Nn]),e.dragStartPixels===0&&this.onMove(o.start)}draggingPreventDefault(e){this.dragging&&zn(e)}onMouseDown(e,t){if(t.button!==0||Do?.has(t)||this.isPointer())return;const s=this.beans;this.destroyDrag();const n=new Tu(Rs(s),e,t),i=a=>this.onMouseOrPointerMove(a),o=a=>this.onMouseOrPointerUp(a),r=Rs(s);this.initDrag(n,[r,"mousemove",i],[r,"mouseup",o]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):Ms(t)}onScroll(e){if(!Ms(e))return;const t=this.drag,s=t?.lastDrag;s&&this.dragging&&t.params?.onDragging?.(s)}onMouseOrPointerMove(e){Ms(e)&&(ri()&&Et(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&zn(e),this.onMove(e))}onTouchCancel(e){const t=this.drag;!t||!Ms(e)||Mo(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){const t=this.drag;if(!t||!Ms(e))return;const s=Mo(t.start,e.touches);s&&(this.onMove(s),this.draggingPreventDefault(e))}onMove(e){const t=this.drag;if(!t)return;t.lastDrag=e;const s=t.params;if(!this.dragging){const n=t.start,o=s.dragStartPixels??4;if(nw(e,n,o)||(this.dragging=!0,s.capturePointer&&(t.pointerCapture=B5(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:s.eElement}),s.onDragStart?.(n),this.drag!==t)||(s.onDragging?.(n),this.drag!==t))return}s.onDragging?.(e)}onTouchUp(e){const t=this.drag;t&&Ms(e)&&this.onUp(Mo(t.start,e.changedTouches))}onMouseOrPointerUp(e){Ms(e)&&this.onUp(e)}onUp(e){const t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===j.ESCAPE&&this.cancelDrag()}},bm=e=>{Tp(e.handlers);const t=e.oldTouchAction;if(t!=null){const s=e.params.eElement.style;s&&(s.touchAction=t)}},Tu=class{constructor(e,t,s,n=null){this.rootEl=e,this.params=t,this.start=s,this.pointerId=n,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},ku=e=>{const t=e.target;return t instanceof Element?t:null},z5=class extends j5{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},W5=class extends _{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:s}=this.beans;return s.addDragSource(t),()=>s.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const s=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(s)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},_5={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},Dl={skipAriaHidden:!0},U5=class extends ft{constructor(e,t,s,n,i,o=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=s,this.customGui=n,this.dragStartPixels=i,this.alwaysVisible=o,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){const{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(_5),this.getGui().appendChild(Qt("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:e,rowNode:t}=this,s=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:s}),this.addManagedListeners(t,{dataChanged:s,cellChanged:s}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;const{beans:e,column:t,rowNode:s}=this,{gos:n,dragAndDrop:i,rowDragSvc:o}=e,r=o?.visibility;let l=!(r==="suppress"||r==="hidden"&&!i?.hasExternalDropZones()),c=l;if(l&&!this.isCustomGui()&&t){const d=t.getColDef().rowDrag;if(d===!1)l=!1;else{const u=typeof d=="function";c=t.isRowDrag(s),l=u||c}}l&&c&&s.footer&&n.get("rowDragManaged")&&(c=!1,l=!0),c&&(c=l),l||this.setDisplayed(l,Dl),c||this.setVisible(c,Dl),this.setDisabled(!c||r==="disabled"&&!i?.hasExternalDropZones()),l&&this.setDisplayed(l,Dl),c&&this.setVisible(c,Dl)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){const e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];const s=this.beans.selectionSvc?.getSelectedNodes()??[];return s.indexOf(e)!==-1?s:[e]}getDragItem(){const{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();const n=lc("pointerdown")?{pointerdown:zn}:{mousedown:zn};this.mouseDownListener=this.addManagedElementListeners(t,n)[0]}const s=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:n=>this.getDragItemName(n,s),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){const s=e?.dragItem||this.getDragItem(),n=(e?.dropTarget?.rows.length??s.rowNodes?.length)||1,i=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(i)return i(s,n);if(n!==1)return`${n} ${t("rowDragRows","rows")}`;const o=this.cellValueFn();return o||`1 ${t("rowDragRow","rows")}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},$5=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=e.scrollByTick??20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){const s=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),n=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(s&&n)return;const i=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=!n&&e.clientX<i.left+o,this.tickRight=!n&&e.clientX>i.right-o,this.tickUp=!s&&e.clientY<i.top+o,this.tickDown=!s&&e.clientY>i.bottom-o,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Yl=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},yc=e=>{let t=e.childrenAfterGroup;for(;t?.length;){const s=t[0];if(s.sourceRowIndex>=0)return s;t=s.childrenAfterGroup}},q5=(e,t,s,n)=>{if(!t.size||!e)return!1;let i=!1;const o=e.length??0;let r=-1;s&&(r=s.sourceRowIndex,s=r<0?yc(s):null,s&&(r=s.sourceRowIndex)),r<0||r>=o?r=o:n||++r;let a=r,l=Math.min(r,o-1);for(const u of t){const p=u.sourceRowIndex;p<a&&(a=p),p>l&&(l=p)}let c=a;for(let u=a;u<r;++u){const p=e[u];t.has(p)||(p.sourceRowIndex!==c&&(p.sourceRowIndex=c,e[c]=p,i=!0),++c)}let d=l;for(let u=l;u>=r;--u){const p=e[u];t.has(p)||(p.sourceRowIndex!==d&&(p.sourceRowIndex=d,e[d]=p,i=!0),--d)}for(const u of t)u.sourceRowIndex!==c&&(u.sourceRowIndex=c,e[c]=u,i=!0),++c;return i};function K5(e,t){return Qp(e,t.target)?.getFocusedCellPosition()??null}function xm(e,t){const s=At(e.gos,"normal"),n=t;let i,o;n.clientX!=null||n.clientY!=null?(i=n.clientX,o=n.clientY):(i=n.x,o=n.y);const{pageFirstPixel:r}=e.pageBounds.getCurrentPagePixelRange();if(o+=r,s){const a=e.ctrlsSvc.getScrollFeature(),l=a.getVScrollPosition(),c=a.getHScrollPosition();i+=c.left,o+=l.top}return{x:i,y:o}}var Y5=.25,Z5=class extends _{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,t=>{const s=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,n=new $5({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:s,setVerticalPosition:i=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(i),onScrollCallback:()=>{const i=s();if(this.autoScrollOldV!==i){this.autoScrollOldV=i,this.autoScrollChanging=!0;return}const o=this.autoScrollChanging;this.autoScrollChanged=o,this.autoScrollChanging=!1,o&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=n,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!=="visible"?"notAllowed":"move"}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=this.beans.selectionSvc?.getSelectedNodes();if(s&&s.indexOf(t)>=0)return s.slice().sort(X5)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){const{lastDraggingEvent:s,beans:n}=this;if(t){const a=this.getRowNodes(e);e.dragItem.rowNodes=a,Sm(a,!0)}this.lastDraggingEvent=e;const i=e.fromNudge,o=this.makeRowsDrop(s,e,i,!1);n.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);const r=this.autoScroll;o?.rowDragManaged&&o.moved&&o.allowed&&o.sameGrid&&!o.suppressMoveWhenRowDragging&&(!i&&!r?.scrolling||this.autoScrollChanged)&&this.dropRows(o),r?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,s,n){const{beans:i,gos:o}=this,r=this.newRowsDrop(t,n),a=i.rowModel;if(t.dropTarget=r,t.changed=!1,!r)return null;let{sameGrid:l,rootNode:c,source:d,target:u}=r;u??(u=a.getRow(a.getRowCount()-1)??null);const p=this.beans.groupEditSvc,f=!!p?.canSetParent(r);let m=null;if(u?.footer){const C=Fh(a,-1,u)??Fh(a,1,u);f&&(m=u.sibling??c),u=C??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=d!==u);let v=.5;if(u&&(l&&r.moved&&(m||!f)?v=d.rowIndex>u.rowIndex?-.5:.5:v=(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!f&&l&&u&&r.moved&>(o)){const C=Q5(a,r);C&&(v=d.rowIndex>C.rowIndex?-.5:.5,u=C,r.moved&&(r.moved=d!==u))}return r.target=u,r.newParent=m,r.pointerPos=J5(u,r.y),r.yDelta=v,p?.fixRowsDrop(r,f,s,v),this.validateRowsDrop(r,f,n),t.changed||(t.changed=ym(e?.dropTarget,r)),r}newRowsDrop(e,t){const{beans:s,gos:n}=this,i=s.rowModel.rootNode,o=gt(n)?n.get("rowDragManaged"):!1,r=n.get("suppressMoveWhenRowDragging"),a=this.isFromThisGrid(e);let{rowNode:l,rowNodes:c}=e.dragItem;if(c||(c=l?[l]:[]),l||(l=c[0]),!l||!i)return null;const d=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e);let u=!0;o&&(!c.length||s.rowDragSvc.visibility!=="visible"||(r||!a)&&!d)&&(u=!1);const p=xm(s,e).y,f=this.getOverNode(p);return{api:s.gridApi,context:s.gridOptions.context,draggingEvent:e,rowDragManaged:o,suppressMoveWhenRowDragging:r,sameGrid:a,withinGrid:d,treeData:!1,rootNode:i,moved:l!==f,y:p,overNode:f,overIndex:f?.rowIndex??-1,pointerPos:"none",position:"none",source:l,target:f??null,newParent:null,rows:c,allowed:u,highlight:!t&&o&&r&&(d||!a),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,s){const{source:n,target:i,yDelta:o,inside:r,moved:a,rowDragManaged:l,suppressMoveWhenRowDragging:c}=e;e.moved&&(e.moved=n!==i);const{position:d,fallbackPosition:u}=this.computeDropPosition(a,r,o);e.position=d,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,c,"initial");const p=(!l||e.allowed)&&this.gos.get("isRowValidDropPosition");p&&this.applyDropValidator(e,t,s,l,p),l&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,c,"final"),e.position==="inside"&&(!e.allowed||!e.newParent)&&(e.position=u)}computeDropPosition(e,t,s){const n=s<0?"above":"below";return e?{position:t?"inside":n,fallbackPosition:n}:{position:"none",fallbackPosition:n}}enforceSuppressMoveWhenRowDragging(e,t,s){if(t){if(s==="initial"){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position==="none")&&(e.allowed=!1)}}applyDropValidator(e,t,s,n,i){this.beans.groupEditSvc?.clearNewSameParent(e,t);const o=i(e);if(!o){e.allowed=!1;return}if(typeof o!="object")return;o.rows!==void 0&&(e.rows=o.rows??[]),t&&o.newParent!==void 0&&(e.newParent=o.newParent),o.target!==void 0&&(e.target=o.target),o.position&&(e.position=o.position),o.allowed!==void 0?e.allowed=o.allowed:n||(e.allowed=!0);const r=e.draggingEvent;o.changed&&r&&(r.changed=!0),!s&&o.highlight!==void 0&&(e.highlight=o.highlight)}addRowDropZone(e){if(!e.getContainer()){X(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){X(56);return}const s=e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(i=>e.onDragEnter(this.rowDragEvent("rowDragEnter",i))),onDragLeave:e.onDragLeave&&(i=>e.onDragLeave(this.rowDragEvent("rowDragLeave",i))),onDragging:e.onDragging&&(i=>e.onDragging(this.rowDragEvent("rowDragMove",i))),onDragStop:e.onDragStop&&(i=>e.onDragStop(this.rowDragEvent("rowDragEnd",i))),onDragCancel:e.onDragCancel&&(i=>e.onDragCancel(this.rowDragEvent("rowDragCancel",i)))},n={isInterestedIn:i=>i===2,getIconName:()=>"move",external:!0,...s};t.addDropTarget(n),this.addDestroyFunc(()=>t.removeDropTarget(n))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:s=>{this.onDragEnter(s),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",s))},onDragLeave:s=>{this.onDragLeave(s),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",s))},onDragging:s=>{this.onDragging(s),e?.onDragging?.(this.rowDragEvent("rowDragMove",s))},onDragStop:s=>{this.onDragStop(s),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",s))},onDragCancel:s=>{this.onDragCancel(s),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",s))},fromGrid:!0}}getOverNode(e){const{pageBounds:t,rowModel:s}=this.beans,i=e>t.getCurrentPagePixelRange().pageLastPixel?-1:s.getRowIndexAtPixel(e);return i>=0?s.getRow(i):void 0}rowDragEvent(e,t){const s=this.beans,{dragItem:n,dropTarget:i,event:o,vDirection:r}=t,a=i?.rootNode===s.rowModel.rootNode,l=a?i.y:xm(s,t).y,c=a?i.overNode:this.getOverNode(l),d=a?i.overIndex:c?.rowIndex??-1;return{api:s.gridApi,context:s.gridOptions.context,type:e,event:o,node:n.rowNode,nodes:n.rowNodes,overIndex:d,overNode:c,y:l,vDirection:r,rowsDrop:i}}dispatchGridEvent(e,t){const s=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(s)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){const t=this.lastDraggingEvent?.dropTarget??null,s=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),s?.allowed&&s.rowDragManaged&&(!t?.droppedManaged||ym(t,s))&&this.dropRows(s),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),Sm(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:s}){const n=qo(this.gos),i=this.beans.rowModel,o=s.filter(({data:a,rowPinned:l})=>!i.getRowNode(n?.({data:a,level:0,rowPinned:l})??a.id)).map(({data:a})=>a);if(o.length===0)return!1;let r;if(t){const a=t.sourceRowIndex>=0?t:yc(t);a&&(r=a.sourceRowIndex+(e==="above"?0:1))}return i.updateRowData({add:o,addIndex:r}),!0}filterRows(e){const{groupEditSvc:t}=this.beans,{rows:s,sameGrid:n}=e;let i;for(let o=0,r=s.length;o<r;++o){let a=!0;const l=s[o];(!l||l.footer||n&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(a=!1),a&&t&&!t.canDropRow(l,e)&&(a=!1),a?i?.push(l):i??(i=s.slice(0,o))}return i??s}csrmMoveRows(e){const t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:s,newParent:n,rootNode:i}){let o=!1;const r=new Set;for(const p of s){n&&p.parent!==n&&(p.treeParent=n,o=!0);const f=this.csrmGetLeaf(p);f&&r.add(f)}if(!o&&r.size===0)return!1;const a=this.beans.focusSvc,l=a.getFocusedCell(),c=l&&Eo(this.beans,l);if(r.size&&q5(i._leafs,r,t,e==="above")&&(o=!0),!o)return!1;const d=this.beans.rowModel,u=new Yl;return u.reordered=!0,d.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:u}),c?c.focusCell():a.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;const t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):yc(e)}},ym=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!ii(e.rows,t.rows)),X5=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,Sm=(e,t)=>{for(let s=0,n=e?.length||0;s<n;++s){const i=e[s];i.dragging!==t&&(i.dragging=t,i.dispatchRowEvent("draggingChanged"))}},Q5=(e,t)=>{let s=null,n=t.target;if(n&&t.rows.indexOf(n)<0)return null;const i=t.source;if(!n||!i)return null;let o=n.rowIndex-i.rowIndex;const r=o<0?-1:1;o=t.suppressMoveWhenRowDragging?Math.abs(o):1;const a=new Set(t.rows);do{const l=Fh(e,r,n);if(!l)break;a.has(l)||(s=l,--o),n=l}while(o>0);return s},J5=(e,t)=>{const s=e?.rowTop,n=e?.rowHeight??0;if(s==null||!n||n<=0)return"none";const i=t-s,o=n*Y5;return i<=o?"above":i>=n-o?"below":"inside"},eP=class extends _{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){const s=t.createManagedBean(new Z5(e)),n=this.beans.dragAndDrop;n.addDropTarget(s),t.addDestroyFunc(()=>n.removeDropTarget(s)),this.rowDragFeature=s;const i=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],i),this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnPivotModeChanged:i,sortChanged:i,filterChanged:i}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,s,n,i,o){return new U5(e,t,s,n,i,o)}createRowDragCompForRow(e,t){if(Yn(this.gos))return;const s=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${s("rowDragRow","row")}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,s,n,i,o){const r=this.gos;return r.get("rowDragManaged")&&(!gt(r)||r.get("pagination"))?void 0:this.createRowDragComp(s,e,t,n,i,o)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){const e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";const n=e.colModel.isPivotMode();return(n||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":n||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){const e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},tP=class extends _{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position==="none"?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){const e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){const s=e!==this.row,n=e.uiLevel,i=t!==this.position,o=n!==this.uiLevel;this.dragging=!1,(s||i||o)&&(s&&this.clear(),this.uiLevel=n,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){const t=e?.dropTarget;if(t){const{highlight:s,target:n,position:i}=t;if(s&&n&&i!=="none"){this.set(n,i),this.dragging=!0;return}}this.dragging&&this.clear()}},bb={moduleName:"Drag",version:ie,beans:[z5]},sP={moduleName:"DragAndDrop",version:ie,dynamicBeans:{dndSourceComp:T5},icons:{rowDrag:"grip"}},xb={moduleName:"SharedDragAndDrop",version:ie,beans:[OE],dependsOn:[bb],userComponents:{agDragAndDropImage:M5},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},nP={moduleName:"RowDrag",version:ie,beans:[tP,eP],apiFunctions:{addRowDropZone:A5,removeRowDropZone:L5,getRowDropZoneParams:N5,getRowDropPositionIndicator:O5,setRowDropPositionIndicator:H5},dependsOn:[xb]},iP={moduleName:"HorizontalResize",version:ie,beans:[W5],dependsOn:[bb]},oP=":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}",rP=class extends _{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;const{gos:e}=this;e.get("suppressColumnMoveAnimation")||e.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:s,executeLaterFuncs:n}=this;if(s.length===0&&n.length===0){e(),t();return}const i=o=>{for(;o.length;){const r=o.pop();r&&r()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),i(s)},0),window.setTimeout(()=>{t(),i(n)},200)})}};function aP(e,t,s){e.colMoves?.moveColumnByIndex(t,s,"api")}function lP(e,t,s){e.colMoves?.moveColumns(t,s,"api")}var cP=class extends _{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;if(t)for(const s of t)s.isPrimary()&&(s.isAnyFunctionActive()||(s.isAllowValue()?this.columnsToAggregate.push(s):s.isAllowRowGroup()?this.columnsToGroup.push(s):s.isAllowPivot()&&this.columnsToPivot.push(s)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){const{valueColsSvc:t,rowGroupColsSvc:s,pivotColsSvc:n}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&s?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&n?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function dP(e,t){!t||t.length<=1||t.filter(n=>e.indexOf(n)<0).length>0||t.sort((n,i)=>{const o=e.indexOf(n),r=e.indexOf(i);return o-r})}function uP(e){const t=[...e];for(const s of e){let n=null,i=s.getParent();for(;i!=null&&i.getDisplayedLeafColumns().length===1;)n=i,i=i.getParent();if(n!=null){const r=!!n.getColGroupDef()?.marryChildren?n.getProvidedColumnGroup().getLeafColumns():n.getLeafColumns();for(const a of r)t.includes(a)||t.push(a)}}return t}function hP(e,t,s,n){const i=n.allCols;let o=null,r=null;for(let a=0;a<e.length;a++){const l=e[a],c=s.getProposedColumnOrder(t,l);if(!s.doesOrderPassRules(c))continue;const d=c.filter(p=>i.includes(p));if(r===null)r=d;else if(!ii(d,r))break;const u=gP(c);(o===null||u<o.fragCount)&&(o={move:l,fragCount:u})}return o}function yb(e){const{isFromHeader:t,fromLeft:s,xPosition:n,fromEnter:i,fakeEvent:o,pinned:r,gos:a,colModel:l,colMoves:c,visibleCols:d}=e;let{allMovingColumns:u}=e;t&&(u=uP(u));const p=u.slice();dP(l.getCols(),p);const f=mP({movingCols:p,draggingRight:s,xPosition:n,pinned:r,gos:a,colModel:l,visibleCols:d}),m=pP(p,l);if(f.length===0)return;const v=f[0];if(m!==null&&(t||!i)&&!o&&(!s&&v>=m||s&&v<=m))return;const w=hP(f,p,c,d);if(!w)return;const b=w.move;if(!(b>l.getCols().length-p.length))return{columns:p,toIndex:b}}function Sb(e){const{columns:t,toIndex:s}=yb(e)||{},{finished:n,colMoves:i}=e;return!t||s==null?null:(i.moveColumns(t,s,"uiColumnMoved",n),n?null:{columns:t,toIndex:s})}function pP(e,t){const s=t.getCols(),n=e.map(l=>s.indexOf(l)).sort((l,c)=>l-c),i=n[0];return et(n)-i!==n.length-1?null:i}function gP(e){function t(n){const i=[];let o=n.getOriginalParent();for(;o!=null;)i.push(o),o=o.getOriginalParent();return i}let s=0;for(let n=0;n<e.length-1;n++){let i=t(e[n]),o=t(e[n+1]);[i,o]=i.length>o.length?[i,o]:[o,i];for(const r of i)o.indexOf(r)===-1&&s++}return s}function fP(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function mP(e){const{movingCols:t,draggingRight:s,xPosition:n,pinned:i,gos:o,colModel:r,visibleCols:a}=e;if(o.get("suppressMovableColumns")||t.some(x=>x.getColDef().suppressMovable))return[];const c=fP(a,i),d=r.getCols(),u=c.filter(x=>t.includes(x)),p=c.filter(x=>!t.includes(x)),f=d.filter(x=>!t.includes(x));let m=0,v=n;if(s){let x=0;for(const S of u)x+=S.getActualWidth();v-=x}if(v>0){for(let x=0;x<p.length;x++){const S=p[x];if(v-=S.getActualWidth(),v<0)break;m++}s&&m++}let C;if(m>0){const x=p[m-1];C=f.indexOf(x)+1}else C=f.indexOf(p[0]),C===-1&&(C=0);const w=[C],b=(x,S)=>x-S;if(s){let x=C+1;const S=d.length-1;for(;x<=S;)w.push(x),x++;w.sort(b)}else{let x=C;const S=d.length-1;let y=d[x];for(;x<=S&&c.indexOf(y)<0;)x++,w.push(x),y=d[x];x=C-1;const R=0;for(;x>=R;)w.push(x),x--;w.sort(b).reverse()}return w}function Th(e){const{pinned:t,fromKeyboard:s,gos:n,ctrlsSvc:i,useHeaderRow:o,skipScrollPadding:r}=e;let a=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(s&&(l-=a.getBoundingClientRect().left),n.get("enableRtl")&&(o&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!r&&(l+=i.get("center").getCenterViewportScrollLeft()),l):0}function Iu(e,t){for(const s of e)s.moving=t,s.dispatchColEvent("movingChanged","uiColumnMoved")}var Rm=7,kh=100,Pl=kh/2,vP=5,CP=100,wP=class extends _{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!le(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,{dragItem:s}=t||{},n=s?.columns??[];for(const i of n){const o=i.getPinned();if(i.getColDef().lockPinned){if(o==e)return"move";continue}const r=s?.containerType;if(r===e||!e)return"move";if(e&&(!o||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,s=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(s,!0,"uiColumnDragged");else{const i=t.visibleState,o=(s||[]).filter(r=>i[r.getId()]&&!r.isVisible());this.setColumnsVisible(o,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(s,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,s=!1,n=!1){const{gos:i,ctrlsSvc:o}=this.beans,r=i.get("suppressMoveWhenColumnDragging");if(n&&!r){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!n&&ht(e.hDirection))return;const a=Th({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:o});t||this.checkCenterForScrolling(a),r?this.handleColumnDragWhileSuppressingMovement(e,t,s,a,n):this.handleColumnDragWhileAllowingMovement(e,t,s,a,n)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,s){if(!e?.length)return;const n=e.filter(i=>!i.getColDef().lockVisible);n.length&&this.beans.colModel.setColsVisible(n,t,s)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:s}=e;this.beans.colMoves.moveColumns(t,s,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:e}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!e)return;const t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,s,n,i){const o=this.getAllMovingColumns(e,!0);if(i){const r=this.isAttemptingToPin(o);r&&this.attemptToPinColumns(o,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(o,r)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:o,xPosition:l,fromEnter:t,fakeEvent:s,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(o,n)}}handleColumnDragWhileAllowingMovement(e,t,s,n,i){const o=this.getAllMovingColumns(e),r=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:o,isFromHeader:a,xPosition:n,fromLeft:r,fromEnter:t,fakeEvent:s}),c=Sb({...l,finished:i});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){const s=e.dragSource.getDragItem();let n=null;t?(n=s.columnsInSplit,n||(n=s.columns)):n=s.columns;const i=o=>o.getColDef().lockPinned?o.getPinned()==this.pinned:!0;return n?n.filter(i):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:s,xPosition:n,fromLeft:i,fromEnter:o,fakeEvent:r}=e,{gos:a,colModel:l,colMoves:c,visibleCols:d}=this.beans;return{allMovingColumns:t,isFromHeader:s,fromLeft:i,xPosition:n,pinned:this.pinned,fromEnter:o,fakeEvent:r,gos:a,colModel:l,colMoves:c,visibleCols:d}}highlightHoveredColumn(e,t){const{gos:s,colModel:n}=this.beans,i=s.get("enableRtl"),o=n.getCols().filter(d=>d.isVisible()&&d.getPinned()===this.pinned);let r=null,a=null,l=null;for(const d of o){if(a=d.getActualWidth(),r=this.getNormalisedColumnLeft(d,0,i),r!=null){const u=r+a;if(r<=t&&u>=t){l=d;break}}r=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let d=o.length-1;d>=0;d--){const u=o[d],p=o[d].getParent();if(!p){l=u;break}const f=p?.getDisplayedLeafColumns();if(f.length){l=et(f);break}}if(!l)return;r=this.getNormalisedColumnLeft(l,0,i),a=l.getActualWidth()}if(l==null||r==null||a==null){this.lastHighlightedColumn?.column!==l&&this.clearHighlighted();return}let c;if(t-r<a/2){const d=o.indexOf(l);d===0?c=0:(c=1,l=o[d-1])}else c=1;(this.lastHighlightedColumn?.column!==l||this.lastHighlightedColumn?.position!==c)&&this.clearHighlighted(),Fm(l,c),this.lastHighlightedColumn={column:l,position:c}}getNormalisedXPositionInfo(e,t){const{gos:s,visibleCols:n}=this.beans,i=s.get("enableRtl"),{firstMovingCol:o,column:r,position:a}=this.getColumnMoveAndTargetInfo(e,t,i);if(!o||!r||a==null)return;const l=n.allCols,c=l.indexOf(o),d=l.indexOf(r),u=a===0,p=c<d||c===d&&!u;let f=0;if(u?p&&(f-=1):p||(f+=1),d+f===c)return;const m=l[d+f];if(!m)return;const v=this.getNormalisedColumnLeft(m,20,i);return{fromLeft:p,xPosition:v}}getColumnMoveAndTargetInfo(e,t,s){const n=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:o}=bP(e);if(!i||!o||n.column||!t)return{firstMovingCol:i,...n};const a=this.getPinDirection()==="left";return{firstMovingCol:i,position:a?1:0,column:a!==s?i:o}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,s){const{gos:n,ctrlsSvc:i}=this.beans,o=e.getLeft();if(o==null)return null;const r=e.getActualWidth();return Th({x:s?o+r-t:o+t,pinned:e.getPinned(),useHeaderRow:s,skipScrollPadding:!0,gos:n,ctrlsSvc:i})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,s=this.failedMoveAttempts>Rm;return t&&s||e.some(n=>n.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:s,fromEnter:n,fakeEvent:i,fromLeft:o}=e,r=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:s,fromLeft:o,fromEnter:n,fakeEvent:i}),{columns:a,toIndex:l}=yb(r)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Fm(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),s=t.getCenterViewportScrollLeft(),n=s+t.getCenterWidth();let i,o;this.gos.get("enableRtl")?(i=e<s+Pl,o=e>n-Pl):(o=e<s+Pl,i=e>n-Pl),this.needToMoveRight=i,this.needToMoveLeft=o,o||i?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),CP),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*vP,e>kh&&(e=kh);let t=null;const s=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=s.scrollHorizontally(-e):this.needToMoveRight&&(t=s.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:n,dragAndDrop:i,gos:o}=this.beans;if(this.failedMoveAttempts<=Rm+1||!n)return;if(i.setDragImageCompIcon("pinned"),!o.get("suppressMoveWhenColumnDragging")){const r=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(r,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,s=!1){const n=(e||[]).filter(r=>!r.getColDef().lockPinned);if(!n.length)return 0;s&&(t=this.getPinDirection());const{pinnedCols:i,dragAndDrop:o}=this.beans;return i?.setColsPinned(n,t,"uiColumnDragged"),s&&o.nudge(),n.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Fm(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function bP(e){const t=e.length;let s,n;for(let i=0;i<t;i++){if(!s){const o=e[i];o.getLeft()!=null&&(s=o)}if(!n){const o=e[t-1-i];o.getLeft()!=null&&(n=o)}if(s&&n)break}return{firstMovingCol:s,lastMovingCol:n}}var xP=class extends _{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,s=this.pinned;e.whenReady(this,n=>{let i;const o=n.gridBodyCtrl.eBodyViewport;switch(s){case"left":i=[[o,n.left.eContainer],[n.bottomLeft.eContainer],[n.topLeft.eContainer]];break;case"right":i=[[o,n.right.eContainer],[n.bottomRight.eContainer],[n.topRight.eContainer]];break;default:i=[[o,n.center.eViewport],[n.bottomCenter.eViewport],[n.topCenter.eViewport]];break}this.eSecondaryContainers=i}),this.moveColumnFeature=this.createManagedBean(new wP(s)),this.bodyDropPivotTarget=this.createManagedBean(new cP(s)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}};function Rb(e,t){const s=[],n=[],i=[];return e.forEach(r=>{const a=r.getColDef().lockPosition;a==="right"?i.push(r):a==="left"||a===!0?s.push(r):n.push(r)}),t.get("enableRtl")?[...i,...n,...s]:[...s,...n,...i]}function Fb(e,t){let s=!0;return cn(null,t,n=>{if(!Nt(n))return;const i=n;if(!i.getColGroupDef()?.marryChildren)return;const a=[];for(const p of i.getLeafColumns()){const f=e.indexOf(p);a.push(f)}const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),d=l-c,u=i.getLeafColumns().length-1;d>u&&(s=!1)}),s}var yP=class extends _{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,s){const n=this.beans.colModel.getCols();if(!n)return;const i=n[e];this.moveColumns([i],t,s)}moveColumns(e,t,s,n=!0){const{colModel:i,colAnimation:o,visibleCols:r,eventSvc:a}=this.beans,l=i.getCols();if(!l)return;if(t>l.length-e.length){X(30,{toIndex:t});return}o?.start();const c=i.getColsForKeys(e);this.doesMovePassRules(c,t)&&(zf(i.getCols(),c,t),r.refresh(s),a.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,toIndex:t,finished:n,source:s})),o?.finish()}doesMovePassRules(e,t){const s=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(s)}doesOrderPassRules(e){const{colModel:t,gos:s}=this.beans;return!(!Fb(e,t.getColTree())||!(i=>{const o=c=>c?c==="left"||c===!0?-1:1:0,r=s.get("enableRtl");let a=r?1:-1,l=!0;for(const c of i){const d=o(c.getColDef().lockPosition);r?d>a&&(l=!1):d<a&&(l=!1),a=d}return l})(e))}getProposedColumnOrder(e,t){const n=this.beans.colModel.getCols().slice();return zf(n,e,t),n}createBodyDropTarget(e,t){return new xP(e,t)}moveHeader(e,t,s,n,i){const{ctrlsSvc:o,gos:r,colModel:a,visibleCols:l,focusSvc:c}=this.beans,d=t.getBoundingClientRect(),u=d.left,p=vt(s),f=p?d.width:s.getActualWidth(),m=e==="left"!==r.get("enableRtl"),v=Th({x:m?u-20:u+f+20,pinned:n,fromKeyboard:!0,gos:r,ctrlsSvc:o}),C=c.focusedHeader;Sb({allMovingColumns:p?s.getLeafColumns():[s],isFromHeader:!0,fromLeft:e==="right",xPosition:v,pinned:n,fromEnter:!1,fakeEvent:!1,gos:r,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(p){const b=s.getDisplayedLeafColumns();w=m?b[0]:et(b)}else w=s;if(o.getScrollFeature().ensureColumnVisible(w,"auto"),(!i.isAlive()||r.get("ensureDomOrder"))&&C){let b;if(p){const x=s.getGroupId(),S=s.getLeafColumns();if(!S.length)return;const y=S[0].getParent();if(!y)return;b=SP(y,x)}else b=s;b&&c.focusHeaderPosition({headerPosition:{...C,column:b}})}}setDragSourceForHeader(e,t,s){const{gos:n,colModel:i,dragAndDrop:o,visibleCols:r}=this.beans;let a=!n.get("suppressDragLeaveHidesColumns");const l=vt(t),c=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>FP(t,r.allCols):()=>RP(t),dragItemName:s,onDragStarted:()=>{a=!n.get("suppressDragLeaveHidesColumns"),Iu(c,!0)},onDragStopped:()=>Iu(c,!1),onDragCancelled:()=>Iu(c,!1),onGridEnter:p=>{if(a){const{columns:f=[],visibleState:m}=p??{},v=l?w=>!m||m[w.getColId()]:()=>!0,C=f.filter(w=>!w.getColDef().lockVisible&&v(w));i.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:p=>{if(a){const f=p?.columns?.filter(m=>!m.getColDef().lockVisible)||[];i.setColsVisible(f,!1,"uiColumnMoved")}}};return o.addDragSource(u,!0),u}};function SP(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function RP(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function FP(e,t){const s=e.getProvidedColumnGroup().getLeafColumns(),n={};for(const a of s)n[a.getId()]=a.isVisible();const i=[];for(const a of t)s.indexOf(a)>=0&&(i.push(a),_s(s,a));for(const a of s)i.push(a);const o=[],r=e.getLeafColumns();for(const a of i)r.indexOf(a)!==-1&&o.push(a);return{columns:i,columnsInSplit:o,visibleState:n,containerType:o[0]?.pinned}}var EP={moduleName:"ColumnMove",version:ie,beans:[yP,rP],apiFunctions:{moveColumnByIndex:aP,moveColumns:lP},dependsOn:[xb],css:[oP]},DP=class extends _{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const s=this.getHeaderCellForColumn(e);if(!s)return-1;const n=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||n.push(s),this.getPreferredWidthForElements(n)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const s=document.createElement("form");s.style.position="fixed";const n=this.centerRowContainerCtrl.eContainer;for(const o of e)this.cloneItemIntoDummy(o,s);n.appendChild(s);const i=Math.ceil(s.getBoundingClientRect().width);return s.remove(),t=t??this.gos.get("autoSizePadding"),i+t}getHeaderCellForColumn(e){let t=null;for(const s of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const n=s.getHtmlElementForColumnHeader(e);n!=null&&(t=n)}return t}cloneItemIntoDummy(e,t){const s=e.cloneNode(!0);s.style.width="",s.style.position="static",s.style.left="";const n=document.createElement("div"),i=n.classList;["ag-header-cell","ag-header-group-cell"].some(a=>s.classList.contains(a))?(i.add("ag-header","ag-header-row"),n.style.position="static"):i.add("ag-row");let r=e.parentElement;for(;r;){if(["ag-header-row","ag-row"].some(l=>r.classList.contains(l))){for(let l=0;l<r.classList.length;l++){const c=r.classList[l];c!="ag-row-position-absolute"&&i.add(c)}break}r=r.parentElement}n.appendChild(s),t.appendChild(n)}},Eb={moduleName:"AutoWidth",version:ie,beans:[DP]};function PP(e,t,s=!0,n="api"){e.colResize?.setColumnWidths(t,!1,s,n)}function Db(e,t){if(!e||e.length==0)return;const s=t(e[0]);for(let n=1;n<e.length;n++)if(s!==t(e[n]))return;return s}function Pb(e,t,s){if(!t.length)return;const n=t.length===1?t[0]:null,i=Db(t,o=>o.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:n,source:s})}function TP(e,t,s){if(!t.length)return;const n=t.length===1?t[0]:null,i=Db(t,o=>o.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:n,source:s})}function kP(e,t,s,n){e.dispatchEvent({type:t,columns:s,column:s&&s.length==1?s[0]:null,source:n})}function Zo(e,t,s,n,i=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:s,source:n})}var IP=class extends _{constructor(e,t,s,n){super(),this.comp=e,this.eResize=t,this.pinned=s,this.columnGroup=n}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:s}=this.beans,n=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(n),!t.get("suppressAutoSize")&&s&&this.addDestroyFunc(s.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:s,resizeRatios:n,groupAfterColumns:i,groupAfterStartWidth:o,groupAfterRatios:r}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=s,this.resizeRatios=n,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=o,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(e,t,s="uiColumnResized"){const n=this.normaliseDragChange(t),i=this.resizeStartWidth+n;this.resizeColumnsFromLocalValues(i,s,e)}getInitialValues(e){const t=l=>l.reduce((c,d)=>c+d.getActualWidth(),0),s=(l,c)=>l.map(d=>d.getActualWidth()/c),n=this.getColumnsToResize(),i=t(n),o=s(n,i),r={columnsToResize:n,resizeStartWidth:i,resizeRatios:o};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),c=r.groupAfterColumns=l.filter(u=>u.isResizable()),d=r.groupAfterStartWidth=t(c);r.groupAfterRatios=s(c,d)}else r.groupAfterColumns=void 0,r.groupAfterStartWidth=void 0,r.groupAfterRatios=void 0;return r}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),s=this.getInitialValues();t>s.resizeStartWidth&&this.resizeColumns(s,t,e,!0)}resizeColumnsFromLocalValues(e,t,s=!0){if(!this.resizeCols||!this.resizeRatios)return;const n={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(n,e,t,s)}resizeColumns(e,t,s,n=!0){const{columnsToResize:i,resizeStartWidth:o,resizeRatios:r,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:c}=e,d=[];if(d.push({columns:i,ratios:r,width:t}),a){const u=t-o;d.push({columns:a,ratios:c,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:d,finished:n,source:s}),n&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},MP=class extends _{constructor(e,t,s,n,i){super(),this.pinned=e,this.column=t,this.eResize=s,this.comp=n,this.ctrl=i}postConstruct(){const e=[];let t,s;const n=()=>{if(st(this.eResize,t),!t)return;const{horizontalResizeSvc:r,colAutosize:a}=this.beans,l=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),s&&a&&e.push(a.addColumnAutosizeListeners(this.eResize,this.column))},i=()=>{for(const r of e)r();e.length=0},o=()=>{const r=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(r!==t||a!==s)&&(t=r,s=a,i(),n())};o(),this.addDestroyFunc(i),this.ctrl.setRefreshFunction("resize",o)}onResizing(e,t){const{column:s,lastResizeAmount:n,resizeStartWidth:i,beans:o}=this,r=this.normaliseResizeAmount(t),a=i+r,l=[{key:s,newWidth:a}],{pinnedCols:c,ctrlsSvc:d,colResize:u}=o;if(this.column.getPinned()){const p=c?.leftWidth??0,f=c?.rightWidth??0,m=ua(d.getGridBodyCtrl().eBodyViewport)-50;if(p+f+(r-n)>m)return}this.lastResizeAmount=r,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const s=this.pinned!=="left",n=this.pinned==="right";return this.gos.get("enableRtl")?s&&(t*=-1):n&&(t*=-1),t}},AP=class extends _{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,s,n){const i=[],{colModel:o,gos:r,visibleCols:a}=this.beans;for(const l of e){const c=o.getColDefCol(l.key)||o.getCol(l.key);if(!c)continue;if(i.push({width:l.newWidth,ratios:[1],columns:[c]}),r.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(c);if(!u)continue;const p=c.getActualWidth()-l.newWidth,f=u.getActualWidth()+p;i.push({width:f,ratios:[1],columns:[u]})}}i.length!==0&&this.resizeColumnSets({resizeSets:i,finished:s,source:n})}resizeColumnSets(e){const{resizeSets:t,finished:s,source:n}=e;if(!(!t||t.every(d=>LP(d)))){if(s){const d=t&&t.length>0?t[0].columns:null;Zo(this.eventSvc,d,s,n)}return}const o=[],r=[];for(const d of t){const{width:u,columns:p,ratios:f}=d,m={},v={};for(const b of p)r.push(b);let C=!0,w=0;for(;C;){if(w++,w>1e3){Je(31);break}C=!1;const b=[];let x=0,S=u;p.forEach((R,E)=>{if(v[R.getId()])S-=m[R.getId()];else{b.push(R);const P=f[E];x+=P}});const y=1/x;b.forEach((R,E)=>{const F=E===b.length-1;let P;F?P=S:(P=Math.round(f[E]*u*y),S-=P);const k=R.getMinWidth(),D=R.getMaxWidth();P<k?(P=k,v[R.getId()]=!0,C=!0):D>0&&P>D&&(P=D,v[R.getId()]=!0,C=!0),m[R.getId()]=P})}for(const b of p){const x=m[b.getId()];b.getActualWidth()!==x&&(b.setActualWidth(x,n),o.push(b))}}const a=o.length>0;let l=[];if(a){const{colFlex:d,visibleCols:u,colViewport:p}=this.beans;l=d?.refreshFlexedColumns({resizingCols:r,skipSetLeft:!0})??[],u.setLeftValues(n),u.updateBodyWidths(),p.checkViewportColumns()}const c=r.concat(l);(a||s)&&Zo(this.eventSvc,c,s,n,l)}resizeHeader(e,t,s){if(!e.isResizable())return;const n=e.getActualWidth(),i=e.getMinWidth(),o=e.getMaxWidth(),r=Math.min(Math.max(n+t,i),o);this.setColumnWidths([{key:e,newWidth:r}],s,!0,"uiColumnResized")}createResizeFeature(e,t,s,n,i){return new MP(e,t,s,n,i)}createGroupResizeFeature(e,t,s,n){return new IP(e,t,s,n)}};function LP(e){const{columns:t,width:s}=e;let n=0,i=0,o=!0;for(const l of t){const c=l.getMinWidth();n+=c||0;const d=l.getMaxWidth();d>0?i+=d:o=!1}const r=s>=n,a=!o||s<=i;return r&&a}var NP={moduleName:"ColumnResize",version:ie,beans:[AP],apiFunctions:{setColumnWidths:PP},dependsOn:[iP,Eb]},OP=class extends _{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const e=this.onWidthChanged.bind(this);for(const t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(const e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",e===0)}},HP=class extends Zp{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,s,n,i){const{column:o,beans:r}=this,{context:a,colNames:l,colHover:c,rangeSvc:d,colResize:u}=r;this.comp=e,i=Ia(this,a,i),this.setGui(t,i),this.displayName=l.getDisplayNameForColumnGroup(o,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(i),this.setupExpandable(i),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:n,compBean:i}),this.setupUserComp(),this.addHeaderMouseListeners(i,n),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const p=this.rowCtrl.pinned,f=o.getProvidedColumnGroup().getLeafColumns();c?.createHoverFeature(i,f,t),d?.createRangeHighlightFeature(i,o,e),i.createManagedBean(new Yp(o,t,r)),i.createManagedBean(new OP(e,o)),u?this.resizeFeature=i.createManagedBean(u.createGroupResizeFeature(e,s,p,o)):e.setResizableDisplayed(!1),i.createManagedBean(new Ta(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,f),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),i.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.getDefinition();return Te(t.gos,{colDef:s,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,s=e.get("groupHeaderHeight");s!=null?s===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(s):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const s of t)e.addManagedListeners(s,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,s)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),s=t[0]===e,n=et(t)===e;if(!s&&!n)return;const i=e.getHighlighted(),o=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let r=!1,a=!1;if(o){const l=this.beans.gos.get("enableRtl"),c=i===1,d=i===0;s&&(l?a=c:r=d),n&&(l?r=d:a=c)}this.comp.toggleCss("ag-header-highlight-before",r),this.comp.toggleCss("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:s}=this;if(!s)return;const n=s.getInitialValues(t);s.resizeColumns(n,n.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:s,enterpriseMenuFactory:n}=this.beans,i=this.column,o=i.getProvidedColumnGroup(),r=Te(s,{displayName:this.displayName,columnGroup:i,setExpanded:l=>{e.setColumnGroupOpened(o,l,"gridInitializing")},setTooltip:(l,c)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(l,c)},showColumnMenu:(l,c)=>n?.showMenuAfterButtonClick(o,l,"columnMenu",c),showColumnMenuAfterMouseClick:(l,c)=>n?.showMenuAfterMouseEvent(o,l,"columnMenu",c),eGridHeader:this.eGui}),a=EE(t,r);a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e,t){const{column:s,comp:n,beans:{rangeSvc:i},gos:o}=this,r=d=>this.handleMouseOverChange(d.type==="mouseenter"),a=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",s.getProvidedColumnGroup()),l=d=>this.handleContextMenuMouseEvent(d,void 0,s.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:r,mouseleave:r,click:a,contextmenu:l}),n.toggleCss("ag-header-group-cell-selectable",Ho(o));const c=i?.createHeaderGroupCellMouseListenerFeature(this.column,t);c&&this.createManagedBean(c)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const s=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:s,expandableChanged:s})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),s=tb(t,this.gos,null,e);e.isPadding()?(s.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(i=>i.isSpanHeaderHeight())&&s.push("ag-header-span-height")):(s.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&s.push("ag-header-cell-wrap-text"));for(const n of s)this.comp.toggleCss(n,!0)}setupMovingCss(e){const{column:t}=this,n=t.getProvidedColumnGroup().getLeafColumns(),i=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(const o of n)e.addManagedListeners(o,{movingChanged:i});i()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;const{column:s,expandable:n,gos:i,beans:o}=this,r=Ho(i);if(e.key==j.ENTER){if(r&&!e.altKey)o.rangeSvc?.handleColumnSelection(s,e);else if(n){const a=!s.isExpanded();o.colGroupSvc.setColumnGroupOpened(s.getProvidedColumnGroup(),a,"uiColumnExpanded")}}}refreshAnnouncement(){let e;const{gos:t}=this;Ho(t)&&(e=this.getLocaleTextFunc()("ariaColumnGroupCellSelection","Press Enter to toggle selection for all visible cells in this column group")),this.ariaAnnouncement=e}announceAriaDescription(){const{beans:e,eGui:t,ariaAnnouncement:s}=this;!s||!t.contains(dt(e))||e.ariaAnnounce?.announceValue(s,"columnHeader")}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function BP(e,t,s){e.colGroupSvc?.setColumnGroupOpened(t,s,"api")}function GP(e,t,s){return e.colGroupSvc?.getColumnGroup(t,s)??null}function VP(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function jP(e,t,s){return e.colNames.getDisplayNameForColumnGroup(t,s)||""}function zP(e){return e.colGroupSvc?.getColumnGroupState()??[]}function WP(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function _P(e){e.colGroupSvc?.resetColumnGroupState("api")}function UP(e){return e.visibleCols.treeLeft}function $P(e){return e.visibleCols.treeCenter}function qP(e){return e.visibleCols.treeRight}function KP(e){return e.visibleCols.getAllTrees()}var Tb=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let s;return typeof t!="number"?s=0:s=t+1,this.existingIds[e]=s,s}};function YP(e,t){for(let s=0;s<t.length;s++){const n=e.indexOf(t[s]);n>=0&&(e[n]=e[e.length-1],e.pop())}}var ZP=class extends _{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colFlex:s,colModel:n,colGroupSvc:i,colViewport:o,selectionColSvc:r}=this.beans;t||this.buildTrees(n,i),i?.updateOpenClosedVisibility(),this.leftCols=Mu(this.treeLeft),this.centerCols=Mu(this.treeCenter),this.rightCols=Mu(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(n),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),s?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(n,this.leftCols,this.rightCols,e),o.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(const t of this.allCols){let s=t.getParent();for(;s;){if(!s.isPadding()){const n=s.getProvidedColumnGroup().getLevel()+1;n>e&&(e=n);break}s=s.getParent()}}return e}updateBodyWidths(){const e=on(this.centerCols),t=on(this.leftCols),s=on(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==s)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=s,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,s,n){let i,o;this.gos.get("enableRtl")?(i=t?t[0]:null,o=s?et(s):null):(i=t?et(t):null,o=s?s[0]:null);for(const r of e.getCols())r.setLastLeftPinned(r===i,n),r.setFirstRightPinned(r===o,n)}buildTrees(e,t){const s=e.getColsToShow(),n=s.filter(l=>l.getPinned()=="left"),i=s.filter(l=>l.getPinned()=="right"),o=s.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),r=new Tb,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:n,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:i,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:o,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),s=[],n=[],i=[];for(const o of t){const r=o.getPinned();r?r===!0||r==="left"?s.push(o):i.push(o):n.push(o)}this.ariaOrderColumns=s.concat(n).concat(i)}getAriaColIndex(e){let t;return vt(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(const e of[this.treeLeft,this.treeRight,this.treeCenter])for(const t of e)vt(t)&&t.checkLeft()}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const n=t.getCols().slice(0),i=this.gos.get("enableRtl");for(const o of[this.leftCols,this.rightCols,this.centerCols]){if(i){let r=on(o);for(const a of o)r-=a.getActualWidth(),a.setLeft(r,e)}else{let r=0;for(const a of o)a.setLeft(r,e),r+=a.getActualWidth()}YP(n,o)}for(const o of n)o.setLeft(null,e)}joinCols(){this.gos.get("enableRtl")?this.allCols=this.rightCols.concat(this.centerCols).concat(this.leftCols):this.allCols=this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){const{leftCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:s}}=this;return s.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,s,n){const i=[];let o=null;for(let r=0;r<t.length;r++){const a=t[r],l=t.length-r,c=Math.min(a.getColSpan(e),l),d=[a];if(c>1){const p=c-1;for(let f=1;f<=p;f++)d.push(t[r+f]);r+=p}let u;if(s){u=!1;for(const p of d)s(p)&&(u=!0)}else u=!0;u&&(i.length===0&&o&&n&&n(a)&&i.push(o),i.push(a)),o=a}return i}getContainerWidth(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){const t=this.allCols,s=t.indexOf(e);return s>0?t[s-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};Ai(this.treeCenter,!1,e),Ai(this.treeLeft,!1,e),Ai(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let s=0;s<t.length;s++){const n=this[t[s]];if(n.length)return e?et(n):n[0]}return null}getColAfter(e){const t=this.allCols,s=t.indexOf(e);return s<t.length-1?t[s+1]:null}getColsLeftWidth(){return on(this.leftCols)}getDisplayedColumnsRightWidth(){return on(this.rightCols)}isColAtEdge(e,t){const s=this.allCols;if(!s.length)return!1;const n=t==="first";let i;if(vt(e)){const o=e.getDisplayedLeafColumns();if(!o.length)return!1;i=n?o[0]:et(o)}else i=e;return(n?s[0]:et(s))===i}};function Ai(e,t,s){if(e)for(let n=0;n<e.length;n++){const i=e[n];if(vt(i)){const o=t?i.getDisplayedChildren():i.getChildren();Ai(o,t,s)}s(i)}}function Mu(e){const t=[];return Ai(e,!0,s=>{Zn(s)&&t.push(s)}),t}var XP=class extends _{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return cn(null,t,s=>{Nt(s)&&e.push({groupId:s.getGroupId(),open:s.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const s=[];cn(null,t,n=>{if(Nt(n)){const i=n.getColGroupDef(),o={groupId:n.getGroupId(),open:i?i.openByDefault:void 0};s.push(o)}}),this.setColumnGroupState(s,e)}setColumnGroupState(e,t){const{colModel:s,colAnimation:n,visibleCols:i,eventSvc:o}=this.beans;if(!s.getColTree().length)return;n?.start();const a=[];for(const l of e){const c=l.groupId,d=l.open,u=this.getProvidedColGroup(c);u&&u.isExpanded()!==d&&(u.setExpanded(d),a.push(u))}i.refresh(t,!0),a.length&&o.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),n?.finish()}setColumnGroupOpened(e,t,s){let n;Nt(e)?n=e.getId():n=e||"",this.setColumnGroupState([{groupId:n,open:t}],s)}getProvidedColGroup(e){let t=null;return cn(null,this.beans.colModel.getColTree(),s=>{Nt(s)&&s.getId()===e&&(t=s)}),t}getGroupAtDirection(e,t){const s=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),n=e.getDisplayedLeafColumns(),i=t==="After"?et(n):n[0],o=`getCol${t}`;for(;;){const r=this.beans.visibleCols[o](i);if(!r)return null;const a=this.getColGroupAtLevel(r,s);if(a!==e)return a}}getColGroupAtLevel(e,t){let s=e.getParent(),n,i;for(;n=s.getProvidedColumnGroup().getLevel(),i=s.getPaddingLevel(),!(n+i<=t);)s=s.getParent();return s}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();Ai(e,!1,t=>{vt(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(vt(e))return e;const s=this.beans.visibleCols.getAllTrees(),n=typeof t=="number";let i=null;return Ai(s,!1,o=>{if(vt(o)){const r=o;let a;n?a=e===r.getGroupId()&&t===r.getPartId():a=e===r.getGroupId(),a&&(i=r)}}),i}createColumnGroups(e){const{columns:t,idCreator:s,pinned:n,oldDisplayedGroups:i,isStandaloneStructure:o}=e,r=this.mapOldGroupsById(i),a=[];let l=t;for(;l.length;){const c=l;l=[];let d=0;const u=p=>{const f=d;d=p;const m=c[f],C=(vt(m)?m.getProvidedColumnGroup():m).getOriginalParent();if(C==null){for(let b=f;b<p;b++)a.push(c[b]);return}const w=this.createColumnGroup(C,s,r,n,o);for(let b=f;b<p;b++)w.addChild(c[b]);l.push(w)};for(let p=1;p<c.length;p++){const f=c[p],v=(vt(f)?f.getProvidedColumnGroup():f).getOriginalParent(),C=c[d],b=(vt(C)?C.getProvidedColumnGroup():C).getOriginalParent();v!==b&&u(p)}d<c.length&&u(c.length)}return o||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,s,n,i,o,r){const a=i.getUniqueKey(t.groupId||null,null),l=Xf(this.beans,t,a),c=new $l(l,a,!1,s);this.createBean(c);const d=this.findExistingGroup(t,o);d&&o.splice(d.idx,1);const u=d?.group;u&&c.setExpanded(u.isExpanded());const p=kw(this.beans,l.children,s+1,e,n,i,o,r);return c.setChildren(p),c}balanceColumnTree(e,t,s,n){const i=[];for(let o=0;o<e.length;o++){const r=e[o];if(Nt(r)){const a=r,l=this.balanceColumnTree(a.getChildren(),t+1,s,n);a.setChildren(l),i.push(a)}else{let a,l;for(let c=t;c<s;c++){const d=n.getUniqueKey(null,null),u=Xf(this.beans,null,d),p=new $l(u,d,!0,c);this.createBean(p),l&&l.setChildren([p]),l=p,a||(a=l)}if(a&&l)if(i.push(a),e.some(d=>Nt(d))){l.setChildren([r]);continue}else{l.setChildren(e);break}i.push(r)}}return i}findDepth(e){let t=0,s=e;for(;s?.[0]&&Nt(s[0]);)t++,s=s[0].getChildren();return t}findMaxDepth(e,t){let s=t;for(let n=0;n<e.length;n++){const i=e[n];if(Nt(i)){const o=i,r=this.findMaxDepth(o.getChildren(),t+1);s<r&&(s=r)}}return s}balanceTreeForAutoCols(e,t){const s=[];for(const n of e){let i=n;for(let o=t-1;o>=0;o--){const r=new $l(null,`FAKE_PATH_${n.getId()}_${o}`,!0,o);this.createBean(r),r.setChildren([i]),i.originalParent=r,i=r}t===0&&(n.originalParent=null),s.push(i)}return s}findExistingGroup(e,t){if(e.groupId!=null)for(let n=0;n<t.length;n++){const i=t[n];if(i.getColGroupDef()&&i.getId()===e.groupId)return{idx:n,group:i}}}createColumnGroup(e,t,s,n,i){const o=e.getGroupId(),r=t.getInstanceIdForKey(o),a=Lw(o,r);let l=s[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),le(l)?l.reset():(l=new ma(e,o,r,n),i||this.createBean(l)),l}mapOldGroupsById(e){const t={},s=n=>{for(const i of n)if(vt(i)){const o=i;t[i.getUniqueId()]=o,s(o.getChildren())}};return e&&s(e),t}setupParentsIntoCols(e,t){for(const s of e??[])if(s.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),s.parent=t,vt(s)){const n=s;this.setupParentsIntoCols(n.getChildren(),n)}}},QP={moduleName:"ColumnGroup",version:ie,dynamicBeans:{headerGroupCellCtrl:HP},beans:[XP],apiFunctions:{getAllDisplayedColumnGroups:KP,getCenterDisplayedColumnGroups:$P,getColumnGroup:GP,getColumnGroupState:zP,getDisplayNameForColumnGroup:jP,getLeftDisplayedColumnGroups:UP,getProvidedColumnGroup:VP,getRightDisplayedColumnGroups:qP,resetColumnGroupState:_P,setColumnGroupOpened:BP,setColumnGroupState:WP}};function Ps(e,t,s){const{colModel:n,rowGroupColsSvc:i,pivotColsSvc:o,autoColSvc:r,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:d,environment:u,valueColsSvc:p,eventSvc:f,gos:m}=e,v=n.getColDefCols()??[],C=a?.getColumns();if(!v.length&&!C?.length)return!1;if(t?.state&&!t.state.forEach)return X(32),!1;const w=(y,R,E,F,P)=>{if(!y)return;const k=ZF(R,t.defaultState),D=k("flex").value1,T=k("sort").value1,I=k("sortType").value1,H=$n(T)||Lp(I),A=gn(I),O=Jc(T),G=H?{type:A,direction:O}:void 0;if(Iw(e,y,k("hide").value1,G,k("sortIndex").value1,k("pinned").value1,D,s),D==null){const L=k("width").value1;if(L!=null){const U=y.getColDef().minWidth??u.getDefaultColumnMinWidth();U!=null&&L>=U&&y.setActualWidth(L,s)}}P||!y.isPrimary()||(p?.syncColumnWithState(y,s,k),i?.syncColumnWithState(y,s,k,E),o?.syncColumnWithState(y,s,k,F))},b=(y,R,E)=>{const F=kb(e,s),P=R.slice(),k={},D={},T=[],I=[],H=[];let A=0;const O=i?.columns.slice()??[],G=o?.columns.slice()??[];for(const B of y){const N=B.colId;if(N.startsWith(Wn)){T.push(B),H.push(B);continue}if(oi(N)){I.push(B),H.push(B);continue}const Y=E(N);Y?(w(Y,B,k,D,!1),_s(P,Y)):(H.push(B),A+=1)}const L=B=>w(B,null,k,D,!1);P.forEach(L),i?.sortColumns(Em.bind(i,k,O)),o?.sortColumns(Em.bind(o,D,G)),n.refreshCols(!1,s);const U=(B,N,W=[])=>{for(const Y of N){const te=B(Y.colId);_s(W,te),w(te,Y,null,null,!0)}W.forEach(L)};return U(B=>r?.getColumn(B)??null,T,r?.getColumns()?.slice()),U(B=>a?.getColumn(B)??null,I,a?.getColumns()?.slice()),e4(t,n,m),c.refresh(s),f.dispatchEvent({type:"columnEverythingChanged",source:s}),F(),{unmatchedAndAutoStates:H,unmatchedCount:A}};l?.start();let{unmatchedAndAutoStates:x,unmatchedCount:S}=b(t.state||[],v,y=>n.getColDefCol(y));if(x.length>0||le(t.defaultState)){const y=d?.getPivotResultCols()?.list??[];S=b(x,y,R=>d?.getPivotResultCol(R)??null).unmatchedCount}return l?.finish(),S===0}function JP(e,t){const{colModel:s,autoColSvc:n,selectionColSvc:i,eventSvc:o,gos:r}=e,a=s.getColDefCols();if(!a?.length)return;const l=s.getColDefColTree(),c=Mw(l),d=[];let u=1e3,p=1e3;const f=b=>{const x=Ib(b);ht(x.rowGroupIndex)&&x.rowGroup&&(x.rowGroupIndex=u++),ht(x.pivotIndex)&&x.pivot&&(x.pivotIndex=p++),d.push(x)};n?.getColumns()?.forEach(f),i?.getColumns()?.forEach(f),c?.forEach(f),Ps(e,{state:d},t);const m=n?.getColumns()??[],w=[...i?.getColumns()??[],...m,...a].map(b=>({colId:b.colId}));Ps(e,{state:w,applyOrder:!0},t),o.dispatchEvent(Te(r,{type:"columnsReset",source:t}))}function kb(e,t){const{rowGroupColsSvc:s,pivotColsSvc:n,valueColsSvc:i,colModel:o,sortSvc:r,eventSvc:a}=e,l={rowGroupColumns:s?.columns.slice()??[],pivotColumns:n?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},c=Sc(e),d={};for(const u of c)d[u.colId]=u;return()=>{const u=(R,E,F,P)=>{const k=E.map(P),D=F.map(P);if(ii(k,D))return;const I=new Set(E);for(const A of F)I.delete(A)||I.add(A);const H=[...I];a.dispatchEvent({type:R,columns:H,column:H.length===1?H[0]:null,source:t})},p=R=>{const E=[];return o.forAllCols(F=>{const P=d[F.getColId()];P&&R(P,F)&&E.push(F)}),E},f=R=>R.getColId();u("columnRowGroupChanged",l.rowGroupColumns,s?.columns??[],f),u("columnPivotChanged",l.pivotColumns,n?.columns??[],f);const v=p((R,E)=>{const F=R.aggFunc!=null,P=F!=E.isValueActive(),k=F&&R.aggFunc!=E.getAggFunc();return P||k});v.length>0&&kP(a,"columnValueChanged",v,t),Zo(a,p((R,E)=>R.width!=E.getActualWidth()),!0,t),Pb(a,p((R,E)=>R.pinned!=E.getPinned()),t),TP(a,p((R,E)=>R.hide==E.isVisible()),t);const S=p((R,E)=>!Ul(E.getSortDef(),{type:gn(R.sortType),direction:Jc(R.sort)})||R.sortIndex!=E.getSortIndex());S.length>0&&r?.dispatchSortChangedEvents(t,S);const y=Sc(e);s4(c,y,t,o,a)}}function Sc(e){const{colModel:t,rowGroupColsSvc:s,pivotColsSvc:n}=e,i=t.getColDefCols();if(ht(i)||!t.isAlive())return[];const o=s?.columns,r=n?.columns,a=[],l=d=>{const u=d.isRowGroupActive()&&o?o.indexOf(d):null,p=d.isPivotActive()&&r?r.indexOf(d):null,f=d.isValueActive()?d.getAggFunc():null,m=d.getSortIndex()!=null?d.getSortIndex():null;a.push({colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:d.getSort(),sortType:d.getSortDef()?.type,sortIndex:m,aggFunc:f,rowGroup:d.isRowGroupActive(),rowGroupIndex:u,pivot:d.isPivotActive(),pivotIndex:p,flex:d.getFlex()??null})};t.forAllCols(d=>l(d));const c=new Map(t.getCols().map((d,u)=>[d.getColId(),u]));return a.sort((d,u)=>{const p=c.has(d.colId)?c.get(d.colId):-1,f=c.has(u.colId)?c.get(u.colId):-1;return p-f}),a}function Ib(e){const t=(C,w)=>C??w??null,s=e.getColDef(),n=ws(t(s.sort,s.initialSort)),i=n.direction,o=n.type,r=t(s.sortIndex,s.initialSortIndex),a=t(s.hide,s.initialHide),l=t(s.pinned,s.initialPinned),c=t(s.width,s.initialWidth),d=t(s.flex,s.initialFlex);let u=t(s.rowGroupIndex,s.initialRowGroupIndex),p=t(s.rowGroup,s.initialRowGroup);u==null&&!p&&(u=null,p=null);let f=t(s.pivotIndex,s.initialPivotIndex),m=t(s.pivot,s.initialPivot);f==null&&!m&&(f=null,m=null);const v=t(s.aggFunc,s.initialAggFunc);return{colId:e.getColId(),sort:i,sortType:o,sortIndex:r,hide:a,pinned:l,width:c,flex:d,rowGroup:p,rowGroupIndex:u,pivot:m,pivotIndex:f,aggFunc:v}}function e4(e,t,s){if(!e.applyOrder||!e.state)return;const n=[];for(const i of e.state)i.colId!=null&&n.push(i.colId);t4(t.cols,n,t,s)}function t4(e,t,s,n){if(e==null)return;let i=[];const o={};for(const a of t){if(o[a])continue;const l=e.map[a];l&&(i.push(l),o[a]=!0)}let r=0;for(const a of e.list){const l=a.getColId();if(o[l]!=null)continue;l.startsWith(Wn)?i.splice(r++,0,a):i.push(a)}if(i=Rb(i,n),!Fb(i,s.getColTree())){X(39);return}e.list=i}function s4(e,t,s,n,i){const o={};for(const d of t)o[d.colId]=d;const r={};for(const d of e)o[d.colId]&&(r[d.colId]=!0);const a=e.filter(d=>r[d.colId]),l=t.filter(d=>r[d.colId]),c=[];l.forEach((d,u)=>{const p=a?.[u];if(p&&p.colId!==d.colId){const f=n.getCol(p.colId);f&&c.push(f)}}),c.length&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:s})}var Em=(e,t,s,n)=>{const i=e[s.getId()],o=e[n.getId()],r=i!=null,a=o!=null;if(r&&a)return i-o;if(r)return-1;if(a)return 1;const l=t.indexOf(s),c=t.indexOf(n),d=l>=0,u=c>=0;return d&&u?l-c:d?-1:1},n4=class extends _{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","groupHideColumnsUntilExpanded","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(Go(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Go(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:s,colAutosize:n,rowGroupColsSvc:i,pivotColsSvc:o,valueColsSvc:r,visibleCols:a,eventSvc:l,groupHierarchyColSvc:c}=t,d=this.colDefs?kb(t,e):void 0;s?.expire();const u=this.colDefCols?.list,p=this.colDefCols?.tree,f=GF(t,this.colDefs,!0,p,e);fc(t,this.colDefCols?.tree,f.columnTree);const m=f.columnTree,v=f.treeDepth,C=Mw(m),w={};for(const b of C)w[b.getId()]=b;this.colDefCols={tree:m,treeDepth:v,list:C,map:w},this.createColumnsForService([c],this.colDefCols,e),i?.extractCols(e,u),o?.extractCols(e,u),r?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,a.refresh(e),l.dispatchEvent({type:"columnEverythingChanged",source:e}),d&&(this.changeEventsDispatching=!0,d(),this.changeEventsDispatching=!1),l.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&n?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;const s=this.cols?.tree;this.saveColOrder();const{autoColSvc:n,selectionColSvc:i,rowNumbersSvc:o,quickFilter:r,pivotResultCols:a,showRowGroupCols:l,rowAutoHeight:c,visibleCols:d,colViewport:u,eventSvc:p,formula:f}=this.beans,m=this.selectCols(a,this.colDefCols);f?.setFormulasActive(m),this.createColumnsForService([n,i,o],m,t);const v=pF(this.gos,this.showingPivotResult);(!e||v)&&this.restoreColOrder(m),this.positionLockedCols(m),l?.refresh(),r?.refreshCols(),this.setColSpanActive(),c?.setAutoHeightActive(m),d.clear(),u.clear(),ii(s,this.cols.tree)||p.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,s){for(const n of e)n&&(n.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)},s),n.addColumns(t))}selectCols(e,t){const s=e?.getPivotResultCols()??null;this.showingPivotResult=s!=null;const{map:n,list:i,tree:o,treeDepth:r}=s??t;return this.cols={list:i.slice(),map:{...n},tree:o.slice(),treeDepth:r},s&&(s.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{beans:e,showingPivotResult:t,cols:s}=this,{valueColsSvc:n,selectionColSvc:i,gos:o}=e,r=this.isPivotMode()&&!t,a=i?.isSelectionColumnEnabled(),l=gF(e),c=n?.columns,d=vF(o);return s.list.filter(p=>{const f=Hp(p);return r?c?.includes(p)||f&&(!d||p.isVisible())||a&&oi(p)||l&&_t(p):f&&!d||p.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,s){Ps(this.beans,{state:e.map(n=>({colId:typeof n=="string"?n:n.getColId(),hide:!t}))},s)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const s=t.filter(u=>e.map[u.getId()]!=null);if(s.length===0)return;if(s.length===e.list.length){e.list=s;return}const n=u=>{const p=u.getOriginalParent();return p?p.getChildren().length>1?!0:n(p):!1};if(!s.some(u=>n(u))){const u=new Set(s);for(const p of e.list)u.has(p)||s.push(p);e.list=s;return}const i=new Map;for(let u=0;u<s.length;u++){const p=s[u];i.set(p,u)}const o=e.list.filter(u=>!i.has(u));if(o.length===0){e.list=s;return}const r=(u,p)=>{const f=p?p.getOriginalParent():u.getOriginalParent();if(!f)return null;let m=null,v=null;for(const C of f.getChildren())if(!(C===p||C===u)){if(C instanceof Qi){const w=i.get(C);if(w==null)continue;(m==null||m<w)&&(m=w,v=C);continue}C.forEachLeafColumn(w=>{const b=i.get(w);b!=null&&(m==null||m<b)&&(m=b,v=w)})}return v??r(u,f)},a=[],l=new Map;for(const u of o){const p=r(u,null);if(p==null){a.push(u);continue}const f=l.get(p);f===void 0?l.set(p,u):Array.isArray(f)?f.push(u):l.set(p,[f,u])}const c=new Array(e.list.length);let d=c.length-1;for(let u=a.length-1;u>=0;u--)c[d--]=a[u];for(let u=s.length-1;u>=0;u--){const p=s[u],f=l.get(p);if(f)if(Array.isArray(f))for(let m=f.length-1;m>=0;m--){const v=f[m];c[d--]=v}else c[d--]=f;c[d--]=p}e.list=c}positionLockedCols(e){e.list=Rb(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);const{visibleCols:s,eventSvc:n}=this.beans;s.refresh(t),n.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=Go(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){fc(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){const{pivotResultCols:t,autoColSvc:s,selectionColSvc:n,groupHierarchyColSvc:i}=this.beans;Tr(this.colDefCols?.list,e)||Tr(s?.columns?.list,e)||Tr(n?.columns?.list,e)||Tr(i?.columns?.list,e)||Tr(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;const{map:s,list:n}=t;if(typeof e=="string"&&s[e])return s[e];for(let a=0;a<n.length;a++)if(Yr(n[a],e))return n[a];const{autoColSvc:i,selectionColSvc:o,groupHierarchyColSvc:r}=this.beans;return i?.getColumn(e)??o?.getColumn(e)??r?.getColumn(e)??null}},i4=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",o4=class extends or{constructor(e,t,s){super(t,s),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(i4)}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:s,labelAlignment:n,disabled:i,labelEllipsis:o}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),s!=null&&this.setLabelWidth(s),o!=null&&this.setLabelEllipsis(o),this.setLabelAlignment(n||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Jt(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(st(t,!1),Gi(t,"presentation")):(st(t,!0),Gi(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const s=this.getGui().classList;return s.toggle("ag-label-align-left",e==="left"),s.toggle("ag-label-align-right",e==="right"),s.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(ac(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return da(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},Mb=class extends o4{constructor(e,t,s,n){super(e,t,s),this.className=n}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:s,ariaLabel:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),s!=null&&this.onValueChange(s),n!=null&&this.setAriaLabel(n),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),s=this.getLabel();s==null||s==""||f3(e)!==null?ca(e,""):ca(e,t??"")}setAriaLabel(e){return $o(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Vs(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function r4(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Ri=class extends Mb{constructor(e,t,s="text",n="input"){super(e,e?.template??r4(n),[],t),this.inputType=s,this.displayFieldTag=n,this.eLabel=xe,this.eWrapper=xe,this.eInput=xe}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:e,eWrapper:t,eInput:s,className:n}=this;e.classList.add(`${n}-label`),t.classList.add(`${n}-input-wrapper`),s.classList.add(`${n}-input`),this.addCss("ag-input-field"),s.id=s.id||`ag-${this.getCompId()}-input`;const{inputName:i,inputWidth:o,inputPlaceholder:r,autoComplete:a,tabIndex:l}=this.config;i!=null&&this.setInputName(i),o!=null&&this.setInputWidth(o),r!=null&&this.setInputPlaceholder(r),a!=null&&this.setAutoComplete(a),this.addInputListeners(),this.activateTabIndex([s],l)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag==="input"&&(this.inputType=e,Zt(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return ac(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Zt(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return $o(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return da(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Zt(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Zt(this.eInput,"autocomplete",t)}return this}},Jp=class extends Ri{constructor(e,t="ag-checkbox",s="checkbox"){super(e,t,s),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t,name:s}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t),s!=null&&this.setName(s)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const s=this.eInput;s.checked=e,s.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,s){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:s});const n=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:n.id,name:n.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),s=this.selected=e.target.checked;this.refreshSelectedClass(s),this.dispatchChange(s,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},eg={selector:"AG-CHECKBOX",component:Jp},a4=".ag-checkbox-cell{height:100%}",l4={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},c4=class extends ft{constructor(){super(l4,[eg]),this.eCheckbox=xe,this.registerCSS(a4)}init(e){this.refresh(e);const{eCheckbox:t,beans:s}=this,n=t.getInputElement();n.setAttribute("tabindex","-1"),qC(n,"polite"),this.addManagedListeners(n,{click:i=>{if(_i(i),t.isDisabled())return;const o=t.getValue();this.onCheckboxChanged(o)},dblclick:i=>{_i(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===j.SPACE&&!t.isDisabled()){e.eGridCell===dt(s)&&t.toggle();const o=t.getValue();this.onCheckboxChanged(o),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,s=!0;const{value:n,column:i,node:o}=e;if(o.group&&i)if(typeof n=="boolean")t=n;else{const u=i.getColId();u.startsWith(Wn)?t=n==null||n===""?void 0:n==="true":o.aggData&&o.aggData[u]!==void 0||o.sourceRowIndex>=0?t=n??void 0:s=!1}else t=n??void 0;const{eCheckbox:r}=this;if(!s){r.setDisplayed(!1);return}r.setValue(t);const a=e.disabled??!i?.isCellEditable(o);r.setDisabled(a);const l=this.getLocaleTextFunc(),c=Xc(l,t),d=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;r.setInputAriaLabel(d)}onCheckboxChanged(e){const{params:t}=this,{column:s,node:n,value:i}=t,{editSvc:o}=this.beans;if(!s)return;const r={rowNode:n,column:s};o?.dispatchCellEvent(r,null,"cellEditingStarted",{value:i});const a=n.setDataValue(s,e,"ui");o?.dispatchCellEvent(r,null,"cellEditingStopped",{oldValue:i,newValue:e,valueChanged:a}),a||this.updateCheckbox(t)}},d4={tag:"div",cls:"ag-skeleton-container"},u4=class extends ft{constructor(){super(d4)}init(t){const s=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",s),this.addDestroyFunc(()=>ca(t.eParentOfValue)),ca(t.eParentOfValue,s),t.deferRender?this.setupLoading(t):t.node.failedLoad?this.setupFailed():this.setupLoading(t)}setupFailed(){const t=this.getLocaleTextFunc();this.getGui().textContent=t("loadingError","ERR");const s=t("ariaSkeletonCellLoadingFailed","Row failed to load");$o(this.getGui(),s)}setupLoading(t){const s=cs({tag:"div",cls:"ag-skeleton-effect"}),n=t.node.rowIndex;if(n!=null){const r=75+25*(n%2===0?Math.sin(n):Math.cos(n));s.style.width=`${r}%`}this.getGui().appendChild(s);const i=this.getLocaleTextFunc(),o=t.deferRender?i("ariaDeferSkeletonCellLoading","Cell is loading"):i("ariaSkeletonCellLoading","Row data is loading");$o(this.getGui(),o)}refresh(t){return!1}},h4={moduleName:"CheckboxCellRenderer",version:ie,userComponents:{agCheckboxCellRenderer:c4}},p4={moduleName:"SkeletonCellRenderer",version:ie,userComponents:{agSkeletonCellRenderer:u4}};function g4(e,t){const s=e.colModel.getColDefCol(t);return s?s.getColDef():null}function f4(e){return e.colModel.getColumnDefs(!0)}function m4(e,t,s){return e.colNames.getDisplayNameForColumn(t,s)||""}function v4(e,t){return e.colModel.getColDefCol(t)}function C4(e){return e.colModel.getColDefCols()}function w4(e,t){return Ps(e,t,"api")}function b4(e){return Sc(e)}function x4(e){JP(e,"api")}function y4(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function S4(e){return e.visibleCols.isPinningLeft()}function R4(e){return e.visibleCols.isPinningRight()}function F4(e,t){return e.visibleCols.getColAfter(t)}function E4(e,t){return e.visibleCols.getColBefore(t)}function D4(e,t,s){e.colModel.setColsVisible(t,s,"api")}function P4(e,t,s){e.pinnedCols?.setColsPinned(t,s,"api")}function T4(e){return e.colModel.getCols()}function k4(e){return e.visibleCols.leftCols}function I4(e){return e.visibleCols.centerCols}function M4(e){return e.visibleCols.rightCols}function A4(e){return e.visibleCols.allCols}function L4(e){return e.colViewport.getViewportColumns()}function Ih(e,t){if(!e)return;const s=e,n={};for(const i of Object.keys(s)){if(t&&t.indexOf(i)>=0||ow.has(i))continue;const o=s[i];typeof o=="object"&&o!==null&&o.constructor===Object?n[i]=Ih(o):n[i]=o}return n}var N4=class extends _{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,s,n,i=!1){const o=e.slice();t?o.sort((l,c)=>s.indexOf(l)-s.indexOf(c)):(s||i)&&o.sort((l,c)=>n.indexOf(l)-n.indexOf(c));const r=this.rowGroupColsSvc?.columns,a=this.pivotColsSvc?.columns;return this.buildColumnDefs(o,r,a)}buildColumnDefs(e,t=[],s=[]){const n=[],i={};for(const o of e){const r=this.createDefFromColumn(o,t,s);let a=!0,l=r,c=o.getOriginalParent(),d=null;for(;c;){let u=null;if(c.isPadding()){c=c.getOriginalParent();continue}const p=i[c.getGroupId()];if(p){p.children.push(l),a=!1;break}if(u=this.createDefFromGroup(c),u&&(u.children=[l],i[u.groupId]=u,l=u,c=c.getOriginalParent()),c!=null&&d===c){a=!1;break}d=c}a&&n.push(l)}return n}createDefFromGroup(e){const t=Ih(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,s){const n=Ih(e.getColDef());return n.colId=e.getColId(),n.width=e.getActualWidth(),n.rowGroup=e.isRowGroupActive(),n.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,n.pivot=e.isPivotActive(),n.pivotIndex=e.isPivotActive()?s.indexOf(e):null,n.aggFunc=e.isValueActive()?e.getAggFunc():null,n.hide=e.isVisible()?void 0:!0,n.pinned=e.isPinned()?e.getPinned():null,n.sort=e.getSortDef(),n.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,n}},O4=class extends _{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const s=this.flexViewportWidth,{visibleCols:n,colDelayRenderSvc:i}=this.beans,o=n.centerCols;let r=-1;if(e.resizingCols){const v=new Set(e.resizingCols);for(let C=o.length-1;C>=0;C--)if(v.has(o[C])){r=C;break}}let a=!1;const l=o.map((v,C)=>{const w=v.getFlex(),b=w!=null&&w>0&&C>r;return a||(a=b),{col:v,isFlex:b,flex:Math.max(0,w??0),initialSize:v.getActualWidth(),min:v.getMinWidth(),max:v.getMaxWidth(),targetSize:0}});if(a?(i?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(i),!s||!a)return[];let c=l.length,d=l.reduce((v,C)=>v+C.flex,0),u=s;const p=(v,C)=>{v.frozenSize=C,v.col.setActualWidth(C,t),u-=C,d-=v.flex,c-=1},f=v=>v.frozenSize!=null;for(const v of l)v.isFlex||p(v,v.initialSize);for(;c>0;){const v=Math.round(d<1?u*d:u);let C,w=0,b=0;for(const y of l){if(f(y))continue;C=y,b+=v*(y.flex/d);const R=b-w,E=Math.round(R);y.targetSize=E,w+=E}C&&(C.targetSize+=v-w);let x=0;for(const y of l){if(f(y))continue;const R=y.targetSize,E=Math.min(Math.max(R,y.min),y.max);x+=E-R,y.violationType=E===R?void 0:E<R?"max":"min",y.targetSize=E}const S=x===0?"all":x>0?"min":"max";for(const y of l)f(y)||(S==="all"||y.violationType===S)&&p(y,y.targetSize)}e.skipSetLeft||n.setLeftValues(t),e.updateBodyWidths&&n.updateBodyWidths();const m=l.filter(v=>v.isFlex&&!v.violationType).map(v=>v.col);if(e.fireResizedEvent){const v=l.filter(w=>w.initialSize!==w.frozenSize).map(w=>w.col),C=l.filter(w=>w.flex).map(w=>w.col);Zo(this.eventSvc,v,!0,t,C)}return this.revealColumns(i),m}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){const{flex:t,initialFlex:s}=e.colDef;t!==void 0?e.flex=t:s!==void 0&&(e.flex=s)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},es=e=>{if(typeof e=="bigint")return e;let t;if(typeof e=="number")t=e;else if(typeof e=="string"&&(t=e.trim(),t===""||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},tg="T",H4=new RegExp(`[${tg} ]`),B4=new RegExp(`^\\d{4}-\\d{2}-\\d{2}(${tg}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function Hs(e,t){return e.toString().padStart(t,"0")}function Ut(e,t=!0,s=tg){if(!e)return null;let n=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>Hs(i,2)).join("-");return t&&(n+=s+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>Hs(i,2)).join(":")),n}function Tl(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),Hs(e.getDate(),2),Hs(e.getHours(),2),`:${Hs(e.getMinutes(),2)}`,`:${Hs(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,Hs(e.getDate(),2)].map(String):null}var Au=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},Dm=["January","February","March","April","May","June","July","August","September","October","November","December"],Lu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function G4(e,t){if(t==null)return Ut(e,!1);const s=Hs(e.getFullYear(),4),n={YYYY:()=>s.slice(s.length-4,s.length),YY:()=>s.slice(s.length-2,s.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>Dm[e.getMonth()],MMM:()=>Dm[e.getMonth()].slice(0,3),MM:()=>Hs(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${Au(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${Au(e.getDate())}`,DD:()=>Hs(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>Lu[e.getDay()],ddd:()=>Lu[e.getDay()].slice(0,3),dd:()=>Lu[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${Au(e.getDay())}`,d:()=>`${e.getDay()}`},i=new RegExp(Object.keys(n).join("|"),"g");return t.replace(i,o=>o in n?n[o]():o)}function Zl(e,t=!1){return!!$t(e,t)}function V4(e){return Zl(e,!0)}function $t(e,t=!1,s){if(!e||!s&&!B4.test(e))return null;const[n,i]=e.split(H4);if(!n)return null;const o=n.split("-").map(f=>Number.parseInt(f,10));if(o.filter(f=>!isNaN(f)).length!==3)return null;const[r,a,l]=o,c=new Date(r,a-1,l);if(c.getFullYear()!==r||c.getMonth()!==a-1||c.getDate()!==l||!i&&t)return null;if(!i||i==="00:00:00")return c;const[d,u,p]=i.split(":").map(f=>Number.parseInt(f,10));if(d>=0&&d<24)c.setHours(d);else if(t)return null;if(u>=0&&u<60)c.setMinutes(u);else if(t)return null;if(p>=0&&p<60)c.setSeconds(p);else if(t)return null;return c}function Xr(e,t,s){if(!t||!e)return;if(!s)return e[t];const n=t.split(".");let i=e;for(let o=0;o<n.length;o++){if(i==null)return;i=i[n[o]]}return i}var j4=["dateTimeString","dateString","text","number","bigint","boolean","date"],z4=class extends _{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:"agNumberCellEditor"}},bigint({filterModuleBean:e}){return e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:$4,absolute:q4}}},boolean(){return{cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:s})=>t.key===j.SPACE&&s.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:"agDateCellEditor",keyCreator:e}},dateString({formatValue:e}){return{cellEditor:"agDateStringCellEditor",keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:s}){return{cellEditorParams:{useFormatter:!0},comparator:(n,i)=>{const o=t.getColDefCol(s),r=o?.getColDef();if(!o||!r)return 0;const a=n==null?"":e({column:o,node:null,value:n}),l=i==null?"":e({column:o,node:null,value:i});return a===l?0:a>l?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={},s={},n=d=>u=>{const{column:p,node:f,value:m}=u;let v=p.getColDef().valueFormatter;return v===d.groupSafeValueFormatter&&(v=d.valueFormatter),this.beans.valueSvc.formatValue(p,f,m,v)};for(const d of Object.keys(e)){const u=e[d],p={...u,groupSafeValueFormatter:km(u,this.gos)};t[d]=p,s[d]=n(p)}const i=this.gos.get("dataTypeDefinitions")??{},o={};for(const d of Object.keys(i)){const u=i[d],p=this.processDataTypeDefinition(u,i,[d],e);p&&(t[d]=p,u.dataTypeMatcher&&(o[d]=u.dataTypeMatcher),s[d]=n(p))}const{valueParser:r,valueFormatter:a}=e.object,{valueParser:l,valueFormatter:c}=t.object;this.hasObjectValueParser=l!==r,this.hasObjectValueFormatter=c!==a,this.formatValueFuncs=s,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(o,e)}sortKeysInMatchers(e,t){const s={...e};for(const n of j4)delete s[n],s[n]=e[n]??t[n].dataTypeMatcher;return s}processDataTypeDefinition(e,t,s,n){let i;const o=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let r=n[o];const a=t[o];if(r&&a&&(r=a),!Tm(e,r,o))return;i=Pm(r,e)}else{if(s.includes(o)){X(44);return}const r=t[o];if(!Tm(e,r,o))return;const a=this.processDataTypeDefinition(r,t,[...s,o],n);if(!a)return;i=Pm(a,e)}return{...i,groupSafeValueFormatter:km(i,this.gos)}}updateColDefAndGetColumnType(e,t,s){let{cellDataType:n}=t;n===void 0&&(n=e.cellDataType);const{field:i}=t;if((n==null||n===!0)&&(n=this.canInferCellDataType(e,t)?this.inferCellDataType(i,s):!1),this.addFormulaCellEditorToColDef(e,t),!n){e.cellDataType=!1;return}const o=this.dataTypeDefinitions[n];if(!o){X(47,{cellDataType:n});return}return e.cellDataType=n,o.groupSafeValueFormatter&&(e.valueFormatter=o.groupSafeValueFormatter),o.valueParser&&(e.valueParser=o.valueParser),o.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,n,o,s),o.columnTypes}addFormulaCellEditorToColDef(e,t){!(t.allowFormula??e.allowFormula)||t.cellEditor||(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const s=n=>{t.add(n.key)};e.__addEventListener("columnStateUpdated",s),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",s))}canInferCellDataType(e,t){const{gos:s}=this;if(!gt(s))return!1;const n={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Nu(t,n))return!1;const i=t.type===null?e.type:t.type;if(i){const o=s.get("columnTypes")??{};if(mc(i).some(a=>{const l=o[a.trim()];return l&&Nu(l,n)}))return!1}return!Nu(e,n)}inferCellDataType(e,t){if(!e)return;let s;const n=this.getInitialData();if(n){const o=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");s=Xr(n,e,o)}else this.initWaitForRowData(t);return s==null?void 0:Object.keys(this.dataTypeMatchers).find(o=>this.dataTypeMatchers[o](s))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:s,eventSvc:n}=this.beans;t&&s&&(s.shouldQueueResizeOperations=!0);const[i]=this.addManagedEventListeners({rowDataUpdateStarted:o=>{const{firstRowData:r}=o;r&&(i?.(),this.isPendingInference=!1,this.processColumnsPendingInference(r,t),this.columnStateUpdatesPendingInference={},t&&s?.processResizeOperations(),n.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const s=[];this.destroyColumnStateUpdateListeners();const n={},i={};for(const o of Object.keys(this.columnStateUpdatesPendingInference)){const r=this.columnStateUpdatesPendingInference[o],a=this.colModel.getCol(o);if(!a)continue;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))continue;const c=a.getColDef();if(t&&c.type&&c.type!==l.type){const d=K4(a,r);d.rowGroup&&d.rowGroupIndex==null&&(n[o]=d),d.pivot&&d.pivotIndex==null&&(i[o]=d),s.push(d)}}t&&s.push(...this.generateColumnStateForRowGroupAndPivotIndexes(n,i)),s.length&&Ps(this.beans,{state:s},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const s={},{rowGroupColsSvc:n,pivotColsSvc:i}=this.beans;return n?.restoreColumnOrder(s,e),i?.restoreColumnOrder(s,t),Object.values(s)}resetColDefIntoCol(e,t){const s=e.getUserProvidedColDef();if(!s)return!1;const n=bh(this.beans,s,e.getColId());return e.setColDef(n,s,t),!0}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e==="dateTime"||e==="dateTimeString"}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const s=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!s||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:s(t)}validateColDef(e,t,s,n){if(e.cellDataType==="object"){const i=l=>l?.cellDataType==null||l?.cellDataType===!0,o=i(t)&&i(s),r=l=>X(48,{property:l,inferred:o,colId:n}),{object:a}=this.dataTypeDefinitions;e.valueFormatter===a.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&r("Formatter"),e.editable&&e.valueParser===a.valueParser&&!this.hasObjectValueParser&&r("Parser")}}postProcess(e){const t=e.cellDataType;if(!t||typeof t!="string")return;const{dataTypeDefinitions:s,beans:n,formatValueFuncs:i}=this,o=s[t];o&&n.colFilter?.setColDefPropsForDataType(e,o,i[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,s,n){const i=this.formatValueFuncs[t],o=this.columnDefinitionPropsPerDataType[s.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:s,colId:n,formatValue:i,filterModuleBean:this.beans.filterManager});e.cellEditor==="agFormulaCellEditor"&&o.cellEditor!==e.cellEditor&&(o.cellEditor=e.cellEditor),Object.assign(e,o)}getDateObjectTypeDef(e){const t=this.getLocaleTextFunc(),s=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:n=>$t(n.newValue&&String(n.newValue)),valueFormatter:n=>n.value==null?"":!(n.value instanceof Date)||isNaN(n.value.getTime())?t("invalidDate","Invalid Date"):Ut(n.value,s)??"",dataTypeMatcher:n=>n instanceof Date}}getDateStringTypeDef(e){const t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:s=>$t(s)??void 0,dateFormatter:s=>Ut(s??null,t)??void 0,valueParser:s=>Zl(String(s.newValue))?s.newValue:null,valueFormatter:s=>Zl(String(s.value))?String(s.value):"",dataTypeMatcher:s=>typeof s=="string"&&Zl(s)}}getDefaultDataTypes(){const e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>t.newValue?.trim?.()===""?null:Number(t.newValue),valueFormatter:t=>t.value==null?"":typeof t.value!="number"||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:t=>typeof t=="number"},bigint:{baseDataType:"bigint",valueParser:t=>{const{newValue:s}=t;return s==null||typeof s=="string"&&s.trim()===""?null:es(s)},valueFormatter:t=>t.value==null?"":typeof t.value!="bigint"?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:t=>typeof t=="bigint"},text:{baseDataType:"text",valueParser:t=>t.newValue===""?null:hh(t.newValue),dataTypeMatcher:t=>typeof t=="string"},boolean:{baseDataType:"boolean",valueParser:t=>t.newValue==null?t.newValue:t.newValue?.trim?.()===""?null:String(t.newValue).toLowerCase()==="true",valueFormatter:t=>t.value==null?"":String(t.value),dataTypeMatcher:t=>typeof t=="boolean"},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>typeof t=="string"&&V4(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>hh(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Pm(e,t){const s={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(s.columnTypes=[...mc(e.columnTypes),...mc(t.columnTypes)]),s}function Tm(e,t,s){return t?t.baseDataType!==e.baseDataType?(X(46),!1):!0:(X(45,{parentCellDataType:s}),!1)}var W4=e=>typeof e=="bigint"||typeof e=="number",_4=e=>e==="number"||e==="bigint";function km(e,t){if(e.valueFormatter)return s=>{const{node:n,colDef:i,column:o,value:r}=s;if(n?.group){const a=(i.pivotValueColumn??o).getAggFunc();if(a){if(a==="first"||a==="last")return e.valueFormatter(s);const{baseDataType:l}=e;if(_4(l)&&a!=="count"){if(W4(r))return e.valueFormatter(s);if(r==null)return;if(typeof r=="object"){if(typeof r.toNumber=="function")return e.valueFormatter({...s,value:r.toNumber()});if("value"in r)return e.valueFormatter({...s,value:r.value})}}return}}else if(t.get("groupHideOpenParents")&&s.column.isRowGroupActive()&&typeof s.value=="string"&&!e.dataTypeMatcher?.(s.value))return;return e.valueFormatter(s)}}function U4(e,t,s,n){if(!t[s])return!1;const i=e[s];return i===null?(t[s]=!1,!1):n===void 0?!!i:i===n}function $4(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const s=es(e),n=es(t);return s!=null&&n!=null?s===n?0:s>n?1:-1:0}function q4(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;const s=Im(e),n=Im(t);return s!=null&&n!=null?s===n?0:s>n?1:-1:0}function Im(e){const t=es(e);return t==null?null:t<0n?-t:t}function Nu(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([s,n])=>U4(e,t,s,n))}function K4(e,t){const s=Ib(e);for(const n of t)delete s[n],n==="rowGroup"?delete s.rowGroupIndex:n==="pivot"&&delete s.pivotIndex;return s}var Y4={moduleName:"DataType",version:ie,beans:[z4],dependsOn:[h4]},Z4={moduleName:"ColumnFlex",version:ie,beans:[O4]},Ab={moduleName:"ColumnApi",version:ie,beans:[N4],apiFunctions:{getColumnDef:g4,getDisplayNameForColumn:m4,getColumn:v4,getColumns:C4,applyColumnState:w4,getColumnState:b4,resetColumnState:x4,isPinning:y4,isPinningLeft:S4,isPinningRight:R4,getDisplayedColAfter:F4,getDisplayedColBefore:E4,setColumnsVisible:D4,setColumnsPinned:P4,getAllGridColumns:T4,getDisplayedLeftColumns:k4,getDisplayedCenterColumns:I4,getDisplayedRightColumns:M4,getAllDisplayedColumns:A4,getAllDisplayedVirtualColumns:L4,getColumnDefs:f4}},X4=class extends _{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,s=!1){if(!e)return null;const n=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:i}=this.beans;return s&&i?i.getHeaderName(e,n):n}getDisplayNameForProvidedColumnGroup(e,t,s){const n=t?.getColGroupDef();return n?this.getHeaderName(n,null,e,t,s):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,s,n,i){const o=e.headerValueGetter;if(o){const r=Te(this.gos,{colDef:e,column:t,columnGroup:s,providedColumnGroup:n,location:i});return typeof o=="function"?o(r):typeof o=="string"?this.beans.expressionSvc?.evaluate(o,r)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return u3(e.field)}return""}},Q4=class extends _{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,s=!1){const{visibleCols:n}=this,i=n.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!i)){if(this.scrollWidth=e,this.scrollPosition=t,n.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const r=n.bodyWidth;this.viewportLeft=r-t-e,this.viewportRight=r-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(s)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let s;switch(e){case"left":s=this.rowsOfHeadersToRenderLeft[t];break;case"right":s=this.rowsOfHeadersToRenderRight[t];break;default:s=this.rowsOfHeadersToRenderCenter[t];break}return s??[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||J4(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,s=t+e.getActualWidth(),n=this.viewportLeft-200,i=this.viewportRight+200,o=t<n&&s<n,r=t>i&&s>i;return!o&&!r}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=o=>{const r=o.getLeft();return le(r)&&r>this.viewportLeft},s=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:n}=this,i=n.centerCols;return n.getColsForRow(e,i,s,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){const{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;const s=n=>{const i=new Set,o={};for(const r of n){let a=r.getParent();const l=r.isSpanHeaderHeight();for(;a&&!i.has(a);){if(l&&a.isPadding()){a=a.getParent();continue}const d=a.getProvidedColumnGroup().getLevel();o[d]??(o[d]=[]),o[d].push(a),i.add(a),a=a.getParent()}}return o};this.rowsOfHeadersToRenderLeft=s(e),this.rowsOfHeadersToRenderRight=s(t),this.rowsOfHeadersToRenderCenter=s(this.headerColsWithinViewport)}extractViewport(){const e=n=>`${n.getId()}-${n.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),s=this.colsWithinViewportHash!==t;return s&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),s}};function J4(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var e6=class extends _{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class s{refresh(){return!1}getGui(){return this.eGui}init(i){const o=t(i),r=typeof o;if(r==="string"||r==="number"||r==="boolean"){this.eGui=Ep("<span>"+o+"</span>");return}if(o==null){this.eGui=cs({tag:"span"});return}this.eGui=o}}return s}},t6={moduleName:"CellRendererFunction",version:ie,beans:[e6]},s6=class extends qt{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e){this.dynamicBeans??(this.dynamicBeans={});for(const t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...s){if(!this.dynamicBeans)throw new Error(this.getDynamicError(e,!0));const n=this.dynamicBeans[e];if(n==null){if(t)throw new Error(this.getDynamicError(e,!1));return}return new n(...s)}};function n6(e){return typeof e=="object"&&!!e.getComp}var i6=class extends s6{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:s,dynamicBeans:n,selectors:i}=e;if(s){const o=(r,a,l,c)=>{this.agGridDefaults[r]=a,(l||c)&&(this.agGridDefaultOverrides[r]={params:l,processParams:c})};for(const r of Object.keys(s)){let a=s[r];if(n6(a)&&(a=a.getComp(this.beans)),typeof a=="object"){const{classImp:l,params:c,processParams:d}=a;o(r,l,c,d)}else o(r,a)}}this.registerDynamicBeans(n);for(const o of i??[])this.selectors[o.selector]=o;if(t)for(const o of Object.keys(t))this.icons[o]=t[o]}getUserComponent(e,t){const s=(a,l,c,d)=>({componentFromFramework:l,component:a,params:c,processParams:d}),{frameworkOverrides:n}=this.beans,i=n.frameworkComponent(t,this.gos.get("components"));if(i!=null)return s(i,!0);const o=this.jsComps[t];if(o){const a=n.isFrameworkComponent(o);return s(o,a)}const r=this.agGridDefaults[t];if(r){const a=this.agGridDefaultOverrides[t];return s(r,!1,a?.params,a?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?js(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??js(256)}},o6=23,r6=class extends _{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(const e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===o6&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const s=this.readyCallbacks.indexOf(t);s>=0&&this.readyCallbacks.splice(s,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:e,centerHeader:t,rightHeader:s}=this.params;return[e,s,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},a6=':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);font-weight:var(--ag-font-weight);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',sg=typeof window!="object"||!window?.document?.fonts?.forEach,Lb=!1,Ui=(e,t,s,n,i,o,r=!1)=>{if(sg||Lb)return;let a=e;n&&(a=`@layer ${CSS.escape(n).replaceAll("\\.",".")} { ${e} }`);let l=Bs.map.get(t);if(l||(l=[],Bs.map.set(t,l)),l.some(p=>p.injectedCss===a))return;const c=document.createElement("style");o&&c.setAttribute("nonce",o),c.dataset.agCss=s,c.dataset.agCssVersion=ie,c.textContent=a;const d={rawCss:e,injectedCss:a,el:c,priority:i,isParams:r};let u;for(const p of l){if(p.priority>i)break;u=p}if(u){u.el.after(c);const p=l.indexOf(u);l.splice(p+1,0,d)}else t.nodeName==="STYLE"?t.after(c):t.insertBefore(c,t.querySelector(":not(title, meta)")),l.push(d)},Nb=(e,t,s,n)=>{Ui(a6,e,"shared",t,0,s),n?.forEach((i,o)=>i.forEach(r=>Ui(r,e,o,t,0,s)))},l6=(e,t,s,n,i,o)=>{if(sg||Lb)return;const r=Bs.grids.get(e);r?r.paramsCss=t:Bs.grids.set(e,{styleContainer:n,paramsCss:t}),Mh(n),t&&s&&Ui(t,n,s,i,2,o,!0)},c6=e=>{const t=Bs.grids.get(e)?.styleContainer;if(!t)return;Bs.grids.delete(e),Array.from(Bs.grids.values()).some(n=>n.styleContainer===t)?Mh(t):(Mh(t,!0),Bs.map.delete(t))},Mh=(e,t=!1)=>{const s=new Set;for(const i of Bs.grids.values())i.styleContainer===e&&s.add(i.paramsCss);const n=Bs.map.get(e)??[];for(let i=n.length-1;i>=0;i--)(t||n[i].isParams&&!s.has(n[i].rawCss))&&(n[i].el.remove(),n.splice(i,1))},Ob=()=>{const e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map);let t=e.get(ie);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(ie,t)),t},Bs=Ob(),Bt=e=>new Hb(e),Bn="$default",d6=0,Hb=class{constructor({feature:e,params:t,modeParams:s={},css:n,cssImports:i}){this.feature=e,this.css=n,this.cssImports=i,this.modeParams={[Bn]:{...s[Bn]??{},...t??{}},...s}}use(e,t,s){let n=this._inject;if(n==null){let{css:i}=this;if(i){const o=`ag-theme-${this.feature??"part"}-${++d6}`;typeof i=="function"&&(i=i()),i=`:where(.${o}) {
|
|
9
|
+
${i}
|
|
10
|
+
}
|
|
11
|
+
`;for(const r of this.cssImports??[])i=`@import url(${JSON.stringify(r)});
|
|
12
|
+
${i}`;n={css:i,class:o}}else n=!1;this._inject=n}return n&&e&&Ui(n.css,e,n.class,t,1,s),n?n.class:!1}},u6=e=>e.replace(/[A-Z]|\d+/g,t=>`-${t}`).toLowerCase(),ng=e=>`--ag-${u6(e)}`,$s=e=>`var(${ng(e)})`,h6=(e,t,s)=>Math.max(t,Math.min(s,e)),p6=e=>{const t=new Map;return s=>{const n=s;return t.has(n)||t.set(n,e(s)),t.get(n)}},Os=e=>({ref:"accentColor",mix:e}),zt=e=>({ref:"foregroundColor",mix:e}),Mt=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),g6=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),Ct={ref:"backgroundColor"},Gs={ref:"foregroundColor"},rs={ref:"accentColor"},Ca={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:zt(.15),chromeBackgroundColor:Mt(.02),browserColorScheme:"light"},f6={...Ca,textColor:Gs,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:"inherit",focusShadow:{spread:3,color:Os(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:Ct,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:rs,toggleButtonOffBackgroundColor:Mt(.3),toggleButtonSwitchBackgroundColor:Ct,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:Ct,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:zt(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:zt(.2)},menuBackgroundColor:Mt(.03),menuTextColor:Mt(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},m6=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],v6=p6(e=>(e=e.toLowerCase(),m6.find(t=>e.endsWith(t.toLowerCase()))??"length")),nd=e=>typeof e=="object"&&e?.ref?$s(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,ig=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e&&"ref"in e){const t=$s(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?$s(e.onto):"transparent"}, ${t} ${h6(e.mix*100,0,100)}%)`}return!1},C6=nd,Po=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:typeof e=="object"&&e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,s=>s[0]==="-"?s:" "+$s(s)+" ")})`:typeof e=="object"&&e&&"ref"in e?$s(e.ref):!1,w6=nd,Ah=(e,t)=>typeof e=="string"?e:e===!0?Ah({},t):e===!1?t==="columnBorder"?Ah({color:"transparent"},t):"none":typeof e=="object"&&e&&"ref"in e?$s(e.ref):Bb(e.style??"solid")+" "+Po(e.width??{ref:"borderWidth"})+" "+ig(e.color??{ref:"borderColor"}),Mm=e=>[Po(e.offsetX??0),Po(e.offsetY??0),Po(e.radius??0),Po(e.spread??0),ig(e.color??{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" "),b6=e=>typeof e=="string"?e:e===!1?"none":typeof e=="object"&&e&&"ref"in e?$s(e.ref):Array.isArray(e)?e.map(Mm).join(", "):Mm(e),Bb=nd,Gb=e=>typeof e=="string"?e.includes(",")?e:Am(e):typeof e=="object"&&e&&"googleFont"in e?Gb(e.googleFont):typeof e=="object"&&e&&"ref"in e?$s(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),Am(t))).join(", "):!1,Am=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),x6=nd,Vb=e=>typeof e=="string"?e:typeof e=="object"&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:typeof e=="object"&&e&&"svg"in e?Vb({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e=="object"&&e&&"ref"in e?$s(e.ref):!1,y6=(e,t,s)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&s?.warn(104,{value:e,param:t}),`${e}s`):typeof e=="object"&&e&&"ref"in e?$s(e.ref):!1,S6={color:ig,colorScheme:C6,length:Po,scale:w6,border:Ah,borderStyle:Bb,shadow:b6,image:Vb,fontFamily:Gb,fontWeight:x6,duration:y6},R6=(e,t,s)=>{const n=v6(e);return S6[n](t,e,s)},F6=(e,t)=>new jb({themeLogger:e,overridePrefix:t}),jb=class zb{constructor(t,s=[]){this.params=t,this.parts=s}withPart(t){return typeof t=="function"&&(t=t()),t instanceof Hb?new zb(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(t){return this.withPart(Bt({feature:t}))}withParams(t,s=Bn){return this.withPart(Bt({modeParams:{[s]:t}}))}_startUse({styleContainer:t,cssLayer:s,nonce:n,loadThemeGoogleFonts:i,moduleCss:o}){if(sg)return;D6(),Nb(t,s,n,o);const r=E6(this);if(r.length>0)for(const a of r)i&&P6(a,n);for(const a of this.parts)a.use(t,s,n)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Lm(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" "))}_getParamsClassName(){return this._paramsClassName??(this._paramsClassName=`ag-theme-params-${++Ob().paramsId}`)}_getModeParams(){let t=this._paramsCache;if(!t){const s={[Bn]:{...f6}};for(const n of Lm(this.parts))for(const i of Object.keys(n.modeParams)){const o=n.modeParams[i];if(o){const r=s[i]??(s[i]={}),a=new Set;for(const l of Object.keys(o)){const c=o[l];c!==void 0&&(r[l]=c,a.add(l))}if(i===Bn)for(const l of Object.keys(s)){const c=s[l];if(l!==Bn)for(const d of a)delete c[d]}}}this._paramsCache=t=s}return t}_getParamsCss(){if(!this._paramsCssCache){let t="",s="";const n=this._getModeParams(),{overridePrefix:i,themeLogger:o}=this.params,r=i?`--ag-${i}-`:void 0;for(const c of Object.keys(n)){const d=n[c];if(c!==Bn){const p=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(c):c}"]) & {
|
|
13
|
+
`;t+=p,s+=p}for(const u of Object.keys(d).sort()){const p=d[u],f=R6(u,p,o);if(f===!1)o.error(107,{key:u,value:p});else{const m=ng(u),v=r?m.replace("--ag-",r):m,C=m.replace("--ag-","--ag-inherited-");t+=` ${m}: var(${C}, ${f});
|
|
14
|
+
`,s+=` ${C}: var(${v});
|
|
15
|
+
`}}c!==Bn&&(t+=`}
|
|
16
|
+
`,s+=`}
|
|
17
|
+
`)}const a=`:where(.${this._getParamsClassName()})`;let l=`${a} {
|
|
18
|
+
${t}}
|
|
19
|
+
`;l+=`:has(> ${a}):not(${a}) {
|
|
20
|
+
${s}}
|
|
21
|
+
`,this._paramsCssCache=l}return this._paramsCssCache}},Lm=e=>{const t=new Map;for(const n of e)t.set(n.feature,n);const s=[];for(const n of e)(!n.feature||t.get(n.feature)===n)&&s.push(n);return s},E6=e=>{const t=new Set,s=o=>{if(Array.isArray(o))o.forEach(s);else{const r=o?.googleFont;typeof r=="string"&&t.add(r)}};return Object.values(e._getModeParams()).flatMap(o=>Object.values(o)).forEach(s),Array.from(t).sort()},Nm=!1,D6=()=>{if(!Nm){Nm=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},P6=async(e,t)=>{const s=`@import url('https://${T6}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
|
|
22
|
+
`;Ui(s,document.head,`googleFont:${e}`,void 0,0,t)},T6="fonts.googleapis.com",Om={changeKey:"listItemHeight",type:"length",defaultValue:24},k6=class extends qt{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){const{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);const s=e.get("themeStyleContainer"),n=typeof ShadowRoot<"u",i=n&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(typeof s=="function"?s():s)??(i?t:document.head),!s&&!i&&n&&I6(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(Om),this.initVariables(),this.addDestroyFunc(()=>c6(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){const{theme:s}=this,n=s?s._getCssClass():this.applyLegacyThemeClasses();for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(n){const i=e.className;e.className=`${i}${i?" ":""}${n}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let s=!1;for(const n of Array.from(t.classList))n.startsWith("ag-theme-")&&(s=!0,e=e?`${e} ${n}`:n);s&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?Ui(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Om)}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const s=this.measureSizeEl(e);return s==="detached"||s==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,s),s)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const s=t.offsetWidth;return s===Ou?"no-styles":(this.sizesMeasured=!0,s)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Vi({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const s=this.getMeasurementContainer();t=Vi({tag:"div"});const n=this.setSizeElStyles(t,e);s.appendChild(t),this.sizeEls.set(e,t);const{type:i,noWarn:o}=e;if(i!=="length"&&i!=="border")return t;let r=this.measureSizeEl(e);r==="no-styles"&&!o&&this.varError(n,e.defaultValue);const a=xn(this.beans,t,()=>{const l=this.measureSizeEl(e);l==="detached"||l==="no-styles"||(this.lastKnownValues.set(e,l),l!==r&&(r=l,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>a()),t}setSizeElStyles(e,t){const{changeKey:s,type:n}=t;let i=ng(s);return n==="border"?(i.endsWith("-width")&&(i=i.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${i}, solid ${Ou}px)`)):e.style.width=`var(${i}, ${Ou}px)`,i}handleThemeChange(){const{gos:e,theme:t}=this,s=e.get("theme");let n;if(s==="legacy")n=void 0;else{const i=s??this.getDefaultTheme();i instanceof jb?n=i:this.themeError(i)}n!==t&&this.handleNewTheme(n),this.postProcessThemeChange(n,s)}handleNewTheme(e){const{gos:t,eRootDiv:s,globalCSS:n}=this,i=this.getAdditionalCss();if(e){Nb(this.eStyleContainer,this.cssLayer,this.styleNonce,i);for(const[o,r]of n)Ui(o,this.eStyleContainer,r,this.cssLayer,0,this.styleNonce);n.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:i}),l6(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(s),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},Ou=15538,I6=(e,t,s)=>{let n=60;const i=setInterval(()=>{typeof ShadowRoot<"u"&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(i)),(e.isConnected||--n<0)&&clearInterval(i)},1e3);s(()=>clearInterval(i))},M6='.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}',A6={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:Ct,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},cellFontSize:{ref:"dataFontSize"},cellFontWeight:{ref:"fontWeight"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:rs,rangeSelectionBackgroundColor:Os(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:Os(.5),rangeHeaderHighlightColor:g6(.08),rowNumbersSelectedColor:Os(.5),rowHoverColor:Os(.08),columnHoverColor:Os(.05),selectedRowBackgroundColor:Os(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:Ct,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:zt(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:zt(.1),iconButtonActiveColor:rs,iconButtonActiveBackgroundColor:Os(.28),iconButtonActiveIndicatorColor:rs,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:zt(.8),cellEditingBorder:{color:rs},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:zt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:zt(.13)},selectCellBackgroundColor:zt(.07),selectCellBorder:{color:zt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:Ct,filterPanelApplyButtonBackgroundColor:rs,columnPanelApplyButtonColor:Ct,columnPanelApplyButtonBackgroundColor:rs,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:Gs,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:Gs,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:zt(.15),statusBarLabelColor:Gs,statusBarLabelFontWeight:500,statusBarValueColor:Gs,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},L6=".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}",Wb={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},N6={...Wb,cellBatchEditTextColor:"#f3d0b3"},O6=()=>Bt({feature:"batchEditStyle",params:Wb,css:L6}),H6=O6(),_b=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",Ub={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},B6=()=>Bt({feature:"buttonStyle",params:{...Ub,buttonBackgroundColor:Ct,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:rs}},css:_b}),G6=B6(),V6=()=>Bt({feature:"buttonStyle",params:{...Ub,buttonBorder:{color:Gs,width:2,style:"outset"},buttonActiveBorder:{color:Gs,width:2,style:"inset"},buttonBackgroundColor:Mt(.07),buttonHoverBackgroundColor:Ct,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:_b}),j6=V6(),z6=".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",W6=".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}",_6=()=>Bt({feature:"columnDropStyle",css:z6}),$b=_6(),U6=()=>Bt({feature:"columnDropStyle",css:W6}),$6=U6(),q6={formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}},K6=()=>Bt({feature:"formulaStyle",params:q6}),Y6=K6(),Z6={warn:(...e)=>{X(e[0],e[1])},error:(...e)=>{Je(e[0],e[1])},preInitErr:(...e)=>{Br(e[0],e[2],e[1])}},qb=()=>F6(Z6).withParams(A6).withPart(G6).withPart($b).withPart(H6).withPart(Y6),X6='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',Q6=()=>Bt({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:Ct,checkboxUncheckedBorderColor:Mt(.3),checkboxCheckedBackgroundColor:rs,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:Ct,checkboxIndeterminateBackgroundColor:Mt(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:Ct,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:X6}),Kb=Q6(),J6=()=>Bt({feature:"colorScheme",params:Ca}),eT=J6(),Yb=()=>({...Ca,...N6,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Mt(.05),rowHoverColor:Os(.15),selectedRowBackgroundColor:Os(.2),menuBackgroundColor:Mt(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:Gs,columnPanelApplyButtonColor:Gs,findMatchColor:Ct,findActiveMatchColor:Ct,checkboxUncheckedBorderColor:Mt(.4),toggleButtonOffBackgroundColor:Mt(.4),rowBatchEditBackgroundColor:Mt(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),tT=()=>({...Yb(),backgroundColor:"#1f2836"}),sT=()=>Bt({feature:"colorScheme",params:Ca,modeParams:{light:Ca,dark:Yb(),"dark-blue":tT()}}),Zb=sT(),nT=`.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-aasc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M13.201 8.08q.65 0 1.135.222.487.222.759.618.27.396.279.919H14.19a.72.72 0 0 0-.293-.536q-.26-.191-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125q.382.086.701.229.32.143.554.35.234.21.362.49.131.284.134.648a1.6 1.6 0 0 1-.273.93q-.27.391-.777.608-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.642q-.29-.428-.305-1.058h1.194q.02.294.17.49.15.195.402.294.253.097.573.097.313 0 .544-.09a.84.84 0 0 0 .362-.255.6.6 0 0 0 .129-.374q0-.195-.117-.33a.9.9 0 0 0-.337-.228 3.4 3.4 0 0 0-.54-.171l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.927q.287-.396.79-.618a2.8 2.8 0 0 1 1.14-.223'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 14H4.489l-.432-1.332H1.948L1.515 14H.19l2.017-5.84h1.592zm-3.551-2.296h1.481l-.718-2.21H2.98zM8.452 8.16q.645 0 1.075.19.43.191.648.531a1.4 1.4 0 0 1 .217.775q0 .343-.137.602-.137.256-.376.422a1.6 1.6 0 0 1-.542.231v.057q.333.015.624.188.294.175.476.489.183.31.183.74 0 .466-.231.831a1.56 1.56 0 0 1-.676.573Q9.265 14 8.609 14H6.114V8.16zM7.35 12.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.29 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.396.64.64 0 0 0-.226-.511q-.223-.195-.633-.194H7.35z' clip-rule='evenodd'/%3E%3Cpath fill='%23000' d='M7.166.377a.75.75 0 0 1 .919.066l3.333 3a.75.75 0 0 1-1.003 1.115L7.609 2.033 5.113 4.53a.75.75 0 0 1-1.06-1.06l3-3z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-adesc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M10.387 11.47a.75.75 0 0 1 1.06 1.06l-3 3-.113.093a.75.75 0 0 1-.919-.065l-3.333-3a.75.75 0 0 1 1.003-1.116l2.806 2.525zM13.201 3.08q.65 0 1.135.222.487.223.759.619.27.396.279.918H14.19a.72.72 0 0 0-.293-.536q-.26-.192-.705-.192-.302.001-.51.086a.7.7 0 0 0-.32.23.56.56 0 0 0-.108.338.5.5 0 0 0 .065.273.7.7 0 0 0 .204.203q.127.083.295.146.168.06.36.102l.525.125a3.7 3.7 0 0 1 .701.229q.32.143.554.35.234.21.362.492.131.282.134.647a1.6 1.6 0 0 1-.273.93 1.74 1.74 0 0 1-.777.607q-.504.214-1.217.214-.708 0-1.232-.217a1.8 1.8 0 0 1-.816-.641q-.29-.429-.305-1.059h1.194q.02.294.17.49.15.195.402.294.253.098.573.098.313 0 .544-.092a.84.84 0 0 0 .362-.254.6.6 0 0 0 .129-.373.5.5 0 0 0-.117-.33.9.9 0 0 0-.337-.23 3.4 3.4 0 0 0-.54-.17l-.635-.16q-.738-.18-1.166-.562t-.426-1.03a1.53 1.53 0 0 1 .284-.926q.287-.396.79-.62a2.8 2.8 0 0 1 1.14-.222'/%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M5.813 9H4.489l-.432-1.332H1.948L1.515 9H.19l2.017-5.84h1.592zM2.262 6.704h1.481l-.718-2.21H2.98zM8.452 3.16q.645 0 1.075.19.43.192.648.53a1.4 1.4 0 0 1 .217.776q0 .342-.137.602a1.2 1.2 0 0 1-.376.423 1.6 1.6 0 0 1-.542.23v.058q.333.014.624.187.294.175.476.489.183.31.183.74 0 .465-.231.83a1.56 1.56 0 0 1-.676.574Q9.265 9 8.609 9H6.114V3.16zM7.35 7.99h1.006q.517 0 .753-.196a.66.66 0 0 0 .237-.531.8.8 0 0 0-.116-.428.8.8 0 0 0-.334-.291 1.15 1.15 0 0 0-.511-.106H7.349zm0-2.386h.916q.254 0 .45-.09a.75.75 0 0 0 .313-.256.67.67 0 0 0 .118-.397.64.64 0 0 0-.226-.51q-.223-.194-.633-.194H7.35z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='translate(3.934 -.054)scale(.06285)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}.ag-icon-column-arrow:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11 4a1 1 0 0 1 1 1v22a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 13a1 1 0 0 1 1-1h23.5a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1' clip-rule='evenodd'/%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2 4h18v24H2zm2 2v20h14V6zM26.793 13 23 9.207l1.414-1.414L29.621 13l-5.207 5.207L23 16.793z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-un-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m6.112 15.111 3.272 3.271 1.436-1.402-2.476-2.479c.81-1.25 3.168-1.12 5.156-.614l4.986-4.988-.49-.722c-.392-.622.336-1.504 1.024-2.072l.008-.007.01-.006.032-.025 1.447 1.447 1.432-1.397-2.601-2.602s-4.052 2.704-3.352 5.046l-3.158 3.108c-2.004-.388-4.69-.288-6.056 1.572-.638.87-.67 1.87-.67 1.87m.581 11.582.014.014 5.502-5.501 4.783 4.783.746-.364c1.992-1.016 2.776-3.21 2.632-5.34-.055-.805-.068-.87-.088-.97-.008-.04-.017-.085-.03-.182l3.32-3.218c1.734.292 3.198-.912 4.272-2.338q.337-.447.67-.894l-.001-.001-.007-.007-.007-.007-.007-.007-3.87-3.87 1.585-1.584-1.414-1.414-14.381 14.38-1.237 1.209-5.69 5.687 1.417 1.416zM23.21 10.206l2.65 2.651c-1.465 1.714-2.935.776-2.935.776l-4.79 4.79q.041.291.087.583c.257 1.676.513 3.35-.585 4.317a4 4 0 0 1-.272.21l-3.739-3.744z' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-pinned-top:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='m16.708 10.878 8.708 8.706L24 21l-6.292-6.294V27h-2V14.706L9.416 21 8 19.584q4.348-4.344 8.691-8.69zM25 6H8v2h17z'/%3E%3C/svg%3E")}.ag-icon-pinned-bottom:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M16.708 22.122 8 13.416 9.416 12l6.292 6.294V6h2v12.294L24 12l1.416 1.416-8.691 8.69zM7.416 28h17v-2h-17z'/%3E%3C/svg%3E")}.ag-icon-chevron-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3.479 10.521a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1-1.06 1.06l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M12.521 5.461a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 1.06-1.06l3.47 3.47 3.47-3.47a.75.75 0 0 1 1.06 0' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M10.53 12.512a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 1.06l-3.47 3.47 3.47 3.47a.75.75 0 0 1 0 1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-chevron-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M5.47 3.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06L8.94 8 5.47 4.53a.75.75 0 0 1 0-1.06' clip-rule='evenodd'/%3E%3C/svg%3E")}.ag-icon-filter-add:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M19.834 8H8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.056-2.267 2.968-4.417 5.49-6.75v3.087c-1.081.974-2.245 1.968-3.232 3.005a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h13.834z'/%3E%3Cpath fill='currentColor' d='M26 6h2.946v2.002H26v3.313h-2.002V8.002h-2.946V6h2.946V3.04H26z'/%3E%3C/svg%3E")}.ag-icon-edit:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='currentColor' d='M23.182 5a3.82 3.82 0 0 1 2.83 6.383l-.131.137-2.09 2.088a1 1 0 0 1-.084.099 1 1 0 0 1-.098.084L12.533 24.869a3 3 0 0 1-1.245.746l-4.353 1.32-.003.002a1.5 1.5 0 0 1-1.87-1.867l.003-.004 1.32-4.352v-.003l.06-.174c.13-.344.321-.661.565-.936l.126-.135L18.209 8.39a1 1 0 0 1 .18-.181l2.092-2.09.137-.132A3.82 3.82 0 0 1 23.182 5M8.548 20.883a1 1 0 0 0-.25.415l-1.049 3.451 3.457-1.048.114-.042q.17-.076.301-.206l10.458-10.46-2.572-2.572zM23.182 7c-.482 0-.946.19-1.287.531v.001l-1.474 1.475 2.572 2.572 1.474-1.474.121-.133A1.82 1.82 0 0 0 23.182 7'/%3E%3C/svg%3E")}`,iT=Bt({feature:"iconSet",css:nT}),Xb={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>'},Qb={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>'},oT=(e={})=>{let t="";for(const s of[...Object.keys(Xb),...Object.keys(Qb)]){const n=rT(s,e.strokeWidth);t+=`.ag-icon-${s}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(n)}'); }
|
|
23
|
+
`}return t},rT=(e,t=1.5)=>{const s=Qb[e];if(s)return s;const n=Xb[e];if(!n)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+n+"</svg>"},aT=(e={})=>Bt({feature:"iconSet",css:()=>oT(e)}),lT=aT(),cT=':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',dT=".ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}",uT={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},hT=()=>Bt({feature:"inputStyle",params:{...uT,inputBackgroundColor:Ct,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:rs},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Mt(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>cT+dT}),Jb=hT(),e1='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}',pT=".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}",t1={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},gT=()=>Bt({feature:"tabStyle",params:{...t1,tabBarBorder:!0,tabBarBackgroundColor:zt(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Ct},css:e1}),fT=gT(),mT=()=>Bt({feature:"tabStyle",params:{...t1,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:Ct},css:()=>e1+pT}),vT=mT(),CT=()=>({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),wT=()=>qb().withPart(Kb).withPart(Zb).withPart(lT).withPart(fT).withPart(Jb).withPart($b).withParams(CT()),bT=wT(),xT=()=>({accentColor:"#0091ea",borderColor:zt(.2),spacing:4,widgetVerticalSpacing:{calc:"max(8px, spacing)"},borderRadius:2,wrapperBorderRadius:2,headerColumnResizeHandleColor:"transparent",headerColumnBorder:!0,headerColumnBorderHeight:"50%",oddRowBackgroundColor:{ref:"chromeBackgroundColor",mix:.5},checkboxBorderRadius:2,checkboxBorderWidth:1,checkboxUncheckedBackgroundColor:Ct,checkboxUncheckedBorderColor:Mt(.5),checkboxCheckedBackgroundColor:Ct,checkboxCheckedBorderColor:rs,checkboxCheckedShapeColor:rs,checkboxIndeterminateBackgroundColor:Ct,checkboxIndeterminateBorderColor:Mt(.5),checkboxIndeterminateShapeColor:Mt(.5),focusShadow:{radius:2,spread:1,color:rs},headerTextColor:zt(.6),iconButtonHoverBackgroundColor:"transparent",iconButtonActiveBackgroundColor:"transparent",fontSize:12,tabSelectedBackgroundColor:Ct,headerFontWeight:"bold",toggleButtonWidth:32,toggleButtonHeight:16,toggleButtonSwitchInset:1,toggleButtonOffBackgroundColor:Mt(.5),sideButtonBorder:!0,sideButtonBarTopPadding:{calc:"spacing * 4"},popupShadow:"5px 5px 10px rgba(0, 0, 0, 0.3)",statusBarLabelColor:zt(.54),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,panelTitleBarIconColor:Gs,colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2}),yT=()=>qb().withPart(j6).withPart(Kb).withPart(Zb).withPart(iT).withPart(vT).withPart(Jb).withPart($6).withParams(xT()),ST=yT(),ai=(e,t,s,n,i)=>({changeKey:e,type:t,defaultValue:s,noWarn:n,cacheDefault:i}),RT=ai("cellHorizontalPadding","length",16),FT=ai("indentationLevel","length",0,!0,!0),ET=ai("rowGroupIndentSize","length",0),Hm=ai("rowHeight","length",42),Bm=ai("headerHeight","length",48),Hu=ai("rowBorderWidth","border",1),Gm=ai("pinnedRowBorderWidth","border",1),DT=ai("headerRowBorderWidth","border",1);function PT(e,t){for(const s of t.sort((n,i)=>n.moduleName.localeCompare(i.moduleName))){const n=s.css;n&&e.set(`module-${s.moduleName}`,n)}}var TT=class extends k6{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(Hm),this.getSizeEl(Bm),this.getSizeEl(Hu),this.getSizeEl(Gm),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(Gm)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Hu)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(DT)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(Hm)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Bm)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(RT)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(FT),s=this.getCSSVariablePixelValue(ET);return e-1+s*t}getCellPadding(){const e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){const{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),s=this.gos.get("rowHeight");if(s==null||isNaN(s)||!isFinite(s))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const n=`${s}px`;return t!=n?(e.style.setProperty("--ag-line-height",n),s):t!=""?Number.parseFloat(t):-1}fireStylesChangedEvent(e){e==="rowBorderWidth"&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Hu);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&Je(t?106:239)}getAdditionalCss(){const e=new Map;return e.set("core",[M6]),PT(e,Array.from(nF())),e}getDefaultTheme(){return bT}varError(e,t){X(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){Je(240,{theme:e})}shadowRootError(){Je(293)}},kT=class extends qt{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new Bi}addListener(e,t,s){this.globalSvc.addEventListener(e,t,s)}removeListener(e,t,s){this.globalSvc.removeEventListener(e,t,s)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},IT=class extends kT{postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function Lh(e,t,s){const n=e.visibleCols.headerGroupRowCount;if(s>=n)return{column:t,headerRowIndex:s};let i=t.getParent();for(;i&&i.getProvidedColumnGroup().getLevel()>s;)i=i.getParent();const o=t.isSpanHeaderHeight();return!i||o&&i.isPadding()?{column:t,headerRowIndex:n}:{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel()}}var MT=class extends _{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,s=>{this.gridBodyCon=s.gridBodyCtrl});const t=Et(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let s;const{colModel:n,colGroupSvc:i,ctrlsSvc:o}=this.beans;if(typeof e=="string"?(s=n.getCol(e),s||(s=i?.getColumnGroup(e)??null)):s=e,!s)return null;const a=o.getHeaderRowContainerCtrl()?.getAllCtrls(),l=et(a||[]).type==="filter",c=vs(this.beans)-1;let d=-1,u=s;for(;u;)d++,u=u.getParent();let p=d;return t&&l&&p===c-1&&p++,p===-1?null:{headerRowIndex:p,column:s}}navigateVertically(e,t){const{focusSvc:s,visibleCols:n}=this.beans,{focusedHeader:i}=s;if(!i)return!1;const{headerRowIndex:o}=i,r=i.column,a=vs(this.beans),l=this.getHeaderRowType(o),c=n.headerGroupRowCount;let{headerRowIndex:d,column:u,headerRowIndexWithoutSpan:p}=e==="UP"?AT(l,r,o):LT(r,o,c),f=!1;return d<0&&(d=0,u=r,f=!0),d>=a?(d=-1,this.currentHeaderRowWithoutSpan=-1):p!==void 0&&(this.currentHeaderRowWithoutSpan=p),!f&&!u?!1:s.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,s){const{focusSvc:n,gos:i}=this.beans,o={...n.focusedHeader};let r,a;this.currentHeaderRowWithoutSpan!==-1?o.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=o.headerRowIndex,e==="LEFT"!==i.get("enableRtl")?(a="Before",r=this.findHeader(o,a)):(a="After",r=this.findHeader(o,a));const l=i.getCallback("tabToNextHeader");if(t&&l){const c=n.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:r,direction:a});if(c){const{headerRowIndex:d}=n.focusedHeader||{};d!=null&&d!=o.headerRowIndex&&(this.currentHeaderRowWithoutSpan=d)}return c}return r||!t?n.focusHeaderPosition({headerPosition:r,direction:a,fromTab:t,allowUserOverride:!0,event:s}):this.focusNextHeaderRow(o,a,s)}focusNextHeaderRow(e,t,s){const n=this.beans,i=e.headerRowIndex;let o=null,r;const a=vs(n),l=this.beans.visibleCols.allCols;if(t==="Before"){if(i<=0)return!1;o=et(l),r=i-1,this.currentHeaderRowWithoutSpan-=1}else o=l[0],r=i+1,this.currentHeaderRowWithoutSpan<a?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:c,headerRowIndex:d}=Lh(this.beans,o,r);return d>=a&&(d=-1),n.focusSvc.focusHeaderPosition({headerPosition:{column:c,headerRowIndex:d},direction:t,fromTab:!0,allowUserOverride:!0,event:s})}scrollToColumn(e,t="After"){if(e.getPinned())return;let s;if(vt(e)){const n=e.getDisplayedLeafColumns();s=t==="Before"?et(n):n[0]}else s=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(s)}findHeader(e,t){const{colGroupSvc:s,visibleCols:n}=this.beans;let i=e.column;if(i instanceof ma){const l=i.getDisplayedLeafColumns();i=t==="Before"?l[0]:l[l.length-1]}const o=t==="Before"?n.getColBefore(i):n.getColAfter(i);if(!o)return;const r=n.headerGroupRowCount;if(e.headerRowIndex>=r)return{headerRowIndex:e.headerRowIndex,column:o};const a=s?.getColGroupAtLevel(o,e.headerRowIndex);return a?a.isPadding()&&o.isSpanHeaderHeight()?{headerRowIndex:n.headerGroupRowCount,column:o}:{headerRowIndex:e.headerRowIndex,column:a??o}:{headerRowIndex:o instanceof Qi&&o.isSpanHeaderHeight()?n.headerGroupRowCount:e.headerRowIndex,column:o}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function AT(e,t,s){const n=s-1;if(e!=="filter"){const i=t instanceof Qi&&t.isSpanHeaderHeight();let o=t.getParent();for(;o&&(o.getProvidedColumnGroup().getLevel()>n||i&&o.isPadding());)o=o.getParent();if(o)return i?{column:o,headerRowIndex:o.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:n}:{column:o,headerRowIndex:n,headerRowIndexWithoutSpan:n}}return{column:t,headerRowIndex:n,headerRowIndexWithoutSpan:n}}function LT(e,t,s){const n=t+1,i={column:e,headerRowIndex:n,headerRowIndexWithoutSpan:n};if(e instanceof ma){if(n>=s)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:s,headerRowIndexWithoutSpan:n};let r=e.getDisplayedChildren()[0];if(r instanceof ma&&r.isPadding()){const l=r.getDisplayedLeafColumns()[0];l.isSpanHeaderHeight()&&(r=l)}i.column=r,r instanceof Qi&&r.isSpanHeaderHeight()&&(i.headerRowIndex=s,i.headerRowIndexWithoutSpan=n)}return i}var NT=class extends _{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(_E(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:e,focusedCell:t}=this;return e.get("suppressFocusAfterRefresh")||e.get("suppressCellFocus")||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader||!this.isDomDataPresentInHierarchy(dt(this.beans),nb)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=dt(this.beans);return this.isDomDataPresentInHierarchy(e,bc,!0)?!0:this.isDomDataPresentInHierarchy(e,xc,!0)}isDomDataPresentInHierarchy(e,t,s){let n=e;for(;n;){const i=yw(this.gos,n,t);if(i)return i.destroyed&&s?(this.attemptToRecoverFocus(),!1):!0;n=n.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:s,column:n}=e,i={rowIndex:t,rowPinned:s,column:n,isFullWidthCell:!1},o=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:s});return o&&(i.isFullWidthCell=o.isFullWidth()),i}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:s,rowPinned:n,forceBrowserFocus:i=!1,preventScrollOnBrowserFocus:o=!1,sourceEvent:r}=e,a=this.colModel.getCol(t);if(!a){this.focusedCell=null;return}this.focusedCell={rowIndex:s,rowPinned:ln(n),column:a};const l=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...l,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:i,preventScrollOnBrowserFocus:o,sourceEvent:r}),this.previousCellFocusParams=l}isCellFocused(e){return this.focusedCell==null?!1:Up(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:s,pinned:n}}=e,{column:i,headerRowIndex:o}=this.focusedHeader;return t===i&&s===o&&n==i.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),Fs(this.beans))return!1;const{direction:t,fromTab:s,allowUserOverride:n,event:i,fromCell:o,rowWithoutSpanValue:r,scroll:a=!0}=e;let{headerPosition:l}=e;if(o&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(l);if(n){const c=this.focusedHeader,d=vs(this.beans);if(s){const u=this.gos.getCallback("tabToNextHeader");u&&(l=this.getHeaderPositionFromUserFunc({userFunc:u,direction:t,currentPosition:c,headerPosition:l,headerRowCount:d}))}else{const u=this.gos.getCallback("navigateToNextHeader");if(u&&i){const p={key:i.key,previousHeaderPosition:c,nextHeaderPosition:l,headerRowCount:d,event:i},f=u(p);l=f===null?c:f}}}return l?this.focusProvidedHeaderPosition({headerPosition:l,direction:t,event:i,fromCell:o,rowWithoutSpanValue:r,scroll:a}):!1}focusHeaderPositionFromUserFunc(e){if(Fs(this.beans))return!1;const{userFunc:t,headerPosition:s,direction:n,event:i}=e,o=this.focusedHeader,r=vs(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:n,currentPosition:o,headerPosition:s,headerRowCount:r});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:n,event:i})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:s,currentPosition:n,headerPosition:i,headerRowCount:o}=e,a=t({backwards:s==="Before",previousHeaderPosition:n,nextHeaderPosition:i,headerRowCount:o});return a===!0?n:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:s,fromCell:n,rowWithoutSpanValue:i,event:o,scroll:r=!0}=e,{column:a,headerRowIndex:l}=t,{filterManager:c,ctrlsSvc:d,headerNavigation:u}=this.beans;if(this.focusedHeader&&TD(e.headerPosition,this.focusedHeader))return!1;if(l===-1)return c?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:a,event:o});r&&u?.scrollToColumn(a,s);const f=d.getHeaderRowContainerCtrl(a.getPinned())?.focusHeader(t.headerRowIndex,a,o)||!1;return u&&f&&(i!=null||n)&&(u.currentHeaderRowWithoutSpan=i??-1),f}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;const e=this.visibleCols.allCols[0];if(!e)return!1;const t=Lh(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;const t=vs(this.beans)-1,s=et(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:s},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===ln(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Wi(t,e)}getDefaultTabToNextGridContainerTarget(e){const{backwards:t,focusableContainers:s}=e,n=t?-1:1;let i;const o=()=>(i===void 0&&(i=this.getGridBodyTabTarget(t)),i);for(let r=e.nextIndex;r>=0&&r<s.length;r+=n){const a=SD(s[r],o);if(a)return a}return null}getGridBodyTabTarget(e){if(e)return this.getGridViewTabTarget({column:et(this.visibleCols.allCols),backwards:!0});const t=this.visibleCols.allCols[0];return this.gos.get("headerHeight")===0||Fs(this.beans)?this.getGridViewTabTarget({column:t}):t?Lh(this.beans,t,0):null}getGridViewTabTarget(e){const{backwards:t=!1}=e,s=e.column??this.focusedHeader?.column;if(!s||this.overlays?.exclusive)return null;if(va(this.beans))return t&&!Fs(this.beans)?{headerRowIndex:vs(this.beans)-1,column:s}:null;const n=t?um(this.beans):dm(this.beans);if(n?.rowIndex==null){if(this.overlays?.isVisible())return null;if(t&&!Fs(this.beans)){const o=et(this.visibleCols.allCols);if(o)return{headerRowIndex:vs(this.beans)-1,column:o}}return null}const i=Us(this.beans,n);return!i||s.isSuppressNavigable(i)||t&&this.rowRenderer.getRowByPosition(n)?.isFullWidth()?null:{rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:s}}focusGridView(e){const{backwards:t=!1,canFocusOverlay:s=!0,event:n}=e;if(this.overlays?.exclusive)return s&&this.focusOverlay(t);if(va(this.beans))return t&&!Fs(this.beans)?this.focusLastHeader():s&&this.focusOverlay(t)?!0:t?!1:Yo(this.beans,t);const i=t?um(this.beans):dm(this.beans);if(i){const o=e.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:a}=i,l=Us(this.beans,i);if(!o||!l||r==null)return!1;if(o.isSuppressNavigable(l)){const c=this.gos.get("enableRtl");let d;return!n||n.key===j.TAB?d=c?j.LEFT:j.RIGHT:d=n.key,this.beans.navigation?.navigateToNextCell(null,d,{rowIndex:r,column:o,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:r,column:o,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(i,t)||(this.setFocusedCell({rowIndex:r,column:o,rowPinned:ln(a),forceBrowserFocus:!0}),_t(o)||this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:a,column:o})),!0}return!!(s&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const s=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:s,headerRowIndex:vs(this.beans)-1}}):this.focusGridView({column:s})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},OT=class extends _{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){const{gos:e}=this;this.horizontalScrollShowing=e.get("alwaysShowHorizontalScroll")===!0,this.verticalScrollShowing=e.get("alwaysShowVerticalScroll")===!0,this.getScrollbarWidth();const t=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),s=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==s)&&(this.horizontalScrollGap=t,this.verticalScrollGap=s,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),s=typeof e=="number"&&e>=0?e:Gp();s!=null&&(this.scrollbarWidth=s,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},HT=class extends _{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:s}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),s.destroy(),super.destroy()}},BT=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"],Xl=new Set(["gridPreDestroyed","fillStart","pasteStart"]),og=BT.reduce((e,t)=>(e[t]=DF(t),e),{}),jo={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function Vm(e){return`"${e}"`}var GT=()=>({checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}}),VT={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,groupRowEditable:s})=>!!t||!!s?typeof e=="string"?jo[e]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:e})=>typeof e!="string"?null:jo[e],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:e,cellEditor:t})=>e&&!t?"TextEditor":null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?"RowGroupingEdit":["RowGroupingEdit","TextEditor"]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?"RowGroupingEdit":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:e})=>e&&typeof e!="string"&&typeof e!="boolean"?"CustomFilter":typeof e=="string"?jo[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(s=>t.includes(s))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},jT=()=>({autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:s})=>s?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:t=>(t.rowGroup!=null||t.rowGroupIndex!=null||t.cellRenderer==="agGroupCellRenderer")&&"checkbox"in t.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(t,s)=>s.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:s})=>s==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const s=t.headerValueGetter;return typeof s=="function"||typeof s=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return js(262);if(t.smallLeft)return js(263);if(t.smallRight)return js(264)}return null}},sort:{validate:t=>Bo(t.sort)||$n(t.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof t.sort=="object"?JSON.stringify(t.sort):zl(t.sort)}`},initialSort:{validate:t=>Bo(t.initialSort)||$n(t.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof t.initialSort=="object"?JSON.stringify(t.initialSort):zl(t.initialSort)}`},sortingOrder:{validate:t=>{const s=t.sortingOrder;if(Array.isArray(s)&&s.length>0){const n=s.filter(i=>!(Bo(i)||$n(i)));if(n.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${n.map(i=>typeof i=="string"||i==null?zl(i):JSON.stringify(i)).join(", ")}]`}else if(!Array.isArray(s)||!s.length)return`sortingOrder must be an array with at least one element, currently it is [${s}]`;return null}},type:{validate:t=>{const s=t.type;return s instanceof Array?s.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof s=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:s})=>s?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:s,cellSelection:n,suppressRowTransform:i,enableCellSpan:o,rowDragEntireRow:r,enableCellTextSelection:a})=>typeof s=="object"&&s?.mode==="singleRow"&&s?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":n?"colDef.spanRows is not supported with cellSelection.":i?"colDef.spanRows is not supported with suppressRowTransform.":o?r?"colDef.spanRows is not supported with rowDragEntireRow.":a?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:s={}},n){const i=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),o=[];for(const r of t.groupHierarchy??[]){if(typeof r=="object"){n.validation?.validateColDef(r);continue}!i.has(r)&&!(r in s)&&o.push(Vm(r))}if(o.length>0){const r=`The following parts of colDef.groupHierarchy are not recognised: ${o.join(", ")}.`,a=`Choose one of ${[...i].map(Vm).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${r}
|
|
24
|
+
${a}`}return null}}}),zT={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},WT=()=>Object.keys(zT),_T=()=>({objectName:"colDef",allProperties:WT(),docsUrl:"column-properties/",deprecations:GT(),validations:jT()}),UT=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],$T=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],qT=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],s1=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],KT=["theme","rowSelection"],YT=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],n1=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","refreshAfterGroupEdit","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupHideColumnsUntilExpanded","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],ZT=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","tabToNextGridContainer","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"],XT=()=>[...qT,...$T,...UT,...s1,...ZT,...n1,...YT,...KT],QT=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}});function As(e,t,s){return typeof t=="number"||t==null?t==null||t>=s?null:`${e}: value should be greater than or equal to ${s}`:`${e}: value should be a number`}var JT={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},ek=()=>{const e={autoSizePadding:{validate({autoSizePadding:s}){return As("autoSizePadding",s,0)}},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:s}){return As("cacheBlockSize",s,1)}},cacheOverflowSize:{validate({cacheOverflowSize:s}){return As("cacheOverflowSize",s,1)}},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:s=>{const n=s.domLayout,i=["autoHeight","normal","print"];return n&&!i.includes(n)?`domLayout must be one of [${i.join()}], currently it's ${n}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:["clientSide","serverSide"]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,pinnedTopRowData:n,pinnedBottomRowData:i}){return s&&(n||i)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinnable:n,pinnedTopRowData:i,pinnedBottomRowData:o}){return n&&(i||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&n?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:["clientSide"],validate({enableRowPinning:s,isRowPinned:n,pinnedTopRowData:i,pinnedBottomRowData:o}){return n&&(i||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!s&&n?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideColumnsUntilExpanded:{supportedRowModels:["clientSide"],validate({groupHideColumnsUntilExpanded:s,groupHideOpenParents:n,groupDisplayType:i}){return s&&!n&&i!=="multipleColumns"?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:s={}},n,i){for(const o of Object.keys(s))i.validation?.validateColDef(s[o]);return null}},icons:{validate:({icons:s})=>{if(s){if(s.smallDown)return js(262);if(s.smallLeft)return js(263);if(s.smallRight)return js(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:s}){return As("infiniteInitialRowCount",s,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:s=>{if(typeof s.ssrmExpandAllAffectsAllRows=="boolean"){if(s.rowModelType!=="serverSide")return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(s.ssrmExpandAllAffectsAllRows&&typeof s.getRowId!="function")return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:s}){return As("keepDetailRowsCount",s,1)}},paginationPageSize:{validate({paginationPageSize:s}){return As("paginationPageSize",s,1)}},paginationPageSizeSelector:{validate:s=>{const n=s.paginationPageSizeSelector;return typeof n=="boolean"||n==null||n.length?null:`'paginationPageSizeSelector' cannot be an empty array.
|
|
25
|
+
If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate({rowBuffer:s}){return As("rowBuffer",s,0)}},rowClass:{validate:s=>typeof s.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:s}){return s&&typeof s=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':s&&typeof s!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":s&&s.mode!=="multiRow"&&s.mode!=="singleRow"?`Selection mode "${s.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:s=>{const n=s.rowStyle;return n&&typeof n=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:s}){return As("serverSideInitialRowCount",s,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:s=>{const n=s.sortingOrder;if(Array.isArray(n)&&n.length>0){const i=n.filter(o=>!ws(o));if(i.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${i.map(o=>typeof o=="string"||o==null?zl(o):JSON.stringify(o))}]`}else if(!Array.isArray(n)||!n.length)return`sortingOrder must be an array with at least one element, currently it's ${n}`;return null}},tooltipHideDelay:{validate:s=>s.tooltipHideDelay&&s.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:s=>s.tooltipShowDelay&&s.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:s=>s.tooltipSwitchShowDelay&&s.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:s=>{const n=s.rowModelType??"clientSide";switch(n){case"clientSide":{const{treeDataChildrenField:i,treeDataParentIdField:o,getDataPath:r,getRowId:a}=s;if(!i&&!o&&!r)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(i){if(r)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(o)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(o){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(r)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${n} row model.`;return s.isServerSideGroup&&s.getServerSideGroupKey?null:i}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:s}){return As("viewportRowModelBufferSize",s,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:s}){return As("viewportRowModelPageSize",s,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:s,showOpenedGroup:n}){return s?.field&&n?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":s?.valueGetter&&n?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}},renderingMode:{validate:s=>{const n=s.renderingMode,i=["default","legacy"];return n&&!i.includes(n)?`renderingMode must be one of [${i.join()}], currently it's ${n}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:s})=>{if(!s)return null;const n=["fitCellContents","fitGridWidth","fitProvidedWidth"],i=s.type;return i!=="fitCellContents"&&i!=="fitGridWidth"&&i!=="fitProvidedWidth"?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${n.map(o=>'"'+o+'"').join(", ")}, currently it's ${i}`:i==="fitProvidedWidth"&&typeof s.width!="number"?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${s.width}`:null}}},t={};for(const s of n1)t[s]={expectedType:"boolean"};for(const s of s1)t[s]={expectedType:"number"};return Wt(t,e),t},tk=()=>({objectName:"gridOptions",allProperties:[...XT(),...Object.values(og)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:QT(),validations:ek()}),sk=0,nk=0,jm="__ag_grid_instance",ik=class extends _{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=nk++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new Bi,this.globalEventHandlerFactory=e=>(t,s)=>{if(!this.isAlive())return;const n=Xl.has(t);if(n&&!e||!n&&e||!ok(t))return;const i=(o,r)=>{const a=og[o],l=this.gridOptions[a];typeof l=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>l(r))};if(this.gridReadyFired)i(t,s);else if(t==="gridReady"){i(t,s),this.gridReadyFired=!0;for(const o of this.queueEvents)i(o.eventName,o.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:s})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??aw[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return le(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(s=>e(this.addCommon(s)))}updateGridOptions({options:e,force:t,source:s="api"}){const n={id:sk++,properties:[]},i=[],{gridOptions:o,validation:r}=this;for(const a of Object.keys(e)){const l=Ip.applyGlobalGridOption(a,e[a]);r?.warnOnInitialPropertyUpdate(s,a);const c=t||typeof l=="object"&&s==="api",d=o[a];if(c||d!==l){o[a]=l;const u={type:a,currentValue:l,previousValue:d,changeSet:n,source:s};i.push(u)}}this.validateGridOptions(this.gridOptions),n.properties=i.map(a=>a.type);for(const a of i)ji(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(const s of Object.keys(e)){const n=e[s];if(n==null||n===!1)continue;let i=t[s];typeof i=="function"&&(i=i(e,this.gridOptions,this.beans)),i&&this.assertModuleRegistered(i,s)}}validateGridOptions(e){this.validateOptions(e,JT),this.validation?.processGridOptions(e)}validateColDef(e,t,s){(s||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,VT),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){const s=Array.isArray(e)?e.some(n=>this.isModuleRegistered(n)):this.isModuleRegistered(e);return s||Je(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),s}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Mp(),rowModelType:this.get("rowModelType"),isUmd:pw()}}isModuleRegistered(e){return mh(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[jm]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){const s=t[jm];if(le(s))return s===this.instanceId;t=t.parentElement}return!1}};function ok(e){return!!og[e]}var rk=class extends _{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){const{sortSvc:t,rangeSvc:s,gos:n}=this.beans;if(!(Ho(n)?e.altKey:!0))s?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){const o=this.column.isMoving(),a=Date.now()-this.lastMovingChanged<50;o||a||t?.progressSortFromEvent(this.column,e)}}};function ak(e,t){const s={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:s},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:s},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[e?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:s},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var lk=class extends ft{constructor(){super(...arguments),this.eFilter=xe,this.eFilterButton=xe,this.eSortIndicator=xe,this.eMenu=xe,this.eLabel=xe,this.eText=xe,this.eColRef=xe,this.eSortOrder=xe,this.eSortAsc=xe,this.eSortDesc=xe,this.eSortMixed=xe,this.eSortNone=xe,this.eSortAbsoluteAsc=xe,this.eSortAbsoluteDesc=xe,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const s={...e};Wt(s,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(s)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const{formula:s}=this.beans,n=e.template;return n?n?.trim?n.trim():n:ak(!!s?.active,t)}init(e){this.params=e;const{sortSvc:t,touchSvc:s,rowNumbersSvc:n,userCompFactory:i}=this.beans,o=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!o),this.setTemplate(this.currentTemplate,o?[o]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new rk(e.column,this.eLabel)))),s?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),n?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(i,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const s=FE(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(n=>{this.isLoadingInnerComponent=!1,n&&(this.isAlive()?(this.innerHeaderComponent=n,this.eText&&this.eText.appendChild(n.getGui())):this.destroyBean(n))}))}setDisplayName(e){const{displayName:t}=e,s=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||s===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=nr(t))}addInIcon(e,t,s){const n=Qt(e,this.beans,s);n&&t.appendChild(n)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){pn(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:s}=this,n=Xt(e);this.addInIcon(n?"menu":"menuAlt",t,s.column),t.classList.toggle("ag-header-menu-icon",!n);const i=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=i,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(i)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle("ag-header-menu-always-show",e)}showColumnMenu(e){const{currentSuppressMenuHide:t,params:s}=this;t||this.toggleMenuAlwaysShow(!0),s.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:s,beans:n,eMenu:i,eFilterButton:o}=this,r=t.column,a=Xt(s);if(e&&!a){if(n.menuSvc?.isFilterMenuInHeaderEnabled(r))return t.showFilter(o??i??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(i??o??this.getGui()),!0;return!1}setupSort(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:s}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:n,eSortOrder:i,eSortAsc:o,eSortDesc:r,eSortMixed:a,eSortNone:l,eSortAbsoluteAsc:c,eSortAbsoluteDesc:d}=this;n.attachCustomElements(i,o,r,a,l,c,d)}this.eSortIndicator.setupSort(s),this.currentSort&&e.setupHeader(this,s)}setupColumnRefIndicator(){const{eColRef:e,beans:{editModelSvc:t},params:s}=this;e&&(this.currentRef=s.column.formulaRef,e.textContent=this.currentRef,st(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{const n=t?.getEditPositions(),i=!!this.currentRef&&!!n?.some(o=>o.column.isAllowFormula());st(e,i)},cellEditingStopped:()=>{st(e,!1)}}))}setupFilterIcon(){const{eFilter:e,params:t}=this;if(!e)return;const s=()=>{const n=t.column.isFilterActive();st(e,n,{skipAriaHidden:!0})};this.configureFilter(t.enableFilterIcon,e,s,"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,s,n){if(!e)return pn(t),!1;const i=this.params.column;return this.addInIcon(n,t,i),this.addManagedListeners(i,{filterChanged:s}),s(),!0}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:s}=this;return e?t??s??this.getGui():s??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},ck=class extends _{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){const{columnGroup:e,beans:t}=this,{ctrlsSvc:s}=t;s.whenReady(this,()=>{const n=this.refreshPosition.bind(this);e.getPinned()==null&&this.addManagedEventListeners({bodyScroll:i=>{i.direction==="horizontal"&&this.updateSticky(i.left)}}),this.addManagedListeners(e,{leftChanged:n,displayedChildrenChanged:n}),this.addManagedEventListeners({columnResized:n}),this.refreshPosition()})}refreshPosition(){const{columnGroup:e,beans:t}=this,s=e.getLeft(),n=e.getActualWidth();if(s==null||n===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=s,this.right=s+n;const i=t.colViewport.getScrollPosition();i!=null&&this.updateSticky(i)}updateSticky(e){const{beans:t,left:s,right:n}=this;if(s==null||n==null){this.setSticky(!1);return}const{gos:i,visibleCols:o}=t,a=i.get("enableRtl")?o.bodyWidth-e:e;this.setSticky(s<a&&n>a)}setSticky(e){const{isSticky:t,eLabel:s}=this;t!==e&&(this.isSticky=e,s.classList.toggle("ag-sticky-label",e))}},dk={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},uk=class extends ft{constructor(){super(dk),this.agOpened=xe,this.agClosed=xe,this.agLabel=xe,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t,touchSvc:s}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),s?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&X(89)}workOutInnerHeaderGroupComponent(e,t){const s=DE(e,t,t);s&&(this.isLoadingInnerComponent=!0,s.newAgStackInstance().then(n=>{this.isLoadingInnerComponent=!1,n&&(this.isAlive()?(this.innerHeaderGroupComponent=n,this.agLabel.appendChild(n.getGui())):this.destroyBean(n))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:s},beans:{colGroupSvc:n}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const i=l=>{if(dn(l))return;const c=!s.isExpanded();n.setColumnGroupOpened(s.getProvidedColumnGroup(),c,"uiColumnExpanded")};this.addTouchAndClickListeners(t,i),this.addTouchAndClickListeners(e,i);const o=l=>{_i(l)};this.addManagedElementListeners(t,{dblclick:o}),this.addManagedElementListeners(e,{dblclick:o}),this.addManagedElementListeners(this.getGui(),{dblclick:i}),this.updateIconVisibility();const r=s.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:s}}=this;if(s.isExpandable()){const n=s.isExpanded();st(e,n),st(t,!n)}else st(e,!1),st(t,!1)}addInIcon(e,t){const s=Qt(e,this.beans,null);s&&t.appendChild(s)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:s}=this;st(t,!1),st(s,!1)}}setupLabel(e){const{displayName:t,columnGroup:s}=e,{innerHeaderGroupComponent:n,isLoadingInnerComponent:i}=this,o=n||i;le(t)&&!o&&(this.agLabel.textContent=nr(t)),s.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new ck(this.getGui(),s))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},hk={moduleName:"ColumnHeaderComp",version:ie,userComponents:{agColumnHeader:lk},icons:{menu:"menu",menuAlt:"menu-alt"}},pk={moduleName:"ColumnGroupHeaderComp",version:ie,userComponents:{agColumnGroupHeader:uk},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},gk=class extends _{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&X(92)}createTask(e,t,s,n,i=!1){this.verify();let o=s;n&&this.batchFrameworkComps&&(o="f1");const r={task:e,index:t,createOrder:++this.taskCount,deferred:i};this.addTaskToList(this[o],r),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((s,n)=>s.deferred!==n.deferred?s.deferred?-1:1:s.index!==n.index?t*(n.index-s.index):n.createOrder-s.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:s,f1:n,destroyTasks:i,beans:o}=this,{ctrlsSvc:r,frameworkOverrides:a}=o,l=t.list,c=s.list,d=n.list,u=Date.now();let p=0;const f=e<=0,m=r.getScrollFeature();for(;f||p<e;){if(!m.scrollGridIfNeeded()){let C;if(l.length)this.sortTaskList(t),C=l.pop().task;else if(c.length)this.sortTaskList(s),C=c.pop().task;else if(d.length)a.wrapOutgoing(()=>{for(;(f||p<e)&&!m.scrollGridIfNeeded();){if(d.length)this.sortTaskList(n),C=d.pop().task,C();else break;p=Date.now()-u}}),C=()=>{};else if(i.length)C=i.pop();else break;C()}p=Date.now()-u}l.length||c.length||d.length||i.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const e=this.executeFrame.bind(this,60);yn(this.beans,e)}isQueueEmpty(){return!this.ticking}},fk={moduleName:"AnimationFrame",version:ie,beans:[gk]},mk=class extends _{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return Qt(e,this.beans,t?.column)}},vk=(e,t,s)=>t||e&&s,Ck=class extends _{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){if(!Ii())return;const t=(s,n,i)=>{const{rowCtrl:o,cellCtrl:r}=e.getControlsForEventTarget(i?.target??null);r?.column&&r.dispatchCellContextMenuEvent(i??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,i,o,r)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!Ii()||lc("dblclick"))return!1;const n=Date.now(),i=n-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=n,i})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:s,menuSvc:n}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:o,eFilterButton:r}=e,a=new wi(e.getGui(),!0);e.addDestroyFunc(()=>a.destroy());const l=e.shouldSuppressMenuHide(),c=l&&le(o)&&i.enableMenu,d=!!n?.isHeaderContextMenuEnabled(i.column),u=vk(i.enableMenu,d,Xt(t));let p=a;c&&(p=new wi(o,!0),e.addDestroyFunc(()=>p.destroy()));const f=m=>i.showColumnMenuAfterMouseClick(m.touchStart);if(c&&i.enableMenu&&e.addManagedListeners(p,{tap:f}),u&&e.addManagedListeners(a,{longTap:f}),i.enableSorting){const m=v=>{const C=v.touchStart.target;l&&(o?.contains(C)||r?.contains(C))||s?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(a,{tap:m})}if(i.enableFilterButton&&r){const m=new wi(r,!0);e.addManagedListeners(m,{tap:()=>i.showFilter(r)}),e.addDestroyFunc(()=>m.destroy())}}setupForHeaderGroup(e){const t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){const s=new wi(t.eGridHeader,!0),n=i=>t.showColumnMenuAfterMouseClick(i.touchStart);e.addManagedListeners(s,{longTap:n}),e.addDestroyFunc(()=>s.destroy())}}setupForHeaderGroupElement(e,t,s){const n=new wi(t,!0);e.addManagedListeners(n,{tap:s}),e.addDestroyFunc(()=>n.destroy())}mockContextMenu(e,t,s){if(!Ii())return;const n=new wi(t),i=o=>{pa(this.beans,o.touchEvent)&&s(void 0,o.touchStart,o.touchEvent)};e.addManagedListeners(n,{longTap:i}),e.addDestroyFunc(()=>n.destroy())}},wk={moduleName:"Touch",version:ie,beans:[Ck]},bk=class extends _{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,s=!1){return s?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const s=e===j.UP,n=e===j.DOWN,i=e===j.LEFT;let o,r;const{pageBounds:a,gos:l,visibleCols:c,pinnedRowModel:d}=this.beans,{rowPinned:u}=t;if(s||n)u&&d?s?r=0:r=u==="top"?d.getPinnedTopRowCount()-1:d.getPinnedBottomRowCount()-1:r=s?a.getFirstRow():a.getLastRow(),o=t.column;else{const p=l.get("enableRtl");r=t.rowIndex,o=(i!==p?c.allCols:[...c.allCols].reverse()).find(m=>!_t(m)&&this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:m}))}return o?{rowIndex:r,rowPinned:u,column:o}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let s=t,n=!1;for(;!n;){switch(e){case j.UP:s=this.getCellAbove(s);break;case j.DOWN:s=this.getCellBelow(s);break;case j.RIGHT:s=this.gos.get("enableRtl")?this.getCellToLeft(s):this.getCellToRight(s);break;case j.LEFT:s=this.gos.get("enableRtl")?this.getCellToRight(s):this.getCellToLeft(s);break;default:s=null,X(8,{key:e});break}s?n=this.isCellGoodToFocusOn(s):n=!0}return s}isCellGoodToFocusOn(e){const t=e.column;let s;const{pinnedRowModel:n,rowModel:i}=this.beans;switch(e.rowPinned){case"top":s=n?.getPinnedTopRow(e.rowIndex);break;case"bottom":s=n?.getPinnedBottomRow(e.rowIndex);break;default:s=i.getRow(e.rowIndex);break}return s?!this.isSuppressNavigable(t,s):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,s=hm(this.beans,t,!0);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,s=wc(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return s?{rowIndex:s.rowIndex,column:e.column,rowPinned:s.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:s}=this.beans,n=t.allCols;let i=e.rowIndex,o=e.rowPinned,r=t.getColAfter(e.column);if(!r){r=n[0];const a=hm(this.beans,e,!0);if(ht(a)||!a.rowPinned&&!(s?.isRowInPage(a.rowIndex)??!0))return null;i=a?a.rowIndex:null,o=a?a.rowPinned:null}return{rowIndex:i,column:r,rowPinned:o}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:s,pagination:n}=t,i=s.allCols;let o=e.rowIndex,r=e.rowPinned,a=s.getColBefore(e.column);if(!a){a=et(i);const l=wc(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(ht(l)||!l.rowPinned&&!(n?.isRowInPage(l.rowIndex)??!0))return null;o=l?l.rowIndex:null,r=l?l.rowPinned:null}return{rowIndex:o,column:a,rowPinned:r}}isSuppressNavigable(e,t){const{suppressNavigable:s}=e.colDef;if(typeof s=="boolean")return s;if(typeof s=="function"){const n=e.createColumnFunctionCallbackParams(t);return s(n)}return!1}};function xk(e){return e.focusSvc.getFocusedCell()}function yk(e){return e.focusSvc.clearFocusedCell()}function Sk(e,t,s,n){e.focusSvc.setFocusedCell({rowIndex:t,column:s,rowPinned:n,forceBrowserFocus:!0})}function Rk(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function Fk(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function Ek(e,t,s=!1){const n=e.headerNavigation?.getHeaderPositionForColumn(t,s);n&&e.focusSvc.focusHeaderPosition({headerPosition:n})}function $i(e){const t=e;return t?.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var Dk=class extends _{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new i1,this.rowValidations=new o1,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;const s=this.getEditRow(e);t?s.delete(t):s.clear(),s.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;const s=e&&this.edits.get(e);if(s)return s;if(t.checkSiblings){const n=e.pinnedSibling;if(n)return this.getEditRow(n)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;const s=this.getEditRow(e),n=e.pinnedSibling,i=t&&n&&this.getEditRow(n);if(!s&&!i)return;const o={...e.data},r=(a,l)=>a.forEach(({editorValue:c,pendingValue:d},u)=>{const p=c===void 0?d:c;p!==kt&&(l[u.getColId()]=p)});return s&&r(s,o),i&&r(i,o),o}getEdit(e={},t){const{rowNode:s,column:n}=e,i=this.edits;if(this.suspendEdits||i.size===0||!s||!n)return;const o=i.get(s)?.get(n);if(o)return o;if(t?.checkSiblings){const r=s.pinnedSibling;if(r)return i.get(r)?.get(n)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;const t=new Map;return this.edits.forEach((s,n)=>{const i=new Map;s.forEach(({editorState:o,...r},a)=>i.set(a,{...r})),t.set(n,i)}),t}setEditMap(e){this.edits.clear(),e.forEach((t,s)=>{const n=new Map;t.forEach((i,o)=>n.set(o,{...i})),this.edits.set(s,n)})}setEdit(e,t){const s=this.edits;(s.size===0||!s.has(e.rowNode))&&s.set(e.rowNode,new Map);const n=this.getEdit(e),i={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...n,...t};return this.getEditRow(e.rowNode).set(e.column,i),i}clearEditValue(e){const{rowNode:t,column:s}=e;if(!t)return;const n=o=>{o.editorValue=void 0,o.pendingValue=o.sourceValue,o.state="changed"};if(!s){this.getEditRow(t)?.forEach(n);return}const i=this.getEdit(e);i&&n(i)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];const t=[];return(e??this.edits).forEach((s,n)=>{for(const i of s.keys()){const{editorState:o,...r}=s.get(i);t.push({rowNode:n,column:i,...r})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;const{rowNode:s,column:n}=e,{withOpenEditor:i}=t;if(s){const o=this.getEditRow(s,t);return o?n?i?this.getEdit(e)?.state==="editing":o.has(n):o.size!==0?i?Array.from(o.values()).some(({state:r})=>r==="editing"):!0:!1:!1}return i?this.getEditPositions().some(({state:o})=>o==="editing"):this.edits.size>0}start(e){const t=this.getEditRow(e.rowNode)??new Map,{rowNode:s,column:n}=e;n&&!t.has(n)&&t.set(n,{editorValue:void 0,pendingValue:kt,sourceValue:this.beans.valueSvc.getValue(n,s,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(s,t)}stop(e,t,s){if(this.hasEdits(e))if(t){const n=this.getEditRow(e.rowNode)?.get(e.column);n&&(n.pendingValue===kt||n.pendingValue===n.sourceValue)?this.removeEdits(e):n&&s&&(n.editorValue=void 0)}else this.removeEdits(e)}clear(){for(const e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},i1=class{constructor(){this.cellValidations=new Map}getCellValidation(e){const{rowNode:t,column:s}=e||{};return this.cellValidations?.get(t)?.get(s)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){const{rowNode:s,column:n}=e;this.cellValidations.has(s)||this.cellValidations.set(s,new Map),this.cellValidations.get(s).set(n,t)}clearCellValidation(e){const{rowNode:t,column:s}=e;this.cellValidations.get(t)?.delete(s)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},o1=class{constructor(){this.rowValidations=new Map}getRowValidation(e){const{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Rc(e,t={}){const{rowIndex:s,rowId:n,rowCtrl:i,rowPinned:o}=t;if(i)return i;const{rowModel:r,rowRenderer:a}=e;let{rowNode:l}=t;return l||(n?l=CD(e,n,o):s!=null&&(l=r.getRow(s))),l?a.getRowCtrlByNode(l):void 0}function Ke(e,t={}){const{cellCtrl:s,colId:n,columnId:i,column:o}=t;if(s)return s;const r=e.colModel.getCol(n??i??Nh(o)),a=t.rowCtrl??Rc(e,t),l=a?.getCellCtrl(r)??void 0;if(l)return l;const c=t.rowNode??a?.rowNode;if(c)return e.rowRenderer.getCellCtrls([c],[r])?.[0]}function zm(e){const{editSvc:t}=e;t?.isBatchEditing()?(_n(e,{persist:!0}),Gn(e)):t?.stopEditing(void 0,{source:"api"})}function Pk(e,t,s){const{gos:n,popupSvc:i}=t;if(!n.get("stopEditingWhenCellsLoseFocus"))return;const o=r=>{const a=r.relatedTarget;if(Sh(a)===null){zm(t);return}let l=s.some(c=>c.contains(a))&&n.isElementInThisInstance(a);l||(l=!!i&&(i.getActivePopups().some(c=>c.contains(a))||i.isElementWithinCustomPopup(a))),l||zm(t)};for(const r of s)e.addManagedElementListeners(r,{focusout:o})}function Nh(e){if(e)return typeof e=="string"?e:e.getColId()}var kt=Symbol("unedited"),Tk=(e,t={})=>{const s=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),n=new Array(s.length);let i=0;for(let o=0,r=s.length;o<r;++o){const l=s[o].comp?.getCellEditor();l&&(n[i++]=$i(l))}return n.length=i,n};function kk(e,t,s,n,i,o){t.length===0&&s?.rowNode&&s?.column&&qi(e,s,{key:n,event:i,cellStartedEdit:o});const{valueSvc:r,editSvc:a,editModelSvc:l}=e,{rowNode:c,column:d}=s??{};for(const u of t){const{rowNode:p,column:f}=u,m=Ke(e,u);if(!m){if(p&&f){const C=r.getValue(f,p,"data"),x=(s?.rowNode===p&&s?.column===f&&n||void 0)??a?.getCellDataValue(u)??r.getValueForDisplay({column:f,node:p,from:"edit"})?.value??C??kt;l?.setEdit(u,{pendingValue:Xo(e,x,!1,f),sourceValue:C,state:"editing"})}continue}const v=o&&c===m.rowNode&&m.column===d;qi(e,{rowNode:c,column:m.column},{key:v?n:null,event:v?i:null,cellStartedEdit:v&&o})}}function Ds({pendingValue:e,sourceValue:t}){return e===kt&&(e=t),e!==t}function Ik(e){const t=new Map;for(const[s,n]of e){const i=new Map;for(const[o,r]of n)Ds(r)&&i.set(o,r);i.size>0&&t.set(s,i)}return t}function qi(e,t,s){const{key:n,event:i,cellStartedEdit:o,silent:r}=s??{},{editModelSvc:a,gos:l,userCompFactory:c}=e,d=Ke(e,t),u=d?.comp?.getCellEditor(),p=a1(e,t,n,o&&!r),f=a?.getEdit(t),m=p.value??f?.sourceValue;if(u){a?.setEdit(t,{editorValue:Xo(e,m,!0,t.column),state:"editing"}),u.refresh?.(p);return}const v=t.column.getColDef(),C=Bw(c,v,p);if(!C)return;const{popupFromSelector:w,popupPositionFromSelector:b}=C,x=w??!!v.cellEditorPopup,S=b??v.cellEditorPopupPosition;if(l1(C.params,i),!d)return;const{rangeFeature:y,rowCtrl:R,comp:E,onEditorAttachedFuncs:F}=d;a?.setEdit(t,{editorValue:Xo(e,m,!0,t.column),state:"editing",editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),d.editCompDetails=C,F.push(()=>y?.unsetComp()),E?.setEditDetails(C,x,S,l.get("reactiveCustomComponents")),R?.refreshRow({suppressFlash:!0}),Mk(e,t,i,m,r)}function Mk(e,t,s,n,i){const{editSvc:o,editModelSvc:r}=e,a=r?.getEdit(t);!i&&a?.state==="editing"&&!a?.editorState?.cellStartedEditing&&(o?.dispatchCellEvent(t,s,"cellEditingStarted",{value:n}),r?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function r1(e,t,s){const n={editorValueExists:!1};if(rg(e)&&(t.getValidationErrors?.()?.length??0)>0||s?.isCancelling)return n;if(s?.isStopping){const o=t?.isCancelAfterEnd?.();if(o)return{...n,isCancelAfterEnd:o}}return{editorValue:t.getValue(),editorValueExists:!0}}function a1(e,t,s,n){const{valueSvc:i,gos:o,editSvc:r}=e,a=e.gos.get("enableGroupEdit"),l=Ke(e,t),c=t.rowNode?.rowIndex??void 0,d=r?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:p,column:f}=t,m=l.comp?.getCellEditor(),v=r?.getCellDataValue(t),C=v===void 0?m?r1(e,m)?.editorValue:void 0:v,w=C===kt?i.getValueForDisplay({column:u,node:p,from:"edit"})?.value:C;let b=a?C:w;return f.isAllowFormula()&&e.formula?.isFormula(b)&&(b=e.formula?.normaliseFormula(b,!0)??b),Te(o,{value:b,eventKey:s??null,column:f,colDef:f.getColDef(),rowIndex:c,node:p,data:p.data,cellStartedEdit:!!n,onKeyDown:l?.onKeyDown.bind(l),stopEditing:x=>{r.stopEditing(t,{source:d?"ui":"api",suppressNavigateAfterEdit:x}),wa(e,t,{})},eGridCell:l?.eGui,parseValue:x=>i.parseValue(u,p,x,l?.value),formatValue:l?.formatValue.bind(l),validate:()=>{r?.validateEdit()}})}function Vr(e,t){const{editModelSvc:s}=e;s?.getEditMap().forEach((n,i)=>{n.forEach((o,r)=>{!t&&(o.state==="editing"||o.pendingValue===kt)||!Ds(o)&&(o.state!=="editing"||t)&&s?.removeEdits({rowNode:i,column:r})})})}function Ak(e,t){const s=t.comp?.getCellEditor();if(!s?.refresh)return;const{eventKey:n,cellStartedEdit:i}=t.editCompDetails.params,{column:o}=t,r=a1(e,t,n,i),a=o.getColDef(),l=Bw(e.userCompFactory,a,r);s.refresh(l1(l.params,n))}function l1(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor==="agNumberCellEditor"?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function _n(e,t){for(const s of e.editModelSvc?.getEditPositions()??[]){const n=Ke(e,s);if(!n)continue;const i=n.comp?.getCellEditor();if(!i)continue;const{editorValue:o,editorValueExists:r,isCancelAfterEnd:a}=r1(e,i,t);if(a){const{cellStartedEditing:l,cellStoppedEditing:c}=e.editModelSvc?.getEdit(s)?.editorState||{};e.editModelSvc?.setEdit(s,{editorState:{isCancelAfterEnd:a,cellStartedEditing:l,cellStoppedEditing:c}})}yo(e,s,o,void 0,!r,t)}}function yo(e,t,s,n,i,o){const{editModelSvc:r,valueSvc:a}=e;if(!r)return;const{rowNode:l,column:c}=t;if(!(l&&c))return;let d=r.getEdit(t);if(d?.sourceValue===void 0){const u=d?Xo(e,d.editorValue,!1,c):kt,p={sourceValue:a.getValue(c,l,"data"),pendingValue:u};o?.persist&&(p.state="changed"),d=r.setEdit(t,p)}r.setEdit(t,{editorValue:i?Xo(e,d.sourceValue,!0,c):s}),o?.persist&&Lk(e,t)}function Xo(e,t,s,n){const{formula:i}=e;return n.isAllowFormula()&&i?.isFormula(t)?i?.normaliseFormula(t,s)??t:t}function Lk(e,t){const{editModelSvc:s}=e,n=s?.getEdit(t),o={pendingValue:Xo(e,n?.editorValue,!1,t.column)};!n?.editorState?.cellStoppedEditing&&n?.state!=="editing"&&(o.state="changed"),s?.setEdit(t,o)}function Gn(e,t,s={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(const n of t)wa(e,n,s)}function wa(e,t,s,n=Ke(e,t)){const i=e.editModelSvc,o=i?.getEdit(t);let r;if(o&&o.state!=="editing"&&o.editorState?.cellStoppedEditing?r=o.state:r="changed",!n){o&&i?.setEdit(t,{state:r});return}const a=n.comp,l=a?.getCellEditor();if(a&&!l){if(n?.refreshCell(),o){i?.setEdit(t,{state:r});const d=e.gos.get("enableGroupEdit")?Wm(o,s?.cancel):{valueChanged:!1,newValue:void 0,oldValue:o.sourceValue};_m(e,t,d,s)}return}if(rg(e)){const d=o&&l?.getValidationErrors?.(),u=i?.getCellValidationModel();d?.length?u?.setCellValidation(t,{errorMessages:d}):u?.clearCellValidation(t)}o&&i?.setEdit(t,{state:r}),a?.setEditDetails(),a?.refreshEditStyles(!1,!1),n?.refreshCell({force:!0,suppressFlash:!0});const c=i?.getEdit(t);if(c&&c.state!=="editing"){const d=s?.cancel,u=e.gos.get("enableGroupEdit")?Wm(c,d):Nk(c,o,d);_m(e,t,u,s)}}function Wm(e,t){const{sourceValue:s,pendingValue:n}=e;let i;return!t&&n!==kt&&(i=n),{valueChanged:!t&&Ds(e),newValue:i,oldValue:s,value:s}}function Nk(e,t,s){if(s||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let n=e.editorValue;return(n==null||n===kt)&&(n=t?.pendingValue),n===kt&&(n=void 0),{valueChanged:Ds(e),newValue:n,oldValue:e.sourceValue}}function _m(e,t,s,{silent:n,event:i}={}){const{editSvc:o,editModelSvc:r}=e,a=r?.getEdit(t),{editorState:l}=a||{},{isCancelBeforeStart:c,cellStartedEditing:d,cellStoppedEditing:u}=l||{};!n&&!c&&d&&!u&&(o?.dispatchCellEvent(t,i,"cellEditingStopped",s),r?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function Ok(e){if(!e)return!1;for(let t=0,s=e.length;t<s;++t){const n=e[t],i=n.cellEditorParams;if(!(!i||!n.editable&&!n.groupRowEditable)&&(i.minLength!==void 0||i.maxLength!==void 0||i.getValidationErrors!==void 0||i.min!==void 0||i.max!==void 0))return!0}return!1}function Hk(e){const t=e.rowRenderer.getCellCtrls();for(let s=0,n=t.length;s<n;++s){const o=t[s].comp?.getCellEditor();if(o){const r=$i(o);if(r.getValidationElement||r.getValidationErrors)return!0}}return!1}function rg(e){return!!e.gos.get("getFullRowEditValidationErrors")||Ok(e.colModel.getColumnDefs())||Hk(e)}function qn(e,t){if(!(t||rg(e)))return;const s=new i1,{ariaAnnounce:n,localeSvc:i,editModelSvc:o,gos:r}=e,a=r.get("editType")==="fullRow",c=iw(i)("ariaValidationErrorPrefix","Cell Editor Validation"),d=new Set;for(const u of e.rowRenderer.getCellCtrls()){const p=u.comp?.getCellEditor();if(!p)continue;const f=$i(p),{rowNode:m,column:v}=u,C=f.getValidationErrors?.()??[],w=f.getValidationElement?.(!1)||!f.isPopup?.()&&u.eGui;if(w){const b=C!=null&&C.length>0,x=b?C.join(". "):"";Sp(w,b),b&&n.announceValue(`${c} ${C}`,"editorValidation"),w instanceof HTMLInputElement?w.setCustomValidity(x):w.classList.toggle("invalid",b)}C?.length>0&&s.setCellValidation({rowNode:m,column:v},{errorMessages:C}),d.add(u.rowCtrl)}if(_n(e,{persist:!1}),o?.setCellValidationModel(s),a){const u=Bk(e);o?.setRowValidationModel(u)}for(const u of d.values()){u.rowEditStyleFeature?.applyRowStyles();for(const p of u.getAllCellCtrls())p.tooltipFeature?.refreshTooltip(!0),p.editorTooltipFeature?.refreshTooltip(!0),p.editStyleFeature?.applyCellStyles?.()}}var Bk=e=>{const t=new o1,s=e.gos.get("getFullRowEditValidationErrors"),n=e.editModelSvc?.getEditMap();if(!n)return t;for(const i of n.keys()){const o=n.get(i);if(!o)continue;const r=[],{rowIndex:a,rowPinned:l}=i;for(const d of o.keys()){const u=o.get(d);if(!u)continue;const{editorValue:p,pendingValue:f,sourceValue:m}=u,v=p??(f===kt?void 0:f)??m;r.push({column:d,colId:d.getColId(),rowIndex:a,rowPinned:l,oldValue:m,newValue:v})}const c=s?.({editorsState:r})??[];c.length>0&&t.setRowValidation({rowNode:i},{errorMessages:c})}return t};function Gk(e){qn(e,!0);const t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;const s=[];return t.forEach((n,i)=>{n.forEach(({errorMessages:o},r)=>{s.push({column:r,rowIndex:i.rowIndex,rowPinned:i.rowPinned,messages:o??null})})}),s}function id(e){return!!(e.rowPinned&&e.pinnedSibling)}function gs(e,t,s,n){const i=t==="top";if(!s)return gs(e,t,i?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),n);if(!n){const l=i?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return gs(e,t,s,i?e.getPinnedTopRow(l-1):e.getPinnedBottomRow(l-1))}let o=!1,r=!1;const a=[];return e.forEachPinnedRow(t,l=>{if(l===s&&!o){o=!0,a.push(l);return}if(o&&l===n){r=!0,a.push(l);return}o&&!r&&a.push(l)}),a}function Vk(e,t,s,{rowNode:n,column:i},o){return Te(e.gos,{type:s,node:n,data:n.data,value:o,column:i,colDef:i.getColDef(),rowPinned:n.rowPinned,event:t,rowIndex:n.rowIndex})}function jk(e,t=!1){return e===j.DELETE?!0:!t&&e===j.BACKSPACE?zw():!1}var zk=class extends _{constructor(e,t,s,n){super(),this.cellCtrl=e,this.rowNode=s,this.rowCtrl=n,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;if(!(t===j.ENTER&&_t(this.cellCtrl.column)&&this.beans.rowNumbersSvc?.handleKeyDownOnCell(this.cellCtrl.cellPosition,e)))switch(t){case j.ENTER:this.onEnterKeyDown(e);break;case j.F2:this.onF2KeyDown(e);break;case j.ESCAPE:this.onEscapeKeyDown(e);break;case j.TAB:this.onTabKeyDown(e);break;case j.BACKSPACE:case j.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case j.DOWN:case j.UP:case j.RIGHT:case j.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){const{cellCtrl:s,beans:n}=this;if(!n.editSvc?.isEditing(s,{withOpenEditor:!0})){if(e.shiftKey&&s.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const i=s.getFocusedCellPosition();n.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:s}=this.beans;if(!t)return;const n=t.extendLatestRangeInDirection(e);n&&(e.key===j.LEFT||e.key===j.RIGHT?s?.ensureColumnVisible(n.column):s?.ensureRowVisible(n.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:s,beans:n,rowNode:i}=this,{gos:o,rangeSvc:r,eventSvc:a,editSvc:l}=n;if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),jk(e,o.get("enableCellEditingOnBackspace"))&&!l?.isEditing(s,{withOpenEditor:!0})){if(r&&Yn(o))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(s.isCellEditable()){const c=n.valueSvc.getDeleteValue(s.column,i);i.setDataValue(s.column,c,"cellClear")}}else l?.isEditing(s,{withOpenEditor:!0})||n.editSvc?.startEditing(s,{startedEdit:!0,event:t});a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){const{cellCtrl:t,beans:s}=this,{editSvc:n,navigation:i}=s,o=n?.isEditing(t,{withOpenEditor:!0}),r=t.rowNode,a=n?.isRowEditing(r,{withOpenEditor:!0}),l=c=>{n?.startEditing(c,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(o||a){if(this.isCtrlEnter(e)){n?.applyBulkEdit(t,s?.rangeSvc?.getCellRanges()||[]);return}if(qn(s),n?.checkNavWithValidation(void 0,e)==="block-stop")return;n?.isEditing(t,{withOpenEditor:!0})?n?.stopEditing(t,{event:e,source:"edit"}):a&&!t.isCellEditable()?n?.stopEditing({rowNode:r},{event:e,source:"edit"}):l(t)}else if(s.gos.get("enterNavigatesVertically")){const c=e.shiftKey?j.UP:j.DOWN;i?.navigateToNextCell(null,c,t.cellPosition,!1)}else{if(n?.hasValidationErrors())return;n?.hasValidationErrors(t)&&n.revertSingleCellEdit(t,!0),l(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===j.ENTER}onF2KeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.isEditing()&&(qn(this.beans),s?.checkNavWithValidation(void 0,e)==="block-stop")||s?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){const{cellCtrl:t,beans:{editSvc:s}}=this;s?.checkNavWithValidation(t,e)==="block-stop"&&s.revertSingleCellEdit(t),setTimeout(()=>{s?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){const s=e.target!==this.eGui,{beans:{editSvc:n},cellCtrl:i}=this;if(s||n?.isEditing(i,{withOpenEditor:!0}))return;if(e.key===j.SPACE)this.onSpaceKeyDown(e);else if(n?.isCellEditable(i,"ui")){if(n?.hasValidationErrors()&&!n?.hasValidationErrors(i))return;n?.startEditing(i,{startedEdit:!0,event:e,source:"api",editable:!0}),!i.editCompDetails?.params?.suppressPreventDefault&&e.preventDefault()}}onSpaceKeyDown(e){const{gos:t,editSvc:s}=this.beans,{rowNode:n}=this.cellCtrl;!s?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&Ti(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,n,"spaceKey"),e.preventDefault()}},Wk=class extends _{constructor(e,t,s){super(),this.cellCtrl=e,this.column=s,this.beans=t}onMouseEvent(e,t){if(!dn(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:s,editSvc:n,editModelSvc:i,frameworkOverrides:o,gos:r}=this.beans,a=e.ctrlKey||e.metaKey,{cellCtrl:l}=this,{column:c,cellPosition:d,rowNode:u}=l,p=Kl(r,c,u,e);s&&a&&!p&&s.getCellRangeCount(d)>1&&s.intersectLastRange(!0);const f=l.createEvent(e,"cellClicked");f.isEventHandlingSuppressed=p,t.dispatchEvent(f);const m=c.getColDef();if(m.onCellClicked&&window.setTimeout(()=>{o.wrapOutgoing(()=>{m.onCellClicked(f)})},0),!p&&i?.getState(l)!=="editing"){const v=n?.isEditing(),C=n?.isRangeSelectionEnabledWhileEditing(),w=i?.getCellValidationModel().getCellValidationMap().size??0,b=i?.getRowValidationModel().getRowValidationMap().size??0;if(v&&(C||w>0||b>0))return;n?.shouldStartEditing(l,e)?n?.startEditing(l,{event:e}):n?.shouldStopEditing(l,e)&&(this.beans.gos.get("editType")==="fullRow"?n?.stopEditing(l,{event:e,source:"edit"}):n?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){const{column:t,beans:s,cellCtrl:n}=this,{eventSvc:i,frameworkOverrides:o,editSvc:r,editModelSvc:a,gos:l}=s,c=Kl(l,n.column,n.rowNode,e),d=t.getColDef(),u=n.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=c,i.dispatchEvent(u),typeof d.onCellDoubleClicked=="function"&&window.setTimeout(()=>{o.wrapOutgoing(()=>{d.onCellDoubleClicked(u)})},0),!c&&r?.shouldStartEditing(n,e)&&a?.getState(n)!=="editing"){const p=r?.isEditing(),f=r?.isRangeSelectionEnabledWhileEditing(),m=a?.getCellValidationModel().getCellValidationMap().size??0,v=a?.getRowValidationModel().getRowValidationMap().size??0;if(p&&(f||m>0||v>0))return;r?.startEditing(n,{event:e})}}onMouseDown(e){const{shiftKey:t}=e,s=e.target,{cellCtrl:n,beans:i}=this,{eventSvc:o,rangeSvc:r,rowNumbersSvc:a,focusSvc:l,gos:c,editSvc:d}=i,{column:u,rowNode:p,cellPosition:f}=n,m=Kl(c,u,p,e),v=()=>{const x=n.createEvent(e,"cellMouseDown");x.isEventHandlingSuppressed=m,o.dispatchEvent(x)};if(m){v();return}if(this.isRightClickInExistingRange(e))return;const C=r&&!r.isEmpty(),w=this.containsWidget(s),b=_t(u);if(!(a&&b&&!a.handleMouseDownOnCell(f,e))){if(!t||!C){const x=d?.isEditing(n),y=c.get("enableCellTextSelection")&&e.defaultPrevented,R=(ri()||y)&&!x&&!$r(s)&&!w;n.focusCell(R,e)}if(t&&C&&!l.isCellFocused(f)){e.preventDefault();const x=l.getFocusedCell();if(x){const{column:S,rowIndex:y,rowPinned:R}=x,E=!!d?.isRangeSelectionEnabledWhileEditing?.();d?.isEditing(x)&&!E&&d?.stopEditing(x),E||l.setFocusedCell({column:S,rowIndex:y,rowPinned:R,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}w||(r?.handleCellMouseDown(e,f),v())}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const s=t.isCellInAnyRange(this.cellCtrl.cellPosition),n=kF(this.beans,e);if(s&&n)return!0}return!1}containsWidget(e){return Di(e,"ag-selection-checkbox",3)||Di(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),s?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:s}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),s?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,s=t.contains(e.target),n=t.contains(e.relatedTarget);return s&&n}},_k=class extends _{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){const t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();ii(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,s=e.getColSpan(t),n=[];if(s===1)n.push(e);else{let i=e;const o=e.getPinned();for(let r=0;i&&r<s&&(n.push(i),i=this.beans.visibleCols.getColAfter(i),!(!i||ht(i)||o!==i.getPinned()));r++);}return n}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=et(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,s=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const n=t.bodyWidth;return s+n+(e||0)}return s+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const s=ki(this.beans)*this.rowSpan;this.eContent.style.height=`${s}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},Uk="ag-cell",$k="ag-cell-auto-height",qk="ag-cell-normal-height",Kk="ag-cell-focus",Yk="ag-cell-first-right-pinned",Zk="ag-cell-last-left-pinned",Xk="ag-cell-not-inline-editing",Qk="ag-cell-wrap-text",Jk=0,zo=class extends _{constructor(e,t,s,n){super(),this.column=e,this.rowNode=t,this.rowCtrl=n,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=s,this.gos=s.gos,this.editSvc=s.editSvc,this.hasEdit=!!s.editSvc;const{colId:i}=e;this.instanceId=i+"-"+Jk++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new _k(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new Wk(this,e,this.column),this.keyboardListener=new zk(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:t}=e;t&&Yn(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),_t(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),qn(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,s,n,i,o,r){this.comp=e,this.eGui=t,this.printLayout=i,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(n,r),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();const a=o?this.isCellEditable():void 0,l=!a&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(a||l?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:a}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const c of this.onCompAttachedFuncs)c();this.onCompAttachedFuncs=[]}}checkFormulaError(){const e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:e,column:t}=this,{userCompFactory:s,ctrlsSvc:n,eventSvc:i}=e,o=t.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const a=Jf(s,o,r);if(n.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let l;const c=new We(u=>{l=u}),[d]=this.addManagedListeners(i,{bodyScrollEnd:()=>{l(),d()}});return{loadingComp:a,onReady:c}}return{loadingComp:a,onReady:We.resolve()}}showValue(e,t){const{beans:s,column:n,rowNode:i,rangeFeature:o}=this,{userCompFactory:r}=s;let a=this.getValueToDisplay(),l;const c=i.stub&&i.groupData?.[n.getId()]==null,d=n.getColDef();if(c||this.isCellRenderer()){const u=this.createCellRendererParams();!c||_t(n)?l=Qf(r,d,u):l=Jf(r,d,u)}if(!l&&!c&&s.findSvc?.isMatch(i,n)){const u=this.createCellRendererParams();l=Qf(r,{...n.getColDef(),cellRenderer:"agFindCellRenderer"},u)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(i,{checkSiblings:!0})){const u=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});u&&(u.compDetails?l=u.compDetails:u.valueToDisplay&&(a=u.valueToDisplay))}this.comp.setRenderDetails(l,a,e),this.customRowDragComp?.refreshVisibility(),!t&&o&&yn(s,()=>o?.refreshRangeStyleAndHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){const e="ag-cell-value",t=this.column.getColDef().cellRenderer==="agCheckboxCellRenderer";let s="";return t&&(s=" ag-allow-overflow"),`${e}${s}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&id(this.rowNode))&&!!e}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:s}=this.beans.gridOptions,n=uc(t),i=oi(this.column);return s==="custom"&&n!=="selectionColumn"&&i?!1:e.checkboxSelection||i&&typeof t=="object"&&Oo(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),s=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),n=this.includeDndSource!=this.isIncludeControl(e.dndSource),i=this.isAutoHeight!=this.column.isAutoHeight();return t||s||n||i}onPopupEditorClosed(e){const{editSvc:t}=this.beans;if(!t?.isEditing(this,{withOpenEditor:!0}))return;const s=e instanceof KeyboardEvent,n=e instanceof MouseEvent,i=s&&e.key===j.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?"ui":"api",cancel:i,event:s||n?e:void 0}),i&&this.focusCell(!0,e)}stopEditing(e=!1){const{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:s,rowNode:n,comp:i,eGui:o,beans:{valueSvc:r,gos:a,editSvc:l}}=this;return Te(a,{value:e,valueFormatted:t,getValue:()=>r.getValueForDisplay({column:s,node:n,from:"edit"}).value,setValue:d=>l?.setDataValue({rowNode:n,column:s},d)||n.setDataValue(s,d),formatValue:this.formatValue.bind(this),data:n.data,node:n,pinned:s.getPinned(),colDef:s.getColDef(),column:s,refreshCell:this.refreshCell.bind(this),eGridCell:o,eParentOfValue:i.getParentOfValue(),registerRowDragger:(d,u,p,f)=>this.registerRowDragger(d,u,f),setTooltip:(d,u)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,u),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:s}=this;!s?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell(e){const{editStyleFeature:t,customStyleFeature:s,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:i,filterManager:o},column:r,comp:a,suppressRefreshCell:l,tooltipFeature:c}=this;if(l)return;const{field:d,valueGetter:u,showRowGroup:p,enableCellChangeFlash:f}=r.getColDef(),m=d==null&&u==null&&p==null,v=e?.newData??!1,C=m||e&&(e.force||v),w=!!a,b=this.updateAndFormatValue(w),x=C||b;if(w){if(x){this.showValue(!!v,!1);const S=o?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!S&&f&&i?.flashCell(this),t?.applyCellStyles?.(),s?.applyUserStyles(),s?.applyClassesFromColDef(),n?.applyRowStyles(),this.checkFormulaError()}c?.refreshTooltip(),s?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,s=this.valueFormatted,{value:n,valueFormatted:i}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=n,this.valueFormatted=i,e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=s:!0}valuesAreEqual(e,t){const s=this.column.getColDef();return s.equals?s.equals(e,t):e===t}addDomData(e){const t=this.eGui;zi(this.beans.gos,t,bc,this),e.addDestroyFunc(()=>zi(this.beans.gos,t,bc,null))}createEvent(e,t){const{rowNode:s,column:n,value:i,beans:o}=this;return Vk(o,e,t,{rowNode:s,column:n},i)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:s}=this;sb(e,t,s.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);YC(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){const s=this.editSvc?.allowedFocusTargetOnValidation(this);s&&s!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){const{beans:{editSvc:t,focusSvc:s},comp:n}=this;if(!n||t?.isEditing(this)||!this.isCellFocused()||!s.shouldTakeFocus())return;const i=()=>{if(!this.isAlive())return;const o=n.getFocusableElement();this.isCellFocused()&&o.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&Zt(t,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.toggleCss(Yk,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.toggleCss(Zk,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(va(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const s=this.isCellFocused(),n=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(Kk,s),s&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let i=this.comp.getFocusableElement();if(n){const r=Mi(i,null,!0);r.length&&(i=r[0])}const o=e?e.preventScrollOnBrowserFocus:!0;i.focus({preventScroll:o}),M3(t,i)}s&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),s&&e&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:ln(t),column:this.column}}applyStaticCssClasses(){const{comp:e}=this;e.toggleCss(Uk,!0),e.toggleCss(Xk,!0);const t=this.column.isAutoHeight()==!0;e.toggleCss($k,t),e.toggleCss(qk,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.toggleCss(Qk,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),s=this.createEvent(e,"cellContextMenu"),{beans:n}=this;n.eventSvc.dispatchEvent(s),t.onCellContextMenu&&window.setTimeout(()=>{n.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(s)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(dt(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,s){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const n=this.createRowDragComp(e,t,s);n&&(this.customRowDragComp=n,this.addDestroyFunc(()=>{this.beans.context.destroyBean(n),this.customRowDragComp=null}),n.refreshVisibility())}createRowDragComp(e,t,s){const n=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,s);if(n)return this.beans.context.createBean(n),n}cellEditorAttached(){for(const e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!_t(this.column)||!this.eGui)return;const{ariaRowIndex:e}=this.rowCtrl;e!=null&&Rp(this.eGui,e)}getRootElement(){return this.eGui}};function ag(e,t,s,n,i,o){if(s==null&&t==null)return;const r={},a={},l=(c,d)=>{for(const u of c.split(" "))u.trim()!=""&&d(u)};if(s){const c=Object.keys(s);for(let d=0;d<c.length;d++){const u=c[d],p=s[u];let f;typeof p=="string"?f=e?e.evaluate(p,n):!0:typeof p=="function"&&(f=p(n)),l(u,m=>{f?r[m]=!0:a[m]=!0})}}if(t&&o)for(const c of Object.keys(t))l(c,d=>{r[d]||(a[d]=!0)});o&&Object.keys(a).forEach(o),Object.keys(r).forEach(i)}function Um(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var eI=class extends _{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const s=this.gos,n=r=>{if(typeof r=="string")e.push(r);else if(Array.isArray(r))for(const a of r)e.push(a)},i=s.get("rowClass");i&&n(i);const o=s.getCallback("getRowClass");if(o){const r={data:t.data,node:t,rowIndex:t.rowIndex},a=o(r);n(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,s=>{e.push(s)},()=>{})}processRowClassRules(e,t,s){const{gos:n,expressionSvc:i}=this.beans,o=Te(n,{data:e.data,node:e,rowIndex:e.rowIndex});ag(i,void 0,n.get("rowClassRules"),o,t,s)}processStylesFromGridOptions(e){const t=this.gos,s=t.get("rowStyle"),n=t.getCallback("getRowStyle");let i;if(n){const o={data:e.data,node:e,rowIndex:e.rowIndex};i=n(o)}if(i||s)return Object.assign({},s,i)}},tI=0,Fc=class extends _{constructor(e,t,s,n,i){super(),this.rowNode=e,this.useAnimationFrameForCreate=n,this.printLayout=i,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+tI++,this.rowId=Ur(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Um(this.rowNode),this.setRowType(),this.setAnimateFlags(s),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Ur(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,s,n){const{context:i,rowRenderer:o}=this.beans;n=Ia(this,i,n);const r={rowComp:e,element:t,containerType:s,compBean:n};this.allRowGuis.push(r),this.updateGui(s,r),this.initialiseRowComp(r);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,c=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!c&&!a.rowPinned&&o.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";for(const s of this.allRowGuis)s.element.style.display=t}initialiseRowComp(e){const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Ti(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const s=e.rowComp,n=this.getInitialRowClasses(e.containerType);for(const i of n)s.toggleCss(i,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&ph(e.element,!!this.rowNode.expanded),this.setRowCompRowId(s),this.setRowCompRowBusinessKey(s),zi(t,e.element,xc,this),e.compBean.addDestroyFunc(()=>zi(t,e.element,xc,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Ur(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(fh(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(fh(()=>{e.rowComp.toggleCss("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const s=this.createBean(t,this.beans.context);this.rowDragComps.push(s),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(n=>n!==s),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(s,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),s=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(s)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:s,beans:{visibleCols:n}}=this,i=!!e||!n.isPinningLeft(),o=!!t,r=!!s||!n.isPinningRight();return i&&o&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const{rowNode:e,gos:t,beans:{colModel:s}}=this,n=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),i=this.isNodeFullWidthCell(),o=t.get("masterDetail")&&e.detail,r=s.isPivotMode(),a=Ew(t,e,r);n?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":i?this.rowType="FullWidth":a?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:s}=this.beans;if(!s?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(s.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new zo(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,s=null){const n={list:[],map:{}},i=(c,d,u)=>{u!=null?n.list.splice(u,0,d):n.list.push(d),n.map[c]=d},o=[];for(const c of t){const d=c.getInstanceId();let u=e.map[d];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(c)),u&&i(d,u)}for(const c of e.list){const d=c.column.getInstanceId();if(n.map[d]!=null)continue;!this.isCellEligibleToBeRemoved(c,s)?o.push([d,c]):c.destroy()}if(o.length)for(const[c,d]of o){const u=n.list.findIndex(f=>f.column.getLeft()>d.column.getLeft()),p=u===-1?void 0:Math.max(u-1,0);i(c,d,p)}const{focusSvc:r,visibleCols:a}=this.beans,l=r.getFocusedCell();if(l&&l.column.getPinned()==s){const c=l.column.getInstanceId();if(!n.map[c]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const p=n.list.findIndex(m=>m.column.getLeft()>u.column.getLeft()),f=p===-1?void 0:Math.max(p-1,0);i(c,u,f)}}}return n}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,s=e.getFocusedCell();if(!s)return;const n=t?.getCellSpan(s.column,this.rowNode);if(n){if(n.firstNode!==this.rowNode||!n.doesSpanContain(s))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(s.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(const t of this.allRowGuis){const s=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(s,e)}}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const s=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,s);const n=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,n,"left");const i=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,"right")}}isCellEligibleToBeRemoved(e,t){const{column:i}=e;if(i.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{visibleCols:o,editSvc:r}=this.beans,a=r?.isEditing(e),l=e.isCellFocused();return a||l?!(o.allCols.indexOf(i)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||At(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=le(this.rowNode.oldRowTop),{visibleCols:s}=this.beans,n=s.isPinningLeft(),i=s.isPinningRight();if(t){const{slideInAnimation:o}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){o.fullWidth=!0;return}o.center=!0,o.left=n,o.right=i}else{const{fadeInAnimation:o}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){o.fullWidth=!0;return}o.center=!0,o.left=n,o.right=i}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(r,a)=>r?r.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(r.element,a).params):!0,t=e(this.fullWidthGui,null),s=e(this.centerGui,null),n=e(this.leftGui,"left"),i=e(this.rightGui,"right");return t&&s&&n&&i}addListeners(){const{beans:e,gos:t,rowNode:s}=this,{expansionSvc:n,eventSvc:i,context:o,rowSpanSvc:r}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...n?.getRowExpandedListeners(this)??{}}),s.detail&&this.addManagedListeners(s.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(s,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(i,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:a})=>{a&&!s.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,o),this.tooltipFeature=this.destroyBean(this.tooltipFeature,o),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,o)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(const l of this.allRowGuis)this.addRowDraggerToRow(l);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,o)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(const t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(const s of this.getAllCellCtrls())s.refreshCell(e);for(const s of this.allRowGuis)this.setRowCompRowId(s.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(s.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",s=t==="above",n=t==="inside",i=t==="below",o=t!=="none",r=s||i,a=this.rowNode.uiLevel,l=r&&a>0,c=l?a.toString():"0";for(const d of this.allRowGuis){const u=d.rowComp;u.toggleCss("ag-row-highlight-above",s),u.toggleCss("ag-row-highlight-inside",n),u.toggleCss("ag-row-highlight-below",i),u.toggleCss("ag-row-highlight-indent",l),o?d.element.style.setProperty("--ag-row-highlight-level",c):d.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const e=this.rowNode.dragging;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:ln(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:s,column:n}=t;if(!(s.element===e.target))return;const r=this.rowNode,{focusSvc:a,navigation:l}=this.beans,c=a.getFocusedCell(),d={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:c?.column??n};l?.navigateToNextCell(e,e.key,d,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||dn(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),s=t?t.element:null,n=s===e.target,i=dt(this.beans);let o=!1;s&&i&&(o=s.contains(i)&&i.classList.contains("ag-cell"));let r=null;!n&&!o&&(r=Ji(this.beans,s,!1,e.shiftKey)),(this.isFullWidth()&&n||!r)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>Ts(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(const s of this.allRowGuis)Zt(s.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){const{focusSvc:t,editSvc:s}=this.beans;if(s?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;const n=this.getFullWidthRowGuiForFocus();if(!n)return;const i=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&n.element.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;const t=this.beans.focusSvc.getFocusedCell(),s=this.beans.colModel.getCol(e?.column??t?.column);if(!s)return;const n=s?.pinned;return n==="right"?this.rightGui:n==="left"?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,s=>{s.element.classList.toggle("ag-full-width-focus",t&&s===e)})}onFullWidthRowFocused(e){const{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}const n=this.getFullWidthRowGuiForFocus(e);if(!n){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(n,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&n.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const s={list:[],map:{}};for(const n of e.list)n!==t&&(s.list.push(n),s.map[n.column.getInstanceId()]=n);return s}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:s}=this;return Te(this.gos,{type:e,node:s,data:s.data,rowIndex:s.rowIndex,rowPinned:s.rowPinned,event:t})}createRowEventWithSource(e,t){const s=this.createRowEvent(e,t);return s.source=this,s}onRowDblClick(e){if(dn(e))return;const t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),s=this.getColumnForFullWidth(t);if(!(!t||!s))return{rowGui:t,column:s}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e?.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Di(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;const{rangeSvc:t,focusSvc:s}=this.beans;t?.removeAllCellRanges();const n=this.findFullWidthInfoForEvent(e);if(!n)return;const{rowGui:i,column:o}=n,r=i.element,a=e.target,l=this.rowNode;let c=e.defaultPrevented||ri();r&&r.contains(a)&&$r(a)&&(c=!1),s.setFocusedCell({rowIndex:l.rowIndex,column:o,rowPinned:l.rowPinned,forceBrowserFocus:c})}isSuppressMouseEvent(e){const{gos:t,rowNode:s}=this;if(this.isFullWidth()){const i=this.findFullWidthRowGui(e.target);return YD(t,i?.rowComp.getFullWidthCellRendererParams(),s,e)}const n=Qp(t,e.target);return n!=null&&Kl(t,n.column,s,e)}onRowClick(e){if(dn(e)||this.lastMouseDownOnDragger)return;const s=this.isSuppressMouseEvent(e),{eventSvc:n,selectionSvc:i}=this.beans,o=this.createRowEventWithSource("rowClicked",e);o.isEventHandlingSuppressed=s,n.dispatchEvent(o),!s&&i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:s,rowNode:n}=this,i=Te(s,{fullWidth:!0,data:n.data,node:n,value:n.key,valueFormatted:n.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(r,a,l,c)=>this.addFullWidthRowDragging(r,a,l,c),setTooltip:(r,a)=>{s.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(r,a)}}),o=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return IE(o,i);case"FullWidthGroup":{const{value:r,valueFormatted:a}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return i.value=r,i.valueFormatted=a,kE(o,i)}case"FullWidthLoading":return TE(o,i);default:return PE(o,i)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,s="",n){const{rowDragSvc:i,context:o}=this.beans;if(!i||!this.isFullWidth())return;const r=i.createRowDragComp(()=>s,this.rowNode,void 0,e,t,n);this.createBean(r,o),this.addDestroyFunc(()=>{this.destroyBean(r,o)})}onUiLevelChanged(){const e=Um(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,s="ag-row-level-"+this.rowLevel;for(const n of this.allRowGuis)n.rowComp.toggleCss(t,!0),n.rowComp.toggleCss(s,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-first",e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(const s of this.allRowGuis)s.rowComp.toggleCss("ag-row-last",t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),!!e.length)for(const t of e)for(const s of this.allRowGuis)s.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,s=>s.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),s=this.isFullWidth(),{rowNode:n,beans:i}=this,o=[];o.push("ag-row"),o.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&o.push("ag-opacity-zero"),o.push(n.rowIndex%2===0?"ag-row-even":"ag-row-odd"),n.isRowPinned()&&(o.push("ag-row-pinned"),i.pinnedRowModel?.isManual()&&o.push("ag-row-pinned-manual")),!n.isRowPinned()&&n.pinnedSibling&&o.push("ag-row-pinned-source"),n.isSelected()&&o.push("ag-row-selected"),n.footer&&o.push("ag-row-footer"),o.push("ag-row-level-"+this.rowLevel),n.stub&&o.push("ag-row-loading"),s&&o.push("ag-full-width-row"),i.expansionSvc?.addExpandedCss(o,n),n.dragging&&o.push("ag-row-dragging");const{rowStyleSvc:r}=i;return r&&(r.processClassesFromGridOptions(o,n),r.preProcessRowClassRules(o,n)),o.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&o.push("ag-row-first"),this.isLastRowOnPage()&&o.push("ag-row-last"),s&&(t==="left"&&o.push("ag-cell-last-left-pinned"),t==="right"&&o.push("ag-cell-first-right-pinned")),o}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:s}=e,{rowNode:n,beans:i,gos:o}=this;s.addManagedListeners(t,{pointerenter:r=>{r.pointerType==="mouse"&&n.dispatchRowEvent("mouseEnter")},pointerleave:r=>{r.pointerType==="mouse"&&n.dispatchRowEvent("mouseLeave")}}),s.addManagedListeners(n,{mouseEnter:()=>{!i.dragSvc?.dragging&&!o.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),n.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(s=>s.element);for(const s of t)s.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),s=this.applyPaginationOffset(t.top,!0)-100,n=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(s,e),n)}forEachGui(e,t){if(e)t(e);else for(const s of this.allRowGuis)t(s)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,s=this.beans.environment.getDefaultRowHeight(),i=xw(this.gos)?Kn(this.beans,this.rowNode).height:void 0,o=i?`${Math.min(s,i)-2}px`:void 0;this.forEachGui(e,r=>{r.element.style.height=`${t}px`,o&&r.element.style.setProperty("--ag-line-height",o)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&No(this.gos)&&!t.sticky)if(t.rowTop!=null){const i=this.roundRowTopToBounds(t.rowTop);this.setRowTop(i)}else for(const i of this.allRowGuis)i.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(dt(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const s=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(s),this.beans.eventSvc.dispatchEvent(s),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const e=t=>{for(const s of t.list)s.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const s=this.beans.pageBounds.getPixelOffset();return e+s*(t?1:-1)}setRowTop(e){if(!this.printLayout&&le(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let s;if(t.sticky)s=t.stickyRowTop;else{const n=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,i=this.applyPaginationOffset(n);s=t.isRowPinned()?i:this.beans.rowContainerHeight.getRealPixelPosition(i)}return s+"px"}setRowTopStyle(e){for(const t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let s=null;for(const n of this.getAllCellCtrls())n.column==e&&(s=n);if(s!=null||t)return s;for(const n of this.getAllCellCtrls())n?.getColSpanningList().indexOf(e)>=0&&(s=n);return s}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const s=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),n=this.rowNode.rowIndex%2===0,i=this.ariaRowIndex=s+this.rowNode.rowIndex+1;this.forEachGui(e,o=>{o.rowComp.setRowIndex(t),o.rowComp.toggleCss("ag-row-even",n),o.rowComp.toggleCss("ag-row-odd",!n),Rp(o.element,i)})}},sI=class extends _{constructor(){super(),this.beanName="navigation",this.onPageDown=$f(this.onPageDown,100),this.onPageUp=$f(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const s=e.key,n=e.altKey,i=e.ctrlKey||e.metaKey,o=!!this.beans.rangeSvc&&e.shiftKey,r=K5(this.gos,e);let a=!1;switch(s){case j.PAGE_HOME:case j.PAGE_END:!i&&!n&&(this.onHomeOrEndKey(s),a=!0);break;case j.LEFT:case j.RIGHT:case j.UP:case j.DOWN:if(!r)return!1;i&&!n&&!o&&(this.onCtrlUpDownLeftRight(s,r),a=!0);break;case j.PAGE_DOWN:case j.PAGE_UP:!i&&!n&&(a=this.handlePageUpDown(s,r,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,s){return s&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===j.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:s,focusIndex:n,focusColumn:i,isAsync:o,rowPinned:r}){const{scrollFeature:a}=this.gridBodyCon;le(s)&&!s.isPinned()&&a.ensureColumnVisible(s),le(e)&&a.ensureIndexVisible(e,t),o||a.ensureIndexVisible(n);const{focusSvc:l}=this.beans;l.setFocusedCell({rowIndex:n,column:i,rowPinned:r,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:n,rowPinned:r,column:i})}onPageDown(e){const t=this.beans,s=Bu(t),n=this.getViewportHeight(),{pageBounds:i,rowModel:o,rowAutoHeight:r}=t,a=i.getPixelOffset(),l=s.top+n,c=o.getRowIndexAtPixel(l+a);r?.active?this.navigateToNextPageWithAutoHeight(e,c):this.navigateToNextPage(e,c)}onPageUp(e){const t=this.beans,s=Bu(t),{pageBounds:n,rowModel:i,rowAutoHeight:o}=t,r=n.getPixelOffset(),a=s.top,l=i.getRowIndexAtPixel(a+r);o?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,s=!1){const{pageBounds:n,rowModel:i}=this.beans,o=this.getViewportHeight(),r=n.getFirstRow(),a=n.getLastRow(),l=n.getPixelOffset(),c=i.getRow(e.rowIndex),d=s?c?.rowHeight-o-l:o-l,u=c?.rowTop+d;let p=i.getRowIndexAtPixel(u+l);if(p===e.rowIndex){const m=s?-1:1;t=p=e.rowIndex+m}let f;s?(f="bottom",p<r&&(p=r),t<r&&(t=r)):(f="top",p>a&&(p=a),t>a&&(t=a)),this.isRowTallerThanView(i.getRow(p))&&(t=p,f="top"),this.navigateTo({scrollIndex:t,scrollType:f,scrollColumn:null,focusIndex:p,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,s=!1){this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const n=this.getNextFocusIndexForAutoHeight(e,s);this.navigateTo({scrollIndex:t,scrollType:s?"bottom":"top",scrollColumn:null,focusIndex:n,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const s=t?-1:1,n=this.getViewportHeight(),{pageBounds:i,rowModel:o}=this.beans,r=i.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=r;){const c=o.getRow(l);if(c){const d=c.rowHeight??0;if(a+d>n)break;a+=d}l+=s}return Math.max(0,Math.min(l,r))}getViewportHeight(){const e=this.beans,t=Bu(e),s=this.beans.scrollVisibleSvc.getScrollbarWidth();let n=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(n-=s),n}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const s=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!s)return;const n=this.getNormalisedPosition(s),{rowIndex:i,rowPinned:o,column:r}=n??s,a=r;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:a,focusIndex:i,focusColumn:a,rowPinned:o})}onHomeOrEndKey(e){const t=e===j.PAGE_HOME,{visibleCols:s,pageBounds:n,rowModel:i}=this.beans,o=s.allCols,r=t?n.getFirstRow():n.getLastRow(),a=i.getRow(r);if(!a)return;const l=(t?o:[...o].reverse()).find(c=>!c.isSuppressNavigable(a)&&!_t(c));l&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:l,focusIndex:r,focusColumn:l})}onTabKeyDown(e,t){const s=t.shiftKey,n=this.tabToNextCellCommon(e,s,t),i=this.beans,{ctrlsSvc:o,pageBounds:r,focusSvc:a,gos:l}=i;if(n!==!1){n?t.preventDefault():n===null&&o.get("gridCtrl").allowFocusForNextCoreContainer(s);return}if(s){const{rowIndex:c,rowPinned:d}=e.getRowPosition();(d?c===0:c===r.getFirstRow())&&(l.get("headerHeight")===0||Fs(i)?Yo(i,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof zo&&e.focusCell(!0),(a.focusOverlay(!1)||Yo(i,s))&&t.preventDefault()}tabToNextCell(e,t){const s=this.beans,{focusSvc:n,rowRenderer:i}=s,o=n.getFocusedCell();if(!o)return!1;let r=Eo(s,o);return!r&&(r=i.getRowByPosition(o),!r?.isFullWidth())?!1:!!this.tabToNextCellCommon(r,e,t,"api")}tabToNextCellCommon(e,t,s,n="ui"){const{editSvc:i,focusSvc:o}=this.beans;let r;const a=e instanceof zo?e:e.getAllCellCtrls()?.[0];return i?.isEditing()?r=i?.moveToNextCell(a,t,s,n):r=this.moveToNextCellNotEditing(e,t,s),r===null?r:r||!!o.focusedHeader}moveToNextCellNotEditing(e,t,s){const n=this.beans.visibleCols.allCols;let i;if(e instanceof Fc){if(i={...e.getRowPosition(),column:t?n[0]:et(n)},this.gos.get("embedFullWidthRows")&&s){const r=e.findFullWidthInfoForEvent(s);r&&(i.column=r.column)}}else i=e.getFocusedCellPosition();const o=this.findNextCellToFocusOn(i,{backwards:t,startEditing:!1});if(o===!1)return null;if(o instanceof zo)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o,t);return le(o)}findNextCellToFocusOn(e,{backwards:t,startEditing:s,skipToNextEditableCell:n}){let i=e;const o=this.beans,{cellNavigation:r,gos:a,focusSvc:l,rowRenderer:c}=o;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=r.getNextTabbedCell(i,t);const d=a.getCallback("tabToNextCell");if(le(d)){const m=d({backwards:t,editing:s,previousCellPosition:e,nextCellPosition:i||null});if(m===!0)i=e;else{if(m===!1)return!1;i={rowIndex:m.rowIndex,column:m.column,rowPinned:m.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const f=vs(o);return l.focusHeaderPosition({headerPosition:{headerRowIndex:f+i.rowIndex,column:i.column},fromCell:!0}),null}const u=a.get("editType")==="fullRow";if(s&&(!u||n)&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const p=Eo(o,i);if(!p){const f=c.getRowByPosition(i);if(!f||!f.isFullWidth()||s)continue;return{...f.getRowPosition(),column:i?.column}}if(!r.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(i),this.setRangeToCellIfSupported(i),p}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:s,rowModel:n}=this.beans;return t==="top"?s?.getPinnedTopRow(e):t==="bottom"?s?.getPinnedBottomRow(e):n.getRow(e)}navigateToNextCell(e,t,s,n){let i=s,o=!1;const r=this.beans,{cellNavigation:a,focusSvc:l,gos:c}=r;for(;i&&(i===s||!this.isValidNavigateCell(i));)c.get("enableRtl")?t===j.LEFT&&(i=this.getLastCellOfColSpan(i)):t===j.RIGHT&&(i=this.getLastCellOfColSpan(i)),i=a.getNextCellToFocus(t,i),o=ht(i);if(o&&e&&e.key===j.UP&&(i={rowIndex:-1,rowPinned:null,column:s.column}),n){const u=c.getCallback("navigateToNextCell");if(le(u)){const f=u({key:t,previousCellPosition:s,nextCellPosition:i||null,event:e});le(f)?i={rowPinned:f.rowPinned,rowIndex:f.rowIndex,column:f.column}:i=null}}if(!i)return;if(i.rowIndex<0){const u=vs(r);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:i.column??s.column},event:e||void 0,fromCell:!0});return}const d=this.getNormalisedPosition(i);d?this.focusPosition(d):this.tryToFocusFullWidthRow(i)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const s=Eo(this.beans,e);return s?(e=s.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:s,rowRenderer:n,focusSvc:i,eventSvc:o}=this.beans,r=s.allCols;if(!n.getRowByPosition(e)?.isFullWidth())return!1;const l=i.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?et(r):r[0])};this.focusPosition(c);const d=t??(l!=null&&mD(c,l));return o.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:d}),!0}focusPosition(e){const{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){_t(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!Us(this.beans,e)}getLastCellOfColSpan(e){const t=Eo(this.beans,e);if(!t)return e;const s=t.getColSpanningList();return s.length===1?e:{rowIndex:e.rowIndex,column:et(s),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=Sw(this.gos),s=this.beans.rowModel.getRow(e.rowIndex),n=t&&s?.sticky,{scrollFeature:i}=this.gridBodyCon;!n&&ht(e.rowPinned)&&i.ensureIndexVisible(e.rowIndex),e.column.isPinned()||i.ensureColumnVisible(e.column)}ensureColumnVisible(e){const t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function Bu(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var nI={moduleName:"KeyboardNavigation",version:ie,beans:[sI,bk,MT],apiFunctions:{getFocusedCell:xk,clearFocusedCell:yk,setFocusedCell:Sk,setFocusedHeader:Ek,tabToNextCell:Rk,tabToPreviousCell:Fk}},iI=class extends _{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:e,pagination:t,rowModel:s}=this.beans;t?t.calculatePages():e.calculateBounds(0,s.getRowCount()-1)}},oI=class extends _{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,s=e?.rowTop??0,n=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:s,pageLastPixel:n}}calculateBounds(e,t){const{rowModel:s}=this.beans,n=s.getRowBounds(e);n&&(n.rowIndex=e),this.topRowBounds=n;const i=s.getRowBounds(t);i&&(i.rowIndex=t),this.bottomRowBounds=i,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},rI=".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}",aI=class extends _{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?"left":"right"}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const e=this.getWidth(),t=e>0;for(const s of this.elements)s&&(st(s,t),Vs(s,e))}},lI=class extends _{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:s}=this.beans,n=At(e,"print"),i=n?0:t.getColsLeftWidth(),o=n?0:t.getDisplayedColumnsRightWidth();i!=this.leftWidth&&(this.leftWidth=i,s.dispatchEvent({type:"leftPinnedWidthChanged"})),o!=this.rightWidth&&(this.rightWidth=o,s.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=ua(e);if(t<=50)return;const s=this.getPinnedColumnsOverflowingViewport(t-50),n=this.gos.getCallback("processUnpinnedColumns"),{columns:i,hasLockedPinned:o}=s;let r=i;!r.length&&!o||(n&&(r=n({columns:r,viewportWidth:t})),r?.length&&(r=r.filter(a=>!_t(a)),this.setColsPinned(r,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new aI(e,t)}setColsPinned(e,t,s){const{colModel:n,colAnimation:i,visibleCols:o,gos:r}=this.beans;if(!n.cols||!e?.length)return;if(At(r,"print")){X(37);return}i?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];for(const c of e){if(!c)continue;const d=n.getCol(c);d&&d.getPinned()!==a&&(this.setColPinned(d,a),l.push(d))}l.length&&(o.refresh(s),Pb(this.eventSvc,l,s)),i?.finish()}initCol(e){const{pinned:t,initialPinned:s}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,s)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const s=e.pinned==="left",n=e.pinned==="right";e.hidden=!0;const i=()=>{const o=s?this.leftWidth:this.rightWidth;if(o==null)return;const r=o==0,a=e.hidden!==r,l=this.gos.get("enableRtl"),c=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&s||!l&&n)?o+c:o;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!r),a&&(e.hidden=r,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:n,rightWidth:i}=this,o=ua(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(n+i+e>o)if(o>n+i)e=o-n-i;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,s=this.leftWidth??0,n=t+s;let i=!1;if(n<e)return{columns:[],hasLockedPinned:i};const{visibleCols:o}=this.beans,r=[...o.leftCols],a=[...o.rightCols];let l=0,c=0;const d=0,u=[];let p=n-d-e;for(;(c<r.length||l<a.length)&&p>0;){if(l<a.length){const f=a[l++];if(f.colDef.lockPinned){i=!0;continue}p-=f.getActualWidth(),u.push(f)}if(c<r.length&&p>0){const f=r[c++];if(f.colDef.lockPinned){i=!0;continue}p-=f.getActualWidth(),u.push(f)}}return{columns:u,hasLockedPinned:i}}},cI={moduleName:"PinnedColumn",version:ie,beans:[lI],css:[rI]},dI=class extends qt{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=xt(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Et(e),s=this.descriptionContainer=t.createElement("div");s.classList.add("ag-aria-description-container"),qC(s,"polite"),v3(s,"additions text"),m3(s,!0),e.eRootDiv.appendChild(s)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,"")==""){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(Jt(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},uI=class extends dI{},hI={moduleName:"Aria",version:ie,beans:[uI]},pI=":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}",$m="ag-delay-render",gI=class extends _{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,t=>{t.gridBodyCtrl.eGridBody.classList.add($m)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;const{renderStatus:t,ctrlsSvc:s}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}s.getGridBodyCtrl().eGridBody.classList.remove($m),this.alreadyRevealed=!0}},fI={moduleName:"ColumnDelayRender",version:ie,beans:[gI],css:[pI]},od=class extends ft{constructor(){super()}},mI={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},vI=class extends od{constructor(){super(...arguments),this.eExportingIcon=xe,this.eExportingText=xe}init(e){const{beans:t}=this;this.setTemplate(mI);const s=Qt("overlayExporting",t,null);s&&this.eExportingIcon.appendChild(s);const n=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=n,t.ariaAnnounce.announceValue(n,"overlay")}},CI={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},wI=class extends od{constructor(){super(...arguments),this.eLoadingIcon=xe,this.eLoadingText=xe}init(e){const{beans:t,gos:s}=this,n=ln(s.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(n??CI),!n){const i=Qt("overlayLoading",t,null);i&&this.eLoadingIcon.appendChild(i);const o=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}}},bI={tag:"span",cls:"ag-overlay-no-matching-rows-center"},xI=class extends od{init(e){const{beans:t}=this;this.setTemplate(bI);const s=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=s,t.ariaAnnounce.announceValue(s,"overlay")}},yI={tag:"span",cls:"ag-overlay-no-rows-center"},SI=class extends od{init(e){const{beans:t,gos:s}=this,n=ln(s.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(n??yI),!n){const i=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}}};function RI(e){e.overlays?.showLoadingOverlay()}function FI(e){e.overlays?.showNoRowsOverlay()}function EI(e){e.overlays?.hideOverlay()}var DI=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}",PI={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},c1=class extends ft{constructor(){super(PI),this.eOverlayWrapper=xe,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(DI)}handleKeyDown(e){if(e.key!==j.TAB||e.defaultPrevented||dn(e))return;const{beans:t,eOverlayWrapper:s}=this;if(s&&Ji(t,s,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:et(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=Yo(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const s=this.eOverlayWrapper;if(!s)return;const n=s.classList,{AUTO_HEIGHT:i,NORMAL:o,PRINT:r}=ql;n.toggle(i,t.autoHeight),n.toggle(o,t.normal),n.toggle(r,t.print)}postConstruct(){this.createManagedBean(new Xp(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,s){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=s,!e)return this.refreshWrapperPadding(),We.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),s&&this.isGridFocused()){const n=dt(this.beans);n&&!bp(this.beans)&&(this.elToFocusAfter=n)}return e.then(n=>{const i=this.eOverlayWrapper;if(!i){this.destroyBean(n);return}if(this.activePromise!==e){this.activeOverlay!==n&&(this.destroyBean(n),n=null);return}this.activePromise=null,n&&(this.activeOverlay!==n&&(i.appendChild(n.getGui()),this.activeOverlay=n),s&&this.isGridFocused()&&Wi(i))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}const e=!!this.activeOverlay||!!this.activePromise;let t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);const s=this.eOverlayWrapper;s&&Jt(s),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=dt(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},TI={selector:"AG-OVERLAY-WRAPPER",component:c1},kI=["refresh"],Aa=e=>({name:e,optionalMethods:kI}),xi={id:"agLoadingOverlay",overlayType:"loading",comp:Aa("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{const t=e.get("loading");return t===!1||e.get("suppressLoadingOverlay")===!0&&t!==!0}},To={id:"agNoRowsOverlay",overlayType:"noRows",comp:Aa("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},lg={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:Aa("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},Ec={id:"agExportingOverlay",overlayType:"exporting",comp:Aa("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},Ql={id:"activeOverlay",comp:Aa("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},II=e=>e?{agLoadingOverlay:xi,agNoRowsOverlay:To,agNoMatchingRowsOverlay:lg,agExportingOverlay:Ec}[e]??Ql:null,MI=e=>e?{loading:xi,noRows:To,noMatchingRows:lg,exporting:Ec}[e]:null,AI=class extends _{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){const e=this.gos;this.showInitialOverlay=gt(e);const t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[s,n,i,o]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),n()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=s,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],r=>this.onPropChange(new Set(r.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(xi))return;const t=e.get("loading");!t&&t!==void 0||this.doShowOverlay(xi)}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(To)||(this.userForcedNoRows=!0,this.doShowOverlay(To))}async showExportOverlay(e){const{gos:t,beans:s}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(Ec)||this.userForcedNoRows&&this.currentDef===To){e();return}const n=this.getDesiredDefWithOverride(Ec);if(!n){e();return}this.exportsInProgress++,this.focusedCell=s.focusSvc.getFocusedCell(),await this.doShowOverlay(n),await new Promise(o=>setTimeout(()=>o()));const i=Date.now();try{e()}finally{const o=Date.now()-i,r=Math.max(0,300-o),a=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),yD(s,this.focusedCell),this.focusedCell=null)};r>0?setTimeout(()=>a(),r):a()}}hideOverlay(){const e=this.gos;this.showInitialOverlay=!1;const t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get("loading")){X(99);return}if(e.get("activeOverlay")){X(296);return}if(this.currentDef===lg){X(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==To&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return TI}getOverlayWrapperCompClass(){return c1}onPropChange(e){const t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;const s=this.currentDef,n=this.eWrapper?.activeOverlay;if(n&&s){const i=e.has("activeOverlayParams");if(s===Ql)i&&n.refresh?.(this.makeCompParams(!0));else{const o=s.paramsKey;(e.has("overlayComponentParams")||o&&e.has(o))&&n.refresh?.(this.makeCompParams(!1,o,s.overlayType))}}}updateOverlay(e){const t=this.eWrapper;if(!t)return this.currentDef=null,!1;const s=this.getDesiredDefWithOverride(),n=this.currentDef,i=s===Ql&&e;return s!==n?s?(this.doShowOverlay(s),!0):(this.disableInitialOverlay(),this.doHideOverlay()):i&&s?(t.hideOverlay(),this.doShowOverlay(s),!0):(s||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){const{gos:t}=this;let s=II(t.get("activeOverlay"));return s||(s=e??this.getOverlayDef(),s&&this.isDisabled(s)&&(s=null)),s}getOverlayDef(){const{gos:e,beans:t}=this,{rowModel:s}=t,n=e.get("loading");if(n!==void 0){if(this.disableInitialOverlay(),n)return xi}else if(this.showInitialOverlay){if(!this.isDisabled(xi)&&(!e.get("columnDefs")||!e.get("rowData")))return xi;this.disableInitialOverlay()}else this.disableInitialOverlay();const o=s.getOverlayType();return MI(o)}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){const{gos:t,beans:s}=this,{userCompFactory:n}=s;this.currentDef=e;const i=e!==Ql,o=!!e.exclusive;this.exclusive=o;let r;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(r=e.paramsKey);let a;i&&(t.get("overlayComponent")||t.get("overlayComponentSelector"))&&(a=n.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),a??(a=n.getCompDetailsFromGridOptions(e.comp,i?e.id:void 0,this.makeCompParams(!i,r,e.overlayType),!1));const l=a?.newAgStackInstance()??null,c=this.eWrapper?this.eWrapper.showOverlay(l,e.wrapperCls,o):We.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(o),c}makeCompParams(e,t,s){const{gos:n}=this,i=e?n.get("activeOverlayParams"):{...n.get("overlayComponentParams"),...t&&n.get(t)||null,overlayType:s};return Te(n,i??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;const t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){const{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},LI={moduleName:"Overlay",version:ie,userComponents:{agLoadingOverlay:wI,agNoRowsOverlay:SI,agNoMatchingRowsOverlay:xI,agExportingOverlay:vI},apiFunctions:{showLoadingOverlay:RI,showNoRowsOverlay:FI,hideOverlay:EI},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[AI]},NI=class extends _{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=jE(),ji(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;ji(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),s=e/t;return this.maxScrollY*s}},OI=400,HI=class extends _{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const e=()=>{for(const o of this.getAllCellCtrls())o.onCellSelectionChanged()},t=()=>{for(const o of this.getAllCellCtrls())o.updateRangeBordersIfRangeCount()},s=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},n=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>n()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{Yn(this.gos)?s():n()}),Yn(this.gos)&&s()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],()=>this.redraw()),this.addManagedPropertyListener("suppressCellFocus",n=>this.onSuppressCellFocusChanged(n.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:n,previousValue:i})=>{(!i&&n||i&&!n)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:s}=this.beans;if(s&&this.addManagedPropertyListener("showOpenedGroup",()=>{const n=s.columns;n.length&&this.refreshCells({columns:n,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const n=this.gridBodyCtrl;n.setStickyTopHeight(0),n.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=At(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new BI(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),s=this.cachedRowCtrls?.getEntries()??[];t.length>0||s.length>0?this.allRowCtrls=[...e,...t,...s]:this.allRowCtrls=e}isCellBeingRendered(e,t){const s=this.rowCtrlsByRowIndex[e];return!t||!s?!!s:s.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!s.getCellCtrl(t)||!s.isRowRendered()}updateCellFocus(e){for(const t of this.getAllCellCtrls())t.onCellFocused(e);for(const t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(const t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(const t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;if(t)for(const s of this.getAllCellCtrls())t.onFlashCells(s,e)},columnHoverChanged:()=>{for(const e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(const e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const e=this.colModel.getCols();for(const t of e){const s=l=>{for(const c of this.getAllCellCtrls())c.column===t&&l(c)},n=()=>{s(l=>l.onLeftChanged())},i=()=>{s(l=>l.onWidthChanged())},o=()=>{s(l=>l.onFirstRightPinnedChanged())},r=()=>{s(l=>l.onLastLeftPinnedChanged())},a=()=>{s(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",n),t.__addEventListener("widthChanged",i),t.__addEventListener("firstRightPinnedChanged",o),t.__addEventListener("lastLeftPinnedChanged",r),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",n),t.__removeEventListener("widthChanged",i),t.__removeEventListener("firstRightPinnedChanged",o),t.__removeEventListener("lastLeftPinnedChanged",r),t.__removeEventListener("colDefChanged",a)})}}onDomLayoutChanged(){const e=At(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),s=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,s&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];for(const s of this.getAllRowCtrls()){const n=s.getCellCtrl(e,!0)?.eGui;n&&t.push(n)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,s){const{pinnedRowModel:n,beans:i,printLayout:o}=this,r=Object.fromEntries(e.map(l=>[l.rowNode.id,l]));n?.forEachPinnedRow(t,(l,c)=>{const d=e[c];d&&n.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in r&&s?(e[c]=r[l.id],delete r[l.id]):e[c]=new Fc(l,i,!1,!1,o)});const a=(t==="top"?n?.getPinnedTopRowCount():n?.getPinnedBottomRowCount())??0;e.length=a}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const s=n=>{const i=n[e.rowIndex];i&&i.rowNode===e&&(i.destroyFirstPass(),i.destroySecondPass(),n[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":s(this.topRowCtrls);break;case"bottom":s(this.bottomRowCtrls);break;default:s(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){const{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),e!=null){for(const n of e??[])this.redrawRow(n,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const s=!e.domLayoutChanged&&!!e.recycleRows,n=e.animate&&No(this.gos),i=s?this.getRowsToRecycle():null;s||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:o,gos:r}=this;if(o){o.checkStickyRows();const a=o.extraTopHeight+o.extraBottomHeight;a&&this.updateContainerHeights(a)}this.recycleRows(i,n),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?s:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,s=this.gos.get("suppressScrollOnNewData");t&&!s&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let s=this.pageBounds.getCurrentPageHeight();s===0&&(s=1),t.setModelHeight(s+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(js(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;const t=this.beans.focusSvc,s=this.findPositionToFocus(e);if(!s){t.focusHeaderPosition({headerPosition:{headerRowIndex:vs(this.beans)-1,column:e.column}});return}if(e.rowIndex!==s.rowIndex||e.rowPinned!=s.rowPinned){t.setFocusedCell({...s,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(Te(this.gos,{...s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:s}=this.beans;let n=e;for(n.rowPinned==null&&t&&s&&!t.isRowInPage(n.rowIndex)&&(n={rowPinned:null,rowIndex:s.getFirstRow()});n;){if(n.rowPinned==null&&s)if(n.rowIndex<s.getFirstRow()){if(n=wc(this.beans,{rowPinned:null,rowIndex:0}),!n)return null}else n.rowIndex>s.getLastRow()&&(n={rowPinned:null,rowIndex:s.getLastRow()});const i=this.getRowByPosition(n);if(i?.isAlive())return{...i.getRowPosition(),column:e.column};n=wc(this.beans,n)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),s=t.length;for(let n=0;n<s;n++){const i=t[n].getAllCellCtrls(),o=i.length;for(let r=0;r<o;r++)e.push(i[r])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),s=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...s,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,s){const n=this.rowCtrlsByRowIndex[t];n&&n.addEventListener(e,s)}refreshCells({rowNodes:e,columns:t,force:s,suppressFlash:n}={}){const i={force:s,newData:!1,suppressFlash:n};for(const o of this.getCellCtrls(e,t))o.refreshOrDestroyCell(i);this.refreshFullWidth(e)}refreshRows(e={}){for(const t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}getRowCtrlByNode(e){const t=e.rowIndex;if(t==null)return;const s=e.rowPinned;if(s==="top"){const i=this.topRowCtrls[t];return i?.rowNode===e?i:void 0}if(s==="bottom"){const i=this.bottomRowCtrls[t];return i?.rowNode===e?i:void 0}const n=this.rowCtrlsByRowIndex[t];return n?.rowNode===e?n:this.getStickyRowCtrlByNode(e)}getStickyRowCtrlByNode(e){const t=this.stickyRowFeature;if(t){for(const s of t.stickyTopRowCtrls)if(s.rowNode===e)return s;for(const s of t.stickyBottomRowCtrls)if(s.rowNode===e)return s}}refreshRowByNode(e){e&&this.getRowCtrlByNode(e)?.refreshRow()}refreshFullWidth(e){if(!e)return;let t=!1;for(const s of this.getRowCtrls(e)){if(!s.isFullWidth())continue;s.refreshFullWidth()||(t=!0,this.redrawRow(s.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=Oh(e),s=this.getAllRowCtrls();return!e||!t?s:s.filter(n=>{const i=n.rowNode;return Hh(i,t)})}getCellCtrls(e,t){let s;le(t)&&(s={},t.forEach(i=>{const o=this.colModel.getCol(i);le(o)&&(s[o.getId()]=!0)}));const n=[];for(const i of this.getRowCtrls(e))for(const o of i.getAllCellCtrls()){const r=o.column.getId();s&&!s[r]||n.push(o)}return n}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const s of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[s].rowNode.id==null&&e.push(s);this.removeRowCtrls(e);const t={};for(const s of Object.values(this.rowCtrlsByRowIndex)){const n=s.rowNode;t[n.id]=s}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(const s of e){const n=this.rowCtrlsByRowIndex[s];n&&(n.destroyFirstPass(t),n.destroySecondPass()),delete this.rowCtrlsByRowIndex[s]}}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:s}=this.beans,{afterScroll:n}=e;let i;const o=this.stickyRowFeature;o&&(i=t?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(o){l=o.checkStickyRows();const d=o.extraTopHeight+o.extraBottomHeight;d&&this.updateContainerHeights(d)}const c=this.firstRenderedRow!==r||this.lastRenderedRow!==a;if(!(n&&!l&&!c)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,n),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(n&&!l),i!=null)){const d=t?.getFocusCellToUseAfterRefresh();i!=null&&d==null&&(s?.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){const s={};for(const o of e)s[o]=!0;const i=Object.keys(this.rowCtrlsByRowIndex).filter(o=>!s[o]);this.removeRowCtrls(i,t)}calculateIndexesToDraw(e){const t=[];for(let r=this.firstRenderedRow;r<=this.lastRenderedRow;r++)t.push(r);const s=this.beans.pagination,n=this.beans.focusSvc?.getFocusedCell()?.rowIndex;n!=null&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&(!s||s.isRowInPage(n))&&n<this.rowModel.getRowCount()&&t.push(n);const i=r=>{const a=r.rowNode.rowIndex;a==null||a===n||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(r)&&t.push(a)};for(const r of Object.values(this.rowCtrlsByRowIndex))i(r);if(e)for(const r of Object.values(e))i(r);t.sort((r,a)=>r-a);const o=[];for(let r=0;r<t.length;r++){const a=t[r],l=this.rowModel.getRow(a);l&&!l.sticky&&o.push(a)}return o}recycleRows(e,t=!1,s=!1){const n=this.calculateIndexesToDraw(e);(this.printLayout||s)&&(t=!1),this.removeRowCompsNotToDraw(n,!t);for(const i of n)this.createOrUpdateRowCtrl(i,e,t,s);if(e){const{animationFrameSvc:i}=this.beans;i?.active&&s&&!this.printLayout?i.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:e})}onDisplayedColumnsChanged(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),s=e.isPinningRight();(this.pinningLeft!==t||s!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=s,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];for(const t of this.getFullWidthRowCtrls()){const s=t.rowNode.rowIndex;e.push(s.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Oh(e);return this.getAllRowCtrls().filter(s=>{if(!s.isFullWidth())return!1;const n=s.rowNode;return!(t!=null&&!Hh(n,t))})}createOrUpdateRowCtrl(e,t,s,n){let i,o=this.rowCtrlsByRowIndex[e];if(o||(i=this.rowModel.getRow(e),le(i)&&le(t)&&t[i.id]&&i.alreadyRendered&&(o=t[i.id],t[i.id]=null)),!o)if(i||(i=this.rowModel.getRow(e)),le(i))o=this.createRowCon(i,s,n);else return;i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=o}destroyRowCtrls(e,t){const s=[];if(e){for(const n of Object.values(e))if(n){if(this.cachedRowCtrls&&n.isCacheable()){this.cachedRowCtrls.addRow(n);continue}if(n.destroyFirstPass(!t),t){const i=n.instanceId;this.zombieRowCtrls[i]=n,s.push(()=>{n.destroySecondPass(),delete this.zombieRowCtrls[i]})}else n.destroySecondPass()}}t&&(s.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(const n of s)n()},OI))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=ki(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:s}=this;e.updateOffset();let n,i;if(!s.isRowsToRender())n=0,i=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),n=t.getFirstRow(),i=t.getLastRow();else{const d=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),p=this.gos.get("suppressRowVirtualisation");let f=!1,m,v;do{const S=t.getPixelOffset(),{pageFirstPixel:y,pageLastPixel:R}=t.getCurrentPagePixelRange(),E=e.divStretchOffset,F=u.getVScrollPosition(),P=F.top,k=F.bottom;p?(m=y+E,v=R+E):(m=Math.max(P+S-d,y)+E,v=Math.min(k+S+d,R)+E),this.firstVisibleVPixel=Math.max(P+S,y)+E,this.lastVisibleVPixel=Math.min(k+S,R)+E,f=this.ensureAllRowsInRangeHaveHeightsCalculated(m,v)}while(f);let C=s.getRowIndexAtPixel(m),w=s.getRowIndexAtPixel(v);const b=t.getFirstRow(),x=t.getLastRow();C<b&&(C=b),w>x&&(w=x),n=C,i=w}const o=At(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);o&&!r&&i-n>a&&(i=n+a);const l=n!==this.firstRenderedRow,c=i!==this.lastRenderedRow;(l||c)&&(this.firstRenderedRow=n,this.lastRenderedRow=i,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:n,lastRow:i}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,yn(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const s=this.pinnedRowModel?.ensureRowHeightsValid(),n=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:i,rowModel:o}=this,r=o.ensureRowHeightsValid(e,t,i.getFirstRow(),i.getLastRow());return(r||n)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),n||r||s?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const n=e.rowNode,i=this.focusSvc.isRowFocused(n.rowIndex,n.rowPinned),o=this.editSvc?.isEditing(e),r=n.detail;return i||o||r?!!this.isRowPresent(n):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,s){const n=this.cachedRowCtrls?.getRow(e)??null;if(n)return n;const i=s&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new Fc(e,this.beans,t,i,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(n=>n.rowNode),t=this.getStickyTopRowCtrls().map(n=>n.rowNode),s=this.getStickyBottomRowCtrls().map(n=>n.rowNode);return[...t,...e,...s]}getRowByPosition(e){let t;const{rowIndex:s}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[s];break;case"bottom":t=this.bottomRowCtrls[s];break;default:t=this.rowCtrlsByRowIndex[s],t||(t=this.getStickyTopRowCtrls().find(n=>n.rowNode.rowIndex===s)||null,t||(t=this.getStickyBottomRowCtrls().find(n=>n.rowNode.rowIndex===s)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const n=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!n}},BI=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e?.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,s=this.entriesMap[t];delete this.entriesMap[t],_s(this.entriesList,s)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],_s(this.entriesList,e)}getEntries(){return this.entriesList}};function Oh(e){if(!e)return;const t={top:{},bottom:{},normal:{}};for(const s of e){const n=s.id;switch(s.rowPinned){case"top":t.top[n]=s;break;case"bottom":t.bottom[n]=s;break;default:t.normal[n]=s;break}}return t}function Hh(e,t){const s=e.id;switch(e.rowPinned){case"top":return t.top[s]!=null;case"bottom":return t.bottom[s]!=null;default:return t.normal[s]!=null}}var GI=class extends _{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=gt(this.gos)?yc:VI,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));const e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=rn(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((s,n)=>this.compareRowNodes(t,s,n))}compareRowNodes(e,t,s){if(t===s)return 0;const n=this.accentedSort;for(let i=0,o=e.length;i<o;++i){const r=e[i],a=r.sort==="desc";let l=this.getValue(t,r.column),c=this.getValue(s,r.column),d;const u=this.getComparator(r,t);if(u?d=u(l,c,t,s,a):(r.type==="absolute"&&(l=qm(l),c=qm(c)),d=l3(l,c,n)),d)return r.sort==="asc"?d:-d}return 0}getComparator(e,t){const s=e.column.getColDef(),n=this.getComparatorFromColDef(s,e);if(n)return n;if(!s.showRowGroup)return;const i=!t.group&&s.field;if(!i)return;const o=this.beans.colModel.getColDefCol(i);if(o)return this.getComparatorFromColDef(o.getColDef(),e)}getComparatorFromColDef(e,t){const s=e.comparator;if(s!=null)return typeof s=="object"?s[gn(t.type)]:s}getValue(e,t){const s=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}const n=s.valueSvc.getValue(t,e,"data");if(t.isAllowFormula()){const i=s.formula;if(i?.isFormula(n))return i.resolveValue(t,e)}return n}getGroupDataValue(e,t){if(Fw(this.gos,this.pivotActive)){const n=this.firstLeaf(e);return n&&this.beans.valueSvc.getValue(t,n,"data")}const s=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return s?e.groupData?.[s.getId()]:void 0}},VI=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){const s=t[0];if(s.data)return s;t=s.childrenAfterGroup}},qm=e=>{if(!e)return e;if(typeof e=="bigint")return e<0n?-e:e;const t=Number(e);return isNaN(t)?e:Math.abs(t)};function jI(e){e.sortSvc?.onSortChanged("api")}var vi=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),zI={tag:"span",cls:"ag-sort-indicator-container",children:[vi("Order","order"),vi("Asc","ascending-icon"),vi("Desc","descending-icon"),vi("Mixed","mixed-icon"),vi("AbsoluteAsc","absolute-ascending-icon"),vi("AbsoluteDesc","absolute-descending-icon"),vi("None","none-icon")]},cg=class extends ft{constructor(e){super(),this.eSortOrder=xe,this.eSortAsc=xe,this.eSortDesc=xe,this.eSortMixed=xe,this.eSortNone=xe,this.eSortAbsoluteAsc=xe,this.eSortAbsoluteDesc=xe,e||this.setTemplate(zI)}attachCustomElements(e,t,s,n,i,o,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=s,this.eSortMixed=n,this.eSortNone=i,this.eSortAbsoluteAsc=o,this.eSortAbsoluteDesc=r}setupSort(e,t=!1,s){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=s,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);const n=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",n),this.addManagedEventListeners({newColumnsLoaded:n,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,s){if(t==null)return;const n=Qt(e,this.beans,s);n&&t.appendChild(n)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:s,eSortAbsoluteDesc:n,eSortNone:i,column:o,gos:r,beans:a}=this,l=NF(o,a,this.getSortDefOverride),c=l.isDefaultSortAllowed,d=l.isAbsoluteSortAllowed,{isAbsoluteSort:u,isDefaultSort:p,isAscending:f,isDescending:m,direction:v}=l;if(e&&st(e,f&&p&&c,{skipAriaHidden:!0}),t&&st(t,m&&p&&c,{skipAriaHidden:!0}),i){const C=!o.getColDef().unSortIcon&&!r.get("unSortIcon");st(i,!C&&!v,{skipAriaHidden:!0})}s&&st(s,f&&u&&d,{skipAriaHidden:!0}),n&&st(n,m&&u&&d,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:s}=this;this.addInIcon("sortUnSort",e,t);const n=t.getColDef().showRowGroup;rn(s)&&n&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:s}=this;if(e){const n=t.sortSvc.getDisplaySortForColumn(s)?.direction==="mixed";st(e,n,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:s}}=this;if(!e)return;const n=s.getColumnsWithSortingOrdered(),i=s.getDisplaySortIndexForColumn(t)??-1,o=n.some(a=>s.getDisplaySortIndexForColumn(a)??!1),r=i>=0&&o;st(e,r,{skipAriaHidden:!0}),i>=0?e.textContent=(i+1).toString():Jt(e)}refresh(){this.onSortChanged()}},WI={selector:"AG-SORT-INDICATOR",component:cg},_I=class extends _{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,s){const n=this.getNextSortDirection(e);this.setSortForColumn(e,n,t,s)}progressSortFromEvent(e,t){const n=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,n,"uiColumnSorted")}setSortForColumn(e,t,s,n){const{gos:i,showRowGroupCols:o}=this.beans,r=rn(i);let a=[e];if(r&&e.getColDef().showRowGroup){const u=o?.getSourceColumnsForGroupColumn?.(e)?.filter(p=>p.isSortable());u&&(a=[e,...u])}for(const d of a)this.setColSort(d,t,n);const l=(s||i.get("alwaysMultiSort"))&&!i.get("suppressMultiSort"),c=[];if(!l){const d=this.clearSortBarTheseColumns(a,n);c.push(...d)}this.updateSortIndex(e),c.push(...a),this.dispatchSortChangedEvents(n,c)}updateSortIndex(e){const{gos:t,colModel:s,showRowGroupCols:n}=this.beans,i=rn(t),o=n?.getShowRowGroupCol(e.getId()),r=i&&o||e,a=this.getColumnsWithSortingOrdered();s.forAllCols(d=>this.setColSortIndex(d,null));const l=a.filter(d=>i&&d.getColDef().showRowGroup?!1:d!==r);(r.getSortDef()?[...l,r]:l).forEach((d,u)=>this.setColSortIndex(d,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){const s={type:"sortChanged",source:e};t&&(s.columns=t),this.eventSvc.dispatchEvent(s)}clearSortBarTheseColumns(e,t){const s=[];return this.beans.colModel.forAllCols(n=>{e.includes(n)||(n.getSortDef()&&s.push(n),this.setColSort(n,void 0,t))}),s}getNextSortDirection(e,t){const s=e.getSortingOrder(),n=t===void 0?e.getSortDef():ws(t);let o=s.findIndex(r=>Ul(r,n))+1;return o>=s.length&&(o=0),ws(s[o])}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:s,rowGroupColsSvc:n}=this.beans;let i=[];if(t.forAllCols(c=>{c.getSortDef()&&i.push(c)}),t.isPivotMode()){const c=rn(e);i=i.filter(d=>{const u=!!d.getAggFunc(),p=!d.isPrimary(),f=c?s?.getShowRowGroupCol(d.getId()):d.getColDef().showRowGroup;return u||p||f})}const o=n?.columns.filter(c=>!!c.getSortDef())??[],r={};i.forEach((c,d)=>r[c.getId()]=d),i.sort((c,d)=>{const u=c.getSortIndex(),p=d.getSortIndex();if(u!=null&&p!=null)return u-p;if(u==null&&p==null){const f=r[c.getId()],m=r[d.getId()];return f>m?1:-1}else return p==null?-1:1});const a=rn(e)&&!!o.length;a&&(i=[...new Set(i.map(c=>s?.getShowRowGroupCol(c.getId())??c))]);const l=new Map;if(i.forEach((c,d)=>l.set(c,d)),a)for(const c of o){const d=s.getShowRowGroupCol(c.getId());l.set(c,l.get(d))}return l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){const t=[],s=this.getColumnsWithSortingOrdered();for(const n of s){const i=n.getSortDef()?.direction;if(!i)continue;const o=gn(n.getSortDef()?.type),r={sort:i,type:o};e?r.colId=n.getId():r.column=n,t.push(r)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){const t=rn(this.gos),s=!!e.getColDef().showRowGroup;return t&&s}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();const n=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,i=n[0].getSortDef();return n.every(r=>Ul(r.getSortDef(),i))?i:{type:gn(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){const s=()=>{const{type:n,direction:i}=ws(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc",i==="asc"),e.toggleCss("ag-header-cell-sorted-desc",i==="desc"),e.toggleCss("ag-header-cell-sorted-abs-asc",n==="absolute"&&i==="asc"),e.toggleCss("ag-header-cell-sorted-abs-desc",n==="absolute"&&i==="desc"),e.toggleCss("ag-header-cell-sorted-none",!i),t.getColDef().showRowGroup){const a=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(l=>i==l.getSortDef()?.direction);e.toggleCss("ag-header-cell-sorted-mixed",a)}};e.addManagedEventListeners({sortChanged:s,columnPinned:s,columnRowGroupChanged:s,displayedColumnsChanged:s})}initCol(e){const{sortIndex:t,initialSortIndex:s}=e.colDef,n=Aw(e.colDef);n&&e.setSortDef(n,!0),t!==void 0?t!==null&&(e.sortIndex=t):s!==null&&(e.sortIndex=s)}updateColSort(e,t,s){t!==void 0&&this.setColSort(e,ws(t),s)}setColSort(e,t,s){Ul(e.getSortDef(),t)||(e.setSortDef(ws(t),t===void 0),e.dispatchColEvent("sortChanged",s)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new cg(e)}getSortIndicatorSelector(){return WI}},d1={moduleName:"Sort",version:ie,beans:[_I,GI],apiFunctions:{onSortChanged:jI},userComponents:{agSortIndicator:cg},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},UI=class extends _{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:s}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),s.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),ji(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Go(e.source))}}};function $I(e){e.valueCache?.expire()}function qI(e,t){const{colKey:s,rowNode:n,useFormatter:i,from:o="edit"}=t,r=e.colModel.getColDefCol(s)??e.colModel.getCol(s);if(!r)return null;const a=e.valueSvc.getValueForDisplay({column:r,node:n,includeValueFormatted:i,from:o});return i?a.valueFormatted??nr(a.value):a.value}var KI="paste",YI=class extends _{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=Ys(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;const e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);const{rowRenderer:s}=this.beans;if(t)for(const n of t)Km(s,n);if(e){const n=e.getSortedRows();for(let i=0,o=n.length;i<o;++i)Km(s,n[i])}(this.batchedPath||this.batchedNodes)&&(this.deferredDepth=1,this.endDeferred())}onCellValueChanged(e){const{gos:t,rowModel:s,changedPathFactory:n}=this.beans;if(e.source===KI||t.get("suppressChangeDetection")||!s.rootNode)return;const i=e.node.primaryRow;if(this.csrm){let o=this.batchedPath;o||(o=n?.newPath(t.get("aggregateOnlyChangedColumns"))??null,this.batchedPath=o);let r=i;i.group||((this.batchedNodes??(this.batchedNodes=new Set)).add(i),r=i.parent),o?.addCell(r,e.column.getColId())}else(this.batchedNodes??(this.batchedNodes=new Set)).add(i);this.deferredDepth===0&&(this.deferredDepth=1,this.endDeferred())}},Km=(e,t)=>{const{sibling:s,pinnedSibling:n}=t;e.refreshRowByNode(t),e.refreshRowByNode(s),e.refreshRowByNode(n),e.refreshRowByNode(s?.pinnedSibling),e.refreshRowByNode(n?.sibling)},ZI=class extends _{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);Je(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(s){return Je(16,{expression:e,params:t,e:s}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const s=this.createFunctionBody(e),n=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",s);return t[e]=n,n}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},XI=class extends _{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const e=this.gos;this.active=e.get("valueCache"),this.neverExpires=e.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,s){if(this.active){const n=this.cacheVersion;e.__cacheVersion!==n&&(e.__cacheVersion=n,e.__cacheData={}),e.__cacheData[t]=s}}getValue(e,t){if(!(!this.active||e.__cacheVersion!==this.cacheVersion))return e.__cacheData[t]}},QI={moduleName:"ValueCache",version:ie,beans:[XI],apiFunctions:{expireValueCache:$I}},JI={moduleName:"Expression",version:ie,beans:[ZI]},eM={moduleName:"ChangeDetection",version:ie,beans:[YI]},tM={moduleName:"CellApi",version:ie,apiFunctions:{getCellValue:qI}},sM=class extends _{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){const{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=ir(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;const s=n=>this.callColumnCellValueChangedHandler(n);this.eventSvc.addListener("cellValueChanged",s,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",s,!0)),this.addManagedPropertyListener("treeData",n=>this.isTreeData=n.currentValue)}getValueForDisplay(e){const t=this.beans,s=e.column,n=e.node,i=t.showRowGroupColValueSvc,o=!s&&n.group,r=s?.colDef.showRowGroup,a=!this.isTreeData||n.footer;if(i&&a&&(o||r)){const p=i.getGroupValue(n,s,this.displayIgnoresAggData(n));return p==null?{value:null,valueFormatted:null}:{value:p.value,valueFormatted:e.includeValueFormatted?i.formatAndPrefixGroupColValue(p,s,e.exporting):null}}if(!s)return{value:n.key,valueFormatted:null};let l=this.getValue(s,n,e.from,this.displayIgnoresAggData(n)),c=l;const d=t.formula;s.isAllowFormula()&&d?.isFormula(l)&&(e.useRawFormula?(l=d.normaliseFormula(l,!0),c=d.resolveValue(s,n)):(l=d.resolveValue(s,n),c=l));const u=e.includeValueFormatted&&!(e.exporting&&s.colDef.useValueFormatterForExport===!1);return{value:l,valueFormatted:u?this.formatValue(s,n,c):null}}getValue(e,t,s,n=!1){if(this.initialised||this.init(),!t)return;const i=e.colDef,o=t.group;if(!o){const l=i.pivotValueColumn;l&&(e=l)}const r=this.editSvc?.getPendingEditValue(t,e,s);if(r!==void 0)return r;let a=this.resolveValue(e,t,n,o);if(a===void 0){if(o){const l=i.showRowGroup;if(typeof l=="string"){const c=this.rowGroupColsSvc?.getColumnIndex(l);if(c!=null&&c>t.level)return null}}return}if(this.cellExpressions&&Wf(a)){const l=a.substring(1);a=this.executeValueGetter(l,t.data,e,t)}return a}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get("groupSuppressBlankHeader")||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,s,n){const i=e.colDef,o=e.colId,r=!n&&this.formulaDataSvc;if(r&&r.hasDataSource()&&i.allowFormula===!0){const b=r.getFormula({column:e,rowNode:t});if(Wf(b))return b}const a=n&&!s?t.aggData:void 0,l=this.isTreeData;if(l&&a?.[o]!==void 0)return a[o];const c=t.data,d=i.field,u=i.valueGetter;if(l){if(u)return this.executeValueGetter(u,c,e,t);if(d&&c)return Xr(c,d,e.isFieldContainsDots())}const p=t.groupData;if(p&&o in p)return p[o];if(a?.[o]!==void 0)return a[o];const f=i.showRowGroup,m=typeof f!="string"||!n,v=this.isSsrm,C=v&&s&&!!i.aggFunc;if(u&&!C)return m?this.executeValueGetter(u,c,e,t):void 0;if(v&&t.footer&&t.field&&(f===!0||f===t.field))return Xr(c,t.field,e.isFieldContainsDots());if(d&&c&&!C)return m?Xr(c,d,e.isFieldContainsDots()):void 0}parseValue(e,t,s,n){const i=e.getColDef();if(i.allowFormula&&this.beans.formula?.isFormula(s))return s;const o=i.valueParser;if(le(o)){const r=Te(this.gos,{node:t,data:t?.data,oldValue:n,newValue:s,colDef:i,column:e});return typeof o=="function"?o(r):this.expressionSvc?.evaluate(o,r)}return s}getDeleteValue(e,t){return le(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,s,n,i=!0){const{expressionSvc:o}=this.beans;let r=null,a;const l=e.getColDef();if(n?a=n:i&&(a=l.valueFormatter),a){const c=t?t.data:null,d=Te(this.gos,{value:s,node:t,data:c,colDef:l,column:e});typeof a=="function"?r=a(d):r=o?o.evaluate(a,d):null}else if(l.refData)return l.refData[s]||"";return r==null&&Array.isArray(s)&&(r=s.join(", ")),r}setValue(e,t,s,n){const i=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,i)&&(e.data={}),!this.isSetValueSupported(t,e,s,i))return!1;const o=this.getValue(t,e,"data"),r=Te(this.gos,{node:e,data:e.data,oldValue:o,newValue:s,colDef:i,column:t});let a=!1;if(e.data){const c=this.handleExternalFormulaChange({column:t,eventSource:n,newValue:s,setterParams:r,rowNode:e});if(c!==null)return c;a=this.computeValueChange({column:t,rowNode:e,newValue:s,params:r,rowData:e.data,valueSetter:i.valueSetter,field:i.field})??!0}const l=this.beans.changeDetectionSvc;l?.beginDeferred();try{if(e.group){const c=this.beans.rowGroupingEditValueSvc?.setGroupDataValue(e,t,s,o,n,a||s!==o);if(c!==void 0)return!a&&!c?!1:this.finishValueChange(e,t,r,n,s)}return a?this.finishValueChange(e,t,r,n):!1}finally{l?.endDeferred()}}canCreateRowNodeData(e,t){return e.group?!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn):!0}finishValueChange(e,t,s,n,i){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const o=i===void 0?this.getValue(t,e,"data"):i;return this.dispatchCellValueChangedEvent(e,s,o,n),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,s,o,n),!0}isSetValueSupported(e,t,s,n){const{field:i,valueSetter:o}=n,r=this.beans.formula,a=e.isAllowFormula()&&r?.isFormula(s),l=!!this.formulaDataSvc?.hasDataSource();return ht(i)&&ht(o)&&!(l&&a)?t.group&&(n.groupRowValueSetter||n.groupRowEditable)?!0:(X(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,s)?(X(135),!1):!0}handleExternalFormulaChange(e){const{column:t,rowNode:s,newValue:n,eventSource:i,setterParams:o}=e,r=this.beans.formula,a=this.formulaDataSvc;if(!a?.hasDataSource()||!t.isAllowFormula())return null;const l=r?.isFormula(n),c=a.getFormula({column:t,rowNode:s});if(l){if(!(c!==n))return!1;a.setFormula({column:t,rowNode:s,formula:n});const u=r?.resolveValue(t,s),p=t.getColDef();if(le(p.valueSetter)||!ht(p.field)){const f={...o,newValue:u};this.computeValueChange({column:t,rowNode:s,newValue:u,params:f,rowData:s.data,valueSetter:p.valueSetter,field:p.field})}return this.finishValueChange(s,t,o,i)}return c!==void 0&&a.setFormula({column:t,rowNode:s,formula:void 0}),null}computeValueChange(e){const{valueSetter:t,params:s,rowData:n,field:i,column:o,newValue:r}=e;return le(t)?typeof t=="function"?t(s):this.expressionSvc?.evaluate(t,s):!!n&&this.setValueUsingField(n,i,r,o.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,s,n){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:s,newRawValue:t.newValue,value:s,source:n})}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,s,n){if(!t)return!1;let i=!1;if(!n)i=e[t]===s,i||(e[t]=s);else{const o=t.split(".");let r=e;for(;o.length>0&&r;){const a=o.shift();o.length===0?(i=r[a]===s,i||(r[a]=s)):r=r[a]}}return!i}executeValueGetterWithValueCache(e,t,s,n){const i=s.getColId(),o=this.valueCache.getValue(n,i);if(o!==void 0)return o;const r=this.executeValueGetterWithoutValueCache(e,t,s,n);return this.valueCache.setValue(n,i,r),r}executeValueGetterWithoutValueCache(e,t,s,n){const i=Te(this.gos,{data:t,node:n,column:s,colDef:s.getColDef(),getValue:r=>this.getValueCallback(n,r)});let o;return typeof e=="function"?o=e(i):o=this.expressionSvc?.evaluate(e,i),o}getValueCallback(e,t){const s=this.colModel.getColDefCol(t);return s?this.getValue(s,e,"data"):null}getKeyForNode(e,t){const s=this.getValue(e,t,"data"),n=e.getColDef().keyCreator;let i=s;if(n){const o=Te(this.gos,{value:s,colDef:e.getColDef(),column:e,node:t,data:t.data});i=n(o)}return typeof i=="string"||i==null||(i=String(i),i==="[object Object]"&&X(121)),i}},nM={moduleName:"CommunityCore",version:ie,beans:[HT,x5,i6,aE,NI,ZP,IT,ik,n4,oI,iI,HI,sM,NT,TT,OT,r6,UI,X4,Q4,mk],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:mb,destroy:y5,isDestroyed:S5,getGridOption:R5,setGridOption:F5,updateGridOptions:vb,isModuleRegistered:E5},dependsOn:[Y4,EP,NP,d1,hk,QP,pk,LI,eM,fk,nI,cI,hI,wk,t6,Z4,JI,p4,fI]};function Bh(e){const{inputValue:t,allSuggestions:s,hideIrrelevant:n,filterByPercentageOfBestMatch:i}=e;let o=(s??[]).map((l,c)=>({value:l,relevance:iM(t,l),idx:c}));if(o.sort((l,c)=>l.relevance-c.relevance),n&&(o=o.filter(l=>l.relevance<Math.max(l.value.length,t.length))),o.length>0&&i&&i>0){const c=o[0].relevance*i;o=o.filter(d=>c-d.relevance<0)}const r=[],a=[];for(const l of o)r.push(l.value),a.push(l.idx);return{values:r,indices:a}}function iM(e,t){const s=e.length,n=t.length;if(n===0)return s||0;let i=e.toLocaleLowerCase(),o=t.toLocaleLowerCase(),r;e.length<t.length&&(r=o,o=i,i=r,r=t,t=e,e=r);let a=new Uint16Array(n+1),l=new Uint16Array(n+1);for(let u=0;u<=n;u++)a[u]=u;let c=0;const d=s/2-10;for(let u=1;u<=s;u++){const p=e[u-1],f=i[u-1];l[0]=u;for(let m=1;m<=n;m++){const v=t[m-1],C=o[m-1];if(f!==C){const w=l[m-1],b=a[m],x=a[m-1];let S=w<b?w:b;x<S&&(S=x),l[m]=S+1|0;continue}if(c++,p===v&&c++,u>1&&m>1){const w=e[u-2],b=i[u-2],x=t[m-2],S=o[m-2];b===S&&(c++,w===x&&c++)}u<d&&c++,l[m]=a[m-1]}r=a,a=l,l=r}return a[n]/(c+1)}var u1={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1,Formula:1},Gu=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],oM={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Gu,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Gu,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Gu,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},rM={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function aM(e,t){const s=[];for(const n of Array.isArray(e)?e:[e]){const i=oM[n];if(i)for(const o of i){const r=rM[o];(!r||r===t)&&s.push(o)}else s.push(n)}return s}var h1=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
|
|
26
|
+
|
|
27
|
+
import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
|
|
28
|
+
|
|
29
|
+
ModuleRegistry.registerModules([ AllCommunityModule ]);
|
|
30
|
+
`,lM=e=>{const t=e.map(n=>`import { ${Qr(n)} } from '${u1[n]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(n=>n==="IntegratedCharts"||n==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
|
|
31
|
+
${t.join(`
|
|
32
|
+
`)}
|
|
33
|
+
|
|
34
|
+
ModuleRegistry.registerModules([ ${e.map(n=>Qr(n,!0)).join(", ")} ]);
|
|
35
|
+
|
|
36
|
+
For more info see: ${Lo}/modules/`};function Qr(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function cM(e,t){const s=t.filter(o=>o==="IntegratedCharts"||o==="Sparklines");let n="";return!globalThis?.agCharts&&s.length>0?n=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
|
|
37
|
+
`:t.some(o=>u1[o])&&(n=n+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
|
|
38
|
+
`),n}function p1({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var Ym=({reasonOrId:e,moduleName:t,gridScoped:s,gridId:n,rowModelType:i,additionalText:o,isUmd:r})=>{const a=aM(t,i),l=typeof e=="string"?e:pM[e];if(r)return cM(l,a);const c=a.filter(p=>p==="IntegratedCharts"||p==="Sparklines"),d=c.length>0?`${c.map(p=>Qr(p)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(p=>Qr(p)).join(", "):Qr(a[0])} is not registered${s?" for gridId: "+n:""}. ${d} Check if you have registered the module:
|
|
39
|
+
`}
|
|
40
|
+
${lM(a)}`+(o?`
|
|
41
|
+
|
|
42
|
+
${o}`:"")},Zm=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
|
|
43
|
+
|
|
44
|
+
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
45
|
+
import { ModuleRegistry } from 'ag-grid-community';
|
|
46
|
+
import { ${e} } from 'ag-grid-enterprise';
|
|
47
|
+
|
|
48
|
+
ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
|
|
49
|
+
`,dM=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,uM={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>["Could not find data item as object was not found.",e," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:e})=>["column ",e," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>["value should be either a string or a function",e],16:({expression:e,params:t,e:s})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",s],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>`You may want to configure via a callback to avoid setup race conditions:
|
|
50
|
+
"alignedGrids: () => [linkedGrid]"`,21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:e})=>["The getRowId callback must return a string. The ID ",e," is being cast to a string."],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed.
|
|
51
|
+
Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
|
|
52
|
+
To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:e})=>["tried to insert columns in invalid location, toIndex = ",e,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t:e})=>"colDef.type '"+e+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e,method:t})=>`${e}
|
|
53
|
+
${dM(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e,inferred:t,colId:s})=>{const n=t?" (inferred)":"",i=s?` for column "${s}"`:"";return`Cell data type is "object"${n} but no Value ${e} has been provided${i}. Please either provide an object data type definition with a Value ${e}, or set:
|
|
54
|
+
- "colDef.value${e}"${t&&e==="Parser"?`
|
|
55
|
+
- "colDef.cellDataType = 'object'"`:""}`},49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:s,pageSizeOptions:n})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${s?"":" the default"} paginationPageSizeSelector=[${n?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:s,jsComps:n})=>{const i=[],o=[...Object.keys(s??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(n??[]).filter(a=>!!n[a])],r=Bh({inputValue:t,allSuggestions:o,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return i.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
|
|
56
|
+
`),r.length>0&&i.push(` Did you mean: [${r.slice(0,3)}]?
|
|
57
|
+
`),i.push("If using a custom component check it has been registered correctly."),i},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>["chart rendering failed",e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${Lo}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{const s=Bh({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,s.length>0?` Did you mean: [${s.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join(`
|
|
58
|
+
`)},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
|
|
59
|
+
Please turn off ${e} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:e})=>["unable to find groups for these supplied groupIds:",e],167:({unrecognisedColIds:e})=>["unable to find columns for these supplied colIds:",e],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:e})=>`column ${e} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:e,childNodeData:t})=>["duplicate group keys for row data, keys should be unique",[e,t]],185:({data:e})=>["getDataPath() should not return an empty path",[e]],186:({rowId:e,rowData:t,duplicateRowsData:s})=>["duplicate group keys for row data, keys should be unique",e,t,...s??[]],187:({rowId:e,firstData:t,secondData:s})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",t,"second instance",s],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"selection"} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Ym,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${Lo}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
|
|
60
|
+
Please rebuild the selection state and reapply it.`,248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows.
|
|
61
|
+
Your code probably called a grid API method while the grid was in the render stage.
|
|
62
|
+
To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
|
|
63
|
+
To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Zm("IntegratedChartsModule"),258:()=>Zm("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:s,gridId:n,rowModelType:i})=>Ym({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:jo[t],gridId:n,gridScoped:s,rowModelType:i}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${Lo}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>h1(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case"maxComponentCreationTimeMs":t+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":t+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":t+=" For multiple versions AgGridReact does not support children.";break}return t},275:p1,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>"Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates."};function hM(e,t){const s=uM[e];if(!s)return[`Missing error text for error id ${e}!`];const n=s(t),o=`
|
|
64
|
+
See ${ww(e,t)}`;return Array.isArray(n)?n.concat(o):[n,o]}var pM={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},g1=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${lw}/${this.frameworkName}-data-grid`,aF(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},Xm=new WeakMap,Qm=new WeakMap,gM=1,fM=class{create(e,t,s,n,i,o){const r=Ip.applyGlobalGridOptions(t),a=r.gridId??String(gM++),l=this.getRegisteredModules(i,a,r.rowModelType),c=this.createBeansList(r.rowModelType,l,a),d=this.createProvidedBeans(e,r,i);if(!c)return;const p={providedBeanInstances:d,beanClasses:c,id:a,beanInitComparator:pD,beanDestroyComparator:gD,derivedBeans:[uD],destroyCallback:()=>{Qm.delete(m),Xm.delete(e),tF(a),o?.()}},f=new dD(p);this.registerModuleFeatures(f,l),s(f),f.getBean("syncSvc").start(),n?.(f);const m=f.getBean("gridApi");return Xm.set(e,m),Qm.set(m,e),m}getRegisteredModules(e,t,s){return ga(nM,void 0,!0),e?.modules?.forEach(n=>ga(n,t)),sF(t,Jm(s))}registerModuleFeatures(e,t){const s=e.getBean("registry"),n=e.getBean("apiFunctionSvc");for(const i of t){s.registerModule(i);const o=i.apiFunctions;if(o){const r=Object.keys(o);for(const a of r)n?.addFunction(a,o[a])}}}createProvidedBeans(e,t,s){let n=s?s.frameworkOverrides:null;ht(n)&&(n=new g1);const i={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:s?s.globalListener:null,globalSyncListener:s?s.globalSyncListener:null,frameworkOverrides:n,withinStudio:s?.withinStudio};return s?.providedBeanInstances&&Object.assign(i,s.providedBeanInstances),i}createBeansList(e,t,s){const n={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},i=Jm(e),o=n[i];if(!o){Br(201,{rowModelType:i},`Unknown rowModelType ${i}.`);return}if(!oF()){Br(272,void 0,h1());return}if(!e){const a=Object.entries(n).filter(([l,c])=>mh(c,s,l));if(a.length==1){const[l,c]=a[0];if(l!==i){const d={moduleName:c,rowModelType:l};Br(275,d,p1(d));return}}}if(!mh(o,s,i)){const a=pw(),l=`rowModelType = '${i}'`,c=`Missing module ${o}Module for rowModelType ${i}.`;Br(200,{reasonOrId:l,moduleName:o,gridScoped:Mp(),gridId:s,rowModelType:i,isUmd:a},c);return}const r=new Set;for(const a of t)for(const l of a.beans??[])r.add(l);return Array.from(r)}};function Jm(e){return e??"clientSide"}function mM(e,t=!1){const s=[],n=[],i=[],o=[],r=[],a=[],l=[],c=[],d=[];let u=0;for(let p=0;p<e.length;p++){const{colId:f,sort:m,sortType:v,sortIndex:C,rowGroup:w,rowGroupIndex:b,aggFunc:x,pivot:S,pivotIndex:y,pinned:R,hide:E,width:F,flex:P}=e[p];d.push(f),m&&(s[C??u++]={colId:f,sort:m,type:v}),w&&(n[b??0]=f),typeof x=="string"&&i.push({colId:f,aggFunc:x}),S&&(o[y??0]=f),R&&(R==="right"?a:r).push(f),E&&l.push(f),(P!=null||F)&&c.push({colId:f,flex:P??void 0,width:F===null?void 0:F})}return{sort:s.length?{sortModel:Vu(s)}:void 0,rowGroup:n.length?{groupColIds:Vu(n)}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:o.length||t?{pivotMode:t,pivotColIds:Vu(o)}:void 0,columnPinning:r.length||a.length?{leftColIds:r,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:c.length?{columnSizingModel:c}:void 0,columnOrder:d.length?{orderedColIds:d}:void 0}}function Vu(e){return e.filter(t=>t!=null)}function vM(e){const t=[];for(const{groupId:s,open:n}of e)n&&t.push(s);return t.length?{openColumnGroupIds:t}:void 0}var CM=class extends _{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[];const t=typeof e=="function";return typeof e=="function"&&(e=e()),e.map(n=>{if(!n){Je(18),t||Je(20);return}if(this.isGridApi(n))return n;const i=n;return"current"in i?i.current?.api:(i.api||Je(19),i.api)}).filter(n=>!!n&&!n.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){const e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(e){if(!this.consuming)for(const t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){e.direction==="horizontal"&&this.fireEvent({type:"alignedGridScroll",event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){const s=[];return e.columns?e.columns.forEach(n=>{s.push(t(n))}):e.column&&s.push(t(e.column)),s}getMasterColumns(e){return this.extractDataFromEvent(e,t=>t)}getColumnIds(e){return this.extractDataFromEvent(e,t=>t.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":{this.processColumnEvent(e);break}case"columnGroupOpened":{this.processGroupOpenedEvent(e);break}case"columnPivotChanged":X(21);break}})}processGroupOpenedEvent(e){const{colGroupSvc:t}=this.beans;if(t)for(const s of e.columnGroups){let n=null;s&&(n=t.getProvidedColGroup(s.getGroupId())),!(s&&!n)&&t.setColumnGroupOpened(n,s.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){const t=e.column;let s=null;const n=this.beans,{colResize:i,ctrlsSvc:o,colModel:r}=n;if(t&&(s=r.getColDefCol(t.getColId())),t&&!s)return;const a=this.getMasterColumns(e);switch(e.type){case"columnMoved":{const u=e.api.getColumnState().map(p=>({colId:p.colId}));Ps(n,{state:u,applyOrder:!0},"alignedGridChanged")}break;case"columnVisible":{const u=e.api.getColumnState().map(p=>({colId:p.colId,hide:p.hide}));Ps(n,{state:u},"alignedGridChanged")}break;case"columnPinned":{const u=e.api.getColumnState().map(p=>({colId:p.colId,pinned:p.pinned}));Ps(n,{state:u},"alignedGridChanged")}break;case"columnResized":{const d=e,u={};for(const p of a)u[p.getId()]={key:p.getColId(),newWidth:p.getActualWidth()};for(const p of d.flexColumns??[])u[p.getId()]&&delete u[p.getId()];i?.setColumnWidths(Object.values(u),!1,d.finished,"alignedGridChanged");break}}const c=o.getGridBodyCtrl().isVerticalScrollShowing();for(const d of this.getAlignedGridApis())d.setGridOption("alwaysShowVerticalScroll",c)}},wM={moduleName:"AlignedGrids",version:ie,beans:[CM],dependsOn:[Ab]};function bM(e,t={}){const s=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(s))}function f1(e,t,s,n,i){t&&(n&&t.parent&&t.parent.level!==-1&&f1(e,t.parent,s,n,i),t.setExpanded(s,void 0,i))}function xM(e,t){return e.rowModel.getRowNode(t)}function yM(e,t,s,n){e.rowRenderer.addRenderedRowListener(t,s,n)}function SM(e){return e.rowRenderer.getRenderedNodes()}function RM(e,t,s){e.rowModel.forEachNode(t,s)}function FM(e){return e.rowRenderer.firstRenderedRow}function EM(e){return e.rowRenderer.lastRenderedRow}function DM(e,t){return e.rowModel.getRow(t)}function PM(e){return e.rowModel.getRowCount()}function TM(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function kM(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function m1(e,t,s="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,s),"ensureVisible")}function v1(e,t,s){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,s),"ensureVisible")}function IM(e,t,s=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,s),"ensureVisible")}var MM={moduleName:"RowApi",version:ie,apiFunctions:{redrawRows:bM,setRowNodeExpanded:f1,getRowNode:xM,addRenderedRowListener:yM,getRenderedNodes:SM,forEachNode:RM,getFirstDisplayedRowIndex:FM,getLastDisplayedRowIndex:EM,getDisplayedRowAtIndex:DM,getDisplayedRowCount:PM}},AM={moduleName:"ScrollApi",version:ie,apiFunctions:{getVerticalPixelRange:TM,getHorizontalPixelRange:kM,ensureColumnVisible:m1,ensureIndexVisible:v1,ensureNodeVisible:IM}};function LM(e){e.expansionSvc?.expandAll(!0)}function NM(e){e.expansionSvc?.expandAll(!1)}function C1(e){e.rowModel?.onRowHeightChanged()}function w1(e){if(e.rowAutoHeight?.active){X(3);return}e.rowModel?.resetRowHeights()}function OM(e){e.expansionSvc?.resetExpansion()}function HM(e,t,s){const n=KE(e);if(n){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){Je(238);return}n.setRowCount(t,s);return}Je(28);return}sd(e)?.setRowCount(t,s)}function BM(e){return ir(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function GM(e){return e.rowModel.isLastRowIndexKnown()}var VM={moduleName:"CsrmSsrmSharedApi",version:ie,apiFunctions:{expandAll:LM,collapseAll:NM,resetRowGroupExpansion:OM}},jM={moduleName:"RowModelSharedApi",version:ie,apiFunctions:{onRowHeightChanged:C1,resetRowHeights:w1}},zM={moduleName:"SsrmInfiniteSharedApi",version:ie,apiFunctions:{setRowCount:HM,getCacheBlockState:BM,isLastRowIndexKnown:GM}},b1=(e,t)=>{for(let s=0,n=e.length;s<n;++s){const i=e[s],o=i.childrenAfterGroup;o!==null&&(b1(o,t),t(i))}},Ki=(e,t,s,n)=>{if(s!=null){const o=s.getSortedRows();for(let r=0,a=o.length;r<a;++r){const l=o[r];l.childrenAfterGroup!==null&&!l.destroyed&&n(l)}return}if(e==null)return;const i=e.childrenAfterGroup;i!==null&&(t&&b1(i,n),n(e))},WM=class extends _{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},ev(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();const t=ev(this.rootNode),s=new Array(e.length);t._leafs=s;let n=0;const i=this.beans.groupStage?.getNestedDataGetter(),o=i?new Set:null,r=(a,l)=>{const c=a.level+1;for(let d=0,u=l.length;d<u;++d){const p=l[d];if(!p)continue;const f=this.createRowNode(p,c,n);if(s[n++]=f,o&&!o.has(p)){o.add(p),f.treeParent=a;const m=i(p);m&&r(f,m)}}};r(t,e),s.length=n}destroyAllNodes(){const{selectionSvc:e,pinnedRowModel:t,groupStage:s}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),s?.clearNonLeafs();const n=this.rootNode._leafs;if(n)for(let i=0,o=n.length;i<o;++i)n[i]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){const{rootNode:s,gos:n}=this;this.dispatchRowDataUpdateStarted(t);const i=qo(n),o=e.changedRowNodes,{adds:r,updates:a}=o,l=new Set,c=[],d=this.beans.groupStage?.getNestedDataGetter();let u=n.get("suppressMaintainUnsortedOrder")?void 0:!1,p=-1,f=!1;const m=(w,b)=>{if(!u&&u!==void 0){const x=w.sourceRowIndex;u=x<=p,p=x}w.data!==b&&(w.updateData(b),r.has(w)||a.add(w),!w.selectable&&w.isSelected()&&c.push(w))},v=(w,b,x)=>{for(let S=0,y=b.length;S<y;++S){const R=b[S];if(!R)continue;let E=this.getRowNode(i({data:R,level:x}));if(E?(m(E,R),f||(f=!!d&&E.treeParent!==w)):(E=this.createRowNode(R,x),r.add(E)),!d||l.has(E)){l.add(E);continue}l.add(E),E.treeParent=w;const F=d(R);F&&v(E,F,x+1)}};v(s,t,0);const C=this.deleteUnusedNodes(l,o,c,!!e.animate)||u||r.size>0;if(C){const w=s._leafs??(s._leafs=[]);u===void 0?KM(w,l,o):qM(w,l)&&(o.reordered=!0)}(C||f||a.size)&&(e.rowDataUpdated=!0,this.deselect(c))}deleteUnusedNodes(e,{removals:t},s,n){const i=this.rootNode._leafs;for(let o=0,r=i.length;o<r;o++){const a=i[o];e.has(a)||this.destroyNode(a,n)&&(t.push(a),a.isSelected()&&s.push(a))}return t.length>0}updateRowData(e,t,s){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return X(268),{remove:[],update:[],add:[]};const n=[],i=qo(this.gos),o=this.executeRemove(i,e,t,n,s),r=this.executeUpdate(i,e,t,n),a=this.executeAdd(e,t);return this.deselect(n),{remove:o,update:r,add:a}}executeRemove(e,{remove:t},{adds:s,updates:n,removals:i},o,r){const a=this.rootNode._leafs,l=a?.length,c=t?.length;if(!c||!l)return[];let d=0,u=l,p=0;const f=new Array(c);for(let m=0;m<c;++m){const v=this.lookupNode(e,t[m]);if(!v)continue;const C=v.sourceRowIndex;C<u&&(u=C),C>p&&(p=C),f[d++]=v,this.destroyNode(v,r)&&(v.isSelected()&&o.push(v),s.delete(v)||(n.delete(v),i.push(v)))}return f.length=d,d&&$M(a,u,p),f}executeUpdate(e,{update:t},{adds:s,updates:n},i){const o=t?.length;if(!o)return[];const r=new Array(o);let a=0;for(let l=0;l<o;l++){const c=t[l],d=this.lookupNode(e,c);d&&(d.updateData(c),!d.selectable&&d.isSelected()&&i.push(d),r[a++]=d,s.has(d)||n.add(d))}return r.length=a,r}executeAdd(e,t){var s;const n=(s=this.rootNode)._leafs??(s._leafs=[]),i=n.length,o=e.add,r=o?.length;if(!r)return[];const a=i+r;let l=this.sanitizeAddIndex(n,e.addIndex);if(l<i){for(let u=i-1,p=a-1;u>=l;--u){const f=n[u];f.sourceRowIndex=p,n[p--]=f}t.reordered=!0}n.length=a;const c=new Array(r),d=t.adds;for(let u=0;u<r;u++){const p=this.createRowNode(o[u],0,l);d.add(p),n[l]=p,c[u]=p,l++}return c}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){const t="rowDataChanged",s=this.beans.selectionSvc;e.length&&s?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),s?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:s?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,s){const n=new Xn(this.beans);n.parent=this.rootNode,n.level=t,n.group=!1,s!=null&&(n.sourceRowIndex=s),n.setDataAndId(e,String(this.nextId++));const i=n.id,o=this.allNodesMap;return o[i]&&X(2,{nodeId:i}),o[i]=n,n}destroyNode(e,t){if(!e._destroy(t))return!1;const s=e.id,n=this.allNodesMap;return n[s]===e&&delete n[s],!0}lookupNode(e,t){if(!e)return UM(this.rootNode._leafs,t);const s=e({data:t,level:0}),n=this.allNodesMap[s];return n||(Je(4,{id:s}),null)}sanitizeAddIndex(e,t){const s=e.length;if(typeof t!="number"||t<0||t>=s||Number.isNaN(t))return s;t=Math.ceil(t);const n=this.gos;return t>0&&n.get("treeData")&&n.get("getDataPath")&&(t=_M(e,t)),t}},_M=(e,t)=>{for(let s=0,n=e.length;s<n;s++)if(e[s]?.rowIndex==t-1)return s+1;return t},ev=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);const t=[],s=[],n=[],i=[];e.childrenAfterGroup=t,e.childrenAfterSort=s,e.childrenAfterAggFilter=n,e.childrenAfterFilter=i;const o=e.sibling;return o&&(o.childrenAfterGroup=t,o.childrenAfterSort=s,o.childrenAfterAggFilter=n,o.childrenAfterFilter=i,o.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},UM=(e,t)=>{if(e)for(let s=0,n=e.length;s<n;s++){const i=e[s];if(i.data===t)return i}return Je(5,{data:t}),null},$M=(e,t,s)=>{t=Math.max(0,t);for(let n=t,i=e.length;n<i;++n){const o=e[n];n<=s&&o.destroyed||(o.sourceRowIndex=t,e[t++]=o)}e.length=t},qM=(e,t)=>{const s=t.size;e.length=s;let n=0,i=!1,o=!1;for(const r of t){const a=r.sourceRowIndex;a===n?o||(o=i):(a>=0?o=!0:i=!0,r.sourceRowIndex=n,e[n]=r),++n}return o},KM=(e,t,{adds:s})=>{const n=e.length,i=t.size;i>n&&(e.length=i);let o=0;for(let r=0;r<n;++r){const a=e[r];a.destroyed||(o!==r&&(a.sourceRowIndex=o,e[o]=a),++o)}for(const r of s)r.sourceRowIndex<0&&(r.sourceRowIndex=o,e[o++]=r);e.length=o};function Gh(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var YM=class extends _{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){const s=(n,i)=>{n.hasChildren()&&e&&!i?n.childrenAfterFilter=n.childrenAfterGroup.filter(o=>{const r=o.childrenAfterFilter&&o.childrenAfterFilter.length>0,a=o.data&&this.filterManager.doesRowPassFilter({rowNode:o});return r||a}):n.childrenAfterFilter=n.childrenAfterGroup,Gh(n)};if(this.doingTreeDataFiltering()){const n=(i,o)=>{if(i.childrenAfterGroup)for(let r=0;r<i.childrenAfterGroup.length;r++){const a=i.childrenAfterGroup[r],l=o||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?n(i.childrenAfterGroup[r],l):s(a,l)}s(i,o)};n(this.beans.rowModel.rootNode,!1)}else{const n=i=>s(i,!1);Ki(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,n)}}softFilter(e,t){const s=i=>{if(i.childrenAfterFilter=i.childrenAfterGroup,i.hasChildren())for(const o of i.childrenAfterGroup)o.softFiltered=e&&!(o.data&&this.filterManager.doesRowPassFilter({rowNode:o}));Gh(i)},n=this.beans.rowModel;Ki(n.rootNode,n.hierarchical,t,s)}doingTreeDataFiltering(){const{gos:e}=this;return!!this.beans.groupStage?.treeData&&!e.get("excludeChildrenWhenTreeDataFiltering")}},ZM=4,XM=(e,t,s,n,i)=>{const o=t.childrenAfterSort,r=t.childrenAfterAggFilter;if(!r)return o&&o.length>0?o:[];const a=r.length;if(a<=1)return o?.length===a&&(a===0||o[0]===r[0])?o:r.slice();if(!o||a<=ZM)return e.doFullSortInPlace(r.slice(),i);const l=new Map,{updates:c,adds:d}=s,u=[];for(let f=0;f<a;++f){const m=r[f];c.has(m)||d.has(m)||n?.hasRow(m)?(l.set(m,~f),u.push(m)):l.set(m,f)}const p=u.length;return p===0?a===o.length?o:JM(o,l,u):(u.sort((f,m)=>e.compareRowNodes(i,f,m)||~l.get(f)-~l.get(m)),p===a?u:QM(e,i,u,o,l,a))},QM=(e,t,s,n,i,o)=>{const r=new Array(o);let a=0,l=s[a],c,d=-1,u=0,p=0;const f=s.length,m=n.length;for(;;){if(d<0){if(u>=m)break;if(c=n[u++],d=i.get(c)??-1,d<0)continue}if((e.compareRowNodes(t,l,c)||~i.get(l)-d)<0){if(r[p++]=l,++a>=f)break;l=s[a]}else r[p++]=c,d=-1}for(;a<f;)r[p++]=s[a++];if(d<0)return r;for(r[p++]=c;u<m;){const v=n[u++];i.get(v)>=0&&(r[p++]=v)}return r},JM=(e,t,s)=>{let n=0;s.length=t.size;for(let i=0,o=e.length;i<o;++i){const r=e[i];t.has(r)&&(s[n++]=r)}return s.length=n,s},x1=e=>{const t=e.childrenAfterSort,s=e.sibling;if(s&&(s.childrenAfterSort=t),!!t)for(let n=0,i=t.length-1;n<=i;n++){const o=t[n],r=n===0,a=n===i;o.firstChild!==r&&(o.firstChild=r,o.dispatchRowEvent("firstChildChanged")),o.lastChild!==a&&(o.lastChild=a,o.dispatchRowEvent("lastChildChanged")),o.childIndex!==n&&(o.childIndex=n,o.dispatchRowEvent("childIndexChanged"))}},e8=class extends _{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){const s=this.beans.sortSvc.getSortOptions(),n=s.length>0&&!!t&&this.gos.get("deltaSort"),{gos:i,colModel:o,rowGroupColsSvc:r,rowNodeSorter:a,rowRenderer:l,showRowGroupCols:c}=this.beans,d=i.get("groupMaintainOrder"),u=o.getCols().some(b=>b.isRowGroupActive()),p=r?.columns,f=o.isPivotMode(),m=i.getCallback("postSortRows");let v=!1,C;const w=b=>{const x=f&&b.leafGroup;let S=d&&u&&!b.leafGroup;S&&(C??(C=this.shouldSortContainsGroupCols(s)),S&&(S=!C));let y=null;if(S){let R=!1;if(p){const E=b.level+1;E<p.length&&(R=p[E].wasSortExplicitlyRemoved)}R||(y=t8(b))}else!s.length||x||(n&&t?y=XM(a,b,t,e,s):y=a.doFullSortInPlace(b.childrenAfterAggFilter.slice(),s));if(y||(y=b.childrenAfterAggFilter?.slice()??[]),v||(v=b.childrenAfterSort?.[0]!==y[0]),b.childrenAfterSort=y,x1(b),m){const R={nodes:b.childrenAfterSort};m(R)}};if(Ki(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,e,w),v&&i.get("groupHideOpenParents")){const b=c?.columns;b?.length&&l.refreshCells({columns:b,force:!0})}}shouldSortContainsGroupCols(e){const t=e.length;if(!t)return!1;if(rn(this.gos)){for(let s=0;s<t;++s){const n=e[s].column;if(n.isPrimary()&&n.isRowGroupActive())return!0}return!1}for(let s=0;s<t;++s)if(e[s].column.getColDef().showRowGroup)return!0;return!1}},t8=e=>{const t=e.childrenAfterSort,s=e.childrenAfterAggFilter,n=t?.length,i=s?.length;if(!n||!i)return null;const o=new Array(i),r=new Set;for(let l=0;l<i;++l)r.add(s[l]);let a=0;for(let l=0;l<n;++l){const c=t[l];r.delete(c)&&(o[a++]=c)}if(r.size===0&&a===n)return t;for(const l of r)o[a++]=l;return o.length=a,o},s8=class extends _{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=xt(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const e=this.beans,t=new Xn(e);this.rootNode=t,this.nodeManager=this.createBean(new WM(t));const s=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:s,columnRowGroupChanged:s,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:e,stagesRefreshProps:t}=this,s=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(n=>!!n);this.stages=s;for(let n=s.length-1;n>=0;--n){const i=s[n];for(const o of i.refreshProps)t.set(o,n)}this.addManagedPropertyListeners([...t.keys(),"rowData"],n=>{const i=n.changeSet?.properties;i&&this.onPropChange(i)}),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,s,n){let i,o=!1;do{i=!1;const r=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(r,s),c=Math.min(a,n);for(let d=l;d<=c;d++){const u=this.getRow(d);if(u.rowHeightEstimated){const p=Kn(this.beans,u);u.setRowHeight(p.height),i=!0,o=!0}}i&&this.setRowTopAndRowIndex()}while(i);return o}onPropChange(e){const{nodeManager:t,gos:s,beans:n}=this,i=n.groupStage;if(!t)return;const o=new Set(e),r=i?.onPropChange(o);let a;o.has("rowData")?a=s.get("rowData"):r&&(a=i?.extractData()),a&&!Array.isArray(a)&&(a=null,X(1));const l={step:"nothing",changedProps:o};if(a){const d=!r&&!this.isEmpty()&&a.length>0&&s.exists("getRowId")&&!s.get("resetRowDataOnUpdate");this.refreshingData=!0,d?(l.keepRenderedRows=!0,l.animate=!s.get("suppressAnimationFrame"),l.changedRowNodes=new Yl,t.setImmutableRowData(l,a)):(l.rowDataUpdated=!0,l.newData=!0,t.setNewRowData(a),this.rowNodesCountReady=!0)}const c=l.rowDataUpdated?"group":this.getRefreshedStage(e);c&&(l.step=c,this.refreshModel(l))}getRefreshedStage(e){const{stages:t,stagesRefreshProps:s}=this;if(!t)return null;const n=t.length;let i=n;for(let o=0,r=e.length;o<r&&i;++o)i=Math.min(i,s.get(e[o])??i);return i<n?t[i].step:null}setRowTopAndRowIndex(e){const{beans:t,rowsToDisplay:s}=this,n=t.environment.getDefaultRowHeight();let i=0;const o=At(this.gos,"normal");for(let r=0,a=s.length;r<a;++r){const l=s[r],c=l.id;if(c!=null&&e?.add(c),l.rowHeight==null){const d=Kn(t,l,o,n);l.setRowHeight(d.height,d.estimated)}l.setRowTop(i),l.setRowIndex(r),i+=l.rowHeight}if(this.beans.formula?.active){const r=this.formulaRows;for(let a=0,l=r.length;a<l;++a){const c=r[a];c.formulaRowIndex=a}}}clearRowTopAndRowIndex(e,t){const s=o=>{o?.id!=null&&!t.has(o.id)&&o.clearRowTopAndRowIndex()},n=o=>{s(o),s(o.detailNode),s(o.sibling);const r=o.childrenAfterGroup;if(!(!o.hasChildren()||!r)&&!(e&&o.level!==-1&&!o.expanded))for(let a=0,l=r.length;a<l;++a)n(r[a])},i=this.rootNode;i&&n(i)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;const n=e.sibling?.displayed?1:0;return(e.childrenAfterSort?.length??0)+n}getTopLevelRowDisplayedIndex(e){const{beans:t,rootNode:s,rowsToDisplay:n}=this;if(!s||!n.length||n[0]===s)return e;const o=s.childrenAfterSort,r=l=>{let c=o[l];if(this.gos.get("groupHideOpenParents"))for(;c.expanded&&c.childrenAfterSort&&c.childrenAfterSort.length>0;)c=c.childrenAfterSort[0];return c.rowIndex},a=t.footerSvc;return a?a?.getTopDisplayIndex(n,e,o,r):r(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:s}=this;if(!t||!s.length||s[0]===t)return e;let i=this.getRow(e);i.footer&&(i=i.sibling);let o=i.parent;for(;o&&o!==t;)i=o,o=i.parent;const r=t.childrenAfterSort?.indexOf(i)??-1;return r>=0?r:e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:No(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){const n=t.length===0||t.some(i=>i.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:n,keepRenderedRows:!0,animate:No(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:No(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:s,rowDataUpdated:n}=e;return!(!t||s||!n||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){const{nodeManager:t,eventSvc:s,started:n}=this;if(!t)return;const i=!!e.rowDataUpdated;if(n&&i&&s.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=i);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let o=!1;this.refreshingModel=!0;try{this.executeRefresh(e,i),o=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,o||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),s.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){const{beans:s,rootNode:n}=this;s.masterDetailSvc?.refreshModel(e),t&&e.step!=="group"&&s.colFilter?.refreshModel();let i=e.changedPath;switch(i?.addRow(n),e.step==="group"&&(this.doGrouping(n,e),i??(i=e.changedPath)),i??(i=s.changedPathFactory?.ensureRowsPath(e,n)),e.step){case"group":case"filter":this.doFilter(i);case"pivot":this.doPivot(i)&&(i=void 0,e.changedPath=void 0);case"aggregate":this.doAggregate(i);case"filter_aggregates":this.doFilterAggregates(i);case"sort":this.doSort(i,e.changedRowNodes);case"map":this.doRowsToDisplay()}const o=new Set;this.setRowTopAndRowIndex(o),this.clearRowTopAndRowIndex(i,o),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){const{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let s=!1,n=!1;const i=[],o=fa(this.gos);return this.forEachNodeAfterFilterAndSort(r=>{if(n)return;if(s&&(r===t||r===e)&&(n=!0,o&&r.group)){y1(i,r);return}if(!s){if(r!==t&&r!==e)return;s=!0,t===e&&(n=!0)}(!r.group||!o)&&i.push(r)}),i}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay,s=t.length;if(this.isEmpty()||s===0)return-1;let n=0,i=s-1;if(e<=0)return 0;if(t[i].rowTop<=e)return i;let r=-1,a=-1;for(;;){const l=Math.floor((n+i)/2),c=t[l];if(this.isRowInPixel(c,e)||(c.rowTop<e?n=l+1:c.rowTop>e&&(i=l-1),r===n&&a===i))return l;r=n,a=i}}isRowInPixel(e,t){const s=e.rowTop,n=s+e.rowHeight;return s<=t&&n>t}forEachLeafNode(e){const t=this.rootNode?._leafs;if(t)for(let s=0,n=t.length;s<n;++s)e(t[s],s)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){const t=this.rowsToDisplay;for(let s=0,n=t.length;s<n;++s)e(t[s],s)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,s=>s.childrenAfterSort)}forEachPivotNode(e,t,s){const{colModel:n,rowGroupColsSvc:i}=this.beans;if(!n.isPivotMode())return;if(!i?.columns.length){e(this.rootNode,0);return}const o=s?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[o])}depthFirstSearchRowNodes(e,t=!1,s=o=>o.childrenAfterGroup,n=this.rootNode,i=0){let o=i;if(!n)return o;const r=n===this.rootNode;if(r||e(n,o++),n.hasChildren()&&!n.footer){const a=r||this.hierarchical?s(n):null;if(a){const l=this.beans.footerSvc;o=l?.addTotalRows(o,n,e,t,r,"top")??o;for(const c of a)o=this.depthFirstSearchRowNodes(e,t,s,c,o);return l?.addTotalRows(o,n,e,t,r,"bottom")??o}}return o}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){const t=this.rootNode,s=this.beans.filterAggStage;if(s&&this.hierarchical){s.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;const n=t.sibling;n&&(n.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){const s=this.beans.sortStage;if(s){s.execute(e,t);return}Ki(this.rootNode,this.hierarchical,e,n=>{n.childrenAfterSort=n.childrenAfterAggFilter.slice(0),x1(n)})}doGrouping(e,t){const n=this.beans.groupStage?.execute(t);if(n===void 0){const i=e._leafs;e.childrenAfterGroup=i,e.updateHasChildren();const o=e.sibling;o&&(o.childrenAfterGroup=i)}(n||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){const t=this.beans.filterStage;if(t){t.execute(e);return}Ki(this.rootNode,this.hierarchical,e,s=>{s.childrenAfterFilter=s.childrenAfterGroup,Gh(s)})}doPivot(e){return this.beans.pivotStage?.execute(e)??!1}getRowNode(e){const t=this.nodeManager?.getRowNode(e);return typeof t=="object"?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const s=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),s)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){const e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:e,beans:t,eventSvc:s,asyncTransactions:n}=this;if(!e)return;t.valueCache?.onDataChanged();const i=[],o=[],r=new Yl,a=!this.gos.get("suppressAnimationFrame");for(const{rowDataTransaction:l,callback:c}of n??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;const d=e.updateRowData(l,r,a);i.push(d),c&&o.push(c.bind(null,d))}this.commitTransactions(r,a),o.length>0&&setTimeout(()=>{for(let l=0,c=o.length;l<c;l++)o[l]()},0),i.length>0&&s.dispatchEvent({type:"asyncTransactionsFlushed",results:i}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){const t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const s=new Yl,n=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;const i=t.updateRowData(e,s,n);return this.commitTransactions(s,n),i}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){const{rootNode:e,beans:t}=this;if(t.formula?.active){const i=e?.childrenAfterSort??[];this.formulaRows=i,this.rowsToDisplay=i.filter(o=>!o.softFiltered);for(const o of this.rowsToDisplay)o.setUiLevel(0);return}const s=t.flattenStage;if(s){this.rowsToDisplay=s.execute();return}const n=this.rootNode.childrenAfterSort??[];for(const i of n)i.setUiLevel(0);this.rowsToDisplay=n}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const s=t.detailNode;s?.setRowHeight(s.rowHeight,!0);const n=t.sibling;n?.setRowHeight(n.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},y1=(e,t)=>{const s=t.childrenAfterGroup;if(s)for(let n=0,i=s.length;n<i;++n){const o=s[n];o.data&&e.push(o),o.group&&y1(e,o)}};function n8(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function i8(e,t){const s=Ys(e);s&&((!t||t==="everything")&&(t="group"),s.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function o8(e){return Ys(e)?.isEmpty()??!0}function r8(e,t){Ys(e)?.forEachLeafNode(t)}function a8(e,t){Ys(e)?.forEachNodeAfterFilter(t)}function l8(e,t){Ys(e)?.forEachNodeAfterFilterAndSort(t)}function c8(e,t){return e.frameworkOverrides.wrapIncoming(()=>Ys(e)?.updateRowData(t))}function d8(e,t,s){e.frameworkOverrides.wrapIncoming(()=>Ys(e)?.batchUpdateRowData(t,s))}function u8(e){e.frameworkOverrides.wrapIncoming(()=>Ys(e)?.flushAsyncTransactions())}function h8(e){return e.selectionSvc?.getBestCostNodeSelection()}var p8={moduleName:"ClientSideRowModel",version:ie,rowModels:["clientSide"],beans:[s8,e8],dependsOn:[d1]},g8={moduleName:"ClientSideRowModelApi",version:ie,apiFunctions:{onGroupExpandedOrCollapsed:n8,refreshClientSideRowModel:i8,isRowDataEmpty:o8,forEachLeafNode:r8,forEachNodeAfterFilter:a8,forEachNodeAfterFilterAndSort:l8,applyTransaction:c8,applyTransactionAsync:d8,flushAsyncTransactions:u8,getBestCostNodeSelection:h8,resetRowHeights:w1,onRowHeightChanged:C1},dependsOn:[VM,jM]},f8=":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}";function m8(e,t){typeof t=="number"?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)}function S1({colAutosize:e,visibleCols:t},s,n){Array.isArray(s)?e?.autoSizeCols({colKeys:s,skipHeader:n,source:"api"}):e?.autoSizeCols({...s,colKeys:s.colIds??t.allCols,source:"api"})}function v8(e,t){t&&typeof t=="object"?S1(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}var C8=class extends _{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let s=!1;const n=t.type;if(n==="fitGridWidth"||n==="fitProvidedWidth")s=!0;else if(n==="fitCellContents"){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});const i=e.get("rowData");s=i!=null&&i.length>0&>(e)}s&&this.beans.colDelayRenderSvc?.hideColumns(n)}}autoSizeCols(e){const{eventSvc:t,visibleCols:s,colModel:n}=this.beans;Ir(this.beans,!0),this.innerAutoSizeCols(e).then(i=>{const o=d=>Zo(t,Array.from(d),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return Ir(this.beans,!1),o(i);const r=tv(this.beans),a=d=>s.leftCols.some(u=>Yr(u,d)),l=d=>s.rightCols.some(u=>Yr(u,d)),c=e.colKeys.filter(d=>!n.getCol(d)?.getColDef().suppressAutoSize&&!_t(d)&&!a(d)&&!l(d));this.sizeColumnsToFit(r,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(d=>({...d,key:d.colId})),colKeys:c,onlyScaleUp:!0,animate:!1}),Ir(this.beans,!1),o(i)})}innerAutoSizeCols(e){return new Promise((t,s)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,s));const{colKeys:n,skipHeader:i,skipHeaderGroups:o,stopAtGroup:r,defaultMaxWidth:a,defaultMinWidth:l,columnLimits:c=[],source:d="api"}=e,{animationFrameSvc:u,renderStatus:p,colModel:f,autoWidthCalc:m,visibleCols:v}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&p&&(!p.areHeaderCellsRendered()||!p.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,s)});return}this.timesDelayed=0;const C=new Set;let w=-1;const b=Object.fromEntries(c.map(({colId:y,...R})=>[y,R])),x=i??this.gos.get("skipHeaderOnAutoSize"),S=o??x;for(;w!==0;){w=0;const y=[];for(const R of n){if(!R||qF(R))continue;const E=f.getCol(R);if(!E||C.has(E)||E.getColDef().suppressAutoSize)continue;const F=m.getPreferredWidthForColumn(E,x);if(F>0){const P=b[E.colId]??{};P.minWidth??(P.minWidth=l),P.maxWidth??(P.maxWidth=a);const k=w8(E,F,P);E.setActualWidth(k,d),C.add(E),w++}y.push(E)}y.length&&v.refresh(d)}S||this.autoSizeColumnGroupsByColumns(n,d,r),t(C)})}autoSizeColumn(e,t,s){this.autoSizeCols({colKeys:[e],skipHeader:s,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,s){const{colModel:n,ctrlsSvc:i}=this.beans,o=new Set,r=n.getColsForKeys(e);for(const l of r){let c=l.getParent();for(;c&&c!=s;)c.isPadding()||o.add(c),c=c.getParent()}let a;for(const l of o){for(const c of i.getHeaderRowContainerCtrls())if(a=c.getHeaderCtrlForColumn(l),a)break;a?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){const s=this.gos.get("skipHeaderOnAutoSize"),n=()=>{this.autoSizeColumn(t,"uiColumnResized",s)};e.addEventListener("dblclick",n);const i=new wi(e);return i.addEventListener("doubleTap",n),()=>{e.removeEventListener("dblclick",n),i.destroy()}}addColumnGroupResize(e,t,s){const n=this.gos.get("skipHeaderOnAutoSize"),i=()=>{const o=[],r=t.getDisplayedLeafColumns();for(const a of r)a.getColDef().suppressAutoSize||o.push(a.getColId());o.length>0&&this.autoSizeCols({colKeys:o,skipHeader:n,stopAtGroup:t,source:"uiColumnResized"}),s()};return e.addEventListener("dblclick",i),()=>e.removeEventListener("dblclick",i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;const s=tv(this.beans);if(s>0){this.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):X(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",s,n){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,s,n));return}const{beans:i}=this,o=n?.animate??!0;o&&Ir(i,!0);const r={};for(const{key:w,...b}of n?.columnLimits??[])r[typeof w=="string"?w:w.getColId()]=b;const a=i.visibleCols.allCols;if(e<=0||!a.length)return;const l=on(a);if(n?.onlyScaleUp&&l>e||e===l&&a.every(b=>{if(b.colDef.suppressSizeToFit)return!0;const x=r?.[b.getId()],S=x?.minWidth??n?.defaultMinWidth,y=x?.maxWidth??n?.defaultMaxWidth,R=b.getActualWidth();return(S==null||R>=S)&&(y==null||R<=y)}))return;const d=[],u=[];for(const w of a){const b=n?.colKeys?.some(x=>Yr(w,x))??!0;w.getColDef().suppressSizeToFit||!b?u.push(w):d.push(w)}const p=d.slice(0);let f=!1;const m=w=>{_s(d,w),u.push(w)},v={};for(const w of d){n?.onlyScaleUp&&(v[w.getColId()]=w.getActualWidth()),w.resetActualWidth(t);const b=r?.[w.getId()],x=b?.minWidth??n?.defaultMinWidth??-1/0,S=b?.maxWidth??n?.defaultMaxWidth??1/0,y=w.getActualWidth(),R=Math.max(Math.min(y,S),x);R!=y&&w.setActualWidth(R,t,!0)}for(;!f;){f=!0;const w=e-on(u);if(w<=0)for(const b of d){const x=r?.[b.getId()]?.minWidth??n?.defaultMinWidth??b.minWidth;b.setActualWidth(x,t,!0)}else{const b=w/on(d);let x=w;for(let S=d.length-1;S>=0;S--){const y=d[S],R=y.getColId(),E=v[R],F=r?.[R],P=F?.minWidth??n?.defaultMinWidth??E,k=F?.maxWidth??n?.defaultMaxWidth,D=Math.max(P??-1/0,y.getMinWidth()),T=Math.min(k??1/0,y.getMaxWidth());let I=Math.round(y.getActualWidth()*b);I<D?(I=D,m(y),f=!1):I>T?(I=T,m(y),f=!1):S===0&&(I=x),y.setActualWidth(I,t,!0),x-=I}}}for(const w of p)w.fireColumnWidthChangedEvent(t);const C=i.visibleCols;C.setLeftValues(t),C.updateBodyWidths(),!s&&(Zo(this.eventSvc,p,!0,t),o&&Ir(i,!1))}applyAutosizeStrategy(){const{gos:e,colDelayRenderSvc:t}=this.beans,s=e.get("autoSizeStrategy");s?.type!=="fitGridWidth"&&s?.type!=="fitProvidedWidth"||setTimeout(()=>{if(!this.isAlive())return;const n=s.type;if(n==="fitGridWidth"){const{columnLimits:i,defaultMinWidth:o,defaultMaxWidth:r}=s,a=i?.map(({colId:l,minWidth:c,maxWidth:d})=>({key:l,minWidth:c,maxWidth:d}));this.sizeColumnsToFitGridBody({defaultMinWidth:o,defaultMaxWidth:r,columnLimits:a})}else n==="fitProvidedWidth"&&this.sizeColumnsToFit(s.width,"sizeColumnsToFit");t?.revealColumns(n)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;const s="autosizeColumns";e?this.autoSizeCols({...t,source:s,colKeys:e}):this.autoSizeAllColumns({...t,source:s}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function w8(e,t,s={}){const n=s.minWidth??e.getMinWidth();t<n&&(t=n);const i=s.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function tv({ctrlsSvc:e,scrollVisibleSvc:t}){const s=e.getGridBodyCtrl(),i=s.isVerticalScrollShowing()?t.getScrollbarWidth():0;return ua(s.eGridBody)-i}var sv="ag-animate-autosize";function Ir({ctrlsSvc:e,gos:t},s){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;const n=e.getGridBodyCtrl().eGridBody.classList;s?n.add(sv):n.remove(sv)}var b8={moduleName:"ColumnAutoSize",version:ie,beans:[C8],apiFunctions:{sizeColumnsToFit:m8,autoSizeColumns:S1,autoSizeAllColumns:v8},dependsOn:[Eb],css:[f8]};function x8(e,t){return!!e.colHover?.isHovered(t)}var y8=class extends _{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=s=>{const{beans:n,gos:i,element:o,columns:r}=this,a=n.colHover;if(s??!!i.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(o,{mouseover:a.setMouseOver.bind(a,r),mouseout:a.clearMouseOver.bind(a)});else{for(const c of this.destroyManagedListeners)c();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},S8="ag-column-hover",R8=class extends _{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get("columnHoverHighlight"))return!1;const t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,s){const n=()=>{const i=this.isHovered(s);t.toggleCss("ag-column-hover",i)};e.addManagedEventListeners({columnHoverChanged:n}),n()}onCellColumnHover(e,t){if(!t)return;const s=this.isHovered(e);t.toggleCss(S8,s)}addHeaderFilterColumnHoverListener(e,t,s,n){this.createHoverFeature(e,[s],n);const i=()=>{const o=this.isHovered(s);t.toggleCss("ag-column-hover",o)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,s){e.createManagedBean(new y8(t,s))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},F8={moduleName:"ColumnHover",version:ie,beans:[R8],apiFunctions:{isColumnHovered:x8}},E8=class extends _{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:s,columnKeys:n,skipRowGroups:i,exportRowNumbers:o}=t,r=this.getColumnsToExport({allColumns:s,skipRowGroups:i,columnKeys:n,exportRowNumbers:o});return[this.prepareSession(r),this.prependContent(t),this.exportColumnGroups(t,r),this.exportHeaders(t,r),this.processPinnedTopRows(t,r),this.processRows(t,r),this.processPinnedBottomRows(t,r),this.appendContent(t)].reduce((a,l)=>l(a),e).parse()}processRow(e,t,s,n){const i=t.shouldRowBeSkipped||(()=>!1),r=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!r,l=this.colModel.isPivotMode()?n.leafGroup:!n.group,c=!!n.footer,d=n.allChildrenCount===1&&n.childrenAfterGroup?.length===1&&CF(this.gos,n);if(!l&&!c&&(t.skipRowGroups||d||a)||t.onlySelected&&!n.isSelected()||t.skipPinnedTop&&n.rowPinned==="top"||t.skipPinnedBottom&&n.rowPinned==="bottom"||n.stub||n.level===-1&&!l&&!c||i(Te(this.gos,{node:n})))return;const f=e.onNewBodyRow(n);if(s.forEach((m,v)=>{f.onColumn(m,v,n)}),t.getCustomContentBelowRow){const m=t.getCustomContentBelowRow(Te(this.gos,{node:n}));m&&e.addCustomContent(m)}}appendContent(e){return t=>{const s=e.appendContent;return s&&t.addCustomContent(s),t}}prependContent(e){return t=>{const s=e.prependContent;return s&&t.addCustomContent(s),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return s=>{if(!e.skipColumnGroupHeaders){const n=new Tb,{colGroupSvc:i}=this.beans,o=i?i.createColumnGroups({columns:t,idCreator:n,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(o,s,e.processGroupHeaderCallback)}return s}}exportHeaders(e,t){return s=>{if(!e.skipColumnHeaders){const n=s.onNewHeaderRow();t.forEach((i,o)=>{n.onColumn(i,o,void 0)})}return s}}processPinnedTopRows(e,t){return s=>{const n=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="top").sort((i,o)=>i.rowIndex-o.rowIndex).map(i=>this.pinnedRowModel?.getPinnedTopRow(i.rowIndex)).forEach(n):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",n),s}}processRows(e,t){return s=>{const n=this.rowModel,i=gt(this.gos),o=ir(this.gos),r=!i&&e.onlySelected,a=this.processRow.bind(this,s,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(c=>c.rowPinned==null).sort((c,d)=>c.rowIndex-d.rowIndex).map(c=>n.getRow(c.rowIndex)).forEach(a);else if(this.colModel.isPivotMode())i?n.forEachPivotNode(a,!0,l==="filteredAndSorted"):o?n.forEachNodeAfterFilterAndSort(a,!0):n.forEachNode(a);else if(e.onlySelectedAllPages||r){const c=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(c),c.forEach(a)}else l==="all"?n.forEachNode(a):i||o?n.forEachNodeAfterFilterAndSort(a,!0):n.forEachNode(a);return s}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:s}=this.beans;if(!t||!s)return;const n=t.getSortOptions(),i=(o,r)=>o.rowIndex!=null&&r.rowIndex!=null?o.rowIndex-r.rowIndex:o.level===r.level?o.parent?.id===r.parent?.id?s.compareRowNodes(n,o,r)||(o.rowIndex??-1)-(r.rowIndex??-1):i(o.parent,r.parent):o.level>r.level?i(o.parent,r):i(o,r.parent);e.sort(i)}processPinnedBottomRows(e,t){return s=>{const n=this.processRow.bind(this,s,e,t);return e.rowPositions?e.rowPositions.filter(i=>i.rowPinned==="bottom").sort((i,o)=>i.rowIndex-o.rowIndex).map(i=>this.pinnedRowModel?.getPinnedBottomRow(i.rowIndex)).forEach(n):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",n),s}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:s=!1,exportRowNumbers:n=!1,columnKeys:i}=e,{colModel:o,gos:r,visibleCols:a}=this,l=o.isPivotMode(),c=p=>oi(p)?!1:!_t(p)||n;if(i?.length)return o.getColsForKeys(i).filter(c);const d=r.get("treeData");let u=[];return t&&!l?u=o.getCols():u=a.allCols,u=u.filter(p=>c(p)&&(s&&!d?!Hp(p):!0)),u}recursivelyAddHeaderGroups(e,t,s){const n=[];for(const i of e){const o=i;if(o.getChildren)for(const r of o.getChildren()??[])n.push(r)}e.length>0&&vt(e[0])&&this.doAddHeaderHeader(t,e,s),n&&n.length>0&&this.recursivelyAddHeaderGroups(n,t,s)}doAddHeaderHeader(e,t,s){const n=e.onNewHeaderGroupingRow();let i=0;for(const o of t){const r=o;let a;s?a=s(Te(this.gos,{columnGroup:r})):a=this.beans.colNames.getDisplayNameForColumnGroup(r,"header");const c=(r.isExpandable()?r.getLeafColumns():[]).reduce((d,u,p,f)=>{let m=et(d);return u.getColumnGroupShow()==="open"?(!m||m[1]!=null)&&(m=[p],d.push(m)):m&&m[1]==null&&(m[1]=p-1),p===f.length-1&&m&&m[1]==null&&(m[1]=p),d},[]);n.onColumn(r,a||"",i++,r.getLeafColumns().length-1,c)}}},D8={moduleName:"SharedExport",version:ie,beans:[E8]},P8=class extends _{getFileName(e){const t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function T8(e,t){const s=document.defaultView||window;if(!s){X(52);return}const n=document.createElement("a"),i=s.URL.createObjectURL(t);n.setAttribute("href",i),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:s})),n.remove(),s.setTimeout(()=>{s.URL.revokeObjectURL(i)},0)}var k8=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:s,colNames:n,valueSvc:i,gos:o,processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,valueFrom:d}=e;this.colModel=t,this.rowGroupColsSvc=s,this.colNames=n,this.valueSvc=i,this.gos=o,this.processCellCallback=r,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=c,d&&(this.valueFrom=d)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){const{column:t,node:s,currentColumnIndex:n,accumulatedRowIndex:i,type:o,useRawFormula:r}=e,a=n===0&&Ew(this.gos,s,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||s.group)&&(t.isRowGroupDisplayed(s.rowGroupColumn?.getColId()??"")||a))return{value:this.processRowGroupCallback(Te(this.gos,{column:t,node:s}))??""};if(this.processCellCallback)return{value:this.processCellCallback(Te(this.gos,{accumulatedRowIndex:i,column:t,node:s,value:this.valueSvc.getValueForDisplay({column:t,node:s,from:this.valueFrom}).value,type:o,parseValue:m=>this.valueSvc.parseValue(t,s,m,this.valueSvc.getValue(t,s,this.valueFrom)),formatValue:m=>this.valueSvc.formatValue(t,s,m)??m}))??""};const l=this.gos.get("treeData"),c=this.valueSvc,d=s.level===-1&&s.footer,u=t.colDef.showRowGroup===!0&&(s.group||l);if(!d&&(a||u)){let m="",v=s;for(;v&&v.level!==-1;){const{value:C,valueFormatted:w}=c.getValueForDisplay({column:a?void 0:t,node:v,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});m=` -> ${w??C??""}${m}`,v=v.parent}return{value:m,valueFormatted:m}}const{value:p,valueFormatted:f}=c.getValueForDisplay({column:t,node:s,includeValueFormatted:!0,exporting:!0,useRawFormula:r,from:this.valueFrom});return{value:p??"",valueFormatted:f}}getHeaderName(e,t){return e?e(Te(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},nv=`\r
|
|
65
|
+
`,I8=class extends k8{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:s}=e;this.suppressQuotes=t,this.columnSeparator=s}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,nv),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((s,n)=>{n!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(s.data.value||""),s.mergeAcross&&this.appendEmptyCells(s.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,s,n){s!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(n)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,s){t!=0&&(this.result+=this.columnSeparator);const n=this.extractRowCellValue({column:e,node:s,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(n.valueFormatted??n.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(X(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=nv),this.isFirstLine=!1}},M8=class extends P8{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){X(51);return}const t=()=>{const n=this.getMergedParams(e),i=this.getData(n),o=new Blob(["\uFEFF",i],{type:"text/plain"}),r=n.fileName,a=typeof r=="function"?r(Te(this.gos,{})):r;T8(this.getFileName(a),o)},{overlays:s}=this.beans;s?s.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const s=t?Object.assign({},e):this.getMergedParams(e);return this.getData(s)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:s,rowGroupColsSvc:n,valueSvc:i,gos:o}=this.beans,{processCellCallback:r,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:c,suppressQuotes:d,columnSeparator:u,valueFrom:p}=e;return new I8({colModel:t,colNames:s,valueSvc:i,gos:o,processCellCallback:r||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:c||void 0,suppressQuotes:d||!1,columnSeparator:u||",",rowGroupColsSvc:n,valueFrom:p})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function A8(e,t){return e.csvCreator?.getDataAsCsv(t)}function L8(e,t){e.csvCreator?.exportDataAsCsv(t)}var N8={moduleName:"CsvExport",version:ie,beans:[M8],apiFunctions:{getDataAsCsv:A8,exportDataAsCsv:L8},dependsOn:[D8]},R1=class extends qt{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){const s="title",n=this.ctrl.getGui();n&&(e!=null&&(e!=""||t)?n.setAttribute(s,e):n.removeAttribute(s))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){const e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},O8=1e3,H8=1e3,iv=100,ov,kl=!1,B8=class extends qt{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Ii()&&(kl?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},iv):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,s=this.tooltipCtrl.getGui(),n=this.tooltipComp?.getGui();this.isInteractingWithTooltip||s.contains(t)||this.interactionEnabled&&n?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||kl)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-ov<O8}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!le(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const s=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const n=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(s,n)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),ov=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const n=t.getGui();this.tooltipComp=t,n.classList.contains("ag-tooltip")||n.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&n.classList.add("ag-tooltip-animate"),this.interactionEnabled&&n.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),o=this.popupSvc?.addPopup({eChild:n,ariaLabel:i("ariaLabelTooltip","Tooltip")});if(o&&(this.tooltipPopupDestroyFunc=o.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const r=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:r}),this.setEventHandlers(r)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(n,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Et(this.beans),{keydown:r=>{n.contains(r?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(n,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:n,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const e=this.tooltipComp?.getGui(),t=dt(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,s=this.tooltipTrigger===0?H8:0;window.setTimeout(()=>{e(),this.destroyBean(t)},s),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){kl=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},iv)}unlockService(){kl=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("Hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},G8=class extends R1{constructor(e,t,s){super(e,s),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=e==="focus"?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},V8=class extends zp{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){const{value:t}=e,s=this.getGui();s.textContent=nr(t);const n=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();s.classList.add(`ag-${n}-tooltip`)}},j8=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",Il=0,z8=200,W8=class extends qt{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:s,nudgeY:n,skipObserver:i}=e;this.positionPopup({ePopup:t,nudgeX:s,nudgeY:n,keepWithinBounds:!0,skipObserver:i,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:s,nudgeY:n,keepWithinBounds:i,eventSource:o,alignSide:r="left",position:a="over",type:l}=e,c=o.getBoundingClientRect(),d=this.getParentRect();this.setAlignedTo(o,t);const u=()=>{let p=c.left-d.left;r==="right"&&(p-=t.offsetWidth-c.width);let f;return a==="over"?(f=c.top-d.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,c,d,e.nudgeY||0)==="under"?f=c.top-d.top+c.height:f=c.top-t.offsetHeight-(n||0)*2-d.top),{x:p,y:f}};this.positionPopup({ePopup:t,nudgeX:s,nudgeY:n,keepWithinBounds:i,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,l,t,o,null)})}positionPopupForMenu(e){const{eventSource:t,ePopup:s,event:n}=e,i=t.getBoundingClientRect(),o=this.getParentRect();this.setAlignedTo(t,s);let r=!1;const a=()=>{const l=this.keepXYWithinBounds(s,i.top-o.top,0),c=s.clientWidth>0?s.clientWidth:200;r||(s.style.minWidth=`${c}px`,r=!0);const u=o.right-o.left-c;let p;return this.gos.get("enableRtl")?(p=m(),p<0&&(p=f(),this.setAlignedStyles(s,"left")),p>u&&(p=0,this.setAlignedStyles(s,"right"))):(p=f(),p>u&&(p=m(),this.setAlignedStyles(s,"right")),p<0&&(p=0,this.setAlignedStyles(s,"left"))),{x:p,y:l};function f(){return i.right-o.left-2}function m(){return i.left-o.left-c}};this.positionPopup({ePopup:s,keepWithinBounds:!0,updatePosition:a,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",s,t,n instanceof MouseEvent?n:void 0)})}shouldRenderUnderOrAbove(e,t,s,n){const i=s.bottom-t.bottom,o=t.top-s.top,r=e.offsetHeight+n;return i>r?"under":o>r||o>i?"above":"under"}setAlignedStyles(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const n=this.popupList[s],{alignedToElement:i}=n;if(!i)return;const o=["right","left","over","above","under"];for(const r of o)i.classList.remove(`ag-has-popup-positioned-${r}`),e.classList.remove(`ag-popup-positioned-${r}`);t&&(i.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const s=this.getPopupIndex(t);if(s!==-1){const n=this.popupList[s];n.alignedToElement=e}}positionPopup(e){const{ePopup:t,keepWithinBounds:s,nudgeX:n,nudgeY:i,skipObserver:o,updatePosition:r}=e,a={width:0,height:0},l=(c=!1)=>{let{x:d,y:u}=r();c&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,n&&(d+=n),i&&(u+=i),s&&(d=this.keepXYWithinBounds(t,d,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${d}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!o){const c=xn(this.beans,t,()=>l(!0));setTimeout(()=>c(),z8)}}getParentRect(){const e=Et(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),JC(t)}keepXYWithinBounds(e,t,s){const n=s===0,i=n?"clientHeight":"clientWidth",o=n?"top":"left",r=n?"height":"width",a=n?"scrollTop":"scrollLeft",l=Et(this.beans),c=l.documentElement,d=this.getPopupParent(),u=e.getBoundingClientRect(),p=d.getBoundingClientRect(),f=l.documentElement.getBoundingClientRect(),m=d===l.body,v=Math.ceil(u[r]);let w=m?(n?QC:ic)(c)+c[a]:d[i];m&&(w-=Math.abs(f[o]-p[o]));const b=w-v;return Math.min(Math.max(t,0),Math.max(b,0))}addPopup(e){const{eChild:t,ariaLabel:s,ariaOwns:n,alwaysOnTop:i,positionCallback:o,anchorToElement:r}=e,a=this.getPopupIndex(t);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(t);const l=this.createPopupWrapper(t,!!i,s,n),c=this.addEventListenersToPopup({...e,wrapperEl:l});return o&&o(),this.addPopupToPopupList(t,l,c,r),{hideFunc:c}}initialisePopupPosition(e){const s=this.getPopupParent().getBoundingClientRect();le(e.style.top)||(e.style.top=`${s.top*-1}px`),le(e.style.left)||(e.style.left=`${s.left*-1}px`)}createPopupWrapper(e,t,s,n){const i=this.getPopupParent(),{environment:o,gos:r}=this.beans,a=Vi({tag:"div"});return o.applyThemeClasses(a),a.classList.add("ag-popup"),e.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Gi(e,"dialog"),s?$o(e,s):n&&(e.id||(e.id=`popup-component-${Il}`),_f(n,e.id)),a.appendChild(e),i.appendChild(a),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),a}addEventListenersToPopup(e){const t=this.beans,s=Et(t),{wrapperEl:n,eChild:i,closedCallback:o,afterGuiAttached:r,closeOnEsc:a,modal:l,ariaOwns:c}=e;let d=!1;const u=v=>{if(!n.contains(dt(t)))return;v.key===j.ESCAPE&&!this.isStopPropagation(v)&&m({keyboardEvent:v})},p=v=>m({mouseEvent:v}),f=v=>m({touchEvent:v}),m=(v={})=>{const{mouseEvent:C,touchEvent:w,keyboardEvent:b,forceHide:x}=v;!x&&(this.isEventFromCurrentPopup({mouseEvent:C,touchEvent:w},i)||d)||(d=!0,n.remove(),s.removeEventListener("keydown",u),s.removeEventListener("mousedown",p),s.removeEventListener("touchstart",f),s.removeEventListener("contextmenu",p),this.eventSvc.removeListener("dragStarted",p),o&&o(C||w||b),this.removePopupFromPopupList(i,c))};return r&&r({hidePopup:m}),window.setTimeout(()=>{a&&s.addEventListener("keydown",u),l&&(s.addEventListener("mousedown",p),this.eventSvc.addListener("dragStarted",p),s.addEventListener("touchstart",f),s.addEventListener("contextmenu",p))},0),m}addPopupToPopupList(e,t,s,n){this.popupList.push({element:e,wrapper:t,hideFunc:s,instanceId:Il,isAnchored:!!n}),n&&this.setPopupPositionRelatedToElement(e,n),Il=Il+1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const s=this.getPopupIndex(e);if(s===-1)return;const n=this.popupList[s];if(n.stopAnchoringPromise&&n.stopAnchoringPromise.then(o=>o&&o()),n.stopAnchoringPromise=void 0,n.isAnchored=!1,!t)return;const i=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:n.hideFunc});return n.stopAnchoringPromise=i,n.isAnchored=!0,i}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&_f(t,null),this.popupList=this.popupList.filter(s=>s.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),s=t.getBoundingClientRect(),{element:n,ePopup:i}=e,o=n.getBoundingClientRect(),r=u=>Number.parseInt(u.substring(0,u.length-1),10),a=(u,p)=>{const f=s[u]-o[u],m=r(i.style[u]);return{initialDiff:f,lastDiff:f,initial:m,last:m,direction:p}},l=a("top",0),c=a("left",1),d=this.beans.frameworkOverrides;return new We(u=>{d.wrapIncoming(()=>{iE(()=>{const p=t.getBoundingClientRect(),f=n.getBoundingClientRect();if(f.top==0&&f.left==0&&f.height==0&&f.width==0){e.hidePopup();return}const v=(C,w)=>{const b=r(i.style[w]);C.last!==b&&(C.initial=b,C.last=b);const x=p[w]-f[w];if(x!=C.lastDiff){const S=this.keepXYWithinBounds(i,C.initial+C.initialDiff-x,C.direction);i.style[w]=`${S}px`,C.last=S}C.lastDiff=x};v(l,"top"),v(c,"left")},200).then(p=>{u(()=>{p!=null&&window.clearInterval(p)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){const{mouseEvent:s,touchEvent:n}=e,i=s||n;if(!i)return!1;const o=this.getPopupIndex(t);if(o===-1)return!1;for(let r=o;r<this.popupList.length;r++){const a=this.popupList[r];if(N3(a.element,i))return!0}return this.isElementWithinCustomPopup(i.target)}isElementWithinCustomPopup(e){const t=Et(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const s=this.getWrapper(e);s&&(s.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(s))}bringPopupToFront(e){const t=this.getPopupParent(),s=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),n=s.length,i=this.getWrapper(e);if(!i||n<=1||!t.contains(e))return;const o=[],r=[];for(const p of s)p!==i&&(p.classList.contains("ag-always-on-top")?r.push(p):o.push(p));const a=[],l=r.length,u=i.classList.contains("ag-always-on-top")||!l?[...o,...r,i]:[...o,i,...r];for(let p=0;p<=n;p++){const f=u[p];if(s[p]===u[p]||f===i)continue;const m=f.querySelectorAll("div");for(const v of m)v.scrollTop!==0&&a.push([v,v.scrollTop]);p===0?t.prepend(f):u[p-1].after(f)}for(;a.length;){const p=a.pop();p[0].scrollTop=p[1]}}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const s of this.popupList)t.applyThemeClasses(s.wrapper)}}},_8=class extends W8{getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,s,n,i){const o=this.gos.getCallback("postProcessPopup");if(o){const{column:r,rowNode:a}=e??{};o({column:r,rowNode:a,ePopup:s,type:t,eventSource:n,mouseEvent:i})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return dn(e)}},rd={moduleName:"Popup",version:ie,beans:[_8]};function Vh(e){return e.get("tooltipShowMode")==="whenTruncated"}var U8=(e,t)=>{const s=e;return typeof s.getTranslatedMessage=="function"?s.getTranslatedMessage(t):e.message},jh=(e,t,s)=>{const{editModelSvc:n}=e,i=n?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,o=n?.getRowValidationModel().getRowValidation(t)?.errorMessages,r=i||o;return r?.length?r.join(s("tooltipValidationErrorSeparator",". ")):void 0},$8=(e,t)=>{if(Vh(e.gos)){if(t.isCellRenderer()){const n=t.column.getColDef();return!!n.showRowGroup||n.cellRenderer==="agGroupCellRenderer"?ha(()=>{const o=t.eGui;return o.querySelector(".ag-group-value")||o.querySelector(".ag-cell-value")||o}):void 0}return ha(()=>{const n=t.eGui;return n.children.length===0?n:n.querySelector(".ag-cell-value")})}},q8=(e,t,s)=>{const{editSvc:n}=e,{column:i}=t,o=$8(e,t),r=()=>n?.isEditing(t)?!1:o?i.isTooltipEnabled()?o():!1:!0;return{shouldDisplayDefault:r,shouldDisplayColumnTooltip:r,shouldDisplayCustomTooltip:s??r}},K8=({beans:e,ctrl:t,value:s,displayFunctions:n,translate:i})=>{const{editSvc:o,formula:r,gos:a}=e,{column:l,rowNode:c}=t;if(r?.active&&l.isAllowFormula()){const C=r.getFormulaError(l,c);if(C)return{value:U8(C,i),location:"cellFormula",shouldDisplay:()=>!!r?.getFormulaError(l,c)}}if(!!!o?.isEditing(t)){const C=jh(e,t,i);if(C)return{value:C,location:"cellEditor",shouldDisplay:()=>!o?.isEditing(t)&&!!jh(e,t,i)}}const{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:p}=n;if(s!=null)return{value:s,location:"cell",shouldDisplay:u};const f=l.getColDef(),m=c.data;if(f.tooltipField&&le(m))return{value:Xr(m,f.tooltipField,l.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:p};const v=f.tooltipValueGetter;return v?{value:v(Te(a,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:c,data:c.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:p}:null},Y8=class extends _{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,s,n){e&&t.destroyBean(e);const i=this.gos,o=Vh(i),{column:r,eGui:a}=t,l=r.getColDef();!n&&o&&!l.headerComponent&&(n=ha(()=>a.querySelector(".ag-header-cell-text")));const c="header",u=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),p=s??u,f={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(Te(i,{location:c,colDef:l,column:r,value:p,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:n,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})};let m=this.createTooltipFeature(f);return m&&(m=t.createBean(m),t.setRefreshFunction("tooltip",()=>m.refreshTooltip())),m}setupHeaderGroupTooltip(e,t,s,n){e&&t.destroyBean(e);const i=this.gos,o=Vh(i),{column:r,eGui:a}=t,l=r.getColGroupDef();!n&&o&&!l?.headerGroupComponent&&(n=ha(()=>a.querySelector(".ag-header-group-text")));const c="headerGroup",u=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),p=s??u,f={getGui:()=>a,getLocation:()=>c,getTooltipValue:()=>s??l?.headerTooltipValueGetter?.(Te(i,{location:c,colDef:l,column:r,value:p,valueFormatted:u}))??l?.headerTooltip,shouldDisplayTooltip:n,getAdditionalParams:()=>{const v={column:r};return l&&(v.colDef=l),v}},m=this.createTooltipFeature(f);return m&&t.createBean(m)}enableCellTooltipFeature(e,t,s){const{beans:n}=this,{column:i,rowNode:o}=e,r=q8(n,e,s),a=this.getLocaleTextFunc();let l=null;const c=()=>(l=K8({beans:n,ctrl:e,value:t,displayFunctions:r,translate:a}),l),u={getGui:()=>e.eGui,getLocation:()=>l?.location??"cell",getTooltipValue:()=>c()?.value,shouldDisplayTooltip:()=>{const p=l??c();return p?p.shouldDisplay?p.shouldDisplay():!0:!1},getAdditionalParams:()=>({column:i,colDef:i.getColDef(),rowIndex:e.cellPosition.rowIndex,node:o,data:o.data,valueFormatted:e.valueFormatted})};return this.createTooltipFeature(u,n)}setupFullWidthRowTooltip(e,t,s,n){const i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>s,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:n},o=this.beans,r=o.context;e&&t.destroyBean(e,r);const a=this.createTooltipFeature(i,o);if(a)return t.createBean(a,r)}setupCellEditorTooltip(e,t){const{beans:s}=this,{context:n}=s,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;const o={getGui:()=>i,getTooltipValue:()=>jh(s,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:a}=s,l=a?.getRowValidationModel()?.getRowValidationMap(),c=a?.getCellValidationModel()?.getCellValidationMap(),d=!!l&&l.size>0,u=!!c&&c.size>0;return d||u}},r=this.createTooltipFeature(o,s);if(r)return e.createBean(r,n)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=le(t.tooltipField)||le(t.tooltipValueGetter)||le(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},Z8=class extends B8{createTooltipComp(e,t){LE(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}},F1={moduleName:"Tooltip",version:ie,beans:[Y8],dynamicBeans:{tooltipFeature:R1,highlightTooltipFeature:G8,tooltipStateManager:Z8},userComponents:{agTooltipComponent:V8},dependsOn:[rd],css:[j8]},So=class{constructor(e){this.cellValueChanges=e}},ju=class extends So{constructor(e,t,s,n){super(e),this.initialRange=t,this.finalRange=s,this.ranges=n}},X8=10,rv=class{constructor(e){this.actionStack=[],this.maxStackSize=e||X8,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},Q8=class extends _{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{const t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},s=this.activeCellEdit!==null&&Up(this.activeCellEdit,t),n=this.activeRowEdit!==null&&vD(this.activeRowEdit,t);if(!(s||n||this.isPasting||this.isRangeInAction))return;const{rowPinned:o,rowIndex:r,column:a,oldValue:l,value:c}=e,d={rowPinned:o,rowIndex:r,columnId:a.getColId(),newValue:c,oldValue:l};this.cellValueChanges.push(d)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:e,ctrlsSvc:t}=this.beans;if(!e.get("undoRedoCellEditing"))return;const s=e.get("undoRedoCellEditingLimit");if(s<=0)return;this.undoStack=new rv(s),this.redoStack=new rv(s),this.addListeners();const n=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:i=>{i.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:n,newColumnsLoaded:n,columnGroupOpened:n,columnRowGroupChanged:n,columnMoved:n,columnPinned:n,columnVisible:n,rowDragEnd:n}),t.whenReady(this,i=>{this.gridBodyCtrl=i.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){const{eventSvc:t,undoStack:s,redoStack:n}=this;t.dispatchEvent({type:"undoStarted",source:e});const i=this.undoRedo(s,n,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:i})}redo(e){const{eventSvc:t,undoStack:s,redoStack:n}=this;t.dispatchEvent({type:"redoStarted",source:e});const i=this.undoRedo(n,s,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:i})}undoRedo(e,t,s,n,i){if(!e)return!1;const o=e.pop();return o?.cellValueChanges?(this.processAction(o,r=>r[n],i),o instanceof ju?this.processRange(o.ranges||[o[s]]):this.processCell(o.cellValueChanges),t.push(o),!0):!1}processAction(e,t,s){const{changeDetectionSvc:n}=this.beans;n?.beginDeferred();try{for(const i of e.cellValueChanges){const{rowIndex:o,rowPinned:r,columnId:a}=i,l={rowIndex:o,rowPinned:r},c=Us(this.beans,l);c?.displayed&&c.setDataValue(a,t(i),s)}}finally{n?.endDeferred()}}processRange(e){let t;const s=this.beans.rangeSvc;s.removeAllCellRanges(!0),e.forEach((n,i)=>{if(!n)return;const o=n.startRow,r=n.endRow;i===e.length-1&&(t={rowPinned:o.rowPinned,rowIndex:o.rowIndex,columnId:n.startColumn.getColId()},this.setLastFocusedCell(t));const a={rowStartIndex:o.rowIndex,rowStartPinned:o.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:n.startColumn,columns:n.columns};s.addCellRange(a)})}processCell(e){const t=e[0],{rowIndex:s,rowPinned:n}=t,i={rowIndex:s,rowPinned:n},o=Us(this.beans,i),r={rowPinned:t.rowPinned,rowIndex:o.rowIndex,columnId:t.columnId};this.setLastFocusedCell(r)}setLastFocusedCell(e){const{rowIndex:t,columnId:s,rowPinned:n}=e,{colModel:i,focusSvc:o,rangeSvc:r}=this.beans,a=i.getCol(s);if(!a)return;const{scrollFeature:l}=this.gridBodyCtrl;l.ensureIndexVisible(t),l.ensureColumnVisible(a);const c={rowIndex:t,column:a,rowPinned:n};o.setFocusedCell({...c,forceBrowserFocus:!0}),r?.setRangeToCell(c)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{const e=new So(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const s=new So(this.cellValueChanges);this.pushActionsToUndoStack(s)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const e=new So(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{const t=new ju(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e;const{rangeSvc:t,gos:s}=this.beans;t&&Yn(s)?e=new ju(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):e=new So(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e==="bulkEditing"?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e==="bulkEditing"&&!this.bulkEditing||e==="batchEditing"&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;const s=new So(t??[]);this.pushActionsToUndoStack(s),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},J8=".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}",eA={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},tA=class extends td{constructor(){super(eA,[eg]),this.eEditor=xe}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute("tabindex","-1"),this.addManagedListeners(this.eEditor,{fieldValueChanged:s=>this.setAriaLabel(s.selected)})}agSetEditValue(e){this.params.value=e;const t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){const t=this.getLocaleTextFunc(),s=Xc(t,e),n=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${n} (${s})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{getValidationErrors:t}=e,s=this.getValue();return t?t({value:s,internalErrors:null,cellEditorParams:e}):null}},fn=class extends Ri{constructor(e,t="ag-text-field",s="text"){super(e,t,s)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const s=this.eInput;return s.value!==e&&(s.value=le(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){const t=this.eInput,s=e.length>0;t.setCustomValidity(e),s&&t.reportValidity(),Sp(t,s)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=s=>{ab(s)&&s.key&&!e.test(s.key)&&s.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:s=>{s.clipboardData?.getData("text")?.split("").some(i=>!e.test(i))&&s.preventDefault()}})}},ad={selector:"AG-INPUT-TEXT-FIELD",component:fn},sA=class extends fn{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=ri();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){dt(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?Ut(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,Zt(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?Ut(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,Zt(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Zt(this.eInput,"step",e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return $t(this.getValue())??void 0}setDate(e,t){this.setValue(Ut(e??null,this.includeTime),t)}},E1={selector:"AG-INPUT-DATE-FIELD",component:sA},ld=class extends td{constructor(e){super(),this.cellEditorInput=e,this.eEditor=xe}initialiseEditor(e){const{cellEditorInput:t}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[t.getTemplate()]},t.getAgComponents());const{eEditor:s}=this,{cellStartedEdit:n,eventKey:i,suppressPreventDefault:o}=e;s.getInputElement().setAttribute("title",""),t.init(s,e);let r,a=!0;n?(this.focusAfterAttached=!0,i===j.BACKSPACE||i===j.DELETE?r="":i&&i.length===1?o?a=!1:r=i:(r=t.getStartValue(),i!==j.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=t.getStartValue()),a&&r!=null&&s.setStartValue(r),this.addGuiEventListener("keydown",l=>{const{key:c}=l;(c===j.PAGE_UP||c===j.PAGE_DOWN)&&l.preventDefault()})}afterGuiAttached(){const e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;ri()||t.getFocusableElement().focus();const s=t.getInputElement();this.highlightAllOnFocus?s.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:e}=this,t=e.getFocusableElement(),s=e.getInputElement();t.focus(),s.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;const t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},nA={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},iA=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return nA}getAgComponents(){return[E1]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:n,step:i,colDef:o}=t;s!=null&&e.setMin(s),n!=null&&e.setMax(n),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(o.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:s}=this,{min:n,max:i,getValidationErrors:o}=s;let r=[];const a=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(n){const l=n instanceof Date?n:new Date(n);if(t<l){const c=l.toLocaleDateString();r.push(a("minDateValidation",`Date must be after ${c}`,[c]))}}if(i){const l=i instanceof Date?i:new Date(i);if(t>l){const c=l.toLocaleDateString();r.push(a("maxDateValidation",`Date must be before ${c}`,[c]))}}}return r.length||(r=null),o?o({value:t,cellEditorParams:s,internalErrors:r}):r}getValue(){const{eEditor:e,params:t}=this,s=e.getDate();return!le(s)&&!le(t.value)?t.value:s??null}getStartValue(){const{value:e}=this.params;if(e instanceof Date)return Ut(e,this.includeTime??!1)}},oA=class extends ld{constructor(){super(new iA(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},rA={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},aA=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return rA}getAgComponents(){return[E1]}init(e,t){this.eEditor=e,this.params=t;const{min:s,max:n,step:i,colDef:o}=t;s!=null&&e.setMin(s),n!=null&&e.setMax(n),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(o.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:e,params:t}=this,s=e.getInputElement().value,n=this.formatDate(this.parseDate(s??void 0)),{min:i,max:o,getValidationErrors:r}=t;let a=[];if(n){const l=new Date(n),c=this.getLocaleTextFunc();if(i){const d=new Date(i);if(l<d){const u=d.toLocaleDateString();a.push(c("minDateValidation",`Date must be after ${u}`,[u]))}}if(o){const d=new Date(o);if(l>d){const u=d.toLocaleDateString();a.push(c("maxDateValidation",`Date must be before ${u}`,[u]))}}}return a.length||(a=null),r?r({value:this.getValue(),cellEditorParams:t,internalErrors:a}):a}getValue(){const{params:e,eEditor:t}=this,s=this.formatDate(t.getDate());return!le(s)&&!le(e.value)?e.value:e.parseValue(s??"")}getStartValue(){return Ut(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){const t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):$t(e)??void 0}formatDate(e){const t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):Ut(e??null,this.includeTime??!1)??void 0}},lA=class extends ld{constructor(){super(new aA(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},cA=class extends Ri{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const s=super.setValue(e,t);return this.eInput.value=e,s}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},dA={selector:"AG-INPUT-TEXT-AREA",component:cA},uA={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},hA=class extends td{constructor(){super(uA,[dA]),this.eEditor=xe}initialiseEditor(e){const{eEditor:t}=this,{cellStartedEdit:s,eventKey:n,maxLength:i,cols:o,rows:r}=e;this.focusAfterAttached=s,t.getInputElement().setAttribute("title",""),t.setMaxLength(i||200).setCols(o||60).setRows(r||10);let a;s?(this.focusAfterAttached=!0,n===j.BACKSPACE||n===j.DELETE?a="":n&&n.length===1?a=n:(a=this.getStartValue(e),n!==j.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,a=this.getStartValue(e)),a!=null&&t.setValue(a,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){const{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;const t=this.getStartValue(this.params);this.eEditor.setValue(t??"",!0)}onKeyDown(e){const t=e.key;(t===j.LEFT||t===j.UP||t===j.RIGHT||t===j.DOWN||e.shiftKey&&t===j.ENTER)&&e.stopPropagation()}afterGuiAttached(){const{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:s}=this,n=this.getLocaleTextFunc();e.setInputAriaLabel(n("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),s&&e.getInputElement().select())}getValue(){const{eEditor:e,params:t}=this,{value:s}=t,n=e.getValue();return!le(n)&&!le(s)?s:t.parseValue(n)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,n=this.getLocaleTextFunc(),i=this.getValue();let o=[];return typeof i=="string"&&t!=null&&i.length>t&&o.push(n("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),o.length||(o=null),s?s({value:i,internalErrors:o,cellEditorParams:e}):o}},dg=class extends fn{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const o=Number.parseFloat(e.value),r=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==r&&this.setValue(r)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:s,max:n,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof s=="number"&&this.setMin(s),typeof n=="number"&&this.setMax(n),typeof i=="number"&&this.setStep(i)}onWheel(e){dt(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===""?"":(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){const s=this.precision;if(s==null)return e;if(t){const i=Number.parseFloat(e).toFixed(s);return Number.parseFloat(i).toString()}const n=String(e).split(".");if(n.length>1){if(n[1].length<=s)return e;if(s>0)return`${n[0]}.${n[1].slice(0,s)}`}return n[0]}setMin(e){return this.min===e?this:(this.min=e,Zt(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Zt(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Zt(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(s=>super.setValue(s,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,s){if(le(s)){let n=this.isScientificNotation(s);if(n&&this.eInput.validity.valid)return e(s);if(!n){s=this.adjustPrecision(s);const i=this.normalizeValue(s);n=s!=i}if(n)return t(s)}return e(s)}getValue(e=!1){const t=this.eInput;if(!t.validity.valid&&!e)return;const s=t.value;return this.isScientificNotation(s)?this.adjustPrecision(s,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},pA={selector:"AG-INPUT-NUMBER-FIELD",component:dg},gA={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},fA=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return gA}getAgComponents(){return[pA]}init(e,t){this.eEditor=e,this.params=t;const{max:s,min:n,precision:i,step:o}=t;s!=null&&e.setMax(s),n!=null&&e.setMin(n),i!=null&&e.setPrecision(i),o!=null&&e.setStep(o);const r=e.getInputElement();t.preventStepping?e.addManagedElementListeners(r,{keydown:this.preventStepping}):t.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:e}=this,{min:t,max:s,getValidationErrors:n}=e,o=this.eEditor.getInputElement().valueAsNumber,r=this.getLocaleTextFunc();let a=[];return typeof o=="number"&&(t!=null&&o<t&&a.push(r("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),s!=null&&o>s&&a.push(r("maxValueValidation",`Must be less than or equal to ${s}.`,[String(s)]))),a.length||(a=null),n?n({value:o,cellEditorParams:e,internalErrors:a}):a}preventStepping(e){(e.key===j.UP||e.key===j.DOWN)&&e.preventDefault()}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();if(!le(s)&&!le(t.value))return t.value;let n=t.parseValue(s);if(n==null)return n;if(typeof n=="string"){if(n==="")return null;n=Number(n)}return isNaN(n)?null:n}getStartValue(){return this.params.value}setCaret(){ri()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},mA=class extends ld{constructor(){super(new fA(()=>this.getLocaleTextFunc()))}},vA=".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}",CA="ag-active-item",wA=(e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}),bA=class extends or{constructor(e,t,s){super(wA(e,t)),this.label=t,this.value=s,this.eText=xe}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){const t=this.getGui();t.classList.toggle(CA,e),ZC(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){const s=this.getGui();b3(s,e),w3(s,t)}createTooltip(){const e={getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>tw(this.eText)},t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,e,this));t&&(this.tooltipFeature=t)}addEventListeners(){const e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},xA=class extends or{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(vA)}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){const t=e.key;switch(t){case j.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{const s=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(s)}break;case j.DOWN:case j.UP:e.preventDefault(),this.navigate(t);break;case j.PAGE_DOWN:case j.PAGE_UP:case j.PAGE_HOME:case j.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){const{value:t,text:s}=e,n=s??t;return this.options.push({value:t,text:n}),this.renderOption(t,n),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const e of this.listItems)e.destroy();Jt(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){const t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const s=this.options.findIndex(n=>n.value===e);if(s!==-1){const n=this.options[s];this.value=n.value,this.displayValue=n.text,this.highlightItem(this.listItems[s]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){const t=e.getGui();if(!Ts(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;const s=this.getGui(),{scrollTop:n,clientHeight:i}=s,{offsetTop:o,offsetHeight:r}=t;(o+r>n+i||o<n)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){const s=new bA(this.cssIdentifier,t,e);s.setParentComponent(this);const n=this.createManagedBean(s);this.listItems.push(n),this.getGui().appendChild(n.getGui())}navigate(e){const t=e===j.DOWN;let s;const{listItems:n,highlightedItem:i}=this;if(!i)s=t?n[0]:et(n);else{let r=n.indexOf(i)+(t?1:-1);r=Math.min(Math.max(r,0),n.length-1),s=n[r]}this.highlightItem(s)}navigateToPage(e){const{listItems:t,highlightedItem:s}=this;if(!s||t.length===0)return;const n=t.indexOf(s),i=this.options.length-1,o=t[0].getHeight(),r=Math.floor(this.getGui().clientHeight/o);let a=-1;e===j.PAGE_HOME?a=0:e===j.PAGE_END?a=i:e===j.PAGE_DOWN?a=Math.min(n+r,i):e===j.PAGE_UP&&(a=Math.max(n-r,0)),a!==-1&&this.highlightItem(t[a])}refreshAriaRole(){Gi(this.getGui(),this.options.length===0?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const e=this.listItems,t=e.length;e.forEach((s,n)=>{s.setIndex(n+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},yA=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}",SA={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},RA=class extends Mb{constructor(e){if(super(e,e?.template||SA,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=xe,this.eWrapper=xe,this.eDisplayField=xe,this.eIcon=xe,this.registerCSS(yA),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:s,variableWidth:n,minPickerWidth:i,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!n,s!=null&&this.setPickerMaxHeight(s),i!=null&&this.setPickerMinWidth(i),o!=null&&this.setPickerMaxWidth(o)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:s,inputWidth:n}=this.config;if(s){const i=this.beans.iconSvc.createIconNoSpan(s);i&&this.eIcon.appendChild(i)}n!=null&&this.setInputWidth(n)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),ph(e,!1),this.ariaRole&&Gi(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case j.UP:case j.DOWN:case j.ENTER:case j.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case j.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:s,pickerAriaLabelValue:n,modalPicker:i=!0},maxPickerHeight:o,minPickerWidth:r,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:d}=this,u={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{const v=bp(c);this.beforeHidePicker(),v&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(s,n),anchorToElement:d};e.style.position="absolute";const p=c.popupSvc,f=p.addPopup(u);l?(r&&(e.style.minWidth=r),e.style.width=Dp(ic(d)),a&&(e.style.maxWidth=a)):ac(e,a??ic(d));const m=o??`${Fp(p.getPopupParent())}px`;return e.style.setProperty("max-height",m),this.alignPickerToComponent(),f.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:s,gos:n},eWrapper:i,pickerComponent:o}=this,r=n.get("enableRtl")?"right":"left";s.positionPopupByComponent({type:t,eventSource:i,ePopup:o.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();ph(t,e);const s=this.eWrapper.classList;s.toggle("ag-picker-expanded",e),s.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return ac(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},FA=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",ug=class extends RA{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(FA)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:ha(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:s}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),s&&t==null&&(this.eDisplayField.textContent=s),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new xA("select"));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),s=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",s),P3(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:n=>{n?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){const{key:t}=e;switch(t===j.TAB&&this.hidePicker(),t){case j.ENTER:case j.UP:case j.DOWN:case j.PAGE_UP:case j.PAGE_DOWN:case j.PAGE_HOME:case j.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case j.ESCAPE:super.onKeyDown(e);break;case j.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(const t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,s){const{listComponent:n,config:{placeholder:i},eDisplayField:o,tooltipFeature:r}=this;if(this.value===e||!n)return this;if(s||n.setValue(e,!0),n.getValue()===this.getValue())return this;let l=n.getDisplayValue();return l==null&&i&&(l=i),o.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},EA={selector:"AG-SELECT",component:ug},DA={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},PA=class extends td{constructor(){super(DA,[EA]),this.eEditor=xe,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;const{eEditor:t,valueSvc:s,gos:n}=this,{values:i,value:o,eventKey:r}=e;if(ht(i)){X(58);return}this.startedByEnter=r!=null?r===j.ENTER:!1;let a=!1;i.forEach(u=>{const p={value:u},f=s.formatValue(e.column,null,u),m=f!=null;p.text=m?f:u,t.addOption(p),a=a||o===u}),a?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);const{valueListGap:l,valueListMaxWidth:c,valueListMaxHeight:d}=e;l!=null&&t.setPickerGap(l),d!=null&&t.setPickerMaxHeight(d),c!=null&&t.setPickerMaxWidth(c),n.get("editType")!=="fullRow"&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:e}=this,{values:t,getValidationErrors:s}=e,n=this.getValue();let i=[];if(t&&n!=null&&!t.includes(n)){const o=this.getLocaleTextFunc();i.push(o("invalidSelectionValidation","Invalid selection."))}else i=null;return s?s({value:n,internalErrors:i,cellEditorParams:e}):i}},TA={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},kA=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return TA}getAgComponents(){return[ad]}init(e,t){this.eEditor=e,this.params=t;const s=t.maxLength;s!=null&&e.setMaxLength(s)}getValidationErrors(){const{params:e}=this,{maxLength:t,getValidationErrors:s}=e,n=this.getValue(),i=this.getLocaleTextFunc();let o=[];return t!=null&&typeof n=="string"&&n.length>t&&o.push(i("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),o.length||(o=null),s?s({value:n,cellEditorParams:e,internalErrors:o}):o}getValue(){const{eEditor:e,params:t}=this,s=e.getValue();return!le(s)&&!le(t.value)?t.value:t.parseValue(s)}getStartValue(){const e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){ri()&&this.eEditor.getInputElement().focus({preventScroll:!0});const e=this.eEditor,t=e.getValue(),s=le(t)&&t.length||0;s&&e.getInputElement().setSelectionRange(s,s)}},av=class extends ld{constructor(){super(new kA(()=>this.getLocaleTextFunc()))}};function IA(e){e.undoRedo?.undo("api")}function MA(e){e.undoRedo?.redo("api")}function AA(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function LA(e){const t=e.editModelSvc?.getEditMap(),s=[];return t?.forEach((n,i)=>{const{rowIndex:o,rowPinned:r}=i;n.forEach((a,l)=>{const{editorValue:c,pendingValue:d,sourceValue:u,state:p}=a,f=Ds(a);let m=c??d;m===kt&&(m=void 0);const v={newValue:m,oldValue:u,state:p,column:l,colId:l.getColId(),colKey:l.getColId(),rowIndex:o,rowPinned:r},C=p==="editing";(C||!C&&f)&&s.push(v)})}),s}function NA(e,t=!1){const{editSvc:s}=e;if(s?.isBatchEditing()){if(t)for(const n of e.editModelSvc?.getEditPositions()??[])n.state==="editing"&&s.revertSingleCellEdit(n);else _n(e,{persist:!0});Gn(e,void 0,{cancel:t})}else s?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})}function OA(e,t){const s=Ke(e,t);return!!e.editSvc?.isEditing(s)}function HA(e,t){const{key:s,colKey:n,rowIndex:i,rowPinned:o}=t,{editSvc:r,colModel:a}=e,l=a.getCol(n);if(!l){X(12,{colKey:n});return}const d=Us(e,{rowIndex:i,rowPinned:o||null});if(!d){X(290,{rowIndex:i,rowPinned:o});return}if(!r?.isCellEditable({rowNode:d,column:l},"api"))return;o==null&&v1(e,i),m1(e,n),r?.startEditing({rowNode:d,column:l},{event:s?new KeyboardEvent("keydown",{key:s}):void 0,source:"api",editable:!0})}function BA(e){return e.editSvc?.validateEdit()||null}function GA(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function VA(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var jA={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},zA=class extends zp{constructor(e){super(jA),this.params=e}postConstruct(){zi(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const e=this.getGui(),t=this.params,s=n=>{Ph(this.gos,n,t.node,t.column,!0)||t.onKeyDown(n)};this.addManagedElementListeners(e,{keydown:s})}};function WA(e,{column:t},s,n,i="ui"){if(s instanceof KeyboardEvent&&(s.key===j.TAB||s.key===j.ENTER||s.key===j.F2||s.key===j.BACKSPACE&&n))return!0;if(s?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;const r=t?.getColDef(),a=_A(e.gos,r),l=s?.type;return l==="click"&&s?.detail===1&&a===1||l==="dblclick"&&s?.detail===2&&a===2?!0:i==="api"?!!n:!1}function _A(e,t){return e.get("suppressClickEdit")===!0?0:e.get("singleClickEdit")===!0||t?.singleClickEdit?1:2}function zu(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function zh(e,t){const s=t.column,n=t.rowNode,i=s.getColDef();if(!n)return zu(e,t);const o=i.editable;return n.group&&i.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(n,s)?!0:zu(e,t):s.isColumnFunc(n,o)?!0:zu(e,t)}function UA(e,t,s="ui"){const n=zh(e,t);if(n||s==="ui")return n;const{rowNode:i,column:o}=t;for(const r of e.colModel.getCols())if(r!==o&&zh(e,{rowNode:i,column:r}))return!0;return!1}var Dc=(e,t=!1)=>{if(e!==void 0)return Ds(e)||t&&e.state==="editing"};function D1(e,t,s=!1){return Dc(e.editModelSvc?.getEdit(t),s)}var P1=(e,t,s)=>{if(e)for(let n=0,i=e.length;n<i;++n){const o=e[n];if(o.data&&(Dc(t?.getEdit({rowNode:o,column:s}))||Dc(t?.getEdit({rowNode:o.pinnedSibling,column:s})))||P1(o.childrenAfterGroup,t,s))return!0}};function T1(e,t){const{column:s,rowNode:n}=t;return e.gos.get("groupTotalRow")&&!n?.footer?!1:P1(n?.childrenAfterGroup,e.editModelSvc,s)}function k1(e,{rowNode:t,column:s}){if(t=t.pinnedSibling,!!t)return Dc(e.editModelSvc?.getEdit({rowNode:t,column:s}))}var $A=class extends _{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:e,editSvc:t,beans:s}=this;if(t?.isBatchEditing()&&t.isEditing()){const i=D1(s,e)||T1(s,e)||k1(s,e);this.applyBatchingStyle(i)}else this.applyBatchingStyle(!1);const n=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",n)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},qA=class extends _{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){const{rowCtrl:e,editModelSvc:t,beans:s}=this;let n=e.rowNode,i=t?.getEditRow(n);const o=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:n});if(!i&&n.pinnedSibling&&(n=n.pinnedSibling,i=t?.getEditRow(n)),i){const r=Array.from(i.keys()).some(a=>{const l={rowNode:n,column:a};return D1(s,l,!0)||T1(s,l)||k1(s,l)});this.applyStyle(o,r);return}this.applyStyle(o)}applyStyle(e=!1,t=!1){const s=!!this.editSvc?.isBatchEditing(),n=this.gos.get("editType")==="fullRow";this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss("ag-row-editing",n&&t),i.toggleCss("ag-row-batch-edit",n&&t&&s),i.toggleCss("ag-row-inline-editing",t),i.toggleCss("ag-row-not-inline-editing",!t),i.toggleCss("ag-row-editing-invalid",n&&t&&e)})}},KA=({rowModel:e,pinnedRowModel:t,editModelSvc:s},n)=>{const i=new Set;e.forEachNode(o=>n.has(o)&&i.add(o)),t?.forEachPinnedRow("top",o=>n.has(o)&&i.add(o)),t?.forEachPinnedRow("bottom",o=>n.has(o)&&i.add(o));for(const o of n)i.has(o)||s.removeEdits({rowNode:o});return i},YA=({editModelSvc:e},t,s)=>{for(const n of t)e?.getEditRow(n)?.forEach((i,o)=>!s.has(o)&&e.removeEdits({rowNode:n,column:o}))},ZA=e=>()=>{const t=new Set(e.colModel.getCols()),s=e.editModelSvc.getEditMap(!0),n=new Set(s.keys());YA(e,KA(e,n),t)},XA=new Set(["undo","redo","paste","bulk","rangeSvc"]),QA=new Set(["ui","api"]),I1={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},JA=new Set(Object.keys(I1)),e7=new Set(["paste","rangeSvc","cellClear","redo","undo"]),Wu={cancel:!0,source:"api"},t7={cancel:!1,source:"api"},Ci={checkSiblings:!0},On={force:!0,suppressFlash:!0},s7={force:!0},n7=class extends _{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){const{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:n})=>{this.stopEditing(void 0,Wu),this.createStrategy(n)});const t=ZA(e),s=()=>{const n=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return n||i?this.stopEditing(void 0,Wu):this.isEditing()&&(this.batch?Gn(e,this.model.getEditPositions()):this.stopEditing(void 0,t7)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:s,filterChanged:s,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,Wu))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){!this.batch||this.batchStartDispatched||(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){const{beans:t,gos:s,strategy:n}=this,i=lv(s,e);if(n){if(n.beanName===i)return n;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,s,n="ui"){const i=WA(this.beans,e,t,s,n);return i&&(this.strategy??(this.strategy=this.createStrategy())),i}shouldStopEditing(e,t,s="ui"){return this.strategy?.shouldStop(e,t,s)??null}shouldCancelEditing(e,t,s="ui"){return this.strategy?.shouldCancel(e,t,s)??null}validateEdit(){return Gk(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??Ci)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){const{startedEdit:s=!0,event:n=null,source:i="ui",ignoreEventKey:o=!1,silent:r}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;const l=Ke(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}const c=this.shouldStartEditing(e,n,s,i);if(c===!1&&i!=="api"){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:n,source:i,ignoreEventKey:o,startedEdit:s,silent:r})}stopEditing(e,t){const s=this.prepareStopContext(e,t);if(!s)return!1;this.stopping=!0;let n=!1,{edits:i}=s;try{const o=this.processStopRequest(s);return n||(n=o.res),i=o.edits,this.finishStopEditing({...s,edits:i,params:t,position:e,res:n}),n}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){const{event:s=null,cancel:n=!1,source:i="ui",forceCancel:o=!1,forceStop:r=!1,commit:a=!1}=t||{};if(JA.has(i)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;const l=this.committing?I1[i]:i;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,Ci))||!this.strategy||this.stopping)return null;const d=Ke(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);const u=!n&&(!!this.shouldStopEditing(e,s,l)||(this.committing||i==="paste")&&!this.batch)||r,p=n&&!!this.shouldCancelEditing(e,s,l)||o;return{cancel:n,cellCtrl:d,edits:this.model.getEditMap(!0),event:s??null,forceCancel:o,forceStop:r,commit:a,position:e,source:i,treatAsSource:l,willCancel:p,willStop:u}}processStopRequest(e){const{event:t,position:s,willCancel:n,willStop:i}=e;return i||n?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,s)?{res:!1,edits:this.handleMidBatchKey(t,s,e)}:(_n(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(s),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){const{beans:t,model:s}=this,{cancel:n,commit:i,edits:o,event:r,source:a,willCancel:l,willStop:c}=e,d=!this.batch||!l;_n(t,{persist:d,isCancelling:l||n,isStopping:c});const u=s.getEditMap(),f=!l&&(!this.batch||i)?this.processEdits(u,a):[];n?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(r,i),this.clearValidationIfNoOpenEditors();for(const m of f)s.clearEditValue(m);this.bulkRefreshMap(o);for(const m of s.getEditPositions(u)){const v=Ke(t,m),C=Ds(m);v?.refreshCell({force:!0,suppressFlash:!C})}return{res:c,edits:u}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,s){const{beans:n,model:i}=this,{cellCtrl:o,edits:r}=s,{key:a}=e,l=a===j.ENTER,c=a===j.ESCAPE,d=a===j.TAB;if(l||d||c){if(l||d)_n(n,{persist:!0});else if(c&&o){const{rowNode:u,column:p}=o;if(this.batch&&u&&p){const f={rowNode:u,column:p};Gn(n,[f],{silent:!0}),this.model.stop(f,!0,!0),Ke(n,f)?.refreshCell(On)}else this.revertSingleCellEdit(o)}return this.batch?this.strategy?.cleanupEditors():Gn(n,i.getEditPositions(),{event:e,cancel:c}),e.preventDefault(),this.bulkRefreshMap(r,{suppressFlash:!0}),i.getEditMap()}return r}finishStopEditing({cellCtrl:e,edits:t,params:s,position:n,res:i,commit:o,forceCancel:r,willCancel:a,willStop:l}){const c=this.beans;i&&n&&(!this.batch||o)&&this.model.removeEdits(n),this.navigateAfterEdit(s,e?.cellPosition),Vr(c),this.clearValidationIfNoOpenEditors();const{rowRenderer:d,formula:u}=c;if(a&&d.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):d.refreshRows({suppressFlash:!0,force:!0});const p=l&&o;(p||a&&r)&&this.dispatchBatchStopped(t,p)}}dispatchBatchStopped(e,t){let s;t&&(s=Ik(e),s.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",s??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;const{event:s,suppressNavigateAfterEdit:n}=e;if(!(s instanceof KeyboardEvent)||n)return;const{key:o,shiftKey:r}=s,a=this.gos.get("enterNavigatesVerticallyAfterEdit");if(o!==j.ENTER||!a)return;const l=r?j.UP:j.DOWN;this.beans.navigation?.navigateToNextCell(null,l,t,!1)}processEdits(e,t){const s=Array.from(e.keys()),n=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,i=[],{changeDetectionSvc:o}=this.beans;o?.beginDeferred();try{for(const r of s){const a=e.get(r);for(const l of a.keys()){const c=a.get(l),d={rowNode:r,column:l};if(Ds(c)&&!n){const u=Ke(this.beans,d);this.setNodeDataValue(r,l,c.pendingValue,u,t)||i.push(d)}}}}finally{o?.endDeferred()}return i}setNodeDataValue(e,t,s,n,i="edit"){const o=QA.has(i)?"edit":i;n&&(n.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,s,o)}finally{this.committing=!1,n&&(n.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){const s=this.model.getEdit(e);s&&s.state!=="editing"&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:s.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let s=On;t?.forceRefreshOfEditCellsOnly&&(s={...i7(e),...On}),this.beans.rowRenderer.refreshCells(s)}dispatchEditValuesChanged({rowNode:e,column:t},s={}){if(!e||!t||!s)return;const{pendingValue:n,sourceValue:i}=s,{rowIndex:o,rowPinned:r,data:a}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:o,rowPinned:r,column:t,source:"api",data:a,newValue:n,oldValue:i,value:n,colDef:t.getColDef()})}bulkRefreshCell(e,t){gt(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){gt(this.gos,this.beans.rowModel)&&e.forEach((s,n)=>{for(const i of s.keys())this.refCell({rowNode:n,column:i},s.get(i),t)})}refCell({rowNode:e,column:t},s,n={}){const{beans:i,gos:o}=this,r=new Set([e]),a=new Set,l=e.pinnedSibling;l&&r.add(l);const c=e.sibling;c&&a.add(c);let d=e.parent;for(;d;)d.sibling?.footer&&o.get("groupTotalRow")||!d.parent&&d.sibling&&o.get("grandTotalRow")?a.add(d.sibling):a.add(d),d=d.parent;for(const u of r)this.dispatchEditValuesChanged({rowNode:u,column:t},s);for(const u of r)Ke(i,{rowNode:u,column:t})?.refreshCell(n);for(const u of a){const p=Ke(i,{rowNode:u,column:t});p&&(p.refreshCell(n),!n.force&&this.batch&&p.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){const{gos:s,beans:n}=this,i=e.rowNode;if(i.group&&e.column.getColDef().groupRowEditable==null){if(s.get("treeData")){if(!i.data&&!s.get("enableGroupEdit"))return!1}else if(!s.get("enableGroupEdit"))return!1}const o=lv(s)==="fullRow"?UA(n,e,t):zh(n,e);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}cellEditingInvalidCommitBlocks(){return this.gos.get("invalidEditValueMode")==="block"}checkNavWithValidation(e,t,s=!0){if(this.hasValidationErrors(e)){const n=Ke(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),s&&(n&&!n.hasBrowserFocus()&&n.focusCell(),n?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(n&&this.revertSingleCellEdit(n),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){const s=Ke(this.beans,e);s?.comp?.getCellEditor()&&(Gn(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),qi(this.beans,e,{silent:!0}),qn(this.beans),s?.refreshCell(On),t&&(s?.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){qn(this.beans);const t=Ke(this.beans,e);t&&(t.refreshCell(On),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let s=!1;return e?.rowNode?(s||(s=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(s||(s=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(s||(s=this.model.getCellValidationModel().getCellValidationMap().size>0),s||(s=this.model.getRowValidationModel().getRowValidationMap().size>0)),s}moveToNextCell(e,t,s,n="ui"){let i;const o=this.isEditing(),r=o&&this.checkNavWithValidation(void 0,s)==="block-stop";return e instanceof zo&&o&&(i=this.strategy?.moveToNextEditingCell(e,t,s,n,r)),i===null||(i=i||!!this.beans.focusSvc.focusedHeader,i===!1&&!r&&this.stopEditing()),i}getPendingEditValue(e,t,s){if(s==="data"||s==="batch"&&!this.batch)return;const n=this.model.getEdit({rowNode:e,column:t},Ci);if(!n||this.stopping&&!this.batch&&!n.editorState?.cellStartedEditing)return;if(s==="edit"){const o=n.editorValue;if(o!=null&&o!==kt)return o}const i=n.pendingValue;if(i!==kt)return i}getCellDataValue(e){const t=this.model.getEdit(e,Ci);if(t){const s=t.pendingValue;if(s!==kt)return s;const n=t.sourceValue;if(n!=null)return n}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){Pk(this,this.beans,e)}createPopupEditorWrapper(e){return new zA(e)}batchResetToSourceValue(e){if(!this.batch)return!1;const t=this.model.getEdit(e);if(!t)return!1;const{pendingValue:s,sourceValue:n,state:i}=t;return s===n||i==="editing"?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:n}),this.beans.editModelSvc?.removeEdits(e),Ke(this.beans,e)?.refreshCell(On),!0)}setDataValue(e,t,s){try{const n=this.batch,i=this.isEditing(n?void 0:e);if((!i||this.committing)&&!n&&!e7.has(s)||!i&&!n&&s==="paste"||s==="batch"&&!n)return;if(s==="edit"){if(i&&this.applyEditorValue(e,t))return!0;if(!n)return}if(this.strategy??(this.strategy=this.createStrategy()),s==="batch"||s==="edit")return this.applyDirectValue(e,t,s);const o=this.beans;let r;if(n?r="ui":this.committing?r=s??"api":r="api",!s||XA.has(s))return this.applyDirectValue(e,t,s);const a=this.applyExistingEdit(e,t,s,r);return a!==void 0?a:(yo(o,e,t,s,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}finally{this.committing=!1}}applyExistingEdit(e,t,s,n){const i=this.model.getEdit(e);if(i)return i.pendingValue===t?!1:i.sourceValue!==t?(yo(this.beans,e,t,s,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:n,suppressNavigateAfterEdit:!0}),!0):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...i,pendingValue:t}),!0)}applyEditorValue(e,t){const s=this.beans,n=Ke(s,e),i=n?.comp?.getCellEditor();return!n||!i?!1:(yo(s,e,t,"edit",void 0,{persist:!0}),n.editStyleFeature?.applyCellStyles?.(),"agSetEditValue"in i?(i.agSetEditValue(t),!0):i.refresh&&n.editCompDetails?(i.refresh({...n.editCompDetails.params,value:t}),!0):(n.hasBrowserFocus()&&n.onEditorAttachedFuncs.push(()=>{const r=Ke(this.beans,e);r?.focusCell(!0),r?.comp?.getCellEditor()?.focusIn?.()}),Gn(s,[e],{silent:!0,cancel:!0}),qi(s,e,{silent:!0}),qn(s),Ke(s,e)?.refreshCell(On),!0))}applyDirectValue(e,t,s){const n=this.beans;if(this.batch){if(s==="batch"&&Ke(n,e)?.comp?.getCellEditor()){const{editModelSvc:r,valueSvc:a}=n,{rowNode:l,column:c}=e;r?.getEdit(e)?.sourceValue===void 0&&r?.setEdit(e,{sourceValue:a.getValue(c,l,"data")}),r?.setEdit(e,{pendingValue:t})}else yo(n,e,t,s,void 0,{persist:!0}),s!=="batch"&&this.cleanupEditors();return Vr(n),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}yo(n,e,t,s,void 0,{persist:!0});const i=Ke(n,e),o=this.setNodeDataValue(e.rowNode,e.column,t,i,s);return this.syncEditAfterCommit(e,o),Vr(n),Ke(n,e)?.refreshCell(o?s7:On),o}handleColDefChanged(e){Ak(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){const{model:s}=this;if(!this.batch||!s.hasRowEdits(e.rowNode,Ci))return;const{rowNode:i}=e,{compDetails:o,valueToDisplay:r}=t;if(o){const{params:a}=o;return a.data=s.getEditRowDataValue(i,Ci),{compDetails:o}}return{valueToDisplay:r}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,s,n){this.strategy?.dispatchCellEvent(e,t,s,n)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return Te(this.gos,{type:e,...e==="batchEditingStopped"?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue}))}applyBulkEdit({rowNode:e,column:t},s){if(!s||s.length===0)return;const{beans:n,rangeSvc:i,valueSvc:o}=this,{formula:r}=n;_n(n,{persist:!0});const a=this.model.getEditMap(!0);let l=a.get(e)?.get(t)?.pendingValue,c=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),c=!0);const d=r?.isFormula(l)??!1;s.forEach(p=>{const f=p.columns.some(m=>m?.isAllowFormula());if(i?.forEachRowInRange(p,m=>{const v=Us(n,m);if(v===void 0)return;const C=a.get(v)??new Map;let w=l;for(const b of p.columns){if(!b)continue;const x=!!d&&b.isAllowFormula();if(this.isCellEditable({rowNode:v,column:b},"api")){const S=o.getValue(b,v,"data",!0);let y=o.parseValue(b,v??null,w,S);Number.isNaN(y)&&(y=null),C.set(b,{editorValue:void 0,pendingValue:y,sourceValue:S,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}x&&(w=r?.updateFormulaByOffset({value:w,columnDelta:1}))}C.size>0&&a.set(v,C),d&&f&&(l=r?.updateFormulaByOffset({value:l,rowDelta:1}))}),this.setEditMap(a),this.batch){this.cleanupEditors(),Vr(n),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,c&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(a)})}});const u=Ke(n,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new $A(e,this.beans)}createRowStyleFeature(e){return new qA(e,this.beans)}setEditingCells(e,t){const{beans:s}=this,{colModel:n,valueSvc:i}=s,o=new Map;for(let{colId:r,column:a,colKey:l,rowIndex:c,rowPinned:d,newValue:u,state:p}of e){const f=r?n.getCol(r):l?n.getCol(l):a;if(!f)continue;const m=Us(s,{rowIndex:c,rowPinned:d});if(!m)continue;const v=i.getValue(f,m,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!Ds({pendingValue:u,sourceValue:v})&&p!=="editing")continue;let C=o.get(m);C||(C=new Map,o.set(m,C)),u===void 0&&(u=kt),C.set(f,{editorValue:void 0,pendingValue:u,sourceValue:v,state:p??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(o,t)}onCellFocused(e){const t=Ke(this.beans,e);if(!t||!this.isEditing(t,Ci))return;const s=this.model.getEdit(t);if(!s||!Ds(s))return;const i=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(i,"pendingChange")}allowedFocusTargetOnValidation(e){return Ke(this.beans,e)}};function i7(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(t=>Array.from(t.keys())))]:void 0}}function lv(e,t){return t??e.get("editType")??"singleCell"}var M1=class extends _{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t;const s=e.previousParams,{editSvc:n,beans:i}=this,o=e.type==="cellFocused"?e.sourceEvent:null;s&&(t=Ke(i,s));const{gos:r,editModelSvc:a}=i,l=e.type==="cellFocusCleared";if(n.isEditing(void 0,{withOpenEditor:!0})){const{column:c,rowIndex:d,rowPinned:u}=e,p={column:c,rowNode:Us(i,{rowIndex:d,rowPinned:u})},f=r.get("invalidEditValueMode")==="block";if(f)return;const m=!f,v=!!a?.getCellValidationModel().hasCellValidation(p),C=m&&v;!(s||l)||n.stopEditing(void 0,{cancel:C,source:l&&m?"api":void 0,event:o})||(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){const t=this.editSvc.isBatchEditing()&&!e;for(const s of this.model.getEditPositions())wa(this.beans,s,{cancel:!0},Ke(this.beans,s)),this.model.stop(s,t,!0);return!0}stopCommitted(e,t){const s=this.model.getEditPositions(),n={all:[],pass:[],fail:[]};for(const r of s)n.all.push(r),(this.model.getCellValidationModel().getCellValidation(r)?.errorMessages?.length??0)>0?n.fail.push(r):n.pass.push(r);const i=this.processValidationResults(n),o=this.editSvc.isBatchEditing()&&!t;for(const r of i.destroy)wa(this.beans,r,{event:e},Ke(this.beans,r)),this.model.stop(r,o,!1);for(const r of i.keep){const a=Ke(this.beans,r);!this.editSvc.cellEditingInvalidCommitBlocks()&&a&&this.editSvc.revertSingleCellEdit(a)}return!0}cleanupEditors({rowNode:e}={},t){_n(this.beans,{persist:!1});const s=this.model.getEditPositions(),n=[];if(e)for(const i of s)i.rowNode!==e&&n.push(i);else for(const i of s)n.push(i);Gn(this.beans,n),Vr(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){const t=e.comp,s=t?.getCellEditor();if(s?.focusIn)s.focusIn();else{const n=this.beans.gos.get("editType")==="fullRow";e.focusCell(n),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){const{event:t,ignoreEventKey:s=!1,startedEdit:n,position:i,cells:o=this.model.getEditPositions()}=e,r=t instanceof KeyboardEvent&&!s&&t.key||void 0;kk(this.beans,o,i,r,t,n)}dispatchCellEvent(e,t,s,n){const i=Ke(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,s),...n})}dispatchRowEvent(e,t,s){if(s)return;const n=Rc(this.beans,e);n&&this.eventSvc.dispatchEvent(n.createRowEvent(t))}shouldStop(e,t,s="ui"){const n=this.editSvc.isBatchEditing();return n&&s==="api"?!0:n&&(s==="ui"||s==="edit")?!1:s==="api"?!0:t instanceof KeyboardEvent&&!n?t.key===j.ENTER:null}shouldCancel(e,t,s="ui"){const n=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!n&&t.key===j.ESCAPE||n&&s==="api"||s==="api")}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const s=[];if(e.forEach((n,i)=>{n.forEach((o,r)=>{o.state==="editing"&&s.push({...o,rowNode:i,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),s.length>0){const n=s.at(-1),i=n.pendingValue===kt?void 0:n.pendingValue;this.start({position:n,event:new KeyboardEvent("keydown",{key:i}),source:"api"});const o=Ke(this.beans,n);o&&this.setFocusInOnEditor(o)}}destroy(){this.cleanupEditors(),super.destroy()}},o7=class extends M1{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=new Set}shouldStop(e,t,s="ui"){const{rowNode:n,beans:i}=this,{rowNode:o}=e||{};if(!Rc(i,{rowNode:n}))return!0;const a=super.shouldStop({rowNode:n},t,s);return a!==null?a:n?o!==n:!1}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){const{position:t,silent:s,startedEdit:n,event:i,ignoreEventKey:o}=e,{rowNode:r}=t,{beans:a,model:l,startedRows:c}=this;this.rowNode!==r&&super.cleanupEditors(t);const d=a.visibleCols.allCols,u=[],p=[];for(const f of d)f.isCellEditable(r)&&p.push(f);if(p.length!=0){c.has(r)||(this.dispatchRowEvent({rowNode:r},"rowEditingStarted",s),c.add(r));for(const f of p){const m={rowNode:r,column:f};u.push(m),l.start(m)}this.rowNode=r,this.setupEditors({cells:u,position:t,startedEdit:n,event:i,ignoreEventKey:o})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){const{rowNode:t,model:s}=this;return t&&!s.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){const{rowNode:s,beans:n,model:i,editSvc:o}=this;if(s&&!i.hasRowEdits(s))return!1;const r=[];if(i.getEditMap().forEach((a,l)=>{if(!(!a||a.size===0)){for(const c of a.values())if(Ds(c)){r.push(l);break}}}),qn(n),o.checkNavWithValidation({rowNode:s})==="block-stop")return!1;if(super.stopCommitted(e,t),t||!o.isBatchEditing())for(const a of r)this.dispatchRowEvent({rowNode:a},"rowValueChanged");return this.cleanupEditors({rowNode:s},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){const{rowIndex:t}=e,s=e.previousParams;if(s?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;const{beans:n,gos:i,model:o}=this;if(n.editSvc?.isRangeSelectionEnabledWhileEditing())return;const r=Ke(n,s);i.get("invalidEditValueMode")==="block"&&r&&(o.getCellValidationModel().getCellValidation(r)||o.getRowValidationModel().getRowValidation(r))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);const{startedRows:s}=this;for(const n of s)this.dispatchRowEvent({rowNode:n},"rowEditingStopped"),this.destroyEditorsForRow(n);s.clear()}destroyEditorsForRow(e){const t=Rc(this.beans,{rowNode:e});if(!t)return;const s={};for(const n of t.getAllCellCtrls())n.comp?.getCellEditor()&&wa(this.beans,n,s,n)}moveToNextEditingCell(e,t,s,n="ui",i=!1){const{beans:o,model:r,gos:a,editSvc:l}=this,c=e.cellPosition;let d;r.suspend(!0);try{d=o.navigation?.findNextCellToFocusOn(c,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{r.suspend(!1)}if(d===!1)return null;if(d==null)return!1;const u=d.cellPosition,p=e.isCellEditable(),f=d.isCellEditable(),m=u&&c.rowIndex===u.rowIndex&&c.rowPinned===u.rowPinned;p&&this.setFocusOutOnEditor(e),this.restoreEditors();const v=a.get("suppressStartEditOnTab");return f&&!i?v?d.focusCell(!0,s):(d.comp?.getCellEditor()||qi(o,d,{event:s,cellStartedEdit:!0}),this.setFocusInOnEditor(d),d.focusCell(!1,s)):(f&&i&&this.setFocusInOnEditor(d),d.focusCell(!0,s)),!m&&!i&&(l?.stopEditing({rowNode:e.rowNode},{event:s,forceStop:!0}),l?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(d,!0),v?d.focusCell(!0,s):l.startEditing(d,{startedEdit:!0,event:s,source:n,ignoreEventKey:!0,editable:f||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){const{beans:e,model:t}=this;t.getEditMap().forEach((s,n)=>s.forEach(({state:i},o)=>{if(i!=="editing")return;const r=Ke(e,{rowNode:n,column:o});r&&!r.comp?.getCellEditor()&&qi(e,r,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}},r7=class extends M1{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,s="ui"){const n=super.shouldStop(e,t,s);if(n!==null)return n;const i=e?.rowNode,o=e?.column,r=this.rowNode,a=this.column;return(!r||!a)&&i&&o?null:r!==i||a!==o?!0:!r&&!a?this.model.hasEdits(void 0,{withOpenEditor:!0}):!1}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){const{position:t,startedEdit:s,event:n,ignoreEventKey:i}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:s,event:n,ignoreEventKey:i})}dispatchRowEvent(e,t,s){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){const{colModel:t,editSvc:s}=this.beans,{rowIndex:n,column:i,rowPinned:o}=e,r=Us(this.beans,{rowIndex:n,rowPinned:o}),a=Nh(i),l=t.getCol(a),c=e.previousParams;if(c){const d=Nh(c.column);if(c?.rowIndex===n&&d===a&&c?.rowPinned===o)return}e.type=="cellFocused"&&(s?.isRangeSelectionEnabledWhileEditing()||s?.isEditing({rowNode:r,column:l},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,s,n="ui",i=!1){const o=this.beans.focusSvc.getFocusedCell();o&&(e=Eo(this.beans,o)??e);const r=e.cellPosition;let a;const l=this.beans.gos.get("editType")==="fullRow";l&&this.model.suspend(!0),i||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:s}));try{a=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:t,startEditing:!0})}finally{l&&this.model.suspend(!1)}if(a===!1)return null;if(a==null)return!1;const c=a.cellPosition,d=e.isCellEditable(),u=a.isCellEditable(),p=c&&r.rowIndex===c.rowIndex&&r.rowPinned===c.rowPinned;d&&!i&&this.setFocusOutOnEditor(e);const f=this.gos.get("suppressStartEditOnTab");let m=!1;if(!p&&!i&&(super.cleanupEditors(a,!0),f?a.focusCell(!0,s):(m=!0,this.editSvc.startEditing(a,{startedEdit:!0,event:s,source:n,ignoreEventKey:!0,editable:u}))),u&&!i){if(a.focusCell(!1,s),f)a.focusCell(!0,s);else if(!a.comp?.getCellEditor()){if(!m){const v=this.editSvc?.isEditing(a,{withOpenEditor:!0});qi(this.beans,a,{event:s,cellStartedEdit:!0,silent:v})}this.setFocusInOnEditor(a),this.cleanupEditors(a)}}else u&&i&&this.setFocusInOnEditor(a),a.focusCell(!0,s);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},li={moduleName:"EditCore",version:ie,beans:[Dk,n7],apiFunctions:{getEditingCells:LA,getEditRowValues:AA,getCellEditorInstances:Tk,startEditingCell:HA,stopEditing:NA,isEditing:OA,validateEdit:BA},dynamicBeans:{singleCell:r7,fullRow:o7},dependsOn:[rd,F1],css:[J8]},a7={moduleName:"UndoRedoEdit",version:ie,beans:[Q8],apiFunctions:{undoCellEditing:IA,redoCellEditing:MA,getCurrentUndoSize:GA,getCurrentRedoSize:VA},dependsOn:[li]},l7={moduleName:"TextEditor",version:ie,userComponents:{agCellEditor:av,agTextCellEditor:av},dependsOn:[li]},c7={moduleName:"NumberEditor",version:ie,userComponents:{agNumberCellEditor:{classImp:mA}},dependsOn:[li]},d7={moduleName:"DateEditor",version:ie,userComponents:{agDateCellEditor:oA,agDateStringCellEditor:lA},dependsOn:[li]},u7={moduleName:"CheckboxEditor",version:ie,userComponents:{agCheckboxCellEditor:tA},dependsOn:[li]},h7={moduleName:"SelectEditor",version:ie,userComponents:{agSelectCellEditor:PA},dependsOn:[li]},p7={moduleName:"LargeTextEditor",version:ie,userComponents:{agLargeTextCellEditor:hA},dependsOn:[li]},g7={moduleName:"CustomEditor",version:ie,dependsOn:[li]},A1={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},f7=new Set(Object.values(A1));function Hn(e,t){const s=e.filterUi;if(!s)return null;if(s.created)return s.promise;if(t)return null;const n=s.create(s.refreshed),i=s;return i.created=!0,i.promise=n,n}function m7(e,t,s,n,i,o,r){return t.refresh?.({...s,model:n,source:o,additionalEventAttributes:r}),e().then(a=>{if(a){const{filter:l,filterParams:c}=a;L1(l,c,n,i,o,r)}})}function L1(e,t,s,n,i,o){e?.refresh?.({...t,model:s,state:n,source:i,additionalEventAttributes:o})}function N1(e,t,s,n){const i=e();i?.created&&i.promise.then(o=>{const r=t();L1(o,i.filterParams,r,s()??{model:r},"ui",n)})}function cv(e){let t,s=!1,n;const{action:i,filterParams:o,getFilterUi:r,getModel:a,getState:l,updateState:c,updateModel:d,processModelToApply:u}=e;switch(i){case"apply":{const p=l();n=p?.model??null,u&&(n=u(n)),t={state:p?.state,model:n},s=!0;break}case"clear":{t={model:null},o?.buttons?.includes("apply")||(s=!0,n=null);break}case"reset":{t={model:null},s=!0,n=null;break}case"cancel":{t={model:a()};break}}c(t),s?d(n):N1(r,a,l,{fromAction:i})}function Pt(e,t){return e[t]??null}var v7=class extends Zp{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,s,n,i){this.comp=e;const o=Ia(this,this.beans.context,i);this.eButtonShowMainFilter=s,this.eFloatingFilterBody=n,this.setGui(t,o),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(o),this.setupLeft(o),this.setupHover(o),this.setupFocus(o),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(o),this.setupUi(),o.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(o);const r=()=>this.onColDefChanged(o);o.addManagedListeners(this.column,{colDefChanged:r}),o.addManagedEventListeners({filterSwitched:({column:a})=>{a===this.column&&r()}}),o.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,s=e.colDef;return Te(t.gos,{colDef:s,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,s=!!e.floatingFilter;this.active=t&&s}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=Qt("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new Ta(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();$o(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(dt(t)===this.eGui)return;const i=Ji(t,this.eGui,null,e.shiftKey);if(i){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),i.focus();return}const o=this.findNextColumnWithFloatingFilter(e.shiftKey);o&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:o},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let s=this.column;do if(s=e?t.getColBefore(s):t.getColAfter(s),!s)break;while(!s.getColDef().filter||!s.getColDef().floatingFilter);return s}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case j.UP:case j.DOWN:case j.LEFT:case j.RIGHT:if(t)return;_i(e);case j.ENTER:t&&Wi(this.eGui)&&e.preventDefault();break;case j.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const s=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),n=!!e.relatedTarget&&Di(e.relatedTarget,"ag-floating-filter");if(s&&n&&e.target===this.eGui){const i=this.lastFocusEvent,o=!!(i&&i.key===j.TAB);if(i&&o){const r=i.shiftKey;Wi(this.eGui,r)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new Yp(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Xt(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(e){if(!this.active)return;const{beans:{colFilter:t},column:s,gos:n}=this,i=o=>{if(o?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;const r=this.comp.getFloatingFilterComp();r&&r.then(a=>{if(a){if(n.get("enableFilterHandlers")){const d=o;let u="filter";d?.afterFloatingFilter?u="ui":d?.afterDataChange?u="dataChanged":o?.source==="api"&&(u="api"),this.updateFloatingFilterParams(this.userCompDetails,u);return}const l=t?.getCurrentFloatingFilterParentModel(s),c=o?{...o,columns:o.columns??[],source:o.source==="api"?"api":"columnFilter"}:null;a.onParentModelChanged(l,c)}})};[this.destroySyncListener]=e.addManagedListeners(s,{filterChanged:i}),t?.isFilterActive(s)&&i(null)}setupWidth(e){const t=()=>{const s=`${this.column.getActualWidth()}px`;this.comp.setWidth(s)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(e){const t=this.active;this.setupActive();const s=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const n=this.beans.colFilter,i=this.active?n?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,o=this.comp.getFloatingFilterComp();!o||!i?this.updateCompDetails(e,i,s):o.then(r=>{!r||n?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,s):this.updateFloatingFilterParams(i,"colDef")})}updateCompDetails(e,t,s){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),s&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let s=e.params;this.comp.getFloatingFilterComp()?.then(n=>{typeof n?.refresh=="function"&&(this.gos.get("enableFilterHandlers")&&(s={...s,model:Pt(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),n.refresh(s))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function C7(e,t){const s=e.colModel.getCol(t);if(!s){Je(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:s,positionBy:"auto"})}function w7(e){e.menuSvc?.hidePopupMenu()}var b7=class extends _{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){this.showColumnMenuCommon(uv(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,s){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,s)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){uv(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(Xt(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&Zn(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(Ii()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Xt(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!Xt(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return Xt(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,s,n){const{positionBy:i,onClosedCallback:o}=t,r=t.column;if(i==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(r,a,s,o,n)}else if(i==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(r,a,s,o,n)}else if(r){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(r,"auto"),yn(a,()=>{const c=l.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);c&&e?.showMenuAfterButtonClick(r,c.getAnchorElementForMenu(n),s,o,n)})}}};function dv(e,t,s){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",s))}function uv(e){const{enterpriseMenuFactory:t,filterMenuFactory:s,gos:n}=e;return t&&Xt(n)?t:s}var x7={moduleName:"SharedMenu",version:ie,beans:[b7],apiFunctions:{showColumnMenu:C7,hidePopupMenu:w7}},y7=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function S7(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function R7(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function F7(e,t){const s=e.colModel.getColDefCol(t);if(s)return e.colFilter?.destroyFilter(s,"api")}function E7(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function D7(e){return e.filterManager?.getFilterModel()??{}}function P7(e,t,s){const{gos:n,colModel:i,colFilter:o}=e;s&&!n.get("enableFilterHandlers")&&(X(288),s=!1);const r=i.getColDefCol(t);return r?o?.getModelForColumn(r,s)??null:null}function T7(e,t,s){return e.filterManager?.setColumnFilterModel(t,s)??Promise.resolve()}function k7(e,t){const s=e.colModel.getCol(t);if(!s){Je(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:s,containerType:"columnFilter",positionBy:"auto"})}function I7(e){e.menuSvc?.hideFilterMenu()}function M7(e,t){const s=e.colModel.getCol(t);if(!s){Je(12,{colKey:t});return}return e.colFilter?.getHandler(s,!0)}function A7(e,t){const{colModel:s,colFilter:n,gos:i}=e;if(!i.get("enableFilterHandlers")){X(287);return}const{colId:o,action:r}=t;if(o){const a=s.getColById(o);a&&n?.updateModel(a,r)}else n?.updateAllModels(r)}var hv={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},pv=["january","february","march","april","may","june","july","august","september","october","november","december"];function L7(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function N7(e,t){if(e==null)return-1;if(t==null)return 1;const s=es(e),n=es(t);return s!=null&&n!=null?s===n?0:s>n?1:-1:String(e).localeCompare(String(t))}function gv(e){return e instanceof Date&&!isNaN(e.getTime())}var Wh={number:()=>{},bigint:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:gv}),dateString:({dataTypeDefinition:e})=>({comparator:(t,s)=>{const n=e.dateParser(s);return s==null||n<t?-1:n>t?1:0},isValidDate:t=>typeof t=="string"&&gv(e.dateParser(t))}),dateTime:e=>Wh.date(e),dateTimeString:e=>Wh.dateString(e),object:()=>{},text:()=>{}},_h={number:()=>({comparator:L7}),bigint:()=>({comparator:N7}),boolean:({t:e})=>({valueFormatter:t=>le(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:s=>{const n=e(s);return le(n)?n:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(s,n)=>{if(s==="NaN")return t("invalidDate","Invalid Date");if(n===1&&s!=null){const i=pv[Number(s)-1];return t(i,hv[i])}return s??t("blanks","(Blanks)")},treeListPathGetter:s=>Tl(s,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:s})=>({valueFormatter:n=>{const i=e(n);return le(i)?i:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:n=>Tl(t.dateParser(n??void 0),!1),treeListFormatter:(n,i)=>{if(i===1&&n!=null){const o=pv[Number(n)-1];return s(o,hv[o])}return n??s("blanks","(Blanks)")}}),dateTime:e=>{const t=_h.date(e);return t.treeListPathGetter=Tl,t},dateTimeString(e){const t=e.dataTypeDefinition.dateParser,s=_h.dateString(e);return s.treeListPathGetter=n=>Tl(t(n??void 0)),s},object:({formatValue:e,t})=>({valueFormatter:s=>{const n=e(s);return le(n)?n:t("blanks","(Blanks)")}}),text:()=>{}};function O7(e,t,s,n,i,o,r){let a=t,l=s;const c=e==="agSetColumnFilter";!l&&n.baseDataType==="object"&&!c&&(l=({column:f,node:m})=>i({column:f,node:m,value:o.valueSvc.getValue(f,m,"data")}));const u=(c?_h:Wh)[n.baseDataType],p=u({dataTypeDefinition:n,formatValue:i,t:r});return a=typeof t=="object"?{...p,...t}:p,{filterParams:a,filterValueGetter:l}}var H7={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},B7={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"};function G7(e,t=!1){return(t?B7:H7)[e??"text"]}function V7(e,t,s){if(t==null)return null;let n=null;const{compName:i,jsComp:o,fwComp:r}=Gw(e,t);return i?n={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[i]:o==null&&r==null&&t.filter===!0&&(n=s()),n}var j7={filterHandler:()=>({doesFilterPass:()=>!0})};function fv(e,t,s,n){if(!e.isPrimary())return!0;const o=!s;return!e.isValueActive()||!o?!1:t?!0:n}var z7=class extends _{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...A1},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));const e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",s){const{colModel:n,dataTypeSvc:i,filterManager:o}=this.beans;if(i?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}const r=[],a=this.getModel(!0);if(e){const l=new Set(Object.keys(e));this.allColumnFilters.forEach((c,d)=>{const u=e[d];r.push(this.setModelOnFilterWrapper(c,u)),l.delete(d)}),l.forEach(c=>{const d=n.getColDefCol(c)||n.getCol(c);if(!d){X(62,{colId:c});return}if(!d.isFilterAllowed()){X(63,{colId:c});return}const u=this.getOrCreateFilterWrapper(d,!0);if(!u){X(64,{colId:c});return}r.push(this.setModelOnFilterWrapper(u,e[c],!0))})}else this.model={},this.allColumnFilters.forEach(l=>{r.push(this.setModelOnFilterWrapper(l,null))});We.all(r).then(()=>{const l=this.getModel(!0),c=[];this.allColumnFilters.forEach((d,u)=>{const p=a?a[u]:null,f=l?l[u]:null;la(p,f)||c.push(d.column)}),c.length>0?o?.onFilterChanged({columns:c,source:t}):s&&this.updateActive("filterChanged")})}getModel(e){const t={},{allColumnFilters:s,initialModel:n,beans:{colModel:i}}=this;if(s.forEach((o,r)=>{const a=this.getModelFromFilterWrapper(o);le(a)&&(t[r]=a)}),!e)for(const o of Object.keys(n)){const r=n[o];le(r)&&!s.has(o)&&i.getCol(o)?.isFilterAllowed()&&(t[o]=r)}return t}setState(e,t,s="api"){if(this.state.clear(),t)for(const n of Object.keys(t)){const i=t[n];this.state.set(n,{model:Pt(this.model,n),state:i})}this.setModel(e,s,!0)}getState(){const e=this.state;if(!e.size)return;const t={};let s=!1;return e.forEach((n,i)=>{const o=n.state;o!=null&&(s=!0,t[i]=o)}),s?t:void 0}getModelFromFilterWrapper(e){const s=e.column.getColId();if(e.isHandler)return Pt(this.model,s);const n=e.filter;return n?typeof n.getModel!="function"?(X(66),null):n.getModel():Pt(this.initialModel,s)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}updateActiveFilters(){const e=l=>l?l.isFilterActive?l.isFilterActive():(X(67),!1):!1,{colModel:t,gos:s}=this.beans,n=!!dc(s),i=[],o=[],r=(l,c,d)=>{c&&(fv(l,t.isPivotMode(),t.isPivotActive(),n)?i.push(d):o.push(d))},a=[];return this.allColumnFilters.forEach(l=>{const c=l.column,d=c.getColId();if(l.isHandler)a.push(We.resolve().then(()=>{r(c,this.isHandlerActive(c),{colId:d,isHandler:!0,handler:l.handler,handlerParams:l.handlerParams})}));else{const u=Hn(l);u&&a.push(u.then(p=>{r(c,e(p),{colId:d,isHandler:!1,comp:p})}))}}),We.all(a).then(()=>{this.activeAggregateFilters=i,this.activeColumnFilters=o})}updateFilterFlagInColumns(e,t){const s=[];return this.allColumnFilters.forEach(n=>{const i=n.column;if(n.isHandler)s.push(We.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{const o=Hn(n);o&&s.push(o.then(r=>{this.setColFilterActive(i,r.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),We.all(s)}doFiltersPass(e,t,s){const{data:n,aggData:i}=e,o=s?this.activeAggregateFilters:this.activeColumnFilters,r=s?i:n,a=this.model;for(let l=0;l<o.length;l++){const c=o[l],{colId:d,isHandler:u}=c;if(d!==t)if(u){const{handler:p,handlerParams:f}=c;if(!p.doesFilterPass({node:e,data:r,model:Pt(a,d),handlerParams:f}))return!1}else{const p=c.comp;if(typeof p.doesFilterPass!="function"){Je(91);continue}if(!p.doesFilterPass({node:e,data:r}))return!1}}return!0}getHandlerParams(e){const t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:s}=this.beans,n=()=>{this.isAlive()&&s?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(n,0):n()}updateBeforeFilterChanged(e={}){const{column:t,additionalEventAttributes:s}=e,n=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",s).then(()=>{this.allColumnFilters.forEach(i=>{const{column:o,isHandler:r}=i;n!==o.getColId()&&(r&&i.handler.onAnyFilterChanged?.(),Hn(i,r)?.then(a=>{typeof a?.onAnyFilterChanged=="function"&&a.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){const t=[];this.allColumnFilters.forEach(s=>{const n=s.isHandler;n&&s.handler.onNewRowsLoaded?.();const i=Hn(s,n);i&&t.push(i.then(o=>{o.onNewRowsLoaded?.()}))}),We.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){const{filterValueSvc:s,colModel:n}=this.beans;return(i,o)=>{const r=o?n.getCol(o):e;return r?s.getValue(r,i,t):void 0}}isFilterActive(e){const t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);const s=t?.filter;return s?s.isFilterActive():Pt(this.initialModel,e.getColId())!=null}isHandlerActive(e){const t=le(Pt(this.model,e.getColId()));if(t)return t;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterActive(e):!1}getOrCreateFilterUi(e){const t=this.getOrCreateFilterWrapper(e,!0);return t?Hn(t):null}getFilterUiForDisplay(e){const t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;const s=Hn(t);return s?s.then(n=>({comp:n,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){const s=this.getOrCreateFilterWrapper(e,t);return s?.isHandler?s.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let s=this.cachedFilter(e);return!s&&t&&(s=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,s)),s}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return FF(this.gos)?t?"agSetColumnFloatingFilter":"agSetColumnFilter":G7(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,s,n,i,o){const r=()=>{const c=this.createFilterCompParams(e,i,o),d=n(c,i);return ME(this.beans.userCompFactory,t,d,s)},a=r();return a?{compDetails:a,createFilterUi:c=>(c?r():a).newAgStackInstance()}:null}createFilterInstance(e,t,s,n){const i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));const{handler:o,handlerParams:r,handlerGenerator:a}=this.createHandler(e,t,s)??{},l=this.createFilterComp(e,t,s,n,!!o,"init");if(!l)return{compDetails:null,createFilterUi:null,handler:o,handlerGenerator:a,handlerParams:r};const{compDetails:c,createFilterUi:d}=l;return this.isGlobalButtons&&(c.params?.buttons?.length||X(281,{colId:e.getColId()})),{compDetails:c,handler:o,handlerGenerator:a,handlerParams:r,createFilterUi:d}}createBaseFilterParams(e,t){const{filterManager:s,rowModel:n}=this.beans;return Te(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:i=>s?.doesRowPassOtherFilters(e.getColId(),i)??!0,rowModel:n})}createFilterCompParams(e,t,s,n){const i=this.filterChangedCallbackFactory(e),o=this.createBaseFilterParams(e,n);if(o.filterChangedCallback=i,o.filterModifiedCallback=n?()=>{}:r=>this.filterModified(e,r),t){const r=o,a=e.getColId(),l=Pt(this.model,a);r.model=l,r.state=this.state.get(a)??{model:l},r.onModelChange=(c,d)=>{this.updateStoredModel(a,c),this.refreshHandlerAndUi(e,c,"ui",!1,d).then(()=>{i({...d,source:"columnFilter"})})},r.onStateChange=c=>{this.updateState(e,c),this.updateOrRefreshFilterUi(e)},r.onAction=(c,d,u)=>{this.updateModel(e,c,d),this.dispatchLocalEvent({type:"filterAction",column:e,action:c,event:u})},r.getHandler=()=>this.getHandler(e,!0),r.onUiChange=c=>this.filterUiChanged(e,c),r.source=s}return o}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,s){const n=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:n};return n.then(s),i}createFilterWrapper(e){const{compDetails:t,handler:s,handlerGenerator:n,handlerParams:i,createFilterUi:o}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),a=>a),r=e.getColId();if(s)return delete this.initialModel[r],s.init?.({...i,source:"init",model:Pt(this.model,r)}),{column:e,isHandler:!0,handler:s,handlerGenerator:n,handlerParams:i,filterUi:this.createFilterUiForHandler(t,o)};if(o){const a={column:e,filterUi:null,isHandler:!1};return a.filterUi=this.createFilterUiLegacy(t,o,l=>{a.filter=l??void 0}),a}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,s){const{gos:n,frameworkOverrides:i,registry:o}=this.beans;let r;const a=f=>{const m=f.filter;if(Ow(m)){const v=m.handler;return v||(r=m.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return typeof m=="string"?m:void 0},l=n.get("enableFilterHandlers"),c=l?a(t):void 0,d=f=>()=>this.createBean(o.createDynamicBean(f,!0));let u,p;if(typeof c=="string"){const f=n.get("filterHandlers")?.[c];f!=null?u=f:f7.has(c)&&(u=d(c),p=c)}else u=c;if(!u){let f;const{compName:m,jsComp:v,fwComp:C}=Gw(i,t);m?f=m:v==null&&C==null&&t.filter===!0&&(f=s),p=this.handlerMap[f],p&&(u=d(p))}return u?{filterHandler:u,handlerNameOrCallback:r??p}:l?(gt(n)&&X(277,{colId:e.getColId()}),j7):void 0}createHandler(e,t,s){const n=this.createHandlerFunc(e,t,s);if(!n)return;const i=pu(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:o,filterHandler:r}=n,{handler:a,handlerParams:l}=this.createHandlerFromFunc(e,r,i);return{handler:a,handlerParams:l,handlerGenerator:o??r}}createHandlerFromFunc(e,t,s){const n=e.getColDef(),i=t(Te(this.gos,{column:e,colDef:n})),o=this.createHandlerParams(e,s);return{handler:i,handlerParams:o}}createHandlerParams(e,t){const s=e.getColDef(),n=e.getColId(),i=this.filterChangedCallbackFactory(e);return Te(this.gos,{colDef:s,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:o=>this.beans.filterManager?.doesRowPassOtherFilters(n,o)??!0,onModelChange:(o,r)=>{this.updateStoredModel(n,o),this.refreshHandlerAndUi(e,o,"handler",!1,r).then(()=>{i({...r,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){const e=[],{colModel:t,filterManager:s,groupFilter:n}=this.beans;this.allColumnFilters.forEach((o,r)=>{let a;o.column.isPrimary()?a=t.getColDefCol(r):a=t.getCol(r),!(a&&a===o.column)&&(e.push(o.column),this.disposeFilterWrapper(o,"columnChanged"),this.disposeColumnListener(r))});const i=n&&e.every(o=>n.isGroupFilter(o));e.length>0&&!i&&s?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const s=this.beans.groupFilter;return s?.isGroupFilter(e)?s.isFilterAllowed(e):!0}getFloatingFilterCompDetails(e,t){const{userCompFactory:s,frameworkOverrides:n,selectableFilter:i,gos:o}=this.beans,r=f=>{this.getOrCreateFilterUi(e)?.then(v=>{f($i(v))})},a=e.getColDef(),l=i?.isSelectable(a)?i.getFilterDef(e,a):a,c=V7(n,l,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",d=o.get("enableFilterHandlers"),u=pu(s,l,this.createFilterCompParams(e,d,"init",!0)),p=Te(o,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:r,showParentFilter:t});if(d){const f=p,m=e.getColId(),v=this.filterChangedCallbackFactory(e);f.onUiChange=C=>this.floatingFilterUiChanged(e,C),f.model=Pt(this.model,m),f.onModelChange=(C,w)=>{this.updateStoredModel(m,C),this.refreshHandlerAndUi(e,C,"floating",!0,w).then(()=>{v({...w,source:"columnFilter"})})},f.getHandler=()=>this.getHandler(e,!0),f.source="init"}return NE(s,a,p,c)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,s,n){const i="paramsUpdated";if(e.isHandler){const o=t.getColId();delete this.initialModel[o],this.state.delete(o);const r=e.filterUi,a=this.createFilterUiForHandler(s,n);e.filterUi=a;const l=this.eventSvc;r?.created?r.promise.then(c=>{this.destroyBean(c),l.dispatchEvent({type:"filterDestroyed",source:i,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t="api"){const s=e.getColId(),n=this.allColumnFilters.get(s);this.disposeColumnListener(s),delete this.initialModel[s],n&&this.disposeFilterWrapper(n,t).then(i=>{i&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let s=!1;const{column:n,isHandler:i,filterUi:o}=e,r=n.getColId();i&&(s=this.isHandlerActive(n),this.destroyBean(e.handler),delete this.model[r],this.state.delete(r));const a=()=>{this.setColFilterActive(n,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:n})};if(o){if(o.created)return o.promise.then(l=>(s=i?s:!!l?.isFilterActive(),this.destroyBean(l),a(),s));a()}return We.resolve(s)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){const s=this.allColumnFilters.get(e);if(!s)return;const n=this.beans,i=s.column,o=i.getColDef(),r=i.isFilterAllowed(),a=this.getDefaultFilter(i),l=n.selectableFilter,c=l?.isSelectable(o)?l.getFilterDef(i,o):o,d=r?this.createHandlerFunc(i,c,this.getDefaultFilter(i)):void 0,u=!!d,p=s.isHandler;if(p!=u){this.destroyFilter(i,"paramsUpdated");return}const{compDetails:f,createFilterUi:m}=(r?this.createFilterComp(i,c,a,C=>C,u,"colDef"):null)??{compDetails:null,createFilterUi:null},v=f?.params??pu(n.userCompFactory,c,this.createFilterCompParams(i,u,"colDef"));if(p){const C=d?.handlerNameOrCallback??d?.filterHandler,w=Pt(this.model,e);if(s.handlerGenerator!=C){const b=s.handler,{handler:x,handlerParams:S}=this.createHandlerFromFunc(i,d.filterHandler,v);s.handler=x,s.handlerParams=S,s.handlerGenerator=C,delete this.model[e],x.init?.({...S,source:"init",model:null}),this.destroyBean(b),w!=null&&this.beans.filterManager?.onFilterChanged({columns:[i],source:t})}else{const b=this.createHandlerParams(i,f?.params);s.handlerParams=b,s.handler.refresh?.({...b,source:"colDef",model:w})}}if(this.areFilterCompsDifferent(s.filterUi?.compDetails??null,f)||!s.filterUi||!f){this.destroyFilterUi(s,i,f,m);return}s.filterUi.filterParams=v,Hn(s,p)?.then(C=>{(C?.refresh?C.refresh(v):!0)===!1?this.destroyFilterUi(s,i,f,m):this.dispatchLocalEvent({type:"filterParamsChanged",column:i,params:v})})}refreshHandlerAndUi(e,t,s,n,i){const o=this.cachedFilter(e);if(!o)return n&&this.getOrCreateFilterWrapper(e,!0),We.resolve();if(!o.isHandler)return We.resolve();const{filterUi:r,handler:a,handlerParams:l}=o;return m7(()=>{if(r){const{created:c,filterParams:d}=r;if(c)return r.promise.then(u=>u?{filter:u,filterParams:d}:void 0);r.refreshed=!0}return We.resolve(void 0)},a,l,t,this.state.get(e.getColId())??{model:t},s,i)}setColumnFilterWrapper(e,t){const s=e.getColId();this.allColumnFilters.set(s,t),this.allColumnListeners.set(s,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(s)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:s}=e,{componentClass:n}=t;return!(s===n||s?.render&&n?.render&&s.render===n.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getFilterInstance(e){const t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);const s=this.getOrCreateFilterUi(t);return s?new Promise(n=>{s.then(i=>{n($i(i))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:s})=>{this.setModelForColumn(e,t).then(()=>s())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){const{state:n,model:i}=this,o=e.getColId(),r=n.get(o);return r?r.model??null:Pt(i,o)}const s=this.cachedFilter(e);return s?this.getModelFromFilterWrapper(s):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let s=()=>{};const n=new Promise(i=>{s=i});return this.columnModelUpdates.push({key:e,model:t,resolve:s}),n}return new Promise(s=>{this.setModelForColumnLegacy(e,t).then(n=>s(n))})}getStateForColumn(e){return this.state.get(e)??{model:Pt(this.model,e)}}setModelForColumnLegacy(e,t){const s=this.beans.colModel.getColDefCol(e),n=s?this.getOrCreateFilterWrapper(s,!0):null;return n?this.setModelOnFilterWrapper(n,t):We.resolve()}setColDefPropsForDataType(e,t,s){const n=e.filter,i=n===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):n;if(typeof i!="string")return;let o,r;const a=this.beans,{filterParams:l,filterValueGetter:c}=e;i==="agMultiColumnFilter"?{filterParams:o,filterValueGetter:r}=a.multiFilter?.getParamsForDataType(l,c,t,s)??{}:{filterParams:o,filterValueGetter:r}=O7(i,l,c,t,s,a,this.getLocaleTextFunc()),e.filterParams=o,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,s,n){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",s)),e.dispatchColEvent("filterChanged",s,n)}setModelOnFilterWrapper(e,t,s){return new We(n=>{if(e.isHandler){const o=e.column,r=o.getColId(),a=this.model[r];if(this.updateStoredModel(r,t),s&&t===a){n();return}this.refreshHandlerAndUi(o,t,"api").then(()=>n());return}const i=Hn(e);if(i){i.then(o=>{if(typeof o?.setModel!="function"){X(65),n();return}(o.setModel(t)||We.resolve()).then(()=>n())});return}n()})}updateStoredModel(e,t){le(t)?this.model[e]=t:delete this.model[e];const s=this.state.get(e),n={model:t,state:s?.state};this.state.set(e,n)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(s=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:s,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,s){const n=e.getColId(),i=this.cachedFilter(e),o=()=>i?.filterUi;cv({action:t,filterParams:i?.filterUi?.filterParams,getFilterUi:o,getModel:()=>Pt(this.model,n),getState:()=>this.state.get(n),updateState:r=>this.updateState(e,r),updateModel:r=>o()?.filterParams?.onModelChange(r,{...s,fromAction:t}),processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}updateAllModels(e,t){const s=[];this.allColumnFilters.forEach((n,i)=>{const o=this.beans.colModel.getColDefCol(i);o&&cv({action:e,filterParams:n.filterUi?.filterParams,getFilterUi:()=>n.filterUi,getModel:()=>Pt(this.model,i),getState:()=>this.state.get(i),updateState:r=>this.updateState(o,r),updateModel:r=>{this.updateStoredModel(i,r),this.dispatchLocalEvent({type:"filterAction",column:o,action:e}),s.push(this.refreshHandlerAndUi(o,r,"ui"))},processModelToApply:n?.isHandler?n.handler.processModelToApply?.bind(n.handler):void 0})}),s.length&&We.all(s).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){const t=e.getColId();N1(()=>this.cachedFilter(e)?.filterUi,()=>Pt(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){const{state:e,model:t,activeFilterComps:s}=this;for(const i of s)if(i.source==="COLUMN_MENU")return!1;let n=!1;for(const i of e.keys()){const o=e.get(i);if(o.valid===!1)return!1;(o.model??null)!==Pt(t,i)&&(n=!0)}return n}hasUnappliedModel(e){const{model:t,state:s}=this;return(s.get(e)?.model??null)!==Pt(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t==="newFiltersToolPanel")return!0;const s=this.beans.filterPanelSvc;return s?.isActive?!!s.getState(e.getColId()):!1}onPivotModeChanged(e){const{colModel:t,pivotColsSvc:s}=this.beans,n=!!dc(this.gos),i=e.currentValue,o=i?this.activeColumnFilters:this.activeAggregateFilters,r=i?this.activeAggregateFilters:this.activeColumnFilters,a=[];for(const l of o){const c=t.getColById(l.colId),d=i&&!!s?.columns.length;c&&i===fv(c,i,d,n)&&(r.push(l),a.push(l))}a3(o,a)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function W7(e){return!!e.filterManager?.isAnyFilterPresent()}function _7(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var U7=class extends _{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:n})=>this.onAdvFilterEnabledChanged(n),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:s}=this;this.alwaysPassFilter=s.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=s.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterState(e,t,s="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,s)}setFilterModel(e,t="api",s){if(this.isAdvFilterEnabled()){s||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){dc(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:s,columns:n=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):We.resolve()).then(()=>{const i={source:t,type:"filterChanged",columns:n};s&&Wt(i,s),this.eventSvc.dispatchEvent(i),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!dc(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){X(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};function $7(e){return{tag:"div",cls:e}}var q7=class extends ft{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super($7(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){const s=this.buttons;if(this.buttons=e,s===e)return;const n=this.getGui();Jt(n);let i;this.destroyListeners();const o=document.createDocumentFragment(),r=this.className,a=({type:c,label:d})=>{const u=w=>{this.dispatchLocalEvent({type:c,event:w})};["apply","clear","reset","cancel"].includes(c)||X(75);const p=c==="apply",m=cs({tag:"button",attrs:{type:p&&t?"submit":"button"},ref:`${c}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${p?" "+r+"-apply-button":""}`,children:d});this.activateTabIndex([m]),p&&(i=m);const v=w=>{w.key===j.ENTER&&(w.preventDefault(),u(w))},C=this.listeners;m.addEventListener("click",u),C.push(()=>m.removeEventListener("click",u)),m.addEventListener("keydown",v),C.push(()=>m.removeEventListener("keydown",v)),o.append(m)};for(const c of e)a(c);this.eApply=i;const l=this.validationTooltipFeature;i&&!l?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!i&&l&&(this.validationTooltipFeature=this.destroyBean(l)),n.append(o)}getApplyButton(){return this.eApply}updateValidity(e,t=null){const s=this.eApply;s&&(da(s,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},K7=class extends ft{constructor(e,t,s,n,i,o){super(),this.column=e,this.wrapper=t,this.eventParent=s,this.updateModel=n,this.isGlobalButtons=i,this.enableGlobalButtonCheck=o,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:e,params:t}=this.wrapper,s=t,n=s.useForm,i=n?"form":"div";this.setTemplate({tag:i,cls:"ag-filter-wrapper"}),n&&this.addManagedElementListeners(this.getGui(),{submit:o=>{o?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=s,this.resetButtonsPanel(s),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:o,params:r})=>{o===this.column&&this.resetButtonsPanel(r,this.params)},filterStateChanged:({column:o,state:r})=>{o===this.column&&this.eButtons?.updateValidity(r.valid!==!1)},filterAction:({column:o,action:r,event:a})=>{o===this.column&&this.afterAction(r,a)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:o})=>{if(o!==this.isGlobalButtons){this.isGlobalButtons=o;const r=this.params;this.resetButtonsPanel(r,r,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,s){const{buttons:n,readOnly:i}=t??{},{buttons:o,readOnly:r,useForm:a}=e;if(!s&&i===r&&la(n,o))return;const l=o&&o.length>0&&!e.readOnly&&!this.isGlobalButtons;let c=this.eButtons;if(l){const d=o.map(u=>{const p=`${u}Filter`;return{type:u,label:Es(this,p)}});if(this.applyActive=ed(this.params),!c){c=this.createBean(new q7),this.appendChild(c.getGui());const u=this.column,p=f=>({event:m})=>{this.updateModel(u,f,{fromButtons:!0}),this.afterAction(f,m)};c?.addManagedListeners(c,{apply:p("apply"),clear:p("clear"),reset:p("reset"),cancel:p("cancel")}),this.eButtons=c}c.updateButtons(d,a)}else this.applyActive=!1,c&&(pn(c.getGui()),this.eButtons=this.destroyBean(c))}close(e){const t=this.hidePopup;if(!t)return;const s=e,n=s?.key;let i;(n===j.ENTER||n===j.SPACE)&&(i={keyboardEvent:s}),t(i),this.hidePopup=null}afterAction(e,t){const{params:s,applyActive:n}=this,i=s?.closeOnApply;switch(e){case"apply":{t?.preventDefault(),i&&n&&this.close(t);break}case"reset":{i&&n&&this.close();break}case"cancel":{i&&this.close(t);break}}}handleKeyDown(e){!e.defaultPrevented&&e.key===j.ENTER&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},Y7=":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}",Z7={tag:"div",cls:"ag-filter"},X7=class extends ft{constructor(e,t,s){super(Z7),this.column=e,this.source=t,this.enableGlobalButtonCheck=s,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??We.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:s,beans:{colFilter:n}}=this,i=n.getFilterUiForDisplay(t)??null;this.wrapper=i,i?.then(o=>{if(!o)return;const{isHandler:r,comp:a}=o;let l;if(r){const c=!!this.enableGlobalButtonCheck,d=this.createBean(new K7(t,o,n,n.updateModel.bind(n),c&&n.isGlobalButtons,c));this.comp=d,l=d.getGui()}else this.registerCSS(Y7),l=a.getGui(),le(l)||X(69,{guiFromFilter:l});this.appendChild(l),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:s,eGui:this.getGui()}):a.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){const{source:t,column:s}=e;(t==="api"||t==="paramsUpdated")&&s.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Jt(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},Q7=class extends _{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,s,n){e&&!e.isColumn||this.showPopup(e,i=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:s,mouseEvent:t,ePopup:i})},s,t.target,Xt(this.gos),n)}showMenuAfterButtonClick(e,t,s,n){if(e&&!e.isColumn)return;let i=-1,o="left";const r=Xt(this.gos);!r&&this.gos.get("enableRtl")&&(i=1,o="right");const a=r?void 0:4*i,l=r?void 0:4;this.showPopup(e,c=>{this.popupSvc?.positionPopupByComponent({type:s,eventSource:t,ePopup:c,nudgeX:a,nudgeY:l,alignSide:o,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},s,t,r,n)}showPopup(e,t,s,n,i,o){const r=e?this.createBean(new X7(e,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!e){Je(57);return}const a=cs({tag:"div",cls:`ag-menu${i?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:v=>this.trapFocusWithin(v,a)}),a.appendChild(r?.getGui());let l;const c=()=>r?.afterGuiDetached(),d=EF(this.gos)?n??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=v=>{dv(e,!1,"contextMenu");const C=v instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),C&&n&&Ts(n)&&$w(n)?.focus({preventScroll:!0}),c(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,s,e),o?.()},p=this.getLocaleTextFunc(),f=i&&s!=="columnFilter"?p("ariaLabelColumnMenu","Column Menu"):p("ariaLabelColumnFilter","Column Filter"),m=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:f});m&&(this.hidePopup=l=m.hideFunc),r.afterInit().then(()=>{t(a),r.afterGuiAttached({container:s,hidePopup:l})}),dv(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,s,e)}trapFocusWithin(e,t){e.key!==j.TAB||e.defaultPrevented||Ji(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Wi(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,s){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:s??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},J7=class extends _{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,s){if(!t)return;const n=e.getColDef(),{selectableFilter:i,valueSvc:o,formula:r}=this.beans,a=s??i?.getFilterValueGetter(e.getColId())??n.filterValueGetter;if(a)return this.executeFilterValueGetter(a,t.data,e,t,n);const l=o.getValue(e,t,"data");return e.isAllowFormula()&&r?.isFormula(l)?r.resolveValue(e,t):l}executeFilterValueGetter(e,t,s,n,i){const{expressionSvc:o,valueSvc:r}=this.beans,a=Te(this.gos,{data:t,node:n,column:s,colDef:i,getValue:r.getValueCallback.bind(r,n)});return typeof e=="function"?e(a):o?.evaluate(e,a)}},e9={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},t9=class extends ft{constructor(){super(e9,[ad]),this.eFloatingFilterText=xe}init(e){this.params=e;const t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const s=e,n=s.getHandler();if(n.getModelAsString){const i=n.getModelAsString(s.model);this.eFloatingFilterText.setValue(i)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){const s=t.getModelAsString(e);this.eFloatingFilterText.setValue(s)}})}refresh(e){this.init(e)}},s9=class extends Jp{constructor(e){super(e,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){const t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},hg=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){const s=e.filterOptions??t;this.filterOptions!==s&&(this.filterOptions=s,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){const{filterOptions:e}=this;if(e)for(const t of e){if(typeof t=="string")continue;const s=[["displayKey"],["displayName"],["predicate","test"]],n=i=>i.some(o=>t[o]!=null)?!0:(X(72,{keys:i}),!1);if(!s.every(n)){this.filterOptions=e.filter(i=>i===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}getDefaultItem(e){const{filterOptions:t}=this;if(e)return e;if(t.length>=1){const s=t[0];if(typeof s=="string")return s;if(s.displayKey)return s.displayKey;X(73)}else X(74)}getCustomOption(e){return this.customFilterOptions[e]}};function Jr(e,t,s){return s==null?e.splice(t):e.splice(t,s)}function Pc(e){return e==null||typeof e=="string"&&e.trim().length===0}function n9(e){return e==="AND"||e==="OR"?e:"AND"}function i9(e,t,s){if(e==null)return;const{predicate:n}=e;if(n!=null&&!t.some(i=>i==null))return n(t,s)}function o9(e,t){let s=e.length;return s>t&&(e.splice(t),X(78),s=t),s}var r9=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function Qn(e,t){const s=t.getCustomOption(e);if(s){const{numberOfInputs:n}=s;return n??1}return e&&r9.has(e)?0:e==="inRange"?2:1}var cd=class extends qE{constructor(e,t,s){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=s,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);const t=new hg;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=n9(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),Zt(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,s)=>{const n=s===0?e:this.optionsFactory.defaultOption;t.setValue(n,!0)})}getModelFromUi(){const e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){const{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?"OR":"AND"}areNonNullModelsEqual(e,t){const s=!e.operator,n=!t.operator;if(!s&&n||s&&!n)return!1;let o;if(s){const r=e,a=t;o=this.areSimpleModelsEqual(r,a)}else{const r=e,a=t;o=r.operator===a.operator&&ii(r.conditions,a.conditions,(l,c)=>this.areSimpleModelsEqual(l,c))}return o}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),We.resolve();if(e.operator){const n=e;let i=n.conditions;i==null&&(i=[],X(77));const o=o9(i,this.maxNumConditions),r=this.getNumConditions();if(o<r)this.removeConditionsAndOperators(o);else if(o>r)for(let l=r;l<o;l++)this.createJoinOperatorPanel(),this.createOption();const a=n.operator==="OR";this.eJoinAnds.forEach(l=>l.setValue(!a,!0)),this.eJoinOrs.forEach(l=>l.setValue(a,!0)),i.forEach((l,c)=>{this.eTypes[c].setValue(l.type,!0),this.setConditionIntoUi(l,c)})}else{const n=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(n.type,!0),this.setConditionIntoUi(n,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),We.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(X(79),t=1),this.maxNumConditions=t;let s=e.numAlwaysVisibleConditions??1;s<1&&(X(80),s=1),s>t&&(X(81),s=t),this.numAlwaysVisibleConditions=s}createOption(){const e=this.getGui(),t=this.createManagedBean(new ug);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());const s=this.createEValue();this.eConditionBodies.push(s),e.appendChild(s),this.putOptionsIntoDropdown(t),this.resetType(t);const n=this.getNumConditions()-1;this.forEachPositionInput(n,i=>this.resetInput(i)),this.addChangedListeners(t,n)}createJoinOperatorPanel(){const e=cs({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);const t=this.createJoinOperator(this.eJoinAnds,e,"and"),s=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);const n=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,n,i),this.resetJoinOperatorOr(s,n,i),this.isReadOnly()||(t.onValueChange(this.listener),s.onValueChange(this.listener))}createJoinOperator(e,t,s){const n=this.createManagedBean(new s9);e.push(n);const i="ag-filter-condition-operator";return n.addCss(i),n.addCss(`${i}-${s}`),t.appendChild(n.getGui()),n}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e=="string"?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){const{filterListOptions:t}=this;for(const s of t)e.addOption(s);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){const{displayKey:t}=e,s=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:s?this.getLocaleTextFunc()(s.displayKey,s.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let s=0;s<this.getNumConditions();s++)this.isConditionUiComplete(s)?e=s:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{const s=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<s){this.removeConditionsAndOperators(s+1);const n=e+1,i=s-n;i>0&&this.removeConditionsAndOperators(n,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((n,i)=>{const o=this.isConditionDisabled(i,e);n.setDisabled(o||this.filterListOptions.length<=1),i===1&&(da(this.eJoinPanels[0],o),this.eJoinAnds[0].setDisabled(o),this.eJoinOrs[0].setDisabled(o))}),this.eConditionBodies.forEach((n,i)=>{st(n,this.isConditionBodyVisible(i))});const s=(t??this.getJoinOperator())==="OR";for(const n of this.eJoinAnds)n.setValue(!s,!0);for(const n of this.eJoinOrs)n.setValue(s,!0);this.forEachInput((n,i,o,r)=>{this.setElementDisplayed(n,i<r),this.setElementDisabled(n,this.isConditionDisabled(o,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;const{eTypes:s,eConditionBodies:n,eJoinPanels:i,eJoinAnds:o,eJoinOrs:r}=this;this.removeComponents(s,e,t),this.removeElements(n,e,t),this.removeEValues(e,t);const a=Math.max(e-1,0);this.removeElements(i,a,t),this.removeComponents(o,a,t),this.removeComponents(r,a,t)}removeElements(e,t,s){const n=Jr(e,t,s);for(const i of n)pn(i)}removeComponents(e,t,s){const n=Jr(e,t,s);for(const i of n)pn(i.getGui()),this.destroyBean(i)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let t;if(!this.isReadOnly()){const s=this.getInputs(0)[0];s instanceof Ri&&this.isConditionBodyVisible(0)?t=s.getInputElement():t=this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();const e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,s=-1,n=!1;const i=this.getJoinOperator();for(let r=this.getNumConditions()-1;r>=0;r--)if(this.isConditionUiComplete(r))t===-1&&(t=r,s=r);else{const a=r>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(r-1),l=r<t;(a||l)&&(this.removeConditionsAndOperators(r,1),n=!0,l&&s--)}let o=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),o=!0),this.shouldAddNewConditionAtEnd(s===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),o=!0),o&&this.updateConditionStatusesAndValues(s,i),n&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=s}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){const e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:s}=this;this.forEachInput((n,i,o,r)=>{if(!(n instanceof Ri))return;const a=i===0&&r>1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",l=i===0&&r>1?e("ariaFilterFromValue","Filter from value"):i===0?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),c=s[o].getValue(),d=Yw(this,t,a,c);n.setInputPlaceholder(d),n.setInputAriaLabel(l)})}setElementValue(e,t,s){e instanceof Ri&&e.setValue(t!=null?String(t):null,!0)}setElementDisplayed(e,t){em(e)&&st(e.getGui(),t)}setElementDisabled(e,t){em(e)&&da(e.getGui(),t)}attachElementOnChange(e,t){e instanceof Ri&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,s)=>{this.forEachPositionTypeInput(s,t,e)})}forEachPositionInput(e,t){const s=this.getConditionType(e);this.forEachPositionTypeInput(e,s,t)}forEachPositionTypeInput(e,t,s){const n=Qn(t,this.optionsFactory),i=this.getInputs(e);for(let o=0;o<i.length;o++){const r=i[o];r!=null&&s(r,o,e,n)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e===0?!1:e>t+1}isConditionBodyVisible(e){const t=this.getConditionType(e);return Qn(t,this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)==="empty"||this.getValues(e).some(s=>s==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(t=>this.resetType(t)),this.eJoinAnds.forEach((t,s)=>this.resetJoinOperatorAnd(t,s,this.joinOperatorId+s)),this.eJoinOrs.forEach((t,s)=>this.resetJoinOperatorOr(t,s,this.joinOperatorId+s)),this.joinOperatorId++,this.forEachInput(t=>this.resetInput(t)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){const s=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(s).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="AND",this.translate("andCondition"),s)}resetJoinOperatorOr(e,t,s){this.resetJoinOperator(e,t,this.defaultJoinOperator==="OR",this.translate("orCondition"),s)}resetJoinOperator(e,t,s,n,i){this.updateJoinOperatorDisabled(e.setValue(s,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(n),t)}updateJoinOperatorsDisabled(){const e=(t,s)=>this.updateJoinOperatorDisabled(t,s);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){const s=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((n,i,o)=>{o===t&&this.setElementValue(n,s[i]!=null?s[i]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,s,n)=>{this.setElementValue(t,s===0&&n===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,s=>{this.attachElementOnChange(s,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},pg=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Uh(e){return e?.allowedCharPattern??null}function O1(e,t){const{filter:s,filterTo:n,type:i}=e||{};return[es(s),es(n)].slice(0,Qn(i,t))}var a9=class extends cd{constructor(){super("bigintFilter",O1,pg),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ko()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],s=this.eValuesTo[e];this.refreshInputPairValidation(t,s)}}refreshInputPairValidation(e,t,s=!1){const{bigintParser:n}=this.params,i=this.getParsedValue(e,n),o=this.getParsedValue(t,n),r=this.isInvalidValue(e,i),a=this.isInvalidValue(t,o),l=s?e:t,c=s?t:e,d=s?r:a,u=s?a:r;let p="";if(d)p=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!r&&!a){const f=l9(i,o,s);f&&(p=this.translate(f,[String(s?t.getValue():e.getValue())]))}l.setCustomValidity(p),u||c.setCustomValidity(""),p.length>0&&this.beans.ariaAnnounce.announceValue(p,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:s,additionalEventAttributes:n}=e,i=this.state,o=n?.fromAction;return(o&&o!="apply"||s.model!==i.model||!this.areStatesEqual(s.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,s){super.setElementValue(e,t,s),t===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:s}=this,n=Uh(e),i=cs({tag:"div",cls:"ag-filter-body",role:"presentation"}),o=this.createFromToElement(i,t,"from",n),r=this.createFromToElement(i,s,"to",n),a=(d,u,p)=>()=>this.refreshInputPairValidation(d,u,p),l=a(o,r,!0);o.onValueChange(l),o.addGuiEventListener("focusin",l);const c=a(o,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),i}createFromToElement(e,t,s,n){const i=this.createManagedBean(n?new fn({allowedCharPattern:n}):new fn);return i.addCss(`ag-filter-${s}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){const s=n=>this.removeComponents(n,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,n,i,o)=>{n<o&&t.push(es(s.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},n=this.getValues(e);return n.length>0&&(s.filter=String(n[0])),n.length>1&&(s.filterTo=String(n[1])),s}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,s=>t||(t=!s.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){const s=e.getValue();return s==null||typeof s=="string"&&s.trim()===""?null:t?t(s):es(s)}isInvalidValue(e,t){const s=e.getValue();return s!=null&&String(s).trim()!==""&&t===null}};function l9(e,t,s){return e!=null&&t!=null&&e>=t?`strict${s?"Max":"Min"}ValueValidation`:null}var H1=class extends _{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){const t=e.filterParams,s=new hg;this.optionsFactory=s,s.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(s,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source==="colDef"){const t=e.filterParams,s=this.optionsFactory;s.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:s,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){const t=e.model;if(t==null)return!0;const{operator:s}=t,n=[];if(s){const r=t;n.push(...r.conditions??[])}else n.push(t);const i=s&&s==="OR"?"some":"every",o=this.params.getValue(e.node);return n[i](r=>this.individualConditionPasses(e,r,o))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){const{model:t,filterParams:{filterOptions:s,maxNumConditions:n}}=e;if(t==null)return;let o=Vw(t)?t.conditions:[t];const r=s?.map(d=>typeof d=="string"?d:d.displayKey)??this.defaultOptions;if(!(!o||o.every(d=>r.find(u=>u===d.type)!==void 0))){this.params={...e,model:null},e.onModelChange(null);return}let l=!1;const c=this.filterType;if((o&&!o.every(d=>d.filterType===c)||t.filterType!==c)&&(o=o.map(d=>({...d,filterType:c})),l=!0),typeof n=="number"&&o&&o.length>n&&(o=o.slice(0,n),l=!0),l){const d=o.length>1?{...t,filterType:c,conditions:o}:{...o[0],filterType:c};this.params={...e,model:d},e.onModelChange(d)}}individualConditionPasses(e,t,s){const n=this.optionsFactory,i=this.mapValuesFromModel(t,n),o=n.getCustomOption(t.type),r=i9(o,i,s);return r??(s==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,s,t,e))}},gg=class extends H1{evaluateNullValue(e){const{includeBlanksInEquals:t,includeBlanksInNotEqual:s,includeBlanksInGreaterThan:n,includeBlanksInLessThan:i,includeBlanksInRange:o}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(s)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(n)return!0;break;case"lessThan":case"lessThanOrEqual":if(i)return!0;break;case"inRange":if(o)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(e,t,s){const n=s.type;if(!this.isValid(t))return n==="notEqual"||n==="notBlank";const i=this.comparator(),o=e[0]!=null?i(e[0],t):0;switch(n){case"equals":return o===0;case"notEqual":return o!==0;case"greaterThan":return o>0;case"greaterThanOrEqual":return o>=0;case"lessThan":return o<0;case"lessThanOrEqual":return o<=0;case"inRange":{const r=i(e[1],t);return this.params.filterParams.inRangeInclusive?o>=0&&r<=0:o>0&&r<0}case"blank":return Pc(t);case"notBlank":return!Pc(t);default:return X(76,{filterModelType:n}),!0}}},fg={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},c9={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},dd=class extends _{constructor(e,t,s){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=s}getModelAsString(e,t){const s=this.getLocaleTextFunc(),n=t==="filterToolPanel";if(!e)return n?Es(this,"filterSummaryInactive"):null;if(e.operator!=null){const o=e,a=(o.conditions??[]).map(c=>this.getModelAsString(c,t)),l=o.operator==="AND"?"andCondition":"orCondition";return a.join(` ${Es(this,l)} `)}else{if(e.type==="blank"||e.type==="notBlank")return n?Es(this,e.type==="blank"?"filterSummaryBlank":"filterSummaryNotBlank"):s(e.type,e.type);{const o=e,r=this.optionsFactory.getCustomOption(o.type),{displayKey:a,displayName:l,numberOfInputs:c}=r||{};return a&&l&&c===0?s(a,l):this.conditionToString(o,n,o.type==="inRange"||c===2,a,l)}}}updateParams(e){const{optionsFactory:t,filterParams:s}=e;this.optionsFactory=t,this.filterParams=s}conditionForToolPanel(e,t,s,n,i,o){let r;const a=this.getTypeKey(e);return a&&(r=Es(this,a)),i&&o&&(r=this.getLocaleTextFunc()(i,o)),r!=null?t?`${r} ${Es(this,"filterSummaryInRangeValues",[s(),n()])}`:`${r} ${s()}`:null}getTypeKey(e){const t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){const t=this.valueFormatter;return t?t(e??null)??"":String(e)}},B1=class extends dd{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=fg}conditionToString(e,t,s,n,i){const{filter:o,filterTo:r,type:a}=e,l=this.formatValue.bind(this),c=es(o),d=es(r);if(t){const u=this.conditionForToolPanel(a,s,()=>l(c),()=>l(d),n,i);if(u!=null)return u}return s?`${l(c)}-${l(d)}`:o!=null?l(c):`${a}`}},d9=class extends gg{constructor(){super(O1,pg),this.filterType="bigint",this.FilterModelFormatterClass=B1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return es(e)!==null}},mg=class extends _{constructor(e){super(),this.params=e,this.eInput=xe,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new fn(this.params?.config));const t=this.eInput.getGui();e.appendChild(t);const s=n=>this.onValueChanged(n);this.addManagedListeners(t,{input:s,keydown:s})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:s}){const{eInput:n}=this;n.setInputAriaLabel(e),t!==void 0&&n.setAutoComplete(t),n.toggleCss("ag-floating-filter-search-icon",!!s),n.setInputPlaceholder(s)}};function $h(e){const t=e?.trim();return t===""?e:t}function G1(e,t){const{filter:s,filterTo:n,type:i}=e||{};return[s||null,n||null].slice(0,Qn(i,t))}var V1=class extends ft{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}const t=e.operator;let s;t?s=e.conditions[0]:s=e,this.lastType=s.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;const s=e;return this.isTypeEditable(s.type)}init(e){this.params=e;const t=this.gos.get("enableFilterHandlers");if(this.reactive=t,this.setParams(e),t){const s=e;this.onModelUpdated(s.model)}}setParams(e){const t=new hg;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){const s=this.optionsFactory.defaultOption;t||(this.lastType=s),this.readOnly=!!e.filterParams.readOnly;const n=this.isTypeEditable(s);this.setEditable(n)}refresh(e){this.params=e;const t=e,s=this.reactive;if((!s||t.source==="colDef")&&this.updateParams(e),s){const{source:n,model:i}=t;if(n==="dataChanged"||n==="ui")return;this.onModelUpdated(i)}}updateParams(e){const t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&Qn(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},u9={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},vg=class extends V1{constructor(){super(...arguments),this.eFloatingFilterInputContainer=xe,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(u9)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){const{inputSvc:t,defaultDebounceMs:s,readOnly:n}=this,{filterPlaceholder:i,column:o,browserAutoComplete:r,filterParams:a}=e,l=this.lastType??this.optionsFactory.defaultOption,c=e.filterParams.filterPlaceholder,d=i===!0?Yw(this,c,"filterOoo",l):i||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(o),autoComplete:r??!1,placeholder:d}),this.applyActive=ed(a),!n){const u=jp(a,s);t.setValueChangedListener(xt(this,this.syncUpWithParentFilter.bind(this),u))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){const{inputSvc:t}=this,s=t.getValue();Jt(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(s,!0)}syncUpWithParentFilter(e){const t=e.key===j.ENTER,s=this.reactive;if(s&&this.params.onUiChange(),this.applyActive&&!t)return;const{inputSvc:n,params:i,lastType:o}=this;let r=n.getValue();if(i.filterParams.trimInput&&(r=$h(r),n.setValue(r,!0)),s){const a=i,l=a.model,c=this.convertValue(r),d=c==null?null:{...l??{filterType:this.filterType,type:o??this.optionsFactory.defaultOption},filter:c};a.onModelChange(d,{afterFloatingFilter:!0})}else i.parentFilterInstance(a=>{a?.onFloatingFilterChanged(o||null,r||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},h9=class extends vg{constructor(){super(...arguments),this.FilterModelFormatterClass=B1,this.filterType="bigint",this.defaultOptions=pg}updateParams(e){const t=e.filterParams;Uh(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){const t=e.filterParams;this.allowedCharPattern=Uh(t),this.bigintParser=t?.bigintParser;const s=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new mg({config:s}))}convertValue(e){return e==null||e===""?null:this.bigintParser?this.bigintParser(e):es(e)}},mv=".ag-input-field-input",j1=class{constructor(e,t,s,n,i,o){this.context=e,this.eParent=i,this.alive=!0,this.debouncedReport=xt({isAlive:()=>this.alive},vv,500),this.timeoutHandle=null,AE(t,s,n)?.newAgStackInstance().then(a=>{if(!this.alive){e.destroyBean(a);return}if(this.dateComp=a,!a)return;i.appendChild(a.getGui()),a?.afterGuiAttached?.();const{tempValue:l,disabled:c}=this;l&&a.setDate(l),c!=null&&a.setDisabled?.(c),o?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){const t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){const t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){st(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){const s=this.dateComp?.getGui().querySelector(mv);if(s&&"setCustomValidity"in s){const n=e.length>0;s.setCustomValidity(e),n?t?this.timeoutHandle=this.debouncedReport(s):vv(s):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),Sp(s,n)}}getValidity(){return this.dateComp?.getGui().querySelector(mv)?.validity}};function vv(e){e.reportValidity()}var Cg=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function z1(e,t){const{dateFrom:s,dateTo:n,type:i}=e||{};return[s&&$t(s,void 0,!0)||null,n&&$t(n,void 0,!0)||null].slice(0,Qn(i,t))}var Cv=1e3,wv=1/0,p9=class extends cd{constructor(){super("dateFilter",z1,Cg),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=Cv,this.maxValidYear=wv,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ko()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);const t=(l,c)=>{const d=e[l];if(d!=null)if(isNaN(d))X(82,{param:l});else return d==null?c:Number(d);return c},s=t("minValidYear",Cv),n=t("maxValidYear",wv);this.minValidYear=s,this.maxValidYear=n,s>n&&X(83);const{minValidDate:i,maxValidDate:o}=e,r=i instanceof Date?i:$t(i);this.minValidDate=r;const a=o instanceof Date?o:$t(o);this.maxValidDate=a,r&&a&&r>a&&X(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,s=!1){const{dateConditionFromComps:n,dateConditionToComps:i,beans:o}=this,r=n[e],a=i[e],l=Qn(this.getConditionType(e),this.optionsFactory),c=r.getDate(),d=a.getDate(),u=l>=2?g9(c,d,t):null,p=u?this.translate(u,[String(t?d:c)]):"",f=!Ko()&&!s;(t?r:a).setCustomValidity(p,f),(t?a:r).setCustomValidity("",f),p.length>0&&o.ariaAnnounce.announceValue(p,"dateFilter")}createDateCompWrapper(e,t,s){const{beans:{userCompFactory:n,context:i,gos:o},params:r}=this,a=s==="from",l=new j1(i,n,r.colDef,Te(o,{onDateChanged:()=>{this.refreshInputPairValidation(t,a),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,a),filterParams:r,location:"filter"}),e);return this.addDestroyFunc(()=>l.destroy()),l}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){const e=cs({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e}createFromToElement(e,t,s,n){const i=cs({tag:"div",cls:`ag-filter-${n} ag-filter-date-${n}`});t.push(i),e.appendChild(i),s.push(this.createDateCompWrapper(i,t.length-1,n))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),Jr(this.eConditionPanelsFrom,e,t),Jr(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,s){const n=Jr(e,t,s);for(const i of n)i.destroy()}isValidDateValue(e){if(e===null)return!1;const{minValidDate:t,maxValidDate:s,minValidYear:n,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<n)return!1;if(s){if(e>s)return!1}else if(e.getUTCFullYear()>i)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=t.getDate()!=null&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,s=>t||(t=!(s.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(s,n,i,o)=>{!t||n>=o||t&&(t=this.isValidDateValue(s.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={},{params:n,filterType:i}=this,o=this.getValues(e),r=n.useIsoSeparator?"T":" ";return o.length>0&&(s.dateFrom=Ut(o[0],!0,r)),o.length>1&&(s.dateTo=Ut(o[1],!0,r)),{dateFrom:null,dateTo:null,filterType:i,type:t,...s}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){const e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),s=e("ariaFilterValue","Filter Value");this.forEachInput(n=>{n.setInputPlaceholder(t),n.setInputAriaLabel(s)})}getInputs(e){const{dateConditionFromComps:t,dateConditionToComps:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,n,i,o)=>{n<o&&t.push(s.getDate())}),t}translate(e,t){let s=e;return e==="lessThan"?s="before":e==="greaterThan"&&(s="after"),super.translate(s,t)}};function g9(e,t,s){return e!=null&&t!=null&&e>=t?`${s?"max":"min"}DateValidation`:null}var W1=class extends dd{constructor(e,t){super(e,t,s=>{const{dataTypeSvc:n,valueSvc:i}=this.beans,o=t.column,r=n?.getDateFormatterFunction(o),a=r?r(s??void 0):s;return i.formatValue(o,null,a)}),this.filterTypeKeys=fg}conditionToString(e,t,s,n,i){const{type:o}=e,r=$t(e.dateFrom),a=$t(e.dateTo),l=this.filterParams.inRangeFloatingFilterDateFormat,c=t?this.formatValue.bind(this):p=>G4(p,l),d=()=>r!==null?c(r):"null",u=()=>a!==null?c(a):"null";if(r==null&&a==null)return Es(this,o);if(t){const p=this.conditionForToolPanel(o,s,d,u,n,i);if(p!=null)return p}return s?`${d()}-${u()}`:r!=null?c(r):`${o}`}};function f9(e,t){const s=t;return s<e?-1:s>e?1:0}var m9=class extends gg{constructor(){super(z1,Cg),this.filterType="date",this.FilterModelFormatterClass=W1,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){const{filterTypeToRangeCache:s}=this,n=Date.now();let i=s.get(e);if(i&&i.expires<n&&(i=void 0),!i){const[o,r]=t(new Date(n),new Date(n));i={from:o,to:r,expires:xs(new Date(n)).getTime()-n},s.set(e,i)}return i}comparator(){return this.params.filterParams.comparator??f9}isValid(e){const t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,s){const n=s.type,i=this.comparator();if(!this.isValid(t))return n==="notEqual"||n==="notBlank";const o=n,r=O9[o];if(r){const{from:a,to:l}=this.getOrRefreshRangeCacheItem(o,r);return i(a,t)>=0&&i(l,t)<0}return super.evaluateNonNullValue(e,t,s)}},v9=1,Ml=null,C9=()=>{if(Ml!=null)return Ml;let e;const t=typeof navigator>"u"?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<"u"&&typeof Intl.Locale=="function")try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return Ml=e==null?v9:e%7,Ml},ds=e=>(e.setHours(0,0,0,0),e),ud=e=>{const t=e.getDay(),s=C9(),n=(t-s+7)%7;return e.setDate(e.getDate()-n),ds(e)},hd=(e,t=1)=>(e.setDate(e.getDate()-t),e),xs=e=>(e.setDate(e.getDate()+1),ds(e)),_1=e=>(ud(e),e.setDate(e.getDate()+6),xs(e)),pd=e=>(e.setDate(1),ds(e)),wg=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),ds(e)),bg=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),pd(e)},U1=e=>{const t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),wg(e)},xg=e=>(e.setMonth(0,1),ds(e)),$1=e=>(e.setMonth(12,0),xs(e)),Qo=e=>hd(e),qh=e=>Qo(ud(e)),Kh=e=>Qo(pd(e)),Yh=e=>Qo(bg(e)),yg=(e,t)=>[ds(e),xs(t)],w9=(e,t)=>yg(Qo(e),Qo(t)),Sg=(e,t)=>[ud(e),_1(t)],b9=(e,t)=>Sg(qh(e),qh(t)),Rg=(e,t)=>[pd(e),wg(t)],x9=(e,t)=>Rg(Kh(e),Kh(t)),Fg=(e,t)=>[bg(e),U1(t)],y9=(e,t)=>Fg(Yh(e),Yh(t)),Eg=(e,t)=>[xg(e),$1(t)],S9=(e,t)=>[xg(e),xs(t)],R9=(e,t)=>[ds(hd(e,7)),xs(t)],F9=(e,t)=>[ds(hd(e,30)),xs(t)],E9=(e,t)=>[ds(hd(e,90)),xs(t)],D9=(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[ds(e),xs(t)]),P9=(e,t)=>(e.setFullYear(e.getFullYear()-1),[ds(e),xs(t)]),T9=(e,t)=>(e.setFullYear(e.getFullYear()-2),[ds(e),xs(t)]),k9=(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),Eg(e,t)),I9=(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),Eg(e,t)),M9=(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),Fg(e,t)),A9=(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),Rg(e,t)),L9=(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),Sg(e,t)),N9=(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),yg(e,t)),O9={today:yg,yesterday:w9,tomorrow:N9,thisWeek:Sg,lastWeek:b9,nextWeek:L9,thisMonth:Rg,lastMonth:x9,nextMonth:A9,thisQuarter:Fg,lastQuarter:y9,nextQuarter:M9,thisYear:Eg,lastYear:k9,nextYear:I9,yearToDate:S9,last7Days:R9,last30Days:F9,last90Days:E9,last6Months:D9,last12Months:P9,last24Months:T9,setStartOfDay:ds,setStartOfWeek:ud,setStartOfNextDay:xs,setStartOfNextWeek:_1,setStartOfMonth:pd,setStartOfNextMonth:wg,setStartOfQuarter:bg,setStartOfNextQuarter:U1,setStartOfYear:xg,setStartOfNextYear:$1,setPreviousDay:Qo,setPreviousWeek:qh,setPreviousMonth:Kh,setPreviousQuarter:Yh},H9={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},B9=class extends V1{constructor(){super(H9,[ad]),this.eReadOnlyText=xe,this.eDateWrapper=xe,this.FilterModelFormatterClass=W1,this.filterType="date",this.defaultOptions=Cg}setParams(e){super.setParams(e),this.createDateComponent();const t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){const t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){const s=e?$t(e.dateFrom):null;this.dateComp.setDate(s),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){st(this.eDateWrapper,e),st(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){const e=this.dateComp.getDate();if(this.reactive){const t=this.params;t.onUiChange();const s=t.model,n=Ut(e),i=n==null?null:{...s??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:n};t.onModelChange(i,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){const{filterParams:e}=this.params,t=jp(e,this.defaultDebounceMs);return Te(this.gos,{onDateChanged:xt(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){const{beans:{context:e,userCompFactory:t},eDateWrapper:s,params:{column:n}}=this;this.dateComp=new j1(e,t,n.getColDef(),this.getDateComponentParams(),s,i=>{i.setInputAriaLabel(this.getAriaLabel(n))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},G9={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},V9=class extends ft{constructor(){super(G9,[ad]),this.eDateInput=xe,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);const t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){const t=this.eDateInput.getInputElement(),s=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=s&&ri();const{minValidYear:n,maxValidYear:i,minValidDate:o,maxValidDate:r,buttons:a,includeTime:l,colDef:c}=e.filterParams||{},d=this.beans.dataTypeSvc,u=l??d?.getDateIncludesTimeFlag?.(c.cellDataType)??!1;s?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";const p=bv(o,n,!0),f=bv(r,i,!1);p&&f&&p.getTime()>f.getTime()&&X(87),p&&(t.min=Ut(p,u)),f&&(t.max=Ut(f,u)),this.isApply=e.location==="floatingFilter"&&!!a?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return $t(this.eDateInput.getValue())}setDate(e){const t=this.params.filterParams.colDef.cellDataType,s=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(Ut(e,s))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function bv(e,t,s){return e&&t&&X(s?85:86),e instanceof Date?e:e?$t(e):t?$t(`${t}-${s?"01-01":"12-31"}`):null}var Dg=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function Zh(e){return e?.allowedCharPattern??null}function Tc(e){return e==null||isNaN(e)?null:e}function q1(e,t){const{filter:s,filterTo:n,type:i}=e||{};return[Tc(s),Tc(n)].slice(0,Qn(i,t))}var j9=class extends cd{constructor(){super("numberFilter",q1,Dg),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!Ko()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){const t=this.eValuesFrom[e],s=this.eValuesTo[e];this.refreshInputPairValidation(t,s)}}refreshInputPairValidation(e,t,s=!1){const n=this.params.numberParser,i=xv(n,e),o=xv(n,t),r=z9(i,o,s),a=r?this.translate(r,[String(s?o:i)]):"";(s?e:t).setCustomValidity(a),(s?t:e).setCustomValidity(""),a.length>0&&this.beans.ariaAnnounce.announceValue(a,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){const t=super.refresh(e),{state:s,additionalEventAttributes:n}=e,i=this.state,o=n?.fromAction;return(o&&o!="apply"||s.model!==i.model||!this.areStatesEqual(s.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,s){const{numberFormatter:n}=this.params,i=!s&&n?n(t??null):t;super.setElementValue(e,i),i===null&&e.setCustomValidity("")}createEValue(){const{params:e,eValuesFrom:t,eValuesTo:s}=this,n=Zh(e),i=cs({tag:"div",cls:"ag-filter-body",role:"presentation"}),o=this.createFromToElement(i,t,"from",n),r=this.createFromToElement(i,s,"to",n),a=(d,u,p)=>()=>this.refreshInputPairValidation(d,u,p),l=a(o,r,!0);o.onValueChange(l),o.addGuiEventListener("focusin",l);const c=a(o,r,!1);return r.onValueChange(c),r.addGuiEventListener("focusin",c),i}createFromToElement(e,t,s,n){const i=this.createManagedBean(n?new fn({allowedCharPattern:n}):new dg);return i.addCss(`ag-filter-${s}`),i.addCss("ag-filter-filter"),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){const s=n=>this.removeComponents(n,e,t);s(this.eValuesFrom),s(this.eValuesTo)}getValues(e){const t=[];return this.forEachPositionInput(e,(s,n,i,o)=>{n<o&&t.push(Tc(K1(this.params.numberParser,s.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},n=this.getValues(e);return n.length>0&&(s.filter=n[0]),n.length>1&&(s.filterTo=n[1]),s}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,s=>t||(t=!s.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function K1(e,t){if(typeof t=="number")return t;let s=ln(t);return s!=null&&s.trim()===""&&(s=null),e?e(s):s==null||s.trim()==="-"?null:Number.parseFloat(s)}function xv(e,t){return Tc(K1(e,t.getValue(!0)))}function z9(e,t,s){return e!=null&&t!=null&&e>=t?`strict${s?"Max":"Min"}ValueValidation`:null}var Y1=class extends dd{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=fg}conditionToString(e,t,s,n,i){const{filter:o,filterTo:r,type:a}=e,l=this.formatValue.bind(this);if(t){const c=this.conditionForToolPanel(a,s,()=>l(o),()=>l(r),n,i);if(c!=null)return c}return s?`${l(o)}-${l(r)}`:o!=null?l(o):`${a}`}},W9=class extends gg{constructor(){super(q1,Dg),this.filterType="number",this.FilterModelFormatterClass=Y1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},_9=class extends _{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new dg),this.eTextInput=this.createManagedBean(new fn),this.eTextInput.setDisabled(!0);const t=this.eNumberInput.getGui(),s=this.eTextInput.getGui();e.appendChild(t),e.appendChild(s),this.setupListeners(t,n=>this.onValueChanged(n)),this.setupListeners(s,n=>this.onValueChanged(n))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:s}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,s),this.setPlaceholder(this.eTextInput,s)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},U9=class extends vg{constructor(){super(...arguments),this.FilterModelFormatterClass=Y1,this.filterType="number",this.defaultOptions=Dg}updateParams(e){Zh(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=Zh(e.filterParams),this.allowedCharPattern?this.createManagedBean(new mg({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new _9)}convertValue(e){return e?Number(e):null}},Pg=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],$9=class extends cd{constructor(){super("textFilter",G1,Pg),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){const t=this.getConditionType(e),s={filterType:this.filterType,type:t},n=this.getValues(e);return n.length>0&&(s.filter=n[0]),n.length>1&&(s.filterTo=n[1]),s}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){const{eValuesFrom:t,eValuesTo:s}=this;return e>=t.length?[null,null]:[t[e],s[e]]}getValues(e){const t=[];return this.forEachPositionInput(e,(s,n,i,o)=>{n<o&&t.push(ln(s.getValue()))}),t}createEValue(){const e=cs({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:s}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,s,"to"),e}createFromToElement(e,t,s){const n=this.createManagedBean(new fn);n.addCss(`ag-filter-${s}`),n.addCss("ag-filter-filter"),t.push(n),e.appendChild(n.getGui())}removeEValues(e,t){const s=o=>this.removeComponents(o,e,t),{eValuesFrom:n,eValuesTo:i}=this;s(n),s(i)}},Z1=class extends dd{constructor(){super(...arguments),this.filterTypeKeys=c9}conditionToString(e,t,s,n,i){const{filter:o,filterTo:r,type:a}=e;if(t){const l=d=>()=>Es(this,"filterSummaryTextQuote",[d]),c=this.conditionForToolPanel(a,s,l(o),l(r),n,i);if(c!=null)return c}return s?`${o}-${r}`:o!=null?`${o}`:`${a}`}},q9=({filterOption:e,value:t,filterText:s})=>{if(s==null)return!1;switch(e){case"contains":return t.includes(s);case"notContains":return!t.includes(s);case"equals":return t===s;case"notEqual":return t!=s;case"startsWith":return t.indexOf(s)===0;case"endsWith":{const n=t.lastIndexOf(s);return n>=0&&n===t.length-s.length}default:return!1}},K9=e=>e,Y9=e=>e==null?null:e.toString().toLowerCase(),Z9=class extends H1{constructor(){super(G1,Pg),this.filterType="text",this.FilterModelFormatterClass=Z1}updateParams(e){super.updateParams(e);const t=e.filterParams;this.matcher=t.textMatcher??q9,this.formatter=t.textFormatter??(t.caseSensitive?K9:Y9)}evaluateNullValue(e){return e?["notEqual","notContains","blank"].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,s,n){const i=e.map(p=>this.formatter(p))||[],o=this.formatter(t),{api:r,colDef:a,column:l,context:c,filterParams:{textFormatter:d}}=this.params;if(s.type==="blank")return Pc(t);if(s.type==="notBlank")return!Pc(t);const u={api:r,colDef:a,column:l,context:c,node:n.node,data:n.data,filterOption:s.type,value:o,textFormatter:d};return i.some(p=>this.matcher({...u,filterText:p}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){const t=s=>{const n={...s},{filter:i,filterTo:o}=s;return i&&(n.filter=$h(i)??null),o&&(n.filterTo=$h(o)??null),n};return Vw(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},X9=class extends vg{constructor(){super(...arguments),this.FilterModelFormatterClass=Z1,this.filterType="text",this.defaultOptions=Pg}createFloatingFilterInputService(){return this.createManagedBean(new mg)}};function Q9(e){return!!e.quickFilter?.isFilterPresent()}function J9(e){return e.quickFilter?.getText()}function eL(e){e.quickFilter?.resetCache()}var tL=class extends _{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",s=>this.setFilter(s.currentValue)),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get("quickFilterText")),this.parser=t.get("quickFilterParser"),this.matcher=t.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],()=>this.setParserAndMatcher())}refreshCols(){const{autoColSvc:e,colModel:t,gos:s,pivotResultCols:n}=this.beans,i=t.isPivotMode(),o=e?.getColumns(),r=t.getColDefCols();let a=(i&&!s.get("applyQuickFilterBeforePivotOrAgg")?n?.getPivotResultCols()?.list:r)??[];o&&(a=a.concat(o)),this.colsToUse=s.get("includeHiddenColumnsInQuickFilter")?a:a.filter(l=>l.isVisible()||l.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){const t=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(s=>t?this.doesRowPassCache(e,s):this.doesRowPassNoCache(e,s))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:e,parser:t}=this;e?this.quickFilterParts=t?t(e):e.split(" "):this.quickFilterParts=null}parseFilter(e){return le(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!="string"){X(70,{newFilter:e});return}const t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const e=this.gos.get("quickFilterParser"),t=this.gos.get("quickFilterMatcher"),s=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,s&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(e,t){return this.colsToUse.some(s=>{const n=this.getTextForColumn(s,e);return le(n)&&n.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let s;e?(this.checkGenerateAggText(t),s=t.quickFilterAggregateText):s=this.getAggText(t);const{quickFilterParts:n,matcher:i}=this;return i(n,s)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let s=this.beans.filterValueSvc.getValue(e,t);const n=e.getColDef();if(n.getQuickFilterText){const i=Te(this.gos,{value:s,node:t,data:t.data,column:e,colDef:n});s=n.getQuickFilterText(i)}return le(s)?s.toString().toUpperCase():null}getAggText(e){const t=[];for(const s of this.colsToUse){const n=this.getTextForColumn(s,e);le(n)&&t.push(n)}return t.join(`
|
|
66
|
+
`)}},sL={moduleName:"ClientSideRowModelFilter",version:ie,rowModels:["clientSide"],beans:[YM]},Tg={moduleName:"FilterCore",version:ie,beans:[U7],apiFunctions:{isAnyFilterPresent:W7,onFilterChanged:_7},css:[y7],dependsOn:[sL]},X1={moduleName:"FilterValue",version:ie,beans:[J7]},La={moduleName:"ColumnFilter",version:ie,beans:[z7,Q7],dynamicBeans:{headerFilterCellCtrl:v7},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:S7,getColumnFilterInstance:R7,destroyFilter:F7,setFilterModel:E7,getFilterModel:D7,getColumnFilterModel:P7,setColumnFilterModel:T7,showColumnFilter:k7,hideColumnFilter:I7,getColumnFilterHandler:M7,doFilterAction:A7},dependsOn:[Tg,rd,X1,x7]},nL={moduleName:"CustomFilter",version:ie,userComponents:{agReadOnlyFloatingFilter:t9},dependsOn:[La]},iL={moduleName:"TextFilter",version:ie,dependsOn:[La],userComponents:{agTextColumnFilter:{classImp:$9,params:{useForm:!0}},agTextColumnFloatingFilter:X9},dynamicBeans:{agTextColumnFilterHandler:Z9}},oL={moduleName:"NumberFilter",version:ie,dependsOn:[La],userComponents:{agNumberColumnFilter:{classImp:j9,params:{useForm:!0}},agNumberColumnFloatingFilter:U9},dynamicBeans:{agNumberColumnFilterHandler:W9}},rL={moduleName:"BigIntFilter",version:ie,dependsOn:[La],userComponents:{agBigIntColumnFilter:{classImp:a9,params:{useForm:!0}},agBigIntColumnFloatingFilter:h9},dynamicBeans:{agBigIntColumnFilterHandler:d9}},aL={moduleName:"DateFilter",version:ie,dependsOn:[La],userComponents:{agDateColumnFilter:{classImp:p9,params:{useForm:!0}},agDateInput:V9,agDateColumnFloatingFilter:B9},dynamicBeans:{agDateColumnFilterHandler:m9}},lL={moduleName:"QuickFilterCore",version:ie,rowModels:["clientSide"],beans:[tL],dependsOn:[Tg,X1]},cL={moduleName:"QuickFilter",version:ie,apiFunctions:{isQuickFilterPresent:Q9,getQuickFilter:J9,resetQuickFilter:eL},dependsOn:[lL]},dL={moduleName:"ExternalFilter",version:ie,dependsOn:[Tg]},uL=class extends _{constructor(e,t,s){super(),this.id=e,this.parentCache=t,this.params=s,this.state="needsLoading",this.version=0,this.startRow=e*s.blockSize,this.endRow=this.startRow+s.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(e,t,s){this.successCommon(e,{rowData:t,rowCount:s})}isRequestMostRecentAndLive(e){const t=e===this.version,s=this.isAlive();return t&&s}successCommon(e,t){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(e)&&(this.state="loaded",this.processServerResult(t))}postConstruct(){this.rowNodes=[];const{params:{blockSize:e,rowHeight:t},startRow:s,beans:n,rowNodes:i}=this;for(let o=0;o<e;o++){const r=s+o,a=new Xn(n);a.setRowHeight(t),a.uiLevel=0,a.setRowIndex(r),a.setRowTop(t*r),i.push(a)}}getBlockStateJson(){const{id:e,startRow:t,endRow:s,state:n}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:s,pageStatus:n}}}setDataAndId(e,t,s){le(t)?e.setDataAndId(t,s.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){const e=this.createLoadParams();if(ht(this.params.datasource.getRows)){X(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){const{startRow:e,endRow:t,version:s,params:{sortModel:n,filterModel:i},gos:o}=this;return Te(o,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,s),failCallback:this.pageLoadFailed.bind(this,s),sortModel:n,filterModel:i})}forEachNode(e,t,s){this.rowNodes.forEach((n,i)=>{this.startRow+i<s&&e(n,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);const s=e-this.startRow;return this.rowNodes[s]}processServerResult(e){const{rowNodes:t,beans:s}=this;t.forEach((i,o)=>{const r=e.rowData?e.rowData[o]:void 0;!i.id&&i.alreadyRendered&&r&&(t[o]=new Xn(s),t[o].setRowIndex(i.rowIndex),t[o].setRowTop(i.rowTop),t[o].setRowHeight(i.rowHeight),i._destroy(!0)),this.setDataAndId(t[o],r,this.startRow+o)});const n=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,n)}destroy(){const e=this.rowNodes;for(let t=0,s=e.length;t<s;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},hL=2,pL=class extends _{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){const s=Math.floor(e/this.params.blockSize);let n=this.blocks[s];if(!n){if(t)return;n=this.createBlock(s)}return n.getRow(e)}createBlock(e){const t=this.params,s=this.createBean(new uL(e,this,t));return this.blocks[s.id]=s,this.blockCount++,this.purgeBlocksIfNeeded(s),t.rowNodeBlockLoader.addBlock(s),s}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(const e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(ji(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){const t=this.getBlocksInOrder().filter(r=>r!=e),s=(r,a)=>a.lastAccessed-r.lastAccessed;t.sort(s);const n=this.params.maxBlocksInCache>0,i=n?this.params.maxBlocksInCache-1:null,o=hL-1;t.forEach((r,a)=>{const l=r.state==="needsLoading"&&a>=o,c=n?a>=i:!1;if(l||c){if(this.isBlockCurrentlyDisplayed(r)||this.isBlockFocused(r))return;this.removeBlockFromCache(r)}})}isBlockFocused(e){const t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;const{startRow:s,endRow:n}=e;return t.rowIndex>=s&&t.rowIndex<n}isBlockCurrentlyDisplayed(e){const{startRow:t,endRow:s}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,s-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t=="number"&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:s,overflowSize:n}=this.params,o=(e.id+1)*s+n;this.rowCount<o&&(this.rowCount=o)}}setRowCount(e,t){this.rowCount=e,le(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){const t={value:0};for(const s of this.getBlocksInOrder())s.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){const e=(s,n)=>s.id-n.id;return Object.values(this.blocks).sort(e)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const e=[];for(const t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(const t of e)this.destroyBlock(t)}purgeCache(){for(const e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){const s=[];let n=-1,i=!1;const o={value:0};let r=!1;for(const l of this.getBlocksInOrder())if(!r){if(i&&n+1!==l.id){r=!0;continue}n=l.id,l.forEachNode(c=>{const d=c===e||c===t;(i||d)&&s.push(c),d&&(i=!i)},o,this.rowCount)}return r||i?[]:s}},gL=class extends _{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get("rowModelType")!=="infinite")return;const e=this.beans,t=new Xn(e);this.rootNode=t,t.level=-1,this.rowHeight=ki(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=ki(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;this.cacheParams?e=!la(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]):e=!0,e&&this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){if(!this.datasource)return;qo(this.gos)!=null||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache()}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const e=this.beans,{filterManager:t,sortSvc:s,rowNodeBlockLoader:n,eventSvc:i,gos:o}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:s?.getSortModel()??[],rowNodeBlockLoader:n,initialRowCount:o.get("infiniteInitialRowCount"),maxBlocksInCache:o.get("maxBlocksInCache"),rowHeight:ki(e),overflowSize:o.get("cacheOverflowSize"),blockSize:o.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new pL(this.cacheParams)),i.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){const t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(s=>{s.id===e&&(t=s)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){const t=Math.floor(e/this.rowHeight),s=this.getRowCount()-1;return t>s?s:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function fL(e){sd(e)?.refreshCache()}function mL(e){sd(e)?.purgeCache()}function vL(e){return sd(e)?.getRowCount()}var CL=class extends _{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=wF(this.gos);const e=this.gos.get("blockLoadDebounceMillis");e&&e>0&&(this.checkBlockToLoadDebounce=xt(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){_s(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){ji(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");return}const e=this.maxConcurrentRequests!=null?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(s=>s.state==="needsLoading").slice(0,e);this.activeBlockLoadsCount+=t.length;for(const s of t)s.load();this.printCacheStatus()}getBlockState(){const e={};return this.blocks.forEach(t=>{const{id:s,state:n}=t.getBlockStateJson();e[s]=n}),e}printCacheStatus(){ji(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},wL={moduleName:"InfiniteRowModelCore",version:ie,rowModels:["infinite"],beans:[gL,CL]},bL={moduleName:"InfiniteRowModel",version:ie,apiFunctions:{refreshInfiniteCache:fL,purgeInfiniteCache:mL,getInfiniteRowCount:vL},dependsOn:[wL,zM]},xL=class extends _{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){const s=this.wrapSvc?.wrap(e,t)??t,n=!Xl.has(e),i=n?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(s),this.eventSvc.addListener(e,s,n)}removeListener(e,t){const s=this.wrapSvc?.unwrap(e,t)??t,i=!!this.asyncListeners.get(e)?.delete(s);i||this.syncListeners.get(e)?.delete(s),this.eventSvc.removeListener(e,s,i)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,s=(o,r)=>{Xl.has(o)&&t(o,r)},n=(o,r)=>{Xl.has(o)||t(o,r)};this.globalListenerPairs.set(e,{syncListener:s,asyncListener:n});const i=this.eventSvc;i.addGlobalListener(s,!1),i.addGlobalListener(n,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:s,globalListenerPairs:n}=this,i=s?.unwrapGlobal(e)??e;if(n.has(i)){const{syncListener:r,asyncListener:a}=n.get(i);t.removeGlobalListener(r,!1),t.removeGlobalListener(a,!0),n.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((s,n)=>{s.forEach(i=>this.eventSvc.removeListener(n,i,t)),s.clear()}),e.clear()}destroyGlobalListeners(e,t){for(const s of e)this.eventSvc.removeGlobalListener(s,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:s,asyncListener:n})=>{t.removeGlobalListener(s,!1),t.removeGlobalListener(n,!0)}),e.clear()}};function yL(e,t,s){e.apiEventSvc?.addListener(t,s)}function SL(e,t,s){e.apiEventSvc?.removeListener(t,s)}function RL(e,t){e.apiEventSvc?.addGlobalListener(t)}function FL(e,t){e.apiEventSvc?.removeGlobalListener(t)}var EL={moduleName:"EventApi",version:ie,apiFunctions:{addEventListener:yL,addGlobalListener:RL,removeEventListener:SL,removeGlobalListener:FL},beans:[xL]},DL=class extends _{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const e=this.gos,t=e.getCallback("getLocaleText");return t?W3(t):_3(e.get("localeText"))}},PL={moduleName:"Locale",version:ie,beans:[DL]};function TL(e){return e.stateSvc?.getState()??{}}function kL(e,t,s){return e.stateSvc?.setState(t,s)}function yv(e){return e={...e},e.version||(e.version="32.1.0"),e.version==="32.1.0"&&(e=IL(e)),e.version=ie,e}function IL(e){return e.cellSelection=ML(e,"rangeSelection"),e}function ML(e,t){if(e&&typeof e=="object")return e[t]}var AL=class extends _{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=xt(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=xt(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=xt(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){const{gos:e,ctrlsSvc:t,colDelayRenderSvc:s}=this.beans;this.isClientSideRowModel=gt(e);const n=yv(e.get("initialState")??{}),i=n.partialColumnState;delete n.partialColumnState,this.cachedState=n;const o=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>o(()=>this.setupStateOnGridReady(n))),(n.columnOrder||n.columnVisibility||n.columnSizing||n.columnPinning||n.columnGroup)&&s?.hideColumns("columnState");const[r,a,l]=this.addManagedEventListeners({newColumnsLoaded:({source:c})=>{c==="gridInitializing"&&(r(),o(()=>{this.setupStateOnColumnsInitialised(n,!!i),s?.revealColumns("columnState")}))},rowCountReady:()=>{a?.(),o(()=>this.setupStateOnRowCountReady(n))},firstDataRendered:()=>{l?.(),o(()=>this.setupStateOnFirstDataRendered(n))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){const s=yv(e);delete s.partialColumnState,this.cachedState=s,this.startSuppressEvents();const n="api",i=t?new Set(t):void 0;this.setGridReadyState(s,n,i),this.setColumnsInitialisedState(s,n,!!i,i),this.setRowCountState(s,n,i),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(s,n,i),this.stopSuppressEvents(n)})}setGridReadyState(e,t,s){t==="api"&&!s?.has("sideBar")&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");const t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,s,n){this.setColumnState(e,t,s,n),this.setColumnGroupState(e,t,n),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);const s=n=>()=>this.updateColumnState([n]);this.addManagedEventListeners({columnValueChanged:s("aggregation"),columnMoved:s("columnOrder"),columnPinned:s("columnPinning"),columnResized:s("columnSizing"),columnVisible:s("columnVisibility"),columnPivotChanged:s("pivot"),columnPivotModeChanged:s("pivot"),columnRowGroupChanged:s("rowGroup"),sortChanged:s("sort"),newColumnsLoaded:({source:n})=>{this.updateColumnAndGroupState(),n!=="gridInitializing"&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,s){const{filter:n,rowGroupExpansion:i,ssrmRowGroupExpansion:o,rowSelection:r,pagination:a,rowPinning:l}=e,c=(u,p)=>!s?.has(u)&&(p||t==="api");c("filter",n)&&this.setFilterState(n),(c("rowGroupExpansion",i)||c("ssrmRowGroupExpansion",o))&&this.setRowGroupExpansionState(o,i,t),c("rowSelection",r)&&this.setRowSelectionState(r,t),c("pagination",a)&&this.setPaginationState(a,t),c("rowPinning",l)&&this.setRowPinningState(l);const d=this.updateCachedState.bind(this);d("filter",this.getFilterState()),this.updateGroupExpansionState(),d("rowSelection",this.getRowSelectionState()),d("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},n=()=>t("filter",this.getFilterState()),{gos:i,colFilter:o,selectableFilter:r}=this.beans;this.addManagedEventListeners({filterChanged:n,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{(i.get("groupDefaultExpanded")!==0||i.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:a=>{(a.newPage||a.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),o&&this.addManagedListeners(o,{filterStateChanged:n}),r&&this.addManagedListeners(r,{selectedFilterChanged:n})}setFirstDataRenderedState(e,t,s){const{scroll:n,cellSelection:i,focusedCell:o,columnOrder:r}=e,a=(d,u)=>!s?.has(d)&&(u||t==="api");a("focusedCell",o)&&this.setFocusedCellState(o),a("cellSelection",i)&&this.setCellSelectionState(i),a("scroll",n)&&this.setScrollState(n),this.setColumnPivotState(!!r?.orderedColIds,t);const l=this.updateCachedState.bind(this);l("sideBar",this.getSideBarState()),l("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();l("rangeSelection",c),l("cellSelection",c),l("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");const t=this.updateCachedState.bind(this),s=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:s,cellFocusCleared:s,cellSelectionChanged:n=>{if(n.finished){const i=this.getRangeSelectionState();t("rangeSelection",i),t("cellSelection",i)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){const e=this.beans;return mM(Sc(e),e.colModel.isPivotMode())}setColumnState(e,t,s,n){const{sort:i,rowGroup:o,aggregation:r,pivot:a,columnPinning:l,columnVisibility:c,columnSizing:d,columnOrder:u}=e;let p=!1;const f=(D,T)=>{const I=!n?.has(D)&&!!(T||t==="api");return p||(p=I),I},m={},v=D=>{let T=m[D];return T||(T={colId:D},m[D]=T,T)},C={},w=f("sort",i);w&&i?.sortModel.forEach(({colId:D,sort:T,type:I},H)=>{const A=v(D);A.sort=T,A.sortIndex=H,A.sortType=I}),(w||!s)&&(C.sort=null,C.sortIndex=null);const b=f("rowGroup",o);b&&o?.groupColIds.forEach((D,T)=>{const I=v(D);I.rowGroup=!0,I.rowGroupIndex=T}),(b||!s)&&(C.rowGroup=null,C.rowGroupIndex=null);const x=f("aggregation",r);x&&r?.aggregationModel.forEach(({colId:D,aggFunc:T})=>{v(D).aggFunc=T}),(x||!s)&&(C.aggFunc=null);const S=f("pivot",a);S&&(a?.pivotColIds.forEach((D,T)=>{const I=v(D);I.pivot=!0,I.pivotIndex=T}),this.gos.updateGridOptions({options:{pivotMode:!!a?.pivotMode},source:t})),(S||!s)&&(C.pivot=null,C.pivotIndex=null);const y=f("columnPinning",l);if(y){for(const D of l?.leftColIds??[])v(D).pinned="left";for(const D of l?.rightColIds??[])v(D).pinned="right"}(y||!s)&&(C.pinned=null);const R=f("columnVisibility",c);if(R)for(const D of c?.hiddenColIds??[])v(D).hide=!0;(R||!s)&&(C.hide=null);const E=f("columnSizing",d);if(E)for(const{colId:D,flex:T,width:I}of d?.columnSizingModel??[]){const H=v(D);H.flex=T??null,H.width=I}(E||!s)&&(C.flex=null);const F=u?.orderedColIds,P=!!F?.length&&!n?.has("columnOrder"),k=P?F.map(D=>v(D)):Object.values(m);(k.length||p)&&(this.columnStates=k,Ps(this.beans,{state:k,applyOrder:P,defaultState:C},t))}setColumnPivotState(e,t){const s=this.columnStates;this.columnStates=void 0;const n=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:o,colGroupSvc:r}=i;if(o?.isPivotResultColsPresent()){if(s){const a=[];for(const l of s)o.getPivotResultCol(l.colId)&&a.push(l);Ps(i,{state:a,applyOrder:e},t)}n&&r?.setColumnGroupState(n,t)}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState();return vM(t)}setColumnGroupState(e,t,s){const n=this.beans.colGroupSvc;if(!n||s?.has("columnGroup")||t!=="api"&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;const i=new Set(e.columnGroup?.openColumnGroupIds),r=n.getColumnGroupState().map(({groupId:a})=>{const l=i.has(a);return l&&i.delete(a),{groupId:a,open:l}});for(const a of i)r.push({groupId:a,open:!0});r.length&&(this.columnGroupStates=r),n.setColumnGroupState(r,t)}getFilterState(){const{filterManager:e,selectableFilter:t}=this.beans;let s=e?.getFilterModel();s&&Object.keys(s).length===0&&(s=void 0);const n=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0,o=t?.getState();return s||i||n||o?{filterModel:s,columnFilterState:n,advancedFilterModel:i,selectableFilters:o}:void 0}setFilterState(e){const{filterManager:t,selectableFilter:s}=this.beans,{filterModel:n,columnFilterState:i,advancedFilterModel:o,selectableFilters:r}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};r!==void 0&&s?.setState(r??{}),(n!==void 0||i!==void 0)&&t?.setFilterState(n??null,i??null,"columnFilter"),o!==void 0&&t?.setAdvFilterModel(o??null,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:s,type:n,startRow:i,endRow:o,columns:r,startColumn:a}=t;return{id:s,type:n,startRow:i,endRow:o,colIds:r.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:s,colModel:n,visibleCols:i}=this.beans;if(!Yn(t)||!s)return;const o=[];for(const r of e?.cellRanges??[]){const a=[];for(const c of r.colIds){const d=n.getCol(c);d&&a.push(d)}if(!a.length)continue;let l=n.getCol(r.startColId);if(!l){const c=i.allCols,d=new Set(a);l=c.find(u=>d.has(u))}o.push({...r,columns:a,startColumn:l})}s.setCellRanges(o)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:s}=e?.getVScrollPosition()??{top:0};return s||t?{top:s,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:s}=e??{top:0,left:0},{frameworkOverrides:n,rowRenderer:i,animationFrameSvc:o,ctrlsSvc:r}=this.beans;n.wrapIncoming(()=>{r.get("center").setCenterViewportScrollLeft(s),r.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),o?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:s,rowPinned:n}=e;return{colId:t.getColId(),rowIndex:s,rowPinned:n}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{focusSvc:t,colModel:s}=this.beans;if(!e){t.clearFocusedCell();return}const{colId:n,rowIndex:i,rowPinned:o}=e;t.setFocusedCell({column:s.getCol(n),rowIndex:i,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const s=e.getCurrentPage(),n=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!s&&!n))return{page:s,pageSize:n}}setPaginationState(e,t){const{pagination:s,gos:n}=this.beans;if(!s)return;const{pageSize:i,page:o}=e??{page:0,pageSize:n.get("paginationPageSize")},r=t==="gridInitializing";i&&!n.get("paginationAutoPageSize")&&s.setPageSize(i,r?"initialState":"pageSizeSelector"),typeof o=="number"&&(r?s.setPage(o):s.goToPage(o))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t==="api")}updateGroupExpansionState(){const{expansionSvc:e,gos:t}=this.beans,s=e?.getExpansionState(),n=t.get("ssrmExpandAllAffectsAllRows");this.updateCachedState("ssrmRowGroupExpansion",n?s:void 0),this.updateCachedState("rowGroupExpansion",n?void 0:s)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){const t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,s){const n=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(n,s)}updateColumnState(e){const t=this.getColumnState();let s=!1;const n=this.cachedState;for(const i of Object.keys(t)){const o=t[i];la(o,n[i])||(s=!0)}this.cachedState={...n,...t},s&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const s=this.cachedState[e];this.setCachedStateValue(e,t),la(t,s)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;for(const t of e)t==="rowSelection"&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(const t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},LL={moduleName:"GridState",version:ie,beans:[AL],apiFunctions:{getState:TL,setState:kL}};function NL(e){return e.rowModel.isLastRowIndexKnown()}function OL(e){return e.pagination?.getPageSize()??100}function HL(e){return e.pagination?.getCurrentPage()??0}function BL(e){return e.pagination?.getTotalPages()??1}function GL(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function VL(e){e.pagination?.goToNextPage()}function jL(e){e.pagination?.goToPreviousPage()}function zL(e){e.pagination?.goToFirstPage()}function WL(e){e.pagination?.goToLastPage()}function _L(e,t){e.pagination?.goToPage(t)}var UL=class extends _{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,s=()=>{const n=Math.max(ki(t),1),i=Math.floor(e/n);t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?xt(this,s,50)():(s(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function $L(e,t){if(typeof e!="number")return"";const s=t(),n=s("thousandSeparator",","),i=s("decimalSeparator",".");return e.toString().replace(".",i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${n}`)}var Mr="paginationPageSizeSelector",qL={tag:"span",cls:"ag-paging-page-size"},KL=class extends ft{constructor(){super(qL),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(Mr,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){Jt(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(Mr)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),s=!t||!e.includes(t);if(s){const i=this.gos.exists("paginationPageSize"),o=this.gos.get(Mr)!==!0;X(94,{pageSizeSet:i,pageSizesSet:o,pageSizeOptions:e,paginationPageSizeOption:t}),o||X(95,{paginationPageSizeOption:t,paginationPageSizeSelector:Mr}),e.unshift("")}const n=String(s?"":t);this.selectPageSizeComp?(ii(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(n,!0)):this.createPageSizeSelectorComp(e,n),this.hasEmptyOption=s}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const s=this.getLocaleTextFunc(),n=s("pageSizeSelectorLabel","Page Size:"),i=s("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new ug).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(n).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(Mr);return!Array.isArray(t)||!t?.length?e:[...t].sort((s,n)=>s-n)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},YL={selector:"AG-PAGE-SIZE-SELECTOR",component:KL},ZL=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}",XL=class extends v5{constructor(){super(),this.btFirst=xe,this.btPrevious=xe,this.btNext=xe,this.btLast=xe,this.lbRecordCount=xe,this.lbFirstRowOnPage=xe,this.lbLastRowOnPage=xe,this.lbCurrent=xe,this.lbTotal=xe,this.pageSizeComp=xe,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(ZL)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[YL]);const{btFirst:t,btPrevious:s,btNext:n,btLast:i}=this;this.activateTabIndex([t,s,n,i]),t.insertAdjacentElement("afterbegin",Qt(e?"last":"first",this.beans)),s.insertAdjacentElement("afterbegin",Qt(e?"next":"previous",this.beans)),n.insertAdjacentElement("afterbegin",Qt(e?"previous":"next",this.beans)),i.insertAdjacentElement("afterbegin",Qt(e?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:o=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(o):xD(this.beans,o),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return"pagination"}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:t,fn:s}=e;this.addManagedListeners(t,{click:s,keydown:n=>{(n.key===j.ENTER||n.key===j.SPACE)&&(n.preventDefault(),s())}})}bD(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):$L(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),s=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const n=this.isZeroPagesToDisplay(),i=e===s-1;this.nextButtonDisabled=i||n,this.lastButtonDisabled=!t||n||e===s-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){C3(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),s=this.pagination.getMasterRowCount(),n=e?s:null,i=this.pagination.getCurrentPage(),o=this.pagination.getPageSize();let r,a;this.isZeroPagesToDisplay()?r=a=0:(r=o*i+1,a=r+o-1,e&&a>n&&(a=n));const l=r+o-1,c=!e&&s<l,d=this.formatNumber(r);this.lbFirstRowOnPage.textContent=d;let u;const p=this.getLocaleTextFunc();c?u=p("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const m=t>0?i+1:0,v=this.formatNumber(m);this.lbCurrent.textContent=v;let C,w;if(e)C=this.formatNumber(t),w=this.formatNumber(n);else{const b=p("more","more");C=b,w=b}this.lbTotal.textContent=C,this.lbRecordCount.textContent=w,this.announceAriaStatus(d,u,w,v,C)}announceAriaStatus(e,t,s,n,i){const o=this.getLocaleTextFunc(),r=o("page","Page"),a=o("to","to"),l=o("of","of"),c=`${e} ${a} ${t} ${l} ${s}`,d=`${r} ${n} ${l} ${i}`;c!==this.ariaRowStatus&&(this.ariaRowStatus=c,this.ariaAnnounce?.announceValue(c,"paginationRow")),d!==this.ariaPageStatus&&(this.ariaPageStatus=d,this.ariaAnnounce?.announceValue(d,"paginationPage"))}},QL={selector:"AG-PAGINATION",component:XL},JL=100,eN=class extends _{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return QL}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;if(!this.active||t===e||typeof t!="number")return;const{editSvc:s}=this.beans;s?.isEditing()&&(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return le(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:le(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:le(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:le(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:JL}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const s=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}s!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const s=this.pageSize,n=t-1;this.totalPages=Math.floor(n/s)+1,this.adjustCurrentPageIfInvalid();const i=this.currentPage,o=s*i;let r=s*(i+1)-1;if(r>n&&(r=n),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(o),r===n)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(r+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:s}=this,n=e-1;this.totalPages=Math.floor(n/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*s,this.bottomDisplayedRowIndex=t*(s+1)-1,this.bottomDisplayedRowIndex>n&&(this.bottomDisplayedRowIndex=n)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:s=!1,newPageSize:n=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:s,newPageSize:n,keepRenderedRows:t})}},tN={moduleName:"Pagination",version:ie,beans:[eN,UL],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:NL,paginationGetPageSize:OL,paginationGetCurrentPage:HL,paginationGetTotalPages:BL,paginationGetRowCount:GL,paginationGoToNextPage:VL,paginationGoToPreviousPage:jL,paginationGoToFirstPage:zL,paginationGoToLastPage:WL,paginationGoToPage:_L},dependsOn:[rd]},sN=".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}";function nN(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function iN(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function oN(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function rN(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function aN(e,t,s){return e.pinnedRowModel?.forEachPinnedRow(t,s)}var lN={moduleName:"PinnedRow",version:ie,beans:[oD],css:[sN],apiFunctions:{getPinnedTopRowCount:nN,getPinnedBottomRowCount:iN,getPinnedTopRow:oN,getPinnedBottomRow:rN,forEachPinnedRow:aN},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},cN="↑",dN="↓",uN={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},hN=class extends ft{constructor(){super(uN),this.eValue=xe,this.eDelta=xe,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){const s=Math.abs(t),n=e.formatValue(s),i=le(n)?n:s,o=t>=0,r=this.eDelta;o?r.textContent=cN+i:r.textContent=dN+i,r.classList.toggle("ag-value-change-delta-up",o),r.classList.toggle("ag-value-change-delta-down",!o)}setTimerToRemoveDelta(){this.refreshCount++;const e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),Jt(this.eDelta)}refresh(e,t=!1){const{value:s,valueFormatted:n}=e,{eValue:i,lastValue:o,beans:r}=this;if(s===o||(le(n)?i.textContent=n:le(s)?i.textContent=s:Jt(i),r.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;const a=s&&typeof s=="object"&&"toNumber"in s?s.toNumber():s,l=o&&typeof o=="object"&&"toNumber"in o?o.toNumber():o;if(a===l)return!1;if(typeof a=="number"&&typeof l=="number"){const c=a-l;this.showDelta(e,c)}return o&&i.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=s,!0}},pN=".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}",gN={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},fN=class extends ft{constructor(){super(gN),this.eCurrent=xe,this.refreshCount=0,this.registerCSS(pN)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;const e=this.refreshCount;this.ePrevious?.remove();const{beans:t,eCurrent:s}=this,n=cs({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=n,n.textContent=s.textContent,this.getGui().insertBefore(n,s),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let s=e.value;if(ht(s)&&(s=""),s===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=s;const n=this.eCurrent;return le(e.valueFormatted)?n.textContent=e.valueFormatted:le(e.value)?n.textContent=s:Jt(n),!0}},mN=class extends _{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,s=this.beans.gos.get("cellFlashDuration"),n=this.beans.gos.get("cellFadeDuration")){const i=this.animations[t];i.delete(e);const o=Date.now(),r=o+s,a=o+s+n,l={phase:"flash",flashEndTime:r,fadeEndTime:a};i.set(e,l);const c=`ag-cell-${t}`,d=`${c}-animation`,{comp:u,eGui:{style:p}}=e;u.toggleCss(c,!0),u.toggleCss(d,!1),p.removeProperty("transition"),p.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),s)}),this.nextAnimationTime=r)}advanceAnimations(){const e=Date.now();let t=null;for(const s of Object.keys(this.animations)){const n=this.animations[s],i=`ag-cell-${s}`,o=`${i}-animation`;for(const[r,a]of n){if(!r.isAlive()||!r.comp){n.delete(r);continue}const{phase:l,flashEndTime:c,fadeEndTime:d}=a,u=l==="flash"?c:d;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}const{comp:f,eGui:{style:m}}=r;switch(l){case"flash":f.toggleCss(i,!1),f.toggleCss(o,!0),m.transition=`background-color ${d-c}ms`,m.transitionDelay=`${c-e}ms`,t=Math.min(d,t??1/0),a.phase="fade";break;case"fade":f.toggleCss(i,!1),f.toggleCss(o,!1),m.removeProperty("transition"),m.removeProperty("transition-delay"),n.delete(r);break}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;const s=fD(e.cellPosition);t.cells[s]&&this.animateCell(e,"highlight")}flashCell(e,t){this.animateCell(e,"data-changed",t?.flashDuration,t?.fadeDuration)}destroy(){for(const e of Object.keys(this.animations))this.animations[e].clear()}};function vN(e,t={}){const{cellFlashSvc:s}=e;s&&e.frameworkOverrides.wrapIncoming(()=>{for(const n of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))s.flashCell(n,t)})}var CN={moduleName:"HighlightChanges",version:ie,beans:[mN],userComponents:{agAnimateShowChangeCellRenderer:hN,agAnimateSlideCellRenderer:fN},apiFunctions:{flashCells:vN}};function wN(e,t,s){if(!t)return;const n=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;s===null?n.removeAttribute(i):n.setAttribute(i,s)}function bN(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function xN(e){e.frameworkOverrides.wrapIncoming(()=>{for(const t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function yN(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function SN(e){e.animationFrameSvc?.flushAllFrames()}function RN(e){return{rowHeight:ki(e),headerHeight:ka(e)}}function FN(e,t={}){const s=[];for(const o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){const r=o.getCellRenderer();r!=null&&s.push($i(r))}if(t.columns?.length)return s;const n=[],i=Oh(t.rowNodes);for(const o of e.rowRenderer.getAllRowCtrls()){if(i&&!Hh(o.rowNode,i)||!o.isFullWidth())continue;const r=o.getFullWidthCellRenderers();for(let a=0;a<r.length;a++){const l=r[a];l!=null&&n.push($i(l))}}return[...n,...s]}var EN={moduleName:"RenderApi",version:ie,apiFunctions:{setGridAriaProperty:wN,refreshCells:bN,refreshHeader:xN,isAnimationFrameQueueEmpty:yN,flushAllAnimationFrames:SN,getSizesForCurrentTheme:RN,getCellRendererInstances:FN}},DN=class extends _{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=xt(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:e,rowModel:t,rowSpanSvc:s,pinnedRowModel:n}=this.beans,i=e.autoHeightCols;let o=!1;const r=a=>{const l=a.__autoHeights;let c=Kn(this.beans,a).height;for(const d of i){let u=l?.[d.getColId()];const p=s?.getCellSpan(d,a);if(p){if(p.getLastNode()!==a)continue;if(u=s?.getCellSpan(d,a)?.getLastNodeAutoHeight(),!u)return}if(u==null){if(this.colSpanSkipCell(d,a))continue;return}c=Math.max(u,c)}c!==a.rowHeight&&(a.setRowHeight(c),o=!0)};n?.forEachPinnedRow?.("top",r),n?.forEachPinnedRow?.("bottom",r),t.forEachDisplayedNode?.(r),o&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,s){if(e.__autoHeights??(e.__autoHeights={}),t==null){delete e.__autoHeights[s.getId()];return}const n=e.__autoHeights[s.getId()];e.__autoHeights[s.getId()]=t,n!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){const{colModel:s,colViewport:n,visibleCols:i}=this.beans;if(!s.colSpanActive)return!1;let o=[];switch(e.getPinned()){case"left":o=i.getLeftColsForRow(t);break;case"right":o=i.getRightColsForRow(t);break;case null:o=n.getColsWithinViewport(t);break}return!o.includes(e)}setupCellAutoHeight(e,t,s){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;const n=t.parentElement,{rowNode:i,column:o}=e,r=this.beans,a=d=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!s.isAlive())return;const{paddingTop:u,paddingBottom:p,borderBottomWidth:f,borderTopWidth:m}=Xi(n),v=u+p+f+m,w=t.offsetHeight+v;if(d<5){const x=!Et(r)?.contains(t),S=w==0;if(x||S){window.setTimeout(()=>a(d+1),0);return}}this.setRowAutoHeight(i,w,o)},l=()=>a(0);l();const c=xn(r,t,l);return s.addDestroyFunc(()=>{c(),this.setRowAutoHeight(i,void 0,o)}),!0}setAutoHeightActive(e){this.active=e.list.some(t=>t.isVisible()&&t.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;const e=this.beans.rowRenderer.getAllRowCtrls();let t=null;for(const{rowNode:s}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(s).filter(i=>i.isAutoHeight())),t.length!==0){if(!s.__autoHeights)return!1;for(const n of t){const i=s.__autoHeights[n.getColId()];if(!i||s.rowHeight<i)return!1}}return!0}},PN={moduleName:"RowAutoHeight",version:ie,beans:[DN]},TN=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(const s of this.spannedNodes)s!==this.lastNode&&(t+=s.rowHeight);return e-t}},kN=class extends _{constructor(e){super(),this.column=e}buildCache(e){const{column:t,beans:{gos:s,pinnedRowModel:n,rowModel:i,valueSvc:o,pagination:r}}=this,{colDef:a}=t,l=this.getNodeMap(e),c=new Map,d=s.getCallback("isFullWidthRow"),u=a.equals,p=a.spanRows,f=typeof p=="function";let m=null,v=null,C;const w=(x,S)=>{m=x,v=null,C=S},b=x=>{const S=!x.isExpandable()&&!x.group&&!x.detail&&(d?!d({rowNode:x}):!0);if(x.rowIndex==null||!S){w(null,null);return}if(m==null||x.level!==m.level||x.footer||v&&x.rowIndex-1!==v?.getLastNode().rowIndex){w(x,o.getValue(t,x,"data"));return}const y=o.getValue(t,x,"data");if(f){const R=Te(s,{valueA:C,nodeA:m,valueB:y,nodeB:x,column:t,colDef:a});if(!p(R)){w(x,y);return}}else if(u?!u(C,y):C!==y){w(x,y);return}if(!v){const R=l?.get(m);R?.firstNode===m?(R.reset(),v=R):v=new TN(t,m),c.set(m,v)}v.addSpannedNode(x),c.set(x,v)};switch(e){case"center":i.forEachDisplayedNode?.(x=>{(!r||r.isRowInPage(x.rowIndex))&&b(x)}),this.centerValueNodeMap=c;break;case"top":n?.forEachPinnedRow("top",b),this.topValueNodeMap=c;break;case"bottom":n?.forEachPinnedRow("bottom",b),this.bottomValueNodeMap=c;break}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},IN=class extends _{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=xt(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=xt(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){const{gos:t}=this.beans;if(!t.get("enableCellSpan")||this.spanningColumns.has(e))return;const s=this.createManagedBean(new kN(e));this.spanningColumns.set(e,s),s.buildCache("top"),s.buildCache("bottom"),s.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){const{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}this.modelTimeout==null&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache("top"),e.buildCache("bottom")}),this.debouncePinnedEvent()}isCellSpanning(e,t){const s=this.spanningColumns.get(e);return s?s.isCellSpanning(t):!1}getCellSpanByPosition(e){const{pinnedRowModel:t,rowModel:s}=this.beans,n=e.column,i=e.rowIndex,o=this.spanningColumns.get(n);if(!o)return;let r;switch(e.rowPinned){case"top":r=t?.getPinnedTopRow(i);break;case"bottom":r=t?.getPinnedBottomRow(i);break;default:r=s.getRow(i)}if(r)return o.getCellSpan(r)}getCellStart(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){const t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){const s=this.spanningColumns.get(e);if(s)return s.getCellSpan(t)}forEachSpannedColumn(e,t){for(const[s,n]of this.spanningColumns)if(n.isCellSpanning(e)){const i=n.getCellSpan(e);t(s,i)}}destroy(){super.destroy(),this.spanningColumns.clear()}},MN=class extends zo{constructor(e,t,s){super(e.col,e.firstNode,s,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(e,t,s,n,i,o,r){this.eWrapper=s,super.setComp(e,t,s,n,i,o,r),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:e,rowNode:t}=this;!e||t.rowIndex==null||Rp(e,t.rowIndex)}setAriaRowSpan(){y3(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){const{beans:t}=this;if(va(t)){this.focusedCellPosition=void 0;return}const s=this.isCellFocused();s||(this.focusedCellPosition=void 0),e&&s&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},AN=class extends Fc{getInitialRowClasses(e){return["ag-spanned-row"]}getNewCellCtrl(e){const t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(!(!t||t.firstNode!==this.rowNode))return new MN(t,this,this.beans)}isCorrectCtrlForSpan(e){const t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},LN=class extends _{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(e){const{rowSpanSvc:t}=this.beans,s=this.getCtrlsMap(e),n=s.size,i=this.getAllRelevantRowControls(e),o=new Map;let r=!1;for(const l of i)l.isAlive()&&t?.forEachSpannedColumn(l.rowNode,(c,d)=>{if(o.has(d.firstNode))return;const u=s.get(d.firstNode);if(u){o.set(d.firstNode,u),s.delete(d.firstNode);return}r=!0;const p=new AN(d.firstNode,this.beans,!1,!1,!1);o.set(d.firstNode,p)});this.setCtrlsMap(e,o);const a=o.size===n;if(!(!r&&a)){for(const l of s.values())l.destroyFirstPass(!0),l.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:e})}}getAllRelevantRowControls(e){const{rowRenderer:t}=this.beans;switch(e){case"top":return t.topRowCtrls;case"bottom":return t.bottomRowCtrls;case"center":return t.allRowCtrls}}getCellByPosition(e){const{rowSpanSvc:t}=this.beans,s=t?.getCellSpanByPosition(e);if(!s)return;const n=this.getCtrlsMap(e.rowPinned).get(s.firstNode);if(n)return n.getAllCellCtrls().find(i=>i.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(const t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t;break}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},NN={moduleName:"CellSpan",version:ie,beans:[IN,LN]},ON=class extends _{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Go(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),YF(e))}createColumns(e,t){const s=()=>{fc(this.beans,this.columns?.tree),this.columns=null},n=e.treeDepth,o=(this.columns?.treeDepth??-1)==n,r=this.generateSelectionCols();if(KF(r,this.columns?.list??[])&&o)return;s();const{colGroupSvc:l}=this.beans,c=l?.findDepth(e.tree)??0,d=l?.balanceTreeForAutoCols(r,c)??[];this.columns={list:r,tree:d,treeDepth:c,map:{}},t(p=>{if(!p)return null;const f=p.filter(m=>!oi(m));return[...r,...f]})}updateColumns(e){const t=Go(e.source),{beans:s}=this;for(const n of this.columns?.list??[]){const i=this.createSelectionColDef(e.currentValue);n.setColDef(i,null,t),Ps(s,{state:[XF(i,n.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Yr(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,s=e.get("rowSelection");if(typeof s!="object"||!Ti(e))return!1;const n=(t.autoColSvc?.getColumns()?.length??0)>0;if(s.checkboxLocation==="autoGroupColumn"&&n)return!1;const i=!!Oo(s),o=Wl(s);return i||o}createSelectionColDef(e){const{gos:t}=this,s=e??t.get("selectionColumnDef"),n=t.get("enableRtl"),{rowSpan:i,spanRows:o,...r}=s??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:n?"right":"left",comparator(a,l,c,d){const u=c.isSelected(),p=d.isSelected();return u===p?0:u?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...r,colId:Np,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);const s=new Qi(e,null,t,!1);return this.createBean(s),[s]}onSelectionOptionsChanged(e,t,s){const n=t&&typeof t!="string"?Oo(t):void 0,i=e&&typeof e!="string"?Oo(e):void 0,o=n!==i,r=t&&typeof t!="string"?Wl(t):void 0,a=e&&typeof e!="string"?Wl(e):void 0,l=r!==a,c=uc(e),d=uc(t);(o||l||c!==d)&&this.beans.colModel.refreshAll(s)}destroy(){fc(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,s){if(!this.columns?.list.length)return;const n=e.length+t.length+s.length;if(n===0)return;const i=this.columns.list[0];if(!i.isVisible())return;const o=()=>{let l;switch(i.pinned){case"left":case!0:l=e;break;case"right":l=s;break;default:l=t}l&&_s(l,i)};(this.beans.rowNumbersSvc?.getColumn(Op)?2:1)===n&&o()}},HN=':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}';function BN(e,t){if(!t.nodes.every(r=>r.rowPinned&&!id(r)?(X(59),!1):r.id===void 0?(X(60),!1):!0))return;const{nodes:n,source:i,newValue:o}=t;e.selectionSvc?.setNodesSelected({nodes:n,source:i??"api",newValue:o})}function GN(e,t,s="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:s,selectAll:t})}function VN(e,t,s="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:s,selectAll:t})}function jN(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function zN(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function WN(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function _N(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function UN(e){return e.selectionSvc?.getSelectedNodes()??[]}function $N(e){return e.selectionSvc?.getSelectedRows()??[]}var qN={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},KN=class extends ft{constructor(){super(qN,[eg]),this.eCheckbox=xe}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:s}=this,n=t.isSelected(),i=Xc(e,n),[o,r]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(o,r);s.setValue(n,!0),s.setInputAriaLabel(`${a} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:_i,click:n=>{_i(n),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(n,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:i})=>{const o=typeof n=="object"?hu(n):void 0,r=typeof i=="object"?hu(i):void 0;o!==r&&this.onSelectableChanged()}),wh(this.gos)||typeof this.getIsVisible()=="function"){const n=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:n}),this.addManagedListeners(this.rowNode,{dataChanged:n,cellChanged:n}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:s,gos:n}=this,i=t.selectable,o=this.getIsVisible();let r;if(typeof o=="function"){const u=s?.callbackParams;if(!e)r=o({...u,node:t,data:t.data});else{const p=e.createColumnFunctionCallbackParams(t);r=o({...u,...p})}}else r=o??!1;const a=i&&!r||!i&&r,l=i||r,c=n.get("rowSelection"),d=c&&typeof c!="string"?!hu(c):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(l&&(a?d:!0)),this.setDisplayed(l&&(a?d:!0)),l&&this.eCheckbox.setDisabled(a),s?.removeHidden&&this.setDisplayed(l)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?Oo(t):this.column?.getColDef()?.checkboxSelection}},YN=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t;const{rowModel:s,pinnedRowModel:n}=this;return t??(t=s.getRowNode(e)),n?.isManual()&&(t??(t=n.getPinnedRowById(e,"top")),t??(t=n.getPinnedRowById(e,"bottom"))),t}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const s=t[0].id===this.rootId,n=t.findIndex(i=>i.id===e.id);if(n>-1){const i=t.slice(0,n),o=t.slice(n+1);return this.setEndRange(e),s?{keep:i,discard:o}:{keep:o,discard:i}}else return{keep:t,discard:[]}}extend(e,t=!1){const s=this.getRoot();if(s==null){const i=this.getRange().slice();return t&&e.depthFirstSearch(o=>!o.group&&i.push(o)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}const n=this.getNodesInRange(s,e);if(!n)return this.setRoot(e),{keep:[e],discard:[]};if(n.find(i=>i.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const i=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:i}}}getNodesInRange(e,t){const{pinnedRowModel:s,rowModel:n}=this;if(!s?.isManual())return n.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&!t.rowPinned)return gs(s,"top",e,void 0).concat(n.getNodesInRangeForSelection(n.getRow(0),t)??[]);if(e.rowPinned==="bottom"&&!t.rowPinned){const i=gs(s,"bottom",void 0,e),o=n.getRowCount(),r=n.getRow(o-1);return(n.getNodesInRangeForSelection(t,r)??[]).concat(i)}if(!e.rowPinned&&!t.rowPinned)return n.getNodesInRangeForSelection(e,t);if(e.rowPinned==="top"&&t.rowPinned==="top")return gs(s,"top",e,t);if(e.rowPinned==="bottom"&&t.rowPinned==="top"){const i=gs(s,"top",t,void 0),o=gs(s,"bottom",void 0,e),r=n.getRow(0),a=n.getRow(n.getRowCount()-1);return i.concat(n.getNodesInRangeForSelection(r,a)??[]).concat(o)}if(!e.rowPinned&&t.rowPinned==="top")return gs(s,"top",t,void 0).concat(n.getNodesInRangeForSelection(n.getRow(0),e)??[]);if(e.rowPinned==="top"&&t.rowPinned==="bottom"){const i=gs(s,"top",e,void 0),o=gs(s,"bottom",void 0,t),r=n.getRow(0),a=n.getRow(n.getRowCount()-1);return i.concat(n.getNodesInRangeForSelection(r,a)??[]).concat(o)}if(e.rowPinned==="bottom"&&t.rowPinned==="bottom")return gs(s,"bottom",e,t);if(!e.rowPinned&&t.rowPinned==="bottom"){const i=gs(s,"bottom",void 0,t),o=n.getRow(n.getRowCount());return(n.getNodesInRangeForSelection(e,o)??[]).concat(i)}return null}},ZN=class extends _{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(dt(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Jp);this.cbSelectAll=t,t.addCss("ag-header-select-all"),Gi(t.getGui(),"presentation"),this.showOrHideSelectAll();const s=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:s,paginationChanged:s,modelUpdated:s}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:i})=>{const o=r=>typeof r=="string"||!r||r.mode==="singleRow"?void 0:r.selectAll;o(n)!==o(i)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,s=this.cbSelectAll,n=t.getSelectAllState(e);s.setValue(n);const i=t.hasNodesToSelect(e);s.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:s,cbSelectAll:n,cbSelectAllVisible:i}=this,o=n.getValue(),r=Xc(t,o),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");s.setAriaDescriptionProperty("selectAll",i?`${a} (${r})`:null),n.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||s.announceAriaDescription()}checkSelectionType(e){return pc(this.gos)?!0:(X(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:s}=this.beans;return gt(t)||ir(t)?!0:(X(129,{feature:e,rowModel:s.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let s="uiSelectAll";t==="currentPage"?s="uiSelectAllCurrentPage":t==="filtered"&&(s="uiSelectAllFiltered");const n={source:s,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(n):i.deselectAllRowNodes(n)}isCheckboxSelection(){const{column:e,gos:t,beans:s}=this,o=typeof t.get("rowSelection")=="object"?"headerCheckbox":"headerCheckboxSelection";return Q1(s,e)&&this.checkRightRowModelType(o)&&this.checkSelectionType(o)}getSelectAllMode(){const e=Pw(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:s}=this.column.getColDef();return t?"currentPage":s?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function Q1({gos:e,selectionColSvc:t},s){const n=e.get("rowSelection"),i=s.getColDef(),{headerCheckboxSelection:o}=i;let r=!1;if(typeof n=="object"){const l=oi(s),c=Hp(s);(uc(n)==="autoGroupColumn"&&c||l&&t?.isSelectionColumnEnabled())&&(r=Wl(n))}else typeof o=="function"?r=o(Te(e,{column:s,colDef:i})):r=!!o;return r}var XN=class extends _{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new YN(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const s=wh(e);s!==this.isRowSelectable&&(this.isRowSelectable=s,this.updateSelectable())}),this.isRowSelectable=wh(e),this.addManagedEventListeners({cellValueChanged:s=>this.updateRowSelectable(s.node),rowNodeDataChanged:s=>this.updateRowSelectable(s.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new KN}createSelectAllFeature(e){if(Q1(this.beans,e))return new ZN(e)}isMultiSelect(){return pc(this.gos)}onRowCtrlSelected(e,t,s){const n=!!e.rowNode.isSelected();e.forEachGui(s,i=>{i.rowComp.toggleCss("ag-row-selected",n);const o=i.element;ZC(o,n),o.contains(dt(this.beans))&&t(i)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected(),s=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||s)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!id(e)||!Ti(this.gos)}updateRowSelectable(e,t){const s=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,s,t),s}setRowSelectable(e,t,s){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),s)return;if(fa(this.gos)){const i=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:i??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,s=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let n=0;n<e.childrenAfterGroup.length;n++){const i=e.childrenAfterGroup[n];let o=i.isSelected();if(!i.selectable){const r=this.calculateSelectedFromChildren(i);if(r===null)continue;o=r}switch(o){case!0:t=!0;break;case!1:s=!0;break;default:return}}if(!(t&&s))return t?!0:s?!1:e.selectable?e.__selected:null}selectRowNode(e,t,s,n="api"){if(t&&e.destroyed)return!1;const i=!e.selectable&&t,o=e.__selected===t;if(i||o)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const r=e.sibling;r&&r.footer&&r.__localEventService&&r.dispatchRowEvent("rowSelected");const a=e.pinnedSibling;return a?.rowPinned&&a.__localEventService&&a.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...ZE(e,this.gos,"rowSelected"),event:s||null,source:n}),!0}isCellCheckboxSelection(e,t){const s=this.gos.get("rowSelection");if(s&&typeof s!="string"){const n=oi(e)&&Oo(s);return e.isColumnFunc(t,n)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,s,n){const{gos:i,selectionCtx:o}=this,r=e.isSelected(),a=fa(i),l=xF(i),c=yF(i),d=this.isMultiSelect(),u=n==="rowClicked";if(u&&!(l||c))return null;if(t&&s&&d){const p=o.getRoot();if(p)if(p.isSelected()){const f=o.isInRange(e)?o.truncate(e):o.extend(e,a);return{deselect:f.discard,select:f.keep,reset:!1}}else{const f=o.extend(e,a);return{select:[],deselect:f.keep,reset:!1}}else return null}else if(t&&d){const p=o.selectAll?this.beans.rowModel.getRow(0):void 0,f=o.getRoot(p),m=o.isInRange(e)?o.truncate(e):o.extend(e,a);return{select:m.keep,deselect:m.discard,reset:o.selectAll||!!(f&&!f.isSelected())}}else if(s){if(u){const p=!r;return p&&!l||!p&&!c?null:(o.setRoot(e),{node:e,newValue:p,clearSelection:!1})}return o.setRoot(e),{node:e,newValue:!r,clearSelection:!d}}else{o.setRoot(e);const p=SF(i),f=gc(i)==="filteredDescendants",m=u&&(!p||!l);if(f&&r===void 0&>(i))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!d||m};if(u){const v=r?!p:l;return v===r&&!m||v&&!l||!v&&!c?null:{node:e,newValue:v,clearSelection:!d||m,keepDescendants:e.group&&a}}return{node:e,newValue:!r,clearSelection:!d||m}}}},QN=class extends XN{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:e}=this;this.mode=hc(e),this.groupSelectsDescendants=fa(e),this.groupSelectsFiltered=gc(e)==="filteredDescendants",this.masterSelectsDetail=Zf(e)==="detail",this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{const t=fa(e),s=hc(e),n=gc(e)==="filteredDescendants";this.masterSelectsDetail=Zf(e)==="detail",(t!==this.groupSelectsDescendants||n!==this.groupSelectsFiltered||s!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=n,this.mode=s)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,s){if(this.isRowSelectionBlocked(t))return 0;const n=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,s);if(n==null)return 0;if(this.selectionCtx.selectAll=!1,"select"in n)return n.reset?this.resetNodes():this.selectRange(n.deselect,!1,s),this.selectRange(n.select,!0,s);{const i=n.checkFilteredNodes?ex(n.node):n.newValue;return this.setNodesSelected({nodes:[n.node],newValue:i,clearSelection:n.clearSelection,keepDescendants:n.keepDescendants,event:e,source:s})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:s,nodes:n,event:i,source:o,keepDescendants:r=!1}){if(n.length===0)return 0;const{gos:a}=this;if(!Ti(a)&&e)return X(132),0;if(n.length>1&&!this.isMultiSelect())return X(130),0;let l=0;for(let c=0;c<n.length;c++){const d=n[c],u=d.primaryRow;if(u.rowPinned&&!id(u)){X(59);continue}if(u.id===void 0){X(60);continue}if(e&&d.destroyed)continue;this.groupSelectsFiltered&&u.group&&!a.get("treeData")||this.selectRowNode(u,e,i,o)&&(this.detailSelection.delete(u.id),l++),this.groupSelectsDescendants&&u.childrenAfterGroup?.length&&(l+=this.selectChildren(u,e,o))}return s||(n.length===1&&o==="api"&&this.selectionCtx.setRoot(n[0].primaryRow),e&&(t||!this.isMultiSelect())&&(l+=this.clearOtherNodes(n[0].primaryRow,r,o)),l>0&&(this.updateGroupsFromChildrenSelections(o),this.dispatchSelectionChanged(o))),l}selectRange(e,t,s){let n=0;return e.forEach(i=>{const o=i.primaryRow;if(o.group&&this.groupSelectsDescendants)return;this.selectRowNode(o,t,void 0,s)&&n++}),n>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s)),n}selectChildren(e,t,s){const n=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return n?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:s,nodes:n}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){const t=new Map;this.selectedNodes.forEach((s,n)=>{e(s)&&t.set(n,s)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;const{gos:s,rowModel:n}=this.beans;if(!gt(s))return!1;const i=n.rootNode;if(!i)return!1;let o=!1;const r=a=>{if(a!==i){const l=this.calculateSelectedFromChildren(a);o=this.selectRowNode(a,l===null?!1:l,void 0,e)||o}};return Ki(i,this.beans.rowModel.hierarchical,t,r),o}clearOtherNodes(e,t,s){const n=new Map;let i=0;return this.selectedNodes.forEach(o=>{const r=o.id==e.id;if((t?!eO(e,o):!0)&&!r){const l=this.selectedNodes.get(o.id);i+=this.setNodesSelected({nodes:[l],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:s}),this.groupSelectsDescendants&&o.parent&&n.set(o.parent.id,o.parent)}}),n.forEach(o=>{const r=this.calculateSelectedFromChildren(o);this.selectRowNode(o,r===null?!1:r,void 0,s)}),i}onRowSelected(e){const t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;const t=new Xn(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){const t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:e,rowModel:t}=this.beans;if(!gt(e))return;const s=t.getTopLevelNodes();if(s===null)return;const n=[];function i(o){for(let r=0,a=o.length;r<a;r++){const l=o[r];l.isSelected()?n.push(l):l.group&&l.childrenAfterGroup&&i(l.childrenAfterGroup)}}return i(s),n}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){const s=gt(this.gos);let n=!1;const i=o=>{const r=this.selectRowNode(o.primaryRow,!1,void 0,e);n||(n=r)};if(t==="currentPage"||t==="filtered"){if(!s){Je(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,s&&this.groupSelectsDescendants){const o=this.updateGroupsFromChildrenSelections(e);n||(n=o)}n&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,s=0;return this.getNodesToSelect(e).forEach(n=>{this.groupSelectsDescendants&&n.group||(n.isSelected()?t++:n.selectable&&s++)}),{selectedCount:t,notSelectedCount:s}}getSelectAllState(e){const{selectedCount:t,notSelectedCount:s}=this.getSelectedCounts(e);return J1(t,s)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(t=>t.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];const t=[],s=i=>t.push(i);if(e==="currentPage")return this.forEachNodeOnPage(i=>{if(!i.group){s(i);return}if(!i.footer&&!i.expanded){const o=r=>{s(r);const a=r.childrenAfterFilter;if(a)for(let l=0,c=a.length;l<c;++l)o(a[l])};o(i);return}this.groupSelectsDescendants||s(i)}),t;const n=this.beans.rowModel;return e==="filtered"?(n.forEachNodeAfterFilter(s),t):(n.forEachNode(s),t)}forEachNodeOnPage(e){const{pageBounds:t,rowModel:s}=this.beans,n=t.getFirstRow(),i=t.getLastRow();for(let o=n;o<=i;o++){const r=s.getRow(o);r&&e(r)}}selectAllRowNodes(e){const{gos:t,selectionCtx:s}=this;if(!Ti(t)){X(132);return}if(bF(t)&&!pc(t)){X(130);return}if(!this.canSelectAll())return;const{source:n,selectAll:i}=e;let o=!1;if(this.getNodesToSelect(i).forEach(r=>{const a=this.selectRowNode(r.primaryRow,!0,void 0,n);o||(o=a)}),s.selectAll=!0,gt(t)&&this.groupSelectsDescendants){const r=this.updateGroupsFromChildrenSelections(n);o||(o=r)}o&&this.dispatchSelectionChanged(n)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,s){if(e||(e=[]),!Array.isArray(e)){Je(103);return}const n=new Set(e),i=[];this.beans.rowModel.forEachNode(o=>{n.has(o.id)&&i.push(o)}),s&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return gt(this.beans.gos)}updateSelectable(e){const{gos:t,rowModel:s}=this.beans;if(!Ti(t))return;const n="selectableChanged",i=gt(t)&&this.groupSelectsDescendants,o=[];if(i){const r=s.rootNode;r&&Ki(r,s.hierarchical,e,a=>{let l=!1;for(const c of a.childrenAfterGroup)l||(l=c.selectable),!c.group&&!this.updateRowSelectable(c,!0)&&c.isSelected()&&o.push(c);this.setRowSelectable(a,l,!0)})}else s.forEachNode(r=>{!this.updateRowSelectable(r,!0)&&r.isSelected()&&o.push(r)});o.length&&this.setNodesSelected({nodes:o,newValue:!1,source:n}),!e&&i&&this.updateGroupsFromChildrenSelections?.(n)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;const s=e.detailNode?.detailGridInfo?.api;if(!s)return;const n=JN(s);e.isSelected()!==n&&this.selectRowNode(e,n,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),n||this.detailSelection.set(e.id,new Set(s.getSelectedNodes().map(o=>o.id)))}setDetailSelectionState(e,t,s){if(this.masterSelectsDetail){if(!pc(t)){X(269);return}switch(e.isSelected()){case!0:{s.selectAll();break}case!1:{s.deselectAll();break}case void 0:{const n=this.detailSelection.get(e.id);if(n){const i=[];for(const o of n){const r=s.getRowNode(o);r&&i.push(r)}s.setNodesSelected({nodes:i,newValue:!0,source:"masterDetail"})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function JN(e){let t=0,s=0;return e.forEachNode(n=>{n.isSelected()?t++:n.selectable&&s++}),J1(t,s)}function J1(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function eO(e,t){let s=t.parent;for(;s;){if(s===e)return!0;s=s.parent}return!1}function ex(e){const t=e.isSelected()===!1,s=e.childrenAfterFilter?.some(ex)??!1;return t||s}var tO={moduleName:"SharedRowSelection",version:ie,beans:[ON],css:[HN],apiFunctions:{setNodesSelected:BN,selectAll:GN,deselectAll:VN,selectAllFiltered:jN,deselectAllFiltered:zN,selectAllOnCurrentPage:WN,deselectAllOnCurrentPage:_N,getSelectedNodes:UN,getSelectedRows:$N}},sO={moduleName:"RowSelection",version:ie,rowModels:["clientSide","infinite","viewport"],beans:[QN],dependsOn:[tO]},nO=class extends _{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:e,cellComp:t}=this,s=e.colDef,n=s.cellClassRules,i=this.getCellClassParams(e,s);ag(this.beans.expressionSvc,n===this.cellClassRules?void 0:this.cellClassRules,n,i,o=>t.toggleCss(o,!0),o=>t.toggleCss(o,!1)),this.cellClassRules=n}applyUserStyles(){const e=this.column,t=e.colDef,s=t.cellStyle;if(!s)return;let n;if(typeof s=="function"){const i=this.getCellClassParams(e,t);n=s(i)}else n=s;n&&this.cellComp.setUserStyles(n)}applyClassesFromColDef(){const{column:e,cellComp:t}=this,s=e.colDef,n=this.getCellClassParams(e,s);for(const o of this.staticClasses)t.toggleCss(o,!1);const i=this.beans.cellStyles.getStaticCellClasses(s,n);this.staticClasses=i;for(const o of i)t.toggleCss(o,!0)}getCellClassParams(e,t){const{value:s,rowNode:n}=this.cellCtrl;return Te(this.beans.gos,{value:s,data:n.data,node:n,colDef:t,column:e,rowIndex:n.rowIndex})}},iO=class extends _{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,s,n){ag(this.beans.expressionSvc,void 0,e.cellClassRules,t,s,n),this.processStaticCellClasses(e,t,s)}getStaticCellClasses(e,t){const{cellClass:s}=e;if(!s)return[];let n;return typeof s=="function"?n=s(t):n=s,typeof n=="string"&&(n=[n]),n||[]}createCellCustomStyleFeature(e){return new nO(e,this.beans)}processStaticCellClasses(e,t,s){this.getStaticCellClasses(e,t).forEach(i=>{s(i)})}},oO={moduleName:"CellStyle",version:ie,beans:[iO]},rO={moduleName:"RowStyle",version:ie,beans:[eI]},aO={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},Yt="clientSide",Lt="serverSide",bo="infinite",lO={onGroupExpandedOrCollapsed:[Yt],refreshClientSideRowModel:[Yt],isRowDataEmpty:[Yt],forEachLeafNode:[Yt],forEachNodeAfterFilter:[Yt],forEachNodeAfterFilterAndSort:[Yt],resetRowHeights:[Yt,Lt],applyTransaction:[Yt],applyTransactionAsync:[Yt],flushAsyncTransactions:[Yt],getBestCostNodeSelection:[Yt],getServerSideSelectionState:[Lt],setServerSideSelectionState:[Lt],applyServerSideTransaction:[Lt],applyServerSideTransactionAsync:[Lt],applyServerSideRowData:[Lt],retryServerSideLoads:[Lt],flushServerSideAsyncTransactions:[Lt],refreshServerSide:[Lt],getServerSideGroupLevelState:[Lt],refreshInfiniteCache:[bo],purgeInfiniteCache:[bo],getInfiniteRowCount:[bo],isLastRowIndexKnown:[bo,Lt],expandAll:[Yt,Lt],collapseAll:[Yt,Lt],onRowHeightChanged:[Yt,Lt],setRowCount:[bo,Lt],getCacheBlockState:[bo,Lt]},cO={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function dO(e,t,s){const n=cO[e];if(n){const{version:o,new:r,old:a,message:l}=n,c=a??e;return(...d)=>{const u=r?`Please use ${r} instead. `:"";return Kr(`Since ${o} api.${c} is deprecated. ${u}${l??""}`),t.apply(t,d)}}const i=lO[e];return i?(...o)=>{const r=s.rowModel.getType();if(!i.includes(r)){Ao(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(" or ")}`);return}return t.apply(t,o)}:t}var uO={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},hO={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},pO={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",overlayLoading:"Overlay",overlayExporting:"Overlay",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},gO=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),fO=class extends _{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,rF(hM)}warnOnInitialPropertyUpdate(e,t){e==="api"&&aO[t]&&X(22,{key:t})}processGridOptions(e){this.processOptions(e,tk())}validateApiFunction(e,t){return dO(e,t,this.beans)}missingUserComponent(e,t,s,n){const i=jo[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):X(101,{propertyName:e,componentName:t,agGridDefaults:s,jsComps:n})}missingDynamicBean(e){const t=uO[e];return t?js(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){vO.has(e)&&X(10,{eventType:e})}validateIcon(e){if(gO.has(e)&&X(43,{iconName:e}),hO[e])return;const t=pO[e];if(t){Je(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Mp(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}X(134,{iconName:e})}isProvidedUserComp(e){return!!jo[e]}validateColDef(e){this.processOptions(e,_T())}processOptions(e,t){const{validations:s,deprecations:n,allProperties:i,propertyExceptions:o,objectName:r,docsUrl:a}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...o??[],...Object.keys(n)],i,r,a);const l=new Set;if(Object.keys(e).forEach(d=>{const u=n[d];if(u){const{message:b,version:x}=u;l.add(`As of v${x}, ${String(d)} is deprecated. ${b??""}`)}const p=e[d];if(p==null||p===!1)return;const f=s[d];if(!f)return;const{dependencies:m,validate:v,supportedRowModels:C,expectedType:w}=f;if(w){const b=typeof p;if(b!==w){l.add(`${String(d)} should be of type '${w}' but received '${b}' (${p}).`);return}}if(C){const b=this.gridOptions.rowModelType??"clientSide";if(!C.includes(b)){l.add(`${String(d)} is not supported with the '${b}' row model. It is only valid with: ${C.join(", ")}.`);return}}if(m){const b=this.checkForRequiredDependencies(d,m,e);if(b){l.add(b);return}}if(v){const b=v(e,this.gridOptions,this.beans);if(b){l.add(b);return}}}),l.size>0)for(const d of l)Kr(d)}checkForRequiredDependencies(e,t,s){const i=Object.entries(t).filter(([o,r])=>{const a=s[o];return!r.required.includes(a)});return i.length===0?null:i.map(([o,r])=>`'${String(e)}' requires '${o}' to be one of [${r.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${r.reason??""}`).join(`
|
|
67
|
+
`)}checkProperties(e,t,s,n,i){const o=["__ob__","__v_skip","__metadata__"],r=mO(Object.getOwnPropertyNames(e),[...o,...t,...s],s),a=Object.keys(r);for(const l of a){const c=r[l];let d=`invalid ${n} property '${l}' did you mean any of these: ${c.slice(0,8).join(", ")}.`;s.includes("context")&&(d+=`
|
|
68
|
+
If you are trying to annotate ${n} with application data, use the '${n}.context' property instead.`),Kr(d)}if(a.length>0&&i){const l=this.beans.frameworkOverrides.getDocLink(i);Kr(`to see all the valid ${n} properties please check: ${l}`)}}};function mO(e,t,s){const n={},i=e.filter(o=>!t.some(r=>r===o));if(i.length>0)for(const o of i)n[o]=Bh({inputValue:o,allSuggestions:s}).values;return n}var vO=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),CO={moduleName:"Validation",version:ie,beans:[fO]},wO={moduleName:"AllCommunity",version:ie,dependsOn:[p8,N8,bL,CO,l7,c7,d7,u7,h7,p7,g7,a7,iL,oL,rL,aL,nL,cL,dL,LL,wM,tN,Ab,MM,AM,EN,b8,nP,lN,sO,QI,oO,F8,rO,EL,tM,CN,F1,PL,PN,sP,g8,NN]};function be(e,t={}){const s=Object.keys(t).map(n=>{const i=t[n];return i!=null?`${n}=${i}`:null}).filter(Boolean).join(";");return[e,s].filter(n=>n.length>0).join(":")}var fe={grid(e){return be("ag-grid-root",{gridId:e})},headerGroupCell(e){return be("ag-header-group-cell",{colId:e})},headerCell(e){return be("ag-header-cell",{colId:e})},headerCheckbox(e){return be("ag-header-selection-checkbox",{colId:e})},headerFilterButton(e){return be("ag-header-cell-filter-button",{colId:e})},floatingFilter(e){return be("ag-floating-filter",{colId:e})},floatingFilterButton(e){return be("ag-floating-filter-button",{colId:e})},headerCellMenuButton(e){return be("ag-header-cell-menu-button",{colId:e})},headerResizeHandle(e){return be("ag-header-cell-resize",{colId:e})},filterInstancePickerDisplay(e){return be(`ag-${e.source}-picker-display`,Al(e))},numberFilterInstanceInput(e){return be(`ag-${e.source}-number-input`,Al(e))},textFilterInstanceInput(e){return be(`ag-${e.source}-text-input`,Al(e))},dateFilterInstanceInput(e){return be(`ag-${e.source}-date-input`,Al(e))},setFilterInstanceMiniFilterInput(e){return be(`ag-${e.source}-set-filter-mini-filter-input`,e.source==="filter-toolpanel"?{label:e.colLabel}:{colId:e.colId})},setFilterInstanceItem(e,t){return be(`ag-${e.source}-set-filter-item`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,itemLabel:t}:{colId:e.colId,itemLabel:t})},setFilterApplyPanelButton(e,t){return be(`ag-${e.source}-set-filter-apply-panel-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},filterConditionRadioButton(e,t){return be(`ag-${e.source}-filter-condition-radio-button`,e.source==="filter-toolpanel"?{colLabel:e.colLabel,buttonLabel:t}:{colId:e.colId,buttonLabel:t})},advancedFilterInput(){return be("ag-advanced-filter-input")},advancedFilterButton(e){return be("ag-advanced-filter-button",{label:e})},advancedFilterBuilderButton(){return be("ag-advanced-filter-builder-button")},advancedFilterPanelMaximiseButton(){return be("ag-advanced-filter-builder-panel-maximise")},advancedFilterPanelCloseButton(){return be("ag-advanced-filter-builder-panel-close")},advancedFilterPill(e){return be("ag-advanced-filter-builder-pill",{label:e})},advancedFilterBuilderAddItemButton(){return be("ag-advanced-filter-builder-add-item-button")},rowNode(e){return be("ag-row",{"row-id":e})},cell(e,t){return be("ag-cell",{"row-id":e,colId:t})},autoGroupCell(e){return fe.cell(e,Wn)},checkbox(e,t){return be("ag-selection-checkbox",{"row-id":e,colId:t})},selectionColumnCheckbox(e){return fe.checkbox(e,Np)},autoGroupColumnCheckbox(e){return fe.checkbox(e,Wn)},dragHandle(e,t){return be("ag-drag-handle",{"row-id":e,colId:t})},groupContracted(e,t){return be("ag-group-contracted",{"row-id":e,colId:t})},groupExpanded(e,t){return be("ag-group-expanded",{"row-id":e,colId:t})},autoGroupContracted(e){return fe.groupContracted(e,Wn)},autoGroupExpanded(e){return fe.groupExpanded(e,Wn)},rowNumber(e){return fe.cell(e,Op)},menu(){return be("ag-menu")},menuOption(e){return be("ag-menu-option",{option:e})},sideBar(){return be("ag-side-bar")},sideBarButton(e){return be("ag-side-button",{label:e})},columnToolPanel(){return be("ag-column-panel")},pivotModeSelect(){return be("ag-pivot-mode-select")},columnPanelSelectHeaderCheckbox(){return be("ag-column-panel-select-header-checkbox")},columnPanelSelectHeaderFilter(){return be("ag-column-panel-select-header-filter")},columnSelectListItemGroupClosedIcon(e){return be("ag-column-select-list-item-group-closed-icon",{label:e})},columnSelectListItemCheckbox(e){return be("ag-column-select-list-item-checkbox",{label:e})},columnSelectListItemDragHandle(e){return be("ag-column-select-list-item-drag-handle",{label:e})},columnDropCellDragHandle(e,t,s){return be("ag-column-drop-cell-drag-handle",{source:e,area:t,label:s})},columnDropCellCancelButton(e,t,s){return be("ag-column-drop-cell-cancel",{source:e,area:t,label:s})},columnDropArea(e,t){return be("ag-column-drop-area",{source:e,name:t})},filterToolPanel(){return be("ag-filter-panel")},filterToolPanelAddFilterButton(){return be("ag-filter-panel-add-filter-button")},filterToolPanelFilterTypeSelector(e){return be("ag-filter-panel-filter-type-selector",{colLabel:e})},filterToolPanelSearchInput(){return be("ag-filter-toolpanel-search-input")},filterToolPanelGroup(e){return be("ag-filter-toolpanel-group",{title:e})},filterToolPanelGroupCollapsedIcon(e){return be("ag-filter-toolpanel-group-collapsed-icon",{title:e})},statusBarTotalAndFilteredRowCount(){return be("ag-status-bar-total-and-filtered-row-count")},statusBarTotalRowCount(){return be("ag-status-bar-total-row-count")},statusBarFilteredRowCount(){return be("ag-status-bar-filtered-row-count")},statusBarSelectedRowCount(){return be("ag-status-bar-selected-row-count")},statusBarAggregations(){return be("ag-status-bar-aggregations")},paginationPanelSizePickerDisplay(e){return be("ag-pagination-page-size-picker-field-display",{value:e})},paginationPanelFirstRowOnPage(e){return be("ag-paging-row-summary-panel-first-row-on-page",{value:e})},paginationPanelLastRowOnPage(e){return be("ag-paging-row-summary-panel-last-row-on-page",{value:e})},paginationPanelRecordCount(e){return be("ag-paging-row-summary-panel-record-count",{value:e})},paginationSummaryPanelButton(e){return be("ag-paging-page-summary-panel-btn",{label:e})},paginationSummaryPanelCurrentPage(e){return be("ag-paging-page-summary-panel-current-page",{value:e})},paginationSummaryPanelTotalPage(e){return be("ag-paging-page-summary-panel-total-page",{value:e})},fillHandle(){return be("ag-fill-handle")},columnChooserCloseButton(){return be("ag-column-chooser-close-button")},columnChooserSearchBarCheckbox(){return be("ag-column-chooser-header-checkbox")},columnChooserSearchBarFilter(){return be("ag-column-chooser-searchbar-filter")},columnChooserListItemGroupClosedIcon(e){return be("ag-column-chooser-list-item-group-closed-icon",{label:e})},columnChooserListItemCheckbox(e){return be("ag-column-chooser-list-item-checkbox",{label:e})},columnChooserListItemDragHandle(e){return be("ag-column-chooser-list-item-drag-handle",{label:e})},overlay(){return be("ag-overlay")}};function bO(e,t){const s={};for(const n of Object.keys(e))t[n]!==null&&(s[t[n]??n]=e[n]);return s}function xO(e){return e.source!=="floating-filter"?{index:0,...e}:e}function Al(e){return bO(xO(e),{colLabel:"label"})}var tx="data-testid";function Re(e,t){e?.setAttribute(tx,t)}function yO(e){tx=e}var SO=class extends _{constructor(){super(...arguments),this.beanName="testIdSvc"}postConstruct(){const e=xt(this,()=>this.setupAllTestIds(),500),t=xt(this,()=>{this.setupAllTestIds(),e()},0);this.addManagedEventListeners({firstDataRendered:t,displayedRowsChanged:t,displayedColumnsChanged:t,displayedColumnsWidthChanged:t,virtualColumnsChanged:t,columnMenuVisibleChanged:t,contextMenuVisibleChanged:t,advancedFilterBuilderVisibleChanged:t,fieldPickerValueSelected:t,modelUpdated:t,sideBarUpdated:t,pinnedHeightChanged:t,gridReady:t,overlayExclusiveChanged:t,rowGroupOpened:t,scrollVisibilityChanged:t,gridSizeChanged:t,filterOpened:t,filterChanged:t,cellSelectionChanged:t})}setupAllTestIds(){const e=Rs(this.beans),t=mb(this.beans),s=e.querySelector(`[grid-id="${t}"]`);Re(s,fe.grid(t)),e.querySelectorAll(".ag-header-group-cell").forEach(o=>{Re(o,fe.headerGroupCell(o.getAttribute("col-id")))}),e.querySelectorAll(".ag-header-cell").forEach(o=>{const r=o.getAttribute("col-id"),l=o.classList.contains("ag-floating-filter")?fe.floatingFilter(r):fe.headerCell(r);Re(o,l),Re(o.querySelector(".ag-header-cell-filter-button"),fe.headerFilterButton(r)),Re(o.querySelector(".ag-header-cell-menu-button"),fe.headerCellMenuButton(r)),Re(o.querySelector(".ag-header-cell-resize"),fe.headerResizeHandle(r)),Re(o.querySelector(".ag-checkbox input[type=checkbox]"),fe.headerCheckbox(r)),Re(o.querySelector(".ag-floating-filter-button button"),fe.floatingFilterButton(r)),this.setupFilterInstance(o.querySelector(".ag-floating-filter-body"),{source:"floating-filter",colId:r})});const n=e.querySelector(".ag-filter-menu");this.setupFilterInstance(n,{source:"column-filter"}),Re(e.querySelector(".ag-advanced-filter input[type=text]"),fe.advancedFilterInput()),e.querySelectorAll(".ag-advanced-filter-buttons button").forEach(o=>{Re(o,fe.advancedFilterButton(o.textContent))}),Re(e.querySelector("button.ag-advanced-filter-builder-button"),fe.advancedFilterBuilderButton()),e.querySelectorAll('.ag-panel[aria-label="Advanced Filter"] .ag-panel-title-bar-button').forEach((o,r)=>{Re(o,r===0?fe.advancedFilterPanelMaximiseButton():fe.advancedFilterPanelCloseButton())}),e.querySelectorAll('.ag-panel[aria-lable="Advanced Filter"] .ag-advanced-filter-builder-pill').forEach(o=>{Re(o,fe.advancedFilterPill(o.querySelector(".ag-picker-field-display")?.textContent))}),Re(e.querySelector('.ag-panel[aria-label="Advanced Filter"] .ag-advanced-filter-builder-item-button'),fe.advancedFilterBuilderAddItemButton()),e.querySelectorAll(".ag-row").forEach(o=>{const r=o.getAttribute("row-id");Re(o,fe.rowNode(r)),o.querySelectorAll(".ag-cell").forEach(a=>{const l=a.getAttribute("col-id");Re(a,fe.cell(r,l)),Re(a.querySelector(".ag-selection-checkbox input[type=checkbox]"),fe.checkbox(r,l)),Re(a.querySelector(".ag-drag-handle"),fe.dragHandle(r,l)),Re(a.querySelector(".ag-group-contracted"),fe.groupContracted(r,l)),Re(a.querySelector(".ag-group-expanded"),fe.groupExpanded(r,l))})}),e.querySelectorAll(".ag-menu-list").forEach(o=>{Re(o,fe.menu()),o.querySelectorAll(".ag-menu-option").forEach(r=>{Re(r,fe.menuOption(r.querySelector(".ag-menu-option-text")?.textContent))})}),e.querySelectorAll(".ag-side-bar").forEach(o=>{Re(o,fe.sideBar()),o.querySelectorAll(".ag-side-button button").forEach(r=>{Re(r,fe.sideBarButton(r.querySelector(".ag-side-button-label")?.textContent))}),o.querySelectorAll(".ag-column-panel").forEach(r=>{Re(r,fe.columnToolPanel()),Re(r.querySelector(".ag-pivot-mode-select input[type=checkbox]"),fe.pivotModeSelect()),Re(r.querySelector(".ag-column-select-header-checkbox input[type=checkbox]"),fe.columnPanelSelectHeaderCheckbox()),Re(r.querySelector(".ag-column-select-header-filter-wrapper input[type=text]"),fe.columnPanelSelectHeaderFilter()),r.querySelectorAll(".ag-column-select-list").forEach(a=>{a.querySelectorAll(".ag-column-select-virtual-list-item").forEach(l=>{const c=l.getAttribute("aria-label");Re(l.querySelector(".ag-column-group-closed-icon"),fe.columnSelectListItemGroupClosedIcon(c)),Re(l.querySelector(".ag-column-select-checkbox input[type=checkbox]"),fe.columnSelectListItemCheckbox(c)),Re(l.querySelector(".ag-drag-handle"),fe.columnSelectListItemDragHandle(c))})}),this.setupColumnDropArea(r,"toolbar")}),o.querySelectorAll(".ag-filter-panel").forEach(r=>{Re(r,fe.filterToolPanel()),Re(r.querySelector("button.ag-filter-add-button"),fe.filterToolPanelAddFilterButton()),r.querySelectorAll(".ag-filter-card").forEach(a=>{const l=a.querySelector(".ag-filter-card-title")?.textContent,c=a.querySelector(".ag-filter-type-select");Re(c,fe.filterToolPanelFilterTypeSelector(l)),a.querySelectorAll(".ag-filter").forEach(d=>this.setupFilterInstance(d,{source:"filter-toolpanel",colLabel:l}))})}),o.querySelectorAll(".ag-filter-toolpanel").forEach(r=>{Re(r.querySelector(".ag-filter-toolpanel-search-input input[type=text]"),fe.filterToolPanelSearchInput()),r.querySelectorAll(".ag-filter-toolpanel-group").forEach(a=>{const l=a.querySelector(".ag-filter-toolpanel-group-title")?.textContent;Re(a,fe.filterToolPanelGroup(l)),Re(a.querySelector(".ag-filter-toolpanel-group-title-bar-icon .ag-icon-tree-closed"),fe.filterToolPanelGroupCollapsedIcon(l));const c=a.querySelector(".ag-filter-toolpanel-instance-filter");c&&this.setupFilterInstance(c,{source:"filter-toolpanel",colLabel:l})})})}),Re(e.querySelector(".ag-status-bar .ag-status-panel-total-and-filtered-row-count"),fe.statusBarTotalAndFilteredRowCount()),Re(e.querySelector(".ag-status-bar .ag-status-panel-total-row-count"),fe.statusBarTotalRowCount()),Re(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),fe.statusBarFilteredRowCount()),Re(e.querySelector(".ag-status-bar .ag-status-panel-selected-row-count"),fe.statusBarSelectedRowCount()),Re(e.querySelector(".ag-status-bar .ag-status-panel-filtered-row-count"),fe.statusBarAggregations()),e.querySelectorAll(".ag-paging-panel").forEach(o=>{Re(o.querySelector(".ag-paging-page-size .ag-picker-field-display"),fe.paginationPanelSizePickerDisplay(o.querySelector(".ag-paging-page-size .ag-picker-field-display")?.textContent)),o.querySelectorAll(".ag-paging-row-summary-panel-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbFirstRowOnPage":Re(r,fe.paginationPanelFirstRowOnPage(r.textContent));break;case"lbLastRowOnPage":Re(r,fe.paginationPanelLastRowOnPage(r.textContent));break;case"lbRecordCount":Re(r,fe.paginationPanelRecordCount(r.textContent));break}}),o.querySelectorAll(".ag-paging-page-summary-panel .ag-button").forEach(r=>{Re(r,fe.paginationSummaryPanelButton(r.getAttribute("aria-label")?.toLowerCase()))}),o.querySelectorAll(".ag-paging-page-summary-panel .ag-paging-number").forEach(r=>{switch(r.getAttribute("data-ref")){case"lbCurrent":Re(r,fe.paginationSummaryPanelCurrentPage(r.textContent));break;case"lbTotal":Re(r,fe.paginationSummaryPanelTotalPage(r.textContent));break}})}),Re(e.querySelector(".ag-fill-handle"),fe.fillHandle()),e.querySelectorAll('.ag-panel[aria-label="Choose Columns"]').forEach(o=>{Re(o.querySelector(".ag-panel-title-bar-button-icon"),fe.columnChooserCloseButton()),Re(o.querySelector('.ag-column-select-header-checkbox input[type="checkbox"]'),fe.columnChooserSearchBarCheckbox()),Re(o.querySelector('.ag-column-select-header-filter-wrapper input[type="text"]'),fe.columnChooserSearchBarFilter()),o.querySelectorAll(".ag-column-select-list").forEach(r=>{r.querySelectorAll(".ag-column-select-virtual-list-item").forEach(a=>{const l=a.getAttribute("aria-label");Re(a.querySelector(".ag-column-group-closed-icon"),fe.columnChooserListItemGroupClosedIcon(l)),Re(a.querySelector(".ag-column-select-checkbox input[type=checkbox]"),fe.columnChooserListItemCheckbox(l)),Re(a.querySelector(".ag-drag-handle"),fe.columnChooserListItemDragHandle(l))})})}),Re(e.querySelector(".ag-overlay-wrapper"),fe.overlay());const i=e.querySelector(".ag-column-drop-wrapper");i&&this.setupColumnDropArea(i,"panel")}setupFilterInstance(e,t){if(!e)return;e.querySelectorAll(".ag-filter-select .ag-picker-field-display").forEach(i=>{Re(i,fe.filterInstancePickerDisplay(t))});const s=t.source==="floating-filter"?".ag-floating-filter-body":".ag-filter-body";e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="number"]`).forEach((i,o,r)=>{const l=r.length>1?{...t,index:o}:t;Re(i,fe.numberFilterInstanceInput(l))}),e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="text"]`).forEach((i,o,r)=>{const l=r.length>1?{...t,index:o}:t;Re(i,fe.textFilterInstanceInput(l))}),e.querySelectorAll(`${s} .ag-input-field:not(.ag-hidden) input[type="date"]`).forEach((i,o,r)=>{const l=r.length>1?{...t,index:o}:t;Re(i,fe.dateFilterInstanceInput(l))});const n=e.querySelector('.ag-mini-filter input[type="text"]');Re(n,fe.setFilterInstanceMiniFilterInput(t)),e.querySelectorAll(".ag-set-filter-list .ag-set-filter-item").forEach(i=>{const o=i.querySelector(".ag-checkbox-label")?.textContent,r=i.querySelector('input[type="checkbox"]');Re(r,fe.setFilterInstanceItem(t,o))}),e.querySelectorAll(".ag-filter-apply-panel button").forEach(i=>{Re(i,fe.setFilterApplyPanelButton(t,i.textContent))}),e.querySelectorAll(".ag-filter-condition .ag-radio-button").forEach(i=>{const o=i.querySelector(".ag-radio-button-label")?.textContent;Re(i.querySelector("input[type=radio]"),fe.filterConditionRadioButton(t,o))})}setupColumnDropArea(e,t){e.querySelectorAll(".ag-column-drop").forEach(s=>{const n=s.querySelector(".ag-column-drop-list")?.getAttribute("aria-label");Re(s,fe.columnDropArea(t,n)),s.querySelectorAll(".ag-column-drop-cell").forEach(i=>{const o=i.querySelector(".ag-column-drop-cell-text")?.textContent;Re(i.querySelector(".ag-drag-handle"),fe.columnDropCellDragHandle(t,n,o)),Re(i.querySelector(".ag-column-drop-cell-button .ag-icon-cancel"),fe.columnDropCellCancelButton(t,n,o))})})}},RO={moduleName:"Testing",version:ie,beans:[SO]};function FO({testIdAttribute:e}={}){e&&yO(e),gw.registerModules([RO])}var EO=class{wrap(e,t,s,n){const i=this.createWrapper(e,n);for(const o of t??[])this.createMethod(i,o,!0);for(const o of s??[])this.createMethod(i,o,!1);return i}createMethod(e,t,s){e.addMethod(t,this.createMethodProxy(e,t,s))}createMethodProxy(e,t,s){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(s&&X(49,{methodName:t}),null)}}},DO=class extends gb{constructor(e){super(e,Vp)}},Vt=g.createContext({}),sx=g.createContext("default"),Na=(e,t,s,n)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;const o=e.newAgStackInstance();let r,a,l=!1;return o.then(c=>{if(l){t.destroyBean(c);return}r=c,a=r.getGui(),s.appendChild(a),Sv(n,r)}),()=>{l=!0,r&&(a?.remove(),t.destroyBean(r),n&&Sv(n,void 0))}},Sv=(e,t)=>{if(e)if(e instanceof Function)e(t);else{const s=e;s.current=t}},fs=(...e)=>e.filter(s=>s!=null&&s!=="").join(" "),bs=class nx{constructor(...t){this.classesMap={};for(const s of t)this.classesMap[s]=!0}setClass(t,s){if(!!this.classesMap[t]==s)return this;const i=new nx;return i.classesMap={...this.classesMap},i.classesMap[t]=s,i}toString(){return Object.keys(this.classesMap).filter(s=>this.classesMap[s]).join(" ")}},ar=e=>{const t=()=>typeof Symbol=="function"&&Symbol.for,s=()=>t()?Symbol.for("react.memo"):60115;return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===s()},Xh=g.version?.split(".")[0],ix=Xh==="16"||Xh==="17";function PO(){return Xh==="19"}var Jl=!1;function TO(e){return Jl||setTimeout(()=>Jl=!1,0),Jl=!0,e()}var ba=(e,t)=>{!ix&&e&&!Jl?Jo.flushSync(t):t()},kO=e=>{ix?e():g.startTransition(e)};function IO(e,t,s){return g.useSyncExternalStore?g.useSyncExternalStore(e,t):s}function kc(e,t,s){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(s||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;const n=[],i=[],o=new Map,r=new Map;for(let a=0;a<t.length;a++){const l=t[a];r.set(l.instanceId,l)}for(let a=0;a<e.length;a++){const l=e[a];o.set(l.instanceId,l),r.has(l.instanceId)&&n.push(l)}for(let a=0;a<t.length;a++){const l=t[a],c=l.instanceId;o.has(c)||i.push(l)}return n.length===e.length&&i.length===0?e:n.length===0&&i.length===t.length?t:n.length===0?i:i.length===0?n:[...n,...i]}var ox=g.forwardRef((e,t)=>{const{registry:s,context:n}=g.useContext(Vt),i=g.useRef(null),o=g.useRef(null),r=g.useRef(null),a=g.useRef(null),l=g.useRef(null),c=g.useRef(),[d,u]=g.useState(),[p,f]=g.useState(),[m,v]=g.useState(),[C,w]=g.useState(()=>new bs),[b,x]=g.useState(()=>new bs("ag-hidden")),[S,y]=g.useState(()=>new bs("ag-hidden")),[R,E]=g.useState(()=>new bs("ag-invisible"));g.useImperativeHandle(t,()=>({refresh(){return!1}})),g.useLayoutEffect(()=>Na(d,n,o.current),[d]);const F=g.useCallback(G=>{if(i.current=G,!G||n.isDestroyed()){c.current=n.destroyBean(c.current);return}const L={setInnerRenderer:(B,N)=>{u(B),v(N)},setChildCount:B=>f(B),toggleCss:(B,N)=>w(W=>W.setClass(B,N)),setContractedDisplayed:B=>y(N=>N.setClass("ag-hidden",!B)),setExpandedDisplayed:B=>x(N=>N.setClass("ag-hidden",!B)),setCheckboxVisible:B=>E(N=>N.setClass("ag-invisible",!B)),setCheckboxSpacing:B=>E(N=>N.setClass("ag-group-checkbox-spacing",B))},U=s.createDynamicBean("groupCellRendererCtrl",!0);U&&(c.current=n.createBean(U),c.current.init(L,G,r.current,a.current,l.current,ox,e))},[]),P=g.useMemo(()=>`ag-cell-wrapper ${C.toString()}`,[C]),k=g.useMemo(()=>`ag-group-expanded ${b.toString()}`,[b]),D=g.useMemo(()=>`ag-group-contracted ${S.toString()}`,[S]),T=g.useMemo(()=>`ag-group-checkbox ${R.toString()}`,[R]),I=d?.componentFromFramework,H=I?d.componentClass:void 0,A=d==null&&m!=null,O=nr(m);return g.createElement("span",{className:P,ref:F,...e.colDef?{}:{role:c.current?.getCellAriaRole()}},g.createElement("span",{className:k,ref:a}),g.createElement("span",{className:D,ref:l}),g.createElement("span",{className:T,ref:r}),g.createElement("span",{className:"ag-group-value",ref:o},A?O:I?g.createElement(H,{...d.params}):null),g.createElement("span",{className:"ag-group-child-count"},p))}),Rv=ox,kg=g.createContext({setMethods:()=>{}}),MO=e=>{const{initialProps:t,addUpdateCallback:s,CustomComponentClass:n,setMethods:i}=e,[{key:o,...r},a]=g.useState(t);return g.useEffect(()=>{s(l=>a(l))},[]),g.createElement(kg.Provider,{value:{setMethods:i}},g.createElement(n,{key:o,...r}))},AO=g.memo(MO),LO=0;function Fv(){return`agPortalKey_${++LO}`}var rx=class{constructor(e,t,s,n){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=s,this.suppressFallbackMethods=!!n,this.statelessComponent=this.isStateless(this.reactComponent),this.key=Fv(),this.portalKey=Fv(),this.instanceCreated=this.isStatelessComponent()?We.resolve(!1):new We(i=>{this.resolveInstanceCreated=i})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy=="function"&&this.componentInstance.destroy();const e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){const t=this.portalManager.getComponentWrappingElement(),s=document.createElement(t||"div");return s.classList.add("ag-react-container"),e.reactContainer=s,s}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return typeof Symbol=="function"&&Symbol.for}isStateless(e){return typeof e=="function"&&!(e.prototype&&e.prototype.isReactComponent)||typeof e=="object"&&e.$$typeof===this.getMemoType()}hasMethod(e){const t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){const s=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!s){setTimeout(()=>this.callMethod(e,t));return}const n=s[e];if(n)return n.apply(s,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new We(t=>this.createReactComponent(t))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=t=>{this.componentInstance=t,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=Jo.createPortal(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return g.createElement(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){const s=this[`${e}Component`];if(!this.suppressFallbackMethods&&s)return s.bind(this)(t)}fallbackMethodAvailable(e){return this.suppressFallbackMethods?!1:!!this[`${e}Component`]}};function gd(e,t,s){for(const n of e){const i=t[n];i&&(s[n]=i)}}var ys=class extends rx{constructor(){super(...arguments),this.awaitUpdateCallback=new We(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=AO}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:s=>this.setMethods(s),addUpdateCallback:s=>{this.updateCallback=()=>(s(this.getProps()),new We(n=>{setTimeout(()=>{n()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,gd(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new We(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},NO=class extends ys{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},OO=class extends ys{refresh(e){this.sourceParams=e,this.refreshProps()}},HO=class extends ys{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){const e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},BO=class extends ys{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){const e=super.getProps(),{label:t,icon:s,shake:n}=this;return e.label=t,e.icon=s,e.shake=n,e}},GO=class extends ys{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new We(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();const t=new We(s=>{this.resolveFilterPassCallback=s});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},VO=class extends ys{constructor(){super(...arguments),this.awaitSetMethodsCallback=new We(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){const t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function ax(e,t){e.parentFilterInstance(s=>{(s.setModel(t)||We.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var jO=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=s=>this.updateModel(s)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){gd(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),ax(this.floatingFilterParams,e)}},zO=class extends ys{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),ax(this.sourceParams,e)}getProps(){const e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},WO=class extends ys{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},_O=class extends ys{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},UO=class extends ys{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){const t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){const e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},$O=class extends ys{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},qO=class extends ys{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){const e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function Ig(){X(231)}var KO=1e3,YO=class{constructor(e,t,s){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=s||KO}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,s){this.portals=[...this.portals,e],this.waitForInstance(t,s),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,s=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-s>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){ba(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,s)})}}},ZO=g.createContext([]),XO=g.createContext(void 0),QO=({ctrl:e})=>{const t=e.isAlive(),{context:s}=g.useContext(Vt),[n,i]=g.useState(),[o,r]=g.useState(),a=g.useRef(),l=g.useRef(null),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),p=g.useRef();t&&!p.current&&(p.current=new Pa(()=>l.current));const f=g.useCallback(w=>{if(l.current=w,!w||!e.isAlive()||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new rr);const b=()=>{const S=e.getSelectAllGui();S&&(c.current?.insertAdjacentElement("afterend",S),a.current.addDestroyFunc(()=>S.remove()))},x={setWidth:S=>{l.current&&(l.current.style.width=S)},toggleCss:(S,y)=>p.current.toggleCss(S,y),setUserStyles:S=>r(S),setAriaSort:S=>{l.current&&(S?F3(l.current,S):E3(l.current))},setUserCompDetails:S=>i(S),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:b,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(x,w,c.current,d.current,a.current),b()},[]);g.useLayoutEffect(()=>Na(n,s,d.current,u),[n]),g.useEffect(()=>{e.setDragSource(l.current)},[n]);const m=g.useMemo(()=>!!(n?.componentFromFramework&&ar(n.componentClass)),[n]),v=n?.componentFromFramework,C=n?.componentClass;return g.createElement("div",{ref:f,style:o,className:"ag-header-cell",role:"columnheader"},g.createElement("div",{ref:c,className:"ag-header-cell-resize",role:"presentation"}),g.createElement("div",{ref:d,className:"ag-header-cell-comp-wrapper",role:"presentation"},v?m?g.createElement(C,{...n.params}):g.createElement(C,{...n.params,ref:u}):null))},JO=g.memo(QO),eH=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){gd(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},tH=({ctrl:e})=>{const{context:t,gos:s}=g.useContext(Vt),[n,i]=g.useState(),[o,r]=g.useState(()=>new bs("ag-header-cell","ag-floating-filter")),[a,l]=g.useState(()=>new bs),[c,d]=g.useState(()=>new bs("ag-floating-filter-button","ag-hidden")),[u,p]=g.useState("false"),[f,m]=g.useState(),[,v]=g.useState(1),C=g.useRef(),w=g.useRef(null),b=g.useRef(null),x=g.useRef(null),S=g.useRef(null),y=g.useRef(),R=g.useRef(),E=B=>{B!=null&&y.current?.(B)},F=g.useCallback(B=>{if(w.current=B,!B||!e.isAlive()||t.isDestroyed()){C.current=t.destroyBean(C.current);return}C.current=t.createBean(new rr),R.current=new We(W=>{y.current=W});const N={toggleCss:(W,Y)=>r(te=>te.setClass(W,Y)),setUserStyles:W=>i(W),addOrRemoveBodyCssClass:(W,Y)=>l(te=>te.setClass(W,Y)),setButtonWrapperDisplayed:W=>{d(Y=>Y.setClass("ag-hidden",!W)),p(W?"false":"true")},setWidth:W=>{w.current&&(w.current.style.width=W)},setCompDetails:W=>m(W),getFloatingFilterComp:()=>R.current?R.current:null,setMenuIcon:W=>S.current?.appendChild(W)};e.setComp(N,B,S.current,b.current,C.current)},[]);g.useLayoutEffect(()=>Na(f,t,b.current,E),[f]);const P=g.useMemo(()=>o.toString(),[o]),k=g.useMemo(()=>a.toString(),[a]),D=g.useMemo(()=>c.toString(),[c]),T=g.useMemo(()=>!!(f&&f.componentFromFramework&&ar(f.componentClass)),[f]),I=g.useMemo(()=>s.get("reactiveCustomComponents"),[]),H=g.useMemo(()=>s.get("enableFilterHandlers"),[]),[A,O]=g.useState();g.useEffect(()=>{if(f?.componentFromFramework)if(I){const B=H?eH:jO,N=new B(f.params,()=>v(W=>W+1));E(N),O(N)}else Ig()},[f]);const G=A?.getProps(),L=f?.componentFromFramework,U=f?.componentClass;return g.createElement("div",{ref:F,style:n,className:P,role:"gridcell"},g.createElement("div",{ref:b,className:k,role:"presentation"},L?I?G&&g.createElement(kg.Provider,{value:{setMethods:B=>A.setMethods(B)}},g.createElement(U,{...G})):g.createElement(U,{...f.params,ref:T?()=>{}:E}):null),g.createElement("div",{ref:x,"aria-hidden":u,className:D,role:"presentation"},g.createElement("button",{ref:S,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))},sH=g.memo(tH),nH=({ctrl:e})=>{const{context:t}=g.useContext(Vt),[s,n]=g.useState(),[i,o]=g.useState(()=>new bs),[r,a]=g.useState(()=>new bs),[l,c]=g.useState("false"),[d,u]=g.useState(),[p,f]=g.useState(),m=g.useRef(),v=g.useRef(null),C=g.useRef(null),w=g.useRef(null),b=g.useRef(),x=g.useCallback(P=>{if(v.current=P,!P||!e.isAlive()||t.isDestroyed()){m.current=t.destroyBean(m.current);return}m.current=t.createBean(new rr);const k={setWidth:D=>{v.current&&(v.current.style.width=D)},toggleCss:(D,T)=>o(I=>I.setClass(D,T)),setUserStyles:D=>n(D),setHeaderWrapperHidden:D=>{const T=w.current;T&&(D?T.style.setProperty("display","none"):T.style.removeProperty("display"))},setHeaderWrapperMaxHeight:D=>{const T=w.current;T&&(D!=null?T.style.setProperty("max-height",`${D}px`):T.style.removeProperty("max-height"),T.classList.toggle("ag-header-cell-comp-wrapper-limited-height",D!=null))},setUserCompDetails:D=>f(D),setResizableDisplayed:D=>{a(T=>T.setClass("ag-hidden",!D)),c(D?"false":"true")},setAriaExpanded:D=>u(D),getUserCompInstance:()=>b.current||void 0};e.setComp(k,P,C.current,w.current,m.current)},[]);g.useLayoutEffect(()=>Na(p,t,w.current),[p]),g.useEffect(()=>{v.current&&e.setDragSource(v.current)},[p]);const S=g.useMemo(()=>!!(p?.componentFromFramework&&ar(p.componentClass)),[p]),y=g.useMemo(()=>"ag-header-group-cell "+i.toString(),[i]),R=g.useMemo(()=>"ag-header-cell-resize "+r.toString(),[r]),E=p?.componentFromFramework,F=p?.componentClass;return g.createElement("div",{ref:x,style:s,className:y,role:"columnheader","aria-expanded":d},g.createElement("div",{ref:w,className:"ag-header-cell-comp-wrapper",role:"presentation"},E?S?g.createElement(F,{...p.params}):g.createElement(F,{...p.params,ref:b}):null),g.createElement("div",{ref:C,"aria-hidden":l,className:R}))},iH=g.memo(nH),oH=({ctrl:e})=>{const{gos:t,context:s}=g.useContext(Vt),{topOffset:n,rowHeight:i}=g.useMemo(()=>e.getTopAndHeight(),[]),o=g.useMemo(()=>t.get("tabIndex"),[]),[r,a]=g.useState(()=>e.getAriaRowIndex()),l=e.headerRowClass,[c,d]=g.useState(()=>i+"px"),[u,p]=g.useState(()=>n+"px"),f=g.useRef(null),[m,v]=g.useState(()=>e.getUpdatedHeaderCtrls()),C=g.useRef(),w=g.useRef(null),b=g.useCallback(y=>{if(w.current=y,!y||!e.isAlive()||s.isDestroyed()){C.current=s.destroyBean(C.current);return}C.current=s.createBean(new rr);const R={setHeight:E=>d(E),setTop:E=>p(E),setHeaderCtrls:(E,F,P)=>{const k=f.current,D=kc(k,E,F);D!==k&&(f.current=D,ba(P,()=>v(D)))},setWidth:E=>{w.current&&(w.current.style.width=E)},setRowIndex:E=>{a(E)}};e.setComp(R,C.current,!1)},[]),x=g.useMemo(()=>({height:c,top:u}),[c,u]),S=g.useCallback(y=>{switch(e.type){case"group":return g.createElement(iH,{ctrl:y,key:y.instanceId});case"filter":return g.createElement(sH,{ctrl:y,key:y.instanceId});default:return g.createElement(JO,{ctrl:y,key:y.instanceId})}},[]);return g.createElement("div",{ref:b,className:l,role:"row",style:x,tabIndex:o,"aria-rowindex":r},m.map(S))},rH=g.memo(oH),aH=({pinned:e})=>{const[t,s]=g.useState(!0),[n,i]=g.useState([]),{context:o}=g.useContext(Vt),r=g.useRef(null),a=g.useRef(null),l=g.useRef(),c=e==="left",d=e==="right",u=!c&&!d,p=g.useCallback(v=>{if(r.current=v,!v||o.isDestroyed()){l.current=o.destroyBean(l.current);return}l.current=o.createBean(new GD(e));const C={setDisplayed:s,setCtrls:w=>i(w),setCenterWidth:w=>{a.current&&(a.current.style.width=w)},setViewportScrollLeft:w=>{r.current&&(r.current.scrollLeft=w)},setPinnedContainerWidth:w=>{r.current&&(r.current.style.width=w,r.current.style.minWidth=w,r.current.style.maxWidth=w)}};l.current.setComp(C,r.current)},[]),f=t?"":"ag-hidden",m=()=>n.map(v=>g.createElement(rH,{ctrl:v,key:v.instanceId}));return c?g.createElement("div",{ref:p,className:"ag-pinned-left-header "+f,"aria-hidden":!t,role:"rowgroup"},m()):d?g.createElement("div",{ref:p,className:"ag-pinned-right-header "+f,"aria-hidden":!t,role:"rowgroup"},m()):u?g.createElement("div",{ref:p,className:"ag-header-viewport "+f,role:"rowgroup",tabIndex:-1},g.createElement("div",{ref:a,className:"ag-header-container",role:"presentation"},m())):null},_u=g.memo(aH),lH=()=>{const[e,t]=g.useState(()=>new bs),[s,n]=g.useState(),{context:i}=g.useContext(Vt),o=g.useRef(null),r=g.useRef(),a=g.useCallback(d=>{if(o.current=d,!d||i.isDestroyed()){r.current=i.destroyBean(r.current);return}r.current=i.createBean(new ID);const u={toggleCss:(p,f)=>t(m=>m.setClass(p,f)),setHeightAndMinHeight:p=>n(p)};r.current.setComp(u,d,d)},[]),l=g.useMemo(()=>"ag-header "+e.toString(),[e]),c=g.useMemo(()=>({height:s,minHeight:s}),[s]);return g.createElement("div",{ref:a,className:l,style:c,role:"presentation"},g.createElement(_u,{pinned:"left"}),g.createElement(_u,{pinned:null}),g.createElement(_u,{pinned:"right"}))},cH=g.memo(lH),dH=(e,t)=>{g.useEffect(()=>{const s=t.current;if(s){const n=s.parentElement;if(n){const i=document.createComment(e);return n.insertBefore(i,s),()=>{i.remove()}}}},[e])},yi=dH,uH=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new We(s=>{this.resolveInstanceCreated=s}),this.onValueChange=s=>this.updateValue(s),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){gd(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},hH=e=>{const t=g.useRef(e),s=g.useRef(),n=g.useRef(!1),i=g.useRef(!1),[,o]=g.useState(0);n.current&&(i.current=!0),g.useEffect(()=>(n.current||(s.current=t.current(),n.current=!0),o(r=>r+1),()=>{i.current&&s.current?.()}),[])},pH=e=>{const[t,s]=g.useState(),n=g.useContext(Vt),{context:i,popupSvc:o,gos:r,editSvc:a}=n,{editDetails:l,cellCtrl:c,eParentCell:d}=e;return hH(()=>{const{compDetails:u}=l,p=r.get("stopEditingWhenCellsLoseFocus");let f,m;if(!i.isDestroyed()){m=i.createBean(a.createPopupEditorWrapper(u.params));const v=m.getGui();if(e.jsChildComp){const y=e.jsChildComp.getGui();y&&v.appendChild(y)}const{column:C,rowNode:w}=c,b={column:C,rowNode:w,type:"popupCellEditor",eventSource:d,ePopup:v,position:l.popupPosition,keepWithinBounds:!0},x=o?.positionPopupByComponent.bind(o,b),S=o?.addPopup({modal:p,eChild:v,closeOnEsc:!0,closedCallback:y=>{c.onPopupEditorClosed(y)},anchorToElement:d,positionCallback:x,ariaOwns:d});f=S?S.hideFunc:void 0,s(m),e.jsChildComp?.afterGuiAttached?.()}return()=>{f?.(),i.destroyBean(m)}}),g.useLayoutEffect(()=>()=>{c.isCellFocused()&&t?.getGui().contains(dt(n))&&d.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?Jo.createPortal(e.wrappedContent,t.getGui()):null},Ev=g.memo(pH),gH=(e,t,s)=>{const{compProxy:n}=e;s(n);const i=n.getProps(),o=ar(t);return g.createElement(kg.Provider,{value:{setMethods:r=>n.setMethods(r)}},o?g.createElement(t,{...i}):g.createElement(t,{...i,ref:r=>n.setRef(r)}))},Dv=(e,t,s)=>e.compProxy?gH(e,t,s):g.createElement(t,{...e.compDetails.params,ref:s}),fH=(e,t,s,n,i)=>{const o=e.compDetails,r=o.componentClass,a=o.componentFromFramework&&!e.popup,l=o.componentFromFramework&&e.popup,c=!o.componentFromFramework&&e.popup;return a?Dv(e,r,t):l?g.createElement(Ev,{editDetails:e,cellCtrl:n,eParentCell:s,wrappedContent:Dv(e,r,t)}):c&&i?g.createElement(Ev,{editDetails:e,cellCtrl:n,eParentCell:s,jsChildComp:i}):null},mH=(e,t,s,n,i,o,r=!1)=>{const{context:a}=g.useContext(Vt),l=g.useCallback(()=>{const c=i.current;if(!c)return;const d=c.getGui();d&&d.parentElement&&d.remove(),a.destroyBean(c),i.current=void 0},[]);g.useEffect(()=>{const c=e!=null&&!r,d=e?.compDetails&&!e.compDetails.componentFromFramework,u=t&&s==null;if(!(c&&d&&!u)){l();return}const f=e.compDetails;if(i.current){const v=i.current,w=v.refresh!=null&&e.force==!1?v.refresh(f.params):!1;if(w===!0||w===void 0)return;l()}f.newAgStackInstance().then(v=>{if(!v)return;const C=v.getGui();if(!C)return;(t?s:o.current).appendChild(C),i.current=v})},[e,t,n,r]),g.useEffect(()=>l,[])},lx=mH,vH=({cellCtrl:e,parent:t})=>{const s=g.useRef(),n=g.useMemo(()=>{const{loadingComp:i}=e.getDeferLoadingCellRenderer();return i?{value:void 0,compDetails:i,force:!1}:void 0},[e]);if(lx(n,!1,void 0,1,s,t),n?.compDetails?.componentFromFramework){const i=n.compDetails.componentClass;return g.createElement(i,{...n.compDetails.params})}return g.createElement(g.Fragment,null)},CH=({cellCtrl:e,printLayout:t,editingCell:s})=>{const n=g.useContext(Vt),{context:i}=n,{column:{colIdSanitised:o},instanceId:r}=e,a=g.useRef(),[l,c]=g.useState(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,u]=g.useState(),[p,f]=g.useState(1),[m,v]=g.useState(),[C,w]=g.useState(!1),[b,x]=g.useState(!1),[S,y]=g.useState(!1),R=g.useRef(null),[E,F]=g.useState(),P=g.useMemo(()=>e.isForceWrapper(),[e]),k=g.useMemo(()=>e.getCellAriaRole(),[e]),D=g.useRef(null),T=g.useRef(null),I=g.useRef(null),H=g.useRef(),A=g.useRef(),O=g.useRef(),G=g.useRef([]),L=g.useRef(),U=g.useRef(),[B,N]=g.useState(0),W=g.useCallback(se=>{U.current=se,N(re=>re+1)},[]),Y=l!=null&&(C||S||b)&&(d==null||!!d.popup),te=P||Y,we=g.useMemo(()=>e.getCellValueClass(),[e]),Q=g.useCallback(se=>{if(A.current=se,se){const re=se.isCancelBeforeStart&&se.isCancelBeforeStart();setTimeout(()=>{re?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(se))})}},[e]),ve=g.useRef();ve.current||(ve.current=new Pa(()=>D.current));const Pe=!!d&&!d.popup;lx(l,te,U.current,B,H,D,Pe);const J=g.useRef();g.useLayoutEffect(()=>{const se=J.current,re=l;if(J.current=l,se==null||se.compDetails==null||re==null||re.compDetails==null)return;L.current?.refreshVisibility();const Oe=se.compDetails,Ae=re.compDetails;if(Oe.componentClass!=Ae.componentClass||I.current?.refresh==null)return;I.current.refresh(Ae.params)!=!0&&f(ke=>ke+1)},[l]),g.useLayoutEffect(()=>{if(!(d&&!d.compDetails.componentFromFramework)||i.isDestroyed())return;const re=d.compDetails,Oe=d.popup===!0,Ae=re.newAgStackInstance();return Ae.then(Ce=>{if(!Ce)return;const ke=Ce.getGui();Q(Ce),Oe||((P?O:D).current?.appendChild(ke),Ce.afterGuiAttached?.()),F(Ce)}),()=>{Ae.then(Ce=>{const ke=Ce.getGui();e.disableEditorTooltipFeature(),i.destroyBean(Ce),Q(void 0),F(void 0),ke?.remove()})}},[d]);const ge=g.useCallback(se=>{if(O.current=se,!se||i.isDestroyed()||!e.isAlive()){const Ae=G.current;G.current=[];for(const Ce of Ae)Ce();return}let re;const Oe=Ae=>{Ae&&(se.insertAdjacentElement("afterbegin",Ae.getGui()),G.current.push(()=>{pn(Ae.getGui()),i.destroyBean(Ae),L.current===re&&(L.current=void 0)}))};C&&Oe(e.createSelectionCheckbox()),S&&Oe(e.createDndSource()),b&&(re=e.createRowDragComp(),L.current=re,re&&(Oe(re),re.refreshVisibility()))},[e,i,S,b,C]),V=g.useCallback(()=>{const se=!e.isCellSpanning()||T.current,re=D.current;if(!re||!se||!e||!e.isAlive()||i.isDestroyed()){a.current=i.destroyBean(a.current);return}a.current=i.createBean(new rr);const Oe={toggleCss:(Ce,ke)=>ve.current.toggleCss(Ce,ke),setUserStyles:Ce=>v(Ce),getFocusableElement:()=>D.current,setIncludeSelection:Ce=>w(Ce),setIncludeRowDrag:Ce=>x(Ce),setIncludeDndSource:Ce=>y(Ce),setRowResizerElement:Ce=>{R.current&&pn(R.current),R.current=Ce,Ce&&D.current&&D.current.appendChild(Ce)},getCellEditor:()=>A.current??null,getCellRenderer:()=>I.current??H.current,getParentOfValue:()=>U.current??O.current??D.current,setRenderDetails:(Ce,ke,qe)=>{const ot=()=>{c(Ve=>Ve?.compDetails!==Ce||Ve?.value!==ke||Ve?.force!==qe?{value:ke,compDetails:Ce,force:qe}:Ve)};if(Ce?.params?.deferRender&&!e.rowNode.group){const{loadingComp:Ve,onReady:wt}=e.getDeferLoadingCellRenderer();if(Ve){c({value:void 0,compDetails:Ve,force:!1}),wt.then(()=>kO(ot));return}}ot()},setEditDetails:(Ce,ke,qe,ot)=>{if(Ce){let Ve;Ce.componentFromFramework&&(ot?Ve=new uH(Ce.params,()=>f(wt=>wt+1)):Ig()),u({compDetails:Ce,popup:ke,popupPosition:qe,compProxy:Ve}),ke||c(void 0)}else e.hasBrowserFocus()&&Oe.getFocusableElement().focus({preventScroll:!0}),A.current=void 0,u(void 0)},refreshEditStyles:(Ce,ke)=>{if(!D.current)return;const{current:qe}=ve;qe.toggleCss("ag-cell-value",!te),qe.toggleCss("ag-cell-inline-editing",!!Ce&&!ke),qe.toggleCss("ag-cell-popup-editing",!!Ce&&!!ke),qe.toggleCss("ag-cell-not-inline-editing",!Ce||!!ke)}},Ae=O.current||void 0;e.setComp(Oe,re,T.current??void 0,Ae,t,s,a.current)},[]),$=g.useCallback(se=>{D.current=se,V()},[]),K=g.useCallback(se=>{T.current=se,V()},[]),ce=g.useMemo(()=>!!(l?.compDetails?.componentFromFramework&&ar(l.compDetails.componentClass)),[l]);g.useLayoutEffect(()=>{if(!D.current)return;const{current:se}=ve;se.toggleCss("ag-cell-value",!te),se.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),se.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),se.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});const q=()=>{const{compDetails:se,value:re}=l;if(!se)return re?.toString?.()??re;if(se.componentFromFramework){const Oe=se.componentClass;return g.createElement(g.Suspense,{fallback:g.createElement(vH,{cellCtrl:e,parent:D})},ce?g.createElement(Oe,{...se.params,key:p}):g.createElement(Oe,{...se.params,key:p,ref:I}))}},ue=()=>{const se=()=>l==null?null:te?g.createElement("span",{role:"presentation",id:`cell-${r}`,className:we,ref:W},q()):q(),re=Oe=>fH(Oe,Q,D.current,e,E);return d!=null?d.popup?g.createElement(g.Fragment,null,se(),re(d)):re(d):se()},he=()=>g.createElement("div",{ref:$,style:m,role:k,"col-id":o},te?g.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:ge},ue()):ue());return e.isCellSpanning()?g.createElement("div",{ref:K,className:"ag-spanned-cell-wrapper",role:"presentation"},he()):he()},wH=g.memo(CH),bH=({rowCtrl:e,containerType:t})=>{const{context:s,gos:n,editSvc:i}=g.useContext(Vt),o=g.useContext(sx)==="default",r=g.useRef(),a=g.useRef(e.getDomOrder()),l=e.isFullWidth(),c=e.rowNode.displayed,[d,u]=g.useState(()=>c?e.rowNode.getRowIndexString():null),[p,f]=g.useState(()=>e.rowId),[m,v]=g.useState(()=>e.businessKey),[C,w]=g.useState(()=>e.rowStyles),b=g.useRef(null),[x,S]=g.useState(()=>null),[y,R]=g.useState(),[E,F]=g.useState(()=>c?e.getInitialRowTop(t):void 0),[P,k]=g.useState(()=>c?e.getInitialTransform(t):void 0),D=g.useRef(null),T=g.useRef(),I=g.useRef(),H=g.useRef(!1),[A,O]=g.useState(0);g.useEffect(()=>{if(H.current||!y||A>10)return;const ge=D.current?.firstChild;ge?(e.setupDetailRowAutoHeight(ge),H.current=!0):O(V=>V+1)},[y,A]);const G=g.useRef();G.current||(G.current=new Pa(()=>D.current));const L=g.useRef(()=>{}),U=g.useCallback(ge=>(L.current=ge,()=>{L.current=()=>{}}),[]),B=IO(U,()=>b.current,[]),N=o?B:x,W=g.useCallback(ge=>{if(D.current=ge,r.current=ge?s.createBean(new rr):s.destroyBean(r.current),!ge){e.unsetComp(t);return}if(!e.isAlive()||s.isDestroyed())return;const V={setTop:F,setTransform:k,toggleCss:($,K)=>G.current.toggleCss($,K),setDomOrder:$=>a.current=$,setRowIndex:u,setRowId:f,setRowBusinessKey:v,setUserStyles:w,setCellCtrls:($,K)=>{const ce=b.current,q=kc(ce,$,a.current);q!==ce&&(b.current=q,o?L.current():ba(K,()=>S(q)))},showFullWidth:$=>{I.current=$.params,R($)},getFullWidthCellRenderer:()=>T.current,getFullWidthCellRendererParams:()=>I.current,refreshFullWidth:$=>{const K=$();return I.current=K,ve.current?(R(ce=>({...ce,params:K})),!0):!T.current||!T.current.refresh?!1:T.current.refresh(K)}};e.setComp(V,ge,t,r.current)},[]);g.useLayoutEffect(()=>Na(y,s,D.current,T),[y]);const Y=g.useMemo(()=>{const ge={top:E,transform:P};return Object.assign(ge,C),ge},[E,P,C]),te=l&&y?.componentFromFramework,we=!l&&N!=null,Q=g.useMemo(()=>!!(y?.componentFromFramework&&ar(y.componentClass)),[y]),ve=g.useRef(!1);g.useEffect(()=>{ve.current=Q&&!!y&&!!n.get("reactiveCustomComponents")},[Q,y]);const Pe=()=>N?.map(ge=>g.createElement(wH,{cellCtrl:ge,editingCell:i?.isEditing(ge,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:ge.instanceId})),J=()=>{const ge=y.componentClass;return Q?g.createElement(ge,{...y.params}):g.createElement(ge,{...y.params,ref:T})};return g.createElement("div",{ref:W,role:"row",style:Y,"row-index":d,"row-id":p,"row-business-key":m},we?Pe():te?J():null)},Pv=g.memo(bH),xH=({name:e})=>{const{context:t,gos:s}=g.useContext(Vt),n=g.useMemo(()=>Ma(e),[e]),i=g.useRef(null),o=g.useRef(null),r=g.useRef(null),a=g.useRef([]),l=g.useRef([]),[c,d]=g.useState(()=>[]),u=!!s.get("enableCellSpan")&&!!n.getSpannedRowCtrls,p=g.useRef([]),f=g.useRef([]),[m,v]=g.useState(()=>[]),C=g.useRef(!1),w=g.useRef(),b=g.useMemo(()=>fs("ag-viewport",db(e)),[e]),x=g.useMemo(()=>fs(ub(e)),[e]),S=g.useMemo(()=>fs("ag-spanning-container",e5(e)),[e]),y=n.type==="center"||u,R=y?i:o;yi(" AG Row Container "+e+" ",R);const E=g.useCallback(()=>{const A=!y||i.current!=null,O=o.current!=null,G=!u||r.current!=null;return A&&O&&G},[]),F=g.useCallback(()=>i.current==null&&o.current==null&&r.current==null,[]),P=g.useCallback(()=>{if(F()&&(w.current=t.destroyBean(w.current)),!t.isDestroyed()&&E()){const A=L=>{const U=kc(l.current,a.current,C.current);U!==l.current&&(l.current=U,ba(L,()=>d(U)))},O=L=>{const U=kc(f.current,p.current,C.current);U!==f.current&&(f.current=U,ba(L,()=>v(U)))},G={setHorizontalScroll:L=>{i.current&&(i.current.scrollLeft=L)},setViewportHeight:L=>{i.current&&(i.current.style.height=L)},setRowCtrls:({rowCtrls:L,useFlushSync:U})=>{const B=!!U&&a.current.length>0&&L.length>0;a.current=L,A(B)},setSpannedRowCtrls:(L,U)=>{const B=!!U&&p.current.length>0&&L.length>0;p.current=L,O(B)},setDomOrder:L=>{C.current!=L&&(C.current=L,A(!1))},setContainerWidth:L=>{o.current&&(o.current.style.width=L)},setOffsetTop:L=>{o.current&&(o.current.style.transform=`translateY(${L})`)}};w.current=t.createBean(new d5(e)),w.current.setComp(G,o.current,r.current??void 0,i.current)}},[E,F]),k=g.useCallback(A=>{o.current=A,P()},[P]),D=g.useCallback(A=>{r.current=A,P()},[P]),T=g.useCallback(A=>{i.current=A,P()},[P]),I=()=>g.createElement("div",{className:x,ref:k,role:y?"presentation":"rowgroup"},c.map(A=>g.createElement(Pv,{rowCtrl:A,containerType:n.type,key:A.instanceId})));if(!y)return I();const H=()=>g.createElement("div",{className:S,ref:D,role:"presentation"},m.map(A=>g.createElement(Pv,{rowCtrl:A,containerType:n.type,key:A.instanceId})));return g.createElement("div",{className:b,ref:T,role:"rowgroup"},I(),u?H():null)},yH=g.memo(xH),SH=()=>{const e=g.useContext(Vt),{context:t,overlays:s}=e,[n,i]=g.useState(""),[o,r]=g.useState(0),[a,l]=g.useState(0),[c,d]=g.useState("0px"),[u,p]=g.useState("0px"),[f,m]=g.useState("100%"),[v,C]=g.useState("0px"),[w,b]=g.useState("0px"),[x,S]=g.useState("100%"),[y,R]=g.useState(!0),[E,F]=g.useState(!0),[P,k]=g.useState(null),[D,T]=g.useState(""),[I,H]=g.useState(null),[A,O]=g.useState("ag-layout-normal"),G=g.useRef();G.current||(G.current=new Pa(()=>L.current));const L=g.useRef(null),U=g.useRef(null),B=g.useRef(null),N=g.useRef(null),W=g.useRef(null),Y=g.useRef(null),te=g.useRef(null),we=g.useRef([]),Q=g.useRef([]);yi(" AG Grid Body ",L),yi(" AG Pinned Top ",U),yi(" AG Sticky Top ",B),yi(" AG Middle ",Y),yi(" AG Pinned Bottom ",te);const ve=g.useCallback(Ae=>{if(L.current=Ae,!Ae||t.isDestroyed()){we.current=t.destroyBeans(we.current);for(const ze of Q.current)ze();Q.current=[];return}const Ce=(ze,_e)=>{ze.appendChild(_e),Q.current.push(()=>_e.remove())},ke=ze=>{const _e=t.createBean(new ze);return we.current.push(_e),_e},qe=(ze,_e,Z)=>{Ce(ze,document.createComment(Z)),Ce(ze,ke(_e).getGui())};qe(Ae,jD," AG Fake Horizontal Scroll ");const ot=s?.getOverlayWrapperCompClass();ot&&qe(Ae,ot," AG Overlay Wrapper "),W.current&&qe(W.current,WD," AG Fake Vertical Scroll ");const Ve={setRowAnimationCssOnBodyViewport:i,setColumnCount:ze=>{L.current&&S3(L.current,ze)},setRowCount:ze=>{L.current&&x3(L.current,ze)},setTopHeight:r,setBottomHeight:l,setStickyTopHeight:d,setStickyTopTop:p,setStickyTopWidth:m,setTopInvisible:R,setBottomInvisible:F,setColumnMovingCss:(ze,_e)=>G.current.toggleCss(ze,_e),updateLayoutClasses:O,setAlwaysVerticalScrollClass:k,setPinnedTopBottomOverflowY:T,setCellSelectableCss:(ze,_e)=>H(_e?ze:null),setBodyViewportWidth:ze=>{Y.current&&(Y.current.style.width=ze)},registerBodyViewportResizeListener:ze=>{if(Y.current){const _e=xn(e,Y.current,ze);Q.current.push(()=>_e())}},setStickyBottomHeight:C,setStickyBottomBottom:b,setStickyBottomWidth:S,setGridRootRole:ze=>Ae.setAttribute("role",ze)},wt=t.createBean(new g5);we.current.push(wt),wt.setComp(Ve,Ae,Y.current,U.current,te.current,B.current,N.current)},[]),Pe=g.useMemo(()=>fs("ag-root","ag-unselectable",A),[A]),J=g.useMemo(()=>fs("ag-body-viewport",n,A,P,I),[n,A,P,I]),ge=g.useMemo(()=>fs("ag-body",A),[A]),V=g.useMemo(()=>fs("ag-floating-top",y?"ag-invisible":null,I),[I,y]),$=g.useMemo(()=>fs("ag-sticky-top",I),[I]),K=g.useMemo(()=>fs("ag-sticky-bottom",v==="0px"?"ag-invisible":null,I),[I,v]),ce=g.useMemo(()=>fs("ag-floating-bottom",E?"ag-invisible":null,I),[I,E]),q=g.useMemo(()=>({height:o,minHeight:o,overflowY:D}),[o,D]),ue=g.useMemo(()=>({height:c,top:u,width:f}),[c,u,f]),he=g.useMemo(()=>({height:v,bottom:w,width:x}),[v,w,x]),se=g.useMemo(()=>({height:a,minHeight:a,overflowY:D}),[a,D]),re=Ae=>g.createElement(yH,{name:Ae,key:`${Ae}-container`}),Oe=({section:Ae,children:Ce,className:ke,style:qe})=>g.createElement("div",{ref:Ae,className:ke,role:"presentation",style:qe},Ce.map(re));return g.createElement("div",{ref:ve,className:Pe},g.createElement(cH,null),Oe({section:U,className:V,style:q,children:["topLeft","topCenter","topRight","topFullWidth"]}),g.createElement("div",{className:ge,ref:W,role:"presentation"},Oe({section:Y,className:J,children:["left","center","right","fullWidth"]})),Oe({section:B,className:$,style:ue,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),Oe({section:N,className:K,style:he,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),Oe({section:te,className:ce,style:se,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))},RH=g.memo(SH),FH=(e,t)=>{const{children:s,eFocusableElement:n,onTabKeyDown:i,gridCtrl:o,forceFocusOutWhenTabGuardsAreEmpty:r,isEmpty:a}=e,{context:l}=g.useContext(Vt),c=g.useRef(null),d=g.useRef(null),u=g.useRef(),p=w=>{const b=w==null?void 0:parseInt(w,10).toString();for(const x of[c,d])b===void 0?x.current?.removeAttribute("tabindex"):x.current?.setAttribute("tabindex",b)};g.useImperativeHandle(t,()=>({forceFocusOutOfContainer(w){u.current?.forceFocusOutOfContainer(w)}}));const f=g.useCallback(()=>{const w=c.current,b=d.current;if(!w&&!b||l.isDestroyed()){u.current=l.destroyBean(u.current);return}if(w&&b){const x={setTabIndex:p};u.current=l.createBean(new DO({comp:x,eTopGuard:w,eBottomGuard:b,eFocusableElement:n,onTabKeyDown:i,forceFocusOutWhenTabGuardsAreEmpty:r,focusInnerElement:S=>o.focusInnerElement(S),isEmpty:a}))}},[]),m=g.useCallback(w=>{c.current=w,f()},[f]),v=g.useCallback(w=>{d.current=w,f()},[f]),C=w=>{const b=w==="top"?Vo.TAB_GUARD_TOP:Vo.TAB_GUARD_BOTTOM;return g.createElement("div",{className:`${Vo.TAB_GUARD} ${b}`,role:"presentation",ref:w==="top"?m:v})};return g.createElement(g.Fragment,null,C("top"),s,C("bottom"))},EH=g.forwardRef(FH),DH=g.memo(EH),PH=({context:e})=>{const[t,s]=g.useState(""),[n,i]=g.useState(""),[o,r]=g.useState(null),[a,l]=g.useState(null),[c,d]=g.useState(!1),[u,p]=g.useState(),f=g.useRef(),m=g.useRef(null),v=g.useRef(),[C,w]=g.useState(null),b=g.useRef(()=>{}),x=g.useRef(),S=g.useRef([]),y=g.useCallback(()=>{},[]);yi(" AG Grid ",m);const R=g.useCallback(T=>{if(m.current=T,f.current=T?e.createBean(new w5):e.destroyBean(f.current),!T||e.isDestroyed())return;const I=f.current;b.current=I.focusInnerElement.bind(I);const H={destroyGridUi:()=>{},setRtlClass:s,forceFocusOutOfContainer:A=>{if(!A&&x.current?.isDisplayed()){x.current.forceFocusOutOfContainer(A);return}v.current?.forceFocusOutOfContainer(A)},updateLayoutClasses:i,getFocusableContainers:()=>{const A=[],O=[],G=m.current?.querySelector(".ag-root");for(const U of S.current){if(!U.isDisplayed())continue;const B=U.getFocusableContainerName();if(B==="rowGroupToolbar"||B==="pivotToolbar"){A.push(U);continue}O.push(U)}const L=[...A];return G&&L.push({getGui:()=>G,getFocusableContainerName:()=>"gridBody"}),L.push(...O),L},setCursor:r,setUserSelect:l};I.setComp(H,T,T),d(!0)},[]);g.useEffect(()=>{const T=f.current,I=m.current;if(!u||!T||!C||!I||e.isDestroyed())return;const H=[];S.current=[],x.current=void 0;const{watermarkSelector:A,paginationSelector:O,sideBarSelector:G,statusBarSelector:L,gridHeaderDropZonesSelector:U}=T.getOptionalSelectors(),B=[];if(U){const W=e.createBean(new U.component),Y=W.getGui();I.insertAdjacentElement("afterbegin",Y),B.push(Y),H.push(W),S.current.push(...W.getFocusableContainers?.()??[])}if(G){const W=e.createBean(new G.component),Y=W.getGui(),te=C.querySelector(".ag-tab-guard-bottom");te&&(te.insertAdjacentElement("beforebegin",Y),B.push(Y)),H.push(W),S.current.push(W)}const N=W=>{const Y=e.createBean(new W),te=Y.getGui();return I.insertAdjacentElement("beforeend",te),B.push(te),H.push(Y),Y};if(L){const W=N(L.component);S.current.push(W)}if(O){const W=N(O.component);x.current=W,S.current.push(W)}return A&&N(A.component),()=>{e.destroyBeans(H),S.current=[],x.current=void 0;for(const W of B)W.remove()}},[u,C,e]);const E=g.useMemo(()=>fs("ag-root-wrapper",t,n),[t,n]),F=g.useMemo(()=>fs("ag-root-wrapper-body","ag-focus-managed",n),[n]),P=g.useMemo(()=>({userSelect:a??"",WebkitUserSelect:a??"",cursor:o??""}),[a,o]),k=g.useCallback(T=>{v.current=T,p(T!==null)},[]),D=g.useCallback(()=>!f.current?.isFocusable(),[]);return g.createElement("div",{ref:R,className:E,style:P,role:"presentation"},g.createElement("div",{className:F,ref:w,role:"presentation"},c&&C&&!e.isDestroyed()&&g.createElement(Vt.Provider,{value:e.getBeans()},g.createElement(DH,{ref:k,eFocusableElement:C,onTabKeyDown:y,gridCtrl:f.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:D},g.createElement(RH,null)))))},TH=g.memo(PH),kH=class extends _{postConstruct(){if(this.beans.colAutosize){const e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){const e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(t=>t.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(t=>!!t.eGui))}},IH=typeof window>"u"?g.useEffect:g.useLayoutEffect,cx={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},MH={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...cx},dx=new Set(Object.keys(MH)),AH=new Set(Object.keys(cx)),ux=e=>{const t=g.useContext(ZO),s=g.useContext(XO),n=g.useRef(),i=g.useRef(null),o=g.useRef(null),r=g.useRef([]),a=g.useRef([]),l=g.useRef(e),c=g.useRef(),d=g.useRef(),u=g.useRef(!1),[p,f]=g.useState(void 0),[,m]=g.useState(0),v=g.useRef(),C=y=>{const R=i.current?.classList,E=(F="")=>F.trim().split(/\s+/g).filter(Boolean);if(v.current!==y){for(const F of E(v.current))R?.contains(F)&&R.remove(F);for(const F of E(y))R?.contains(F)||R?.add(F);v.current=y}};IH(()=>{C(e.className)},[e.className]);const w=g.useCallback(y=>{if(i.current=y,C(e.className),!y){for(const A of r.current)A();r.current.length=0;return}const R=[...e.modules??[],...t??[]];s&&fw(R)?.setLicenseKey(s),o.current||(o.current=new YO(()=>m(A=>A+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),r.current.push(()=>{o.current?.destroy(),o.current=null}));const E=PF(e.gridOptions,e,Object.keys(e).filter(A=>!dx.has(A))),F=()=>{if(u.current){const A=()=>c.current?.shouldQueueUpdates()?void 0:a.current.shift();let O=A();for(;O;)O(),O=A()}},P=new HH(F);c.current=P;const k=new kH,D={providedBeanInstances:{frameworkCompWrapper:new NH(o.current,E),renderStatus:k},modules:R,frameworkOverrides:P,setThemeOnGridDiv:!0},T=A=>{f(A),A.createBean(k),r.current.push(()=>{A.destroy()}),A.getBean("ctrlsSvc").whenReady({addDestroyFunc:O=>{r.current.push(O)}},()=>{if(A.isDestroyed())return;const O=n.current;O&&e.passGridApi?.(O)})},I=A=>{A.getBean("ctrlsSvc").whenReady({addDestroyFunc:O=>{r.current.push(O)}},()=>{for(const O of a.current)O();a.current.length=0,u.current=!0})},H=new fM;E.gridId??(E.gridId=d.current),n.current=H.create(y,E,T,I,D),r.current.push(()=>{n.current=void 0}),n.current&&(d.current=n.current.getGridId())},[]),b=g.useMemo(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),x=g.useCallback(y=>{u.current&&!c.current?.shouldQueueUpdates()?y():a.current.push(y)},[]);g.useEffect(()=>{const y=LH(l.current,e);l.current=e,x(()=>{n.current&&TF(y,n.current)})},[e]);const S=!g.useSyncExternalStore||_l(e,"renderingMode")==="legacy"?"legacy":"default";return g.createElement("div",{style:b,ref:w},g.createElement(sx.Provider,{value:S},p&&!p.isDestroyed()?g.createElement(TH,{key:p.instanceId,context:p}):null,o.current?.getPortals()??null))};function LH(e,t){const s={};for(const n of Object.keys(t)){if(dx.has(n)){AH.has(n)&&X(274,{prop:n});continue}const i=t[n];e[n]!==i&&(s[n]=i)}return s}var NH=class extends EO{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){const s=this.gridOptions;if(_l(s,"reactiveCustomComponents")){const r=(a=>{switch(a){case"filter":return _l(s,"enableFilterHandlers")?VO:GO;case"floatingFilterComponent":return _l(s,"enableFilterHandlers")?WO:zO;case"dateComponent":return HO;case"dragAndDropImageComponent":return BO;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return OO;case"statusPanel":return $O;case"toolPanel":return qO;case"menuItem":return UO;case"cellRenderer":return NO;case"innerHeaderComponent":return _O}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":Ig();break}const i=!t.cellRenderer&&t.name!=="toolPanel";return new rx(e,this.parent,t,i)}},OH=g.forwardRef((e,t)=>{const s=g.useContext(Vt),{registry:n,context:i,gos:o,rowModel:r}=s,[a,l]=g.useState(()=>new bs),[c,d]=g.useState(()=>new bs),[u,p]=g.useState(),[f,m]=g.useState(),v=g.useRef(),C=g.useRef(null),w=g.useRef(),b=g.useMemo(()=>iF(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),x=g.useMemo(()=>a.toString()+" ag-details-row",[a]),S=g.useMemo(()=>c.toString()+" ag-details-grid",[c]);t&&g.useImperativeHandle(t,()=>({refresh(){return v.current?.refresh()??!1}})),e.template&&X(230);const y=g.useCallback(E=>{if(C.current=E,!E||i.isDestroyed()){v.current=i.destroyBean(v.current),w.current?.();return}const F={toggleCss:(k,D)=>l(T=>T.setClass(k,D)),toggleDetailGridCss:(k,D)=>d(T=>T.setClass(k,D)),setDetailGrid:k=>p(k),setRowData:k=>m(k),getGui:()=>C.current},P=n.createDynamicBean("detailCellRendererCtrl",!0);if(P&&(i.createBean(P),P.init(F,e),v.current=P,o.get("detailRowAutoHeight"))){const k=()=>{if(C.current==null)return;const D=C.current.clientHeight;D!=null&&D>0&&setTimeout(()=>{e.node.setRowHeight(D),(gt(o)||ir(o))&&r.onRowHeightChanged()},0)};w.current=xn(s,E,k),k()}},[]),R=g.useCallback(E=>{v.current?.registerDetailWithMaster(E)},[]);return g.createElement("div",{className:x,ref:y},u&&g.createElement(ux,{className:S,...u,modules:b,rowData:f,passGridApi:R}))}),HH=class extends g1{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:Rv,agGroupRowRenderer:Rv,agDetailCellRenderer:OH},this.wrapIncoming=(t,s)=>s==="ensureVisible"?TO(t):t()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;const t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return PO()}},BH=class extends g.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(const t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return g.createElement(ux,{...this.props,passGridApi:this.setGridApi})}},hx=(e=>(e.Dropdown="dropdown",e.Menu="menu",e))(hx||{}),Tt=(e=>(e.Click="click",e.Hover="hover",e.ContextMenu="contextMenu",e))(Tt||{}),Jn=(e=>(e.Item="item",e.Divider="divider",e.PlainText="plainText",e))(Jn||{});const GH=pe("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),VH=pe("z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none"),Qh=pe("flex w-full cursor-pointer items-center gap-3","focus-visible:border-none focus-visible:outline-none","hover:bg-accent-primary-alpha px-3","dial-small-text h-[34px] rounded text-primary"),Jh="opacity-75 !cursor-not-allowed",px="text-error",jH="my-1 border-t border-hover border-secondary",Ro=4,zH=h.jsx(z.IconChevronRight,{size:14}),Mg=({ariaLabel:e,className:t,size:s=24,onClose:n,...i})=>h.jsx(jc,{"aria-label":e,className:M(t,"w-auto h-auto"),onClick:n,icon:h.jsx(z.IconX,{size:s}),...i});function fd(e,t="menu",s=!1,n){const[i,o]=g.useState(!1),{refs:r,floatingStyles:a,context:l}=de.useFloating({placement:"right-start",open:i,onOpenChange:o,whileElementsMounted:de.autoUpdate,middleware:[de.offset({mainAxis:0,crossAxis:-4}),de.flip({padding:e}),de.shift({padding:e})]}),c=de.useHover(l,{enabled:!s,move:!1,delay:{open:80,close:80}}),d=de.useClick(l,{enabled:!s}),u=de.useDismiss(l,{bubbles:{escapeKey:!1,outsidePress:!0}}),p=de.useRole(l,{role:t}),{getReferenceProps:f,getFloatingProps:m}=de.useInteractions([c,d,u,p]);return{isOpen:i,refs:r,floatingStyles:a,context:l,getReferenceProps:f,getFloatingProps:m}}const WH="rounded bg-layer-0 shadow",md=({refs:e,floatingStyles:t,context:s,getFloatingProps:n,role:i,surfaceClassName:o,className:r,children:a})=>h.jsx(de.FloatingPortal,{children:h.jsx(de.FloatingFocusManager,{context:s,modal:!1,initialFocus:-1,returnFocus:!0,children:h.jsx("div",{ref:e.setFloating,style:t,role:i,className:pe("z-[53] overflow-auto text-primary focus-visible:outline-none",o??WH,r),...n(),children:a})})}),_H=({item:e,onRootClose:t})=>{const{isOpen:s,refs:n,floatingStyles:i,context:o,getReferenceProps:r,getFloatingProps:a}=fd(Ro,"menu",!!e.disabled),l=g.useCallback(c=>d=>{c.disabled||(c.onClick?.({key:c.key,domEvent:d}),t())},[t]);return h.jsxs(h.Fragment,{children:[h.jsxs("button",{ref:n.setReference,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":s,"aria-disabled":!!e.disabled,disabled:e.disabled,className:pe(Qh,e.disabled&&Jh,e.className),...r(),children:[e.icon&&h.jsx("span",{className:pe(e.disabled&&"text-secondary"),children:h.jsx(Le,{icon:e.icon})}),h.jsx("span",{className:pe("flex-1 truncate text-start",e.disabled&&"text-secondary"),children:e.label}),h.jsx("span",{className:pe("ml-auto shrink-0",e.disabled&&"text-secondary"),children:zH})]}),s&&h.jsx(md,{refs:n,floatingStyles:i,context:o,getFloatingProps:a,role:"menu",className:"w-max",children:h.jsx("div",{role:"none",className:"py-1",children:e.children.map(c=>h.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!c.disabled,disabled:c.disabled,className:pe(Qh,c.disabled&&Jh,c.danger&&px,c.className),onClick:l(c),children:[c.icon&&h.jsx("span",{className:pe(c.danger&&"text-error",c.disabled&&"text-secondary"),children:h.jsx(Le,{icon:c.icon})}),h.jsx("span",{className:pe("flex-1 truncate text-start",c.danger&&"text-error",c.disabled&&"text-secondary"),children:c.label})]},c.key))})})]})},UH=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,Gt=({children:e,items:t,onItemClick:s,menuHeader:n,menuFooter:i,renderOverlay:o,trigger:r=[Tt.Click],placement:a,disabled:l=!1,open:c,defaultOpen:d=!1,onOpenChange:u,closable:p=!1,onClose:f,className:m,overlayContentClassName:v,separatorClassName:C,listClassName:w,outsidePressIgnoreRef:b,outsideClosable:x=!0,allowedPlacements:S,anchorToMouse:y=!1,matchReferenceWidth:R=!0,maxDropdownHeight:E})=>{const[F,P]=g.useState(d),k=c!==void 0,D=k?!!c:F,T=g.useRef(null),I=g.useCallback(V=>{k||P(V),u?.(V)},[k,u]),H=g.useId(),A=a===void 0,{refs:O,floatingStyles:G,context:L}=de.useFloating({placement:a,open:D,onOpenChange:I,whileElementsMounted:de.autoUpdate,middleware:[de.offset({mainAxis:Ro,crossAxis:0}),A?de.autoPlacement({alignment:"start",crossAxis:!0,padding:Ro,allowedPlacements:S}):de.flip({padding:Ro}),de.shift({padding:Ro}),de.size({padding:Ro,apply({availableWidth:V,availableHeight:$,elements:K}){const ce=K.floating,q=UH(K.reference);ce.style.setProperty("--fui-available-height",`${Math.floor($)}px`),ce.style.setProperty("--reference-width",R?`${Math.round(q)}px`:"0px"),R?ce.style.minWidth=`${Math.round(q)}px`:ce.style.removeProperty("min-width"),ce.style.maxWidth=`${Math.floor(V)}px`;const ue=Math.floor($);ce.style.maxHeight=`${E?Math.min(ue,E):ue}px`}})]}),U=de.useClick(L,{enabled:r.includes(Tt.Click)&&!l}),B=de.useHover(L,{enabled:r.includes(Tt.Hover)&&!l,move:!1,restMs:40,delay:{open:80,close:80}}),N=de.useDismiss(L,{bubbles:!0,referencePress:!1,outsidePress:V=>{if(!x)return!1;const $=V.target;return!(b?.current&&$ instanceof Node&&b.current.contains($))}}),W=de.useRole(L,{role:"menu"}),{getReferenceProps:Y,getFloatingProps:te}=de.useInteractions([U,B,N,W]),we=g.useCallback((V,$)=>{O.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:V,y:$,top:$,left:V,right:V,bottom:$})})},[O]),Q=g.useCallback(V=>{!r.includes(Tt.ContextMenu)||l||(V.preventDefault(),y&&(we(V.clientX,V.clientY),T.current=document.elementFromPoint(V.clientX,V.clientY)),I(!0))},[y,l,I,we,r]),ve=g.useCallback(V=>{!y||l||(r.includes(Tt.ContextMenu)&&D&&I(!1),we(V.clientX,V.clientY),T.current=document.elementFromPoint(V.clientX,V.clientY))},[y,l,we,D,r,I]);g.useEffect(()=>{l&&D&&I(!1)},[l,D,I]);const Pe=g.useCallback(V=>$=>{V.disabled||(V.onClick?.({key:V.key,domEvent:$}),s?.({key:V.key,domEvent:$}),I(!1))},[s,I]),J=g.useMemo(()=>o?o():t?h.jsxs(h.Fragment,{children:[n&&h.jsx(h.Fragment,{children:typeof n=="function"?n():n}),h.jsx("div",{role:"none",className:M("py-1",v),"aria-label":"dropdown",children:t.map(V=>V.type===Jn.Divider?h.jsx("div",{role:"separator",className:M(jH,C)},V.key):V.type===Jn.PlainText?h.jsx("div",{className:M("px-3 py-2 text-secondary dial-caption-text",V.className),children:V.label},V.key):V.children?.length?h.jsx(_H,{item:V,onRootClose:()=>I(!1)},V.key):h.jsxs("button",{role:"menuitem",type:"button","aria-disabled":!!V.disabled,className:pe(Qh,V.disabled&&Jh,V.danger&&px,V.className),disabled:V.disabled,onClick:Pe(V),children:[V.icon&&h.jsx("span",{className:pe(V.danger&&"text-error",V.disabled&&"text-secondary"),children:h.jsx(Le,{icon:V.icon})}),h.jsx("span",{className:pe("flex-1 truncate text-start",V.danger&&"text-error",V.disabled&&"text-secondary"),"aria-labelledby":"item-text",children:V.label})]},V.key))}),i&&h.jsx(h.Fragment,{children:typeof i=="function"?i():i})]}):null,[Pe,t,i,n,o,I,v,C]),ge=Y({onContextMenu:Q,onMouseDown:ve});return g.useEffect(()=>{if(!D)return;const V=O.reference.current;let $=null;if(V instanceof Element?$=V:T.current instanceof Element&&($=T.current),!$)return;const K=new IntersectionObserver(([ce])=>{ce.isIntersecting||I(!1)},{root:null,threshold:0});return K.observe($),()=>K.disconnect()},[D,O.reference,I]),h.jsxs(h.Fragment,{children:[h.jsx("span",{ref:O.setReference,className:pe(GH,l&&"!cursor-not-allowed opacity-75",m),"aria-haspopup":"menu","aria-expanded":D,"aria-controls":H,...ge,children:e}),D&&h.jsx(de.FloatingPortal,{children:h.jsx(de.FloatingFocusManager,{context:L,modal:!1,initialFocus:-1,returnFocus:!0,children:h.jsxs("div",{id:H,ref:O.setFloating,style:G,className:pe(VH,!R&&"w-max",w),...te(),children:[p&&h.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:h.jsx(Mg,{ariaLabel:"Close dropdown",onClose:V=>{f?.(V),I(!1)}})}),J]})})})]})},Ag="en-US",Lg={year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},$H="text-primary",Uu=40,gx={minWidth:Uu,width:Uu,maxWidth:Uu},qH={cellClass:"ag-grid-no-checkbox",...gx},KH={...gx};var ea=(e=>(e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e))(ea||{});const YH=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0}),ZH=(e,t,s,n,i)=>{if(typeof e=="string"&&typeof t=="string"&&e&&t){const o=YH.compare(e,t);return o===0?0:o>0?1:-1}return e===t?0:e?t?e>t?1:-1:i?1:-1:i?-1:1},XH=e=>e?Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)):{},QH="h-full w-full",Tv=".ag-checkbox-input",$u={accentColor:"var(--bg-control-accent, var(--bg-accent-primary, #5C8DEA))",backgroundColor:"var(--bg-layer-raised, var(--bg-layer-3, #FCFCFC))",oddRowBackgroundColor:"var(--bg-layer-sunken, var(--bg-layer-2, #EEF1F7))",selectedRowBackgroundColor:"var(--controls-bg-accent-primary-alpha-active, var(--bg-accent-primary-alpha, #7DA4FF26))",borderColor:"var(--bg-layer-4, #D1DBEA)",rowBorder:"1px solid var(--stroke-tertiary, var(--stroke-primary, #6B7280))",rowHoverColor:"var(--controls-bg-accent-primary-alpha-active, var(--bg-accent-primary-alpha, #7DA4FF26))",borderRadius:3,browserColorScheme:"dark",chromeBackgroundColor:"var(--bg-layer-1, #E0E6F0)",foregroundColor:"var(--text-primary, #161B2D)",headerFontSize:14,headerFontWeight:600,headerTextColor:"var(--text-secondary, #6B7280)",spacing:4,wrapperBorderRadius:3,fontSize:14,fontFamily:"var(--theme-font, var(--font-inter))"},kv=40;var bi=(e=>(e.API="api",e.ROW_DATA_CHANGED="rowDataChanged",e.CHECKBOX_SELECTED="checkboxSelected",e))(bi||{});const JH=()=>{const[e,t]=g.useState(wf());return g.useEffect(()=>{const s=()=>t(wf());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e};function eB(e,t){let s=null;return(...n)=>{s&&clearTimeout(s),s=setTimeout(()=>e(...n),t)}}FO({testIdAttribute:"dataQA"});gw.registerModules([wO]);const Ng=({columnDefs:e,rowData:t,additionalGridOptions:s,getContextMenuItems:n,className:i,ariaLabel:o="Data grid",wrapCustomCellRenderers:r=!0,disabledRowIds:a,selectedRowIds:l,onSelectionChange:c,onGridApiChange:d,getRowId:u=R=>String(R.id??JSON.stringify(R)),alternateOddRowColors:p=!1,filterPlaceholder:f="Enter value",emptyStateIcon:m,emptyStateTitle:v="No results found",emptyStateDescription:C="Sorry, we couldn't find any results for your search.",loading:w=!1,wrapperBorder:b=!0,withoutHeaderBorders:x=!1,allowDisabledContextMenu:S=!1,selectionMode:y})=>{const[R,E]=g.useState(),F=g.useId(),P=Ea(),k=JH(),D=g.useRef(new Set),T=g.useRef(void 0),I=g.useMemo(()=>({...$u,oddRowBackgroundColor:p?$u.oddRowBackgroundColor:$u.backgroundColor,wrapperBorder:b}),[p,b]),H=g.useCallback(K=>{K.api.sizeColumnsToFit()},[]),A=g.useCallback(K=>{if(K.data){const ce=u(K.data),q=a?.has(ce)??!1,ue=q&&!S,he=K.value==null?"":String(K.value),se=n?.(K.data)??[];return h.jsx(Gt,{trigger:[Tt.ContextMenu],items:se,anchorToMouse:!0,matchReferenceWidth:!0,className:"w-full",disabled:ue,children:h.jsx("span",{className:"block min-w-0 h-full max-w-full",children:h.jsx(it,{text:he,className:"max-w-full h-full",hideTooltip:q})})})}},[n,a,u,S]),O=g.useCallback(K=>K===bi.API||K===bi.ROW_DATA_CHANGED,[]),G=g.useCallback(K=>{if(!R)return;const q=(K.selectedNodes||[]).map(he=>he.data),ue=new Set(q.map(u));D.current=ue,T.current=K.source,O(K.source)||c?.(ue,q)},[R,u,O,c]),L=g.useMemo(()=>eB(K=>G?.(K),100),[G]),U=g.useCallback(K=>{if(!K.data)return null;const ce=u(K.data),q=K.node.isSelected(),ue=a?.has(ce),he=`row-select-${ce}`;return h.jsx("div",{className:"size-6 flex items-center justify-center",children:h.jsx(Ei,{className:"size-[18px]",inputId:he,checked:q,disabled:ue,name:"gridradiobutton",value:"selected",onChange:()=>{ue||(K.node.setSelected(!0,!0,bi.CHECKBOX_SELECTED),K.api.refreshCells({columns:[K.column?.getColId()]}))}})})},[u,a]),B=g.useCallback(()=>{const K="dial-row-select",ce="dial-row-select-visible";return P||k||l&&l.size>0?`${K} ${ce}`:!l||l.size===0?K:`${K} ${ce}`},[P,k,l]),N=g.useCallback(()=>P||k?B():!l||l.size===0?"dial-row-not-select-header":B(),[B,P,k,l]),W=g.useMemo(()=>{if(y===ea.SINGLE)return{...qH,cellRenderer:U};if(y===ea.MULTIPLE)return{...KH,headerClass:()=>N(),cellClass:K=>{const ce=K.data?u(K.data):null;let q=B();return ce&&a?.has(ce)&&(q+=" opacity-50 pointer-events-none"),q}}},[y,U,N,u,B,a]),Y=g.useCallback(K=>{const ce=typeof r=="function"?r(K):!!r;if(!K.cellRenderer)return{...K,cellRenderer:A};if(!ce)return K;const q=K.cellRenderer;return{...K,cellRenderer:he=>{const se=he.data?n?.(he.data)??[]:[];let re=null;if(typeof q=="function"){const Ce=q;re=h.jsx(Ce,{...he})}else re=A(he);const Oe=he.data?u(he.data):null,Ae=Oe?a?.has(Oe):!1;return h.jsx(Gt,{trigger:[Tt.ContextMenu],items:se,anchorToMouse:!0,matchReferenceWidth:!0,className:pe("w-full h-full",Ae&&"!cursor-not-allowed opacity-75"),disabled:Ae&&!S,children:h.jsx("span",{className:"block min-w-0 max-w-full flex-1",children:re})})}}},[a,n,u,A,r,S]),te=g.useMemo(()=>r?(e??[]).map(Y):e??[],[e,r,r?Y:null]),{defaultColDef:we,...Q}=s??{},ve=g.useMemo(()=>({minWidth:150,resizable:!0,sortable:!0,floatingFilter:!0,filter:"agTextColumnFilter",filterParams:{filterPlaceholder:f,buttons:["reset"]},comparator:ZH,...XH(we)}),[f,we]),Pe=K=>{const ce=document.querySelector(Tv);ce&&ce.setAttribute("aria-description",ah);const q=te.map(ue=>({...ue,sort:void 0}));K.api.updateGridOptions({columnDefs:q,rowData:t}),K.api.sizeColumnsToFit(),E(K.api),s?.onGridReady?.(K),d?.(K.api)};g.useEffect(()=>{R&&t&&R.setGridOption("rowData",t)},[R,t]);const J=g.useCallback(()=>h.jsx(tr,{title:v,description:C,containerClassName:"gap-3",titleClassName:"mt-2 !text-lg",icon:m||h.jsx(z.IconZoomCancel,{size:100,stroke:.5,className:"text-secondary"})}),[v,C,m]),ge=g.useMemo(()=>{if(y)return{mode:y===ea.SINGLE?"singleRow":"multiRow",isRowSelectable:K=>{const ce=K.data?u(K.data):null;return ce?!a?.has(ce):!0}}},[a,u,y]);g.useEffect(()=>{R&&t&&D.current.size&&D.current.forEach(K=>{const ce=R.getRowNode(K);ce&&!ce.isSelected()&&ce.setSelected(!0,!1,bi.API)})},[R,t]),g.useEffect(()=>{R&&l&&(R.deselectAll("all",bi.API),l.forEach(K=>{const ce=R.getRowNode(K);ce&&!ce.isSelected()&&ce.setSelected(!0,!1,bi.API)}))},[R,l]);const V=g.useCallback(K=>K.data?u(K.data):"",[u]),$=g.useCallback(()=>{document.querySelectorAll(`.ag-row ${Tv}`).forEach(K=>{K.setAttribute("aria-description",ah)})},[]);return g.useEffect(()=>{const K=O(T.current);if(R&&l?.size&&K){const ce=Array.from(l)[0];if(ce){const q=R.getRowNode(ce);q&&R.ensureNodeVisible(q)}}},[R,O,l]),h.jsx("div",{className:pe(QH,i,y&&"with-selection-column",x&&"dial-without-header-borders"),"aria-label":o,role:"region","aria-busy":w,children:h.jsx("div",{className:"h-full overflow-x-auto",role:"table","aria-describedby":F,children:h.jsx(BH,{rowModelType:"clientSide",headerHeight:kv,rowHeight:kv,cellSelection:!1,theme:ST.withPart(eT).withParams({...I}),autoSizeStrategy:{type:"fitGridWidth"},columnDefs:te,defaultColDef:ve,selectionColumnDef:W,onGridSizeChanged:H,onGridReady:Pe,loading:w,suppressCellFocus:!0,suppressDragLeaveHidesColumns:!0,noRowsOverlayComponent:J,rowData:t,rowSelection:ge,onSelectionChanged:L,getRowId:V,onRowDataUpdated:$,onBodyScroll:$,onFirstDataRendered:$,...Q})})})};function vd(e){if(!e)return null;if(e instanceof Date)return isFinite(e.getTime())?e:null;if(typeof e=="number"){const t=new Date(e);return isFinite(t.getTime())?t:null}if(typeof e=="string"){const t=e.trim();if(/^-?\d+$/.test(t)){const n=Number(t);return vd(n)}const s=new Date(t);return isFinite(s.getTime())?s:null}return null}const Og=({value:e,locale:t=Ag,options:s=Lg,emptyPlaceholder:n,className:i,hideTooltip:o=!1})=>{const r=vd(e),a=g.useMemo(()=>r?new Intl.DateTimeFormat(t,s).format(r):n,[r,n,t,s]),l=r?r.toISOString():void 0;return h.jsx(it,{text:l?h.jsx("time",{dateTime:l,children:a}):h.jsx("span",{children:a}),className:pe($H,i),hideTooltip:o})};var Ic=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(Ic||{}),Li=(e=>(e.Default="default",e.Inline="inline",e))(Li||{}),xa=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(xa||{});const Ar=({tab:e,active:t,invalid:s,className:n,horizontal:i,view:o=Li.Default,onClick:r})=>{const a=o===Li.Inline,l=M("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small-text hover:text-accent-primary",{"border-b-2 px-4":i,"border-l-2 px-3":!i},{"bg-layer-4":i,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&i&&!e.disabled,"border-l-accent-primary":t&&!i&&!e.disabled}),c=M("flex flex-row gap-1 h-6 items-center py-1 px-2 rounded cursor-pointer hover:bg-accent-primary-alpha",t?"dial-small-semi-text":"dial-small-text",{"text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-secondary":!t&&!e.disabled}),d=M(a?c:l,n);return h.jsxs("button",{role:"tab","aria-selected":t,className:d,onClick:()=>r(e.id),disabled:e.disabled,children:[a&&t&&!e.disabled&&h.jsx(z.IconCheck,{size:Ne.SM}),h.jsx(it,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&h.jsx("div",{className:"text-error pl-1",children:h.jsx(z.IconExclamationCircle,{...ae})}),e.warning&&h.jsx("div",{className:"text-warning pl-1",children:h.jsx(z.IconAlertTriangle,{...ae})})]})},tB=()=>{const[e,t]=g.useState(()=>typeof window>"u"?Vn.Desktop:eu());return g.useEffect(()=>{t(eu());const s=()=>t(eu());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},sB=12,fx=({tabs:e,activeTab:t,onClick:s,className:n,orientation:i=Ic.Horizontal,view:o=Li.Default,screenThreshold:r=xa.Tablet,smallScreenContainerClassName:a,smallScreenDropdownItemClassName:l,desktopDropdownClassName:c,desktopTabClassName:d,inlineContainerClassName:u,inlineTabClassName:p})=>{const[f,m]=g.useState(!1),[v,C]=g.useState(!1),[w,b]=g.useState(!1),x=tB(),S=x===Vn.Mobile||r===xa.Tablet&&x===Vn.Tablet,y=i===Ic.Horizontal,R=g.useRef(null),E=g.useRef(null),F=g.useRef(null),P=e.find(H=>H.id===t),k=g.useMemo(()=>M("flex gap-2",y?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[y]),D=g.useCallback(()=>{const H=E.current;H&&b(H.scrollWidth>H.clientWidth)},[]),T=g.useCallback(()=>{const H=F.current,A=E.current;if(!H||!A)return;const O=H.getBoundingClientRect(),G=A.getBoundingClientRect();if(O.width===0||G.width===0)return;const L=sB;let U=A.scrollLeft;if(O.left<G.left+L)U-=G.left+L-O.left;else if(O.right>G.right-L)U+=O.right-(G.right-L);else return;const B=Math.max(0,A.scrollWidth-A.clientWidth);U=Math.max(0,Math.min(U,B)),U!==A.scrollLeft&&A.scrollTo({left:U,behavior:"smooth"})},[]),I=g.useCallback(H=>{s(H),H===t&&T()},[s,t,T]);return g.useEffect(()=>{D();const H=new ResizeObserver(()=>D()),A=E.current;return A&&H.observe(A),()=>H.disconnect()},[e,D]),g.useEffect(()=>{T()},[t,T]),o===Li.Inline?h.jsx("div",{role:"tablist",className:M("flex flex-row items-center gap-0.5 bg-layer-4 rounded w-fit p-0.5",u),children:e.map(H=>h.jsx(Ar,{tab:H,active:t===H.id,view:Li.Inline,onClick:I,className:p},H.id))}):S?h.jsx("div",{role:"tablist",className:M("h-11 flex items-center bg-layer-3 px-4",a),children:h.jsx(Gt,{trigger:[Tt.Click],open:f,onOpenChange:m,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(H=>h.jsx(Ar,{tab:H,active:H.id===t,onClick:A=>{I(A),m(!1)},className:M("w-full rounded-none h-11 items-center px-6",l)},H.id)),children:h.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[h.jsx(Ar,{tab:P,active:!0,onClick:I,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),h.jsx(Le,{icon:h.jsx(z.IconChevronDown,{size:Ne.SM}),className:M("text-primary transition-transform",f&&"rotate-180")})]})})}):h.jsxs("div",{ref:R,className:M("flex items-center",n),children:[h.jsx("div",{ref:E,role:"tablist",className:k,children:e.map(H=>h.jsx("div",{ref:t===H.id?F:void 0,className:"w-full",children:h.jsx(Ar,{tab:H,active:t===H.id,onClick:I,horizontal:y,className:M("w-full",d)})},H.id))}),w&&h.jsx("div",{className:"flex items-center ml-2",children:h.jsx(Gt,{trigger:[Tt.Click],open:v,onOpenChange:C,placement:"bottom-end",renderOverlay:()=>e.map(H=>h.jsx(Ar,{tab:H,active:H.id===t,onClick:A=>{I(A),C(!1)},className:"w-full rounded-none h-8 items-center px-3 py-2"},H.id)),children:h.jsx(Ks,{iconBefore:h.jsx(z.IconDotsVertical,{size:os}),className:M("w-8 h-8 flex items-center justify-center rounded border",v?"bg-layer-4 border-transparent":"border-primary",c)})})})]})},nB="w-full overflow-hidden",iB="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",mx="flex items-center gap-2 dial-small-text",qu={first:"shrink-0",middle:"shrink min-w-0 max-w-[30%]",last:"shrink min-w-0 max-w-[51%]"},Iv="flex flex-1 items-center gap-1 min-w-0 transition-colors",oB="text-secondary hover:text-accent-primary",rB="text-primary cursor-default",vx="flex-none inline-flex items-center leading-none text-secondary",aB="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",Cx=h.jsx(z.IconChevronRight,{size:Ne.SM,"aria-hidden":"true"}),jr=({label:e,href:t,onClick:s,disabled:n,isLast:i,isFirst:o,separator:r=Cx,className:a,iconBefore:l,labelClassName:c,onBeforeNavigate:d,...u})=>{const p=async b=>{if(d&&!i&&!await d()){b.preventDefault();return}s&&s(b)},f=i?qu.last:o?qu.first:qu.middle,m=M(mx,f,a),v=(!!t||!!s)&&!i&&!n,C=v?M(Iv,oB):M(Iv,rB,n?"pointer-events-none opacity-75":""),w=typeof e=="string"?h.jsx(it,{className:M("cursor-pointer",c),text:e,id:"breadcrumb-item-content"}):h.jsx("span",{className:M("flex-1 min-w-0 truncate cursor-pointer max-w-[300px]",c),"aria-label":"breadcrumb-item-content",children:e});return h.jsxs("li",{...u,className:m,"aria-label":u["aria-label"]||"breadcrumb-item",children:[v?h.jsxs("a",{href:t,onClick:p,className:C,children:[l,w]}):h.jsxs("span",{className:C,"aria-current":i?"page":void 0,"aria-disabled":n?"true":void 0,children:[l,w]}),!i&&h.jsx("span",{className:vx,"aria-label":"separator",children:r})]})},Hg=({pathItems:e,separator:t=Cx,ariaLabel:s="Breadcrumb",className:n,children:i,labelClassName:o,onBeforeNavigate:r})=>{const a=g.useMemo(()=>e?.length?e:g.Children.toArray(i).filter(g.isValidElement).map(d=>{const u=d.props,{labelClassName:p,isLast:f,separator:m,...v}=u;return v}),[e,i]),l=g.useCallback(async d=>{const u=parseInt(d.key,10),p=a[u];if(r&&!await r()){d.domEvent.preventDefault();return}p.onClick?p.onClick(d.domEvent):p.href&&(window.location.href=p.href)},[a,r]),c=g.useMemo(()=>{if(a.length===0)return null;if(a.length<=3)return a.map((v,C)=>g.createElement(jr,{...v,key:`item-${C}`,isFirst:C===0&&a.length>1,isLast:C===a.length-1,separator:t,labelClassName:o,onBeforeNavigate:r}));const d=a.at(0),u=a.slice(1,-2),p=a.at(-2),f=a.at(-1);if(!d||!p||!f)return null;const m=u.map((v,C)=>({key:String(C+1),label:typeof v.label=="string"?v.label:`Item ${C+1}`,disabled:v.disabled}));return h.jsxs(h.Fragment,{children:[g.createElement(jr,{...d,key:"item-0",isFirst:!0,separator:t,labelClassName:o,onBeforeNavigate:r}),h.jsxs("li",{className:M(mx,"shrink-0"),children:[h.jsx(Gt,{items:m,onItemClick:l,placement:"bottom-start",matchReferenceWidth:!1,children:h.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:aB,children:h.jsx(z.IconDots,{size:Ne.SM})})}),h.jsx("span",{className:vx,children:t})]}),g.createElement(jr,{...p,key:`item-${a.length-2}`,separator:t,labelClassName:o,onBeforeNavigate:r}),g.createElement(jr,{...f,key:`item-${a.length-1}`,isLast:!0,separator:t,labelClassName:o,onBeforeNavigate:r})]})},[a,t,o,l,r]);return h.jsx("nav",{"aria-label":s,className:M(nB,n),children:h.jsx("ol",{className:iB,children:c})})},Bg=(e,t)=>({appearance:n,...i})=>h.jsx(Ks,{...i,variant:e,appearance:n||t}),wx=(e,t)=>({variant:n,...i})=>h.jsx(Ks,{...i,variant:n||t,appearance:e}),zs=Bg(Me.Primary,ye.Solid),qs=Bg(Me.Neutral,ye.Outlined),bx=Bg(Me.Danger,ye.Outlined),lB=wx(ye.Link,Me.Primary),Gg=wx(ye.Ghost,Me.Primary),Cd=({iconClassName:e,label:t,...s})=>t?h.jsx(bx,{...s,label:t,appearance:ye.Ghost,iconBefore:h.jsx(z.IconTrashX,{...ae,className:e||""})}):h.jsx(DC,{...s,appearance:ye.Ghost,icon:h.jsx(z.IconTrashX,{...ae,className:e||""})}),cB=({className:e="",value:t,onChange:s,error:n,containerClassName:i,resize:o=!1,labelProps:r,caption:a,id:l,...c})=>{const d=M("dial-textarea dial-input px-3 py-2",c.invalid&&"dial-input-error",c.disabled&&"dial-input-disable",o?"resize":"resize-none",e);return h.jsxs("div",{className:M("flex flex-col gap-y-1",i),children:[r&&h.jsx(si,{...r,htmlFor:l}),h.jsx("textarea",{id:l,value:t||"",className:d,onChange:u=>s?.(u.currentTarget.value),...c}),h.jsx(Ht,{text:n}),!n&&h.jsx(Fa,{text:a})]})},wd=({label:e,switchId:t,isOn:s=!1,disabled:n,onChange:i,caption:o})=>{const r=pe("flex shrink-0 w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",s?"flex-row-reverse":"flex-row",n?"pointer-events-none":"",n?s?"bg-controls-disable":"bg-layer-4":s?"bg-accent-primary":"bg-layer-4"),a=g.useCallback(l=>{l.stopPropagation(),i?.(!s)},[i,s]);return h.jsxs("div",{className:"flex flex-row items-start",role:"switch",children:[h.jsx("input",{type:"checkbox",onChange:a,id:t,disabled:n,className:"invisible size-0",checked:s}),h.jsx("label",{htmlFor:t,className:r,"aria-describedby":o&&"caption",children:h.jsx("span",{className:pe("size-3 rounded-full",n?"bg-controls-disable-accent":"bg-controls-enable-primary")})}),(e||o)&&h.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[e&&h.jsx("span",{className:pe("dial-small-text py-[1px]",n?"text-secondary":"text-primary"),"aria-label":"switch-title",children:e}),o&&h.jsx("span",{id:"caption",className:"dial-tiny-text text-secondary",children:o})]})]})},dB="inline-flex items-center rounded bg-layer-3",uB="flex flex-1 items-center justify-center gap-2 h-7 px-3 py-1 border border-primary dial-small-text whitespace-nowrap focus-visible:outline outline-offset-0 focus-visible:relative focus-visible:z-10",hB="relative z-10 bg-controls-accent-primary-alpha-active text-primary",pB="text-secondary hover:text-primary",gB="text-controls-disable-accent cursor-not-allowed hover:text-controls-disable-accent",fB=({options:e,value:t,onChange:s,disabled:n,className:i,ariaLabel:o})=>{const r=g.useCallback(a=>{if(n)return;const l=e.filter(p=>!p.disabled);if(l.length===0)return;const c=l.findIndex(p=>p.value===t);let d=null;switch(a.key){case"ArrowRight":case"ArrowDown":d=(c+1)%l.length;break;case"ArrowLeft":case"ArrowUp":d=(c-1+l.length)%l.length;break;case"Home":d=0;break;case"End":d=l.length-1;break;default:return}a.preventDefault();const u=l[d];u&&u.value!==t&&s(u.value)},[n,e,t,s]);return h.jsx("div",{role:"tablist","aria-label":o,className:M(dB,i),children:e.map((a,l)=>{const c=a.value===t,d=l===0,u=l===e.length-1,p=n||a.disabled;return h.jsxs("button",{type:"button",role:"tab","aria-selected":c,tabIndex:c?0:-1,disabled:p,onClick:()=>s(a.value),onKeyDown:r,className:M(uB,!u&&"-mr-px",d&&"rounded-l",u&&"rounded-r",c?hB:pB,p&&gB),children:[a.icon,a.label]},a.value)})})};var It=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(It||{});const mB="z-[52] flex items-center justify-center bg-blackout md:p-4",Mv="divide-tertiary divide-y",vB="flex flex-row justify-between py-4 px-6 items-center",CB={[It.Sm]:"dial-sm-popup",[It.Md]:"dial-md-popup",[It.Lg]:"dial-lg-popup"},eo=({open:e=!1,header:t,portalId:s,className:n,overlayClassName:i,titleClassName:o,headerClassName:r,dividers:a=!0,dividerFooter:l=!0,children:c,footer:d,onClose:u,size:p=It.Md,hideClose:f=!1,closeOnOutsideClick:m=!0,preventKeyboardOnOpen:v=!1})=>{const C=g.useRef(null),{refs:w,context:b}=de.useFloating({open:e,onOpenChange:F=>{F||u?.(null)}}),x=de.useRole(b,{role:"dialog"}),S=de.useDismiss(b,{outsidePress:m}),{getFloatingProps:y}=de.useInteractions([x,S]);if(!e)return null;const R=typeof t=="string"?"dial-popup-heading":void 0,E=F=>F?typeof F=="string"?h.jsx("h3",{id:R,className:pe("flex-1 min-w-0 mr-3 truncate dial-h3-text text-primary",o),children:h.jsx(ct,{tooltip:F,children:F})}):F:h.jsx("span",{});return h.jsx(de.FloatingPortal,{id:s,children:h.jsx(de.FloatingOverlay,{className:pe(mB,i),children:h.jsx(de.FloatingFocusManager,{context:b,initialFocus:v?C:w.floating,children:h.jsxs("div",{ref:w.setFloating,...y(),role:"dialog","aria-modal":"true","aria-labelledby":R,className:pe("dial-popup",CB[p],a&&Mv,n),children:[v&&h.jsx("div",{ref:C,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),h.jsxs("div",{className:M(vB,r),children:[E(t),!f&&h.jsx(Mg,{size:Ne.SM,ariaLabel:"Close dialog",onClose:F=>u?.(F)})]}),h.jsx("div",{className:"grow overflow-auto","aria-label":"popup-description",children:c}),l&&!d&&h.jsx("div",{className:Mv}),d]})})})})};var mn=(e=>(e.Info="info",e.Danger="danger",e))(mn||{});const wB="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",bB="text-secondary dial-small-text px-6 pb-4",xB="Cancel",yB="Ok",Ku={[mn.Info]:{confirm:{variant:Me.Primary,appearance:ye.Solid},cancel:{variant:Me.Neutral,appearance:ye.Outlined}},[mn.Danger]:{container:"dial-danger-popup",confirm:{variant:Me.Danger,appearance:ye.Solid},cancel:{variant:Me.Neutral,appearance:ye.Outlined}}},xx=({header:e,description:t,descriptionClassName:s,open:n=!1,confirmLabel:i=yB,cancelLabel:o=xB,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:p,children:f,dividers:m=!1,variant:v=mn.Info,size:C=It.Sm,footer:w,hideClose:b})=>{const x=r?null:h.jsxs("div",{className:wB,children:[h.jsx(qs,{label:o,onClick:()=>p?p():d?.()}),h.jsx(Ks,{variant:Ku[v].confirm?.variant,appearance:Ku[v].confirm?.appearance,className:c,label:i,disabled:a,onClick:()=>u()})]}),S=g.useCallback(()=>r?h.jsx("div",{className:"px-6 py-4 h-[120px]",children:h.jsx(bn,{size:40})}):f??(t?h.jsx("div",{className:pe(bB,s),children:t}):null),[f,t,r,s]);return h.jsx(eo,{open:n,header:e,className:pe(Ku[v].container,l),dividers:m,onClose:()=>d?.(),footer:w??x,size:C,hideClose:b??(!r&&w===void 0),children:S()})},Yu=8,SB=24,yx=({initialTags:e=[],label:t,required:s,elementId:n,placeholder:i,captionDescription:o,errorText:r,invalid:a,disabled:l,collapseTagOverflow:c=!1,readOnly:d=!1,containerClassName:u,tagClassName:p,onChange:f})=>{const m=g.useRef(null),v=g.useRef([]),C=g.useRef(null),[w,b]=g.useState(e),[x,S]=g.useState(""),[y,R]=g.useState(!1),[E,F]=g.useState(e.length),P=g.useCallback(G=>L=>{v.current[G]=L},[]),k=g.useCallback(()=>{if(!c)return;const G=m.current;if(!G)return;const L=G.offsetWidth;if(L===0)return;const U=C.current?.offsetWidth??0,N=L-(d?0:SB)-Yu;let W=0,Y=0;for(let te=0;te<w.length;te++){const we=v.current[te];if(!we)continue;const Q=we.offsetWidth+Yu;if(W+Q>N)break;W+=Q,Y++}if(Y<w.length&&Y>0)for(;W+U>N&&Y>0;){Y--;const te=v.current[Y]?.offsetWidth??0;W-=te+Yu}F(Y)},[c,d,w.length]),D=G=>{const L=G.trim().replace(/,$/,"");if(L&&!w.includes(L)){const U=[L,...w];b(U),f?.(U)}},T=G=>{(G.key===","||G.key==="Enter")&&(G.preventDefault(),D(x),S(""))},I=()=>{x.trim()&&(D(x),S(""))},H=G=>{const L=w.filter((U,B)=>B!==G);b(L),f?.(L)},A=()=>r?h.jsx(Ht,{text:r}):o?h.jsx(Fa,{text:o}):null;g.useEffect(()=>{if(c)return;const G=new ResizeObserver(()=>{if(m.current){const L=m.current.scrollHeight>m.current.clientHeight+10;R(L)}});return m.current&&G.observe(m.current),()=>G.disconnect()},[w,c]),g.useEffect(()=>{if(!c){F(w.length);return}F(w.length);const G=new ResizeObserver(()=>{k()}),L=m.current;return L&&G.observe(L),k(),()=>G.disconnect()},[c,k,w]),g.useEffect(()=>{b(e)},[JSON.stringify(e)]);const O=h.jsxs("div",{ref:m,className:pe("flex gap-2 items-center relative",c?"flex-nowrap overflow-hidden w-full min-w-0":pe("flex-wrap",y?"flex-col-reverse":"flex-row"),u),children:[(c?w.slice(0,E):w).map((G,L)=>h.jsx(jn,{label:G,className:p,closable:!l&&!d,onRemove:!l&&!d?()=>H(L):void 0},G+L)),c&&E<w.length&&h.jsx(ct,{tooltip:w.slice(E).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:h.jsx(jn,{label:`+${w.length-E}`})}),!d&&h.jsx("input",{id:n,type:"text",value:x,onChange:G=>S(G.target.value),onKeyDown:T,onBlur:I,className:pe("dial-input outline-none !border-none w-full flex-1 !p-1 !h-auto",c?"min-w-0":"min-w-[100px]"),placeholder:i??"",disabled:l}),c&&h.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[w.map((G,L)=>h.jsx("div",{ref:P(L),className:"inline-flex shrink-0",children:h.jsx(jn,{label:G,className:p,closable:!l&&!d,onRemove:!l&&!d?()=>H(L):void 0})},`measure-${G}-${L}`)),h.jsx("div",{ref:C,className:"inline-flex shrink-0",children:h.jsx(jn,{label:`+${w.length}`})})]})]});return d?O:h.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h.jsx(si,{label:t,required:s,htmlFor:n}),h.jsx("div",{className:pe("dial-input min-h-[38px] p-[6px]",a&&"dial-input-error",l&&"dial-input-disable"),children:O}),A()]})},Sx=({selectedItems:e,placeholder:t,collapseTagOverflow:s=!1,listClassName:n,listElementClassName:i})=>e?.length?h.jsx(yx,{readOnly:!0,initialTags:e,collapseTagOverflow:s,containerClassName:n,tagClassName:i}):t?h.jsx("span",{className:"text-secondary",children:t}):null,Zu=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),Rx=({children:e,open:t,disabled:s=!1,selectedValue:n,valueClassName:i,inputClassName:o,onOpen:r,elementId:a,errorText:l,invalid:c,emptyValueText:d,placeholder:u,editable:p=!1,onValueChange:f,collapseTagOverflow:m=!1,iconBefore:v})=>{const C=Array.isArray(n)&&n.length>0,w=typeof n=="string"&&!!n.trim(),b=C||w?n:u?void 0:d,x=s?void 0:r,S=g.useCallback(F=>{f?.(F.target.value)},[f]),y=()=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:pe("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",o,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[h.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&h.jsx(Le,{icon:v}),h.jsx("input",{type:"text",className:pe("flex-1 min-w-0 bg-transparent outline-none border-none p-0 dial-small-text text-primary placeholder:text-secondary",i),value:typeof n=="string"?n:"",placeholder:u||d,onChange:S,disabled:s,id:a,"aria-label":"input-popup-field"})]}),!s&&h.jsx("button",{type:"button",className:"shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",onClick:r,"aria-label":"open-popup",children:h.jsx(Le,{icon:h.jsx(Zu,{role:"img",width:os,height:os})})})]}),h.jsx(Ht,{text:l})]}),R=()=>h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",className:"w-full",onClick:x,"aria-label":"open-popup",id:a,children:h.jsxs("div",{className:pe("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",o,s&&"dial-input-disable",(l||c)&&"dial-input-error"),children:[h.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&h.jsx(Le,{icon:v}),h.jsx(ct,{tooltip:b==null?void 0:String(b),children:b||!u?h.jsx("span",{className:i,children:b}):h.jsx("span",{className:"text-secondary",children:u})})]}),!s&&h.jsx("div",{className:"shrink-0",children:h.jsx(Le,{icon:h.jsx(Zu,{role:"img",width:os,height:os})})})]})}),h.jsx(Ht,{text:l})]}),E=()=>h.jsx("div",{className:"w-full",onClick:x,children:h.jsxs("div",{className:pe("dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[h.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[v&&h.jsx(Le,{icon:v}),h.jsx(Sx,{placeholder:u,selectedItems:b,collapseTagOverflow:m})]}),!s&&h.jsx("div",{className:"ml-1",children:h.jsx(Le,{icon:h.jsx(Zu,{role:"img",width:os,height:os})})})]})});return h.jsxs(h.Fragment,{children:[C?E():p?y():R(),t&&Jo.createPortal(e,document.body)]})},RB=({label:e,htmlFor:t,disabled:s,selectedValue:n,radioButtons:i,customInputValue:o,valueClassName:r,inputClassName:a,emptyValueText:l,placeholder:c,onClose:d,header:u,portalId:p,onApply:f,onCancel:m,cancelButtonTitle:v="Cancel",applyButtonTitle:C="Apply",isValid:w,selectedRadioValue:b,onChangeRadioField:x,id:S,size:y=It.Md})=>{const[R,E]=g.useState(!1),F=g.useCallback(()=>{s||E(!0)},[s]),P=g.useCallback(()=>{E(!1),d?.()},[d]),k=g.useCallback(()=>{m?.(),P()},[m,P]),D=g.useCallback(()=>{f(),P()},[f,P]);return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(si,{label:e,htmlFor:t}),h.jsx(Rx,{disabled:s,open:R,selectedValue:o??i.find(T=>T.id===n)?.name,valueClassName:r,inputClassName:pe(a,"py-2","px-3"),emptyValueText:l,placeholder:c,onOpen:F,children:h.jsx(eo,{open:R,onClose:k,header:u,portalId:p,size:y,footer:h.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[h.jsx(qs,{label:v,onClick:k}),h.jsx(zs,{label:C,onClick:D,disabled:!w})]}),children:h.jsx("div",{className:"px-6 py-4",children:h.jsx(sc,{radioButtons:i,labelClassName:"dial-small-text",activeRadioButton:b,onChange:x,elementId:S,orientation:Oi.Column})})})})]})},FB="Create",EB="Cancel",DB="flex items-center justify-end gap-2 px-6 py-3",PB=({header:e,open:t=!1,submitLabel:s=FB,cancelLabel:n=EB,isLoading:i=!1,disableSubmitButton:o=!1,className:r,submitClassName:a,onClose:l,onSubmit:c,onCancel:d,children:u,dividers:p=!0,size:f=It.Md,footer:m})=>{const v=i?null:h.jsxs("div",{className:DB,children:[h.jsx(qs,{label:n,onClick:()=>d?d():l?.()}),h.jsx(zs,{className:a,label:s,disabled:o,onClick:()=>c()})]}),C=g.useCallback(()=>i?h.jsx("div",{className:"px-6 py-4 h-[120px]",children:h.jsx(bn,{size:50})}):u??null,[u,i]);return h.jsx(eo,{open:t,header:e,className:r,dividers:p,onClose:()=>l?.(),footer:m??v,size:f,children:C()})},TB="bg-layer-4 flex items-center justify-center enabled:text-secondary enabled:hover:text-accent-primary enabled:active:bg-controls-accent-primary-alpha-active enabled:hover:bg-accent-primary-alpha enabled:active:text-accent-primary",kB=({icon:e,onClick:t,disabled:s,size:n=me.Standard,className:i})=>h.jsx("div",{className:pe("border-l border-tertiary",n===me.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:h.jsx(hn,{className:pe(TB,n===me.Small&&"p-1",i),icon:e,onClick:t,disabled:s,size:n})}),IB=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],Fx=(e,t,s,n)=>{if((t==="number"||s!==void 0||n!==void 0)&&!IB.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||n!==void 0){const o=e.currentTarget.value,r=e.currentTarget.selectionStart||0,a=o.slice(0,r)+e.key+o.slice(r),l=parseFloat(a);if(!isNaN(l)){if(s!==void 0&&l<+s){e.preventDefault();return}if(n!==void 0&&l>+n){e.preventDefault();return}}}}},vn=({labelProps:e,error:t,caption:s,id:n,containerClassName:i,...o})=>h.jsxs("div",{className:M("flex flex-col gap-y-3",i),children:[e&&h.jsx(si,{...e,htmlFor:n}),h.jsx(Ex,{id:n,...o}),h.jsx(Ht,{text:t}),!t&&h.jsx(Fa,{text:s})]}),Ex=({invalid:e,disabled:t,prefix:s,className:n,postfix:i,iconBefore:o,iconAfter:r,wrapperClassName:a,type:l,inputRef:c,value:d,tooltipText:u,min:p,onChange:f,max:m,inputButtonProps:v,...C})=>{const w=g.useRef(null),b=de.useMergeRefs([c,w]),x=l==="number"||p!==void 0||m!==void 0;g.useEffect(()=>{const E=w.current;if(!E||!x||t)return;const F=P=>{P.preventDefault()};return E.addEventListener("wheel",F,{passive:!1}),()=>{E.removeEventListener("wheel",F)}},[t,x,l]);const S=E=>{Fx(E,l,p,m)},y=E=>{const F=E.currentTarget.value;if(x&&F!==""){const P=parseFloat(F);if(isNaN(P)&&F!=="-"&&F!=="."||!isNaN(P)&&(p!==void 0&&P<+p||m!==void 0&&P>+m))return}f?.(F||void 0)},R=()=>h.jsxs("div",{className:M("dial-input flex flex-row items-center gap-x-2 justify-between py-2",e&&"dial-input-error",t&&"dial-input-disable",!s&&"pl-3",!v&&"pr-3",a),"aria-label":"input-container",children:[s&&h.jsx("div",{className:"border-r border-tertiary",children:h.jsx(Ex,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),h.jsx(Le,{icon:o}),h.jsx("input",{ref:b,type:l,autoComplete:l==="password"?"new-password":"off",value:d??"",className:M("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",n),onChange:y,onKeyDown:S,min:p,disabled:t,max:m,...C}),i&&h.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",i]}),h.jsx(Le,{icon:r}),v&&h.jsx(kB,{...v,disabled:t})]});return t&&l!=="password"?h.jsx(ct,{tooltip:u||d,children:R()}):R()},MB=/^0+\.(\d+)?$/,AB=/^0+/,ep=({integer:e,onChange:t,min:s,max:n,onKeyDown:i,onPaste:o,...r})=>{const a=d=>!d||d==="-"?d:String(d)?.match(MB)?String(d)?.replace(AB,"0"):Number(d),l=d=>{if([".","-","+","e","E"].includes(d.key)){d.preventDefault();return}Fx(d,"number",s,n)},c=d=>{const u=d.clipboardData.getData("text"),p=u.replace(/\D/g,"");if(p!==u&&(d.preventDefault(),p)){const f=d.currentTarget,m=f.selectionStart??0,v=f.selectionEnd??0,C=f.value.slice(0,m)+p+f.value.slice(v);t?.(a(C))}};return h.jsx(vn,{type:"number",min:s,max:n,onChange:d=>t?.(a(d)),onKeyDown:e?l:i,onPaste:e?c:o,...r})},LB=({onClick:e})=>h.jsx(z.IconEyeOff,{...ae,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),NB=({onClick:e})=>h.jsx(z.IconEye,{...ae,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),Dx=({...e})=>{const[t,s]=g.useState(!1),n=g.useCallback(i=>{s(i)},[]);return h.jsx(vn,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?h.jsx(LB,{onClick:()=>n(!1)}):h.jsx(NB,{onClick:()=>n(!0)})})},Px={[me.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[me.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5},[me.Large]:{className:"",wrapperClassName:"",containerClassName:"",iconSize:0,iconStroke:0}},Vg=({size:e=me.Standard,placeholder:t="Search...",value:s,onChange:n,withoutBorder:i,...o})=>{const[r,a]=g.useState(s||"");g.useEffect(()=>{a(s||"")},[s]);const l=g.useCallback(p=>{a(p||""),n?.(p||"")},[n]),c=Px[e],d=g.useCallback(()=>{l("")},[l]),u=g.useMemo(()=>{if(r)return{icon:h.jsx(z.IconX,{size:c.iconSize,"aria-label":"Clear search",role:"button"}),className:i?"bg-transparent":"",onClick:d,size:e}},[d,r,e,c.iconSize,i]);return h.jsx(vn,{placeholder:t,iconBefore:h.jsx(z.IconSearch,{size:c.iconSize,stroke:c.iconStroke}),value:r,onChange:l,inputButtonProps:u,containerClassName:c.containerClassName,className:c.className,wrapperClassName:M(c.wrapperClassName,i?"!border-0 ps-5 [&>div]:!border-0":""),...o})},Tx=({options:e,selectedValues:t,handleRemoveTag:s})=>h.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(n=>{const i=e.find(r=>r.value===n)?.label??n,o=e.find(r=>r.value===n)?.icon;return h.jsx(jn,{label:i,onRemove:r=>s?.(r,n),icon:o?h.jsx(Le,{icon:o}):null,className:"max-w-full"},n)})});var Mc=(e=>(e.Sm="sm",e.Md="md",e))(Mc||{}),Ac=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(Ac||{});const OB="dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer",HB="w-full rounded flex flex-col",ta="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none",BB="bg-accent-primary-alpha",tp="bg-accent-primary-alpha border-l border-accent-primary border-1",Lc="opacity-75",GB=352,VB=4,jB=h.jsx(z.IconChevronDown,{size:Ne.SM}),zB=({opt:e,selectedValues:t,onSelect:s})=>{const{isOpen:n,refs:i,floatingStyles:o,context:r,getReferenceProps:a,getFloatingProps:l}=fd(VB,"listbox",!!e.disabled),c=e.children?.some(d=>t.includes(d.value));return h.jsxs(h.Fragment,{children:[h.jsxs("button",{ref:i.setReference,type:"button",role:"option","aria-haspopup":"listbox","aria-expanded":n,"aria-selected":!!c,"aria-disabled":!!e.disabled,disabled:e.disabled,className:pe(ta,c&&tp,e.disabled&&Lc),...a(),children:[h.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[e.icon&&h.jsx(Le,{icon:e.icon}),h.jsx(it,{text:e.labelNode??e.label})]}),h.jsx(z.IconChevronRight,{size:14,className:"shrink-0"})]}),n&&h.jsx(md,{refs:i,floatingStyles:o,context:r,getFloatingProps:l,role:"listbox",className:"w-max py-1",children:e.children.map(d=>{const u=t.includes(d.value);return h.jsx("button",{type:"button",role:"option","aria-selected":u,"aria-disabled":!!d.disabled,disabled:d.disabled,className:pe(ta,u&&tp,d.disabled&&Lc),onClick:()=>!d.disabled&&s(d.value),children:h.jsxs("div",{className:"flex items-center gap-2 w-full",children:[d.icon&&h.jsx(Le,{icon:d.icon}),h.jsx(it,{text:d.labelNode??d.label})]})},d.value)})})]})},ei=({options:e,multiple:t=!1,elementId:s,value:n,defaultValue:i,variant:o=Ac.Primary,size:r=Mc.Md,prefix:a,customSelectedValue:l,placeholder:c="Select...",searchable:d=!1,searchSize:u=me.Standard,searchPlaceholder:p,selectAll:f=!1,invalid:m,selectAllLabel:v="Select all",emptyStateTitle:C="No options available",emptyStateDescription:w,emptyStateIcon:b,disabled:x=!1,className:S,listClassName:y,closable:R=!1,header:E,footer:F,onClose:P,onChange:k,inlineSearch:D=!1,dismissRef:T,onFooterClick:I,open:H,onOpenChange:A,onInlineQueryChange:O,customMultiSelectTagsRenderer:G})=>{const L=g.useId(),[U,B]=g.useState(!1),N=H!==void 0,W=N?!!H:U,Y=g.useCallback(Z=>{N||B(Z),A?.(Z)},[N,A]),[te,we]=g.useState(D&&l||""),Q=g.useRef(null),ve=g.useCallback(Z=>{Z!==te&&(we(Z||""),O?.(Z||""))},[O,te]),Pe=n!==void 0,[J,ge]=g.useState(i),V=Pe?n:J,$=g.useMemo(()=>t?Array.isArray(V)?V:[]:typeof V=="string"?[V]:[],[V,t]),K=g.useMemo(()=>{const Z=te.trim().toLowerCase();return Z?e.filter(Ue=>Ue.label.toLowerCase().includes(Z)):e},[e,te]);g.useEffect(()=>{!W&&!D&&ve("")},[D,W,ve]);const ce=g.useRef(l);g.useEffect(()=>{D&&l!==ce.current&&(W||(ce.current=l,ve(l||"")))},[l,D,W,ve]);const q=g.useCallback(Z=>{Pe||ge(Z),k?.(Z)},[Pe,k]),ue=g.useCallback(Z=>{if(t){const Ue=new Set($);Ue.has(Z)?Ue.delete(Z):Ue.add(Z),q(Array.from(Ue));return}if(q(Z),D){const Ue=e.find(ts=>ts.value===Z)??e.flatMap(ts=>ts.children??[]).find(ts=>ts.value===Z);Ue&&ve(Ue.label)}Y(!1)},[t,q,D,Y,$,e,ve]),he=g.useCallback((Z,Ue)=>{if(Z.stopPropagation(),!t){q("");return}const ts=$.filter(ci=>ci!==Ue);q(ts)},[t,$,q]),se=g.useMemo(()=>K.filter(Z=>!Z.disabled),[K]),re=g.useMemo(()=>se.filter(Z=>$.includes(Z.value)).length,[se,$]),Oe=g.useCallback(Z=>{D&&!t&&!Z&&ue(te),Y(Z)},[ue,D,t,te,Y]),{allSelectedInFiltered:Ae,someSelectedInFiltered:Ce}=g.useMemo(()=>{const Z=se.length>0&&re===se.length;return{allSelectedInFiltered:Z,someSelectedInFiltered:re>0&&!Z}},[se,re]),ke=g.useCallback(()=>{if(!(!t||se.length===0))if(Ae){const Z=new Set(se.map(Ue=>Ue.value));q($.filter(Ue=>!Z.has(Ue)))}else{const Z=new Set($);se.forEach(Ue=>Z.add(Ue.value)),q(Array.from(Z))}},[Ae,t,se,$,q]),qe=$.length>0;g.useEffect(()=>{W&&D&&!t&&!x&&requestAnimationFrame(()=>{const Z=Q.current;if(!Z)return;Z.focus();const Ue=Z.value?.length??0;Z.setSelectionRange?.(Ue,Ue)})},[W,D,t,x]);const ot=!t&&qe?$[0]:void 0,Ve=g.useMemo(()=>ot?e.find(Z=>Z.value===ot)??e.flatMap(Z=>Z.children??[]).find(Z=>Z.value===ot):void 0,[e,ot]),wt=g.useCallback(()=>t?qe?G?.(e,$,he)||h.jsx(Tx,{options:e,selectedValues:$,handleRemoveTag:he}):h.jsx("span",{className:"text-secondary truncate",children:c}):Ve?h.jsxs(h.Fragment,{children:[Ve.icon&&h.jsx(Le,{icon:Ve.icon}),h.jsx(it,{text:Ve.labelNode??(a?`${a} ${Ve.label}`:Ve.label)}),Ve?.description&&h.jsx("div",{className:"text-secondary dial-small-text",children:Ve.description})]}):l&&n?l:h.jsx("span",{className:"text-secondary truncate",children:c}),[qe,t,l,a,n,c,Ve,e,$,he,G]);g.useImperativeHandle(T,()=>({dismiss:()=>{Y(!1)}}));const ze=g.useCallback(()=>{ve($.length===1?Ve?.label??te:"")},[te,$.length,ve,Ve?.label]),_e=g.useCallback(()=>{x||(Y(!W),D&&!t&&(ze(),Q.current?.focus()))},[x,D,W,t,ze,Y]);return h.jsx(Gt,{open:W,onOpenChange:Oe,disabled:x,closable:R,onClose:P,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:d?null:GB,listClassName:y,renderOverlay:()=>h.jsxs("div",{id:`list-${s||L}`,role:"listbox","aria-multiselectable":t||void 0,className:HB,children:[E&&h.jsx(h.Fragment,{children:typeof E=="function"?E():E}),(d||R)&&e.length>8&&h.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[d&&h.jsx(Vg,{size:u,placeholder:p,onChange:ve,value:te,id:`search-${s||L}`,containerClassName:M(Px[u].containerClassName,"w-full")}),R&&h.jsx(Ks,{"aria-label":"Close select",className:"shrink-0",iconBefore:h.jsx(z.IconX,{size:Ne.SM}),onClick:Z=>{P?.(Z),Y(!1)}})]}),t&&f&&se.length>0&&h.jsx("div",{className:pe(ta,"mt-2"),children:h.jsx(ia,{id:`${s||L}-selectAll`,label:v,checked:Ae,indeterminate:Ce,onChange:ke,ariaLabel:v})}),h.jsx("div",{className:pe("overflow-y-auto max-h-[352px]",D&&K.length===0?"":"py-1"),children:K.length===0?!D&&h.jsx("div",{className:"px-2 py-3",children:h.jsx(tr,{icon:b??h.jsx(z.IconClipboardX,{size:Ne.LG,stroke:.5}),title:C,description:w})}):K.map(Z=>{const Ue=$.includes(Z.value);return t?h.jsxs("div",{role:"option","aria-selected":Ue,"aria-disabled":!!Z.disabled,className:pe(ta,Ue&&BB,Z.disabled&&Lc,"w-full"),children:[h.jsx(ia,{id:`${s||L}-${Z.value}`,label:h.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[Z.icon&&h.jsx(Le,{icon:Z.icon}),h.jsx("span",{className:"truncate",children:Z.labelNode??Z.label})]}),checked:Ue,disabled:Z.disabled,onChange:()=>!Z.disabled&&ue(Z.value),ariaLabel:Z.label}),Z.description&&h.jsx("div",{className:"text-secondary dial-small-text",children:Z.description})]},Z.value):Z.children?.length?h.jsx(zB,{opt:Z,selectedValues:$,onSelect:ue},Z.value):h.jsx("button",{role:"option",type:"button","aria-selected":Ue,"aria-disabled":!!Z.disabled,disabled:Z.disabled,className:pe(ta,Ue&&tp,Z.disabled&&Lc),onClick:()=>!Z.disabled&&ue(Z.value),children:h.jsxs("div",{className:"flex items-center gap-2 w-full",children:[Z.icon&&h.jsx(Le,{icon:Z.icon}),h.jsx(it,{text:Z.labelNode??Z.label}),Z.description&&h.jsx("div",{className:"text-secondary dial-small-text",children:Z.description})]})},Z.value)})}),F&&h.jsx("div",{onClick:Z=>{I?.(Z),I&&Y(!1)},children:typeof F=="function"?F():F})]}),children:h.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":W,"aria-controls":`list-${s||L}`,className:M(OB,x&&"opacity-75 !cursor-not-allowed !border-primary",r===Mc.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",m&&"dial-input-error",o===Ac.Secondary?"!bg-layer-4 !h-auto":"",S),onMouseDown:Z=>{x||D&&!t&&(ze(),Z.preventDefault())},onClick:()=>{_e()},onKeyDown:Z=>{(Z.key===" "||Z.code==="Space")&&(Z.preventDefault(),_e())},children:[D&&!t?h.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:h.jsx("input",{id:`inline-${s||L}`,type:"text",placeholder:p??c,value:te||"",onChange:Z=>ve(Z.currentTarget.value.trimStart()),onFocus:()=>!x&&Y(!0),onMouseDown:Z=>{ze(),Z.stopPropagation()},onClick:Z=>{Z.stopPropagation()},onKeyDown:Z=>{Z.stopPropagation()},className:"bg-transparent outline-none w-full dial-small-text",ref:Q,disabled:x,"aria-disabled":x,autoComplete:"off"})}):h.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:wt()}),!D&&h.jsx(Le,{icon:jB,className:pe("text-primary",W&&"rotate-180")})]})})},WB=({label:e,required:t,captionDescription:s,containerClassName:n,selectClassName:i,error:o,id:r,caption:a,readonly:l,value:c,defaultEmptyText:d,...u})=>{const p=g.useCallback(()=>{if(!c||Array.isArray(c)&&c.length===0)return d??"None";if(Array.isArray(c))return h.jsx(Tx,{options:u.options,selectedValues:c});{const f=u.options?.find(m=>m.value===c);return h.jsx("span",{"aria-readonly":!0,className:"text-primary",children:f?.label||c})}},[c,u.options,d]);return h.jsx(Wc,{id:r,label:e,required:t,description:a,error:o,captionDescription:s,className:n,readonly:l,value:p(),defaultEmptyText:d,children:h.jsx(ei,{className:i,value:c,elementId:r,invalid:!!o,...u})})};function kx(e){let t=null;return()=>(t==null&&(t=e()),t)}function _B(e,t){return e.filter(s=>s!==t)}function UB(e,t){const s=new Set,n=o=>s.add(o);e.forEach(n),t.forEach(n);const i=[];return s.forEach(o=>i.push(o)),i}class $B{enter(t){const s=this.entered.length,n=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=UB(this.entered.filter(n),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=_B(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class qB{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(n=>{const i=this.config.exposeProperties[n];i!=null&&(s[n]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const bd="__NATIVE_FILE__",Ix="__NATIVE_URL__",Mx="__NATIVE_TEXT__",Ax="__NATIVE_HTML__",Av=Object.freeze(Object.defineProperty({__proto__:null,FILE:bd,HTML:Ax,TEXT:Mx,URL:Ix},Symbol.toStringTag,{value:"Module"}));function Xu(e,t,s){const n=t.reduce((i,o)=>i||e.getData(o),"");return n??s}const sp={[bd]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Ax]:{exposeProperties:{html:(e,t)=>Xu(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ix]:{exposeProperties:{urls:(e,t)=>Xu(e,t,"").split(`
|
|
69
|
+
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Mx]:{exposeProperties:{text:(e,t)=>Xu(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function KB(e,t){const s=sp[e];if(!s)throw new Error(`native type ${e} has no configuration`);const n=new qB(s);return n.loadDataTransfer(t),n}function Qu(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(sp).filter(s=>{const n=sp[s];return n?.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const YB=kx(()=>/firefox/i.test(navigator.userAgent)),Lx=kx(()=>!!window.safari);class Lv{interpolate(t){const{xs:s,ys:n,c1s:i,c2s:o,c3s:r}=this;let a=s.length-1;if(t===s[a])return n[a];let l=0,c=r.length-1,d;for(;l<=c;){d=Math.floor(.5*(l+c));const f=s[d];if(f<t)l=d+1;else if(f>t)c=d-1;else return n[d]}a=Math.max(0,c);const u=t-s[a],p=u*u;return n[a]+i[a]*u+o[a]*p+r[a]*u*p}constructor(t,s){const{length:n}=t,i=[];for(let f=0;f<n;f++)i.push(f);i.sort((f,m)=>t[f]<t[m]?-1:1);const o=[],r=[];let a,l;for(let f=0;f<n-1;f++)a=t[f+1]-t[f],l=s[f+1]-s[f],o.push(a),r.push(l/a);const c=[r[0]];for(let f=0;f<o.length-1;f++){const m=r[f],v=r[f+1];if(m*v<=0)c.push(0);else{a=o[f];const C=o[f+1],w=a+C;c.push(3*w/((w+C)/m+(w+a)/v))}}c.push(r[r.length-1]);const d=[],u=[];let p;for(let f=0;f<c.length-1;f++){p=r[f];const m=c[f],v=1/o[f],C=m+c[f+1]-p-p;d.push((p-m-C)*v),u.push(C*v*v)}this.xs=t,this.ys=s,this.c1s=c,this.c2s=d,this.c3s=u}}const ZB=1;function Nx(e){const t=e.nodeType===ZB?e:e.parentElement;if(!t)return null;const{top:s,left:n}=t.getBoundingClientRect();return{x:n,y:s}}function Ll(e){return{x:e.clientX,y:e.clientY}}function XB(e){var t;return e.nodeName==="IMG"&&(YB()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function QB(e,t,s,n){let i=e?t.width:s,o=e?t.height:n;return Lx()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}function JB(e,t,s,n,i){const o=XB(t),a=Nx(o?e:t),l={x:s.x-a.x,y:s.y-a.y},{offsetWidth:c,offsetHeight:d}=e,{anchorX:u,anchorY:p}=n,{dragPreviewWidth:f,dragPreviewHeight:m}=QB(o,t,c,d),v=()=>{let R=new Lv([0,.5,1],[l.y,l.y/d*m,l.y+m-d]).interpolate(p);return Lx()&&o&&(R+=(window.devicePixelRatio-1)*m),R},C=()=>new Lv([0,.5,1],[l.x,l.x/c*f,l.x+f-c]).interpolate(u),{offsetX:w,offsetY:b}=i,x=w===0||w,S=b===0||b;return{x:x?w:C(),y:S?b:v()}}class eG{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,s){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=s}}function tG(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Nv(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable}))),n.forEach(function(i){tG(e,i,s[i])})}return e}class sG{profile(){var t,s;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var s;(s=this.window)===null||s===void 0||s.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,s,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,n){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,n);const i=r=>this.handleDragStart(r,t),o=r=>this.handleSelectStart(r);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",i),s.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",i),s.removeEventListener("selectstart",o),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const n=r=>this.handleDragEnter(r,t),i=r=>this.handleDragOver(r,t),o=r=>this.handleDrop(r,t);return s.addEventListener("dragenter",n),s.addEventListener("dragover",i),s.addEventListener("drop",o),()=>{s.removeEventListener("dragenter",n),s.removeEventListener("dragover",i),s.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourceNodeOptions.get(t);return Nv({dropEffect:this.altKeyPressed?"copy":"move"},s||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourcePreviewNodeOptions.get(t);return Nv({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Av).some(s=>Av[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=KB(t,s),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const s=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},s)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,s){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(s))}handleDragEnter(t,s){this.dragEnterTargetIds.unshift(s)}handleDragOver(t,s){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(s)}handleDrop(t,s){this.dropTargetIds.unshift(s)}constructor(t,s,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&Nx(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const r=Ll(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=i,l=Qu(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const d=this.monitor.getSourceId(),u=this.sourceNodes.get(d),p=this.sourcePreviewNodes.get(d)||u;if(p){const{anchorX:f,anchorY:m,offsetX:v,offsetY:C}=this.getCurrentSourcePreviewNodeOptions(),x=JB(u,p,r,{anchorX:f,anchorY:m},{offsetX:v,offsetY:C});a.setDragImage(p,x.x,x.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:a}=i,l=Qu(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:Ll(i)}),o.some(a=>this.monitor.canDropOnTarget(a))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=Ll(i),this.scheduleHover(o),(o||[]).some(a=>this.monitor.canDropOnTarget(a))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else Qu(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:Ll(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new eG(s,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new $B(this.isNodeInDocument)}}const nG=function(t,s,n){return new sG(t,s,n)},iG=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:n,acceptTypes:i,maxFilesCount:o,multiple:r,fileFormatError:a,fileCountError:l,fileSizeError:c,getIsFileFormatError:d,getIsFileSizeError:u})=>{const p=g.useRef(null),f=g.useRef(null),[m,v]=g.useState([]),[C,w]=g.useState(!1),[b,x]=g.useState(!1),S=g.useCallback(O=>{const G=O.target.files;if(G&&G.length>0){const L=Array.from(G),U=d?.(L),B=u?.(L);U?w(!0):B?x(!0):e(L)}},[d,u,e]),y=g.useCallback(O=>o&&O?.length>o,[o]),R=g.useMemo(()=>C||b||y(m),[C,b,y,m]),E=()=>{v([]),w(!1),x(!1)},F=g.useMemo(()=>C?h.jsx(Ht,{text:a}):b?h.jsx(Ht,{text:c}):y(m)?h.jsx(Ht,{text:l}):null,[l,a,c,m,y,C,b]);g.useEffect(()=>{E()},[i]);const[{isOver:P,canDrop:k},D]=Cp(()=>({accept:[bd],drop(O){const G=O.files,L=d?.(G)??!1,U=u?.(G)??!1,B=y?.(G)??!1;if(w(L),x(U),L||U||B){v(G);return}e(G),E()},collect:O=>({isOver:O.isOver(),canDrop:O.canDrop()})}),[e,d,u,y]),T=O=>{(O.key==="Enter"||O.key==="Space")&&(O.preventDefault(),f.current?.click())},I=O=>{O?.preventDefault();const G=Array.from(O.dataTransfer?.items??[]);w(!!d?.(G)),x(!!u?.(G)),v(G)},H=O=>{O.target===O.currentTarget&&E()},A=pe("border border-dashed rounded w-full cursor-pointer relative h-full hover:border-hover",!k&&!R&&"border-primary",k&&(P?"border-accent-primary":"border-hover"),R&&"border-error");return D(p),h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:A,ref:p,onDragOver:I,onDragLeave:H,children:[h.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:T,className:"flex flex-col items-center cursor-pointer size-full text-secondary dial-tiny-text justify-center",children:[t&&h.jsx("p",{className:"mb-1",children:t}),s&&h.jsx("p",{className:"mb-0.5",children:s}),n&&h.jsx(zs,{appearance:ye.Ghost,label:n,onClick:()=>f.current?.click()})]}),h.jsx("input",{multiple:r,id:"file",type:"file",ref:f,hidden:!0,accept:i,onChange:S})]}),h.jsx(h.Fragment,{children:F})]})},oG=({iconBefore:e,className:t,...s})=>{const n=s.invalid,i=()=>h.jsx("div",{className:"mr-2",children:n?h.jsx(z.IconExclamationCircle,{...ae,className:"text-error"}):e});return h.jsx(vn,{...s,iconBefore:i(),containerClassName:pe("h-[40px] p-0",n&&"h-[60px]"),className:pe("rounded-r-none border-r-0",n&&"text-error",t)})},rG=({children:e,existingFiles:t,onDrop:s,getIsFileFormatError:n,getIsFileSizeError:i,maxFilesCount:o,fileFormatError:r,fileSizeError:a,fileCountError:l})=>{const c=g.useRef(null),[d,u]=g.useState(!1),[p,f]=g.useState(!1),[m,v]=g.useState(0),C=g.useCallback(()=>{u(!1),f(!1),v(0)},[]),w=g.useCallback(P=>!!(o&&t.length+P.length>o),[o,t.length]),b=d||p,[{isOver:x,canDrop:S},y]=Cp(()=>({accept:[bd],drop(P){const k=P.files,D=[...t,...k],T=n?.(k)??!1,I=i?.(k)??!1,H=w?.(k)??!1;if(u(T),f(I),T||I||H){v(k.length);return}s(D),C()},collect:P=>({isOver:P.isOver(),canDrop:P.canDrop()})}),[t,s,n,i,w,C]),R=P=>{P.preventDefault();const k=Array.from(P.dataTransfer?.items??[]);u(!!n?.(k)),f(!1),v(k.length)},E=P=>{P.target===P.currentTarget&&C()};y(c);const F=w(Array.from({length:m}));return h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsx("div",{ref:c,onDragOver:R,onDragLeave:E,className:pe("flex-1 min-h-0 border border-solid rounded p-2 overflow-y-auto",!b&&!F&&(S&&x?"border-accent-primary":"border-primary"),(b||F)&&"border-error"),children:e}),d&&h.jsx(Ht,{text:r}),p&&h.jsx(Ht,{text:a}),!d&&!p&&F&&h.jsx(Ht,{text:l})]})},Ox=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:n,onChange:i,isInvalid:o,errorText:r,removeButtonAriaLabel:a,getIsMultiFilesSizeError:l,multiFilesSizeError:c,getIsFileFormatError:d,getIsFileSizeError:u,maxFilesCount:p}=e,f=g.useCallback((C,w)=>{C.stopPropagation(),i(t?.filter(b=>b.name!==w)||[])},[i,t]),m=g.useCallback(C=>h.jsx(Cd,{"aria-label":a,onClick:w=>f(w,C)}),[a,f]),v=g.useMemo(()=>h.jsx("div",{className:"flex flex-col gap-y-1",children:t?.map((C,w)=>h.jsx(oG,{id:C.name,value:C.name,iconAfter:m(C.name),iconBefore:s||n?.(C.name),invalid:o?.(C),error:o?.(C)?r:""},C.name+w))}),[t,s,n,o,r,m]);return h.jsx(rR,{backend:nG,children:!t||t.length===0?h.jsx(iG,{...e,onChange:i}):h.jsxs(h.Fragment,{children:[h.jsx(rG,{existingFiles:t,onDrop:i,getIsFileFormatError:d,getIsFileSizeError:u,maxFilesCount:p,fileFormatError:e.fileFormatError,fileSizeError:e.fileSizeError,fileCountError:e.fileCountError,children:v}),l?.(t)&&h.jsx(Ht,{text:c})]})})},aG=({onChange:e,fieldTitle:t,elementId:s,files:n,maxFilesCount:i,maxFileSize:o,maxMultiFilesSize:r,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,multiple:u=!0,acceptTypes:p,deleteAllButtonLabel:f,addButtonLabel:m,additionalActionButtons:v,...C})=>{const w=g.useRef(null),b=()=>w.current?.click(),x=()=>{e([])},S=g.useCallback(F=>F?.some(P=>!(p==="/"||p?.toLowerCase()?.includes(P?.type?.toLowerCase()))),[p]),y=g.useCallback(F=>{if(!o)return!1;const P=o*(1024*1024);return F?.some(k=>{const D=k.size;return!!D&&D>P})},[o]),R=g.useCallback(F=>{if(!r||!u)return!1;const P=r*1024*1024;return F.reduce((D,T)=>D+T.size,0)>P},[r,u]),E=g.useCallback(F=>{const P=F.target.files;if(P&&P.length>0){const k=Array.from(P),D=S(k),T=y(k);!D&&!T&&e([...n||[],...k])}},[S,y,e,n]);return h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[h.jsx(si,{label:`${t}: ${u?n?.length||0:""}`,htmlFor:s}),u&&!!n?.length&&h.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[h.jsx(qs,{label:f,iconBefore:h.jsx(z.IconTrashX,{...ae}),onClick:x}),(i?i>n?.length:!0)&&h.jsx(zs,{appearance:ye.Ghost,iconBefore:h.jsx(z.IconPlus,{...ae}),label:m,onClick:b}),v]})]}),n&&n.length>0&&h.jsx("input",{id:"file",type:"file",multiple:u,ref:w,hidden:!0,accept:p,onChange:E}),h.jsx(Ox,{files:n,onChange:e,acceptTypes:p,maxFilesCount:i,multiple:u,fileFormatError:a,fileCountError:l,fileSizeError:c,multiFilesSizeError:d,getIsFileFormatError:S,getIsFileSizeError:y,getIsMultiFilesSizeError:R,...C})]})},lG=h.jsx(z.IconChevronDown,{size:Ne.SM}),cG=h.jsx(z.IconChevronUp,{size:Ne.SM}),np=({variant:e,appearance:t,items:s,...n})=>{const[i,o]=g.useState(!1),r=g.useMemo(()=>i?cG:lG,[i]);return h.jsx("div",{children:h.jsx(Gt,{items:s,onOpenChange:a=>o(a),children:h.jsx(Ks,{...n,iconAfter:r,variant:e||Me.Primary,appearance:t||ye.Solid})})})},dG=({icon:e,ariaLabel:t,size:s=me.Standard,disabled:n=!1,className:i,buttonClassName:o,iconClassName:r,caretIcon:a=h.jsx(z.IconChevronDown,{size:Ne.SM}),showCaret:l=!0,placement:c="bottom-start",matchReferenceWidth:d=!1,open:u,onOpenChange:p,defaultOpen:f=!1,...m})=>{const v=s===me.Small,[C,w]=g.useState(f),b=u??C,x=v?"w-8 px-0":"w-10 px-0",S={[me.Small]:"size-5",[me.Standard]:"size-6",[me.Large]:"size-7"},y=R=>{w(R),p?.(R)};return h.jsx(Gt,{...m,disabled:n,placement:c,matchReferenceWidth:d,className:i,open:b,onOpenChange:y,defaultOpen:f,children:h.jsxs("button",{type:"button","aria-label":t,disabled:n,className:M("group flex items-center justify-center rounded border border-transparent bg-layer-4 text-primary","enabled:hover:bg-accent-primary-alpha enabled:active:bg-controls-accent-primary-alpha-active","focus-visible:border-focus-black focus-visible:outline-none disabled:cursor-not-allowed disabled:text-controls-secondary-disable disabled:opacity-75",v?"h-8 px-2":"h-10 px-2",l?void 0:x,o),children:[h.jsx(Le,{icon:e,className:M("flex items-center justify-center text-inherit",S[s],l&&"-mr-2",r)}),l&&h.jsxs("div",{className:"relative z-10 inline-grid size-5 shrink-0 place-items-center",children:[h.jsx("div",{className:"absolute inset-0 rounded-full bg-layer-2"}),h.jsx(Le,{icon:a,className:M("relative flex items-center justify-center text-secondary transition-transform group-hover:text-primary group-disabled:text-controls-secondary-disable",b&&"rotate-180")})]})]})})},Hx=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1812 1.2002H2.80615C2.43319 1.2002 2.07551 1.34835 1.81178 1.61208C1.54806 1.8758 1.3999 2.23348 1.3999 2.60645V5.48145C1.3999 5.85441 1.54806 6.21209 1.81178 6.47581C2.07551 6.73954 2.43319 6.8877 2.80615 6.8877H15.1812C15.5541 6.8877 15.9118 6.73954 16.1755 6.47581C16.4392 6.21209 16.5874 5.85441 16.5874 5.48145V2.60645C16.5874 2.23348 16.4392 1.8758 16.1755 1.61208C15.9118 1.34835 15.5541 1.2002 15.1812 1.2002ZM14.8999 5.2002H3.0874V2.8877H14.8999V5.2002ZM12 7.80017C12.3107 7.80017 12.5625 8.05201 12.5625 8.36267V11.7377H15.9375C16.2482 11.7377 16.5 11.9895 16.5 12.3002C16.5 12.6108 16.2482 12.8627 15.9375 12.8627H12.5625V16.2377C12.5625 16.5483 12.3107 16.8002 12 16.8002C11.6893 16.8002 11.4375 16.5483 11.4375 16.2377V12.8627H8.0625C7.75184 12.8627 7.5 12.6108 7.5 12.3002C7.5 11.9895 7.75184 11.7377 8.0625 11.7377H11.4375V8.36267C11.4375 8.05201 11.6893 7.80017 12 7.80017ZM2.41188 12.5883C2.14816 12.3246 2 11.9669 2 11.5939V9.00018H3.6875V11.3127H6.1001V13.0002H3.40625C3.03329 13.0002 2.6756 12.852 2.41188 12.5883Z",fill:"currentColor"})),Bx=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M9.00049 7.7998C9.3108 7.80007 9.56279 8.05198 9.56299 8.3623V11.7373H12.938C13.2483 11.7376 13.5003 11.9895 13.5005 12.2998C13.5005 12.6103 13.2484 12.862 12.938 12.8623H9.56299V16.2373C9.56299 16.5478 9.31092 16.7995 9.00049 16.7998C8.68983 16.7998 8.43799 16.548 8.43799 16.2373V12.8623H5.06299C4.75233 12.8623 4.50049 12.6105 4.50049 12.2998C4.50069 11.9893 4.75245 11.7373 5.06299 11.7373H8.43799V8.3623C8.43819 8.05181 8.68995 7.7998 9.00049 7.7998ZM15.1812 1.2002C15.5541 1.2002 15.9116 1.34858 16.1753 1.6123C16.439 1.87603 16.5874 2.23348 16.5874 2.60645V5.48145C16.5874 5.85441 16.439 6.21186 16.1753 6.47559C15.9116 6.73931 15.5541 6.8877 15.1812 6.8877H2.80615C2.43319 6.8877 2.07573 6.73931 1.81201 6.47559C1.54829 6.21186 1.3999 5.85441 1.3999 5.48145V2.60645C1.3999 2.23348 1.54829 1.87603 1.81201 1.6123C2.07573 1.34858 2.43319 1.2002 2.80615 1.2002H15.1812ZM3.0874 2.8877V5.2002H14.8999V2.8877H3.0874Z",fill:"currentColor"})),jg=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M3.009 12.5527C2.77901 12.4216 2.5877 12.2321 2.45443 12.0034C2.32116 11.7746 2.25064 11.5147 2.25 11.25V3.75C2.25 2.925 2.925 2.25 3.75 2.25H11.25C11.8125 2.25 12.1185 2.53875 12.375 3M10.5 15.75H7.25025C6.98757 15.75 6.72747 15.6983 6.48479 15.5977C6.24211 15.4972 6.0216 15.3499 5.83586 15.1641C5.65012 14.9784 5.50278 14.7579 5.40226 14.5152C5.30174 14.2725 5.25 14.0124 5.25 13.7498V7.25025C5.25 6.71975 5.46074 6.21098 5.83586 5.83586C6.21098 5.46074 6.71975 5.25 7.25025 5.25H13.7498C14.0124 5.25 14.2725 5.30174 14.5152 5.40226C14.7579 5.50278 14.9784 5.65012 15.1641 5.83586C15.3499 6.0216 15.4972 6.24211 15.5977 6.48479C15.6983 6.72747 15.75 6.98757 15.75 7.25025V10.5M12.75 16.5L16.5 12.75M16.5 12.75V16.125M16.5 12.75H13.125",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),zg=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M9.75 14.25H3.75C3.35218 14.25 2.97064 14.092 2.68934 13.8107C2.40804 13.5294 2.25 13.1478 2.25 12.75V4.5C2.25 4.10218 2.40804 3.72064 2.68934 3.43934C2.97064 3.15804 3.35218 3 3.75 3H6.75L9 5.25H14.25C14.6478 5.25 15.0294 5.40804 15.3107 5.68934C15.592 5.97064 15.75 6.35218 15.75 6.75V9.75M12 16.5L15.75 12.75M15.75 12.75V16.125M15.75 12.75H12.375",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Wg=e=>Ie.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},Ie.createElement("path",{d:"M4.5 15.75V14.25C4.5 13.4544 4.81607 12.6913 5.37868 12.1287C5.94129 11.5661 6.70435 11.25 7.5 11.25H9.75M15.75 12.75L12 16.5M12 16.5V13.125M12 16.5H15.375M6 5.25C6 6.04565 6.31607 6.80871 6.87868 7.37132C7.44129 7.93393 8.20435 8.25 9 8.25C9.79565 8.25 10.5587 7.93393 11.1213 7.37132C11.6839 6.80871 12 6.04565 12 5.25C12 4.45435 11.6839 3.69129 11.1213 3.12868C10.5587 2.56607 9.79565 2.25 9 2.25C8.20435 2.25 7.44129 2.56607 6.87868 3.12868C6.31607 3.69129 6 4.45435 6 5.25Z",stroke:"#7F8792",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));var ko=(e=>(e.MyFiles="my_files",e.Shared="shared",e.Organization="organization",e.Review="review",e))(ko||{}),ee=(e=>(e.AddSibling="addSibling",e.AddChild="addChild",e.Duplicate="duplicate",e.Copy="copy",e.Move="move",e.Download="download",e.Delete="delete",e.Rename="rename",e.Info="info",e.Unshare="unshare",e.RemoveAccess="removeAccess",e.ManagePermissions="managePermissions",e.Preview="preview",e.OpenInNewTab="openInNewTab",e))(ee||{}),St=(e=>(e.Replace="replace",e.Duplicate="duplicate",e.Cancel="cancel",e))(St||{}),ns=(e=>(e.ReplaceAll="replaceAll",e.DuplicateAll="duplicateAll",e.DecideForEach="decideForEach",e))(ns||{}),Rt=(e=>(e.Copy="copy",e.Move="move",e))(Rt||{}),Wo=(e=>(e.Tree="tree",e.Grid="grid",e))(Wo||{}),Si=(e=>(e.Tree="tree",e.Grid="grid",e))(Si||{}),Ss=(e=>(e.Folder="folder",e.Child="child",e.Sibling="sibling",e))(Ss||{}),Ft=(e=>(e.Name="name",e.UpdatedAt="updatedAt",e.Size="size",e.Author="author",e.Owner="owner",e.Path="path",e.Actions="__actions",e.Version="version",e))(Ft||{});const uG="w-full h-full grid grid-rows-[auto_1fr] gap-5 p-6 overflow-hidden min-w-0 bg-layer-1",Ov="w-full text-secondary flex items-center gap-2",hG="flex min-h-0 min-w-0 h-full gap-4 overflow-hidden",pG="flex flex-col flex-1 min-h-0 min-w-0 h-full gap-4",gG="h-full rounded bg-layer-3 text-secondary min-w-0",fG="flex-1 w-full rounded text-secondary overflow-auto min-h-0 min-w-0",mG="opacity-0 pointer-events-none group-hover/grid-row:opacity-100 group-hover/grid-row:pointer-events-auto",vG=280,CG="Files",Un=20,wG="Files",Ju=".dial_folder",Hv="New folder",bG=280,xG=460,Bv=44,yG=800,SG=[Ft.Name,Ft.UpdatedAt,Ft.Size,Ft.Author,Ft.Actions];var De=(e=>(e.ITEM="item",e.FOLDER="folder",e))(De||{}),_g=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(_g||{}),to=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(to||{});const Gv=({open:e,onClose:t,onReplace:s,onDuplicate:n,onDecideForEach:i,conflictingFiles:o,singleFileTitle:r="Replace Or Duplicate Item",multipleFilesTitle:a="Replace Or Duplicate Items",message:l,actionLabels:c,strategyLabels:d,confirmLabel:u="Confirm",cancelLabel:p="Cancel",nameColumnLabel:f="Name",actionColumnLabel:m="Action"})=>{const v=o.length===1,C=v?o[0]?.name:"",w=c?.[St.Replace]??"Replace",b=c?.[St.Duplicate]??"Duplicate",x=c?.[St.Cancel]??"Cancel",S=d?.[ns.ReplaceAll]??"Replace all",y=d?.[ns.DuplicateAll]??"Duplicate all",R=d?.[ns.DecideForEach]??"Decide for each",[E,F]=g.useState(St.Replace),[P,k]=g.useState(ns.ReplaceAll),[D,T]=g.useState(new Map(o.map(Q=>[Q.path,St.Replace]))),[I,H]=g.useState(void 0),A=v?r:a,O=h.jsxs(h.Fragment,{children:["Item with the name ",h.jsxs("span",{className:"text-primary",children:['"',C,'"']})," ","already exists in this destination."]}),G=`${o.length} items with the same names already exist in this destination.`,L=l??(v?O:G),U=g.useMemo(()=>[{id:St.Replace,name:w},{id:St.Duplicate,name:b}],[w,b]),B=g.useMemo(()=>o.map(Q=>({id:Q.path,name:Q.name,path:Q.path,nodeType:Q.nodeType??De.ITEM,action:D.get(Q.path)||St.Replace})),[o,D]),N=g.useMemo(()=>[{field:"name",headerName:f,flex:1,minWidth:200,floatingFilter:!1,filter:!1,resizable:!1,cellRenderer:Q=>Q.data?.nodeType===De.FOLDER?h.jsx(Zc,{name:Q.data.name,iconSize:Un}):h.jsx(Yc,{name:Q.data.name,iconSize:Un})},{field:"action",headerName:m,width:140,suppressSizeToFit:!0,sortable:!1,filter:!1,floatingFilter:!1,resizable:!1,cellRenderer:Q=>{if(!Q.data)return null;const ve=[{key:St.Replace,label:w,icon:h.jsx(z.IconCircleFilled,{size:10,className:"text-accent-tertiary"})},{key:St.Duplicate,label:b,icon:h.jsx(z.IconCircleFilled,{size:10,className:"text-accent-secondary"})},{key:St.Cancel,label:x,icon:h.jsx(z.IconCircleFilled,{size:10,className:"text-error"})}],Pe=ve.find(ge=>ge.key===Q.data.action),J=I===Q.data.path;return h.jsx("div",{className:"flex items-center h-full",children:h.jsx(Gt,{trigger:[Tt.Click],open:J,items:ve,onItemClick:({key:ge})=>{T(V=>{const $=new Map(V);return $.set(Q.data.path,ge),$}),H(void 0)},placement:"bottom-start",matchReferenceWidth:!1,allowedPlacements:["bottom-start","top-start"],onOpenChange:ge=>{H(ge?Q.data.path:void 0)},children:h.jsxs("button",{type:"button",className:"flex items-center gap-2",children:[h.jsxs("span",{className:"flex items-center gap-2",children:[Pe?.icon,Pe?.label??w]}),h.jsx(z.IconChevronDown,{size:Ne.SM,className:pe("text-secondary transition-transform",J&&"rotate-180")})]})})})}}],[f,m,w,b,x,I]),W=g.useMemo(()=>[{id:ns.ReplaceAll,name:S},{id:ns.DuplicateAll,name:y},{id:ns.DecideForEach,name:R,content:P===ns.DecideForEach?h.jsx("div",{className:"mt-4",children:h.jsx(Ng,{columnDefs:N,rowData:B,getRowId:Q=>Q.id,wrapCustomCellRenderers:!1,alternateOddRowColors:!1,additionalGridOptions:{domLayout:"autoHeight"}})}):void 0}],[S,y,R,P,N,B]),Y=g.useCallback(()=>{F(St.Replace),k(ns.ReplaceAll),T(new Map(o.map(Q=>[Q.path,St.Replace])))},[o]),te=g.useCallback(()=>{Y(),t()},[Y,t]),we=g.useCallback(()=>{if(Y(),v)E===St.Replace?s():n();else if(P===ns.ReplaceAll)s();else if(P===ns.DuplicateAll)n();else if(P===ns.DecideForEach&&i){const Q=o.map(ve=>({file:ve,action:D.get(ve.path)||St.Replace}));i(Q)}},[Y,v,E,s,n,P,i,o,D]);return h.jsx(eo,{open:e,onClose:te,size:v?It.Sm:It.Md,className:pe([!v&&"w-[600px]"]),header:A,dividers:!1,preventKeyboardOnOpen:!0,footer:h.jsxs("div",{className:"flex justify-end gap-3 py-4 px-6 border-t border-tertiary",children:[h.jsx(qs,{onClick:te,label:p}),h.jsx(zs,{onClick:we,label:u})]}),children:h.jsxs("div",{className:"px-6 py-4",children:[h.jsx("p",{className:"text-secondary mb-4 break-words",children:L}),v?h.jsx(sc,{elementId:"single-file-conflict",radioButtons:U,activeRadioButton:E,orientation:Oi.Column,onChange:Q=>F(Q)}):h.jsx(sc,{elementId:"multiple-files-conflict",radioButtons:W,activeRadioButton:P,orientation:Oi.Column,onChange:Q=>k(Q),formItemChildrenClassName:"gap-3"})]})})},RG=({getContextMenuItems:e,isRowDisabled:t,allowedFileTypes:s,maxSelectableFileSize:n,buttonClassName:i})=>{const o=g.useRef(e);g.useEffect(()=>{o.current=e},[e]);const r=g.useCallback(l=>{if(!l.data||t(l.data,s,n))return null;const d=l.data?o.current?.(l.data)??[]:[];return d.length?h.jsx(Gt,{placement:"bottom-start",allowedPlacements:["top-start","top-end","bottom-start"],items:d,className:M("sticky right-0",i),children:h.jsx(Le,{className:"text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary cursor-default",icon:h.jsx(z.IconDotsVertical,{...ae})})}):null},[s,n,i,t]);return{actionsColumnDef:g.useMemo(()=>({colId:"__actions",headerName:"",width:44,minWidth:44,maxWidth:44,suppressSizeToFit:!0,sortable:!1,resizable:!1,filter:!1,floatingFilter:!1,cellRenderer:r}),[r])}},FG=({onRename:e})=>{const[t,s]=g.useState(Wo.Grid),n=g.useCallback(o=>{e(o),s(Wo.Grid)},[e]),i=g.useCallback(o=>{e(o),s(Wo.Tree)},[e]);return{renameTriggerView:t,onGridRename:n,onTreeRename:i}};function EG(e,t){const s=g.useRef(null),[n,i]=g.useState(!1);return g.useEffect(()=>{if(!s.current)return;const o=new ResizeObserver(([r])=>{const a=r.contentRect.width;i(a<e)});return o.observe(t?.current||s?.current),()=>o.disconnect()},[e,t]),{containerRef:s,isBelowBreakpoint:n}}var eh={};const DG={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/ace+json":{source:"iana",compressible:!0},"application/ace-groupcomm+cbor":{source:"iana"},"application/ace-trl+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/aif+cbor":{source:"iana"},"application/aif+json":{source:"iana",compressible:!0},"application/alto-cdni+json":{source:"iana",compressible:!0},"application/alto-cdnifilter+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-propmap+json":{source:"iana",compressible:!0},"application/alto-propmapparams+json":{source:"iana",compressible:!0},"application/alto-tips+json":{source:"iana",compressible:!0},"application/alto-tipsparams+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/appinstaller":{compressible:!1,extensions:["appinstaller"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/appx":{compressible:!1,extensions:["appx"]},"application/appxbundle":{compressible:!1,extensions:["appxbundle"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/automationml-aml+xml":{source:"iana",compressible:!0,extensions:["aml"]},"application/automationml-amlx+zip":{source:"iana",compressible:!1,extensions:["amlx"]},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/bufr":{source:"iana"},"application/c2pa":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/ce+cbor":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/cid-edhoc+cbor-seq":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/city+json-seq":{source:"iana"},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-eap":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/concise-problem-details+cbor":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cose-x509":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwl":{source:"iana",extensions:["cwl"]},"application/cwl+json":{source:"iana",compressible:!0},"application/cwl+yaml":{source:"iana"},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana",extensions:["dcm"]},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dpop+jwt":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/eat+cwt":{source:"iana"},"application/eat+jwt":{source:"iana"},"application/eat-bun+cbor":{source:"iana"},"application/eat-bun+json":{source:"iana",compressible:!0},"application/eat-ucs+cbor":{source:"iana"},"application/eat-ucs+json":{source:"iana",compressible:!0},"application/ecmascript":{source:"apache",compressible:!0,extensions:["ecma"]},"application/edhoc+cbor-seq":{source:"iana"},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.legacyesn+json":{source:"iana",compressible:!0},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/entity-statement+jwt":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdf":{source:"iana",extensions:["fdf"]},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geopose+json":{source:"iana",compressible:!0},"application/geoxacml+json":{source:"iana",compressible:!0},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gnap-binding-jws":{source:"iana"},"application/gnap-binding-jwsd":{source:"iana"},"application/gnap-binding-rotation-jws":{source:"iana"},"application/gnap-binding-rotation-jwsd":{source:"iana"},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/grib":{source:"iana"},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"iana",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"apache",charset:"UTF-8",compressible:!0,extensions:["js"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/jscontact+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jsonpath":{source:"iana"},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwk-set+jwt":{source:"iana"},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/linkset":{source:"iana"},"application/linkset+json":{source:"iana",compressible:!0},"application/load-control+xml":{source:"iana",compressible:!0},"application/logout+jwt":{source:"iana"},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4","mpg4","mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msix":{compressible:!1,extensions:["msix"]},"application/msixbundle":{compressible:!1,extensions:["msixbundle"]},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!0,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/ohttp-keys":{source:"iana"},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg","one","onea"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["sig","asc"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/private-token-issuer-directory":{source:"iana"},"application/private-token-request":{source:"iana"},"application/private-token-response":{source:"iana"},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/provided-claims+jwt":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.implied-document+xml":{source:"iana",compressible:!0},"application/prs.implied-executable":{source:"iana"},"application/prs.implied-object+json":{source:"iana",compressible:!0},"application/prs.implied-object+json-seq":{source:"iana"},"application/prs.implied-object+yaml":{source:"iana"},"application/prs.implied-structure":{source:"iana"},"application/prs.mayfile":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.vcfbzip2":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0,extensions:["xsf"]},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"apache"},"application/reputon+json":{source:"iana",compressible:!0},"application/resolve-response+jwt":{source:"iana"},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-checklist":{source:"iana"},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-signed-tal":{source:"iana"},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"apache"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana",extensions:["sql"]},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/sslkeylogfile":{source:"iana"},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/st2110-41":{source:"iana"},"application/stix+json":{source:"iana",compressible:!0},"application/stratum":{source:"iana"},"application/swid+cbor":{source:"iana"},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tm+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/toc+cbor":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{source:"iana",compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/trust-chain+json":{source:"iana",compressible:!0},"application/trust-mark+jwt":{source:"iana"},"application/trust-mark-delegation+jwt":{source:"iana"},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/uccs+cbor":{source:"iana"},"application/ujcs+json":{source:"iana",compressible:!0},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vc":{source:"iana"},"application/vc+cose":{source:"iana"},"application/vc+jwt":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.1ob":{source:"iana"},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3a+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ach+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc8+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.5gsa2x":{source:"iana"},"application/vnd.3gpp.5gsa2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gsv2x":{source:"iana"},"application/vnd.3gpp.5gsv2x-local-service-information":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.crs+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.current-location-discovery+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-regroup+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.pinapp-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.seal-group-doc+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-network-qos-management-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-ue-config-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-unicast-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.seal-user-profile-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.v2x":{source:"iana"},"application/vnd.3gpp.vae-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acm.addressxfer+json":{source:"iana",compressible:!0},"application/vnd.acm.chatbot+json":{source:"iana",compressible:!0},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"apache",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"apache"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.parquet":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.apexlang":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"apache"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autodesk.fbx":{extensions:["fbx"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.belightsoft.lhzd+zip":{source:"iana",compressible:!1},"application/vnd.belightsoft.lhzl+zip":{source:"iana",compressible:!1},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.bzip3":{source:"iana"},"application/vnd.c3voc.schedule+xml":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.cncf.helm.chart.content.v1.tar+gzip":{source:"iana"},"application/vnd.cncf.helm.chart.provenance.v1.prov":{source:"iana"},"application/vnd.cncf.helm.config.v1+json":{source:"iana",compressible:!0},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datalog":{source:"iana"},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.dcmp+xml":{source:"iana",compressible:!0,extensions:["dcmp"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.eln+zip":{source:"iana",compressible:!1},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.erofs":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"apache",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.fdsn.stationxml+xml":{source:"iana",charset:"XML-BASED",compressible:!0},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.freelog.comic":{source:"iana"},"application/vnd.frogans.fnc":{source:"apache",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"apache",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.ga4gh.passport+jwt":{source:"iana"},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.genozip":{source:"iana"},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.gentoo.catmetadata+xml":{source:"iana",compressible:!0},"application/vnd.gentoo.ebuild":{source:"iana"},"application/vnd.gentoo.eclass":{source:"iana"},"application/vnd.gentoo.gpkg":{source:"iana"},"application/vnd.gentoo.manifest":{source:"iana"},"application/vnd.gentoo.pkgmetadata+xml":{source:"iana",compressible:!0},"application/vnd.gentoo.xpak":{source:"iana"},"application/vnd.geo+json":{source:"apache",compressible:!0},"application/vnd.geocube+xml":{source:"apache",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.pinboard":{source:"iana"},"application/vnd.geogebra.slides":{source:"iana",extensions:["ggs"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.gnu.taler.exchange+json":{source:"iana",compressible:!0},"application/vnd.gnu.taler.merchant+json":{source:"iana",compressible:!0},"application/vnd.google-apps.audio":{},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.drawing":{compressible:!1,extensions:["gdraw"]},"application/vnd.google-apps.drive-sdk":{compressible:!1},"application/vnd.google-apps.file":{},"application/vnd.google-apps.folder":{compressible:!1},"application/vnd.google-apps.form":{compressible:!1,extensions:["gform"]},"application/vnd.google-apps.fusiontable":{},"application/vnd.google-apps.jam":{compressible:!1,extensions:["gjam"]},"application/vnd.google-apps.mail-layout":{},"application/vnd.google-apps.map":{compressible:!1,extensions:["gmap"]},"application/vnd.google-apps.photo":{},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.script":{compressible:!1,extensions:["gscript"]},"application/vnd.google-apps.shortcut":{},"application/vnd.google-apps.site":{compressible:!1,extensions:["gsite"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-apps.unknown":{},"application/vnd.google-apps.video":{},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"apache",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0,extensions:["xdcf"]},"application/vnd.gpxsee.map+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.hsl":{source:"iana"},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"apache"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"apache",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"apache"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.ipfs.ipns-record":{source:"iana"},"application/vnd.ipld.car":{source:"iana"},"application/vnd.ipld.dag-cbor":{source:"iana"},"application/vnd.ipld.dag-json":{source:"iana"},"application/vnd.ipld.raw":{source:"iana"},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kdl":{source:"iana"},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.keyman.kmp+zip":{source:"iana",compressible:!1},"application/vnd.keyman.kmx":{source:"iana"},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.ldev.productlicensing":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.mdl":{source:"iana"},"application/vnd.mdl-mbsdf":{source:"iana"},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.medicalholodeck.recordxr":{source:"iana"},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mermaid":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.modl":{source:"iana"},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-visio.viewer":{extensions:["vdx"]},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msgpack":{source:"iana"},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.nato.bindingdataobject+cbor":{source:"iana"},"application/vnd.nato.bindingdataobject+json":{source:"iana",compressible:!0},"application/vnd.nato.bindingdataobject+xml":{source:"iana",compressible:!0,extensions:["bdo"]},"application/vnd.nato.openxmlformats-package.iepd+zip":{source:"iana",compressible:!1},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"apache",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oai.workflows":{source:"iana"},"application/vnd.oai.workflows+json":{source:"iana",compressible:!0},"application/vnd.oai.workflows+yaml":{source:"iana"},"application/vnd.oasis.opendocument.base":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"apache",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-master-template":{source:"iana"},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"apache",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"apache",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.onvif.metadata":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openvpi.dspx+json":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.procrate.brushset":{extensions:["brushset"]},"application/vnd.procreate.brush":{extensions:["brush"]},"application/vnd.procreate.dream":{extensions:["drm"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.pt.mundusmundi":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0,extensions:["xhtm"]},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.relpipe":{source:"iana"},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.sketchometry":{source:"iana"},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.smintio.portals.archive":{source:"iana"},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sybyl.mol2":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uic.osdm+json":{source:"iana",compressible:!0},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml","uo"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.veraison.tsm-report+cbor":{source:"iana"},"application/vnd.veraison.tsm-report+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw","vsdx","vtx"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vocalshaper.vsp4":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.wasmflow.wafl":{source:"iana"},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordlift":{source:"iana"},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xarin.cpj":{source:"iana"},"application/vnd.xecrets-encrypted":{source:"iana"},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/voucher-jws+json":{source:"iana",compressible:!0},"application/vp":{source:"iana"},"application/vp+cose":{source:"iana"},"application/vp+jwt":{source:"iana"},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blender":{extensions:["blend"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-compressed":{extensions:["rar"]},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-ipynb+json":{compressible:!0,extensions:["ipynb"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zip-compressed":{extensions:["zip"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xfdf":{source:"iana",extensions:["xfdf"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yaml":{source:"iana"},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+cbor":{source:"iana"},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yang-sid+json":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zip+dotlottie":{extensions:["lottie"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana",extensions:["adts","aac"]},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flac":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/matroska":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/midi-clip":{source:"iana"},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a","m4b"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"apache"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{source:"iana",compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp","dib"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/dpx":{source:"iana",extensions:["dpx"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/j2c":{source:"iana"},"image/jaii":{source:"iana",extensions:["jaii"]},"image/jais":{source:"iana",extensions:["jais"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpg","jpeg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm","jpgm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxl":{source:"iana",extensions:["jxl"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1,extensions:["jfif"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif","btf"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.clip":{source:"iana"},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"iana",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-adobe-dng":{extensions:["dng"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-emf":{source:"iana"},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-wmf":{source:"iana"},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/bhttp":{source:"iana"},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/mls":{source:"iana"},"message/news":{source:"apache"},"message/ohttp-req":{source:"iana"},"message/ohttp-res":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime","mht","mhtml"]},"message/s-http":{source:"apache"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"apache"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/jt":{source:"iana",extensions:["jt"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/prc":{source:"iana",extensions:["prc"]},"model/step":{source:"iana",extensions:["step","stp","stpnc","p21","210"]},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/u3d":{source:"iana",extensions:["u3d"]},"model/vnd.bary":{source:"iana",extensions:["bary"]},"model/vnd.cld":{source:"iana",extensions:["cld"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana",extensions:["pyo","pyox"]},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usda":{source:"iana",extensions:["usda"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"apache"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/hl7v2":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["md","markdown"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/prs.texi":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.exchangeable":{source:"iana"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"apache"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.vcf":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vnd.zoo.kcl":{source:"iana"},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/wgsl":{source:"iana",extensions:["wgsl"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/evc":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/h266":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/lottie+json":{source:"iana",compressible:!0},"video/matroska":{source:"iana"},"video/matroska-3d":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts","m2t","m2ts","mts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.planar":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"apache"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};var th,Vv;function PG(){return Vv||(Vv=1,th=DG),th}const TG={},kG=Object.freeze(Object.defineProperty({__proto__:null,default:TG},Symbol.toStringTag,{value:"Module"})),IG=sy(kG);var sh,jv;function MG(){if(jv)return sh;jv=1;var e={"prs.":100,"x-":200,"x.":300,"vnd.":400,default:900},t={nginx:10,apache:20,iana:40,default:30},s={application:1,font:2,audio:2,video:3,default:0};return sh=function(i,o="default"){if(i==="application/octet-stream")return 0;const[r,a]=i.split("/"),l=a.replace(/(\.|x-).*/,"$1"),c=e[l]||e.default,d=t[o]||t.default,u=s[r]||s.default,p=1-i.length/100;return c+d+u+p},sh}var zv;function AG(){return zv||(zv=1,(function(e){var t=PG(),s=IG.extname,n=MG(),i=/^\s*([^;\s]*)(?:;|\s|$)/,o=/^text\//i;e.charset=r,e.charsets={lookup:r},e.contentType=a,e.extension=l,e.extensions=Object.create(null),e.lookup=c,e.types=Object.create(null),e._extensionConflicts=[],d(e.extensions,e.types);function r(f){if(!f||typeof f!="string")return!1;var m=i.exec(f),v=m&&t[m[1].toLowerCase()];return v&&v.charset?v.charset:m&&o.test(m[1])?"UTF-8":!1}function a(f){if(!f||typeof f!="string")return!1;var m=f.indexOf("/")===-1?e.lookup(f):f;if(!m)return!1;if(m.indexOf("charset")===-1){var v=e.charset(m);v&&(m+="; charset="+v.toLowerCase())}return m}function l(f){if(!f||typeof f!="string")return!1;var m=i.exec(f),v=m&&e.extensions[m[1].toLowerCase()];return!v||!v.length?!1:v[0]}function c(f){if(!f||typeof f!="string")return!1;var m=s("x."+f).toLowerCase().slice(1);return m&&e.types[m]||!1}function d(f,m){Object.keys(t).forEach(function(C){var w=t[C],b=w.extensions;if(!(!b||!b.length)){f[C]=b;for(var x=0;x<b.length;x++){var S=b[x];m[S]=u(S,m[S],C);const y=p(S,m[S],C);y!==m[S]&&e._extensionConflicts.push([S,y,m[S]])}}})}function u(f,m,v){var C=m?n(m,t[m].source):0,w=v?n(v,t[v].source):0;return C>w?m:v}function p(f,m,v){var C=["nginx","apache",void 0,"iana"],w=m?C.indexOf(t[m].source):0,b=v?C.indexOf(t[v].source):0;return e.types[l]!=="application/octet-stream"&&(w>b||w===b&&e.types[l]?.slice(0,12)==="application/")||w>b?m:v}})(eh)),eh}var Wv=AG();const un=(e,t)=>{if(!(!e||!e.length||!t))for(const s of e){if(s.path===t)return s;const n=un(s.items,t);if(n)return n}},_o=(e,t)=>{if(!e?.length)return;if(!t)return e[0];const s=un(e,t);if(s&&s.nodeType===De.FOLDER)return s;const n=t.split("/").filter(Boolean);if(n.length<=1)return e[0];const i="/"+n.slice(0,n.length-1).join("/");return un(e,i)??e[0]},Uo=e=>(e??"").toLowerCase(),LG=e=>Uo(e).replace(/^\./,""),NG=e=>{if(!e)return[];const t=[],s=n=>{const i=n.items??[];for(const o of i)t.push(o),o.nodeType===De.FOLDER&&s(o)};return s(e),t},Gx=e=>(e.name??e.path.split("/").pop()??"").startsWith("."),ya=e=>{if(!e)return"0 bytes";const t=1024,s=t*1024;return e>=s?`${(e/s).toFixed(1)} MB`:e>=t?`${(e/t).toFixed(0)} KB`:`${e} bytes`},OG=(e,t="en-US",s={year:"numeric",month:"short",day:"2-digit"})=>{if(!e)return"";try{return new Intl.DateTimeFormat(t,s).format(new Date(e))}catch{return e}};function Ug(e,t,s){if(!e||e.includes("*/*"))return!0;const n=t.toLowerCase(),i=s&&s.includes(".")?`.${s.split(".").at(-1).toLowerCase()}`:void 0;return e.some(o=>{const r=o.toLowerCase();if(r.startsWith("."))return i===r;if(r.endsWith("/*")){const a=r.slice(0,-1);return n.startsWith(a)}return n===r})}const HG=e=>e?.map(t=>t.endsWith("/*")?t.replace("/*","s"):BG(t).flat().map(s=>`.${s}`)).flat().join(", ")||"",BG=e=>{const[t,s]=e.split("/");return t==="*"?["all"]:s==="*"?Object.entries(Wv.extensions).reduce((n,[i,o])=>{const[r]=i.split("/");return r===t&&n.push(...o),n},[]):Wv.extensions[e]||[]},xd=e=>{if(!e)return;const t=e.flags.replace(/[gy]/g,"");return new RegExp(e.source,t)};function $g(e,t,s){if(t&&xd(t)?.test(e.name))return s??`This ${e.isFolder?"folder":"file"} contains forbidden characters in its name. Please rename it.`}const GG=e=>{const t=e.lastIndexOf("/");return t>=0?{parent:e.slice(0,t),name:e.slice(t+1)}:{parent:"",name:e}},VG=(e,t,s)=>{const n=!e.contentLength||s==null||e.contentLength<=s,i=!e.contentType||Ug(t,e.contentType,e.name);return n&&i},jG=(e,t,s,n,i)=>{if(e.nodeType===De.FOLDER)return;const o=!e.contentLength||s==null||e.contentLength<=s;if(!(!e.contentType||Ug(t,e.contentType,e.name)))return n??(t?.length?`Unsupported file type. Supported types: ${HG(t)}.`:"Unsupported file type.");if(!o)return i??`File is too large. Maximum size: ${ya(s)}.`},zG=e=>e.replace(/\/+$/,"").split("/").filter(Boolean).length,Lr=e=>{const t=`${Hv} `,s=new RegExp(`^${Hv} (\\d+)$`),n=new Set(e.map(a=>a.name.toLowerCase())),i=e.map(a=>{const l=a.name.match(s);return l?parseInt(l[1],10):0}).reduce((a,l)=>Math.max(a,l),0);let o=`${t}${i+1}`,r=i+1;for(;n.has(o.toLowerCase());)r++,o=`${t}${r}`;return o},WG=e=>{const[t,s]=g.useState(e?.showHiddenFiles??!1),n=!!e?.onShowHiddenFilesChange,i=n?e.showHiddenFiles??!1:t,o=g.useCallback(a=>{n?e?.onShowHiddenFilesChange?.(a):s(a)},[n,e]),r=g.useCallback(()=>{const a=!i;n?e?.onShowHiddenFilesChange?.(a):s(a)},[i,n,e]);return{areHiddenFilesVisible:i,toggleHiddenFilesVisibility:r,setAreHiddenFilesVisible:o}},_G=e=>{const[t,s]=g.useState(e?.collapsed??!1),n=!!e?.onCollapseChange,i=n?e.collapsed??!1:t,o=g.useCallback(a=>{n?e?.onCollapseChange?.(a):s(a)},[n,e]),r=g.useCallback(()=>{const a=!i;n?e?.onCollapseChange?.(a):s(a)},[i,n,e]);return{isTreeCollapsed:i,toggleTreeCollapse:r,setIsTreeCollapsed:o}},_v=(e,t,s)=>{if(!t.has(e))return e;const n=s===De.FOLDER?(i,o)=>`${i} (${o})`:(i,o)=>{const r=i.lastIndexOf("."),a=r>0,l=a?i.slice(0,r):i,c=a?i.slice(r):"";return`${l} (${o})${c}`};for(let i=1;;i++){const o=n(e,i);if(!t.has(o))return o}},nh=e=>e.name,Vx=({getDestinationFiles:e,onResolve:t})=>{const[s,n]=g.useState([]),[i,o]=g.useState(!1),[r,a]=g.useState(null),l=g.useRef(!1),c=g.useCallback(x=>{l.current=!0,n(x),o(!0)},[]),d=g.useCallback(()=>{l.current=!1,o(!1),n([]),a(null)},[]),u=g.useCallback((x,S)=>{const y=e(x),R=new Set(y.map(nh)),E=S.filter(F=>R.has(F.name));return{hasConflicts:E.length>0,conflicts:E}},[e]),p=g.useCallback((x,S,y,R)=>{const E=e(x),F=new Set(E.map(nh));return S.map(P=>{const k=P.name,D=F.has(k),T=y&&D?k:_v(k,F,P.nodeType);return(!y||!D)&&F.add(T),{sourceUrl:P.path,destinationUrl:`${x}/${T}`,overwrite:y&&D,nodeType:P.nodeType??De.ITEM,...R??{}}})},[e]),f=g.useCallback((x,S,y,R)=>{const E=e(x),F=new Set(E.map(nh));return S.filter(k=>y.get(k.path)!==St.Cancel).map(k=>{const D=y.get(k.path),T=F.has(k.name),I=D===St.Replace&&T,H=I?k.name:_v(k.name,F,k.nodeType);return I||F.add(H),{sourceUrl:k.path,destinationUrl:`${x}/${H}`,overwrite:I,nodeType:k.nodeType??De.ITEM,...R??{}}})},[e]),m=g.useCallback((x,S,y)=>{const R=u(x,S);return R.hasConflicts&&(a({files:S,destinationFolder:x,metadata:y}),c(R.conflicts)),R},[u,c]),v=g.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:S,metadata:y}=r,R=p(S,x,!0,y);t?.(R,S),d()},[r,p,t,d]),C=g.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:S,metadata:y}=r,R=p(S,x,!1,y);t?.(R,S),d()},[r,p,t,d]),w=g.useCallback(()=>{if(!r)return;const{files:x,destinationFolder:S,metadata:y}=r,R=f(S,x,new Map(s.map(E=>[E.path,St.Cancel])),y);t?.(R,S),d()},[d,s,t,r,f]),b=g.useCallback(x=>{if(!r)return;const{files:S,destinationFolder:y,metadata:R}=r,E=new Map(x.map(P=>[P.file.path,P.action])),F=f(y,S,E,R);t?.(F,y),d()},[r,f,t,d]);return{conflictingFiles:s,conflictResolutionOpen:i,hasActiveConflictRef:l,checkForConflicts:u,startConflictResolution:m,resolveConflictsWithStrategy:p,resolveConflictsWithDecisions:f,openConflictResolution:c,closeConflictResolution:d,handleReplaceAll:v,handleDuplicateAll:C,handleCancelAll:w,handleDecideForEach:b}},UG=({getDestinationFiles:e,onCopyFiles:t,onMoveToFiles:s,onCopySuccess:n,onMoveSuccess:i,onDuplicateSuccess:o,getCopyHeader:r,getMoveHeader:a})=>{const[l,c]=g.useState(!1),[d,u]=g.useState([]),[p,f]=g.useState([]),[m,v]=g.useState(Rt.Copy),[C,w]=g.useState(),[b,x]=g.useState(null),{conflictingFiles:S,conflictResolutionOpen:y,hasActiveConflictRef:R,startConflictResolution:E,resolveConflictsWithStrategy:F,closeConflictResolution:P,openConflictResolution:k,handleReplaceAll:D,handleDuplicateAll:T,handleCancelAll:I,handleDecideForEach:H}=Vx({getDestinationFiles:e,onResolve:(J,ge)=>{J?.length&&(b?.type===Rt.Copy?(t?.(J,ge),n?.()):b?.type===Rt.Move&&b.sourceFolder&&(s?.(J,b.sourceFolder,ge),i?.()))}}),A=g.useCallback(()=>{u([]),f([]),x(null),w(void 0)},[]),O=g.useCallback(J=>{const ge=E(J,d,{type:Rt.Copy});if(x({type:Rt.Copy}),!ge.hasConflicts){const V=F(J,d,!1);t?.(V,J),n?.(),A()}},[d,E,F,t,n,A]),G=g.useCallback((J,ge)=>{const V=ge||(b?.sourceFolder??"/");if(!E(J,p,{type:Rt.Move,sourceFolderPath:V}).hasConflicts){const K=F(J,p,!0);s?.(K,V,J),i?.(),A()}},[p,E,F,s,i,A,b]),L=g.useCallback(()=>{D(),A()},[D,A]),U=g.useCallback(()=>{T(),A()},[T,A]),B=g.useCallback(()=>{I(),A()},[I,A]),N=g.useCallback(J=>{H(J),A()},[H,A]),W=g.useCallback(J=>{const ge=J.at(0)?.parentPath??"/",V=F(ge,J,!1);t?.(V,ge),o?.()},[t,o,F]),Y=g.useCallback(J=>{v(J),c(!0)},[]),te=g.useCallback(()=>{c(!1),R.current||A()},[A,R]),[we,Q]=g.useState(),ve=g.useCallback(J=>{u(J);const ge=J[0]?.parentPath??J[0]?.folderId;w(ge),r&&J.length>0?Q(r(J.length,J[0]?.name)):Q(void 0)},[r]),Pe=g.useCallback(J=>{f(J);const ge=J[0]?.parentPath??J[0]?.folderId;w(ge),x({type:Rt.Move,sourceFolder:ge}),a&&J.length>0?Q(a(J.length,J[0]?.name)):Q(void 0)},[a]);return{handleDuplicate:W,handleCloseDestinationFolderPopup:te,handleOpenDestinationFolderPopup:Y,handleCopyTo:O,handleMoveTo:G,openDestinationFolderPopup:l,destinationFolderMode:m,destinationFolderTitle:we,handleSetCopiedFiles:ve,handleSetMovedFiles:Pe,clearState:A,conflictingFiles:S,conflictResolutionOpen:y,openConflictResolution:k,closeConflictResolution:P,handleConflictReplace:L,handleConflictCancel:B,handleConflictDuplicate:U,handleConflictDecideForEach:N,sourceFolder:C}},$G=({path:e,defaultPath:t,onPathChange:s,onSelectionClear:n})=>{const i=e!==void 0,[o,r]=g.useState(t),a=i?e:o,l=g.useCallback(d=>{i||r(d),s?.(d)},[i,s]),c=g.useCallback(d=>{l(d),n?.()},[l,n]);return{currentPath:a,setCurrentPath:l,handlePathChange:c}},qG=({onDeleteFiles:e,onDeleteSuccess:t})=>{const[s,n]=g.useState(!1),[i,o]=g.useState([]),[r,a]=g.useState(""),l=g.useCallback((u,p)=>{o(u),a(p),n(!0)},[]),c=g.useCallback(()=>{n(!1),o([])},[]),d=g.useCallback(()=>{if(e&&i.length>0){const u=i.map(p=>({sourceUrl:p.path,nodeType:p.nodeType}));e(u,r),t?.()}c()},[i,e,t,c,r]);return{deleteConfirmationOpen:s,itemsToDelete:i,openDeleteConfirmation:l,closeDeleteConfirmation:c,confirmDelete:d}},KG=({onDownloadFiles:e,customDownloadItemsAction:t,onDownloadSuccess:s})=>({handleDownloadFiles:g.useCallback(i=>{t&&i.length>0?t(i):e&&i.length>0&&(e(i),s?.())},[e,s,t])}),YG=e=>"dataTransfer"in e&&e.dataTransfer!==null,ZG=({onUploadFiles:e,onValidateUpload:t,maxFileSize:s,allowedFileTypes:n,validationMessages:i={},onUploadArchive:o,prepareUploadFileName:r,uploadEnabled:a=!0,currentFolder:l}={})=>{const[c,d]=g.useState(!1),[u,p]=g.useState(!1),[f,m]=g.useState(),v=g.useRef(null),C=g.useRef(""),w=g.useRef([]),b=g.useMemo(()=>!!l?.permissions?.includes(to.WRITE),[l]),[x,S]=g.useState(new Map),[y,R]=g.useState(null),E=g.useCallback(q=>!n||n.includes("*/*")?q:q.filter(({fileContent:ue,name:he})=>Ug(n,ue.type,he)),[n]),F=g.useCallback(()=>{S(new Map),R(null)},[]),{conflictingFiles:P,conflictResolutionOpen:k,hasActiveConflictRef:D,startConflictResolution:T,closeConflictResolution:I,openConflictResolution:H,handleReplaceAll:A,handleDuplicateAll:O,handleCancelAll:G,handleDecideForEach:L}=Vx({getDestinationFiles:()=>w.current,onResolve:(q,ue)=>{if(!a||!b){F();return}if(!y)return;const he=q.map(se=>{const re=x.get(se.sourceUrl);if(!re)return;const Oe=se.destinationUrl.split("/").pop();return{fileContent:re.fileContent,name:Oe}}).filter(Boolean);if(he[0]?.fileContent?.type==="application/zip"){const{fileContent:se,name:re}=he[0];o?.(se,re,ue)}else he.length>0&&e?.(he,ue);F()}});g.useEffect(()=>{a&&b||(d(!1),p(!1),m(void 0),I(),F())},[a,I,F,b]),g.useEffect(()=>{if(!a||!b)return;let q=0;const ue=Oe=>{YG(Oe)&&Oe.dataTransfer.types.includes(wG)&&(q++,p(!0))},he=()=>{q--,q===0&&p(!1)},se=()=>{q=0,p(!1)},re=Oe=>{Oe.preventDefault()};return window.addEventListener("dragenter",ue),window.addEventListener("dragleave",he),window.addEventListener("drop",se),window.addEventListener("dragover",re),()=>{window.removeEventListener("dragenter",ue),window.removeEventListener("dragleave",he),window.removeEventListener("drop",se),window.removeEventListener("dragover",re)}},[a,b]);const U=g.useCallback(q=>s?q.filter(ue=>ue.fileContent.size>s).map(ue=>ue.name):[],[s]),B=g.useCallback((q,ue)=>q.map(he=>({id:he.name,name:he.name,folderId:ue,path:he.name,nodeType:De.ITEM,parentPath:ue,contentLength:he.fileContent.size})),[]),N=g.useCallback(async(q,ue,he)=>{if(!a||!b)return!1;m(void 0),w.current=he;const se=r?q.map(ke=>({...ke,name:r(ke.name)})):q,re=U(se);if(re.length>0){const ke=s?(s/1048576).toFixed(2):0,qe=i.oversizedFiles||`Files exceed maximum size (${ke}MB): ${re.join(", ")}`;return m(qe),!1}if(t)try{const ke=await t(se,he,ue);if(!ke.valid)return m(ke.message||i.validationFailed||"Validation failed"),!1}catch{return m(i.validationError||"Validation error occurred"),!1}const Oe=new Map(se.map(ke=>[ke.name,ke]));S(Oe);const Ae=B(se,ue);return R({destinationFolder:ue}),T(ue,Ae,{destinationFolder:ue}).hasConflicts?!1:(e?.(se,ue),F(),!0)},[a,e,t,r,U,s,i,B,T,F,b]),W=g.useCallback(()=>{A(),F()},[A,F]),Y=g.useCallback(()=>{O(),F()},[O,F]),te=g.useCallback(()=>{G(),F()},[G,F]),we=g.useCallback(q=>{L(q),F()},[L,F]),Q=g.useCallback(()=>{I(),D.current||F()},[I,D,F]),ve=g.useCallback(q=>{!a||!b||(q.preventDefault(),q.stopPropagation(),q.dataTransfer.types.includes("Files")&&d(!0))},[a,b]),Pe=g.useCallback(q=>{if(!a||!b)return;q.preventDefault(),q.stopPropagation();const ue=q.currentTarget.getBoundingClientRect(),he=q.clientX,se=q.clientY;(he<=ue.left||he>=ue.right||se<=ue.top||se>=ue.bottom)&&d(!1)},[a,b]),J=g.useCallback(q=>{!a||!b||(q.preventDefault(),q.stopPropagation(),q.dataTransfer.types.includes("Files")&&(q.dataTransfer.dropEffect="copy"))},[a,b]),ge=g.useCallback(async(q,ue,he)=>{if(!a||!b||(q.preventDefault(),q.stopPropagation(),d(!1),!q.dataTransfer.types.includes("Files")))return;const se=Array.from(q.dataTransfer.items||[]),re=[];let Oe=!1;if(se.length>0&&se.forEach(ke=>{if(ke.kind==="file"){if(ke.webkitGetAsEntry?.()?.isDirectory){Oe=!0;return}const ot=ke.getAsFile?.();ot&&re.push(ot)}}),re.length===0&&q.dataTransfer.files?.length&&re.push(...Array.from(q.dataTransfer.files)),re.length===0){Oe&&m(i.foldersNotSupported||"Folder upload is not supported");return}const Ae=re.map(ke=>({fileContent:ke,name:ke.name})),Ce=E(Ae);if(Ce.length===0){m(i.unsupportedFiles||"Selected files are not supported");return}await N(Ce,ue,he)},[a,E,N,i,b]),V=g.useRef(()=>{});g.useEffect(()=>{V.current=async()=>{const q=v.current;if(!q)return;if(!a||!b){q.value="";return}if(!q.files?.length)return;const he=Array.from(q.files).map(re=>({fileContent:re,name:re.name})),se=E(he);if(se.length===0){m(i.unsupportedFiles||"Selected files are not supported"),q.value="";return}try{await N(se,C.current,w.current)}catch{m(i.validationError||"Upload failed")}finally{q.value=""}}},[a,b,E,N,i]),g.useEffect(()=>{const q=document.createElement("input");q.type="file",q.multiple=!0,q.style.display="none",document.body.appendChild(q),v.current=q;const ue=()=>V.current?.();return q.addEventListener("change",ue),()=>{q.removeEventListener("change",ue),v.current===q&&(document.body.removeChild(q),v.current=null)}},[]),g.useEffect(()=>{const q=v.current;q&&(n&&n.length>0?q.accept=n.join(","):q.removeAttribute("accept"))},[n]);const $=g.useCallback((q,ue)=>{!a||!b||(C.current=q,w.current=ue,v.current&&v.current.click())},[a,b]),K=g.useCallback((q,ue)=>{if(!o||!a||!b)return;const he=document.createElement("input");he.type="file",he.accept=".zip,application/zip",he.multiple=!1,he.style.display="none";const se=()=>{const re=he.files?.[0];if(!re){document.body.removeChild(he);return}const Oe=re.name.replace(/\.zip$/i,""),Ae=r?r(Oe):Oe,Ce={id:Ae,name:Ae,folderId:q,path:`${q}/${Ae}`,nodeType:De.FOLDER,parentPath:q,contentLength:re.size,contentType:re.type};if(w.current=ue,R({destinationFolder:q}),S(new Map([[Ce.path,{fileContent:re,name:Ae}]])),T(q,[Ce],{destinationFolder:q}).hasConflicts){document.body.removeChild(he);return}try{o(re,Ae,q)}finally{document.body.removeChild(he)}};he.addEventListener("change",se),document.body.appendChild(he),he.click()},[o,a,b,T,r]),ce=g.useCallback(()=>{m(void 0)},[]);return{isDragging:c,isDraggingOverWindow:u,uploadError:f,handleDragEnter:ve,handleDragLeave:Pe,handleDragOver:J,handleDrop:ge,clearError:ce,handleUpload:N,openFileDialog:$,openArchiveDialog:K,fileInputRef:v,uploadConflictingFiles:P,uploadConflictResolutionOpen:k,hasActiveUploadConflictRef:D,openUploadConflictResolution:H,closeUploadConflictResolution:Q,handleUploadConflictReplace:W,handleUploadConflictDuplicate:Y,handleUploadConflictCancel:te,handleUploadConflictDecideForEach:we}},jx=g.createContext(void 0),zx={hiddenItemWarning:`${Ye.Warning}__A dot at the start of the name will make the item hidden`},Wx={consecutiveDotsError:"Name cannot contain consecutive dots"},XG={emptyName:"Name cannot be empty",duplicateName:"An item with this name already exists",hiddenItemWarning:zx.hiddenItemWarning,consecutiveDotsError:Wx.consecutiveDotsError};function QG(e){let t=e.length;for(;t>0&&e[t-1]==="/";)t--;return e.slice(0,t)}function JG(e,t){const s=QG(e),n=s.lastIndexOf("/");return n===-1?t:s.slice(0,n+1)+t}function eV(e){const t=e.lastIndexOf(".");return t===-1||t===0?e:e.substring(0,t)}function Uv(e){const t=e.lastIndexOf(".");return t===-1||t===0?"":e.substring(t)}const tV=({items:e,onRenameValidate:t,validationMessages:s,onMoveToFiles:n})=>{const[i,o]=g.useState(),r=g.useMemo(()=>({...XG,...s}),[s]),a=g.useMemo(()=>i?.path,[i]),l=g.useCallback(f=>{const m=un(e,f);m&&o(m)},[e]),c=g.useCallback(()=>{o(void 0)},[]),d=g.useCallback(f=>{if(!i||!n){o(void 0);return}const m=i.nodeType===De.ITEM;let v=f.trim();if(m){const x=Uv(i.name);x&&!v.endsWith(x)&&(v=v+x)}if(v===i.name){o(void 0);return}const C=JG(i.path,v),w=i.parentPath;if(!w){o(void 0);return}const b={sourceUrl:i.path,destinationUrl:C,nodeType:i.nodeType};n([b],w,w),o(void 0)},[i,n]),u=g.useCallback((f,m)=>{const v=f.trim();if(!v)return r.emptyName;if(v.includes(".."))return r.consecutiveDotsError;if(v.startsWith("."))return r.hiddenItemWarning;const C=m.nodeType===De.ITEM;let w=v;if(C){const x=Uv(m.name);x&&!w.endsWith(x)&&(w=w+x)}const b=m.parentPath;if(b){const x=un(e,b);if(x&&new Set((x.items??[]).filter(y=>y.path!==m.path).map(y=>y.name.toLowerCase())).has(w.toLowerCase()))return r.duplicateName}if(t){const x=t(w,m);if(x)return x}return null},[t,r,e]),p=g.useCallback(f=>f.nodeType===De.ITEM?eV(f.name):f.name,[]);return{renamedPath:a,renamedItem:i,renameHandler:l,renameSaveHandler:d,renameCancelHandler:c,renameValidateHandler:u,getDisplayName:p}},_x=e=>{const[t,s]=g.useState(e?.expandedPaths??new Set),n=g.useMemo(()=>!!e?.onExpandedPathsChange,[e?.onExpandedPathsChange]),i=g.useMemo(()=>n?e?.expandedPaths??new Set:t,[n,e?.expandedPaths,t]);g.useEffect(()=>{n&&e?.expandedPaths&&s(new Set(e.expandedPaths))},[n,e?.expandedPaths]);const o=g.useCallback(d=>{n?e?.onExpandedPathsChange?.(d):s(d)},[n,e]),r=g.useCallback(d=>{const u=new Set(i);u.has(d)?u.delete(d):u.add(d),o(u)},[i,o]),a=g.useCallback(()=>{o(new Set)},[o]),l=g.useCallback(d=>{const u=new Set(i);u.add(d),o(u)},[i,o]),c=g.useCallback(d=>{const u=new Set(i);u.delete(d),o(u)},[i,o]);return{expandedPaths:i,setExpandedPaths:o,togglePath:r,collapseAll:a,expandPath:l,collapsePath:c,isControlled:n}},sV=({newActions:e,currentFolder:t,onUploadFiles:s,onCreateFolder:n,onUploadArchive:i,onCreateNewItem:o,isNewButtonDisabled:r})=>{const a=g.useMemo(()=>{const d=[];return e&&(e.newFolder&&d.push({key:"new-folder",label:e.newFolder.label,icon:e?.newFolder?.icon!==void 0?e?.newFolder?.icon:h.jsx(z.IconFolder,{...ae,className:"text-secondary"}),onClick:()=>{n&&n()}}),e.newItem&&d.push({key:"new-item",label:e.newItem.label,icon:e?.newItem?.icon!==void 0?e?.newItem?.icon:h.jsx(z.IconPlus,{...ae,className:"text-secondary"}),onClick:()=>{o&&o()}}),e.uploadFiles&&d.push({key:"upload-file",label:e.uploadFiles.label,icon:e?.uploadFiles?.icon!==void 0?e?.uploadFiles?.icon:h.jsx(z.IconFile,{...ae,className:"text-secondary"}),onClick:()=>{s&&s()}}),e.uploadArchive&&d.push({key:"upload-archive",label:e.uploadArchive.label,icon:e?.uploadArchive?.icon!==void 0?e?.uploadArchive?.icon:h.jsx(z.IconFileZip,{...ae,className:"text-secondary"}),onClick:()=>{i&&i()}})),d},[e,n,s,i,o]),l=g.useMemo(()=>a?.length>0,[a]),c=g.useMemo(()=>!t?.permissions?.includes(to.WRITE)||!!r,[t,r]);return{newActions:a,isNewButtonVisible:l,isNewButtonDisabled:c}},nV={emptyName:"Folder name cannot be empty",duplicateName:"A folder with this name already exists",hiddenItemWarning:zx.hiddenItemWarning,consecutiveDotsError:Wx.consecutiveDotsError},iV=({currentFolder:e,onCreateFolder:t,onValidateFolderName:s,validationMessages:n,items:i=[]})=>{const[o,r]=g.useState(!1),[a,l]=g.useState(null),[c,d]=g.useState(Ss.Folder),[u,p]=g.useState(null),[f,m]=g.useState(null),[v,C]=g.useState(""),w=g.useRef(e?.path),b=g.useMemo(()=>({...nV,...n}),[n]),x=g.useMemo(()=>{if(c===Ss.Folder)return e;if(c===Ss.Sibling&&u){const T=_o(i,u.parentPath||"");return{path:u.parentPath,items:T?.items||[],nodeType:De.FOLDER,name:u?.parentPath?.split("/")?.pop()||"",folderId:""}}return c===Ss.Child?u:e},[c,u,e,i]);g.useEffect(()=>{const T=x?.path;w.current!==T&&o&&(r(!1),l(null),C("")),w.current=T},[x?.path,o]);const S=g.useCallback(()=>{if(o)return;w.current=e?.path||"/";const T=`__new_folder_${Date.now()}`,I=(e?.items??[]).filter(A=>A.nodeType===De.FOLDER),H=Lr(I);l(T),C(H),r(!0),d(Ss.Folder),p(e||null)},[o,e]),y=g.useCallback(T=>{if(o)return;w.current=T?.parentPath||"/";const I=`__new_folder_${Date.now()}`,A=(_o(i,T?.parentPath||"/")?.items??[]).filter(G=>G.nodeType===De.FOLDER),O=Lr(A);C(O),l(I),r(!0),d(Ss.Sibling),p(T),m(T?.parentPath||"/")},[o,i]),R=g.useCallback(T=>{if(o)return;w.current=T.path;const I=`__new_folder_${Date.now()}`,H=(T?.items??[]).filter(O=>O.nodeType===De.FOLDER),A=Lr(H);C(A),l(I),r(!0),d(Ss.Child),p(T),m(T?.path||"/")},[o]),E=g.useCallback(T=>{if(o)return;w.current=T?.parentPath||"/";const H=(_o(i,T?.parentPath||"/")?.items??[]).filter(O=>O.nodeType===De.FOLDER),A=Lr(H);C(A),d(Ss.Sibling),p(T),m(T?.parentPath||"/"),r(!0)},[o,i]),F=g.useCallback(T=>{if(o)return;w.current=T.path;const I=(T?.items??[]).filter(A=>A.nodeType===De.FOLDER),H=Lr(I);C(H),d(Ss.Child),p(T),m(T?.path||"/"),r(!0)},[o]),P=g.useCallback(()=>{r(!1),l(null),d(Ss.Folder),p(null),m(null),w.current=void 0,C("")},[]),k=g.useCallback(T=>{const I=T.trim();if(!I)return b.emptyName;if(I.includes(".."))return b.consecutiveDotsError;if(I.startsWith(".")&&I.length>1)return b.hiddenItemWarning;if(x&&x.items&&new Set((x.items??[]).filter(A=>A.nodeType===De.FOLDER).map(A=>A.name.toLowerCase())).has(I.toLowerCase()))return b.duplicateName;if(s&&x){const H=s(I,x);if(H)return H}return null},[x,s,b]),D=g.useCallback(async T=>{const I=T.trim();if(!I)return;P();const A=`${x?.path??"/"}/${I}`,O=`${A}/${Ju}`,L={fileContent:new File([],Ju,{type:"text/plain"}),name:Ju};t&&await t(L,A,O)},[x,t,P]);return{isCreatingFolder:o,createdFolderPath:f,newFolderTempId:a,newFolderDefaultName:v,startFolderCreation:S,startGridSiblingFolderCreation:y,startTreeSiblingFolderCreation:E,startGridChildFolderCreation:R,startTreeChildFolderCreation:F,cancelFolderCreation:P,saveFolderCreation:D,validateFolderName:k}},oV=({additionalButtons:e,expandedPathsLength:t,collapseAll:s})=>{const n=t===0;return{additionalButtons:g.useMemo(()=>{const o=M(["hover:text-accent-primary",n&&"controls-secondary-disable hover:controls-secondary-disable disabled:hover:cursor-default"]);return h.jsxs(h.Fragment,{children:[e,h.jsx(hn,{disabled:n,className:o,size:me.Small,onClick:s,icon:h.jsx(z.IconCopyMinus,{size:Ne.LG,stroke:1.5}),"aria-label":"collapse-all"})]})},[e,n,s])}},rV=({onGetInfo:e})=>{const[t,s]=g.useState(!1),[n,i]=g.useState(void 0),o=g.useCallback(async a=>{i(a),s(!0),e&&await e(a)},[e]),r=g.useCallback(()=>{s(!1),i(void 0)},[]);return{isMetadataPopupOpen:t,selectedFileForMetadata:n,openMetadataPopup:o,closeMetadataPopup:r}};function aV(e){const t=[];function s(n){for(const i of n)t.push(i),i.items&&s(i.items)}return s(e),t}function $v(e,t){const s=Uo(t);return e.filter(n=>Uo(n.name).includes(s))}function lV({onSearchFiles:e,clearSearchResults:t,currentPath:s,searchResults:n=[],searchInProgress:i=!1,navigationPanelValue:o,onNavigationPanelSearchChange:r,allItems:a=[],activeTab:l}){const[c,d]=g.useState(""),u=g.useRef(!1),p=g.useRef(!1),f=g.useRef([]),m=g.useRef(s),v=g.useRef(l);g.useEffect(()=>{o!=null&&d(String(o))},[o]);const C=String(o??c??"").trim(),w=p.current&&(i||n.length>0||C!==""),b=g.useCallback(R=>{const E=R.trim();if(!E){p.current=!1,u.current=!1;return}p.current=!0,e&&s&&!u.current&&(u.current=!0,e(s,E))},[e,s]),x=g.useCallback(()=>{u.current=!1,p.current=!1,f.current=[],d(""),r?.(""),t?.()},[t,r]),S=g.useCallback(R=>{const E=String(R??"");d(E),r?.(E),E.trim()?b(E):x()},[r,b,x]);g.useEffect(()=>{(m.current!==s||v.current!==l)&&(m.current=s,v.current=l,u.current=!1,p.current=!1,f.current=[],d(""),r?.(""),t?.())},[s,l,r,t]),g.useEffect(()=>{i||(f.current=n)},[n,i]);const y=g.useMemo(()=>{if(e){const E=i?f.current:n;return!C||E.length===0?E:$v(E,C)}if(!C||!a.length)return[];const R=aV(a);return $v(R,C)},[e,n,i,C,a]);return{isSearchMode:w,searchValue:c,effectiveSearchValue:C,setSearchValue:d,handleSearchChange:S,handleSearchActivate:b,handleSearchClear:x,searchResultsRows:y}}function cV({selectedPaths:e,defaultSelectedPaths:t,onSelectedPathsChange:s}){const n=e!==void 0,[i,o]=g.useState(()=>t??new Set),r=g.useMemo(()=>n?e:i,[n,e,i]),a=g.useCallback(c=>{const d=new Set(c);s?.(d),n||o(d)},[n,s]),l=g.useCallback(()=>{a(new Set)},[a]);return{selectedPaths:r,setSelectedPaths:a,clearSelection:l,isControlled:n}}const Ux=':;,=/{}%&\\"',qg=`(\r
|
|
70
|
+
|
|
|
71
|
+
|\r| )|[\0-]`,dV=`[${Ux.replace(/\\/g,"\\\\")}]`,$x=new RegExp(`${dV}|${qg}`),uV=new RegExp(qg),qx=({managerLabel:e,children:t,className:s,items:n=[],rootItem:i,path:o,defaultPath:r,filesLoading:a,selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d,showHiddenFiles:u,onShowHiddenFilesChange:p,treeOptions:f,showNavigationPanel:m=!0,navigationPanelOptions:v,deleteConfirmationOptions:C,gridOptions:w,toolbarOptions:b,bulkActionsToolbarOptions:x,destinationFolderPopupOptions:S,conflictResolutionPopupOptions:y,onPathChange:R,onTableFileClick:E,handleSelectionClick:F,onGridApiChange:P,onCopyFiles:k,onMoveToFiles:D,onDeleteFiles:T,onDownloadFiles:I,onRenameValidate:H,renameValidationMessages:A,forbiddenSymbolsRegExp:O=$x,forbiddenSymbolsTooltip:G,onUploadFiles:L,onValidateUpload:U,uploadEnabled:B,uploadValidationMessages:N,maxFileSize:W,onUploadArchive:Y,prepareUploadFileName:te,onCreateFolder:we,onCreateFolderValidate:Q,folderCreationValidationMessages:ve,fileMetadataPopupOptions:Pe,onGetInfo:J,onUnshareFiles:ge,onRemoveFilesAccess:V,actionsRef:$,sharedByMePaths:K,onSearchFiles:ce,searchResults:q,searchInProgress:ue,clearSearchResults:he,allowedFileTypes:se,maxSelectableFileSize:re,getDisabledTooltip:Oe,fileTooLargeTooltip:Ae,unsupportedFileTypeTooltip:Ce,emptyStateIcon:ke,emptyStateTitle:qe,emptyStateDescription:ot,sharedWithMeIds:Ve,onFolderPopupPathChange:wt,onManagePermissions:ze,onPreview:_e,onOpenInNewTab:Z,previewExtensions:Ue,isRenameFileAvailable:ts,isDuplicateFolderAvailable:ci,customUploadFileAction:Sn,customCreateNewItemAction:no,customDuplicateAction:di,customDeleteItemsAction:oe,customDownloadItemsAction:nt,customBreakpointRef:io,gridClassName:oo,nonClickableTableColumns:ja,hideSearchPathItemName:Rn,showHiddenFileSwitcherInDestinationPopup:ro,showCreateFolderButtonInDestinationPopup:za,autoSelectUploadedItems:Xs=!1,maxNewFolderDepth:Dt,onNewFolderDepthExceeded:cr,initialUploadFilesOpen:Wa})=>{const{selectedPaths:Qs,clearSelection:Js,setSelectedPaths:ui}=cV({selectedPaths:l,defaultSelectedPaths:c,onSelectedPathsChange:d}),_a=g.useRef(!1),Fn=g.useRef(null),Ed=g.useCallback((Se,Ze,tt)=>{if(Xs){const{parent:tn,name:Qd}=GG(Ze);Fn.current={fileNames:new Set([Qd]),destinationFolder:tn}}we?.(Se,Ze,tt)},[we,Xs]),Dd=g.useCallback((Se,Ze)=>{Xs&&(Fn.current={fileNames:new Set(Se.map(tt=>tt.name)),destinationFolder:Ze}),L?.(Se,Ze)},[L,Xs]),Pd=g.useCallback((Se,Ze,tt)=>{Xs&&(Fn.current={fileNames:new Set([Ze]),destinationFolder:tt}),Y?.(Se,Ze,tt)},[Y,Xs]),Td=g.useMemo(()=>{const Se=new Map;return Qs.forEach(Ze=>{const tt=un(n,Ze);tt&&Se.set(Ze,tt)}),Se},[Qs,n]);g.useEffect(()=>{if(Qs.size===0)return;let Se=!1;for(const Ze of Qs)if(!un(n,Ze)){Se=!0;break}if(Se){const Ze=new Set;for(const tt of Qs)un(n,tt)&&Ze.add(tt);ui(Ze)}},[n,Qs,ui]);const{currentPath:mt,setCurrentPath:Kt,handlePathChange:en}=$G({path:o,defaultPath:r,onPathChange:R,onSelectionClear:Js}),dr=g.useMemo(()=>{const{showFiles:Se=!0,showFolders:Ze=!0,...tt}=w||{};return{showFiles:Se,showFolders:Ze,...tt}},[w]),ur=dr.showFiles,En=dr.showFolders,[ao,kd]=g.useState(),Ua=S?.destinationFolderPath??ao,Dn=g.useCallback(Se=>{S?.setDestinationFolderPath?S.setDestinationFolderPath(Se):kd(Se)},[S]),{areHiddenFilesVisible:hi,toggleHiddenFilesVisibility:$a}=WG({showHiddenFiles:u,onShowHiddenFilesChange:p}),{isTreeCollapsed:qa,toggleTreeCollapse:lo,setIsTreeCollapsed:Id}=_G({collapsed:f?.collapsed,onCollapseChange:f?.onCollapseChange}),{renamedPath:co,renamedItem:Md,renameHandler:Ad,renameSaveHandler:Ld,renameCancelHandler:Nd,renameValidateHandler:Od,getDisplayName:hr}=tV({items:n,onRenameValidate:H,validationMessages:A,onMoveToFiles:D}),{isSearchMode:uo,searchValue:Ka,effectiveSearchValue:pr,setSearchValue:gr,handleSearchChange:fr,handleSearchClear:pt,searchResultsRows:Ya}=lV({onSearchFiles:ce,clearSearchResults:he,currentPath:mt,searchResults:q,searchInProgress:ue,navigationPanelValue:v?.value,onNavigationPanelSearchChange:v?.onSearchChange,allItems:n,activeTab:b?.activeTab}),rt=g.useMemo(()=>_o(n,mt)??n[0],[n,mt]),us=g.useCallback((Se,Ze)=>!Ze||!Se?!1:zG(Se.path)>Ze,[]),ss=g.useCallback(()=>{cr?.()},[cr]),{handleCopyTo:Za,handleMoveTo:Xa,handleDuplicate:Qa,handleOpenDestinationFolderPopup:ho,handleCloseDestinationFolderPopup:Ja,openDestinationFolderPopup:Pn,handleSetCopiedFiles:Hd,handleSetMovedFiles:el,destinationFolderMode:tl,destinationFolderTitle:Bd,conflictingFiles:sl,conflictResolutionOpen:Gd,closeConflictResolution:nl,handleConflictReplace:mr,handleConflictDuplicate:Vd,handleConflictCancel:jd,handleConflictDecideForEach:zd,sourceFolder:Wd}=UG({getDestinationFiles:Se=>_o(n,Se)?.items??[],onCopyFiles:k,onMoveToFiles:D,onCopySuccess:Js,onMoveSuccess:Js,onDuplicateSuccess:Js,getCopyHeader:S?.getCopyHeader,getMoveHeader:S?.getMoveHeader});g.useEffect(()=>{Pn||Dn(void 0)},[Pn,Dn]);const{deleteConfirmationOpen:_d,itemsToDelete:il,openDeleteConfirmation:ol,closeDeleteConfirmation:rl,confirmDelete:po}=qG({onDeleteFiles:T,onDeleteSuccess:Js}),{handleDownloadFiles:Tn}=KG({onDownloadFiles:I,customDownloadItemsAction:nt,onDownloadSuccess:Js}),{isDragging:Ud,isDraggingOverWindow:hs,uploadError:$d,handleDragEnter:vr,handleDragLeave:go,handleDragOver:pi,handleDrop:Cr,clearError:al,openFileDialog:wr,fileInputRef:ll,openArchiveDialog:br,uploadConflictingFiles:qd,uploadConflictResolutionOpen:Kd,closeUploadConflictResolution:cl,handleUploadConflictReplace:xr,handleUploadConflictDuplicate:Yd,handleUploadConflictCancel:Zd,handleUploadConflictDecideForEach:yr}=ZG({onUploadFiles:Dd,onValidateUpload:U,maxFileSize:W,onUploadArchive:Pd,prepareUploadFileName:te,allowedFileTypes:se,validationMessages:N,uploadEnabled:B,currentFolder:rt}),dl=g.useCallback(Se=>{pt();const Ze=mt??"",tt=rt?.items??[];Cr(Se,Ze,tt)},[mt,rt,Cr,pt]),gi=g.useCallback(()=>{pt();const Se=mt??"",Ze=rt?.items??[];wr(Se,Ze)},[mt,rt,wr,pt]),ul=g.useCallback(()=>{pt();const Se=mt??"",Ze=rt?.items??[];br(Se,Ze)},[mt,rt,br,pt]),hl=g.useCallback(()=>{pt(),Sn?.(mt,rt)},[Sn,mt,rt,pt]),pl=g.useCallback(()=>{pt(),no?.(mt,rt)},[no,mt,rt,pt]),Xd=g.useCallback(Se=>{di?.(Se)},[di]),{isCreatingFolder:ne,newFolderTempId:Qe,createdFolderPath:ut,newFolderDefaultName:jt,startFolderCreation:kn,startGridSiblingFolderCreation:tf,startTreeSiblingFolderCreation:sf,startGridChildFolderCreation:nf,startTreeChildFolderCreation:of,cancelFolderCreation:M0,saveFolderCreation:A0,validateFolderName:L0}=iV({currentFolder:rt,onCreateFolder:Ed,onValidateFolderName:Q,validationMessages:ve,items:n}),rf=g.useCallback(()=>{if(Dt&&us(rt,Dt-1)){ss();return}pt(),kn()},[pt,kn,rt,Dt,us,ss]),{newActions:N0,isNewButtonVisible:O0,isNewButtonDisabled:H0}=sV({newActions:b?.newActions,currentFolder:rt,onUploadFiles:Sn?hl:gi,onUploadArchive:ul,onCreateFolder:rf,onCreateNewItem:pl,isNewButtonDisabled:b?.isNewButtonDisabled}),B0=g.useMemo(()=>{if(uo){let $e=Ya;ur||($e=$e.filter(at=>at.nodeType!==De.ITEM)),En||($e=$e.filter(at=>at.nodeType!==De.FOLDER)),hi||($e=$e.filter(at=>!at.path.split("/").filter(Boolean).some(Fr=>Fr.startsWith("."))));const Rr=$e.map(at=>({...at,id:at.id??at.path,name:at.name??at.path.split("/").pop()??"",updatedAt:at.updatedAt,size:at.contentLength,contentLength:at.contentLength,author:at.author,path:at.path,nodeType:at.nodeType,extension:at.extension,isTemporary:!1,owner:at.owner,folderId:at.folderId}));return ne&&Qe&&Rr.unshift({id:Qe,name:jt,updatedAt:void 0,author:void 0,path:mt??"/",nodeType:De.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),Rr}const Se=Uo(pr).trim(),Ze=rt?.items??[];let tt=Se?NG(rt):Ze;ur||(tt=tt.filter($e=>$e.nodeType!==De.ITEM)),En||(tt=tt.filter($e=>$e.nodeType!==De.FOLDER)),hi||(tt=tt.filter($e=>Se?!$e.path.split("/").filter(Boolean).some(at=>at.startsWith(".")):!Gx($e)));const tn=tt.map($e=>({...$e,id:$e.id??$e.path,name:$e.name??$e.path.split("/").pop()??"",updatedAt:$e.updatedAt,size:$e.contentLength,author:$e.author,path:$e.path,nodeType:$e.nodeType,extension:$e.extension,isTemporary:!1,owner:$e.owner,contentType:$e.contentType,contentLength:$e.contentLength,folderId:$e.folderId}));if(ne&&Qe&&!Se&&tn.unshift({id:Qe,name:jt,updatedAt:void 0,author:void 0,path:mt??"/",nodeType:De.FOLDER,extension:void 0,isTemporary:!0,owner:void 0}),!Se)return tn;const Qd=Se.split(/\s+/).filter(Boolean);return tn.filter($e=>{if($e.isTemporary)return!0;const Rr=Uo($e.name),at=Uo($e.author),lf=LG($e.extension);return Qd.every(Fr=>Rr.includes(Fr)||at.includes(Fr)||lf.includes(Fr))})},[uo,Ya,rt,pr,hi,ne,Qe,jt,ur,En,mt]);g.useEffect(()=>{const Se=Fn.current;if(!Se)return;if((mt??"")!==Se.destinationFolder){Fn.current=null;return}const Ze=_o(n,Se.destinationFolder);if(!Ze?.items)return;const tt=new Set;for(const tn of Ze.items)Se.fileNames.has(tn.name)&&VG(tn,se,re)&&tt.add(tn.path);tt.size>0&&(ui(tt),Fn.current=null)},[n,mt,ui,se,re]),g.useEffect(()=>{!_a.current&&Wa&&(gi(),_a.current=!0)},[Wa,gi]);const G0=g.useCallback(Se=>{en(Se.path)},[en]),V0=g.useCallback(Se=>{en(Se)},[en]),j0=g.useCallback(Se=>{Se.nodeType===De.FOLDER?en(Se.path):E?.(Se)},[en,E]),{expandedPaths:fo,setExpandedPaths:Sr,collapseAll:z0}=_x({expandedPaths:f?.expandedPaths,onExpandedPathsChange:f?.onExpandedPathsChange}),{additionalButtons:W0}=oV({collapseAll:z0,expandedPathsLength:fo.size,additionalButtons:f?.additionalButtons}),_0=g.useCallback(Se=>{if(Se.length>0){if(Dt&&us(Se[0],Dt)){ss();return}pt(),tf(Se[0])}},[pt,tf,Dt,us,ss]),U0=g.useCallback(Se=>{if(Se.length>0){if(Dt&&us(Se[0],Dt-1)){ss();return}pt(),Kt(Se[0].path),Sr(new Set(fo).add(Se[0].path||"/")),nf(Se[0])}},[pt,nf,fo,Sr,Kt,ss,Dt,us]),$0=g.useCallback(Se=>{if(Se.length>0){if(Dt&&us(Se[0],Dt)){ss();return}pt(),sf(Se[0])}},[pt,sf,Dt,us,ss]),q0=g.useCallback(Se=>{if(Se.length>0){if(Dt&&us(Se[0],Dt-1)){ss();return}pt(),Kt(Se[0].path),Sr(new Set(fo).add(Se[0].path||"/")),of(Se[0])}},[pt,of,Kt,fo,Sr,Dt,us,ss]),{isMetadataPopupOpen:K0,selectedFileForMetadata:Y0,openMetadataPopup:Z0,closeMetadataPopup:af}=rV({onGetInfo:J}),X0=g.useCallback(()=>{af(),Pe?.clearMetadata?.()},[af,Pe]),Q0=g.useMemo(()=>{if(O)return xd(O)},[O]),J0={managerLabel:e,className:s,items:n,allowedFileTypes:se,maxSelectableFileSize:re,rootItem:i,filesLoading:a,treeOptions:{...f,expandedPaths:fo,onExpandedPathsChange:Sr,additionalButtons:W0},showNavigationPanel:m,navigationPanelOptions:v,gridOptions:dr,toolbarOptions:b,bulkActionsToolbarOptions:x,deleteConfirmationOptions:C,destinationFolderPopupOptions:{...S,destinationFolderPath:Ua,setDestinationFolderPath:Dn,header:Bd,onCreateFolder:we,onCreateFolderValidate:Q,folderCreationValidationMessages:ve,sourceFolder:Wd},currentPath:mt,setCurrentPath:Kt,searchValue:Ka,effectiveSearchValue:pr,setSearchValue:gr,areHiddenFilesVisible:hi,toggleHiddenFilesVisibility:$a,isTreeCollapsed:qa,toggleTreeCollapse:lo,setIsTreeCollapsed:Id,selectedPaths:Qs,selectedFiles:Td,setSelectedPaths:ui,clearSelection:Js,currentFolder:rt,gridRows:B0,handleCopyTo:Za,handleMoveTo:Xa,handleDuplicate:di?Xd:Qa,handleSetCopiedFiles:Hd,handleSetMovedFiles:el,openDestinationFolderPopup:Pn,handleCloseDestinationFolderPopup:Ja,handleOpenDestinationFolderPopup:ho,destinationFolderMode:tl,handleGridAddSibling:_0,handleGridAddChild:U0,handleTreeAddSibling:$0,handleTreeAddChild:q0,handleDownloadFiles:Tn,renamedPath:co,renamedItem:Md,forbiddenSymbolsRegExp:Q0,forbiddenSymbolsTooltip:G,onRename:Ad,onRenameSave:Ld,onRenameCancel:Nd,onRenameValidate:Od,getDisplayName:hr,openDeleteConfirmation:oe||ol,closeDeleteConfirmation:rl,confirmDelete:po,deleteConfirmationOpen:_d,itemsToDelete:il,handlePathChange:en,handleTreeItemClick:G0,handleBreadcrumbItemClick:V0,handleSearchChange:fr,handleTableRowClick:j0,onTableFileClick:E,handleSelectionClick:F,onGridApiChange:P,isDragging:Ud,uploadError:$d,handleDragEnter:vr,handleDragLeave:go,handleDragOver:pi,handleDrop:dl,clearUploadError:al,onUploadFiles:L,onValidateUpload:U,maxFileSize:W,isDraggingOverWindow:hs,openFileDialog:gi,fileInputRef:ll,newActions:N0,isNewButtonVisible:O0,isNewButtonDisabled:H0,isCreatingFolder:ne,newFolderTempId:Qe,createdFolderPath:ut,newFolderDefaultName:jt,startFolderCreation:rf,cancelFolderCreation:M0,saveFolderCreation:A0,validateFolderName:L0,conflictResolutionPopupOptions:y,conflictingFiles:sl,conflictResolutionOpen:Gd,closeConflictResolution:nl,handleConflictReplace:mr,handleConflictDuplicate:Vd,handleConflictCancel:jd,handleConflictDecideForEach:zd,uploadConflictingFiles:qd,uploadConflictResolutionOpen:Kd,closeUploadConflictResolution:cl,handleUploadConflictReplace:xr,handleUploadConflictDuplicate:Yd,handleUploadConflictCancel:Zd,handleUploadConflictDecideForEach:yr,fileMetadataPopupOptions:Pe,isMetadataPopupOpen:K0,selectedFileForMetadata:Y0,openMetadataPopup:Z0,closeMetadataPopup:X0,onGetInfo:J,onUnshareFiles:ge,onRemoveFilesAccess:V,actionsRef:$,sharedByMePaths:K,onSearchFiles:ce,searchInProgress:ue,searchResults:q,clearSearchResults:he,isSearchMode:uo,emptyStateIcon:ke,emptyStateTitle:qe,emptyStateDescription:ot,gridClassName:oo,sharedWithMeIds:Ve,onFolderPopupPathChange:wt,onManagePermissions:ze,onPreview:_e,onOpenInNewTab:Z,previewExtensions:Ue,isRenameFileAvailable:ts,isDuplicateFolderAvailable:ci,customUploadFileAction:Sn,customBreakpointRef:io,nonClickableTableColumns:ja,hideSearchPathItemName:Rn,getDisabledTooltip:Oe,fileTooLargeTooltip:Ae,unsupportedFileTypeTooltip:Ce,showHiddenFileSwitcherInDestinationPopup:ro,showCreateFolderButtonInDestinationPopup:za,maxNewFolderDepth:Dt,onNewFolderDepthExceeded:cr};return h.jsx(jx.Provider,{value:J0,children:t})},hV=({disabledGridRowIds:e,gridRows:t,getDisabledTooltip:s,getRowDisabledTooltip:n,allowedFileTypes:i,maxSelectableFileSize:o})=>{const[r,a]=g.useState(null),[l,c]=g.useState(null);g.useEffect(()=>{const p=()=>{a(null),c(null)};return window.addEventListener("scroll",p,!0),()=>window.removeEventListener("scroll",p,!0)},[]),g.useEffect(()=>{const p=v=>{const w=v.target.closest(".ag-row");if(!w){a(x=>x&&null);return}const b=new DOMParser().parseFromString(w.getAttribute("row-id")||"","text/html").documentElement.textContent;b&&e.has(b)?a(x=>x!==b?(c(w.getBoundingClientRect()),b):x):a(x=>x&&null)},f=()=>{a(null),c(null)},m=document.querySelector('[aria-label="File Manager Grid View"]');if(m)return m.addEventListener("mousemove",p),m.addEventListener("mouseleave",f),()=>{m.removeEventListener("mousemove",p),m.removeEventListener("mouseleave",f)}},[e]);const d=g.useMemo(()=>{if(r)return t.find(p=>p.path===r)},[r,t]),u=g.useMemo(()=>{if(d){if(s){const p=s(d);if(p)return p}return n(d,i,o)}},[d,s,n,i,o]);return h.jsx(h.Fragment,{children:u&&l&&Jo.createPortal(h.jsxs(Bc,{open:!0,placement:"top",children:[h.jsx(Vc,{asChild:!0,children:h.jsx("div",{className:pe("fixed z-[-1]",u&&"pointer-events-none"),style:{top:l.top,left:l.left,width:l.width,height:l.height}})}),h.jsx(Gc,{className:"max-w-[300px] rounded border border-ui-outline-primary bg-ui-popover px-3 py-1.5 text-center text-primary shadow-md fill-ui-popover",children:u})]}),document.body)})},Kx=({onClose:e,onConfirm:t,onFolderPopupPathChange:s,setDestinationFolderPath:n,open:i,copyLabel:o="Copy",moveLabel:r="Move",addFolderLabel:a="Add folder",mode:l=Rt.Copy,hiddenFilesSwitcherLabel:c="Show hidden files",showHiddenFileSwitcher:d=!0,showCreateFolderButton:u=!0,onUploadFiles:p,onValidateUpload:f,maxFileSize:m,header:v,sourceFolder:C,disabledPathTooltip:w="Unavailable for the original path. Please select another folder",path:b,collapsedFileTree:x=!1,alertProps:S,processDestinationFolderPath:y,...R})=>{const[E,F]=g.useState(!1),[P,k]=g.useState(!1),D=g.useRef(null),T=Ea(),I=g.useCallback(L=>{F(L)},[]),H=g.useMemo(()=>{const L=[];return u&&L.push({key:"add-folder",label:a,icon:h.jsx(z.IconFolderPlus,{...ae,className:"text-secondary"}),onClick:()=>{D.current?.createFolder(),k(!1)}}),d&&L.push({key:"show-hidden-files",label:c,icon:h.jsx(z.IconEye,{...ae,className:"text-secondary"}),onClick:()=>{F(U=>!U),k(!1)}}),L},[a,c,d,u]),A=g.useCallback(L=>{if(L){let U=y?y(L):L;s?.(U),n?.(U)}},[s,n,y]),O=l===Rt.Copy?"Copy to":"Move to",G=g.useMemo(()=>!b||!C?!1:C===b,[b,C]);return h.jsx(eo,{open:i,onClose:()=>{e()},size:It.Lg,dividerFooter:!0,dividers:!1,className:"md:!h-[800px] !bg-layer-2",footer:h.jsxs("div",{className:"flex justify-between items-center gap-2 p-4 md:px-6",children:[h.jsx("div",{className:"flex items-center gap-4 min-w-0",children:T?h.jsx(Gt,{items:H,open:P,onOpenChange:k,children:h.jsx(Ks,{className:"size-9 shrink-0","aria-label":"More options",iconBefore:h.jsx(z.IconDotsVertical,{...ae,className:"text-secondary"})})}):h.jsxs(h.Fragment,{children:[u&&h.jsx(zs,{label:a,appearance:ye.Ghost,iconBefore:h.jsx(z.IconFolderPlus,{...ae}),onClick:()=>{D.current?.createFolder()}}),u&&d&&h.jsx("div",{className:"w-px h-[26px] bg-controls-disable-accent my-2"}),d&&h.jsx(h.Fragment,{children:h.jsx("div",{className:"inline-flex items-center cursor-pointer",children:h.jsx(wd,{label:c,isOn:E,onChange:I,switchId:"hidden-files-switch-modal"})})})]})}),h.jsxs("div",{className:"flex space-x-4 items-center",children:[h.jsx(qs,{onClick:e,label:"Cancel"}),G?h.jsx(ct,{tooltip:w,children:h.jsx(zs,{onClick:t,label:l==="copy"?o:r,disabled:G,"aria-disabled":G})}):h.jsx(zs,{onClick:t,label:l==="copy"?o:r})]})]}),header:v??O,children:h.jsxs("div",{className:"bg-layer-2 h-full flex flex-col",children:[S&&h.jsx("div",{className:"px-6 mb-4 pt-4",children:h.jsx(PC,{...S})}),h.jsx("div",{className:"flex-1 min-h-0",children:h.jsx(s0,{...R,gridClassName:"size-full",className:M(R.className,"bg-layer-2 h-full flex pt-0"),actionsRef:D,path:b,showHiddenFiles:E,onShowHiddenFilesChange:I,treeOptions:{...R.treeOptions,collapsed:x,expandedPaths:new Set([R.rootItem?.path||"/"]),header:R.treeOptions?.header},gridOptions:{...R.gridOptions,selectionMode:void 0},navigationPanelOptions:{elementId:"file-manager-destination-search",...R.navigationPanelOptions},onUploadFiles:p,onValidateUpload:f,onPathChange:A,maxFileSize:m})})]})})},pV=12,gV=8;var Fi=(e=>(e.Normal="normal",e.Reverse="reverse",e))(Fi||{});function fV({actions:e,direction:t=Fi.Normal,moreButtonWidth:s=os,actionsGap:n=8,containerPadding:i=8,dependencies:o=[]}){const r=g.useRef(null),a=g.useRef(null),l=g.useRef(null),c=g.useRef(null),d=g.useRef([]),[u,p]=g.useState(0),f=g.useCallback((C,w)=>{const b=l.current?.offsetWidth??0,x=c.current?.offsetWidth??0,S=b+x,R=w.getBoundingClientRect().width-S-s-n*2-i*2;let E=0,F=0;if(t===Fi.Reverse)for(let P=C.length-1;P>=0&&(E+=C[P]+n,!(E>R));P--)F++;else for(const P of C){if(E+=P+n,E>R)break;F++}p(F)},[n,i,t,s]);g.useLayoutEffect(()=>{if(!a.current||!r.current)return;const w=Array.from(a.current.children).map(b=>Math.ceil(b.getBoundingClientRect().width));d.current=w,w.length!==0&&f(w,r.current)},[e,f,...o]),g.useEffect(()=>{if(!r.current)return;let C=null;const w=()=>{C&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{if(!r.current)return;const x=r.current,S=d.current;S.length!==0&&f(S,x)})},b=new ResizeObserver(w);return b.observe(r.current),w(),()=>{C&&cancelAnimationFrame(C),b.disconnect()}},[e.length,f,...o]);const m=t===Fi.Reverse?e.slice(0,e.length-u):e.slice(u);return{visibleActions:t===Fi.Reverse?e.slice(e.length-u):e.slice(0,u),hiddenActions:m,refs:{containerRef:r,measureRef:a,leftSectionRef:l,rightSectionRef:c}}}const mV=({getSelectionLabel:e,onClearSelection:t,actions:s,selectedCount:n})=>{const i=Ea(),{refs:{containerRef:o,leftSectionRef:r,measureRef:a},visibleActions:l,hiddenActions:c}=fV({actions:s,direction:Fi.Reverse,dependencies:[i],actionsGap:pV,containerPadding:gV}),d=e(n);return h.jsxs(h.Fragment,{children:[h.jsx("div",{ref:a,className:"absolute top-0 left-0 invisible pointer-events-none overflow-hidden whitespace-nowrap flex gap-3",children:s.map(({key:u,icon:p,title:f})=>h.jsx(qs,{iconBefore:p,label:f,hideTitleOnMobile:!0},u))}),h.jsxs("div",{ref:o,className:"rounded bg-layer-0 p-2 flex justify-between items-center w-full",role:"toolbar","aria-label":"File bulk actions",children:[h.jsx("div",{ref:r,children:h.jsx(zs,{label:d,onClick:t,textClassName:"text-accent-primary whitespace-nowrap",appearance:ye.Ghost,iconBefore:h.jsx(z.IconX,{...ae,className:"text-accent-primary"})})}),h.jsxs("div",{className:"flex flex-1 w-full gap-3 items-center justify-end",children:[c.length>0&&h.jsx(Gt,{items:c,allowedPlacements:["bottom","bottom-start"],children:h.jsx(Ks,{className:"h-[38px]",iconBefore:h.jsx(z.IconDotsVertical,{...ae,className:"text-secondary hover:text-accent-primary"})})}),l.map(({key:u,icon:p,tooltip:f,title:m,onClick:v,disabled:C})=>h.jsx(qs,{className:"!p-[9px]",iconBefore:p,label:m,hideTitleOnMobile:!0,disabled:C,tooltipProps:{tooltip:f},onClick:w=>v?.({key:u,domEvent:w})},u))]})]})]})},vV=({open:e,itemsToDelete:t,onClose:s,onConfirm:n,cancelLabel:i="Cancel",confirmLabel:o="Delete",titleRenderer:r,contentRenderer:a})=>{const l=t.map(f=>f.name),d=r?.(l)||"Confirm Deleting Items",u=h.jsxs("div",{className:"px-6 py-3 dial-small-text",children:[h.jsx("p",{className:"text-secondary mb-3",children:t.length===1?h.jsxs(h.Fragment,{children:["Do you want to delete file or folder"," ",h.jsxs("span",{className:"text-primary break-all",children:['"',t[0].name,'"']}),"?"]}):h.jsxs(h.Fragment,{children:["Do you want to delete the following"," ",h.jsx("span",{className:"text-primary",children:t.length})," items?"]})}),t.length>1&&h.jsx(h.Fragment,{children:t.length<=10?h.jsx("ul",{className:"space-y-1 text-primary list-none",children:t.map(f=>h.jsx("li",{className:"truncate",children:f.name},f.path))}):h.jsxs(h.Fragment,{children:[h.jsx("ul",{className:"space-y-1 text-primary list-none mb-2",children:t.slice(0,10).map(f=>h.jsx("li",{className:"truncate",children:f.name},f.path))}),h.jsxs("p",{className:"text-secondary italic",children:["... and ",t.length-10," more"]})]})})]}),p=a?.(l)||u;return h.jsx(xx,{open:e,header:d,confirmLabel:o,cancelLabel:i,variant:mn.Danger,onClose:s,onConfirm:n,children:p})},qv=e=>e.split("/").map(t=>t.trim()).filter(Boolean),CV="w-full flex items-center justify-between gap-4",wV="min-w-0 h-[38px] flex-1 overflow-hidden bg-layer-3 px-3 flex items-center rounded",bV="w-[260px]",xV=({ariaLabel:e="Breadcrumb",labelClassName:t,onItemClick:s,path:n,makeHref:i,rootItemPath:o,rootItemLabel:r,breadcrumbsHiddenPathPart:a,className:l,breadcrumbClassName:c,searchable:d=!0,value:u,elementId:p="file-manager-search",disabled:f,invalid:m,onSearchChange:v,searchClassName:C,searchContainerClassName:w,isCompactView:b=!1})=>{const x=g.useMemo(()=>{if(!n)return;let P=qv(n);const k=[...P];let D=0;if(a){const I=qv(a);if(I.length){const H=P.findIndex((A,O)=>I.every((G,L)=>P[O+L]===G));H!==-1&&(D=I.length,P=[...P.slice(0,H),...P.slice(H+I.length)])}}if(!P.length)return[{label:"/"}];const T=P.map((I,H)=>{const A=H<P.length-D?H:H+D,O=k.slice(0,A+1),G=typeof i=="function"?i(O,A):void 0;return{label:I,href:G,onClick:s?L=>{L.preventDefault(),s(G)}:void 0}});if(o&&r){const I=o.split("/").filter(Boolean),H=n.split("/").filter(Boolean);if(I.every((O,G)=>H[G]===O)&&T.length>0){const O=T.slice(I.length);return[{label:r,href:o,onClick:s?G=>{G.preventDefault(),s(o)}:void 0},...O]}}return T},[n,a,o,r,i,s]),[S,y]=g.useState(!1),R=g.useCallback(()=>{if(b&&!S){y(!0);const P=document.getElementById(p);P&&P.focus()}},[p,S,b]),E=g.useCallback(()=>{(!u||String(u).trim()==="")&&v?.("")},[u,v]),F=g.useCallback(()=>b&&S?h.jsx(qs,{className:"!p-[9px]",iconBefore:h.jsx(z.IconArrowLeft,{...ae}),onClick:()=>{y(!1),v?.("")}}):h.jsx("div",{className:wV,children:h.jsx(Hg,{pathItems:x,ariaLabel:e,labelClassName:t,className:c})}),[e,c,x,S,b,t,v]);return h.jsxs("div",{className:M(CV,{"gap-3":b},l),"aria-label":"navigation-panel",children:[F(),d&&h.jsx("div",{className:M(bV,{"w-[40px]":b&&!S,"w-full":b&&S}),role:"search","aria-label":"Search",onClick:R,children:h.jsx(Vg,{id:p,value:u??"",onChange:v,disabled:f,onBlur:E,invalid:m,className:C,wrapperClassName:b&&!S?"pl-2.5":"",containerClassName:w})})]})},yV=({tabs:e,activeTab:t,onTabChange:s,areHiddenFilesVisible:n,onToggleHiddenFiles:i,isNewButtonVisible:o,isNewButtonDisabled:r,newButtonVariant:a=Me.Primary,newButtonDropdownItems:l=[],newButtonLabel:c="New",hiddenFilesSwitcherLabel:d="Hidden files",showHiddenFilesLabel:u="Show hidden files",hideHiddenFilesLabel:p="Hide hidden files",showHiddenFilesToggle:f=!0,disabledNewButtonTooltip:m})=>{const v=Ea(),C=g.useMemo(()=>[{key:"hidden-files-switch",label:n?p:u,icon:n?h.jsx(z.IconEyeOff,{...ae,className:"text-secondary"}):h.jsx(z.IconEye,{...ae,className:"text-secondary"}),onClick:()=>i?.(!n)}],[n,p,u,i]),w=()=>e&&t&&s?h.jsx(fx,{tabs:e,activeTab:t,onClick:S=>s(S),screenThreshold:xa.Tablet,smallScreenContainerClassName:"w-fit bg-transparent h-[38px] overflow-hidden",smallScreenDropdownItemClassName:"px-3 h-[38px]"}):null,b=()=>h.jsxs(h.Fragment,{children:[f&&h.jsxs(h.Fragment,{children:[h.jsx(wd,{switchId:"hidden-files-switch",label:d,isOn:n,onChange:i}),h.jsx("div",{className:"h-6 border-l border-primary"})]}),o&&h.jsx(ct,{tooltip:r&&m?m:void 0,children:h.jsx(np,{label:c,variant:a,items:l,disabled:r})})]}),x=()=>h.jsxs(h.Fragment,{children:[h.jsx(Gt,{items:C,allowedPlacements:["bottom","bottom-start"],children:h.jsx(jc,{size:me.Small,icon:h.jsx(z.IconDotsVertical,{stroke:2,size:Ne.SM})})}),o?h.jsx(ct,{tooltip:r&&m?m:void 0,children:h.jsx(np,{label:c,variant:a,items:l,disabled:r})}):null]});return h.jsxs("div",{className:"flex w-full justify-between gap-4 items-center overflow-x-auto",children:[h.jsx("div",{className:"flex-1 min-w-0",children:w()}),h.jsx("div",{className:"flex gap-2 shrink-0 items-center",children:v?x():b()})]})},SV=100,Nr=16,Ls="text-secondary",Nl="text-primary min-w-0",RV="text-primary break-words min-w-0",Or="bg-layer-2",FV=({open:e,onClose:t,fileMetadata:s,loading:n=!1,header:i="Information",nameLabel:o="Name:",pathLabel:r="Path:",modifiedDateLabel:a="Modified Date:",sizeLabel:l="Size:",authorLabel:c="Author:",dateLocale:d="en-US",dateOptions:u})=>h.jsx(eo,{open:e,onClose:t,size:It.Sm,header:i,dividers:!1,children:h.jsx("div",{className:"px-6 py-4",children:h.jsx("div",{className:"grid gap-4 items-center dial-small-text",style:{gridTemplateColumns:`${SV}px 1fr`},children:n?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Ls,children:o}),h.jsx(xo,{variant:Cs.Text,width:"100%",height:Nr,className:Or}),h.jsx("div",{className:Ls,children:a}),h.jsx(xo,{variant:Cs.Text,width:"90%",height:Nr,className:Or}),h.jsx("div",{className:Ls,children:l}),h.jsx(xo,{variant:Cs.Text,width:"60%",height:Nr,className:Or}),h.jsx("div",{className:Ls,children:c}),h.jsx(xo,{variant:Cs.Text,width:"80%",height:Nr,className:Or}),h.jsx("div",{className:Ls,children:r}),h.jsx(xo,{variant:Cs.Text,width:"70%",height:Nr,className:Or})]}):s?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:Ls,children:o}),h.jsx("div",{className:Nl,children:h.jsx(it,{text:s.name})}),h.jsx("div",{className:Ls,children:a}),h.jsx("div",{className:Nl,children:h.jsx(it,{text:OG(s.updatedAt,d,u)})}),h.jsx("div",{className:Ls,children:l}),h.jsx("div",{className:Nl,children:h.jsx(it,{text:ya(s.contentLength)})}),h.jsx("div",{className:Ls,children:c}),h.jsx("div",{className:Nl,children:h.jsx(it,{text:s.author||"—"})}),h.jsx("div",{className:Ls,children:r}),h.jsx("div",{className:RV,children:decodeURIComponent(s.path)})]}):null})})}),EV={size:10,stroke:2},DV=26,Hr="__new_folder";var ls=(e=>(e.File="file",e.Folder="folder",e))(ls||{});const PV=({name:e,type:t,shared:s=!1,loading:n=!1,sharedIndicatorClassName:i,sharedIndicatorTooltip:o,fileExtension:r,...a})=>{const l=c=>h.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[c,s&&h.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:h.jsx(ra,{className:i,sharedIndicatorTooltip:o})})]});if(n)return l(h.jsx(bn,{}));if(t===ls.File){const c=r||(e.includes(".")?e.split(".").pop():void 0);return h.jsx(wp,{...a,extension:c??"",className:"text-secondary",indicator:s?h.jsx(ra,{className:i,sharedIndicatorTooltip:o}):null,label:"File type icon"})}return t===ls.Folder?l(h.jsx(Le,{icon:h.jsx(z.IconFolder,{className:a.className,size:a.size??ae.size,stroke:a.stroke??ae.stroke}),className:"inline-block align-middle"})):null},Kg="data-editable-container",Yx={[Kg]:""};function Zx({value:e,isEditing:t,isCreating:s,isLoading:n=!1,restoreOnCancel:i=!0,onValidate:o,onSave:r,onCancel:a,onCreateFolderSave:l,onCreateFolderCancel:c}){const[d,u]=g.useState(e),[p,f]=g.useState(!1),[m,v]=g.useState(""),C=g.useRef(null),w=g.useRef(!1),b=g.useRef(!1),x=g.useCallback((P=!1,k="")=>{f(P),v(k)},[]),S=g.useCallback(P=>{if(!o)return x(),!0;const k=o(P);return k?k.startsWith(`${Ye.Warning}__`)?(x(!1,k),!0):(x(!0,k),!1):(x(),!0)},[o,x]),y=g.useCallback(P=>{const k=P??"";u(k),S(k)},[S]),R=g.useCallback(P=>{s&&!w.current&&!n?l?.(P):!s&&t&&r?.(P),w.current=!1},[r,l,s,t,n]),E=g.useCallback(()=>{i&&u(e),s?c?.():a?.(),w.current=!0,x()},[e,a,i,x,c,s]),F=g.useCallback(()=>{if(!b.current){if(b.current=!0,S(d)){R(d);return}!s&&S(e)?(u(e),x(),R(e)):E()}},[S,d,e,R,E,x,s]);return g.useEffect(()=>{!t&&!s||(w.current=!1,b.current=!1,u(e),x(),requestAnimationFrame(()=>{C.current?.focus(),C.current?.select()}))},[t,s,e,x]),g.useEffect(()=>{const P=C.current;if(!t&&!s||!P)return;const k=D=>{D.key==="Enter"?(D.preventDefault(),C.current?.blur()):D.key==="Escape"&&(D.preventDefault(),E())};return P.addEventListener("keydown",k),()=>P.removeEventListener("keydown",k)},[t,s,E]),g.useEffect(()=>{if(!t&&!s||n)return;const P=C.current;if(!P)return;const k=I=>I?(P.closest(`[${Kg}]`)??P).contains(I):!1,D=I=>{k(I.target)||F()},T=I=>{k(I.relatedTarget)||F()};return document.addEventListener("pointerdown",D,!0),P.addEventListener("blur",T),()=>{document.removeEventListener("pointerdown",D,!0),P.removeEventListener("blur",T)}},[t,s,n,F]),{inputRef:C,value:d,onChange:y,invalid:p,invalidMessage:m}}const TV=({name:e,type:t,elementId:s,loading:n=!1,shared:i=!1,iconClassName:o,iconIndicator:r,iconLabel:a,iconSize:l,iconStroke:c,inputInvalid:d,inputInvalidMessage:u,inputContainerClassName:p,inputIconAfter:f,inputRef:m,onChange:v,sharedIndicatorClassName:C,sharedIndicatorTooltip:w,fileExtension:b})=>{const x=()=>{const S=u?.startsWith(`${Ye.Warning}__`);if(!d&&!S)return null;const y=u?.replace(`${Ye.Warning}__`,"");return h.jsx(ct,{tooltip:y,children:f||(S?h.jsx(z.IconAlertTriangleFilled,{...ae,className:"text-warning-icon","aria-label":"warning"}):h.jsx(z.IconAlertCircleFilled,{...ae,className:"text-error","aria-label":"alert"}))})};return h.jsxs("div",{className:"flex gap-2 items-center",...Yx,children:[h.jsx(PV,{name:e,type:t,label:a,className:o,indicator:r,size:l,stroke:c,loading:n,shared:i,fileExtension:b,sharedIndicatorClassName:C,sharedIndicatorTooltip:w}),h.jsx(vn,{containerClassName:M("!h-6 py-[1px] pl-[7px] pr-[7px]",p),id:s,value:e,onChange:v,invalid:d,iconAfter:x(),inputRef:m})]})},Nc=({name:e,type:t,elementId:s,editing:n=!1,loading:i=!1,creating:o=!1,shared:r=!1,iconSize:a=os,validate:l,onSave:c,fileExtension:d,onCancel:u,onCreateFolderCancel:p,onCreateFolderSave:f,inputContainerClassName:m,sharedIndicatorClassName:v,sharedIndicatorTooltip:C,hideTooltip:w=!1,forbiddenSymbolsRegExp:b,forbiddenSymbolsTooltip:x,...S})=>{const{value:y,invalid:R,invalidMessage:E,onChange:F,inputRef:P}=Zx({value:e,isEditing:n,isCreating:o,isLoading:i,onValidate:l,onCancel:u,onSave:c,onCreateFolderCancel:p,onCreateFolderSave:f});if(!n&&!o){const k=$g({name:e,isFolder:t===ls.Folder},b,x),D=!!k;return t===ls.Folder?h.jsx(Zc,{name:e,loading:i,shared:r,iconSize:a,className:"max-w-[428px] truncate",sharedIndicatorClassName:v,hideTooltip:w,isInvalidName:D,tooltipContent:k}):h.jsx(Yc,{className:"max-w-[428px]",...S,name:e,shared:r,iconSize:a,sharedIndicatorClassName:v,hideTooltip:w,isInvalidName:D,tooltipContent:k})}return h.jsx(TV,{type:t,name:y,elementId:s,inputInvalid:R,inputInvalidMessage:E,inputRef:P,onChange:F,iconSize:a,fileExtension:d,inputContainerClassName:m,sharedIndicatorTooltip:C,sharedIndicatorClassName:v})},Xx=({items:e,showFiles:t=!1,expandedPaths:s,loadingPaths:n=new Set,loadedPaths:i=new Set,sharedByMePaths:o=new Set,selectedPath:r,emptyStateTitle:a="No Folders",emptyStateDescription:l,emptyStateIcon:c,areHiddenFilesVisible:d=!1,renamedPath:u,createdFolderPath:p,rootItemLabel:f,rootItemPath:m,onItemClick:v,getContextMenuItems:C,onRenameSave:w,onRenameCancel:b,onRenameValidate:x,onExpandedPathsChange:S,onCreateFolderSave:y,onCreateFolderCancel:R,forbiddenSymbolsRegExp:E,forbiddenSymbolsTooltip:F,newFolderDefaultName:P})=>{const{expandedPaths:k,togglePath:D}=_x({expandedPaths:s??new Set,onExpandedPathsChange:S}),T=H=>{v?.(H),D(H.path)},I=(H,A,O)=>{let G=H;return O&&O.path===p&&(G=[{folderId:Hr,id:Hr,items:[],name:P||"",nodeType:De.FOLDER,parentPath:p,path:`${p}/${Hr}`},...H]),G.map(L=>{const{path:U,nodeType:B,name:N,items:W}=L,Y=B===De.FOLDER;if(!d&&Gx(L))return null;if(!Y&&!t)return;const te=Array.isArray(W)&&W.length>0&&W.some(ue=>ue.nodeType===De.FOLDER||t),we=k.has(U),Q=r===U,ve=n.has(U),Pe=u===U||U===`${p}/${Hr}`,J=i.has(U),ge=o.has(U),V=m&&f&&U===m&&Y,$=x&&(ue=>x(ue,L)),K=Q?"bg-accent-primary-alpha border-l-2 border-l-accent-primary rounded":"border-l-2 border-l-transparent",ce=V?[]:C?.(L)??[],q=E?$g({name:L.name,isFolder:Y},E,F):void 0;return h.jsx("div",{className:"cursor-pointer text-secondary",children:h.jsxs("div",{className:"flex flex-col w-full","aria-label":"folder",children:[h.jsx(Gt,{trigger:[Tt.ContextMenu],className:"w-full",anchorToMouse:!0,items:ce,children:h.jsxs("div",{style:{paddingLeft:`${A*DV}px`},className:M("py-1 gap-[2px] dial-small-text flex justify-between hover:bg-accent-primary-alpha rounded group/item w-full mb-[2px] relative",K),"aria-selected":Q,children:[!Pe&&h.jsx("div",{className:"absolute size-full left-0 top-0 z-0",onClick:()=>T(L)}),h.jsx("div",{className:"relative flex flex-row truncate items-center w-fit h-6 gap-x-1 pl-1",onClick:()=>!Pe&&T(L),children:h.jsxs(h.Fragment,{children:[Y&&h.jsx(z.IconCaretRightFilled,{...EV,className:pe("flex-shrink-0",we&&"rotate-90 transition-all",J&&!te&&"text-transparent")}),h.jsx(Nc,{elementId:`${U}-tree-item`,name:V?f:N,type:Y?ls.Folder:ls.File,loading:ve,shared:ge,sharedIndicatorClassName:M("group-hover/item:bg-accent-primary-alpha",Q&&"bg-accent-primary-alpha"),iconSize:Un,forbiddenSymbolsRegExp:E,forbiddenSymbolsTooltip:q,...!V&&{editing:Pe,creating:U===`${p}/${Hr}`,onSave:w,onCancel:b,validate:$,onCreateFolderSave:y,onCreateFolderCancel:R}})]})}),ce.length>0&&!Pe&&!V&&h.jsx("div",{className:"flex-1 flex justify-end",children:h.jsx(Gt,{placement:"bottom-start",allowedPlacements:["top-start","top-end"],items:ce,className:"sticky right-0",children:h.jsx(Le,{className:"invisible group-hover/item:visible text-secondary mx-2 flex flex-row gap-2 hover:text-accent-primary",icon:h.jsx(z.IconDotsVertical,{...ae})})})})]})}),we&&(W||L?.path===p)&&I(W||[],A+1,L)]})},`${U}-children`)})};return h.jsx("div",{className:"flex-1 size-full overflow-y-auto","aria-label":"folders-tree",children:e.length>0?I(e,0):h.jsx(tr,{title:a,description:l,icon:c})})},kV=({selectedFiles:e,actionLabels:t,onDuplicate:s,onCopy:n,onMove:i,onDownload:o,onUnshare:r,onRemoveAccess:a,onDelete:l,getCurrentFolderPath:c,sharedWithMeIds:d,sharedByMePaths:u,onClearSelection:p,forbiddenSymbolsRegExp:f})=>g.useMemo(()=>{const m=[],v=Array.from(e.values());if(!v.length||!t)return m;const C=xd(f),w=C?v.some(b=>C.test(b.name)):!1;if(t[ee.RemoveAccess]&&a){const b=v.some(x=>!u?.has(x.path));m.push({key:ee.RemoveAccess,label:t[ee.RemoveAccess],title:t[ee.RemoveAccess],disabled:b,icon:h.jsx(z.IconUserX,{size:ae.size,className:"text-secondary"}),onClick:()=>{a(v),p()}})}if(t[ee.Move]&&!w&&m.push({key:ee.Move,label:t[ee.Move],title:t[ee.Move],icon:h.jsx(zg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>i(v)}),t[ee.Copy]&&!w&&m.push({key:ee.Copy,label:t[ee.Copy],title:t[ee.Copy],icon:h.jsx(jg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>n(v)}),t[ee.Duplicate]&&!w&&m.push({key:ee.Duplicate,label:t[ee.Duplicate],title:t[ee.Duplicate],icon:h.jsx(z.IconCopy,{...ae,className:"text-secondary"}),onClick:()=>s(v)}),t[ee.Delete]){const b=v.some(x=>x.permissions&&!x.permissions.includes(to.WRITE));m.push({key:ee.Delete,label:t[ee.Delete],title:t[ee.Delete],icon:h.jsx(z.IconTrashX,{...ae,className:"text-secondary"}),disabled:b,tooltip:b?"Selected items contain item which can not be deleted":void 0,onClick:()=>{const x=c();l(v,x)}})}if(t[ee.Download]&&!w&&m.push({key:ee.Download,label:t[ee.Download],title:t[ee.Download],icon:h.jsx(z.IconDownload,{...ae,className:"text-secondary"}),onClick:()=>o(v)}),t[ee.Unshare]&&r){const b=v.some(x=>!d?.includes(x.path));m.push({key:ee.Unshare,label:t[ee.Unshare],title:t[ee.Unshare],disabled:b,tooltip:b?"Selected items contain item which can not be unshared":void 0,icon:h.jsx(Wg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>{r(v),p()}})}return m},[e,t,r,a,i,n,s,c,l,o,d,p,u,f]),IV=({id:e,name:t,nodeType:s,size:n,updatedAt:i,dateLocale:o,dateOptions:r,shared:a,sharedIndicatorClassName:l,hideTooltip:c=!1,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u})=>h.jsx("div",{className:"flex",children:h.jsx("div",{className:"flex flex-1 min-w-0",children:h.jsx(Nc,{type:s===De.FOLDER?ls.Folder:ls.File,name:t,elementId:e,shared:a,iconSize:Un,sharedIndicatorClassName:l,hideTooltip:c,forbiddenSymbolsRegExp:d,forbiddenSymbolsTooltip:u,details:h.jsxs("div",{className:"flex items-center gap-1 dial-tiny-text text-secondary",children:[h.jsx("span",{children:s===De.ITEM?ya(n):""}),i&&n&&h.jsx(z.IconCircleFilled,{size:2,className:"text-secondary"}),i?h.jsx("span",{children:h.jsx(Og,{value:i,locale:o?.toString(),options:r,className:"dial-tiny-text text-secondary",hideTooltip:c})}):null]})})})}),Qx=e=>(t,s,n)=>({colId:Ft.Name,field:"name",headerName:e,flex:1,minWidth:200,cellRenderer:i=>{const o=i.data.nodeType,{saveFolderCreation:r,validateFolderName:a,cancelFolderCreation:l,newFolderTempId:c,sharedByMePaths:d,selectedPaths:u,disabledRowIds:p,filesLoading:f}=i.context,m=d?.has(i.data.path),v=u?.has(i.data.path),C=p?.has(i.data.path)??!1,w=M(["group-hover/grid-row:bg-accent-primary-alpha",v&&"bg-accent-primary-alpha"]);if(i.data?.isTemporary&&i.data.id===c)return h.jsx(Nc,{name:i.data.name,type:ls.Folder,elementId:`new-folder-${i.data.id}`,editing:!0,creating:!0,loading:f,shared:m,sharedIndicatorClassName:w,iconSize:Un,validate:a,onSave:r,onCancel:l,onCreateFolderSave:r,onCreateFolderCancel:l,inputContainerClassName:M(["!h-9",n&&o===De.ITEM&&"!h-10"])});const{renameTriggerView:b,renamedPath:x,renamedItem:S,getDisplayName:y,onRenameValidate:R,onRenameSave:E,onRenameCancel:F}=i.context;if(b===Wo.Grid&&x===i.data?.path&&S&&i.data){const D=y(S);return h.jsx(Nc,{name:D,type:o===De.FOLDER?ls.Folder:ls.File,fileExtension:S.name.split(".").pop(),elementId:`rename-${i.data.id}`,editing:!0,shared:m,sharedIndicatorClassName:w,iconSize:Un,validate:T=>R(T,S),onSave:E,onCancel:F,inputContainerClassName:M(["!h-9",n&&o===De.ITEM&&"!h-10"]),forbiddenSymbolsRegExp:i.context.forbiddenSymbolsRegExp})}if(n)return h.jsx(IV,{id:i.data.id,name:i.data.name,nodeType:o,size:i.data.size,shared:m,sharedIndicatorClassName:w,updatedAt:i.data.updatedAt,dateLocale:t,dateOptions:s,hideTooltip:C,forbiddenSymbolsRegExp:i.context.forbiddenSymbolsRegExp,forbiddenSymbolsTooltip:i.context.forbiddenSymbolsTooltip});const k=$g({name:i.data.name,isFolder:o===De.FOLDER},i.context.forbiddenSymbolsRegExp,i.context.forbiddenSymbolsTooltip);return o===De.FOLDER?h.jsx(Zc,{name:i.data.name,shared:m,sharedIndicatorClassName:w,iconSize:Un,hideTooltip:C,isInvalidName:!!k,tooltipContent:k}):h.jsx(Yc,{name:i.data.name,shared:m,sharedIndicatorClassName:w,iconSize:Un,hideTooltip:C,isInvalidName:!!k,tooltipContent:k})}}),Jx=e=>(t,s)=>({colId:Ft.UpdatedAt,field:"updatedAt",headerName:e,width:168,suppressSizeToFit:!0,cellRenderer:n=>{const i=n.context?.disabledRowIds?.has(n.data?.path)??!1;return h.jsx(Og,{...n,hideTooltip:i})},cellRendererParams:{locale:t,options:s},filterValueGetter:n=>{const i=n.data[n.colDef.field||""],o=vd(i);return o?new Intl.DateTimeFormat(t||Ag,s||Lg).format(o):""}}),e0=e=>({colId:Ft.Size,field:"size",headerName:e,width:120,suppressSizeToFit:!0,cellRenderer:t=>t.data.nodeType===De.ITEM?ya(t.data.contentLength):"",filterValueGetter:t=>t.data.nodeType===De.ITEM?ya(t.data.contentLength):""}),MV=e=>{const t=e.event;if(!(t?.target??null)?.closest("input")||!t)return!1;switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":case"Home":case"End":return!0;default:return!1}};function AV({userColumnDefs:e,filterable:t,dateLocale:s,dateOptions:n,effectiveVisibleColumns:i,isCompactView:o,hasActions:r,actionsColumnDef:a,rootItemLabel:l,rootItemPath:c}){const d=g.useMemo(()=>[Qx("Name")(s,n,o),{colId:Ft.Path,field:"path",headerName:"Path",flex:1,minWidth:200,cellRenderer:p=>{const f=p.context?.disabledRowIds?.has(p.data.path)??!1;let m=p.data.path;if(p.context?.hideSearchPathItemName&&(p.data.parentPath?m=p.data.parentPath:m=m.replace(/\/[^/]+\/?$/,"")||"/"),!c||!l)return h.jsx(it,{text:m,hideTooltip:f});const v=m.replace(c,l);return h.jsx(it,{text:v,hideTooltip:f})}},Jx("Modified Date")(s,n),e0("Size"),{colId:Ft.Author,field:"author",headerName:"Author",width:200,suppressSizeToFit:!0,cellRenderer:p=>p.data.author},{colId:Ft.Owner,field:"owner",headerName:"Owner",width:200,suppressSizeToFit:!0,cellRenderer:p=>p.data.owner}],[s,n,o,l,c]);return{columnDefs:g.useMemo(()=>{const p=e?.map(v=>typeof v=="function"?v(s,n,o):v);let f=p??d;p||(f=f.filter(v=>v.colId&&i.includes(v.colId))),r&&(o&&(f=f.slice(0,1)),f.push(a));const m=v=>v.colId===Ft.Name;return f.map(v=>{const C={...v,filter:t?v.filter:!1,floatingFilter:t?v.floatingFilter:!1};return m(v)&&!v.suppressKeyboardEvent&&(C.suppressKeyboardEvent=MV),C})},[a,s,n,d,i,t,r,o,e])}}const t0=()=>{const e=g.useContext(jx);if(!e)throw new Error("useFileManagerContext must be used within <FileManagerProvider>");return e},LV=({actionLabels:e,onDuplicate:t,onCopy:s,onMove:n,onDownload:i,onRename:o,onDelete:r,onInfo:a,onUnshare:l,onRemoveAccess:c,sharedWithMeIds:d,sharedByMePaths:u,onManagePermissions:p,onPreview:f,onOpenInNewTab:m,previewExtensions:v,isRenameFileAvailable:C=!0,isDuplicateFolderAvailable:w=!0,forbiddenSymbolsRegExp:b,onGridCreateSiblingFolder:x,onGridCreateChildFolder:S})=>g.useMemo(()=>y=>{const R=[];if(!e)return R;const E=xd(b)?.test(y.name);e[ee.AddSibling]&&y.nodeType===De.FOLDER&&R.push({key:"addSibling",label:e[ee.AddSibling],icon:h.jsx(Bx,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>x([y])}),e[ee.AddChild]&&y.nodeType===De.FOLDER&&!E&&R.push({key:"addChild",label:e[ee.AddChild],icon:h.jsx(Hx,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>S([y])},{key:"divider",type:Jn.Divider}),e[ee.OpenInNewTab]&&typeof m=="function"&&y.nodeType===De.ITEM&&!E&&R.push({key:ee.OpenInNewTab,label:e[ee.OpenInNewTab],icon:h.jsx(z.IconExternalLink,{...ae,className:"text-secondary"}),onClick:()=>m?.(y)});const F=y.nodeType===De.ITEM||y.nodeType===De.FOLDER&&w;e[ee.Duplicate]&&F&&!E&&R.push({key:ee.Duplicate,label:e[ee.Duplicate],icon:h.jsx(z.IconCopy,{...ae,className:"text-secondary"}),onClick:()=>t(y)}),e[ee.Copy]&&!E&&R.push({key:ee.Copy,label:e[ee.Copy],icon:h.jsx(jg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>s(y)}),e[ee.Move]&&!E&&R.push({key:ee.Move,label:e[ee.Move],icon:h.jsx(zg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>n(y)}),e[ee.Download]&&!E&&R.push({key:ee.Download,label:e[ee.Download],icon:h.jsx(z.IconDownload,{...ae,className:"text-secondary"}),onClick:()=>i(y)}),e[ee.ManagePermissions]&&typeof p=="function"&&y.nodeType===De.FOLDER&&!E&&R.push({key:ee.ManagePermissions,label:e[ee.ManagePermissions],icon:h.jsx(z.IconExternalLink,{...ae,className:"text-secondary"}),onClick:()=>p?.(y.path)});const P=y.name.split("."),k=P.length>1?P[P.length-1]:"",D=k&&v?.includes(`.${k}`);e[ee.Preview]&&typeof f=="function"&&y.nodeType===De.ITEM&&D&&!E&&R.push({key:ee.Preview,label:e[ee.Preview],icon:h.jsx(z.IconEye,{...ae,className:"text-secondary"}),onClick:()=>f?.(y.path)});const T=!y.permissions||y.permissions.includes(to.WRITE);e[ee.Delete]&&T&&R.push({key:ee.Delete,label:e[ee.Delete],icon:h.jsx(z.IconTrashX,{...ae,className:"text-secondary"}),onClick:()=>r(y,y.parentPath??"")});const I=y.nodeType===De.FOLDER||y.nodeType===De.ITEM&&C;return e[ee.Rename]&&I&&T&&R.push({key:ee.Rename,label:e[ee.Rename],icon:h.jsx(z.IconPencilMinus,{...ae,className:"text-secondary"}),onClick:()=>o(y.path)}),e[ee.Info]&&y.nodeType===De.ITEM&&!E&&R.push({key:ee.Info,label:e[ee.Info],icon:h.jsx(z.IconInfoCircle,{...ae,className:"text-secondary"}),onClick:()=>a(y)}),e[ee.Unshare]&&d?.includes(y.path)&&R.push({key:ee.Unshare,label:e[ee.Unshare],icon:h.jsx(Wg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>l(y)}),e[ee.RemoveAccess]&&u?.has(y.path)&&c&&R.push({key:ee.RemoveAccess,label:e[ee.RemoveAccess],icon:h.jsx(z.IconUserX,{size:ae.size,className:"text-secondary"}),onClick:()=>c(y)}),R},[e,t,s,n,i,r,o,a,l,c,d,u,p,f,m,v,C,w,b,S,x]),NV=({onGridAddSibling:e,onGridAddChild:t,onTreeAddSibling:s,onTreeAddChild:n})=>{const[i,o]=g.useState(Si.Grid),r=g.useCallback(d=>{e?.(d),o(Si.Grid)},[e]),a=g.useCallback(d=>{s?.(d),o(Si.Tree)},[s]),l=g.useCallback(d=>{t?.(d),o(Si.Grid)},[t]),c=g.useCallback(d=>{n?.(d),o(Si.Tree)},[n]);return{createFolderTriggerView:i,onGridCreateSiblingFolder:r,onTreeCreateSiblingFolder:a,onGridCreateChildFolder:l,onTreeCreateChildFolder:c}},s0=e=>h.jsx(qx,{...e,children:h.jsx(OV,{})}),OV=()=>{const{managerLabel:e,className:t,items:s,rootItem:n,filesLoading:i,treeOptions:o,showNavigationPanel:r,navigationPanelOptions:a,gridOptions:l,toolbarOptions:c,bulkActionsToolbarOptions:d,deleteConfirmationOptions:u,destinationFolderPopupOptions:p,conflictResolutionPopupOptions:f,compactViewWidthBreakpoint:m=yG,customBreakpointRef:v,sharedByMePaths:C,allowedFileTypes:w,maxSelectableFileSize:b,areHiddenFilesVisible:x,toggleHiddenFilesVisibility:S,isTreeCollapsed:y,toggleTreeCollapse:R,currentPath:E,gridRows:F,selectedPaths:P,selectedFiles:k,clearSelection:D,setSelectedPaths:T,effectiveSearchValue:I,handleBreadcrumbItemClick:H,handleSearchChange:A,handleTreeItemClick:O,handleTableRowClick:G,handleSelectionClick:L,onGridApiChange:U,handleOpenDestinationFolderPopup:B,handleCloseDestinationFolderPopup:N,openDestinationFolderPopup:W,destinationFolderMode:Y,handleSetCopiedFiles:te,handleSetMovedFiles:we,handleDuplicate:Q,handleCopyTo:ve,handleMoveTo:Pe,handleGridAddSibling:J,handleGridAddChild:ge,handleTreeAddSibling:V,handleTreeAddChild:$,handleDownloadFiles:K,openDeleteConfirmation:ce,closeDeleteConfirmation:q,confirmDelete:ue,deleteConfirmationOpen:he,itemsToDelete:se,renamedPath:re,renamedItem:Oe,onRename:Ae,onRenameSave:Ce,onRenameCancel:ke,onRenameValidate:qe,createdFolderPath:ot,forbiddenSymbolsRegExp:Ve,forbiddenSymbolsTooltip:wt,getDisplayName:ze,isDragging:_e,isDraggingOverWindow:Z,handleDragEnter:Ue,handleDragLeave:ts,handleDragOver:ci,handleDrop:Sn,onUploadFiles:no,onValidateUpload:di,maxFileSize:oe,newActions:nt,isNewButtonVisible:io,isNewButtonDisabled:oo,newFolderTempId:ja,cancelFolderCreation:Rn,saveFolderCreation:ro,validateFolderName:za,startFolderCreation:Xs,conflictingFiles:Dt,conflictResolutionOpen:cr,handleConflictReplace:Wa,handleConflictDuplicate:Qs,handleConflictCancel:Js,handleConflictDecideForEach:ui,uploadConflictingFiles:_a,uploadConflictResolutionOpen:Fn,handleUploadConflictReplace:Ed,handleUploadConflictDuplicate:Dd,handleUploadConflictCancel:Pd,handleUploadConflictDecideForEach:Td,openMetadataPopup:mt,fileMetadataPopupOptions:Kt,isMetadataPopupOpen:en,selectedFileForMetadata:dr,closeMetadataPopup:ur,onUnshareFiles:En,onRemoveFilesAccess:ao,actionsRef:kd,searchInProgress:Ua,isSearchMode:Dn,emptyStateIcon:hi,emptyStateTitle:$a="You don't have any files",emptyStateDescription:qa="Upload or drag and drop files",sharedWithMeIds:lo,onFolderPopupPathChange:Id,onManagePermissions:co,onPreview:Md,onOpenInNewTab:Ad,previewExtensions:Ld,isRenameFileAvailable:Nd,isDuplicateFolderAvailable:Od,getDisabledTooltip:hr,fileTooLargeTooltip:uo,unsupportedFileTypeTooltip:Ka,gridClassName:pr,nonClickableTableColumns:gr,hideSearchPathItemName:fr,showHiddenFileSwitcherInDestinationPopup:pt,showCreateFolderButtonInDestinationPopup:Ya,newFolderDefaultName:rt}=t0(),{width:us=vG,header:ss=CG,containerClassName:Za=gG,additionalButtons:Xa,...Qa}=o??{},[ho,Ja]=g.useState(us),{renameTriggerView:Pn,onGridRename:Hd,onTreeRename:el}=FG({onRename:Ae}),{createFolderTriggerView:tl,onGridCreateSiblingFolder:Bd,onTreeCreateSiblingFolder:sl,onGridCreateChildFolder:Gd,onTreeCreateChildFolder:nl}=NV({onGridAddSibling:J,onGridAddChild:ge,onTreeAddSibling:V,onTreeAddChild:$}),mr=g.useRef(null),Vd=ne=>{mr.current===null&&(mr.current=requestAnimationFrame(()=>{Ja(ne),mr.current=null}))},{columnDefs:jd,filterable:zd=!0,dateLocale:Wd,dateOptions:_d,selectionMode:il,wrapCustomCellRenderers:ol,visibleColumns:rl=SG,allowDisabledContextMenu:po=!1,...Tn}=l??{},{containerRef:Ud,isBelowBreakpoint:hs}=EG(m,v),$d=g.useMemo(()=>Dn?[Ft.Name,Ft.Path,Ft.Actions]:rl,[Dn,rl]),vr=g.useCallback((ne,Qe,ut)=>jG(ne,Qe,ut,Ka,uo),[uo,Ka]),go=g.useCallback((ne,Qe,ut)=>!!hr?.(ne)||!!vr(ne,Qe,ut),[vr,hr]),pi=g.useMemo(()=>{const ne=new Set;for(const Qe of F)go(Qe,w,b)&&ne.add(Qe.path);return ne},[w,b,F,go]),Cr=g.useCallback(ne=>{const Qe=[],ut=[],jt=!ne.parentPath,kn=Ve?.test(ne.name);return o?.actionLabels&&(o.actionLabels[ee.AddSibling]&&ne.nodeType===De.FOLDER&&!jt&&Qe.push({key:"addSibling",label:o.actionLabels[ee.AddSibling],icon:h.jsx(Bx,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>sl([ne])}),o.actionLabels[ee.AddChild]&&ne.nodeType===De.FOLDER&&!kn&&Qe.push({key:"addChild",label:o.actionLabels[ee.AddChild],icon:h.jsx(Hx,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>nl([ne])}),o.actionLabels[ee.Duplicate]&&!jt&&!kn&&ut.push({key:"duplicate",label:o.actionLabels[ee.Duplicate],icon:h.jsx(z.IconCopy,{...ae,className:"text-secondary"}),onClick:()=>Q([ne])}),o.actionLabels[ee.Copy]&&!jt&&!kn&&ut.push({key:Rt.Copy,label:o.actionLabels[ee.Copy],icon:h.jsx(jg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>{te([ne]),B(Rt.Copy)}}),o.actionLabels[ee.Move]&&!jt&&!kn&&ut.push({key:Rt.Move,label:o.actionLabels[ee.Move],icon:h.jsx(zg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>{we([ne]),B(Rt.Move)}}),o.actionLabels[ee.Download]&&!jt&&!kn&&ut.push({key:"download",label:o.actionLabels[ee.Download],icon:h.jsx(z.IconDownload,{...ae,className:"text-secondary"}),onClick:()=>K([ne])}),o.actionLabels[ee.ManagePermissions]&&typeof co=="function"&&ne.nodeType===De.FOLDER&&!jt&&ut.push({key:ee.ManagePermissions,label:o.actionLabels[ee.ManagePermissions],icon:h.jsx(z.IconExternalLink,{...ae,className:"text-secondary"}),onClick:()=>co?.(ne.path)}),o.actionLabels[ee.Delete]&&ne.permissions?.includes(to.WRITE)&&!jt&&ut.push({key:"delete",label:o.actionLabels[ee.Delete],icon:h.jsx(z.IconTrashX,{...ae,className:"text-secondary"}),onClick:()=>ce([ne],ne.parentPath??"")}),o.actionLabels[ee.Rename]&&!jt&&ut.push({key:"rename",label:o.actionLabels[ee.Rename],icon:h.jsx(z.IconPencilMinus,{...ae,className:"text-secondary"}),onClick:()=>el(ne.path)}),o.actionLabels[ee.Unshare]&&lo?.includes(ne.path)&&!jt&&ut.push({key:"unshare",label:o.actionLabels[ee.Unshare],icon:h.jsx(Wg,{width:ae.size,height:ae.size,className:"text-secondary"}),onClick:()=>En?.([ne])}),o.actionLabels[ee.RemoveAccess]&&C?.has(ne.path)&&!jt&&ut.push({key:ee.RemoveAccess,label:o.actionLabels[ee.RemoveAccess],icon:h.jsx(z.IconUserX,{size:ae.size,className:"text-secondary"}),onClick:()=>ao?.([ne])})),Qe.length?ut.length===0?Qe:Qe.length===0?ut:[...Qe,{key:"divider",type:Jn.Divider},...ut]:ut},[o?.actionLabels,Ve,co,Q,te,B,we,K,el,En,ao,lo,C,ce,nl,sl]),al=g.useMemo(()=>{const ne=new Set;return k.forEach((Qe,ut)=>ne.add(ut)),ne},[k]),wr=g.useCallback((ne,Qe)=>{T(ne),L?.(Qe)},[L,T]),ll=kV({selectedFiles:k,actionLabels:d?.actionLabels,onDuplicate:Q,onCopy:ne=>{te(ne),B(Rt.Copy)},onMove:ne=>{we(ne),B(Rt.Move)},onDownload:K,onDelete:ce,onUnshare:En,onRemoveAccess:ao,getCurrentFolderPath:()=>E??"/",sharedWithMeIds:lo,sharedByMePaths:C,onClearSelection:D,forbiddenSymbolsRegExp:Ve}),br=g.useCallback(ne=>{c?.onTabChange?.(ne),Rn()},[c,Rn]),qd=g.useCallback(()=>c&&P.size===0?h.jsxs("div",{className:Ov,role:"toolbar","aria-label":"File Manager Toolbar",children:[e,h.jsx(yV,{...c,onTabChange:br,areHiddenFilesVisible:x,onToggleHiddenFiles:S,isNewButtonVisible:io,isNewButtonDisabled:oo,newButtonDropdownItems:nt})]}):P.size>0&&d?h.jsx("div",{className:Ov,role:"toolbar","aria-label":"File Manager Toolbar",children:h.jsx(mV,{...d,selectedCount:P.size,onClearSelection:D,actions:ll})}):null,[br,d,P,D,ll,x,S,c,io,oo,nt,e]);g.useImperativeHandle(kd,()=>({createFolder:Xs}),[Xs]);const Kd=g.useCallback(()=>hs?null:h.jsx("aside",{role:"region","aria-label":"File Manager Tree Navigation",className:"min-h-0 min-w-0 h-full flex-none",children:h.jsx(_C,{defaultWidth:ho,width:ho,onResizeStop:Ja,onResize:Vd,minWidth:bG,maxWidth:xG,enabled:!y,children:h.jsx(IC,{width:ho,title:ss,containerClassName:Za,titleClassName:"dial-body-text text-primary",additionalButtons:Xa,isOpened:!y,onToggle:R,children:h.jsx(Xx,{...Qa,items:s,rootItemPath:n?.path,rootItemLabel:n?.label,selectedPath:E,sharedByMePaths:C,forbiddenSymbolsRegExp:Ve,forbiddenSymbolsTooltip:wt,onItemClick:O,areHiddenFilesVisible:x,getContextMenuItems:Cr,renamedPath:Pn===Wo.Tree?re:void 0,onRenameSave:Ce,onRenameCancel:ke,onRenameValidate:qe,createdFolderPath:tl===Si.Tree?ot:null,onCreateFolderCancel:Rn,onCreateFolderSave:ro,newFolderDefaultName:rt})})})}),[hs,ho,y,ss,Za,Xa,R,Qa,s,n?.path,n?.label,E,C,Ve,wt,O,x,Cr,Pn,tl,re,Ce,ke,qe,ot,Rn,ro,rt]),cl=LV({actionLabels:l?.actionLabels,onDuplicate:ne=>Q([ne]),onCopy:ne=>{te([ne]),B(Rt.Copy)},onMove:ne=>{we([ne]),B(Rt.Move)},onDownload:ne=>K([ne]),onRename:Hd,onDelete:(ne,Qe)=>ce([ne],Qe),onInfo:ne=>mt(ne),onUnshare:ne=>En?.([ne]),onRemoveAccess:ne=>ao?.([ne]),sharedWithMeIds:lo,sharedByMePaths:C,onManagePermissions:ne=>co?.(ne),onPreview:ne=>Md?.(ne),onOpenInNewTab:ne=>Ad?.(ne),previewExtensions:Ld,isRenameFileAvailable:Nd,isDuplicateFolderAvailable:Od,forbiddenSymbolsRegExp:Ve,onGridCreateSiblingFolder:Bd,onGridCreateChildFolder:Gd}),xr=g.useCallback(ne=>{const Qe=un(s,ne.path);return Qe?cl(Qe):[]},[s,cl]),Yd=g.useCallback((ne,Qe,ut)=>po?!1:go(ne,Qe,ut),[po,go]),{actionsColumnDef:Zd}=RG({getContextMenuItems:xr,isRowDisabled:Yd,allowedFileTypes:w,buttonClassName:hs?"":mG}),{columnDefs:yr}=AV({userColumnDefs:jd,filterable:zd,dateLocale:Wd,dateOptions:_d,effectiveVisibleColumns:$d,isCompactView:hs,hasActions:!!l?.actionLabels,actionsColumnDef:Zd,rootItemLabel:n?.label,rootItemPath:n?.path}),dl=g.useCallback(ne=>{ne.colDef.colId==="ag-Grid-SelectionColumn"||ne.colDef.colId===Ft.Actions||re&&ne.data?.path===re||ne.data?.isTemporary||gr&&gr.includes(ne.colDef.colId)||ne.data&&G(ne.data)},[re,G,gr]),gi=g.useCallback(()=>h.jsx(tr,{title:$a,description:qa,descriptionClassName:"text-sm",containerClassName:"gap-3 size-full bg-layer-2 border rounded-[4px] border-primary",titleClassName:"mt-2 !text-lg",icon:hi||h.jsx(z.IconFileDescription,{size:100,stroke:.5,className:"text-secondary"})}),[qa,hi,$a]),ul=g.useMemo(()=>ne=>ne.path,[]),hl=g.useMemo(()=>pe("min-h-[248px] overflow-auto md:min-h-[266px]",_e?"border border-dashed border-accent-primary":"",Z&&!_e?"border border-dashed border-primary":""),[_e,Z]),pl=g.useMemo(()=>({...Tn.additionalGridOptions,onCellClicked:dl,headerHeight:Bv,rowHeight:Bv,rowClass:"group/grid-row",defaultColDef:{...Tn.additionalGridOptions?.defaultColDef,floatingFilter:a?.searchable?!1:Tn.additionalGridOptions?.defaultColDef?.floatingFilter},context:{cancelFolderCreation:Rn,saveFolderCreation:ro,getDisplayName:ze,onRenameCancel:ke,onRenameSave:Ce,onRenameValidate:qe,renameTriggerView:Pn,validateFolderName:za,renamedItem:Oe,renamedPath:re,createdFolderPath:ot,newFolderTempId:ja,sharedByMePaths:C,selectedPaths:P,disabledRowIds:pi,forbiddenSymbolsRegExp:Ve,forbiddenSymbolsTooltip:wt,hideSearchPathItemName:fr,newFolderDefaultName:rt,filesLoading:i}}),[Tn.additionalGridOptions,dl,a?.searchable,Rn,ro,ze,ke,Ce,qe,Pn,za,Oe,re,ot,ja,C,P,pi,Ve,wt,fr,rt,i]),Xd=g.useMemo(()=>F.length===0&&!Dn&&!i?gi():h.jsx(Ng,{columnDefs:yr,rowData:F,getRowId:ul,loading:i||Ua,getContextMenuItems:xr,withoutHeaderBorders:hs,onGridApiChange:U,className:hl,...Tn,selectionMode:il,wrapCustomCellRenderers:ol,additionalGridOptions:pl,selectedRowIds:al,onSelectionChange:wr,wrapperBorder:!_e&&!Z,disabledRowIds:pi,allowDisabledContextMenu:po}),[F,Dn,i,gi,yr,ul,Ua,xr,hs,U,hl,Tn,il,ol,pl,al,wr,_e,Z,pi,po]);return h.jsx("section",{ref:Ud,className:"size-full",children:h.jsxs("div",{className:M(uG,{"gap-3 pt-4":d&&P.size>0,"gap-4 p-3 pt-4":hs,"gap-2 pt-2":hs&&d&&P.size>0},t),children:[qd(),h.jsxs("div",{className:M(hG,pr),children:[Kd(),h.jsxs("div",{className:M(pG,{"gap-3":hs}),children:[r&&h.jsx(xV,{...a??{},makeHref:ne=>ne.join("/"),path:E,onItemClick:H,rootItemPath:n?.path,rootItemLabel:n?.label,value:I,onSearchChange:A,isCompactView:hs,labelClassName:"dial-tiny-text"}),h.jsxs("section",{role:"region","aria-label":"File Manager Grid View",className:M(fG,"relative"),onDragEnter:Ue,onDragLeave:ts,onDragOver:ci,onDrop:Sn,children:[Xd,h.jsx(hV,{disabledGridRowIds:pi,gridRows:F,getDisabledTooltip:hr,getRowDisabledTooltip:vr,allowedFileTypes:w,maxSelectableFileSize:b})]})]})]}),h.jsx(vV,{...u,open:he,itemsToDelete:se,onClose:q,onConfirm:ue}),h.jsx(Kx,{...p,open:W,onClose:N,onConfirm:()=>{const ne=p?.destinationFolderPath??"/";Y===Rt.Copy?ve(ne):Pe(ne),N()},mode:Y,items:s,rootItem:n,gridOptions:{columnDefs:yr.filter(ne=>ne.colId!==Ft.Actions),loading:i},onUploadFiles:no,onValidateUpload:di,maxFileSize:oe,path:p?.destinationFolderPath??p?.sourceFolder??E,onPathChange:ne=>{p?.setDestinationFolderPath?.(ne)},sourceFolder:p?.sourceFolder??E,treeOptions:{header:o?.header},onFolderPopupPathChange:Id,showHiddenFileSwitcher:pt,showCreateFolderButton:Ya,hideSearchPathItemName:fr}),h.jsx(Gv,{...f,open:cr,onClose:Js,onReplace:Wa,onDuplicate:Qs,onDecideForEach:ui,conflictingFiles:Dt}),h.jsx(Gv,{...f,open:Fn,onClose:Pd,onReplace:Ed,onDuplicate:Dd,onDecideForEach:Td,conflictingFiles:_a}),h.jsx(FV,{open:en,onClose:ur,fileMetadata:Kt?.fileMetadata??dr,loading:Kt?.loading,header:Kt?.header,nameLabel:Kt?.nameLabel,pathLabel:Kt?.pathLabel,modifiedDateLabel:Kt?.modifiedDateLabel,sizeLabel:Kt?.sizeLabel,authorLabel:Kt?.authorLabel,dateLocale:l?.dateLocale,dateOptions:l?.dateOptions})]})})};var Yg=(e=>(e.dark="dark",e.light="light",e))(Yg||{});const HV=(e,t=ko.MyFiles)=>{const s=Object.values(ko).includes(t)?t:ko.MyFiles,[n,i]=g.useState(s),o=a=>{i(a)},r=g.useMemo(()=>{if(e)return Object.values(ko).map(a=>({id:a,label:e?.[a]||a.replace("_"," ")}))},[e]);return{activeTab:n,handleTabChange:o,tabs:r}},BV="application/octet-stream";function GV(e,t){if(!e||e.length===0)return[];const s=e.find(l=>l.parentPath===""&&l.nodeType==="FOLDER");if(!s)return[];const n=s.path||s.url||"",i=ih(n,!0),o=e.filter(l=>l!==s).map(l=>{const c=l.path||l.url||"",d=VV(l.nodeType),u=d===De.FOLDER,p=ih(c,u);let f;return l.parentPath===null||l.parentPath===void 0?f=i:l.parentPath===""?f="":f=ih(l.parentPath,!0),{...l,originalPath:c,path:p,parentPath:f,nodeType:d}}),r=new Map;o.forEach(l=>{const c={...l,id:l.originalPath,name:l.name,path:l.path,parentPath:l.parentPath,nodeType:l.nodeType,resourceType:jV(l.resourceType),folderId:t,updatedAt:l.updatedAt?new Date(l.updatedAt).toISOString():new Date().toISOString(),items:l.nodeType===De.FOLDER?[]:void 0};l.nodeType===De.ITEM&&(c.extension=zV(l.name),c.contentType=l.contentType||BV,c.contentLength=l.contentLength||0),r.set(l.path,c)});const a=[];return r.forEach(l=>{if(l.parentPath===i)a.push(l);else{const c=l.path.lastIndexOf(l.name||""),d=l.path.slice(0,c),u=r.get(d);u&&u.nodeType===De.FOLDER?(u.items=u.items||[],u.items.push(l)):a.push(l)}}),a}function ih(e,t){try{let s=decodeURIComponent(e);return t?s.endsWith("/")||(s+="/"):s.endsWith("/")&&(s=s.slice(0,-1)),s}catch{return t&&!e.endsWith("/")?e+"/":!t&&e.endsWith("/")?e.slice(0,-1):e}}function VV(e){return e.toUpperCase()==="FOLDER"?De.FOLDER:De.ITEM}function jV(e){if(!e)return;const t=e.toUpperCase();return Object.values(_g).find(n=>n.toUpperCase()===t)}function zV(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function WV(e,t="Prompts",s="prompts/public/",n="root"){const i=GV(e,n);return[{id:n,name:t,path:s,parentPath:"",nodeType:De.FOLDER,folderId:n,items:i}]}var Io=(e=>(e.Sections="sections",e.Flat="flat",e.FlatSections="flat-sections",e))(Io||{}),Sa=(e=>(e.Select="select",e.Radio="radio",e))(Sa||{}),yd=(e=>(e.Row="row",e.Column="column",e))(yd||{}),Xe=(e=>(e.String="string",e.Number="number",e.Integer="integer",e.Boolean="boolean",e.Object="object",e.Array="array",e.Null="null",e))(Xe||{});const _V={noItemSchema:"No item schema defined.",noItemsYet:"No items yet. Add one below.",addItem:"Add Item",selectTypeToAdd:"Select type to add…",noConfigurableProperties:"No configurable properties.",noFieldsYet:"No fields yet. Add one below.",keyColumnHeader:"Key",valueColumnHeader:"Value",addField:"Add Field",keyInputPlaceholder:"Enter key",stringInputPlaceholder:"Enter a value",integerInputPlaceholder:"Enter a whole number",numberInputPlaceholder:"Enter a number",enumSelectPlaceholder:"Select an option",selectTypePlaceholder:"Select type",removeItemAriaLabel:"Remove item",removeFieldAriaLabel:"Remove field"},n0=g.createContext(null);function Zs(){const e=g.useContext(n0);if(!e)throw new Error("useSchemaContext must be used inside DialSchemaRenderer");return e}function Kv(e,t){const s={...e,...t};return(e.properties||t.properties)&&(s.properties={...e.properties,...t.properties}),(e.required||t.required)&&(s.required=Array.from(new Set([...e.required??[],...t.required??[]]))),s}function je(e,t,s=0){if(s>10)return e;let n=e;if(n.$ref){const i=n.$ref.replace(/^#\//,"").split("/");let o=t;for(const d of i)o=o?.[d];if(!o||typeof o!="object")return e;const{$ref:r,...a}=n,l=o;n={...l.$ref?je(l,t,s+1):l,...a}}if(n.allOf&&n.allOf.length>0){const{allOf:i,...o}=n;let r={};for(const a of i)r=Kv(r,je(a,t,s+1));n=Kv(r,o)}return n}function i0(e){return e.map((t,s)=>({entry:t,index:s})).sort((t,s)=>{const n=t.entry[1]["dial:meta"]?.["dial:propertyOrder"]??1/0,i=s.entry[1]["dial:meta"]?.["dial:propertyOrder"]??1/0;return n!==i?n-i:t.index-s.index}).map(({entry:t})=>t)}function Sd(e){return e==null||e===""}function so(e){return e.type===Xe.Object||e.properties!=null&&e.oneOf==null&&e.anyOf==null&&e.type==null}function Oc(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function o0(e,t){return e.type===Xe.Null?"null":e.$ref?je(e,t).title??e.$ref.split("/").pop()??"Option":e.title?e.title:e.type?Array.isArray(e.type)?e.type.join(" | "):e.type:e.discriminator?Object.keys(e.discriminator.mapping).join(" | "):e.const!=null?String(e.const):e.oneOf?"One of options":"Option"}function Cn(e,t,s=0){if(s>15)return;const n=je(e,t);if("default"in n)return n.default;if(n.discriminator&&n.oneOf){const i=Object.keys(n.discriminator.mapping)[0];if(i){const o=je({$ref:n.discriminator.mapping[i]},t);return{...Cn(o,t,s+1)??{},[n.discriminator.propertyName]:i}}}if(so(n)){if(n.properties){const i={};let o=!1;for(const[r,a]of Object.entries(n.properties)){const l=Cn(a,t,s+1);l!==void 0&&(i[r]=l,o=!0)}return o?i:void 0}if(n.additionalProperties!=null&&n.additionalProperties!==!1)return{}}}function an(e,t,s,n="",i=0){if(i>15)return[];const o=[],r=je(t,s);if(r.anyOf){const c=r.anyOf.filter(d=>d.type!==Xe.Null);return e!=null&&c.length===1?an(e,c[0],s,n,i+1):o}if(r.oneOf&&r.discriminator){const c=r.discriminator.propertyName,d=e?.[c];if(d&&r.discriminator.mapping[d]){const u={$ref:r.discriminator.mapping[d]},p=je(u,s);return an(e,p,s,n,i+1)}return o}if(r.type===Xe.Array||!r.type&&Array.isArray(e)){if(Array.isArray(e)&&r.items)for(let c=0;c<e.length;c++){const d=an(e[c],r.items,s,`${n}[${c}]`,i+1);o.push(...d)}return o}if(!so(r))return o;const a=r.required??[],l=e;for(const c of a){const d=r.properties?.[c];if(d&&je(d,s).isHidden)continue;const u=n?`${n}.${c}`:c,p=l?.[c];if(Sd(p)){const f=d?.title??Oc(c);o.push({path:u,message:`${f} is required`})}}if(l&&r.properties)for(const[c,d]of Object.entries(r.properties)){if(je(d,s).isHidden)continue;const u=n?`${n}.${c}`:c,p=l[c];if(p!=null){const f=an(p,d,s,u,i+1);o.push(...f)}}if(l&&r.additionalProperties!=null&&r.additionalProperties!==!1&&typeof r.additionalProperties=="object"){const c=r.additionalProperties;for(const[d,u]of Object.entries(l)){const p=n?`${n}.${d}`:d,f=an(u,c,s,p,i+1);o.push(...f)}}return o}function Zg(e,t,s){const n=je(t,s);if(Array.isArray(e))return`${e.length} item${e.length!==1?"s":""}`;if(so(n)&&n.properties){const i=Object.entries(n.properties).filter(([,l])=>!je(l,s).isHidden),o=i.length,r=e;return`${i.filter(([l])=>{const c=r?.[l];return c!=null&&c!==""}).length}/${o} fields`}return""}function UV(e,t,s){if(e==null){const n=t.findIndex(i=>i.type===Xe.Null);return n>=0?n:0}if(Array.isArray(e)){const n=t.findIndex(i=>je(i,s).type===Xe.Array);return n>=0?n:0}if(typeof e=="boolean"){const n=t.findIndex(i=>je(i,s).type===Xe.Boolean);return n>=0?n:0}if(typeof e=="number"){const n=t.findIndex(i=>{const o=je(i,s);return o.type===Xe.Number||o.type===Xe.Integer});return n>=0?n:0}if(typeof e=="string"){const n=t.findIndex(i=>je(i,s).type===Xe.String);return n>=0?n:0}if(typeof e=="object"){const n=e;for(let i=0;i<t.length;i++){const o=je(t[i],s);if(o.discriminator&&o.discriminator.propertyName in n)return i}for(let i=0;i<t.length;i++){const o=je(t[i],s);if(so(o)||o.oneOf)return i}return 0}return 0}function $V(e,t,s){if(t&&typeof e=="object"&&e!==null){const n=e[t];if(n)return`Item ${s+1}: ${n}`}if(typeof e=="object"&&e!==null){const n=e,i=n.name??n.title??n.id;if(i)return`Item ${s+1}: ${i}`}return`Item ${s+1}`}function r0(e){switch(Array.isArray(e.type)?e.type[0]:e.type){case Xe.String:return"";case Xe.Boolean:return!1;case Xe.Array:return[];case Xe.Integer:case Xe.Number:return;default:return{}}}const Ra=({title:e,description:t,summary:s,errorCount:n=0,level:i=0,children:o,onRemove:r,defaultExpanded:a=!0,removeItemAriaLabel:l="Remove item"})=>{const[c,d]=g.useState(a),u=i===0,p="rounded border border-secondary",f=M("flex items-center gap-2 cursor-pointer select-none transition-colors",u?"px-4 py-3 bg-layer-3 hover:bg-layer-4":"px-3 py-2 bg-layer-4 hover:bg-layer-3",c?"rounded-t":"rounded"),m=M("border-t border-secondary",u?"p-4":"p-3");return h.jsxs("div",{className:p,children:[h.jsxs("div",{className:f,onClick:()=>d(v=>!v),role:"button","aria-expanded":c,children:[h.jsx("span",{className:"shrink-0 text-secondary",children:c?h.jsx(z.IconChevronDown,{size:16,stroke:2}):h.jsx(z.IconChevronRight,{size:16,stroke:2})}),h.jsx("span",{className:M("flex-1 truncate",u?"dial-small-semi-text text-primary":"dial-small-text text-primary"),children:e}),t&&h.jsx(EC,{caption:t}),s&&h.jsx("span",{className:"dial-tiny-text text-secondary whitespace-nowrap ml-2",children:s}),n>0?h.jsxs("span",{className:"flex items-center gap-1 dial-tiny-text text-error whitespace-nowrap",children:[h.jsx(Le,{icon:h.jsx(z.IconAlertTriangle,{size:13,stroke:2})}),n," error",n>1?"s":""]}):h.jsx(Le,{icon:h.jsx(z.IconCheck,{size:13,stroke:2}),className:"text-success shrink-0"}),r&&h.jsx(Cd,{size:me.Small,onClick:v=>{v.stopPropagation(),r()},"aria-label":l,className:"ml-1 shrink-0 p-0.5"})]}),c&&h.jsx("div",{className:m,children:o})]})},a0=({schema:e,value:t,onChange:s,path:n,level:i=0,required:o,label:r})=>{const{rootSchema:a,defaultExpanded:l=!0,touchedPaths:c=new Set,skipUntouched:d=!1}=Zs(),u=je(e,a),p=so(u),f=u.type===Xe.Array;if(p||f){const C=Zg(t,u,a),w=an(t,u,a,n.join(".")),b=n.join("."),x=b+".",S=!d||c.has(b)||[...c].some(y=>y.startsWith(x));return h.jsx(Ra,{title:r??u.title??n[n.length-1]??"Section",description:u.description,level:i,summary:C,errorCount:S?w.length:0,defaultExpanded:l,children:h.jsx(wn,{schema:u,value:t,onChange:s,path:n,level:i+1,required:o})})}const v=(!d||c.has(n.join(".")))&&o&&Sd(t)?`${r??"Field"} is required`:void 0;return h.jsx(Wc,{label:r,required:o,description:u.description,error:v,children:h.jsx(wn,{schema:u,value:t,onChange:s,path:n,level:i,required:o,suppressInlineError:!0})})},ec=({schema:e,value:t,onChange:s,path:n,level:i})=>{const{rootSchema:o,texts:r}=Zs(),a=je(e,o),l=i0(Object.entries(a.properties??{}).filter(([,u])=>!je(u,o).isHidden)),c=a.required??[],d=t??{};return l.length===0?h.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noConfigurableProperties}):h.jsx("div",{className:"flex flex-col gap-4",children:l.map(([u,p])=>{const m=je(p,o).title??p.title??Oc(u),v=c.includes(u);return h.jsx(a0,{schema:p,value:d[u],onChange:C=>s({...d,[u]:C}),path:[...n,u],level:i,required:v,label:m},u)})})},qV=({schema:e,value:t,onChange:s,path:n,level:i})=>{const{rootSchema:o,texts:r,readonly:a=!1,defaultExpanded:l=!0}=Zs(),c=Array.isArray(t)?t:[],d=e.items,[u,p]=g.useState(void 0);if(!d)return h.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemSchema});const f=g.useMemo(()=>je(d,o),[d,o]),m=g.useMemo(()=>f.discriminator,[f]),v=g.useMemo(()=>m?.propertyName,[m]),C=g.useMemo(()=>m?Object.keys(m.mapping).map(S=>({value:S,label:S})):[],[m]),w=()=>{const S=u??C[0]?.value;let y;if(m&&S){const R=je({$ref:m.mapping[S]},o);y={...Cn(R,o)??{},[m.propertyName]:S}}else y=Cn(f,o)??r0(f);s([...c,y])},b=S=>{s(c.filter((y,R)=>R!==S))},x=(S,y)=>{s(c.map((R,E)=>E===S?y:R))};return h.jsxs("div",{className:"flex flex-col gap-3",children:[c.length===0&&h.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noItemsYet}),c.map((S,y)=>{const R=$V(S,v,y),E=Zg(S,f,o),F=an(S,f,o,`${n.join(".")}[${y}]`);return h.jsx(Ra,{title:R,level:i,summary:E,errorCount:F.length,onRemove:a?void 0:()=>b(y),defaultExpanded:l,removeItemAriaLabel:r.removeItemAriaLabel,children:h.jsx(wn,{schema:d,value:S,onChange:P=>x(y,P),path:[...n,String(y)],level:i+1})},y)}),!a&&h.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[C.length>0&&h.jsx("div",{className:"flex-1 max-w-[280px]",children:h.jsx(ei,{options:C,value:u??C[0]?.value,placeholder:r.selectTypeToAdd,onChange:S=>{const y=typeof S=="string"?S:S[0];p(y)}})}),h.jsx(Gg,{label:r.addItem,iconBefore:h.jsx(z.IconPlus,{size:16,stroke:2}),onClick:w})]})]})},KV=({schema:e,value:t,onChange:s,path:n,level:i})=>{const{rootSchema:o,texts:r,readonly:a=!1}=Zs(),l=g.useId(),c=e.discriminator;if(c){const C=c.propertyName,w=c.mapping,b=Object.keys(w).map(R=>({value:R,label:R})),x=typeof t=="object"&&t!==null?t[C]:void 0,S=x?je({$ref:w[x]},o):void 0,y=R=>{const E=je({$ref:w[R]},o),F=Cn(E,o)??{};s({...F,[C]:R})};if(e.discriminatorDisplay===Sa.Radio){const R=e.discriminatorOrientation===yd.Row,E=x?(()=>{const F=je({$ref:w[x]},o),{[C]:P,...k}=F.properties??{};return{...F,properties:k}})():void 0;return R?h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("div",{role:"radiogroup",className:"flex flex-row flex-wrap gap-4",children:Object.keys(w).map(F=>{const P=je({$ref:w[F]},o);return h.jsx(Ei,{name:l,value:F,inputId:`${l}-${F}`,label:P.title??F,checked:x===F,disabled:a,onChange:()=>y(F)},F)})}),E&&h.jsx(ec,{schema:E,value:t,onChange:s,path:n,level:i})]}):h.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:Object.keys(w).map(F=>{const P=je({$ref:w[F]},o),k=x===F,{[C]:D,...T}=P.properties??{},I={...P,properties:T};return h.jsxs("div",{className:"flex flex-col",children:[h.jsx(Ei,{name:l,value:F,inputId:`${l}-${F}`,label:P.title??F,checked:k,disabled:a,onChange:()=>y(F)}),k&&h.jsx("div",{className:"ml-6 mt-2",children:h.jsx(ec,{schema:I,value:t,onChange:s,path:n,level:i})})]},F)})})}return h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("div",{className:"flex-1 max-w-[280px]",children:h.jsx(ei,{options:b,value:x,placeholder:r.selectTypePlaceholder,disabled:a,onChange:R=>{const E=typeof R=="string"?R:R[0];E&&y(E)}})}),S&&h.jsx("div",{className:"pl-3",children:h.jsx(ec,{schema:S,value:t,onChange:s,path:n,level:i})})]})}const d=e.oneOf??[],p=(()=>{if(t==null)return 0;if(typeof t=="object"&&!Array.isArray(t)){for(let C=0;C<d.length;C++)if(je(d[C],o).required?.every(b=>b in t))return C}return 0})(),f=C=>{const w=je(d[C],o),b=Cn(w,o);s(b??null)},m=d[p];if(e.discriminatorDisplay===Sa.Radio)return h.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:d.map((C,w)=>{const b=je(C,o),x=o0(C,o)??`Option ${w+1}`,S=p===w;return h.jsxs("div",{className:"flex flex-col",children:[h.jsx(Ei,{name:l,value:String(w),inputId:`${l}-${w}`,label:x,checked:S,disabled:a,onChange:()=>f(w)}),S&&b&&h.jsx("div",{className:"ml-6 mt-2",children:h.jsx(wn,{schema:b,value:t,onChange:s,path:n,level:i})})]},w)})});const v=d.map((C,w)=>{const b=je(C,o);return{value:String(w),label:b.title??`Option ${w+1}`}});return h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("div",{className:"flex-1 max-w-[280px]",children:h.jsx(ei,{options:v,value:String(p),disabled:a,onChange:C=>{const w=typeof C=="string"?C:C[0];f(Number(w))}})}),m&&h.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:h.jsx(wn,{schema:m,value:t,onChange:s,path:n,level:i})})]})},YV=({schema:e,value:t,onChange:s,path:n,level:i})=>{const{rootSchema:o,readonly:r=!1}=Zs(),a=e.anyOf??[],l=a.map((m,v)=>({value:String(v),label:o0(m,o)})),c=UV(t,a,o),d=a[c],p=je(d,o).type===Xe.Null,f=m=>{const v=je(a[m],o);if(v.type===Xe.Null){s(null);return}const C=Cn(v,o);if(C!==void 0){s(C);return}switch(v.type){case Xe.Array:s([]);break;case Xe.String:s("");break;case Xe.Boolean:s(!1);break;case Xe.Integer:case Xe.Number:s(0);break;default:s({});break}};return h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("div",{className:"flex-1 max-w-[280px]",children:h.jsx(ei,{options:l,value:String(c),disabled:r,onChange:m=>{const v=typeof m=="string"?m:m[0];f(Number(v))}})}),!p&&d&&h.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:h.jsx(wn,{schema:d,value:t,onChange:s,path:n,level:i})})]})},l0=({schema:e,value:t,onChange:s,invalid:n})=>{const i=g.useId(),{texts:o,readonly:r=!1,inputClassName:a,acceptableResourceTypes:l}=Zs(),c=e.const!==void 0,d=Array.isArray(e.enum)&&e.enum.length>0;if(e["dial:resource"]===!0&&Array.isArray(e.acceptableResourceTypes)&&e.acceptableResourceTypes.length>0&&(e.type===Xe.String||e.type===void 0)){const p=(e.acceptableResourceTypes??[]).flatMap(f=>{const m=l?.[f];return Array.isArray(m)?m.map(v=>{const C=String(v);return{value:C,label:C}}):[]});return h.jsx(ei,{options:p,value:t!=null?String(t):void 0,invalid:n,disabled:r,onChange:f=>s(typeof f=="string"?f:f[0]),placeholder:o.enumSelectPlaceholder,className:a})}if(c)return h.jsx(vn,{value:String(e.const??""),disabled:!0,onChange:void 0,className:"opacity-60"});if(d&&e.enumDisplay===Sa.Radio){const p=e.enumOrientation===yd.Row;return h.jsx("div",{role:"radiogroup",className:p?"flex flex-row flex-wrap gap-x-4 gap-y-2":"flex flex-col gap-2",children:e.enum.map(f=>{const m=String(f);return h.jsx(Ei,{name:i,value:m,inputId:`${i}-${m}`,label:m,checked:t!=null?String(t)===m:!1,disabled:r,onChange:v=>s(v)},m)})})}if(d){const p=e.enum.map(f=>({value:String(f),label:String(f)}));return h.jsx(ei,{options:p,value:t!=null?String(t):void 0,invalid:n,disabled:r,onChange:f=>s(typeof f=="string"?f:f[0]),placeholder:o.enumSelectPlaceholder})}switch(e.type){case Xe.Boolean:return h.jsx(wd,{switchId:i,isOn:!!t,disabled:r,onChange:p=>s(p)});case Xe.Integer:return h.jsx(ep,{integer:!0,value:t!=null?String(t):"",invalid:n,disabled:r,onChange:p=>s(p!==void 0?Number(p):void 0),placeholder:o.integerInputPlaceholder,containerClassName:a});case Xe.Number:return h.jsx(ep,{value:t!=null?String(t):"",invalid:n,disabled:r,onChange:p=>s(p!==void 0?Number(p):void 0),placeholder:o.numberInputPlaceholder,containerClassName:a});default:return e.isProtected?h.jsx(Dx,{value:t!=null?String(t):"",invalid:n,disabled:r,onChange:p=>s(p??void 0),placeholder:o.stringInputPlaceholder,containerClassName:a}):h.jsx(vn,{value:t!=null?String(t):"",invalid:n,disabled:r,onChange:p=>s(p??void 0),placeholder:o.stringInputPlaceholder,containerClassName:a})}},Yv=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),c0=e=>!!(e.oneOf||e.anyOf||e.type===Xe.Array||so(e)),ZV=({pairId:e,pairKey:t,pairValue:s,valueSchema:n,onKeyChange:i,onValueChange:o,onRemove:r,keyInputPlaceholder:a,removeFieldAriaLabel:l,path:c,level:d,readonly:u=!1,inputClassName:p})=>{const{rootSchema:f,texts:m,defaultExpanded:v=!0,touchedPaths:C=new Set,markTouched:w=()=>{},skipUntouched:b=!1}=Zs(),[x,S]=g.useState(t),y=c0(n),R=[...c,e,"key"].join("."),F=(!b||C.has(R))&&t==="",P=h.jsxs("div",{className:"flex gap-2 items-start",children:[h.jsxs("div",{className:y?"flex-1 min-w-0":"w-2/5 min-w-0",children:[h.jsx(vn,{value:x,disabled:u,invalid:F,onChange:I=>S(I??""),onBlur:()=>{w(R),x!==t&&i(x)},placeholder:a,containerClassName:p}),h.jsx(Ht,{text:F?`${m.keyColumnHeader} is required`:void 0})]}),!y&&h.jsx("div",{className:"flex-1 min-w-0",children:h.jsx(l0,{schema:n,value:s,onChange:o})}),!u&&h.jsx(Cd,{size:me.Small,onClick:r,"aria-label":l,className:"shrink-0 p-1"})]});if(!y)return P;const k=[...c,t],D=Zg(s,n,f),T=an(s,n,f,k.join("."));return h.jsxs("div",{className:"flex flex-col gap-2",children:[P,h.jsx(Ra,{title:t,level:d,summary:D,errorCount:T.length+(F?1:0),defaultExpanded:v,children:h.jsx(wn,{schema:n,value:s,onChange:o,path:k,level:d+1})})]})},XV=({schema:e,value:t,onChange:s,path:n,level:i})=>{const{rootSchema:o,texts:r,readonly:a=!1,inputClassName:l}=Zs(),c=e.additionalProperties===!0||e.additionalProperties==null?{type:"string"}:typeof e.additionalProperties=="object"?je(e.additionalProperties,o):{type:"string"},d=c0(c),[u,p]=g.useState(()=>Object.entries(t??{}).map(([x,S])=>Yv(x,S))),f=x=>Object.fromEntries(x.filter(S=>S.key!=="").map(S=>[S.key,S.value])),m=(x,S)=>{const y=u.map((R,E)=>E===x?{...R,key:S}:R);p(y),s(f(y))},v=(x,S)=>{const y=u.map((R,E)=>E===x?{...R,value:S}:R);p(y),s(f(y))},C=()=>d?Cn(c,o)??r0(c):"",w=()=>{p(x=>[...x,Yv("",C())])},b=x=>{const S=u.filter((y,R)=>R!==x);p(S),s(f(S))};return h.jsxs("div",{className:"flex flex-col gap-2",children:[u.length===0&&h.jsx("p",{className:"dial-tiny-text text-secondary italic",children:r.noFieldsYet}),u.length>0&&!d&&h.jsxs("div",{className:"flex gap-2 mb-1 pr-7",children:[h.jsx("span",{className:"w-2/5 dial-tiny-text text-secondary font-medium",children:r.keyColumnHeader}),h.jsx("span",{className:"flex-1 dial-tiny-text text-secondary font-medium",children:r.valueColumnHeader})]}),u.map((x,S)=>h.jsx(ZV,{pairId:x.id,pairKey:x.key,pairValue:x.value,valueSchema:c,onKeyChange:y=>m(S,y),onValueChange:y=>v(S,y),onRemove:()=>b(S),keyInputPlaceholder:r.keyInputPlaceholder,removeFieldAriaLabel:r.removeFieldAriaLabel,path:n,level:i,readonly:a,inputClassName:l},x.id)),!a&&h.jsx("div",{className:"pt-1",children:h.jsx(Gg,{label:r.addField,iconBefore:h.jsx(z.IconPlus,{size:16,stroke:2}),onClick:w})})]})},d0=({value:e,onChange:t,theme:s=Yg.dark,height:n=240})=>{const{readonly:i}=Zs(),[o,r]=g.useState(null),[a,l]=g.useState(()=>JSON.stringify(e,null,2));g.useEffect(()=>{typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-pyqbLZZf.cjs")).then(d=>{r(()=>d.DialJsonEditor)})},[]);const c=d=>{const u=d??"";l(u);try{t(JSON.parse(u))}catch{}};return h.jsx("div",{className:"border border-primary rounded",style:{height:`${n}px`},children:o&&h.jsx(o,{value:a,currentTheme:s,onChange:c,options:{readOnly:i}})})},wn=({schema:e,value:t,onChange:s,path:n,level:i,required:o,suppressInlineError:r=!1})=>{const{rootSchema:a,renderField:l,markTouched:c=()=>{},touchedPaths:d=new Set,skipUntouched:u=!1,jsonEditorTheme:p}=Zs(),f=je(e,a),m=w=>{c(n.join(".")),s(w)},v=!u||d.has(n.join("."));let C;if(f.oneOf)C=h.jsx(KV,{schema:f,value:t,onChange:m,path:n,level:i});else if(f.anyOf&&f.type!==Xe.Object)C=h.jsx(YV,{schema:f,value:t,onChange:m,path:n,level:i});else if(so(f)){const w=f.additionalProperties!=null&&f.additionalProperties!==!1,b=!f.properties||Object.keys(f.properties).length===0;w&&b?C=h.jsx(XV,{schema:f,value:t,onChange:m,path:n,level:i}):b&&f.additionalProperties!==!1?C=h.jsx(d0,{value:t,onChange:m,theme:p}):C=h.jsx(ec,{schema:f,value:t,onChange:m,path:n,level:i})}else if(f.type===Xe.Array)C=h.jsx(qV,{schema:f,value:t,onChange:m,path:n,level:i});else{const w=v&&o&&Sd(t),b=!r&&w?`${f.title??"Field"} is required`:void 0;C=h.jsxs(h.Fragment,{children:[h.jsx(l0,{schema:f,value:t,onChange:m,invalid:w}),h.jsx(Ht,{text:b})]})}return l?l(n,f,C):C},QV=({schema:e,defaultValue:t,texts:s,className:n,readonly:i=!1,defaultExpanded:o=!0,inputClassName:r,variant:a=Io.Sections,onChange:l,onPropertyChange:c,onDefaultValues:d,renderField:u,skipUntouched:p=!1,jsonEditorTheme:f,acceptableResourceTypes:m})=>{const v=g.useMemo(()=>({..._V,...s}),[s]),C=g.useMemo(()=>t||(Cn(e,e)??{}),[]),[w,b]=g.useState(C),[x,S]=g.useState(new Set),y=g.useCallback(D=>{S(T=>T.has(D)?T:new Set([...T,D]))},[]);g.useEffect(()=>{d?.(C)},[]);const R=(D,T)=>{const I={...w,[D]:T};b(I),l?.(I),c?.(D,T)},E=new Set(Object.keys(e.properties??{})),F=Object.keys(w).filter(D=>!E.has(D)),P=i0(Object.entries(e.properties??{}).filter(([,D])=>!je(D,e).isHidden)),k=e.required??[];return h.jsx(n0.Provider,{value:{rootSchema:e,texts:v,readonly:i,defaultExpanded:o,inputClassName:r,jsonEditorTheme:f,acceptableResourceTypes:m,renderField:u,touchedPaths:x,markTouched:y,skipUntouched:p},children:h.jsxs("div",{className:M("flex flex-col gap-4",n),children:[P.map(([D,T])=>{const I=je(T,e),H=I.title??T.title??Oc(D),A=k.includes(D),O=w[D];if(a===Io.Flat)return h.jsx(a0,{schema:T,value:O,onChange:B=>R(D,B),path:[D],level:0,required:A,label:H},D);if(a===Io.FlatSections)return h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("h2",{className:"dial-small-semi-text text-primary",children:H}),h.jsx(wn,{schema:T,value:O,onChange:B=>R(D,B),path:[D],level:0,required:A})]},D);const G=an(O,I,e,D),L=D+".",U=!p||x.has(D)||[...x].some(B=>B.startsWith(L));return h.jsx(Ra,{title:H,description:I.description,level:0,defaultExpanded:o,errorCount:U?A&&Sd(O)?Math.max(G.length,1):G.length:0,children:h.jsx(wn,{schema:T,value:O,onChange:B=>R(D,B),path:[D],level:1,required:A})},D)}),F.map(D=>{const T=Oc(D),I=h.jsx(d0,{value:w[D],onChange:H=>R(D,H),theme:f});return a===Io.Sections?h.jsx(Ra,{title:T,level:0,defaultExpanded:o,children:I},D):h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx("h2",{className:"dial-small-semi-text text-primary",children:T}),I]},D)})]})})},Xg=(e,t)=>({appearance:n,...i})=>h.jsx(Da,{...i,variant:e,appearance:n||t}),u0=(e,t)=>({variant:n,...i})=>h.jsx(Da,{...i,variant:n||t,appearance:e}),JV=Xg(Me.Primary,ye.Solid),ej=Xg(Me.Neutral,ye.Solid),tj=Xg(Me.Danger,ye.Ghost),lr=u0(ye.Ghost,Me.Primary),ip=u0(ye.Solid,Me.Static),Rd=({ariaLabel:e="Close",className:t,size:s=me.Small,onClose:n,...i})=>h.jsx(lr,{...i,size:s,"aria-label":e,className:t,onClick:n,icon:h.jsx(z.IconX,{size:s===me.Small?Ne.SM:Ne.MD,"aria-hidden":"true"})}),sj=e=>({info:h.jsx(z.IconInfoCircleFilled,{size:e.size}),error:h.jsx(z.IconAlertCircleFilled,{size:e.size}),warning:h.jsx(z.IconAlertTriangleFilled,{size:e.size}),success:h.jsx(z.IconCircleCheckFilled,{size:e.size}),loading:h.jsx(zc,{size:e.size})}),nj={[Ye.Info]:"bg-info text-info",[Ye.Success]:"bg-success text-success",[Ye.Warning]:"bg-warning text-warning",[Ye.Error]:"bg-error text-error",[Ye.Loading]:"bg-layer-raised text-info"},ij={[Ye.Info]:"status",[Ye.Success]:"status",[Ye.Warning]:"alert",[Ye.Error]:"alert",[Ye.Loading]:"status"},oj="items-center justify-between rounded-xl relative gap-3 p-3 border flex border-transparent",Qg=({variant:e=Ye.Info,type:t=Ot.Toast,title:s,message:n,className:i,iconSize:o=24,iconStroke:r=2,closable:a=!1,onClose:l,children:c,textClassName:d,...u})=>{const p=g.useMemo(()=>sj({size:o})[e],[e,o,r]),f=d??(t===Ot.SectionMessage?"flex-row flex-wrap items-baseline gap-x-1":"flex-col");return h.jsxs("div",{role:ij[e],...u,className:M(oj,nj[e],t===Ot.Toast&&"min-w-[200px] max-w-[600px] shadow-lg",t===Ot.SectionMessage&&e===Ye.Loading&&"border-secondary",i),children:[h.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[h.jsx("span",{"aria-hidden":"true",className:"flex shrink-0",children:h.jsx(Le,{icon:p})}),s?h.jsxs("div",{className:M("flex min-w-0 text-primary break-words",f),children:[h.jsx("div",{className:"dial-small-paragraph-semi-text min-w-0 break-words",children:s}),h.jsx("div",{className:"dial-small-paragraph-text min-w-0 break-words",children:n})]}):h.jsx("div",{className:"dial-small-paragraph-text min-w-0 text-primary break-words",children:n})]}),c,a&&h.jsx("div",{className:"relative size-[40px]",children:h.jsx(Rd,{className:"absolute top-[-2px] right-0 size-auto hover:bg-transparent ",ariaLabel:"Close notification",onClose:m=>l?.(m)})})]})},Zv={2:"line-clamp-2",3:"line-clamp-3",4:"line-clamp-4",5:"line-clamp-5",6:"line-clamp-6"},rj=e=>e===1?"!truncate !whitespace-nowrap":`${Zv[e]??Zv[2]} !whitespace-normal`,aj=({text:e,query:t,markClassName:s,className:n,maxLines:i=2})=>{const o=rj(i);if(!t.trim())return h.jsx(it,{className:M(o,n),text:e});const r=e.toLowerCase().indexOf(t.toLowerCase()),a=r===-1?e:h.jsxs(h.Fragment,{children:[e.slice(0,r),h.jsx("mark",{className:M("text-accent bg-control-accent-alpha-hover",s),children:e.slice(r,r+t.length)}),e.slice(r+t.length)]});return h.jsx(it,{className:M(o,n),text:a})},lj=({className:e,children:t,...s})=>h.jsx("article",{...s,className:M("relative flex flex-col gap-3 rounded-[20px] border-2 border-transparent p-5","bg-layer-raised shadow-md transition-[transform,box-shadow] duration-200 ease-out hover:-translate-y-[3px] hover:shadow-lg motion-reduce:transition-none motion-reduce:hover:translate-y-0",e),children:t}),Oa=(e,t)=>({type:n,...i})=>h.jsx(Qg,{...i,variant:e,type:n||t}),Ha=(e,t)=>({variant:n,...i})=>h.jsx(Qg,{...i,variant:n||t,type:e}),cj=Oa(Ye.Error,Ot.Toast),dj=Oa(Ye.Info,Ot.Toast),uj=Oa(Ye.Success,Ot.Toast),hj=Oa(Ye.Warning,Ot.Toast),pj=Oa(Ye.Loading,Ot.Toast),gj=Ha(Ot.SectionMessage,Ye.Error),fj=Ha(Ot.SectionMessage,Ye.Info),mj=Ha(Ot.SectionMessage,Ye.Success),vj=Ha(Ot.SectionMessage,Ye.Warning),Cj=Ha(Ot.SectionMessage,Ye.Loading);var is=(e=>(e.Date="date",e.DateTime="datetime",e.Time="time",e.Weekday="weekday",e))(is||{});const wj="en-GB",bj={[is.Date]:"Select date",[is.DateTime]:"Select date and time",[is.Time]:"--:--",[is.Weekday]:"Select day"},h0="flex w-full items-center justify-between gap-2 rounded-xl border border-secondary bg-layer-raised px-4 py-3 dial-small-text text-primary outline-none transition-colors hover:border-hover-alpha focus-within:border-focus-blue",p0="!cursor-not-allowed !border-transparent bg-layer-sunken text-control-disable-alpha hover:!border-transparent",g0="!border-error",xj="z-[53] flex w-[248px] flex-col gap-4 rounded-lg bg-layer-raised px-3 py-4 shadow-md",yj="flex size-8 items-center justify-center rounded-full dial-small-text text-primary hover:bg-control-accent-alpha-hover hover:text-primary focus:outline-none focus-visible:outline focus-visible:outline-focus-black",Sj="bg-control-accent text-control-permanent",Rj="text-accent dial-small-semi-text",Fj="text-control-disable-alpha",f0="text-secondary",Ej=h.jsx(z.IconCalendar,{size:Ne.MD,"aria-hidden":"true",className:f0}),Xv={prev:h.jsx(z.IconChevronLeft,{size:Ne.SM,"aria-hidden":"true"}),next:h.jsx(z.IconChevronRight,{size:Ne.SM,"aria-hidden":"true"})},Dj=(e,t)=>{const n=(new Date(e,t,1).getDay()+6)%7,i=new Date(e,t,1-n);return Array.from({length:42},(o,r)=>{const a=new Date(i);return a.setDate(i.getDate()+r),a})},Qv=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),Jv=(e,t,s)=>{const n=new Date(e.getFullYear(),e.getMonth(),e.getDate());if(t){const i=new Date(t.getFullYear(),t.getMonth(),t.getDate());if(n<i)return!0}if(s){const i=new Date(s.getFullYear(),s.getMonth(),s.getDate());if(n>i)return!0}return!1},Pj=(e,t)=>e.toLocaleDateString(t,{month:"long",year:"numeric"}),eC=(e,t)=>e.toLocaleDateString(t,{day:"numeric",month:"short",year:"numeric"}),Tj=(e,t)=>e.toLocaleDateString(t,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),Ol=e=>`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,tC=(e,t)=>{const[s,n]=t.split(":").map(Number),i=new Date(e);return i.setHours(s||0,n||0,0,0),i},kj=e=>/^([01]\d|2[0-3]):[0-5]\d$/.test(e),Ij=e=>{const t=e.replace(/\D/g,"").slice(0,4);let s=t.slice(0,2);const n=t.slice(2,4);if(s.length===2&&(s=String(Math.min(Number(s),23)).padStart(2,"0")),n.length===0)return s;const i=String(Math.min(Number(n),59)).padStart(n.length,"0");return`${s}:${i}`},m0=5,v0=e=>e.charAt(0).toUpperCase()+e.slice(1),Mj=e=>Array.from({length:7},(t,s)=>{const n=new Date(Date.UTC(1970,0,m0+s));return v0(n.toLocaleDateString(e,{weekday:"short",timeZone:"UTC"}))}),Aj=e=>Array.from({length:7},(t,s)=>{const n=new Date(Date.UTC(1970,0,m0+s));return{value:String(s+1),label:v0(n.toLocaleDateString(e,{weekday:"long",timeZone:"UTC"}))}}),sC=({id:e,disabled:t,invalid:s,trigger:n,panelClassName:i,fieldClassName:o,panel:r,labelledBy:a,panelLabel:l})=>{const[c,d]=g.useState(!1),{refs:u,floatingStyles:p,context:f}=de.useFloating({open:c,onOpenChange:x=>d(t?!1:x),placement:"bottom-start",whileElementsMounted:de.autoUpdate,middleware:[de.offset(8),de.flip({padding:8}),de.shift({padding:8})]}),m=de.useClick(f,{enabled:!t}),v=de.useDismiss(f),C=de.useRole(f,{role:"dialog"}),{getReferenceProps:w,getFloatingProps:b}=de.useInteractions([m,v,C]);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:e,ref:u.setReference,role:"button","aria-haspopup":"dialog","aria-expanded":c,"aria-disabled":t,"aria-labelledby":a,tabIndex:t?-1:0,className:M(h0,"focus-visible:outline focus-visible:outline-focus-black",s&&g0,t&&p0,o),...w(),children:n}),c&&h.jsx(de.FloatingPortal,{children:h.jsx(de.FloatingFocusManager,{context:f,modal:!1,initialFocus:-1,returnFocus:!0,children:h.jsx("div",{ref:u.setFloating,style:p,"aria-label":l,className:M(xj,i),...b(),children:r(()=>d(!1))})})})]})},nC=({id:e,value:t,onChange:s,disabled:n,invalid:i,className:o,ariaLabel:r,placeholder:a="--:--"})=>{const[l,c]=g.useState(t);return g.useEffect(()=>{c(t)},[t]),h.jsx("input",{id:e,type:"text",inputMode:"numeric",autoComplete:"off","aria-label":r,placeholder:a,disabled:n,value:l,onChange:d=>{const u=Ij(d.target.value);c(u),kj(u)&&s(u)},className:M(h0,i&&g0,n&&p0,o)})},Lj=({mode:e=is.Date,value:t,onChange:s,labelProps:n,placeholder:i,disabled:o=!1,invalid:r=!1,id:a,className:l,minDate:c,maxDate:d,locale:u=wj,fieldClassName:p})=>{const f=i??bj[e],m=t instanceof Date?t:null,v=g.useId(),C=a??v,w=n?.id??`${C}-label`,b=!!n?.label,x=typeof n?.label=="string"?n.label:void 0,S=b?`${w} ${C}`:void 0,y=n?h.jsx(ni,{...n,id:w,htmlFor:C}):null,[R,E]=g.useState(()=>m??new Date),F=g.useMemo(()=>new Date,[]),P=g.useMemo(()=>Mj(u),[u]),k=g.useMemo(()=>Aj(u),[u]),D=g.useMemo(()=>Dj(R.getFullYear(),R.getMonth()),[R]),T=O=>{E(G=>new Date(G.getFullYear(),G.getMonth()+O,1))},I=(O,G)=>{if(Jv(O,c,d))return;const L=e===is.DateTime&&m?tC(O,Ol(m)):O;s?.(L),e===is.Date&&G()},H=O=>{s?.(tC(m??new Date,O))},A=()=>m?e===is.DateTime?`${eC(m,u)}, ${Ol(m)}`:eC(m,u):f;if(e===is.Time){const O=typeof t=="string"?t:m?Ol(m):"";return h.jsxs("div",{className:M("flex flex-col gap-y-3",l),children:[y,h.jsx(nC,{id:C,value:O,onChange:G=>s?.(G),disabled:o,invalid:r,placeholder:f,className:p})]})}if(e===is.Weekday){const O=typeof t=="string"?t:void 0,G=k.find(L=>L.value===O);return h.jsxs("div",{className:M("flex flex-col gap-y-3",l),children:[y,h.jsx(sC,{id:C,disabled:o,invalid:r,labelledBy:S,panelLabel:x??f,fieldClassName:p,trigger:h.jsxs(h.Fragment,{children:[h.jsx("span",{className:M("truncate",!G&&"text-secondary"),children:G?.label??f}),h.jsx(z.IconChevronDown,{size:Ne.MD,"aria-hidden":"true",className:f0})]}),panel:L=>h.jsx("div",{role:"listbox","aria-label":x??f,className:"flex flex-col gap-0.5",children:k.map(U=>h.jsx("button",{type:"button",role:"option","aria-selected":U.value===O,className:M("flex w-full items-center rounded-lg px-3 py-2 text-left dial-small-text text-primary hover:bg-control-accent-alpha-hover","focus-visible:outline focus-visible:outline-focus-black",U.value===O&&"bg-control-accent-alpha-hover"),onClick:()=>{s?.(U.value),L()},children:U.label},U.value))})})]})}return h.jsxs("div",{className:M("flex flex-col gap-y-3",l),children:[y,h.jsx(sC,{id:C,disabled:o,invalid:r,labelledBy:S,panelLabel:x??f,fieldClassName:p,trigger:h.jsxs(h.Fragment,{children:[h.jsx("span",{className:M("truncate",!m&&"text-secondary"),children:A()}),Ej]}),panel:O=>h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx(ip,{"aria-label":"Previous month",icon:Xv.prev,size:me.Small,onClick:()=>T(-1)}),h.jsx("div",{className:"dial-small-semi-text text-primary","aria-live":"polite",children:Pj(R,u)}),h.jsx(ip,{"aria-label":"Next month",icon:Xv.next,size:me.Small,onClick:()=>T(1)})]}),h.jsxs("div",{className:"grid grid-cols-7 gap-y-1 text-center",children:[P.map(G=>h.jsx("div",{"aria-hidden":"true",className:"dial-tiny-text py-1 text-secondary",children:G},G)),D.map(G=>{const L=G.getMonth()!==R.getMonth(),U=Qv(G,m),B=Qv(G,F),N=Jv(G,c,d);return h.jsx("button",{type:"button",disabled:N,"aria-label":Tj(G,u),"aria-pressed":U,"aria-current":B?"date":void 0,className:M(yj,L&&Fj,B&&!U&&Rj,U&&Sj,N&&"cursor-not-allowed opacity-40 hover:bg-transparent"),onClick:()=>I(G,O),children:G.getDate()},G.toISOString())})]}),e===is.DateTime&&h.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-secondary pt-3",children:[h.jsx("span",{className:"dial-small-text text-primary",children:"Time"}),h.jsx(nC,{ariaLabel:"Time",value:m?Ol(m):"",onChange:H,className:"w-[120px] px-3 py-1.5"})]})]})})]})},Nj=({segments:e,labelClassName:t="dial-small-text",leafClassName:s="dial-small-semi-text",className:n,ariaLabel:i="Folder path"})=>{const o=h.jsx(Le,{icon:h.jsx(z.IconFolder,{size:Ne.SM,"aria-hidden":"true"}),className:"text-secondary"}),r=e.map((a,l)=>({label:l===e.length-1?h.jsx("span",{className:s,children:a}):a,disabled:!0,...l===0?{iconBefore:o}:{}}));return h.jsx(Hg,{className:n,ariaLabel:i,separator:h.jsx(Le,{icon:h.jsx(z.IconChevronRight,{size:14,"aria-hidden":"true",className:"rtl:scale-x-[-1]"}),className:"text-secondary"}),pathItems:r,labelClassName:M(t,"text-secondary","!cursor-default")})},Ba=({label:e,variant:t,appearance:s=ye.Solid,size:n=me.Standard,className:i,textClassName:o,iconAfter:r,iconBefore:a,type:l="button",tooltipProps:c,href:d,target:u,rel:p,disabled:f,...m})=>{const v=M("dial-kit-base-button",t&&TC(t,s),n===me.Small?"dial-tiny-semi-text":"dial-small-paragraph-semi-text",n===me.Small?"h-[24px] gap-1":"h-[40px] gap-2",s!==ye.Link&&(n===me.Small?"px-2":"px-4"),n!==me.Small&&s!==ye.Link&&"dial-kit-enhanced-target",i),C=e?void 0:c?.tooltip,w=Ws(typeof e=="string"?e:void 0,m["aria-label"],C),b=h.jsxs(h.Fragment,{children:[h.jsx(Le,{icon:a}),e&&h.jsx("span",{className:o,children:e}),h.jsx(Le,{icon:r})]}),x=m,S=d!==void 0?h.jsx("a",{...x,href:f?void 0:d,target:u,rel:p??(u==="_blank"?"noopener noreferrer":void 0),"aria-disabled":f||void 0,tabIndex:f?-1:x.tabIndex,onClick:f?void 0:x.onClick,className:v,"aria-label":w,children:b}):h.jsx("button",{...m,type:l,disabled:f,className:v,"aria-label":w,children:b});return c?h.jsx(ct,{...c,children:S}):S},Jg=(e,t)=>({appearance:n,...i})=>h.jsx(Ba,{...i,variant:e,appearance:n||t}),ef=(e,t)=>({variant:n,...i})=>h.jsx(Ba,{...i,variant:n||t,appearance:e}),Oj=Jg(Me.Primary,ye.Solid),C0=Jg(Me.Neutral,ye.Solid),Hj=Jg(Me.Danger,ye.Solid),Bj=ef(ye.Link,Me.Primary),Gj=ef(ye.Ghost,Me.Primary),Vj=ef(ye.Outlined,Me.Neutral),jj=({className:e,icon:t,tooltipProps:s,type:n="button",...i})=>{const o=M("flex items-center justify-center rounded-full size-[40px]","dial-kit-enhanced-target","dial-kit-fab-button disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus-black outline-offset-0",e),r=h.jsx("button",{...i,type:n,className:o,"aria-label":Ws(i["aria-label"],s?.tooltip),children:t||h.jsx(z.IconArrowNarrowDown,{size:24,stroke:1.5,"aria-hidden":"true"})});return s?h.jsx(ct,{...s,children:r}):r},w0="rounded-xl bg-layer-raised p-1 shadow-md",b0=M(w0,"w-max"),x0=M("flex w-full cursor-pointer items-center gap-2 px-3 h-[40px] rounded-lg","dial-small-text text-primary truncate","hover:bg-control-accent-alpha-hover","focus-visible:outline focus-visible:outline-focus-black"),zj="bg-control-accent-alpha-hover",y0="opacity-75",S0=4,Wj=M("flex items-center gap-2 align-middle","h-auto px-0 bg-transparent border-0"),_j=M("z-[53] focus-visible:outline-none",w0),Uj=b0,op=x0,rp=M(y0,"!cursor-not-allowed"),R0="text-error",$j="my-1 border-t border-secondary",Fo=S0,qj=h.jsx(z.IconChevronRight,{size:Ne.SM,"aria-hidden":"true"}),Kj=({item:e,onRootClose:t})=>{const{isOpen:s,refs:n,floatingStyles:i,context:o,getReferenceProps:r,getFloatingProps:a}=fd(Fo,"menu",!!e.disabled),l=g.useCallback(c=>d=>{c.disabled||(c.onClick?.({key:c.key,domEvent:d}),t())},[t]);return h.jsxs(h.Fragment,{children:[h.jsxs("button",{ref:n.setReference,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":s,"aria-disabled":!!e.disabled,disabled:e.disabled,className:M(op,e.disabled&&rp,e.className),...r(),children:[e.renderItem?e.renderItem(e):h.jsxs(h.Fragment,{children:[e.icon&&h.jsx("span",{className:M(e.disabled&&"text-secondary"),children:h.jsx(Le,{icon:e.icon})}),h.jsx("span",{className:M("flex-1 truncate text-start",e.disabled&&"text-secondary"),children:e.label})]}),h.jsx("span",{className:M("ml-auto shrink-0",e.disabled&&"text-secondary"),children:qj})]}),s&&h.jsx(md,{refs:n,floatingStyles:i,context:o,getFloatingProps:a,role:"menu",surfaceClassName:Uj,children:e.renderSubMenu?e.renderSubMenu():h.jsxs(h.Fragment,{children:[e.menuHeader&&(typeof e.menuHeader=="function"?e.menuHeader():e.menuHeader),e.children.map(c=>h.jsx("button",{role:"menuitem",type:"button","aria-disabled":!!c.disabled,disabled:c.disabled,className:M(op,c.disabled&&rp,c.danger&&R0,c.className),onClick:l(c),children:c.renderItem?c.renderItem(c):h.jsxs(h.Fragment,{children:[c.icon&&h.jsx("span",{className:M(c.danger&&"text-error",c.disabled&&"text-secondary"),children:h.jsx(Le,{icon:c.icon})}),h.jsx("span",{className:M("flex-1 truncate text-start",c.danger&&"text-error",c.disabled&&"text-secondary"),children:c.label})]})},c.key)),e.menuFooter&&(typeof e.menuFooter=="function"?e.menuFooter():e.menuFooter)]})})]})},Yj=e=>"clientWidth"in e?e.clientWidth:e.getBoundingClientRect?.()?.width??0,Fd=({children:e,items:t,onItemClick:s,menuHeader:n,menuFooter:i,renderOverlay:o,trigger:r=[Tt.Click],placement:a,disabled:l=!1,open:c,defaultOpen:d=!1,onOpenChange:u,closable:p=!1,onClose:f,className:m,overlayContentClassName:v,separatorClassName:C,listClassName:w,outsidePressIgnoreRef:b,outsideClosable:x=!0,allowedPlacements:S,anchorToMouse:y=!1,matchReferenceWidth:R=!0,maxDropdownHeight:E})=>{const[F,P]=g.useState(d),k=c!==void 0,D=k?!!c:F,T=g.useRef(null),I=g.useCallback(V=>{k||P(V),u?.(V)},[k,u]),H=g.useId(),A=a===void 0,{refs:O,floatingStyles:G,context:L}=de.useFloating({placement:a,open:D,onOpenChange:I,whileElementsMounted:de.autoUpdate,middleware:[de.offset({mainAxis:Fo,crossAxis:0}),A?de.autoPlacement({alignment:"start",crossAxis:!0,padding:Fo,allowedPlacements:S}):de.flip({padding:Fo}),de.shift({padding:Fo}),de.size({padding:Fo,apply({availableWidth:V,availableHeight:$,elements:K}){const ce=K.floating,q=Yj(K.reference);ce.style.setProperty("--fui-available-height",`${Math.floor($)}px`),ce.style.setProperty("--reference-width",R?`${Math.round(q)}px`:"0px"),R?ce.style.minWidth=`${Math.round(q)}px`:ce.style.removeProperty("min-width"),ce.style.maxWidth=`${Math.floor(V)}px`;const ue=Math.floor($);ce.style.maxHeight=`${E?Math.min(ue,E):ue}px`}})]}),U=de.useClick(L,{enabled:r.includes(Tt.Click)&&!l}),B=de.useHover(L,{enabled:r.includes(Tt.Hover)&&!l,move:!1,restMs:40,delay:{open:80,close:80}}),N=de.useDismiss(L,{bubbles:!0,referencePress:!1,outsidePress:V=>{if(!x)return!1;const $=V.target;return!(b?.current&&$ instanceof Node&&b.current.contains($))}}),W=de.useRole(L,{role:"menu"}),{getReferenceProps:Y,getFloatingProps:te}=de.useInteractions([U,B,N,W]),we=g.useCallback((V,$)=>{O.setPositionReference({getBoundingClientRect:()=>({width:0,height:0,x:V,y:$,top:$,left:V,right:V,bottom:$})})},[O]),Q=g.useCallback(V=>{!r.includes(Tt.ContextMenu)||l||(V.preventDefault(),y&&(we(V.clientX,V.clientY),T.current=document.elementFromPoint(V.clientX,V.clientY)),I(!0))},[y,l,I,we,r]),ve=g.useCallback(V=>{!y||l||(r.includes(Tt.ContextMenu)&&D&&I(!1),we(V.clientX,V.clientY),T.current=document.elementFromPoint(V.clientX,V.clientY))},[y,l,we,D,r,I]);g.useEffect(()=>{l&&D&&I(!1)},[l,D,I]);const Pe=g.useCallback(V=>$=>{V.disabled||(V.onClick?.({key:V.key,domEvent:$}),s?.({key:V.key,domEvent:$}),I(!1))},[s,I]),J=g.useMemo(()=>o?o():t?h.jsxs(h.Fragment,{children:[n&&h.jsx(h.Fragment,{children:typeof n=="function"?n():n}),h.jsx("div",{role:"none",className:M("py-1",v),"aria-label":"dropdown",children:t.map(V=>V.type===Jn.Divider?h.jsx("div",{role:"separator",className:M($j,C)},V.key):V.type===Jn.PlainText?h.jsx("div",{className:M("px-3 py-2 text-secondary dial-caption-text",V.className),children:V.label},V.key):V.children?.length?h.jsx(Kj,{item:V,onRootClose:()=>I(!1)},V.key):h.jsx("button",{role:"menuitem",type:"button","aria-disabled":!!V.disabled,className:M(op,V.disabled&&rp,V.danger&&R0,V.className),disabled:V.disabled,onClick:Pe(V),children:V.renderItem?V.renderItem(V):h.jsxs(h.Fragment,{children:[V.icon&&h.jsx("span",{className:M(V.danger&&"text-error",V.disabled&&"text-secondary"),children:h.jsx(Le,{icon:V.icon})}),h.jsx("span",{className:M("flex-1 truncate text-start",V.danger&&"text-error",V.disabled&&"text-secondary"),children:V.label})]})},V.key))}),i&&h.jsx(h.Fragment,{children:typeof i=="function"?i():i})]}):null,[Pe,t,i,n,o,I,v,C]),ge=Y({onContextMenu:Q,onMouseDown:ve});return g.useEffect(()=>{if(!D)return;const V=O.reference.current;let $=null;if(V instanceof Element?$=V:T.current instanceof Element&&($=T.current),!$)return;const K=new IntersectionObserver(([ce])=>{ce.isIntersecting||I(!1)},{root:null,threshold:0});return K.observe($),()=>K.disconnect()},[D,O.reference,I]),h.jsxs(h.Fragment,{children:[h.jsx("span",{ref:O.setReference,className:M(Wj,l&&"!cursor-not-allowed opacity-75",m),"aria-haspopup":"menu","aria-expanded":D,"aria-controls":H,...ge,children:e}),D&&h.jsx(de.FloatingPortal,{children:h.jsx(de.FloatingFocusManager,{context:L,modal:!1,initialFocus:-1,returnFocus:!0,children:h.jsxs("div",{id:H,ref:O.setFloating,style:G,className:M(_j,!R&&"w-max",w),...te(),children:[p&&h.jsx("div",{className:"flex items-center justify-between px-2 pt-2",children:h.jsx(Rd,{ariaLabel:"Close dropdown",onClose:V=>{f?.(V),I(!1)}})}),J]})})})]})},Zj=e=>h.jsx(z.IconChevronDown,{size:Ne.SM,"aria-hidden":!0,className:M("transition-transform",e&&"rotate-180")}),Xj=({variant:e,appearance:t,items:s,...n})=>{const[i,o]=g.useState(!1),r=g.useMemo(()=>Zj(i),[i]);return h.jsx("div",{children:h.jsx(Fd,{items:s,onOpenChange:a=>o(a),children:h.jsx(Ba,{...n,iconAfter:r,variant:e||Me.Primary,appearance:t||ye.Solid,"aria-haspopup":"menu","aria-expanded":i})})})},F0=({label:e,size:t,isOpen:s=!1,"aria-label":n,...i})=>{const o=t===me.Small?"h-[32px]":"h-[40px] dial-kit-enhanced-target";return h.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":s,"aria-label":n?`${n} ${e}`:void 0,className:M("dial-small-paragraph-text px-3 focus-visible:outline focus-visible:outline-focus-black","flex items-center gap-1 rounded-full text-primary disabled:text-control-disable-alpha","hover:bg-control-accent-alpha-hover focus-visible:outline-offset-2 active:bg-control-accent-alpha-active",o,i.className),...i,children:[e,h.jsx(z.IconChevronDown,{size:Ne.MD,"aria-hidden":!0,className:M("transition-transform",s&&"rotate-180")})]})},Qj=({items:e,selectedKey:t,defaultSelectedKey:s,onSelect:n,size:i,disabled:o,placement:r="bottom-end",matchReferenceWidth:a=!1,listClassName:l,ariaLabel:c})=>{const[d,u]=g.useState(!1),[p,f]=g.useState(s??e[0]?.key),m=t!==void 0,v=m?t:p,C=g.useMemo(()=>{const b=e.find(x=>x.key===v);return b?.label?String(b.label):""},[e,v]),w=g.useCallback(({key:b})=>{const x=e.find(S=>S.key===b);x&&(m||f(b),n?.(x))},[e,m,n]);return h.jsx(Fd,{items:e,placement:r,matchReferenceWidth:a,listClassName:l,disabled:o,onOpenChange:u,onItemClick:w,children:h.jsx(F0,{label:C,size:i,isOpen:d,disabled:o,"aria-label":c})})},Ga=({text:e,className:t,variant:s=Ni.Description,...n})=>e?h.jsx("span",{...n,role:"alert",className:M("dial-tiny-text",s===Ni.Error?"text-error":"text-secondary",t),children:e}):null,Va=({...e})=>h.jsx(Ga,{...e,variant:Ni.Error}),Jj="bg-control-neutral-active flex items-center justify-center enabled:text-secondary enabled:hover:text-control-blue-hover enabled:active:bg-control-accent-alpha-active enabled:hover:bg-control-accent-alpha-hover enabled:active:text-control-blue-active",ez={[me.Small]:"size-[24px]",[me.Standard]:"size-[40px]",[me.Large]:"size-[48px]"},tz=({icon:e,onClick:t,disabled:s,size:n=me.Standard,className:i})=>h.jsx("div",{className:M("border-l border-tertiary",ez[n]),children:h.jsx(Da,{className:M(Jj,n===me.Small&&"p-1",i),icon:e,onClick:t,disabled:s,size:n})}),sz=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],E0=(e,t,s,n)=>{if((t==="number"||s!==void 0||n!==void 0)&&!sz.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if((s!==void 0||n!==void 0)&&e.currentTarget.selectionStart!==null){const o=e.currentTarget.value,r=e.currentTarget.selectionStart,a=e.currentTarget.selectionEnd??r,l=o.slice(0,r)+e.key+o.slice(a),c=parseFloat(l);if(!isNaN(c)){if(s!==void 0&&c<+s){e.preventDefault();return}if(n!==void 0&&c>+n){e.preventDefault();return}}}}},D0={[me.Small]:{field:"dial-kit-input-small gap-x-1",paddingStart:"pl-2",paddingEnd:"pr-2",stackGap:"gap-1",postfixText:"dial-tiny-text"},[me.Standard]:{field:"gap-x-2 py-2",paddingStart:"pl-3",paddingEnd:"pr-3",stackGap:"gap-2",postfixText:"dial-small-text"},[me.Large]:{field:"gap-x-2 py-3",paddingStart:"pl-4",paddingEnd:"pr-4",stackGap:"gap-2",postfixText:"dial-body-text"}},Yi=({labelProps:e,error:t,caption:s,id:n,containerClassName:i,size:o=me.Standard,...r})=>h.jsxs("div",{className:M("flex flex-col",D0[o].stackGap,i),children:[e&&h.jsx(ni,{...e,htmlFor:n}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(P0,{id:n,size:o,...r}),h.jsx(Va,{text:t}),!t&&h.jsx(Ga,{text:s})]})]}),P0=({invalid:e,disabled:t,prefix:s,className:n,postfix:i,children:o,iconBefore:r,iconAfter:a,wrapperClassName:l,type:c,inputRef:d,value:u,tooltipText:p,min:f,onChange:m,max:v,inputButtonProps:C,wrapperRef:w,size:b=me.Standard,...x})=>{const S=D0[b],y=g.useRef(null),R=de.useMergeRefs([d,y]),E=c==="number"||f!==void 0||v!==void 0;g.useEffect(()=>{const D=y.current;if(!D||!E||t)return;const T=I=>{I.preventDefault()};return D.addEventListener("wheel",T,{passive:!1}),()=>{D.removeEventListener("wheel",T)}},[t,E,c]);const F=D=>{E0(D,c,f,v)},P=D=>{const T=D.currentTarget.value;if(E&&T!==""){const I=parseFloat(T);if(isNaN(I)&&T!=="-"&&T!=="."||!isNaN(I)&&(f!==void 0&&I<+f||v!==void 0&&I>+v))return}m?.(T||void 0)},k=()=>h.jsxs("div",{ref:w,className:M("dial-kit-input flex flex-row items-center justify-between",S.field,e&&"dial-kit-input-error",t&&"dial-kit-input-disable",!s&&S.paddingStart,!C&&S.paddingEnd,l),"aria-label":"input-container",children:[s&&h.jsx("div",{className:"border-r border-tertiary",children:h.jsx(P0,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,size:b,id:`${s}_textBefore`})}),h.jsx(Le,{icon:r}),o,h.jsx("input",{ref:R,type:c,autoComplete:c==="password"?"new-password":"off",value:u??"",className:M("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",n),onChange:P,onKeyDown:F,min:f,disabled:t,max:v,...x}),i&&h.jsxs("p",{className:M("text-secondary",S.postfixText),children:[" ",i]}),h.jsx(Le,{icon:a}),C&&h.jsx(tz,{size:b,...C,disabled:t})]});return t&&c!=="password"?h.jsx(ct,{tooltip:p||u,children:k()}):k()},T0=({options:e,selectedValues:t,handleRemoveTag:s})=>h.jsx(h.Fragment,{children:t.map(n=>{const i=e.find(o=>o.value===n);return h.jsx(jn,{label:i?.label??n,closable:!!s,onRemove:o=>s?.(o,n),icon:i?.icon?h.jsx(Le,{icon:i.icon}):null,className:"max-w-full"},n)})}),nz=M("w-full flex flex-col"),sa=M(x0,"justify-between"),iz=zj,oz="!max-w-[var(--reference-width)]",Hc=y0,rz=352,az=S0,lz=b0,cz=h.jsx(z.IconChevronRight,{size:Ne.SM,"aria-hidden":"true"}),dz="text-secondary transition-transform",uz=8,hz=h.jsx(z.IconSearch,{size:Ne.MD,"aria-hidden":"true"}),pz=h.jsx(z.IconX,{size:Ne.SM,"aria-hidden":"true"}),k0=h.jsx(z.IconCheck,{size:Ne.SM,className:"shrink-0 text-accent","aria-hidden":!0}),gz=h.jsx(z.IconClipboardX,{size:Ne.LG,stroke:.5,"aria-hidden":"true"}),fz=({opt:e,selectedValues:t,onSelect:s})=>{const{isOpen:n,refs:i,floatingStyles:o,context:r,getReferenceProps:a,getFloatingProps:l}=fd(az,"listbox",!!e.disabled),c=e.children?.some(d=>t.includes(d.value));return h.jsxs(h.Fragment,{children:[h.jsxs("button",{ref:i.setReference,type:"button",role:"option","aria-haspopup":"listbox","aria-expanded":n,"aria-selected":!!c,"aria-disabled":!!e.disabled,disabled:e.disabled,className:M(sa,e.disabled&&Hc),...a(),children:[h.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[e.icon&&h.jsx(Le,{icon:e.icon}),h.jsx(it,{text:e.labelNode??e.label})]}),h.jsx("span",{className:"shrink-0",children:cz})]}),n&&h.jsx(md,{refs:i,floatingStyles:o,context:r,getFloatingProps:l,role:"listbox",surfaceClassName:lz,children:e.children.map(d=>{const u=t.includes(d.value);return h.jsxs("button",{type:"button",role:"option","aria-selected":u,"aria-disabled":!!d.disabled,disabled:d.disabled,className:M(sa,d.disabled&&Hc),onClick:()=>!d.disabled&&s(d.value),children:[h.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[d.icon&&h.jsx(Le,{icon:d.icon}),h.jsx(it,{text:d.labelNode??d.label})]}),u&&k0]},d.value)})})]})},mz=({options:e,multiple:t=!1,id:s,value:n,defaultValue:i,size:o=me.Standard,prefix:r,customSelectedValue:a,placeholder:l="Select...",labelProps:c,error:d,caption:u,ariaLabel:p,searchable:f=!1,searchSize:m=me.Standard,searchPlaceholder:v,selectAll:C=!1,invalid:w,selectAllLabel:b="Select all",emptyStateTitle:x="No options available",emptyStateDescription:S,emptyStateIcon:y,disabled:R=!1,className:E,fieldClassName:F,listClassName:P,closable:k=!1,header:D,footer:T,onClose:I,onChange:H,dismissRef:A,onFooterClick:O,open:G,onOpenChange:L,onSearchQueryChange:U,customMultiSelectTagsRenderer:B})=>{const N=g.useId(),W=s||N,Y=`list-${W}`,te=o===me.Small,[we,Q]=g.useState(!1),ve=G!==void 0,Pe=ve?!!G:we,J=g.useCallback(oe=>{ve||Q(oe),L?.(oe)},[ve,L]),[ge,V]=g.useState(""),$=g.useCallback(oe=>{oe!==ge&&(V(oe||""),U?.(oe||""))},[U,ge]),K=n!==void 0,[ce,q]=g.useState(i),ue=K?n:ce,he=g.useMemo(()=>t?Array.isArray(ue)?ue:[]:typeof ue=="string"?[ue]:[],[ue,t]),se=g.useMemo(()=>{const oe=ge.trim().toLowerCase();return oe?e.filter(nt=>nt.label.toLowerCase().includes(oe)):e},[e,ge]);g.useEffect(()=>{Pe||$("")},[Pe,$]);const re=g.useCallback(oe=>{K||q(oe),H?.(oe)},[K,H]),Oe=g.useCallback(oe=>{if(t){const nt=new Set(he);nt.has(oe)?nt.delete(oe):nt.add(oe),re(Array.from(nt));return}re(oe),J(!1)},[t,re,J,he]),Ae=g.useCallback((oe,nt)=>{if(oe.stopPropagation(),!t){re("");return}const io=he.filter(oo=>oo!==nt);re(io)},[t,he,re]),Ce=g.useMemo(()=>se.filter(oe=>!oe.disabled),[se]),ke=g.useMemo(()=>Ce.filter(oe=>he.includes(oe.value)).length,[Ce,he]),{allSelectedInFiltered:qe,someSelectedInFiltered:ot}=g.useMemo(()=>{const oe=Ce.length>0&&ke===Ce.length;return{allSelectedInFiltered:oe,someSelectedInFiltered:ke>0&&!oe}},[Ce,ke]),Ve=g.useCallback(()=>{if(!(!t||Ce.length===0))if(qe){const oe=new Set(Ce.map(nt=>nt.value));re(he.filter(nt=>!oe.has(nt)))}else{const oe=new Set(he);Ce.forEach(nt=>oe.add(nt.value)),re(Array.from(oe))}},[qe,t,Ce,he,re]),wt=he.length>0,ze=!t&&wt?he[0]:void 0,_e=g.useMemo(()=>ze?e.find(oe=>oe.value===ze)??e.flatMap(oe=>oe.children??[]).find(oe=>oe.value===ze):void 0,[e,ze]),Z=_e?r?`${r} ${_e.label}`:_e.label:void 0,Ue=g.useMemo(()=>t?wt?h.jsx("span",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:B?.(e,he,Ae)??h.jsx(T0,{options:e,selectedValues:he,handleRemoveTag:Ae})}):null:!_e||!_e.labelNode&&!_e.description?null:h.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[h.jsx(it,{text:_e.labelNode??Z}),_e.description&&h.jsx("span",{className:"truncate text-secondary dial-tiny-text",children:_e.description})]}),[B,Ae,wt,t,e,Z,he,_e]),ts=t||Ue?"":Z||(a&&n?a:""),ci=typeof c?.label=="string"?c.label:void 0,Sn=Ue?[Ws(p,ci),t?he.map(oe=>e.find(nt=>nt.value===oe)?.label??oe).join(", "):Z].filter(Boolean).join(", ")||void 0:Ws(p);g.useImperativeHandle(A,()=>({dismiss:()=>{J(!1)}}));const no=g.useCallback(oe=>{R||(oe.key==="ArrowDown"||oe.key==="ArrowUp")&&(oe.preventDefault(),Pe||J(!0))},[R,Pe,J]),di=()=>h.jsxs("div",{id:Y,role:"listbox","aria-multiselectable":t||void 0,className:nz,children:[D&&h.jsx(h.Fragment,{children:typeof D=="function"?D():D}),(f||k)&&(e.length>uz||!!ge)&&h.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[f&&h.jsx(Yi,{id:`search-${W}`,size:m,placeholder:v,"aria-label":v||"Search options",onChange:oe=>$(oe),value:ge,iconBefore:hz,containerClassName:"w-full"}),k&&h.jsx(lr,{"aria-label":"Close select",className:"shrink-0",size:me.Small,icon:pz,onClick:oe=>{I?.(oe),J(!1)}})]}),t&&C&&Ce.length>0&&h.jsx("div",{className:M(sa,"mt-2"),children:h.jsx(ia,{id:`${W}-selectAll`,label:b,checked:qe,indeterminate:ot,onChange:Ve,ariaLabel:b})}),h.jsx("div",{className:"overflow-y-auto max-h-[352px] py-1",children:se.length===0?h.jsx("div",{className:"px-2 py-3",children:h.jsx(tr,{icon:y??gz,title:x,description:S})}):se.map(oe=>{const nt=he.includes(oe.value);return t?h.jsxs("div",{role:"option","aria-selected":nt,"aria-disabled":!!oe.disabled,className:M(sa,nt&&iz,oe.disabled&&Hc,"w-full"),children:[h.jsx(ia,{id:`${W}-${oe.value}`,label:h.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[oe.icon&&h.jsx(Le,{icon:oe.icon}),h.jsx("span",{className:"truncate",children:oe.labelNode??oe.label})]}),checked:nt,disabled:oe.disabled,onChange:()=>!oe.disabled&&Oe(oe.value),ariaLabel:oe.label}),oe.description&&h.jsx("div",{className:"text-secondary dial-small-text",children:oe.description})]},oe.value):oe.children?.length?h.jsx(fz,{opt:oe,selectedValues:he,onSelect:Oe},oe.value):h.jsxs("button",{role:"option",type:"button","aria-selected":nt,"aria-disabled":!!oe.disabled,disabled:oe.disabled,className:M(sa,oe.disabled&&Hc),onClick:()=>!oe.disabled&&Oe(oe.value),children:[h.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[oe.icon&&h.jsx(Le,{icon:oe.icon}),h.jsx(it,{text:oe.labelNode??oe.label}),oe.description&&h.jsx("div",{className:"text-secondary dial-small-text",children:oe.description})]}),nt&&k0]},oe.value)})}),T&&h.jsx("div",{onClick:oe=>{O?.(oe),O&&J(!1)},children:typeof T=="function"?T():T})]});return h.jsxs("div",{className:M("flex w-full flex-col gap-2",E),children:[c&&h.jsx(ni,{...c,htmlFor:W}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx(Fd,{open:Pe,onOpenChange:J,disabled:R,closable:k,onClose:I,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:f?null:rz,listClassName:M(oz,P),className:"w-full",renderOverlay:di,children:h.jsx(Yi,{id:W,size:o,disabled:R,invalid:w,value:ts,placeholder:Ue?void 0:l,readOnly:!0,iconBefore:t?void 0:_e?.icon,iconAfter:h.jsx(z.IconChevronDown,{size:te?Ne.SM:Ne.MD,"aria-hidden":"true",className:M(dz,Pe&&"rotate-180")}),role:"combobox","aria-haspopup":"listbox","aria-expanded":Pe,"aria-controls":Y,"aria-autocomplete":"none","aria-label":Sn,containerClassName:"w-full",wrapperClassName:M(!R&&"cursor-pointer",t&&wt&&["!h-auto flex-wrap py-1.5",te?"min-h-[24px]":"min-h-[40px]"],F),className:M("cursor-pointer",Ue&&"w-0 min-w-0 flex-none p-0"),onKeyDown:no,children:Ue})}),h.jsx(Va,{text:d}),!d&&h.jsx(Ga,{text:u})]})]})},vz=({className:e="",value:t,onChange:s,error:n,containerClassName:i,resize:o=!1,labelProps:r,caption:a,id:l,...c})=>{const d=M("dial-kit-textarea dial-kit-input px-3 py-2",c.invalid&&"dial-kit-input-error",c.disabled&&"dial-kit-input-disable",o?"resize":"resize-none",e);return h.jsxs("div",{className:M("flex flex-col gap-2",i),children:[r&&h.jsx(ni,{...r,htmlFor:l}),h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("textarea",{id:l,value:t||"",className:d,onChange:u=>s?.(u.currentTarget.value),...c}),h.jsx(Va,{text:n}),!n&&h.jsx(Ga,{text:a})]})]})},Cz=({showPasswordLabel:e="Show password",hidePasswordLabel:t="Hide password",disabled:s,size:n=me.Standard,...i})=>{const[o,r]=g.useState(!1),a=o&&!s;return h.jsx(Yi,{...i,size:n,disabled:s,type:a?"text":"password",iconAfter:h.jsx(lr,{size:me.Small,disabled:s,"aria-label":a?t:e,"aria-pressed":a,icon:a?h.jsx(z.IconEyeOff,{size:Ne.SM,"aria-hidden":"true"}):h.jsx(z.IconEye,{size:Ne.SM,"aria-hidden":"true"}),onClick:()=>r(l=>!l)})})},wz=/^0+\.(\d+)?$/,bz=/^0+/,xz=[".","-","+","e","E"],iC=e=>!e||e==="-"?e:String(e).match(wz)?String(e).replace(bz,"0"):Number(e),yz=({integer:e,onChange:t,min:s,max:n,onKeyDown:i,onPaste:o,...r})=>{const a=c=>{if(e&&xz.includes(c.key)){c.preventDefault();return}E0(c,"number",s,n),i?.(c)},l=c=>{if(e){const d=c.clipboardData.getData("text"),u=d.replace(/\D/g,"");if(u!==d&&(c.preventDefault(),u)){const p=c.currentTarget,f=p.selectionStart??0,m=p.selectionEnd??0,v=p.value.slice(0,f)+u+p.value.slice(m);t?.(iC(v))}}o?.(c)};return h.jsx(Yi,{...r,type:"number",min:s,max:n,onChange:c=>t?.(iC(c)),onKeyDown:a,onPaste:l})},Sz="z-[52] flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6",Rz="relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto",Fz="flex flex-row items-center justify-between px-6 py-4",Ez="flex-1 min-w-0 mr-3 truncate dial-h1-text text-primary",Dz={[It.Sm]:"max-w-full md:max-w-[400px]",[It.Md]:"max-w-full md:max-w-[800px]",[It.Lg]:"max-w-full md:max-w-[1200px]"},I0=({open:e=!1,header:t,ariaLabel:s,portalId:n,className:i,overlayClassName:o,titleClassName:r,headerClassName:a,bodyClassName:l,children:c,footer:d,onClose:u,size:p=It.Md,hideClose:f=!1,closeAriaLabel:m="Close dialog",closeOnOutsideClick:v=!0,preventKeyboardOnOpen:C=!1})=>{const w=g.useRef(null),b=g.useId(),{refs:x,context:S}=de.useFloating({open:e,onOpenChange:k=>{k||u?.(null)}}),y=de.useRole(S,{role:"dialog"}),R=de.useDismiss(S,{outsidePress:v}),{getFloatingProps:E}=de.useInteractions([y,R]);if(!e)return null;const F=typeof t=="string"?`popup-heading-${b}`:void 0,P=k=>k?typeof k=="string"?h.jsx("h2",{id:F,className:M(Ez,r),children:h.jsx(ct,{tooltip:k,children:k})}):k:h.jsx("span",{});return h.jsx(de.FloatingPortal,{id:n,children:h.jsx(de.FloatingOverlay,{className:M(Sz,o),children:h.jsx(de.FloatingFocusManager,{context:S,initialFocus:C?w:x.floating,children:h.jsxs("div",{ref:x.setFloating,...E(),role:"dialog","aria-modal":"true","aria-labelledby":F,"aria-label":F?void 0:s,className:M(Rz,Dz[p],i),children:[C&&h.jsx("div",{ref:w,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),h.jsxs("div",{className:M(Fz,a),children:[P(t),!f&&h.jsx(Rd,{ariaLabel:m,onClose:k=>u?.(k)})]}),h.jsx("div",{className:M("grow overflow-auto",l),children:c}),d]})})})})},Pz="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",Tz="text-secondary dial-small-paragraph-text px-6 pb-4",kz="px-6 py-4 h-[120px]",Iz="Cancel",Mz="Ok",oh={[mn.Info]:{confirm:{variant:Me.Primary,appearance:ye.Solid}},[mn.Danger]:{container:"border-t-4 border-error",confirm:{variant:Me.Danger,appearance:ye.Solid}}},Az=({header:e,description:t,descriptionClassName:s,open:n=!1,confirmLabel:i=Mz,cancelLabel:o=Iz,isLoading:r=!1,disableConfirmButton:a=!1,className:l,confirmClassName:c,onClose:d,onConfirm:u,onCancel:p,children:f,variant:m=mn.Info,size:v=It.Sm,footer:C,hideClose:w,...b})=>{const x=r?null:h.jsxs("div",{className:Pz,children:[h.jsx(C0,{label:o,onClick:()=>p?p():d?.()}),h.jsx(Ba,{variant:oh[m].confirm.variant,appearance:oh[m].confirm.appearance,className:c,label:i,disabled:a,onClick:u})]}),S=g.useCallback(()=>r?h.jsx("div",{className:kz,children:h.jsx(zc,{size:40})}):f??(t?h.jsx("div",{className:M(Tz,s),children:t}):null),[f,t,r,s]);return h.jsx(I0,{...b,open:n,header:e,className:M(oh[m].container,l),onClose:()=>d?.(),footer:C??x,size:v,hideClose:w??(!r&&C===void 0),children:S()})},Lz=({title:e,description:t,children:s,expanded:n,defaultExpanded:i=!1,disabled:o,nonCollapsible:r,ariaLabel:a,onToggle:l,className:c,headerClassName:d,contentClassName:u})=>{const p=n!==void 0,[f,m]=g.useState(i),v=r?!0:p?n:f,C=g.useId(),w=`accordion-header-${C}`,b=`accordion-content-${C}`,x=()=>{if(o)return;const y=!v;p||m(y),l?.(y)},S=h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"flex min-w-0 flex-col",children:[h.jsx("span",{className:"truncate dial-body-text text-primary",children:e}),t?h.jsx("span",{className:"truncate dial-tiny-text text-secondary",children:t}):null]}),!r&&h.jsx(z.IconChevronRight,{size:Ne.SM,"aria-hidden":"true",className:M("shrink-0 text-secondary transition-transform motion-reduce:transition-none",v&&"rotate-90")})]});return h.jsxs("div",{className:M("flex flex-col gap-3 py-3 overflow-hidden bg-transparent ",c),children:[r?h.jsx("div",{id:w,className:M("flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",d),children:S}):h.jsx("button",{id:w,type:"button","aria-expanded":v,"aria-controls":v?b:void 0,"aria-label":Ws(a),disabled:o,onClick:x,className:M("flex w-full px-4 rounded-xl items-center justify-between dial-tiny-text",o?"cursor-not-allowed opacity-75":"cursor-pointer hover:bg-control-accent-alpha-hover focus-visible:outline focus-visible:outline-focus-black",d),children:S}),v&&h.jsx("div",{id:b,role:"region","aria-labelledby":w,className:M("px-4 dial-small-text text-primary",u),children:s})]})},Nz=({id:e,labelProps:t,isOn:s=!1,disabled:n,onChange:i,caption:o,className:r,...a})=>{const l=g.useId(),c=e??l,d=o?`${c}-caption`:void 0,u=g.useCallback(p=>{i?.(p.target.checked)},[i]);return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsxs("div",{className:M("flex items-center gap-2",r),children:[h.jsx("input",{...a,type:"checkbox",role:"switch",id:c,checked:s,"aria-checked":s,disabled:n,onChange:u,"aria-label":Ws(typeof t?.label!="string"?a["aria-label"]:void 0),"aria-describedby":d,className:"peer sr-only"}),h.jsx("label",{htmlFor:c,className:M("flex h-[18px] w-[36px] shrink-0 items-center rounded-full p-0.5 transition-colors duration-200","peer-focus-visible:outline peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus-black",s?"justify-end":"justify-start",s&&!n?"bg-control-accent":"bg-control-disable",n?"cursor-not-allowed":"cursor-pointer"),children:h.jsx("span",{className:M("size-3.5 shrink-0 rounded-full",n?"bg-controls-disable-accent":"bg-control-neutral")})}),t&&h.jsx(ni,{size:me.Standard,...t,htmlFor:c,className:M("py-[1px]",n?"cursor-not-allowed text-secondary":"cursor-pointer text-primary",t.className)})]}),o&&h.jsx("span",{id:d,className:"dial-tiny-text text-secondary ml-[44px]",children:o})]})},Oz=["ArrowRight","ArrowLeft","Home","End"],Hz=({tabs:e,activeTabId:t,onTabChange:s,ariaLabel:n,className:i,tabClassName:o})=>{const r=g.useRef({}),a=e.find(d=>d.id===t),l=a&&!a.disabled?a.id:e.find(d=>!d.disabled)?.id,c=g.useCallback(d=>{if(!Oz.includes(d.key)||e.length===0)return;const u=e.filter(C=>!C.disabled);if(u.length===0)return;const p=Math.max(u.findIndex(C=>C.id===t),0),f=u.length-1;let m=p;switch(d.key){case"ArrowRight":m=p===f?0:p+1;break;case"ArrowLeft":m=p===0?f:p-1;break;case"Home":m=0;break;case"End":m=f;break}d.preventDefault();const v=u[m];r.current[v.id]?.focus(),v.id!==t&&s(v.id)},[e,t,s]);return h.jsx("div",{role:"tablist","aria-label":n,onKeyDown:c,className:M("flex justify-start gap-1",i),children:e.map(d=>{const u=t===d.id,p=!!d.disabled;return h.jsxs("button",{ref:f=>{r.current[d.id]=f},type:"button",role:"tab","aria-selected":u,disabled:p,tabIndex:d.id===l?0:-1,onClick:()=>s(d.id),className:M("dial-small-paragraph-semi-text dial-kit-enhanced-target","border-b-2 border-transparent flex items-center gap-2 px-3 py-2 text-start","transition-colors motion-reduce:transition-none","focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus-black",p&&"cursor-not-allowed border-control-disable-alpha text-control-disable-alpha",!p&&(u?"dial-kit-tab-selected-underline text-primary":"border-transparent text-secondary"),o),children:[h.jsx("span",{children:d.label}),d.count!=null&&h.jsx("span",{className:M("dial-tiny-semi-text rounded-full px-1.5 py-0.5",p&&"bg-layer-sunken text-control-disable-alpha",!p&&(u?"bg-info text-accent":"bg-layer-sunken text-secondary")),children:d.count})]},d.id)})})},ap=(e,t)=>{const s=(t??"").split(",").map(o=>o.trim().toLowerCase()).filter(Boolean);if(s.length===0)return!0;const n=e.name.toLowerCase(),i=e.type.toLowerCase();return s.some(o=>{if(o.startsWith("."))return n.endsWith(o);if(o.endsWith("/*")){const r=o.slice(0,-1);return i.length>r.length&&i.startsWith(r)}return i===o})},Bz=({labelProps:e,label:t,description:s,onChange:n,onReject:i,accept:o,multiple:r=!1,disabled:a=!1,errorText:l,icon:c,id:d,ariaLabel:u,className:p})=>{const f=g.useId(),m=d??`file-dropzone-${f}`,v=l?`${m}-error`:void 0,[C,w]=g.useState(!1),b=g.useRef(0),x=g.useCallback(k=>{if(k.length===0)return;const D=r?k:k.slice(0,1),T=D.filter(H=>ap(H,o)),I=D.filter(H=>!ap(H,o));I.length>0&&i?.(I),T.length>0&&n(T)},[o,r,n,i]),S=g.useCallback(k=>{x(Array.from(k.target.files??[])),k.target.value=""},[x]),y=g.useCallback(()=>{b.current=0,w(!1)},[]),R=g.useCallback(k=>{a||(k.preventDefault(),b.current+=1,w(!0))},[a]),E=g.useCallback(k=>{a||(k.preventDefault(),k.dataTransfer.dropEffect="copy")},[a]),F=g.useCallback(()=>{a||(b.current-=1,b.current<=0&&y())},[a,y]),P=g.useCallback(k=>{k.preventDefault(),!a&&(y(),x(Array.from(k.dataTransfer?.files??[])))},[a,y,x]);return h.jsxs("div",{className:"flex flex-col gap-1",children:[e&&h.jsx(ni,{...e,htmlFor:m}),h.jsx("input",{id:m,type:"file",accept:o,multiple:r,disabled:a,onChange:S,"aria-label":Ws(typeof t!="string"?u:void 0),"aria-describedby":v,"aria-invalid":l?!0:void 0,className:"peer sr-only"}),h.jsxs("label",{htmlFor:m,onDragEnter:R,onDragOver:E,onDragLeave:F,onDrop:P,className:M("flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed px-6 py-10 text-center","transition-colors motion-reduce:transition-none","peer-focus-visible:outline peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus-black",a?"cursor-not-allowed border-secondary bg-layer-sunken":"cursor-pointer bg-layer-base",!a&&C&&"border-info bg-control-accent-alpha",!a&&!C&&"border-secondary hover:border-info",l&&!C&&"border-error hover:border-error",p),children:[c??h.jsx(z.IconUpload,{size:Ne.LG,"aria-hidden":"true",className:a?"text-control-disable-alpha":"text-secondary"}),h.jsxs("span",{className:"flex flex-col gap-1",children:[h.jsx("span",{className:M("dial-small-text",a?"text-control-disable-alpha":"text-primary"),children:t}),s&&h.jsx("span",{className:M("dial-tiny-text",a?"text-control-disable-alpha":"text-secondary"),children:s})]})]}),h.jsx(Va,{id:v,text:l})]})},zr=({label:e,icon:t,size:s=me.Standard,selected:n=!1,disabled:i=!1,closable:o=!1,removeLabel:r,className:a,title:l,onClick:c,onRemove:d,onKeyDown:u,...p})=>{const f=s===me.Small,m=!!c&&!i,v=o&&!!d&&!i,C=w=>{u?.(w),!(!m||w.defaultPrevented)&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),w.currentTarget.click())};return h.jsxs("span",{...p,role:m?"button":p.role,tabIndex:m?0:p.tabIndex,"aria-disabled":i||void 0,onClick:i?void 0:c,onKeyDown:C,className:M("inline-flex max-w-full items-center border dial-tiny-text",f?"h-[20px] gap-0.5 rounded-md px-1.5":"h-[24px] gap-1 rounded-lg px-2",i&&"cursor-not-allowed border-tertiary bg-layer-sunken",i&&"text-control-disable-alpha",!i&&(n?"border-accent-alpha bg-control-accent-alpha text-primary":"border-tertiary bg-layer-raised text-primary"),m&&["cursor-pointer outline-offset-0","focus-visible:outline focus-visible:outline-focus-black",n?"hover:bg-control-accent-alpha-hover active:bg-control-accent-alpha-active":"hover:border-hover-alpha"],a),children:[t&&h.jsx("span",{className:"flex shrink-0 items-center","aria-hidden":"true",children:t}),h.jsx("span",{className:"truncate",title:l??e,children:e}),v&&h.jsx(lr,{className:"size-[16px] shrink-0 dial-kit-minimum-target",size:me.Small,"aria-label":r??`Remove ${e}`,icon:h.jsx(z.IconX,{size:Ne.SM,"aria-hidden":"true"}),onClick:w=>{w.stopPropagation(),d?.(w)}})]})},Gz=({availableWidth:e,tagWidths:t,overflowChipWidth:s,gap:n})=>{if(e<=0)return t.length;let i=0,o=0;for(const r of t){const a=r+n;if(i+a>e)break;i+=a,o++}if(o===t.length)return o;for(;o>0&&i+s>e;)o--,i-=t[o]+n;return o},Vz=4,jz=24,oC=e=>parseFloat(e)||0,zz=e=>{let t=e.length;for(;t>0&&e[t-1]===",";)t--;return e.slice(0,t)},Wz=()=>{},_z=({id:e,value:t,defaultValue:s,size:n=me.Standard,labelProps:i,placeholder:o,caption:r,error:a,invalid:l,disabled:c=!1,readOnly:d=!1,collapseTagOverflow:u=!1,ariaLabel:p,tagListLabel:f="Tags",className:m,fieldClassName:v,tagClassName:C,onChange:w})=>{const b=g.useId(),x=e||b,S=n===me.Small,y=S?me.Small:me.Standard,R=g.useRef(null),E=g.useRef([]),F=g.useRef(null),P=t!==void 0,[k,D]=g.useState(s??[]),T=P?t:k,I=T.length,[H,A]=g.useState(""),[O,G]=g.useState(I),L=!d&&!c,U=g.useCallback($=>{P||D($),w?.($)},[P,w]),B=g.useCallback($=>K=>{E.current[$]=K},[]),N=g.useCallback(()=>{const $=R.current;if(!$||$.clientWidth===0){G(T.length);return}const{paddingLeft:K,paddingRight:ce}=getComputedStyle($);G(Gz({availableWidth:$.clientWidth-oC(K)-oC(ce)-(d?0:jz),tagWidths:T.map((q,ue)=>E.current[ue]?.offsetWidth??0),overflowChipWidth:F.current?.offsetWidth??0,gap:Vz}))},[d,T]);g.useEffect(()=>{if(!u){G(I);return}const $=R.current;if(!$)return;const K=new ResizeObserver(()=>N());return K.observe($),N(),()=>K.disconnect()},[u,N,I]);const W=M(u?"shrink-0":"min-w-0",C),Y=$=>{const K=zz($.trim()).trim();!K||T.includes(K)||U([...T,K])},te=$=>{U(T.filter(K=>K!==$))},we=()=>{Y(H),A("")},Q=$=>{if(L){if($.key==="Enter"||$.key===","){$.preventDefault(),we();return}$.key==="Backspace"&&!H&&I>0&&($.preventDefault(),U(T.slice(0,-1)))}},ve=()=>{L&&H.trim()&&we()},Pe=u?T.slice(0,O):T,J=u?T.slice(O):[],ge=J.join(", "),V=I>0&&h.jsxs("span",{role:"list","aria-label":f,className:M("relative flex min-w-0 items-center gap-1",u?"flex-nowrap":"flex-wrap"),children:[Pe.map($=>h.jsx(zr,{role:"listitem",label:$,size:y,className:W,disabled:c,closable:L,onRemove:L?()=>te($):void 0},$)),J.length>0&&h.jsx(zr,{role:"listitem",label:`+${J.length}`,"aria-label":ge,title:ge,size:y,className:M("shrink-0",C),disabled:c}),u&&h.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 overflow-hidden whitespace-nowrap",children:[T.map(($,K)=>h.jsx("span",{ref:B(K),className:"inline-flex",children:h.jsx(zr,{label:$,size:y,className:C,disabled:c,closable:L,onRemove:L?Wz:void 0})},$)),h.jsx("span",{ref:F,className:"inline-flex",children:h.jsx(zr,{label:`+${I}`,size:y,className:C})})]})]});return h.jsx(Yi,{id:x,size:n,labelProps:i,caption:r,error:a,invalid:l,disabled:c,readOnly:d,value:H,placeholder:I>0?void 0:o,"aria-label":p,wrapperRef:R,onChange:$=>A($??""),onKeyDown:Q,onBlur:ve,containerClassName:M("w-full",m),wrapperClassName:M(I>0&&["!h-auto",S?"min-h-[24px] py-0.5":"min-h-[40px] py-1.5",u?"flex-nowrap overflow-hidden":"flex-wrap"],v),className:M("w-auto flex-1",u?"min-w-[24px]":"min-w-[100px]",d&&"cursor-default"),children:V})},Uz={[me.Small]:Ne.SM,[me.Standard]:Ne.MD,[me.Large]:Ne.MD},$z=({size:e=me.Standard,placeholder:t="Search...",withoutBorder:s=!1,clearLabel:n="Clear search",disabled:i,value:o,onChange:r,wrapperClassName:a,inputRef:l,...c})=>{const d=g.useRef(null),u=de.useMergeRefs([l,d]),p=!!o&&!i,f=g.useCallback(()=>{r?.(void 0),d.current?.focus()},[r]);return h.jsx(Yi,{...c,size:e,value:o,disabled:i,onChange:r,placeholder:t,inputRef:u,wrapperClassName:M(s&&"dial-kit-input-borderless",a),iconBefore:h.jsx(z.IconSearch,{size:Uz[e],className:"text-secondary","aria-hidden":"true"}),iconAfter:p?h.jsx(lr,{size:me.Small,"aria-label":n,icon:h.jsx(z.IconX,{size:Ne.SM,"aria-hidden":"true"}),onClick:f}):void 0})},qz=()=>Promise.resolve().then(()=>require("./JsonEditor-pyqbLZZf.cjs")),Kz=()=>Promise.resolve().then(()=>require("./MarkdownEditor-9aPIyyuu.cjs")),Yz=()=>Promise.resolve().then(()=>require("./MarkdownEditor-BjqdSHPU.cjs"));exports.Accordion=Lz;exports.AnalyticsCardVariant=na;exports.BASE_ICON_PROPS=ae;exports.BASE_ICON_SIZE=os;exports.Button=Ba;exports.ButtonAppearance=ye;exports.ButtonDropdown=Xj;exports.ButtonVariant=Me;exports.Calendar=Lj;exports.CalendarMode=is;exports.CaptionText=Ga;exports.CardShell=lj;exports.CloseButton=Rd;exports.ConfirmationPopup=Az;exports.ConfirmationPopupVariant=mn;exports.DEFAULT_ANALYTICS_BAR_COLOR_MAP=up;exports.DEFAULT_DATE_FORMAT_OPTIONS=Lg;exports.DEFAULT_LOCALE=Ag;exports.DIAL_ICON_SIZE=Ne;exports.DangerButton=Hj;exports.DangerIconButton=tj;exports.DialAccordion=SC;exports.DialAnalyticsBar=Hl;exports.DialAnalyticsBarGroup=rS;exports.DialAnalyticsCard=nS;exports.DialAnalyticsErrorTag=dp;exports.DialAnalyticsHistogram=uS;exports.DialAutocompleteInputValue=Sx;exports.DialBreadcrumb=Hg;exports.DialBreadcrumbItem=jr;exports.DialButton=Ks;exports.DialButtonDropdown=np;exports.DialCaptionText=Fa;exports.DialCheckbox=ia;exports.DialCloseButton=Mg;exports.DialCollapsibleSidebar=IC;exports.DialConditionalResizableContainer=_C;exports.DialConfirmationPopup=xx;exports.DialDangerButton=bx;exports.DialDangerIconButton=DC;exports.DialDateCellRenderer=Og;exports.DialDestinationFolderPopup=Kx;exports.DialDraggableItem=jR;exports.DialDropdown=Gt;exports.DialDropdownIcon=dG;exports.DialEllipsisTooltip=it;exports.DialErrorText=Ht;exports.DialFileIcon=wp;exports.DialFileManager=s0;exports.DialFileManagerActions=ee;exports.DialFileManagerTabs=ko;exports.DialFileName=Yc;exports.DialFileNodeType=De;exports.DialFilePermission=to;exports.DialFileResourceType=_g;exports.DialFolderName=Zc;exports.DialFoldersTree=Xx;exports.DialFormItem=Wc;exports.DialFormPopup=PB;exports.DialGhostButton=Gg;exports.DialGhostIconButton=jc;exports.DialGrid=Ng;exports.DialIcon=Le;exports.DialIconButton=hn;exports.DialInput=vn;exports.DialInputPopup=Rx;exports.DialItemType=ls;exports.DialLabel=si;exports.DialLabelledText=GS;exports.DialLinkButton=lB;exports.DialLoadFileArea=Ox;exports.DialLoadFileAreaField=aG;exports.DialLoader=bn;exports.DialNeutralButton=qs;exports.DialNeutralIconButton=fS;exports.DialNoDataContent=tr;exports.DialNotification=PC;exports.DialNumberInput=ep;exports.DialPagination=PS;exports.DialPasswordInput=Dx;exports.DialPopup=eo;exports.DialPrimaryButton=zs;exports.DialPrimaryIconButton=gS;exports.DialRadioButton=Ei;exports.DialRadioGroup=sc;exports.DialRadioGroupPopupField=RB;exports.DialRemoveButton=Cd;exports.DialResizableContainer=WC;exports.DialSchemaRenderer=QV;exports.DialSearch=Vg;exports.DialSecondaryIconButton=mS;exports.DialSegmentedControl=fB;exports.DialSelect=ei;exports.DialSelectField=WB;exports.DialSharedEntityIndicator=ra;exports.DialSlider=BS;exports.DialSteps=MS;exports.DialSuccessIconButton=CS;exports.DialSwitch=wd;exports.DialTabs=fx;exports.DialTag=jn;exports.DialTagInput=yx;exports.DialTertiaryIconButton=vS;exports.DialTextarea=cB;exports.DialTooltip=ct;exports.DialTooltipContainer=Bc;exports.DialTooltipContent=Gc;exports.DialTooltipTrigger=Vc;exports.Dropdown=Fd;exports.DropdownItemType=Jn;exports.DropdownTrigger=Tt;exports.DropdownType=hx;exports.EDITABLE_CONTAINER_ATTRIBUTE=Kg;exports.EditorThemes=Yg;exports.ElementSize=me;exports.ErrorMessageNotification=gj;exports.ErrorText=Va;exports.ErrorToastNotification=cj;exports.FabButton=jj;exports.FileDropzone=Bz;exports.FileManagerColumnKey=Ft;exports.FileManagerProvider=qx;exports.FlexibleActionsDirection=Fi;exports.FolderPath=Nj;exports.FormItemOrientation=oa;exports.GhostButton=Gj;exports.GhostIconButton=lr;exports.GridSelectionMode=ea;exports.Highlight=aj;exports.IconButton=Da;exports.InfoButton=kC;exports.InfoMessageNotification=fj;exports.InfoToastNotification=dj;exports.InlineSelect=Qj;exports.InlineSelectTrigger=F0;exports.Input=Yi;exports.JsonSchemaType=Xe;exports.Label=ni;exports.LazyDialJsonEditor=qz;exports.LazyDialMarkdownEditor=Kz;exports.LazyMarkdownEditor=Yz;exports.LinkButton=Bj;exports.LoadingMessageNotification=Cj;exports.LoadingToastNotification=pj;exports.MultiSelectTags=T0;exports.NAME_COLUMN=Qx;exports.NOT_ALLOWED_SPACES=qg;exports.NOT_ALLOWED_SPACES_REGEXP=uV;exports.NOT_ALLOWED_SYMBOLS=Ux;exports.NOT_ALLOWED_SYMBOLS_REGEXP=$x;exports.NeutralButton=C0;exports.NeutralIconButton=ej;exports.Notification=Qg;exports.NotificationType=Ot;exports.NotificationVariant=Ye;exports.NumberInput=yz;exports.OutlinedButton=Vj;exports.PasswordInput=Cz;exports.Popup=I0;exports.PopupSize=It;exports.PrimaryButton=Oj;exports.PrimaryIconButton=JV;exports.ProgressBar=SS;exports.RadioGroupOrientation=Oi;exports.ResizableContainerSide=aa;exports.SIZE_COLUMN=e0;exports.SchemaDisplayMode=Sa;exports.SchemaOrientation=yd;exports.SchemaRendererVariant=Io;exports.ScreenResolution=xa;exports.Search=$z;exports.Select=mz;exports.SelectSize=Mc;exports.SelectVariant=Ac;exports.Skeleton=xo;exports.SkeletonAvatarShape=nc;exports.SkeletonAvatarSize=_r;exports.SkeletonVariant=Cs;exports.Spinner=zc;exports.StaticIconButton=ip;exports.StepStatus=as;exports.SuccessMessageNotification=mj;exports.SuccessToastNotification=uj;exports.Switch=Nz;exports.TabOrientation=Ic;exports.TabView=Li;exports.Tabs=Hz;exports.Tag=zr;exports.TagInput=_z;exports.Textarea=vz;exports.UPDATED_AT_COLUMN=Jx;exports.WarningMessageNotification=vj;exports.WarningToastNotification=hj;exports.convertToDate=vd;exports.editableContainerProps=Yx;exports.jsxRuntimeExports=h;exports.matchesAccept=ap;exports.mergeClasses=M;exports.useDialFileManagerTabs=HV;exports.useEditableItem=Zx;exports.useFileManagerContext=t0;exports.wrapInRootFolder=WV;
|