@bgskinner2/ts-utils 1.0.1 → 1.0.2
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 +105 -14
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -48
- package/dist/index.d.ts +54 -48
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -32,9 +32,9 @@ It’s **actively maintained and continuously expanded**, so new utilities and i
|
|
|
32
32
|
## Installation
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
|
|
36
|
+
npm i @bgskinner2/ts-utils
|
|
37
|
+
|
|
38
38
|
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -125,10 +125,49 @@ Type guards are the backbone of this library. They allow you to safely narrow ty
|
|
|
125
125
|
|
|
126
126
|
The "Pure JS" foundation. These have zero dependencies and work in any environment (Node, Deno, Bun, Browser).
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
| Function | Description |
|
|
129
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
130
|
+
| `isObject` | Checks if a value is a non-null object (excluding arrays). |
|
|
131
|
+
| `isArray` | Checks if a value is an array. |
|
|
132
|
+
| `isFunction` | Checks if a value is a function. |
|
|
133
|
+
| `isMap` | Checks if a value is a `Map`. |
|
|
134
|
+
| `isSet` | Checks if a value is a `Set`. |
|
|
135
|
+
| `isWeakMap` | Checks if a value is a `WeakMap`. |
|
|
136
|
+
| `isWeakSet` | Checks if a value is a `WeakSet`. |
|
|
137
|
+
| `isNull` | Checks if a value is exactly `null`. |
|
|
138
|
+
| `isNil` | Checks if a value is `null` or `undefined`. |
|
|
139
|
+
| `isInstanceOf` | Checks if a value is an instance of a given constructor. |
|
|
140
|
+
| `isDefined` | Checks if a value is neither `null` nor `undefined`. |
|
|
141
|
+
| `isUndefined` | Checks if a value is `undefined`. |
|
|
142
|
+
| `isNumber` | Checks if a value is a finite number (not `NaN`). |
|
|
143
|
+
| `isInteger` | Checks if a value is an integer. |
|
|
144
|
+
| `isString` | Checks if a value is a string. |
|
|
145
|
+
| `isNonEmptyString` | Checks if a value is a non-empty, non-whitespace string. |
|
|
146
|
+
| `isBoolean` | Checks if a value is a boolean. |
|
|
147
|
+
| `isBigInt` | Checks if a value is a `bigint`. |
|
|
148
|
+
| `isSymbol` | Checks if a value is a `symbol`. |
|
|
149
|
+
| `isPrimitive` | Checks if a value is a primitive (`string`, `number`, `boolean`, or `bigint`). |
|
|
150
|
+
| `isAbsoluteUrl` | Checks if a value is a valid absolute URL using the `URL` constructor. |
|
|
151
|
+
| `isInternalUrl` | Checks if a URL is relative (`/path`) or belongs to the current origin (browser only). |
|
|
152
|
+
| `isInArray` | Factory guard that checks if a value exists in a predefined array (uses a `Set` internally). |
|
|
153
|
+
| `isKeyOfObject` | Factory guard that checks whether a value is a valid key of a given object. |
|
|
154
|
+
| `isKeyInObject` | Factory guard that checks whether an object contains a specific key. |
|
|
155
|
+
| `isKeyOfArray` | Factory guard that checks if a value matches one of the allowed primitive keys in an array. |
|
|
156
|
+
| `isArrayOf` | Checks if a value is an array where every element satisfies a given type guard. |
|
|
157
|
+
| `isRecordOf` | Checks if a value is an object where all values satisfy a given type guard. |
|
|
158
|
+
| `hasDefinedKeys` | Factory guard that verifies an object contains required keys with defined values. |
|
|
159
|
+
| `isBufferLikeObject` | Checks if a value matches the Node.js Buffer JSON structure `{ type: 'Buffer', data: number[] }`. |
|
|
160
|
+
| `isRGBTuple` | Checks if a value is a tuple `[number, number, number]` with values between `0–255`. |
|
|
161
|
+
| `isPhoneNumber` | Checks if a string matches common international phone number patterns. |
|
|
162
|
+
| `isEmail` | Checks if a value is a valid email address string. |
|
|
163
|
+
| `isCamelCase` | Checks if a string follows `camelCase` naming conventions. |
|
|
164
|
+
| `isSnakeCase` | Checks if a string follows `snake_case` naming conventions. |
|
|
165
|
+
| `isKebabCase` | Checks if a string follows `kebab-case` naming conventions. |
|
|
166
|
+
| `isJSONArrayString` | Checks if a string contains valid JSON that parses to an array. |
|
|
167
|
+
| `isJSONObjectString` | Checks if a string contains valid JSON that parses to an object. |
|
|
168
|
+
| `isJsonString` | Checks if a string contains valid JSON (array or object). |
|
|
169
|
+
| `isHexByteString` | Factory guard that checks if a string is a valid hexadecimal byte string (optionally enforcing length). |
|
|
170
|
+
| `isHTMLString` | Checks if a string appears to contain HTML markup. |
|
|
132
171
|
|
|
133
172
|
[Full Reference →](docs/type-guards.md)
|
|
134
173
|
|
|
@@ -136,9 +175,25 @@ The "Pure JS" foundation. These have zero dependencies and work in any environme
|
|
|
136
175
|
|
|
137
176
|
Specific utilities for the React ecosystem. These handle the complexities of the Virtual DOM and component lifecycle.
|
|
138
177
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
178
|
+
| Function | Category | Description |
|
|
179
|
+
| ------------------ | --------------- | -------------------------------------------------------------------------------------- |
|
|
180
|
+
| `isRef` | React Primitive | Checks if a value is a valid React `Ref` (callback ref or object ref with `.current`). |
|
|
181
|
+
| `isRefObject` | React Primitive | Checks if a value is a `RefObject` containing a `.current` property. |
|
|
182
|
+
| `isPromise` | React Utility | Checks if a value is a `Promise` or "thenable" object with a `.then()` method. |
|
|
183
|
+
| `isReactPortal` | React Primitive | Checks if a value is a React Portal created via `ReactDOM.createPortal`. |
|
|
184
|
+
| `hasChildren` | React Props | Checks if an object contains a defined `children` property. |
|
|
185
|
+
| `isComponentType` | React Component | Checks if a value is a valid React component (function or class component). |
|
|
186
|
+
| `isForwardRef` | React Component | Checks if a component was created using `React.forwardRef`. |
|
|
187
|
+
| `isValidReactNode` | React Node | Checks if a value is a valid `ReactNode` (anything React can render). |
|
|
188
|
+
| `isReactElement` | React Node | Checks if a value is a valid JSX `ReactElement`. |
|
|
189
|
+
| `isFragment` | React Node | Checks if a React element is a `<React.Fragment>`. |
|
|
190
|
+
| `hasOnClick` | React Props | Checks if a React element has a valid `onClick` handler. |
|
|
191
|
+
| `isElementLike` | React Node | Checks if an object resembles a React element (`type` and `props`). |
|
|
192
|
+
| `isElementOfType` | React Node | Checks if an element-like object matches one of the allowed HTML tag types. |
|
|
193
|
+
| `hasNameMetadata` | React Component | Checks if a component has identifying metadata like `displayName` or `name`. |
|
|
194
|
+
| `isPropValid` | DOM Guard | Checks if a property is a valid React DOM attribute or event handler. |
|
|
195
|
+
| `isDOMPropKey` | DOM Guard | Type guard validating a string as a valid DOM property key. |
|
|
196
|
+
| `isDOMEntry` | DOM Guard | Checks if a `[key, value]` pair represents a valid DOM property entry for an element. |
|
|
142
197
|
|
|
143
198
|
[Full Reference →](docs/type-guards.md)
|
|
144
199
|
|
|
@@ -147,10 +202,46 @@ Specific utilities for the React ecosystem. These handle the complexities of the
|
|
|
147
202
|
**Purpose:**
|
|
148
203
|
Runtime validators built on top of type guards. Use them to assert that values conform to expected types, with optional error messages. Includes **primitive, reference, and composite assertions**, as well as **custom assertion creators**.
|
|
149
204
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
205
|
+
#### Primitive Assertions
|
|
206
|
+
|
|
207
|
+
| Function | Description |
|
|
208
|
+
| ------------------------------- | ------------------------------------ |
|
|
209
|
+
| `assertIsNumber(value)` | Asserts value is a number. |
|
|
210
|
+
| `assertIsInteger(value)` | Asserts value is an integer. |
|
|
211
|
+
| `assertIsString(value)` | Asserts value is a string. |
|
|
212
|
+
| `assertIsNonEmptyString(value)` | Asserts value is a non-empty string. |
|
|
213
|
+
| `assertIsBoolean(value)` | Asserts value is a boolean. |
|
|
214
|
+
| `assertIsBigInt(value)` | Asserts value is a bigint. |
|
|
215
|
+
| `assertIsSymbol(value)` | Asserts value is a symbol. |
|
|
216
|
+
|
|
217
|
+
#### Reference Assertions
|
|
218
|
+
|
|
219
|
+
| Function | Description |
|
|
220
|
+
| -------------------------- | ------------------------------------------- |
|
|
221
|
+
| `assertIsNull(value)` | Asserts value is `null`. |
|
|
222
|
+
| `assertIsUndefined(value)` | Asserts value is `undefined`. |
|
|
223
|
+
| `assertIsDefined(value)` | Asserts value is not `null` or `undefined`. |
|
|
224
|
+
| `assertIsNil(value)` | Asserts value is `null` or `undefined`. |
|
|
225
|
+
| `assertIsFunction(value)` | Asserts value is a function. |
|
|
226
|
+
| `assertObject(value)` | Asserts value is a non-null object. |
|
|
227
|
+
| `assertIsArray(value)` | Asserts value is an array. |
|
|
228
|
+
| `assertIsMap(value)` | Asserts value is a `Map`. |
|
|
229
|
+
| `assertIsSet(value)` | Asserts value is a `Set`. |
|
|
230
|
+
| `assertIsWeakMap(value)` | Asserts value is a `WeakMap`. |
|
|
231
|
+
| `assertIsWeakSet(value)` | Asserts value is a `WeakSet`. |
|
|
232
|
+
|
|
233
|
+
#### Refined / Composite Assertions
|
|
234
|
+
|
|
235
|
+
| Function | Description |
|
|
236
|
+
| --------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
237
|
+
| `assertIsCamelCase(value)` | Asserts string follows `camelCase`. |
|
|
238
|
+
| `assertIsBufferLikeObject(value)` | Asserts value matches Node.js Buffer JSON structure `{ type: 'Buffer', data: number[] }`. |
|
|
239
|
+
| `assertIsJSONArrayString(value)` | Asserts string is valid JSON array. |
|
|
240
|
+
| `assertIsJSONObjectString(value)` | Asserts string is valid JSON object. |
|
|
241
|
+
| `assertIsJsonString(value)` | Asserts string is valid JSON (array or object). |
|
|
242
|
+
| `assertIsAbsoluteUrl(value)` | Asserts string is a valid absolute URL. |
|
|
243
|
+
| `assertIsInternalUrl(value)` | Asserts string is relative or belongs to current origin. |
|
|
244
|
+
| `assertIsRGBTuple(value)` | Asserts value is an RGB tuple `[number, number, number]`. |
|
|
154
245
|
|
|
155
246
|
> ⚠️ **Note:** Importing the full `AssertionUtils` object is **not tree-shakable**. For smaller bundles, prefer individual assertion imports.
|
|
156
247
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var de=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var Zt=Object.getOwnPropertyNames;var Yt=Object.prototype.hasOwnProperty;var Qt=(e,t)=>{for(var r in t)de(e,r,{get:t[r],enumerable:!0})},er=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zt(t))!Yt.call(e,o)&&o!==r&&de(e,o,{get:()=>t[o],enumerable:!(n=Xt(t,o))||n.enumerable});return e};var tr=e=>er(de({},"__esModule",{value:!0}),e);var Hr={};Qt(Hr,{ArrayUtils:()=>h,AssertionUtils:()=>Lr,CollectionTypeGuards:()=>jr,ColorUtils:()=>$r,ComputationUtils:()=>Xe,CoreTypeGuards:()=>g,DebugUtils:()=>v,DomUtils:()=>_r,FormatTypeGuards:()=>Ir,LinkUtils:()=>j,ObjectUtils:()=>y,ProcessorUtils:()=>Fr,ReactProcessorUtils:()=>zr,ReactTypeGuards:()=>Br,RenamedArrayMethods:()=>yt,RenamedObjectMethods:()=>gt,TransformersUtils:()=>Ur,arrayFilter:()=>nr,arrayFilterNonNullable:()=>cr,arrayFlat:()=>ir,arrayFlatMap:()=>ar,arrayForEach:()=>ur,arrayIncludes:()=>or,arrayMap:()=>rr,arrayReduce:()=>sr,assertIsAbsoluteUrl:()=>Vt,assertIsArray:()=>Bt,assertIsBigInt:()=>Et,assertIsBoolean:()=>Ct,assertIsBufferLikeObject:()=>$t,assertIsCamelCase:()=>_t,assertIsDefined:()=>jt,assertIsFunction:()=>Mt,assertIsInteger:()=>wt,assertIsInternalUrl:()=>Wt,assertIsJSONArrayString:()=>Ft,assertIsJSONObjectString:()=>zt,assertIsJsonString:()=>Ht,assertIsMap:()=>Lt,assertIsNil:()=>Gt,assertIsNonEmptyString:()=>Ot,assertIsNull:()=>Nt,assertIsNumber:()=>Rt,assertIsRGBTuple:()=>ue,assertIsSet:()=>Ut,assertIsString:()=>At,assertIsSymbol:()=>Pt,assertIsUndefined:()=>It,assertIsWeakMap:()=>Dt,assertIsWeakSet:()=>vt,assertObject:()=>Kt,capitalizeArray:()=>ce,capitalizeString:()=>ee,capitalizedKeys:()=>He,contrastTextColor:()=>Ye,delay:()=>ut,extractDOMProps:()=>ft,extractRelativePath:()=>ot,fetchJson:()=>at,filterChildrenByDisplayName:()=>Tt,generateKeyMap:()=>Fe,getCallerLocation:()=>Ve,getKeyboardAction:()=>We,getLuminance:()=>re,handleInternalHashScroll:()=>it,hasChildren:()=>Ge,hasDefinedKeys:()=>Pe,hasNameMetadata:()=>De,hasOnClick:()=>Le,hexToHSL:()=>tt,hexToNormalizedRGB:()=>rt,hexToRGB:()=>_,hexToRGBShorthand:()=>Qe,highlight:()=>E,interpolateColor:()=>et,isAbsoluteUrl:()=>P,isArray:()=>A,isArrayOf:()=>I,isBigInt:()=>S,isBoolean:()=>G,isBufferLikeObject:()=>J,isCamelCase:()=>H,isComponentType:()=>Me,isDOMEntry:()=>X,isDOMPropKey:()=>se,isDarkColor:()=>Ze,isDefined:()=>R,isElementLike:()=>ae,isElementOfType:()=>Ue,isEmail:()=>Ie,isForwardRef:()=>Ke,isFragment:()=>Be,isFunction:()=>b,isHTMLString:()=>we,isHexByteString:()=>Ae,isInArray:()=>Oe,isInstanceOf:()=>Se,isInteger:()=>fe,isInternalUrl:()=>N,isJSONArrayString:()=>B,isJSONObjectString:()=>L,isJsonString:()=>V,isKebabCase:()=>Re,isKeyInObject:()=>m,isKeyOfArray:()=>W,isKeyOfObject:()=>Ce,isLumGreaterThan:()=>me,isLumLessThan:()=>pe,isMap:()=>ge,isNil:()=>w,isNonEmptyString:()=>x,isNull:()=>K,isNumber:()=>k,isObject:()=>l,isPhoneNumber:()=>Ne,isPrimitive:()=>z,isPromise:()=>je,isPropValid:()=>oe,isRGBTuple:()=>q,isReactElement:()=>D,isReactPortal:()=>Q,isRecordOf:()=>Ee,isRef:()=>Z,isRefObject:()=>Y,isSet:()=>be,isSnakeCase:()=>ke,isString:()=>p,isSymbol:()=>M,isUndefined:()=>C,isValidReactNode:()=>ie,isWeakMap:()=>xe,isWeakSet:()=>he,lazyProxy:()=>pt,logDev:()=>Jt,mergeCssVars:()=>mt,mergeEventHandlerClicks:()=>dt,mergeRefs:()=>lt,normalizeImageSrc:()=>qe,normalizeUrl:()=>nt,objectEntries:()=>pr,objectFromEntries:()=>mr,objectGet:()=>Tr,objectHas:()=>fr,objectKeys:()=>lr,objectSet:()=>yr,objectValues:()=>dr,preloadImages:()=>Je,retry:()=>ct,serialize:()=>le,stripHash:()=>st,toCamelCase:()=>ve,toKebabCase:()=>_e,toKeyByField:()=>ze,toSnakeCase:()=>$e,validateRGB:()=>$});module.exports=tr(Hr);function ne(e,t){let r={};for(let[n,o]of Object.entries(t)){let s=e[o];typeof s=="function"&&(r[n]=s.bind(e))}return r}var h=class e{static includes(t,r){return t.includes(r)}static createFixedLengthArray(t,r){if(t.length!==r)throw new Error(`Array must have exactly ${r} elements`);return t}static readAllItems(t){return[...t]}static map(t,r){return t.map(r)}static forEachUnion(t,r){(Array.isArray(t[0])?[].concat(...t):t).forEach(r)}static forEach(t,r){t.forEach(r)}static reduce(t,r,n){return t.reduce(r,n)}static flat(t){return t.reduce((r,n)=>r.concat(n),[])}static flatMap(t,r){return t.reduce((n,o,s)=>{let i=r(o,s);return n.concat(i)},[])}static filter(t,r){return t.filter(r)}static filterNonNullable(t){return e.filter(t,r=>r!=null)}},yt=ne(h,{arrayIncludes:"includes",arrayMap:"map",arrayFilter:"filter",arrayFlat:"flat",arrayReduce:"reduce",arrayForEach:"forEach",arrayFlatMap:"flatMap",arrayFilterNonNullable:"filterNonNullable"}),{arrayMap:rr,arrayFilter:nr,arrayIncludes:or,arrayReduce:sr,arrayFlat:ir,arrayFlatMap:ar,arrayForEach:ur,arrayFilterNonNullable:cr}=yt;var y=class{static keys(t){return Object.keys(t)}static entries(t){return t?Object.entries(t):[]}static fromEntries(t){return Object.fromEntries(t)}static values(t){return Object.values(t)}static has(t,r){if(!r)return!1;let n=r.split("."),o=t;for(let s of n){if(o==null||typeof o!="object"||!(s in o))return!1;o=o[s]}return!0}static get(t,r){if(!r)return;let n=r.split("."),o=t;for(let s of n){if(o==null||typeof o!="object"||!(s in o))return;o=o[s]}return o}static set(t,r,n){if(!r)return;let o=r.split("."),s=t;for(let i=0;i<o.length-1;i++){let a=o[i];if(typeof s!="object"||s===null)return;let c=s;(!(a in c)||typeof c[a]!="object"||c[a]===null)&&(c[a]={}),s=c[a]}typeof s=="object"&&s!==null&&(s[o[o.length-1]]=n)}},gt=ne(y,{objectKeys:"keys",objectEntries:"entries",objectFromEntries:"fromEntries",objectValues:"values",objectHas:"has",objectGet:"get",objectSet:"set"}),{objectKeys:lr,objectEntries:pr,objectFromEntries:mr,objectValues:dr,objectHas:fr,objectGet:Tr,objectSet:yr}=gt;var k=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),fe=e=>Number.isInteger(e),p=e=>typeof e=="string",x=e=>typeof e=="string"&&e.length>0&&e.trim().length>0,G=e=>typeof e=="boolean",S=e=>typeof e=="bigint",M=e=>typeof e=="symbol",z=e=>p(e)||k(e)||G(e)||S(e);var Qr=Object.freeze(["div","span","a","p","ul","li"]),bt=Object.freeze(["b","i","p","ul","li","a","span","div","br","strong","em","u","code","pre","blockquote"]),xt={allowedKeys:["arrowleft","arrowright","arrowup","arrowdown","backspace","delete","tab"],clearKeys:["backspace","delete"],copyShortcut:{key:"c",modifiers:["ctrl","meta"]},pasteShortcut:{key:"v",modifiers:["ctrl","meta"]}};var ht=Object.freeze(["log","warn","error","info","debug","table"]),f={isoRegex:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,camelCase:/^[a-z]+(?:[A-Z][a-z0-9]*)*$/,kebabCase:/^[a-z0-9]+(?:-[a-z0-9]+)*$/,snakeCase:/^[a-z0-9]+(?:_[a-z0-9]+)*$/,hexString:/^[0-9a-fA-F]+$/,hexColor:/^[0-9A-Fa-f]{6}$/,letterSeparator:/[^A-Za-z]+/g,camelCaseBoundary:/(?:^\w|[A-Z]|\b\w)/g,kebabCaseBoundary:/([a-z0-9])([A-Z])/g,whitespace:/\s+/g,wordBoundarySplitter:/[^A-Za-z0-9]+/g,USPhoneNumber:/^(?:\+1\s?)?(?:\(\d{3}\)|\d{3})[-.\s]?\d{3}[-.\s]?\d{4}$/,EUPhoneNumber:/^\+?\d{1,4}[\s.-]?\d{2,4}([\s.-]?\d{2,4}){1,3}$/,genericPhoneNumber:/^\+?(\d[\d\s-().]{6,}\d)$/,genericEmail:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,emailRegex:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/,imageSrcRegex:/<img[^>]+src="([^">]+)"/i,singleAlphabetChar:/^[a-zA-Z]$/,htmlDetection:new RegExp(`<\\/?(${bt.join("|")})\\b[^>]*>|&[a-z]+;`,"i"),stackTracePrefix:/^\s*at\s+/},Te={reset:"\x1B[0m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",bold:"\x1B[1m",underline:"\x1B[4m"};var gr={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,valueLink:!0},br={action:!0,formAction:!0,onCaptured:!0,precedence:!0,blocking:!0},xr={autoFocus:!0,readOnly:!0,noValidate:!0,spellCheck:!0,tabIndex:!0,autoComplete:!0,autoCorrect:!0,autoCapitalize:!0},hr={popover:!0,popoverTarget:!0,popoverTargetAction:!0,inert:!0,loading:!0,fetchpriority:!0,fetchPriority:!0,enterKeyHint:!0,shadowRoot:!0,disablePictureInPicture:!0,playsInline:!0},Sr={paintOrder:!0,vectorEffect:!0,imageRendering:!0,shapeRendering:!0,textAnchor:!0,ariaHasPopup:!0,ariaLabel:!0,ariaLabelledBy:!0,alignmentBaseline:!0,baselineShift:!0,dominantBaseline:!0},kr={about:!0,datatype:!0,inlist:!0,prefix:!0,property:!0,resource:!0,typeof:!0,vocab:!0,itemProp:!0,itemScope:!0,itemType:!0,itemID:!0,itemRef:!0},Rr={autoCapitalize:!0,autoCorrect:!0,autoSave:!0,color:!0,incremental:!0,results:!0,security:!0,unselectable:!0,on:!0,option:!0,fallback:!0},wr={abbr:!0,accept:!0,acceptCharset:!0,accessKey:!0,action:!0,allow:!0,allowFullScreen:!0,allowPaymentRequest:!0,alt:!0,async:!0,autoComplete:!0,autoFocus:!0,autoPlay:!0,capture:!0,cellPadding:!0,cellSpacing:!0,challenge:!0,charSet:!0,checked:!0,cite:!0,classID:!0,className:!0,cols:!0,colSpan:!0,content:!0,contentEditable:!0,contextMenu:!0,controls:!0,controlsList:!0,coords:!0,crossOrigin:!0,data:!0,dateTime:!0,decoding:!0,default:!0,defer:!0,dir:!0,disabled:!0,disablePictureInPicture:!0,disableRemotePlayback:!0,download:!0,draggable:!0,encType:!0,enterKeyHint:!0,form:!0,formAction:!0,formEncType:!0,formMethod:!0,formNoValidate:!0,formTarget:!0,frameBorder:!0,headers:!0,height:!0,hidden:!0,high:!0,href:!0,hrefLang:!0,htmlFor:!0,httpEquiv:!0,id:!0,inputMode:!0,integrity:!0,is:!0,keyParams:!0,keyType:!0,kind:!0,label:!0,lang:!0,list:!0,loading:!0,loop:!0,low:!0,marginHeight:!0,marginWidth:!0,max:!0,maxLength:!0,media:!0,mediaGroup:!0,method:!0,min:!0,minLength:!0,multiple:!0,muted:!0,name:!0,nonce:!0,noValidate:!0,open:!0,optimum:!0,pattern:!0,placeholder:!0,playsInline:!0,poster:!0,preload:!0,profile:!0,radioGroup:!0,readOnly:!0,referrerPolicy:!0,rel:!0,required:!0,reversed:!0,role:!0,rows:!0,rowSpan:!0,sandbox:!0,scope:!0,scoped:!0,scrolling:!0,seamless:!0,selected:!0,shape:!0,size:!0,sizes:!0,slot:!0,span:!0,spellCheck:!0,src:!0,srcDoc:!0,srcLang:!0,srcSet:!0,start:!0,step:!0,style:!0,summary:!0,tabIndex:!0,target:!0,title:!0,translate:!0,type:!0,useMap:!0,value:!0,width:!0,wmode:!0,wrap:!0},Ar={alignmentBaseline:!0,baselineShift:!0,clip:!0,clipPath:!0,clipRule:!0,color:!0,colorInterpolation:!0,colorInterpolationFilters:!0,colorProfile:!0,colorRendering:!0,cursor:!0,direction:!0,display:!0,dominantBaseline:!0,enableBackground:!0,fill:!0,fillOpacity:!0,fillRule:!0,filter:!0,floodColor:!0,floodOpacity:!0,imageRendering:!0,lightingColor:!0,markerEnd:!0,markerMid:!0,markerStart:!0,mask:!0,opacity:!0,overflow:!0,paintOrder:!0,pointerEvents:!0,shapeRendering:!0,stopColor:!0,stopOpacity:!0,stroke:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeLinecap:!0,strokeLinejoin:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,textAnchor:!0,textDecoration:!0,textRendering:!0,unicodeBidi:!0,vectorEffect:!0,visibility:!0,wordSpacing:!0,writingMode:!0},Or={cx:!0,cy:!0,d:!0,dx:!0,dy:!0,fr:!0,fx:!0,fy:!0,height:!0,points:!0,r:!0,rx:!0,ry:!0,transform:!0,version:!0,viewBox:!0,width:!0,x:!0,x1:!0,x2:!0,y:!0,y1:!0,y2:!0,z:!0},Cr={accumulate:!0,additive:!0,allowReorder:!0,amplitude:!0,attributeName:!0,attributeType:!0,autoReverse:!0,begin:!0,bias:!0,by:!0,calcMode:!0,decelerate:!0,diffuseConstant:!0,divisor:!0,dur:!0,edgeMode:!0,elevation:!0,end:!0,exponent:!0,externalResourcesRequired:!0,filterRes:!0,filterUnits:!0,from:!0,in:!0,in2:!0,intercept:!0,k:!0,k1:!0,k2:!0,k3:!0,k4:!0,kernelMatrix:!0,kernelUnitLength:!0,keyPoints:!0,keySplines:!0,keyTimes:!0,limitingConeAngle:!0,mode:!0,numOctaves:!0,operator:!0,order:!0,orient:!0,orientation:!0,origin:!0,pathLength:!0,primitiveUnits:!0,repeatCount:!0,repeatDur:!0,restart:!0,result:!0,rotate:!0,scale:!0,seed:!0,slope:!0,spacing:!0,specularConstant:!0,specularExponent:!0,speed:!0,spreadMethod:!0,startOffset:!0,stdDeviation:!0,stitchTiles:!0,surfaceScale:!0,targetX:!0,targetY:!0,to:!0,values:!0,xChannelSelector:!0,yChannelSelector:!0,zoomAndPan:!0},Er={accentHeight:!0,alphabetic:!0,arabicForm:!0,ascent:!0,bbox:!0,capHeight:!0,descent:!0,fontFamily:!0,fontSize:!0,fontSizeAdjust:!0,fontStretch:!0,fontStyle:!0,fontVariant:!0,fontWeight:!0,format:!0,g1:!0,g2:!0,glyphName:!0,glyphOrientationHorizontal:!0,glyphOrientationVertical:!0,glyphRef:!0,hanging:!0,horizAdvX:!0,horizOriginX:!0,ideographic:!0,kerning:!0,lengthAdjust:!0,letterSpacing:!0,local:!0,mathematical:!0,overlinePosition:!0,overlineThickness:!0,panose1:!0,refX:!0,refY:!0,renderingIntent:!0,strikethroughPosition:!0,strikethroughThickness:!0,string:!0,systemLanguage:!0,tableValues:!0,textLength:!0,u1:!0,u2:!0,underlinePosition:!0,underlineThickness:!0,unicode:!0,unicodeRange:!0,unitsPerEm:!0,vAlphabetic:!0,vHanging:!0,vIdeographic:!0,vMathematical:!0,values:!0,vertAdvY:!0,vertOriginX:!0,vertOriginY:!0,widths:!0,xHeight:!0},Pr={clipPathUnits:!0,contentScriptType:!0,contentStyleType:!0,gradientTransform:!0,gradientUnits:!0,markerHeight:!0,markerUnits:!0,markerWidth:!0,maskContentUnits:!0,maskUnits:!0,offset:!0,patternContentUnits:!0,patternTransform:!0,patternUnits:!0,preserveAlpha:!0,preserveAspectRatio:!0,requiredExtensions:!0,requiredFeatures:!0,viewTarget:!0,xlinkActuate:!0,xlinkArcrole:!0,xlinkHref:!0,xlinkRole:!0,xlinkShow:!0,xlinkTitle:!0,xlinkType:!0,xmlBase:!0,xmlns:!0,xmlnsXlink:!0,xmlLang:!0,xmlSpace:!0},Nr={for:!0,class:!0,autofocus:!0},ye={...Rr,...kr,...Sr,...hr,...xr,...br,...gr,...Nr,...Pr,...Er,...Cr,...Or,...Ar,...wr},nn=Object.keys(ye);var K=e=>e===null,C=e=>typeof e>"u",R=e=>e!=null,w=e=>e==null,b=e=>typeof e=="function",l=e=>!K(e)&&!A(e)&&typeof e=="object",A=e=>Array.isArray(e),ge=e=>e instanceof Map,be=e=>e instanceof Set,xe=e=>e instanceof WeakMap,he=e=>e instanceof WeakSet;function Se(e,t){return e instanceof t}var H=e=>typeof e=="string"&&f.camelCase.test(e),ke=e=>typeof e=="string"&&f.snakeCase.test(e),Re=e=>typeof e=="string"&&f.kebabCase.test(e),B=e=>{if(!x(e))return!1;try{return Array.isArray(JSON.parse(e))}catch{return!1}},L=e=>{if(!x(e))return!1;try{let t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}},we=e=>p(e)&&f.htmlDetection.test(e),Ae=e=>t=>!(!x(t)||t.length%2!==0||!f.hexString.test(t)||!C(e)&&t.length!==e),V=e=>B(e)||L(e);var P=e=>{if(!x(e))return!1;try{return new URL(e),!0}catch{return!1}},N=e=>{if(typeof window>"u"||typeof location>"u"||!x(e))return!1;if(e.startsWith("/"))return!0;try{return new URL(e,location.origin).hostname===location.hostname}catch{return!1}};var Oe=e=>{let t=new Set(e);return r=>!C(r)&&t.has(r)},Ce=e=>t=>(p(t)||k(t)||M(t))&&t in e,m=e=>t=>l(t)&&e in t,W=e=>t=>(p(t)||k(t)||M(t)||G(t))&&e.includes(t),I=(e,t)=>Array.isArray(t)&&t.every(e),Ee=(e,t)=>l(e)&&y.values(e).every(t),Pe=e=>t=>!t||!l(t)?!1:e.every(r=>m(r)(t)&&R(t[r]));var J=e=>{if(!l(e))return!1;let t="type"in e&&e.type==="Buffer",r="data"in e&&I(k,e.data);return t&&r},q=e=>A(e)&&e.length===3&&e.every(t=>k(t)&&t>=0&&t<=255),Ne=e=>x(e)?[f.USPhoneNumber,f.EUPhoneNumber,f.genericPhoneNumber].some(t=>t.test(e)):!1,Ie=e=>p(e)&&f.emailRegex.test(e);var g={isString:p,isNumber:k,isBoolean:G,isBigInt:S,isNil:w,isDefined:R,isInteger:fe,isNonEmptyString:x,isSymbol:M,isPrimitive:z,isNull:K,isFunction:b,isObject:l,isArray:A,isMap:ge,isSet:be,isWeakMap:xe,isWeakSet:he,isUndefined:C,isInstanceOf:Se},Ir={isEmail:Ie,isPhone:Ne,isUrlAbsolute:P,isUrlInternal:N,isJsonString:V,isHTMLString:we,isCamelCase:H,isSnakeCase:ke,isKebabCase:Re,isHexByteString:Ae,isJSONObjectString:L,isJSONArrayString:B,isRGBTuple:q,isBufferLikeObject:J},jr={isArrayOf:I,isRecordOf:Ee,isKeyOfObject:Ce,isKeyInObject:m,isKeyOfArray:W,isInArray:Oe,hasKeys:Pe};var St=e=>{let t=Object.create(null);return r=>{if(r in t)return t[r];let n=e(r);return t[r]=n,n}};var Gr=y.keys(ye).join("|"),Mr=new RegExp(`^((${Gr})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`),oe=St(e=>Mr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91),se=e=>p(e)&&oe(e),X=e=>p(e[0])&&se(e[0]);var Kr=(e,t)=>m("$$typeof")(e)&&e.$$typeof===t,Z=e=>R(e)&&(b(e)||l(e)&&"current"in e),Y=e=>!K(e)&&l(e)&&"current"in e,je=e=>!!e&&m("then")(e)&&b(e.then),Q=e=>l(e)&&m("containerInfo")(e),Ge=e=>l(e)&&m("children")(e)&&R(e.children),Me=e=>b(e)||m("prototype")(e)&&l(e.prototype)&&m("render")(e.prototype)&&b(e.prototype.render),Ke=e=>Kr(e,Symbol.for("react.forward_ref"));var U=require("react"),ie=e=>w(e)||z(e)||(0,U.isValidElement)(e)||Q(e)||I(ie,e),D=e=>(0,U.isValidElement)(e),Be=e=>(0,U.isValidElement)(e)&&e.type===U.Fragment,Le=e=>D(e)&&!w(e.props)&&m("onClick")(e.props)&&b(e.props.onClick),ae=e=>l(e)&&m("type")(e)&&m("props")(e)&&l(e.props)&&(p(e.type)||b(e.type)),Ue=(e,t)=>ae(e)&&t.includes(e.type),De=e=>b(e)&&(l(e)||b(e))&&(m("displayName")(e)||m("name")(e)||m("type")(e));var Br={isRef:Z,isRefObject:Y,isPromise:je,isReactPortal:Q,hasChildren:Ge,isComponentType:Me,isForwardRef:Ke,isValidReactNode:ie,isReactElement:D,isFragment:Be,hasOnClick:Le,isElementLike:ae,isElementOfType:Ue,hasNameMetadata:De,isDOMPropKey:se,isDOMEntry:X,isPropValid:oe};var kt=(e,t,r)=>{if(!t(e))throw new Error(r??"Validation failed for value")},d=(e,t)=>(r,n)=>kt(r,e,n),Rt=d(g.isNumber,"isNumber"),wt=d(g.isInteger,"isInteger"),At=d(g.isString,"isString"),Ot=d(g.isNonEmptyString,"isNonEmptyString"),Ct=d(g.isBoolean,"isBoolean"),Et=d(g.isBigInt,"isBigInt"),Pt=d(g.isSymbol,"isSymbol"),Nt=d(g.isNull,"isNull"),It=d(g.isUndefined,"isUndefined"),jt=d(g.isDefined,"isDefined"),Gt=d(g.isNil,"isNil"),Mt=d(g.isFunction,"isFunction"),Kt=d(g.isObject,"isObject"),Bt=d(g.isArray,"isArray"),Lt=d(g.isMap,"isMap"),Ut=d(g.isSet,"isSet"),Dt=d(g.isWeakMap,"isWeakMap"),vt=d(g.isWeakSet,"isWeakSet"),_t=d(H,"isCamelCase"),$t=d(J,"isBufferLikeObject"),Ft=d(B,"isJSONArrayString"),zt=d(L,"isJSONObjectString"),Ht=d(V,"isJsonString"),Vt=d(P,"isAbsoluteUrl"),Wt=d(N,"isInternalUrl"),ue=d(q,"isRGBTuple"),Lr={assertValue:kt,makeAssert:d,assertIsNumber:Rt,assertIsInteger:wt,assertIsString:At,assertIsNonEmptyString:Ot,assertIsBoolean:Ct,assertIsBigInt:Et,assertIsSymbol:Pt,assertIsNull:Nt,assertIsUndefined:It,assertIsDefined:jt,assertIsNil:Gt,assertIsFunction:Mt,assertObject:Kt,assertIsArray:Bt,assertIsMap:Lt,assertIsSet:Ut,assertIsWeakMap:Dt,assertIsWeakSet:vt,assertIsCamelCase:_t,assertIsBufferLikeObject:$t,assertIsJSONArrayString:Ft,assertIsJSONObjectString:zt,assertIsJsonString:Ht,assertIsAbsoluteUrl:Vt,assertIsInternalUrl:Wt,assertIsRGBTuple:ue};var ee=e=>e[0].toUpperCase()+e.slice(1),ve=e=>w(e)||!x(e)?"":e.replace(f.letterSeparator," ").replace(f.camelCaseBoundary,(r,n)=>n===0?r.toLowerCase():r.toUpperCase()).replace(f.whitespace,""),_e=e=>w(e)||!x(e)?"":e.replace(f.wordBoundarySplitter," ").replace(f.kebabCaseBoundary,"$1 $2").trim().split(f.whitespace).join("-").toLowerCase(),$e=e=>w(e)||!x(e)?"":e.replace(f.wordBoundarySplitter," ").replace(f.kebabCaseBoundary,"$1 $2").trim().split(f.whitespace).join("_").toLowerCase();var Fe=e=>{let{keys:t,prefix:r,suffix:n}=e,o=h.map(t,s=>{let i=r?`${r}${s.charAt(0).toUpperCase()+s.slice(1)}${n}`:`${s.charAt(0).toLowerCase()+s.slice(1)}${n}`;return[s,i]});return y.fromEntries(o)},ze=(e,t)=>y.fromEntries(h.map(e,r=>{let n=r[t],{[t]:o,...s}=r;return[n,s]})),ce=e=>h.map(e,ee),He=e=>ce(y.keys(e).map(String).filter(t=>/^[A-Za-z]/.test(t)));var Ur={capitalizedKeys:He,capitalizeArray:ce,toKeyByField:ze,generateKeyMap:Fe,toSnakeCase:$e,toKebabCase:_e,toCamelCase:ve,capitalizeString:ee};function E(e,t="yellow"){return`${Te[t]}${e}${Te.reset}`}var Dr={log:e=>E(e,"yellow"),info:e=>E(e,"cyan"),error:e=>E(e,"red"),debug:e=>E(e,"magenta"),warn:e=>E(e,"yellow"),table:e=>e},le=e=>{if(C(e))return"";if(p(e))return e;try{return JSON.stringify(e,(t,r)=>S(r)?r.toString():r,2)}catch{return String(e)}},Ve=e=>{let{preferredIndex:t=3,fallbackIndex:r=2,topParent:n=!1,stripPathPrefix:o=process.cwd()}=e,s=new Error().stack;if(!s)return"unknown";let i=s.split(`
|
|
2
|
-
`).slice(1).map(c=>c.replace(f.stackTracePrefix,"").trim()).filter(Boolean),a=n?[...i].reverse().find(c=>!c.includes("node_modules"))??i.at(-1):i[t]??i[r]??i.at(-1);return o?a?.replace(o,"")??"unknown":a??"unknown"},
|
|
1
|
+
"use strict";var me=Object.defineProperty;var Zt=Object.getOwnPropertyDescriptor;var Yt=Object.getOwnPropertyNames;var Qt=Object.prototype.hasOwnProperty;var er=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},tr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Yt(t))!Qt.call(e,o)&&o!==r&&me(e,o,{get:()=>t[o],enumerable:!(n=Zt(t,o))||n.enumerable});return e};var rr=e=>tr(me({},"__esModule",{value:!0}),e);var Vr={};er(Vr,{ArrayUtils:()=>h,AssertionUtils:()=>Ur,CollectionTypeGuards:()=>Gr,ColorUtils:()=>Fr,ComputationUtils:()=>Ze,CoreTypeGuards:()=>g,DebugUtils:()=>v,DomUtils:()=>$r,FormatTypeGuards:()=>jr,LinkUtils:()=>j,ObjectUtils:()=>y,ProcessorUtils:()=>zr,ReactProcessorUtils:()=>Hr,ReactTypeGuards:()=>Lr,RenamedArrayMethods:()=>gt,RenamedObjectMethods:()=>bt,TransformersUtils:()=>Dr,arrayFilter:()=>or,arrayFilterNonNullable:()=>lr,arrayFlat:()=>ar,arrayFlatMap:()=>ur,arrayForEach:()=>cr,arrayIncludes:()=>sr,arrayMap:()=>nr,arrayReduce:()=>ir,assertIsAbsoluteUrl:()=>Wt,assertIsArray:()=>Lt,assertIsBigInt:()=>Pt,assertIsBoolean:()=>Et,assertIsBufferLikeObject:()=>Ft,assertIsCamelCase:()=>$t,assertIsDefined:()=>Gt,assertIsFunction:()=>Kt,assertIsInteger:()=>At,assertIsInternalUrl:()=>Jt,assertIsJSONArrayString:()=>zt,assertIsJSONObjectString:()=>Ht,assertIsJsonString:()=>Vt,assertIsMap:()=>Ut,assertIsNil:()=>Mt,assertIsNonEmptyString:()=>Ct,assertIsNull:()=>It,assertIsNumber:()=>wt,assertIsRGBTuple:()=>ue,assertIsSet:()=>Dt,assertIsString:()=>Ot,assertIsSymbol:()=>Nt,assertIsUndefined:()=>jt,assertIsWeakMap:()=>vt,assertIsWeakSet:()=>_t,assertObject:()=>Bt,capitalizeArray:()=>ce,capitalizeString:()=>ee,capitalizedKeys:()=>Ve,contrastTextColor:()=>Qe,delay:()=>ct,extractDOMProps:()=>Tt,extractRelativePath:()=>st,fetchJson:()=>ut,filterChildrenByDisplayName:()=>yt,generateKeyMap:()=>ze,getCallerLocation:()=>We,getKeyboardAction:()=>Je,getLuminance:()=>re,handleInternalHashScroll:()=>at,hasChildren:()=>Me,hasDefinedKeys:()=>Pe,hasNameMetadata:()=>ve,hasOnClick:()=>Ue,hexToHSL:()=>rt,hexToNormalizedRGB:()=>nt,hexToRGB:()=>_,hexToRGBShorthand:()=>et,highlight:()=>E,interpolateColor:()=>tt,isAbsoluteUrl:()=>P,isArray:()=>A,isArrayOf:()=>I,isBigInt:()=>S,isBoolean:()=>G,isBufferLikeObject:()=>J,isCamelCase:()=>H,isComponentType:()=>Ke,isDOMEntry:()=>X,isDOMPropKey:()=>se,isDarkColor:()=>Ye,isDefined:()=>R,isElementLike:()=>ae,isElementOfType:()=>De,isEmail:()=>je,isForwardRef:()=>Be,isFragment:()=>Le,isFunction:()=>b,isHTMLString:()=>we,isHexByteString:()=>Ae,isInArray:()=>Oe,isInstanceOf:()=>Se,isInteger:()=>fe,isInternalUrl:()=>N,isJSONArrayString:()=>B,isJSONObjectString:()=>L,isJsonString:()=>V,isKebabCase:()=>Re,isKeyInObject:()=>d,isKeyOfArray:()=>W,isKeyOfObject:()=>Ce,isLumGreaterThan:()=>de,isLumLessThan:()=>pe,isMap:()=>ge,isNil:()=>w,isNonEmptyString:()=>x,isNull:()=>K,isNumber:()=>k,isObject:()=>l,isPhoneNumber:()=>Ie,isPrimitive:()=>z,isPromise:()=>Ge,isPropValid:()=>oe,isRGBTuple:()=>q,isReactElement:()=>D,isReactPortal:()=>Q,isRecordOf:()=>Ee,isRef:()=>Z,isRefObject:()=>Y,isSet:()=>be,isShape:()=>Ne,isSnakeCase:()=>ke,isString:()=>p,isSymbol:()=>M,isUndefined:()=>C,isValidReactNode:()=>ie,isWeakMap:()=>xe,isWeakSet:()=>he,lazyProxy:()=>dt,logDev:()=>qt,mergeCssVars:()=>mt,mergeEventHandlerClicks:()=>ft,mergeRefs:()=>pt,normalizeImageSrc:()=>Xe,normalizeUrl:()=>ot,objectEntries:()=>dr,objectFromEntries:()=>mr,objectGet:()=>yr,objectHas:()=>Tr,objectKeys:()=>pr,objectSet:()=>gr,objectValues:()=>fr,preloadImages:()=>qe,retry:()=>lt,serialize:()=>le,stripHash:()=>it,toCamelCase:()=>_e,toKebabCase:()=>$e,toKeyByField:()=>He,toSnakeCase:()=>Fe,validateRGB:()=>$});module.exports=rr(Vr);function ne(e,t){let r={};for(let[n,o]of Object.entries(t)){let s=e[o];typeof s=="function"&&(r[n]=s.bind(e))}return r}var h=class e{static includes(t,r){return t.includes(r)}static createFixedLengthArray(t,r){if(t.length!==r)throw new Error(`Array must have exactly ${r} elements`);return t}static readAllItems(t){return[...t]}static map(t,r){return t.map(r)}static forEachUnion(t,r){(Array.isArray(t[0])?[].concat(...t):t).forEach(r)}static forEach(t,r){t.forEach(r)}static reduce(t,r,n){return t.reduce(r,n)}static flat(t){return t.reduce((r,n)=>r.concat(n),[])}static flatMap(t,r){return t.reduce((n,o,s)=>{let i=r(o,s);return n.concat(i)},[])}static filter(t,r){return t.filter(r)}static filterNonNullable(t){return e.filter(t,r=>r!=null)}},gt=ne(h,{arrayIncludes:"includes",arrayMap:"map",arrayFilter:"filter",arrayFlat:"flat",arrayReduce:"reduce",arrayForEach:"forEach",arrayFlatMap:"flatMap",arrayFilterNonNullable:"filterNonNullable"}),{arrayMap:nr,arrayFilter:or,arrayIncludes:sr,arrayReduce:ir,arrayFlat:ar,arrayFlatMap:ur,arrayForEach:cr,arrayFilterNonNullable:lr}=gt;var y=class{static keys(t){return Object.keys(t)}static entries(t){return t?Object.entries(t):[]}static fromEntries(t){return Object.fromEntries(t)}static values(t){return Object.values(t)}static has(t,r){if(!r)return!1;let n=r.split("."),o=t;for(let s of n){if(o==null||typeof o!="object"||!(s in o))return!1;o=o[s]}return!0}static get(t,r){if(!r)return;let n=r.split("."),o=t;for(let s of n){if(o==null||typeof o!="object"||!(s in o))return;o=o[s]}return o}static set(t,r,n){if(!r)return;let o=r.split("."),s=t;for(let i=0;i<o.length-1;i++){let a=o[i];if(typeof s!="object"||s===null)return;let c=s;(!(a in c)||typeof c[a]!="object"||c[a]===null)&&(c[a]={}),s=c[a]}typeof s=="object"&&s!==null&&(s[o[o.length-1]]=n)}},bt=ne(y,{objectKeys:"keys",objectEntries:"entries",objectFromEntries:"fromEntries",objectValues:"values",objectHas:"has",objectGet:"get",objectSet:"set"}),{objectKeys:pr,objectEntries:dr,objectFromEntries:mr,objectValues:fr,objectHas:Tr,objectGet:yr,objectSet:gr}=bt;var k=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),fe=e=>Number.isInteger(e),p=e=>typeof e=="string",x=e=>typeof e=="string"&&e.length>0&&e.trim().length>0,G=e=>typeof e=="boolean",S=e=>typeof e=="bigint",M=e=>typeof e=="symbol",z=e=>p(e)||k(e)||G(e)||S(e);var en=Object.freeze(["div","span","a","p","ul","li"]),xt=Object.freeze(["b","i","p","ul","li","a","span","div","br","strong","em","u","code","pre","blockquote"]),ht={allowedKeys:["arrowleft","arrowright","arrowup","arrowdown","backspace","delete","tab"],clearKeys:["backspace","delete"],copyShortcut:{key:"c",modifiers:["ctrl","meta"]},pasteShortcut:{key:"v",modifiers:["ctrl","meta"]}};var St=Object.freeze(["log","warn","error","info","debug","table"]),f={isoRegex:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,camelCase:/^[a-z]+(?:[A-Z][a-z0-9]*)*$/,kebabCase:/^[a-z0-9]+(?:-[a-z0-9]+)*$/,snakeCase:/^[a-z0-9]+(?:_[a-z0-9]+)*$/,hexString:/^[0-9a-fA-F]+$/,hexColor:/^[0-9A-Fa-f]{6}$/,letterSeparator:/[^A-Za-z]+/g,camelCaseBoundary:/(?:^\w|[A-Z]|\b\w)/g,kebabCaseBoundary:/([a-z0-9])([A-Z])/g,whitespace:/\s+/g,wordBoundarySplitter:/[^A-Za-z0-9]+/g,USPhoneNumber:/^(?:\+1\s?)?(?:\(\d{3}\)|\d{3})[-.\s]?\d{3}[-.\s]?\d{4}$/,EUPhoneNumber:/^\+?\d{1,4}[\s.-]?\d{2,4}([\s.-]?\d{2,4}){1,3}$/,genericPhoneNumber:/^\+?(\d[\d\s-().]{6,}\d)$/,genericEmail:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,emailRegex:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*\.[a-zA-Z]{2,}$/,imageSrcRegex:/<img[^>]+src="([^">]+)"/i,singleAlphabetChar:/^[a-zA-Z]$/,htmlDetection:new RegExp(`<\\/?(${xt.join("|")})\\b[^>]*>|&[a-z]+;`,"i"),stackTracePrefix:/^\s*at\s+/},Te={reset:"\x1B[0m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",bold:"\x1B[1m",underline:"\x1B[4m"};var br={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0,autoFocus:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,valueLink:!0},xr={action:!0,formAction:!0,onCaptured:!0,precedence:!0,blocking:!0},hr={autoFocus:!0,readOnly:!0,noValidate:!0,spellCheck:!0,tabIndex:!0,autoComplete:!0,autoCorrect:!0,autoCapitalize:!0},Sr={popover:!0,popoverTarget:!0,popoverTargetAction:!0,inert:!0,loading:!0,fetchpriority:!0,fetchPriority:!0,enterKeyHint:!0,shadowRoot:!0,disablePictureInPicture:!0,playsInline:!0},kr={paintOrder:!0,vectorEffect:!0,imageRendering:!0,shapeRendering:!0,textAnchor:!0,ariaHasPopup:!0,ariaLabel:!0,ariaLabelledBy:!0,alignmentBaseline:!0,baselineShift:!0,dominantBaseline:!0},Rr={about:!0,datatype:!0,inlist:!0,prefix:!0,property:!0,resource:!0,typeof:!0,vocab:!0,itemProp:!0,itemScope:!0,itemType:!0,itemID:!0,itemRef:!0},wr={autoCapitalize:!0,autoCorrect:!0,autoSave:!0,color:!0,incremental:!0,results:!0,security:!0,unselectable:!0,on:!0,option:!0,fallback:!0},Ar={abbr:!0,accept:!0,acceptCharset:!0,accessKey:!0,action:!0,allow:!0,allowFullScreen:!0,allowPaymentRequest:!0,alt:!0,async:!0,autoComplete:!0,autoFocus:!0,autoPlay:!0,capture:!0,cellPadding:!0,cellSpacing:!0,challenge:!0,charSet:!0,checked:!0,cite:!0,classID:!0,className:!0,cols:!0,colSpan:!0,content:!0,contentEditable:!0,contextMenu:!0,controls:!0,controlsList:!0,coords:!0,crossOrigin:!0,data:!0,dateTime:!0,decoding:!0,default:!0,defer:!0,dir:!0,disabled:!0,disablePictureInPicture:!0,disableRemotePlayback:!0,download:!0,draggable:!0,encType:!0,enterKeyHint:!0,form:!0,formAction:!0,formEncType:!0,formMethod:!0,formNoValidate:!0,formTarget:!0,frameBorder:!0,headers:!0,height:!0,hidden:!0,high:!0,href:!0,hrefLang:!0,htmlFor:!0,httpEquiv:!0,id:!0,inputMode:!0,integrity:!0,is:!0,keyParams:!0,keyType:!0,kind:!0,label:!0,lang:!0,list:!0,loading:!0,loop:!0,low:!0,marginHeight:!0,marginWidth:!0,max:!0,maxLength:!0,media:!0,mediaGroup:!0,method:!0,min:!0,minLength:!0,multiple:!0,muted:!0,name:!0,nonce:!0,noValidate:!0,open:!0,optimum:!0,pattern:!0,placeholder:!0,playsInline:!0,poster:!0,preload:!0,profile:!0,radioGroup:!0,readOnly:!0,referrerPolicy:!0,rel:!0,required:!0,reversed:!0,role:!0,rows:!0,rowSpan:!0,sandbox:!0,scope:!0,scoped:!0,scrolling:!0,seamless:!0,selected:!0,shape:!0,size:!0,sizes:!0,slot:!0,span:!0,spellCheck:!0,src:!0,srcDoc:!0,srcLang:!0,srcSet:!0,start:!0,step:!0,style:!0,summary:!0,tabIndex:!0,target:!0,title:!0,translate:!0,type:!0,useMap:!0,value:!0,width:!0,wmode:!0,wrap:!0},Or={alignmentBaseline:!0,baselineShift:!0,clip:!0,clipPath:!0,clipRule:!0,color:!0,colorInterpolation:!0,colorInterpolationFilters:!0,colorProfile:!0,colorRendering:!0,cursor:!0,direction:!0,display:!0,dominantBaseline:!0,enableBackground:!0,fill:!0,fillOpacity:!0,fillRule:!0,filter:!0,floodColor:!0,floodOpacity:!0,imageRendering:!0,lightingColor:!0,markerEnd:!0,markerMid:!0,markerStart:!0,mask:!0,opacity:!0,overflow:!0,paintOrder:!0,pointerEvents:!0,shapeRendering:!0,stopColor:!0,stopOpacity:!0,stroke:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeLinecap:!0,strokeLinejoin:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,textAnchor:!0,textDecoration:!0,textRendering:!0,unicodeBidi:!0,vectorEffect:!0,visibility:!0,wordSpacing:!0,writingMode:!0},Cr={cx:!0,cy:!0,d:!0,dx:!0,dy:!0,fr:!0,fx:!0,fy:!0,height:!0,points:!0,r:!0,rx:!0,ry:!0,transform:!0,version:!0,viewBox:!0,width:!0,x:!0,x1:!0,x2:!0,y:!0,y1:!0,y2:!0,z:!0},Er={accumulate:!0,additive:!0,allowReorder:!0,amplitude:!0,attributeName:!0,attributeType:!0,autoReverse:!0,begin:!0,bias:!0,by:!0,calcMode:!0,decelerate:!0,diffuseConstant:!0,divisor:!0,dur:!0,edgeMode:!0,elevation:!0,end:!0,exponent:!0,externalResourcesRequired:!0,filterRes:!0,filterUnits:!0,from:!0,in:!0,in2:!0,intercept:!0,k:!0,k1:!0,k2:!0,k3:!0,k4:!0,kernelMatrix:!0,kernelUnitLength:!0,keyPoints:!0,keySplines:!0,keyTimes:!0,limitingConeAngle:!0,mode:!0,numOctaves:!0,operator:!0,order:!0,orient:!0,orientation:!0,origin:!0,pathLength:!0,primitiveUnits:!0,repeatCount:!0,repeatDur:!0,restart:!0,result:!0,rotate:!0,scale:!0,seed:!0,slope:!0,spacing:!0,specularConstant:!0,specularExponent:!0,speed:!0,spreadMethod:!0,startOffset:!0,stdDeviation:!0,stitchTiles:!0,surfaceScale:!0,targetX:!0,targetY:!0,to:!0,values:!0,xChannelSelector:!0,yChannelSelector:!0,zoomAndPan:!0},Pr={accentHeight:!0,alphabetic:!0,arabicForm:!0,ascent:!0,bbox:!0,capHeight:!0,descent:!0,fontFamily:!0,fontSize:!0,fontSizeAdjust:!0,fontStretch:!0,fontStyle:!0,fontVariant:!0,fontWeight:!0,format:!0,g1:!0,g2:!0,glyphName:!0,glyphOrientationHorizontal:!0,glyphOrientationVertical:!0,glyphRef:!0,hanging:!0,horizAdvX:!0,horizOriginX:!0,ideographic:!0,kerning:!0,lengthAdjust:!0,letterSpacing:!0,local:!0,mathematical:!0,overlinePosition:!0,overlineThickness:!0,panose1:!0,refX:!0,refY:!0,renderingIntent:!0,strikethroughPosition:!0,strikethroughThickness:!0,string:!0,systemLanguage:!0,tableValues:!0,textLength:!0,u1:!0,u2:!0,underlinePosition:!0,underlineThickness:!0,unicode:!0,unicodeRange:!0,unitsPerEm:!0,vAlphabetic:!0,vHanging:!0,vIdeographic:!0,vMathematical:!0,values:!0,vertAdvY:!0,vertOriginX:!0,vertOriginY:!0,widths:!0,xHeight:!0},Nr={clipPathUnits:!0,contentScriptType:!0,contentStyleType:!0,gradientTransform:!0,gradientUnits:!0,markerHeight:!0,markerUnits:!0,markerWidth:!0,maskContentUnits:!0,maskUnits:!0,offset:!0,patternContentUnits:!0,patternTransform:!0,patternUnits:!0,preserveAlpha:!0,preserveAspectRatio:!0,requiredExtensions:!0,requiredFeatures:!0,viewTarget:!0,xlinkActuate:!0,xlinkArcrole:!0,xlinkHref:!0,xlinkRole:!0,xlinkShow:!0,xlinkTitle:!0,xlinkType:!0,xmlBase:!0,xmlns:!0,xmlnsXlink:!0,xmlLang:!0,xmlSpace:!0},Ir={for:!0,class:!0,autofocus:!0},ye={...wr,...Rr,...kr,...Sr,...hr,...xr,...br,...Ir,...Nr,...Pr,...Er,...Cr,...Or,...Ar},on=Object.keys(ye);var K=e=>e===null,C=e=>typeof e>"u",R=e=>e!=null,w=e=>e==null,b=e=>typeof e=="function",l=e=>!K(e)&&!A(e)&&typeof e=="object",A=e=>Array.isArray(e),ge=e=>e instanceof Map,be=e=>e instanceof Set,xe=e=>e instanceof WeakMap,he=e=>e instanceof WeakSet;function Se(e,t){return e instanceof t}var H=e=>typeof e=="string"&&f.camelCase.test(e),ke=e=>typeof e=="string"&&f.snakeCase.test(e),Re=e=>typeof e=="string"&&f.kebabCase.test(e),B=e=>{if(!x(e))return!1;try{return Array.isArray(JSON.parse(e))}catch{return!1}},L=e=>{if(!x(e))return!1;try{let t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)}catch{return!1}},we=e=>p(e)&&f.htmlDetection.test(e),Ae=e=>t=>!(!x(t)||t.length%2!==0||!f.hexString.test(t)||!C(e)&&t.length!==e),V=e=>B(e)||L(e);var P=e=>{if(!x(e))return!1;try{return new URL(e),!0}catch{return!1}},N=e=>{if(typeof window>"u"||typeof location>"u"||!x(e))return!1;if(e.startsWith("/"))return!0;try{return new URL(e,location.origin).hostname===location.hostname}catch{return!1}};var Oe=e=>{let t=new Set(e);return r=>!C(r)&&t.has(r)},Ce=e=>t=>(p(t)||k(t)||M(t))&&t in e,d=e=>t=>l(t)&&e in t,W=e=>t=>(p(t)||k(t)||M(t)||G(t))&&e.includes(t),I=(e,t)=>Array.isArray(t)&&t.every(e),Ee=(e,t)=>l(e)&&y.values(e).every(t),Pe=e=>t=>!t||!l(t)?!1:e.every(r=>d(r)(t)&&R(t[r])),Ne=e=>{let t=y.keys(e);return r=>{if(!l(r))return!1;for(let n of t){let o=e[n];if(!d(n)(r)||!o(r[n]))return!1}return!0}};var J=e=>{if(!l(e))return!1;let t="type"in e&&e.type==="Buffer",r="data"in e&&I(k,e.data);return t&&r},q=e=>A(e)&&e.length===3&&e.every(t=>k(t)&&t>=0&&t<=255),Ie=e=>x(e)?[f.USPhoneNumber,f.EUPhoneNumber,f.genericPhoneNumber].some(t=>t.test(e)):!1,je=e=>p(e)&&f.emailRegex.test(e);var g={isString:p,isNumber:k,isBoolean:G,isBigInt:S,isNil:w,isDefined:R,isInteger:fe,isNonEmptyString:x,isSymbol:M,isPrimitive:z,isNull:K,isFunction:b,isObject:l,isArray:A,isMap:ge,isSet:be,isWeakMap:xe,isWeakSet:he,isUndefined:C,isInstanceOf:Se},jr={isEmail:je,isPhone:Ie,isUrlAbsolute:P,isUrlInternal:N,isJsonString:V,isHTMLString:we,isCamelCase:H,isSnakeCase:ke,isKebabCase:Re,isHexByteString:Ae,isJSONObjectString:L,isJSONArrayString:B,isRGBTuple:q,isBufferLikeObject:J},Gr={isArrayOf:I,isRecordOf:Ee,isKeyOfObject:Ce,isKeyInObject:d,isKeyOfArray:W,isInArray:Oe,hasKeys:Pe,isShape:Ne};var kt=e=>{let t=Object.create(null);return r=>{if(r in t)return t[r];let n=e(r);return t[r]=n,n}};var Mr=y.keys(ye).join("|"),Kr=new RegExp(`^((${Mr})|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$`),oe=kt(e=>Kr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91),se=e=>p(e)&&oe(e),X=e=>p(e[0])&&se(e[0]);var Br=(e,t)=>d("$$typeof")(e)&&e.$$typeof===t,Z=e=>R(e)&&(b(e)||l(e)&&"current"in e),Y=e=>!K(e)&&l(e)&&"current"in e,Ge=e=>!!e&&d("then")(e)&&b(e.then),Q=e=>l(e)&&d("containerInfo")(e),Me=e=>l(e)&&d("children")(e)&&R(e.children),Ke=e=>b(e)||d("prototype")(e)&&l(e.prototype)&&d("render")(e.prototype)&&b(e.prototype.render),Be=e=>Br(e,Symbol.for("react.forward_ref"));var U=require("react"),ie=e=>w(e)||z(e)||(0,U.isValidElement)(e)||Q(e)||I(ie,e),D=e=>(0,U.isValidElement)(e),Le=e=>(0,U.isValidElement)(e)&&e.type===U.Fragment,Ue=e=>D(e)&&!w(e.props)&&d("onClick")(e.props)&&b(e.props.onClick),ae=e=>l(e)&&d("type")(e)&&d("props")(e)&&l(e.props)&&(p(e.type)||b(e.type)),De=(e,t)=>ae(e)&&t.includes(e.type),ve=e=>b(e)&&(l(e)||b(e))&&(d("displayName")(e)||d("name")(e)||d("type")(e));var Lr={isRef:Z,isRefObject:Y,isPromise:Ge,isReactPortal:Q,hasChildren:Me,isComponentType:Ke,isForwardRef:Be,isValidReactNode:ie,isReactElement:D,isFragment:Le,hasOnClick:Ue,isElementLike:ae,isElementOfType:De,hasNameMetadata:ve,isDOMPropKey:se,isDOMEntry:X,isPropValid:oe};var Rt=(e,t,r)=>{if(!t(e))throw new Error(r??"Validation failed for value")},m=(e,t)=>(r,n)=>Rt(r,e,n),wt=m(g.isNumber,"isNumber"),At=m(g.isInteger,"isInteger"),Ot=m(g.isString,"isString"),Ct=m(g.isNonEmptyString,"isNonEmptyString"),Et=m(g.isBoolean,"isBoolean"),Pt=m(g.isBigInt,"isBigInt"),Nt=m(g.isSymbol,"isSymbol"),It=m(g.isNull,"isNull"),jt=m(g.isUndefined,"isUndefined"),Gt=m(g.isDefined,"isDefined"),Mt=m(g.isNil,"isNil"),Kt=m(g.isFunction,"isFunction"),Bt=m(g.isObject,"isObject"),Lt=m(g.isArray,"isArray"),Ut=m(g.isMap,"isMap"),Dt=m(g.isSet,"isSet"),vt=m(g.isWeakMap,"isWeakMap"),_t=m(g.isWeakSet,"isWeakSet"),$t=m(H,"isCamelCase"),Ft=m(J,"isBufferLikeObject"),zt=m(B,"isJSONArrayString"),Ht=m(L,"isJSONObjectString"),Vt=m(V,"isJsonString"),Wt=m(P,"isAbsoluteUrl"),Jt=m(N,"isInternalUrl"),ue=m(q,"isRGBTuple"),Ur={assertValue:Rt,makeAssert:m,assertIsNumber:wt,assertIsInteger:At,assertIsString:Ot,assertIsNonEmptyString:Ct,assertIsBoolean:Et,assertIsBigInt:Pt,assertIsSymbol:Nt,assertIsNull:It,assertIsUndefined:jt,assertIsDefined:Gt,assertIsNil:Mt,assertIsFunction:Kt,assertObject:Bt,assertIsArray:Lt,assertIsMap:Ut,assertIsSet:Dt,assertIsWeakMap:vt,assertIsWeakSet:_t,assertIsCamelCase:$t,assertIsBufferLikeObject:Ft,assertIsJSONArrayString:zt,assertIsJSONObjectString:Ht,assertIsJsonString:Vt,assertIsAbsoluteUrl:Wt,assertIsInternalUrl:Jt,assertIsRGBTuple:ue};var ee=e=>e[0].toUpperCase()+e.slice(1),_e=e=>w(e)||!x(e)?"":e.replace(f.letterSeparator," ").replace(f.camelCaseBoundary,(r,n)=>n===0?r.toLowerCase():r.toUpperCase()).replace(f.whitespace,""),$e=e=>w(e)||!x(e)?"":e.replace(f.wordBoundarySplitter," ").replace(f.kebabCaseBoundary,"$1 $2").trim().split(f.whitespace).join("-").toLowerCase(),Fe=e=>w(e)||!x(e)?"":e.replace(f.wordBoundarySplitter," ").replace(f.kebabCaseBoundary,"$1 $2").trim().split(f.whitespace).join("_").toLowerCase();var ze=e=>{let{keys:t,prefix:r,suffix:n}=e,o=h.map(t,s=>{let i=r?`${r}${s.charAt(0).toUpperCase()+s.slice(1)}${n}`:`${s.charAt(0).toLowerCase()+s.slice(1)}${n}`;return[s,i]});return y.fromEntries(o)},He=(e,t)=>y.fromEntries(h.map(e,r=>{let n=r[t],{[t]:o,...s}=r;return[n,s]})),ce=e=>h.map(e,ee),Ve=e=>ce(y.keys(e).map(String).filter(t=>/^[A-Za-z]/.test(t)));var Dr={capitalizedKeys:Ve,capitalizeArray:ce,toKeyByField:He,generateKeyMap:ze,toSnakeCase:Fe,toKebabCase:$e,toCamelCase:_e,capitalizeString:ee};function E(e,t="yellow"){return`${Te[t]}${e}${Te.reset}`}var vr={log:e=>E(e,"yellow"),info:e=>E(e,"cyan"),error:e=>E(e,"red"),debug:e=>E(e,"magenta"),warn:e=>E(e,"yellow"),table:e=>e},le=e=>{if(C(e))return"";if(p(e))return e;try{return JSON.stringify(e,(t,r)=>S(r)?r.toString():r,2)}catch{return String(e)}},We=e=>{let{preferredIndex:t=3,fallbackIndex:r=2,topParent:n=!1,stripPathPrefix:o=process.cwd()}=e,s=new Error().stack;if(!s)return"unknown";let i=s.split(`
|
|
2
|
+
`).slice(1).map(c=>c.replace(f.stackTracePrefix,"").trim()).filter(Boolean),a=n?[...i].reverse().find(c=>!c.includes("node_modules"))??i.at(-1):i[t]??i[r]??i.at(-1);return o?a?.replace(o,"")??"unknown":a??"unknown"},qt=(e,...t)=>{let r=process.env.NODE_ENV!=="production",{enabled:n=!0,overrideDev:o=!1}=e;if(!n||!r&&!o)return;let s="log",i=t[0];if(p(i)&&W(St)(i)&&(s=i),s==="table"){let u=h.map(t.slice(1),T=>T&&l(T)&&"current"in T?T.current.map(F=>({key:F.key,duration:F.end!=null&&F.start!=null?`${(F.end-F.start).toFixed(2)}ms`:"in progress"})):T);console.table(u.flat());return}let a=vr[s],c=t.map(u=>{let T=l(u)?le(u):String(u);return a?a(T):T});(console[s]??console.log)(...c)};var v=class{};v.highlight=E,v.serialize=le,v.getCallerLocation=We;function Je(e,t={}){let r=(u,T)=>u.key.toLowerCase()!==T.key?!1:T.modifiers.some(O=>O==="ctrl"?u.ctrlKey:O==="meta"?u.metaKey:O==="alt"?u.altKey:O==="shift"?u.shiftKey:!1),n={...ht,...t},o=e.key.toLowerCase(),s=r(e,n.copyShortcut),i=r(e,n.pasteShortcut),a=n.clearKeys.includes(o),c=n.allowedKeys.includes(o);return{isPaste:i,isCopy:s,isClear:a,isAllowedKey:c,shouldBlockTyping:!c&&!s&&!i}}var te=new Map,_r=200;async function qe(e,t={}){if(typeof window>"u")return;let{fetchPriority:r="low"}=t,o=(A(e)?e:[e]).filter(s=>!te.has(s)).map(s=>new Promise(i=>{let a=new Image;a.fetchPriority=r,a.src=s;let c=()=>{if(te.size>=_r){let u=te.keys().next().value;u&&te.delete(u)}te.set(s,!0),i()};a.complete?c():d("decode")(a)&&b(a.decode)?a.decode().then(c).catch(c):(a.onload=c,a.onerror=c)}));o.length!==0&&await Promise.all(o)}function Xe(e){return e?p(e)?e:(d("default")(e),d("default")(e)&&e.default&&l(e.default)&&d("src")(e.default)?e.default.src:l(e)&&d("src")(e)&&p(e.src)?e.src:""):""}var $r={getKeyboardAction:Je,preloadImages:qe,normalizeImageSrc:Xe};var Ze=class{static toNum(t){return S(t)?Number(t):t}static round(t,r=0){let n=Math.pow(10,r);return Math.round(t*n)/n}static clamp(t,r,n){return Math.max(r,Math.min(n,t))}static getPercentage(t,r,n=0){if(r===0||r===0n)return 0;if(S(t)||S(r)){let o=BigInt(10**(n+2));return Number(BigInt(t)*100n*o/BigInt(r))/Number(o)}return this.round(t/r*100,n)}static computeMean(t){if(!t.length)return 0;let r=t.map(n=>this.toNum(n));return r.reduce((n,o)=>n+o,0)/r.length}static isAnomaly(t,r,n,o=2){return n===0?!1:Math.abs(t-r)>n*o}static computeRatio(t,r,n=2){return this.getPercentage(t,r,n)}static welfordUpdate(t,r){if(!t)return{welford:{count:1,mean:r,squaredDeviationSum:0},stdDev:0};let{count:n,mean:o,squaredDeviationSum:s}=t,i=n+1,a=r-o,c=o+a/i,u=s+a*(r-c),T=i>1?u/(i-1):0,O=Math.sqrt(T);return{welford:{count:i,mean:c,squaredDeviationSum:u},stdDev:O}}static computeDelta(t,r){if(S(t)&&S(r)){let n=t-r,o=n<0n?-n:n;return{netDelta:n,absDelta:o}}if(k(t)&&k(r)){let n=t-r,o=Math.abs(n);return{netDelta:n,absDelta:o}}throw new Error("Incompatible types: current and past must both be number or both be bigint.")}static computePercentageChange(t,r,n=1n){if(r===0||r===0n)return 0;if(S(t)||S(r)){let o=BigInt(t),s=BigInt(r);return Number((o-s)*(100n*n)/s)/Number(n)}return(t-r)/r*100}};var _=e=>{let t=e.startsWith("#")?e.slice(1):e;if(!f.hexColor.test(t))throw new Error(`Invalid hex color: "${e}"`);let r=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),o=parseInt(t.slice(4,6),16);return[r,n,o]},$=e=>p(e)?_(e):(ue(e),e),re=e=>{let[t,r,n]=$(e),o=s=>{let i=s/255;return i<=.03928?i/12.92:((i+.055)/1.055)**2.4};return .2126*o(t)+.7152*o(r)+.0722*o(n)},pe=(e,t)=>re($(e))<t,Ye=e=>pe(e,.179),de=(e,t)=>re($(e))>t,Qe=(e,t)=>{let{mode:r="tailwind",threshold:n=.179}=t??{},o=de(e,n);return r==="css"?o?"#000000":"#ffffff":o?"text-black":"text-white"},et=e=>{let t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,r=e.replace(t,(o,s,i,a)=>s+s+i+i+a+a),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:null},tt=(e,t,r)=>{let n={r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)};return`rgb(${n.r}, ${n.g}, ${n.b})`};function rt(e){let[t,r,n]=_(e).map(T=>T/255),o=Math.max(t,r,n),s=Math.min(t,r,n),i=(o+s)/2,a=0,c=0,u=o-s;return u!==0&&(c=i>.5?u/(2-o-s):u/(o+s),o===t?a=((r-n)/u+(r<n?6:0))*60:o===r?a=((n-t)/u+2)*60:o===n&&(a=((t-r)/u+4)*60)),{h:a,s:c,l:i}}var nt=e=>{let[t,r,n]=_(e);return[t/255,r/255,n/255]};var Fr={hexToNormalizedRGB:nt,hexToHSL:rt,interpolateColor:tt,hexToRGBShorthand:et,contrastTextColor:Qe,isLumGreaterThan:de,isDarkColor:Ye,isLumLessThan:pe,getLuminance:re,validateRGB:$,hexToRGB:_};function ot(e){if(!R(e))return"";if(p(e))return e;if(e instanceof URL)return e.toString();if(l(e)&&(d("pathname")(e)||d("query")(e))){let{pathname:t="",query:r,hash:n=""}=e,o="";if(l(r)){let a=new URLSearchParams;y.entries(r).forEach(([u,T])=>{R(T)&&(A(T)?h.forEach(T,O=>a.append(u,String(O))):a.append(u,String(T)))});let c=a.toString();c&&(o=`?${c}`)}let s=t||"",i=n&&!n.startsWith("#")?`#${n}`:n||"";return`${s}${o}${i}`}return""}var st=e=>{if(!N(e))return"/";let t=e.trim();return t?t.startsWith("/")?t:P(t)?new URL(t).pathname||"/":`/${t}`:"/"},it=e=>{if(!e)return"";if(!e.includes("#"))return e;try{let t=typeof window<"u"?window.location.origin:"http://localhost",r=new URL(e,t);return typeof window<"u"&&r.origin===window.location.origin?`${r.pathname}${r.search}`:`${r.origin}${r.pathname}${r.search}`}catch{return e.split("#")[0]}},at=({event:e,href:t,behavior:r="smooth",block:n="start"})=>{if(typeof window>"u"||!t.startsWith("#")||/iPad|iPhone|iPod/.test(navigator.userAgent))return!1;let s=t.replace(/^#/,""),i=document.getElementById(s);return i?(e?.preventDefault(),i.scrollIntoView({behavior:r,block:n}),!0):!1};var j=class{};j.normalize=ot,j.extractRelativePath=st,j.stripHash=it,j.handleHashScroll=at;async function ut(e){let t=await fetch(e);if(!t.ok)throw new Error(`\u274C Failed to fetch ${e}: ${t.status} ${t.statusText}`);try{return await t.json()}catch(r){throw new Error(`\u274C Failed to parse JSON from ${e}: ${r.message}`)}}var ct=e=>new Promise(t=>setTimeout(t,e));async function lt(e,t=5,r=500){let n;function o(s){return l(s)&&R(s)&&("code"in s||"message"in s)}for(let s=0;s<=t;s++)try{let i=await e();return s>0&&console.log({},`[Retry] Success on attempt ${s+1}`),i}catch(i){n=i;let a=!1;if(o(i)){let u=i.message??"";a=(i.code??"")==="BAD_DATA"||u.includes("Too Many Requests")}if(!a||s===t){console.error(`[Retry] Failed on attempt ${s+1}:`,i);let u;throw i instanceof Error?u=i:l(i)&&d("message")(i)&&p(i.message)?u=new Error(i.message):u=new Error(String(i||"Retry failed")),u}let c=r*2**s+Math.random()*200;console.warn(`[Retry] Rate limited on attempt ${s+1}, retrying in ${Math.round(c)}ms...`),await new Promise(u=>setTimeout(u,c))}throw console.error("[Retry] All retry attempts exhausted"),n||new Error("Retry attempts exhausted")}var Xt=require("react"),pt=(...e)=>{let t=h.filter(e,Z);return r=>{for(let n of t)b(n)?n(r):Y(n)&&(n.current=r)}};function dt(e){let t=new Map,r=new Set(y.keys(e));return new Proxy(e,{get(n,o,s){if(!p(o)||!r.has(o))return Reflect.get(n,o,s);if(t.has(o))return t.get(o);let i=n[o];if(b(i)){let a=i();return t.set(o,a),a}return i}})}function mt(e,t){return{...y.fromEntries(y.entries(e).filter(([n,o])=>o!==void 0&&o!=="").map(([n,o])=>[n,o.toString()])),...t}}function ft(e,t){return r=>{e?.(r),r.defaultPrevented||t?.(r)}}function Tt(e){let t=y.entries(e),r=h.filter(t,X);return y.fromEntries(r)}function yt(e,t){return Xt.Children.toArray(e).filter(r=>D(r)?r.type?.displayName===t:!1)}var zr={fetchJson:ut,delay:ct,retry:lt},Hr={mergeRefs:pt,lazyProxy:dt,mergeCssVars:mt,mergeEventHandlerClicks:ft,extractDOMProps:Tt,filterChildrenByDisplayName:yt};0&&(module.exports={ArrayUtils,AssertionUtils,CollectionTypeGuards,ColorUtils,ComputationUtils,CoreTypeGuards,DebugUtils,DomUtils,FormatTypeGuards,LinkUtils,ObjectUtils,ProcessorUtils,ReactProcessorUtils,ReactTypeGuards,RenamedArrayMethods,RenamedObjectMethods,TransformersUtils,arrayFilter,arrayFilterNonNullable,arrayFlat,arrayFlatMap,arrayForEach,arrayIncludes,arrayMap,arrayReduce,assertIsAbsoluteUrl,assertIsArray,assertIsBigInt,assertIsBoolean,assertIsBufferLikeObject,assertIsCamelCase,assertIsDefined,assertIsFunction,assertIsInteger,assertIsInternalUrl,assertIsJSONArrayString,assertIsJSONObjectString,assertIsJsonString,assertIsMap,assertIsNil,assertIsNonEmptyString,assertIsNull,assertIsNumber,assertIsRGBTuple,assertIsSet,assertIsString,assertIsSymbol,assertIsUndefined,assertIsWeakMap,assertIsWeakSet,assertObject,capitalizeArray,capitalizeString,capitalizedKeys,contrastTextColor,delay,extractDOMProps,extractRelativePath,fetchJson,filterChildrenByDisplayName,generateKeyMap,getCallerLocation,getKeyboardAction,getLuminance,handleInternalHashScroll,hasChildren,hasDefinedKeys,hasNameMetadata,hasOnClick,hexToHSL,hexToNormalizedRGB,hexToRGB,hexToRGBShorthand,highlight,interpolateColor,isAbsoluteUrl,isArray,isArrayOf,isBigInt,isBoolean,isBufferLikeObject,isCamelCase,isComponentType,isDOMEntry,isDOMPropKey,isDarkColor,isDefined,isElementLike,isElementOfType,isEmail,isForwardRef,isFragment,isFunction,isHTMLString,isHexByteString,isInArray,isInstanceOf,isInteger,isInternalUrl,isJSONArrayString,isJSONObjectString,isJsonString,isKebabCase,isKeyInObject,isKeyOfArray,isKeyOfObject,isLumGreaterThan,isLumLessThan,isMap,isNil,isNonEmptyString,isNull,isNumber,isObject,isPhoneNumber,isPrimitive,isPromise,isPropValid,isRGBTuple,isReactElement,isReactPortal,isRecordOf,isRef,isRefObject,isSet,isShape,isSnakeCase,isString,isSymbol,isUndefined,isValidReactNode,isWeakMap,isWeakSet,lazyProxy,logDev,mergeCssVars,mergeEventHandlerClicks,mergeRefs,normalizeImageSrc,normalizeUrl,objectEntries,objectFromEntries,objectGet,objectHas,objectKeys,objectSet,objectValues,preloadImages,retry,serialize,stripHash,toCamelCase,toKebabCase,toKeyByField,toSnakeCase,validateRGB});
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|