@saas-ui/storybook-addon 2.0.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -529
- package/dist/ChakraProviderDecorator.cjs +33 -0
- package/dist/ChakraProviderDecorator.cjs.map +1 -0
- package/dist/ChakraProviderDecorator.d.cts +3 -0
- package/dist/ChakraProviderDecorator.d.ts +1 -3
- package/dist/ChakraProviderDecorator.js +8 -47
- package/dist/ChakraProviderDecorator.js.map +1 -1
- package/dist/{arg-types.mjs → arg-types.cjs} +4 -2
- package/dist/arg-types.cjs.map +1 -0
- package/dist/arg-types.d.cts +52 -0
- package/dist/arg-types.d.ts +1 -1
- package/dist/arg-types.js +1 -3
- package/dist/arg-types.js.map +1 -1
- package/dist/color-mode/ColorModeSync.cjs +11 -0
- package/dist/color-mode/ColorModeSync.cjs.map +1 -0
- package/dist/color-mode/ColorModeSync.d.cts +6 -0
- package/dist/color-mode/ColorModeSync.js +5 -7
- package/dist/color-mode/ColorModeSync.js.map +1 -1
- package/dist/color-mode/ColorModeTool.cjs +32 -0
- package/dist/color-mode/ColorModeTool.cjs.map +1 -0
- package/dist/color-mode/ColorModeTool.d.cts +5 -0
- package/dist/color-mode/ColorModeTool.js +6 -28
- package/dist/color-mode/ColorModeTool.js.map +1 -1
- package/dist/{constants.mjs → constants.cjs} +8 -2
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.cts +11 -0
- package/dist/constants.js +1 -7
- package/dist/constants.js.map +1 -1
- package/dist/direction/DirectionTool.cjs +12 -0
- package/dist/direction/DirectionTool.cjs.map +1 -0
- package/dist/direction/DirectionTool.d.cts +8 -0
- package/dist/direction/DirectionTool.js +6 -8
- package/dist/direction/DirectionTool.js.map +1 -1
- package/dist/direction/useDirection.cjs +10 -0
- package/dist/direction/useDirection.cjs.map +1 -0
- package/dist/direction/useDirection.d.cts +6 -0
- package/dist/direction/useDirection.js +4 -6
- package/dist/direction/useDirection.js.map +1 -1
- package/dist/{index.mjs → index.cjs} +9 -2
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/dist/manager.cjs +31 -0
- package/dist/manager.cjs.map +1 -0
- package/dist/manager.d.cts +2 -0
- package/dist/manager.d.ts +1 -1
- package/dist/manager.js +8 -31
- package/dist/manager.js.map +1 -1
- package/dist/preview.cjs +33 -0
- package/dist/preview.cjs.map +1 -0
- package/dist/preview.d.cts +5 -0
- package/dist/preview.js +8 -47
- package/dist/preview.js.map +1 -1
- package/dist/theme/ThemeTool.cjs +12 -0
- package/dist/theme/ThemeTool.cjs.map +1 -0
- package/dist/theme/ThemeTool.d.cts +8 -0
- package/dist/theme/ThemeTool.js +6 -29
- package/dist/theme/ThemeTool.js.map +1 -1
- package/package.json +26 -31
- package/dist/ChakraProviderDecorator.mjs +0 -30
- package/dist/ChakraProviderDecorator.mjs.map +0 -1
- package/dist/arg-types.mjs.map +0 -1
- package/dist/color-mode/ColorModeSync.mjs +0 -9
- package/dist/color-mode/ColorModeSync.mjs.map +0 -1
- package/dist/color-mode/ColorModeTool.mjs +0 -10
- package/dist/color-mode/ColorModeTool.mjs.map +0 -1
- package/dist/constants.mjs.map +0 -1
- package/dist/direction/DirectionTool.mjs +0 -10
- package/dist/direction/DirectionTool.mjs.map +0 -1
- package/dist/direction/useDirection.mjs +0 -8
- package/dist/direction/useDirection.mjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/manager.mjs +0 -12
- package/dist/manager.mjs.map +0 -1
- package/dist/preview.mjs +0 -30
- package/dist/preview.mjs.map +0 -1
- package/dist/theme/ThemeTool.mjs +0 -12
- package/dist/theme/ThemeTool.mjs.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/lodash.mergewith/index.js","../src/ChakraProviderDecorator.tsx","../src/color-mode/ColorModeSync.tsx","../src/constants.ts","../src/direction/useDirection.tsx","../../../node_modules/@chakra-ui/anatomy/src/anatomy.ts","../../../node_modules/@chakra-ui/anatomy/src/components.ts","../../../node_modules/@chakra-ui/shared-utils/dist/index.mjs","../../../node_modules/@chakra-ui/styled-system/dist/index.mjs","../../../node_modules/color2k/src/guard.ts","../../../node_modules/color2k/src/ColorError.ts","../../../node_modules/color2k/src/parseToRgba.ts","../../../node_modules/color2k/src/rgba.ts","../../../node_modules/color2k/src/transparentize.ts","../../../node_modules/color2k/src/toHex.ts","../../../node_modules/.pnpm/dlv@1.1.3/node_modules/dlv/index.js","../../../node_modules/@chakra-ui/theme-tools/src/color.ts","../../../node_modules/@chakra-ui/theme-tools/src/component.ts","../../../node_modules/@chakra-ui/theme-tools/src/css-var.ts","../../../node_modules/@chakra-ui/utils/dist/chunk-Y5FGD7DM.mjs","../../../node_modules/@chakra-ui/utils/dist/chunk-M3TFMUOL.mjs","../../../packages/saas-ui-theme-glass/src/components/alert.ts","../../../packages/saas-ui-theme-glass/src/components/button.ts","../../../packages/saas-ui-theme-glass/src/components/card.ts","../../../packages/saas-ui-theme-glass/src/components/checkbox.ts","../../../packages/saas-ui-theme-glass/src/components/close-button.ts","../../../packages/saas-ui-theme-glass/src/components/drawer.ts","../../../packages/saas-ui-theme-glass/src/components/heading.ts","../../../packages/saas-ui-theme-glass/src/components/kbd.ts","../../../packages/saas-ui-theme-glass/src/components/menu.ts","../../../packages/saas-ui-theme-glass/src/components/modal.ts","../../../packages/saas-ui-theme-glass/src/components/progress.ts","../../../packages/saas-ui-theme-glass/src/components/popover.ts","../../../packages/saas-ui-theme-glass/src/components/radio.ts","../../../packages/saas-ui-theme-glass/src/components/slider.ts","../../../packages/saas-ui-theme-glass/src/components/switch.ts","../../../packages/saas-ui-theme-glass/src/components/tooltip.ts","../../../packages/saas-ui-theme-glass/src/components/form.ts","../../../packages/saas-ui-theme-glass/src/components/index.ts","../../../packages/saas-ui-theme-glass/src/theme.ts","../../../packages/saas-ui-theme-glass/src/foundations/colors.ts","../../../packages/saas-ui-theme-glass/src/foundations/typography.ts","../../../packages/saas-ui-theme-glass/src/foundations/sizes.ts","../../../packages/saas-ui-theme-glass/src/foundations/shadows.ts","../../../packages/saas-ui-theme-glass/src/foundations/semantic-tokens.ts"],"names":["require_lodash","__commonJSMin","exports","module","LARGE_ARRAY_SIZE","HASH_UNDEFINED","HOT_COUNT","HOT_SPAN","MAX_SAFE_INTEGER","argsTag","arrayTag","asyncTag","boolTag","dateTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","proxyTag","regexpTag","setTag","stringTag","undefinedTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reRegExpChar","reIsHostCtor","reIsUint","typedArrayTags","freeGlobal","freeSelf","root","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","types","nodeIsTypedArray","apply","func","thisArg","args","baseTimes","n","iteratee","index","result","baseUnary","value","getValue","object","key","overArg","transform","arg","arrayProto","funcProto","objectProto","coreJsData","funcToString","hasOwnProperty","maskSrcKey","uid","nativeObjectToString","objectCtorString","reIsNative","Buffer","Symbol","Uint8Array","allocUnsafe","getPrototype","objectCreate","propertyIsEnumerable","splice","symToStringTag","defineProperty","getNative","nativeIsBuffer","nativeMax","nativeNow","Map","nativeCreate","baseCreate","proto","isObject","Hash","entries","length","entry","hashClear","hashDelete","hashGet","data","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","size","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","inherited","isArr","isArray","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","array","baseFor","createBaseFor","baseGetTag","getRawTag","objectToString","baseIsArguments","isObjectLike","baseIsNative","isMasked","pattern","isFunction","toSource","baseIsTypedArray","isLength","baseKeysIn","nativeKeysIn","isProto","isPrototype","baseMerge","source","srcIndex","customizer","stack","srcValue","baseMergeDeep","newValue","safeGet","keysIn","mergeFunc","stacked","isCommon","isTyped","isArrayLikeObject","copyArray","cloneBuffer","cloneTypedArray","isPlainObject","toPlainObject","initCloneObject","baseRest","start","setToString","overRest","identity","baseSetToString","string","constant","buffer","isDeep","cloneArrayBuffer","arrayBuffer","typedArray","copyObject","props","isNew","createAssigner","assigner","sources","guard","isIterateeCall","fromRight","keysFunc","iterable","map","isKeyable","isOwn","tag","unmasked","type","isArrayLike","Ctor","otherArgs","shortOut","count","lastCalled","stamp","remaining","other","stubFalse","mergeWith","React","extendTheme","makeDecorator","addons","useEffect","useColorMode","ADDON_ID","COLOR_MODE_TOOL_ID","DIRECTION_TOOL_ID","THEME_TOOL_ID","EVENTS","ColorModeSync","setColorMode","channel","colorModeToolCallback","useState","useDirection","initialDirection","direction","setDirection","callback","SaasProvider","useLocalStorage","baseTheme","suiTheme","anatomy","name","called","assert","parts","values","part","toPart","extend","selectors","classnames","className","accordionAnatomy","alertAnatomy","avatarAnatomy","breadcrumbAnatomy","buttonAnatomy","checkboxAnatomy","circularProgressAnatomy","drawerAnatomy","editableAnatomy","formAnatomy","formErrorAnatomy","inputAnatomy","listAnatomy","menuAnatomy","modalAnatomy","numberInputAnatomy","pinInputAnatomy","popoverAnatomy","progressAnatomy","radioAnatomy","selectAnatomy","sliderAnatomy","statAnatomy","switchAnatomy","tableAnatomy","tabsAnatomy","tagAnatomy","cardAnatomy","stepperAnatomy","import_lodash","isImportant","withoutImportant","tokenToCSSVar","scale","theme","valueStr","important","valueWithoutImportant","transformed","createTransform","options","transform2","compose","_a","_value","pipe","fns","v","a","b","toConfig","property","getRtl","rtl","ltr","logical","transformTemplate","getTransformTemplate","getTransformGpuTemplate","filterTemplate","backdropFilterTemplate","getRingTemplate","flexDirectionTemplate","directionMap","valueSet","globalSet","trimSpace","str","parseGradient","isCSSFunction","results","_type","maybeDirection","stops","_values","stop","firstStop","_color","_stop","_stopOrFunc","color2","gradientTransform","isCssVar","analyzeCSSValue","num","unit","wrap","transformFunctions","unitless","isNoneOrZero","space2","divide2","t","background","border","color","effect","filter","flexbox","grid","interactivity","layout","_b","_c","list","get","obj","path","fallback","memoize","fn","cache","memoizedGet","srOnly","srFocusable","getWithPriority","styles","prop","others","position","ring","space","textDecoration","transition","typography","scroll","resolveReference","operand","toExpression","operator","operands","add","subtract","multiply","divide","negate","x","calc","replaceWhiteSpace","replaceValue","escape","escapeSymbol","escapeDot","addPrefix","prefix","toVarReference","toVarDefinition","cssVar","cssVarPrefix","cssVariable","state","post","toGroup","merge","toPeer","pseudoSelectors","pseudoPropNames","systemProps","mergeWith2","layoutSystem","layoutPropNames","propNames","styleProps","createMultiStyleConfigHelpers","config","low","high","Math","min","max","ColorError","Error","constructor","ColorError$1","parseToRgba","trim","toLowerCase","normalizedColor","namedColorRegex","test","nameToHex","reducedHexMatch","reducedHexRegex","exec","arr","Array","from","slice","parseInt","r","hexMatch","hexRegex","rgbaMatch","rgbaRegex","parseFloat","hslaMatch","hslaRegex","h","s","l","hslToRgb","Number","isNaN","hash","i","charCodeAt","colorToInt","replace","compressedColorMap","split","reduce","acc","next","substring","hex","toString","normalizedColorName","amount","join","RegExp","roundColor","round","hue","saturation","lightness","huePrime","chroma","abs","secondComponent","red","green","blue","lightnessModification","finalRed","finalGreen","finalBlue","rgba","alpha","toFixed","transparentize","g","toHex","dlv_es_default","def","p","undef","getColor","opacity","raw","mode","light","dark","isDecimal","toVarRef","toVar","getFallback","runIfFn","valueOrFn","definePartsStyle","defineMultiStyleConfig","$fg","$bg","$b","getBg","c","darkBg","getBorder","variantSubtle","bg","baseStyle","alert_default","variantSolid","colorMode","hoverColor","variantGhost","variantOutline","variantPrimary","variantSecondary","variantTertiary","sizes","button_default","$padding","$shadow","$radius","$border","$borderColor","variantShadow","isHoverable","card_default","checkbox_default","colorScheme","defaultProps","close_button_default","baseStyleOverlay","baseStyleDialog","baseStyleHeader","baseStyleCloseButton","baseStyleBody","baseStyleFooter","modalTheme","drawer_default","heading_default","kbdTheme","kbd_default","baseStyleList","baseStyleItem","baseStyleGroupTitle","baseStyleButton","baseStyleDivider","menuTheme","menu_default","modal_default","progress_default","$popperBg","$arrowBg","$arrowShadowColor","baseStyleContent","popoverTheme","popover_default","radio_default","slider_default","baseStyleTrack","baseStyleThumb","switchTheme","switch_default","tooltip_default","getDefaults","fc","ec","$borderRadius","$height","Input","formLabelTheme","inputTheme","numberInputTheme","pinInputTheme","textareaTheme","nativeSelectTheme","components_default","withDefaultColorScheme","colors","colors_default","fonts","fontSizes","textStyles","sizes_default","shadows","shadows_default","semantic_tokens_default","jsx","jsxs","glassTheme","useThemeSync","themeId","setTheme","themeCallback","ChakraProviderDecorator","getStory","context","parameters","saasuiParams","globalDirection","getTheme","themeOverride","chakraTheme","themeWithDirectionOverride"],"mappings":"0hBAAA,IAAAA,EAAAC,GAAA,CAAAC,EAAAC,IAAA,cAUA,IAAIC,GAAmB,IAGnBC,GAAiB,4BAGjBC,GAAY,IACZC,GAAW,GAGXC,GAAmB,iBAGnBC,GAAU,qBACVC,GAAW,iBACXC,GAAW,yBACXC,GAAU,mBACVC,GAAU,gBACVC,GAAW,iBACXC,GAAU,oBACVC,GAAS,6BACTC,GAAS,eACTC,GAAY,kBACZC,GAAU,gBACVC,GAAY,kBACZC,GAAW,iBACXC,GAAY,kBACZC,GAAS,eACTC,GAAY,kBACZC,GAAe,qBACfC,GAAa,mBAEbC,GAAiB,uBACjBC,GAAc,oBACdC,GAAa,wBACbC,GAAa,wBACbC,GAAU,qBACVC,GAAW,sBACXC,GAAW,sBACXC,GAAW,sBACXC,GAAkB,6BAClBC,GAAY,uBACZC,GAAY,uBAMZC,GAAe,sBAGfC,GAAe,8BAGfC,GAAW,mBAGXC,EAAiB,CAAC,EACtBA,EAAeZ,EAAU,EAAIY,EAAeX,EAAU,EACtDW,EAAeV,EAAO,EAAIU,EAAeT,EAAQ,EACjDS,EAAeR,E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,GAAQsU,GAAA,YAAAA,EAAc,QAASE,EAAS,EACxCC,EAAgB,CAAC,EAACH,GAAA,MAAAA,EAAc,OAEhCI,EAAcJ,GAAA,MAAAA,EAAc,MAC9B,OAAOA,EAAa,OAAU,WAC5BA,EAAa,MAAMF,CAAO,EAC1BE,EAAa,MACftU,EACErD,EAAYF,GAAa8X,IAAmBG,GAAA,YAAAA,EAAa,UAAS,EAClEC,EAAmC,UACvC,IACEjZ,GACE,CACE,UAAAiB,EACA,OAAQ,CACN,OAAQ,CACN,KAAM,CACJ,UAAW,kBACb,CACF,CACF,CACF,EACA+X,CACF,EACF,CAACA,EAAa/X,CAAS,CACzB,EAEA,OACEiX,GAAC9W,GAAA,CAAc,GAAGwX,EAAc,MAAOK,EACrC,UAAAhB,GAACvX,GAAA,EAAc,EACd+X,EAASC,CAAO,GACnB,CAEJ,CACF,CAAC","sourcesContent":["/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\nvar mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = mergeWith;\n","import * as React from 'react'\n\nimport { extendTheme } from '@chakra-ui/react'\nimport { makeDecorator, addons } from '@storybook/preview-api'\nimport { ColorModeSync } from './color-mode/ColorModeSync'\nimport { useDirection } from './direction/useDirection'\nimport { EVENTS, DIRECTION_TOOL_ID } from './constants'\n\nimport {\n SaasProvider,\n useLocalStorage,\n baseTheme,\n theme as suiTheme,\n} from '@saas-ui/react'\n\nimport { theme as baseGlassTheme } from '@saas-ui/theme-glass'\n\nconst glassTheme = extendTheme(baseGlassTheme, suiTheme)\n\nconst useThemeSync = () => {\n const [themeId, setTheme] = useLocalStorage('storybook.theme', '1')\n\n React.useEffect(() => {\n const channel = addons.getChannel()\n const themeCallback = (value: string) => {\n setTheme(value)\n }\n channel.on(EVENTS.SET_THEME, themeCallback)\n\n return () => {\n channel.removeListener(EVENTS.SET_THEME, themeCallback)\n }\n }, [setTheme])\n\n return themeId\n}\n\nexport const ChakraProviderDecorator = makeDecorator({\n name: 'ChakraProviderDecorator',\n parameterName: 'chakra',\n skipIfNoParametersOrOptions: false,\n wrapper: (getStory, context, { parameters }) => {\n const {\n parameters: { saasui: saasuiParams },\n globals: { [DIRECTION_TOOL_ID]: globalDirection },\n } = context\n\n const themeId = useThemeSync()\n\n const getTheme = React.useCallback(() => {\n switch (themeId) {\n case '1':\n return suiTheme\n case '2':\n return glassTheme\n default:\n return baseTheme\n }\n }, [themeId])\n\n const theme = saasuiParams?.theme || getTheme()\n const themeOverride = !!saasuiParams?.theme\n\n const chakraTheme = saasuiParams?.theme\n ? typeof saasuiParams.theme === 'function'\n ? saasuiParams.theme(context)\n : saasuiParams.theme\n : theme\n const direction = useDirection(globalDirection || chakraTheme?.direction)\n const themeWithDirectionOverride = React.useMemo(\n () =>\n extendTheme(\n {\n direction,\n styles: {\n global: {\n body: {\n minHeight: 'var(--chakra-vh)',\n },\n },\n },\n },\n chakraTheme\n ),\n [chakraTheme, direction]\n )\n\n return (\n <SaasProvider {...saasuiParams} theme={themeWithDirectionOverride}>\n <ColorModeSync />\n {getStory(context)}\n </SaasProvider>\n )\n },\n})\n","import { useEffect } from 'react'\nimport { useColorMode } from '@chakra-ui/react'\nimport { addons } from '@storybook/preview-api'\nimport { EVENTS } from '../constants'\n\n/**\n * Render <ColorModeSync /> to sync the storybook color mode with Chakra UI\n */\nexport function ColorModeSync() {\n const { setColorMode } = useColorMode()\n\n useEffect(() => {\n const channel = addons.getChannel()\n\n const colorModeToolCallback = (value: string) => setColorMode(value)\n channel.on(EVENTS.TOGGLE_COLOR_MODE, colorModeToolCallback)\n\n return () => {\n channel.removeListener(EVENTS.TOGGLE_COLOR_MODE, colorModeToolCallback)\n }\n }, [setColorMode])\n\n return null\n}\n","export const ADDON_ID = '@saas-ui/storybook-addon2'\nexport const COLOR_MODE_TOOL_ID = `${ADDON_ID}/color-mode-tool`\nexport const DIRECTION_TOOL_ID = `${ADDON_ID}/direction-tool`\nexport const THEME_TOOL_ID = `${ADDON_ID}/theme-tool`\n\nexport const EVENTS = {\n TOGGLE_COLOR_MODE: `${ADDON_ID}/toggleColorMode`,\n TOGGLE_DIRECTION: `${ADDON_ID}/toggleDirection`,\n SET_THEME: `${ADDON_ID}/setTheme`,\n}\n","import { useEffect, useState } from 'react'\nimport { addons } from '@storybook/preview-api'\nimport { EVENTS } from '../constants'\n\n/**\n * Sync the layout direction to the html element\n */\nexport const useDirection = (initialDirection: 'ltr' | 'rtl' = 'ltr') => {\n const [direction, setDirection] = useState(initialDirection.toLowerCase())\n\n useEffect(() => {\n document.documentElement.dir = direction\n }, [direction])\n\n useEffect(() => {\n const channel = addons.getChannel()\n const callback = (value: string) => setDirection(value)\n channel.on(EVENTS.TOGGLE_DIRECTION, callback)\n return () => {\n channel.removeListener(EVENTS.TOGGLE_DIRECTION, callback)\n }\n }, [setDirection])\n\n return direction\n}\n","/**\n * Used to define the anatomy/parts of a component in a way that provides\n * a consistent API for `className`, css selector and `theming`.\n */\nexport function anatomy<T extends string = string>(\n name: string,\n map = {} as Record<T, Part>,\n): Anatomy<T> {\n let called = false\n\n /**\n * Prevents user from calling `.parts` multiple times.\n * It should only be called once.\n */\n function assert() {\n if (!called) {\n called = true\n return\n }\n\n throw new Error(\n \"[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?\",\n )\n }\n\n /**\n * Add the core parts of the components\n */\n function parts<V extends string>(...values: V[]) {\n assert()\n for (const part of values) {\n ;(map as any)[part] = toPart(part)\n }\n return anatomy(name, map) as unknown as Omit<Anatomy<V>, \"parts\">\n }\n\n /**\n * Extend the component anatomy to includes new parts\n */\n function extend<U extends string>(...parts: U[]) {\n for (const part of parts) {\n if (part in map) continue\n ;(map as any)[part] = toPart(part)\n }\n return anatomy(name, map) as unknown as Omit<Anatomy<T | U>, \"parts\">\n }\n\n /**\n * Get all selectors for the component anatomy\n */\n function selectors() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, (part as any).selector]),\n )\n return value as Record<T, string>\n }\n\n /**\n * Get all classNames for the component anatomy\n */\n function classnames() {\n const value = Object.fromEntries(\n Object.entries(map).map(([key, part]) => [key, (part as any).className]),\n )\n return value as Record<T, string>\n }\n\n /**\n * Creates the part object for the given part\n */\n function toPart(part: string) {\n const el = [\"container\", \"root\"].includes(part ?? \"\")\n ? [name]\n : [name, part]\n const attr = el.filter(Boolean).join(\"__\")\n const className = `chakra-${attr}`\n\n const partObj = {\n className,\n selector: `.${className}`,\n toString: () => part,\n }\n\n return partObj as typeof partObj & string\n }\n\n /**\n * Used to get the derived type of the anatomy\n */\n const __type = {} as T\n\n return {\n parts,\n toPart,\n extend,\n selectors,\n classnames,\n get keys(): T[] {\n return Object.keys(map) as T[]\n },\n __type,\n }\n}\n\ntype Part = {\n className: string\n selector: string\n toString: () => string\n}\n\ntype Anatomy<T extends string> = {\n parts: <V extends string>(...values: V[]) => Omit<Anatomy<V>, \"parts\">\n toPart: (part: string) => Part\n extend: <U extends string>(...parts: U[]) => Omit<Anatomy<T | U>, \"parts\">\n selectors: () => Record<T, string>\n classnames: () => Record<T, string>\n keys: T[]\n __type: T\n}\n","import { anatomy } from \"./anatomy\"\n\n/**\n * **Accordion anatomy**\n * - Root: the root container of the accordion\n * - Container: the accordion item contains the button and panel\n * - Button: the button is the trigger for the panel\n * - Panel: the panel is the content of the accordion item\n * - Icon: the expanded/collapsed icon\n */\nexport const accordionAnatomy = anatomy(\"accordion\")\n .parts(\"root\", \"container\", \"button\", \"panel\")\n .extend(\"icon\")\n\n/**\n * **Alert anatomy**\n * - Title: the alert's title\n * - Description: the alert's description\n * - Icon: the alert's icon\n */\nexport const alertAnatomy = anatomy(\"alert\")\n .parts(\"title\", \"description\", \"container\")\n .extend(\"icon\", \"spinner\")\n\n/**\n * **Avatar anatomy**\n * - Container: the container for the avatar\n * - Label: the avatar initials text\n * - Excess Label: the label or text that represents excess avatar count.\n * Typically used in avatar groups.\n * - Group: the container for the avatar group\n */\nexport const avatarAnatomy = anatomy(\"avatar\")\n .parts(\"label\", \"badge\", \"container\")\n .extend(\"excessLabel\", \"group\")\n\n/**\n * **Breadcrumb anatomy**\n * - Item: the container for a breadcrumb item\n * - Link: the element that represents the breadcrumb link\n * - Container: the container for the breadcrumb items\n * - Separator: the separator between breadcrumb items\n */\nexport const breadcrumbAnatomy = anatomy(\"breadcrumb\")\n .parts(\"link\", \"item\", \"container\")\n .extend(\"separator\")\n\nexport const buttonAnatomy = anatomy(\"button\").parts()\n\nexport const checkboxAnatomy = anatomy(\"checkbox\")\n .parts(\"control\", \"icon\", \"container\")\n .extend(\"label\")\n\nexport const circularProgressAnatomy = anatomy(\"progress\")\n .parts(\"track\", \"filledTrack\")\n .extend(\"label\")\n\nexport const drawerAnatomy = anatomy(\"drawer\")\n .parts(\"overlay\", \"dialogContainer\", \"dialog\")\n .extend(\"header\", \"closeButton\", \"body\", \"footer\")\n\nexport const editableAnatomy = anatomy(\"editable\").parts(\n \"preview\",\n \"input\",\n \"textarea\",\n)\n\nexport const formAnatomy = anatomy(\"form\").parts(\n \"container\",\n \"requiredIndicator\",\n \"helperText\",\n)\n\nexport const formErrorAnatomy = anatomy(\"formError\").parts(\"text\", \"icon\")\n\nexport const inputAnatomy = anatomy(\"input\").parts(\n \"addon\",\n \"field\",\n \"element\",\n \"group\",\n)\n\nexport const listAnatomy = anatomy(\"list\").parts(\"container\", \"item\", \"icon\")\n\nexport const menuAnatomy = anatomy(\"menu\")\n .parts(\"button\", \"list\", \"item\")\n .extend(\"groupTitle\", \"icon\", \"command\", \"divider\")\n\nexport const modalAnatomy = anatomy(\"modal\")\n .parts(\"overlay\", \"dialogContainer\", \"dialog\")\n .extend(\"header\", \"closeButton\", \"body\", \"footer\")\n\nexport const numberInputAnatomy = anatomy(\"numberinput\").parts(\n \"root\",\n \"field\",\n \"stepperGroup\",\n \"stepper\",\n)\n\nexport const pinInputAnatomy = anatomy(\"pininput\").parts(\"field\")\n\nexport const popoverAnatomy = anatomy(\"popover\")\n .parts(\"content\", \"header\", \"body\", \"footer\")\n .extend(\"popper\", \"arrow\", \"closeButton\")\n\nexport const progressAnatomy = anatomy(\"progress\").parts(\n \"label\",\n \"filledTrack\",\n \"track\",\n)\n\nexport const radioAnatomy = anatomy(\"radio\").parts(\n \"container\",\n \"control\",\n \"label\",\n)\n\nexport const selectAnatomy = anatomy(\"select\").parts(\"field\", \"icon\")\n\nexport const sliderAnatomy = anatomy(\"slider\").parts(\n \"container\",\n \"track\",\n \"thumb\",\n \"filledTrack\",\n \"mark\",\n)\n\nexport const statAnatomy = anatomy(\"stat\").parts(\n \"container\",\n \"label\",\n \"helpText\",\n \"number\",\n \"icon\",\n)\n\nexport const switchAnatomy = anatomy(\"switch\").parts(\n \"container\",\n \"track\",\n \"thumb\",\n \"label\",\n)\n\nexport const tableAnatomy = anatomy(\"table\").parts(\n \"table\",\n \"thead\",\n \"tbody\",\n \"tr\",\n \"th\",\n \"td\",\n \"tfoot\",\n \"caption\",\n)\n\nexport const tabsAnatomy = anatomy(\"tabs\").parts(\n \"root\",\n \"tab\",\n \"tablist\",\n \"tabpanel\",\n \"tabpanels\",\n \"indicator\",\n)\n\n/**\n * **Tag anatomy**\n * - Container: the container for the tag\n * - Label: the text content of the tag\n * - closeButton: the close button for the tag\n */\nexport const tagAnatomy = anatomy(\"tag\").parts(\n \"container\",\n \"label\",\n \"closeButton\",\n)\n\nexport const cardAnatomy = anatomy(\"card\").parts(\n \"container\",\n \"header\",\n \"body\",\n \"footer\",\n)\n\nexport const stepperAnatomy = anatomy(\"stepper\").parts(\n \"stepper\",\n \"step\",\n \"title\",\n \"description\",\n \"indicator\",\n \"separator\",\n \"icon\",\n \"number\",\n)\n","// src/index.ts\nvar cx = (...classNames) => classNames.filter(Boolean).join(\" \");\nfunction isDev() {\n return process.env.NODE_ENV !== \"production\";\n}\nfunction isObject(value) {\n const type = typeof value;\n return value != null && (type === \"object\" || type === \"function\") && !Array.isArray(value);\n}\nvar warn = (options) => {\n const { condition, message } = options;\n if (condition && isDev()) {\n console.warn(message);\n }\n};\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nvar isFunction = (value) => typeof value === \"function\";\nvar dataAttr = (condition) => condition ? \"\" : void 0;\nvar ariaAttr = (condition) => condition ? true : void 0;\nfunction callAllHandlers(...fns) {\n return function func(event) {\n fns.some((fn) => {\n fn == null ? void 0 : fn(event);\n return event == null ? void 0 : event.defaultPrevented;\n });\n };\n}\nfunction callAll(...fns) {\n return function mergedFn(arg) {\n fns.forEach((fn) => {\n fn == null ? void 0 : fn(arg);\n });\n };\n}\nexport {\n ariaAttr,\n callAll,\n callAllHandlers,\n cx,\n dataAttr,\n isObject,\n runIfFn,\n warn\n};\n","// src/utils/create-transform.ts\nimport { isObject } from \"@chakra-ui/shared-utils\";\nvar isImportant = (value) => /!(important)?$/.test(value);\nvar withoutImportant = (value) => typeof value === \"string\" ? value.replace(/!(important)?$/, \"\").trim() : value;\nvar tokenToCSSVar = (scale, value) => (theme) => {\n const valueStr = String(value);\n const important = isImportant(valueStr);\n const valueWithoutImportant = withoutImportant(valueStr);\n const key = scale ? `${scale}.${valueWithoutImportant}` : valueWithoutImportant;\n let transformed = isObject(theme.__cssMap) && key in theme.__cssMap ? theme.__cssMap[key].varRef : value;\n transformed = withoutImportant(transformed);\n return important ? `${transformed} !important` : transformed;\n};\nfunction createTransform(options) {\n const { scale, transform: transform2, compose } = options;\n const fn = (value, theme) => {\n var _a;\n const _value = tokenToCSSVar(scale, value)(theme);\n let result = (_a = transform2 == null ? void 0 : transform2(_value, theme)) != null ? _a : _value;\n if (compose) {\n result = compose(result, theme);\n }\n return result;\n };\n return fn;\n}\n\n// src/utils/pipe.ts\nvar pipe = (...fns) => (v) => fns.reduce((a, b) => b(a), v);\n\n// src/utils/prop-config.ts\nfunction toConfig(scale, transform2) {\n return (property) => {\n const result = { property, scale };\n result.transform = createTransform({\n scale,\n transform: transform2\n });\n return result;\n };\n}\nvar getRtl = ({ rtl, ltr }) => (theme) => theme.direction === \"rtl\" ? rtl : ltr;\nfunction logical(options) {\n const { property, scale, transform: transform2 } = options;\n return {\n scale,\n property: getRtl(property),\n transform: scale ? createTransform({\n scale,\n compose: transform2\n }) : transform2\n };\n}\n\n// src/utils/templates.ts\nvar transformTemplate = [\n \"rotate(var(--chakra-rotate, 0))\",\n \"scaleX(var(--chakra-scale-x, 1))\",\n \"scaleY(var(--chakra-scale-y, 1))\",\n \"skewX(var(--chakra-skew-x, 0))\",\n \"skewY(var(--chakra-skew-y, 0))\"\n];\nfunction getTransformTemplate() {\n return [\n \"translateX(var(--chakra-translate-x, 0))\",\n \"translateY(var(--chakra-translate-y, 0))\",\n ...transformTemplate\n ].join(\" \");\n}\nfunction getTransformGpuTemplate() {\n return [\n \"translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)\",\n ...transformTemplate\n ].join(\" \");\n}\nvar filterTemplate = {\n \"--chakra-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-drop-shadow\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n filter: [\n \"var(--chakra-blur)\",\n \"var(--chakra-brightness)\",\n \"var(--chakra-contrast)\",\n \"var(--chakra-grayscale)\",\n \"var(--chakra-hue-rotate)\",\n \"var(--chakra-invert)\",\n \"var(--chakra-saturate)\",\n \"var(--chakra-sepia)\",\n \"var(--chakra-drop-shadow)\"\n ].join(\" \")\n};\nvar backdropFilterTemplate = {\n backdropFilter: [\n \"var(--chakra-backdrop-blur)\",\n \"var(--chakra-backdrop-brightness)\",\n \"var(--chakra-backdrop-contrast)\",\n \"var(--chakra-backdrop-grayscale)\",\n \"var(--chakra-backdrop-hue-rotate)\",\n \"var(--chakra-backdrop-invert)\",\n \"var(--chakra-backdrop-opacity)\",\n \"var(--chakra-backdrop-saturate)\",\n \"var(--chakra-backdrop-sepia)\"\n ].join(\" \"),\n \"--chakra-backdrop-blur\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-brightness\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-contrast\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-grayscale\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-hue-rotate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-invert\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-opacity\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-saturate\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-backdrop-sepia\": \"var(--chakra-empty,/*!*/ /*!*/)\"\n};\nfunction getRingTemplate(value) {\n return {\n \"--chakra-ring-offset-shadow\": `var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)`,\n \"--chakra-ring-shadow\": `var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)`,\n \"--chakra-ring-width\": value,\n boxShadow: [\n `var(--chakra-ring-offset-shadow)`,\n `var(--chakra-ring-shadow)`,\n `var(--chakra-shadow, 0 0 #0000)`\n ].join(\", \")\n };\n}\nvar flexDirectionTemplate = {\n \"row-reverse\": {\n space: \"--chakra-space-x-reverse\",\n divide: \"--chakra-divide-x-reverse\"\n },\n \"column-reverse\": {\n space: \"--chakra-space-y-reverse\",\n divide: \"--chakra-divide-y-reverse\"\n }\n};\n\n// src/utils/parse-gradient.ts\nvar directionMap = {\n \"to-t\": \"to top\",\n \"to-tr\": \"to top right\",\n \"to-r\": \"to right\",\n \"to-br\": \"to bottom right\",\n \"to-b\": \"to bottom\",\n \"to-bl\": \"to bottom left\",\n \"to-l\": \"to left\",\n \"to-tl\": \"to top left\"\n};\nvar valueSet = new Set(Object.values(directionMap));\nvar globalSet = /* @__PURE__ */ new Set([\n \"none\",\n \"-moz-initial\",\n \"inherit\",\n \"initial\",\n \"revert\",\n \"unset\"\n]);\nvar trimSpace = (str) => str.trim();\nfunction parseGradient(value, theme) {\n if (value == null || globalSet.has(value))\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n if (!prevent)\n return `url('${value}')`;\n const regex = /(^[a-z-A-Z]+)\\((.*)\\)/g;\n const results = regex.exec(value);\n const type = results == null ? void 0 : results[1];\n const values = results == null ? void 0 : results[2];\n if (!type || !values)\n return value;\n const _type = type.includes(\"-gradient\") ? type : `${type}-gradient`;\n const [maybeDirection, ...stops] = values.split(\",\").map(trimSpace).filter(Boolean);\n if ((stops == null ? void 0 : stops.length) === 0)\n return value;\n const direction = maybeDirection in directionMap ? directionMap[maybeDirection] : maybeDirection;\n stops.unshift(direction);\n const _values = stops.map((stop) => {\n if (valueSet.has(stop))\n return stop;\n const firstStop = stop.indexOf(\" \");\n const [_color, _stop] = firstStop !== -1 ? [stop.substr(0, firstStop), stop.substr(firstStop + 1)] : [stop];\n const _stopOrFunc = isCSSFunction(_stop) ? _stop : _stop && _stop.split(\" \");\n const key = `colors.${_color}`;\n const color2 = key in theme.__cssMap ? theme.__cssMap[key].varRef : _color;\n return _stopOrFunc ? [\n color2,\n ...Array.isArray(_stopOrFunc) ? _stopOrFunc : [_stopOrFunc]\n ].join(\" \") : color2;\n });\n return `${_type}(${_values.join(\", \")})`;\n}\nvar isCSSFunction = (value) => {\n return typeof value === \"string\" && value.includes(\"(\") && value.includes(\")\");\n};\nvar gradientTransform = (value, theme) => parseGradient(value, theme != null ? theme : {});\n\n// src/utils/transform-functions.ts\nfunction isCssVar(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar analyzeCSSValue = (value) => {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n};\nvar wrap = (str) => (value) => `${str}(${value})`;\nvar transformFunctions = {\n filter(value) {\n return value !== \"auto\" ? value : filterTemplate;\n },\n backdropFilter(value) {\n return value !== \"auto\" ? value : backdropFilterTemplate;\n },\n ring(value) {\n return getRingTemplate(transformFunctions.px(value));\n },\n bgClip(value) {\n return value === \"text\" ? { color: \"transparent\", backgroundClip: \"text\" } : { backgroundClip: value };\n },\n transform(value) {\n if (value === \"auto\")\n return getTransformTemplate();\n if (value === \"auto-gpu\")\n return getTransformGpuTemplate();\n return value;\n },\n vh(value) {\n return value === \"$100vh\" ? \"var(--chakra-vh)\" : value;\n },\n px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n },\n fraction(value) {\n return !(typeof value === \"number\") || value > 1 ? value : `${value * 100}%`;\n },\n float(value, theme) {\n const map = { left: \"right\", right: \"left\" };\n return theme.direction === \"rtl\" ? map[value] : value;\n },\n degree(value) {\n if (isCssVar(value) || value == null)\n return value;\n const unitless = typeof value === \"string\" && !value.endsWith(\"deg\");\n return typeof value === \"number\" || unitless ? `${value}deg` : value;\n },\n gradient: gradientTransform,\n blur: wrap(\"blur\"),\n opacity: wrap(\"opacity\"),\n brightness: wrap(\"brightness\"),\n contrast: wrap(\"contrast\"),\n dropShadow: wrap(\"drop-shadow\"),\n grayscale: wrap(\"grayscale\"),\n hueRotate: (value) => wrap(\"hue-rotate\")(transformFunctions.degree(value)),\n invert: wrap(\"invert\"),\n saturate: wrap(\"saturate\"),\n sepia: wrap(\"sepia\"),\n bgImage(value) {\n if (value == null)\n return value;\n const prevent = isCSSFunction(value) || globalSet.has(value);\n return !prevent ? `url(${value})` : value;\n },\n outline(value) {\n const isNoneOrZero = String(value) === \"0\" || String(value) === \"none\";\n return value !== null && isNoneOrZero ? { outline: \"2px solid transparent\", outlineOffset: \"2px\" } : { outline: value };\n },\n flexDirection(value) {\n var _a;\n const { space: space2, divide: divide2 } = (_a = flexDirectionTemplate[value]) != null ? _a : {};\n const result = { flexDirection: value };\n if (space2)\n result[space2] = 1;\n if (divide2)\n result[divide2] = 1;\n return result;\n }\n};\n\n// src/utils/index.ts\nvar t = {\n borderWidths: toConfig(\"borderWidths\"),\n borderStyles: toConfig(\"borderStyles\"),\n colors: toConfig(\"colors\"),\n borders: toConfig(\"borders\"),\n gradients: toConfig(\"gradients\", transformFunctions.gradient),\n radii: toConfig(\"radii\", transformFunctions.px),\n space: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n spaceT: toConfig(\"space\", pipe(transformFunctions.vh, transformFunctions.px)),\n degreeT(property) {\n return { property, transform: transformFunctions.degree };\n },\n prop(property, scale, transform2) {\n return {\n property,\n scale,\n ...scale && {\n transform: createTransform({ scale, transform: transform2 })\n }\n };\n },\n propT(property, transform2) {\n return { property, transform: transform2 };\n },\n sizes: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.px)),\n sizesT: toConfig(\"sizes\", pipe(transformFunctions.vh, transformFunctions.fraction)),\n shadows: toConfig(\"shadows\"),\n logical,\n blur: toConfig(\"blur\", transformFunctions.blur)\n};\n\n// src/config/background.ts\nvar background = {\n background: t.colors(\"background\"),\n backgroundColor: t.colors(\"backgroundColor\"),\n backgroundImage: t.gradients(\"backgroundImage\"),\n backgroundSize: true,\n backgroundPosition: true,\n backgroundRepeat: true,\n backgroundAttachment: true,\n backgroundClip: { transform: transformFunctions.bgClip },\n bgSize: t.prop(\"backgroundSize\"),\n bgPosition: t.prop(\"backgroundPosition\"),\n bg: t.colors(\"background\"),\n bgColor: t.colors(\"backgroundColor\"),\n bgPos: t.prop(\"backgroundPosition\"),\n bgRepeat: t.prop(\"backgroundRepeat\"),\n bgAttachment: t.prop(\"backgroundAttachment\"),\n bgGradient: t.gradients(\"backgroundImage\"),\n bgClip: { transform: transformFunctions.bgClip }\n};\nObject.assign(background, {\n bgImage: background.backgroundImage,\n bgImg: background.backgroundImage\n});\n\n// src/config/border.ts\nvar border = {\n border: t.borders(\"border\"),\n borderWidth: t.borderWidths(\"borderWidth\"),\n borderStyle: t.borderStyles(\"borderStyle\"),\n borderColor: t.colors(\"borderColor\"),\n borderRadius: t.radii(\"borderRadius\"),\n borderTop: t.borders(\"borderTop\"),\n borderBlockStart: t.borders(\"borderBlockStart\"),\n borderTopLeftRadius: t.radii(\"borderTopLeftRadius\"),\n borderStartStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopLeftRadius\",\n rtl: \"borderTopRightRadius\"\n }\n }),\n borderEndStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomLeftRadius\",\n rtl: \"borderBottomRightRadius\"\n }\n }),\n borderTopRightRadius: t.radii(\"borderTopRightRadius\"),\n borderStartEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderTopRightRadius\",\n rtl: \"borderTopLeftRadius\"\n }\n }),\n borderEndEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: \"borderBottomRightRadius\",\n rtl: \"borderBottomLeftRadius\"\n }\n }),\n borderRight: t.borders(\"borderRight\"),\n borderInlineEnd: t.borders(\"borderInlineEnd\"),\n borderBottom: t.borders(\"borderBottom\"),\n borderBlockEnd: t.borders(\"borderBlockEnd\"),\n borderBottomLeftRadius: t.radii(\"borderBottomLeftRadius\"),\n borderBottomRightRadius: t.radii(\"borderBottomRightRadius\"),\n borderLeft: t.borders(\"borderLeft\"),\n borderInlineStart: {\n property: \"borderInlineStart\",\n scale: \"borders\"\n },\n borderInlineStartRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"],\n rtl: [\"borderTopRightRadius\", \"borderBottomRightRadius\"]\n }\n }),\n borderInlineEndRadius: t.logical({\n scale: \"radii\",\n property: {\n ltr: [\"borderTopRightRadius\", \"borderBottomRightRadius\"],\n rtl: [\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]\n }\n }),\n borderX: t.borders([\"borderLeft\", \"borderRight\"]),\n borderInline: t.borders(\"borderInline\"),\n borderY: t.borders([\"borderTop\", \"borderBottom\"]),\n borderBlock: t.borders(\"borderBlock\"),\n borderTopWidth: t.borderWidths(\"borderTopWidth\"),\n borderBlockStartWidth: t.borderWidths(\"borderBlockStartWidth\"),\n borderTopColor: t.colors(\"borderTopColor\"),\n borderBlockStartColor: t.colors(\"borderBlockStartColor\"),\n borderTopStyle: t.borderStyles(\"borderTopStyle\"),\n borderBlockStartStyle: t.borderStyles(\"borderBlockStartStyle\"),\n borderBottomWidth: t.borderWidths(\"borderBottomWidth\"),\n borderBlockEndWidth: t.borderWidths(\"borderBlockEndWidth\"),\n borderBottomColor: t.colors(\"borderBottomColor\"),\n borderBlockEndColor: t.colors(\"borderBlockEndColor\"),\n borderBottomStyle: t.borderStyles(\"borderBottomStyle\"),\n borderBlockEndStyle: t.borderStyles(\"borderBlockEndStyle\"),\n borderLeftWidth: t.borderWidths(\"borderLeftWidth\"),\n borderInlineStartWidth: t.borderWidths(\"borderInlineStartWidth\"),\n borderLeftColor: t.colors(\"borderLeftColor\"),\n borderInlineStartColor: t.colors(\"borderInlineStartColor\"),\n borderLeftStyle: t.borderStyles(\"borderLeftStyle\"),\n borderInlineStartStyle: t.borderStyles(\"borderInlineStartStyle\"),\n borderRightWidth: t.borderWidths(\"borderRightWidth\"),\n borderInlineEndWidth: t.borderWidths(\"borderInlineEndWidth\"),\n borderRightColor: t.colors(\"borderRightColor\"),\n borderInlineEndColor: t.colors(\"borderInlineEndColor\"),\n borderRightStyle: t.borderStyles(\"borderRightStyle\"),\n borderInlineEndStyle: t.borderStyles(\"borderInlineEndStyle\"),\n borderTopRadius: t.radii([\"borderTopLeftRadius\", \"borderTopRightRadius\"]),\n borderBottomRadius: t.radii([\n \"borderBottomLeftRadius\",\n \"borderBottomRightRadius\"\n ]),\n borderLeftRadius: t.radii([\"borderTopLeftRadius\", \"borderBottomLeftRadius\"]),\n borderRightRadius: t.radii([\n \"borderTopRightRadius\",\n \"borderBottomRightRadius\"\n ])\n};\nObject.assign(border, {\n rounded: border.borderRadius,\n roundedTop: border.borderTopRadius,\n roundedTopLeft: border.borderTopLeftRadius,\n roundedTopRight: border.borderTopRightRadius,\n roundedTopStart: border.borderStartStartRadius,\n roundedTopEnd: border.borderStartEndRadius,\n roundedBottom: border.borderBottomRadius,\n roundedBottomLeft: border.borderBottomLeftRadius,\n roundedBottomRight: border.borderBottomRightRadius,\n roundedBottomStart: border.borderEndStartRadius,\n roundedBottomEnd: border.borderEndEndRadius,\n roundedLeft: border.borderLeftRadius,\n roundedRight: border.borderRightRadius,\n roundedStart: border.borderInlineStartRadius,\n roundedEnd: border.borderInlineEndRadius,\n borderStart: border.borderInlineStart,\n borderEnd: border.borderInlineEnd,\n borderTopStartRadius: border.borderStartStartRadius,\n borderTopEndRadius: border.borderStartEndRadius,\n borderBottomStartRadius: border.borderEndStartRadius,\n borderBottomEndRadius: border.borderEndEndRadius,\n borderStartRadius: border.borderInlineStartRadius,\n borderEndRadius: border.borderInlineEndRadius,\n borderStartWidth: border.borderInlineStartWidth,\n borderEndWidth: border.borderInlineEndWidth,\n borderStartColor: border.borderInlineStartColor,\n borderEndColor: border.borderInlineEndColor,\n borderStartStyle: border.borderInlineStartStyle,\n borderEndStyle: border.borderInlineEndStyle\n});\n\n// src/config/color.ts\nvar color = {\n color: t.colors(\"color\"),\n textColor: t.colors(\"color\"),\n fill: t.colors(\"fill\"),\n stroke: t.colors(\"stroke\")\n};\n\n// src/config/effect.ts\nvar effect = {\n boxShadow: t.shadows(\"boxShadow\"),\n mixBlendMode: true,\n blendMode: t.prop(\"mixBlendMode\"),\n backgroundBlendMode: true,\n bgBlendMode: t.prop(\"backgroundBlendMode\"),\n opacity: true\n};\nObject.assign(effect, {\n shadow: effect.boxShadow\n});\n\n// src/config/filter.ts\nvar filter = {\n filter: { transform: transformFunctions.filter },\n blur: t.blur(\"--chakra-blur\"),\n brightness: t.propT(\"--chakra-brightness\", transformFunctions.brightness),\n contrast: t.propT(\"--chakra-contrast\", transformFunctions.contrast),\n hueRotate: t.propT(\"--chakra-hue-rotate\", transformFunctions.hueRotate),\n invert: t.propT(\"--chakra-invert\", transformFunctions.invert),\n saturate: t.propT(\"--chakra-saturate\", transformFunctions.saturate),\n dropShadow: t.propT(\"--chakra-drop-shadow\", transformFunctions.dropShadow),\n backdropFilter: { transform: transformFunctions.backdropFilter },\n backdropBlur: t.blur(\"--chakra-backdrop-blur\"),\n backdropBrightness: t.propT(\n \"--chakra-backdrop-brightness\",\n transformFunctions.brightness\n ),\n backdropContrast: t.propT(\"--chakra-backdrop-contrast\", transformFunctions.contrast),\n backdropHueRotate: t.propT(\n \"--chakra-backdrop-hue-rotate\",\n transformFunctions.hueRotate\n ),\n backdropInvert: t.propT(\"--chakra-backdrop-invert\", transformFunctions.invert),\n backdropSaturate: t.propT(\"--chakra-backdrop-saturate\", transformFunctions.saturate)\n};\n\n// src/config/flexbox.ts\nvar flexbox = {\n alignItems: true,\n alignContent: true,\n justifyItems: true,\n justifyContent: true,\n flexWrap: true,\n flexDirection: { transform: transformFunctions.flexDirection },\n flex: true,\n flexFlow: true,\n flexGrow: true,\n flexShrink: true,\n flexBasis: t.sizes(\"flexBasis\"),\n justifySelf: true,\n alignSelf: true,\n order: true,\n placeItems: true,\n placeContent: true,\n placeSelf: true,\n gap: t.space(\"gap\"),\n rowGap: t.space(\"rowGap\"),\n columnGap: t.space(\"columnGap\")\n};\nObject.assign(flexbox, {\n flexDir: flexbox.flexDirection\n});\n\n// src/config/grid.ts\nvar grid = {\n gridGap: t.space(\"gridGap\"),\n gridColumnGap: t.space(\"gridColumnGap\"),\n gridRowGap: t.space(\"gridRowGap\"),\n gridColumn: true,\n gridRow: true,\n gridAutoFlow: true,\n gridAutoColumns: true,\n gridColumnStart: true,\n gridColumnEnd: true,\n gridRowStart: true,\n gridRowEnd: true,\n gridAutoRows: true,\n gridTemplate: true,\n gridTemplateColumns: true,\n gridTemplateRows: true,\n gridTemplateAreas: true,\n gridArea: true\n};\n\n// src/config/interactivity.ts\nvar interactivity = {\n appearance: true,\n cursor: true,\n resize: true,\n userSelect: true,\n pointerEvents: true,\n outline: { transform: transformFunctions.outline },\n outlineOffset: true,\n outlineColor: t.colors(\"outlineColor\")\n};\n\n// src/config/layout.ts\nvar layout = {\n width: t.sizesT(\"width\"),\n inlineSize: t.sizesT(\"inlineSize\"),\n height: t.sizes(\"height\"),\n blockSize: t.sizes(\"blockSize\"),\n boxSize: t.sizes([\"width\", \"height\"]),\n minWidth: t.sizes(\"minWidth\"),\n minInlineSize: t.sizes(\"minInlineSize\"),\n minHeight: t.sizes(\"minHeight\"),\n minBlockSize: t.sizes(\"minBlockSize\"),\n maxWidth: t.sizes(\"maxWidth\"),\n maxInlineSize: t.sizes(\"maxInlineSize\"),\n maxHeight: t.sizes(\"maxHeight\"),\n maxBlockSize: t.sizes(\"maxBlockSize\"),\n overflow: true,\n overflowX: true,\n overflowY: true,\n overscrollBehavior: true,\n overscrollBehaviorX: true,\n overscrollBehaviorY: true,\n display: true,\n aspectRatio: true,\n hideFrom: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b.minW) != null ? _c : value;\n const mq = `@media screen and (min-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n hideBelow: {\n scale: \"breakpoints\",\n transform: (value, theme) => {\n var _a, _b, _c;\n const breakpoint = (_c = (_b = (_a = theme.__breakpoints) == null ? void 0 : _a.get(value)) == null ? void 0 : _b._minW) != null ? _c : value;\n const mq = `@media screen and (max-width: ${breakpoint})`;\n return { [mq]: { display: \"none\" } };\n }\n },\n verticalAlign: true,\n boxSizing: true,\n boxDecorationBreak: true,\n float: t.propT(\"float\", transformFunctions.float),\n objectFit: true,\n objectPosition: true,\n visibility: true,\n isolation: true\n};\nObject.assign(layout, {\n w: layout.width,\n h: layout.height,\n minW: layout.minWidth,\n maxW: layout.maxWidth,\n minH: layout.minHeight,\n maxH: layout.maxHeight,\n overscroll: layout.overscrollBehavior,\n overscrollX: layout.overscrollBehaviorX,\n overscrollY: layout.overscrollBehaviorY\n});\n\n// src/config/list.ts\nvar list = {\n listStyleType: true,\n listStylePosition: true,\n listStylePos: t.prop(\"listStylePosition\"),\n listStyleImage: true,\n listStyleImg: t.prop(\"listStyleImage\")\n};\n\n// src/get.ts\nfunction get(obj, path, fallback, index) {\n const key = typeof path === \"string\" ? path.split(\".\") : [path];\n for (index = 0; index < key.length; index += 1) {\n if (!obj)\n break;\n obj = obj[key[index]];\n }\n return obj === void 0 ? fallback : obj;\n}\nvar memoize = (fn) => {\n const cache = /* @__PURE__ */ new WeakMap();\n const memoizedFn = (obj, path, fallback, index) => {\n if (typeof obj === \"undefined\") {\n return fn(obj, path, fallback);\n }\n if (!cache.has(obj)) {\n cache.set(obj, /* @__PURE__ */ new Map());\n }\n const map = cache.get(obj);\n if (map.has(path)) {\n return map.get(path);\n }\n const value = fn(obj, path, fallback, index);\n map.set(path, value);\n return value;\n };\n return memoizedFn;\n};\nvar memoizedGet = memoize(get);\n\n// src/config/others.ts\nvar srOnly = {\n border: \"0px\",\n clip: \"rect(0, 0, 0, 0)\",\n width: \"1px\",\n height: \"1px\",\n margin: \"-1px\",\n padding: \"0px\",\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n position: \"absolute\"\n};\nvar srFocusable = {\n position: \"static\",\n width: \"auto\",\n height: \"auto\",\n clip: \"auto\",\n padding: \"0\",\n margin: \"0\",\n overflow: \"visible\",\n whiteSpace: \"normal\"\n};\nvar getWithPriority = (theme, key, styles) => {\n const result = {};\n const obj = memoizedGet(theme, key, {});\n for (const prop in obj) {\n const isInStyles = prop in styles && styles[prop] != null;\n if (!isInStyles)\n result[prop] = obj[prop];\n }\n return result;\n};\nvar others = {\n srOnly: {\n transform(value) {\n if (value === true)\n return srOnly;\n if (value === \"focusable\")\n return srFocusable;\n return {};\n }\n },\n layerStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `layerStyles.${value}`, styles)\n },\n textStyle: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, `textStyles.${value}`, styles)\n },\n apply: {\n processResult: true,\n transform: (value, theme, styles) => getWithPriority(theme, value, styles)\n }\n};\n\n// src/config/position.ts\nvar position = {\n position: true,\n pos: t.prop(\"position\"),\n zIndex: t.prop(\"zIndex\", \"zIndices\"),\n inset: t.spaceT(\"inset\"),\n insetX: t.spaceT([\"left\", \"right\"]),\n insetInline: t.spaceT(\"insetInline\"),\n insetY: t.spaceT([\"top\", \"bottom\"]),\n insetBlock: t.spaceT(\"insetBlock\"),\n top: t.spaceT(\"top\"),\n insetBlockStart: t.spaceT(\"insetBlockStart\"),\n bottom: t.spaceT(\"bottom\"),\n insetBlockEnd: t.spaceT(\"insetBlockEnd\"),\n left: t.spaceT(\"left\"),\n insetInlineStart: t.logical({\n scale: \"space\",\n property: { ltr: \"left\", rtl: \"right\" }\n }),\n right: t.spaceT(\"right\"),\n insetInlineEnd: t.logical({\n scale: \"space\",\n property: { ltr: \"right\", rtl: \"left\" }\n })\n};\nObject.assign(position, {\n insetStart: position.insetInlineStart,\n insetEnd: position.insetInlineEnd\n});\n\n// src/config/ring.ts\nvar ring = {\n ring: { transform: transformFunctions.ring },\n ringColor: t.colors(\"--chakra-ring-color\"),\n ringOffset: t.prop(\"--chakra-ring-offset-width\"),\n ringOffsetColor: t.colors(\"--chakra-ring-offset-color\"),\n ringInset: t.prop(\"--chakra-ring-inset\")\n};\n\n// src/config/space.ts\nvar space = {\n margin: t.spaceT(\"margin\"),\n marginTop: t.spaceT(\"marginTop\"),\n marginBlockStart: t.spaceT(\"marginBlockStart\"),\n marginRight: t.spaceT(\"marginRight\"),\n marginInlineEnd: t.spaceT(\"marginInlineEnd\"),\n marginBottom: t.spaceT(\"marginBottom\"),\n marginBlockEnd: t.spaceT(\"marginBlockEnd\"),\n marginLeft: t.spaceT(\"marginLeft\"),\n marginInlineStart: t.spaceT(\"marginInlineStart\"),\n marginX: t.spaceT([\"marginInlineStart\", \"marginInlineEnd\"]),\n marginInline: t.spaceT(\"marginInline\"),\n marginY: t.spaceT([\"marginTop\", \"marginBottom\"]),\n marginBlock: t.spaceT(\"marginBlock\"),\n padding: t.space(\"padding\"),\n paddingTop: t.space(\"paddingTop\"),\n paddingBlockStart: t.space(\"paddingBlockStart\"),\n paddingRight: t.space(\"paddingRight\"),\n paddingBottom: t.space(\"paddingBottom\"),\n paddingBlockEnd: t.space(\"paddingBlockEnd\"),\n paddingLeft: t.space(\"paddingLeft\"),\n paddingInlineStart: t.space(\"paddingInlineStart\"),\n paddingInlineEnd: t.space(\"paddingInlineEnd\"),\n paddingX: t.space([\"paddingInlineStart\", \"paddingInlineEnd\"]),\n paddingInline: t.space(\"paddingInline\"),\n paddingY: t.space([\"paddingTop\", \"paddingBottom\"]),\n paddingBlock: t.space(\"paddingBlock\")\n};\nObject.assign(space, {\n m: space.margin,\n mt: space.marginTop,\n mr: space.marginRight,\n me: space.marginInlineEnd,\n marginEnd: space.marginInlineEnd,\n mb: space.marginBottom,\n ml: space.marginLeft,\n ms: space.marginInlineStart,\n marginStart: space.marginInlineStart,\n mx: space.marginX,\n my: space.marginY,\n p: space.padding,\n pt: space.paddingTop,\n py: space.paddingY,\n px: space.paddingX,\n pb: space.paddingBottom,\n pl: space.paddingLeft,\n ps: space.paddingInlineStart,\n paddingStart: space.paddingInlineStart,\n pr: space.paddingRight,\n pe: space.paddingInlineEnd,\n paddingEnd: space.paddingInlineEnd\n});\n\n// src/config/text-decoration.ts\nvar textDecoration = {\n textDecorationColor: t.colors(\"textDecorationColor\"),\n textDecoration: true,\n textDecor: { property: \"textDecoration\" },\n textDecorationLine: true,\n textDecorationStyle: true,\n textDecorationThickness: true,\n textUnderlineOffset: true,\n textShadow: t.shadows(\"textShadow\")\n};\n\n// src/config/transform.ts\nvar transform = {\n clipPath: true,\n transform: t.propT(\"transform\", transformFunctions.transform),\n transformOrigin: true,\n translateX: t.spaceT(\"--chakra-translate-x\"),\n translateY: t.spaceT(\"--chakra-translate-y\"),\n skewX: t.degreeT(\"--chakra-skew-x\"),\n skewY: t.degreeT(\"--chakra-skew-y\"),\n scaleX: t.prop(\"--chakra-scale-x\"),\n scaleY: t.prop(\"--chakra-scale-y\"),\n scale: t.prop([\"--chakra-scale-x\", \"--chakra-scale-y\"]),\n rotate: t.degreeT(\"--chakra-rotate\")\n};\n\n// src/config/transition.ts\nvar transition = {\n transition: true,\n transitionDelay: true,\n animation: true,\n willChange: true,\n transitionDuration: t.prop(\"transitionDuration\", \"transition.duration\"),\n transitionProperty: t.prop(\"transitionProperty\", \"transition.property\"),\n transitionTimingFunction: t.prop(\n \"transitionTimingFunction\",\n \"transition.easing\"\n )\n};\n\n// src/config/typography.ts\nvar typography = {\n fontFamily: t.prop(\"fontFamily\", \"fonts\"),\n fontSize: t.prop(\"fontSize\", \"fontSizes\", transformFunctions.px),\n fontWeight: t.prop(\"fontWeight\", \"fontWeights\"),\n lineHeight: t.prop(\"lineHeight\", \"lineHeights\"),\n letterSpacing: t.prop(\"letterSpacing\", \"letterSpacings\"),\n textAlign: true,\n fontStyle: true,\n textIndent: true,\n wordBreak: true,\n overflowWrap: true,\n textOverflow: true,\n textTransform: true,\n whiteSpace: true,\n isTruncated: {\n transform(value) {\n if (value === true) {\n return {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\"\n };\n }\n }\n },\n noOfLines: {\n static: {\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n display: \"-webkit-box\",\n WebkitBoxOrient: \"vertical\",\n //@ts-ignore\n WebkitLineClamp: \"var(--chakra-line-clamp)\"\n },\n property: \"--chakra-line-clamp\"\n }\n};\n\n// src/config/scroll.ts\nvar scroll = {\n scrollBehavior: true,\n scrollSnapAlign: true,\n scrollSnapStop: true,\n scrollSnapType: true,\n // scroll margin\n scrollMargin: t.spaceT(\"scrollMargin\"),\n scrollMarginTop: t.spaceT(\"scrollMarginTop\"),\n scrollMarginBottom: t.spaceT(\"scrollMarginBottom\"),\n scrollMarginLeft: t.spaceT(\"scrollMarginLeft\"),\n scrollMarginRight: t.spaceT(\"scrollMarginRight\"),\n scrollMarginX: t.spaceT([\"scrollMarginLeft\", \"scrollMarginRight\"]),\n scrollMarginY: t.spaceT([\"scrollMarginTop\", \"scrollMarginBottom\"]),\n // scroll padding\n scrollPadding: t.spaceT(\"scrollPadding\"),\n scrollPaddingTop: t.spaceT(\"scrollPaddingTop\"),\n scrollPaddingBottom: t.spaceT(\"scrollPaddingBottom\"),\n scrollPaddingLeft: t.spaceT(\"scrollPaddingLeft\"),\n scrollPaddingRight: t.spaceT(\"scrollPaddingRight\"),\n scrollPaddingX: t.spaceT([\"scrollPaddingLeft\", \"scrollPaddingRight\"]),\n scrollPaddingY: t.spaceT([\"scrollPaddingTop\", \"scrollPaddingBottom\"])\n};\n\n// src/create-theme-vars/calc.ts\nimport { isObject as isObject2 } from \"@chakra-ui/shared-utils\";\nfunction resolveReference(operand) {\n if (isObject2(operand) && operand.reference) {\n return operand.reference;\n }\n return String(operand);\n}\nvar toExpression = (operator, ...operands) => operands.map(resolveReference).join(` ${operator} `).replace(/calc/g, \"\");\nvar add = (...operands) => `calc(${toExpression(\"+\", ...operands)})`;\nvar subtract = (...operands) => `calc(${toExpression(\"-\", ...operands)})`;\nvar multiply = (...operands) => `calc(${toExpression(\"*\", ...operands)})`;\nvar divide = (...operands) => `calc(${toExpression(\"/\", ...operands)})`;\nvar negate = (x) => {\n const value = resolveReference(x);\n if (value != null && !Number.isNaN(parseFloat(value))) {\n return String(value).startsWith(\"-\") ? String(value).slice(1) : `-${value}`;\n }\n return multiply(value, -1);\n};\nvar calc = Object.assign(\n (x) => ({\n add: (...operands) => calc(add(x, ...operands)),\n subtract: (...operands) => calc(subtract(x, ...operands)),\n multiply: (...operands) => calc(multiply(x, ...operands)),\n divide: (...operands) => calc(divide(x, ...operands)),\n negate: () => calc(negate(x)),\n toString: () => x.toString()\n }),\n {\n add,\n subtract,\n multiply,\n divide,\n negate\n }\n);\n\n// src/create-theme-vars/css-var.ts\nfunction replaceWhiteSpace(value, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue);\n}\nfunction escape(value) {\n const valueStr = replaceWhiteSpace(value.toString());\n return escapeSymbol(escapeDot(valueStr));\n}\nfunction escapeDot(value) {\n if (value.includes(\"\\\\.\"))\n return value;\n const isDecimal = !Number.isInteger(parseFloat(value.toString()));\n return isDecimal ? value.replace(\".\", `\\\\.`) : value;\n}\nfunction escapeSymbol(value) {\n return value.replace(/[!-,/:-@[-^`{-~]/g, \"\\\\$&\");\n}\nfunction addPrefix(value, prefix = \"\") {\n return [prefix, value].filter(Boolean).join(\"-\");\n}\nfunction toVarReference(name, fallback) {\n return `var(${name}${fallback ? `, ${fallback}` : \"\"})`;\n}\nfunction toVarDefinition(value, prefix = \"\") {\n return escape(`--${addPrefix(value, prefix)}`);\n}\nfunction cssVar(name, fallback, cssVarPrefix) {\n const cssVariable = toVarDefinition(name, cssVarPrefix);\n return {\n variable: cssVariable,\n reference: toVarReference(cssVariable, fallback)\n };\n}\nfunction defineCssVars(scope, keys2) {\n const vars = {};\n for (const key of keys2) {\n if (Array.isArray(key)) {\n const [name, fallback] = key;\n vars[name] = cssVar(`${scope}-${name}`, fallback);\n continue;\n }\n vars[key] = cssVar(`${scope}-${key}`);\n }\n return vars;\n}\n\n// ../../utilities/breakpoint-utils/src/breakpoint.ts\nimport { isObject as isObject3 } from \"@chakra-ui/shared-utils\";\nfunction getLastItem(array) {\n const length = array == null ? 0 : array.length;\n return length ? array[length - 1] : void 0;\n}\nfunction analyzeCSSValue2(value) {\n const num = parseFloat(value.toString());\n const unit = value.toString().replace(String(num), \"\");\n return { unitless: !unit, value: num, unit };\n}\nfunction px(value) {\n if (value == null)\n return value;\n const { unitless } = analyzeCSSValue2(value);\n return unitless || typeof value === \"number\" ? `${value}px` : value;\n}\nvar sortByBreakpointValue = (a, b) => parseInt(a[1], 10) > parseInt(b[1], 10) ? 1 : -1;\nvar sortBps = (breakpoints) => Object.fromEntries(Object.entries(breakpoints).sort(sortByBreakpointValue));\nfunction normalize(breakpoints) {\n const sorted = sortBps(breakpoints);\n return Object.assign(Object.values(sorted), sorted);\n}\nfunction keys(breakpoints) {\n const value = Object.keys(sortBps(breakpoints));\n return new Set(value);\n}\nfunction subtract2(value) {\n var _a;\n if (!value)\n return value;\n value = (_a = px(value)) != null ? _a : value;\n const OFFSET = -0.02;\n return typeof value === \"number\" ? `${value + OFFSET}` : value.replace(/(\\d+\\.?\\d*)/u, (m) => `${parseFloat(m) + OFFSET}`);\n}\nfunction toMediaQueryString(min, max) {\n const query = [\"@media screen\"];\n if (min)\n query.push(\"and\", `(min-width: ${px(min)})`);\n if (max)\n query.push(\"and\", `(max-width: ${px(max)})`);\n return query.join(\" \");\n}\nfunction analyzeBreakpoints(breakpoints) {\n var _a;\n if (!breakpoints)\n return null;\n breakpoints.base = (_a = breakpoints.base) != null ? _a : \"0px\";\n const normalized = normalize(breakpoints);\n const queries = Object.entries(breakpoints).sort(sortByBreakpointValue).map(([breakpoint, minW], index, entry) => {\n var _a2;\n let [, maxW] = (_a2 = entry[index + 1]) != null ? _a2 : [];\n maxW = parseFloat(maxW) > 0 ? subtract2(maxW) : void 0;\n return {\n _minW: subtract2(minW),\n breakpoint,\n minW,\n maxW,\n maxWQuery: toMediaQueryString(null, maxW),\n minWQuery: toMediaQueryString(minW),\n minMaxQuery: toMediaQueryString(minW, maxW)\n };\n });\n const _keys = keys(breakpoints);\n const _keysArr = Array.from(_keys.values());\n return {\n keys: _keys,\n normalized,\n isResponsive(test) {\n const keys2 = Object.keys(test);\n return keys2.length > 0 && keys2.every((key) => _keys.has(key));\n },\n asObject: sortBps(breakpoints),\n asArray: normalize(breakpoints),\n details: queries,\n get(key) {\n return queries.find((q) => q.breakpoint === key);\n },\n media: [\n null,\n ...normalized.map((minW) => toMediaQueryString(minW)).slice(1)\n ],\n /**\n * Converts the object responsive syntax to array syntax\n *\n * @example\n * toArrayValue({ base: 1, sm: 2, md: 3 }) // => [1, 2, 3]\n */\n toArrayValue(test) {\n if (!isObject3(test)) {\n throw new Error(\"toArrayValue: value must be an object\");\n }\n const result = _keysArr.map((bp) => {\n var _a2;\n return (_a2 = test[bp]) != null ? _a2 : null;\n });\n while (getLastItem(result) === null) {\n result.pop();\n }\n return result;\n },\n /**\n * Converts the array responsive syntax to object syntax\n *\n * @example\n * toObjectValue([1, 2, 3]) // => { base: 1, sm: 2, md: 3 }\n */\n toObjectValue(test) {\n if (!Array.isArray(test)) {\n throw new Error(\"toObjectValue: value must be an array\");\n }\n return test.reduce((acc, value, index) => {\n const key = _keysArr[index];\n if (key != null && value != null)\n acc[key] = value;\n return acc;\n }, {});\n }\n };\n}\n\n// src/create-theme-vars/create-theme-vars.ts\nimport { isObject as isObject4 } from \"@chakra-ui/shared-utils\";\n\n// src/pseudos.ts\nvar state = {\n hover: (str, post) => `${str}:hover ${post}, ${str}[data-hover] ${post}`,\n focus: (str, post) => `${str}:focus ${post}, ${str}[data-focus] ${post}`,\n focusVisible: (str, post) => `${str}:focus-visible ${post}`,\n focusWithin: (str, post) => `${str}:focus-within ${post}`,\n active: (str, post) => `${str}:active ${post}, ${str}[data-active] ${post}`,\n disabled: (str, post) => `${str}:disabled ${post}, ${str}[data-disabled] ${post}`,\n invalid: (str, post) => `${str}:invalid ${post}, ${str}[data-invalid] ${post}`,\n checked: (str, post) => `${str}:checked ${post}, ${str}[data-checked] ${post}`,\n indeterminate: (str, post) => `${str}:indeterminate ${post}, ${str}[aria-checked=mixed] ${post}, ${str}[data-indeterminate] ${post}`,\n readOnly: (str, post) => `${str}:read-only ${post}, ${str}[readonly] ${post}, ${str}[data-read-only] ${post}`,\n expanded: (str, post) => `${str}:read-only ${post}, ${str}[aria-expanded=true] ${post}, ${str}[data-expanded] ${post}`,\n placeholderShown: (str, post) => `${str}:placeholder-shown ${post}`\n};\nvar toGroup = (fn) => merge((v) => fn(v, \"&\"), \"[role=group]\", \"[data-group]\", \".group\");\nvar toPeer = (fn) => merge((v) => fn(v, \"~ &\"), \"[data-peer]\", \".peer\");\nvar merge = (fn, ...selectors) => selectors.map(fn).join(\", \");\nvar pseudoSelectors = {\n /**\n * Styles for CSS selector `&:hover`\n */\n _hover: \"&:hover, &[data-hover]\",\n /**\n * Styles for CSS Selector `&:active`\n */\n _active: \"&:active, &[data-active]\",\n /**\n * Styles for CSS selector `&:focus`\n *\n */\n _focus: \"&:focus, &[data-focus]\",\n /**\n * Styles for the highlighted state.\n */\n _highlighted: \"&[data-highlighted]\",\n /**\n * Styles to apply when a child of this element has received focus\n * - CSS Selector `&:focus-within`\n */\n _focusWithin: \"&:focus-within\",\n /**\n * Styles to apply when this element has received focus via tabbing\n * - CSS Selector `&:focus-visible`\n */\n _focusVisible: \"&:focus-visible, &[data-focus-visible]\",\n /**\n * Styles to apply when this element is disabled. The passed styles are applied to these CSS selectors:\n * - `&[aria-disabled=true]`\n * - `&:disabled`\n * - `&[data-disabled]`\n * - `&[disabled]`\n */\n _disabled: \"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]\",\n /**\n * Styles for CSS Selector `&:readonly`\n */\n _readOnly: \"&[aria-readonly=true], &[readonly], &[data-readonly]\",\n /**\n * Styles for CSS selector `&::before`\n *\n * NOTE:When using this, ensure the `content` is wrapped in a backtick.\n * @example\n * ```jsx\n * <Box _before={{content:`\"\"` }}/>\n * ```\n */\n _before: \"&::before\",\n /**\n * Styles for CSS selector `&::after`\n *\n * NOTE:When using this, ensure the `content` is wrapped in a backtick.\n * @example\n * ```jsx\n * <Box _after={{content:`\"\"` }}/>\n * ```\n */\n _after: \"&::after\",\n /**\n * Styles for CSS selector `&:empty`\n */\n _empty: \"&:empty\",\n /**\n * Styles to apply when the ARIA attribute `aria-expanded` is `true`\n * - CSS selector `&[aria-expanded=true]`\n */\n _expanded: \"&[aria-expanded=true], &[data-expanded]\",\n /**\n * Styles to apply when the ARIA attribute `aria-checked` is `true`\n * - CSS selector `&[aria-checked=true]`\n */\n _checked: \"&[aria-checked=true], &[data-checked]\",\n /**\n * Styles to apply when the ARIA attribute `aria-grabbed` is `true`\n * - CSS selector `&[aria-grabbed=true]`\n */\n _grabbed: \"&[aria-grabbed=true], &[data-grabbed]\",\n /**\n * Styles for CSS Selector `&[aria-pressed=true]`\n * Typically used to style the current \"pressed\" state of toggle buttons\n */\n _pressed: \"&[aria-pressed=true], &[data-pressed]\",\n /**\n * Styles to apply when the ARIA attribute `aria-invalid` is `true`\n * - CSS selector `&[aria-invalid=true]`\n */\n _invalid: \"&[aria-invalid=true], &[data-invalid]\",\n /**\n * Styles for the valid state\n * - CSS selector `&[data-valid], &[data-state=valid]`\n */\n _valid: \"&[data-valid], &[data-state=valid]\",\n /**\n * Styles for CSS Selector `&[aria-busy=true]` or `&[data-loading=true]`.\n * Useful for styling loading states\n */\n _loading: \"&[data-loading], &[aria-busy=true]\",\n /**\n * Styles to apply when the ARIA attribute `aria-selected` is `true`\n *\n * - CSS selector `&[aria-selected=true]`\n */\n _selected: \"&[aria-selected=true], &[data-selected]\",\n /**\n * Styles for CSS Selector `[hidden=true]`\n */\n _hidden: \"&[hidden], &[data-hidden]\",\n /**\n * Styles for CSS Selector `&:-webkit-autofill`\n */\n _autofill: \"&:-webkit-autofill\",\n /**\n * Styles for CSS Selector `&:nth-child(even)`\n */\n _even: \"&:nth-of-type(even)\",\n /**\n * Styles for CSS Selector `&:nth-child(odd)`\n */\n _odd: \"&:nth-of-type(odd)\",\n /**\n * Styles for CSS Selector `&:first-of-type`\n */\n _first: \"&:first-of-type\",\n /**\n * Styles for CSS selector `&::first-letter`\n *\n * NOTE: This selector is only applied for block-level elements and not preceded by an image or table.\n * @example\n * ```jsx\n * <Text _firstLetter={{ textDecoration: 'underline' }}>Once upon a time</Text>\n * ```\n */\n _firstLetter: \"&::first-letter\",\n /**\n * Styles for CSS Selector `&:last-of-type`\n */\n _last: \"&:last-of-type\",\n /**\n * Styles for CSS Selector `&:not(:first-of-type)`\n */\n _notFirst: \"&:not(:first-of-type)\",\n /**\n * Styles for CSS Selector `&:not(:last-of-type)`\n */\n _notLast: \"&:not(:last-of-type)\",\n /**\n * Styles for CSS Selector `&:visited`\n */\n _visited: \"&:visited\",\n /**\n * Used to style the active link in a navigation\n * Styles for CSS Selector `&[aria-current=page]`\n */\n _activeLink: \"&[aria-current=page]\",\n /**\n * Used to style the current step within a process\n * Styles for CSS Selector `&[aria-current=step]`\n */\n _activeStep: \"&[aria-current=step]\",\n /**\n * Styles to apply when the ARIA attribute `aria-checked` is `mixed`\n * - CSS selector `&[aria-checked=mixed]`\n */\n _indeterminate: \"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]\",\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is hovered\n */\n _groupHover: toGroup(state.hover),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is hovered\n */\n _peerHover: toPeer(state.hover),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is focused\n */\n _groupFocus: toGroup(state.focus),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is focused\n */\n _peerFocus: toPeer(state.focus),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` has visible focus\n */\n _groupFocusVisible: toGroup(state.focusVisible),\n /**\n * Styles to apply when a sibling element with `.peer`or `data-peer` has visible focus\n */\n _peerFocusVisible: toPeer(state.focusVisible),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is active\n */\n _groupActive: toGroup(state.active),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is active\n */\n _peerActive: toPeer(state.active),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is disabled\n */\n _groupDisabled: toGroup(state.disabled),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is disabled\n */\n _peerDisabled: toPeer(state.disabled),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is invalid\n */\n _groupInvalid: toGroup(state.invalid),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is invalid\n */\n _peerInvalid: toPeer(state.invalid),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is checked\n */\n _groupChecked: toGroup(state.checked),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` is checked\n */\n _peerChecked: toPeer(state.checked),\n /**\n * Styles to apply when a parent element with `.group`, `data-group` or `role=group` has focus within\n */\n _groupFocusWithin: toGroup(state.focusWithin),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` has focus within\n */\n _peerFocusWithin: toPeer(state.focusWithin),\n /**\n * Styles to apply when a sibling element with `.peer` or `data-peer` has placeholder shown\n */\n _peerPlaceholderShown: toPeer(state.placeholderShown),\n /**\n * Styles for CSS Selector `&::placeholder`.\n */\n _placeholder: \"&::placeholder\",\n /**\n * Styles for CSS Selector `&:placeholder-shown`.\n */\n _placeholderShown: \"&:placeholder-shown\",\n /**\n * Styles for CSS Selector `&:fullscreen`.\n */\n _fullScreen: \"&:fullscreen\",\n /**\n * Styles for CSS Selector `&::selection`\n */\n _selection: \"&::selection\",\n /**\n * Styles for CSS Selector `[dir=rtl] &`\n * It is applied when a parent element or this element has `dir=\"rtl\"`\n */\n _rtl: \"[dir=rtl] &, &[dir=rtl]\",\n /**\n * Styles for CSS Selector `[dir=ltr] &`\n * It is applied when a parent element or this element has `dir=\"ltr\"`\n */\n _ltr: \"[dir=ltr] &, &[dir=ltr]\",\n /**\n * Styles for CSS Selector `@media (prefers-color-scheme: dark)`\n * It is used when the user has requested the system use a light or dark color theme.\n */\n _mediaDark: \"@media (prefers-color-scheme: dark)\",\n /**\n * Styles for CSS Selector `@media (prefers-reduced-motion: reduce)`\n * It is used when the user has requested the system to reduce the amount of animations.\n */\n _mediaReduceMotion: \"@media (prefers-reduced-motion: reduce)\",\n /**\n * Styles for when `data-theme` is applied to any parent of\n * this component or element.\n */\n _dark: \".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]\",\n /**\n * Styles for when `data-theme` is applied to any parent of\n * this component or element.\n */\n _light: \".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]\",\n /**\n * Styles for the CSS Selector `&[data-orientation=horizontal]`\n */\n _horizontal: \"&[data-orientation=horizontal]\",\n /**\n * Styles for the CSS Selector `&[data-orientation=vertical]`\n */\n _vertical: \"&[data-orientation=vertical]\"\n};\nvar pseudoPropNames = Object.keys(\n pseudoSelectors\n);\n\n// src/create-theme-vars/create-theme-vars.ts\nimport mergeWith from \"lodash.mergewith\";\nfunction tokenToCssVar(token, prefix) {\n return cssVar(String(token).replace(/\\./g, \"-\"), void 0, prefix);\n}\nfunction createThemeVars(flatTokens, options) {\n let cssVars = {};\n const cssMap = {};\n for (const [token, tokenValue] of Object.entries(flatTokens)) {\n const { isSemantic, value } = tokenValue;\n const { variable, reference } = tokenToCssVar(token, options == null ? void 0 : options.cssVarPrefix);\n if (!isSemantic) {\n if (token.startsWith(\"space\")) {\n const keys2 = token.split(\".\");\n const [firstKey, ...referenceKeys] = keys2;\n const negativeLookupKey = `${firstKey}.-${referenceKeys.join(\".\")}`;\n const negativeValue = calc.negate(value);\n const negatedReference = calc.negate(reference);\n cssMap[negativeLookupKey] = {\n value: negativeValue,\n var: variable,\n varRef: negatedReference\n };\n }\n cssVars[variable] = value;\n cssMap[token] = {\n value,\n var: variable,\n varRef: reference\n };\n continue;\n }\n const lookupToken = (maybeToken) => {\n const scale = String(token).split(\".\")[0];\n const withScale = [scale, maybeToken].join(\".\");\n const resolvedTokenValue = flatTokens[withScale];\n if (!resolvedTokenValue)\n return maybeToken;\n const { reference: reference2 } = tokenToCssVar(withScale, options == null ? void 0 : options.cssVarPrefix);\n return reference2;\n };\n const normalizedValue = isObject4(value) ? value : { default: value };\n cssVars = mergeWith(\n cssVars,\n Object.entries(normalizedValue).reduce(\n (acc, [conditionAlias, conditionValue]) => {\n var _a, _b;\n if (!conditionValue)\n return acc;\n const tokenReference = lookupToken(`${conditionValue}`);\n if (conditionAlias === \"default\") {\n acc[variable] = tokenReference;\n return acc;\n }\n const conditionSelector = (_b = (_a = pseudoSelectors) == null ? void 0 : _a[conditionAlias]) != null ? _b : conditionAlias;\n acc[conditionSelector] = { [variable]: tokenReference };\n return acc;\n },\n {}\n )\n );\n cssMap[token] = {\n value: reference,\n var: variable,\n varRef: reference\n };\n }\n return {\n cssVars,\n cssMap\n };\n}\n\n// ../../utilities/object-utils/src/omit.ts\nfunction omit(object, keysToOmit = []) {\n const clone = Object.assign({}, object);\n for (const key of keysToOmit) {\n if (key in clone) {\n delete clone[key];\n }\n }\n return clone;\n}\n\n// ../../utilities/object-utils/src/pick.ts\nfunction pick(object, keysToPick) {\n const result = {};\n for (const key of keysToPick) {\n if (key in object) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// ../../utilities/object-utils/src/walk-object.ts\nfunction isObject5(value) {\n return typeof value === \"object\" && value != null && !Array.isArray(value);\n}\nfunction walkObject(target, predicate, options = {}) {\n const { stop, getKey } = options;\n function inner(value, path = []) {\n var _a;\n if (isObject5(value) || Array.isArray(value)) {\n const result = {};\n for (const [prop, child] of Object.entries(value)) {\n const key = (_a = getKey == null ? void 0 : getKey(prop)) != null ? _a : prop;\n const childPath = [...path, key];\n if (stop == null ? void 0 : stop(value, childPath)) {\n return predicate(value, path);\n }\n result[key] = inner(child, childPath);\n }\n return result;\n }\n return predicate(value, path);\n }\n return inner(target);\n}\n\n// src/create-theme-vars/theme-tokens.ts\nvar tokens = [\n \"colors\",\n \"borders\",\n \"borderWidths\",\n \"borderStyles\",\n \"fonts\",\n \"fontSizes\",\n \"fontWeights\",\n \"gradients\",\n \"letterSpacings\",\n \"lineHeights\",\n \"radii\",\n \"space\",\n \"shadows\",\n \"sizes\",\n \"zIndices\",\n \"transition\",\n \"blur\",\n \"breakpoints\"\n];\nfunction extractTokens(theme) {\n const _tokens = tokens;\n return pick(theme, _tokens);\n}\nfunction extractSemanticTokens(theme) {\n return theme.semanticTokens;\n}\nfunction omitVars(rawTheme) {\n const { __cssMap, __cssVars, __breakpoints, ...cleanTheme } = rawTheme;\n return cleanTheme;\n}\n\n// src/create-theme-vars/flatten-tokens.ts\nvar isSemanticCondition = (key) => pseudoPropNames.includes(key) || \"default\" === key;\nfunction flattenTokens({\n tokens: tokens2,\n semanticTokens\n}) {\n const result = {};\n walkObject(tokens2, (value, path) => {\n if (value == null)\n return;\n result[path.join(\".\")] = { isSemantic: false, value };\n });\n walkObject(\n semanticTokens,\n (value, path) => {\n if (value == null)\n return;\n result[path.join(\".\")] = { isSemantic: true, value };\n },\n {\n stop: (value) => Object.keys(value).every(isSemanticCondition)\n }\n );\n return result;\n}\n\n// src/create-theme-vars/to-css-var.ts\nfunction toCSSVar(rawTheme) {\n var _a;\n const theme = omitVars(rawTheme);\n const tokens2 = extractTokens(theme);\n const semanticTokens = extractSemanticTokens(theme);\n const flatTokens = flattenTokens({ tokens: tokens2, semanticTokens });\n const cssVarPrefix = (_a = theme.config) == null ? void 0 : _a.cssVarPrefix;\n const {\n /**\n * This is more like a dictionary of tokens users will type `green.500`,\n * and their equivalent css variable.\n */\n cssMap,\n /**\n * The extracted css variables will be stored here, and used in\n * the emotion's <Global/> component to attach variables to `:root`\n */\n cssVars\n } = createThemeVars(flatTokens, { cssVarPrefix });\n const defaultCssVars = {\n \"--chakra-ring-inset\": \"var(--chakra-empty,/*!*/ /*!*/)\",\n \"--chakra-ring-offset-width\": \"0px\",\n \"--chakra-ring-offset-color\": \"#fff\",\n \"--chakra-ring-color\": \"rgba(66, 153, 225, 0.6)\",\n \"--chakra-ring-offset-shadow\": \"0 0 #0000\",\n \"--chakra-ring-shadow\": \"0 0 #0000\",\n \"--chakra-space-x-reverse\": \"0\",\n \"--chakra-space-y-reverse\": \"0\"\n };\n Object.assign(theme, {\n __cssVars: { ...defaultCssVars, ...cssVars },\n __cssMap: cssMap,\n __breakpoints: analyzeBreakpoints(theme.breakpoints)\n });\n return theme;\n}\n\n// src/css.ts\nimport { isObject as isObject7, runIfFn as runIfFn2 } from \"@chakra-ui/shared-utils\";\nimport mergeWith3 from \"lodash.mergewith\";\n\n// src/system.ts\nimport mergeWith2 from \"lodash.mergewith\";\nvar systemProps = mergeWith2(\n {},\n background,\n border,\n color,\n flexbox,\n layout,\n filter,\n ring,\n interactivity,\n grid,\n others,\n position,\n effect,\n space,\n scroll,\n typography,\n textDecoration,\n transform,\n list,\n transition\n);\nvar layoutSystem = Object.assign({}, space, layout, flexbox, grid, position);\nvar layoutPropNames = Object.keys(\n layoutSystem\n);\nvar propNames = [...Object.keys(systemProps), ...pseudoPropNames];\nvar styleProps = { ...systemProps, ...pseudoSelectors };\nvar isStyleProp = (prop) => prop in styleProps;\n\n// src/utils/expand-responsive.ts\nimport { isObject as isObject6, runIfFn } from \"@chakra-ui/shared-utils\";\nvar expandResponsive = (styles) => (theme) => {\n if (!theme.__breakpoints)\n return styles;\n const { isResponsive, toArrayValue, media: medias } = theme.__breakpoints;\n const computedStyles = {};\n for (const key in styles) {\n let value = runIfFn(styles[key], theme);\n if (value == null)\n continue;\n value = isObject6(value) && isResponsive(value) ? toArrayValue(value) : value;\n if (!Array.isArray(value)) {\n computedStyles[key] = value;\n continue;\n }\n const queries = value.slice(0, medias.length).length;\n for (let index = 0; index < queries; index += 1) {\n const media = medias == null ? void 0 : medias[index];\n if (!media) {\n computedStyles[key] = value[index];\n continue;\n }\n computedStyles[media] = computedStyles[media] || {};\n if (value[index] == null) {\n continue;\n }\n computedStyles[media][key] = value[index];\n }\n }\n return computedStyles;\n};\n\n// src/utils/split-by-comma.ts\nfunction splitByComma(value) {\n const chunks = [];\n let chunk = \"\";\n let inParens = false;\n for (let i = 0; i < value.length; i++) {\n const char = value[i];\n if (char === \"(\") {\n inParens = true;\n chunk += char;\n } else if (char === \")\") {\n inParens = false;\n chunk += char;\n } else if (char === \",\" && !inParens) {\n chunks.push(chunk);\n chunk = \"\";\n } else {\n chunk += char;\n }\n }\n chunk = chunk.trim();\n if (chunk) {\n chunks.push(chunk);\n }\n return chunks;\n}\n\n// src/css.ts\nfunction isCssVar2(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nvar isCSSVariableTokenValue = (key, value) => key.startsWith(\"--\") && typeof value === \"string\" && !isCssVar2(value);\nvar resolveTokenValue = (theme, value) => {\n var _a, _b;\n if (value == null)\n return value;\n const getVar = (val) => {\n var _a2, _b2;\n return (_b2 = (_a2 = theme.__cssMap) == null ? void 0 : _a2[val]) == null ? void 0 : _b2.varRef;\n };\n const getValue = (val) => {\n var _a2;\n return (_a2 = getVar(val)) != null ? _a2 : val;\n };\n const [tokenValue, fallbackValue] = splitByComma(value);\n value = (_b = (_a = getVar(tokenValue)) != null ? _a : getValue(fallbackValue)) != null ? _b : getValue(value);\n return value;\n};\nfunction getCss(options) {\n const { configs = {}, pseudos = {}, theme } = options;\n const css2 = (stylesOrFn, nested = false) => {\n var _a, _b, _c;\n const _styles = runIfFn2(stylesOrFn, theme);\n const styles = expandResponsive(_styles)(theme);\n let computedStyles = {};\n for (let key in styles) {\n const valueOrFn = styles[key];\n let value = runIfFn2(valueOrFn, theme);\n if (key in pseudos) {\n key = pseudos[key];\n }\n if (isCSSVariableTokenValue(key, value)) {\n value = resolveTokenValue(theme, value);\n }\n let config = configs[key];\n if (config === true) {\n config = { property: key };\n }\n if (isObject7(value)) {\n computedStyles[key] = (_a = computedStyles[key]) != null ? _a : {};\n computedStyles[key] = mergeWith3(\n {},\n computedStyles[key],\n css2(value, true)\n );\n continue;\n }\n let rawValue = (_c = (_b = config == null ? void 0 : config.transform) == null ? void 0 : _b.call(config, value, theme, _styles)) != null ? _c : value;\n rawValue = (config == null ? void 0 : config.processResult) ? css2(rawValue, true) : rawValue;\n const configProperty = runIfFn2(config == null ? void 0 : config.property, theme);\n if (!nested && (config == null ? void 0 : config.static)) {\n const staticStyles = runIfFn2(config.static, theme);\n computedStyles = mergeWith3({}, computedStyles, staticStyles);\n }\n if (configProperty && Array.isArray(configProperty)) {\n for (const property of configProperty) {\n computedStyles[property] = rawValue;\n }\n continue;\n }\n if (configProperty) {\n if (configProperty === \"&\" && isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n } else {\n computedStyles[configProperty] = rawValue;\n }\n continue;\n }\n if (isObject7(rawValue)) {\n computedStyles = mergeWith3({}, computedStyles, rawValue);\n continue;\n }\n computedStyles[key] = rawValue;\n }\n return computedStyles;\n };\n return css2;\n}\nvar css = (styles) => (theme) => {\n const cssFn = getCss({\n theme,\n pseudos: pseudoSelectors,\n configs: systemProps\n });\n return cssFn(styles);\n};\n\n// src/define-styles.ts\nfunction defineStyle(styles) {\n return styles;\n}\nfunction defineStyleConfig(config) {\n return config;\n}\nfunction createMultiStyleConfigHelpers(parts) {\n return {\n definePartsStyle(config) {\n return config;\n },\n defineMultiStyleConfig(config) {\n return { parts, ...config };\n }\n };\n}\n\n// src/style-config.ts\nimport { runIfFn as runIfFn3, isObject as isObject8 } from \"@chakra-ui/shared-utils\";\nimport mergeWith4 from \"lodash.mergewith\";\nfunction normalize2(value, toArray) {\n if (Array.isArray(value))\n return value;\n if (isObject8(value))\n return toArray(value);\n if (value != null)\n return [value];\n}\nfunction getNextIndex(values, i) {\n for (let j = i + 1; j < values.length; j++) {\n if (values[j] != null)\n return j;\n }\n return -1;\n}\nfunction createResolver(theme) {\n const breakpointUtil = theme.__breakpoints;\n return function resolver(config, prop, value, props) {\n var _a, _b;\n if (!breakpointUtil)\n return;\n const result = {};\n const normalized = normalize2(value, breakpointUtil.toArrayValue);\n if (!normalized)\n return result;\n const len = normalized.length;\n const isSingle = len === 1;\n const isMultipart = !!config.parts;\n for (let i = 0; i < len; i++) {\n const key = breakpointUtil.details[i];\n const nextKey = breakpointUtil.details[getNextIndex(normalized, i)];\n const query = toMediaQueryString(key.minW, nextKey == null ? void 0 : nextKey._minW);\n const styles = runIfFn3((_a = config[prop]) == null ? void 0 : _a[normalized[i]], props);\n if (!styles)\n continue;\n if (isMultipart) {\n (_b = config.parts) == null ? void 0 : _b.forEach((part) => {\n mergeWith4(result, {\n [part]: isSingle ? styles[part] : { [query]: styles[part] }\n });\n });\n continue;\n }\n if (!isMultipart) {\n if (isSingle)\n mergeWith4(result, styles);\n else\n result[query] = styles;\n continue;\n }\n result[query] = styles;\n }\n return result;\n };\n}\nfunction resolveStyleConfig(config) {\n return (props) => {\n var _a;\n const { variant, size, theme } = props;\n const recipe = createResolver(theme);\n return mergeWith4(\n {},\n runIfFn3((_a = config.baseStyle) != null ? _a : {}, props),\n recipe(config, \"sizes\", size, props),\n recipe(config, \"variants\", variant, props)\n );\n };\n}\n\n// src/get-css-var.ts\nfunction getCSSVar(theme, scale, value) {\n var _a, _b, _c;\n return (_c = (_b = (_a = theme.__cssMap) == null ? void 0 : _a[`${scale}.${value}`]) == null ? void 0 : _b.varRef) != null ? _c : value;\n}\n\n// src/theming-props.ts\nfunction omitThemingProps(props) {\n return omit(props, [\"styleConfig\", \"size\", \"variant\", \"colorScheme\"]);\n}\nexport {\n addPrefix,\n background,\n border,\n calc,\n color,\n createMultiStyleConfigHelpers,\n css,\n cssVar,\n defineCssVars,\n defineStyle,\n defineStyleConfig,\n effect,\n filter,\n flattenTokens,\n flexbox,\n getCSSVar,\n getCss,\n grid,\n interactivity,\n isStyleProp,\n layout,\n layoutPropNames,\n list,\n omitThemingProps,\n others,\n position,\n propNames,\n pseudoPropNames,\n pseudoSelectors,\n resolveStyleConfig,\n ring,\n scroll,\n space,\n systemProps,\n textDecoration,\n toCSSVar,\n toVarDefinition,\n toVarReference,\n tokenToCSSVar,\n transform,\n transition,\n typography\n};\n","/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low: number, high: number, value: number): number {\n return Math.min(Math.max(low, value), high);\n}\n\nexport default guard;\n","class ColorError extends Error {\n constructor(color: string) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\n\nexport default ColorError;\n","import guard from './guard';\nimport ColorError from './ColorError';\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color: string): [number, number, number, number] {\n if (typeof color !== 'string') throw new ColorError(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(r(x, 2), 16)),\n parseInt(r(arr[3] || 'f', 2), 16) / 255,\n ] as [number, number, number, number];\n }\n\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(x, 16)),\n parseInt(arr[3] || 'ff', 16) / 255,\n ] as [number, number, number, number];\n }\n\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [\n ...arr.slice(0, 3).map((x) => parseInt(x, 10)),\n parseFloat(arr[3] || '1'),\n ] as [number, number, number, number];\n }\n\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError(color);\n if (guard(0, 100, l) !== l) throw new ColorError(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a] as [\n number,\n number,\n number,\n number\n ];\n }\n\n throw new ColorError(color);\n}\n\nfunction hash(str: string) {\n let hash = 5381;\n let i = str.length;\n\n while (i) {\n hash = (hash * 33) ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\n\nconst colorToInt = (x: string) => parseInt(x.replace(/_/g, ''), 36);\n\nconst compressedColorMap =\n '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'\n .split(' ')\n .reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n\n acc[key] = `${prefix}${hex}`;\n return acc;\n }, {} as { [key: string]: string });\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color: string): string {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError(color);\n return `#${result}`;\n}\n\nconst r = (str: string, amount: number) =>\n Array.from(Array(amount))\n .map(() => str)\n .join('');\n\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(\n `^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(\n ',\\\\s*(\\\\d+)\\\\s*',\n 2\n )}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`,\n 'i'\n);\nconst hslaRegex =\n /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\n\nconst roundColor = (color: number): number => {\n return Math.round(color * 255);\n};\n\nconst hslToRgb = (\n hue: number,\n saturation: number,\n lightness: number\n): [number, number, number] => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor) as [number, number, number];\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (((hue % 360) + 360) % 360) / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1));\n\n let red = 0;\n let green = 0;\n let blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n\n return [finalRed, finalGreen, finalBlue].map(roundColor) as [\n number,\n number,\n number\n ];\n};\n\nexport default parseToRgba;\n","import guard from './guard';\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red: number, green: number, blue: number, alpha: number): string {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(\n 0,\n 255,\n green\n ).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(\n guard(0, 1, alpha).toFixed(3)\n )})`;\n}\n\nexport default rgba;\n","import parseToRgba from './parseToRgba';\nimport rgba from './rgba';\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color: string, amount: number): string {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\nexport default transparentize;\n","import parseToRgba from './parseToRgba';\nimport guard from './guard';\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color: string): string {\n const [r, g, b, a] = parseToRgba(color);\n\n let hex = (x: number) => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\nexport default toHex;\n","export default function dlv(obj, key, def, p, undef) {\n\tkey = key.split ? key.split('.') : key;\n\tfor (p = 0; p < key.length; p++) {\n\t\tobj = obj ? obj[key[p]] : undef;\n\t}\n\treturn obj === undef ? def : obj;\n}\n","import { getCSSVar } from \"@chakra-ui/styled-system\"\nimport {\n toHex,\n parseToRgba,\n transparentize as setTransparency,\n mix,\n darken as reduceLightness,\n lighten as increaseLightness,\n getContrast,\n parseToHsla,\n hsla,\n getLuminance,\n} from \"color2k\"\n\nimport get from \"dlv\"\n\ntype Dict = { [key: string]: any }\nconst isEmptyObject = (obj: any) => Object.keys(obj).length === 0\n\n/**\n * Get the color raw value from theme\n * @param theme - the theme object\n * @param color - the color path (\"green.200\")\n * @param fallback - the fallback color\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const getColor = (theme: Dict, color: string, fallback?: string) => {\n const hex = get(theme, `colors.${color}`, color)\n try {\n toHex(hex)\n return hex\n } catch {\n // returning black to stay consistent with TinyColor behaviour so as to prevent breaking change\n return fallback ?? \"#000000\"\n }\n}\n\n/**\n * Get the color css variable from theme\n */\nexport const getColorVar = (theme: Dict, color: string, fallback?: string) => {\n return getCSSVar(theme, \"colors\", color) ?? fallback\n}\n\nconst getBrightness = (color: string) => {\n const [r, g, b] = parseToRgba(color)\n // http://www.w3.org/TR/AERT#color-contrast\n return (r * 299 + g * 587 + b * 114) / 1000\n}\n\n/**\n * Determines if the tone of given color is \"light\" or \"dark\"\n * @param color - the color in hex, rgb, or hsl\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const tone = (color: string) => (theme: Dict) => {\n const hex = getColor(theme, color)\n const brightness = getBrightness(hex)\n const isDark = brightness < 128\n return isDark ? \"dark\" : \"light\"\n}\n\n/**\n * Determines if a color tone is \"dark\"\n * @param color - the color in hex, rgb, or hsl\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const isDark = (color: string) => (theme: Dict) =>\n tone(color)(theme) === \"dark\"\n\n/**\n * Determines if a color tone is \"light\"\n * @param color - the color in hex, rgb, or hsl\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const isLight = (color: string) => (theme: Dict) =>\n tone(color)(theme) === \"light\"\n\n/**\n * Make a color transparent\n * @param color - the color in hex, rgb, or hsl\n * @param opacity - the amount of opacity the color should have (0-1)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const transparentize =\n (color: string, opacity: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return setTransparency(raw, 1 - opacity)\n }\n\n/**\n * Add white to a color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount white to add (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const whiten = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return toHex(mix(raw, \"#fff\", amount))\n}\n\n/**\n * Add black to a color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount black to add (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const blacken = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return toHex(mix(raw, \"#000\", amount / 100))\n}\n\n/**\n * Darken a specified color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount to darken (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const darken = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n return toHex(reduceLightness(raw, amount / 100))\n}\n\n/**\n * Lighten a specified color\n * @param color - the color in hex, rgb, or hsl\n * @param amount - the amount to lighten (0-100)\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const lighten = (color: string, amount: number) => (theme: Dict) => {\n const raw = getColor(theme, color)\n toHex(increaseLightness(raw, amount / 100))\n}\n\n/**\n * Checks the contract ratio of between 2 colors,\n * based on the Web Content Accessibility Guidelines (Version 2.0).\n *\n * @param fg - the foreground or text color\n * @param bg - the background color\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const contrast = (fg: string, bg: string) => (theme: Dict) =>\n getContrast(getColor(theme, bg), getColor(theme, fg))\n\ninterface WCAG2Params {\n level?: \"AA\" | \"AAA\"\n size?: \"large\" | \"small\"\n}\n\n/**\n * Checks if a color meets the Web Content Accessibility\n * Guidelines (Version 2.0) for contrast ratio.\n *\n * @param textColor - the foreground or text color\n * @param bgColor - the background color\n * @param options\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const isAccessible =\n (textColor: string, bgColor: string, options?: WCAG2Params) =>\n (theme: Dict) =>\n isReadable(getColor(theme, bgColor), getColor(theme, textColor), options)\n\nexport function isReadable(\n color1: string,\n color2: string,\n wcag2: WCAG2Params = { level: \"AA\", size: \"small\" },\n): boolean {\n const readabilityLevel = readability(color1, color2)\n switch ((wcag2.level ?? \"AA\") + (wcag2.size ?? \"small\")) {\n case \"AAsmall\":\n case \"AAAlarge\":\n return readabilityLevel >= 4.5\n case \"AAlarge\":\n return readabilityLevel >= 3\n case \"AAAsmall\":\n return readabilityLevel >= 7\n default:\n return false\n }\n}\n\nexport function readability(color1: string, color2: string): number {\n return (\n (Math.max(getLuminance(color1), getLuminance(color2)) + 0.05) /\n (Math.min(getLuminance(color1), getLuminance(color2)) + 0.05)\n )\n}\n/**\n *\n * @deprecated This will be removed in the next major release.\n */\nexport const complementary = (color: string) => (theme: Dict) => {\n const raw = getColor(theme, color)\n const hsl = parseToHsla(raw)\n const complementHsl: [number, number, number, number] = Object.assign(hsl, [\n (hsl[0] + 180) % 360,\n ])\n return toHex(hsla(...complementHsl))\n}\n\nexport function generateStripe(\n size = \"1rem\",\n color = \"rgba(255, 255, 255, 0.15)\",\n) {\n return {\n backgroundImage: `linear-gradient(\n 45deg,\n ${color} 25%,\n transparent 25%,\n transparent 50%,\n ${color} 50%,\n ${color} 75%,\n transparent 75%,\n transparent\n )`,\n backgroundSize: `${size} ${size}`,\n }\n}\n\ninterface RandomColorOptions {\n /**\n * If passed, string will be used to generate\n * random color\n */\n string?: string\n /**\n * List of colors to pick from at random\n */\n colors?: string[]\n}\n\nconst randomHex = () =>\n `#${Math.floor(Math.random() * 0xffffff)\n .toString(16)\n .padEnd(6, \"0\")}`\n\nexport function randomColor(opts?: RandomColorOptions) {\n const fallback = randomHex()\n\n if (!opts || isEmptyObject(opts)) {\n return fallback\n }\n\n if (opts.string && opts.colors) {\n return randomColorFromList(opts.string, opts.colors)\n }\n\n if (opts.string && !opts.colors) {\n return randomColorFromString(opts.string)\n }\n\n if (opts.colors && !opts.string) {\n return randomFromList(opts.colors)\n }\n\n return fallback\n}\n\nfunction randomColorFromString(str: string) {\n let hash = 0\n if (str.length === 0) return hash.toString()\n for (let i = 0; i < str.length; i += 1) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash)\n hash = hash & hash\n }\n let color = \"#\"\n for (let j = 0; j < 3; j += 1) {\n const value = (hash >> (j * 8)) & 255\n color += `00${value.toString(16)}`.substr(-2)\n }\n return color\n}\n\nfunction randomColorFromList(str: string, list: string[]) {\n let index = 0\n if (str.length === 0) return list[0]\n for (let i = 0; i < str.length; i += 1) {\n index = str.charCodeAt(i) + ((index << 5) - index)\n index = index & index\n }\n index = ((index % list.length) + list.length) % list.length\n return list[index]\n}\n\nfunction randomFromList(list: string[]) {\n return list[Math.floor(Math.random() * list.length)]\n}\n","import type {\n SystemStyleObject,\n StyleFunctionProps,\n SystemStyleInterpolation,\n} from \"@chakra-ui/styled-system\"\n\nexport type {\n StyleConfig,\n MultiStyleConfig,\n SystemStyleObject,\n // StyleFunctionProps,\n SystemStyleFunction,\n SystemStyleInterpolation,\n PartsStyleObject,\n PartsStyleFunction,\n PartsStyleInterpolation,\n} from \"@chakra-ui/styled-system\"\n\n/* -----------------------------------------------------------------------------\n * Global Style object definitions\n * -----------------------------------------------------------------------------*/\n\nexport type GlobalStyleProps = StyleFunctionProps\n\nexport type GlobalStyles = {\n global?: SystemStyleInterpolation\n}\n\nexport type JSXElementStyles = {\n [K in keyof JSX.IntrinsicElements]?: SystemStyleObject\n}\n\nexport type Styles = GlobalStyles & JSXElementStyles\n\nexport function mode<T>(light: T, dark: T) {\n return (props: Record<string, any> | StyleFunctionProps) =>\n props.colorMode === \"dark\" ? dark : light\n}\n\nexport function orient<T>(options: {\n orientation?: \"vertical\" | \"horizontal\"\n vertical: T\n horizontal: T\n}) {\n const { orientation, vertical, horizontal } = options\n if (!orientation) return {}\n return orientation === \"vertical\" ? vertical : horizontal\n}\n\nexport type { StyleFunctionProps }\n","export function isDecimal(value: any) {\n return !Number.isInteger(parseFloat(value.toString()))\n}\n\nfunction replaceWhiteSpace(value: string, replaceValue = \"-\") {\n return value.replace(/\\s+/g, replaceValue)\n}\n\nfunction escape(value: string | number) {\n const valueStr = replaceWhiteSpace(value.toString())\n if (valueStr.includes(\"\\\\.\")) return value\n return isDecimal(value) ? valueStr.replace(\".\", `\\\\.`) : value\n}\n\nexport function addPrefix(value: string, prefix = \"\") {\n return [prefix, escape(value)].filter(Boolean).join(\"-\")\n}\n\nexport function toVarRef(name: string, fallback?: string) {\n return `var(${escape(name)}${fallback ? `, ${fallback}` : \"\"})`\n}\n\nexport function toVar(value: string, prefix = \"\") {\n return `--${addPrefix(value, prefix)}`\n}\n\nexport type CSSVar = {\n variable: string\n reference: string\n}\n\nexport type CSSVarOptions = {\n fallback?: string | CSSVar\n prefix?: string\n}\n\nexport function cssVar(name: string, options?: CSSVarOptions) {\n const cssVariable = toVar(name, options?.prefix)\n return {\n variable: cssVariable,\n reference: toVarRef(cssVariable, getFallback(options?.fallback)),\n }\n}\n\nfunction getFallback(fallback?: string | CSSVar) {\n if (typeof fallback === \"string\") return fallback\n return fallback?.reference\n}\n","// src/assertion.ts\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isNotNumber(value) {\n return typeof value !== \"number\" || Number.isNaN(value) || !Number.isFinite(value);\n}\nfunction isNumeric(value) {\n return value != null && value - parseFloat(value) + 1 >= 0;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isEmptyArray(value) {\n return isArray(value) && value.length === 0;\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\nfunction isDefined(value) {\n return typeof value !== \"undefined\" && value !== void 0;\n}\nfunction isUndefined(value) {\n return typeof value === \"undefined\" || value === void 0;\n}\nfunction isObject(value) {\n const type = typeof value;\n return value != null && (type === \"object\" || type === \"function\") && !isArray(value);\n}\nfunction isEmptyObject(value) {\n return isObject(value) && Object.keys(value).length === 0;\n}\nfunction isNotEmptyObject(value) {\n return value && !isEmptyObject(value);\n}\nfunction isNull(value) {\n return value == null;\n}\nfunction isString(value) {\n return Object.prototype.toString.call(value) === \"[object String]\";\n}\nfunction isCssVar(value) {\n return /^var\\(--.+\\)$/.test(value);\n}\nfunction isEmpty(value) {\n if (isArray(value))\n return isEmptyArray(value);\n if (isObject(value))\n return isEmptyObject(value);\n if (value == null || value === \"\")\n return true;\n return false;\n}\nvar __DEV__ = process.env.NODE_ENV !== \"production\";\nvar __TEST__ = process.env.NODE_ENV === \"test\";\nfunction isRefObject(val) {\n return \"current\" in val;\n}\nfunction isInputEvent(value) {\n return value && isObject(value) && isObject(value.target);\n}\n\nexport {\n isNumber,\n isNotNumber,\n isNumeric,\n isArray,\n isEmptyArray,\n isFunction,\n isDefined,\n isUndefined,\n isObject,\n isEmptyObject,\n isNotEmptyObject,\n isNull,\n isString,\n isCssVar,\n isEmpty,\n __DEV__,\n __TEST__,\n isRefObject,\n isInputEvent\n};\n","import {\n __DEV__,\n isFunction,\n isNumber\n} from \"./chunk-Y5FGD7DM.mjs\";\n\n// src/function.ts\nfunction runIfFn(valueOrFn, ...args) {\n return isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;\n}\nfunction callAllHandlers(...fns) {\n return function func(event) {\n fns.some((fn) => {\n fn == null ? void 0 : fn(event);\n return event == null ? void 0 : event.defaultPrevented;\n });\n };\n}\nfunction callAll(...fns) {\n return function mergedFn(arg) {\n fns.forEach((fn) => {\n fn == null ? void 0 : fn(arg);\n });\n };\n}\nvar compose = (fn1, ...fns) => fns.reduce(\n (f1, f2) => (...args) => f1(f2(...args)),\n fn1\n);\nfunction once(fn) {\n let result;\n return function func(...args) {\n if (fn) {\n result = fn.apply(this, args);\n fn = null;\n }\n return result;\n };\n}\nvar noop = () => {\n};\nvar warn = /* @__PURE__ */ once((options) => () => {\n const { condition, message } = options;\n if (condition && __DEV__) {\n console.warn(message);\n }\n});\nvar error = /* @__PURE__ */ once((options) => () => {\n const { condition, message } = options;\n if (condition && __DEV__) {\n console.error(message);\n }\n});\nvar pipe = (...fns) => (v) => fns.reduce((a, b) => b(a), v);\nvar distance1D = (a, b) => Math.abs(a - b);\nvar isPoint = (point) => \"x\" in point && \"y\" in point;\nfunction distance(a, b) {\n if (isNumber(a) && isNumber(b)) {\n return distance1D(a, b);\n }\n if (isPoint(a) && isPoint(b)) {\n const xDelta = distance1D(a.x, b.x);\n const yDelta = distance1D(a.y, b.y);\n return Math.sqrt(xDelta ** 2 + yDelta ** 2);\n }\n return 0;\n}\n\nexport {\n runIfFn,\n callAllHandlers,\n callAll,\n compose,\n once,\n noop,\n warn,\n error,\n pipe,\n distance\n};\n","import { alertAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n StyleFunctionProps,\n} from '@chakra-ui/styled-system'\nimport { transparentize } from '@chakra-ui/theme-tools'\n\nconst { definePartsStyle, defineMultiStyleConfig } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $fg = cssVar('alert-fg')\nconst $bg = cssVar('alert-bg')\nconst $b = cssVar('alert-border')\n\nfunction getBg(props: StyleFunctionProps) {\n const { theme, colorScheme: c } = props\n const darkBg = transparentize(`${c}.600`, 0.16)(theme)\n return {\n light: `colors.${c}.100`,\n dark: darkBg,\n }\n}\n\nfunction getBorder(props: StyleFunctionProps) {\n const { theme, colorScheme: c } = props\n const darkBg = transparentize(`${c}.300`, 0.16)(theme)\n return {\n light: `colors.${c}.200`,\n dark: darkBg,\n }\n}\n\nconst variantSubtle = definePartsStyle((props) => {\n const { colorScheme: c } = props\n const bg = getBg(props)\n const border = getBorder(props)\n return {\n container: {\n borderWidth: '1px',\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.light,\n [$b.variable]: border.light,\n _dark: {\n [$fg.variable]: `colors.${c}.500`,\n [$bg.variable]: bg.dark,\n [$b.variable]: border.dark,\n },\n },\n }\n})\n\nconst baseStyle = definePartsStyle(() => {\n return {\n container: {\n borderColor: $b.reference,\n borderRadius: 'md',\n fontSize: 'sm',\n },\n icon: {\n w: 4,\n h: 5,\n },\n title: {\n fontSize: 'sm',\n fontWeight: 'medium',\n },\n description: {\n color: 'muted',\n },\n }\n})\n\nexport default defineMultiStyleConfig({\n defaultProps: {\n size: 'sm',\n colorScheme: 'primary',\n },\n baseStyle,\n variants: {\n subtle: variantSubtle,\n },\n})\n","import { defineStyle, defineStyleConfig } from '@chakra-ui/styled-system'\n\nconst variantSolid = defineStyle((props) => {\n const { colorScheme: c, colorMode } = props\n\n let color = `${c}.500`\n let hoverColor = `${c}.600`\n\n if (c === 'neutral' && colorMode === 'dark') {\n color = 'white'\n hoverColor = 'whiteAlpha.800'\n } else if (c === 'neutral') {\n color = 'black'\n hoverColor = 'blackAlpha.800'\n }\n\n return {\n borderWidth: '1px',\n borderColor: color,\n boxShadow: 'xs',\n bg: color,\n color: 'white',\n fontWeight: 'medium',\n _hover: {\n borderColor: hoverColor,\n bg: hoverColor,\n },\n _dark: {\n boxShadow: 'dark-xs',\n },\n }\n})\n\nconst variantGhost = defineStyle((props) => {\n return {\n fontWeight: 'medium',\n _checked: {\n bg: 'blackAlpha.100',\n },\n _dark: {\n _checked: {\n bg: 'whiteAlpha.100',\n },\n },\n }\n})\n\nconst variantOutline = defineStyle((props) => {\n const { colorScheme: c } = props\n\n if (c === 'gray') {\n return {\n fontWeight: 'medium',\n }\n }\n\n return {\n fontWeight: 'medium',\n color: `${c}.500`,\n _hover: {\n color: `${c}.400`,\n bg: 'blackAlpha.50',\n },\n _dark: {\n color: `${c}.500`,\n _hover: {\n color: `${c}.400`,\n bg: 'whiteAlpha.50',\n },\n },\n }\n})\n\nconst variantPrimary = defineStyle((props) => {\n return variantSolid({ ...props, colorScheme: 'primary' })\n})\n\nconst variantSecondary = defineStyle({\n borderWidth: '1px',\n borderColor: 'gray.200',\n boxShadow: 'xs',\n bg: 'white',\n fontWeight: 'medium',\n color: 'inherit',\n _hover: {\n borderColor: 'gray.300',\n bg: 'gray.50',\n },\n _dark: {\n boxShadow: 'dark-xs',\n borderColor: 'gray.600',\n bg: 'gray.700',\n _hover: {\n borderColor: 'gray.500',\n bg: 'gray.600',\n },\n },\n})\n\nconst variantTertiary = defineStyle({\n borderWidth: '1px',\n borderColor: 'gray.200',\n bg: 'gray.200',\n color: 'black',\n fontWeight: 'medium',\n _hover: {\n borderColor: 'gray.300',\n bg: 'gray.200',\n },\n _dark: {\n borderColor: 'gray.700',\n bg: 'gray.700',\n color: 'white',\n _hover: {\n borderColor: 'gray.600',\n },\n },\n})\n\nconst sizes = {\n lg: defineStyle({\n h: '8',\n minW: '10',\n fontSize: 'md',\n px: '4',\n rounded: '6',\n }),\n md: defineStyle({\n h: '7',\n minW: '8',\n fontSize: 'sm',\n px: '3',\n rounded: '4',\n }),\n sm: defineStyle({\n h: '6',\n minW: '6',\n fontSize: 'sm',\n px: '2',\n rounded: '3',\n }),\n xs: defineStyle({\n h: '5',\n minW: '4',\n fontSize: 'xs',\n px: '1',\n rounded: '3',\n }),\n}\n\nexport default defineStyleConfig({\n defaultProps: {\n size: 'md',\n variant: 'secondary',\n },\n variants: {\n solid: variantSolid,\n outline: variantOutline,\n ghost: variantGhost,\n primary: variantPrimary,\n secondary: variantSecondary,\n tertiary: variantTertiary,\n },\n sizes,\n})\n","import { anatomy } from '@chakra-ui/anatomy'\nimport { createMultiStyleConfigHelpers, cssVar } from '@chakra-ui/styled-system'\n\nconst parts = anatomy('card').parts(\n 'container',\n 'header',\n 'title',\n 'subtitle',\n 'body',\n 'footer'\n)\n\nconst { definePartsStyle } = createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('card-bg')\nconst $padding = cssVar('card-padding')\nconst $shadow = cssVar('card-shadow')\nconst $radius = cssVar('card-radius')\nconst $border = cssVar('card-border-width', '0')\nconst $borderColor = cssVar('card-border-color')\n\nconst sizes = {\n sm: definePartsStyle({\n container: {\n [$radius.variable]: 'radii.base',\n [$padding.variable]: 'space.3',\n },\n }),\n md: definePartsStyle({\n container: {\n [$radius.variable]: 'radii.md',\n [$padding.variable]: 'space.4',\n },\n }),\n lg: definePartsStyle({\n container: {\n [$radius.variable]: 'radii.xl',\n [$padding.variable]: 'space.6',\n },\n }),\n}\n\nconst variantShadow = definePartsStyle((props) => {\n const { isHoverable } = props\n return {\n container: {\n [$borderColor.variable]: 'colors.blackAlpha.200',\n [$border.variable]: '1px',\n [$shadow.variable]: 'shadows.sm',\n _hover: isHoverable\n ? {\n [$borderColor.variable]: 'colors.blackAlpha.300',\n }\n : {},\n _dark: {\n [$bg.variable]: 'colors.gray.700',\n [$borderColor.variable]: 'colors.whiteAlpha.50',\n _hover: isHoverable\n ? {\n [$borderColor.variable]: 'colors.whiteAlpha.300',\n }\n : {},\n },\n },\n }\n})\n\nexport default {\n parts: parts.keys,\n defaultProps: {\n variant: 'elevated',\n },\n variants: {\n elevated: variantShadow,\n shadow: variantShadow,\n },\n sizes,\n}\n","import { StyleFunctionProps } from '@chakra-ui/theme-tools'\n\nexport default {\n baseStyle: (props: StyleFunctionProps) => {\n const { colorScheme } = props\n return {\n control: {\n _checked: {\n borderColor: `${colorScheme}.500`,\n bg: `${colorScheme}.500`,\n color: 'white',\n },\n },\n }\n },\n}\n","const defaultProps = {\n size: 'sm',\n}\n\nexport default {\n defaultProps,\n}\n","import { drawerAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nimport { runIfFn } from '@chakra-ui/utils'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('drawer-bg')\n\nconst baseStyleOverlay = defineStyle({\n bg: 'blackAlpha.50',\n})\n\nconst baseStyleDialog = defineStyle((props) => {\n return {\n borderRadius: 'md',\n margin: '8px',\n borderWidth: '1px',\n borderColor: 'chakra-border-color',\n backdropFilter: 'blur(10px) contrast(100%) saturate(100%) brightness(200%)',\n [$bg.variable]: 'colors.whiteAlpha.800',\n fontSize: 'md',\n _dark: {\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n [$bg.variable]: 'colors.grayAlpha.700',\n },\n }\n})\n\nconst baseStyleHeader = defineStyle({\n px: '4',\n py: '3',\n fontSize: 'md',\n fontWeight: 'semibold',\n})\n\nconst baseStyleCloseButton = defineStyle({\n position: 'absolute',\n top: '2',\n insetEnd: '3',\n})\n\nconst baseStyleBody = defineStyle((props) => {\n return {\n px: '4',\n py: '2',\n }\n})\n\nconst baseStyleFooter = defineStyle({\n px: '3',\n py: '3',\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: runIfFn(baseStyleBody, props),\n footer: baseStyleFooter,\n}))\n\nexport const modalTheme = defineMultiStyleConfig({\n baseStyle,\n})\n\nexport default modalTheme\n","export default {\n defaultProps: {\n size: 'lg',\n },\n}\n","import {\n cssVar,\n defineStyle,\n defineStyleConfig,\n} from '@chakra-ui/styled-system'\n\nconst $bg = cssVar('kbd-bg')\n\nconst baseStyle = defineStyle({\n [$bg.variable]: 'colors.blackAlpha.300',\n _dark: {\n [$bg.variable]: 'colors.whiteAlpha.300',\n },\n bg: $bg.reference,\n borderRadius: 'md',\n borderWidth: '0',\n borderBottomWidth: '0',\n padding: '1px',\n minW: '20px',\n textAlign: 'center',\n ':last-child': {\n mr: 0,\n },\n})\n\nexport const kbdTheme = defineStyleConfig({\n defaultProps: {\n variant: 'solid',\n },\n baseStyle,\n})\n\nexport default kbdTheme\n","import { menuAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('menu-bg')\nconst $shadow = cssVar('menu-shadow')\n\nconst baseStyleList = defineStyle({\n [$bg.variable]: 'colors.whiteAlpha.500',\n [$shadow.variable]: 'shadows.lg',\n backdropFilter: 'blur(10px) contrast(100%) saturate(190%)',\n _dark: {\n [$bg.variable]: 'colors.grayAlpha.700',\n [$shadow.variable]: 'shadows.dark-lg',\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n },\n py: '1',\n borderRadius: 'md',\n borderWidth: '1px',\n bg: $bg.reference,\n boxShadow: $shadow.reference,\n})\n\nconst baseStyleItem = defineStyle({\n py: '1.5',\n px: '3',\n mx: '1',\n rounded: 'md',\n fontSize: 'sm',\n width: 'calc(100% - 8px)',\n boxSizing: 'border-box',\n bg: 'transparent',\n _hover: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n _focus: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n _active: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n _expanded: {\n bg: $bg.reference,\n [$bg.variable]: 'colors.grayAlpha.300',\n },\n})\n\nconst baseStyleGroupTitle = defineStyle({\n mx: 4,\n my: 2,\n fontWeight: 'semibold',\n fontSize: 'sm',\n})\n\nconst baseStyleButton = defineStyle({\n transitionProperty: 'common',\n transitionDuration: 'normal',\n})\n\nconst baseStyleDivider = defineStyle({\n my: '1',\n})\n\nconst baseStyle = definePartsStyle({\n button: baseStyleButton,\n list: baseStyleList,\n item: baseStyleItem,\n groupTitle: baseStyleGroupTitle,\n divider: baseStyleDivider,\n})\n\nexport const menuTheme = defineMultiStyleConfig({\n baseStyle,\n})\n\nexport default menuTheme\n","import { modalAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nimport { runIfFn } from '@chakra-ui/utils'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst baseStyleOverlay = defineStyle({\n bg: 'blackAlpha.50',\n})\n\nconst baseStyleDialog = defineStyle((props) => {\n return {\n bg: 'whiteAlpha.800',\n backdropFilter: 'blur(10px) contrast(100%) saturate(100%) brightness(200%)',\n fontSize: 'md',\n _dark: {\n bg: 'grayAlpha.700',\n boxShadow: 'dark-lg',\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n },\n }\n})\n\nconst baseStyleHeader = defineStyle({\n px: '4',\n py: '3',\n fontSize: 'md',\n fontWeight: 'semibold',\n})\n\nconst baseStyleCloseButton = defineStyle({\n position: 'absolute',\n top: '2',\n insetEnd: '3',\n})\n\nconst baseStyleBody = defineStyle((props) => {\n return {\n px: '4',\n py: '2',\n }\n})\n\nconst baseStyleFooter = defineStyle({\n px: '3',\n py: '3',\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n overlay: baseStyleOverlay,\n dialog: runIfFn(baseStyleDialog, props),\n header: baseStyleHeader,\n closeButton: baseStyleCloseButton,\n body: runIfFn(baseStyleBody, props),\n footer: baseStyleFooter,\n}))\n\nexport const modalTheme = defineMultiStyleConfig({\n baseStyle,\n defaultProps: { size: 'md' },\n})\n\nexport default modalTheme\n","import { progressAnatomy as parts } from '@chakra-ui/anatomy'\nimport { createMultiStyleConfigHelpers } from '@chakra-ui/styled-system'\n\nconst { defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts.keys)\n\nexport default defineMultiStyleConfig({\n defaultProps: {\n colorScheme: 'primary',\n },\n baseStyle: (props) => {\n const { colorScheme } = props\n return {\n track: {\n borderRadius: 'md',\n bg: 'gray.200',\n _dark: {\n bg: 'gray.800',\n },\n },\n filledTrack: {\n bg: `${colorScheme}.500`,\n },\n }\n },\n})\n","import { popoverAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n} from '@chakra-ui/styled-system'\n\nimport { runIfFn } from '@chakra-ui/utils'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $popperBg = cssVar('popper-bg')\nconst $arrowBg = cssVar('popper-arrow-bg')\nconst $arrowShadowColor = cssVar('popper-arrow-shadow-color')\n\nconst baseStyleContent = defineStyle({\n [$popperBg.variable]: `colors.whiteAlpha.800`,\n bg: $popperBg.reference,\n [$arrowBg.variable]: $popperBg.reference,\n [$arrowShadowColor.variable]: `colors.gray.200`,\n backdropFilter: 'blur(10px) contrast(100%) saturate(100%) brightness(200%)',\n _dark: {\n [$popperBg.variable]: `colors.grayAlpha.700`,\n [$arrowShadowColor.variable]: `colors.whiteAlpha.300`,\n backdropFilter: 'blur(10px) saturate(190%) contrast(70%) brightness(80%)',\n },\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n content: runIfFn(baseStyleContent, props),\n}))\n\nexport const popoverTheme = defineMultiStyleConfig({\n baseStyle,\n defaultProps: { size: 'md' },\n})\n\nexport default popoverTheme\n","import { StyleFunctionProps } from '@chakra-ui/theme-tools'\n\nexport default {\n baseStyle: (props: StyleFunctionProps) => {\n const { colorScheme } = props\n return {\n control: {\n _checked: {\n borderColor: `${colorScheme}.500`,\n bg: `${colorScheme}.500`,\n color: 'white',\n },\n },\n }\n },\n}\n","import { mode, StyleFunctionProps } from '@chakra-ui/theme-tools'\n\nexport default {\n defaultProps: {\n colorScheme: 'primary',\n },\n baseStyle: (props: StyleFunctionProps) => {\n const { colorScheme } = props\n return {\n filledTrack: {\n bg: `${colorScheme}.500`,\n },\n }\n },\n}\n","import { switchAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n defineStyle,\n} from '@chakra-ui/styled-system'\nimport { cssVar } from '@chakra-ui/theme-tools'\n\nconst { defineMultiStyleConfig, definePartsStyle } =\n createMultiStyleConfigHelpers(parts.keys)\n\nconst $bg = cssVar('switch-bg')\n\nconst baseStyleTrack = defineStyle((props) => {\n const { colorScheme: c } = props\n\n return {\n [$bg.variable]: 'colors.gray.300',\n _dark: {\n [$bg.variable]: 'colors.whiteAlpha.300',\n },\n _checked: {\n [$bg.variable]: `colors.${c}.500`,\n _dark: {\n [$bg.variable]: `colors.${c}.500`,\n },\n },\n bg: $bg.reference,\n }\n})\n\nconst baseStyleThumb = defineStyle({\n bg: 'white',\n _dark: {\n bg: 'blackAlpha.800',\n _checked: {\n bg: 'white',\n },\n },\n})\n\nconst baseStyle = definePartsStyle((props) => ({\n track: baseStyleTrack(props),\n thumb: baseStyleThumb,\n}))\n\nexport const switchTheme = defineMultiStyleConfig({\n baseStyle,\n defaultProps: {\n size: 'md',\n colorScheme: 'primary',\n },\n})\n\nexport default switchTheme\n","import { cssVar, SystemStyleFunction } from '@chakra-ui/theme-tools'\n\nconst $bg = cssVar('tooltip-bg')\nconst $fg = cssVar('tooltip-fg')\nconst $arrowBg = cssVar('popper-arrow-bg')\n\nconst baseStyle: SystemStyleFunction = (props) => {\n return {\n display: 'flex',\n [$bg.variable]: 'colors.white',\n [$fg.variable]: 'colors.blackAlpha.900',\n _dark: {\n [$bg.variable]: 'colors.gray.700',\n [$fg.variable]: 'colors.whiteAlpha.900',\n },\n px: '8px',\n py: '2px',\n bg: [$bg.reference],\n [$arrowBg.variable]: [$bg.reference],\n borderRadius: 'sm',\n fontWeight: 'medium',\n fontSize: 'xs',\n boxShadow: 'md',\n maxW: '320px',\n zIndex: 'tooltip',\n borderWidth: '1px',\n }\n}\n\nexport default {\n baseStyle,\n}\n","import { inputAnatomy as parts } from '@chakra-ui/anatomy'\nimport {\n createMultiStyleConfigHelpers,\n cssVar,\n defineStyle,\n defineStyleConfig,\n} from '@chakra-ui/styled-system'\nimport { getColor, mode } from '@chakra-ui/theme-tools'\n\nconst { definePartsStyle } = createMultiStyleConfigHelpers(parts.keys)\n\nfunction getDefaults(props: Record<string, any>) {\n const { focusBorderColor: fc, errorBorderColor: ec } = props\n return {\n focusBorderColor: fc || mode('blue.500', 'blue.300')(props),\n errorBorderColor: ec || mode('red.500', 'red.300')(props),\n }\n}\n\nconst $borderRadius = cssVar('input-border-radius')\nconst $height = cssVar('input-height')\nconst $padding = cssVar('input-padding')\n\nconst variantOutline = definePartsStyle((props) => {\n const { theme } = props\n const { focusBorderColor: fc, errorBorderColor: ec } = getDefaults(props)\n\n return {\n field: {\n border: '1px solid var(--chakra-colors-chakra-border-color)',\n bg: 'inherit',\n _hover: {\n borderColor: 'gray.300',\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n boxShadow: 'none',\n },\n _focusVisible: {\n zIndex: 1,\n borderColor: getColor(theme, fc),\n boxShadow: 'none',\n },\n _dark: {\n bg: 'gray.900',\n borderColor: 'chakra-border-color',\n _hover: {\n borderColor: 'whiteAlpha.400',\n },\n _invalid: {\n borderColor: getColor(theme, ec),\n },\n _focusVisible: {\n borderColor: getColor(theme, fc),\n },\n },\n },\n addon: {\n borderColor: 'inherit',\n bg: 'gray.100',\n _dark: {\n borderColor: 'whiteAlpha.50',\n bg: 'whiteAlpha.300',\n },\n },\n }\n})\n\nconst sizes = {\n sm: {\n field: {\n [$borderRadius.variable]: 'radii.sm',\n [$height.variable]: 'sizes.7',\n },\n addon: {\n [$borderRadius.variable]: 'radii.sm',\n [$height.variable]: 'sizes.7',\n },\n },\n md: {\n field: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.9',\n },\n addon: {\n [$padding.variable]: 'space.3',\n [$height.variable]: 'sizes.9',\n },\n },\n}\n\nconst Input = defineStyleConfig({\n defaultProps: {\n variant: 'outline',\n size: 'sm',\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: variantOutline,\n },\n sizes,\n})\n\nexport const formLabelTheme = defineStyleConfig({\n baseStyle: {\n mb: 1,\n },\n variants: {\n horizontal: {\n mb: 0,\n marginStart: '0.5rem',\n },\n },\n})\n\nexport const inputTheme = Input\nexport const numberInputTheme = Input\nexport const pinInputTheme = defineStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: variantOutline,\n },\n sizes,\n})\nexport const textareaTheme = defineStyleConfig({\n defaultProps: {\n /* @ts-expect-error */\n focusBorderColor: 'primary.500',\n },\n variants: {\n outline: defineStyle(\n (props) => inputTheme.variants?.outline(props).field ?? {}\n ),\n },\n})\nexport const nativeSelectTheme = inputTheme\n","import Alert from './alert'\nimport Button from './button'\nimport Card from './card'\nimport Checkbox from './checkbox'\nimport CloseButton from './close-button'\nimport Drawer from './drawer'\nimport Heading from './heading'\nimport Kbd from './kbd'\nimport Menu from './menu'\nimport Modal from './modal'\nimport Progress from './progress'\nimport Popover from './popover'\nimport Radio from './radio'\nimport Slider from './slider'\nimport Switch from './switch'\nimport Tooltip from './tooltip'\nimport {\n inputTheme,\n pinInputTheme,\n formLabelTheme,\n numberInputTheme,\n nativeSelectTheme,\n textareaTheme,\n} from './form'\n\nexport { default as Alert } from './alert'\nexport { default as Button } from './button'\nexport { default as Card } from './card'\nexport { default as Checkbox } from './checkbox'\nexport { default as CloseButton } from './close-button'\nexport { default as Drawer } from './drawer'\nexport { default as Heading } from './heading'\nexport { default as Kbd } from './kbd'\nexport { default as Menu } from './menu'\nexport { default as Modal } from './modal'\nexport { default as Progress } from './progress'\nexport { default as Popover } from './popover'\nexport { default as Radio } from './radio'\nexport { default as Slider } from './slider'\nexport { default as Switch } from './switch'\nexport { default as Tooltip } from './tooltip'\n\nexport {\n inputTheme as Input,\n pinInputTheme as PinInput,\n formLabelTheme as FormLabel,\n numberInputTheme as NumberInput,\n nativeSelectTheme as Select,\n textareaTheme as Textarea,\n} from './form'\n\nexport default {\n Alert,\n Button,\n Card,\n Checkbox,\n CloseButton,\n Drawer,\n Heading,\n Kbd,\n Menu,\n Modal,\n Progress,\n Popover,\n Radio,\n Slider,\n Switch,\n Tooltip,\n Input: inputTheme,\n PinInput: pinInputTheme,\n FormLabel: formLabelTheme,\n NumberInput: numberInputTheme,\n Select: nativeSelectTheme,\n Textarea: textareaTheme,\n}\n","import {\n extendTheme,\n withDefaultColorScheme,\n ChakraTheme,\n} from '@chakra-ui/react'\n\nimport colors from './foundations/colors'\nimport { fonts, fontSizes, textStyles } from './foundations/typography'\nimport sizes from './foundations/sizes'\nimport shadows from './foundations/shadows'\nimport semanticTokens from './foundations/semantic-tokens'\nimport components from './components'\n\nexport const theme = extendTheme(\n {\n colors,\n fonts,\n fontSizes,\n textStyles,\n sizes,\n components,\n shadows,\n semanticTokens,\n },\n withDefaultColorScheme({\n colorScheme: 'primary',\n components: ['Radio', 'Switch', 'Checkbox'],\n })\n) as ChakraTheme\n","const colors = {\n black: '#0e1012',\n primary: {\n '50': '#f6f7fd',\n '100': '#dcdff5',\n '200': '#bec3ed',\n '300': '#9aa1e2',\n '400': '#858edd',\n '500': '#6b75d0',\n '600': '#5a63af',\n '700': '#484f8d',\n '800': '#3d4377',\n '900': '#2c3056',\n },\n grayAlpha: {\n '50': 'rgba(249, 249, 250, 0.5)',\n '100': 'rgba(241, 241, 243, 0.5)',\n '200': 'rgba(231, 231, 234, 0.5)',\n '300': 'rgba(211, 212, 216, 0.5)',\n '400': 'rgba(171, 172, 181, 0.5)',\n '500': 'rgba(124, 126, 139, 0.5)',\n '600': 'rgba(81, 84, 101, 0.5)',\n '700': 'rgba(52, 54, 67, 0.5)',\n '800': 'rgba(30, 32, 39, 0.5)',\n '900': 'rgba(24, 25, 31, 0.5)',\n },\n gray: {\n '50': '#f9f9fa',\n '100': '#f1f1f3',\n '200': '#e7e7ea',\n '300': '#d3d4d8',\n '400': '#abacb5',\n '500': '#7c7e8b',\n '600': '#515465',\n '700': '#343643',\n '800': '#1e2027',\n '900': '#18191f',\n },\n purple: {\n '50': '#f9f6fd',\n '100': '#e5daf8',\n '200': '#d3bef4',\n '300': '#b795ec',\n '400': '#a379e7',\n '500': '#8952e0',\n '600': '#7434db',\n '700': '#6023c0',\n '800': '#4f1d9e',\n '900': '#3b1676',\n },\n pink: {\n '50': '#fdf5f9',\n '100': '#f8d9e7',\n '200': '#f3b9d3',\n '300': '#eb8db8',\n '400': '#e56ba2',\n '500': '#dc3882',\n '600': '#c4246c',\n '700': '#a01d58',\n '800': '#7d1745',\n '900': '#5d1133',\n },\n red: {\n '50': '#fdf6f5',\n '100': '#f8d9d8',\n '200': '#f1b8b4',\n '300': '#e98d87',\n '400': '#e4726c',\n '500': '#dc4a41',\n '600': '#d2140a',\n '700': '#ac0900',\n '800': '#930800',\n '900': '#6d0600',\n },\n orange: {\n '50': '#fdfaf6',\n '100': '#f9ebdb',\n '200': '#f1d4b1',\n '300': '#e6b273',\n '400': '#dc9239',\n '500': '#c37b24',\n '600': '#a5681e',\n '700': '#835318',\n '800': '#674113',\n '900': '#553610',\n },\n yellow: {\n '50': '#fffefb',\n '100': '#fff8e9',\n '200': '#feecbd',\n '300': '#fddc87',\n '400': '#fbc434',\n '500': '#d2a01e',\n '600': '#a88018',\n '700': '#836413',\n '800': '#624b0e',\n '900': '#513e0c',\n },\n green: {\n '50': '#f7fdfb',\n '100': '#d2f2e7',\n '200': '#9fe3cd',\n '300': '#64d2ad',\n '400': '#1dbd88',\n '500': '#0ea371',\n '600': '#0c875e',\n '700': '#096949',\n '800': '#07563c',\n '900': '#064731',\n },\n teal: {\n '50': '#f1fcfc',\n '100': '#c0f1f4',\n '200': '#84e4e9',\n '300': '#2dd1da',\n '400': '#22b2ba',\n '500': '#1d979e',\n '600': '#187b80',\n '700': '#125f64',\n '800': '#0f5053',\n '900': '#0d4244',\n },\n cyan: {\n '50': '#f4fbfd',\n '100': '#d0eef7',\n '200': '#bae7f3',\n '300': '#a2deee',\n '400': '#53c2e1',\n '500': '#2ab4d9',\n '600': '#24a2c4',\n '700': '#1e86a2',\n '800': '#196e85',\n '900': '#135567',\n },\n blue: {\n '50': '#f1f6fd',\n '100': '#cde0f6',\n '200': '#a8c8f0',\n '300': '#7fafe8',\n '400': '#5896e1',\n '500': '#347fdb',\n '600': '#236abf',\n '700': '#1b5192',\n '800': '#164278',\n '900': '#123662',\n },\n indigo: {\n '50': '#f8f7fc',\n '100': '#e1ddf5',\n '200': '#c8c0ec',\n '300': '#a89de2',\n '400': '#9789dc',\n '500': '#7f6ed4',\n '600': '#6a58c9',\n '700': '#5546a1',\n '800': '#483c88',\n '900': '#342b62',\n },\n}\n\nexport default colors\n","export const fonts = {\n heading: 'InterVariable, sans-serif',\n body: 'InterVariable, sans-serif',\n}\n\nexport const fontSizes = {\n xs: '0.75rem',\n sm: '0.8125rem',\n md: '0.875rem',\n lg: '1rem',\n xl: '1.125rem',\n '2xl': '1.5rem',\n '3xl': '1.875rem',\n '4xl': '2.25rem',\n '5xl': '3rem',\n '6xl': '3.75rem',\n '7xl': '4.5rem',\n '8xl': '6rem',\n '9xl': '8rem',\n}\n\nexport const textStyles = {}\n","const sizes = {\n container: {\n sm: '30em',\n md: '48em',\n lg: '62em',\n xl: '80em',\n '2xl': '96em',\n },\n}\n\nexport default sizes\n","import { transparentize } from '@chakra-ui/theme-tools'\n\nimport colors from './colors'\n\nconst shadows = {\n xs: 'rgb(0 0 0 / 7%) 0px 1px 1px',\n 'dark-xs': 'rgb(0 0 0 / 7%) 0px 1px 1px',\n outline: `0 0 0 2px ${transparentize(colors.primary[500], 0.6)({ colors })}`,\n}\n\nexport default shadows\n","export default {\n colors: {\n muted: {\n default: 'gray.500',\n _dark: 'gray.400',\n },\n },\n}\n"]}
|