@vuu-ui/vuu-utils 0.8.5 → 0.8.6
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/LICENSE +201 -0
- package/cjs/index.js +3 -2
- package/cjs/index.js.map +4 -4
- package/esm/index.js +3 -2
- package/esm/index.js.map +4 -4
- package/package.json +4 -4
- package/types/column-utils.d.ts +3 -1
- package/types/common-types.d.ts +6 -0
- package/types/filter-utils.d.ts +2 -1
- package/types/index.d.ts +2 -0
- package/types/itemToString.d.ts +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2015 UBS
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var ve=Object.prototype.hasOwnProperty;var Oe=(e,t)=>{for(var n in t)M(e,n,{get:t[n],enumerable:!0})},_e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Me(t))!ve.call(e,o)&&o!==n&&M(e,o,{get:()=>t[o],enumerable:!(r=Pe(t,o))||r.enumerable});return e};var Ge=e=>_e(M({},"__esModule",{value:!0}),e);var Ie=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var m=(e,t,n)=>(Ie(e,t,"read from private field"),n?n.call(e):t.get(e)),se=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var xr={};Oe(xr,{AggregationType:()=>Qe,ArrowDown:()=>Kn,ArrowLeft:()=>Pn,ArrowRight:()=>Mn,ArrowUp:()=>An,DOWN1:()=>E,DOWN2:()=>R,DataWindow:()=>H,End:()=>Gn,Enter:()=>vn,Escape:()=>On,EventEmitter:()=>B,Home:()=>_n,KeySet:()=>ee,PageDown:()=>$n,PageUp:()=>In,RangeMonitor:()=>q,RowSelected:()=>d,Space:()=>Nn,Tab:()=>Hn,UP1:()=>S,UP2:()=>w,WindowRange:()=>y,actualRowPositioning:()=>Xn,addGroupColumn:()=>yn,addSortColumn:()=>Cr,applyFilterToColumns:()=>Tt,applyGroupByToColumns:()=>Dt,applySort:()=>dr,applySortToColumns:()=>xt,buildColumnMap:()=>pt,createEl:()=>on,dateFormatter:()=>we,debounce:()=>Wn,defaultValueFormatter:()=>Q,deselectItem:()=>Qn,expandSelection:()=>fr,extractFilterForColumn:()=>I,extractGroupColumn:()=>fe,filterAsQuery:()=>T,findColumn:()=>de,flattenColumnGroup:()=>F,focusFirstFocusableElement:()=>sn,formatDate:()=>J,fromServerDataType:()=>tt,getCellConfigPanelRenderer:()=>Ht,getCellRenderer:()=>Nt,getColumnName:()=>Et,getColumnStyle:()=>Ct,getColumnsInViewport:()=>At,getCookieValue:()=>$,getFocusableElement:()=>xe,getFullRange:()=>Ut,getGroupValueAndOffset:()=>vt,getLoggingConfigForWorker:()=>tn,getMovingValueDirection:()=>Bt,getRegisteredCellRenderers:()=>$t,getRowRecord:()=>kt,getSelectionStatus:()=>pr,getTableHeadings:()=>yt,getUniqueId:()=>dn,getUrlParameter:()=>br,getValueFormatter:()=>gn,hasHeadings:()=>ce,hasUrlParameter:()=>Dr,invariant:()=>Sn,isAndFilter:()=>Xe,isCharacterKey:()=>Tn,isColumnTypeRenderer:()=>at,isDataLoading:()=>Vt,isDateColumn:()=>ae,isDatePattern:()=>U,isDateTimeColumn:()=>_,isDateTimePattern:()=>W,isFilterClause:()=>v,isFilteredColumn:()=>Ft,isGroupColumn:()=>me,isGroupMenuItemDescriptor:()=>Un,isInFilter:()=>Je,isJsonAttribute:()=>ge,isJsonColumn:()=>gt,isJsonGroup:()=>mt,isKeyedColumn:()=>et,isMappedValueTypeRenderer:()=>G,isMultiClauseFilter:()=>D,isMultiValueFilter:()=>O,isNamedFilter:()=>We,isNumericColumn:()=>nt,isOrFilter:()=>qe,isPinned:()=>ot,isQuoteKey:()=>Fn,isResizing:()=>st,isRowSelected:()=>Yn,isSelected:()=>cr,isSingleValueFilter:()=>ie,isTextColumn:()=>it,isTimeColumn:()=>pe,isTimePattern:()=>j,isTypeDescriptor:()=>h,isValidNumber:()=>Xt,itemsChanged:()=>Ne,itemsOrOrderChanged:()=>He,jsonToDataSourceRows:()=>Vn,lastWord:()=>hr,logger:()=>X,mapSortCriteria:()=>Ze,metadataKeys:()=>g,moveItem:()=>Ue,notHidden:()=>rt,numericFormatter:()=>Ee,partition:()=>$e,projectUpdates:()=>ct,rangeNewItems:()=>Wt,registerComponent:()=>It,removeColumnFromFilter:()=>Ye,resetRange:()=>jt,roundDecimal:()=>z,selectItem:()=>tr,setAggregations:()=>ht,setSortColumn:()=>yr,shallowEquals:()=>qt,sortPinnedColumns:()=>dt,stripFilterFromColumns:()=>St,throttle:()=>Jn,toColumnDescriptor:()=>ut,toDataSourceColumns:()=>Lt,updateColumn:()=>Rt,uuid:()=>jn,virtualRowPositioning:()=>qn,visibleColumnAtIndex:()=>Kt,withinRange:()=>he});module.exports=Ge(xr);function $e(e,t,n=[],r=[]){for(let o=0,s=e.length;o<s;o++)(t(e[o],o)?n:r).push(e[o]);return[n,r]}function Ne(e,t,n){return e.length!==t.length?!0:n===void 0?!e.every(r=>t.includes(r)):e.some(r=>t.findIndex(o=>o[n]===r[n])===-1)}function He(e,t,n){return e.length!==t.length?!0:n===void 0?e.some((r,o)=>t[o]!==r):e.some((r,o)=>t[o][n]!==r[n])}var Ue=(e,t,n)=>{let r=e.indexOf(t);if(r===n)return e;let o=e.slice();if(r===-1)throw Error("moveItem, item to be moved not found");if(o.splice(r,1),n===-1)o.push(t);else{let s=(n>r,0);o.splice(n+s,0,t)}return o};var je=new Set(["=","!=",">",">=","<","<=","starts","ends"]),We=e=>e!==void 0&&e.name!==void 0,ie=e=>e!==void 0&&je.has(e.op),v=e=>e!==void 0&&(ie(e)||O(e)),O=e=>e!==void 0&&e.op==="in",Je=e=>e.op==="in",Xe=e=>e.op==="and",qe=e=>e.op==="or";function D(e){return e!==void 0&&(e.op==="and"||e.op==="or")}var Be=e=>typeof e=="string"?`"${e}"`:e,T=e=>D(e)?e.filters.map(t=>T(t)).join(` ${e.op} `):O(e)?`${e.column} ${e.op} [${e.values.join(",")}]`:`${e.column} ${e.op} ${Be(e.value)}`,Ye=(e,t)=>{if(D(t)){let[n,r]=t.filters;if(n.column===e.name)return[r,T(r)];if(r.column===e.name)return[n,T(n)]}return[void 0,""]};var ze="asc",ue=[],Qe={Average:2,Count:3,Distinct:6,Sum:1,High:4,Low:5};function Ze(e,t,n=0){return e.map(r=>{if(typeof r=="string")return[t[r]+n,"asc"];if(Array.isArray(r)){let[o,s]=r;return[t[o]+n,s||ze]}else throw Error("columnUtils.mapSortCriteria invalid input")})}var et=e=>typeof e.key=="number",tt=e=>{switch(e){case"double":case"int":case"long":return"number";case"boolean":return"boolean";default:return"string"}},nt=({serverDataType:e,type:t})=>e==="int"||e==="long"||e==="double"?!0:typeof t=="string"?t==="number":typeof(t==null?void 0:t.name)=="string"?(t==null?void 0:t.name)==="number":!1,ae=({type:e})=>(h(e)?e.name:e)==="date",pe=({type:e})=>(h(e)?e.name:e)==="time",_=e=>ae(e)||pe(e),rt=e=>e.hidden!==!0,ot=e=>typeof e.pin=="string",ce=e=>Array.isArray(e.heading)&&e.heading.length>0,st=e=>e.resizing,it=({serverDataType:e})=>e===void 0?!1:e==="char"||e==="string",ut=e=>({name:e}),h=e=>typeof e<"u"&&typeof e!="string",lt={},at=e=>typeof(e==null?void 0:e.name)<"u",G=e=>e!==void 0&&typeof(e==null?void 0:e.map)<"u";function pt(e){let t=g.count;return e?e.reduce((n,r,o)=>(typeof r=="string"?n[r]=t+o:typeof r.key=="number"?n[r.name]=r.key:n[r.name]=t+o,n),{}):lt}function ct(e){let t=[],n=g.count-2;for(let r=0;r<e.length;r+=3)t[r]=e[r]+n,t[r+1]=e[r+1],t[r+2]=e[r+2];return t}var g={IDX:0,RENDER_IDX:1,IS_LEAF:2,IS_EXPANDED:3,DEPTH:4,COUNT:5,KEY:6,SELECTED:7,count:8,PARENT_IDX:"parent_idx",IDX_POINTER:"idx_pointer",FILTER_COUNT:"filter_count",NEXT_FILTER_IDX:"next_filter_idx"},ft=(e,t)=>{let{originalIdx:n}=t;if(typeof n=="number")for(let r=0;r<e.length;r++){let{originalIdx:o=-1}=e[r];if(o>n)return e.splice(r,0,t),e}return e.push(t),e},F=e=>{var t;if((t=e[0])!=null&&t.isGroup){let[n,...r]=e;return n.columns.forEach(o=>{ft(r,o)}),r}else return e};function fe(e,t,n=!0){if(t&&t.length>0){let r=F(e),[o,s]=r.reduce((l,f,C)=>{let[b,P]=l;return t.includes(f.name)?b.push({...f,originalIdx:C}):P.push(f),l},[[],[]]);if(o.length!==t.length)throw Error(`extractGroupColumn: no column definition found for all groupBy cols ${JSON.stringify(t)} `);let i=t.length,u=t.map((l,f)=>({...o.find(b=>b.name===l),groupLevel:i-f}));return[{key:-1,name:"group-col",heading:["group-col"],isGroup:!0,columns:u,groupConfirmed:n,width:u.map(l=>l.width).reduce((l,f)=>l+f)+100},s]}return[null,F(e)]}var me=e=>e.isGroup===!0,ge=e=>typeof e=="string"&&e.endsWith("+"),mt=(e,t)=>{var n;return((n=e.type)==null?void 0:n.name)==="json"&&ge(t[e.key])},gt=e=>{var t;return((t=e.type)==null?void 0:t.name)==="json"},dt=e=>{let t=[],n=[],r=[],o=4;for(let i of e)switch(i.pin){case"left":t.push({...i,endPin:void 0,pinnedOffset:o}),o+=i.width;break;case"right":n.unshift(i);break;default:r.push(i)}t.length&&t.push({...t.pop(),endPin:!0});let s=t.length?t.concat(r):r;if(n.length){let i=[],u=0;for(let a of n)i.unshift({...a,pinnedOffset:u}),u+=a.width;return i[0].endPin=!0,s.concat(i)}else return s},yt=e=>{if(e.some(ce)){let t=e.reduce((s,{heading:i})=>{var u;return Math.max(s,(u=i==null?void 0:i.length)!=null?u:0)},0),n,r=[],o;for(let s=0;s<t;s++)o=[],e.forEach(({heading:i=ue,width:u})=>{var l;let a=(l=i[s])!=null?l:"";n&&n.label===a?n.width+=u:(n={label:a,width:u},o.push(n))}),r.push(o);return console.log({maxHeadingDepth:t,tableHeadings:r}),r}return ue},Ct=({pin:e,pinnedOffset:t=e==="left"?0:4,width:n})=>e==="left"?{left:t,width:n,"--pin-width":`${t+n-5}px`}:e==="right"?{right:t,width:n,"--pin-width":`${t+n}px`}:{width:n},ht=(e,t,n)=>e.filter(r=>r.column!==t.name).concat({column:t.name,aggType:n}),I=(e,t)=>{if(D(e))return bt(e,t);if(v(e))return e.column===t?e:void 0},bt=(e,t)=>{let{filters:n,op:r}=e,o=[];if(n.forEach(s=>{let i=I(s,t);i&&o.push(i)}),o.length!==0)return o.length===1?o[0]:{op:r,filters:o}},Dt=(e,t,n=!0)=>{var r;if(t.length){let[o,s]=fe(e,t,n);if(o)return[o].concat(s)}else if((r=e[0])!=null&&r.isGroup)return F(e);return e},xt=(e,t)=>e.map(n=>{let r=wt(n,t);return r!==void 0?{...n,sorted:r}:n.sorted?{...n,sorted:void 0}:n}),Tt=(e,{filterStruct:t})=>e.map(n=>{let r=I(t,n.name);return r!==void 0?{...n,filter:r}:n.filter?{...n,filter:void 0}:n}),Ft=e=>e.filter!==void 0,St=e=>e.map(t=>{let{filter:n,...r}=t;return n?r:t}),wt=(e,{sortDefs:t})=>{let n=t.find(r=>r.column===e.name);if(n)return t.length>1?(t.indexOf(n)+1)*(n.sortType==="A"?1:-1):n.sortType},Et=e=>{let t=e.indexOf(":");return t===-1?e:e.slice(0,t)},de=(e,t)=>{let n=e.find(r=>r.name===t);if(n)return n;{let r=e.find(o=>o.isGroup);if(r)return de(r.columns,t)}};function Rt(e,t,n){let r=typeof t=="string"?e.find(o=>o.name===t):t;if(r){let o=n?{...r,...n}:r;return e.map(s=>s.name===o.name?o:s)}else throw Error("column-utils.replaceColun, column not found")}var Lt=e=>e.expression?`${e.name}:${e.serverDataType}:${e.expression}`:e.name,kt=(e,t)=>Object.entries(t).reduce((n,[r,o])=>(n[r]=e[o],n),{}),Vt=e=>me(e[0])&&e[0].groupConfirmed===!1,At=(e,t,n)=>{var s;let r=[],o=0;for(let i=0,u=0;u<e.length;u++){let a=e[u];if(!a.hidden){if(i+a.width<t)a.pin==="left"||i+a.width+((s=e[u+1])==null?void 0:s.width)>t?r.push(a):o+=a.width;else if(i>n){r.push(a);break}else r.push(a);i+=a.width}}return[r,o]},le=e=>e.hidden!==!0,Kt=(e,t)=>e.every(le)?e[t]:e.filter(le).at(t),{DEPTH:Pt,IS_LEAF:Mt}=g,vt=(e,t)=>{let{[Pt]:n,[Mt]:r}=t;if(r||n>e.length)return[null,n===null?0:Math.max(0,n-1)];if(n===0)return["$root",0];{let{key:o,valueFormatter:s}=e[n-1];return[s(t[o]),n-1]}};var $=e=>{var t,n;if(((t=globalThis.document)==null?void 0:t.cookie)!==void 0)return(n=globalThis.document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]};var N=new Map,ye=new Map,Ce=new Map,Ot=(e,t)=>e===void 0?!0:Array.isArray(e)?e.includes(t):e===t,_t=(e,t)=>e==="cell-renderer",Gt=(e,t)=>e==="cell-config-panel";function It(e,t,n="cell-renderer",r){_t(n,t)?N.set(e,t):Gt(n,t)&&ye.set(e,t),r&&Ce.set(e,r)}var $t=e=>{let n=Array.from(N.keys()).map(r=>({name:r,...Ce.get(r)}));return e?n.filter(r=>Ot(r.serverDataType,e)):n};function Nt(e){if(e&&"name"in e)return N.get(e.name)}function Ht(e){return ye.get(e)}function Ut({from:e,to:t},n=0,r=Number.MAX_SAFE_INTEGER){if(n===0)return r<e?{from:0,to:0}:{from:e,to:Math.min(t,r)};if(e===0)return{from:e,to:Math.min(t+n,r)};{let o=t-e,s=Math.round(n/2),i=e-s<0,u=r-(t+s)<0;return i&&u?{from:0,to:r}:i?{from:0,to:o+n}:u?{from:Math.max(0,r-(o+n)),to:r}:{from:e-s,to:t+s}}}function jt({from:e,to:t,bufferSize:n=0}){return{from:0,to:t-e,bufferSize:n,reset:!0}}var he=(e,{from:t,to:n})=>e>=t&&e<n,Wt=({from:e,to:t},n)=>{let{from:r,to:o}=n,s=r>=t||o<=e,i=r<e&&o>t;return s||i?n:o>t?{from:t,to:o}:{from:r,to:e}},y=class{constructor(t,n){this.from=t,this.to=n}isWithin(t){return he(t,this)}overlap(t,n){return t>=this.to||n<this.from?[0,0]:[Math.max(t,this.from),Math.min(n,this.to)]}copy(){return new y(this.from,this.to)}};var{KEY:Jt}=g,H=class{constructor({from:t,to:n}){this.rowCount=0;this.setRowCount=t=>{t<this.data.length&&(this.data.length=t),this.rowCount=t};this.range=new y(t,n),this.data=new Array(n-t)}add(t){let[n]=t;if(this.isWithinRange(n)){let r=n-this.range.from,o=this.data[r]!==void 0;return this.data[r]=t,o}else return!1}getAtIndex(t){return this.range.isWithin(t)&&this.data[t-this.range.from]!=null?this.data[t-this.range.from]:void 0}getByKey(t){return this.data.find(n=>n[Jt]===t)}isWithinRange(t){return this.range.isWithin(t)&&t<=this.rowCount}setRange(t,n){if(t!==this.range.from||n!==this.range.to){let[r,o]=this.range.overlap(t,n),s=new Array(n-t);for(let i=r;i<o;i++){let u=this.getAtIndex(i);if(u){let a=i-t;s[a]=u}}this.data=s,this.range.from=t,this.range.to=n}}hasData(t,n){let r=this.range.from,o=t-r,s=Math.min(n-r-1,this.rowCount-1);return this.data[o]!==void 0&&this.data[s]!==void 0}getData(t,n){var u;let{from:r,to:o}=this.range,s=Math.max(0,t-r),i=Math.min(n-r,(u=this.rowCount)!=null?u:n);return this.data.slice(s,i)}};var S="up1",w="up2",E="down1",R="down2",Xt=e=>typeof e=="number"&&isFinite(e),be={},qt=(e=be,t=be)=>{let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>e[o]===t[o])};function Bt(e,t,n,r){if(!isFinite(e)||n===void 0||t===void 0)return"";{let o=e-n;return o&&typeof r=="number"&&(o=+e.toFixed(r)-+n.toFixed(r)),o?t===""?o<0?E:S:o>0?t===E||t===R||t===w?S:w:t===S||t===w||t===R?E:R:""}}var U=e=>e==="dd.mm.yyyy",j=e=>e==="kk:mm:ss",W=e=>e!==void 0&&U(e)||j(e),x=e=>e<10?"0"+e:e.toString(),J=(e,t="dd.mm.yyyy")=>{if(U(t)){let n=e.getDate(),r=e.getMonth(),o=e.getFullYear();return`${x(n)}.${x(r+1)}.${o}`}else if(j(t)){let n=e.getHours(),r=e.getMinutes(),o=e.getSeconds();return`${x(n)}:${x(r)}:${x(o)}`}else return e.toUTCString()};var Yt=["error","warn","info","debug"],zt=e=>typeof e=="string"&&Yt.includes(e),Qt="error",L=()=>{},Zt="error",{loggingLevel:k=Zt}=en(),X=e=>{let t=k==="debug",n=t||k==="info",r=n||k==="warn",o=r||k==="error",s=n?l=>console.info(`[${e}] ${l}`):L,i=r?l=>console.warn(`[${e}] ${l}`):L,u=t?l=>console.debug(`[${e}] ${l}`):L;return{errorEnabled:o,error:o?l=>console.error(`[${e}] ${l}`):L}};function en(){return typeof loggingSettings<"u"?loggingSettings:{loggingLevel:De()}}function De(){let e=$("vuu-logging-level");return zt(e)?e:Qt}var tn=()=>`const loggingSettings = { loggingLevel: "${De()}"};`;var{debug:nn,debugEnabled:rn}=X("range-monitor"),q=class{constructor(t){this.source=t;this.range={from:0,to:0};this.timestamp=0}isSet(){return this.timestamp!==0}set({from:t,to:n}){let{timestamp:r}=this;if(this.range.from=t,this.range.to=n,this.timestamp=performance.now(),r)rn&&nn(`<${this.source}> [${t}-${n}], ${(this.timestamp-r).toFixed(0)} ms elapsed`);else return 0}};var on=(e,t,n)=>{let r=document.createElement(e);return t&&(r.className=t),n&&(r.textContent=n),r},xe=(e,t)=>{if(e){if(e.hasAttribute("tabindex")){let r=parseInt(e.getAttribute("tabindex"));if(!isNaN(r)&&(t===void 0||r===t))return e}let n=typeof t=="number"?e.querySelector(`[tabindex="${t}"]`):e.querySelector("[tabindex]");if(n)return n}},sn=(e,t)=>{requestAnimationFrame(()=>{let n=xe(e,t);n&&n.focus()})};function Te(e){return Array.isArray(e)}function un(e){return!Array.isArray(e)}var c,B=class{constructor(){se(this,c,new Map)}addListener(t,n){let r=m(this,c).get(t);r?Te(r)?r.push(n):un(r)&&m(this,c).set(t,[r,n]):m(this,c).set(t,n)}removeListener(t,n){if(!m(this,c).has(t))return;let r=m(this,c).get(t),o=-1;if(r===n)m(this,c).delete(t);else if(Array.isArray(r)){for(let s=length;s-- >0;)if(r[s]===n){o=s;break}if(o<0)return;r.length===1?(r.length=0,m(this,c).delete(t)):r.splice(o,1)}}removeAllListeners(t){t&&m(this,c).has(t)?m(this,c).delete(t):t===void 0&&m(this,c).clear()}emit(t,...n){if(m(this,c)){let r=m(this,c).get(t);r&&this.invokeHandler(r,n)}}once(t,n){let r=(...o)=>{this.removeListener(t,r),n(...o)};this.on(t,r)}on(t,n){this.addListener(t,n)}invokeHandler(t,n){if(Te(t))t.slice().forEach(r=>this.invokeHandler(r,n));else switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;default:t.call(null,...n)}}};c=new WeakMap;var V=String.fromCharCode(8200),p=String.fromCharCode(8199),ln=-1,Fe={DIGIT:p,TWO_DIGITS:p+p,THREE_DIGITS:p+p+p,FULL_PADDING:[null,V+p,V+p+p,V+p+p+p,V+p+p+p+p]},an={DIGIT:"0",TWO_DIGITS:"00",THREE_DIGITS:"000",FULL_PADDING:[null,"0","00","000","0000"]};function pn(e,t=6){return(cn+e).slice(-t)}var cn=p+p+p+p+p+p+p+p+p,Y={Right:"right",Center:"center",Left:"left"};function Se(e,t,n){let r=e.length,o=t-r;if(o>0)o===1?e=e+n.DIGIT:o===2?e=e+n.TWO_DIGITS:o===3&&(e=e+n.THREE_DIGITS);else if(o<0&&(e=e.slice(0,t),r=t),n===Fe&&e.charAt(r-1)==="0")return e=e.replace(/0+$/,""),Se(e,t,n);return e}function z(e,t=Y.Right,n=4,r,o){if(e===void 0||typeof e!="number"||isNaN(e))return"";let s,i,u,[a,l=""]=e.toString().split("."),f=l.length;return s=parseFloat(a).toLocaleString(),t===Y.Left&&o&&(s=pn(s)),n===ln||f===n?i=l:f>n?i=parseFloat("0."+l).toFixed(n).slice(2):(u=r?an:o&&t!==Y.Left?Fe:null)?f===0?i=u.FULL_PADDING[n]:i=Se(l,n,u):i=l,s+(i?"."+i:"")}var fn={},Q=e=>e==null?"":typeof e=="string"?e:e.toString(),we=e=>{let{type:t}=e,n="dd.mm.yyyy";return h(t)&&t.formatting&&W(t.formatting.pattern)&&(n=t.formatting.pattern),r=>typeof r=="number"&&r!==0?J(new Date(r),n):""},Ee=({align:e="right",type:t})=>{var n;if(t===void 0||typeof t=="string")return Q;{let{alignOnDecimals:r=!1,decimals:o,zeroPad:s=!1}=(n=t.formatting)!=null?n:fn;return i=>{if(typeof i=="string"&&(i.startsWith("\u03A3")||i.startsWith("[")))return i;let u=typeof i=="number"?i:typeof i=="string"?parseFloat(i):void 0;return z(u,e,o,s,r)}}},mn=e=>t=>{var n;return(n=e[t])!=null?n:""},gn=e=>{if(_(e))return we(e);let{serverDataType:t,type:n}=e;return h(n)&&G(n==null?void 0:n.renderer)?mn(n.renderer.map):t==="string"||t==="char"?r=>r:t==="double"?Ee(e):Q};var dn=()=>`hw-${Math.round(Math.random()*1e5)}`;function yn(e,t){return e?e.concat(t.name):[t.name]}var Cn={Enter:"Enter",Delete:"Delete"},hn={Home:"Home",End:"End",ArrowRight:"ArrowRight",ArrowLeft:"ArrowLeft",ArrowDown:"ArrowDown",ArrowUp:"ArrowUp",Tab:"Tab"},bn={F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12"},Dn={...Cn,...hn,...bn},xn=e=>e in Dn,Tn=e=>{if(xn(e.key))return!1;if(typeof e.which=="number"&&e.which>0)return!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.which!==8},Fn=e=>e.key==='"'||e.key==="'";function Sn(e,t){if(!e){let n=new Error(t);throw n.name="Invariant Violation",n.framesToPop=1,n}}var{COUNT:wn}=g,Re=e=>typeof e=="object"&&e!==null,En=["boolean","number","string"],Rn=e=>En.includes(typeof e),Ln=e=>typeof e=="boolean"?"boolean":typeof e=="number"?"number":"string",kn=(e,t)=>{if(Re(t))return{attribute:`${e}+`,attributeValue:"",type:"json"};if(Rn(t))return{attribute:e,attributeValue:t,type:Ln(t)};throw Error(`unsupported type ${typeof t} in JSON`)},Z={name:"json",renderer:{name:"json"}},Vn=e=>{let t=[];t.push({name:"col 1",type:Z},{name:"col 2",type:Z});let n=[];return Le(n,e,t),[t,n]},Le=(e,t,n,r={value:0},o="$root",s=0)=>{let i=0,u=0;s===n.length-1&&n.push({name:`col ${n.length+1}`,hidden:!0,type:Z});let a=Object.entries(t);for(let l=0;l<a.length;l++,r.value+=1){let[f,C]=a[l],{attribute:b,attributeValue:P,type:Ve}=kn(f,C),Ae=Ve!=="json",Ke=Array(s).fill(""),te=`${o}|${f}`,ne=[r.value,r.value,Ae,!1,s,0,te,0,...Ke,b,P];if(e.push(ne),u+=1,Re(C)){let[re,oe]=Le(e,C,n,{value:r.value+1},te,s+1);ne[wn]=re,i+=re,u+=oe,r.value+=oe}else i+=1}return[i,u]};var An="ArrowUp",Kn="ArrowDown",Pn="ArrowLeft",Mn="ArrowRight",vn="Enter",On="Escape",_n="Home",Gn="End",In="PageUp",$n="PageDown",Nn=" ",Hn="Tab";var ee=class{constructor(t){this.keys=new Map,this.free=[],this.nextKeyValue=0,this.reset(t)}next(){return this.free.length>0?this.free.pop():this.nextKeyValue++}reset({from:t,to:n}){this.keys.forEach((o,s)=>{(s<t||s>=n)&&(this.free.push(o),this.keys.delete(s))});let r=n-t;this.keys.size+this.free.length>r&&(this.free.length=Math.max(0,r-this.keys.size));for(let o=t;o<n;o++)if(!this.keys.has(o)){let s=this.next();this.keys.set(o,s)}this.nextKeyValue>this.keys.size&&(this.nextKeyValue=this.keys.size)}keyFor(t){let n=this.keys.get(t);if(n===void 0)throw console.log(`key not found
|
|
1
|
+
"use strict";var M=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var ve=Object.prototype.hasOwnProperty;var _e=(e,t)=>{for(var n in t)M(e,n,{get:t[n],enumerable:!0})},Ge=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Oe(t))!ve.call(e,o)&&o!==n&&M(e,o,{get:()=>t[o],enumerable:!(r=Me(t,o))||r.enumerable});return e};var Ie=e=>Ge(M({},"__esModule",{value:!0}),e);var $e=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var m=(e,t,n)=>($e(e,t,"read from private field"),n?n.call(e):t.get(e)),se=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var Rr={};_e(Rr,{AggregationType:()=>Ze,ArrowDown:()=>_n,ArrowLeft:()=>Gn,ArrowRight:()=>In,ArrowUp:()=>vn,DOWN1:()=>R,DOWN2:()=>E,DataWindow:()=>H,End:()=>Un,Enter:()=>$n,Escape:()=>Nn,EventEmitter:()=>Y,Home:()=>Hn,KeySet:()=>ee,MEASURES:()=>Yt,PageDown:()=>Wn,PageUp:()=>jn,RangeMonitor:()=>z,RowSelected:()=>d,Space:()=>Jn,Tab:()=>Xn,UP1:()=>F,UP2:()=>w,WindowRange:()=>y,actualRowPositioning:()=>Qn,addGroupColumn:()=>bn,addSortColumn:()=>Tr,applyFilterToColumns:()=>Ft,applyGroupByToColumns:()=>Tt,applySort:()=>Dr,applySortToColumns:()=>St,buildColumnMap:()=>ft,createEl:()=>ln,dateFormatter:()=>Re,debounce:()=>qn,defaultValueFormatter:()=>Q,deselectItem:()=>rr,expandSelection:()=>Cr,extractFilterForColumn:()=>I,extractGroupColumn:()=>me,filterAsQuery:()=>T,findColumn:()=>ye,flattenColumnGroup:()=>S,focusFirstFocusableElement:()=>an,formatDate:()=>J,fromServerDataType:()=>nt,getCellConfigPanelRenderer:()=>jt,getCellRenderer:()=>Ut,getColumnName:()=>Lt,getColumnStyle:()=>bt,getColumnsInViewport:()=>Kt,getCookieValue:()=>$,getFocusableElement:()=>Te,getFullRange:()=>Wt,getGroupValueAndOffset:()=>_t,getLoggingConfigForWorker:()=>on,getMovingValueDirection:()=>Qt,getRegisteredCellRenderers:()=>Ht,getRowRecord:()=>At,getSelectionStatus:()=>dr,getTableHeadings:()=>ht,getUniqueId:()=>hn,getUrlParameter:()=>Fr,getValueFormatter:()=>Cn,hasHeadings:()=>fe,hasUrlParameter:()=>wr,invariant:()=>En,isAndFilter:()=>ze,isCharacterKey:()=>wn,isColumnTypeRenderer:()=>ct,isDataLoading:()=>Pt,isDateColumn:()=>pe,isDatePattern:()=>U,isDateTimeColumn:()=>_,isDateTimePattern:()=>W,isFilterClause:()=>O,isFilteredColumn:()=>wt,isGroupColumn:()=>ge,isGroupMenuItemDescriptor:()=>zn,isInFilter:()=>Xe,isJsonAttribute:()=>de,isJsonColumn:()=>yt,isJsonGroup:()=>dt,isKeyedColumn:()=>tt,isMappedValueTypeRenderer:()=>G,isMultiClauseFilter:()=>D,isMultiValueFilter:()=>v,isNamedFilter:()=>Je,isNumericColumn:()=>rt,isOrFilter:()=>Ye,isPinned:()=>st,isQuoteKey:()=>Rn,isResizing:()=>it,isRowSelected:()=>tr,isSelected:()=>yr,isSimpleColumnType:()=>at,isSingleValueFilter:()=>ue,isTextColumn:()=>ut,isTimeColumn:()=>ce,isTimePattern:()=>j,isTypeDescriptor:()=>h,isValidFilterClauseOp:()=>We,isValidNumber:()=>qt,itemToString:()=>kn,itemsChanged:()=>He,itemsOrOrderChanged:()=>Ue,jsonToDataSourceRows:()=>On,lastWord:()=>Sr,logger:()=>X,mapSortCriteria:()=>et,metadataKeys:()=>g,moveItem:()=>je,notHidden:()=>ot,numericFormatter:()=>Ee,partition:()=>Ne,projectUpdates:()=>mt,rangeNewItems:()=>Xt,registerComponent:()=>Nt,removeColumnFromFilter:()=>Be,resetRange:()=>Jt,roundDecimal:()=>B,selectItem:()=>ir,setAggregations:()=>Dt,setSortColumn:()=>xr,shallowEquals:()=>Bt,sortPinnedColumns:()=>Ct,stripFilterFromColumns:()=>Rt,throttle:()=>Bn,toColumnDescriptor:()=>lt,toDataSourceColumns:()=>Vt,updateColumn:()=>kt,uuid:()=>Yn,virtualRowPositioning:()=>Zn,visibleColumnAtIndex:()=>Mt,withinRange:()=>be});module.exports=Ie(Rr);function Ne(e,t,n=[],r=[]){for(let o=0,s=e.length;o<s;o++)(t(e[o],o)?n:r).push(e[o]);return[n,r]}function He(e,t,n){return e.length!==t.length?!0:n===void 0?!e.every(r=>t.includes(r)):e.some(r=>t.findIndex(o=>o[n]===r[n])===-1)}function Ue(e,t,n){return e.length!==t.length?!0:n===void 0?e.some((r,o)=>t[o]!==r):e.some((r,o)=>t[o][n]!==r[n])}var je=(e,t,n)=>{let r=e.indexOf(t);if(r===n)return e;let o=e.slice();if(r===-1)throw Error("moveItem, item to be moved not found");if(o.splice(r,1),n===-1)o.push(t);else{let s=(n>r,0);o.splice(n+s,0,t)}return o};var ie=new Set(["=","!=",">",">=","<","<=","starts","ends"]),We=e=>e==="in"||ie.has(e),Je=e=>e!==void 0&&e.name!==void 0,ue=e=>e!==void 0&&ie.has(e.op),O=e=>e!==void 0&&(ue(e)||v(e)),v=e=>e!==void 0&&e.op==="in",Xe=e=>e.op==="in",ze=e=>e.op==="and",Ye=e=>e.op==="or";function D(e){return e!==void 0&&(e.op==="and"||e.op==="or")}var qe=e=>typeof e=="string"?`"${e}"`:e,T=e=>D(e)?e.filters.map(t=>T(t)).join(` ${e.op} `):v(e)?`${e.column} ${e.op} [${e.values.join(",")}]`:`${e.column} ${e.op} ${qe(e.value)}`,Be=(e,t)=>{if(D(t)){let[n,r]=t.filters;if(n.column===e.name)return[r,T(r)];if(r.column===e.name)return[n,T(n)]}return[void 0,""]};var Qe="asc",le=[],Ze={Average:2,Count:3,Distinct:6,Sum:1,High:4,Low:5};function et(e,t,n=0){return e.map(r=>{if(typeof r=="string")return[t[r]+n,"asc"];if(Array.isArray(r)){let[o,s]=r;return[t[o]+n,s||Qe]}else throw Error("columnUtils.mapSortCriteria invalid input")})}var tt=e=>typeof e.key=="number",nt=e=>{switch(e){case"double":case"int":case"long":return"number";case"boolean":return"boolean";default:return"string"}},rt=({serverDataType:e,type:t})=>e==="int"||e==="long"||e==="double"?!0:typeof t=="string"?t==="number":typeof(t==null?void 0:t.name)=="string"?(t==null?void 0:t.name)==="number":!1,pe=({type:e})=>(h(e)?e.name:e)==="date",ce=({type:e})=>(h(e)?e.name:e)==="time",_=e=>pe(e)||ce(e),ot=e=>e.hidden!==!0,st=e=>typeof e.pin=="string",fe=e=>Array.isArray(e.heading)&&e.heading.length>0,it=e=>e.resizing,ut=({serverDataType:e})=>e===void 0?!1:e==="char"||e==="string",lt=e=>({name:e}),at=e=>typeof e=="string"&&["string","number","boolean","json","date","time","checkbox"].includes(e),h=e=>typeof e<"u"&&typeof e!="string",pt={},ct=e=>typeof(e==null?void 0:e.name)<"u",G=e=>e!==void 0&&typeof(e==null?void 0:e.map)<"u";function ft(e){let t=g.count;return e?e.reduce((n,r,o)=>(typeof r=="string"?n[r]=t+o:typeof r.key=="number"?n[r.name]=r.key:n[r.name]=t+o,n),{}):pt}function mt(e){let t=[],n=g.count-2;for(let r=0;r<e.length;r+=3)t[r]=e[r]+n,t[r+1]=e[r+1],t[r+2]=e[r+2];return t}var g={IDX:0,RENDER_IDX:1,IS_LEAF:2,IS_EXPANDED:3,DEPTH:4,COUNT:5,KEY:6,SELECTED:7,count:8,PARENT_IDX:"parent_idx",IDX_POINTER:"idx_pointer",FILTER_COUNT:"filter_count",NEXT_FILTER_IDX:"next_filter_idx"},gt=(e,t)=>{let{originalIdx:n}=t;if(typeof n=="number")for(let r=0;r<e.length;r++){let{originalIdx:o=-1}=e[r];if(o>n)return e.splice(r,0,t),e}return e.push(t),e},S=e=>{var t;if((t=e[0])!=null&&t.isGroup){let[n,...r]=e;return n.columns.forEach(o=>{gt(r,o)}),r}else return e};function me(e,t,n=!0){if(t&&t.length>0){let r=S(e),[o,s]=r.reduce((l,f,C)=>{let[b,K]=l;return t.includes(f.name)?b.push({...f,originalIdx:C}):K.push(f),l},[[],[]]);if(o.length!==t.length)throw Error(`extractGroupColumn: no column definition found for all groupBy cols ${JSON.stringify(t)} `);let i=t.length,u=t.map((l,f)=>({...o.find(b=>b.name===l),groupLevel:i-f}));return[{key:-1,name:"group-col",heading:["group-col"],isGroup:!0,columns:u,groupConfirmed:n,width:u.map(l=>l.width).reduce((l,f)=>l+f)+100},s]}return[null,S(e)]}var ge=e=>e.isGroup===!0,de=e=>typeof e=="string"&&e.endsWith("+"),dt=(e,t)=>{var n;return((n=e.type)==null?void 0:n.name)==="json"&&de(t[e.key])},yt=e=>{var t;return((t=e.type)==null?void 0:t.name)==="json"},Ct=e=>{let t=[],n=[],r=[],o=4;for(let i of e)switch(i.pin){case"left":t.push({...i,endPin:void 0,pinnedOffset:o}),o+=i.width;break;case"right":n.unshift(i);break;default:r.push(i)}t.length&&t.push({...t.pop(),endPin:!0});let s=t.length?t.concat(r):r;if(n.length){let i=[],u=0;for(let a of n)i.unshift({...a,pinnedOffset:u}),u+=a.width;return i[0].endPin=!0,s.concat(i)}else return s},ht=e=>{if(e.some(fe)){let t=e.reduce((s,{heading:i})=>{var u;return Math.max(s,(u=i==null?void 0:i.length)!=null?u:0)},0),n,r=[],o;for(let s=0;s<t;s++)o=[],e.forEach(({heading:i=le,width:u})=>{var l;let a=(l=i[s])!=null?l:"";n&&n.label===a?n.width+=u:(n={label:a,width:u},o.push(n))}),r.push(o);return console.log({maxHeadingDepth:t,tableHeadings:r}),r}return le},bt=({pin:e,pinnedOffset:t=e==="left"?0:4,width:n})=>e==="left"?{left:t,width:n,"--pin-width":`${t+n-5}px`}:e==="right"?{right:t,width:n,"--pin-width":`${t+n}px`}:{width:n},Dt=(e,t,n)=>e.filter(r=>r.column!==t.name).concat({column:t.name,aggType:n}),I=(e,t)=>{if(D(e))return xt(e,t);if(O(e))return e.column===t?e:void 0},xt=(e,t)=>{let{filters:n,op:r}=e,o=[];if(n.forEach(s=>{let i=I(s,t);i&&o.push(i)}),o.length!==0)return o.length===1?o[0]:{op:r,filters:o}},Tt=(e,t,n=!0)=>{var r;if(t.length){let[o,s]=me(e,t,n);if(o)return[o].concat(s)}else if((r=e[0])!=null&&r.isGroup)return S(e);return e},St=(e,t)=>e.map(n=>{let r=Et(n,t);return r!==void 0?{...n,sorted:r}:n.sorted?{...n,sorted:void 0}:n}),Ft=(e,{filterStruct:t})=>e.map(n=>{let r=I(t,n.name);return r!==void 0?{...n,filter:r}:n.filter?{...n,filter:void 0}:n}),wt=e=>e.filter!==void 0,Rt=e=>e.map(t=>{let{filter:n,...r}=t;return n?r:t}),Et=(e,{sortDefs:t})=>{let n=t.find(r=>r.column===e.name);if(n)return t.length>1?(t.indexOf(n)+1)*(n.sortType==="A"?1:-1):n.sortType},Lt=e=>{let t=e.indexOf(":");return t===-1?e:e.slice(0,t)},ye=(e,t)=>{let n=e.find(r=>r.name===t);if(n)return n;{let r=e.find(o=>o.isGroup);if(r)return ye(r.columns,t)}};function kt(e,t,n){let r=typeof t=="string"?e.find(o=>o.name===t):t;if(r){let o=n?{...r,...n}:r;return e.map(s=>s.name===o.name?o:s)}else throw Error("column-utils.replaceColun, column not found")}var Vt=e=>e.expression?`${e.name}:${e.serverDataType}:${e.expression}`:e.name,At=(e,t)=>Object.entries(t).reduce((n,[r,o])=>(n[r]=e[o],n),{}),Pt=e=>ge(e[0])&&e[0].groupConfirmed===!1,Kt=(e,t,n)=>{var s;let r=[],o=0;for(let i=0,u=0;u<e.length;u++){let a=e[u];if(!a.hidden){if(i+a.width<t)a.pin==="left"||i+a.width+((s=e[u+1])==null?void 0:s.width)>t?r.push(a):o+=a.width;else if(i>n){r.push(a);break}else r.push(a);i+=a.width}}return[r,o]},ae=e=>e.hidden!==!0,Mt=(e,t)=>e.every(ae)?e[t]:e.filter(ae).at(t),{DEPTH:Ot,IS_LEAF:vt}=g,_t=(e,t)=>{let{[Ot]:n,[vt]:r}=t;if(r||n>e.length)return[null,n===null?0:Math.max(0,n-1)];if(n===0)return["$root",0];{let{key:o,valueFormatter:s}=e[n-1];return[s(t[o]),n-1]}};var $=e=>{var t,n;if(((t=globalThis.document)==null?void 0:t.cookie)!==void 0)return(n=globalThis.document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]};var N=new Map,Ce=new Map,he=new Map,Gt=(e,t)=>e===void 0?!0:Array.isArray(e)?e.includes(t):e===t,It=(e,t)=>e==="cell-renderer",$t=(e,t)=>e==="cell-config-panel";function Nt(e,t,n="cell-renderer",r){It(n,t)?N.set(e,t):$t(n,t)&&Ce.set(e,t),r&&he.set(e,r)}var Ht=e=>{let n=Array.from(N.keys()).map(r=>({name:r,...he.get(r)}));return e?n.filter(r=>Gt(r.serverDataType,e)):n};function Ut(e){if(e&&"name"in e)return N.get(e.name)}function jt(e){return Ce.get(e)}function Wt({from:e,to:t},n=0,r=Number.MAX_SAFE_INTEGER){if(n===0)return r<e?{from:0,to:0}:{from:e,to:Math.min(t,r)};if(e===0)return{from:e,to:Math.min(t+n,r)};{let o=t-e,s=Math.round(n/2),i=e-s<0,u=r-(t+s)<0;return i&&u?{from:0,to:r}:i?{from:0,to:o+n}:u?{from:Math.max(0,r-(o+n)),to:r}:{from:e-s,to:t+s}}}function Jt({from:e,to:t,bufferSize:n=0}){return{from:0,to:t-e,bufferSize:n,reset:!0}}var be=(e,{from:t,to:n})=>e>=t&&e<n,Xt=({from:e,to:t},n)=>{let{from:r,to:o}=n,s=r>=t||o<=e,i=r<e&&o>t;return s||i?n:o>t?{from:t,to:o}:{from:r,to:e}},y=class{constructor(t,n){this.from=t,this.to=n}isWithin(t){return be(t,this)}overlap(t,n){return t>=this.to||n<this.from?[0,0]:[Math.max(t,this.from),Math.min(n,this.to)]}copy(){return new y(this.from,this.to)}};var{KEY:zt}=g,H=class{constructor({from:t,to:n}){this.rowCount=0;this.setRowCount=t=>{t<this.data.length&&(this.data.length=t),this.rowCount=t};this.range=new y(t,n),this.data=new Array(n-t)}add(t){let[n]=t;if(this.isWithinRange(n)){let r=n-this.range.from,o=this.data[r]!==void 0;return this.data[r]=t,o}else return!1}getAtIndex(t){return this.range.isWithin(t)&&this.data[t-this.range.from]!=null?this.data[t-this.range.from]:void 0}getByKey(t){return this.data.find(n=>n[zt]===t)}isWithinRange(t){return this.range.isWithin(t)&&t<=this.rowCount}setRange(t,n){if(t!==this.range.from||n!==this.range.to){let[r,o]=this.range.overlap(t,n),s=new Array(n-t);for(let i=r;i<o;i++){let u=this.getAtIndex(i);if(u){let a=i-t;s[a]=u}}this.data=s,this.range.from=t,this.range.to=n}}hasData(t,n){let r=this.range.from,o=t-r,s=Math.min(n-r-1,this.rowCount-1);return this.data[o]!==void 0&&this.data[s]!==void 0}getData(t,n){var u;let{from:r,to:o}=this.range,s=Math.max(0,t-r),i=Math.min(n-r,(u=this.rowCount)!=null?u:n);return this.data.slice(s,i)}};var Yt={horizontal:{positionProp:"left",sizeProp:"width"},vertical:{positionProp:"top",sizeProp:"height"}};var F="up1",w="up2",R="down1",E="down2",qt=e=>typeof e=="number"&&isFinite(e),De={},Bt=(e=De,t=De)=>{let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>e[o]===t[o])};function Qt(e,t,n,r){if(!isFinite(e)||n===void 0||t===void 0)return"";{let o=e-n;return o&&typeof r=="number"&&(o=+e.toFixed(r)-+n.toFixed(r)),o?t===""?o<0?R:F:o>0?t===R||t===E||t===w?F:w:t===F||t===w||t===E?R:E:""}}var U=e=>e==="dd.mm.yyyy",j=e=>e==="kk:mm:ss",W=e=>e!==void 0&&U(e)||j(e),x=e=>e<10?"0"+e:e.toString(),J=(e,t="dd.mm.yyyy")=>{if(U(t)){let n=e.getDate(),r=e.getMonth(),o=e.getFullYear();return`${x(n)}.${x(r+1)}.${o}`}else if(j(t)){let n=e.getHours(),r=e.getMinutes(),o=e.getSeconds();return`${x(n)}:${x(r)}:${x(o)}`}else return e.toUTCString()};var Zt=["error","warn","info","debug"],en=e=>typeof e=="string"&&Zt.includes(e),tn="error",L=()=>{},nn="error",{loggingLevel:k=nn}=rn(),X=e=>{let t=k==="debug",n=t||k==="info",r=n||k==="warn",o=r||k==="error",s=n?l=>console.info(`[${e}] ${l}`):L,i=r?l=>console.warn(`[${e}] ${l}`):L,u=t?l=>console.debug(`[${e}] ${l}`):L;return{errorEnabled:o,error:o?l=>console.error(`[${e}] ${l}`):L}};function rn(){return typeof loggingSettings<"u"?loggingSettings:{loggingLevel:xe()}}function xe(){let e=$("vuu-logging-level");return en(e)?e:tn}var on=()=>`const loggingSettings = { loggingLevel: "${xe()}"};`;var{debug:sn,debugEnabled:un}=X("range-monitor"),z=class{constructor(t){this.source=t;this.range={from:0,to:0};this.timestamp=0}isSet(){return this.timestamp!==0}set({from:t,to:n}){let{timestamp:r}=this;if(this.range.from=t,this.range.to=n,this.timestamp=performance.now(),r)un&&sn(`<${this.source}> [${t}-${n}], ${(this.timestamp-r).toFixed(0)} ms elapsed`);else return 0}};var ln=(e,t,n)=>{let r=document.createElement(e);return t&&(r.className=t),n&&(r.textContent=n),r},Te=(e,t)=>{if(e){if(e.hasAttribute("tabindex")){let r=parseInt(e.getAttribute("tabindex"));if(!isNaN(r)&&(t===void 0||r===t))return e}let n=typeof t=="number"?e.querySelector(`[tabindex="${t}"]`):e.querySelector("[tabindex]");if(n)return n}},an=(e,t)=>{requestAnimationFrame(()=>{let n=Te(e,t);n&&n.focus()})};function Se(e){return Array.isArray(e)}function pn(e){return!Array.isArray(e)}var c,Y=class{constructor(){se(this,c,new Map)}addListener(t,n){let r=m(this,c).get(t);r?Se(r)?r.push(n):pn(r)&&m(this,c).set(t,[r,n]):m(this,c).set(t,n)}removeListener(t,n){if(!m(this,c).has(t))return;let r=m(this,c).get(t),o=-1;if(r===n)m(this,c).delete(t);else if(Array.isArray(r)){for(let s=length;s-- >0;)if(r[s]===n){o=s;break}if(o<0)return;r.length===1?(r.length=0,m(this,c).delete(t)):r.splice(o,1)}}removeAllListeners(t){t&&m(this,c).has(t)?m(this,c).delete(t):t===void 0&&m(this,c).clear()}emit(t,...n){if(m(this,c)){let r=m(this,c).get(t);r&&this.invokeHandler(r,n)}}once(t,n){let r=(...o)=>{this.removeListener(t,r),n(...o)};this.on(t,r)}on(t,n){this.addListener(t,n)}invokeHandler(t,n){if(Se(t))t.slice().forEach(r=>this.invokeHandler(r,n));else switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;default:t.call(null,...n)}}};c=new WeakMap;var V=String.fromCharCode(8200),p=String.fromCharCode(8199),cn=-1,Fe={DIGIT:p,TWO_DIGITS:p+p,THREE_DIGITS:p+p+p,FULL_PADDING:[null,V+p,V+p+p,V+p+p+p,V+p+p+p+p]},fn={DIGIT:"0",TWO_DIGITS:"00",THREE_DIGITS:"000",FULL_PADDING:[null,"0","00","000","0000"]};function mn(e,t=6){return(gn+e).slice(-t)}var gn=p+p+p+p+p+p+p+p+p,q={Right:"right",Center:"center",Left:"left"};function we(e,t,n){let r=e.length,o=t-r;if(o>0)o===1?e=e+n.DIGIT:o===2?e=e+n.TWO_DIGITS:o===3&&(e=e+n.THREE_DIGITS);else if(o<0&&(e=e.slice(0,t),r=t),n===Fe&&e.charAt(r-1)==="0")return e=e.replace(/0+$/,""),we(e,t,n);return e}function B(e,t=q.Right,n=4,r,o){if(e===void 0||typeof e!="number"||isNaN(e))return"";let s,i,u,[a,l=""]=e.toString().split("."),f=l.length;return s=parseFloat(a).toLocaleString(),t===q.Left&&o&&(s=mn(s)),n===cn||f===n?i=l:f>n?i=parseFloat("0."+l).toFixed(n).slice(2):(u=r?fn:o&&t!==q.Left?Fe:null)?f===0?i=u.FULL_PADDING[n]:i=we(l,n,u):i=l,s+(i?"."+i:"")}var dn={},Q=e=>e==null?"":typeof e=="string"?e:e.toString(),Re=e=>{let{type:t}=e,n="dd.mm.yyyy";return h(t)&&t.formatting&&W(t.formatting.pattern)&&(n=t.formatting.pattern),r=>typeof r=="number"&&r!==0?J(new Date(r),n):""},Ee=({align:e="right",type:t})=>{var n;if(t===void 0||typeof t=="string")return Q;{let{alignOnDecimals:r=!1,decimals:o,zeroPad:s=!1}=(n=t.formatting)!=null?n:dn;return i=>{if(typeof i=="string"&&(i.startsWith("\u03A3")||i.startsWith("[")))return i;let u=typeof i=="number"?i:typeof i=="string"?parseFloat(i):void 0;return B(u,e,o,s,r)}}},yn=e=>t=>{var n;return(n=e[t])!=null?n:""},Cn=e=>{if(_(e))return Re(e);let{serverDataType:t,type:n}=e;return h(n)&&G(n==null?void 0:n.renderer)?yn(n.renderer.map):t==="string"||t==="char"?r=>r:t==="double"?Ee(e):Q};var hn=()=>`hw-${Math.round(Math.random()*1e5)}`;function bn(e,t){return e?e.concat(t.name):[t.name]}var Dn={Enter:"Enter",Delete:"Delete"},xn={Home:"Home",End:"End",ArrowRight:"ArrowRight",ArrowLeft:"ArrowLeft",ArrowDown:"ArrowDown",ArrowUp:"ArrowUp",Tab:"Tab"},Tn={F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12"},Sn={...Dn,...xn,...Tn},Fn=e=>e in Sn,wn=e=>{if(Fn(e.key))return!1;if(typeof e.which=="number"&&e.which>0)return!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.which!==8},Rn=e=>e.key==='"'||e.key==="'";function En(e,t){if(!e){let n=new Error(t);throw n.name="Invariant Violation",n.framesToPop=1,n}}var Ln=e=>Object.prototype.toString.call(e)==="[object Object]";function kn(e){return typeof e=="string"?e:Ln(e)?Object.prototype.hasOwnProperty.call(e,"label")?String(e.label):(console.warn(["itemToString: you've likely forgotten to set the label prop on the item object.","You can also provide your own `itemToString` implementation."].join(`
|
|
2
|
+
`)),""):String(e)}var{COUNT:Vn}=g,Le=e=>typeof e=="object"&&e!==null,An=["boolean","number","string"],Pn=e=>An.includes(typeof e),Kn=e=>typeof e=="boolean"?"boolean":typeof e=="number"?"number":"string",Mn=(e,t)=>{if(Le(t))return{attribute:`${e}+`,attributeValue:"",type:"json"};if(Pn(t))return{attribute:e,attributeValue:t,type:Kn(t)};throw Error(`unsupported type ${typeof t} in JSON`)},Z={name:"json",renderer:{name:"json"}},On=e=>{let t=[];t.push({name:"col 1",type:Z},{name:"col 2",type:Z});let n=[];return ke(n,e,t),[t,n]},ke=(e,t,n,r={value:0},o="$root",s=0)=>{let i=0,u=0;s===n.length-1&&n.push({name:`col ${n.length+1}`,hidden:!0,type:Z});let a=Object.entries(t);for(let l=0;l<a.length;l++,r.value+=1){let[f,C]=a[l],{attribute:b,attributeValue:K,type:Ae}=Mn(f,C),Pe=Ae!=="json",Ke=Array(s).fill(""),te=`${o}|${f}`,ne=[r.value,r.value,Pe,!1,s,0,te,0,...Ke,b,K];if(e.push(ne),u+=1,Le(C)){let[re,oe]=ke(e,C,n,{value:r.value+1},te,s+1);ne[Vn]=re,i+=re,u+=oe,r.value+=oe}else i+=1}return[i,u]};var vn="ArrowUp",_n="ArrowDown",Gn="ArrowLeft",In="ArrowRight",$n="Enter",Nn="Escape",Hn="Home",Un="End",jn="PageUp",Wn="PageDown",Jn=" ",Xn="Tab";var ee=class{constructor(t){this.keys=new Map,this.free=[],this.nextKeyValue=0,this.reset(t)}next(){return this.free.length>0?this.free.pop():this.nextKeyValue++}reset({from:t,to:n}){this.keys.forEach((o,s)=>{(s<t||s>=n)&&(this.free.push(o),this.keys.delete(s))});let r=n-t;this.keys.size+this.free.length>r&&(this.free.length=Math.max(0,r-this.keys.size));for(let o=t;o<n;o++)if(!this.keys.has(o)){let s=this.next();this.keys.set(o,s)}this.nextKeyValue>this.keys.size&&(this.nextKeyValue=this.keys.size)}keyFor(t){let n=this.keys.get(t);if(n===void 0)throw console.log(`key not found
|
|
2
3
|
keys: ${this.toDebugString()}
|
|
3
4
|
free : ${this.free.join(",")}
|
|
4
|
-
`),Error(`KeySet, no key found for rowIndex ${t}`);return n}toDebugString(){return Array.from(this.keys.entries()).map((t,n)=>`${t}=>${n}`).join(",")}};var
|
|
5
|
+
`),Error(`KeySet, no key found for rowIndex ${t}`);return n}toDebugString(){return Array.from(this.keys.entries()).map((t,n)=>`${t}=>${n}`).join(",")}};var zn=e=>e!==void 0&&"children"in e;var Yn=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};function qn(e,t){let n;return(...r)=>{clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Bn(e,t){let n=!1,r;function o(){r==null?n=!1:(e(...r),r=void 0,setTimeout(o,t))}return(...s)=>{n?r=s:(e(...s),n=!0,setTimeout(o,t))}}var{IDX:Ve}=g,Qn=e=>[t=>t[Ve]*e,t=>Math.floor(t/e)],Zn=(e,t,n)=>[r=>{let o=n.current*t;return r[Ve]*e-o},r=>{let o=n.current*t;return Math.floor((r+o)/e)}];var A=[],{SELECTED:er}=g,d={False:0,True:1,First:2,Last:4},tr=e=>(e[er]&d.True)===d.True,nr=(e,t)=>{let n=typeof e=="number"?e:e[0],r=typeof t=="number"?t:t[0];return n-r},rr=(e,t,n,r,o=!1)=>e==="single"||(e==="extended"||e==="checkbox")&&!o&&!r||!r&&!o?A:!r&&o?ur(t,n):A,or=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];if(typeof r=="number"){if(r===t-1)return!0;if(r>t)return!1}else{if(r[0]===t+1||r[1]===t-1)return!0;if(r[0]>t)return!1}}return!1},sr=(e,t)=>{for(let n=0;n<e.length;n++){let r=e[n];if(typeof r=="number"){if(r===t-1){let o=e[n+1];if(o===t+1){let s=[r,o];return e.slice(0,n).concat([s]).concat(e.slice(n+2))}else{let s=[r,t];return e.slice(0,n).concat([s]).concat(e.slice(n+1))}}else if(r>t)break}else if(r[0]===t+1){let o=[t,r[1]];return e.slice(0,n).concat([o]).concat(e.slice(n+1))}else if(r[1]===t-1){let o=e[n+1];if(Array.isArray(o)&&o[0]===t+1){let s=[r[0],o[1]];return e.slice(0,n).concat([s]).concat(e.slice(n+2))}else if(typeof o=="number"&&o===t+1){let s=[r[0],o];return e.slice(0,n).concat([s]).concat(e.slice(n+2))}else{let s=[r[0],t];return e.slice(0,n).concat([s]).concat(e.slice(n+1))}}}return e},ir=(e,t,n,r,o=!1,s=-1)=>{let i=e==="single",u=e==="extended"||e==="checkbox",a=i||u&&!o&&!r;if(e==="none")return A;if(a)return[n];if(r){if(t.length===0)return[n];{let l=n>s?[s,n]:[n,s];return lr(t,l)}}else if(!r)return or(t,n)?sr(t,n):t==null?void 0:t.concat(n).sort(nr);return A};function ur(e,t){if(e.includes(t))return e.filter(n=>n!==t);{let n=[];for(let r of e)Array.isArray(r)&&P(r,t)?n.push(...hr(r,t)):n.push(r);return n}}function lr(e,t){let[n,r]=t;return e.reduce((o,s)=>(typeof s=="number"?s<n||s>r?o.push(s):cr(o.at(-1),s)||o.push(t):ar(s,t)?o.push(pr(s,t)):(t[1]<s[0]&&o.push(t),o.push(s)),o),[])}var ar=(e,t)=>e[1]>=t[0]&&e[1]<=t[1]||e[0]>=t[0]&&e[0]<=t[1],pr=(e,t)=>[Math.min(e[0],t[0]),Math.max(e[1],t[1])],cr=(e,t)=>typeof e>"u"||typeof e=="number"?!1:P(e,t),P=(e,t)=>t>=e[0]&&t<=e[1],fr=d.True+d.First+d.Last,mr=d.True+d.First,gr=d.True+d.Last,dr=(e,t)=>{for(let n of e)if(typeof n=="number"){if(n===t)return fr}else if(P(n,t))return t===n[0]?mr:t===n[1]?gr:d.True;return d.False},yr=(e,t)=>{for(let n of e)if(typeof n=="number"){if(n===t)return!0;if(n>t)return!1}else{if(P(n,t))return!0;if(n[0]>t)return!1}return!1},Cr=e=>{if(e.every(n=>typeof n=="number"))return e;let t=[];for(let n of e)if(typeof n=="number")t.push(n);else for(let r=n[0];r<=n[1];r++)t.push(r);return t};function hr([e,t],n){return n===e?[[e+1,t]]:n===t?[[e,t-1]]:t-e===2?[e,t]:n===t-1?[[e,t-2],t]:[[e,n-1],[n+1,t]]}var br=e=>e==="A"?"D":"A",Dr=({sortDefs:e},{name:t},n=!1,r)=>{if(n)return{sortDefs:e.concat({column:t,sortType:r!=null?r:"A"})};let o=typeof r=="string"?r:e.length===1&&e[0].column===t?br(e[0].sortType):"A";return{sortDefs:[{column:t,sortType:o}]}},xr=({sortDefs:e},t,n)=>{if(n===void 0){let r=e.find(o=>o.column===t.name);if(r)return{sortDefs:[{column:t.name,sortType:r.sortType==="A"?"D":"A"}]}}return{sortDefs:[{column:t.name,sortType:n!=null?n:"A"}]}},Tr=({sortDefs:e},t,n="A")=>{let r={column:t.name,sortType:n};return e.length>0?{sortDefs:e.concat(r)}:{sortDefs:[r]}};var Sr=e=>{let t=e.trim(),n=t.lastIndexOf(" ");return n===-1?t:t.slice(n+1)};var Fr=(e,t)=>{var n;return(n=new URL(document.location.href).searchParams.get(e))!=null?n:t},wr=e=>new URL(document.location.href).searchParams.has(e);
|
|
5
6
|
//# sourceMappingURL=index.js.map
|