g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\n\n// src/dom-event.ts\nvar eventProperties = [\n \"bubbles\",\n \"cancelBubble\",\n \"cancelable\",\n \"composed\",\n \"currentTarget\",\n \"defaultPrevented\",\n \"eventPhase\",\n \"isTrusted\",\n \"returnValue\",\n \"srcElement\",\n \"target\",\n \"timeStamp\",\n \"type\"\n];\nvar customEventSpecificProperties = [\"detail\"];\nfunction extractEventHiddenProperties(event) {\n const rebuildEvent = eventProperties.filter((value) => event[value] !== void 0).reduce((acc, value) => {\n return { ...acc, [value]: event[value] };\n }, {});\n if (event instanceof CustomEvent) {\n customEventSpecificProperties.filter((value) => event[value] !== void 0).forEach((value) => {\n rebuildEvent[value] = event[value];\n });\n }\n return rebuildEvent;\n}\n\nexport {\n __commonJS,\n __toESM,\n extractEventHiddenProperties\n};\n","import {\n __commonJS,\n __toESM,\n extractEventHiddenProperties\n} from \"./chunk-465TF3XA.mjs\";\n\n// node_modules/has-symbols/shams.js\nvar require_shams = __commonJS({\n \"node_modules/has-symbols/shams.js\"(exports, module) {\n \"use strict\";\n module.exports = function hasSymbols() {\n if (typeof Symbol !== \"function\" || typeof Object.getOwnPropertySymbols !== \"function\") {\n return false;\n }\n if (typeof Symbol.iterator === \"symbol\") {\n return true;\n }\n var obj = {};\n var sym = Symbol(\"test\");\n var symObj = Object(sym);\n if (typeof sym === \"string\") {\n return false;\n }\n if (Object.prototype.toString.call(sym) !== \"[object Symbol]\") {\n return false;\n }\n if (Object.prototype.toString.call(symObj) !== \"[object Symbol]\") {\n return false;\n }\n var symVal = 42;\n obj[sym] = symVal;\n for (sym in obj) {\n return false;\n }\n if (typeof Object.keys === \"function\" && Object.keys(obj).length !== 0) {\n return false;\n }\n if (typeof Object.getOwnPropertyNames === \"function\" && Object.getOwnPropertyNames(obj).length !== 0) {\n return false;\n }\n var syms = Object.getOwnPropertySymbols(obj);\n if (syms.length !== 1 || syms[0] !== sym) {\n return false;\n }\n if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {\n return false;\n }\n if (typeof Object.getOwnPropertyDescriptor === \"function\") {\n var descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n if (descriptor.value !== symVal || descriptor.enumerable !== true) {\n return false;\n }\n }\n return true;\n };\n }\n});\n\n// node_modules/has-symbols/index.js\nvar require_has_symbols = __commonJS({\n \"node_modules/has-symbols/index.js\"(exports, module) {\n \"use strict\";\n var origSymbol = typeof Symbol !== \"undefined\" && Symbol;\n var hasSymbolSham = require_shams();\n module.exports = function hasNativeSymbols() {\n if (typeof origSymbol !== \"function\") {\n return false;\n }\n if (typeof Symbol !== \"function\") {\n return false;\n }\n if (typeof origSymbol(\"foo\") !== \"symbol\") {\n return false;\n }\n if (typeof Symbol(\"bar\") !== \"symbol\") {\n return false;\n }\n return hasSymbolSham();\n };\n }\n});\n\n// node_modules/function-bind/implementation.js\nvar require_implementation = __commonJS({\n \"node_modules/function-bind/implementation.js\"(exports, module) {\n \"use strict\";\n var ERROR_MESSAGE = \"Function.prototype.bind called on incompatible \";\n var slice = Array.prototype.slice;\n var toStr = Object.prototype.toString;\n var funcType = \"[object Function]\";\n module.exports = function bind(that) {\n var target = this;\n if (typeof target !== \"function\" || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args2 = slice.call(arguments, 1);\n var bound;\n var binder = function() {\n if (this instanceof bound) {\n var result2 = target.apply(\n this,\n args2.concat(slice.call(arguments))\n );\n if (Object(result2) === result2) {\n return result2;\n }\n return this;\n } else {\n return target.apply(\n that,\n args2.concat(slice.call(arguments))\n );\n }\n };\n var boundLength = Math.max(0, target.length - args2.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push(\"$\" + i);\n }\n bound = Function(\"binder\", \"return function (\" + boundArgs.join(\",\") + \"){ return binder.apply(this,arguments); }\")(binder);\n if (target.prototype) {\n var Empty = function Empty2() {\n };\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n return bound;\n };\n }\n});\n\n// node_modules/function-bind/index.js\nvar require_function_bind = __commonJS({\n \"node_modules/function-bind/index.js\"(exports, module) {\n \"use strict\";\n var implementation = require_implementation();\n module.exports = Function.prototype.bind || implementation;\n }\n});\n\n// node_modules/has/src/index.js\nvar require_src = __commonJS({\n \"node_modules/has/src/index.js\"(exports, module) {\n \"use strict\";\n var bind = require_function_bind();\n module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n }\n});\n\n// node_modules/get-intrinsic/index.js\nvar require_get_intrinsic = __commonJS({\n \"node_modules/get-intrinsic/index.js\"(exports, module) {\n \"use strict\";\n var undefined2;\n var $SyntaxError = SyntaxError;\n var $Function = Function;\n var $TypeError = TypeError;\n var getEvalledConstructor = function(expressionSyntax) {\n try {\n return $Function('\"use strict\"; return (' + expressionSyntax + \").constructor;\")();\n } catch (e) {\n }\n };\n var $gOPD = Object.getOwnPropertyDescriptor;\n if ($gOPD) {\n try {\n $gOPD({}, \"\");\n } catch (e) {\n $gOPD = null;\n }\n }\n var throwTypeError = function() {\n throw new $TypeError();\n };\n var ThrowTypeError = $gOPD ? function() {\n try {\n arguments.callee;\n return throwTypeError;\n } catch (calleeThrows) {\n try {\n return $gOPD(arguments, \"callee\").get;\n } catch (gOPDthrows) {\n return throwTypeError;\n }\n }\n }() : throwTypeError;\n var hasSymbols = require_has_symbols()();\n var getProto = Object.getPrototypeOf || function(x) {\n return x.__proto__;\n };\n var needsEval = {};\n var TypedArray = typeof Uint8Array === \"undefined\" ? undefined2 : getProto(Uint8Array);\n var INTRINSICS = {\n \"%AggregateError%\": typeof AggregateError === \"undefined\" ? undefined2 : AggregateError,\n \"%Array%\": Array,\n \"%ArrayBuffer%\": typeof ArrayBuffer === \"undefined\" ? undefined2 : ArrayBuffer,\n \"%ArrayIteratorPrototype%\": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2,\n \"%AsyncFromSyncIteratorPrototype%\": undefined2,\n \"%AsyncFunction%\": needsEval,\n \"%AsyncGenerator%\": needsEval,\n \"%AsyncGeneratorFunction%\": needsEval,\n \"%AsyncIteratorPrototype%\": needsEval,\n \"%Atomics%\": typeof Atomics === \"undefined\" ? undefined2 : Atomics,\n \"%BigInt%\": typeof BigInt === \"undefined\" ? undefined2 : BigInt,\n \"%Boolean%\": Boolean,\n \"%DataView%\": typeof DataView === \"undefined\" ? undefined2 : DataView,\n \"%Date%\": Date,\n \"%decodeURI%\": decodeURI,\n \"%decodeURIComponent%\": decodeURIComponent,\n \"%encodeURI%\": encodeURI,\n \"%encodeURIComponent%\": encodeURIComponent,\n \"%Error%\": Error,\n \"%eval%\": eval,\n \"%EvalError%\": EvalError,\n \"%Float32Array%\": typeof Float32Array === \"undefined\" ? undefined2 : Float32Array,\n \"%Float64Array%\": typeof Float64Array === \"undefined\" ? undefined2 : Float64Array,\n \"%FinalizationRegistry%\": typeof FinalizationRegistry === \"undefined\" ? undefined2 : FinalizationRegistry,\n \"%Function%\": $Function,\n \"%GeneratorFunction%\": needsEval,\n \"%Int8Array%\": typeof Int8Array === \"undefined\" ? undefined2 : Int8Array,\n \"%Int16Array%\": typeof Int16Array === \"undefined\" ? undefined2 : Int16Array,\n \"%Int32Array%\": typeof Int32Array === \"undefined\" ? undefined2 : Int32Array,\n \"%isFinite%\": isFinite,\n \"%isNaN%\": isNaN,\n \"%IteratorPrototype%\": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2,\n \"%JSON%\": typeof JSON === \"object\" ? JSON : undefined2,\n \"%Map%\": typeof Map === \"undefined\" ? undefined2 : Map,\n \"%MapIteratorPrototype%\": typeof Map === \"undefined\" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),\n \"%Math%\": Math,\n \"%Number%\": Number,\n \"%Object%\": Object,\n \"%parseFloat%\": parseFloat,\n \"%parseInt%\": parseInt,\n \"%Promise%\": typeof Promise === \"undefined\" ? undefined2 : Promise,\n \"%Proxy%\": typeof Proxy === \"undefined\" ? undefined2 : Proxy,\n \"%RangeError%\": RangeError,\n \"%ReferenceError%\": ReferenceError,\n \"%Reflect%\": typeof Reflect === \"undefined\" ? undefined2 : Reflect,\n \"%RegExp%\": RegExp,\n \"%Set%\": typeof Set === \"undefined\" ? undefined2 : Set,\n \"%SetIteratorPrototype%\": typeof Set === \"undefined\" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),\n \"%SharedArrayBuffer%\": typeof SharedArrayBuffer === \"undefined\" ? undefined2 : SharedArrayBuffer,\n \"%String%\": String,\n \"%StringIteratorPrototype%\": hasSymbols ? getProto(\"\"[Symbol.iterator]()) : undefined2,\n \"%Symbol%\": hasSymbols ? Symbol : undefined2,\n \"%SyntaxError%\": $SyntaxError,\n \"%ThrowTypeError%\": ThrowTypeError,\n \"%TypedArray%\": TypedArray,\n \"%TypeError%\": $TypeError,\n \"%Uint8Array%\": typeof Uint8Array === \"undefined\" ? undefined2 : Uint8Array,\n \"%Uint8ClampedArray%\": typeof Uint8ClampedArray === \"undefined\" ? undefined2 : Uint8ClampedArray,\n \"%Uint16Array%\": typeof Uint16Array === \"undefined\" ? undefined2 : Uint16Array,\n \"%Uint32Array%\": typeof Uint32Array === \"undefined\" ? undefined2 : Uint32Array,\n \"%URIError%\": URIError,\n \"%WeakMap%\": typeof WeakMap === \"undefined\" ? undefined2 : WeakMap,\n \"%WeakRef%\": typeof WeakRef === \"undefined\" ? undefined2 : WeakRef,\n \"%WeakSet%\": typeof WeakSet === \"undefined\" ? undefined2 : WeakSet\n };\n var doEval = function doEval2(name2) {\n var value2;\n if (name2 === \"%AsyncFunction%\") {\n value2 = getEvalledConstructor(\"async function () {}\");\n } else if (name2 === \"%GeneratorFunction%\") {\n value2 = getEvalledConstructor(\"function* () {}\");\n } else if (name2 === \"%AsyncGeneratorFunction%\") {\n value2 = getEvalledConstructor(\"async function* () {}\");\n } else if (name2 === \"%AsyncGenerator%\") {\n var fn = doEval2(\"%AsyncGeneratorFunction%\");\n if (fn) {\n value2 = fn.prototype;\n }\n } else if (name2 === \"%AsyncIteratorPrototype%\") {\n var gen = doEval2(\"%AsyncGenerator%\");\n if (gen) {\n value2 = getProto(gen.prototype);\n }\n }\n INTRINSICS[name2] = value2;\n return value2;\n };\n var LEGACY_ALIASES = {\n \"%ArrayBufferPrototype%\": [\"ArrayBuffer\", \"prototype\"],\n \"%ArrayPrototype%\": [\"Array\", \"prototype\"],\n \"%ArrayProto_entries%\": [\"Array\", \"prototype\", \"entries\"],\n \"%ArrayProto_forEach%\": [\"Array\", \"prototype\", \"forEach\"],\n \"%ArrayProto_keys%\": [\"Array\", \"prototype\", \"keys\"],\n \"%ArrayProto_values%\": [\"Array\", \"prototype\", \"values\"],\n \"%AsyncFunctionPrototype%\": [\"AsyncFunction\", \"prototype\"],\n \"%AsyncGenerator%\": [\"AsyncGeneratorFunction\", \"prototype\"],\n \"%AsyncGeneratorPrototype%\": [\"AsyncGeneratorFunction\", \"prototype\", \"prototype\"],\n \"%BooleanPrototype%\": [\"Boolean\", \"prototype\"],\n \"%DataViewPrototype%\": [\"DataView\", \"prototype\"],\n \"%DatePrototype%\": [\"Date\", \"prototype\"],\n \"%ErrorPrototype%\": [\"Error\", \"prototype\"],\n \"%EvalErrorPrototype%\": [\"EvalError\", \"prototype\"],\n \"%Float32ArrayPrototype%\": [\"Float32Array\", \"prototype\"],\n \"%Float64ArrayPrototype%\": [\"Float64Array\", \"prototype\"],\n \"%FunctionPrototype%\": [\"Function\", \"prototype\"],\n \"%Generator%\": [\"GeneratorFunction\", \"prototype\"],\n \"%GeneratorPrototype%\": [\"GeneratorFunction\", \"prototype\", \"prototype\"],\n \"%Int8ArrayPrototype%\": [\"Int8Array\", \"prototype\"],\n \"%Int16ArrayPrototype%\": [\"Int16Array\", \"prototype\"],\n \"%Int32ArrayPrototype%\": [\"Int32Array\", \"prototype\"],\n \"%JSONParse%\": [\"JSON\", \"parse\"],\n \"%JSONStringify%\": [\"JSON\", \"stringify\"],\n \"%MapPrototype%\": [\"Map\", \"prototype\"],\n \"%NumberPrototype%\": [\"Number\", \"prototype\"],\n \"%ObjectPrototype%\": [\"Object\", \"prototype\"],\n \"%ObjProto_toString%\": [\"Object\", \"prototype\", \"toString\"],\n \"%ObjProto_valueOf%\": [\"Object\", \"prototype\", \"valueOf\"],\n \"%PromisePrototype%\": [\"Promise\", \"prototype\"],\n \"%PromiseProto_then%\": [\"Promise\", \"prototype\", \"then\"],\n \"%Promise_all%\": [\"Promise\", \"all\"],\n \"%Promise_reject%\": [\"Promise\", \"reject\"],\n \"%Promise_resolve%\": [\"Promise\", \"resolve\"],\n \"%RangeErrorPrototype%\": [\"RangeError\", \"prototype\"],\n \"%ReferenceErrorPrototype%\": [\"ReferenceError\", \"prototype\"],\n \"%RegExpPrototype%\": [\"RegExp\", \"prototype\"],\n \"%SetPrototype%\": [\"Set\", \"prototype\"],\n \"%SharedArrayBufferPrototype%\": [\"SharedArrayBuffer\", \"prototype\"],\n \"%StringPrototype%\": [\"String\", \"prototype\"],\n \"%SymbolPrototype%\": [\"Symbol\", \"prototype\"],\n \"%SyntaxErrorPrototype%\": [\"SyntaxError\", \"prototype\"],\n \"%TypedArrayPrototype%\": [\"TypedArray\", \"prototype\"],\n \"%TypeErrorPrototype%\": [\"TypeError\", \"prototype\"],\n \"%Uint8ArrayPrototype%\": [\"Uint8Array\", \"prototype\"],\n \"%Uint8ClampedArrayPrototype%\": [\"Uint8ClampedArray\", \"prototype\"],\n \"%Uint16ArrayPrototype%\": [\"Uint16Array\", \"prototype\"],\n \"%Uint32ArrayPrototype%\": [\"Uint32Array\", \"prototype\"],\n \"%URIErrorPrototype%\": [\"URIError\", \"prototype\"],\n \"%WeakMapPrototype%\": [\"WeakMap\", \"prototype\"],\n \"%WeakSetPrototype%\": [\"WeakSet\", \"prototype\"]\n };\n var bind = require_function_bind();\n var hasOwn = require_src();\n var $concat = bind.call(Function.call, Array.prototype.concat);\n var $spliceApply = bind.call(Function.apply, Array.prototype.splice);\n var $replace = bind.call(Function.call, String.prototype.replace);\n var $strSlice = bind.call(Function.call, String.prototype.slice);\n var $exec = bind.call(Function.call, RegExp.prototype.exec);\n var rePropName2 = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\n var reEscapeChar2 = /\\\\(\\\\)?/g;\n var stringToPath2 = function stringToPath3(string) {\n var first = $strSlice(string, 0, 1);\n var last = $strSlice(string, -1);\n if (first === \"%\" && last !== \"%\") {\n throw new $SyntaxError(\"invalid intrinsic syntax, expected closing `%`\");\n } else if (last === \"%\" && first !== \"%\") {\n throw new $SyntaxError(\"invalid intrinsic syntax, expected opening `%`\");\n }\n var result2 = [];\n $replace(string, rePropName2, function(match, number, quote, subString) {\n result2[result2.length] = quote ? $replace(subString, reEscapeChar2, \"$1\") : number || match;\n });\n return result2;\n };\n var getBaseIntrinsic = function getBaseIntrinsic2(name2, allowMissing) {\n var intrinsicName = name2;\n var alias;\n if (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n alias = LEGACY_ALIASES[intrinsicName];\n intrinsicName = \"%\" + alias[0] + \"%\";\n }\n if (hasOwn(INTRINSICS, intrinsicName)) {\n var value2 = INTRINSICS[intrinsicName];\n if (value2 === needsEval) {\n value2 = doEval(intrinsicName);\n }\n if (typeof value2 === \"undefined\" && !allowMissing) {\n throw new $TypeError(\"intrinsic \" + name2 + \" exists, but is not available. Please file an issue!\");\n }\n return {\n alias,\n name: intrinsicName,\n value: value2\n };\n }\n throw new $SyntaxError(\"intrinsic \" + name2 + \" does not exist!\");\n };\n module.exports = function GetIntrinsic(name2, allowMissing) {\n if (typeof name2 !== \"string\" || name2.length === 0) {\n throw new $TypeError(\"intrinsic name must be a non-empty string\");\n }\n if (arguments.length > 1 && typeof allowMissing !== \"boolean\") {\n throw new $TypeError('\"allowMissing\" argument must be a boolean');\n }\n if ($exec(/^%?[^%]*%?$/, name2) === null) {\n throw new $SyntaxError(\"`%` may not be present anywhere but at the beginning and end of the intrinsic name\");\n }\n var parts = stringToPath2(name2);\n var intrinsicBaseName = parts.length > 0 ? parts[0] : \"\";\n var intrinsic = getBaseIntrinsic(\"%\" + intrinsicBaseName + \"%\", allowMissing);\n var intrinsicRealName = intrinsic.name;\n var value2 = intrinsic.value;\n var skipFurtherCaching = false;\n var alias = intrinsic.alias;\n if (alias) {\n intrinsicBaseName = alias[0];\n $spliceApply(parts, $concat([0, 1], alias));\n }\n for (var i = 1, isOwn = true; i < parts.length; i += 1) {\n var part = parts[i];\n var first = $strSlice(part, 0, 1);\n var last = $strSlice(part, -1);\n if ((first === '\"' || first === \"'\" || first === \"`\" || (last === '\"' || last === \"'\" || last === \"`\")) && first !== last) {\n throw new $SyntaxError(\"property names with quotes must have matching quotes\");\n }\n if (part === \"constructor\" || !isOwn) {\n skipFurtherCaching = true;\n }\n intrinsicBaseName += \".\" + part;\n intrinsicRealName = \"%\" + intrinsicBaseName + \"%\";\n if (hasOwn(INTRINSICS, intrinsicRealName)) {\n value2 = INTRINSICS[intrinsicRealName];\n } else if (value2 != null) {\n if (!(part in value2)) {\n if (!allowMissing) {\n throw new $TypeError(\"base intrinsic for \" + name2 + \" exists, but the property is not available.\");\n }\n return void 0;\n }\n if ($gOPD && i + 1 >= parts.length) {\n var desc = $gOPD(value2, part);\n isOwn = !!desc;\n if (isOwn && \"get\" in desc && !(\"originalValue\" in desc.get)) {\n value2 = desc.get;\n } else {\n value2 = value2[part];\n }\n } else {\n isOwn = hasOwn(value2, part);\n value2 = value2[part];\n }\n if (isOwn && !skipFurtherCaching) {\n INTRINSICS[intrinsicRealName] = value2;\n }\n }\n }\n return value2;\n };\n }\n});\n\n// node_modules/call-bind/index.js\nvar require_call_bind = __commonJS({\n \"node_modules/call-bind/index.js\"(exports, module) {\n \"use strict\";\n var bind = require_function_bind();\n var GetIntrinsic = require_get_intrinsic();\n var $apply = GetIntrinsic(\"%Function.prototype.apply%\");\n var $call = GetIntrinsic(\"%Function.prototype.call%\");\n var $reflectApply = GetIntrinsic(\"%Reflect.apply%\", true) || bind.call($call, $apply);\n var $gOPD = GetIntrinsic(\"%Object.getOwnPropertyDescriptor%\", true);\n var $defineProperty = GetIntrinsic(\"%Object.defineProperty%\", true);\n var $max = GetIntrinsic(\"%Math.max%\");\n if ($defineProperty) {\n try {\n $defineProperty({}, \"a\", { value: 1 });\n } catch (e) {\n $defineProperty = null;\n }\n }\n module.exports = function callBind(originalFunction) {\n var func = $reflectApply(bind, $call, arguments);\n if ($gOPD && $defineProperty) {\n var desc = $gOPD(func, \"length\");\n if (desc.configurable) {\n $defineProperty(\n func,\n \"length\",\n { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n );\n }\n }\n return func;\n };\n var applyBind = function applyBind2() {\n return $reflectApply(bind, $apply, arguments);\n };\n if ($defineProperty) {\n $defineProperty(module.exports, \"apply\", { value: applyBind });\n } else {\n module.exports.apply = applyBind;\n }\n }\n});\n\n// node_modules/call-bind/callBound.js\nvar require_callBound = __commonJS({\n \"node_modules/call-bind/callBound.js\"(exports, module) {\n \"use strict\";\n var GetIntrinsic = require_get_intrinsic();\n var callBind = require_call_bind();\n var $indexOf = callBind(GetIntrinsic(\"String.prototype.indexOf\"));\n module.exports = function callBoundIntrinsic(name2, allowMissing) {\n var intrinsic = GetIntrinsic(name2, !!allowMissing);\n if (typeof intrinsic === \"function\" && $indexOf(name2, \".prototype.\") > -1) {\n return callBind(intrinsic);\n }\n return intrinsic;\n };\n }\n});\n\n// node_modules/has-tostringtag/shams.js\nvar require_shams2 = __commonJS({\n \"node_modules/has-tostringtag/shams.js\"(exports, module) {\n \"use strict\";\n var hasSymbols = require_shams();\n module.exports = function hasToStringTagShams() {\n return hasSymbols() && !!Symbol.toStringTag;\n };\n }\n});\n\n// node_modules/is-regex/index.js\nvar require_is_regex = __commonJS({\n \"node_modules/is-regex/index.js\"(exports, module) {\n \"use strict\";\n var callBound = require_callBound();\n var hasToStringTag = require_shams2()();\n var has;\n var $exec;\n var isRegexMarker;\n var badStringifier;\n if (hasToStringTag) {\n has = callBound(\"Object.prototype.hasOwnProperty\");\n $exec = callBound(\"RegExp.prototype.exec\");\n isRegexMarker = {};\n throwRegexMarker = function() {\n throw isRegexMarker;\n };\n badStringifier = {\n toString: throwRegexMarker,\n valueOf: throwRegexMarker\n };\n if (typeof Symbol.toPrimitive === \"symbol\") {\n badStringifier[Symbol.toPrimitive] = throwRegexMarker;\n }\n }\n var throwRegexMarker;\n var $toString = callBound(\"Object.prototype.toString\");\n var gOPD = Object.getOwnPropertyDescriptor;\n var regexClass = \"[object RegExp]\";\n module.exports = hasToStringTag ? function isRegex(value2) {\n if (!value2 || typeof value2 !== \"object\") {\n return false;\n }\n var descriptor = gOPD(value2, \"lastIndex\");\n var hasLastIndexDataProperty = descriptor && has(descriptor, \"value\");\n if (!hasLastIndexDataProperty) {\n return false;\n }\n try {\n $exec(value2, badStringifier);\n } catch (e) {\n return e === isRegexMarker;\n }\n } : function isRegex(value2) {\n if (!value2 || typeof value2 !== \"object\" && typeof value2 !== \"function\") {\n return false;\n }\n return $toString(value2) === regexClass;\n };\n }\n});\n\n// node_modules/is-function/index.js\nvar require_is_function = __commonJS({\n \"node_modules/is-function/index.js\"(exports, module) {\n module.exports = isFunction3;\n var toString2 = Object.prototype.toString;\n function isFunction3(fn) {\n if (!fn) {\n return false;\n }\n var string = toString2.call(fn);\n return string === \"[object Function]\" || typeof fn === \"function\" && string !== \"[object RegExp]\" || typeof window !== \"undefined\" && (fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt);\n }\n }\n});\n\n// node_modules/is-symbol/index.js\nvar require_is_symbol = __commonJS({\n \"node_modules/is-symbol/index.js\"(exports, module) {\n \"use strict\";\n var toStr = Object.prototype.toString;\n var hasSymbols = require_has_symbols()();\n if (hasSymbols) {\n symToStr = Symbol.prototype.toString;\n symStringRegex = /^Symbol\\(.*\\)$/;\n isSymbolObject = function isRealSymbolObject(value2) {\n if (typeof value2.valueOf() !== \"symbol\") {\n return false;\n }\n return symStringRegex.test(symToStr.call(value2));\n };\n module.exports = function isSymbol3(value2) {\n if (typeof value2 === \"symbol\") {\n return true;\n }\n if (toStr.call(value2) !== \"[object Symbol]\") {\n return false;\n }\n try {\n return isSymbolObject(value2);\n } catch (e) {\n return false;\n }\n };\n } else {\n module.exports = function isSymbol3(value2) {\n return false;\n };\n }\n var symToStr;\n var symStringRegex;\n var isSymbolObject;\n }\n});\n\n// src/index.ts\nvar import_is_regex = __toESM(require_is_regex());\nvar import_is_function = __toESM(require_is_function());\nvar import_is_symbol = __toESM(require_is_symbol());\n\n// node_modules/isobject/index.js\nfunction isObject(val) {\n return val != null && typeof val === \"object\" && Array.isArray(val) === false;\n}\n\n// node_modules/lodash-es/_freeGlobal.js\nvar freeGlobal = typeof global == \"object\" && global && global.Object === Object && global;\nvar freeGlobal_default = freeGlobal;\n\n// node_modules/lodash-es/_root.js\nvar freeSelf = typeof self == \"object\" && self && self.Object === Object && self;\nvar root2 = freeGlobal_default || freeSelf || Function(\"return this\")();\nvar root_default = root2;\n\n// node_modules/lodash-es/_Symbol.js\nvar Symbol2 = root_default.Symbol;\nvar Symbol_default = Symbol2;\n\n// node_modules/lodash-es/_getRawTag.js\nvar objectProto = Object.prototype;\nvar hasOwnProperty = objectProto.hasOwnProperty;\nvar nativeObjectToString = objectProto.toString;\nvar symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;\nfunction getRawTag(value2) {\n var isOwn = hasOwnProperty.call(value2, symToStringTag), tag = value2[symToStringTag];\n try {\n value2[symToStringTag] = void 0;\n var unmasked = true;\n } catch (e) {\n }\n var result2 = nativeObjectToString.call(value2);\n if (unmasked) {\n if (isOwn) {\n value2[symToStringTag] = tag;\n } else {\n delete value2[symToStringTag];\n }\n }\n return result2;\n}\nvar getRawTag_default = getRawTag;\n\n// node_modules/lodash-es/_objectToString.js\nvar objectProto2 = Object.prototype;\nvar nativeObjectToString2 = objectProto2.toString;\nfunction objectToString(value2) {\n return nativeObjectToString2.call(value2);\n}\nvar objectToString_default = objectToString;\n\n// node_modules/lodash-es/_baseGetTag.js\nvar nullTag = \"[object Null]\";\nvar undefinedTag = \"[object Undefined]\";\nvar symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;\nfunction baseGetTag(value2) {\n if (value2 == null) {\n return value2 === void 0 ? undefinedTag : nullTag;\n }\n return symToStringTag2 && symToStringTag2 in Object(value2) ? getRawTag_default(value2) : objectToString_default(value2);\n}\nvar baseGetTag_default = baseGetTag;\n\n// node_modules/lodash-es/isObjectLike.js\nfunction isObjectLike(value2) {\n return value2 != null && typeof value2 == \"object\";\n}\nvar isObjectLike_default = isObjectLike;\n\n// node_modules/lodash-es/isSymbol.js\nvar symbolTag = \"[object Symbol]\";\nfunction isSymbol(value2) {\n return typeof value2 == \"symbol\" || isObjectLike_default(value2) && baseGetTag_default(value2) == symbolTag;\n}\nvar isSymbol_default = isSymbol;\n\n// node_modules/lodash-es/_arrayMap.js\nfunction arrayMap(array, iteratee) {\n var index = -1, length = array == null ? 0 : array.length, result2 = Array(length);\n while (++index < length) {\n result2[index] = iteratee(array[index], index, array);\n }\n return result2;\n}\nvar arrayMap_default = arrayMap;\n\n// node_modules/lodash-es/isArray.js\nvar isArray = Array.isArray;\nvar isArray_default = isArray;\n\n// node_modules/lodash-es/_baseToString.js\nvar INFINITY = 1 / 0;\nvar symbolProto = Symbol_default ? Symbol_default.prototype : void 0;\nvar symbolToString = symbolProto ? symbolProto.toString : void 0;\nfunction baseToString(value2) {\n if (typeof value2 == \"string\") {\n return value2;\n }\n if (isArray_default(value2)) {\n return arrayMap_default(value2, baseToString) + \"\";\n }\n if (isSymbol_default(value2)) {\n return symbolToString ? symbolToString.call(value2) : \"\";\n }\n var result2 = value2 + \"\";\n return result2 == \"0\" && 1 / value2 == -INFINITY ? \"-0\" : result2;\n}\nvar baseToString_default = baseToString;\n\n// node_modules/lodash-es/isObject.js\nfunction isObject2(value2) {\n var type = typeof value2;\n return value2 != null && (type == \"object\" || type == \"function\");\n}\nvar isObject_default = isObject2;\n\n// node_modules/lodash-es/isFunction.js\nvar asyncTag = \"[object AsyncFunction]\";\nvar funcTag = \"[object Function]\";\nvar genTag = \"[object GeneratorFunction]\";\nvar proxyTag = \"[object Proxy]\";\nfunction isFunction(value2) {\n if (!isObject_default(value2)) {\n return false;\n }\n var tag = baseGetTag_default(value2);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\nvar isFunction_default = isFunction;\n\n// node_modules/lodash-es/_coreJsData.js\nvar coreJsData = root_default[\"__core-js_shared__\"];\nvar coreJsData_default = coreJsData;\n\n// node_modules/lodash-es/_isMasked.js\nvar maskSrcKey = function() {\n var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || \"\");\n return uid ? \"Symbol(src)_1.\" + uid : \"\";\n}();\nfunction isMasked(func) {\n return !!maskSrcKey && maskSrcKey in func;\n}\nvar isMasked_default = isMasked;\n\n// node_modules/lodash-es/_toSource.js\nvar funcProto = Function.prototype;\nvar funcToString = funcProto.toString;\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {\n }\n try {\n return func + \"\";\n } catch (e) {\n }\n }\n return \"\";\n}\nvar toSource_default = toSource;\n\n// node_modules/lodash-es/_baseIsNative.js\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\nvar funcProto2 = Function.prototype;\nvar objectProto3 = Object.prototype;\nvar funcToString2 = funcProto2.toString;\nvar hasOwnProperty2 = objectProto3.hasOwnProperty;\nvar reIsNative = RegExp(\n \"^\" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, \"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, \"$1.*?\") + \"$\"\n);\nfunction baseIsNative(value2) {\n if (!isObject_default(value2) || isMasked_default(value2)) {\n return false;\n }\n var pattern = isFunction_default(value2) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource_default(value2));\n}\nvar baseIsNative_default = baseIsNative;\n\n// node_modules/lodash-es/_getValue.js\nfunction getValue(object, key2) {\n return object == null ? void 0 : object[key2];\n}\nvar getValue_default = getValue;\n\n// node_modules/lodash-es/_getNative.js\nfunction getNative(object, key2) {\n var value2 = getValue_default(object, key2);\n return baseIsNative_default(value2) ? value2 : void 0;\n}\nvar getNative_default = getNative;\n\n// node_modules/lodash-es/eq.js\nfunction eq(value2, other) {\n return value2 === other || value2 !== value2 && other !== other;\n}\nvar eq_default = eq;\n\n// node_modules/lodash-es/_isKey.js\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/;\nvar reIsPlainProp = /^\\w*$/;\nfunction isKey(value2, object) {\n if (isArray_default(value2)) {\n return false;\n }\n var type = typeof value2;\n if (type == \"number\" || type == \"symbol\" || type == \"boolean\" || value2 == null || isSymbol_default(value2)) {\n return true;\n }\n return reIsPlainProp.test(value2) || !reIsDeepProp.test(value2) || object != null && value2 in Object(object);\n}\nvar isKey_default = isKey;\n\n// node_modules/lodash-es/_nativeCreate.js\nvar nativeCreate = getNative_default(Object, \"create\");\nvar nativeCreate_default = nativeCreate;\n\n// node_modules/lodash-es/_hashClear.js\nfunction hashClear() {\n this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};\n this.size = 0;\n}\nvar hashClear_default = hashClear;\n\n// node_modules/lodash-es/_hashDelete.js\nfunction hashDelete(key2) {\n var result2 = this.has(key2) && delete this.__data__[key2];\n this.size -= result2 ? 1 : 0;\n return result2;\n}\nvar hashDelete_default = hashDelete;\n\n// node_modules/lodash-es/_hashGet.js\nvar HASH_UNDEFINED = \"__lodash_hash_undefined__\";\nvar objectProto4 = Object.prototype;\nvar hasOwnProperty3 = objectProto4.hasOwnProperty;\nfunction hashGet(key2) {\n var data = this.__data__;\n if (nativeCreate_default) {\n var result2 = data[key2];\n return result2 === HASH_UNDEFINED ? void 0 : result2;\n }\n return hasOwnProperty3.call(data, key2) ? data[key2] : void 0;\n}\nvar hashGet_default = hashGet;\n\n// node_modules/lodash-es/_hashHas.js\nvar objectProto5 = Object.prototype;\nvar hasOwnProperty4 = objectProto5.hasOwnProperty;\nfunction hashHas(key2) {\n var data = this.__data__;\n return nativeCreate_default ? data[key2] !== void 0 : hasOwnProperty4.call(data, key2);\n}\nvar hashHas_default = hashHas;\n\n// node_modules/lodash-es/_hashSet.js\nvar HASH_UNDEFINED2 = \"__lodash_hash_undefined__\";\nfunction hashSet(key2, value2) {\n var data = this.__data__;\n this.size += this.has(key2) ? 0 : 1;\n data[key2] = nativeCreate_default && value2 === void 0 ? HASH_UNDEFINED2 : value2;\n return this;\n}\nvar hashSet_default = hashSet;\n\n// node_modules/lodash-es/_Hash.js\nfunction Hash(entries) {\n var index = -1, length = entries == null ? 0 : entries.length;\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\nHash.prototype.clear = hashClear_default;\nHash.prototype[\"delete\"] = hashDelete_default;\nHash.prototype.get = hashGet_default;\nHash.prototype.has = hashHas_default;\nHash.prototype.set = hashSet_default;\nvar Hash_default = Hash;\n\n// node_modules/lodash-es/_listCacheClear.js\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\nvar listCacheClear_default = listCacheClear;\n\n// node_modules/lodash-es/_assocIndexOf.js\nfunction assocIndexOf(array, key2) {\n var length = array.length;\n while (length--) {\n if (eq_default(array[length][0], key2)) {\n return length;\n }\n }\n return -1;\n}\nvar assocIndexOf_default = assocIndexOf;\n\n// node_modules/lodash-es/_listCacheDelete.js\nvar arrayProto = Array.prototype;\nvar splice = arrayProto.splice;\nfunction listCacheDelete(key2) {\n var data = this.__data__, index = assocIndexOf_default(data, key2);\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}\nvar listCacheDelete_default = listCacheDelete;\n\n// node_modules/lodash-es/_listCacheGet.js\nfunction listCacheGet(key2) {\n var data = this.__data__, index = assocIndexOf_default(data, key2);\n return index < 0 ? void 0 : data[index][1];\n}\nvar listCacheGet_default = listCacheGet;\n\n// node_modules/lodash-es/_listCacheHas.js\nfunction listCacheHas(key2) {\n return assocIndexOf_default(this.__data__, key2) > -1;\n}\nvar listCacheHas_default = listCacheHas;\n\n// node_modules/lodash-es/_listCacheSet.js\nfunction listCacheSet(key2, value2) {\n var data = this.__data__, index = assocIndexOf_default(data, key2);\n if (index < 0) {\n ++this.size;\n data.push([key2, value2]);\n } else {\n data[index][1] = value2;\n }\n return this;\n}\nvar listCacheSet_default = listCacheSet;\n\n// node_modules/lodash-es/_ListCache.js\nfunction ListCache(entries) {\n var index = -1, length = entries == null ? 0 : entries.length;\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\nListCache.prototype.clear = listCacheClear_default;\nListCache.prototype[\"delete\"] = listCacheDelete_default;\nListCache.prototype.get = listCacheGet_default;\nListCache.prototype.has = listCacheHas_default;\nListCache.prototype.set = listCacheSet_default;\nvar ListCache_default = ListCache;\n\n// node_modules/lodash-es/_Map.js\nvar Map2 = getNative_default(root_default, \"Map\");\nvar Map_default = Map2;\n\n// node_modules/lodash-es/_mapCacheClear.js\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n \"hash\": new Hash_default(),\n \"map\": new (Map_default || ListCache_default)(),\n \"string\": new Hash_default()\n };\n}\nvar mapCacheClear_default = mapCacheClear;\n\n// node_modules/lodash-es/_isKeyable.js\nfunction isKeyable(value2) {\n var type = typeof value2;\n return type == \"string\" || type == \"number\" || type == \"symbol\" || type == \"boolean\" ? value2 !== \"__proto__\" : value2 === null;\n}\nvar isKeyable_default = isKeyable;\n\n// node_modules/lodash-es/_getMapData.js\nfunction getMapData(map, key2) {\n var data = map.__data__;\n return isKeyable_default(key2) ? data[typeof key2 == \"string\" ? \"string\" : \"hash\"] : data.map;\n}\nvar getMapData_default = getMapData;\n\n// node_modules/lodash-es/_mapCacheDelete.js\nfunction mapCacheDelete(key2) {\n var result2 = getMapData_default(this, key2)[\"delete\"](key2);\n this.size -= result2 ? 1 : 0;\n return result2;\n}\nvar mapCacheDelete_default = mapCacheDelete;\n\n// node_modules/lodash-es/_mapCacheGet.js\nfunction mapCacheGet(key2) {\n return getMapData_default(this, key2).get(key2);\n}\nvar mapCacheGet_default = mapCacheGet;\n\n// node_modules/lodash-es/_mapCacheHas.js\nfunction mapCacheHas(key2) {\n return getMapData_default(this, key2).has(key2);\n}\nvar mapCacheHas_default = mapCacheHas;\n\n// node_modules/lodash-es/_mapCacheSet.js\nfunction mapCacheSet(key2, value2) {\n var data = getMapData_default(this, key2), size = data.size;\n data.set(key2, value2);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\nvar mapCacheSet_default = mapCacheSet;\n\n// node_modules/lodash-es/_MapCache.js\nfunction MapCache(entries) {\n var index = -1, length = entries == null ? 0 : entries.length;\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\nMapCache.prototype.clear = mapCacheClear_default;\nMapCache.prototype[\"delete\"] = mapCacheDelete_default;\nMapCache.prototype.get = mapCacheGet_default;\nMapCache.prototype.has = mapCacheHas_default;\nMapCache.prototype.set = mapCacheSet_default;\nvar MapCache_default = MapCache;\n\n// node_modules/lodash-es/memoize.js\nvar FUNC_ERROR_TEXT = \"Expected a function\";\nfunction memoize(func, resolver) {\n if (typeof func != \"function\" || resolver != null && typeof resolver != \"function\") {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args2 = arguments, key2 = resolver ? resolver.apply(this, args2) : args2[0], cache = memoized.cache;\n if (cache.has(key2)) {\n return cache.get(key2);\n }\n var result2 = func.apply(this, args2);\n memoized.cache = cache.set(key2, result2) || cache;\n return result2;\n };\n memoized.cache = new (memoize.Cache || MapCache_default)();\n return memoized;\n}\nmemoize.Cache = MapCache_default;\nvar memoize_default = memoize;\n\n// node_modules/lodash-es/_memoizeCapped.js\nvar MAX_MEMOIZE_SIZE = 500;\nfunction memoizeCapped(func) {\n var result2 = memoize_default(func, function(key2) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key2;\n });\n var cache = result2.cache;\n return result2;\n}\nvar memoizeCapped_default = memoizeCapped;\n\n// node_modules/lodash-es/_stringToPath.js\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g;\nvar stringToPath = memoizeCapped_default(function(string) {\n var result2 = [];\n if (string.charCodeAt(0) === 46) {\n result2.push(\"\");\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result2.push(quote ? subString.replace(reEscapeChar, \"$1\") : number || match);\n });\n return result2;\n});\nvar stringToPath_default = stringToPath;\n\n// node_modules/lodash-es/toString.js\nfunction toString(value2) {\n return value2 == null ? \"\" : baseToString_default(value2);\n}\nvar toString_default = toString;\n\n// node_modules/lodash-es/_castPath.js\nfunction castPath(value2, object) {\n if (isArray_default(value2)) {\n return value2;\n }\n return isKey_default(value2, object) ? [value2] : stringToPath_default(toString_default(value2));\n}\nvar castPath_default = castPath;\n\n// node_modules/lodash-es/_toKey.js\nvar INFINITY2 = 1 / 0;\nfunction toKey(value2) {\n if (typeof value2 == \"string\" || isSymbol_default(value2)) {\n return value2;\n }\n var result2 = value2 + \"\";\n return result2 == \"0\" && 1 / value2 == -INFINITY2 ? \"-0\" : result2;\n}\nvar toKey_default = toKey;\n\n// node_modules/lodash-es/_baseGet.js\nfunction baseGet(object, path) {\n path = castPath_default(path, object);\n var index = 0, length = path.length;\n while (object != null && index < length) {\n object = object[toKey_default(path[index++])];\n }\n return index && index == length ? object : void 0;\n}\nvar baseGet_default = baseGet;\n\n// node_modules/lodash-es/get.js\nfunction get(object, path, defaultValue) {\n var result2 = object == null ? void 0 : baseGet_default(object, path);\n return result2 === void 0 ? defaultValue : result2;\n}\nvar get_default = get;\n\n// src/index.ts\nimport memoize2 from \"memoizerific\";\nvar isObject3 = isObject;\nvar removeCodeComments = (code) => {\n let inQuoteChar = null;\n let inBlockComment = false;\n let inLineComment = false;\n let inRegexLiteral = false;\n let newCode = \"\";\n if (code.indexOf(\"//\") >= 0 || code.indexOf(\"/*\") >= 0) {\n for (let i = 0; i < code.length; i += 1) {\n if (!inQuoteChar && !inBlockComment && !inLineComment && !inRegexLiteral) {\n if (code[i] === '\"' || code[i] === \"'\" || code[i] === \"`\") {\n inQuoteChar = code[i];\n } else if (code[i] === \"/\" && code[i + 1] === \"*\") {\n inBlockComment = true;\n } else if (code[i] === \"/\" && code[i + 1] === \"/\") {\n inLineComment = true;\n } else if (code[i] === \"/\" && code[i + 1] !== \"/\") {\n inRegexLiteral = true;\n }\n } else {\n if (inQuoteChar && (code[i] === inQuoteChar && code[i - 1] !== \"\\\\\" || code[i] === \"\\n\" && inQuoteChar !== \"`\")) {\n inQuoteChar = null;\n }\n if (inRegexLiteral && (code[i] === \"/\" && code[i - 1] !== \"\\\\\" || code[i] === \"\\n\")) {\n inRegexLiteral = false;\n }\n if (inBlockComment && code[i - 1] === \"/\" && code[i - 2] === \"*\") {\n inBlockComment = false;\n }\n if (inLineComment && code[i] === \"\\n\") {\n inLineComment = false;\n }\n }\n if (!inBlockComment && !inLineComment) {\n newCode += code[i];\n }\n }\n } else {\n newCode = code;\n }\n return newCode;\n};\nvar cleanCode = memoize2(1e4)(\n (code) => removeCodeComments(code).replace(/\\n\\s*/g, \"\").trim()\n);\nvar convertShorthandMethods = function convertShorthandMethods2(key2, stringified) {\n const fnHead = stringified.slice(0, stringified.indexOf(\"{\"));\n const fnBody = stringified.slice(stringified.indexOf(\"{\"));\n if (fnHead.includes(\"=>\")) {\n return stringified;\n }\n if (fnHead.includes(\"function\")) {\n return stringified;\n }\n let modifiedHead = fnHead;\n modifiedHead = modifiedHead.replace(key2, \"function\");\n return modifiedHead + fnBody;\n};\nvar dateFormat = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z$/;\nvar isJSON = (input) => input.match(/^[\\[\\{\\\"\\}].*[\\]\\}\\\"]$/);\nfunction convertUnconventionalData(data) {\n if (!isObject3(data)) {\n return data;\n }\n let result2 = data;\n let wasMutated = false;\n if (typeof Event !== \"undefined\" && data instanceof Event) {\n result2 = extractEventHiddenProperties(result2);\n wasMutated = true;\n }\n result2 = Object.keys(result2).reduce((acc, key2) => {\n try {\n if (result2[key2]) {\n result2[key2].toJSON;\n }\n acc[key2] = result2[key2];\n } catch (err) {\n wasMutated = true;\n }\n return acc;\n }, {});\n return wasMutated ? result2 : data;\n}\nvar replacer = function replacer2(options2) {\n let objects;\n let map;\n let stack;\n let keys;\n return function replace(key2, value2) {\n try {\n if (key2 === \"\") {\n keys = [];\n objects = /* @__PURE__ */ new Map([[value2, \"[]\"]]);\n map = /* @__PURE__ */ new Map();\n stack = [];\n return value2;\n }\n const origin = map.get(this) || this;\n while (stack.length && origin !== stack[0]) {\n stack.shift();\n keys.pop();\n }\n if (typeof value2 === \"boolean\") {\n return value2;\n }\n if (value2 === void 0) {\n if (!options2.allowUndefined) {\n return void 0;\n }\n return \"_undefined_\";\n }\n if (value2 === null) {\n return null;\n }\n if (typeof value2 === \"number\") {\n if (value2 === -Infinity) {\n return \"_-Infinity_\";\n }\n if (value2 === Infinity) {\n return \"_Infinity_\";\n }\n if (Number.isNaN(value2)) {\n return \"_NaN_\";\n }\n return value2;\n }\n if (typeof value2 === \"bigint\") {\n return `_bigint_${value2.toString()}`;\n }\n if (typeof value2 === \"string\") {\n if (dateFormat.test(value2)) {\n if (!options2.allowDate) {\n return void 0;\n }\n return `_date_${value2}`;\n }\n return value2;\n }\n if ((0, import_is_regex.default)(value2)) {\n if (!options2.allowRegExp) {\n return void 0;\n }\n return `_regexp_${value2.flags}|${value2.source}`;\n }\n if ((0, import_is_function.default)(value2)) {\n if (!options2.allowFunction) {\n return void 0;\n }\n const { name: name2 } = value2;\n const stringified = value2.toString();\n if (!stringified.match(\n /(\\[native code\\]|WEBPACK_IMPORTED_MODULE|__webpack_exports__|__webpack_require__)/\n )) {\n return `_function_${name2}|${cleanCode(convertShorthandMethods(key2, stringified))}`;\n }\n return `_function_${name2}|${(() => {\n }).toString()}`;\n }\n if ((0, import_is_symbol.default)(value2)) {\n if (!options2.allowSymbol) {\n return void 0;\n }\n const globalRegistryKey = Symbol.keyFor(value2);\n if (globalRegistryKey !== void 0) {\n return `_gsymbol_${globalRegistryKey}`;\n }\n return `_symbol_${value2.toString().slice(7, -1)}`;\n }\n if (stack.length >= options2.maxDepth) {\n if (Array.isArray(value2)) {\n return `[Array(${value2.length})]`;\n }\n return \"[Object]\";\n }\n if (value2 === this) {\n return `_duplicate_${JSON.stringify(keys)}`;\n }\n if (value2 instanceof Error && options2.allowError) {\n return {\n __isConvertedError__: true,\n errorProperties: {\n ...value2.cause ? { cause: value2.cause } : {},\n ...value2,\n name: value2.name,\n message: value2.message,\n stack: value2.stack,\n \"_constructor-name_\": value2.constructor.name\n }\n };\n }\n if (value2.constructor && value2.constructor.name && value2.constructor.name !== \"Object\" && !Array.isArray(value2) && !options2.allowClass) {\n return void 0;\n }\n const found = objects.get(value2);\n if (!found) {\n const converted = Array.isArray(value2) ? value2 : convertUnconventionalData(value2);\n if (value2.constructor && value2.constructor.name && value2.constructor.name !== \"Object\" && !Array.isArray(value2) && options2.allowClass) {\n try {\n Object.assign(converted, { \"_constructor-name_\": value2.constructor.name });\n } catch (e) {\n }\n }\n keys.push(key2);\n stack.unshift(converted);\n objects.set(value2, JSON.stringify(keys));\n if (value2 !== converted) {\n map.set(value2, converted);\n }\n return converted;\n }\n return `_duplicate_${found}`;\n } catch (e) {\n return void 0;\n }\n };\n};\nvar reviver2 = function reviver(options) {\n const refs = [];\n let root;\n return function revive(key, value) {\n if (key === \"\") {\n root = value;\n refs.forEach(({ target, container, replacement }) => {\n const replacementArr = isJSON(replacement) ? JSON.parse(replacement) : replacement.split(\".\");\n if (replacementArr.length === 0) {\n container[target] = root;\n } else {\n container[target] = get_default(root, replacementArr);\n }\n });\n }\n if (key === \"_constructor-name_\") {\n return value;\n }\n if (isObject3(value) && value.__isConvertedError__) {\n const { message, ...properties } = value.errorProperties;\n const error = new Error(message);\n Object.assign(error, properties);\n return error;\n }\n if (isObject3(value) && value[\"_constructor-name_\"] && options.allowFunction) {\n const name2 = value[\"_constructor-name_\"];\n if (name2 !== \"Object\") {\n const Fn = new Function(`return function ${name2.replace(/[^a-zA-Z0-9$_]+/g, \"\")}(){}`)();\n Object.setPrototypeOf(value, new Fn());\n }\n delete value[\"_constructor-name_\"];\n return value;\n }\n if (typeof value === \"string\" && value.startsWith(\"_function_\") && options.allowFunction) {\n const [, name, source] = value.match(/_function_([^|]*)\\|(.*)/) || [];\n const sourceSanitized = source.replace(/[(\\(\\))|\\\\| |\\]|`]*$/, \"\");\n if (!options.lazyEval) {\n return eval(`(${sourceSanitized})`);\n }\n const result = (...args) => {\n const f = eval(`(${sourceSanitized})`);\n return f(...args);\n };\n Object.defineProperty(result, \"toString\", {\n value: () => sourceSanitized\n });\n Object.defineProperty(result, \"name\", {\n value: name\n });\n return result;\n }\n if (typeof value === \"string\" && value.startsWith(\"_regexp_\") && options.allowRegExp) {\n const [, flags, source2] = value.match(/_regexp_([^|]*)\\|(.*)/) || [];\n return new RegExp(source2, flags);\n }\n if (typeof value === \"string\" && value.startsWith(\"_date_\") && options.allowDate) {\n return new Date(value.replace(\"_date_\", \"\"));\n }\n if (typeof value === \"string\" && value.startsWith(\"_duplicate_\")) {\n refs.push({ target: key, container: this, replacement: value.replace(/^_duplicate_/, \"\") });\n return null;\n }\n if (typeof value === \"string\" && value.startsWith(\"_symbol_\") && options.allowSymbol) {\n return Symbol(value.replace(\"_symbol_\", \"\"));\n }\n if (typeof value === \"string\" && value.startsWith(\"_gsymbol_\") && options.allowSymbol) {\n return Symbol.for(value.replace(\"_gsymbol_\", \"\"));\n }\n if (typeof value === \"string\" && value === \"_-Infinity_\") {\n return -Infinity;\n }\n if (typeof value === \"string\" && value === \"_Infinity_\") {\n return Infinity;\n }\n if (typeof value === \"string\" && value === \"_NaN_\") {\n return NaN;\n }\n if (typeof value === \"string\" && value.startsWith(\"_bigint_\") && typeof BigInt === \"function\") {\n return BigInt(value.replace(\"_bigint_\", \"\"));\n }\n return value;\n };\n};\nvar defaultOptions = {\n maxDepth: 10,\n space: void 0,\n allowFunction: true,\n allowRegExp: true,\n allowDate: true,\n allowClass: true,\n allowError: true,\n allowUndefined: true,\n allowSymbol: true,\n lazyEval: true\n};\nvar stringify = (data, options2 = {}) => {\n const mergedOptions = { ...defaultOptions, ...options2 };\n return JSON.stringify(convertUnconventionalData(data), replacer(mergedOptions), options2.space);\n};\nvar mutator = () => {\n const mutated = /* @__PURE__ */ new Map();\n return function mutateUndefined(value2) {\n if (isObject3(value2)) {\n Object.entries(value2).forEach(([k, v]) => {\n if (v === \"_undefined_\") {\n value2[k] = void 0;\n } else if (!mutated.get(v)) {\n mutated.set(v, true);\n mutateUndefined(v);\n }\n });\n }\n if (Array.isArray(value2)) {\n value2.forEach((v, index) => {\n if (v === \"_undefined_\") {\n mutated.set(v, true);\n value2[index] = void 0;\n } else if (!mutated.get(v)) {\n mutated.set(v, true);\n mutateUndefined(v);\n }\n });\n }\n };\n};\nvar parse = (data, options2 = {}) => {\n const mergedOptions = { ...defaultOptions, ...options2 };\n const result2 = JSON.parse(data, reviver2(mergedOptions));\n mutator()(result2);\n return result2;\n};\nexport {\n isJSON,\n parse,\n replacer,\n reviver2 as reviver,\n stringify\n};\n/*!\n * isobject \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n/**\n * @license\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"es\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n","/* eslint no-var: off */\n\n/**\n * This file is responsible for building the DOM and updating DOM state.\n *\n * @author Tim Scanlin\n */\n\nmodule.exports = function (options) {\n var forEach = [].forEach\n var some = [].some\n var body = document.body\n var tocElement\n var currentlyHighlighting = true\n var SPACE_CHAR = ' '\n\n /**\n * Create link and list elements.\n * @param {Object} d\n * @param {HTMLElement} container\n * @return {HTMLElement}\n */\n function createEl (d, container) {\n var link = container.appendChild(createLink(d))\n if (d.children.length) {\n var list = createList(d.isCollapsed)\n d.children.forEach(function (child) {\n createEl(child, list)\n })\n link.appendChild(list)\n }\n }\n\n /**\n * Render nested heading array data into a given element.\n * @param {HTMLElement} parent Optional. If provided updates the {@see tocElement} to match.\n * @param {Array} data\n * @return {HTMLElement}\n */\n function render (parent, data) {\n var collapsed = false\n var container = createList(collapsed)\n\n data.forEach(function (d) {\n createEl(d, container)\n })\n\n // Return if no TOC element is provided or known.\n tocElement = parent || tocElement\n if (tocElement === null) {\n return\n }\n\n // Remove existing child if it exists.\n if (tocElement.firstChild) {\n tocElement.removeChild(tocElement.firstChild)\n }\n\n // Just return the parent and don't append the list if no links are found.\n if (data.length === 0) {\n return tocElement\n }\n\n // Append the Elements that have been created\n return tocElement.appendChild(container)\n }\n\n /**\n * Create link element.\n * @param {Object} data\n * @return {HTMLElement}\n */\n function createLink (data) {\n var item = document.createElement('li')\n var a = document.createElement('a')\n if (options.listItemClass) {\n item.setAttribute('class', options.listItemClass)\n }\n\n if (options.onClick) {\n a.onclick = options.onClick\n }\n\n if (options.includeTitleTags) {\n a.setAttribute('title', data.textContent)\n }\n\n if (options.includeHtml && data.childNodes.length) {\n forEach.call(data.childNodes, function (node) {\n a.appendChild(node.cloneNode(true))\n })\n } else {\n // Default behavior.\n a.textContent = data.textContent\n }\n a.setAttribute('href', options.basePath + '#' + data.id)\n a.setAttribute('class', options.linkClass +\n SPACE_CHAR + 'node-name--' + data.nodeName +\n SPACE_CHAR + options.extraLinkClasses)\n item.appendChild(a)\n return item\n }\n\n /**\n * Create list element.\n * @param {Boolean} isCollapsed\n * @return {HTMLElement}\n */\n function createList (isCollapsed) {\n var listElement = (options.orderedList) ? 'ol' : 'ul'\n var list = document.createElement(listElement)\n var classes = options.listClass + SPACE_CHAR + options.extraListClasses\n if (isCollapsed) {\n // No plus/equals here fixes compilcation issue.\n classes = classes + SPACE_CHAR + options.collapsibleClass\n classes = classes + SPACE_CHAR + options.isCollapsedClass\n }\n list.setAttribute('class', classes)\n return list\n }\n\n /**\n * Update fixed sidebar class.\n * @return {HTMLElement}\n */\n function updateFixedSidebarClass () {\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n var top\n top = document.querySelector(options.scrollContainer).scrollTop\n } else {\n top = document.documentElement.scrollTop || body.scrollTop\n }\n var posFixedEl = document.querySelector(options.positionFixedSelector)\n\n if (options.fixedSidebarOffset === 'auto') {\n options.fixedSidebarOffset = tocElement.offsetTop\n }\n\n if (top > options.fixedSidebarOffset) {\n if (posFixedEl.className.indexOf(options.positionFixedClass) === -1) {\n posFixedEl.className += SPACE_CHAR + options.positionFixedClass\n }\n } else {\n posFixedEl.className = posFixedEl.className.split(SPACE_CHAR + options.positionFixedClass).join('')\n }\n }\n\n /**\n * Get top position of heading\n * @param {HTMLElement} obj\n * @return {int} position\n */\n function getHeadingTopPos (obj) {\n var position = 0\n if (obj !== null) {\n position = obj.offsetTop\n if (options.hasInnerContainers) { position += getHeadingTopPos(obj.offsetParent) }\n }\n return position\n }\n\n /**\n * Update TOC highlighting and collapsed groupings.\n */\n function updateToc (headingsArray) {\n // If a fixed content container was set\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n var top\n top = document.querySelector(options.scrollContainer).scrollTop\n } else {\n top = document.documentElement.scrollTop || body.scrollTop\n }\n\n // Add fixed class at offset\n if (options.positionFixedSelector) {\n updateFixedSidebarClass()\n }\n\n // Get the top most heading currently visible on the page so we know what to highlight.\n var headings = headingsArray\n var topHeader\n // Using some instead of each so that we can escape early.\n if (currentlyHighlighting &&\n tocElement !== null &&\n headings.length > 0) {\n some.call(headings, function (heading, i) {\n if (getHeadingTopPos(heading) > top + options.headingsOffset + 10) {\n // Don't allow negative index value.\n var index = (i === 0) ? i : i - 1\n topHeader = headings[index]\n return true\n } else if (i === headings.length - 1) {\n // This allows scrolling for the last heading on the page.\n topHeader = headings[headings.length - 1]\n return true\n }\n })\n\n var oldActiveTocLink = tocElement.querySelector('.' + options.activeLinkClass)\n var activeTocLink = tocElement\n .querySelector('.' + options.linkClass +\n '.node-name--' + topHeader.nodeName +\n '[href=\"' + options.basePath + '#' + topHeader.id.replace(/([ #;&,.+*~':\"!^$[\\]()=>|/\\\\@])/g, '\\\\$1') + '\"]')\n // Performance improvement to only change the classes\n // for the toc if a new link should be highlighted.\n if (oldActiveTocLink === activeTocLink) {\n return\n }\n\n // Remove the active class from the other tocLinks.\n var tocLinks = tocElement\n .querySelectorAll('.' + options.linkClass)\n forEach.call(tocLinks, function (tocLink) {\n tocLink.className = tocLink.className.split(SPACE_CHAR + options.activeLinkClass).join('')\n })\n var tocLis = tocElement\n .querySelectorAll('.' + options.listItemClass)\n forEach.call(tocLis, function (tocLi) {\n tocLi.className = tocLi.className.split(SPACE_CHAR + options.activeListItemClass).join('')\n })\n\n // Add the active class to the active tocLink.\n if (activeTocLink && activeTocLink.className.indexOf(options.activeLinkClass) === -1) {\n activeTocLink.className += SPACE_CHAR + options.activeLinkClass\n }\n var li = activeTocLink && activeTocLink.parentNode\n if (li && li.className.indexOf(options.activeListItemClass) === -1) {\n li.className += SPACE_CHAR + options.activeListItemClass\n }\n\n var tocLists = tocElement\n .querySelectorAll('.' + options.listClass + '.' + options.collapsibleClass)\n\n // Collapse the other collapsible lists.\n forEach.call(tocLists, function (list) {\n if (list.className.indexOf(options.isCollapsedClass) === -1) {\n list.className += SPACE_CHAR + options.isCollapsedClass\n }\n })\n\n // Expand the active link's collapsible list and its sibling if applicable.\n if (activeTocLink && activeTocLink.nextSibling && activeTocLink.nextSibling.className.indexOf(options.isCollapsedClass) !== -1) {\n activeTocLink.nextSibling.className = activeTocLink.nextSibling.className.split(SPACE_CHAR + options.isCollapsedClass).join('')\n }\n removeCollapsedFromParents(activeTocLink && activeTocLink.parentNode.parentNode)\n }\n }\n\n /**\n * Remove collapsed class from parent elements.\n * @param {HTMLElement} element\n * @return {HTMLElement}\n */\n function removeCollapsedFromParents (element) {\n if (element && element.className.indexOf(options.collapsibleClass) !== -1 && element.className.indexOf(options.isCollapsedClass) !== -1) {\n element.className = element.className.split(SPACE_CHAR + options.isCollapsedClass).join('')\n return removeCollapsedFromParents(element.parentNode.parentNode)\n }\n return element\n }\n\n /**\n * Disable TOC Animation when a link is clicked.\n * @param {Event} event\n */\n function disableTocAnimation (event) {\n var target = event.target || event.srcElement\n if (typeof target.className !== 'string' || target.className.indexOf(options.linkClass) === -1) {\n return\n }\n // Bind to tocLink clicks to temporarily disable highlighting\n // while smoothScroll is animating.\n currentlyHighlighting = false\n }\n\n /**\n * Enable TOC Animation.\n */\n function enableTocAnimation () {\n currentlyHighlighting = true\n }\n\n return {\n enableTocAnimation,\n disableTocAnimation,\n render,\n updateToc\n }\n}\n","module.exports = {\n // Where to render the table of contents.\n tocSelector: '.js-toc',\n // Where to grab the headings to build the table of contents.\n contentSelector: '.js-toc-content',\n // Which headings to grab inside of the contentSelector element.\n headingSelector: 'h1, h2, h3',\n // Headings that match the ignoreSelector will be skipped.\n ignoreSelector: '.js-toc-ignore',\n // For headings inside relative or absolute positioned containers within content\n hasInnerContainers: false,\n // Main class to add to links.\n linkClass: 'toc-link',\n // Extra classes to add to links.\n extraLinkClasses: '',\n // Class to add to active links,\n // the link corresponding to the top most heading on the page.\n activeLinkClass: 'is-active-link',\n // Main class to add to lists.\n listClass: 'toc-list',\n // Extra classes to add to lists.\n extraListClasses: '',\n // Class that gets added when a list should be collapsed.\n isCollapsedClass: 'is-collapsed',\n // Class that gets added when a list should be able\n // to be collapsed but isn't necessarily collapsed.\n collapsibleClass: 'is-collapsible',\n // Class to add to list items.\n listItemClass: 'toc-list-item',\n // Class to add to active list items.\n activeListItemClass: 'is-active-li',\n // How many heading levels should not be collapsed.\n // For example, number 6 will show everything since\n // there are only 6 heading levels and number 0 will collapse them all.\n // The sections that are hidden will open\n // and close as you scroll to headings within them.\n collapseDepth: 0,\n // Smooth scrolling enabled.\n scrollSmooth: true,\n // Smooth scroll duration.\n scrollSmoothDuration: 420,\n // Smooth scroll offset.\n scrollSmoothOffset: 0,\n // Callback for scroll end.\n scrollEndCallback: function (e) {},\n // Headings offset between the headings and the top of the document (this is meant for minor adjustments).\n headingsOffset: 1,\n // Timeout between events firing to make sure it's\n // not too rapid (for performance reasons).\n throttleTimeout: 50,\n // Element to add the positionFixedClass to.\n positionFixedSelector: null,\n // Fixed position class to add to make sidebar fixed after scrolling\n // down past the fixedSidebarOffset.\n positionFixedClass: 'is-position-fixed',\n // fixedSidebarOffset can be any number but by default is set\n // to auto which sets the fixedSidebarOffset to the sidebar\n // element's offsetTop from the top of the document on init.\n fixedSidebarOffset: 'auto',\n // includeHtml can be set to true to include the HTML markup from the\n // heading node instead of just including the textContent.\n includeHtml: false,\n // includeTitleTags automatically sets the html title tag of the link\n // to match the title. This can be useful for SEO purposes or\n // when truncating titles.\n includeTitleTags: false,\n // onclick function to apply to all links in toc. will be called with\n // the event as the first parameter, and this can be used to stop,\n // propagation, prevent default or perform action\n onClick: function (e) {},\n // orderedList can be set to false to generate unordered lists (ul)\n // instead of ordered lists (ol)\n orderedList: true,\n // If there is a fixed article scroll container, set to calculate titles' offset\n scrollContainer: null,\n // prevent ToC DOM rendering if it's already rendered by an external system\n skipRendering: false,\n // Optional callback to change heading labels.\n // For example it can be used to cut down and put ellipses on multiline headings you deem too long.\n // Called each time a heading is parsed. Expects a string and returns the modified label to display.\n // Additionally, the attribute `data-heading-label` may be used on a heading to specify\n // a shorter string to be used in the TOC.\n // function (string) => string\n headingLabelCallback: false,\n // ignore headings that are hidden in DOM\n ignoreHiddenElements: false,\n // Optional callback to modify properties of parsed headings.\n // The heading element is passed in node parameter and information parsed by default parser is provided in obj parameter.\n // Function has to return the same or modified obj.\n // The heading will be excluded from TOC if nothing is returned.\n // function (object, HTMLElement) => object | void\n headingObjectCallback: null,\n // Set the base path, useful if you use a `base` tag in `head`.\n basePath: '',\n // Only takes affect when `tocSelector` is scrolling,\n // keep the toc scroll position in sync with the content.\n disableTocScrollSync: false,\n // Offset for the toc scroll (top) position when scrolling the page.\n // Only effective if `disableTocScrollSync` is false.\n tocScrollOffset: 0\n}\n","/* eslint no-var: off */\n/**\n * Tocbot\n * Tocbot creates a table of contents based on HTML headings on a page,\n * this allows users to easily jump to different sections of the document.\n * Tocbot was inspired by tocify (http://gregfranko.com/jquery.tocify.js/).\n * The main differences are that it works natively without any need for jquery or jquery UI).\n *\n * @author Tim Scanlin\n */\n\n/* globals define */\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory(root))\n } else if (typeof exports === 'object') {\n module.exports = factory(root)\n } else {\n root.tocbot = factory(root)\n }\n})(typeof global !== 'undefined' ? global : window || global, function (root) {\n 'use strict'\n\n // Default options.\n var defaultOptions = require('./default-options.js')\n // Object to store current options.\n var options = {}\n // Object for public APIs.\n var tocbot = {}\n\n var BuildHtml = require('./build-html.js')\n var ParseContent = require('./parse-content.js')\n var updateTocScroll = require('./update-toc-scroll.js')\n // Keep these variables at top scope once options are passed in.\n var buildHtml\n var parseContent\n\n // Just return if its not a browser.\n var supports = !!root && !!root.document && !!root.document.querySelector && !!root.addEventListener // Feature test\n if (typeof window === 'undefined' && !supports) {\n return\n }\n var headingsArray\n\n // From: https://github.com/Raynos/xtend\n var hasOwnProperty = Object.prototype.hasOwnProperty\n function extend () {\n var target = {}\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n return target\n }\n\n // From: https://remysharp.com/2010/07/21/throttling-function-calls\n function throttle (fn, threshold, scope) {\n threshold || (threshold = 250)\n var last\n var deferTimer\n return function () {\n var context = scope || this\n var now = +new Date()\n var args = arguments\n if (last && now < last + threshold) {\n // hold on to it\n clearTimeout(deferTimer)\n deferTimer = setTimeout(function () {\n last = now\n fn.apply(context, args)\n }, threshold)\n } else {\n last = now\n fn.apply(context, args)\n }\n }\n }\n\n function getContentElement (options) {\n try {\n return options.contentElement || document.querySelector(options.contentSelector)\n } catch (e) {\n console.warn('Contents element not found: ' + options.contentSelector) // eslint-disable-line\n return null\n }\n }\n\n function getTocElement (options) {\n try {\n return options.tocElement || document.querySelector(options.tocSelector)\n } catch (e) {\n console.warn('TOC element not found: ' + options.tocSelector) // eslint-disable-line\n return null\n }\n }\n\n /**\n * Destroy tocbot.\n */\n tocbot.destroy = function () {\n var tocElement = getTocElement(options)\n if (tocElement === null) {\n return\n }\n\n if (!options.skipRendering) {\n // Clear HTML.\n if (tocElement) {\n tocElement.innerHTML = ''\n }\n }\n\n // Remove event listeners.\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).removeEventListener('scroll', this._scrollListener, false)\n document.querySelector(options.scrollContainer).removeEventListener('resize', this._scrollListener, false)\n if (buildHtml) {\n document.querySelector(options.scrollContainer).removeEventListener('click', this._clickListener, false)\n }\n } else {\n document.removeEventListener('scroll', this._scrollListener, false)\n document.removeEventListener('resize', this._scrollListener, false)\n if (buildHtml) {\n document.removeEventListener('click', this._clickListener, false)\n }\n }\n }\n\n /**\n * Initialize tocbot.\n * @param {object} customOptions\n */\n tocbot.init = function (customOptions) {\n // feature test\n if (!supports) {\n return\n }\n\n // Merge defaults with user options.\n // Set to options variable at the top.\n options = extend(defaultOptions, customOptions || {})\n this.options = options\n this.state = {}\n\n // Init smooth scroll if enabled (default).\n if (options.scrollSmooth) {\n options.duration = options.scrollSmoothDuration\n options.offset = options.scrollSmoothOffset\n tocbot.scrollSmooth = require('./scroll-smooth').initSmoothScrolling(options)\n }\n\n // Pass options to these modules.\n buildHtml = BuildHtml(options)\n parseContent = ParseContent(options)\n\n // For testing purposes.\n this._buildHtml = buildHtml\n this._parseContent = parseContent\n this._headingsArray = headingsArray\n\n // Destroy it if it exists first.\n tocbot.destroy()\n\n var contentElement = getContentElement(options)\n if (contentElement === null) {\n return\n }\n\n var tocElement = getTocElement(options)\n if (tocElement === null) {\n return\n }\n\n // Get headings array.\n headingsArray = parseContent.selectHeadings(contentElement, options.headingSelector)\n // Return if no headings are found.\n if (headingsArray === null) {\n return\n }\n\n // Build nested headings array.\n var nestedHeadingsObj = parseContent.nestHeadingsArray(headingsArray)\n var nestedHeadings = nestedHeadingsObj.nest\n\n // Render.\n if (!options.skipRendering) {\n buildHtml.render(tocElement, nestedHeadings)\n } else {\n // No need to attach listeners if skipRendering is true, this was causing errors.\n return this\n }\n\n // Update Sidebar and bind listeners.\n this._scrollListener = throttle(function (e) {\n buildHtml.updateToc(headingsArray)\n !options.disableTocScrollSync && updateTocScroll(options)\n var isTop = e && e.target && e.target.scrollingElement && e.target.scrollingElement.scrollTop === 0\n if ((e && (e.eventPhase === 0 || e.currentTarget === null)) || isTop) {\n buildHtml.updateToc(headingsArray)\n if (options.scrollEndCallback) {\n options.scrollEndCallback(e)\n }\n }\n }, options.throttleTimeout)\n this._scrollListener()\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).addEventListener('scroll', this._scrollListener, false)\n document.querySelector(options.scrollContainer).addEventListener('resize', this._scrollListener, false)\n } else {\n document.addEventListener('scroll', this._scrollListener, false)\n document.addEventListener('resize', this._scrollListener, false)\n }\n\n // Bind click listeners to disable animation.\n var timeout = null\n this._clickListener = throttle(function (event) {\n if (options.scrollSmooth) {\n buildHtml.disableTocAnimation(event)\n }\n buildHtml.updateToc(headingsArray)\n // Timeout to re-enable the animation.\n timeout && clearTimeout(timeout)\n timeout = setTimeout(function () {\n buildHtml.enableTocAnimation()\n }, options.scrollSmoothDuration)\n }, options.throttleTimeout)\n\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).addEventListener('click', this._clickListener, false)\n } else {\n document.addEventListener('click', this._clickListener, false)\n }\n\n return this\n }\n\n /**\n * Refresh tocbot.\n */\n tocbot.refresh = function (customOptions) {\n tocbot.destroy()\n tocbot.init(customOptions || this.options)\n }\n\n // Make tocbot available globally.\n root.tocbot = tocbot\n\n return tocbot\n})\n","/* eslint no-var: off */\n/**\n * This file is responsible for parsing the content from the DOM and making\n * sure data is nested properly.\n *\n * @author Tim Scanlin\n */\n\nmodule.exports = function parseContent (options) {\n var reduce = [].reduce\n\n /**\n * Get the last item in an array and return a reference to it.\n * @param {Array} array\n * @return {Object}\n */\n function getLastItem (array) {\n return array[array.length - 1]\n }\n\n /**\n * Get heading level for a heading dom node.\n * @param {HTMLElement} heading\n * @return {Number}\n */\n function getHeadingLevel (heading) {\n return +heading.nodeName.toUpperCase().replace('H', '')\n }\n\n /**\n * Determine whether the object is an HTML Element.\n * Also works inside iframes. HTML Elements might be created by the parent document.\n * @param {Object} maybeElement\n * @return {Number}\n */\n function isHTMLElement (maybeElement) {\n try {\n return (\n maybeElement instanceof window.HTMLElement ||\n maybeElement instanceof window.parent.HTMLElement\n )\n } catch (e) {\n return maybeElement instanceof window.HTMLElement\n }\n }\n\n /**\n * Get important properties from a heading element and store in a plain object.\n * @param {HTMLElement} heading\n * @return {Object}\n */\n function getHeadingObject (heading) {\n // each node is processed twice by this method because nestHeadingsArray() and addNode() calls it\n // first time heading is real DOM node element, second time it is obj\n // that is causing problem so I am processing only original DOM node\n if (!isHTMLElement(heading)) return heading\n\n if (options.ignoreHiddenElements && (!heading.offsetHeight || !heading.offsetParent)) {\n return null\n }\n\n const headingLabel = heading.getAttribute('data-heading-label') ||\n (options.headingLabelCallback ? String(options.headingLabelCallback(heading.textContent)) : heading.textContent.trim())\n var obj = {\n id: heading.id,\n children: [],\n nodeName: heading.nodeName,\n headingLevel: getHeadingLevel(heading),\n textContent: headingLabel\n }\n\n if (options.includeHtml) {\n obj.childNodes = heading.childNodes\n }\n\n if (options.headingObjectCallback) {\n return options.headingObjectCallback(obj, heading)\n }\n\n return obj\n }\n\n /**\n * Add a node to the nested array.\n * @param {Object} node\n * @param {Array} nest\n * @return {Array}\n */\n function addNode (node, nest) {\n var obj = getHeadingObject(node)\n var level = obj.headingLevel\n var array = nest\n var lastItem = getLastItem(array)\n var lastItemLevel = lastItem\n ? lastItem.headingLevel\n : 0\n var counter = level - lastItemLevel\n\n while (counter > 0) {\n lastItem = getLastItem(array)\n // Handle case where there are multiple h5+ in a row.\n if (lastItem && level === lastItem.headingLevel) {\n break\n } else if (lastItem && lastItem.children !== undefined) {\n array = lastItem.children\n }\n counter--\n }\n\n if (level >= options.collapseDepth) {\n obj.isCollapsed = true\n }\n\n array.push(obj)\n return array\n }\n\n /**\n * Select headings in content area, exclude any selector in options.ignoreSelector\n * @param {HTMLElement} contentElement\n * @param {Array} headingSelector\n * @return {Array}\n */\n function selectHeadings (contentElement, headingSelector) {\n var selectors = headingSelector\n if (options.ignoreSelector) {\n selectors = headingSelector.split(',')\n .map(function mapSelectors (selector) {\n return selector.trim() + ':not(' + options.ignoreSelector + ')'\n })\n }\n try {\n return contentElement.querySelectorAll(selectors)\n } catch (e) {\n console.warn('Headers not found with selector: ' + selectors); // eslint-disable-line\n return null\n }\n }\n\n /**\n * Nest headings array into nested arrays with 'children' property.\n * @param {Array} headingsArray\n * @return {Object}\n */\n function nestHeadingsArray (headingsArray) {\n return reduce.call(headingsArray, function reducer (prev, curr) {\n var currentHeading = getHeadingObject(curr)\n if (currentHeading) {\n addNode(currentHeading, prev.nest)\n }\n return prev\n }, {\n nest: []\n })\n }\n\n return {\n nestHeadingsArray,\n selectHeadings\n }\n}\n","/* eslint no-var: off */\n/* globals location, requestAnimationFrame */\n\nexports.initSmoothScrolling = initSmoothScrolling\n\nfunction initSmoothScrolling (options) {\n // if (isCssSmoothSCrollSupported()) { return }\n\n var duration = options.duration\n var offset = options.offset\n\n var pageUrl = location.hash\n ? stripHash(location.href)\n : location.href\n\n delegatedLinkHijacking()\n\n function delegatedLinkHijacking () {\n document.body.addEventListener('click', onClick, false)\n\n function onClick (e) {\n if (\n !isInPageLink(e.target) ||\n e.target.className.indexOf('no-smooth-scroll') > -1 ||\n (e.target.href.charAt(e.target.href.length - 2) === '#' &&\n e.target.href.charAt(e.target.href.length - 1) === '!') ||\n e.target.className.indexOf(options.linkClass) === -1) {\n return\n }\n\n // Don't prevent default or hash doesn't change.\n // e.preventDefault()\n\n jump(e.target.hash, {\n duration,\n offset,\n callback: function () {\n setFocus(e.target.hash)\n }\n })\n }\n }\n\n function isInPageLink (n) {\n return n.tagName.toLowerCase() === 'a' &&\n (n.hash.length > 0 || n.href.charAt(n.href.length - 1) === '#') &&\n (stripHash(n.href) === pageUrl || stripHash(n.href) + '#' === pageUrl)\n }\n\n function stripHash (url) {\n return url.slice(0, url.lastIndexOf('#'))\n }\n\n // function isCssSmoothSCrollSupported () {\n // return 'scrollBehavior' in document.documentElement.style\n // }\n\n // Adapted from:\n // https://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/\n function setFocus (hash) {\n var element = document.getElementById(hash.substring(1))\n\n if (element) {\n if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) {\n element.tabIndex = -1\n }\n\n element.focus()\n }\n }\n}\n\nfunction jump (target, options) {\n var start = window.pageYOffset\n var opt = {\n duration: options.duration,\n offset: options.offset || 0,\n callback: options.callback,\n easing: options.easing || easeInOutQuad\n }\n // This makes ids that start with a number work: ('[id=\"' + decodeURI(target).split('#').join('') + '\"]')\n // DecodeURI for nonASCII hashes, they was encoded, but id was not encoded, it lead to not finding the tgt element by id.\n // And this is for IE: document.body.scrollTop\n // Handle decoded and non-decoded URIs since sometimes URLs automatically transform them (support for internation chars).\n var tgt = document.querySelector('[id=\"' + decodeURI(target).split('#').join('') + '\"]') ||\n document.querySelector('[id=\"' + (target).split('#').join('') + '\"]')\n var distance = typeof target === 'string'\n ? opt.offset + (\n target\n ? (tgt && tgt.getBoundingClientRect().top) || 0 // handle non-existent links better.\n : -(document.documentElement.scrollTop || document.body.scrollTop))\n : target\n var duration = typeof opt.duration === 'function'\n ? opt.duration(distance)\n : opt.duration\n var timeStart\n var timeElapsed\n\n requestAnimationFrame(function (time) { timeStart = time; loop(time) })\n function loop (time) {\n timeElapsed = time - timeStart\n\n window.scrollTo(0, opt.easing(timeElapsed, start, distance, duration))\n\n if (timeElapsed < duration) { requestAnimationFrame(loop) } else { end() }\n }\n\n function end () {\n window.scrollTo(0, start + distance)\n\n if (typeof opt.callback === 'function') { opt.callback() }\n }\n\n // Robert Penner's easeInOutQuad - http://robertpenner.com/easing/\n function easeInOutQuad (t, b, c, d) {\n t /= d / 2\n if (t < 1) return c / 2 * t * t + b\n t--\n return -c / 2 * (t * (t - 2) - 1) + b\n }\n}\n","/* eslint no-var: off */\n\nmodule.exports = function updateTocScroll (options) {\n var toc = options.tocElement || document.querySelector(options.tocSelector)\n if (toc && toc.scrollHeight > toc.clientHeight) {\n var activeItem = toc.querySelector('.' + options.activeListItemClass)\n if (activeItem) {\n toc.scrollTop = activeItem.offsetTop - options.tocScrollOffset\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/5600.fe4c6b9b.iframe.bundle.js b/5600.fe4c6b9b.iframe.bundle.js
new file mode 100644
index 000000000..05122b992
--- /dev/null
+++ b/5600.fe4c6b9b.iframe.bundle.js
@@ -0,0 +1,43129 @@
+(self["webpackChunklightning_ui_docs"] = self["webpackChunklightning_ui_docs"] || []).push([[5600],{
+
+/***/ "../../../node_modules/@storybook/blocks/dist/chunk-MKV36LKP.mjs":
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ P$: () => (/* binding */ __commonJS),
+/* harmony export */ Yq: () => (/* binding */ getControlSetterButtonId),
+/* harmony export */ ZA: () => (/* binding */ getControlId),
+/* harmony export */ f1: () => (/* binding */ __toESM)
+/* harmony export */ });
+var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0, cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));var getControlId=value=>`control-${value.replace(/\s+/g,"-")}`,getControlSetterButtonId=value=>`set-${value.replace(/\s+/g,"-")}`;
+
+
+
+
+/***/ }),
+
+/***/ "../../../node_modules/@storybook/blocks/dist/index.mjs":
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+
+// EXPORTS
+__webpack_require__.d(__webpack_exports__, {
+ zE: () => (/* binding */ AnchorMdx),
+ ov: () => (/* binding */ ArgTypes),
+ Hl: () => (/* binding */ Canvas),
+ XA: () => (/* binding */ CodeOrSourceMdx),
+ VY: () => (/* binding */ DescriptionContainer),
+ kQ: () => (/* binding */ Docs),
+ Sw: () => (/* binding */ HeadersMdx),
+ oz: () => (/* binding */ Markdown2),
+ W8: () => (/* binding */ Meta),
+ hE: () => (/* binding */ Title2)
+});
+
+// UNUSED EXPORTS: AddContext, Anchor, BooleanControl, ColorControl, ColorItem, ColorPalette, Controls, DateControl, DescriptionType, DocsContainer, DocsContext, DocsPage, DocsStory, ExternalDocs, ExternalDocsContainer, FilesControl, HeaderMdx, Heading, IconGallery, IconItem, NumberControl, ObjectControl, OptionsControl, PRIMARY_STORY, Primary, PureArgsTable, RangeControl, Source, SourceContainer, SourceContext, Stories, Story, Subheading, Subtitle, TextControl, Typeset, UNKNOWN_ARGS_HASH, Unstyled, Wrapper, anchorBlockIdFromId, argsHash, assertIsFn, extractTitle, format, formatDate, formatTime, getStoryId, getStoryProps, parse, parseDate, parseTime, useOf, useSourceProps
+
+// EXTERNAL MODULE: ../../../node_modules/@storybook/blocks/dist/chunk-MKV36LKP.mjs
+var chunk_MKV36LKP = __webpack_require__("../../../node_modules/@storybook/blocks/dist/chunk-MKV36LKP.mjs");
+// EXTERNAL MODULE: ../../../node_modules/react/index.js
+var react = __webpack_require__("../../../node_modules/react/index.js");
+// EXTERNAL MODULE: ../../../node_modules/@storybook/core/dist/components/index.js
+var components = __webpack_require__("../../../node_modules/@storybook/core/dist/components/index.js");
+// EXTERNAL MODULE: ../../../node_modules/@storybook/core/dist/theming/index.js
+var theming = __webpack_require__("../../../node_modules/@storybook/core/dist/theming/index.js");
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/extends.js
+function extends_extends() {
+ return extends_extends = Object.assign ? Object.assign.bind() : function (n) {
+ for (var e = 1; e < arguments.length; e++) {
+ var t = arguments[e];
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
+ }
+ return n;
+ }, extends_extends.apply(null, arguments);
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
+function _assertThisInitialized(e) {
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return e;
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
+function _setPrototypeOf(t, e) {
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
+ return t.__proto__ = e, t;
+ }, _setPrototypeOf(t, e);
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
+
+function _inheritsLoose(t, o) {
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
+function _getPrototypeOf(t) {
+ return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
+ return t.__proto__ || Object.getPrototypeOf(t);
+ }, _getPrototypeOf(t);
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
+function _isNativeFunction(t) {
+ try {
+ return -1 !== Function.toString.call(t).indexOf("[native code]");
+ } catch (n) {
+ return "function" == typeof t;
+ }
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
+function _isNativeReflectConstruct() {
+ try {
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
+ } catch (t) {}
+ return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
+ return !!t;
+ })();
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/construct.js
+
+
+function _construct(t, e, r) {
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
+ var o = [null];
+ o.push.apply(o, e);
+ var p = new (t.bind.apply(t, o))();
+ return r && _setPrototypeOf(p, r.prototype), p;
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
+
+
+
+
+function _wrapNativeSuper(t) {
+ var r = "function" == typeof Map ? new Map() : void 0;
+ return _wrapNativeSuper = function _wrapNativeSuper(t) {
+ if (null === t || !_isNativeFunction(t)) return t;
+ if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
+ if (void 0 !== r) {
+ if (r.has(t)) return r.get(t);
+ r.set(t, Wrapper);
+ }
+ function Wrapper() {
+ return _construct(t, arguments, _getPrototypeOf(this).constructor);
+ }
+ return Wrapper.prototype = Object.create(t.prototype, {
+ constructor: {
+ value: Wrapper,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }), _setPrototypeOf(Wrapper, t);
+ }, _wrapNativeSuper(t);
+}
+
+;// CONCATENATED MODULE: ../../../node_modules/polished/dist/polished.esm.js
+
+
+
+
+
+
+function last() {
+ var _ref;
+ return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];
+}
+function negation(a) {
+ return -a;
+}
+function addition(a, b) {
+ return a + b;
+}
+function subtraction(a, b) {
+ return a - b;
+}
+function multiplication(a, b) {
+ return a * b;
+}
+function division(a, b) {
+ return a / b;
+}
+function max() {
+ return Math.max.apply(Math, arguments);
+}
+function min() {
+ return Math.min.apply(Math, arguments);
+}
+function comma() {
+ return Array.of.apply(Array, arguments);
+}
+var defaultSymbols = {
+ symbols: {
+ '*': {
+ infix: {
+ symbol: '*',
+ f: multiplication,
+ notation: 'infix',
+ precedence: 4,
+ rightToLeft: 0,
+ argCount: 2
+ },
+ symbol: '*',
+ regSymbol: '\\*'
+ },
+ '/': {
+ infix: {
+ symbol: '/',
+ f: division,
+ notation: 'infix',
+ precedence: 4,
+ rightToLeft: 0,
+ argCount: 2
+ },
+ symbol: '/',
+ regSymbol: '/'
+ },
+ '+': {
+ infix: {
+ symbol: '+',
+ f: addition,
+ notation: 'infix',
+ precedence: 2,
+ rightToLeft: 0,
+ argCount: 2
+ },
+ prefix: {
+ symbol: '+',
+ f: last,
+ notation: 'prefix',
+ precedence: 3,
+ rightToLeft: 0,
+ argCount: 1
+ },
+ symbol: '+',
+ regSymbol: '\\+'
+ },
+ '-': {
+ infix: {
+ symbol: '-',
+ f: subtraction,
+ notation: 'infix',
+ precedence: 2,
+ rightToLeft: 0,
+ argCount: 2
+ },
+ prefix: {
+ symbol: '-',
+ f: negation,
+ notation: 'prefix',
+ precedence: 3,
+ rightToLeft: 0,
+ argCount: 1
+ },
+ symbol: '-',
+ regSymbol: '-'
+ },
+ ',': {
+ infix: {
+ symbol: ',',
+ f: comma,
+ notation: 'infix',
+ precedence: 1,
+ rightToLeft: 0,
+ argCount: 2
+ },
+ symbol: ',',
+ regSymbol: ','
+ },
+ '(': {
+ prefix: {
+ symbol: '(',
+ f: last,
+ notation: 'prefix',
+ precedence: 0,
+ rightToLeft: 0,
+ argCount: 1
+ },
+ symbol: '(',
+ regSymbol: '\\('
+ },
+ ')': {
+ postfix: {
+ symbol: ')',
+ f: undefined,
+ notation: 'postfix',
+ precedence: 0,
+ rightToLeft: 0,
+ argCount: 1
+ },
+ symbol: ')',
+ regSymbol: '\\)'
+ },
+ min: {
+ func: {
+ symbol: 'min',
+ f: min,
+ notation: 'func',
+ precedence: 0,
+ rightToLeft: 0,
+ argCount: 1
+ },
+ symbol: 'min',
+ regSymbol: 'min\\b'
+ },
+ max: {
+ func: {
+ symbol: 'max',
+ f: max,
+ notation: 'func',
+ precedence: 0,
+ rightToLeft: 0,
+ argCount: 1
+ },
+ symbol: 'max',
+ regSymbol: 'max\\b'
+ }
+ }
+};
+var defaultSymbolMap = (/* unused pure expression or super */ null && (defaultSymbols));
+
+// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
+/**
+ * Parse errors.md and turn it into a simple hash of code: message
+ * @private
+ */
+var ERRORS = {
+ "1": "Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",
+ "2": "Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",
+ "3": "Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",
+ "4": "Couldn't generate valid rgb string from %s, it returned %s.\n\n",
+ "5": "Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",
+ "6": "Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",
+ "7": "Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",
+ "8": "Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",
+ "9": "Please provide a number of steps to the modularScale helper.\n\n",
+ "10": "Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",
+ "11": "Invalid value passed as base to modularScale, expected number or em string but got \"%s\"\n\n",
+ "12": "Expected a string ending in \"px\" or a number passed as the first argument to %s(), got \"%s\" instead.\n\n",
+ "13": "Expected a string ending in \"px\" or a number passed as the second argument to %s(), got \"%s\" instead.\n\n",
+ "14": "Passed invalid pixel value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n",
+ "15": "Passed invalid base value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n",
+ "16": "You must provide a template to this method.\n\n",
+ "17": "You passed an unsupported selector state to this method.\n\n",
+ "18": "minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",
+ "19": "fromSize and toSize must be provided as stringified numbers with the same units.\n\n",
+ "20": "expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",
+ "21": "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
+ "22": "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
+ "23": "fontFace expects a name of a font-family.\n\n",
+ "24": "fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",
+ "25": "fontFace expects localFonts to be an array.\n\n",
+ "26": "fontFace expects fileFormats to be an array.\n\n",
+ "27": "radialGradient requries at least 2 color-stops to properly render.\n\n",
+ "28": "Please supply a filename to retinaImage() as the first argument.\n\n",
+ "29": "Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",
+ "30": "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
+ "31": "The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",
+ "32": "To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",
+ "33": "The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",
+ "34": "borderRadius expects a radius value as a string or number as the second argument.\n\n",
+ "35": "borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n",
+ "36": "Property must be a string value.\n\n",
+ "37": "Syntax Error at %s.\n\n",
+ "38": "Formula contains a function that needs parentheses at %s.\n\n",
+ "39": "Formula is missing closing parenthesis at %s.\n\n",
+ "40": "Formula has too many closing parentheses at %s.\n\n",
+ "41": "All values in a formula must have the same unit or be unitless.\n\n",
+ "42": "Please provide a number of steps to the modularScale helper.\n\n",
+ "43": "Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",
+ "44": "Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",
+ "45": "Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",
+ "46": "Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",
+ "47": "minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",
+ "48": "fromSize and toSize must be provided as stringified numbers with the same units.\n\n",
+ "49": "Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",
+ "50": "Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",
+ "51": "Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",
+ "52": "fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",
+ "53": "fontFace expects localFonts to be an array.\n\n",
+ "54": "fontFace expects fileFormats to be an array.\n\n",
+ "55": "fontFace expects a name of a font-family.\n\n",
+ "56": "linearGradient requries at least 2 color-stops to properly render.\n\n",
+ "57": "radialGradient requries at least 2 color-stops to properly render.\n\n",
+ "58": "Please supply a filename to retinaImage() as the first argument.\n\n",
+ "59": "Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",
+ "60": "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
+ "61": "Property must be a string value.\n\n",
+ "62": "borderRadius expects a radius value as a string or number as the second argument.\n\n",
+ "63": "borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n",
+ "64": "The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",
+ "65": "To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",
+ "66": "The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",
+ "67": "You must provide a template to this method.\n\n",
+ "68": "You passed an unsupported selector state to this method.\n\n",
+ "69": "Expected a string ending in \"px\" or a number passed as the first argument to %s(), got %s instead.\n\n",
+ "70": "Expected a string ending in \"px\" or a number passed as the second argument to %s(), got %s instead.\n\n",
+ "71": "Passed invalid pixel value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
+ "72": "Passed invalid base value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
+ "73": "Please provide a valid CSS variable.\n\n",
+ "74": "CSS variable not found and no default was provided.\n\n",
+ "75": "important requires a valid style object, got a %s instead.\n\n",
+ "76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",
+ "77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
+ "78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
+};
+
+/**
+ * super basic version of sprintf
+ * @private
+ */
+function format() {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+ var a = args[0];
+ var b = [];
+ var c;
+ for (c = 1; c < args.length; c += 1) {
+ b.push(args[c]);
+ }
+ b.forEach(function (d) {
+ a = a.replace(/%[a-z]/, d);
+ });
+ return a;
+}
+
+/**
+ * Create an error file out of errors.md for development and a simple web link to the full errors
+ * in production mode.
+ * @private
+ */
+var PolishedError = /*#__PURE__*/function (_Error) {
+ _inheritsLoose(PolishedError, _Error);
+ function PolishedError(code) {
+ var _this;
+ if (true) {
+ _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
+ } else { var _len2, args, _key2; }
+ return _assertThisInitialized(_this);
+ }
+ return PolishedError;
+}( /*#__PURE__*/_wrapNativeSuper(Error));
+
+var unitRegExp = /((?!\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\D|$)|ged|darg?|nrut)/g;
+
+// Merges additional math functionality into the defaults.
+function mergeSymbolMaps(additionalSymbols) {
+ var symbolMap = {};
+ symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbolMap.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbolMap.symbols);
+ return symbolMap;
+}
+function exec(operators, values) {
+ var _ref;
+ var op = operators.pop();
+ values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));
+ return op.precedence;
+}
+function calculate(expression, additionalSymbols) {
+ var symbolMap = mergeSymbolMaps(additionalSymbols);
+ var match;
+ var operators = [symbolMap.symbols['('].prefix];
+ var values = [];
+ var pattern = new RegExp( // Pattern for numbers
+ "\\d+(?:\\.\\d+)?|" +
+ // ...and patterns for individual operators/function names
+ Object.keys(symbolMap.symbols).map(function (key) {
+ return symbolMap.symbols[key];
+ })
+ // longer symbols should be listed first
+ // $FlowFixMe
+ .sort(function (a, b) {
+ return b.symbol.length - a.symbol.length;
+ })
+ // $FlowFixMe
+ .map(function (val) {
+ return val.regSymbol;
+ }).join('|') + "|(\\S)", 'g');
+ pattern.lastIndex = 0; // Reset regular expression object
+
+ var afterValue = false;
+ do {
+ match = pattern.exec(expression);
+ var _ref2 = match || [')', undefined],
+ token = _ref2[0],
+ bad = _ref2[1];
+ var notNumber = symbolMap.symbols[token];
+ var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;
+ var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix;
+
+ // Check for syntax errors:
+ if (bad || (afterValue ? notAfterValue : notNewValue)) {
+ throw new PolishedError(37, match ? match.index : expression.length, expression);
+ }
+ if (afterValue) {
+ // We either have an infix or postfix operator (they should be mutually exclusive)
+ var curr = notNumber.postfix || notNumber.infix;
+ do {
+ var prev = operators[operators.length - 1];
+ if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break;
+ // Apply previous operator, since it has precedence over current one
+ } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function
+ afterValue = curr.notation === 'postfix';
+ if (curr.symbol !== ')') {
+ operators.push(curr);
+ // Postfix always has precedence over any operator that follows after it
+ if (afterValue) exec(operators, values);
+ }
+ } else if (notNumber) {
+ // prefix operator or function
+ operators.push(notNumber.prefix || notNumber.func);
+ if (notNumber.func) {
+ // Require an opening parenthesis
+ match = pattern.exec(expression);
+ if (!match || match[0] !== '(') {
+ throw new PolishedError(38, match ? match.index : expression.length, expression);
+ }
+ }
+ } else {
+ // number
+ values.push(+token);
+ afterValue = true;
+ }
+ } while (match && operators.length);
+ if (operators.length) {
+ throw new PolishedError(39, match ? match.index : expression.length, expression);
+ } else if (match) {
+ throw new PolishedError(40, match ? match.index : expression.length, expression);
+ } else {
+ return values.pop();
+ }
+}
+function reverseString(str) {
+ return str.split('').reverse().join('');
+}
+
+/**
+ * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.
+ *
+ *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).
+ *
+ * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * fontSize: math('12rem + 8rem'),
+ * fontSize: math('(12px + 2px) * 3'),
+ * fontSize: math('3px^2 + sqrt(4)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * fontSize: ${math('12rem + 8rem')};
+ * fontSize: ${math('(12px + 2px) * 3')};
+ * fontSize: ${math('3px^2 + sqrt(4)')};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * fontSize: '20rem',
+ * fontSize: '42px',
+ * fontSize: '11px',
+ * }
+ */
+function math(formula, additionalSymbols) {
+ var reversedFormula = reverseString(formula);
+ var formulaMatch = reversedFormula.match(unitRegExp);
+
+ // Check that all units are the same
+ if (formulaMatch && !formulaMatch.every(function (unit) {
+ return unit === formulaMatch[0];
+ })) {
+ throw new PolishedError(41);
+ }
+ var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));
+ return "" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');
+}
+
+var cssVariableRegex = /--[\S]*/g;
+
+/**
+ * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'background': cssVar('--background-color'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${cssVar('--background-color')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * 'background': 'red'
+ * }
+ */
+function cssVar(cssVariable, defaultValue) {
+ if (!cssVariable || !cssVariable.match(cssVariableRegex)) {
+ throw new PolishedError(73);
+ }
+ var variableValue;
+
+ /* eslint-disable */
+ /* istanbul ignore next */
+ if (typeof document !== 'undefined' && document.documentElement !== null) {
+ variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);
+ }
+ /* eslint-enable */
+
+ if (variableValue) {
+ return variableValue.trim();
+ } else if (defaultValue) {
+ return defaultValue;
+ }
+ throw new PolishedError(74);
+}
+
+// @private
+function capitalizeString(string) {
+ return string.charAt(0).toUpperCase() + string.slice(1);
+}
+
+var positionMap$1 = (/* unused pure expression or super */ null && (['Top', 'Right', 'Bottom', 'Left']));
+function generateProperty(property, position) {
+ if (!property) return position.toLowerCase();
+ var splitProperty = property.split('-');
+ if (splitProperty.length > 1) {
+ splitProperty.splice(1, 0, position);
+ return splitProperty.reduce(function (acc, val) {
+ return "" + acc + capitalizeString(val);
+ });
+ }
+ var joinedProperty = property.replace(/([a-z])([A-Z])/g, "$1" + position + "$2");
+ return property === joinedProperty ? "" + property + position : joinedProperty;
+}
+function generateStyles(property, valuesWithDefaults) {
+ var styles = {};
+ for (var i = 0; i < valuesWithDefaults.length; i += 1) {
+ if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {
+ styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];
+ }
+ }
+ return styles;
+}
+
+/**
+ * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...directionalProperty('padding', '12px', '24px', '36px', '48px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'paddingTop': '12px',
+ * 'paddingRight': '24px',
+ * 'paddingBottom': '36px',
+ * 'paddingLeft': '48px'
+ * }
+ */
+function directionalProperty(property) {
+ for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ values[_key - 1] = arguments[_key];
+ }
+ // prettier-ignore
+ var firstValue = values[0],
+ _values$ = values[1],
+ secondValue = _values$ === void 0 ? firstValue : _values$,
+ _values$2 = values[2],
+ thirdValue = _values$2 === void 0 ? firstValue : _values$2,
+ _values$3 = values[3],
+ fourthValue = _values$3 === void 0 ? secondValue : _values$3;
+ var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];
+ return generateStyles(property, valuesWithDefaults);
+}
+
+/**
+ * Check if a string ends with something
+ * @private
+ */
+function endsWith(string, suffix) {
+ return string.substr(-suffix.length) === suffix;
+}
+
+var cssRegex$1 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
+
+/**
+ * Returns a given CSS value minus its unit of measure.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * '--dimension': stripUnit('100px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * --dimension: ${stripUnit('100px')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * '--dimension': 100
+ * }
+ */
+function stripUnit(value) {
+ if (typeof value !== 'string') return value;
+ var matchedValue = value.match(cssRegex$1);
+ return matchedValue ? parseFloat(value) : value;
+}
+
+/**
+ * Factory function that creates pixel-to-x converters
+ * @private
+ */
+var pxtoFactory = function pxtoFactory(to) {
+ return function (pxval, base) {
+ if (base === void 0) {
+ base = '16px';
+ }
+ var newPxval = pxval;
+ var newBase = base;
+ if (typeof pxval === 'string') {
+ if (!endsWith(pxval, 'px')) {
+ throw new PolishedError(69, to, pxval);
+ }
+ newPxval = stripUnit(pxval);
+ }
+ if (typeof base === 'string') {
+ if (!endsWith(base, 'px')) {
+ throw new PolishedError(70, to, base);
+ }
+ newBase = stripUnit(base);
+ }
+ if (typeof newPxval === 'string') {
+ throw new PolishedError(71, pxval, to);
+ }
+ if (typeof newBase === 'string') {
+ throw new PolishedError(72, base, to);
+ }
+ return "" + newPxval / newBase + to;
+ };
+};
+var pixelsto = pxtoFactory;
+
+/**
+ * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a
+ * second argument to the function.
+ * @function
+ * @param {string|number} pxval
+ * @param {string|number} [base='16px']
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'height': em('16px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * height: ${em('16px')}
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * 'height': '1em'
+ * }
+ */
+var em = pixelsto('em');
+var em$1 = (/* unused pure expression or super */ null && (em));
+
+var cssRegex = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
+
+/**
+ * Returns a given CSS value and its unit as elements of an array.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * '--dimension': getValueAndUnit('100px')[0],
+ * '--unit': getValueAndUnit('100px')[1],
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * --dimension: ${getValueAndUnit('100px')[0]};
+ * --unit: ${getValueAndUnit('100px')[1]};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * '--dimension': 100,
+ * '--unit': 'px',
+ * }
+ */
+function getValueAndUnit(value) {
+ if (typeof value !== 'string') return [value, ''];
+ var matchedValue = value.match(cssRegex);
+ if (matchedValue) return [parseFloat(value), matchedValue[2]];
+ return [value, undefined];
+}
+
+/**
+ * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...important(cover())
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${important(cover())}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * 'position': 'absolute !important',
+ * 'top': '0 !important',
+ * 'right: '0 !important',
+ * 'bottom': '0 !important',
+ * 'left: '0 !important'
+ * }
+ */
+function important(styleBlock, rules) {
+ if (typeof styleBlock !== 'object' || styleBlock === null) {
+ throw new PolishedError(75, typeof styleBlock);
+ }
+ var newStyleBlock = {};
+ Object.keys(styleBlock).forEach(function (key) {
+ if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {
+ newStyleBlock[key] = important(styleBlock[key], rules);
+ } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {
+ newStyleBlock[key] = styleBlock[key] + " !important";
+ } else {
+ newStyleBlock[key] = styleBlock[key];
+ }
+ });
+ return newStyleBlock;
+}
+
+var ratioNames = {
+ minorSecond: 1.067,
+ majorSecond: 1.125,
+ minorThird: 1.2,
+ majorThird: 1.25,
+ perfectFourth: 1.333,
+ augFourth: 1.414,
+ perfectFifth: 1.5,
+ minorSixth: 1.6,
+ goldenSection: 1.618,
+ majorSixth: 1.667,
+ minorSeventh: 1.778,
+ majorSeventh: 1.875,
+ octave: 2,
+ majorTenth: 2.5,
+ majorEleventh: 2.667,
+ majorTwelfth: 3,
+ doubleOctave: 4
+};
+function getRatio(ratioName) {
+ return ratioNames[ratioName];
+}
+
+/**
+ * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * // Increment two steps up the default scale
+ * 'fontSize': modularScale(2)
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * // Increment two steps up the default scale
+ * fontSize: ${modularScale(2)}
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * 'fontSize': '1.77689em'
+ * }
+ */
+function modularScale(steps, base, ratio) {
+ if (base === void 0) {
+ base = '1em';
+ }
+ if (ratio === void 0) {
+ ratio = 1.333;
+ }
+ if (typeof steps !== 'number') {
+ throw new PolishedError(42);
+ }
+ if (typeof ratio === 'string' && !ratioNames[ratio]) {
+ throw new PolishedError(43);
+ }
+ var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],
+ realBase = _ref[0],
+ unit = _ref[1];
+ var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;
+ if (typeof realBase === 'string') {
+ throw new PolishedError(44, base);
+ }
+ return "" + realBase * Math.pow(realRatio, steps) + (unit || '');
+}
+
+/**
+ * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a
+ * second argument to the function.
+ * @function
+ * @param {string|number} pxval
+ * @param {string|number} [base='16px']
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'height': rem('16px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * height: ${rem('16px')}
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * 'height': '1rem'
+ * }
+ */
+var rem = pixelsto('rem');
+var rem$1 = (/* unused pure expression or super */ null && (rem));
+
+var defaultFontSize = 16;
+function convertBase(base) {
+ var deconstructedValue = getValueAndUnit(base);
+ if (deconstructedValue[1] === 'px') {
+ return parseFloat(base);
+ }
+ if (deconstructedValue[1] === '%') {
+ return parseFloat(base) / 100 * defaultFontSize;
+ }
+ throw new PolishedError(78, deconstructedValue[1]);
+}
+function getBaseFromDoc() {
+ /* eslint-disable */
+ /* istanbul ignore next */
+ if (typeof document !== 'undefined' && document.documentElement !== null) {
+ var rootFontSize = getComputedStyle(document.documentElement).fontSize;
+ return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;
+ }
+ /* eslint-enable */
+ /* istanbul ignore next */
+ return defaultFontSize;
+}
+
+/**
+ * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'height': remToPx('1.6rem')
+ * 'height': remToPx('1.6rem', '10px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * height: ${remToPx('1.6rem')}
+ * height: ${remToPx('1.6rem', '10px')}
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * 'height': '25.6px',
+ * 'height': '16px',
+ * }
+ */
+function remToPx(value, base) {
+ var deconstructedValue = getValueAndUnit(value);
+ if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {
+ throw new PolishedError(77, deconstructedValue[1]);
+ }
+ var newBase = base ? convertBase(base) : getBaseFromDoc();
+ return deconstructedValue[0] * newBase + "px";
+}
+
+var functionsMap$3 = {
+ back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',
+ circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',
+ cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',
+ expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',
+ quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
+ quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',
+ quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',
+ sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'
+};
+
+/**
+ * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'transitionTimingFunction': easeIn('quad')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * transitionTimingFunction: ${easeIn('quad')};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * 'div': {
+ * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
+ * }
+ */
+function easeIn(functionName) {
+ return functionsMap$3[functionName.toLowerCase().trim()];
+}
+
+var functionsMap$2 = {
+ back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',
+ circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',
+ cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',
+ expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',
+ quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
+ quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',
+ quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',
+ sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'
+};
+
+/**
+ * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'transitionTimingFunction': easeInOut('quad')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * transitionTimingFunction: ${easeInOut('quad')};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * 'div': {
+ * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
+ * }
+ */
+function easeInOut(functionName) {
+ return functionsMap$2[functionName.toLowerCase().trim()];
+}
+
+var functionsMap$1 = {
+ back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',
+ cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
+ circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',
+ expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',
+ quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
+ quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
+ quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',
+ sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'
+};
+
+/**
+ * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'transitionTimingFunction': easeOut('quad')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * transitionTimingFunction: ${easeOut('quad')};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * 'div': {
+ * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
+ * }
+ */
+function easeOut(functionName) {
+ return functionsMap$1[functionName.toLowerCase().trim()];
+}
+
+/**
+ * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * fontSize: between('20px', '100px', '400px', '1000px'),
+ * fontSize: between('20px', '100px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * fontSize: ${between('20px', '100px', '400px', '1000px')};
+ * fontSize: ${between('20px', '100px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * h1: {
+ * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',
+ * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'
+ * }
+ */
+function between(fromSize, toSize, minScreen, maxScreen) {
+ if (minScreen === void 0) {
+ minScreen = '320px';
+ }
+ if (maxScreen === void 0) {
+ maxScreen = '1200px';
+ }
+ var _getValueAndUnit = getValueAndUnit(fromSize),
+ unitlessFromSize = _getValueAndUnit[0],
+ fromSizeUnit = _getValueAndUnit[1];
+ var _getValueAndUnit2 = getValueAndUnit(toSize),
+ unitlessToSize = _getValueAndUnit2[0],
+ toSizeUnit = _getValueAndUnit2[1];
+ var _getValueAndUnit3 = getValueAndUnit(minScreen),
+ unitlessMinScreen = _getValueAndUnit3[0],
+ minScreenUnit = _getValueAndUnit3[1];
+ var _getValueAndUnit4 = getValueAndUnit(maxScreen),
+ unitlessMaxScreen = _getValueAndUnit4[0],
+ maxScreenUnit = _getValueAndUnit4[1];
+ if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {
+ throw new PolishedError(47);
+ }
+ if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {
+ throw new PolishedError(48);
+ }
+ if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {
+ throw new PolishedError(76);
+ }
+ var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);
+ var base = unitlessToSize - slope * unitlessMaxScreen;
+ return "calc(" + base.toFixed(2) + (fromSizeUnit || '') + " + " + (100 * slope).toFixed(2) + "vw)";
+}
+
+/**
+ * CSS to contain a float (credit to CSSMojo).
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...clearFix(),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${clearFix()}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * '&::after': {
+ * 'clear': 'both',
+ * 'content': '""',
+ * 'display': 'table'
+ * }
+ */
+function clearFix(parent) {
+ var _ref;
+ if (parent === void 0) {
+ parent = '&';
+ }
+ var pseudoSelector = parent + "::after";
+ return _ref = {}, _ref[pseudoSelector] = {
+ clear: 'both',
+ content: '""',
+ display: 'table'
+ }, _ref;
+}
+
+/**
+ * CSS to fully cover an area. Can optionally be passed an offset to act as a "padding".
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...cover()
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${cover()}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * 'position': 'absolute',
+ * 'top': '0',
+ * 'right: '0',
+ * 'bottom': '0',
+ * 'left: '0'
+ * }
+ */
+function cover(offset) {
+ if (offset === void 0) {
+ offset = 0;
+ }
+ return {
+ position: 'absolute',
+ top: offset,
+ right: offset,
+ bottom: offset,
+ left: offset
+ };
+}
+
+/**
+ * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...ellipsis('250px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${ellipsis('250px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * 'display': 'inline-block',
+ * 'maxWidth': '250px',
+ * 'overflow': 'hidden',
+ * 'textOverflow': 'ellipsis',
+ * 'whiteSpace': 'nowrap',
+ * 'wordWrap': 'normal'
+ * }
+ */
+function ellipsis(width, lines) {
+ if (lines === void 0) {
+ lines = 1;
+ }
+ var styles = {
+ display: 'inline-block',
+ maxWidth: width || '100%',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ wordWrap: 'normal'
+ };
+ return lines > 1 ? _extends({}, styles, {
+ WebkitBoxOrient: 'vertical',
+ WebkitLineClamp: lines,
+ display: '-webkit-box',
+ whiteSpace: 'normal'
+ }) : styles;
+}
+
+function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
+function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
+function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
+/**
+ * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...fluidRange(
+ * {
+ * prop: 'padding',
+ * fromSize: '20px',
+ * toSize: '100px',
+ * },
+ * '400px',
+ * '1000px',
+ * )
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${fluidRange(
+ * {
+ * prop: 'padding',
+ * fromSize: '20px',
+ * toSize: '100px',
+ * },
+ * '400px',
+ * '1000px',
+ * )}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * "@media (min-width: 1000px)": Object {
+ * "padding": "100px",
+ * },
+ * "@media (min-width: 400px)": Object {
+ * "padding": "calc(-33.33333333333334px + 13.333333333333334vw)",
+ * },
+ * "padding": "20px",
+ * }
+ */
+function fluidRange(cssProp, minScreen, maxScreen) {
+ if (minScreen === void 0) {
+ minScreen = '320px';
+ }
+ if (maxScreen === void 0) {
+ maxScreen = '1200px';
+ }
+ if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {
+ throw new PolishedError(49);
+ }
+ if (Array.isArray(cssProp)) {
+ var mediaQueries = {};
+ var fallbacks = {};
+ for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {
+ var _extends2, _extends3;
+ var obj = _step.value;
+ if (!obj.prop || !obj.fromSize || !obj.toSize) {
+ throw new PolishedError(50);
+ }
+ fallbacks[obj.prop] = obj.fromSize;
+ mediaQueries["@media (min-width: " + minScreen + ")"] = _extends({}, mediaQueries["@media (min-width: " + minScreen + ")"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));
+ mediaQueries["@media (min-width: " + maxScreen + ")"] = _extends({}, mediaQueries["@media (min-width: " + maxScreen + ")"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));
+ }
+ return _extends({}, fallbacks, mediaQueries);
+ } else {
+ var _ref, _ref2, _ref3;
+ if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {
+ throw new PolishedError(51);
+ }
+ return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3["@media (min-width: " + minScreen + ")"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3["@media (min-width: " + maxScreen + ")"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;
+ }
+}
+
+var dataURIRegex = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i;
+var formatHintMap = {
+ woff: 'woff',
+ woff2: 'woff2',
+ ttf: 'truetype',
+ otf: 'opentype',
+ eot: 'embedded-opentype',
+ svg: 'svg',
+ svgz: 'svg'
+};
+function generateFormatHint(format, formatHint) {
+ if (!formatHint) return '';
+ return " format(\"" + formatHintMap[format] + "\")";
+}
+function isDataURI(fontFilePath) {
+ return !!fontFilePath.replace(/\s+/g, ' ').match(dataURIRegex);
+}
+function generateFileReferences(fontFilePath, fileFormats, formatHint) {
+ if (isDataURI(fontFilePath)) {
+ return "url(\"" + fontFilePath + "\")" + generateFormatHint(fileFormats[0], formatHint);
+ }
+ var fileFontReferences = fileFormats.map(function (format) {
+ return "url(\"" + fontFilePath + "." + format + "\")" + generateFormatHint(format, formatHint);
+ });
+ return fileFontReferences.join(', ');
+}
+function generateLocalReferences(localFonts) {
+ var localFontReferences = localFonts.map(function (font) {
+ return "local(\"" + font + "\")";
+ });
+ return localFontReferences.join(', ');
+}
+function generateSources(fontFilePath, localFonts, fileFormats, formatHint) {
+ var fontReferences = [];
+ if (localFonts) fontReferences.push(generateLocalReferences(localFonts));
+ if (fontFilePath) {
+ fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));
+ }
+ return fontReferences.join(', ');
+}
+
+/**
+ * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.
+ *
+ * @example
+ * // Styles as object basic usage
+ * const styles = {
+ * ...fontFace({
+ * 'fontFamily': 'Sans-Pro',
+ * 'fontFilePath': 'path/to/file'
+ * })
+ * }
+ *
+ * // styled-components basic usage
+ * const GlobalStyle = createGlobalStyle`${
+ * fontFace({
+ * 'fontFamily': 'Sans-Pro',
+ * 'fontFilePath': 'path/to/file'
+ * }
+ * )}`
+ *
+ * // CSS as JS Output
+ *
+ * '@font-face': {
+ * 'fontFamily': 'Sans-Pro',
+ * 'src': 'url("path/to/file.eot"), url("path/to/file.woff2"), url("path/to/file.woff"), url("path/to/file.ttf"), url("path/to/file.svg")',
+ * }
+ */
+
+function fontFace(_ref) {
+ var fontFamily = _ref.fontFamily,
+ fontFilePath = _ref.fontFilePath,
+ fontStretch = _ref.fontStretch,
+ fontStyle = _ref.fontStyle,
+ fontVariant = _ref.fontVariant,
+ fontWeight = _ref.fontWeight,
+ _ref$fileFormats = _ref.fileFormats,
+ fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,
+ _ref$formatHint = _ref.formatHint,
+ formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,
+ _ref$localFonts = _ref.localFonts,
+ localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,
+ unicodeRange = _ref.unicodeRange,
+ fontDisplay = _ref.fontDisplay,
+ fontVariationSettings = _ref.fontVariationSettings,
+ fontFeatureSettings = _ref.fontFeatureSettings;
+ // Error Handling
+ if (!fontFamily) throw new PolishedError(55);
+ if (!fontFilePath && !localFonts) {
+ throw new PolishedError(52);
+ }
+ if (localFonts && !Array.isArray(localFonts)) {
+ throw new PolishedError(53);
+ }
+ if (!Array.isArray(fileFormats)) {
+ throw new PolishedError(54);
+ }
+ var fontFaceDeclaration = {
+ '@font-face': {
+ fontFamily: fontFamily,
+ src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),
+ unicodeRange: unicodeRange,
+ fontStretch: fontStretch,
+ fontStyle: fontStyle,
+ fontVariant: fontVariant,
+ fontWeight: fontWeight,
+ fontDisplay: fontDisplay,
+ fontVariationSettings: fontVariationSettings,
+ fontFeatureSettings: fontFeatureSettings
+ }
+ };
+
+ // Removes undefined fields for cleaner css object.
+ return JSON.parse(JSON.stringify(fontFaceDeclaration));
+}
+
+/**
+ * CSS to hide text to show a background image in a SEO-friendly way.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'backgroundImage': 'url(logo.png)',
+ * ...hideText(),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * backgroundImage: url(logo.png);
+ * ${hideText()};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * 'div': {
+ * 'backgroundImage': 'url(logo.png)',
+ * 'textIndent': '101%',
+ * 'overflow': 'hidden',
+ * 'whiteSpace': 'nowrap',
+ * }
+ */
+function hideText() {
+ return {
+ textIndent: '101%',
+ overflow: 'hidden',
+ whiteSpace: 'nowrap'
+ };
+}
+
+/**
+ * CSS to hide content visually but remain accessible to screen readers.
+ * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...hideVisually(),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${hideVisually()};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * 'div': {
+ * 'border': '0',
+ * 'clip': 'rect(0 0 0 0)',
+ * 'height': '1px',
+ * 'margin': '-1px',
+ * 'overflow': 'hidden',
+ * 'padding': '0',
+ * 'position': 'absolute',
+ * 'whiteSpace': 'nowrap',
+ * 'width': '1px',
+ * }
+ */
+function hideVisually() {
+ return {
+ border: '0',
+ clip: 'rect(0 0 0 0)',
+ height: '1px',
+ margin: '-1px',
+ overflow: 'hidden',
+ padding: '0',
+ position: 'absolute',
+ whiteSpace: 'nowrap',
+ width: '1px'
+ };
+}
+
+/**
+ * Generates a media query to target HiDPI devices.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * [hiDPI(1.5)]: {
+ * width: 200px;
+ * }
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${hiDPI(1.5)} {
+ * width: 200px;
+ * }
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
+ * only screen and (min--moz-device-pixel-ratio: 1.5),
+ * only screen and (-o-min-device-pixel-ratio: 1.5/1),
+ * only screen and (min-resolution: 144dpi),
+ * only screen and (min-resolution: 1.5dppx)': {
+ * 'width': '200px',
+ * }
+ */
+function hiDPI(ratio) {
+ if (ratio === void 0) {
+ ratio = 1.3;
+ }
+ return "\n @media only screen and (-webkit-min-device-pixel-ratio: " + ratio + "),\n only screen and (min--moz-device-pixel-ratio: " + ratio + "),\n only screen and (-o-min-device-pixel-ratio: " + ratio + "/1),\n only screen and (min-resolution: " + Math.round(ratio * 96) + "dpi),\n only screen and (min-resolution: " + ratio + "dppx)\n ";
+}
+
+function constructGradientValue(literals) {
+ var template = '';
+ for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ substitutions[_key - 1] = arguments[_key];
+ }
+ for (var i = 0; i < literals.length; i += 1) {
+ template += literals[i];
+ if (i === substitutions.length - 1 && substitutions[i]) {
+ var definedValues = substitutions.filter(function (substitute) {
+ return !!substitute;
+ });
+ // Adds leading coma if properties preceed color-stops
+ if (definedValues.length > 1) {
+ template = template.slice(0, -1);
+ template += ", " + substitutions[i];
+ // No trailing space if color-stops is the only param provided
+ } else if (definedValues.length === 1) {
+ template += "" + substitutions[i];
+ }
+ } else if (substitutions[i]) {
+ template += substitutions[i] + " ";
+ }
+ }
+ return template.trim();
+}
+
+var _templateObject$1;
+/**
+ * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...linearGradient({
+ colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
+ toDirection: 'to top right',
+ fallback: '#FFF',
+ })
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${linearGradient({
+ colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
+ toDirection: 'to top right',
+ fallback: '#FFF',
+ })}
+ *`
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * 'backgroundColor': '#FFF',
+ * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',
+ * }
+ */
+function linearGradient(_ref) {
+ var colorStops = _ref.colorStops,
+ fallback = _ref.fallback,
+ _ref$toDirection = _ref.toDirection,
+ toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;
+ if (!colorStops || colorStops.length < 2) {
+ throw new PolishedError(56);
+ }
+ return {
+ backgroundColor: fallback || colorStops[0].replace(/,\s+/g, ',').split(' ')[0].replace(/,(?=\S)/g, ', '),
+ backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["linear-gradient(", "", ")"])), toDirection, colorStops.join(', ').replace(/,(?=\S)/g, ', '))
+ };
+}
+
+/**
+ * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...normalize(),
+ * }
+ *
+ * // styled-components usage
+ * const GlobalStyle = createGlobalStyle`${normalize()}`
+ *
+ * // CSS as JS Output
+ *
+ * html {
+ * lineHeight: 1.15,
+ * textSizeAdjust: 100%,
+ * } ...
+ */
+function normalize() {
+ var _ref;
+ return [(_ref = {
+ html: {
+ lineHeight: '1.15',
+ textSizeAdjust: '100%'
+ },
+ body: {
+ margin: '0'
+ },
+ main: {
+ display: 'block'
+ },
+ h1: {
+ fontSize: '2em',
+ margin: '0.67em 0'
+ },
+ hr: {
+ boxSizing: 'content-box',
+ height: '0',
+ overflow: 'visible'
+ },
+ pre: {
+ fontFamily: 'monospace, monospace',
+ fontSize: '1em'
+ },
+ a: {
+ backgroundColor: 'transparent'
+ },
+ 'abbr[title]': {
+ borderBottom: 'none',
+ textDecoration: 'underline'
+ }
+ }, _ref["b,\n strong"] = {
+ fontWeight: 'bolder'
+ }, _ref["code,\n kbd,\n samp"] = {
+ fontFamily: 'monospace, monospace',
+ fontSize: '1em'
+ }, _ref.small = {
+ fontSize: '80%'
+ }, _ref["sub,\n sup"] = {
+ fontSize: '75%',
+ lineHeight: '0',
+ position: 'relative',
+ verticalAlign: 'baseline'
+ }, _ref.sub = {
+ bottom: '-0.25em'
+ }, _ref.sup = {
+ top: '-0.5em'
+ }, _ref.img = {
+ borderStyle: 'none'
+ }, _ref["button,\n input,\n optgroup,\n select,\n textarea"] = {
+ fontFamily: 'inherit',
+ fontSize: '100%',
+ lineHeight: '1.15',
+ margin: '0'
+ }, _ref["button,\n input"] = {
+ overflow: 'visible'
+ }, _ref["button,\n select"] = {
+ textTransform: 'none'
+ }, _ref["button,\n html [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"]"] = {
+ WebkitAppearance: 'button'
+ }, _ref["button::-moz-focus-inner,\n [type=\"button\"]::-moz-focus-inner,\n [type=\"reset\"]::-moz-focus-inner,\n [type=\"submit\"]::-moz-focus-inner"] = {
+ borderStyle: 'none',
+ padding: '0'
+ }, _ref["button:-moz-focusring,\n [type=\"button\"]:-moz-focusring,\n [type=\"reset\"]:-moz-focusring,\n [type=\"submit\"]:-moz-focusring"] = {
+ outline: '1px dotted ButtonText'
+ }, _ref.fieldset = {
+ padding: '0.35em 0.625em 0.75em'
+ }, _ref.legend = {
+ boxSizing: 'border-box',
+ color: 'inherit',
+ display: 'table',
+ maxWidth: '100%',
+ padding: '0',
+ whiteSpace: 'normal'
+ }, _ref.progress = {
+ verticalAlign: 'baseline'
+ }, _ref.textarea = {
+ overflow: 'auto'
+ }, _ref["[type=\"checkbox\"],\n [type=\"radio\"]"] = {
+ boxSizing: 'border-box',
+ padding: '0'
+ }, _ref["[type=\"number\"]::-webkit-inner-spin-button,\n [type=\"number\"]::-webkit-outer-spin-button"] = {
+ height: 'auto'
+ }, _ref['[type="search"]'] = {
+ WebkitAppearance: 'textfield',
+ outlineOffset: '-2px'
+ }, _ref['[type="search"]::-webkit-search-decoration'] = {
+ WebkitAppearance: 'none'
+ }, _ref['::-webkit-file-upload-button'] = {
+ WebkitAppearance: 'button',
+ font: 'inherit'
+ }, _ref.details = {
+ display: 'block'
+ }, _ref.summary = {
+ display: 'list-item'
+ }, _ref.template = {
+ display: 'none'
+ }, _ref['[hidden]'] = {
+ display: 'none'
+ }, _ref), {
+ 'abbr[title]': {
+ textDecoration: 'underline dotted'
+ }
+ }];
+}
+
+var _templateObject;
+/**
+ * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...radialGradient({
+ * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
+ * extent: 'farthest-corner at 45px 45px',
+ * position: 'center',
+ * shape: 'ellipse',
+ * })
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${radialGradient({
+ * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
+ * extent: 'farthest-corner at 45px 45px',
+ * position: 'center',
+ * shape: 'ellipse',
+ * })}
+ *`
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * 'backgroundColor': '#00FFFF',
+ * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',
+ * }
+ */
+function radialGradient(_ref) {
+ var colorStops = _ref.colorStops,
+ _ref$extent = _ref.extent,
+ extent = _ref$extent === void 0 ? '' : _ref$extent,
+ fallback = _ref.fallback,
+ _ref$position = _ref.position,
+ position = _ref$position === void 0 ? '' : _ref$position,
+ _ref$shape = _ref.shape,
+ shape = _ref$shape === void 0 ? '' : _ref$shape;
+ if (!colorStops || colorStops.length < 2) {
+ throw new PolishedError(57);
+ }
+ return {
+ backgroundColor: fallback || colorStops[0].split(' ')[0],
+ backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["radial-gradient(", "", "", "", ")"])), position, shape, extent, colorStops.join(', '))
+ };
+}
+
+/**
+ * A helper to generate a retina background image and non-retina
+ * background image. The retina background image will output to a HiDPI media query. The mixin uses
+ * a _2x.png filename suffix by default.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...retinaImage('my-img')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${retinaImage('my-img')}
+ * `
+ *
+ * // CSS as JS Output
+ * div {
+ * backgroundImage: 'url(my-img.png)',
+ * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
+ * only screen and (min--moz-device-pixel-ratio: 1.3),
+ * only screen and (-o-min-device-pixel-ratio: 1.3/1),
+ * only screen and (min-resolution: 144dpi),
+ * only screen and (min-resolution: 1.5dppx)': {
+ * backgroundImage: 'url(my-img_2x.png)',
+ * }
+ * }
+ */
+function retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {
+ var _ref;
+ if (extension === void 0) {
+ extension = 'png';
+ }
+ if (retinaSuffix === void 0) {
+ retinaSuffix = '_2x';
+ }
+ if (!filename) {
+ throw new PolishedError(58);
+ }
+ // Replace the dot at the beginning of the passed extension if one exists
+ var ext = extension.replace(/^\./, '');
+ var rFilename = retinaFilename ? retinaFilename + "." + ext : "" + filename + retinaSuffix + "." + ext;
+ return _ref = {
+ backgroundImage: "url(" + filename + "." + ext + ")"
+ }, _ref[hiDPI()] = _extends({
+ backgroundImage: "url(" + rFilename + ")"
+ }, backgroundSize ? {
+ backgroundSize: backgroundSize
+ } : {}), _ref;
+}
+
+/* eslint-disable key-spacing */
+var functionsMap = {
+ easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',
+ easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',
+ easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',
+ easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',
+ easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
+ easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',
+ easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',
+ easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',
+ easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',
+ easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
+ easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',
+ easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',
+ easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
+ easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
+ easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',
+ easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',
+ easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',
+ easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',
+ easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',
+ easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',
+ easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
+ easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',
+ easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',
+ easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'
+};
+/* eslint-enable key-spacing */
+
+function getTimingFunction(functionName) {
+ return functionsMap[functionName];
+}
+
+/**
+ * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
+ *
+ * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * 'transitionTimingFunction': timingFunctions('easeInQuad')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * transitionTimingFunction: ${timingFunctions('easeInQuad')};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * 'div': {
+ * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
+ * }
+ */
+
+function timingFunctions(timingFunction) {
+ return getTimingFunction(timingFunction);
+}
+
+var getBorderWidth = function getBorderWidth(pointingDirection, height, width) {
+ var fullWidth = "" + width[0] + (width[1] || '');
+ var halfWidth = "" + width[0] / 2 + (width[1] || '');
+ var fullHeight = "" + height[0] + (height[1] || '');
+ var halfHeight = "" + height[0] / 2 + (height[1] || '');
+ switch (pointingDirection) {
+ case 'top':
+ return "0 " + halfWidth + " " + fullHeight + " " + halfWidth;
+ case 'topLeft':
+ return fullWidth + " " + fullHeight + " 0 0";
+ case 'left':
+ return halfHeight + " " + fullWidth + " " + halfHeight + " 0";
+ case 'bottomLeft':
+ return fullWidth + " 0 0 " + fullHeight;
+ case 'bottom':
+ return fullHeight + " " + halfWidth + " 0 " + halfWidth;
+ case 'bottomRight':
+ return "0 0 " + fullWidth + " " + fullHeight;
+ case 'right':
+ return halfHeight + " 0 " + halfHeight + " " + fullWidth;
+ case 'topRight':
+ default:
+ return "0 " + fullWidth + " " + fullHeight + " 0";
+ }
+};
+var getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {
+ switch (pointingDirection) {
+ case 'top':
+ case 'bottomRight':
+ return {
+ borderBottomColor: foregroundColor
+ };
+ case 'right':
+ case 'bottomLeft':
+ return {
+ borderLeftColor: foregroundColor
+ };
+ case 'bottom':
+ case 'topLeft':
+ return {
+ borderTopColor: foregroundColor
+ };
+ case 'left':
+ case 'topRight':
+ return {
+ borderRightColor: foregroundColor
+ };
+ default:
+ throw new PolishedError(59);
+ }
+};
+
+/**
+ * CSS to represent triangle with any pointing direction with an optional background color.
+ *
+ * @example
+ * // Styles as object usage
+ *
+ * const styles = {
+ * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })
+ * }
+ *
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}
+ *
+ *
+ * // CSS as JS Output
+ *
+ * div: {
+ * 'borderColor': 'transparent transparent transparent red',
+ * 'borderStyle': 'solid',
+ * 'borderWidth': '50px 0 50px 100px',
+ * 'height': '0',
+ * 'width': '0',
+ * }
+ */
+function triangle(_ref) {
+ var pointingDirection = _ref.pointingDirection,
+ height = _ref.height,
+ width = _ref.width,
+ foregroundColor = _ref.foregroundColor,
+ _ref$backgroundColor = _ref.backgroundColor,
+ backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;
+ var widthAndUnit = getValueAndUnit(width);
+ var heightAndUnit = getValueAndUnit(height);
+ if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {
+ throw new PolishedError(60);
+ }
+ return _extends({
+ width: '0',
+ height: '0',
+ borderColor: backgroundColor
+ }, getBorderColor(pointingDirection, foregroundColor), {
+ borderStyle: 'solid',
+ borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)
+ });
+}
+
+/**
+ * Provides an easy way to change the `wordWrap` property.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...wordWrap('break-word')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${wordWrap('break-word')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * const styles = {
+ * overflowWrap: 'break-word',
+ * wordWrap: 'break-word',
+ * wordBreak: 'break-all',
+ * }
+ */
+function wordWrap(wrap) {
+ if (wrap === void 0) {
+ wrap = 'break-word';
+ }
+ var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;
+ return {
+ overflowWrap: wrap,
+ wordWrap: wrap,
+ wordBreak: wordBreak
+ };
+}
+
+function colorToInt(color) {
+ return Math.round(color * 255);
+}
+function convertToInt(red, green, blue) {
+ return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
+}
+function hslToRgb(hue, saturation, lightness, convert) {
+ if (convert === void 0) {
+ convert = convertToInt;
+ }
+ if (saturation === 0) {
+ // achromatic
+ return convert(lightness, lightness, lightness);
+ }
+
+ // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
+ var huePrime = (hue % 360 + 360) % 360 / 60;
+ var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
+ var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
+ var red = 0;
+ var green = 0;
+ var blue = 0;
+ if (huePrime >= 0 && huePrime < 1) {
+ red = chroma;
+ green = secondComponent;
+ } else if (huePrime >= 1 && huePrime < 2) {
+ red = secondComponent;
+ green = chroma;
+ } else if (huePrime >= 2 && huePrime < 3) {
+ green = chroma;
+ blue = secondComponent;
+ } else if (huePrime >= 3 && huePrime < 4) {
+ green = secondComponent;
+ blue = chroma;
+ } else if (huePrime >= 4 && huePrime < 5) {
+ red = secondComponent;
+ blue = chroma;
+ } else if (huePrime >= 5 && huePrime < 6) {
+ red = chroma;
+ blue = secondComponent;
+ }
+ var lightnessModification = lightness - chroma / 2;
+ var finalRed = red + lightnessModification;
+ var finalGreen = green + lightnessModification;
+ var finalBlue = blue + lightnessModification;
+ return convert(finalRed, finalGreen, finalBlue);
+}
+
+var namedColorMap = {
+ aliceblue: 'f0f8ff',
+ antiquewhite: 'faebd7',
+ aqua: '00ffff',
+ aquamarine: '7fffd4',
+ azure: 'f0ffff',
+ beige: 'f5f5dc',
+ bisque: 'ffe4c4',
+ black: '000',
+ blanchedalmond: 'ffebcd',
+ blue: '0000ff',
+ blueviolet: '8a2be2',
+ brown: 'a52a2a',
+ burlywood: 'deb887',
+ cadetblue: '5f9ea0',
+ chartreuse: '7fff00',
+ chocolate: 'd2691e',
+ coral: 'ff7f50',
+ cornflowerblue: '6495ed',
+ cornsilk: 'fff8dc',
+ crimson: 'dc143c',
+ cyan: '00ffff',
+ darkblue: '00008b',
+ darkcyan: '008b8b',
+ darkgoldenrod: 'b8860b',
+ darkgray: 'a9a9a9',
+ darkgreen: '006400',
+ darkgrey: 'a9a9a9',
+ darkkhaki: 'bdb76b',
+ darkmagenta: '8b008b',
+ darkolivegreen: '556b2f',
+ darkorange: 'ff8c00',
+ darkorchid: '9932cc',
+ darkred: '8b0000',
+ darksalmon: 'e9967a',
+ darkseagreen: '8fbc8f',
+ darkslateblue: '483d8b',
+ darkslategray: '2f4f4f',
+ darkslategrey: '2f4f4f',
+ darkturquoise: '00ced1',
+ darkviolet: '9400d3',
+ deeppink: 'ff1493',
+ deepskyblue: '00bfff',
+ dimgray: '696969',
+ dimgrey: '696969',
+ dodgerblue: '1e90ff',
+ firebrick: 'b22222',
+ floralwhite: 'fffaf0',
+ forestgreen: '228b22',
+ fuchsia: 'ff00ff',
+ gainsboro: 'dcdcdc',
+ ghostwhite: 'f8f8ff',
+ gold: 'ffd700',
+ goldenrod: 'daa520',
+ gray: '808080',
+ green: '008000',
+ greenyellow: 'adff2f',
+ grey: '808080',
+ honeydew: 'f0fff0',
+ hotpink: 'ff69b4',
+ indianred: 'cd5c5c',
+ indigo: '4b0082',
+ ivory: 'fffff0',
+ khaki: 'f0e68c',
+ lavender: 'e6e6fa',
+ lavenderblush: 'fff0f5',
+ lawngreen: '7cfc00',
+ lemonchiffon: 'fffacd',
+ lightblue: 'add8e6',
+ lightcoral: 'f08080',
+ lightcyan: 'e0ffff',
+ lightgoldenrodyellow: 'fafad2',
+ lightgray: 'd3d3d3',
+ lightgreen: '90ee90',
+ lightgrey: 'd3d3d3',
+ lightpink: 'ffb6c1',
+ lightsalmon: 'ffa07a',
+ lightseagreen: '20b2aa',
+ lightskyblue: '87cefa',
+ lightslategray: '789',
+ lightslategrey: '789',
+ lightsteelblue: 'b0c4de',
+ lightyellow: 'ffffe0',
+ lime: '0f0',
+ limegreen: '32cd32',
+ linen: 'faf0e6',
+ magenta: 'f0f',
+ maroon: '800000',
+ mediumaquamarine: '66cdaa',
+ mediumblue: '0000cd',
+ mediumorchid: 'ba55d3',
+ mediumpurple: '9370db',
+ mediumseagreen: '3cb371',
+ mediumslateblue: '7b68ee',
+ mediumspringgreen: '00fa9a',
+ mediumturquoise: '48d1cc',
+ mediumvioletred: 'c71585',
+ midnightblue: '191970',
+ mintcream: 'f5fffa',
+ mistyrose: 'ffe4e1',
+ moccasin: 'ffe4b5',
+ navajowhite: 'ffdead',
+ navy: '000080',
+ oldlace: 'fdf5e6',
+ olive: '808000',
+ olivedrab: '6b8e23',
+ orange: 'ffa500',
+ orangered: 'ff4500',
+ orchid: 'da70d6',
+ palegoldenrod: 'eee8aa',
+ palegreen: '98fb98',
+ paleturquoise: 'afeeee',
+ palevioletred: 'db7093',
+ papayawhip: 'ffefd5',
+ peachpuff: 'ffdab9',
+ peru: 'cd853f',
+ pink: 'ffc0cb',
+ plum: 'dda0dd',
+ powderblue: 'b0e0e6',
+ purple: '800080',
+ rebeccapurple: '639',
+ red: 'f00',
+ rosybrown: 'bc8f8f',
+ royalblue: '4169e1',
+ saddlebrown: '8b4513',
+ salmon: 'fa8072',
+ sandybrown: 'f4a460',
+ seagreen: '2e8b57',
+ seashell: 'fff5ee',
+ sienna: 'a0522d',
+ silver: 'c0c0c0',
+ skyblue: '87ceeb',
+ slateblue: '6a5acd',
+ slategray: '708090',
+ slategrey: '708090',
+ snow: 'fffafa',
+ springgreen: '00ff7f',
+ steelblue: '4682b4',
+ tan: 'd2b48c',
+ teal: '008080',
+ thistle: 'd8bfd8',
+ tomato: 'ff6347',
+ turquoise: '40e0d0',
+ violet: 'ee82ee',
+ wheat: 'f5deb3',
+ white: 'fff',
+ whitesmoke: 'f5f5f5',
+ yellow: 'ff0',
+ yellowgreen: '9acd32'
+};
+
+/**
+ * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
+ * @private
+ */
+function nameToHex(color) {
+ if (typeof color !== 'string') return color;
+ var normalizedColorName = color.toLowerCase();
+ return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
+}
+
+var hexRegex = /^#[a-fA-F0-9]{6}$/;
+var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
+var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
+var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
+var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
+var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
+var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
+var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
+
+/**
+ * Returns an RgbColor or RgbaColor object. This utility function is only useful
+ * if want to extract a color component. With the color util `toColorString` you
+ * can convert a RgbColor or RgbaColor object back to a string.
+ *
+ * @example
+ * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1
+ * const color1 = parseToRgb('rgb(255, 0, 0)');
+ * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
+ * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
+ */
+function parseToRgb(color) {
+ if (typeof color !== 'string') {
+ throw new PolishedError(3);
+ }
+ var normalizedColor = nameToHex(color);
+ if (normalizedColor.match(hexRegex)) {
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
+ green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
+ blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
+ };
+ }
+ if (normalizedColor.match(hexRgbaRegex)) {
+ var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
+ green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
+ blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
+ alpha: alpha
+ };
+ }
+ if (normalizedColor.match(reducedHexRegex)) {
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
+ green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
+ blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
+ };
+ }
+ if (normalizedColor.match(reducedRgbaHexRegex)) {
+ var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
+ return {
+ red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
+ green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
+ blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
+ alpha: _alpha
+ };
+ }
+ var rgbMatched = rgbRegex.exec(normalizedColor);
+ if (rgbMatched) {
+ return {
+ red: parseInt("" + rgbMatched[1], 10),
+ green: parseInt("" + rgbMatched[2], 10),
+ blue: parseInt("" + rgbMatched[3], 10)
+ };
+ }
+ var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
+ if (rgbaMatched) {
+ return {
+ red: parseInt("" + rgbaMatched[1], 10),
+ green: parseInt("" + rgbaMatched[2], 10),
+ blue: parseInt("" + rgbaMatched[3], 10),
+ alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
+ };
+ }
+ var hslMatched = hslRegex.exec(normalizedColor);
+ if (hslMatched) {
+ var hue = parseInt("" + hslMatched[1], 10);
+ var saturation = parseInt("" + hslMatched[2], 10) / 100;
+ var lightness = parseInt("" + hslMatched[3], 10) / 100;
+ var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
+ var hslRgbMatched = rgbRegex.exec(rgbColorString);
+ if (!hslRgbMatched) {
+ throw new PolishedError(4, normalizedColor, rgbColorString);
+ }
+ return {
+ red: parseInt("" + hslRgbMatched[1], 10),
+ green: parseInt("" + hslRgbMatched[2], 10),
+ blue: parseInt("" + hslRgbMatched[3], 10)
+ };
+ }
+ var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
+ if (hslaMatched) {
+ var _hue = parseInt("" + hslaMatched[1], 10);
+ var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
+ var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
+ var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
+ var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
+ if (!_hslRgbMatched) {
+ throw new PolishedError(4, normalizedColor, _rgbColorString);
+ }
+ return {
+ red: parseInt("" + _hslRgbMatched[1], 10),
+ green: parseInt("" + _hslRgbMatched[2], 10),
+ blue: parseInt("" + _hslRgbMatched[3], 10),
+ alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
+ };
+ }
+ throw new PolishedError(5);
+}
+
+function rgbToHsl(color) {
+ // make sure rgb are contained in a set of [0, 255]
+ var red = color.red / 255;
+ var green = color.green / 255;
+ var blue = color.blue / 255;
+ var max = Math.max(red, green, blue);
+ var min = Math.min(red, green, blue);
+ var lightness = (max + min) / 2;
+ if (max === min) {
+ // achromatic
+ if (color.alpha !== undefined) {
+ return {
+ hue: 0,
+ saturation: 0,
+ lightness: lightness,
+ alpha: color.alpha
+ };
+ } else {
+ return {
+ hue: 0,
+ saturation: 0,
+ lightness: lightness
+ };
+ }
+ }
+ var hue;
+ var delta = max - min;
+ var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
+ switch (max) {
+ case red:
+ hue = (green - blue) / delta + (green < blue ? 6 : 0);
+ break;
+ case green:
+ hue = (blue - red) / delta + 2;
+ break;
+ default:
+ // blue case
+ hue = (red - green) / delta + 4;
+ break;
+ }
+ hue *= 60;
+ if (color.alpha !== undefined) {
+ return {
+ hue: hue,
+ saturation: saturation,
+ lightness: lightness,
+ alpha: color.alpha
+ };
+ }
+ return {
+ hue: hue,
+ saturation: saturation,
+ lightness: lightness
+ };
+}
+
+/**
+ * Returns an HslColor or HslaColor object. This utility function is only useful
+ * if want to extract a color component. With the color util `toColorString` you
+ * can convert a HslColor or HslaColor object back to a string.
+ *
+ * @example
+ * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
+ * const color1 = parseToHsl('rgb(255, 0, 0)');
+ * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
+ * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
+ */
+function parseToHsl(color) {
+ // Note: At a later stage we can optimize this function as right now a hsl
+ // color would be parsed converted to rgb values and converted back to hsl.
+ return rgbToHsl(parseToRgb(color));
+}
+
+/**
+ * Reduces hex values if possible e.g. #ff8866 to #f86
+ * @private
+ */
+var reduceHexValue = function reduceHexValue(value) {
+ if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
+ return "#" + value[1] + value[3] + value[5];
+ }
+ return value;
+};
+var reduceHexValue$1 = reduceHexValue;
+
+function numberToHex(value) {
+ var hex = value.toString(16);
+ return hex.length === 1 ? "0" + hex : hex;
+}
+
+function colorToHex(color) {
+ return numberToHex(Math.round(color * 255));
+}
+function convertToHex(red, green, blue) {
+ return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
+}
+function hslToHex(hue, saturation, lightness) {
+ return hslToRgb(hue, saturation, lightness, convertToHex);
+}
+
+/**
+ * Returns a string value for the color. The returned result is the smallest possible hex notation.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: hsl(359, 0.75, 0.4),
+ * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${hsl(359, 0.75, 0.4)};
+ * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#b3191c";
+ * background: "#b3191c";
+ * }
+ */
+function hsl(value, saturation, lightness) {
+ if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
+ return hslToHex(value, saturation, lightness);
+ } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
+ return hslToHex(value.hue, value.saturation, value.lightness);
+ }
+ throw new PolishedError(1);
+}
+
+/**
+ * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: hsla(359, 0.75, 0.4, 0.7),
+ * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
+ * background: hsla(359, 0.75, 0.4, 1),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${hsla(359, 0.75, 0.4, 0.7)};
+ * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
+ * background: ${hsla(359, 0.75, 0.4, 1)};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "rgba(179,25,28,0.7)";
+ * background: "rgba(179,25,28,0.7)";
+ * background: "#b3191c";
+ * }
+ */
+function hsla(value, saturation, lightness, alpha) {
+ if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
+ return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
+ } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
+ return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
+ }
+ throw new PolishedError(2);
+}
+
+/**
+ * Returns a string value for the color. The returned result is the smallest possible hex notation.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: rgb(255, 205, 100),
+ * background: rgb({ red: 255, green: 205, blue: 100 }),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${rgb(255, 205, 100)};
+ * background: ${rgb({ red: 255, green: 205, blue: 100 })};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#ffcd64";
+ * background: "#ffcd64";
+ * }
+ */
+function rgb(value, green, blue) {
+ if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {
+ return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
+ } else if (typeof value === 'object' && green === undefined && blue === undefined) {
+ return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
+ }
+ throw new PolishedError(6);
+}
+
+/**
+ * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
+ *
+ * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: rgba(255, 205, 100, 0.7),
+ * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),
+ * background: rgba(255, 205, 100, 1),
+ * background: rgba('#ffffff', 0.4),
+ * background: rgba('black', 0.7),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${rgba(255, 205, 100, 0.7)};
+ * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};
+ * background: ${rgba(255, 205, 100, 1)};
+ * background: ${rgba('#ffffff', 0.4)};
+ * background: ${rgba('black', 0.7)};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "rgba(255,205,100,0.7)";
+ * background: "rgba(255,205,100,0.7)";
+ * background: "#ffcd64";
+ * background: "rgba(255,255,255,0.4)";
+ * background: "rgba(0,0,0,0.7)";
+ * }
+ */
+function rgba(firstValue, secondValue, thirdValue, fourthValue) {
+ if (typeof firstValue === 'string' && typeof secondValue === 'number') {
+ var rgbValue = parseToRgb(firstValue);
+ return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
+ } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {
+ return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
+ } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
+ return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
+ }
+ throw new PolishedError(7);
+}
+
+var isRgb = function isRgb(color) {
+ return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
+};
+var isRgba = function isRgba(color) {
+ return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
+};
+var isHsl = function isHsl(color) {
+ return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
+};
+var isHsla = function isHsla(color) {
+ return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
+};
+
+/**
+ * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
+ * This util is useful in case you only know on runtime which color object is
+ * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: toColorString({ red: 255, green: 205, blue: 100 }),
+ * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
+ * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
+ * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${toColorString({ red: 255, green: 205, blue: 100 })};
+ * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
+ * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
+ * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#ffcd64";
+ * background: "rgba(255,205,100,0.72)";
+ * background: "#00f";
+ * background: "rgba(179,25,25,0.72)";
+ * }
+ */
+
+function toColorString(color) {
+ if (typeof color !== 'object') throw new PolishedError(8);
+ if (isRgba(color)) return rgba(color);
+ if (isRgb(color)) return rgb(color);
+ if (isHsla(color)) return hsla(color);
+ if (isHsl(color)) return hsl(color);
+ throw new PolishedError(8);
+}
+
+// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
+// eslint-disable-next-line no-unused-vars
+// eslint-disable-next-line no-unused-vars
+// eslint-disable-next-line no-redeclare
+function curried(f, length, acc) {
+ return function fn() {
+ // eslint-disable-next-line prefer-rest-params
+ var combined = acc.concat(Array.prototype.slice.call(arguments));
+ return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
+ };
+}
+
+// eslint-disable-next-line no-redeclare
+function curry(f) {
+ // eslint-disable-line no-redeclare
+ return curried(f, f.length, []);
+}
+
+/**
+ * Changes the hue of the color. Hue is a number between 0 to 360. The first
+ * argument for adjustHue is the amount of degrees the color is rotated around
+ * the color wheel, always producing a positive hue value.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: adjustHue(180, '#448'),
+ * background: adjustHue('180', 'rgba(101,100,205,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${adjustHue(180, '#448')};
+ * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#888844";
+ * background: "rgba(136,136,68,0.7)";
+ * }
+ */
+function adjustHue(degree, color) {
+ if (color === 'transparent') return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(extends_extends({}, hslColor, {
+ hue: hslColor.hue + parseFloat(degree)
+ }));
+}
+
+// prettier-ignore
+var curriedAdjustHue = curry /* :: */(adjustHue);
+var curriedAdjustHue$1 = (/* unused pure expression or super */ null && (curriedAdjustHue));
+
+/**
+ * Returns the complement of the provided color. This is identical to adjustHue(180, ).
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: complement('#448'),
+ * background: complement('rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${complement('#448')};
+ * background: ${complement('rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#884";
+ * background: "rgba(153,153,153,0.7)";
+ * }
+ */
+function complement(color) {
+ if (color === 'transparent') return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(_extends({}, hslColor, {
+ hue: (hslColor.hue + 180) % 360
+ }));
+}
+
+function guard(lowerBoundary, upperBoundary, value) {
+ return Math.max(lowerBoundary, Math.min(upperBoundary, value));
+}
+
+/**
+ * Returns a string value for the darkened color.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: darken(0.2, '#FFCD64'),
+ * background: darken('0.2', 'rgba(255,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${darken(0.2, '#FFCD64')};
+ * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#ffbd31";
+ * background: "rgba(255,189,49,0.7)";
+ * }
+ */
+function darken(amount, color) {
+ if (color === 'transparent') return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(extends_extends({}, hslColor, {
+ lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
+ }));
+}
+
+// prettier-ignore
+var curriedDarken = curry /* :: */(darken);
+var curriedDarken$1 = curriedDarken;
+
+/**
+ * Decreases the intensity of a color. Its range is between 0 to 1. The first
+ * argument of the desaturate function is the amount by how much the color
+ * intensity should be decreased.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: desaturate(0.2, '#CCCD64'),
+ * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${desaturate(0.2, '#CCCD64')};
+ * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#b8b979";
+ * background: "rgba(184,185,121,0.7)";
+ * }
+ */
+function desaturate(amount, color) {
+ if (color === 'transparent') return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(extends_extends({}, hslColor, {
+ saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
+ }));
+}
+
+// prettier-ignore
+var curriedDesaturate = curry /* :: */(desaturate);
+var curriedDesaturate$1 = (/* unused pure expression or super */ null && (curriedDesaturate));
+
+/**
+ * Returns a number (float) representing the luminance of a color.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',
+ * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?
+ * 'rgba(58, 133, 255, 1)' :
+ * 'rgba(255, 57, 149, 1)',
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};
+ * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?
+ * 'rgba(58, 133, 255, 1)' :
+ * 'rgba(255, 57, 149, 1)'};
+ *
+ * // CSS in JS Output
+ *
+ * div {
+ * background: "#CCCD64";
+ * background: "rgba(58, 133, 255, 1)";
+ * }
+ */
+function getLuminance(color) {
+ if (color === 'transparent') return 0;
+ var rgbColor = parseToRgb(color);
+ var _Object$keys$map = Object.keys(rgbColor).map(function (key) {
+ var channel = rgbColor[key] / 255;
+ return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
+ }),
+ r = _Object$keys$map[0],
+ g = _Object$keys$map[1],
+ b = _Object$keys$map[2];
+ return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));
+}
+
+/**
+ * Returns the contrast ratio between two colors based on
+ * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).
+ *
+ * @example
+ * const contrastRatio = getContrast('#444', '#fff');
+ */
+function getContrast(color1, color2) {
+ var luminance1 = getLuminance(color1);
+ var luminance2 = getLuminance(color2);
+ return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));
+}
+
+/**
+ * Converts the color to a grayscale, by reducing its saturation to 0.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: grayscale('#CCCD64'),
+ * background: grayscale('rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${grayscale('#CCCD64')};
+ * background: ${grayscale('rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#999";
+ * background: "rgba(153,153,153,0.7)";
+ * }
+ */
+function grayscale(color) {
+ if (color === 'transparent') return color;
+ return toColorString(_extends({}, parseToHsl(color), {
+ saturation: 0
+ }));
+}
+
+/**
+ * Converts a HslColor or HslaColor object to a color string.
+ * This util is useful in case you only know on runtime which color object is
+ * used. Otherwise we recommend to rely on `hsl` or `hsla`.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
+ * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
+ * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#00f";
+ * background: "rgba(179,25,25,0.72)";
+ * }
+ */
+function hslToColorString(color) {
+ if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {
+ if (color.alpha && typeof color.alpha === 'number') {
+ return hsla({
+ hue: color.hue,
+ saturation: color.saturation,
+ lightness: color.lightness,
+ alpha: color.alpha
+ });
+ }
+ return hsl({
+ hue: color.hue,
+ saturation: color.saturation,
+ lightness: color.lightness
+ });
+ }
+ throw new PolishedError(45);
+}
+
+/**
+ * Inverts the red, green and blue values of a color.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: invert('#CCCD64'),
+ * background: invert('rgba(101,100,205,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${invert('#CCCD64')};
+ * background: ${invert('rgba(101,100,205,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#33329b";
+ * background: "rgba(154,155,50,0.7)";
+ * }
+ */
+function invert(color) {
+ if (color === 'transparent') return color;
+ // parse color string to rgb
+ var value = parseToRgb(color);
+ return toColorString(_extends({}, value, {
+ red: 255 - value.red,
+ green: 255 - value.green,
+ blue: 255 - value.blue
+ }));
+}
+
+/**
+ * Returns a string value for the lightened color.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: lighten(0.2, '#CCCD64'),
+ * background: lighten('0.2', 'rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${lighten(0.2, '#FFCD64')};
+ * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#e5e6b1";
+ * background: "rgba(229,230,177,0.7)";
+ * }
+ */
+function lighten(amount, color) {
+ if (color === 'transparent') return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(extends_extends({}, hslColor, {
+ lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
+ }));
+}
+
+// prettier-ignore
+var curriedLighten = curry /* :: */(lighten);
+var curriedLighten$1 = curriedLighten;
+
+/**
+ * Determines which contrast guidelines have been met for two colors.
+ * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).
+ *
+ * @example
+ * const scores = meetsContrastGuidelines('#444', '#fff');
+ */
+function meetsContrastGuidelines(color1, color2) {
+ var contrastRatio = getContrast(color1, color2);
+ return {
+ AA: contrastRatio >= 4.5,
+ AALarge: contrastRatio >= 3,
+ AAA: contrastRatio >= 7,
+ AAALarge: contrastRatio >= 4.5
+ };
+}
+
+/**
+ * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: mix(0.5, '#f00', '#00f')
+ * background: mix(0.25, '#f00', '#00f')
+ * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${mix(0.5, '#f00', '#00f')};
+ * background: ${mix(0.25, '#f00', '#00f')};
+ * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#7f007f";
+ * background: "#3f00bf";
+ * background: "rgba(63, 0, 191, 0.75)";
+ * }
+ */
+function mix(weight, color, otherColor) {
+ if (color === 'transparent') return otherColor;
+ if (otherColor === 'transparent') return color;
+ if (weight === 0) return otherColor;
+ var parsedColor1 = parseToRgb(color);
+ var color1 = extends_extends({}, parsedColor1, {
+ alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
+ });
+ var parsedColor2 = parseToRgb(otherColor);
+ var color2 = extends_extends({}, parsedColor2, {
+ alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
+ });
+
+ // The formula is copied from the original Sass implementation:
+ // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
+ var alphaDelta = color1.alpha - color2.alpha;
+ var x = parseFloat(weight) * 2 - 1;
+ var y = x * alphaDelta === -1 ? x : x + alphaDelta;
+ var z = 1 + x * alphaDelta;
+ var weight1 = (y / z + 1) / 2.0;
+ var weight2 = 1 - weight1;
+ var mixedColor = {
+ red: Math.floor(color1.red * weight1 + color2.red * weight2),
+ green: Math.floor(color1.green * weight1 + color2.green * weight2),
+ blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
+ alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
+ };
+ return rgba(mixedColor);
+}
+
+// prettier-ignore
+var curriedMix = curry /* :: */(mix);
+var mix$1 = curriedMix;
+
+/**
+ * Increases the opacity of a color. Its range for the amount is between 0 to 1.
+ *
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
+ * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
+ * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
+ * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
+ * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#fff";
+ * background: "rgba(255,255,255,0.7)";
+ * background: "rgba(255,0,0,0.7)";
+ * }
+ */
+function opacify(amount, color) {
+ if (color === 'transparent') return color;
+ var parsedColor = parseToRgb(color);
+ var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
+ var colorWithAlpha = extends_extends({}, parsedColor, {
+ alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
+ });
+ return rgba(colorWithAlpha);
+}
+
+// prettier-ignore
+var curriedOpacify = curry /* :: */(opacify);
+var curriedOpacify$1 = curriedOpacify;
+
+var defaultReturnIfLightColor = '#000';
+var defaultReturnIfDarkColor = '#fff';
+
+/**
+ * Returns black or white (or optional passed colors) for best
+ * contrast depending on the luminosity of the given color.
+ * When passing custom return colors, strict mode ensures that the
+ * return color always meets or exceeds WCAG level AA or greater. If this test
+ * fails, the default return color (black or white) is returned in place of the
+ * custom return color. You can optionally turn off strict mode.
+ *
+ * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * color: readableColor('#000'),
+ * color: readableColor('black', '#001', '#ff8'),
+ * color: readableColor('white', '#001', '#ff8'),
+ * color: readableColor('red', '#333', '#ddd', true)
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * color: ${readableColor('#000')};
+ * color: ${readableColor('black', '#001', '#ff8')};
+ * color: ${readableColor('white', '#001', '#ff8')};
+ * color: ${readableColor('red', '#333', '#ddd', true)};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * color: "#fff";
+ * color: "#ff8";
+ * color: "#001";
+ * color: "#000";
+ * }
+ */
+function readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {
+ if (returnIfLightColor === void 0) {
+ returnIfLightColor = defaultReturnIfLightColor;
+ }
+ if (returnIfDarkColor === void 0) {
+ returnIfDarkColor = defaultReturnIfDarkColor;
+ }
+ if (strict === void 0) {
+ strict = true;
+ }
+ var isColorLight = getLuminance(color) > 0.179;
+ var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;
+ if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {
+ return preferredReturnColor;
+ }
+ return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;
+}
+
+/**
+ * Converts a RgbColor or RgbaColor object to a color string.
+ * This util is useful in case you only know on runtime which color object is
+ * used. Otherwise we recommend to rely on `rgb` or `rgba`.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),
+ * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};
+ * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#ffcd64";
+ * background: "rgba(255,205,100,0.72)";
+ * }
+ */
+function rgbToColorString(color) {
+ if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {
+ if (typeof color.alpha === 'number') {
+ return rgba({
+ red: color.red,
+ green: color.green,
+ blue: color.blue,
+ alpha: color.alpha
+ });
+ }
+ return rgb({
+ red: color.red,
+ green: color.green,
+ blue: color.blue
+ });
+ }
+ throw new PolishedError(46);
+}
+
+/**
+ * Increases the intensity of a color. Its range is between 0 to 1. The first
+ * argument of the saturate function is the amount by how much the color
+ * intensity should be increased.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: saturate(0.2, '#CCCD64'),
+ * background: saturate('0.2', 'rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${saturate(0.2, '#FFCD64')};
+ * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#e0e250";
+ * background: "rgba(224,226,80,0.7)";
+ * }
+ */
+function saturate(amount, color) {
+ if (color === 'transparent') return color;
+ var hslColor = parseToHsl(color);
+ return toColorString(extends_extends({}, hslColor, {
+ saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
+ }));
+}
+
+// prettier-ignore
+var curriedSaturate = curry /* :: */(saturate);
+var curriedSaturate$1 = (/* unused pure expression or super */ null && (curriedSaturate));
+
+/**
+ * Sets the hue of a color to the provided value. The hue range can be
+ * from 0 and 359.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: setHue(42, '#CCCD64'),
+ * background: setHue('244', 'rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${setHue(42, '#CCCD64')};
+ * background: ${setHue('244', 'rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#cdae64";
+ * background: "rgba(107,100,205,0.7)";
+ * }
+ */
+function setHue(hue, color) {
+ if (color === 'transparent') return color;
+ return toColorString(extends_extends({}, parseToHsl(color), {
+ hue: parseFloat(hue)
+ }));
+}
+
+// prettier-ignore
+var curriedSetHue = curry /* :: */(setHue);
+var curriedSetHue$1 = (/* unused pure expression or super */ null && (curriedSetHue));
+
+/**
+ * Sets the lightness of a color to the provided value. The lightness range can be
+ * from 0 and 1.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: setLightness(0.2, '#CCCD64'),
+ * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${setLightness(0.2, '#CCCD64')};
+ * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#4d4d19";
+ * background: "rgba(223,224,159,0.7)";
+ * }
+ */
+function setLightness(lightness, color) {
+ if (color === 'transparent') return color;
+ return toColorString(extends_extends({}, parseToHsl(color), {
+ lightness: parseFloat(lightness)
+ }));
+}
+
+// prettier-ignore
+var curriedSetLightness = curry /* :: */(setLightness);
+var curriedSetLightness$1 = (/* unused pure expression or super */ null && (curriedSetLightness));
+
+/**
+ * Sets the saturation of a color to the provided value. The saturation range can be
+ * from 0 and 1.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: setSaturation(0.2, '#CCCD64'),
+ * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${setSaturation(0.2, '#CCCD64')};
+ * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
+ * `
+ *
+ * // CSS in JS Output
+ * element {
+ * background: "#adad84";
+ * background: "rgba(228,229,76,0.7)";
+ * }
+ */
+function setSaturation(saturation, color) {
+ if (color === 'transparent') return color;
+ return toColorString(extends_extends({}, parseToHsl(color), {
+ saturation: parseFloat(saturation)
+ }));
+}
+
+// prettier-ignore
+var curriedSetSaturation = curry /* :: */(setSaturation);
+var curriedSetSaturation$1 = (/* unused pure expression or super */ null && (curriedSetSaturation));
+
+/**
+ * Shades a color by mixing it with black. `shade` can produce
+ * hue shifts, where as `darken` manipulates the luminance channel and therefore
+ * doesn't produce hue shifts.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: shade(0.25, '#00f')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${shade(0.25, '#00f')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#00003f";
+ * }
+ */
+
+function shade(percentage, color) {
+ if (color === 'transparent') return color;
+ return mix$1(parseFloat(percentage), 'rgb(0, 0, 0)', color);
+}
+
+// prettier-ignore
+var curriedShade = curry /* :: */(shade);
+var curriedShade$1 = (/* unused pure expression or super */ null && (curriedShade));
+
+/**
+ * Tints a color by mixing it with white. `tint` can produce
+ * hue shifts, where as `lighten` manipulates the luminance channel and therefore
+ * doesn't produce hue shifts.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: tint(0.25, '#00f')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${tint(0.25, '#00f')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "#bfbfff";
+ * }
+ */
+
+function tint(percentage, color) {
+ if (color === 'transparent') return color;
+ return mix$1(parseFloat(percentage), 'rgb(255, 255, 255)', color);
+}
+
+// prettier-ignore
+var curriedTint = curry /* :: */(tint);
+var curriedTint$1 = (/* unused pure expression or super */ null && (curriedTint));
+
+/**
+ * Decreases the opacity of a color. Its range for the amount is between 0 to 1.
+ *
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * background: transparentize(0.1, '#fff'),
+ * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
+ * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * background: ${transparentize(0.1, '#fff')};
+ * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
+ * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * element {
+ * background: "rgba(255,255,255,0.9)";
+ * background: "rgba(255,255,255,0.8)";
+ * background: "rgba(255,0,0,0.3)";
+ * }
+ */
+function transparentize(amount, color) {
+ if (color === 'transparent') return color;
+ var parsedColor = parseToRgb(color);
+ var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
+ var colorWithAlpha = extends_extends({}, parsedColor, {
+ alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
+ });
+ return rgba(colorWithAlpha);
+}
+
+// prettier-ignore
+var curriedTransparentize = curry /* :: */(transparentize);
+var curriedTransparentize$1 = curriedTransparentize;
+
+/**
+ * Shorthand for easily setting the animation property. Allows either multiple arrays with animations
+ * or a single animation spread over the arguments.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'animation': 'rotate 1s ease-in-out, colorchange 2s'
+ * }
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...animation('rotate', '1s', 'ease-in-out')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${animation('rotate', '1s', 'ease-in-out')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'animation': 'rotate 1s ease-in-out'
+ * }
+ */
+function animation() {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+ // Allow single or multiple animations passed
+ var multiMode = Array.isArray(args[0]);
+ if (!multiMode && args.length > 8) {
+ throw new PolishedError(64);
+ }
+ var code = args.map(function (arg) {
+ if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {
+ throw new PolishedError(65);
+ }
+ if (Array.isArray(arg) && arg.length > 8) {
+ throw new PolishedError(66);
+ }
+ return Array.isArray(arg) ? arg.join(' ') : arg;
+ }).join(', ');
+ return {
+ animation: code
+ };
+}
+
+/**
+ * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...backgroundImages('url("/image/background.jpg")', 'linear-gradient(red, green)')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${backgroundImages('url("/image/background.jpg")', 'linear-gradient(red, green)')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'backgroundImage': 'url("/image/background.jpg"), linear-gradient(red, green)'
+ * }
+ */
+function backgroundImages() {
+ for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {
+ properties[_key] = arguments[_key];
+ }
+ return {
+ backgroundImage: properties.join(', ')
+ };
+}
+
+/**
+ * Shorthand that accepts any number of background values as parameters for creating a single background statement.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...backgrounds('url("/image/background.jpg")', 'linear-gradient(red, green)', 'center no-repeat')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${backgrounds('url("/image/background.jpg")', 'linear-gradient(red, green)', 'center no-repeat')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'background': 'url("/image/background.jpg"), linear-gradient(red, green), center no-repeat'
+ * }
+ */
+function backgrounds() {
+ for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {
+ properties[_key] = arguments[_key];
+ }
+ return {
+ background: properties.join(', ')
+ };
+}
+
+var sideMap = (/* unused pure expression or super */ null && (['top', 'right', 'bottom', 'left']));
+
+/**
+ * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.
+ *
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...border('1px', 'solid', 'red')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${border('1px', 'solid', 'red')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'borderColor': 'red',
+ * 'borderStyle': 'solid',
+ * 'borderWidth': `1px`,
+ * }
+ *
+ * // Styles as object usage
+ * const styles = {
+ * ...border('top', '1px', 'solid', 'red')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${border('top', '1px', 'solid', 'red')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'borderTopColor': 'red',
+ * 'borderTopStyle': 'solid',
+ * 'borderTopWidth': `1px`,
+ * }
+ */
+
+function border(sideKeyword) {
+ for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ values[_key - 1] = arguments[_key];
+ }
+ if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {
+ var _ref;
+ return _ref = {}, _ref["border" + capitalizeString(sideKeyword) + "Width"] = values[0], _ref["border" + capitalizeString(sideKeyword) + "Style"] = values[1], _ref["border" + capitalizeString(sideKeyword) + "Color"] = values[2], _ref;
+ } else {
+ values.unshift(sideKeyword);
+ return {
+ borderWidth: values[0],
+ borderStyle: values[1],
+ borderColor: values[2]
+ };
+ }
+}
+
+/**
+ * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...borderColor('red', 'green', 'blue', 'yellow')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${borderColor('red', 'green', 'blue', 'yellow')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'borderTopColor': 'red',
+ * 'borderRightColor': 'green',
+ * 'borderBottomColor': 'blue',
+ * 'borderLeftColor': 'yellow'
+ * }
+ */
+function borderColor() {
+ for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
+ values[_key] = arguments[_key];
+ }
+ return directionalProperty.apply(void 0, ['borderColor'].concat(values));
+}
+
+/**
+ * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...borderRadius('top', '5px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${borderRadius('top', '5px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'borderTopRightRadius': '5px',
+ * 'borderTopLeftRadius': '5px',
+ * }
+ */
+function borderRadius(side, radius) {
+ var uppercaseSide = capitalizeString(side);
+ if (!radius && radius !== 0) {
+ throw new PolishedError(62);
+ }
+ if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {
+ var _ref;
+ return _ref = {}, _ref["border" + uppercaseSide + "RightRadius"] = radius, _ref["border" + uppercaseSide + "LeftRadius"] = radius, _ref;
+ }
+ if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {
+ var _ref2;
+ return _ref2 = {}, _ref2["borderTop" + uppercaseSide + "Radius"] = radius, _ref2["borderBottom" + uppercaseSide + "Radius"] = radius, _ref2;
+ }
+ throw new PolishedError(63);
+}
+
+/**
+ * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...borderStyle('solid', 'dashed', 'dotted', 'double')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${borderStyle('solid', 'dashed', 'dotted', 'double')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'borderTopStyle': 'solid',
+ * 'borderRightStyle': 'dashed',
+ * 'borderBottomStyle': 'dotted',
+ * 'borderLeftStyle': 'double'
+ * }
+ */
+function borderStyle() {
+ for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
+ values[_key] = arguments[_key];
+ }
+ return directionalProperty.apply(void 0, ['borderStyle'].concat(values));
+}
+
+/**
+ * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...borderWidth('12px', '24px', '36px', '48px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${borderWidth('12px', '24px', '36px', '48px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'borderTopWidth': '12px',
+ * 'borderRightWidth': '24px',
+ * 'borderBottomWidth': '36px',
+ * 'borderLeftWidth': '48px'
+ * }
+ */
+function borderWidth() {
+ for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
+ values[_key] = arguments[_key];
+ }
+ return directionalProperty.apply(void 0, ['borderWidth'].concat(values));
+}
+
+function generateSelectors(template, state) {
+ var stateSuffix = state ? ":" + state : '';
+ return template(stateSuffix);
+}
+
+/**
+ * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.
+ * @private
+ */
+function statefulSelectors(states, template, stateMap) {
+ if (!template) throw new PolishedError(67);
+ if (states.length === 0) return generateSelectors(template, null);
+ var selectors = [];
+ for (var i = 0; i < states.length; i += 1) {
+ if (stateMap && stateMap.indexOf(states[i]) < 0) {
+ throw new PolishedError(68);
+ }
+ selectors.push(generateSelectors(template, states[i]));
+ }
+ selectors = selectors.join(',');
+ return selectors;
+}
+
+var stateMap$1 = (/* unused pure expression or super */ null && ([undefined, null, 'active', 'focus', 'hover']));
+function template$1(state) {
+ return "button" + state + ",\n input[type=\"button\"]" + state + ",\n input[type=\"reset\"]" + state + ",\n input[type=\"submit\"]" + state;
+}
+
+/**
+ * Populates selectors that target all buttons. You can pass optional states to append to the selectors.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * [buttons('active')]: {
+ * 'border': 'none'
+ * }
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * > ${buttons('active')} {
+ * border: none;
+ * }
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * 'button:active,
+ * 'input[type="button"]:active,
+ * 'input[type=\"reset\"]:active,
+ * 'input[type=\"submit\"]:active: {
+ * 'border': 'none'
+ * }
+ */
+function buttons() {
+ for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {
+ states[_key] = arguments[_key];
+ }
+ return statefulSelectors(states, template$1, stateMap$1);
+}
+
+/**
+ * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...margin('12px', '24px', '36px', '48px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${margin('12px', '24px', '36px', '48px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'marginTop': '12px',
+ * 'marginRight': '24px',
+ * 'marginBottom': '36px',
+ * 'marginLeft': '48px'
+ * }
+ */
+function margin() {
+ for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
+ values[_key] = arguments[_key];
+ }
+ return directionalProperty.apply(void 0, ['margin'].concat(values));
+}
+
+/**
+ * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...padding('12px', '24px', '36px', '48px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${padding('12px', '24px', '36px', '48px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'paddingTop': '12px',
+ * 'paddingRight': '24px',
+ * 'paddingBottom': '36px',
+ * 'paddingLeft': '48px'
+ * }
+ */
+function padding() {
+ for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
+ values[_key] = arguments[_key];
+ }
+ return directionalProperty.apply(void 0, ['padding'].concat(values));
+}
+
+var positionMap = (/* unused pure expression or super */ null && (['absolute', 'fixed', 'relative', 'static', 'sticky']));
+
+/**
+ * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...position('12px', '24px', '36px', '48px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${position('12px', '24px', '36px', '48px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'top': '12px',
+ * 'right': '24px',
+ * 'bottom': '36px',
+ * 'left': '48px'
+ * }
+ *
+ * // Styles as object usage
+ * const styles = {
+ * ...position('absolute', '12px', '24px', '36px', '48px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${position('absolute', '12px', '24px', '36px', '48px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'position': 'absolute',
+ * 'top': '12px',
+ * 'right': '24px',
+ * 'bottom': '36px',
+ * 'left': '48px'
+ * }
+ */
+function position(firstValue) {
+ for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ values[_key - 1] = arguments[_key];
+ }
+ if (positionMap.indexOf(firstValue) >= 0 && firstValue) {
+ return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {
+ position: firstValue
+ });
+ } else {
+ return directionalProperty.apply(void 0, ['', firstValue].concat(values));
+ }
+}
+
+/**
+ * Shorthand to set the height and width properties in a single statement.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...size('300px', '250px')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${size('300px', '250px')}
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'height': '300px',
+ * 'width': '250px',
+ * }
+ */
+function size(height, width) {
+ if (width === void 0) {
+ width = height;
+ }
+ return {
+ height: height,
+ width: width
+ };
+}
+
+var stateMap = (/* unused pure expression or super */ null && ([undefined, null, 'active', 'focus', 'hover']));
+function template(state) {
+ return "input[type=\"color\"]" + state + ",\n input[type=\"date\"]" + state + ",\n input[type=\"datetime\"]" + state + ",\n input[type=\"datetime-local\"]" + state + ",\n input[type=\"email\"]" + state + ",\n input[type=\"month\"]" + state + ",\n input[type=\"number\"]" + state + ",\n input[type=\"password\"]" + state + ",\n input[type=\"search\"]" + state + ",\n input[type=\"tel\"]" + state + ",\n input[type=\"text\"]" + state + ",\n input[type=\"time\"]" + state + ",\n input[type=\"url\"]" + state + ",\n input[type=\"week\"]" + state + ",\n input:not([type])" + state + ",\n textarea" + state;
+}
+
+/**
+ * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * [textInputs('active')]: {
+ * 'border': 'none'
+ * }
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * > ${textInputs('active')} {
+ * border: none;
+ * }
+ * `
+ *
+ * // CSS in JS Output
+ *
+ * 'input[type="color"]:active,
+ * input[type="date"]:active,
+ * input[type="datetime"]:active,
+ * input[type="datetime-local"]:active,
+ * input[type="email"]:active,
+ * input[type="month"]:active,
+ * input[type="number"]:active,
+ * input[type="password"]:active,
+ * input[type="search"]:active,
+ * input[type="tel"]:active,
+ * input[type="text"]:active,
+ * input[type="time"]:active,
+ * input[type="url"]:active,
+ * input[type="week"]:active,
+ * input:not([type]):active,
+ * textarea:active': {
+ * 'border': 'none'
+ * }
+ */
+function textInputs() {
+ for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {
+ states[_key] = arguments[_key];
+ }
+ return statefulSelectors(states, template, stateMap);
+}
+
+/**
+ * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).
+ * @example
+ * // Styles as object usage
+ * const styles = {
+ * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),
+ * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')
+ * }
+ *
+ * // styled-components usage
+ * const div = styled.div`
+ * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};
+ * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};
+ * `
+ *
+ * // CSS as JS Output
+ *
+ * div {
+ * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'
+ * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',
+ * }
+ */
+function transitions() {
+ for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {
+ properties[_key] = arguments[_key];
+ }
+ if (Array.isArray(properties[0]) && properties.length === 2) {
+ var value = properties[1];
+ if (typeof value !== 'string') {
+ throw new PolishedError(61);
+ }
+ var transitionsString = properties[0].map(function (property) {
+ return property + " " + value;
+ }).join(', ');
+ return {
+ transition: transitionsString
+ };
+ } else {
+ return {
+ transition: properties.join(', ')
+ };
+ }
+}
+
+
+
+// EXTERNAL MODULE: external "__STORYBOOK_MODULE_GLOBAL__"
+var external_STORYBOOK_MODULE_GLOBAL_ = __webpack_require__("@storybook/global");
+// EXTERNAL MODULE: ../../../node_modules/@storybook/icons/dist/index.mjs
+var dist = __webpack_require__("../../../node_modules/@storybook/icons/dist/index.mjs");
+// EXTERNAL MODULE: external "__STORYBOOK_MODULE_CLIENT_LOGGER__"
+var external_STORYBOOK_MODULE_CLIENT_LOGGER_ = __webpack_require__("storybook/internal/client-logger");
+// EXTERNAL MODULE: ../../../node_modules/@storybook/csf/dist/index.mjs
+var csf_dist = __webpack_require__("../../../node_modules/@storybook/csf/dist/index.mjs");
+// EXTERNAL MODULE: ../../../node_modules/lodash/pickBy.js
+var pickBy = __webpack_require__("../../../node_modules/lodash/pickBy.js");
+var pickBy_default = /*#__PURE__*/__webpack_require__.n(pickBy);
+;// CONCATENATED MODULE: ../../../node_modules/markdown-to-jsx/dist/index.modern.js
+function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},o=["style","script"],c=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,s=/mailto:/i,d=/\n{2,}$/,u=/^(\s*>[\s\S]*?)(?=\n{2,})/,p=/^ *> ?/gm,f=/^ {2,}\n/,h=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,m=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,y=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,k=/^(?:\n *)*\n/,x=/\r\n?/g,b=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,v=/^\[\^([^\]]+)]/,S=/\f/g,E=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,$=/^\s*?\[(x|\s)\]/,w=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,C=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,z=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,L=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,A=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,T=/^)/,O=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,B=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,M=/^\{.*\}$/,R=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,I=/^<([^ >]+@[^ >]+)>/,U=/^<([^ >]+:\/[^ >]+)>/,D=/-([a-z])?/gi,j=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,N=/^\[([^\]]*)\]:\s+([^\s>]+)>?\s*("([^"]*)")?/,H=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,F=/^\[([^\]]*)\] ?\[([^\]]*)\]/,P=/(\[|\])/g,_=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,W=/\t/g,G=/(^ *\||\| *$)/g,Z=/^ *:-+: *$/,q=/^ *:-+ *$/,Q=/^ *-+: *$/,V="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",X=new RegExp(`^([*_])\\1${V}\\1\\1(?!\\1)`),J=new RegExp(`^([*_])${V}\\1(?!\\1|\\w)`),K=new RegExp(`^==${V}==`),Y=new RegExp(`^~~${V}~~`),ee=/^\\([^0-9A-Za-z\s])/,te=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,ne=/^\n+/,re=/^([ \t]*)/,ie=/\\([^\\])/g,le=/ *\n+$/,ae=/(?:^|\n)( *)$/,oe="(?:\\d+\\.)",ce="(?:[*+-])";function se(e){return"( *)("+(1===e?oe:ce)+") +"}const de=se(1),ue=se(2);function pe(e){return new RegExp("^"+(1===e?de:ue))}const fe=pe(1),he=pe(2);function me(e){return new RegExp("^"+(1===e?de:ue)+"[^\\n]*(?:\\n(?!\\1"+(1===e?oe:ce)+" )[^\\n]*)*(\\n|$)","gm")}const ge=me(1),ye=me(2);function ke(e){const t=1===e?oe:ce;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const xe=ke(1),be=ke(2);function ve(e,t){const n=1===t,i=n?xe:be,l=n?ge:ye,a=n?fe:he;return{match(e,t,n){const r=ae.exec(n);return r&&(t.list||!t.inline&&!t.simple)?i.exec(e=r[1]+e):null},order:1,parse(e,t,r){const i=n?+e[2]:void 0,o=e[0].replace(d,"\n").match(l);let c=!1;return{items:o.map(function(e,n){const i=a.exec(e)[0].length,l=new RegExp("^ {1,"+i+"}","gm"),s=e.replace(l,"").replace(a,""),d=n===o.length-1,u=-1!==s.indexOf("\n\n")||d&&c;c=u;const p=r.inline,f=r.list;let h;r.list=!0,u?(r.inline=!1,h=s.replace(le,"\n\n")):(r.inline=!0,h=s.replace(le,""));const m=t(h,r);return r.inline=p,r.list=f,m}),ordered:n,start:i}},render:(t,n,i)=>e(t.ordered?"ol":"ul",{key:i.key,start:t.type===r.orderedList?t.start:void 0},t.items.map(function(t,r){return e("li",{key:r},n(t,i))}))}}const Se=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Ee=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,$e=[u,m,g,w,z,C,T,j,ge,xe,ye,be],we=[...$e,/^[^\n]+(?: \n|\n{2,})/,L,B];function Ce(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function ze(e){return Q.test(e)?"right":Z.test(e)?"center":q.test(e)?"left":null}function Le(e,t,n,i){const l=n.inTable;n.inTable=!0;let a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce((e,l)=>("|"===l.trim()?e.push(i?{type:r.tableSeparator}:{type:r.text,text:l}):""!==l&&e.push.apply(e,t(l,n)),e),[]);n.inTable=l;let o=[[]];return a.forEach(function(e,t){e.type===r.tableSeparator?0!==t&&t!==a.length-1&&o.push([]):(e.type!==r.text||null!=a[t+1]&&a[t+1].type!==r.tableSeparator||(e.text=e.text.trimEnd()),o[o.length-1].push(e))}),o}function Ae(e,t,n){n.inline=!0;const i=e[2]?e[2].replace(G,"").split("|").map(ze):[],l=e[3]?function(e,t,n){return e.trim().split("\n").map(function(e){return Le(e,t,n,!0)})}(e[3],t,n):[],a=Le(e[1],t,n,!!l.length);return n.inline=!1,l.length?{align:i,cells:l,header:a,type:r.table}:{children:a,type:r.paragraph}}function Te(e,t){return null==e.align[t]?{}:{textAlign:e.align[t]}}function Oe(e){return function(t,n){return n.inline?e.exec(t):null}}function Be(e){return function(t,n){return n.inline||n.simple?e.exec(t):null}}function Me(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Re(e){return function(t){return e.exec(t)}}function Ie(e,t,n){if(t.inline||t.simple)return null;if(n&&!n.endsWith("\n"))return null;let r="";e.split("\n").every(e=>!$e.some(t=>t.test(e))&&(r+=e+"\n",e.trim()));const i=r.trimEnd();return""==i?null:[r,i]}function Ue(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return null}catch(e){return null}return e}function De(e){return e.replace(ie,"$1")}function je(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const l=e(t,n);return n.inline=r,n.simple=i,l}function Ne(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const l=e(t,n);return n.inline=r,n.simple=i,l}function He(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const Fe=(e,t,n)=>({children:je(t,e[1],n)});function Pe(){return{}}function _e(){return null}function We(...e){return e.filter(Boolean).join(" ")}function Ge(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],void 0!==r);)i.shift();return r||n}function Ze(n="",i={}){function d(e,n,...r){const l=Ge(i.overrides,`${e}.props`,{});return i.createElement(function(e,t){const n=Ge(t,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Ge(t,`${e}.component`,e):e}(e,i.overrides),t({},n,l,{className:We(null==n?void 0:n.className,l.className)||void 0}),...r)}function G(t){t=t.replace(E,"");let n=!1;i.forceInline?n=!0:i.forceBlock||(n=!1===_.test(t));const r=le(ie(n?t:`${t.trimEnd().replace(ne,"")}\n\n`,{inline:n}));for(;"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===i.wrapper)return r;const l=i.wrapper||(n?"span":"div");let a;if(r.length>1||i.forceWrapper)a=r;else{if(1===r.length)return a=r[0],"string"==typeof a?d("span",{key:"outer"},a):a;a=null}return react.createElement(l,{key:"outer"},a)}function Z(t,n){const r=n.match(c);return r?r.reduce(function(n,r,a){const o=r.indexOf("=");if(-1!==o){const c=function(e){return-1!==e.indexOf("-")&&null===e.match(O)&&(e=e.replace(D,function(e,t){return t.toUpperCase()})),e}(r.slice(0,o)).trim(),s=function(e){const t=e[0];return('"'===t||"'"===t)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e}(r.slice(o+1).trim()),d=l[c]||c,u=n[d]=function(e,t,n,r){return"style"===t?n.split(/;\s?/).reduce(function(e,t){const n=t.slice(0,t.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=t.slice(n.length+1).trim(),e},{}):"href"===t||"src"===t?r(n,e,t):(n.match(M)&&(n=n.slice(1,n.length-1)),"true"===n||"false"!==n&&n)}(t,c,s,i.sanitizer);"string"==typeof u&&(L.test(u)||B.test(u))&&(n[d]=react.cloneElement(G(u.trim()),{key:a}))}else"style"!==r&&(n[l[r]||r]=!0);return n},{}):null}i.overrides=i.overrides||{},i.sanitizer=i.sanitizer||Ue,i.slugify=i.slugify||Ce,i.namedCodesToUnicode=i.namedCodesToUnicode?t({},a,i.namedCodesToUnicode):a,i.createElement=i.createElement||react.createElement;const q=[],Q={},V={[r.blockQuote]:{match:Me(u),order:1,parse:(e,t,n)=>({children:t(e[0].replace(p,""),n)}),render:(e,t,n)=>d("blockquote",{key:n.key},t(e.children,n))},[r.breakLine]:{match:Re(f),order:1,parse:Pe,render:(e,t,n)=>d("br",{key:n.key})},[r.breakThematic]:{match:Me(h),order:1,parse:Pe,render:(e,t,n)=>d("hr",{key:n.key})},[r.codeBlock]:{match:Me(g),order:0,parse:e=>({lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(e,n,r)=>d("pre",{key:r.key},d("code",t({},e.attrs,{className:e.lang?`lang-${e.lang}`:""}),e.text))},[r.codeFenced]:{match:Me(m),order:0,parse:e=>({attrs:Z("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:r.codeBlock})},[r.codeInline]:{match:Be(y),order:3,parse:e=>({text:e[2]}),render:(e,t,n)=>d("code",{key:n.key},e.text)},[r.footnote]:{match:Me(b),order:0,parse:e=>(q.push({footnote:e[2],identifier:e[1]}),{}),render:_e},[r.footnoteReference]:{match:Oe(v),order:1,parse:e=>({target:`#${i.slugify(e[1],Ce)}`,text:e[1]}),render:(e,t,n)=>d("a",{key:n.key,href:i.sanitizer(e.target,"a","href")},d("sup",{key:n.key},e.text))},[r.gfmTask]:{match:Oe($),order:1,parse:e=>({completed:"x"===e[1].toLowerCase()}),render:(e,t,n)=>d("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})},[r.heading]:{match:Me(i.enforceAtxHeadings?C:w),order:1,parse:(e,t,n)=>({children:je(t,e[2],n),id:i.slugify(e[2],Ce),level:e[1].length}),render:(e,t,n)=>d(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n))},[r.headingSetext]:{match:Me(z),order:0,parse:(e,t,n)=>({children:je(t,e[1],n),level:"="===e[2]?1:2,type:r.heading})},[r.htmlBlock]:{match:Re(L),order:1,parse(e,t,n){const[,r]=e[3].match(re),i=new RegExp(`^${r}`,"gm"),l=e[3].replace(i,""),a=(c=l,we.some(e=>e.test(c))?He:je);var c;const s=e[1].toLowerCase(),d=-1!==o.indexOf(s),u=(d?s:e[1]).trim(),p={attrs:Z(u,e[2]),noInnerParse:d,tag:u};return n.inAnchor=n.inAnchor||"a"===s,d?p.text=e[3]:p.children=a(t,l,n),n.inAnchor=!1,p},render:(e,n,r)=>d(e.tag,t({key:r.key},e.attrs),e.text||n(e.children,r))},[r.htmlSelfClosing]:{match:Re(B),order:1,parse(e){const t=e[1].trim();return{attrs:Z(t,e[2]||""),tag:t}},render:(e,n,r)=>d(e.tag,t({},e.attrs,{key:r.key}))},[r.htmlComment]:{match:Re(T),order:1,parse:()=>({}),render:_e},[r.image]:{match:Be(Ee),order:1,parse:e=>({alt:e[1],target:De(e[2]),title:e[3]}),render:(e,t,n)=>d("img",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:i.sanitizer(e.target,"img","src")})},[r.link]:{match:Oe(Se),order:3,parse:(e,t,n)=>({children:Ne(t,e[1],n),target:De(e[2]),title:e[3]}),render:(e,t,n)=>d("a",{key:n.key,href:i.sanitizer(e.target,"a","href"),title:e.title},t(e.children,n))},[r.linkAngleBraceStyleDetector]:{match:Oe(U),order:0,parse:e=>({children:[{text:e[1],type:r.text}],target:e[1],type:r.link})},[r.linkBareUrlDetector]:{match:(e,t)=>t.inAnchor?null:Oe(R)(e,t),order:0,parse:e=>({children:[{text:e[1],type:r.text}],target:e[1],title:void 0,type:r.link})},[r.linkMailtoDetector]:{match:Oe(I),order:0,parse(e){let t=e[1],n=e[1];return s.test(n)||(n="mailto:"+n),{children:[{text:t.replace("mailto:",""),type:r.text}],target:n,type:r.link}}},[r.orderedList]:ve(d,1),[r.unorderedList]:ve(d,2),[r.newlineCoalescer]:{match:Me(k),order:3,parse:Pe,render:()=>"\n"},[r.paragraph]:{match:Ie,order:3,parse:Fe,render:(e,t,n)=>d("p",{key:n.key},t(e.children,n))},[r.ref]:{match:Oe(N),order:0,parse:e=>(Q[e[1]]={target:e[2],title:e[4]},{}),render:_e},[r.refImage]:{match:Be(H),order:0,parse:e=>({alt:e[1]||void 0,ref:e[2]}),render:(e,t,n)=>Q[e.ref]?d("img",{key:n.key,alt:e.alt,src:i.sanitizer(Q[e.ref].target,"img","src"),title:Q[e.ref].title}):null},[r.refLink]:{match:Oe(F),order:0,parse:(e,t,n)=>({children:t(e[1],n),fallbackChildren:t(e[0].replace(P,"\\$1"),n),ref:e[2]}),render:(e,t,n)=>Q[e.ref]?d("a",{key:n.key,href:i.sanitizer(Q[e.ref].target,"a","href"),title:Q[e.ref].title},t(e.children,n)):d("span",{key:n.key},t(e.fallbackChildren,n))},[r.table]:{match:Me(j),order:1,parse:Ae,render(e,t,n){const r=e;return d("table",{key:n.key},d("thead",null,d("tr",null,r.header.map(function(e,i){return d("th",{key:i,style:Te(r,i)},t(e,n))}))),d("tbody",null,r.cells.map(function(e,i){return d("tr",{key:i},e.map(function(e,i){return d("td",{key:i,style:Te(r,i)},t(e,n))}))})))}},[r.text]:{match:Re(te),order:4,parse:e=>({text:e[0].replace(A,(e,t)=>i.namedCodesToUnicode[t]?i.namedCodesToUnicode[t]:e)}),render:e=>e.text},[r.textBolded]:{match:Be(X),order:2,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>d("strong",{key:n.key},t(e.children,n))},[r.textEmphasized]:{match:Be(J),order:3,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>d("em",{key:n.key},t(e.children,n))},[r.textEscaped]:{match:Be(ee),order:1,parse:e=>({text:e[1],type:r.text})},[r.textMarked]:{match:Be(K),order:3,parse:Fe,render:(e,t,n)=>d("mark",{key:n.key},t(e.children,n))},[r.textStrikethroughed]:{match:Be(Y),order:3,parse:Fe,render:(e,t,n)=>d("del",{key:n.key},t(e.children,n))}};!0===i.disableParsingRawHTML&&(delete V[r.htmlBlock],delete V[r.htmlSelfClosing]);const ie=function(e){let t=Object.keys(e);function n(r,i){let l=[],a="";for(;r;){let o=0;for(;ol(n,r,i),n,r,i):l(n,r,i)}}(V,i.renderRule),function e(t,n={}){if(Array.isArray(t)){const r=n.key,i=[];let l=!1;for(let r=0;r{let{children:r="",options:i}=t,l=function(e,t){if(null==e)return{};var n,r,i={},l=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,n);return react.cloneElement(Ze(r,i),l)});
+//# sourceMappingURL=index.modern.js.map
+
+// EXTERNAL MODULE: ../../../node_modules/lodash/cloneDeep.js
+var cloneDeep = __webpack_require__("../../../node_modules/lodash/cloneDeep.js");
+var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(cloneDeep);
+// EXTERNAL MODULE: ../../../node_modules/lodash/uniq.js
+var uniq = __webpack_require__("../../../node_modules/lodash/uniq.js");
+var uniq_default = /*#__PURE__*/__webpack_require__.n(uniq);
+// EXTERNAL MODULE: ../../../node_modules/memoizerific/memoizerific.js
+var memoizerific = __webpack_require__("../../../node_modules/memoizerific/memoizerific.js");
+var memoizerific_default = /*#__PURE__*/__webpack_require__.n(memoizerific);
+// EXTERNAL MODULE: external "__STORYBOOK_MODULE_PREVIEW_API__"
+var external_STORYBOOK_MODULE_PREVIEW_API_ = __webpack_require__("storybook/internal/preview-api");
+// EXTERNAL MODULE: ../../../node_modules/@storybook/core/dist/docs-tools/index.js
+var docs_tools = __webpack_require__("../../../node_modules/@storybook/core/dist/docs-tools/index.js");
+// EXTERNAL MODULE: ../../../node_modules/telejson/dist/index.mjs
+var telejson_dist = __webpack_require__("../../../node_modules/telejson/dist/index.mjs");
+// EXTERNAL MODULE: external "__STORYBOOK_MODULE_CORE_EVENTS__"
+var external_STORYBOOK_MODULE_CORE_EVENTS_ = __webpack_require__("storybook/internal/core-events");
+// EXTERNAL MODULE: ../../../node_modules/ts-dedent/esm/index.js
+var esm = __webpack_require__("../../../node_modules/ts-dedent/esm/index.js");
+// EXTERNAL MODULE: external "__STORYBOOK_MODULE_CHANNELS__"
+var external_STORYBOOK_MODULE_CHANNELS_ = __webpack_require__("storybook/internal/channels");
+;// CONCATENATED MODULE: ../../../node_modules/@storybook/blocks/dist/index.mjs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+var require_default_options=(0,chunk_MKV36LKP/* __commonJS */.P$)({"../../node_modules/tocbot/src/js/default-options.js"(exports,module){module.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(e){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollOffset:0};}});var require_build_html=(0,chunk_MKV36LKP/* __commonJS */.P$)({"../../node_modules/tocbot/src/js/build-html.js"(exports,module){module.exports=function(options){var forEach=[].forEach,some=[].some,body=document.body,tocElement,currentlyHighlighting=!0,SPACE_CHAR=" ";function createEl(d,container){var link=container.appendChild(createLink(d));if(d.children.length){var list=createList(d.isCollapsed);d.children.forEach(function(child){createEl(child,list);}),link.appendChild(list);}}function render(parent,data){var collapsed=!1,container=createList(collapsed);if(data.forEach(function(d){createEl(d,container);}),tocElement=parent||tocElement,tocElement!==null)return tocElement.firstChild&&tocElement.removeChild(tocElement.firstChild),data.length===0?tocElement:tocElement.appendChild(container)}function createLink(data){var item=document.createElement("li"),a=document.createElement("a");return options.listItemClass&&item.setAttribute("class",options.listItemClass),options.onClick&&(a.onclick=options.onClick),options.includeTitleTags&&a.setAttribute("title",data.textContent),options.includeHtml&&data.childNodes.length?forEach.call(data.childNodes,function(node){a.appendChild(node.cloneNode(!0));}):a.textContent=data.textContent,a.setAttribute("href",options.basePath+"#"+data.id),a.setAttribute("class",options.linkClass+SPACE_CHAR+"node-name--"+data.nodeName+SPACE_CHAR+options.extraLinkClasses),item.appendChild(a),item}function createList(isCollapsed){var listElement=options.orderedList?"ol":"ul",list=document.createElement(listElement),classes=options.listClass+SPACE_CHAR+options.extraListClasses;return isCollapsed&&(classes=classes+SPACE_CHAR+options.collapsibleClass,classes=classes+SPACE_CHAR+options.isCollapsedClass),list.setAttribute("class",classes),list}function updateFixedSidebarClass(){if(options.scrollContainer&&document.querySelector(options.scrollContainer)){var top;top=document.querySelector(options.scrollContainer).scrollTop;}else top=document.documentElement.scrollTop||body.scrollTop;var posFixedEl=document.querySelector(options.positionFixedSelector);options.fixedSidebarOffset==="auto"&&(options.fixedSidebarOffset=tocElement.offsetTop),top>options.fixedSidebarOffset?posFixedEl.className.indexOf(options.positionFixedClass)===-1&&(posFixedEl.className+=SPACE_CHAR+options.positionFixedClass):posFixedEl.className=posFixedEl.className.replace(SPACE_CHAR+options.positionFixedClass,"");}function getHeadingTopPos(obj){var position=0;return obj!==null&&(position=obj.offsetTop,options.hasInnerContainers&&(position+=getHeadingTopPos(obj.offsetParent))),position}function updateClassname(obj,className){return obj&&obj.className!==className&&(obj.className=className),obj}function updateToc(headingsArray){if(options.scrollContainer&&document.querySelector(options.scrollContainer)){var top;top=document.querySelector(options.scrollContainer).scrollTop;}else top=document.documentElement.scrollTop||body.scrollTop;options.positionFixedSelector&&updateFixedSidebarClass();var headings=headingsArray,topHeader;if(currentlyHighlighting&&tocElement!==null&&headings.length>0){some.call(headings,function(heading,i){if(getHeadingTopPos(heading)>top+options.headingsOffset+10){var index=i===0?i:i-1;return topHeader=headings[index],!0}else if(i===headings.length-1)return topHeader=headings[headings.length-1],!0});var oldActiveTocLink=tocElement.querySelector("."+options.activeLinkClass),activeTocLink=tocElement.querySelector("."+options.linkClass+".node-name--"+topHeader.nodeName+'[href="'+options.basePath+"#"+topHeader.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(oldActiveTocLink===activeTocLink)return;var tocLinks=tocElement.querySelectorAll("."+options.linkClass);forEach.call(tocLinks,function(tocLink){updateClassname(tocLink,tocLink.className.replace(SPACE_CHAR+options.activeLinkClass,""));});var tocLis=tocElement.querySelectorAll("."+options.listItemClass);forEach.call(tocLis,function(tocLi){updateClassname(tocLi,tocLi.className.replace(SPACE_CHAR+options.activeListItemClass,""));}),activeTocLink&&activeTocLink.className.indexOf(options.activeLinkClass)===-1&&(activeTocLink.className+=SPACE_CHAR+options.activeLinkClass);var li=activeTocLink&&activeTocLink.parentNode;li&&li.className.indexOf(options.activeListItemClass)===-1&&(li.className+=SPACE_CHAR+options.activeListItemClass);var tocLists=tocElement.querySelectorAll("."+options.listClass+"."+options.collapsibleClass);forEach.call(tocLists,function(list){list.className.indexOf(options.isCollapsedClass)===-1&&(list.className+=SPACE_CHAR+options.isCollapsedClass);}),activeTocLink&&activeTocLink.nextSibling&&activeTocLink.nextSibling.className.indexOf(options.isCollapsedClass)!==-1&&updateClassname(activeTocLink.nextSibling,activeTocLink.nextSibling.className.replace(SPACE_CHAR+options.isCollapsedClass,"")),removeCollapsedFromParents(activeTocLink&&activeTocLink.parentNode.parentNode);}}function removeCollapsedFromParents(element){return element&&element.className.indexOf(options.collapsibleClass)!==-1&&element.className.indexOf(options.isCollapsedClass)!==-1?(updateClassname(element,element.className.replace(SPACE_CHAR+options.isCollapsedClass,"")),removeCollapsedFromParents(element.parentNode.parentNode)):element}function disableTocAnimation(event){var target=event.target||event.srcElement;typeof target.className!="string"||target.className.indexOf(options.linkClass)===-1||(currentlyHighlighting=!1);}function enableTocAnimation(){currentlyHighlighting=!0;}return {enableTocAnimation,disableTocAnimation,render,updateToc}};}});var require_parse_content=(0,chunk_MKV36LKP/* __commonJS */.P$)({"../../node_modules/tocbot/src/js/parse-content.js"(exports,module){module.exports=function(options){var reduce=[].reduce;function getLastItem(array2){return array2[array2.length-1]}function getHeadingLevel(heading){return +heading.nodeName.toUpperCase().replace("H","")}function isHTMLElement(maybeElement){try{return maybeElement instanceof window.HTMLElement||maybeElement instanceof window.parent.HTMLElement}catch{return maybeElement instanceof window.HTMLElement}}function getHeadingObject(heading){if(!isHTMLElement(heading))return heading;if(options.ignoreHiddenElements&&(!heading.offsetHeight||!heading.offsetParent))return null;let headingLabel=heading.getAttribute("data-heading-label")||(options.headingLabelCallback?String(options.headingLabelCallback(heading.innerText)):(heading.innerText||heading.textContent).trim());var obj={id:heading.id,children:[],nodeName:heading.nodeName,headingLevel:getHeadingLevel(heading),textContent:headingLabel};return options.includeHtml&&(obj.childNodes=heading.childNodes),options.headingObjectCallback?options.headingObjectCallback(obj,heading):obj}function addNode(node,nest){for(var obj=getHeadingObject(node),level=obj.headingLevel,array2=nest,lastItem=getLastItem(array2),lastItemLevel=lastItem?lastItem.headingLevel:0,counter=level-lastItemLevel;counter>0&&(lastItem=getLastItem(array2),!(lastItem&&level===lastItem.headingLevel));)lastItem&&lastItem.children!==void 0&&(array2=lastItem.children),counter--;return level>=options.collapseDepth&&(obj.isCollapsed=!0),array2.push(obj),array2}function selectHeadings(contentElement,headingSelector){var selectors=headingSelector;options.ignoreSelector&&(selectors=headingSelector.split(",").map(function(selector){return selector.trim()+":not("+options.ignoreSelector+")"}));try{return contentElement.querySelectorAll(selectors)}catch{return console.warn("Headers not found with selector: "+selectors),null}}function nestHeadingsArray(headingsArray){return reduce.call(headingsArray,function(prev,curr){var currentHeading=getHeadingObject(curr);return currentHeading&&addNode(currentHeading,prev.nest),prev},{nest:[]})}return {nestHeadingsArray,selectHeadings}};}});var require_update_toc_scroll=(0,chunk_MKV36LKP/* __commonJS */.P$)({"../../node_modules/tocbot/src/js/update-toc-scroll.js"(exports,module){module.exports=function(options){var toc=options.tocElement||document.querySelector(options.tocSelector);if(toc&&toc.scrollHeight>toc.clientHeight){var activeItem=toc.querySelector("."+options.activeListItemClass);activeItem&&(toc.scrollTop=activeItem.offsetTop-options.tocScrollOffset);}};}});var require_scroll_smooth=(0,chunk_MKV36LKP/* __commonJS */.P$)({"../../node_modules/tocbot/src/js/scroll-smooth/index.js"(exports){exports.initSmoothScrolling=initSmoothScrolling;function initSmoothScrolling(options){var duration=options.duration,offset=options.offset,pageUrl=location.hash?stripHash(location.href):location.href;delegatedLinkHijacking();function delegatedLinkHijacking(){document.body.addEventListener("click",onClick,!1);function onClick(e){!isInPageLink(e.target)||e.target.className.indexOf("no-smooth-scroll")>-1||e.target.href.charAt(e.target.href.length-2)==="#"&&e.target.href.charAt(e.target.href.length-1)==="!"||e.target.className.indexOf(options.linkClass)===-1||jump(e.target.hash,{duration,offset,callback:function(){setFocus(e.target.hash);}});}}function isInPageLink(n){return n.tagName.toLowerCase()==="a"&&(n.hash.length>0||n.href.charAt(n.href.length-1)==="#")&&(stripHash(n.href)===pageUrl||stripHash(n.href)+"#"===pageUrl)}function stripHash(url){return url.slice(0,url.lastIndexOf("#"))}function setFocus(hash){var element=document.getElementById(hash.substring(1));element&&(/^(?:a|select|input|button|textarea)$/i.test(element.tagName)||(element.tabIndex=-1),element.focus());}}function jump(target,options){var start=window.pageYOffset,opt={duration:options.duration,offset:options.offset||0,callback:options.callback,easing:options.easing||easeInOutQuad},tgt=document.querySelector('[id="'+decodeURI(target).split("#").join("")+'"]')||document.querySelector('[id="'+target.split("#").join("")+'"]'),distance=typeof target=="string"?opt.offset+(target?tgt&&tgt.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):target,duration=typeof opt.duration=="function"?opt.duration(distance):opt.duration,timeStart,timeElapsed;requestAnimationFrame(function(time){timeStart=time,loop(time);});function loop(time){timeElapsed=time-timeStart,window.scrollTo(0,opt.easing(timeElapsed,start,distance,duration)),timeElapsed"u"&&!supports)return;var headingsArray,hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){for(var target={},i=0;i({backgroundColor:theme.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:theme.appBorderRadius,border:`1px dashed ${theme.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:curriedTransparentize$1(.3,theme.color.defaultText),fontSize:theme.typography.size.s2})),EmptyBlock=props=>react.createElement(Wrapper,{...props,className:"docblock-emptyblock sb-unstyled"});var StyledSyntaxHighlighter=(0,theming/* styled */.I4)(components/* SyntaxHighlighter */.bF)(({theme})=>({fontSize:`${theme.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:theme.appBorderRadius,boxShadow:theme.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}}));var SourceSkeletonWrapper=theming/* styled */.I4.div(({theme})=>({background:theme.background.content,borderRadius:theme.appBorderRadius,border:`1px solid ${theme.appBorderColor}`,boxShadow:theme.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"})),SourceSkeletonPlaceholder=theming/* styled */.I4.div(({theme})=>({animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,background:theme.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${theming/* ignoreSsrWarning */.v_}`]:{margin:0}})),SourceSkeleton=()=>react.createElement(SourceSkeletonWrapper,null,react.createElement(SourceSkeletonPlaceholder,null),react.createElement(SourceSkeletonPlaceholder,{style:{width:"80%"}}),react.createElement(SourceSkeletonPlaceholder,{style:{width:"30%"}}),react.createElement(SourceSkeletonPlaceholder,{style:{width:"80%"}})),Source=({isLoading,error,language,code,dark,format:format2=!1,...rest})=>{let{typography}=(0,theming/* useTheme */.DP)();if(isLoading)return react.createElement(SourceSkeleton,null);if(error)return react.createElement(EmptyBlock,null,error);let syntaxHighlighter=react.createElement(StyledSyntaxHighlighter,{bordered:!0,copyable:!0,format:format2,language,className:"docblock-source sb-unstyled",...rest},code);if(typeof dark>"u")return syntaxHighlighter;let overrideTheme=dark?theming/* themes */.Zj.dark:theming/* themes */.Zj.light;return react.createElement(theming/* ThemeProvider */.NP,{theme:(0,theming/* convert */.C6)({...overrideTheme,fontCode:typography.fonts.mono,fontBase:typography.fonts.base})},syntaxHighlighter)};var toGlobalSelector=element=>`& :where(${element}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${element}))`,breakpoint=600,Title=theming/* styled */.I4.h1(components/* withReset */.YV,({theme})=>({color:theme.color.defaultText,fontSize:theme.typography.size.m3,fontWeight:theme.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${breakpoint}px)`]:{fontSize:theme.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),Subtitle=theming/* styled */.I4.h2(components/* withReset */.YV,({theme})=>({fontWeight:theme.typography.weight.regular,fontSize:theme.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${breakpoint}px)`]:{fontSize:theme.typography.size.m1,lineHeight:"28px",marginBottom:24},color:curriedTransparentize$1(.25,theme.color.defaultText)})),DocsContent=theming/* styled */.I4.div(({theme})=>{let reset={fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},headers={margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:theme.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& code":{fontSize:"inherit"}},code={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:theme.typography.size.s2-1,border:theme.base==="light"?`1px solid ${theme.color.mediumlight}`:`1px solid ${theme.color.darker}`,color:theme.base==="light"?curriedTransparentize$1(.1,theme.color.defaultText):curriedTransparentize$1(.3,theme.color.defaultText),backgroundColor:theme.base==="light"?theme.color.lighter:theme.color.border};return {maxWidth:1e3,width:"100%",[toGlobalSelector("a")]:{...reset,fontSize:"inherit",lineHeight:"24px",color:theme.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}},[toGlobalSelector("blockquote")]:{...reset,margin:"16px 0",borderLeft:`4px solid ${theme.color.medium}`,padding:"0 15px",color:theme.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[toGlobalSelector("div")]:reset,[toGlobalSelector("dl")]:{...reset,margin:"16px 0",padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}},[toGlobalSelector("h1")]:{...reset,...headers,fontSize:`${theme.typography.size.l1}px`,fontWeight:theme.typography.weight.bold},[toGlobalSelector("h2")]:{...reset,...headers,fontSize:`${theme.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${theme.appBorderColor}`},[toGlobalSelector("h3")]:{...reset,...headers,fontSize:`${theme.typography.size.m1}px`,fontWeight:theme.typography.weight.bold},[toGlobalSelector("h4")]:{...reset,...headers,fontSize:`${theme.typography.size.s3}px`},[toGlobalSelector("h5")]:{...reset,...headers,fontSize:`${theme.typography.size.s2}px`},[toGlobalSelector("h6")]:{...reset,...headers,fontSize:`${theme.typography.size.s2}px`,color:theme.color.dark},[toGlobalSelector("hr")]:{border:"0 none",borderTop:`1px solid ${theme.appBorderColor}`,height:4,padding:0},[toGlobalSelector("img")]:{maxWidth:"100%"},[toGlobalSelector("li")]:{...reset,fontSize:theme.typography.size.s2,color:theme.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":code},[toGlobalSelector("ol")]:{...reset,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[toGlobalSelector("p")]:{...reset,margin:"16px 0",fontSize:theme.typography.size.s2,lineHeight:"24px",color:theme.color.defaultText,"& code":code},[toGlobalSelector("pre")]:{...reset,fontFamily:theme.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}},[toGlobalSelector("span")]:{...reset,"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${theme.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:theme.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}},[toGlobalSelector("table")]:{...reset,margin:"16px 0",fontSize:theme.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${theme.appBorderColor}`,backgroundColor:theme.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:theme.base==="dark"?theme.color.darker:theme.color.lighter},"& tr th":{fontWeight:"bold",color:theme.color.defaultText,border:`1px solid ${theme.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${theme.appBorderColor}`,color:theme.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}},[toGlobalSelector("ul")]:{...reset,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),DocsWrapper=theming/* styled */.I4.div(({theme})=>({background:theme.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${breakpoint}px)`]:{}})),DocsPageWrapper=({children,toc})=>react.createElement(DocsWrapper,{className:"sbdocs sbdocs-wrapper"},react.createElement(DocsContent,{className:"sbdocs sbdocs-content"},children),toc);var getBlockBackgroundStyle=theme=>({borderRadius:theme.appBorderRadius,background:theme.background.content,boxShadow:theme.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${theme.appBorderColor}`});var{window:globalWindow}=external_STORYBOOK_MODULE_GLOBAL_.global,IFrame=class extends react.Component{constructor(){super(...arguments);this.iframe=null;}componentDidMount(){let{id}=this.props;this.iframe=globalWindow.document.getElementById(id);}shouldComponentUpdate(nextProps){let{scale}=nextProps;return scale!==this.props.scale&&this.setIframeBodyStyle({width:`${scale*100}%`,height:`${scale*100}%`,transform:`scale(${1/scale})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(style){return Object.assign(this.iframe.contentDocument.body.style,style)}render(){let{id,title,src,allowFullScreen,scale,...rest}=this.props;return react.createElement("iframe",{id,title,src,...allowFullScreen?{allow:"fullscreen"}:{},loading:"lazy",...rest})}};var ZoomContext=(0,react.createContext)({scale:1});var{PREVIEW_URL}=external_STORYBOOK_MODULE_GLOBAL_.global,BASE_URL=PREVIEW_URL||"iframe.html",storyBlockIdFromId=({story,primary})=>`story--${story.id}${primary?"--primary":""}`,InlineStory=props=>{let storyRef=(0,react.useRef)(),[showLoader,setShowLoader]=(0,react.useState)(!0),[error,setError]=(0,react.useState)(),{story,height,autoplay,forceInitialArgs,renderStoryToElement}=props;return (0,react.useEffect)(()=>{if(!(story&&storyRef.current))return ()=>{};let element=storyRef.current,cleanup=renderStoryToElement(story,element,{showMain:()=>{},showError:({title,description})=>setError(new Error(`${title} - ${description}`)),showException:err=>setError(err)},{autoplay,forceInitialArgs});return setShowLoader(!1),()=>{Promise.resolve().then(()=>cleanup());}},[autoplay,renderStoryToElement,story]),error?react.createElement("pre",null,react.createElement(components/* ErrorFormatter */.Df,{error})):react.createElement(react.Fragment,null,height?react.createElement("style",null,`#${storyBlockIdFromId(props)} { min-height: ${height}; transform: translateZ(0); overflow: auto }`):null,showLoader&&react.createElement(StorySkeleton,null),react.createElement("div",{ref:storyRef,id:`${storyBlockIdFromId(props)}-inner`,"data-name":story.name}))},IFrameStory=({story,height="500px"})=>react.createElement("div",{style:{width:"100%",height}},react.createElement(ZoomContext.Consumer,null,({scale})=>react.createElement(IFrame,{key:"iframe",id:`iframe--${story.id}`,title:story.name,src:(0,components/* getStoryHref */.jZ)(BASE_URL,story.id,{viewMode:"story"}),allowFullScreen:!0,scale,style:{width:"100%",height:"100%",border:"0 none"}}))),ErrorMessage=theming/* styled */.I4.strong(({theme})=>({color:theme.color.orange})),Story=props=>{let{inline,story}=props;return inline&&!props.autoplay&&story.usesMount?react.createElement(ErrorMessage,null,"This story mounts inside of play. Set"," ",react.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):react.createElement("div",{id:storyBlockIdFromId(props),className:"sb-story sb-unstyled","data-story-block":"true"},inline?react.createElement(InlineStory,{...props}):react.createElement(IFrameStory,{...props}))},StorySkeleton=()=>react.createElement(components/* Loader */.aH,null);var Bar=(0,theming/* styled */.I4)(components/* FlexBar */.px)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Wrapper2=theming/* styled */.I4.div({display:"flex",alignItems:"center",gap:4}),IconPlaceholder=theming/* styled */.I4.div(({theme})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:theme.appBorderColor,animation:`${theme.animation.glow} 1.5s ease-in-out infinite`})),Toolbar=({isLoading,storyId,baseUrl,zoom,resetZoom,...rest})=>react.createElement(Bar,{...rest},react.createElement(Wrapper2,{key:"left"},isLoading?[1,2,3].map(key=>react.createElement(IconPlaceholder,{key})):react.createElement(react.Fragment,null,react.createElement(components/* IconButton */.K0,{key:"zoomin",onClick:e=>{e.preventDefault(),zoom(.8);},title:"Zoom in"},react.createElement(dist/* ZoomIcon */.PU,null)),react.createElement(components/* IconButton */.K0,{key:"zoomout",onClick:e=>{e.preventDefault(),zoom(1.25);},title:"Zoom out"},react.createElement(dist/* ZoomOutIcon */.LoD,null)),react.createElement(components/* IconButton */.K0,{key:"zoomreset",onClick:e=>{e.preventDefault(),resetZoom();},title:"Reset zoom"},react.createElement(dist/* ZoomResetIcon */.wV5,null)))));var ChildrenContainer=theming/* styled */.I4.div(({isColumn,columns,layout})=>({display:isColumn||!columns?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:isColumn?"column":"row","& .innerZoomElementWrapper > *":isColumn?{width:layout!=="fullscreen"?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:layout!=="fullscreen"?"calc(100% - 20px)":"100%",display:"inline-block"}}),({layout="padded"})=>layout==="centered"||layout==="padded"?{padding:"30px 20px","& .innerZoomElementWrapper > *":{width:"auto",border:"10px solid transparent!important"}}:{},({layout="padded"})=>layout==="centered"?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{},({columns})=>columns&&columns>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${columns} - 20px)`}}:{}),StyledSource=(0,theming/* styled */.I4)(Source)(({theme})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:theme.appBorderRadius,borderBottomRightRadius:theme.appBorderRadius,border:"none",background:theme.base==="light"?"rgba(0, 0, 0, 0.85)":curriedDarken$1(.05,theme.background.content),color:theme.color.lightest,button:{background:theme.base==="light"?"rgba(0, 0, 0, 0.85)":curriedDarken$1(.05,theme.background.content)}})),PreviewContainer=theming/* styled */.I4.div(({theme,withSource,isExpanded})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...getBlockBackgroundStyle(theme),borderBottomLeftRadius:withSource&&isExpanded&&0,borderBottomRightRadius:withSource&&isExpanded&&0,borderBottomWidth:isExpanded&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar})=>withToolbar&&{paddingTop:40}),getSource=(withSource,expanded,setExpanded)=>{switch(!0){case!!(withSource&&withSource.error):return {source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>setExpanded(!1)}};case expanded:return {source:react.createElement(StyledSource,{...withSource,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>setExpanded(!1)}};default:return {source:react.createElement(StyledSource,{...withSource,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>setExpanded(!0)}}}};function getStoryId(children){if(react.Children.count(children)===1){let elt=children;if(elt.props)return elt.props.id}return null}var PositionedToolbar=(0,theming/* styled */.I4)(Toolbar)({position:"absolute",top:0,left:0,right:0,height:40}),Relative=theming/* styled */.I4.div({overflow:"hidden",position:"relative"}),Preview=({isLoading,isColumn,columns,children,withSource,withToolbar=!1,isExpanded=!1,additionalActions,className,layout="padded",...props})=>{let[expanded,setExpanded]=(0,react.useState)(isExpanded),{source,actionItem}=getSource(withSource,expanded,setExpanded),[scale,setScale]=(0,react.useState)(1),previewClasses=[className].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),defaultActionItems=withSource?[actionItem]:[],[additionalActionItems,setAdditionalActionItems]=(0,react.useState)(additionalActions?[...additionalActions]:[]),actionItems=[...defaultActionItems,...additionalActionItems],{window:globalWindow4}=external_STORYBOOK_MODULE_GLOBAL_.global,copyToClipboard=(0,react.useCallback)(async text=>{let{createCopyToClipboardFunction}=await __webpack_require__.e(/* import() */ 814).then(__webpack_require__.bind(__webpack_require__, "../../../node_modules/storybook/core/components/index.js"));createCopyToClipboardFunction();},[]),onCopyCapture=e=>{let selection=globalWindow4.getSelection();selection&&selection.type==="Range"||(e.preventDefault(),additionalActionItems.filter(item=>item.title==="Copied").length===0&©ToClipboard(source.props.code).then(()=>{setAdditionalActionItems([...additionalActionItems,{title:"Copied",onClick:()=>{}}]),globalWindow4.setTimeout(()=>setAdditionalActionItems(additionalActionItems.filter(item=>item.title!=="Copied")),1500);}));};return react.createElement(PreviewContainer,{withSource,withToolbar,...props,className:previewClasses.join(" ")},withToolbar&&react.createElement(PositionedToolbar,{isLoading,border:!0,zoom:z=>setScale(scale*z),resetZoom:()=>setScale(1),storyId:getStoryId(children),baseUrl:"./iframe.html"}),react.createElement(ZoomContext.Provider,{value:{scale}},react.createElement(Relative,{className:"docs-story",onCopyCapture:withSource&&onCopyCapture},react.createElement(ChildrenContainer,{isColumn:isColumn||!Array.isArray(children),columns,layout},react.createElement(components/* Zoom */.GP.Element,{scale},Array.isArray(children)?children.map((child,i)=>react.createElement("div",{key:i},child)):react.createElement("div",null,children))),react.createElement(components/* ActionBar */.E7,{actionItems}))),withSource&&expanded&&source)};(0,theming/* styled */.I4)(Preview)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var Label=theming/* styled */.I4.label(({theme})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:theme.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${theme.color.secondary} 0 0 0 1px inset !important`}},span:{textAlign:"center",fontSize:theme.typography.size.s1,fontWeight:theme.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:curriedTransparentize$1(.5,theme.color.defaultText),background:"transparent","&:hover":{boxShadow:`${curriedOpacify$1(.3,theme.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${curriedOpacify$1(.05,theme.appBorderColor)} 0 0 0 2px inset`,color:curriedOpacify$1(1,theme.appBorderColor)},"&:first-of-type":{paddingRight:8},"&:last-of-type":{paddingLeft:8}},"input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type":{background:theme.boolean.selectedBackground,boxShadow:theme.base==="light"?`${curriedOpacify$1(.1,theme.appBorderColor)} 0 0 2px`:`${theme.appBorderColor} 0 0 0 1px`,color:theme.color.defaultText,padding:"7px 15px"}})),parse=value2=>value2==="true",BooleanControl=({name,value:value2,onChange,onBlur,onFocus,argType})=>{let onSetFalse=(0,react.useCallback)(()=>onChange(!1),[onChange]),readonly=!!argType?.table?.readonly;if(value2===void 0)return react.createElement(components/* Button */.$n,{variant:"outline",size:"medium",id:(0,chunk_MKV36LKP/* getControlSetterButtonId */.Yq)(name),onClick:onSetFalse,disabled:readonly},"Set boolean");let controlId=(0,chunk_MKV36LKP/* getControlId */.ZA)(name),parsedValue=typeof value2=="string"?parse(value2):value2;return react.createElement(Label,{"aria-disabled":readonly,htmlFor:controlId,"aria-label":name},react.createElement("input",{id:controlId,type:"checkbox",onChange:e=>onChange(e.target.checked),checked:parsedValue,role:"switch",disabled:readonly,name,onBlur,onFocus}),react.createElement("span",{"aria-hidden":"true"},"False"),react.createElement("span",{"aria-hidden":"true"},"True"))};var parseDate=value2=>{let[year,month,day]=value2.split("-"),result=new Date;return result.setFullYear(parseInt(year,10),parseInt(month,10)-1,parseInt(day,10)),result},parseTime=value2=>{let[hours,minutes]=value2.split(":"),result=new Date;return result.setHours(parseInt(hours,10)),result.setMinutes(parseInt(minutes,10)),result},formatDate=value2=>{let date=new Date(value2),year=`000${date.getFullYear()}`.slice(-4),month=`0${date.getMonth()+1}`.slice(-2),day=`0${date.getDate()}`.slice(-2);return `${year}-${month}-${day}`},formatTime=value2=>{let date=new Date(value2),hours=`0${date.getHours()}`.slice(-2),minutes=`0${date.getMinutes()}`.slice(-2);return `${hours}:${minutes}`},FormInput=(0,theming/* styled */.I4)(components/* Form */.lV.Input)(({readOnly})=>({opacity:readOnly?.5:1})),FlexSpaced=theming/* styled */.I4.div(({theme})=>({flex:1,display:"flex",input:{marginLeft:10,flex:1,height:32,"&::-webkit-calendar-picker-indicator":{opacity:.5,height:12,filter:theme.base==="light"?void 0:"invert(1)"}},"input:first-of-type":{marginLeft:0,flexGrow:4},"input:last-of-type":{flexGrow:3}})),DateControl=({name,value:value2,onChange,onFocus,onBlur,argType})=>{let[valid,setValid]=(0,react.useState)(!0),dateRef=(0,react.useRef)(),timeRef=(0,react.useRef)(),readonly=!!argType?.table?.readonly;(0,react.useEffect)(()=>{valid!==!1&&(dateRef&&dateRef.current&&(dateRef.current.value=value2?formatDate(value2):""),timeRef&&timeRef.current&&(timeRef.current.value=value2?formatTime(value2):""));},[value2]);let onDateChange=e=>{if(!e.target.value)return onChange();let parsed=parseDate(e.target.value),result=new Date(value2);result.setFullYear(parsed.getFullYear(),parsed.getMonth(),parsed.getDate());let time=result.getTime();time&&onChange(time),setValid(!!time);},onTimeChange=e=>{if(!e.target.value)return onChange();let parsed=parseTime(e.target.value),result=new Date(value2);result.setHours(parsed.getHours()),result.setMinutes(parsed.getMinutes());let time=result.getTime();time&&onChange(time),setValid(!!time);},controlId=(0,chunk_MKV36LKP/* getControlId */.ZA)(name);return react.createElement(FlexSpaced,null,react.createElement(FormInput,{type:"date",max:"9999-12-31",ref:dateRef,id:`${controlId}-date`,name:`${controlId}-date`,readOnly:readonly,onChange:onDateChange,onFocus,onBlur}),react.createElement(FormInput,{type:"time",id:`${controlId}-time`,name:`${controlId}-time`,ref:timeRef,onChange:onTimeChange,readOnly:readonly,onFocus,onBlur}),valid?null:react.createElement("div",null,"invalid"))};var Wrapper3=theming/* styled */.I4.label({display:"flex"}),parse2=value2=>{let result=parseFloat(value2);return Number.isNaN(result)?void 0:result},dist_format=value2=>value2!=null?String(value2):"",FormInput2=(0,theming/* styled */.I4)(components/* Form */.lV.Input)(({readOnly})=>({opacity:readOnly?.5:1})),NumberControl=({name,value:value2,onChange,min,max,step,onBlur,onFocus,argType})=>{let[inputValue,setInputValue]=(0,react.useState)(typeof value2=="number"?value2:""),[forceVisible,setForceVisible]=(0,react.useState)(!1),[parseError,setParseError]=(0,react.useState)(null),readonly=!!argType?.table?.readonly,handleChange=(0,react.useCallback)(event=>{setInputValue(event.target.value);let result=parseFloat(event.target.value);Number.isNaN(result)?setParseError(new Error(`'${event.target.value}' is not a number`)):(onChange(result),setParseError(null));},[onChange,setParseError]),onForceVisible=(0,react.useCallback)(()=>{setInputValue("0"),onChange(0),setForceVisible(!0);},[setForceVisible]),htmlElRef=(0,react.useRef)(null);return (0,react.useEffect)(()=>{forceVisible&&htmlElRef.current&&htmlElRef.current.select();},[forceVisible]),(0,react.useEffect)(()=>{inputValue!==(typeof value2=="number"?value2:"")&&setInputValue(value2);},[value2]),value2===void 0?react.createElement(components/* Button */.$n,{variant:"outline",size:"medium",id:(0,chunk_MKV36LKP/* getControlSetterButtonId */.Yq)(name),onClick:onForceVisible,disabled:readonly},"Set number"):react.createElement(Wrapper3,null,react.createElement(FormInput2,{ref:htmlElRef,id:(0,chunk_MKV36LKP/* getControlId */.ZA)(name),type:"number",onChange:handleChange,size:"flex",placeholder:"Edit number...",value:inputValue,valid:parseError?"error":null,autoFocus:forceVisible,readOnly:readonly,name,min,max,step,onFocus,onBlur}))};var selectedKey=(value2,options)=>{let entry=options&&Object.entries(options).find(([_key,val])=>val===value2);return entry?entry[0]:void 0},selectedKeys=(value2,options)=>value2&&options?Object.entries(options).filter(entry=>value2.includes(entry[1])).map(entry=>entry[0]):[],selectedValues=(keys,options)=>keys&&options&&keys.map(key=>options[key]);var Wrapper4=theming/* styled */.I4.div(({isInline})=>isInline?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},props=>{if(props["aria-readonly"]==="true")return {input:{cursor:"not-allowed"}}}),Text=theming/* styled */.I4.span({"[aria-readonly=true] &":{opacity:.5}}),Label2=theming/* styled */.I4.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),CheckboxControl=({name,options,value:value2,onChange,isInline,argType})=>{if(!options)return external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Checkbox with no options: ${name}`),react.createElement(react.Fragment,null,"-");let initial=selectedKeys(value2,options),[selected,setSelected]=(0,react.useState)(initial),readonly=!!argType?.table?.readonly,handleChange=e=>{let option=e.target.value,updated=[...selected];updated.includes(option)?updated.splice(updated.indexOf(option),1):updated.push(option),onChange(selectedValues(updated,options)),setSelected(updated);};(0,react.useEffect)(()=>{setSelected(selectedKeys(value2,options));},[value2]);let controlId=(0,chunk_MKV36LKP/* getControlId */.ZA)(name);return react.createElement(Wrapper4,{"aria-readonly":readonly,isInline},Object.keys(options).map((key,index)=>{let id=`${controlId}-${index}`;return react.createElement(Label2,{key:id,htmlFor:id},react.createElement("input",{type:"checkbox",disabled:readonly,id,name:id,value:key,onChange:handleChange,checked:selected?.includes(key)}),react.createElement(Text,null,key))}))};var Wrapper5=theming/* styled */.I4.div(({isInline})=>isInline?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},props=>{if(props["aria-readonly"]==="true")return {input:{cursor:"not-allowed"}}}),Text2=theming/* styled */.I4.span({"[aria-readonly=true] &":{opacity:.5}}),Label3=theming/* styled */.I4.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),RadioControl=({name,options,value:value2,onChange,isInline,argType})=>{if(!options)return external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Radio with no options: ${name}`),react.createElement(react.Fragment,null,"-");let selection=selectedKey(value2,options),controlId=(0,chunk_MKV36LKP/* getControlId */.ZA)(name),readonly=!!argType?.table?.readonly;return react.createElement(Wrapper5,{"aria-readonly":readonly,isInline},Object.keys(options).map((key,index)=>{let id=`${controlId}-${index}`;return react.createElement(Label3,{key:id,htmlFor:id},react.createElement("input",{type:"radio",id,name:controlId,disabled:readonly,value:key,onChange:e=>onChange(options[e.currentTarget.value]),checked:key===selection}),react.createElement(Text2,null,key))}))};var styleResets={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},OptionsSelect=theming/* styled */.I4.select(styleResets,({theme})=>({boxSizing:"border-box",position:"relative",padding:"6px 10px",width:"100%",color:theme.input.color||"inherit",background:theme.input.background,borderRadius:theme.input.borderRadius,boxShadow:`${theme.input.border} 0 0 0 1px inset`,fontSize:theme.typography.size.s2-1,lineHeight:"20px","&:focus":{boxShadow:`${theme.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"::placeholder":{color:theme.textMutedColor},"&[multiple]":{overflow:"auto",padding:0,option:{display:"block",padding:"6px 10px",marginLeft:1,marginRight:1}}})),SelectWrapper=theming/* styled */.I4.span(({theme})=>({display:"inline-block",lineHeight:"normal",overflow:"hidden",position:"relative",verticalAlign:"top",width:"100%",svg:{position:"absolute",zIndex:1,pointerEvents:"none",height:"12px",marginTop:"-6px",right:"12px",top:"50%",fill:theme.textMutedColor,path:{fill:theme.textMutedColor}}})),NO_SELECTION="Choose option...",SingleSelect=({name,value:value2,options,onChange,argType})=>{let handleChange=e=>{onChange(options[e.currentTarget.value]);},selection=selectedKey(value2,options)||NO_SELECTION,controlId=(0,chunk_MKV36LKP/* getControlId */.ZA)(name),readonly=!!argType?.table?.readonly;return react.createElement(SelectWrapper,null,react.createElement(dist/* ChevronSmallDownIcon */.abt,null),react.createElement(OptionsSelect,{disabled:readonly,id:controlId,value:selection,onChange:handleChange},react.createElement("option",{key:"no-selection",disabled:!0},NO_SELECTION),Object.keys(options).map(key=>react.createElement("option",{key,value:key},key))))},MultiSelect=({name,value:value2,options,onChange,argType})=>{let handleChange=e=>{let selection2=Array.from(e.currentTarget.options).filter(option=>option.selected).map(option=>option.value);onChange(selectedValues(selection2,options));},selection=selectedKeys(value2,options),controlId=(0,chunk_MKV36LKP/* getControlId */.ZA)(name),readonly=!!argType?.table?.readonly;return react.createElement(SelectWrapper,null,react.createElement(OptionsSelect,{disabled:readonly,id:controlId,multiple:!0,value:selection,onChange:handleChange},Object.keys(options).map(key=>react.createElement("option",{key,value:key},key))))},SelectControl=props=>{let{name,options}=props;return options?props.isMulti?react.createElement(MultiSelect,{...props}):react.createElement(SingleSelect,{...props}):(external_STORYBOOK_MODULE_CLIENT_LOGGER_.logger.warn(`Select with no options: ${name}`),react.createElement(react.Fragment,null,"-"))};var normalizeOptions=(options,labels)=>Array.isArray(options)?options.reduce((acc,item)=>(acc[labels?.[item]||String(item)]=item,acc),{}):options,Controls={check:CheckboxControl,"inline-check":CheckboxControl,radio:RadioControl,"inline-radio":RadioControl,select:SelectControl,"multi-select":SelectControl},OptionsControl=props=>{let{type="select",labels,argType}=props,normalized={...props,argType,options:argType?normalizeOptions(argType.options,labels):{},isInline:type.includes("inline"),isMulti:type.includes("multi")},Control=Controls[type];if(Control)return react.createElement(Control,{...normalized});throw new Error(`Unknown options type: ${type}`)};var ERROR="Error",OBJECT="Object",ARRAY="Array",STRING="String",NUMBER="Number",BOOLEAN="Boolean",DATE="Date",NULL="Null",UNDEFINED="Undefined",FUNCTION="Function",SYMBOL="Symbol";var ADD_DELTA_TYPE="ADD_DELTA_TYPE",REMOVE_DELTA_TYPE="REMOVE_DELTA_TYPE",UPDATE_DELTA_TYPE="UPDATE_DELTA_TYPE";var VALUE="value",KEY="key";function getObjectType(obj){return obj!==null&&typeof obj=="object"&&!Array.isArray(obj)&&typeof obj[Symbol.iterator]=="function"?"Iterable":Object.prototype.toString.call(obj).slice(8,-1)}function isComponentWillChange(oldValue,newValue){let oldType=getObjectType(oldValue),newType=getObjectType(newValue);return (oldType==="Function"||newType==="Function")&&newType!==oldType}var JsonAddValue=class extends react.Component{constructor(props){super(props),this.state={inputRefKey:null,inputRefValue:null},this.refInputValue=this.refInputValue.bind(this),this.refInputKey=this.refInputKey.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onSubmit=this.onSubmit.bind(this);}componentDidMount(){let{inputRefKey,inputRefValue}=this.state,{onlyValue}=this.props;inputRefKey&&typeof inputRefKey.focus=="function"&&inputRefKey.focus(),onlyValue&&inputRefValue&&typeof inputRefValue.focus=="function"&&inputRefValue.focus(),document.addEventListener("keydown",this.onKeydown);}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown);}onKeydown(event){event.altKey||event.ctrlKey||event.metaKey||event.shiftKey||event.repeat||((event.code==="Enter"||event.key==="Enter")&&(event.preventDefault(),this.onSubmit()),(event.code==="Escape"||event.key==="Escape")&&(event.preventDefault(),this.props.handleCancel()));}onSubmit(){let{handleAdd,onlyValue,onSubmitValueParser,keyPath,deep}=this.props,{inputRefKey,inputRefValue}=this.state,result={};if(!onlyValue){if(!inputRefKey.value)return;result.key=inputRefKey.value;}result.newValue=onSubmitValueParser(!1,keyPath,deep,result.key,inputRefValue.value),handleAdd(result);}refInputKey(node){this.state.inputRefKey=node;}refInputValue(node){this.state.inputRefValue=node;}render(){let{handleCancel,onlyValue,addButtonElement,cancelButtonElement,inputElementGenerator,keyPath,deep}=this.props,addButtonElementLayout=(0,react.cloneElement)(addButtonElement,{onClick:this.onSubmit}),cancelButtonElementLayout=(0,react.cloneElement)(cancelButtonElement,{onClick:handleCancel}),inputElementValue=inputElementGenerator(VALUE,keyPath,deep),inputElementValueLayout=(0,react.cloneElement)(inputElementValue,{placeholder:"Value",ref:this.refInputValue}),inputElementKeyLayout=null;if(!onlyValue){let inputElementKey=inputElementGenerator(KEY,keyPath,deep);inputElementKeyLayout=(0,react.cloneElement)(inputElementKey,{placeholder:"Key",ref:this.refInputKey});}return react.createElement("span",{className:"rejt-add-value-node"},inputElementKeyLayout,inputElementValueLayout,cancelButtonElementLayout,addButtonElementLayout)}};JsonAddValue.defaultProps={onlyValue:!1,addButtonElement:react.createElement("button",null,"+"),cancelButtonElement:react.createElement("button",null,"c")};var JsonArray=class extends react.Component{constructor(props){super(props);let keyPath=[...props.keyPath,props.name];this.state={data:props.data,name:props.name,keyPath,deep:props.deep,nextDeep:props.deep+1,collapsed:props.isCollapsed(keyPath,props.deep,props.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveItem=this.handleRemoveItem.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this);}static getDerivedStateFromProps(props,state){return props.data!==state.data?{data:props.data}:null}onChildUpdate(childKey,childData){let{data,keyPath}=this.state;data[childKey]=childData,this.setState({data});let{onUpdate}=this.props,size=keyPath.length;onUpdate(keyPath[size-1],data);}handleAddMode(){this.setState({addFormVisible:!0});}handleCollapseMode(){this.setState(state=>({collapsed:!state.collapsed}));}handleRemoveItem(index){return ()=>{let{beforeRemoveAction,logger:logger4}=this.props,{data,keyPath,nextDeep:deep}=this.state,oldValue=data[index];beforeRemoveAction(index,keyPath,deep,oldValue).then(()=>{let deltaUpdateResult={keyPath,deep,key:index,oldValue,type:REMOVE_DELTA_TYPE};data.splice(index,1),this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate(deltaUpdateResult);}).catch(logger4.error);}}handleAddValueAdd({newValue}){let{data,keyPath,nextDeep:deep}=this.state,{beforeAddAction,logger:logger4}=this.props;beforeAddAction(data.length,keyPath,deep,newValue).then(()=>{let newData=[...data,newValue];this.setState({data:newData}),this.handleAddValueCancel();let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],newData),onDeltaUpdate({type:ADD_DELTA_TYPE,keyPath,deep,key:newData.length-1,newValue});}).catch(logger4.error);}handleAddValueCancel(){this.setState({addFormVisible:!1});}handleEditValue({key,value:value2}){return new Promise((resolve,reject)=>{let{beforeUpdateAction}=this.props,{data,keyPath,nextDeep:deep}=this.state,oldValue=data[key];beforeUpdateAction(key,keyPath,deep,oldValue,value2).then(()=>{data[key]=value2,this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate({type:UPDATE_DELTA_TYPE,keyPath,deep,key,newValue:value2,oldValue}),resolve(void 0);}).catch(reject);})}renderCollapsed(){let{name,data,keyPath,deep}=this.state,{handleRemove,readOnly,getStyle,dataType,minusMenuElement}=this.props,{minus,collapsed}=getStyle(name,data,keyPath,deep,dataType),isReadOnly=readOnly(name,data,keyPath,deep,dataType),removeItemButton=(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus});return react.createElement("span",{className:"rejt-collapsed"},react.createElement("span",{className:"rejt-collapsed-text",style:collapsed,onClick:this.handleCollapseMode},"[...] ",data.length," ",data.length===1?"item":"items"),!isReadOnly&&removeItemButton)}renderNotCollapsed(){let{name,data,keyPath,deep,addFormVisible,nextDeep}=this.state,{isCollapsed,handleRemove,onDeltaUpdate,readOnly,getStyle,dataType,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}=this.props,{minus,plus,delimiter,ul,addForm}=getStyle(name,data,keyPath,deep,dataType),isReadOnly=readOnly(name,data,keyPath,deep,dataType),addItemButton=(0,react.cloneElement)(plusMenuElement,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:plus}),removeItemButton=(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus});return react.createElement("span",{className:"rejt-not-collapsed"},react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"["),!addFormVisible&&addItemButton,react.createElement("ul",{className:"rejt-not-collapsed-list",style:ul},data.map((item,index)=>react.createElement(JsonNode,{key:index,name:index.toString(),data:item,keyPath,deep:nextDeep,isCollapsed,handleRemove:this.handleRemoveItem(index),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}))),!isReadOnly&&addFormVisible&&react.createElement("div",{className:"rejt-add-form",style:addForm},react.createElement(JsonAddValue,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement,cancelButtonElement,inputElementGenerator,keyPath,deep,onSubmitValueParser})),react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"]"),!isReadOnly&&removeItemButton)}render(){let{name,collapsed,data,keyPath,deep}=this.state,{dataType,getStyle}=this.props,value2=collapsed?this.renderCollapsed():this.renderNotCollapsed(),style=getStyle(name,data,keyPath,deep,dataType);return react.createElement("div",{className:"rejt-array-node"},react.createElement("span",{onClick:this.handleCollapseMode},react.createElement("span",{className:"rejt-name",style:style.name},name," :"," ")),value2)}};JsonArray.defaultProps={keyPath:[],deep:0,minusMenuElement:react.createElement("span",null," - "),plusMenuElement:react.createElement("span",null," + ")};var JsonFunctionValue=class extends react.Component{constructor(props){super(props);let keyPath=[...props.keyPath,props.name];this.state={value:props.value,name:props.name,keyPath,deep:props.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this);}static getDerivedStateFromProps(props,state){return props.value!==state.value?{value:props.value}:null}componentDidUpdate(){let{editEnabled,inputRef,name,value:value2,keyPath,deep}=this.state,{readOnly,dataType}=this.props,readOnlyResult=readOnly(name,value2,keyPath,deep,dataType);editEnabled&&!readOnlyResult&&typeof inputRef.focus=="function"&&inputRef.focus();}componentDidMount(){document.addEventListener("keydown",this.onKeydown);}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown);}onKeydown(event){event.altKey||event.ctrlKey||event.metaKey||event.shiftKey||event.repeat||((event.code==="Enter"||event.key==="Enter")&&(event.preventDefault(),this.handleEdit()),(event.code==="Escape"||event.key==="Escape")&&(event.preventDefault(),this.handleCancelEdit()));}handleEdit(){let{handleUpdateValue,originalValue,logger:logger4,onSubmitValueParser,keyPath}=this.props,{inputRef,name,deep}=this.state;if(!inputRef)return;let newValue=onSubmitValueParser(!0,keyPath,deep,name,inputRef.value);handleUpdateValue({value:newValue,key:name}).then(()=>{isComponentWillChange(originalValue,newValue)||this.handleCancelEdit();}).catch(logger4.error);}handleEditMode(){this.setState({editEnabled:!0});}refInput(node){this.state.inputRef=node;}handleCancelEdit(){this.setState({editEnabled:!1});}render(){let{name,value:value2,editEnabled,keyPath,deep}=this.state,{handleRemove,originalValue,readOnly,dataType,getStyle,editButtonElement,cancelButtonElement,textareaElementGenerator,minusMenuElement,keyPath:comeFromKeyPath}=this.props,style=getStyle(name,originalValue,keyPath,deep,dataType),result=null,minusElement=null,resultOnlyResult=readOnly(name,originalValue,keyPath,deep,dataType);if(editEnabled&&!resultOnlyResult){let textareaElement=textareaElementGenerator(VALUE,comeFromKeyPath,deep,name,originalValue,dataType),editButtonElementLayout=(0,react.cloneElement)(editButtonElement,{onClick:this.handleEdit}),cancelButtonElementLayout=(0,react.cloneElement)(cancelButtonElement,{onClick:this.handleCancelEdit}),textareaElementLayout=(0,react.cloneElement)(textareaElement,{ref:this.refInput,defaultValue:originalValue});result=react.createElement("span",{className:"rejt-edit-form",style:style.editForm},textareaElementLayout," ",cancelButtonElementLayout,editButtonElementLayout),minusElement=null;}else {result=react.createElement("span",{className:"rejt-value",style:style.value,onClick:resultOnlyResult?null:this.handleEditMode},value2);let minusMenuLayout=(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:style.minus});minusElement=resultOnlyResult?null:minusMenuLayout;}return react.createElement("li",{className:"rejt-function-value-node",style:style.li},react.createElement("span",{className:"rejt-name",style:style.name},name," :"," "),result,minusElement)}};JsonFunctionValue.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:react.createElement("button",null,"e"),cancelButtonElement:react.createElement("button",null,"c"),minusMenuElement:react.createElement("span",null," - ")};var JsonNode=class extends react.Component{constructor(props){super(props),this.state={data:props.data,name:props.name,keyPath:props.keyPath,deep:props.deep};}static getDerivedStateFromProps(props,state){return props.data!==state.data?{data:props.data}:null}render(){let{data,name,keyPath,deep}=this.state,{isCollapsed,handleRemove,handleUpdateValue,onUpdate,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}=this.props,readOnlyTrue=()=>!0,dataType=getObjectType(data);switch(dataType){case ERROR:return react.createElement(JsonObject,{data,name,isCollapsed,keyPath,deep,handleRemove,onUpdate,onDeltaUpdate,readOnly:readOnlyTrue,dataType,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser});case OBJECT:return react.createElement(JsonObject,{data,name,isCollapsed,keyPath,deep,handleRemove,onUpdate,onDeltaUpdate,readOnly,dataType,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser});case ARRAY:return react.createElement(JsonArray,{data,name,isCollapsed,keyPath,deep,handleRemove,onUpdate,onDeltaUpdate,readOnly,dataType,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser});case STRING:return react.createElement(JsonValue,{name,value:`"${data}"`,originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,editButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case NUMBER:return react.createElement(JsonValue,{name,value:data,originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,editButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case BOOLEAN:return react.createElement(JsonValue,{name,value:data?"true":"false",originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,editButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case DATE:return react.createElement(JsonValue,{name,value:data.toISOString(),originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly:readOnlyTrue,dataType,getStyle,cancelButtonElement,editButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case NULL:return react.createElement(JsonValue,{name,value:"null",originalValue:"null",keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,editButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case UNDEFINED:return react.createElement(JsonValue,{name,value:"undefined",originalValue:"undefined",keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,editButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case FUNCTION:return react.createElement(JsonFunctionValue,{name,value:data.toString(),originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly,dataType,getStyle,cancelButtonElement,editButtonElement,textareaElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});case SYMBOL:return react.createElement(JsonValue,{name,value:data.toString(),originalValue:data,keyPath,deep,handleRemove,handleUpdateValue,readOnly:readOnlyTrue,dataType,getStyle,cancelButtonElement,editButtonElement,inputElementGenerator,minusMenuElement,logger:logger4,onSubmitValueParser});default:return null}}};JsonNode.defaultProps={keyPath:[],deep:0};var JsonObject=class extends react.Component{constructor(props){super(props);let keyPath=props.deep===-1?[]:[...props.keyPath,props.name];this.state={name:props.name,data:props.data,keyPath,deep:props.deep,nextDeep:props.deep+1,collapsed:props.isCollapsed(keyPath,props.deep,props.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveValue=this.handleRemoveValue.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this);}static getDerivedStateFromProps(props,state){return props.data!==state.data?{data:props.data}:null}onChildUpdate(childKey,childData){let{data,keyPath}=this.state;data[childKey]=childData,this.setState({data});let{onUpdate}=this.props,size=keyPath.length;onUpdate(keyPath[size-1],data);}handleAddMode(){this.setState({addFormVisible:!0});}handleAddValueCancel(){this.setState({addFormVisible:!1});}handleAddValueAdd({key,newValue}){let{data,keyPath,nextDeep:deep}=this.state,{beforeAddAction,logger:logger4}=this.props;beforeAddAction(key,keyPath,deep,newValue).then(()=>{data[key]=newValue,this.setState({data}),this.handleAddValueCancel();let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate({type:ADD_DELTA_TYPE,keyPath,deep,key,newValue});}).catch(logger4.error);}handleRemoveValue(key){return ()=>{let{beforeRemoveAction,logger:logger4}=this.props,{data,keyPath,nextDeep:deep}=this.state,oldValue=data[key];beforeRemoveAction(key,keyPath,deep,oldValue).then(()=>{let deltaUpdateResult={keyPath,deep,key,oldValue,type:REMOVE_DELTA_TYPE};delete data[key],this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate(deltaUpdateResult);}).catch(logger4.error);}}handleCollapseMode(){this.setState(state=>({collapsed:!state.collapsed}));}handleEditValue({key,value:value2}){return new Promise((resolve,reject)=>{let{beforeUpdateAction}=this.props,{data,keyPath,nextDeep:deep}=this.state,oldValue=data[key];beforeUpdateAction(key,keyPath,deep,oldValue,value2).then(()=>{data[key]=value2,this.setState({data});let{onUpdate,onDeltaUpdate}=this.props;onUpdate(keyPath[keyPath.length-1],data),onDeltaUpdate({type:UPDATE_DELTA_TYPE,keyPath,deep,key,newValue:value2,oldValue}),resolve();}).catch(reject);})}renderCollapsed(){let{name,keyPath,deep,data}=this.state,{handleRemove,readOnly,dataType,getStyle,minusMenuElement}=this.props,{minus,collapsed}=getStyle(name,data,keyPath,deep,dataType),keyList=Object.getOwnPropertyNames(data),isReadOnly=readOnly(name,data,keyPath,deep,dataType),removeItemButton=(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus});return react.createElement("span",{className:"rejt-collapsed"},react.createElement("span",{className:"rejt-collapsed-text",style:collapsed,onClick:this.handleCollapseMode},"{...}"," ",keyList.length," ",keyList.length===1?"key":"keys"),!isReadOnly&&removeItemButton)}renderNotCollapsed(){let{name,data,keyPath,deep,nextDeep,addFormVisible}=this.state,{isCollapsed,handleRemove,onDeltaUpdate,readOnly,getStyle,dataType,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}=this.props,{minus,plus,addForm,ul,delimiter}=getStyle(name,data,keyPath,deep,dataType),keyList=Object.getOwnPropertyNames(data),isReadOnly=readOnly(name,data,keyPath,deep,dataType),addItemButton=(0,react.cloneElement)(plusMenuElement,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:plus}),removeItemButton=(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:minus}),list=keyList.map(key=>react.createElement(JsonNode,{key,name:key,data:data[key],keyPath,deep:nextDeep,isCollapsed,handleRemove:this.handleRemoveValue(key),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator,textareaElementGenerator,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser}));return react.createElement("span",{className:"rejt-not-collapsed"},react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"{"),!isReadOnly&&addItemButton,react.createElement("ul",{className:"rejt-not-collapsed-list",style:ul},list),!isReadOnly&&addFormVisible&&react.createElement("div",{className:"rejt-add-form",style:addForm},react.createElement(JsonAddValue,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement,cancelButtonElement,inputElementGenerator,keyPath,deep,onSubmitValueParser})),react.createElement("span",{className:"rejt-not-collapsed-delimiter",style:delimiter},"}"),!isReadOnly&&removeItemButton)}render(){let{name,collapsed,data,keyPath,deep}=this.state,{getStyle,dataType}=this.props,value2=collapsed?this.renderCollapsed():this.renderNotCollapsed(),style=getStyle(name,data,keyPath,deep,dataType);return react.createElement("div",{className:"rejt-object-node"},react.createElement("span",{onClick:this.handleCollapseMode},react.createElement("span",{className:"rejt-name",style:style.name},name," :"," ")),value2)}};JsonObject.defaultProps={keyPath:[],deep:0,minusMenuElement:react.createElement("span",null," - "),plusMenuElement:react.createElement("span",null," + ")};var JsonValue=class extends react.Component{constructor(props){super(props);let keyPath=[...props.keyPath,props.name];this.state={value:props.value,name:props.name,keyPath,deep:props.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this);}static getDerivedStateFromProps(props,state){return props.value!==state.value?{value:props.value}:null}componentDidUpdate(){let{editEnabled,inputRef,name,value:value2,keyPath,deep}=this.state,{readOnly,dataType}=this.props,isReadOnly=readOnly(name,value2,keyPath,deep,dataType);editEnabled&&!isReadOnly&&typeof inputRef.focus=="function"&&inputRef.focus();}componentDidMount(){document.addEventListener("keydown",this.onKeydown);}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown);}onKeydown(event){event.altKey||event.ctrlKey||event.metaKey||event.shiftKey||event.repeat||((event.code==="Enter"||event.key==="Enter")&&(event.preventDefault(),this.handleEdit()),(event.code==="Escape"||event.key==="Escape")&&(event.preventDefault(),this.handleCancelEdit()));}handleEdit(){let{handleUpdateValue,originalValue,logger:logger4,onSubmitValueParser,keyPath}=this.props,{inputRef,name,deep}=this.state;if(!inputRef)return;let newValue=onSubmitValueParser(!0,keyPath,deep,name,inputRef.value);handleUpdateValue({value:newValue,key:name}).then(()=>{isComponentWillChange(originalValue,newValue)||this.handleCancelEdit();}).catch(logger4.error);}handleEditMode(){this.setState({editEnabled:!0});}refInput(node){this.state.inputRef=node;}handleCancelEdit(){this.setState({editEnabled:!1});}render(){let{name,value:value2,editEnabled,keyPath,deep}=this.state,{handleRemove,originalValue,readOnly,dataType,getStyle,editButtonElement,cancelButtonElement,inputElementGenerator,minusMenuElement,keyPath:comeFromKeyPath}=this.props,style=getStyle(name,originalValue,keyPath,deep,dataType),isReadOnly=readOnly(name,originalValue,keyPath,deep,dataType),isEditing=editEnabled&&!isReadOnly,inputElement=inputElementGenerator(VALUE,comeFromKeyPath,deep,name,originalValue,dataType),editButtonElementLayout=(0,react.cloneElement)(editButtonElement,{onClick:this.handleEdit}),cancelButtonElementLayout=(0,react.cloneElement)(cancelButtonElement,{onClick:this.handleCancelEdit}),inputElementLayout=(0,react.cloneElement)(inputElement,{ref:this.refInput,defaultValue:JSON.stringify(originalValue)}),minusMenuLayout=(0,react.cloneElement)(minusMenuElement,{onClick:handleRemove,className:"rejt-minus-menu",style:style.minus});return react.createElement("li",{className:"rejt-value-node",style:style.li},react.createElement("span",{className:"rejt-name",style:style.name},name," : "),isEditing?react.createElement("span",{className:"rejt-edit-form",style:style.editForm},inputElementLayout," ",cancelButtonElementLayout,editButtonElementLayout):react.createElement("span",{className:"rejt-value",style:style.value,onClick:isReadOnly?null:this.handleEditMode},String(value2)),!isReadOnly&&!isEditing&&minusMenuLayout)}};JsonValue.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:react.createElement("button",null,"e"),cancelButtonElement:react.createElement("button",null,"c"),minusMenuElement:react.createElement("span",null," - ")};function parse3(string){let result=string;if(result.indexOf("function")===0)return (0, eval)(`(${result})`);try{result=JSON.parse(string);}catch{}return result}var object={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},array={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},value={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}};var JsonTree=class extends react.Component{constructor(props){super(props),this.state={data:props.data,rootName:props.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this);}static getDerivedStateFromProps(props,state){return props.data!==state.data||props.rootName!==state.rootName?{data:props.data,rootName:props.rootName}:null}onUpdate(key,data){this.setState({data}),this.props.onFullyUpdate(data);}removeRoot(){this.onUpdate(null,null);}render(){let{data,rootName}=this.state,{isCollapsed,onDeltaUpdate,readOnly,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElement,textareaElement,minusMenuElement,plusMenuElement,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser,fallback=null}=this.props,dataType=getObjectType(data),readOnlyFunction=readOnly;getObjectType(readOnly)==="Boolean"&&(readOnlyFunction=()=>readOnly);let inputElementFunction=inputElement;inputElement&&getObjectType(inputElement)!=="Function"&&(inputElementFunction=()=>inputElement);let textareaElementFunction=textareaElement;return textareaElement&&getObjectType(textareaElement)!=="Function"&&(textareaElementFunction=()=>textareaElement),dataType==="Object"||dataType==="Array"?react.createElement("div",{className:"rejt-tree"},react.createElement(JsonNode,{data,name:rootName,deep:-1,isCollapsed,onUpdate:this.onUpdate,onDeltaUpdate,readOnly:readOnlyFunction,getStyle,addButtonElement,cancelButtonElement,editButtonElement,inputElementGenerator:inputElementFunction,textareaElementGenerator:textareaElementFunction,minusMenuElement,plusMenuElement,handleRemove:this.removeRoot,beforeRemoveAction,beforeAddAction,beforeUpdateAction,logger:logger4,onSubmitValueParser})):fallback}};JsonTree.defaultProps={rootName:"root",isCollapsed:(keyPath,deep)=>deep!==-1,getStyle:(keyName,data,keyPath,deep,dataType)=>{switch(dataType){case"Object":case"Error":return object;case"Array":return array;default:return value}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(isEditMode,keyPath,deep,name,rawValue)=>parse3(rawValue),inputElement:()=>react.createElement("input",null),textareaElement:()=>react.createElement("textarea",null),fallback:null};var {window:globalWindow2}=external_STORYBOOK_MODULE_GLOBAL_.global,Wrapper6=theming/* styled */.I4.div(({theme})=>({position:"relative",display:"flex",'&[aria-readonly="true"]':{opacity:.5},".rejt-tree":{marginLeft:"1rem",fontSize:"13px"},".rejt-value-node, .rejt-object-node > .rejt-collapsed, .rejt-array-node > .rejt-collapsed, .rejt-object-node > .rejt-not-collapsed, .rejt-array-node > .rejt-not-collapsed":{"& > svg":{opacity:0,transition:"opacity 0.2s"}},".rejt-value-node:hover, .rejt-object-node:hover > .rejt-collapsed, .rejt-array-node:hover > .rejt-collapsed, .rejt-object-node:hover > .rejt-not-collapsed, .rejt-array-node:hover > .rejt-not-collapsed":{"& > svg":{opacity:1}},".rejt-edit-form button":{display:"none"},".rejt-add-form":{marginLeft:10},".rejt-add-value-node":{display:"inline-flex",alignItems:"center"},".rejt-name":{lineHeight:"22px"},".rejt-not-collapsed-delimiter":{lineHeight:"22px"},".rejt-plus-menu":{marginLeft:5},".rejt-object-node > span > *, .rejt-array-node > span > *":{position:"relative",zIndex:2},".rejt-object-node, .rejt-array-node":{position:"relative"},".rejt-object-node > span:first-of-type::after, .rejt-array-node > span:first-of-type::after, .rejt-collapsed::before, .rejt-not-collapsed::before":{content:'""',position:"absolute",top:0,display:"block",width:"100%",marginLeft:"-1rem",padding:"0 4px 0 1rem",height:22},".rejt-collapsed::before, .rejt-not-collapsed::before":{zIndex:1,background:"transparent",borderRadius:4,transition:"background 0.2s",pointerEvents:"none",opacity:.1},".rejt-object-node:hover, .rejt-array-node:hover":{"& > .rejt-collapsed::before, & > .rejt-not-collapsed::before":{background:theme.color.secondary}},".rejt-collapsed::after, .rejt-not-collapsed::after":{content:'""',position:"absolute",display:"inline-block",pointerEvents:"none",width:0,height:0},".rejt-collapsed::after":{left:-8,top:8,borderTop:"3px solid transparent",borderBottom:"3px solid transparent",borderLeft:"3px solid rgba(153,153,153,0.6)"},".rejt-not-collapsed::after":{left:-10,top:10,borderTop:"3px solid rgba(153,153,153,0.6)",borderLeft:"3px solid transparent",borderRight:"3px solid transparent"},".rejt-value":{display:"inline-block",border:"1px solid transparent",borderRadius:4,margin:"1px 0",padding:"0 4px",cursor:"text",color:theme.color.defaultText},".rejt-value-node:hover > .rejt-value":{background:theme.color.lighter,borderColor:theme.appBorderColor}})),ButtonInline=theming/* styled */.I4.button(({theme,primary})=>({border:0,height:20,margin:1,borderRadius:4,background:primary?theme.color.secondary:"transparent",color:primary?theme.color.lightest:theme.color.dark,fontWeight:primary?"bold":"normal",cursor:"pointer",order:primary?"initial":9})),ActionAddIcon=(0,theming/* styled */.I4)(dist/* AddIcon */.REV)(({theme,disabled})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:disabled?"not-allowed":"pointer",color:theme.textMutedColor,"&:hover":disabled?{}:{color:theme.color.ancillary},"svg + &":{marginLeft:0}})),ActionSubstractIcon=(0,theming/* styled */.I4)(dist/* SubtractIcon */.Qpb)(({theme,disabled})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:disabled?"not-allowed":"pointer",color:theme.textMutedColor,"&:hover":disabled?{}:{color:theme.color.negative},"svg + &":{marginLeft:0}})),Input=theming/* styled */.I4.input(({theme,placeholder})=>({outline:0,margin:placeholder?1:"1px 0",padding:"3px 4px",color:theme.color.defaultText,background:theme.background.app,border:`1px solid ${theme.appBorderColor}`,borderRadius:4,lineHeight:"14px",width:placeholder==="Key"?80:120,"&:focus":{border:`1px solid ${theme.color.secondary}`}})),RawButton=(0,theming/* styled */.I4)(components/* IconButton */.K0)(({theme})=>({position:"absolute",zIndex:2,top:2,right:2,height:21,padding:"0 3px",background:theme.background.bar,border:`1px solid ${theme.appBorderColor}`,borderRadius:3,color:theme.textMutedColor,fontSize:"9px",fontWeight:"bold",textDecoration:"none",span:{marginLeft:3,marginTop:1}})),RawInput=(0,theming/* styled */.I4)(components/* Form */.lV.Textarea)(({theme})=>({flex:1,padding:"7px 6px",fontFamily:theme.typography.fonts.mono,fontSize:"12px",lineHeight:"18px","&::placeholder":{fontFamily:theme.typography.fonts.base,fontSize:"13px"},"&:placeholder-shown":{padding:"7px 10px"}})),ENTER_EVENT={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},dispatchEnterKey=event=>{event.currentTarget.dispatchEvent(new globalWindow2.KeyboardEvent("keydown",ENTER_EVENT));},selectValue=event=>{event.currentTarget.select();},getCustomStyleFunction=theme=>()=>({name:{color:theme.color.secondary},collapsed:{color:theme.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),ObjectControl=({name,value:value2,onChange,argType})=>{let theme=(0,theming/* useTheme */.DP)(),data=(0,react.useMemo)(()=>value2&&cloneDeep_default()(value2),[value2]),hasData=data!=null,[showRaw,setShowRaw]=(0,react.useState)(!hasData),[parseError,setParseError]=(0,react.useState)(null),readonly=!!argType?.table?.readonly,updateRaw=(0,react.useCallback)(raw=>{try{raw&&onChange(JSON.parse(raw)),setParseError(void 0);}catch(e){setParseError(e);}},[onChange]),[forceVisible,setForceVisible]=(0,react.useState)(!1),onForceVisible=(0,react.useCallback)(()=>{onChange({}),setForceVisible(!0);},[setForceVisible]),htmlElRef=(0,react.useRef)(null);if((0,react.useEffect)(()=>{forceVisible&&htmlElRef.current&&htmlElRef.current.select();},[forceVisible]),!hasData)return react.createElement(components/* Button */.$n,{disabled:readonly,id:(0,chunk_MKV36LKP/* getControlSetterButtonId */.Yq)(name),onClick:onForceVisible},"Set object");let rawJSONForm=react.createElement(RawInput,{ref:htmlElRef,id:(0,chunk_MKV36LKP/* getControlId */.ZA)(name),name,defaultValue:value2===null?"":JSON.stringify(value2,null,2),onBlur:event=>updateRaw(event.target.value),placeholder:"Edit JSON string...",autoFocus:forceVisible,valid:parseError?"error":null,readOnly:readonly}),isObjectOrArray=Array.isArray(value2)||typeof value2=="object"&&value2?.constructor===Object;return react.createElement(Wrapper6,{"aria-readonly":readonly},isObjectOrArray&&react.createElement(RawButton,{onClick:e=>{e.preventDefault(),setShowRaw(v=>!v);}},showRaw?react.createElement(dist/* EyeCloseIcon */.dbI,null):react.createElement(dist/* EyeIcon */.bMW,null),react.createElement("span",null,"RAW")),showRaw?rawJSONForm:react.createElement(JsonTree,{readOnly:readonly||!isObjectOrArray,isCollapsed:isObjectOrArray?void 0:()=>!0,data,rootName:name,onFullyUpdate:onChange,getStyle:getCustomStyleFunction(theme),cancelButtonElement:react.createElement(ButtonInline,{type:"button"},"Cancel"),editButtonElement:react.createElement(ButtonInline,{type:"submit"},"Save"),addButtonElement:react.createElement(ButtonInline,{type:"submit",primary:!0},"Save"),plusMenuElement:react.createElement(ActionAddIcon,null),minusMenuElement:react.createElement(ActionSubstractIcon,null),inputElement:(_,__,___,key)=>key?react.createElement(Input,{onFocus:selectValue,onBlur:dispatchEnterKey}):react.createElement(Input,null),fallback:rawJSONForm}))};var RangeInput=theming/* styled */.I4.input(({theme,min,max,value:value2,disabled})=>({"&":{width:"100%",backgroundColor:"transparent",appearance:"none"},"&::-webkit-slider-runnable-track":{background:theme.base==="light"?`linear-gradient(to right,
+ ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%,
+ ${curriedDarken$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%,
+ ${curriedDarken$1(.02,theme.input.background)} 100%)`:`linear-gradient(to right,
+ ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%,
+ ${curriedLighten$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%,
+ ${curriedLighten$1(.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,borderRadius:6,width:"100%",height:6,cursor:disabled?"not-allowed":"pointer"},"&::-webkit-slider-thumb":{marginTop:"-6px",width:16,height:16,border:`1px solid ${rgba(theme.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${rgba(theme.appBorderColor,.2)}`,cursor:disabled?"not-allowed":"grab",appearance:"none",background:`${theme.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${curriedDarken$1(.05,theme.input.background)}`,transform:"scale3d(1.1, 1.1, 1.1) translateY(-1px)",transition:"all 50ms ease-out"},"&:active":{background:`${theme.input.background}`,transform:"scale3d(1, 1, 1) translateY(0px)",cursor:disabled?"not-allowed":"grab"}},"&:focus":{outline:"none","&::-webkit-slider-runnable-track":{borderColor:rgba(theme.color.secondary,.4)},"&::-webkit-slider-thumb":{borderColor:theme.color.secondary,boxShadow:`0 0px 5px 0px ${theme.color.secondary}`}},"&::-moz-range-track":{background:theme.base==="light"?`linear-gradient(to right,
+ ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%,
+ ${curriedDarken$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%,
+ ${curriedDarken$1(.02,theme.input.background)} 100%)`:`linear-gradient(to right,
+ ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%,
+ ${curriedLighten$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%,
+ ${curriedLighten$1(.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,borderRadius:6,width:"100%",height:6,cursor:disabled?"not-allowed":"pointer",outline:"none"},"&::-moz-range-thumb":{width:16,height:16,border:`1px solid ${rgba(theme.appBorderColor,.2)}`,borderRadius:"50px",boxShadow:`0 1px 3px 0px ${rgba(theme.appBorderColor,.2)}`,cursor:disabled?"not-allowed":"grap",background:`${theme.input.background}`,transition:"all 150ms ease-out","&:hover":{background:`${curriedDarken$1(.05,theme.input.background)}`,transform:"scale3d(1.1, 1.1, 1.1) translateY(-1px)",transition:"all 50ms ease-out"},"&:active":{background:`${theme.input.background}`,transform:"scale3d(1, 1, 1) translateY(0px)",cursor:"grabbing"}},"&::-ms-track":{background:theme.base==="light"?`linear-gradient(to right,
+ ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%,
+ ${curriedDarken$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%,
+ ${curriedDarken$1(.02,theme.input.background)} 100%)`:`linear-gradient(to right,
+ ${theme.color.green} 0%, ${theme.color.green} ${(value2-min)/(max-min)*100}%,
+ ${curriedLighten$1(.02,theme.input.background)} ${(value2-min)/(max-min)*100}%,
+ ${curriedLighten$1(.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${theme.input.background}`,border:`1px solid ${rgba(theme.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),RangeLabel=theming/* styled */.I4.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),RangeCurrentAndMaxLabel=(0,theming/* styled */.I4)(RangeLabel)(({numberOFDecimalsPlaces,max})=>({width:`${numberOFDecimalsPlaces+max.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),RangeWrapper=theming/* styled */.I4.div({display:"flex",alignItems:"center",width:"100%"});function getNumberOfDecimalPlaces(number){let match=number.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return match?Math.max(0,(match[1]?match[1].length:0)-(match[2]?+match[2]:0)):0}var RangeControl=({name,value:value2,onChange,min=0,max=100,step=1,onBlur,onFocus,argType})=>{let handleChange=event=>{onChange(parse2(event.target.value));},hasValue=value2!==void 0,numberOFDecimalsPlaces=(0,react.useMemo)(()=>getNumberOfDecimalPlaces(step),[step]),readonly=!!argType?.table?.readonly;return react.createElement(RangeWrapper,{"aria-readonly":readonly},react.createElement(RangeLabel,null,min),react.createElement(RangeInput,{id:(0,chunk_MKV36LKP/* getControlId */.ZA)(name),type:"range",disabled:readonly,onChange:handleChange,name,value:value2,min,max,step,onFocus,onBlur}),react.createElement(RangeCurrentAndMaxLabel,{numberOFDecimalsPlaces,max},hasValue?value2.toFixed(numberOFDecimalsPlaces):"--"," / ",max))};var Wrapper7=theming/* styled */.I4.label({display:"flex"}),MaxLength=theming/* styled */.I4.div(({isMaxed})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:isMaxed?"red":void 0})),TextControl=({name,value:value2,onChange,onFocus,onBlur,maxLength,argType})=>{let handleChange=event=>{onChange(event.target.value);},readonly=!!argType?.table?.readonly,[forceVisible,setForceVisible]=(0,react.useState)(!1),onForceVisible=(0,react.useCallback)(()=>{onChange(""),setForceVisible(!0);},[setForceVisible]);if(value2===void 0)return react.createElement(components/* Button */.$n,{variant:"outline",size:"medium",disabled:readonly,id:(0,chunk_MKV36LKP/* getControlSetterButtonId */.Yq)(name),onClick:onForceVisible},"Set string");let isValid=typeof value2=="string";return react.createElement(Wrapper7,null,react.createElement(components/* Form */.lV.Textarea,{id:(0,chunk_MKV36LKP/* getControlId */.ZA)(name),maxLength,onChange:handleChange,disabled:readonly,size:"flex",placeholder:"Edit string...",autoFocus:forceVisible,valid:isValid?null:"error",name,value:isValid?value2:"",onFocus,onBlur}),maxLength&&react.createElement(MaxLength,{isMaxed:value2?.length===maxLength},value2?.length??0," / ",maxLength))};var FileInput=(0,theming/* styled */.I4)(components/* Form */.lV.Input)({padding:10});function revokeOldUrls(urls){urls.forEach(url=>{url.startsWith("blob:")&&URL.revokeObjectURL(url);});}var FilesControl=({onChange,name,accept="image/*",value:value2,argType})=>{let inputElement=(0,react.useRef)(null),readonly=argType?.control?.readOnly;function handleFileChange(e){if(!e.target.files)return;let fileUrls=Array.from(e.target.files).map(file=>URL.createObjectURL(file));onChange(fileUrls),revokeOldUrls(value2);}return (0,react.useEffect)(()=>{value2==null&&inputElement.current&&(inputElement.current.value=null);},[value2,name]),react.createElement(FileInput,{ref:inputElement,id:(0,chunk_MKV36LKP/* getControlId */.ZA)(name),type:"file",name,multiple:!0,disabled:readonly,onChange:handleFileChange,accept,size:"flex"})};var LazyColorControl=(0,react.lazy)(()=>__webpack_require__.e(/* import() */ 6216).then(__webpack_require__.bind(__webpack_require__, "../../../node_modules/@storybook/blocks/dist/Color-ERTF36HU.mjs"))),ColorControl=props=>react.createElement(react.Suspense,{fallback:react.createElement("div",null)},react.createElement(LazyColorControl,{...props}));var Controls2={array:ObjectControl,object:ObjectControl,boolean:BooleanControl,color:ColorControl,date:DateControl,number:NumberControl,check:OptionsControl,"inline-check":OptionsControl,radio:OptionsControl,"inline-radio":OptionsControl,select:OptionsControl,"multi-select":OptionsControl,range:RangeControl,text:TextControl,file:FilesControl},NoControl=()=>react.createElement(react.Fragment,null,"-"),ArgControl=({row,arg,updateArgs,isHovered})=>{let{key,control}=row,[isFocused,setFocused]=(0,react.useState)(!1),[boxedValue,setBoxedValue]=(0,react.useState)({value:arg});(0,react.useEffect)(()=>{isFocused||setBoxedValue({value:arg});},[isFocused,arg]);let onChange=(0,react.useCallback)(argVal=>(setBoxedValue({value:argVal}),updateArgs({[key]:argVal}),argVal),[updateArgs,key]),onBlur=(0,react.useCallback)(()=>setFocused(!1),[]),onFocus=(0,react.useCallback)(()=>setFocused(!0),[]);if(!control||control.disable){let canBeSetup=control?.disable!==!0&&row?.type?.name!=="function";return isHovered&&canBeSetup?react.createElement(components/* Link */.N_,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):react.createElement(NoControl,null)}let props={name:key,argType:row,value:boxedValue.value,onChange,onBlur,onFocus},Control=Controls2[control.type]||NoControl;return react.createElement(Control,{...props,...control,controlType:control.type})};var Table=theming/* styled */.I4.table(({theme})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:(0,components/* codeCommon */.zb)({theme}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:theme.typography.size.s1}}})),ArgJsDoc=({tags})=>{let params=(tags.params||[]).filter(x=>x.description),hasDisplayableParams=params.length!==0,hasDisplayableDeprecated=tags.deprecated!=null,hasDisplayableReturns=tags.returns!=null&&tags.returns.description!=null;return !hasDisplayableParams&&!hasDisplayableReturns&&!hasDisplayableDeprecated?null:react.createElement(react.Fragment,null,react.createElement(Table,null,react.createElement("tbody",null,hasDisplayableDeprecated&&react.createElement("tr",{key:"deprecated"},react.createElement("td",{colSpan:2},react.createElement("strong",null,"Deprecated"),": ",tags.deprecated.toString())),hasDisplayableParams&¶ms.map(x=>react.createElement("tr",{key:x.name},react.createElement("td",null,react.createElement("code",null,x.name)),react.createElement("td",null,x.description))),hasDisplayableReturns&&react.createElement("tr",{key:"returns"},react.createElement("td",null,react.createElement("code",null,"Returns")),react.createElement("td",null,tags.returns.description)))))};var ITEMS_BEFORE_EXPANSION=8,Summary=theming/* styled */.I4.div(({isExpanded})=>({display:"flex",flexDirection:isExpanded?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),Text3=theming/* styled */.I4.span(components/* codeCommon */.zb,({theme,simple=!1})=>({flex:"0 0 auto",fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...simple&&{background:"transparent",border:"0 none",paddingLeft:0}})),ExpandButton=theming/* styled */.I4.button(({theme})=>({fontFamily:theme.typography.fonts.mono,color:theme.color.secondary,marginBottom:"4px",background:"none",border:"none"})),Expandable=theming/* styled */.I4.div(components/* codeCommon */.zb,({theme})=>({fontFamily:theme.typography.fonts.mono,color:theme.color.secondary,fontSize:theme.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),Detail=theming/* styled */.I4.div(({theme,width})=>({width,minWidth:200,maxWidth:800,padding:15,fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}})),ChevronUpIcon=(0,theming/* styled */.I4)(dist/* ChevronSmallUpIcon */.tN5)({marginLeft:4}),ChevronDownIcon=(0,theming/* styled */.I4)(dist/* ChevronSmallDownIcon */.abt)({marginLeft:4}),EmptyArg=()=>react.createElement("span",null,"-"),ArgText=({text,simple})=>react.createElement(Text3,{simple},text),calculateDetailWidth=memoizerific_default()(1e3)(detail=>{let lines=detail.split(/\r?\n/);return `${Math.max(...lines.map(x=>x.length))}ch`}),getSummaryItems=summary=>{if(!summary)return [summary];let summaryItems=summary.split("|").map(value2=>value2.trim());return uniq_default()(summaryItems)},renderSummaryItems=(summaryItems,isExpanded=!0)=>{let items=summaryItems;return isExpanded||(items=summaryItems.slice(0,ITEMS_BEFORE_EXPANSION)),items.map(item=>react.createElement(ArgText,{key:item,text:item===""?'""':item}))},ArgSummary=({value:value2,initialExpandedArgs})=>{let{summary,detail}=value2,[isOpen,setIsOpen]=(0,react.useState)(!1),[isExpanded,setIsExpanded]=(0,react.useState)(initialExpandedArgs||!1);if(summary==null)return null;let summaryAsString=typeof summary.toString=="function"?summary.toString():summary;if(detail==null){if(/[(){}[\]<>]/.test(summaryAsString))return react.createElement(ArgText,{text:summaryAsString});let summaryItems=getSummaryItems(summaryAsString),itemsCount=summaryItems.length;return itemsCount>ITEMS_BEFORE_EXPANSION?react.createElement(Summary,{isExpanded},renderSummaryItems(summaryItems,isExpanded),react.createElement(ExpandButton,{onClick:()=>setIsExpanded(!isExpanded)},isExpanded?"Show less...":`Show ${itemsCount-ITEMS_BEFORE_EXPANSION} more...`)):react.createElement(Summary,null,renderSummaryItems(summaryItems))}return react.createElement(components/* WithTooltipPure */.o4,{closeOnOutsideClick:!0,placement:"bottom",visible:isOpen,onVisibleChange:isVisible=>{setIsOpen(isVisible);},tooltip:react.createElement(Detail,{width:calculateDetailWidth(detail)},react.createElement(components/* SyntaxHighlighter */.bF,{language:"jsx",format:!1},detail))},react.createElement(Expandable,{className:"sbdocs-expandable"},react.createElement("span",null,summaryAsString),isOpen?react.createElement(ChevronUpIcon,null):react.createElement(ChevronDownIcon,null)))},ArgValue=({value:value2,initialExpandedArgs})=>value2==null?react.createElement(EmptyArg,null):react.createElement(ArgSummary,{value:value2,initialExpandedArgs});var Name=theming/* styled */.I4.span({fontWeight:"bold"}),Required=theming/* styled */.I4.span(({theme})=>({color:theme.color.negative,fontFamily:theme.typography.fonts.mono,cursor:"help"})),Description=theming/* styled */.I4.div(({theme})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:theme.color.secondary}},code:{...(0,components/* codeCommon */.zb)({theme}),fontSize:12,fontFamily:theme.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),Type=theming/* styled */.I4.div(({theme,hasDescription})=>({color:theme.base==="light"?curriedTransparentize$1(.1,theme.color.defaultText):curriedTransparentize$1(.2,theme.color.defaultText),marginTop:hasDescription?4:0})),TypeWithJsDoc=theming/* styled */.I4.div(({theme,hasDescription})=>({color:theme.base==="light"?curriedTransparentize$1(.1,theme.color.defaultText):curriedTransparentize$1(.2,theme.color.defaultText),marginTop:hasDescription?12:0,marginBottom:12})),StyledTd=theming/* styled */.I4.td(({theme,expandable})=>({paddingLeft:expandable?"40px !important":"20px !important"})),toSummary=value2=>value2&&{summary:typeof value2=="string"?value2:value2.name},ArgRow=props=>{let[isHovered,setIsHovered]=(0,react.useState)(!1),{row,updateArgs,compact,expandable,initialExpandedArgs}=props,{name,description}=row,table=row.table||{},type=table.type||toSummary(row.type),defaultValue=table.defaultValue||row.defaultValue,required=row.type?.required,hasDescription=description!=null&&description!=="";return react.createElement("tr",{onMouseEnter:()=>setIsHovered(!0),onMouseLeave:()=>setIsHovered(!1)},react.createElement(StyledTd,{expandable},react.createElement(Name,null,name),required?react.createElement(Required,{title:"Required"},"*"):null),compact?null:react.createElement("td",null,hasDescription&&react.createElement(Description,null,react.createElement(index_modern,null,description)),table.jsDocTags!=null?react.createElement(react.Fragment,null,react.createElement(TypeWithJsDoc,{hasDescription},react.createElement(ArgValue,{value:type,initialExpandedArgs})),react.createElement(ArgJsDoc,{tags:table.jsDocTags})):react.createElement(Type,{hasDescription},react.createElement(ArgValue,{value:type,initialExpandedArgs}))),compact?null:react.createElement("td",null,react.createElement(ArgValue,{value:defaultValue,initialExpandedArgs})),updateArgs?react.createElement("td",null,react.createElement(ArgControl,{...props,isHovered})):null)};var Wrapper8=theming/* styled */.I4.div(({inAddonPanel,theme})=>({height:inAddonPanel?"100%":"auto",display:"flex",border:inAddonPanel?"none":`1px solid ${theme.appBorderColor}`,borderRadius:inAddonPanel?0:theme.appBorderRadius,padding:inAddonPanel?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:theme.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),Links=theming/* styled */.I4.div(({theme})=>({display:"flex",fontSize:theme.typography.size.s2-1,gap:25})),Divider=theming/* styled */.I4.div(({theme})=>({width:1,height:16,backgroundColor:theme.appBorderColor})),Empty=({inAddonPanel})=>{let[isLoading,setIsLoading]=(0,react.useState)(!0);return (0,react.useEffect)(()=>{let load=setTimeout(()=>{setIsLoading(!1);},100);return ()=>clearTimeout(load)},[]),isLoading?null:react.createElement(Wrapper8,{inAddonPanel},react.createElement(components/* EmptyTabContent */.Q2,{title:inAddonPanel?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:react.createElement(react.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:react.createElement(Links,null,inAddonPanel&&react.createElement(react.Fragment,null,react.createElement(components/* Link */.N_,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},react.createElement(dist/* VideoIcon */.npA,null)," Watch 5m video"),react.createElement(Divider,null),react.createElement(components/* Link */.N_,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},react.createElement(dist/* DocumentIcon */.pyG,null)," Read docs")),!inAddonPanel&&react.createElement(components/* Link */.N_,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},react.createElement(dist/* DocumentIcon */.pyG,null)," Learn how to set that up"))}))};var ExpanderIconDown=(0,theming/* styled */.I4)(dist/* ChevronDownIcon */.D3D)(({theme})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:theme.base==="light"?curriedTransparentize$1(.25,theme.color.defaultText):curriedTransparentize$1(.3,theme.color.defaultText),border:"none",display:"inline-block"})),ExpanderIconRight=(0,theming/* styled */.I4)(dist/* ChevronRightIcon */.vKP)(({theme})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:theme.base==="light"?curriedTransparentize$1(.25,theme.color.defaultText):curriedTransparentize$1(.3,theme.color.defaultText),border:"none",display:"inline-block"})),FlexWrapper=theming/* styled */.I4.span(({theme})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),Section=theming/* styled */.I4.td(({theme})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:theme.typography.weight.bold,fontSize:theme.typography.size.s1-1,color:theme.base==="light"?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText),background:`${theme.background.app} !important`,"& ~ td":{background:`${theme.background.app} !important`}})),Subsection=theming/* styled */.I4.td(({theme})=>({position:"relative",fontWeight:theme.typography.weight.bold,fontSize:theme.typography.size.s2-1,background:theme.background.app})),StyledTd2=theming/* styled */.I4.td(()=>({position:"relative"})),StyledTr=theming/* styled */.I4.tr(({theme})=>({"&:hover > td":{backgroundColor:`${curriedLighten$1(.005,theme.background.app)} !important`,boxShadow:`${theme.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),ClickIntercept=theming/* styled */.I4.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),SectionRow=({level="section",label,children,initialExpanded=!0,colSpan=3})=>{let[expanded,setExpanded]=(0,react.useState)(initialExpanded),Level=level==="subsection"?Subsection:Section,itemCount=children?.length||0,caption=level==="subsection"?`${itemCount} item${itemCount!==1?"s":""}`:"",helperText=`${expanded?"Hide":"Show"} ${level==="subsection"?itemCount:label} item${itemCount!==1?"s":""}`;return react.createElement(react.Fragment,null,react.createElement(StyledTr,{title:helperText},react.createElement(Level,{colSpan:1},react.createElement(ClickIntercept,{onClick:e=>setExpanded(!expanded),tabIndex:0},helperText),react.createElement(FlexWrapper,null,expanded?react.createElement(ExpanderIconDown,null):react.createElement(ExpanderIconRight,null),label)),react.createElement(StyledTd2,{colSpan:colSpan-1},react.createElement(ClickIntercept,{onClick:e=>setExpanded(!expanded),tabIndex:-1,style:{outline:"none"}},helperText),expanded?null:caption)),expanded?children:null)};var Row=theming/* styled */.I4.div(({theme})=>({display:"flex",gap:16,borderBottom:`1px solid ${theme.appBorderColor}`,"&:last-child":{borderBottom:0}})),Column=theming/* styled */.I4.div(({numColumn})=>({display:"flex",flexDirection:"column",flex:numColumn||1,gap:5,padding:"12px 20px"})),SkeletonText=theming/* styled */.I4.div(({theme,width,height})=>({animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,background:theme.appBorderColor,width:width||"100%",height:height||16,borderRadius:3})),columnWidth=[2,4,2,2],Skeleton=()=>react.createElement(react.Fragment,null,react.createElement(Row,null,react.createElement(Column,{numColumn:columnWidth[0]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[1]},react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{numColumn:columnWidth[2]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[3]},react.createElement(SkeletonText,{width:"60%"}))),react.createElement(Row,null,react.createElement(Column,{numColumn:columnWidth[0]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[1]},react.createElement(SkeletonText,{width:"80%"}),react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{numColumn:columnWidth[2]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[3]},react.createElement(SkeletonText,{width:"60%"}))),react.createElement(Row,null,react.createElement(Column,{numColumn:columnWidth[0]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[1]},react.createElement(SkeletonText,{width:"80%"}),react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{numColumn:columnWidth[2]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[3]},react.createElement(SkeletonText,{width:"60%"}))),react.createElement(Row,null,react.createElement(Column,{numColumn:columnWidth[0]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[1]},react.createElement(SkeletonText,{width:"80%"}),react.createElement(SkeletonText,{width:"30%"})),react.createElement(Column,{numColumn:columnWidth[2]},react.createElement(SkeletonText,{width:"60%"})),react.createElement(Column,{numColumn:columnWidth[3]},react.createElement(SkeletonText,{width:"60%"}))));var TableWrapper=theming/* styled */.I4.table(({theme,compact,inAddonPanel})=>({"&&":{borderSpacing:0,color:theme.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:theme.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:inAddonPanel?0:25,marginBottom:inAddonPanel?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...compact?null:{width:"35%"}},"td:nth-of-type(3)":{...compact?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...compact?null:{width:"25%"}},th:{color:theme.base==="light"?curriedTransparentize$1(.25,theme.color.defaultText):curriedTransparentize$1(.45,theme.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:inAddonPanel?0:1,marginRight:inAddonPanel?0:1,tbody:{...inAddonPanel?null:{filter:theme.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:theme.background.content,borderTop:`1px solid ${theme.appBorderColor}`},...inAddonPanel?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${theme.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${theme.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${theme.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${theme.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:theme.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:theme.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:theme.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:theme.appBorderRadius}}}}})),StyledIconButton=(0,theming/* styled */.I4)(components/* IconButton */.K0)(({theme})=>({margin:"-4px -12px -4px 0"})),ControlHeadingWrapper=theming/* styled */.I4.span({display:"flex",justifyContent:"space-between"});var sortFns={alpha:(a,b)=>a.name.localeCompare(b.name),requiredFirst:(a,b)=>+!!b.type?.required-+!!a.type?.required||a.name.localeCompare(b.name),none:void 0},groupRows=(rows,sort)=>{let sections={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!rows)return sections;Object.entries(rows).forEach(([key,row])=>{let{category,subcategory}=row?.table||{};if(category){let section=sections.sections[category]||{ungrouped:[],subsections:{}};if(!subcategory)section.ungrouped.push({key,...row});else {let subsection=section.subsections[subcategory]||[];subsection.push({key,...row}),section.subsections[subcategory]=subsection;}sections.sections[category]=section;}else if(subcategory){let subsection=sections.ungroupedSubsections[subcategory]||[];subsection.push({key,...row}),sections.ungroupedSubsections[subcategory]=subsection;}else sections.ungrouped.push({key,...row});});let sortFn=sortFns[sort],sortSubsection=record=>sortFn?Object.keys(record).reduce((acc,cur)=>({...acc,[cur]:record[cur].sort(sortFn)}),{}):record;return {ungrouped:sections.ungrouped.sort(sortFn),ungroupedSubsections:sortSubsection(sections.ungroupedSubsections),sections:Object.keys(sections.sections).reduce((acc,cur)=>({...acc,[cur]:{ungrouped:sections.sections[cur].ungrouped.sort(sortFn),subsections:sortSubsection(sections.sections[cur].subsections)}}),{})}},safeIncludeConditionalArg=(row,args,globals)=>{try{return (0,csf_dist/* includeConditionalArg */.hX)(row,args,globals)}catch(err){return external_STORYBOOK_MODULE_CLIENT_LOGGER_.once.warn(err.message),!1}},ArgsTable=props=>{let{updateArgs,resetArgs,compact,inAddonPanel,initialExpandedArgs,sort="none",isLoading}=props;if("error"in props){let{error}=props;return react.createElement(EmptyBlock,null,error,"\xA0",react.createElement(components/* Link */.N_,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},react.createElement(dist/* DocumentIcon */.pyG,null)," Read the docs"))}if(isLoading)return react.createElement(Skeleton,null);let{rows,args,globals}="rows"in props&&props,groups=groupRows(pickBy_default()(rows,row=>!row?.table?.disable&&safeIncludeConditionalArg(row,args||{},globals||{})),sort),hasNoUngrouped=groups.ungrouped.length===0,hasNoSections=Object.entries(groups.sections).length===0,hasNoUngroupedSubsections=Object.entries(groups.ungroupedSubsections).length===0;if(hasNoUngrouped&&hasNoSections&&hasNoUngroupedSubsections)return react.createElement(Empty,{inAddonPanel});let colSpan=1;updateArgs&&(colSpan+=1),compact||(colSpan+=2);let expandable=Object.keys(groups.sections).length>0,common={updateArgs,compact,inAddonPanel,initialExpandedArgs};return react.createElement(components/* ResetWrapper */.dL,null,react.createElement(TableWrapper,{compact,inAddonPanel,className:"docblock-argstable sb-unstyled"},react.createElement("thead",{className:"docblock-argstable-head"},react.createElement("tr",null,react.createElement("th",null,react.createElement("span",null,"Name")),compact?null:react.createElement("th",null,react.createElement("span",null,"Description")),compact?null:react.createElement("th",null,react.createElement("span",null,"Default")),updateArgs?react.createElement("th",null,react.createElement(ControlHeadingWrapper,null,"Control"," ",!isLoading&&resetArgs&&react.createElement(StyledIconButton,{onClick:()=>resetArgs(),title:"Reset controls"},react.createElement(dist/* UndoIcon */.ejX,{"aria-hidden":!0})))):null)),react.createElement("tbody",{className:"docblock-argstable-body"},groups.ungrouped.map(row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],...common})),Object.entries(groups.ungroupedSubsections).map(([subcategory,subsection])=>react.createElement(SectionRow,{key:subcategory,label:subcategory,level:"subsection",colSpan},subsection.map(row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],expandable,...common})))),Object.entries(groups.sections).map(([category,section])=>react.createElement(SectionRow,{key:category,label:category,level:"section",colSpan},section.ungrouped.map(row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],...common})),Object.entries(section.subsections).map(([subcategory,subsection])=>react.createElement(SectionRow,{key:subcategory,label:subcategory,level:"subsection",colSpan},subsection.map(row=>react.createElement(ArgRow,{key:row.key,row,arg:args&&args[row.key],expandable,...common})))))))))};var TabbedArgsTable=({tabs,...props})=>{let entries=Object.entries(tabs);return entries.length===1?react.createElement(ArgsTable,{...entries[0][1],...props}):react.createElement(components/* TabsState */._j,null,entries.map((entry,index)=>{let[label,table]=entry,id=`prop_table_div_${label}`,Component4="div",argsTableProps=index===0?props:{sort:props.sort};return react.createElement(Component4,{key:id,id,title:label},({active})=>active?react.createElement(ArgsTable,{key:`prop_table_${label}`,...table,...argsTableProps}):null)}))};var Label4=theming/* styled */.I4.div(({theme})=>({marginRight:30,fontSize:`${theme.typography.size.s1}px`,color:theme.base==="light"?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText)})),Sample=theming/* styled */.I4.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),TypeSpecimen=theming/* styled */.I4.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}}),Wrapper9=theming/* styled */.I4.div(components/* withReset */.YV,({theme})=>({...getBlockBackgroundStyle(theme),margin:"25px 0 40px",padding:"30px 20px"})),Typeset=({fontFamily,fontSizes,fontWeight,sampleText,...props})=>React15.createElement(Wrapper9,{...props,className:"docblock-typeset sb-unstyled"},fontSizes.map(size=>React15.createElement(TypeSpecimen,{key:size},React15.createElement(Label4,null,size),React15.createElement(Sample,{style:{fontFamily,fontSize:size,fontWeight,lineHeight:1.2}},sampleText||"Was he a beast if music could move him so?"))));var ItemTitle=theming/* styled */.I4.div(({theme})=>({fontWeight:theme.typography.weight.bold,color:theme.color.defaultText})),ItemSubtitle=theming/* styled */.I4.div(({theme})=>({color:theme.base==="light"?curriedTransparentize$1(.2,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText)})),ItemDescription=theming/* styled */.I4.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5}),SwatchLabel=theming/* styled */.I4.div(({theme})=>({flex:1,textAlign:"center",fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,lineHeight:1,overflow:"hidden",color:theme.base==="light"?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}})),SwatchLabels=theming/* styled */.I4.div({display:"flex",flexDirection:"row"}),Swatch=theming/* styled */.I4.div(({background})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background,content:'""'}})),SwatchColors=theming/* styled */.I4.div(({theme})=>({...getBlockBackgroundStyle(theme),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"})),SwatchSpecimen=theming/* styled */.I4.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30}),Swatches=theming/* styled */.I4.div({flex:1,display:"flex",flexDirection:"row"}),Item=theming/* styled */.I4.div({display:"flex",alignItems:"flex-start"}),ListName=theming/* styled */.I4.div({flex:"0 0 30%"}),ListSwatches=theming/* styled */.I4.div({flex:1}),ListHeading=theming/* styled */.I4.div(({theme})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:theme.typography.weight.bold,color:theme.base==="light"?curriedTransparentize$1(.4,theme.color.defaultText):curriedTransparentize$1(.6,theme.color.defaultText)})),List=theming/* styled */.I4.div(({theme})=>({fontSize:theme.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));function renderSwatch(color,index){return React15.createElement(Swatch,{key:`${color}-${index}`,title:color,background:color})}function renderSwatchLabel(color,index,colorDescription){return React15.createElement(SwatchLabel,{key:`${color}-${index}`,title:color},React15.createElement("div",null,color,colorDescription&&React15.createElement("span",null,colorDescription)))}function renderSwatchSpecimen(colors){if(Array.isArray(colors))return React15.createElement(SwatchSpecimen,null,React15.createElement(SwatchColors,null,colors.map((color,index)=>renderSwatch(color,index))),React15.createElement(SwatchLabels,null,colors.map((color,index)=>renderSwatchLabel(color,index))));let swatchElements=[],labelElements=[];for(let colorKey in colors){let colorValue=colors[colorKey];swatchElements.push(renderSwatch(colorValue,swatchElements.length)),labelElements.push(renderSwatchLabel(colorKey,labelElements.length,colorValue));}return React15.createElement(SwatchSpecimen,null,React15.createElement(SwatchColors,null,swatchElements),React15.createElement(SwatchLabels,null,labelElements))}var ColorItem=({title,subtitle,colors})=>React15.createElement(Item,null,React15.createElement(ItemDescription,null,React15.createElement(ItemTitle,null,title),React15.createElement(ItemSubtitle,null,subtitle)),React15.createElement(Swatches,null,renderSwatchSpecimen(colors))),ColorPalette=({children,...props})=>React15.createElement(ResetWrapper,null,React15.createElement(List,{...props,className:"docblock-colorpalette sb-unstyled"},React15.createElement(ListHeading,null,React15.createElement(ListName,null,"Name"),React15.createElement(ListSwatches,null,"Swatches")),children));var ItemLabel=theming/* styled */.I4.div(({theme})=>({fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s2,color:theme.color.defaultText,marginLeft:10,lineHeight:1.2})),ItemSpecimen=theming/* styled */.I4.div(({theme})=>({...getBlockBackgroundStyle(theme),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}})),Item2=theming/* styled */.I4.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"}),List2=theming/* styled */.I4.div({display:"flex",flexFlow:"row wrap"}),IconItem=({name,children})=>React15.createElement(Item2,null,React15.createElement(ItemSpecimen,null,children),React15.createElement(ItemLabel,null,name)),IconGallery=({children,...props})=>React15.createElement(ResetWrapper,null,React15.createElement(List2,{...props,className:"docblock-icongallery sb-unstyled"},children));var anchorBlockIdFromId=storyId=>`anchor--${storyId}`,Anchor=({storyId,children})=>react.createElement("div",{id:anchorBlockIdFromId(storyId),className:"sb-anchor"},children);external_STORYBOOK_MODULE_GLOBAL_.global&&external_STORYBOOK_MODULE_GLOBAL_.global.__DOCS_CONTEXT__===void 0&&(external_STORYBOOK_MODULE_GLOBAL_.global.__DOCS_CONTEXT__=(0,react.createContext)(null),external_STORYBOOK_MODULE_GLOBAL_.global.__DOCS_CONTEXT__.displayName="DocsContext");var DocsContext=external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__DOCS_CONTEXT__:(0,react.createContext)(null);var useOf=(moduleExportOrType,validTypes)=>(0,react.useContext)(DocsContext).resolveOf(moduleExportOrType,validTypes);var titleCase=str=>str.split("-").map(part=>part.charAt(0).toUpperCase()+part.slice(1)).join(""),getComponentName=component=>{if(component)return typeof component=="string"?component.includes("-")?titleCase(component):component:component.__docgenInfo&&component.__docgenInfo.displayName?component.__docgenInfo.displayName:component.name};function scrollToElement(element,block="start"){element.scrollIntoView({behavior:"smooth",block,inline:"nearest"});}function extractComponentArgTypes(component,parameters){let{extractArgTypes}=parameters.docs||{};if(!extractArgTypes)throw new Error("Args unsupported. See Args documentation for your framework.");return extractArgTypes(component)}function getArgTypesFromResolved(resolved){if(resolved.type==="component"){let{component:component2,projectAnnotations:{parameters:parameters2}}=resolved;return {argTypes:extractComponentArgTypes(component2,parameters2),parameters:parameters2,component:component2}}if(resolved.type==="meta"){let{preparedMeta:{argTypes:argTypes2,parameters:parameters2,component:component2,subcomponents:subcomponents2}}=resolved;return {argTypes:argTypes2,parameters:parameters2,component:component2,subcomponents:subcomponents2}}let{story:{argTypes,parameters,component,subcomponents}}=resolved;return {argTypes,parameters,component,subcomponents}}var ArgTypes=props=>{let{of}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let resolved=useOf(of||"meta"),{argTypes,parameters,component,subcomponents}=getArgTypesFromResolved(resolved),argTypesParameters=parameters.docs?.argTypes||{},include=props.include??argTypesParameters.include,exclude=props.exclude??argTypesParameters.exclude,sort=props.sort??argTypesParameters.sort,filteredArgTypes=(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(argTypes,include,exclude);if(!(!!subcomponents&&Object.keys(subcomponents).length>0))return react.createElement(ArgsTable,{rows:filteredArgTypes,sort});let mainComponentName=getComponentName(component),subcomponentTabs=Object.fromEntries(Object.entries(subcomponents).map(([key,comp])=>[key,{rows:(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(extractComponentArgTypes(comp,parameters),include,exclude),sort}])),tabs={[mainComponentName]:{rows:filteredArgTypes,sort},...subcomponentTabs};return react.createElement(TabbedArgsTable,{tabs,sort})};function argsHash(args){return (0,telejson_dist/* stringify */.As)(args,{allowFunction:!1})}var SourceContext=(0,react.createContext)({sources:{}}),UNKNOWN_ARGS_HASH="--unknown--",SourceContainer=({children,channel})=>{let[sources,setSources]=(0,react.useState)({});return (0,react.useEffect)(()=>{let handleSnippetRendered=(idOrEvent,inputSource=null,inputFormat=!1)=>{let{id,args=void 0,source,format:format2}=typeof idOrEvent=="string"?{id:idOrEvent,source:inputSource,format:inputFormat}:idOrEvent,hash=args?argsHash(args):UNKNOWN_ARGS_HASH;setSources(current=>({...current,[id]:{...current[id],[hash]:{code:source,format:format2}}}));};return channel.on(docs_tools/* SNIPPET_RENDERED */.Op,handleSnippetRendered),()=>channel.off(docs_tools/* SNIPPET_RENDERED */.Op,handleSnippetRendered)},[]),react.createElement(SourceContext.Provider,{value:{sources}},children)};var getStorySource=(storyId,args,sourceContext)=>{let{sources}=sourceContext,sourceMap=sources?.[storyId];return sourceMap?.[argsHash(args)]||sourceMap?.[UNKNOWN_ARGS_HASH]||{code:""}},getSnippet=({snippet,storyContext,typeFromProps,transformFromProps})=>{let{__isArgsStory:isArgsStory}=storyContext.parameters,sourceParameters=storyContext.parameters.docs?.source||{},type=typeFromProps||sourceParameters.type||docs_tools/* SourceType */.Y1.AUTO;if(sourceParameters.code!==void 0)return sourceParameters.code;let code=type===docs_tools/* SourceType */.Y1.DYNAMIC||type===docs_tools/* SourceType */.Y1.AUTO&&snippet&&isArgsStory?snippet:sourceParameters.originalSource||"";return (transformFromProps??sourceParameters.transform)?.(code,storyContext)||code},useSourceProps=(props,docsContext,sourceContext)=>{let story,{of}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(of)story=docsContext.resolveOf(of,["story"]).story;else try{story=docsContext.storyById();}catch{}let sourceParameters=story?.parameters?.docs?.source||{},{code}=props,format2=props.format??sourceParameters.format,language=props.language??sourceParameters.language??"jsx",dark=props.dark??sourceParameters.dark??!1;if(!code&&!story)return {error:"Oh no! The source is not available."};if(code)return {code,format:format2,language,dark};let storyContext=docsContext.getStoryContext(story),argsForSource=props.__forceInitialArgs?storyContext.initialArgs:storyContext.unmappedArgs,source=getStorySource(story.id,argsForSource,sourceContext);return format2=source.format??story.parameters.docs?.source?.format??!1,{code:getSnippet({snippet:source.code,storyContext:{...storyContext,args:argsForSource},typeFromProps:props.type,transformFromProps:props.transform}),format:format2,language,dark}},Source2=props=>{let sourceContext=useContext(SourceContext),docsContext=useContext(DocsContext),sourceProps=useSourceProps(props,docsContext,sourceContext);return React15.createElement(Source,{...sourceProps})};function useStory(storyId,context){let stories=useStories([storyId],context);return stories&&stories[0]}function useStories(storyIds,context){let[storiesById,setStories]=(0,react.useState)({});return (0,react.useEffect)(()=>{Promise.all(storyIds.map(async storyId=>{let story=await context.loadStory(storyId);setStories(current=>current[storyId]===story?current:{...current,[storyId]:story});}));}),storyIds.map(storyId=>{if(storiesById[storyId])return storiesById[storyId];try{return context.storyById(storyId)}catch{return null}})}var getStoryId2=(props,context)=>{let{of,meta}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return meta&&context.referenceMeta(meta,!1),context.resolveOf(of||"story",["story"]).story.id},getStoryProps=(props,story,context)=>{let{parameters={}}=story||{},{docs={}}=parameters,storyParameters=docs.story||{};if(docs.disable)return null;if(props.inline??storyParameters.inline??!1){let height2=props.height??storyParameters.height,autoplay=props.autoplay??storyParameters.autoplay??!1;return {story,inline:!0,height:height2,autoplay,forceInitialArgs:!!props.__forceInitialArgs,primary:!!props.__primary,renderStoryToElement:context.renderStoryToElement}}let height=props.height??storyParameters.height??storyParameters.iframeHeight??"100px";return {story,inline:!1,height,primary:!!props.__primary}},Story2=(props={__forceInitialArgs:!1,__primary:!1})=>{let context=(0,react.useContext)(DocsContext),storyId=getStoryId2(props,context),story=useStory(storyId,context);if(!story)return react.createElement(StorySkeleton,null);let storyProps=getStoryProps(props,story,context);return storyProps?react.createElement(Story,{...storyProps}):null};var Canvas=props=>{let docsContext=(0,react.useContext)(DocsContext),sourceContext=(0,react.useContext)(SourceContext),{of,source}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story}=useOf(of||"story",["story"]),sourceProps=useSourceProps({...source,...of&&{of}},docsContext,sourceContext),layout=props.layout??story.parameters.layout??story.parameters.docs?.canvas?.layout??"padded",withToolbar=props.withToolbar??story.parameters.docs?.canvas?.withToolbar??!1,additionalActions=props.additionalActions??story.parameters.docs?.canvas?.additionalActions,sourceState=props.sourceState??story.parameters.docs?.canvas?.sourceState??"hidden",className=props.className??story.parameters.docs?.canvas?.className;return react.createElement(Preview,{withSource:sourceState==="none"?void 0:sourceProps,isExpanded:sourceState==="shown",withToolbar,additionalActions,className,layout},react.createElement(Story2,{of:of||story.moduleExport,meta:props.meta,...props.story}))};var useArgs=(story,context)=>{let result=useArgsIfDefined(story,context);if(!result)throw new Error("No result when story was defined");return result},useArgsIfDefined=(story,context)=>{let storyContext=story?context.getStoryContext(story):{args:{}},{id:storyId}=story||{id:"none"},[args,setArgs]=(0,react.useState)(storyContext.args);(0,react.useEffect)(()=>{let onArgsUpdated=changed=>{changed.storyId===storyId&&setArgs(changed.args);};return context.channel.on(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_ARGS_UPDATED,onArgsUpdated),()=>context.channel.off(external_STORYBOOK_MODULE_CORE_EVENTS_.STORY_ARGS_UPDATED,onArgsUpdated)},[storyId,context.channel]);let updateArgs=(0,react.useCallback)(updatedArgs=>context.channel.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.UPDATE_STORY_ARGS,{storyId,updatedArgs}),[storyId,context.channel]),resetArgs=(0,react.useCallback)(argNames=>context.channel.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.RESET_STORY_ARGS,{storyId,argNames}),[storyId,context.channel]);return story&&[args,updateArgs,resetArgs]};var useGlobals=(story,context)=>{let storyContext=context.getStoryContext(story),[globals,setGlobals]=(0,react.useState)(storyContext.globals);return (0,react.useEffect)(()=>{let onGlobalsUpdated=changed=>{setGlobals(changed.globals);};return context.channel.on(external_STORYBOOK_MODULE_CORE_EVENTS_.GLOBALS_UPDATED,onGlobalsUpdated),()=>context.channel.off(external_STORYBOOK_MODULE_CORE_EVENTS_.GLOBALS_UPDATED,onGlobalsUpdated)},[context.channel]),[globals]};function extractComponentArgTypes2(component,parameters){let{extractArgTypes}=parameters.docs||{};if(!extractArgTypes)throw new Error("Args unsupported. See Args documentation for your framework.");return extractArgTypes(component)}var Controls3=props=>{let{of}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let context=(0,react.useContext)(DocsContext),{story}=context.resolveOf(of||"story",["story"]),{parameters,argTypes,component,subcomponents}=story,controlsParameters=parameters.docs?.controls||{},include=props.include??controlsParameters.include,exclude=props.exclude??controlsParameters.exclude,sort=props.sort??controlsParameters.sort,[args,updateArgs,resetArgs]=useArgs(story,context),[globals]=useGlobals(story,context),filteredArgTypes=(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(argTypes,include,exclude);if(!(!!subcomponents&&Object.keys(subcomponents).length>0))return Object.keys(filteredArgTypes).length>0||Object.keys(args).length>0?react.createElement(ArgsTable,{rows:filteredArgTypes,sort,args,globals,updateArgs,resetArgs}):null;let mainComponentName=getComponentName(component),subcomponentTabs=Object.fromEntries(Object.entries(subcomponents).map(([key,comp])=>[key,{rows:(0,external_STORYBOOK_MODULE_PREVIEW_API_.filterArgTypes)(extractComponentArgTypes2(comp,parameters),include,exclude),sort}])),tabs={[mainComponentName]:{rows:filteredArgTypes,sort},...subcomponentTabs};return react.createElement(TabbedArgsTable,{tabs,sort,args,globals,updateArgs,resetArgs})};var {document:document2}=external_STORYBOOK_MODULE_GLOBAL_.global,assertIsFn=val=>{if(typeof val!="function")throw new Error(`Expected story function, got: ${val}`);return val},AddContext=props=>{let{children,...rest}=props,parentContext=React15.useContext(DocsContext);return React15.createElement(DocsContext.Provider,{value:{...parentContext,...rest}},children)},CodeOrSourceMdx=({className,children,...rest})=>{if(typeof className!="string"&&(typeof children!="string"||!children.match(/[\n\r]/g)))return react.createElement(components/* Code */.Cy,null,children);let language=className&&className.split("-");return react.createElement(Source,{language:language&&language[1]||"text",format:!1,code:children,...rest})};function dist_navigate(context,url){context.channel.emit(external_STORYBOOK_MODULE_CORE_EVENTS_.NAVIGATE_URL,url);}var dist_A=components/* components */.dK.a,AnchorInPage=({hash,children})=>{let context=(0,react.useContext)(DocsContext);return react.createElement(dist_A,{href:hash,target:"_self",onClick:event=>{let id=hash.substring(1);document2.getElementById(id)&&dist_navigate(context,hash);}},children)},AnchorMdx=props=>{let{href,target,children,...rest}=props,context=(0,react.useContext)(DocsContext);return !href||target==="_blank"||/^https?:\/\//.test(href)?react.createElement(dist_A,{...props}):href.startsWith("#")?react.createElement(AnchorInPage,{hash:href},children):react.createElement(dist_A,{href,onClick:event=>{event.button===0&&!event.altKey&&!event.ctrlKey&&!event.metaKey&&!event.shiftKey&&(event.preventDefault(),dist_navigate(context,event.currentTarget.getAttribute("href")));},target,...rest},children)},SUPPORTED_MDX_HEADERS=["h1","h2","h3","h4","h5","h6"],OcticonHeaders=SUPPORTED_MDX_HEADERS.reduce((acc,headerType)=>({...acc,[headerType]:(0,theming/* styled */.I4)(headerType)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),OcticonAnchor=theming/* styled */.I4.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),HeaderWithOcticonAnchor=({as,id,children,...rest})=>{let context=(0,react.useContext)(DocsContext),OcticonHeader=OcticonHeaders[as],hash=`#${id}`;return react.createElement(OcticonHeader,{id,...rest},react.createElement(OcticonAnchor,{"aria-hidden":"true",href:hash,tabIndex:-1,target:"_self",onClick:event=>{document2.getElementById(id)&&dist_navigate(context,hash);}},react.createElement(dist/* LinkIcon */.qYV,null)),children)},HeaderMdx=props=>{let{as,id,children,...rest}=props;if(id)return react.createElement(HeaderWithOcticonAnchor,{as,id,...rest},children);let Component4=as,{as:omittedAs,...withoutAs}=props;return react.createElement(Component4,{...(0,components/* nameSpaceClassNames */.mc)(withoutAs,as)})},HeadersMdx=SUPPORTED_MDX_HEADERS.reduce((acc,headerType)=>({...acc,[headerType]:props=>react.createElement(HeaderMdx,{as:headerType,...props})}),{});var Markdown2=props=>{if(!props.children)return null;if(typeof props.children!="string")throw new Error((0,esm/* dedent */.T)`The Markdown block only accepts children as a single string, but children were of type: '${typeof props.children}'
+ This is often caused by not wrapping the child in a template string.
+
+ This is invalid:
+
+ # Some heading
+ A paragraph
+
+
+ Instead do:
+
+ {\`
+ # Some heading
+ A paragraph
+ \`}
+
+ `);return react.createElement(index_modern,{...props,options:{forceBlock:!0,overrides:{code:CodeOrSourceMdx,a:AnchorMdx,...HeadersMdx,...props?.options?.overrides},...props?.options}})};var DescriptionType=(DescriptionType2=>(DescriptionType2.INFO="info",DescriptionType2.NOTES="notes",DescriptionType2.DOCGEN="docgen",DescriptionType2.AUTO="auto",DescriptionType2))(DescriptionType||{}),getDescriptionFromResolvedOf=resolvedOf=>{switch(resolvedOf.type){case"story":return resolvedOf.story.parameters.docs?.description?.story||null;case"meta":{let{parameters,component}=resolvedOf.preparedMeta,metaDescription=parameters.docs?.description?.component;return metaDescription||parameters.docs?.extractComponentDescription?.(component,{component,parameters})||null}case"component":{let{component,projectAnnotations:{parameters}}=resolvedOf;return parameters.docs?.extractComponentDescription?.(component,{component,parameters})||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${resolvedOf.type}`)}},DescriptionContainer=props=>{let{of}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let resolvedOf=useOf(of||"meta"),markdown=getDescriptionFromResolvedOf(resolvedOf);return markdown?react.createElement(Markdown2,null,markdown):null};var tocbot=(0,chunk_MKV36LKP/* __toESM */.f1)(require_js());var Wrapper10=theming/* styled */.I4.div(({theme})=>({width:"10rem","@media (max-width: 768px)":{display:"none"}})),Content=theming/* styled */.I4.div(({theme})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${theme.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${theme.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${theme.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${theme.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:theme.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:theme.color.secondary,textDecoration:"none"}})),Heading=theming/* styled */.I4.p(({theme})=>({fontWeight:600,fontSize:"0.875em",color:theme.textColor,textTransform:"uppercase",marginBottom:10})),OptionalTitle=({title})=>title===null?null:typeof title=="string"?react.createElement(Heading,null,title):title,TableOfContents=({title,disable,headingSelector,contentsSelector,ignoreSelector,unsafeTocbotOptions})=>((0,react.useEffect)(()=>{let configuration={tocSelector:".toc-wrapper",contentSelector:contentsSelector??".sbdocs-content",headingSelector:headingSelector??"h3",ignoreSelector:ignoreSelector??".docs-story *, .skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:()=>!1,...unsafeTocbotOptions},timeout=setTimeout(()=>tocbot.init(configuration),100);return ()=>{clearTimeout(timeout),tocbot.destroy();}},[disable]),react.createElement(react.Fragment,null,react.createElement(Wrapper10,null,disable?null:react.createElement(Content,null,react.createElement(OptionalTitle,{title:title||null}),react.createElement("div",{className:"toc-wrapper"})))));var {document:document3,window:globalWindow3}=external_STORYBOOK_MODULE_GLOBAL_.global,DocsContainer=({context,theme,children})=>{let toc;try{toc=context.resolveOf("meta",["meta"]).preparedMeta.parameters?.docs?.toc;}catch{toc=context?.projectAnnotations?.parameters?.docs?.toc;}return (0,react.useEffect)(()=>{let url;try{if(url=new URL(globalWindow3.parent.location.toString()),url.hash){let element=document3.getElementById(decodeURIComponent(url.hash.substring(1)));element&&setTimeout(()=>{scrollToElement(element);},200);}}catch{}}),react.createElement(DocsContext.Provider,{value:context},react.createElement(SourceContainer,{channel:context.channel},react.createElement(theming/* ThemeProvider */.NP,{theme:(0,theming/* ensure */.D8)(theme)},react.createElement(DocsPageWrapper,{toc:toc?react.createElement(TableOfContents,{className:"sbdocs sbdocs-toc--custom",...toc}):null},children))))};var Subheading=({children,disableAnchor})=>{if(disableAnchor||typeof children!="string")return react.createElement(components.H3,null,children);let tagID=globalThis.encodeURIComponent(children.toLowerCase());return react.createElement(HeaderMdx,{as:"h3",id:tagID},children)};var DocsStory=({of,expanded=!0,withToolbar:withToolbarProp=!1,__forceInitialArgs=!1,__primary=!1})=>{let{story}=useOf(of||"story",["story"]),withToolbar=story.parameters.docs?.canvas?.withToolbar??withToolbarProp;return react.createElement(Anchor,{storyId:story.id},expanded&&react.createElement(react.Fragment,null,react.createElement(Subheading,null,story.name),react.createElement(DescriptionContainer,{of})),react.createElement(Canvas,{of,withToolbar,story:{__forceInitialArgs,__primary},source:{__forceInitialArgs}}))};var Primary=props=>{let{of}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{csfFile}=useOf(of||"meta",["meta"]),primaryStory=(0,react.useContext)(DocsContext).componentStoriesFromCSFFile(csfFile)[0];return primaryStory?react.createElement(DocsStory,{of:primaryStory.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null};var Heading2=({children,disableAnchor,...props})=>{if(disableAnchor||typeof children!="string")return react.createElement(components.H2,null,children);let tagID=children.toLowerCase().replace(/[^a-z0-9]/gi,"-");return react.createElement(HeaderMdx,{as:"h2",id:tagID,...props},children)};var StyledHeading=(0,theming/* styled */.I4)(Heading2)(({theme})=>({fontSize:`${theme.typography.size.s2-1}px`,fontWeight:theme.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:theme.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),Stories=({title="Stories",includePrimary=!0})=>{let{componentStories,projectAnnotations,getStoryContext}=(0,react.useContext)(DocsContext),stories=componentStories(),{stories:{filter}={filter:void 0}}=projectAnnotations.parameters?.docs||{};return filter&&(stories=stories.filter(story=>filter(story,getStoryContext(story)))),stories.some(story=>story.tags?.includes("autodocs"))&&(stories=stories.filter(story=>story.tags?.includes("autodocs")&&!story.usesMount)),includePrimary||(stories=stories.slice(1)),!stories||stories.length===0?null:react.createElement(react.Fragment,null,react.createElement(StyledHeading,null,title),stories.map(story=>story&&react.createElement(DocsStory,{key:story.id,of:story.moduleExport,expanded:!0,__forceInitialArgs:!0})))};var DEPRECATION_MIGRATION_LINK="https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#subtitle-block-and-parameterscomponentsubtitle",Subtitle2=props=>{let{of,children}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let preparedMeta;try{preparedMeta=useOf(of||"meta",["meta"]).preparedMeta;}catch(error){if(children&&!error.message.includes("did you forget to use ?"))throw error}let{componentSubtitle,docs}=preparedMeta?.parameters||{};componentSubtitle&&(0,external_STORYBOOK_MODULE_CLIENT_LOGGER_.deprecate)(`Using 'parameters.componentSubtitle' property to subtitle stories is deprecated. See ${DEPRECATION_MIGRATION_LINK}`);let content=children||docs?.subtitle||componentSubtitle;return content?react.createElement(Subtitle,{className:"sbdocs-subtitle sb-unstyled"},content):null};var STORY_KIND_PATH_SEPARATOR=/\s*\/\s*/,extractTitle=title=>{let groups=title.trim().split(STORY_KIND_PATH_SEPARATOR);return groups?.[groups?.length-1]||title},Title2=props=>{let{children,of}=props;if("of"in props&&of===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let preparedMeta;try{preparedMeta=useOf(of||"meta",["meta"]).preparedMeta;}catch(error){if(children&&!error.message.includes("did you forget to use ?"))throw error}let content=children||extractTitle(preparedMeta?.title);return content?react.createElement(Title,{className:"sbdocs-title sb-unstyled"},content):null};var DocsPage=()=>{let resolvedOf=useOf("meta",["meta"]),{stories}=resolvedOf.csfFile,isSingleStory=Object.keys(stories).length===1;return react.createElement(react.Fragment,null,react.createElement(Title2,null),react.createElement(Subtitle2,null),react.createElement(DescriptionContainer,{of:"meta"}),isSingleStory?react.createElement(DescriptionContainer,{of:"story"}):null,react.createElement(Primary,null),react.createElement(Controls3,null),isSingleStory?null:react.createElement(Stories,null))};function Docs({context,docsParameter}){let Container=docsParameter.container||DocsContainer,Page=docsParameter.page||DocsPage;return react.createElement(Container,{context,theme:docsParameter.theme},react.createElement(Page,null))}var ExternalDocsContext=class extends external_STORYBOOK_MODULE_PREVIEW_API_.DocsContext{constructor(channel,store,renderStoryToElement,processMetaExports){super(channel,store,renderStoryToElement,[]);this.channel=channel;this.store=store;this.renderStoryToElement=renderStoryToElement;this.processMetaExports=processMetaExports;this.referenceMeta=(metaExports,attach)=>{let csfFile=this.processMetaExports(metaExports);this.referenceCSFFile(csfFile),super.referenceMeta(metaExports,attach);};}};var ConstantMap=class{constructor(prefix){this.prefix=prefix;this.entries=new Map;}get(key){return this.entries.has(key)||this.entries.set(key,`${this.prefix}${this.entries.size}`),this.entries.get(key)}},ExternalPreview=class extends external_STORYBOOK_MODULE_PREVIEW_API_.Preview{constructor(projectAnnotations){super(path=>Promise.resolve(this.moduleExportsByImportPath[path]),()=>(0,external_STORYBOOK_MODULE_PREVIEW_API_.composeConfigs)([{parameters:{docs:{story:{inline:!0}}}},this.projectAnnotations]),new external_STORYBOOK_MODULE_CHANNELS_.Channel({}));this.projectAnnotations=projectAnnotations;this.importPaths=new ConstantMap("./importPath/");this.titles=new ConstantMap("title-");this.storyIndex={v:5,entries:{}};this.moduleExportsByImportPath={};this.processMetaExports=metaExports=>{let importPath=this.importPaths.get(metaExports);this.moduleExportsByImportPath[importPath]=metaExports;let title=metaExports.default.title||this.titles.get(metaExports),csfFile=this.storyStoreValue.processCSFFileWithCache(metaExports,importPath,title);return Object.values(csfFile.stories).forEach(({id,name})=>{this.storyIndex.entries[id]={id,importPath,title,name,type:"story"};}),this.onStoriesChanged({storyIndex:this.storyIndex}),csfFile};this.docsContext=()=>new ExternalDocsContext(this.channel,this.storyStoreValue,this.renderStoryToElement.bind(this),this.processMetaExports.bind(this));}async getStoryIndexFromServer(){return this.storyIndex}};function usePreview(projectAnnotations){let previewRef=useRef();return previewRef.current||(previewRef.current=new ExternalPreview(projectAnnotations)),previewRef.current}function ExternalDocs({projectAnnotationsList,children}){let projectAnnotations=composeConfigs(projectAnnotationsList),preview2=usePreview(projectAnnotations),docsParameter={...projectAnnotations.parameters?.docs,page:()=>children};return React15.createElement(Docs,{docsParameter,context:preview2.docsContext()})}var preview,ExternalDocsContainer=({projectAnnotations,children})=>(preview||(preview=new ExternalPreview(projectAnnotations)),React15.createElement(DocsContext.Provider,{value:preview.docsContext()},React15.createElement(ThemeProvider,{theme:ensure(themes.light)},children)));var Meta=({of})=>{let context=(0,react.useContext)(DocsContext);of&&context.referenceMeta(of,!0);try{let primary=context.storyById();return react.createElement(Anchor,{storyId:primary.id})}catch{return null}};var Unstyled=props=>React15.createElement("div",{...props,className:"sb-unstyled"});var Wrapper11=({children})=>React15.createElement("div",{style:{fontFamily:"sans-serif"}},children);var PRIMARY_STORY="^";
+
+
+
+
+/***/ }),
+
+/***/ "../../../node_modules/@storybook/core/dist/components/index.js":
+/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
+
+"use strict";
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ $n: () => (/* binding */ Bo),
+/* harmony export */ Cy: () => (/* binding */ mu),
+/* harmony export */ Df: () => (/* binding */ tB),
+/* harmony export */ E7: () => (/* binding */ nu),
+/* harmony export */ GP: () => (/* binding */ GL),
+/* harmony export */ H2: () => (/* binding */ bu),
+/* harmony export */ H3: () => (/* binding */ yu),
+/* harmony export */ K0: () => (/* binding */ Tl),
+/* harmony export */ N_: () => (/* binding */ Ou),
+/* harmony export */ Q2: () => (/* binding */ I1),
+/* harmony export */ YV: () => (/* binding */ q),
+/* harmony export */ _: () => (/* binding */ LI),
+/* harmony export */ _j: () => (/* binding */ P1),
+/* harmony export */ aH: () => (/* binding */ GM),
+/* harmony export */ bF: () => (/* binding */ dg),
+/* harmony export */ dK: () => (/* binding */ MQ),
+/* harmony export */ dL: () => (/* binding */ lp),
+/* harmony export */ jZ: () => (/* binding */ YM),
+/* harmony export */ kR: () => (/* binding */ bI),
+/* harmony export */ lV: () => (/* binding */ xB),
+/* harmony export */ mc: () => (/* binding */ te),
+/* harmony export */ o4: () => (/* binding */ DI),
+/* harmony export */ px: () => (/* binding */ Xl),
+/* harmony export */ zH: () => (/* binding */ fu),
+/* harmony export */ zb: () => (/* binding */ kt)
+/* harmony export */ });
+/* unused harmony exports A, AddonPanel, Badge, Bar, Blockquote, ClipboardCode, DL, Div, DocumentWrapper, H1, H4, H5, H6, HR, IconButtonSkeleton, Icons, Img, LI, ListItem, Modal, OL, P, Placeholder, Pre, ScrollArea, Separator, Spaced, Span, StorybookIcon, StorybookLogo, Symbols, TT, TabBar, TabButton, TabWrapper, Table, Tabs, TooltipLinkList, TooltipMessage, UL, icons, interleaveSeparators, resetComponents */
+/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../../node_modules/react/index.js");
+/* harmony import */ var _storybook_core_theming__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../node_modules/@storybook/core/dist/theming/index.js");
+/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../../node_modules/react/jsx-runtime.js");
+/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../../node_modules/react-dom/index.js");
+/* harmony import */ var _storybook_core_client_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("storybook/internal/client-logger");
+/* harmony import */ var _storybook_core_client_logger__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_storybook_core_client_logger__WEBPACK_IMPORTED_MODULE_4__);
+/* harmony import */ var _storybook_csf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../../node_modules/@storybook/csf/dist/index.mjs");
+var C4 = Object.create;
+var Za = Object.defineProperty;
+var E4 = Object.getOwnPropertyDescriptor;
+var S4 = Object.getOwnPropertyNames;
+var R4 = Object.getPrototypeOf, A4 = Object.prototype.hasOwnProperty;
+var a = (e, t) => Za(e, "name", { value: t, configurable: !0 }), Zo = /* @__PURE__ */ ((e) => true ? __webpack_require__("../../../node_modules/@storybook/core/dist/components sync recursive") : 0)(function(e) {
+ if (true) return __webpack_require__("../../../node_modules/@storybook/core/dist/components sync recursive").apply(this, arguments);
+ throw Error('Dynamic require of "' + e + '" is not supported');
+});
+var F = (e, t) => () => (e && (t = e(e = 0)), t);
+var _ = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ln = (e, t) => {
+ for (var r in t)
+ Za(e, r, { get: t[r], enumerable: !0 });
+}, F4 = (e, t, r, n) => {
+ if (t && typeof t == "object" || typeof t == "function")
+ for (let o of S4(t))
+ !A4.call(e, o) && o !== r && Za(e, o, { get: () => t[o], enumerable: !(n = E4(t, o)) || n.enumerable });
+ return e;
+};
+var we = (e, t, r) => (r = e != null ? C4(R4(e)) : {}, F4(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ t || !e || !e.__esModule ? Za(r, "default", { value: e, enumerable: !0 }) : r,
+ e
+));
+
+// ../node_modules/@babel/runtime/helpers/esm/extends.js
+function $() {
+ return $ = Object.assign ? Object.assign.bind() : function(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var r = arguments[t];
+ for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
+ }
+ return e;
+ }, $.apply(null, arguments);
+}
+var tt = F(() => {
+ a($, "_extends");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
+function Z1(e) {
+ if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ return e;
+}
+var J1 = F(() => {
+ a(Z1, "_assertThisInitialized");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
+function Xt(e, t) {
+ return Xt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
+ return r.__proto__ = n, r;
+ }, Xt(e, t);
+}
+var Ja = F(() => {
+ a(Xt, "_setPrototypeOf");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
+function Qa(e) {
+ return Qa = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
+ return t.__proto__ || Object.getPrototypeOf(t);
+ }, Qa(e);
+}
+var ep = F(() => {
+ a(Qa, "_getPrototypeOf");
+});
+
+// ../node_modules/@storybook/global/dist/index.mjs
+var sn, ri = F(() => {
+ sn = (() => {
+ let e;
+ return typeof window < "u" ? e = window : typeof globalThis < "u" ? e = globalThis : typeof __webpack_require__.g < "u" ? e = __webpack_require__.g : typeof self < "u" ?
+ e = self : e = {}, e;
+ })();
+});
+
+// ../node_modules/memoizerific/memoizerific.js
+var ea = _((up, ms) => {
+ (function(e) {
+ if (typeof up == "object" && typeof ms < "u")
+ ms.exports = e();
+ else if (typeof define == "function" && __webpack_require__.amdO)
+ define([], e);
+ else {
+ var t;
+ typeof window < "u" ? t = window : typeof __webpack_require__.g < "u" ? t = __webpack_require__.g : typeof self < "u" ? t = self : t = this, t.memoizerific = e();
+ }
+ })(function() {
+ var e, t, r;
+ return (/* @__PURE__ */ a(function n(o, i, l) {
+ function u(d, h) {
+ if (!i[d]) {
+ if (!o[d]) {
+ var f = typeof Zo == "function" && Zo;
+ if (!h && f) return f(d, !0);
+ if (c) return c(d, !0);
+ var v = new Error("Cannot find module '" + d + "'");
+ throw v.code = "MODULE_NOT_FOUND", v;
+ }
+ var b = i[d] = { exports: {} };
+ o[d][0].call(b.exports, function(m) {
+ var g = o[d][1][m];
+ return u(g || m);
+ }, b, b.exports, n, o, i, l);
+ }
+ return i[d].exports;
+ }
+ a(u, "s");
+ for (var c = typeof Zo == "function" && Zo, p = 0; p < l.length; p++) u(l[p]);
+ return u;
+ }, "e"))({ 1: [function(n, o, i) {
+ o.exports = function(l) {
+ if (typeof Map != "function" || l) {
+ var u = n("./similar");
+ return new u();
+ } else
+ return /* @__PURE__ */ new Map();
+ };
+ }, { "./similar": 2 }], 2: [function(n, o, i) {
+ function l() {
+ return this.list = [], this.lastItem = void 0, this.size = 0, this;
+ }
+ a(l, "Similar"), l.prototype.get = function(u) {
+ var c;
+ if (this.lastItem && this.isEqual(this.lastItem.key, u))
+ return this.lastItem.val;
+ if (c = this.indexOf(u), c >= 0)
+ return this.lastItem = this.list[c], this.list[c].val;
+ }, l.prototype.set = function(u, c) {
+ var p;
+ return this.lastItem && this.isEqual(this.lastItem.key, u) ? (this.lastItem.val = c, this) : (p = this.indexOf(u), p >= 0 ? (this.lastItem =
+ this.list[p], this.list[p].val = c, this) : (this.lastItem = { key: u, val: c }, this.list.push(this.lastItem), this.size++, this));
+ }, l.prototype.delete = function(u) {
+ var c;
+ if (this.lastItem && this.isEqual(this.lastItem.key, u) && (this.lastItem = void 0), c = this.indexOf(u), c >= 0)
+ return this.size--, this.list.splice(c, 1)[0];
+ }, l.prototype.has = function(u) {
+ var c;
+ return this.lastItem && this.isEqual(this.lastItem.key, u) ? !0 : (c = this.indexOf(u), c >= 0 ? (this.lastItem = this.list[c], !0) :
+ !1);
+ }, l.prototype.forEach = function(u, c) {
+ var p;
+ for (p = 0; p < this.size; p++)
+ u.call(c || this, this.list[p].val, this.list[p].key, this);
+ }, l.prototype.indexOf = function(u) {
+ var c;
+ for (c = 0; c < this.size; c++)
+ if (this.isEqual(this.list[c].key, u))
+ return c;
+ return -1;
+ }, l.prototype.isEqual = function(u, c) {
+ return u === c || u !== u && c !== c;
+ }, o.exports = l;
+ }, {}], 3: [function(n, o, i) {
+ var l = n("map-or-similar");
+ o.exports = function(d) {
+ var h = new l(!1), f = [];
+ return function(v) {
+ var b = /* @__PURE__ */ a(function() {
+ var m = h, g, y, w = arguments.length - 1, D = Array(w + 1), x = !0, C;
+ if ((b.numArgs || b.numArgs === 0) && b.numArgs !== w + 1)
+ throw new Error("Memoizerific functions should always be called with the same number of arguments");
+ for (C = 0; C < w; C++) {
+ if (D[C] = {
+ cacheItem: m,
+ arg: arguments[C]
+ }, m.has(arguments[C])) {
+ m = m.get(arguments[C]);
+ continue;
+ }
+ x = !1, g = new l(!1), m.set(arguments[C], g), m = g;
+ }
+ return x && (m.has(arguments[w]) ? y = m.get(arguments[w]) : x = !1), x || (y = v.apply(null, arguments), m.set(arguments[w], y)),
+ d > 0 && (D[w] = {
+ cacheItem: m,
+ arg: arguments[w]
+ }, x ? u(f, D) : f.push(D), f.length > d && c(f.shift())), b.wasMemoized = x, b.numArgs = w + 1, y;
+ }, "memoizerific");
+ return b.limit = d, b.wasMemoized = !1, b.cache = h, b.lru = f, b;
+ };
+ };
+ function u(d, h) {
+ var f = d.length, v = h.length, b, m, g;
+ for (m = 0; m < f; m++) {
+ for (b = !0, g = 0; g < v; g++)
+ if (!p(d[m][g].arg, h[g].arg)) {
+ b = !1;
+ break;
+ }
+ if (b)
+ break;
+ }
+ d.push(d.splice(m, 1)[0]);
+ }
+ a(u, "moveToMostRecentLru");
+ function c(d) {
+ var h = d.length, f = d[h - 1], v, b;
+ for (f.cacheItem.delete(f.arg), b = h - 2; b >= 0 && (f = d[b], v = f.cacheItem.get(f.arg), !v || !v.size); b--)
+ f.cacheItem.delete(f.arg);
+ }
+ a(c, "removeCachedResult");
+ function p(d, h) {
+ return d === h || d !== d && h !== h;
+ }
+ a(p, "isEqual");
+ }, { "map-or-similar": 1 }] }, {}, [3])(3);
+ });
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
+function un(e, t) {
+ if (e == null) return {};
+ var r = {};
+ for (var n in e) if ({}.hasOwnProperty.call(e, n)) {
+ if (t.indexOf(n) >= 0) continue;
+ r[n] = e[n];
+ }
+ return r;
+}
+var ni = F(() => {
+ a(un, "_objectWithoutPropertiesLoose");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
+function cp(e, t) {
+ if (e == null) return {};
+ var r, n, o = un(e, t);
+ if (Object.getOwnPropertySymbols) {
+ var i = Object.getOwnPropertySymbols(e);
+ for (n = 0; n < i.length; n++) r = i[n], t.indexOf(r) >= 0 || {}.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
+ }
+ return o;
+}
+var pp = F(() => {
+ ni();
+ a(cp, "_objectWithoutProperties");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
+function ta(e, t) {
+ (t == null || t > e.length) && (t = e.length);
+ for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
+ return n;
+}
+var gs = F(() => {
+ a(ta, "_arrayLikeToArray");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
+function dp(e) {
+ if (Array.isArray(e)) return ta(e);
+}
+var fp = F(() => {
+ gs();
+ a(dp, "_arrayWithoutHoles");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
+function hp(e) {
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
+}
+var mp = F(() => {
+ a(hp, "_iterableToArray");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
+function gp(e, t) {
+ if (e) {
+ if (typeof e == "string") return ta(e, t);
+ var r = {}.toString.call(e).slice(8, -1);
+ return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.
+ test(r) ? ta(e, t) : void 0;
+ }
+}
+var vp = F(() => {
+ gs();
+ a(gp, "_unsupportedIterableToArray");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
+function wp() {
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
+}
+var bp = F(() => {
+ a(wp, "_nonIterableSpread");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
+function yp(e) {
+ return dp(e) || hp(e) || gp(e) || wp();
+}
+var Dp = F(() => {
+ fp();
+ mp();
+ vp();
+ bp();
+ a(yp, "_toConsumableArray");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/typeof.js
+function br(e) {
+ "@babel/helpers - typeof";
+ return br = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
+ return typeof t;
+ } : function(t) {
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
+ }, br(e);
+}
+var vs = F(() => {
+ a(br, "_typeof");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
+function xp(e, t) {
+ if (br(e) != "object" || !e) return e;
+ var r = e[Symbol.toPrimitive];
+ if (r !== void 0) {
+ var n = r.call(e, t || "default");
+ if (br(n) != "object") return n;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return (t === "string" ? String : Number)(e);
+}
+var Cp = F(() => {
+ vs();
+ a(xp, "toPrimitive");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
+function Ep(e) {
+ var t = xp(e, "string");
+ return br(t) == "symbol" ? t : t + "";
+}
+var Sp = F(() => {
+ vs();
+ Cp();
+ a(Ep, "toPropertyKey");
+});
+
+// ../node_modules/@babel/runtime/helpers/esm/defineProperty.js
+function oi(e, t, r) {
+ return (t = Ep(t)) in e ? Object.defineProperty(e, t, {
+ value: r,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }) : e[t] = r, e;
+}
+var ws = F(() => {
+ Sp();
+ a(oi, "_defineProperty");
+});
+
+// ../node_modules/react-syntax-highlighter/dist/esm/create-element.js
+
+function Rp(e, t) {
+ var r = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var n = Object.getOwnPropertySymbols(e);
+ t && (n = n.filter(function(o) {
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
+ })), r.push.apply(r, n);
+ }
+ return r;
+}
+function cn(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var r = arguments[t] != null ? arguments[t] : {};
+ t % 2 ? Rp(Object(r), !0).forEach(function(n) {
+ oi(e, n, r[n]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Rp(Object(r)).forEach(function(n) {
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
+ });
+ }
+ return e;
+}
+function i7(e) {
+ var t = e.length;
+ if (t === 0 || t === 1) return e;
+ if (t === 2)
+ return [e[0], e[1], "".concat(e[0], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0])];
+ if (t === 3)
+ return [e[0], e[1], e[2], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0]), "".concat(
+ e[1], ".").concat(e[2]), "".concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(
+ e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(
+ e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0])];
+ if (t >= 4)
+ return [e[0], e[1], e[2], e[3], "".concat(e[0], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2]), "".concat(e[0], ".").concat(e[3]),
+ "".concat(e[1], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2]), "".concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[0]),
+ "".concat(e[2], ".").concat(e[1]), "".concat(e[2], ".").concat(e[3]), "".concat(e[3], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1]),
+ "".concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(e[1], ".").concat(e[3]),
+ "".concat(e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(e[3],
+ ".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1],
+ ".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[1], ".").concat(e[2], ".").concat(
+ e[3]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[2], ".").concat(
+ e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0]), "".concat(
+ e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(
+ e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(
+ e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(
+ e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[0], ".").concat(e[1], ".").concat(e[2], ".").concat(e[3]), "".concat(e[0], ".").concat(
+ e[1], ".").concat(e[3], ".").concat(e[2]), "".concat(e[0], ".").concat(e[2], ".").concat(e[1], ".").concat(e[3]), "".concat(e[0], ".").concat(
+ e[2], ".").concat(e[3], ".").concat(e[1]), "".concat(e[0], ".").concat(e[3], ".").concat(e[1], ".").concat(e[2]), "".concat(e[0], ".").concat(
+ e[3], ".").concat(e[2], ".").concat(e[1]), "".concat(e[1], ".").concat(e[0], ".").concat(e[2], ".").concat(e[3]), "".concat(e[1], ".").concat(
+ e[0], ".").concat(e[3], ".").concat(e[2]), "".concat(e[1], ".").concat(e[2], ".").concat(e[0], ".").concat(e[3]), "".concat(e[1], ".").concat(
+ e[2], ".").concat(e[3], ".").concat(e[0]), "".concat(e[1], ".").concat(e[3], ".").concat(e[0], ".").concat(e[2]), "".concat(e[1], ".").concat(
+ e[3], ".").concat(e[2], ".").concat(e[0]), "".concat(e[2], ".").concat(e[0], ".").concat(e[1], ".").concat(e[3]), "".concat(e[2], ".").concat(
+ e[0], ".").concat(e[3], ".").concat(e[1]), "".concat(e[2], ".").concat(e[1], ".").concat(e[0], ".").concat(e[3]), "".concat(e[2], ".").concat(
+ e[1], ".").concat(e[3], ".").concat(e[0]), "".concat(e[2], ".").concat(e[3], ".").concat(e[0], ".").concat(e[1]), "".concat(e[2], ".").concat(
+ e[3], ".").concat(e[1], ".").concat(e[0]), "".concat(e[3], ".").concat(e[0], ".").concat(e[1], ".").concat(e[2]), "".concat(e[3], ".").concat(
+ e[0], ".").concat(e[2], ".").concat(e[1]), "".concat(e[3], ".").concat(e[1], ".").concat(e[0], ".").concat(e[2]), "".concat(e[3], ".").concat(
+ e[1], ".").concat(e[2], ".").concat(e[0]), "".concat(e[3], ".").concat(e[2], ".").concat(e[0], ".").concat(e[1]), "".concat(e[3], ".").concat(
+ e[2], ".").concat(e[1], ".").concat(e[0])];
+}
+function l7(e) {
+ if (e.length === 0 || e.length === 1) return e;
+ var t = e.join(".");
+ return bs[t] || (bs[t] = i7(e)), bs[t];
+}
+function s7(e) {
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 ? arguments[2] : void 0, n = e.filter(
+ function(i) {
+ return i !== "token";
+ }), o = l7(n);
+ return o.reduce(function(i, l) {
+ return cn(cn({}, i), r[l]);
+ }, t);
+}
+function Ap(e) {
+ return e.join(" ");
+}
+function u7(e, t) {
+ var r = 0;
+ return function(n) {
+ return r += 1, n.map(function(o, i) {
+ return yr({
+ node: o,
+ stylesheet: e,
+ useInlineStyles: t,
+ key: "code-segment-".concat(r, "-").concat(i)
+ });
+ });
+ };
+}
+function yr(e) {
+ var t = e.node, r = e.stylesheet, n = e.style, o = n === void 0 ? {} : n, i = e.useInlineStyles, l = e.key, u = t.properties, c = t.type, p = t.
+ tagName, d = t.value;
+ if (c === "text")
+ return d;
+ if (p) {
+ var h = u7(r, i), f;
+ if (!i)
+ f = cn(cn({}, u), {}, {
+ className: Ap(u.className)
+ });
+ else {
+ var v = Object.keys(r).reduce(function(y, w) {
+ return w.split(".").forEach(function(D) {
+ y.includes(D) || y.push(D);
+ }), y;
+ }, []), b = u.className && u.className.includes("token") ? ["token"] : [], m = u.className && b.concat(u.className.filter(function(y) {
+ return !v.includes(y);
+ }));
+ f = cn(cn({}, u), {}, {
+ className: Ap(m) || void 0,
+ style: s7(u.className, Object.assign({}, u.style, o), r)
+ });
+ }
+ var g = h(t.children);
+ return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(p, $({
+ key: l
+ }, f), g);
+ }
+}
+var bs, ys = F(() => {
+ tt();
+ ws();
+ a(Rp, "ownKeys");
+ a(cn, "_objectSpread");
+ a(i7, "powerSetPermutations");
+ bs = {};
+ a(l7, "getClassNameCombinations");
+ a(s7, "createStyleObject");
+ a(Ap, "createClassNameString");
+ a(u7, "createChildren");
+ a(yr, "createElement");
+});
+
+// ../node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js
+var Fp, kp = F(() => {
+ Fp = /* @__PURE__ */ a(function(e, t) {
+ var r = e.listLanguages();
+ return r.indexOf(t) !== -1;
+ }, "default");
+});
+
+// ../node_modules/react-syntax-highlighter/dist/esm/highlight.js
+
+function Tp(e, t) {
+ var r = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var n = Object.getOwnPropertySymbols(e);
+ t && (n = n.filter(function(o) {
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
+ })), r.push.apply(r, n);
+ }
+ return r;
+}
+function mt(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var r = arguments[t] != null ? arguments[t] : {};
+ t % 2 ? Tp(Object(r), !0).forEach(function(n) {
+ oi(e, n, r[n]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Tp(Object(r)).forEach(function(n) {
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
+ });
+ }
+ return e;
+}
+function d7(e) {
+ return e.match(p7);
+}
+function f7(e) {
+ var t = e.lines, r = e.startingLineNumber, n = e.style;
+ return t.map(function(o, i) {
+ var l = i + r;
+ return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", {
+ key: "line-".concat(i),
+ className: "react-syntax-highlighter-line-number",
+ style: typeof n == "function" ? n(l) : n
+ }, "".concat(l, `
+`));
+ });
+}
+function h7(e) {
+ var t = e.codeString, r = e.codeStyle, n = e.containerStyle, o = n === void 0 ? {
+ float: "left",
+ paddingRight: "10px"
+ } : n, i = e.numberStyle, l = i === void 0 ? {} : i, u = e.startingLineNumber;
+ return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("code", {
+ style: Object.assign({}, r, o)
+ }, f7({
+ lines: t.replace(/\n$/, "").split(`
+`),
+ style: l,
+ startingLineNumber: u
+ }));
+}
+function m7(e) {
+ return "".concat(e.toString().length, ".25em");
+}
+function Lp(e, t) {
+ return {
+ type: "element",
+ tagName: "span",
+ properties: {
+ key: "line-number--".concat(e),
+ className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
+ style: t
+ },
+ children: [{
+ type: "text",
+ value: e
+ }]
+ };
+}
+function Bp(e, t, r) {
+ var n = {
+ display: "inline-block",
+ minWidth: m7(r),
+ paddingRight: "1em",
+ textAlign: "right",
+ userSelect: "none"
+ }, o = typeof e == "function" ? e(t) : e, i = mt(mt({}, n), o);
+ return i;
+}
+function ai(e) {
+ var t = e.children, r = e.lineNumber, n = e.lineNumberStyle, o = e.largestLineNumber, i = e.showInlineLineNumbers, l = e.lineProps, u = l ===
+ void 0 ? {} : l, c = e.className, p = c === void 0 ? [] : c, d = e.showLineNumbers, h = e.wrapLongLines, f = typeof u == "function" ? u(r) :
+ u;
+ if (f.className = p, r && i) {
+ var v = Bp(n, r, o);
+ t.unshift(Lp(r, v));
+ }
+ return h & d && (f.style = mt(mt({}, f.style), {}, {
+ display: "flex"
+ })), {
+ type: "element",
+ tagName: "span",
+ properties: f,
+ children: t
+ };
+}
+function Ip(e) {
+ for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
+ [], n = 0; n < e.length; n++) {
+ var o = e[n];
+ if (o.type === "text")
+ r.push(ai({
+ children: [o],
+ className: yp(new Set(t))
+ }));
+ else if (o.children) {
+ var i = t.concat(o.properties.className);
+ Ip(o.children, i).forEach(function(l) {
+ return r.push(l);
+ });
+ }
+ }
+ return r;
+}
+function g7(e, t, r, n, o, i, l, u, c) {
+ var p, d = Ip(e.value), h = [], f = -1, v = 0;
+ function b(C, E) {
+ var S = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
+ return ai({
+ children: C,
+ lineNumber: E,
+ lineNumberStyle: u,
+ largestLineNumber: l,
+ showInlineLineNumbers: o,
+ lineProps: r,
+ className: S,
+ showLineNumbers: n,
+ wrapLongLines: c
+ });
+ }
+ a(b, "createWrappedLine");
+ function m(C, E) {
+ if (n && E && o) {
+ var S = Bp(u, E, l);
+ C.unshift(Lp(E, S));
+ }
+ return C;
+ }
+ a(m, "createUnwrappedLine");
+ function g(C, E) {
+ var S = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
+ return t || S.length > 0 ? b(C, E, S) : m(C, E);
+ }
+ a(g, "createLine");
+ for (var y = /* @__PURE__ */ a(function() {
+ var E = d[v], S = E.children[0].value, R = d7(S);
+ if (R) {
+ var A = S.split(`
+`);
+ A.forEach(function(k, I) {
+ var H = n && h.length + i, M = {
+ type: "text",
+ value: "".concat(k, `
+`)
+ };
+ if (I === 0) {
+ var W = d.slice(f + 1, v).concat(ai({
+ children: [M],
+ className: E.properties.className
+ })), T = g(W, H);
+ h.push(T);
+ } else if (I === A.length - 1) {
+ var L = d[v + 1] && d[v + 1].children && d[v + 1].children[0], P = {
+ type: "text",
+ value: "".concat(k)
+ };
+ if (L) {
+ var U = ai({
+ children: [P],
+ className: E.properties.className
+ });
+ d.splice(v + 1, 0, U);
+ } else {
+ var N = [P], G = g(N, H, E.properties.className);
+ h.push(G);
+ }
+ } else {
+ var z = [M], K = g(z, H, E.properties.className);
+ h.push(K);
+ }
+ }), f = v;
+ }
+ v++;
+ }, "_loop"); v < d.length; )
+ y();
+ if (f !== d.length - 1) {
+ var w = d.slice(f + 1, d.length);
+ if (w && w.length) {
+ var D = n && h.length + i, x = g(w, D);
+ h.push(x);
+ }
+ }
+ return t ? h : (p = []).concat.apply(p, h);
+}
+function v7(e) {
+ var t = e.rows, r = e.stylesheet, n = e.useInlineStyles;
+ return t.map(function(o, i) {
+ return yr({
+ node: o,
+ stylesheet: r,
+ useInlineStyles: n,
+ key: "code-segement".concat(i)
+ });
+ });
+}
+function Mp(e) {
+ return e && typeof e.highlightAuto < "u";
+}
+function w7(e) {
+ var t = e.astGenerator, r = e.language, n = e.code, o = e.defaultCodeValue;
+ if (Mp(t)) {
+ var i = Fp(t, r);
+ return r === "text" ? {
+ value: o,
+ language: "text"
+ } : i ? t.highlight(r, n) : t.highlightAuto(n);
+ }
+ try {
+ return r && r !== "text" ? {
+ value: t.highlight(n, r)
+ } : {
+ value: o
+ };
+ } catch {
+ return {
+ value: o
+ };
+ }
+}
+function Ds(e, t) {
+ return /* @__PURE__ */ a(function(n) {
+ var o = n.language, i = n.children, l = n.style, u = l === void 0 ? t : l, c = n.customStyle, p = c === void 0 ? {} : c, d = n.codeTagProps,
+ h = d === void 0 ? {
+ className: o ? "language-".concat(o) : void 0,
+ style: mt(mt({}, u['code[class*="language-"]']), u['code[class*="language-'.concat(o, '"]')])
+ } : d, f = n.useInlineStyles, v = f === void 0 ? !0 : f, b = n.showLineNumbers, m = b === void 0 ? !1 : b, g = n.showInlineLineNumbers, y = g ===
+ void 0 ? !0 : g, w = n.startingLineNumber, D = w === void 0 ? 1 : w, x = n.lineNumberContainerStyle, C = n.lineNumberStyle, E = C === void 0 ?
+ {} : C, S = n.wrapLines, R = n.wrapLongLines, A = R === void 0 ? !1 : R, k = n.lineProps, I = k === void 0 ? {} : k, H = n.renderer, M = n.
+ PreTag, W = M === void 0 ? "pre" : M, T = n.CodeTag, L = T === void 0 ? "code" : T, P = n.code, U = P === void 0 ? (Array.isArray(i) ? i[0] :
+ i) || "" : P, N = n.astGenerator, G = cp(n, c7);
+ N = N || e;
+ var z = m ? /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(h7, {
+ containerStyle: x,
+ codeStyle: h.style || {},
+ numberStyle: E,
+ startingLineNumber: D,
+ codeString: U
+ }) : null, K = u.hljs || u['pre[class*="language-"]'] || {
+ backgroundColor: "#fff"
+ }, Te = Mp(N) ? "hljs" : "prismjs", ve = v ? Object.assign({}, G, {
+ style: Object.assign({}, K, p)
+ }) : Object.assign({}, G, {
+ className: G.className ? "".concat(Te, " ").concat(G.className) : Te,
+ style: Object.assign({}, p)
+ });
+ if (A ? h.style = mt(mt({}, h.style), {}, {
+ whiteSpace: "pre-wrap"
+ }) : h.style = mt(mt({}, h.style), {}, {
+ whiteSpace: "pre"
+ }), !N)
+ return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(W, ve, z, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(L, h, U));
+ (S === void 0 && H || A) && (S = !0), H = H || v7;
+ var de = [{
+ type: "text",
+ value: U
+ }], Ce = w7({
+ astGenerator: N,
+ language: o,
+ code: U,
+ defaultCodeValue: de
+ });
+ Ce.language === null && (Ce.value = de);
+ var Le = Ce.value.length + D, Be = g7(Ce, S, I, m, y, D, Le, E, A);
+ return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(W, ve, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(L, h, !y && z, H({
+ rows: Be,
+ stylesheet: u,
+ useInlineStyles: v
+ })));
+ }, "SyntaxHighlighter");
+}
+var c7, p7, _p = F(() => {
+ pp();
+ Dp();
+ ws();
+ ys();
+ kp();
+ c7 = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "star\
+tingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "\
+code", "astGenerator"];
+ a(Tp, "ownKeys");
+ a(mt, "_objectSpread");
+ p7 = /\n/g;
+ a(d7, "getNewLines");
+ a(f7, "getAllLineNumbers");
+ a(h7, "AllLineNumbers");
+ a(m7, "getEmWidthOfNumber");
+ a(Lp, "getInlineLineNumber");
+ a(Bp, "assembleLineNumberStyles");
+ a(ai, "createLineElement");
+ a(Ip, "flattenCodeTree");
+ a(g7, "processLines");
+ a(v7, "defaultRenderer");
+ a(Mp, "isHighlightJs");
+ a(w7, "getCodeTree");
+ a(Ds, "default");
+});
+
+// ../node_modules/xtend/immutable.js
+var Hp = _((rH, Pp) => {
+ Pp.exports = y7;
+ var b7 = Object.prototype.hasOwnProperty;
+ function y7() {
+ for (var e = {}, t = 0; t < arguments.length; t++) {
+ var r = arguments[t];
+ for (var n in r)
+ b7.call(r, n) && (e[n] = r[n]);
+ }
+ return e;
+ }
+ a(y7, "extend");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/schema.js
+var Cs = _((oH, $p) => {
+ "use strict";
+ $p.exports = zp;
+ var xs = zp.prototype;
+ xs.space = null;
+ xs.normal = {};
+ xs.property = {};
+ function zp(e, t, r) {
+ this.property = e, this.normal = t, r && (this.space = r);
+ }
+ a(zp, "Schema");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/merge.js
+var jp = _((iH, Np) => {
+ "use strict";
+ var Op = Hp(), D7 = Cs();
+ Np.exports = x7;
+ function x7(e) {
+ for (var t = e.length, r = [], n = [], o = -1, i, l; ++o < t; )
+ i = e[o], r.push(i.property), n.push(i.normal), l = i.space;
+ return new D7(
+ Op.apply(null, r),
+ Op.apply(null, n),
+ l
+ );
+ }
+ a(x7, "merge");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/normalize.js
+var ii = _((sH, Vp) => {
+ "use strict";
+ Vp.exports = C7;
+ function C7(e) {
+ return e.toLowerCase();
+ }
+ a(C7, "normalize");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/info.js
+var Es = _((cH, Wp) => {
+ "use strict";
+ Wp.exports = qp;
+ var We = qp.prototype;
+ We.space = null;
+ We.attribute = null;
+ We.property = null;
+ We.boolean = !1;
+ We.booleanish = !1;
+ We.overloadedBoolean = !1;
+ We.number = !1;
+ We.commaSeparated = !1;
+ We.spaceSeparated = !1;
+ We.commaOrSpaceSeparated = !1;
+ We.mustUseProperty = !1;
+ We.defined = !1;
+ function qp(e, t) {
+ this.property = e, this.attribute = t;
+ }
+ a(qp, "Info");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/types.js
+var li = _((Kt) => {
+ "use strict";
+ var E7 = 0;
+ Kt.boolean = xr();
+ Kt.booleanish = xr();
+ Kt.overloadedBoolean = xr();
+ Kt.number = xr();
+ Kt.spaceSeparated = xr();
+ Kt.commaSeparated = xr();
+ Kt.commaOrSpaceSeparated = xr();
+ function xr() {
+ return Math.pow(2, ++E7);
+ }
+ a(xr, "increment");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/defined-info.js
+var Rs = _((hH, Kp) => {
+ "use strict";
+ var Xp = Es(), Up = li();
+ Kp.exports = Ss;
+ Ss.prototype = new Xp();
+ Ss.prototype.defined = !0;
+ var Yp = [
+ "boolean",
+ "booleanish",
+ "overloadedBoolean",
+ "number",
+ "commaSeparated",
+ "spaceSeparated",
+ "commaOrSpaceSeparated"
+ ], S7 = Yp.length;
+ function Ss(e, t, r, n) {
+ var o = -1, i;
+ for (Gp(this, "space", n), Xp.call(this, e, t); ++o < S7; )
+ i = Yp[o], Gp(this, i, (r & Up[i]) === Up[i]);
+ }
+ a(Ss, "DefinedInfo");
+ function Gp(e, t, r) {
+ r && (e[t] = r);
+ }
+ a(Gp, "mark");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/create.js
+var pn = _((gH, Jp) => {
+ "use strict";
+ var Zp = ii(), R7 = Cs(), A7 = Rs();
+ Jp.exports = F7;
+ function F7(e) {
+ var t = e.space, r = e.mustUseProperty || [], n = e.attributes || {}, o = e.properties, i = e.transform, l = {}, u = {}, c, p;
+ for (c in o)
+ p = new A7(
+ c,
+ i(n, c),
+ o[c],
+ t
+ ), r.indexOf(c) !== -1 && (p.mustUseProperty = !0), l[c] = p, u[Zp(c)] = c, u[Zp(p.attribute)] = c;
+ return new R7(l, u, t);
+ }
+ a(F7, "create");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/xlink.js
+var ed = _((wH, Qp) => {
+ "use strict";
+ var k7 = pn();
+ Qp.exports = k7({
+ space: "xlink",
+ transform: T7,
+ properties: {
+ xLinkActuate: null,
+ xLinkArcRole: null,
+ xLinkHref: null,
+ xLinkRole: null,
+ xLinkShow: null,
+ xLinkTitle: null,
+ xLinkType: null
+ }
+ });
+ function T7(e, t) {
+ return "xlink:" + t.slice(5).toLowerCase();
+ }
+ a(T7, "xlinkTransform");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/xml.js
+var rd = _((yH, td) => {
+ "use strict";
+ var L7 = pn();
+ td.exports = L7({
+ space: "xml",
+ transform: B7,
+ properties: {
+ xmlLang: null,
+ xmlBase: null,
+ xmlSpace: null
+ }
+ });
+ function B7(e, t) {
+ return "xml:" + t.slice(3).toLowerCase();
+ }
+ a(B7, "xmlTransform");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/case-sensitive-transform.js
+var od = _((xH, nd) => {
+ "use strict";
+ nd.exports = I7;
+ function I7(e, t) {
+ return t in e ? e[t] : t;
+ }
+ a(I7, "caseSensitiveTransform");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/util/case-insensitive-transform.js
+var As = _((EH, ad) => {
+ "use strict";
+ var M7 = od();
+ ad.exports = _7;
+ function _7(e, t) {
+ return M7(e, t.toLowerCase());
+ }
+ a(_7, "caseInsensitiveTransform");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/xmlns.js
+var ld = _((RH, id) => {
+ "use strict";
+ var P7 = pn(), H7 = As();
+ id.exports = P7({
+ space: "xmlns",
+ attributes: {
+ xmlnsxlink: "xmlns:xlink"
+ },
+ transform: H7,
+ properties: {
+ xmlns: null,
+ xmlnsXLink: null
+ }
+ });
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/aria.js
+var ud = _((AH, sd) => {
+ "use strict";
+ var Fs = li(), z7 = pn(), Me = Fs.booleanish, Ue = Fs.number, Cr = Fs.spaceSeparated;
+ sd.exports = z7({
+ transform: $7,
+ properties: {
+ ariaActiveDescendant: null,
+ ariaAtomic: Me,
+ ariaAutoComplete: null,
+ ariaBusy: Me,
+ ariaChecked: Me,
+ ariaColCount: Ue,
+ ariaColIndex: Ue,
+ ariaColSpan: Ue,
+ ariaControls: Cr,
+ ariaCurrent: null,
+ ariaDescribedBy: Cr,
+ ariaDetails: null,
+ ariaDisabled: Me,
+ ariaDropEffect: Cr,
+ ariaErrorMessage: null,
+ ariaExpanded: Me,
+ ariaFlowTo: Cr,
+ ariaGrabbed: Me,
+ ariaHasPopup: null,
+ ariaHidden: Me,
+ ariaInvalid: null,
+ ariaKeyShortcuts: null,
+ ariaLabel: null,
+ ariaLabelledBy: Cr,
+ ariaLevel: Ue,
+ ariaLive: null,
+ ariaModal: Me,
+ ariaMultiLine: Me,
+ ariaMultiSelectable: Me,
+ ariaOrientation: null,
+ ariaOwns: Cr,
+ ariaPlaceholder: null,
+ ariaPosInSet: Ue,
+ ariaPressed: Me,
+ ariaReadOnly: Me,
+ ariaRelevant: null,
+ ariaRequired: Me,
+ ariaRoleDescription: Cr,
+ ariaRowCount: Ue,
+ ariaRowIndex: Ue,
+ ariaRowSpan: Ue,
+ ariaSelected: Me,
+ ariaSetSize: Ue,
+ ariaSort: null,
+ ariaValueMax: Ue,
+ ariaValueMin: Ue,
+ ariaValueNow: Ue,
+ ariaValueText: null,
+ role: null
+ }
+ });
+ function $7(e, t) {
+ return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
+ }
+ a($7, "ariaTransform");
+});
+
+// ../node_modules/hastscript/node_modules/property-information/lib/html.js
+var pd = _((kH, cd) => {
+ "use strict";
+ var dn = li(), O7 = pn(), N7 = As(), V = dn.boolean, j7 = dn.overloadedBoolean, ra = dn.booleanish, Z = dn.number, Re = dn.spaceSeparated,
+ si = dn.commaSeparated;
+ cd.exports = O7({
+ space: "html",
+ attributes: {
+ acceptcharset: "accept-charset",
+ classname: "class",
+ htmlfor: "for",
+ httpequiv: "http-equiv"
+ },
+ transform: N7,
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
+ properties: {
+ // Standard Properties.
+ abbr: null,
+ accept: si,
+ acceptCharset: Re,
+ accessKey: Re,
+ action: null,
+ allow: null,
+ allowFullScreen: V,
+ allowPaymentRequest: V,
+ allowUserMedia: V,
+ alt: null,
+ as: null,
+ async: V,
+ autoCapitalize: null,
+ autoComplete: Re,
+ autoFocus: V,
+ autoPlay: V,
+ capture: V,
+ charSet: null,
+ checked: V,
+ cite: null,
+ className: Re,
+ cols: Z,
+ colSpan: null,
+ content: null,
+ contentEditable: ra,
+ controls: V,
+ controlsList: Re,
+ coords: Z | si,
+ crossOrigin: null,
+ data: null,
+ dateTime: null,
+ decoding: null,
+ default: V,
+ defer: V,
+ dir: null,
+ dirName: null,
+ disabled: V,
+ download: j7,
+ draggable: ra,
+ encType: null,
+ enterKeyHint: null,
+ form: null,
+ formAction: null,
+ formEncType: null,
+ formMethod: null,
+ formNoValidate: V,
+ formTarget: null,
+ headers: Re,
+ height: Z,
+ hidden: V,
+ high: Z,
+ href: null,
+ hrefLang: null,
+ htmlFor: Re,
+ httpEquiv: Re,
+ id: null,
+ imageSizes: null,
+ imageSrcSet: si,
+ inputMode: null,
+ integrity: null,
+ is: null,
+ isMap: V,
+ itemId: null,
+ itemProp: Re,
+ itemRef: Re,
+ itemScope: V,
+ itemType: Re,
+ kind: null,
+ label: null,
+ lang: null,
+ language: null,
+ list: null,
+ loading: null,
+ loop: V,
+ low: Z,
+ manifest: null,
+ max: null,
+ maxLength: Z,
+ media: null,
+ method: null,
+ min: null,
+ minLength: Z,
+ multiple: V,
+ muted: V,
+ name: null,
+ nonce: null,
+ noModule: V,
+ noValidate: V,
+ onAbort: null,
+ onAfterPrint: null,
+ onAuxClick: null,
+ onBeforePrint: null,
+ onBeforeUnload: null,
+ onBlur: null,
+ onCancel: null,
+ onCanPlay: null,
+ onCanPlayThrough: null,
+ onChange: null,
+ onClick: null,
+ onClose: null,
+ onContextMenu: null,
+ onCopy: null,
+ onCueChange: null,
+ onCut: null,
+ onDblClick: null,
+ onDrag: null,
+ onDragEnd: null,
+ onDragEnter: null,
+ onDragExit: null,
+ onDragLeave: null,
+ onDragOver: null,
+ onDragStart: null,
+ onDrop: null,
+ onDurationChange: null,
+ onEmptied: null,
+ onEnded: null,
+ onError: null,
+ onFocus: null,
+ onFormData: null,
+ onHashChange: null,
+ onInput: null,
+ onInvalid: null,
+ onKeyDown: null,
+ onKeyPress: null,
+ onKeyUp: null,
+ onLanguageChange: null,
+ onLoad: null,
+ onLoadedData: null,
+ onLoadedMetadata: null,
+ onLoadEnd: null,
+ onLoadStart: null,
+ onMessage: null,
+ onMessageError: null,
+ onMouseDown: null,
+ onMouseEnter: null,
+ onMouseLeave: null,
+ onMouseMove: null,
+ onMouseOut: null,
+ onMouseOver: null,
+ onMouseUp: null,
+ onOffline: null,
+ onOnline: null,
+ onPageHide: null,
+ onPageShow: null,
+ onPaste: null,
+ onPause: null,
+ onPlay: null,
+ onPlaying: null,
+ onPopState: null,
+ onProgress: null,
+ onRateChange: null,
+ onRejectionHandled: null,
+ onReset: null,
+ onResize: null,
+ onScroll: null,
+ onSecurityPolicyViolation: null,
+ onSeeked: null,
+ onSeeking: null,
+ onSelect: null,
+ onSlotChange: null,
+ onStalled: null,
+ onStorage: null,
+ onSubmit: null,
+ onSuspend: null,
+ onTimeUpdate: null,
+ onToggle: null,
+ onUnhandledRejection: null,
+ onUnload: null,
+ onVolumeChange: null,
+ onWaiting: null,
+ onWheel: null,
+ open: V,
+ optimum: Z,
+ pattern: null,
+ ping: Re,
+ placeholder: null,
+ playsInline: V,
+ poster: null,
+ preload: null,
+ readOnly: V,
+ referrerPolicy: null,
+ rel: Re,
+ required: V,
+ reversed: V,
+ rows: Z,
+ rowSpan: Z,
+ sandbox: Re,
+ scope: null,
+ scoped: V,
+ seamless: V,
+ selected: V,
+ shape: null,
+ size: Z,
+ sizes: null,
+ slot: null,
+ span: Z,
+ spellCheck: ra,
+ src: null,
+ srcDoc: null,
+ srcLang: null,
+ srcSet: si,
+ start: Z,
+ step: null,
+ style: null,
+ tabIndex: Z,
+ target: null,
+ title: null,
+ translate: null,
+ type: null,
+ typeMustMatch: V,
+ useMap: null,
+ value: ra,
+ width: Z,
+ wrap: null,
+ // Legacy.
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
+ align: null,
+ // Several. Use CSS `text-align` instead,
+ aLink: null,
+ // ``. Use CSS `a:active {color}` instead
+ archive: Re,
+ // `