diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/js/dist/components.js --- a/wp/wp-includes/js/dist/components.js Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/js/dist/components.js Fri Sep 05 18:40:08 2025 +0200 @@ -1,2453 +1,149 @@ -/******/ (function() { // webpackBootstrap +/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 5096: -/***/ (function(module) { - -"use strict"; - - -function noop() { - return null; -} - -noop.isRequired = noop; - -function noopThunk() { - return noop; -} - -module.exports = { - and: noopThunk, - between: noopThunk, - booleanSome: noopThunk, - childrenHavePropXorChildren: noopThunk, - childrenOf: noopThunk, - childrenOfType: noopThunk, - childrenSequenceOf: noopThunk, - componentWithName: noopThunk, - disallowedIf: noopThunk, - elementType: noopThunk, - empty: noopThunk, - explicitNull: noopThunk, - forbidExtraProps: Object, - integer: noopThunk, - keysOf: noopThunk, - mutuallyExclusiveProps: noopThunk, - mutuallyExclusiveTrueProps: noopThunk, - nChildren: noopThunk, - nonNegativeInteger: noop, - nonNegativeNumber: noopThunk, - numericString: noopThunk, - object: noopThunk, - or: noopThunk, - predicate: noopThunk, - range: noopThunk, - ref: noopThunk, - requiredBy: noopThunk, - restrictedProp: noopThunk, - sequenceOf: noopThunk, - shape: noopThunk, - stringEndsWith: noopThunk, - stringStartsWith: noopThunk, - uniqueArray: noopThunk, - uniqueArrayOf: noopThunk, - valuesOf: noopThunk, - withShape: noopThunk -}; - - -/***/ }), - -/***/ 4882: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -module.exports = true ? __webpack_require__(5096) : 0; - - - -/***/ }), - -/***/ 4485: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var ArraySpeciesCreate = __webpack_require__(1539); -var FlattenIntoArray = __webpack_require__(6739); -var Get = __webpack_require__(6448); -var ToIntegerOrInfinity = __webpack_require__(1723); -var ToLength = __webpack_require__(6840); -var ToObject = __webpack_require__(1283); - -module.exports = function flat() { - var O = ToObject(this); - var sourceLen = ToLength(Get(O, 'length')); - - var depthNum = 1; - if (arguments.length > 0 && typeof arguments[0] !== 'undefined') { - depthNum = ToIntegerOrInfinity(arguments[0]); - } - - var A = ArraySpeciesCreate(O, 0); - FlattenIntoArray(A, O, sourceLen, 0, depthNum); - return A; -}; - - -/***/ }), - -/***/ 116: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var define = __webpack_require__(9170); -var callBind = __webpack_require__(9961); - -var implementation = __webpack_require__(4485); -var getPolyfill = __webpack_require__(616); -var polyfill = getPolyfill(); -var shim = __webpack_require__(2059); - -var boundFlat = callBind(polyfill); - -define(boundFlat, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = boundFlat; - - -/***/ }), - -/***/ 9630: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(1801); - -var callBind = __webpack_require__(9961); - -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); - -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; - - -/***/ }), - -/***/ 9961: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__(1930); -var GetIntrinsic = __webpack_require__(1801); - -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); - -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); -var $max = GetIntrinsic('%Math.max%'); - -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} - -module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty( - func, - 'length', - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } - } - return func; -}; - -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; - -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} - - -/***/ }), - -/***/ 4219: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 66: +/***/ ((module) => { "use strict"; -var undefined; - -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __webpack_require__(9828)(); - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __webpack_require__(1930); -var hasOwn = __webpack_require__(9284); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); -var $strSlice = bind.call(Function.call, String.prototype.slice); -var $exec = bind.call(Function.call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/g, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); +var isMergeableObject = function isMergeableObject(value) { + return isNonNullObject(value) + && !isSpecial(value) +}; + +function isNonNullObject(value) { + return !!value && typeof value === 'object' +} + +function isSpecial(value) { + var stringValue = Object.prototype.toString.call(value); + + return stringValue === '[object RegExp]' + || stringValue === '[object Date]' + || isReactElement(value) +} + +// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 +var canUseSymbol = typeof Symbol === 'function' && Symbol.for; +var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; + +function isReactElement(value) { + return value.$$typeof === REACT_ELEMENT_TYPE +} + +function emptyTarget(val) { + return Array.isArray(val) ? [] : {} +} + +function cloneUnlessOtherwiseSpecified(value, options) { + return (options.clone !== false && options.isMergeableObject(value)) + ? deepmerge(emptyTarget(value), value, options) + : value +} + +function defaultArrayMerge(target, source, options) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options) + }) +} + +function getMergeFunction(key, options) { + if (!options.customMerge) { + return deepmerge } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } + var customMerge = options.customMerge(key); + return typeof customMerge === 'function' ? customMerge : deepmerge +} + +function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols + ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return Object.propertyIsEnumerable.call(target, symbol) + }) + : [] +} + +function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) +} + +function propertyIsOnObject(object, property) { + try { + return property in object + } catch(_) { + return false } - return value; -}; - - -/***/ }), - -/***/ 9828: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __webpack_require__(5960); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - - -/***/ }), - -/***/ 5960: -/***/ (function(module) { - -"use strict"; - - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } +} + +// Protects from prototype poisoning and unexpected merging up the prototype chain. +function propertyIsUnsafe(target, key) { + return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet, + && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain, + && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable. +} + +function mergeObject(target, source, options) { + var destination = {}; + if (options.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); + }); } - - return true; -}; - - -/***/ }), - -/***/ 4363: -/***/ (function(module) { - -"use strict"; - - -var fnToStr = Function.prototype.toString; -var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; -var badArrayLike; -var isCallableMarker; -if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { - try { - badArrayLike = Object.defineProperty({}, 'length', { - get: function () { - throw isCallableMarker; - } - }); - isCallableMarker = {}; - // eslint-disable-next-line no-throw-literal - reflectApply(function () { throw 42; }, null, badArrayLike); - } catch (_) { - if (_ !== isCallableMarker) { - reflectApply = null; + getKeys(source).forEach(function(key) { + if (propertyIsUnsafe(target, key)) { + return + } + + if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) { + destination[key] = getMergeFunction(key, options)(target[key], source[key], options); + } else { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); } - } -} else { - reflectApply = null; -} - -var constructorRegex = /^\s*class\b/; -var isES6ClassFn = function isES6ClassFunction(value) { - try { - var fnStr = fnToStr.call(value); - return constructorRegex.test(fnStr); - } catch (e) { - return false; // not a function - } -}; - -var tryFunctionObject = function tryFunctionToStr(value) { - try { - if (isES6ClassFn(value)) { return false; } - fnToStr.call(value); - return true; - } catch (e) { - return false; - } -}; -var toStr = Object.prototype.toString; -var fnClass = '[object Function]'; -var genClass = '[object GeneratorFunction]'; -var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` -/* globals document: false */ -var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {}; - -module.exports = reflectApply - ? function isCallable(value) { - if (value === documentDotAll) { return true; } - if (!value) { return false; } - if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } - try { - reflectApply(value, null, badArrayLike); - } catch (e) { - if (e !== isCallableMarker) { return false; } - } - return !isES6ClassFn(value); + }); + return destination +} + +function deepmerge(target, source, options) { + options = options || {}; + options.arrayMerge = options.arrayMerge || defaultArrayMerge; + options.isMergeableObject = options.isMergeableObject || isMergeableObject; + // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() + // implementations can use it. The caller may not replace it. + options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; + + var sourceIsArray = Array.isArray(source); + var targetIsArray = Array.isArray(target); + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; + + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options) + } else if (sourceIsArray) { + return options.arrayMerge(target, source, options) + } else { + return mergeObject(target, source, options) } - : function isCallable(value) { - if (value === documentDotAll) { return true; } - if (!value) { return false; } - if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } - if (hasToStringTag) { return tryFunctionObject(value); } - if (isES6ClassFn(value)) { return false; } - var strClass = toStr.call(value); - return strClass === fnClass || strClass === genClass; - }; - - -/***/ }), - -/***/ 4221: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var callBound = __webpack_require__(9630); -var hasToStringTag = __webpack_require__(4111)(); -var has; -var $exec; -var isRegexMarker; -var badStringifier; - -if (hasToStringTag) { - has = callBound('Object.prototype.hasOwnProperty'); - $exec = callBound('RegExp.prototype.exec'); - isRegexMarker = {}; - - var throwRegexMarker = function () { - throw isRegexMarker; - }; - badStringifier = { - toString: throwRegexMarker, - valueOf: throwRegexMarker - }; - - if (typeof Symbol.toPrimitive === 'symbol') { - badStringifier[Symbol.toPrimitive] = throwRegexMarker; +} + +deepmerge.all = function deepmergeAll(array, options) { + if (!Array.isArray(array)) { + throw new Error('first argument should be an array') } -} - -var $toString = callBound('Object.prototype.toString'); -var gOPD = Object.getOwnPropertyDescriptor; -var regexClass = '[object RegExp]'; - -module.exports = hasToStringTag - // eslint-disable-next-line consistent-return - ? function isRegex(value) { - if (!value || typeof value !== 'object') { - return false; - } - - var descriptor = gOPD(value, 'lastIndex'); - var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); - if (!hasLastIndexDataProperty) { - return false; - } - - try { - $exec(value, badStringifier); - } catch (e) { - return e === isRegexMarker; - } - } - : function isRegex(value) { - // In older browsers, typeof regex incorrectly returns 'function' - if (!value || (typeof value !== 'object' && typeof value !== 'function')) { - return false; - } - - return $toString(value) === regexClass; - }; + + return array.reduce(function(prev, next) { + return deepmerge(prev, next, options) + }, {}) +}; + +var deepmerge_1 = deepmerge; + +module.exports = deepmerge_1; /***/ }), -/***/ 3205: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var hasMap = typeof Map === 'function' && Map.prototype; -var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; -var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; -var mapForEach = hasMap && Map.prototype.forEach; -var hasSet = typeof Set === 'function' && Set.prototype; -var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; -var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; -var setForEach = hasSet && Set.prototype.forEach; -var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; -var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; -var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; -var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; -var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; -var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; -var booleanValueOf = Boolean.prototype.valueOf; -var objectToString = Object.prototype.toString; -var functionToString = Function.prototype.toString; -var $match = String.prototype.match; -var $slice = String.prototype.slice; -var $replace = String.prototype.replace; -var $toUpperCase = String.prototype.toUpperCase; -var $toLowerCase = String.prototype.toLowerCase; -var $test = RegExp.prototype.test; -var $concat = Array.prototype.concat; -var $join = Array.prototype.join; -var $arrSlice = Array.prototype.slice; -var $floor = Math.floor; -var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; -var gOPS = Object.getOwnPropertySymbols; -var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; -var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; -// ie, `has-tostringtag/shams -var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') - ? Symbol.toStringTag - : null; -var isEnumerable = Object.prototype.propertyIsEnumerable; - -var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( - [].__proto__ === Array.prototype // eslint-disable-line no-proto - ? function (O) { - return O.__proto__; // eslint-disable-line no-proto - } - : null -); - -function addNumericSeparator(num, str) { - if ( - num === Infinity - || num === -Infinity - || num !== num - || (num && num > -1000 && num < 1000) - || $test.call(/e/, str) - ) { - return str; - } - var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; - if (typeof num === 'number') { - var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) - if (int !== num) { - var intStr = String(int); - var dec = $slice.call(str, intStr.length + 1); - return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); - } - } - return $replace.call(str, sepRegex, '$&_'); -} - -var utilInspect = __webpack_require__(4080); -var inspectCustom = utilInspect.custom; -var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; - -module.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; - - if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - if ( - has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' - ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity - : opts.maxStringLength !== null - ) - ) { - throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - } - var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; - if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { - throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); - } - - if ( - has(opts, 'indent') - && opts.indent !== null - && opts.indent !== '\t' - && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) - ) { - throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); - } - if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { - throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); - } - var numericSeparator = opts.numericSeparator; - - if (typeof obj === 'undefined') { - return 'undefined'; - } - if (obj === null) { - return 'null'; - } - if (typeof obj === 'boolean') { - return obj ? 'true' : 'false'; - } - - if (typeof obj === 'string') { - return inspectString(obj, opts); - } - if (typeof obj === 'number') { - if (obj === 0) { - return Infinity / obj > 0 ? '0' : '-0'; - } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; - } - if (typeof obj === 'bigint') { - var bigIntStr = String(obj) + 'n'; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; - } - - var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; - if (typeof depth === 'undefined') { depth = 0; } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { - return isArray(obj) ? '[Array]' : '[Object]'; - } - - var indent = getIndent(opts, depth); - - if (typeof seen === 'undefined') { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return '[Circular]'; - } - - function inspect(value, from, noIndent) { - if (from) { - seen = $arrSlice.call(seen); - seen.push(from); - } - if (noIndent) { - var newOpts = { - depth: opts.depth - }; - if (has(opts, 'quoteStyle')) { - newOpts.quoteStyle = opts.quoteStyle; - } - return inspect_(value, newOpts, depth + 1, seen); - } - return inspect_(value, opts, depth + 1, seen); - } - - if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); - return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); - } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); - return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; - } - if (isElement(obj)) { - var s = '<' + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); - } - s += '>'; - if (obj.childNodes && obj.childNodes.length) { s += '...'; } - s += ''; - return s; - } - if (isArray(obj)) { - if (obj.length === 0) { return '[]'; } - var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return '[' + indentedJoin(xs, indent) + ']'; - } - return '[ ' + $join.call(xs, ', ') + ' ]'; - } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { - return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; - } - if (parts.length === 0) { return '[' + String(obj) + ']'; } - return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; - } - if (typeof obj === 'object' && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { - return obj.inspect(); - } - } - if (isMap(obj)) { - var mapParts = []; - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); - }); - return collectionOf('Map', mapSize.call(obj), mapParts, indent); - } - if (isSet(obj)) { - var setParts = []; - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); - return collectionOf('Set', setSize.call(obj), setParts, indent); - } - if (isWeakMap(obj)) { - return weakCollectionOf('WeakMap'); - } - if (isWeakSet(obj)) { - return weakCollectionOf('WeakSet'); - } - if (isWeakRef(obj)) { - return weakCollectionOf('WeakRef'); - } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); - } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); - } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); - } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); - } - if (!isDate(obj) && !isRegExp(obj)) { - var ys = arrObjKeys(obj, inspect); - var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; - var protoTag = obj instanceof Object ? '' : 'null prototype'; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; - var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; - var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); - if (ys.length === 0) { return tag + '{}'; } - if (indent) { - return tag + '{' + indentedJoin(ys, indent) + '}'; - } - return tag + '{ ' + $join.call(ys, ', ') + ' }'; - } - return String(obj); -}; - -function wrapQuotes(s, defaultStyle, opts) { - var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; - return quoteChar + s + quoteChar; -} - -function quote(s) { - return $replace.call(String(s), /"/g, '"'); -} - -function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } -function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } - -// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives -function isSymbol(obj) { - if (hasShammedSymbols) { - return obj && typeof obj === 'object' && obj instanceof Symbol; - } - if (typeof obj === 'symbol') { - return true; - } - if (!obj || typeof obj !== 'object' || !symToString) { - return false; - } - try { - symToString.call(obj); - return true; - } catch (e) {} - return false; -} - -function isBigInt(obj) { - if (!obj || typeof obj !== 'object' || !bigIntValueOf) { - return false; - } - try { - bigIntValueOf.call(obj); - return true; - } catch (e) {} - return false; -} - -var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; -function has(obj, key) { - return hasOwn.call(obj, key); -} - -function toStr(obj) { - return objectToString.call(obj); -} - -function nameOf(f) { - if (f.name) { return f.name; } - var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); - if (m) { return m[1]; } - return null; -} - -function indexOf(xs, x) { - if (xs.indexOf) { return xs.indexOf(x); } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { return i; } - } - return -1; -} - -function isMap(x) { - if (!mapSize || !x || typeof x !== 'object') { - return false; - } - try { - mapSize.call(x); - try { - setSize.call(x); - } catch (s) { - return true; - } - return x instanceof Map; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== 'object') { - return false; - } - try { - weakMapHas.call(x, weakMapHas); - try { - weakSetHas.call(x, weakSetHas); - } catch (s) { - return true; - } - return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakRef(x) { - if (!weakRefDeref || !x || typeof x !== 'object') { - return false; - } - try { - weakRefDeref.call(x); - return true; - } catch (e) {} - return false; -} - -function isSet(x) { - if (!setSize || !x || typeof x !== 'object') { - return false; - } - try { - setSize.call(x); - try { - mapSize.call(x); - } catch (m) { - return true; - } - return x instanceof Set; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== 'object') { - return false; - } - try { - weakSetHas.call(x, weakSetHas); - try { - weakMapHas.call(x, weakMapHas); - } catch (s) { - return true; - } - return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isElement(x) { - if (!x || typeof x !== 'object') { return false; } - if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { - return true; - } - return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; -} - -function inspectString(str, opts) { - if (str.length > opts.maxStringLength) { - var remaining = str.length - opts.maxStringLength; - var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); - return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; - } - // eslint-disable-next-line no-control-regex - var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, 'single', opts); -} - -function lowbyte(c) { - var n = c.charCodeAt(0); - var x = { - 8: 'b', - 9: 't', - 10: 'n', - 12: 'f', - 13: 'r' - }[n]; - if (x) { return '\\' + x; } - return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); -} - -function markBoxed(str) { - return 'Object(' + str + ')'; -} - -function weakCollectionOf(type) { - return type + ' { ? }'; -} - -function collectionOf(type, size, entries, indent) { - var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); - return type + ' (' + size + ') {' + joinedEntries + '}'; -} - -function singleLineValues(xs) { - for (var i = 0; i < xs.length; i++) { - if (indexOf(xs[i], '\n') >= 0) { - return false; - } - } - return true; -} - -function getIndent(opts, depth) { - var baseIndent; - if (opts.indent === '\t') { - baseIndent = '\t'; - } else if (typeof opts.indent === 'number' && opts.indent > 0) { - baseIndent = $join.call(Array(opts.indent + 1), ' '); - } else { - return null; - } - return { - base: baseIndent, - prev: $join.call(Array(depth + 1), baseIndent) - }; -} - -function indentedJoin(xs, indent) { - if (xs.length === 0) { return ''; } - var lineJoiner = '\n' + indent.prev + indent.base; - return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; -} - -function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); - var xs = []; - if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; - } - } - var syms = typeof gOPS === 'function' ? gOPS(obj) : []; - var symMap; - if (hasShammedSymbols) { - symMap = {}; - for (var k = 0; k < syms.length; k++) { - symMap['$' + syms[k]] = syms[k]; - } - } - - for (var key in obj) { // eslint-disable-line no-restricted-syntax - if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { - // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section - continue; // eslint-disable-line no-restricted-syntax, no-continue - } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); - } else { - xs.push(key + ': ' + inspect(obj[key], obj)); - } - } - if (typeof gOPS === 'function') { - for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); - } - } - } - return xs; -} - - -/***/ }), - -/***/ 616: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var implementation = __webpack_require__(4485); - -module.exports = function getPolyfill() { - return Array.prototype.flat || implementation; -}; - - -/***/ }), - -/***/ 2059: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var define = __webpack_require__(9170); -var shimUnscopables = __webpack_require__(2505); - -var getPolyfill = __webpack_require__(616); - -module.exports = function shimFlat() { - var polyfill = getPolyfill(); - - define( - Array.prototype, - { flat: polyfill }, - { flat: function () { return Array.prototype.flat !== polyfill; } } - ); - - shimUnscopables('flat'); - - return polyfill; -}; - - -/***/ }), - -/***/ 7615: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(1801); - -var callBind = __webpack_require__(2550); - -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); - -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; - - -/***/ }), - -/***/ 2550: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__(1930); -var GetIntrinsic = __webpack_require__(1801); - -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} - -module.exports = function callBind() { - return $reflectApply(bind, $call, arguments); -}; - -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; - -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} - - -/***/ }), - -/***/ 4403: -/***/ (function(module, exports) { - -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/ -/* global define */ - -(function () { - 'use strict'; - - var hasOwn = {}.hasOwnProperty; - - function classNames() { - var classes = []; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - - var argType = typeof arg; - - if (argType === 'string' || argType === 'number') { - classes.push(arg); - } else if (Array.isArray(arg)) { - if (arg.length) { - var inner = classNames.apply(null, arg); - if (inner) { - classes.push(inner); - } - } - } else if (argType === 'object') { - if (arg.toString === Object.prototype.toString) { - for (var key in arg) { - if (hasOwn.call(arg, key) && arg[key]) { - classes.push(key); - } - } - } else { - classes.push(arg.toString()); - } - } - } - - return classes.join(' '); - } - - if ( true && module.exports) { - classNames.default = classNames; - module.exports = classNames; - } else if (true) { - // register as 'classnames', consistent with npm package name - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { - return classNames; - }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else {} -}()); - - -/***/ }), - -/***/ 8495: -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "addEventListener": function() { return /* binding */ addEventListener; } -/* harmony export */ }); -var CAN_USE_DOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -// Adapted from Modernizr -// https://github.com/Modernizr/Modernizr/blob/acb3f0d9/feature-detects/dom/passiveeventlisteners.js#L26-L37 -function testPassiveEventListeners() { - if (!CAN_USE_DOM) { - return false; - } - - if (!window.addEventListener || !window.removeEventListener || !Object.defineProperty) { - return false; - } - - var supportsPassiveOption = false; - try { - var opts = Object.defineProperty({}, 'passive', { - // eslint-disable-next-line getter-return - get: function () { - function get() { - supportsPassiveOption = true; - } - - return get; - }() - }); - var noop = function noop() {}; - window.addEventListener('testPassiveEventSupport', noop, opts); - window.removeEventListener('testPassiveEventSupport', noop, opts); - } catch (e) { - // do nothing - } - - return supportsPassiveOption; -} - -var memoized = void 0; - -function canUsePassiveEventListeners() { - if (memoized === undefined) { - memoized = testPassiveEventListeners(); - } - return memoized; -} - -function normalizeEventOptions(eventOptions) { - if (!eventOptions) { - return undefined; - } - - if (!canUsePassiveEventListeners()) { - // If the browser does not support the passive option, then it is expecting - // a boolean for the options argument to specify whether it should use - // capture or not. In more modern browsers, this is passed via the `capture` - // option, so let's just hoist that value up. - return !!eventOptions.capture; - } - - return eventOptions; -} - -/* eslint-disable no-bitwise */ - -/** - * Generate a unique key for any set of event options - */ -function eventOptionsKey(normalizedEventOptions) { - if (!normalizedEventOptions) { - return 0; - } - - // If the browser does not support passive event listeners, the normalized - // event options will be a boolean. - if (normalizedEventOptions === true) { - return 100; - } - - // At this point, the browser supports passive event listeners, so we expect - // the event options to be an object with possible properties of capture, - // passive, and once. - // - // We want to consistently return the same value, regardless of the order of - // these properties, so let's use binary maths to assign each property to a - // bit, and then add those together (with an offset to account for the - // booleans at the beginning of this function). - var capture = normalizedEventOptions.capture << 0; - var passive = normalizedEventOptions.passive << 1; - var once = normalizedEventOptions.once << 2; - return capture + passive + once; -} - -function ensureCanMutateNextEventHandlers(eventHandlers) { - if (eventHandlers.handlers === eventHandlers.nextHandlers) { - // eslint-disable-next-line no-param-reassign - eventHandlers.nextHandlers = eventHandlers.handlers.slice(); - } -} - -function TargetEventHandlers(target) { - this.target = target; - this.events = {}; -} - -TargetEventHandlers.prototype.getEventHandlers = function () { - function getEventHandlers(eventName, options) { - var key = String(eventName) + ' ' + String(eventOptionsKey(options)); - - if (!this.events[key]) { - this.events[key] = { - handlers: [], - handleEvent: undefined - }; - this.events[key].nextHandlers = this.events[key].handlers; - } - - return this.events[key]; - } - - return getEventHandlers; -}(); - -TargetEventHandlers.prototype.handleEvent = function () { - function handleEvent(eventName, options, event) { - var eventHandlers = this.getEventHandlers(eventName, options); - eventHandlers.handlers = eventHandlers.nextHandlers; - eventHandlers.handlers.forEach(function (handler) { - if (handler) { - // We need to check for presence here because a handler function may - // cause later handlers to get removed. This can happen if you for - // instance have a waypoint that unmounts another waypoint as part of an - // onEnter/onLeave handler. - handler(event); - } - }); - } - - return handleEvent; -}(); - -TargetEventHandlers.prototype.add = function () { - function add(eventName, listener, options) { - var _this = this; - - // options has already been normalized at this point. - var eventHandlers = this.getEventHandlers(eventName, options); - - ensureCanMutateNextEventHandlers(eventHandlers); - - if (eventHandlers.nextHandlers.length === 0) { - eventHandlers.handleEvent = this.handleEvent.bind(this, eventName, options); - - this.target.addEventListener(eventName, eventHandlers.handleEvent, options); - } - - eventHandlers.nextHandlers.push(listener); - - var isSubscribed = true; - var unsubscribe = function () { - function unsubscribe() { - if (!isSubscribed) { - return; - } - - isSubscribed = false; - - ensureCanMutateNextEventHandlers(eventHandlers); - var index = eventHandlers.nextHandlers.indexOf(listener); - eventHandlers.nextHandlers.splice(index, 1); - - if (eventHandlers.nextHandlers.length === 0) { - // All event handlers have been removed, so we want to remove the event - // listener from the target node. - - if (_this.target) { - // There can be a race condition where the target may no longer exist - // when this function is called, e.g. when a React component is - // unmounting. Guarding against this prevents the following error: - // - // Cannot read property 'removeEventListener' of undefined - _this.target.removeEventListener(eventName, eventHandlers.handleEvent, options); - } - - eventHandlers.handleEvent = undefined; - } - } - - return unsubscribe; - }(); - return unsubscribe; - } - - return add; -}(); - -var EVENT_HANDLERS_KEY = '__consolidated_events_handlers__'; - -// eslint-disable-next-line import/prefer-default-export -function addEventListener(target, eventName, listener, options) { - if (!target[EVENT_HANDLERS_KEY]) { - // eslint-disable-next-line no-param-reassign - target[EVENT_HANDLERS_KEY] = new TargetEventHandlers(target); - } - var normalizedEventOptions = normalizeEventOptions(options); - return target[EVENT_HANDLERS_KEY].add(eventName, listener, normalizedEventOptions); -} - - - - -/***/ }), - -/***/ 9170: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var keys = __webpack_require__(806); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; - -var toStr = Object.prototype.toString; -var concat = Array.prototype.concat; -var origDefineProperty = Object.defineProperty; - -var isFunction = function (fn) { - return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; -}; - -var arePropertyDescriptorsSupported = function () { - var obj = {}; - try { - origDefineProperty(obj, 'x', { enumerable: false, value: obj }); - // eslint-disable-next-line no-unused-vars, no-restricted-syntax - for (var _ in obj) { // jscs:ignore disallowUnusedVariables - return false; - } - return obj.x === obj; - } catch (e) { /* this is IE 8. */ - return false; - } -}; -var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); - -var defineProperty = function (object, name, value, predicate) { - if (name in object && (!isFunction(predicate) || !predicate())) { - return; - } - if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value: value, - writable: true - }); - } else { - object[name] = value; - } -}; - -var defineProperties = function (object, map) { - var predicates = arguments.length > 2 ? arguments[2] : {}; - var props = keys(map); - if (hasSymbols) { - props = concat.call(props, Object.getOwnPropertySymbols(map)); - } - for (var i = 0; i < props.length; i += 1) { - defineProperty(object, props[i], map[props[i]], predicates[props[i]]); - } -}; - -defineProperties.supportsDescriptors = !!supportsDescriptors; - -module.exports = defineProperties; - - -/***/ }), - -/***/ 8110: -/***/ (function(module) { - -"use strict"; - - -module.exports = function contains(other) { - if (arguments.length < 1) { - throw new TypeError('1 argument is required'); - } - if (typeof other !== 'object') { - throw new TypeError('Argument 1 (”other“) to Node.contains must be an instance of Node'); - } - - var node = other; - do { - if (this === node) { - return true; - } - if (node) { - node = node.parentNode; - } - } while (node); - - return false; -}; - - -/***/ }), - -/***/ 6789: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var define = __webpack_require__(9170); - -var implementation = __webpack_require__(8110); -var getPolyfill = __webpack_require__(8267); -var polyfill = getPolyfill(); -var shim = __webpack_require__(714); - -var boundContains = function contains(node, other) { - return polyfill.apply(node, [other]); -}; - -define(boundContains, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = boundContains; - - -/***/ }), - -/***/ 8267: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var implementation = __webpack_require__(8110); - -module.exports = function getPolyfill() { - if (typeof document !== 'undefined') { - if (document.contains) { - return document.contains; - } - if (document.body && document.body.contains) { - try { - if (typeof document.body.contains.call(document, '') === 'boolean') { - return document.body.contains; - } - } catch (e) { /**/ } - } - } - return implementation; -}; - - -/***/ }), - -/***/ 714: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var define = __webpack_require__(9170); -var getPolyfill = __webpack_require__(8267); - -module.exports = function shimContains() { - var polyfill = getPolyfill(); - if (typeof document !== 'undefined') { - define( - document, - { contains: polyfill }, - { contains: function () { return document.contains !== polyfill; } } - ); - if (typeof Element !== 'undefined') { - define( - Element.prototype, - { contains: polyfill }, - { contains: function () { return Element.prototype.contains !== polyfill; } } - ); - } - } - return polyfill; -}; - - -/***/ }), - -/***/ 1345: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var util = __webpack_require__(5022); - -function scrollIntoView(elem, container, config) { - config = config || {}; - // document 归一化到 window - if (container.nodeType === 9) { - container = util.getWindow(container); - } - - var allowHorizontalScroll = config.allowHorizontalScroll; - var onlyScrollIfNeeded = config.onlyScrollIfNeeded; - var alignWithTop = config.alignWithTop; - var alignWithLeft = config.alignWithLeft; - var offsetTop = config.offsetTop || 0; - var offsetLeft = config.offsetLeft || 0; - var offsetBottom = config.offsetBottom || 0; - var offsetRight = config.offsetRight || 0; - - allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll; - - var isWin = util.isWindow(container); - var elemOffset = util.offset(elem); - var eh = util.outerHeight(elem); - var ew = util.outerWidth(elem); - var containerOffset = undefined; - var ch = undefined; - var cw = undefined; - var containerScroll = undefined; - var diffTop = undefined; - var diffBottom = undefined; - var win = undefined; - var winScroll = undefined; - var ww = undefined; - var wh = undefined; - - if (isWin) { - win = container; - wh = util.height(win); - ww = util.width(win); - winScroll = { - left: util.scrollLeft(win), - top: util.scrollTop(win) - }; - // elem 相对 container 可视视窗的距离 - diffTop = { - left: elemOffset.left - winScroll.left - offsetLeft, - top: elemOffset.top - winScroll.top - offsetTop - }; - diffBottom = { - left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight, - top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom - }; - containerScroll = winScroll; - } else { - containerOffset = util.offset(container); - ch = container.clientHeight; - cw = container.clientWidth; - containerScroll = { - left: container.scrollLeft, - top: container.scrollTop - }; - // elem 相对 container 可视视窗的距离 - // 注意边框, offset 是边框到根节点 - diffTop = { - left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft, - top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop - }; - diffBottom = { - left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight, - top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom - }; - } - - if (diffTop.top < 0 || diffBottom.top > 0) { - // 强制向上 - if (alignWithTop === true) { - util.scrollTop(container, containerScroll.top + diffTop.top); - } else if (alignWithTop === false) { - util.scrollTop(container, containerScroll.top + diffBottom.top); - } else { - // 自动调整 - if (diffTop.top < 0) { - util.scrollTop(container, containerScroll.top + diffTop.top); - } else { - util.scrollTop(container, containerScroll.top + diffBottom.top); - } - } - } else { - if (!onlyScrollIfNeeded) { - alignWithTop = alignWithTop === undefined ? true : !!alignWithTop; - if (alignWithTop) { - util.scrollTop(container, containerScroll.top + diffTop.top); - } else { - util.scrollTop(container, containerScroll.top + diffBottom.top); - } - } - } - - if (allowHorizontalScroll) { - if (diffTop.left < 0 || diffBottom.left > 0) { - // 强制向上 - if (alignWithLeft === true) { - util.scrollLeft(container, containerScroll.left + diffTop.left); - } else if (alignWithLeft === false) { - util.scrollLeft(container, containerScroll.left + diffBottom.left); - } else { - // 自动调整 - if (diffTop.left < 0) { - util.scrollLeft(container, containerScroll.left + diffTop.left); - } else { - util.scrollLeft(container, containerScroll.left + diffBottom.left); - } - } - } else { - if (!onlyScrollIfNeeded) { - alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft; - if (alignWithLeft) { - util.scrollLeft(container, containerScroll.left + diffTop.left); - } else { - util.scrollLeft(container, containerScroll.left + diffBottom.left); - } - } - } - } -} - -module.exports = scrollIntoView; - -/***/ }), - -/***/ 5425: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -module.exports = __webpack_require__(1345); - -/***/ }), - -/***/ 5022: -/***/ (function(module) { - -"use strict"; - - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - -var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; - -function getClientPosition(elem) { - var box = undefined; - var x = undefined; - var y = undefined; - var doc = elem.ownerDocument; - var body = doc.body; - var docElem = doc && doc.documentElement; - // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 - box = elem.getBoundingClientRect(); - - // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop - // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 - // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin - - x = box.left; - y = box.top; - - // In IE, most of the time, 2 extra pixels are added to the top and left - // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and - // IE6 standards mode, this border can be overridden by setting the - // document element's border to zero -- thus, we cannot rely on the - // offset always being 2 pixels. - - // In quirks mode, the offset can be determined by querying the body's - // clientLeft/clientTop, but in standards mode, it is found by querying - // the document element's clientLeft/clientTop. Since we already called - // getClientBoundingRect we have already forced a reflow, so it is not - // too expensive just to query them all. - - // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 - // 窗口边框标准是设 documentElement ,quirks 时设置 body - // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 - // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 - // 标准 ie 下 docElem.clientTop 就是 border-top - // ie7 html 即窗口边框改变不了。永远为 2 - // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 - - x -= docElem.clientLeft || body.clientLeft || 0; - y -= docElem.clientTop || body.clientTop || 0; - - return { - left: x, - top: y - }; -} - -function getScroll(w, top) { - var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; - var method = 'scroll' + (top ? 'Top' : 'Left'); - if (typeof ret !== 'number') { - var d = w.document; - // ie6,7,8 standard mode - ret = d.documentElement[method]; - if (typeof ret !== 'number') { - // quirks mode - ret = d.body[method]; - } - } - return ret; -} - -function getScrollLeft(w) { - return getScroll(w); -} - -function getScrollTop(w) { - return getScroll(w, true); -} - -function getOffset(el) { - var pos = getClientPosition(el); - var doc = el.ownerDocument; - var w = doc.defaultView || doc.parentWindow; - pos.left += getScrollLeft(w); - pos.top += getScrollTop(w); - return pos; -} -function _getComputedStyle(elem, name, computedStyle_) { - var val = ''; - var d = elem.ownerDocument; - var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null); - - // https://github.com/kissyteam/kissy/issues/61 - if (computedStyle) { - val = computedStyle.getPropertyValue(name) || computedStyle[name]; - } - - return val; -} - -var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); -var RE_POS = /^(top|right|bottom|left)$/; -var CURRENT_STYLE = 'currentStyle'; -var RUNTIME_STYLE = 'runtimeStyle'; -var LEFT = 'left'; -var PX = 'px'; - -function _getComputedStyleIE(elem, name) { - // currentStyle maybe null - // http://msdn.microsoft.com/en-us/library/ms535231.aspx - var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; - - // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 - // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 - // 在 ie 下不对,需要直接用 offset 方式 - // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // exclude left right for relativity - if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { - // Remember the original values - var style = elem.style; - var left = style[LEFT]; - var rsLeft = elem[RUNTIME_STYLE][LEFT]; - - // prevent flashing of content - elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; - - // Put in the new values to get a computed value out - style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; - ret = style.pixelLeft + PX; - - // Revert the changed values - style[LEFT] = left; - - elem[RUNTIME_STYLE][LEFT] = rsLeft; - } - return ret === '' ? 'auto' : ret; -} - -var getComputedStyleX = undefined; -if (typeof window !== 'undefined') { - getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; -} - -function each(arr, fn) { - for (var i = 0; i < arr.length; i++) { - fn(arr[i]); - } -} - -function isBorderBoxFn(elem) { - return getComputedStyleX(elem, 'boxSizing') === 'border-box'; -} - -var BOX_MODELS = ['margin', 'border', 'padding']; -var CONTENT_INDEX = -1; -var PADDING_INDEX = 2; -var BORDER_INDEX = 1; -var MARGIN_INDEX = 0; - -function swap(elem, options, callback) { - var old = {}; - var style = elem.style; - var name = undefined; - - // Remember the old values, and insert the new ones - for (name in options) { - if (options.hasOwnProperty(name)) { - old[name] = style[name]; - style[name] = options[name]; - } - } - - callback.call(elem); - - // Revert the old values - for (name in options) { - if (options.hasOwnProperty(name)) { - style[name] = old[name]; - } - } -} - -function getPBMWidth(elem, props, which) { - var value = 0; - var prop = undefined; - var j = undefined; - var i = undefined; - for (j = 0; j < props.length; j++) { - prop = props[j]; - if (prop) { - for (i = 0; i < which.length; i++) { - var cssProp = undefined; - if (prop === 'border') { - cssProp = prop + which[i] + 'Width'; - } else { - cssProp = prop + which[i]; - } - value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; - } - } - } - return value; -} - -/** - * A crude way of determining if an object is a window - * @member util - */ -function isWindow(obj) { - // must use == for ie8 - /* eslint eqeqeq:0 */ - return obj != null && obj == obj.window; -} - -var domUtils = {}; - -each(['Width', 'Height'], function (name) { - domUtils['doc' + name] = function (refWin) { - var d = refWin.document; - return Math.max( - // firefox chrome documentElement.scrollHeight< body.scrollHeight - // ie standard mode : documentElement.scrollHeight> body.scrollHeight - d.documentElement['scroll' + name], - // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? - d.body['scroll' + name], domUtils['viewport' + name](d)); - }; - - domUtils['viewport' + name] = function (win) { - // pc browser includes scrollbar in window.innerWidth - var prop = 'client' + name; - var doc = win.document; - var body = doc.body; - var documentElement = doc.documentElement; - var documentElementProp = documentElement[prop]; - // 标准模式取 documentElement - // backcompat 取 body - return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; - }; -}); - -/* - 得到元素的大小信息 - @param elem - @param name - @param {String} [extra] 'padding' : (css width) + padding - 'border' : (css width) + padding + border - 'margin' : (css width) + padding + border + margin - */ -function getWH(elem, name, extra) { - if (isWindow(elem)) { - return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); - } else if (elem.nodeType === 9) { - return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); - } - var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; - var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; - var computedStyle = getComputedStyleX(elem); - var isBorderBox = isBorderBoxFn(elem, computedStyle); - var cssBoxValue = 0; - if (borderBoxValue == null || borderBoxValue <= 0) { - borderBoxValue = undefined; - // Fall back to computed then un computed css if necessary - cssBoxValue = getComputedStyleX(elem, name); - if (cssBoxValue == null || Number(cssBoxValue) < 0) { - cssBoxValue = elem.style[name] || 0; - } - // Normalize '', auto, and prepare for extra - cssBoxValue = parseFloat(cssBoxValue) || 0; - } - if (extra === undefined) { - extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; - } - var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; - var val = borderBoxValue || cssBoxValue; - if (extra === CONTENT_INDEX) { - if (borderBoxValueOrIsBorderBox) { - return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); - } - return cssBoxValue; - } - if (borderBoxValueOrIsBorderBox) { - var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle); - return val + (extra === BORDER_INDEX ? 0 : padding); - } - return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); -} - -var cssShow = { - position: 'absolute', - visibility: 'hidden', - display: 'block' -}; - -// fix #119 : https://github.com/kissyteam/kissy/issues/119 -function getWHIgnoreDisplay(elem) { - var val = undefined; - var args = arguments; - // in case elem is window - // elem.offsetWidth === undefined - if (elem.offsetWidth !== 0) { - val = getWH.apply(undefined, args); - } else { - swap(elem, cssShow, function () { - val = getWH.apply(undefined, args); - }); - } - return val; -} - -function css(el, name, v) { - var value = v; - if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { - for (var i in name) { - if (name.hasOwnProperty(i)) { - css(el, i, name[i]); - } - } - return undefined; - } - if (typeof value !== 'undefined') { - if (typeof value === 'number') { - value += 'px'; - } - el.style[name] = value; - return undefined; - } - return getComputedStyleX(el, name); -} - -each(['width', 'height'], function (name) { - var first = name.charAt(0).toUpperCase() + name.slice(1); - domUtils['outer' + first] = function (el, includeMargin) { - return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); - }; - var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; - - domUtils[name] = function (elem, val) { - if (val !== undefined) { - if (elem) { - var computedStyle = getComputedStyleX(elem); - var isBorderBox = isBorderBoxFn(elem); - if (isBorderBox) { - val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); - } - return css(elem, name, val); - } - return undefined; - } - return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); - }; -}); - -// 设置 elem 相对 elem.ownerDocument 的坐标 -function setOffset(elem, offset) { - // set position first, in-case top/left are set even on static elem - if (css(elem, 'position') === 'static') { - elem.style.position = 'relative'; - } - - var old = getOffset(elem); - var ret = {}; - var current = undefined; - var key = undefined; - - for (key in offset) { - if (offset.hasOwnProperty(key)) { - current = parseFloat(css(elem, key)) || 0; - ret[key] = current + offset[key] - old[key]; - } - } - css(elem, ret); -} - -module.exports = _extends({ - getWindow: function getWindow(node) { - var doc = node.ownerDocument || node; - return doc.defaultView || doc.parentWindow; - }, - offset: function offset(el, value) { - if (typeof value !== 'undefined') { - setOffset(el, value); - } else { - return getOffset(el); - } - }, - - isWindow: isWindow, - each: each, - css: css, - clone: function clone(obj) { - var ret = {}; - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - ret[i] = obj[i]; - } - } - var overflow = obj.overflow; - if (overflow) { - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - ret.overflow[i] = obj.overflow[i]; - } - } - } - return ret; - }, - scrollLeft: function scrollLeft(w, v) { - if (isWindow(w)) { - if (v === undefined) { - return getScrollLeft(w); - } - window.scrollTo(v, getScrollTop(w)); - } else { - if (v === undefined) { - return w.scrollLeft; - } - w.scrollLeft = v; - } - }, - scrollTop: function scrollTop(w, v) { - if (isWindow(w)) { - if (v === undefined) { - return getScrollTop(w); - } - window.scrollTo(getScrollLeft(w), v); - } else { - if (v === undefined) { - return w.scrollTop; - } - w.scrollTop = v; - } - }, - - viewportWidth: 0, - viewportHeight: 0 -}, domUtils); - -/***/ }), - -/***/ 9214: -/***/ (function(__unused_webpack_module, exports) { +/***/ 2287: +/***/ ((__unused_webpack_module, exports) => { "use strict"; var __webpack_unused_export__; @@ -2469,639 +165,101 @@ /***/ }), -/***/ 2797: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 1915: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { - /* unused reexport */ __webpack_require__(9214); + /* unused reexport */ __webpack_require__(2287); } else {} /***/ }), -/***/ 2505: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var has = __webpack_require__(9284); - -var hasUnscopables = typeof Symbol === 'function' && typeof Symbol.unscopables === 'symbol'; - -var map = hasUnscopables && Array.prototype[Symbol.unscopables]; - -var $TypeError = TypeError; - -module.exports = function shimUnscopables(method) { - if (typeof method !== 'string' || !method) { - throw new $TypeError('method must be a non-empty string'); - } - if (!has(Array.prototype, method)) { - throw new $TypeError('method must be on Array.prototype'); - } - if (hasUnscopables) { - map[method] = true; - } -}; - - -/***/ }), - -/***/ 5249: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 7734: +/***/ ((module) => { "use strict"; -var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; - -var isPrimitive = __webpack_require__(3777); -var isCallable = __webpack_require__(5443); -var isDate = __webpack_require__(8659); -var isSymbol = __webpack_require__(3082); - -var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { - if (typeof O === 'undefined' || O === null) { - throw new TypeError('Cannot call method on ' + O); - } - if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { - throw new TypeError('hint must be "string" or "number"'); - } - var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; - var method, result, i; - for (i = 0; i < methodNames.length; ++i) { - method = O[methodNames[i]]; - if (isCallable(method)) { - result = method.call(O); - if (isPrimitive(result)) { - return result; - } - } - } - throw new TypeError('No default value'); -}; - -var GetMethod = function GetMethod(O, P) { - var func = O[P]; - if (func !== null && typeof func !== 'undefined') { - if (!isCallable(func)) { - throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); - } - return func; - } - return void 0; -}; - -// http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive -module.exports = function ToPrimitive(input) { - if (isPrimitive(input)) { - return input; - } - var hint = 'default'; - if (arguments.length > 1) { - if (arguments[1] === String) { - hint = 'string'; - } else if (arguments[1] === Number) { - hint = 'number'; - } - } - - var exoticToPrim; - if (hasSymbols) { - if (Symbol.toPrimitive) { - exoticToPrim = GetMethod(input, Symbol.toPrimitive); - } else if (isSymbol(input)) { - exoticToPrim = Symbol.prototype.valueOf; - } - } - if (typeof exoticToPrim !== 'undefined') { - var result = exoticToPrim.call(input, hint); - if (isPrimitive(result)) { - return result; - } - throw new TypeError('unable to convert exotic object to primitive'); - } - if (hint === 'default' && (isDate(input) || isSymbol(input))) { - hint = 'string'; - } - return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); -}; - - -/***/ }), - -/***/ 3777: -/***/ (function(module) { - -"use strict"; - - -module.exports = function isPrimitive(value) { - return value === null || (typeof value !== 'function' && typeof value !== 'object'); -}; - - -/***/ }), - -/***/ 9930: -/***/ (function(module) { - -"use strict"; - - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; -var toStr = Object.prototype.toString; -var funcType = '[object Function]'; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slice.call(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - } - }; - - var boundLength = Math.max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); - } - - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; +// do not edit .js files directly - edit src/index.jst + + + var envHasBigInt64Array = typeof BigInt64Array !== 'undefined'; + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + if ((a instanceof Map) && (b instanceof Map)) { + if (a.size !== b.size) return false; + for (i of a.entries()) + if (!b.has(i[0])) return false; + for (i of a.entries()) + if (!equal(i[1], b.get(i[0]))) return false; + return true; + } + + if ((a instanceof Set) && (b instanceof Set)) { + if (a.size !== b.size) return false; + for (i of a.entries()) + if (!b.has(i[0])) return false; + return true; + } + + if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (a[i] !== b[i]) return false; + return true; + } + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; }; /***/ }), -/***/ 1930: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var implementation = __webpack_require__(9930); - -module.exports = Function.prototype.bind || implementation; - - -/***/ }), - -/***/ 1801: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -/* globals - AggregateError, - Atomics, - FinalizationRegistry, - SharedArrayBuffer, - WeakRef, -*/ - -var undefined; - -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - // eslint-disable-next-line no-new-func - return Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __webpack_require__(9905)(); - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var asyncGenFunction = getEvalledConstructor('async function* () {}'); -var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined; -var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': getEvalledConstructor('async function () {}'), - '%AsyncGenerator%': asyncGenFunctionPrototype, - '%AsyncGeneratorFunction%': asyncGenFunction, - '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': getEvalledConstructor('function* () {}'), - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; - -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __webpack_require__(1930); -var hasOwn = __webpack_require__(9284); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); -var $strSlice = bind.call(Function.call, String.prototype.slice); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), - -/***/ 5371: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var define = __webpack_require__(9170); -var isSymbol = __webpack_require__(3082); - -var globalKey = '__ global cache key __'; -/* istanbul ignore else */ -// eslint-disable-next-line no-restricted-properties -if (typeof Symbol === 'function' && isSymbol(Symbol('foo')) && typeof Symbol['for'] === 'function') { - // eslint-disable-next-line no-restricted-properties - globalKey = Symbol['for'](globalKey); -} - -var trueThunk = function () { - return true; -}; - -var ensureCache = function ensureCache() { - if (!__webpack_require__.g[globalKey]) { - var properties = {}; - properties[globalKey] = {}; - var predicates = {}; - predicates[globalKey] = trueThunk; - define(__webpack_require__.g, properties, predicates); - } - return __webpack_require__.g[globalKey]; -}; - -var cache = ensureCache(); - -var isPrimitive = function isPrimitive(val) { - return val === null || (typeof val !== 'object' && typeof val !== 'function'); -}; - -var getPrimitiveKey = function getPrimitiveKey(val) { - if (isSymbol(val)) { - return Symbol.prototype.valueOf.call(val); - } - return typeof val + ' | ' + String(val); -}; - -var requirePrimitiveKey = function requirePrimitiveKey(val) { - if (!isPrimitive(val)) { - throw new TypeError('key must not be an object'); - } -}; - -var globalCache = { - clear: function clear() { - delete __webpack_require__.g[globalKey]; - cache = ensureCache(); - }, - - 'delete': function deleteKey(key) { - requirePrimitiveKey(key); - delete cache[getPrimitiveKey(key)]; - return !globalCache.has(key); - }, - - get: function get(key) { - requirePrimitiveKey(key); - return cache[getPrimitiveKey(key)]; - }, - - has: function has(key) { - requirePrimitiveKey(key); - return getPrimitiveKey(key) in cache; - }, - - set: function set(key, value) { - requirePrimitiveKey(key); - var primitiveKey = getPrimitiveKey(key); - var props = {}; - props[primitiveKey] = value; - var predicates = {}; - predicates[primitiveKey] = trueThunk; - define(cache, props, predicates); - return globalCache.has(key); - }, - - setIfMissingThenGet: function setIfMissingThenGet(key, valueThunk) { - if (globalCache.has(key)) { - return globalCache.get(key); - } - var item = valueThunk(); - globalCache.set(key, item); - return item; - } -}; - -module.exports = globalCache; - - -/***/ }), - -/***/ 7115: -/***/ (function(__unused_webpack_module, exports) { +/***/ 8924: +/***/ ((__unused_webpack_module, exports) => { // Copyright (c) 2014 Rafael Caricio. All rights reserved. // Use of this source code is governed by a BSD-style license that can be @@ -3446,611 +604,8 @@ /***/ }), -/***/ 8198: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(3010); - -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); - -var hasPropertyDescriptors = function hasPropertyDescriptors() { - if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - return true; - } catch (e) { - // IE 8 has a broken defineProperty - return false; - } - } - return false; -}; - -hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { - // node v0.6 has a bug where array lengths can be Set but not Defined - if (!hasPropertyDescriptors()) { - return null; - } - try { - return $defineProperty([], 'length', { value: 1 }).length !== 1; - } catch (e) { - // In Firefox 4-22, defining length on an array throws an exception. - return true; - } -}; - -module.exports = hasPropertyDescriptors; - - -/***/ }), - -/***/ 3010: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var undefined; - -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __webpack_require__(1779)(); - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __webpack_require__(1930); -var hasOwn = __webpack_require__(9284); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); -var $strSlice = bind.call(Function.call, String.prototype.slice); -var $exec = bind.call(Function.call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/g, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), - -/***/ 1779: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = __webpack_require__(8030); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - - -/***/ }), - -/***/ 8030: -/***/ (function(module) { - -"use strict"; - - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), - -/***/ 9905: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var origSymbol = __webpack_require__.g.Symbol; -var hasSymbolSham = __webpack_require__(5682); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; - - -/***/ }), - -/***/ 5682: -/***/ (function(module) { - -"use strict"; - - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), - -/***/ 81: -/***/ (function(module) { - -"use strict"; - - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; - - -/***/ }), - -/***/ 4111: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var hasSymbols = __webpack_require__(81); - -module.exports = function hasToStringTagShams() { - return hasSymbols() && !!Symbol.toStringTag; -}; - - -/***/ }), - -/***/ 9284: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var bind = __webpack_require__(1930); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); - - -/***/ }), - -/***/ 3138: -/***/ (function(module) { +/***/ 9664: +/***/ ((module) => { module.exports = /******/ (function(modules) { // webpackBootstrap @@ -4311,13 +866,13 @@ /***/ }), -/***/ 1281: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 1880: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var reactIs = __webpack_require__(338); +var reactIs = __webpack_require__(1178); /** * Copyright 2015, Yahoo! Inc. @@ -4422,1814 +977,44 @@ /***/ }), -/***/ 5443: -/***/ (function(module) { - -"use strict"; - - -var fnToStr = Function.prototype.toString; -var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; -var badArrayLike; -var isCallableMarker; -if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { - try { - badArrayLike = Object.defineProperty({}, 'length', { - get: function () { - throw isCallableMarker; - } - }); - isCallableMarker = {}; - // eslint-disable-next-line no-throw-literal - reflectApply(function () { throw 42; }, null, badArrayLike); - } catch (_) { - if (_ !== isCallableMarker) { - reflectApply = null; - } - } -} else { - reflectApply = null; -} - -var constructorRegex = /^\s*class\b/; -var isES6ClassFn = function isES6ClassFunction(value) { - try { - var fnStr = fnToStr.call(value); - return constructorRegex.test(fnStr); - } catch (e) { - return false; // not a function - } -}; - -var tryFunctionObject = function tryFunctionToStr(value) { - try { - if (isES6ClassFn(value)) { return false; } - fnToStr.call(value); - return true; - } catch (e) { - return false; - } -}; -var toStr = Object.prototype.toString; -var fnClass = '[object Function]'; -var genClass = '[object GeneratorFunction]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = reflectApply - ? function isCallable(value) { - if (!value) { return false; } - if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } - try { - reflectApply(value, null, badArrayLike); - } catch (e) { - if (e !== isCallableMarker) { return false; } - } - return !isES6ClassFn(value); - } - : function isCallable(value) { - if (!value) { return false; } - if (typeof value !== 'function' && typeof value !== 'object') { return false; } - if (typeof value === 'function' && !value.prototype) { return true; } - if (hasToStringTag) { return tryFunctionObject(value); } - if (isES6ClassFn(value)) { return false; } - var strClass = toStr.call(value); - return strClass === fnClass || strClass === genClass; - }; - - -/***/ }), - -/***/ 8659: -/***/ (function(module) { - -"use strict"; - - -var getDay = Date.prototype.getDay; -var tryDateObject = function tryDateGetDayCall(value) { - try { - getDay.call(value); - return true; - } catch (e) { - return false; - } -}; - -var toStr = Object.prototype.toString; -var dateClass = '[object Date]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = function isDateObject(value) { - if (typeof value !== 'object' || value === null) { - return false; - } - return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; -}; - - -/***/ }), - -/***/ 3082: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 2950: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - - -var toStr = Object.prototype.toString; -var hasSymbols = __webpack_require__(9905)(); - -if (hasSymbols) { - var symToStr = Symbol.prototype.toString; - var symStringRegex = /^Symbol\(.*\)$/; - var isSymbolObject = function isRealSymbolObject(value) { - if (typeof value.valueOf() !== 'symbol') { - return false; - } - return symStringRegex.test(symToStr.call(value)); - }; - - module.exports = function isSymbol(value) { - if (typeof value === 'symbol') { - return true; - } - if (toStr.call(value) !== '[object Symbol]') { - return false; - } - try { - return isSymbolObject(value); - } catch (e) { - return false; - } - }; -} else { - - module.exports = function isSymbol(value) { - // this environment does not support Symbols. - return false && 0; - }; -} - - -/***/ }), - -/***/ 5834: -/***/ (function(module, exports) { - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isTouchDevice; -function isTouchDevice() { - return !!(typeof window !== 'undefined' && ('ontouchstart' in window || window.DocumentTouch && typeof document !== 'undefined' && document instanceof window.DocumentTouch)) || !!(typeof navigator !== 'undefined' && (navigator.maxTouchPoints || navigator.msMaxTouchPoints)); -} -module.exports = exports['default']; - -/***/ }), - -/***/ 4937: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var root = __webpack_require__(158); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - - -/***/ }), - -/***/ 194: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var Symbol = __webpack_require__(4937), - getRawTag = __webpack_require__(5401), - objectToString = __webpack_require__(2445); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - - -/***/ }), - -/***/ 2383: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var trimmedEndIndex = __webpack_require__(8725); - -/** Used to match leading whitespace. */ -var reTrimStart = /^\s+/; - -/** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ -function baseTrim(string) { - return string - ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; -} - -module.exports = baseTrim; - - -/***/ }), - -/***/ 4528: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; - -module.exports = freeGlobal; - - -/***/ }), - -/***/ 5401: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var Symbol = __webpack_require__(4937); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; - - -/***/ }), - -/***/ 2445: -/***/ (function(module) { - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -module.exports = objectToString; - - -/***/ }), - -/***/ 158: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var freeGlobal = __webpack_require__(4528); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - - -/***/ }), - -/***/ 8725: -/***/ (function(module) { - -/** Used to match a single whitespace character. */ -var reWhitespace = /\s/; - -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ -function trimmedEndIndex(string) { - var index = string.length; - - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; -} - -module.exports = trimmedEndIndex; - - -/***/ }), - -/***/ 6897: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var isObject = __webpack_require__(3619), - now = __webpack_require__(8253), - toNumber = __webpack_require__(5053); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); - * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); - * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); - * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); - */ -function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); - } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; - } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; -} - -module.exports = debounce; - - -/***/ }), - -/***/ 3619: -/***/ (function(module) { - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - - -/***/ }), - -/***/ 1653: -/***/ (function(module) { - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; - - -/***/ }), - -/***/ 1878: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var baseGetTag = __webpack_require__(194), - isObjectLike = __webpack_require__(1653); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; - - -/***/ }), - -/***/ 8253: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var root = __webpack_require__(158); - -/** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. - * @example - * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. - */ -var now = function() { - return root.Date.now(); -}; - -module.exports = now; - - -/***/ }), - -/***/ 8172: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var debounce = __webpack_require__(6897), - isObject = __webpack_require__(3619); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide `options` to indicate whether `func` - * should be invoked on the leading and/or trailing edge of the `wait` - * timeout. The `func` is invoked with the last arguments provided to the - * throttled function. Subsequent calls to the throttled function return the - * result of the last `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the throttled function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.throttle` and `_.debounce`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=true] - * Specify invoking on the leading edge of the timeout. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. - * @example - * - * // Avoid excessively updating the position while scrolling. - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. - * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); - * jQuery(element).on('click', throttled); - * - * // Cancel the trailing throttled invocation. - * jQuery(window).on('popstate', throttled.cancel); - */ -function throttle(func, wait, options) { - var leading = true, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - return debounce(func, wait, { - 'leading': leading, - 'maxWait': wait, - 'trailing': trailing - }); -} - -module.exports = throttle; - - -/***/ }), - -/***/ 5053: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var baseTrim = __webpack_require__(2383), - isObject = __webpack_require__(3619), - isSymbol = __webpack_require__(1878); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = toNumber; +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? +Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; +function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; +exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; +exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; +exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; /***/ }), -/***/ 9756: -/***/ (function(module) { - -/** - * Memize options object. - * - * @typedef MemizeOptions - * - * @property {number} [maxSize] Maximum size of the cache. - */ - -/** - * Internal cache entry. - * - * @typedef MemizeCacheNode - * - * @property {?MemizeCacheNode|undefined} [prev] Previous node. - * @property {?MemizeCacheNode|undefined} [next] Next node. - * @property {Array<*>} args Function arguments for cache - * entry. - * @property {*} val Function result. - */ - -/** - * Properties of the enhanced function for controlling cache. - * - * @typedef MemizeMemoizedFunction - * - * @property {()=>void} clear Clear the cache. - */ - -/** - * Accepts a function to be memoized, and returns a new memoized function, with - * optional options. - * - * @template {Function} F - * - * @param {F} fn Function to memoize. - * @param {MemizeOptions} [options] Options object. - * - * @return {F & MemizeMemoizedFunction} Memoized function. - */ -function memize( fn, options ) { - var size = 0; - - /** @type {?MemizeCacheNode|undefined} */ - var head; - - /** @type {?MemizeCacheNode|undefined} */ - var tail; - - options = options || {}; - - function memoized( /* ...args */ ) { - var node = head, - len = arguments.length, - args, i; - - searchCache: while ( node ) { - // Perform a shallow equality test to confirm that whether the node - // under test is a candidate for the arguments passed. Two arrays - // are shallowly equal if their length matches and each entry is - // strictly equal between the two sets. Avoid abstracting to a - // function which could incur an arguments leaking deoptimization. - - // Check whether node arguments match arguments length - if ( node.args.length !== arguments.length ) { - node = node.next; - continue; - } - - // Check whether node arguments match arguments values - for ( i = 0; i < len; i++ ) { - if ( node.args[ i ] !== arguments[ i ] ) { - node = node.next; - continue searchCache; - } - } - - // At this point we can assume we've found a match - - // Surface matched node to head if not already - if ( node !== head ) { - // As tail, shift to previous. Must only shift if not also - // head, since if both head and tail, there is no previous. - if ( node === tail ) { - tail = node.prev; - } - - // Adjust siblings to point to each other. If node was tail, - // this also handles new tail's empty `next` assignment. - /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next; - if ( node.next ) { - node.next.prev = node.prev; - } - - node.next = head; - node.prev = null; - /** @type {MemizeCacheNode} */ ( head ).prev = node; - head = node; - } - - // Return immediately - return node.val; - } - - // No cached value found. Continue to insertion phase: - - // Create a copy of arguments (avoid leaking deoptimization) - args = new Array( len ); - for ( i = 0; i < len; i++ ) { - args[ i ] = arguments[ i ]; - } - - node = { - args: args, - - // Generate the result from original function - val: fn.apply( null, args ), - }; - - // Don't need to check whether node is already head, since it would - // have been returned above already if it was - - // Shift existing head down list - if ( head ) { - head.prev = node; - node.next = head; - } else { - // If no head, follows that there's no tail (at initial or reset) - tail = node; - } - - // Trim tail if we're reached max size and are pending cache insertion - if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) { - tail = /** @type {MemizeCacheNode} */ ( tail ).prev; - /** @type {MemizeCacheNode} */ ( tail ).next = null; - } else { - size++; - } - - head = node; - - return node.val; - } - - memoized.clear = function() { - head = null; - tail = null; - size = 0; - }; - - if ( false ) {} - - // Ignore reason: There's not a clear solution to create an intersection of - // the function with additional properties, where the goal is to retain the - // function signature of the incoming argument and add control properties - // on the return value. - - // @ts-ignore - return memoized; -} - -module.exports = memize; - - -/***/ }), - -/***/ 8383: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 1178: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; -var keysShim; -if (!Object.keys) { - // modified from https://github.com/es-shims/es5-shim - var has = Object.prototype.hasOwnProperty; - var toStr = Object.prototype.toString; - var isArgs = __webpack_require__(4418); // eslint-disable-line global-require - var isEnumerable = Object.prototype.propertyIsEnumerable; - var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); - var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); - var dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - var equalsConstructorPrototype = function (o) { - var ctor = o.constructor; - return ctor && ctor.prototype === o; - }; - var excludedKeys = { - $applicationCache: true, - $console: true, - $external: true, - $frame: true, - $frameElement: true, - $frames: true, - $innerHeight: true, - $innerWidth: true, - $onmozfullscreenchange: true, - $onmozfullscreenerror: true, - $outerHeight: true, - $outerWidth: true, - $pageXOffset: true, - $pageYOffset: true, - $parent: true, - $scrollLeft: true, - $scrollTop: true, - $scrollX: true, - $scrollY: true, - $self: true, - $webkitIndexedDB: true, - $webkitStorageInfo: true, - $window: true - }; - var hasAutomationEqualityBug = (function () { - /* global window */ - if (typeof window === 'undefined') { return false; } - for (var k in window) { - try { - if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { - try { - equalsConstructorPrototype(window[k]); - } catch (e) { - return true; - } - } - } catch (e) { - return true; - } - } - return false; - }()); - var equalsConstructorPrototypeIfNotBuggy = function (o) { - /* global window */ - if (typeof window === 'undefined' || !hasAutomationEqualityBug) { - return equalsConstructorPrototype(o); - } - try { - return equalsConstructorPrototype(o); - } catch (e) { - return false; - } - }; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object'; - var isFunction = toStr.call(object) === '[object Function]'; - var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === '[object String]'; - var theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError('Object.keys called on a non-object'); - } - - var skipProto = hasProtoEnumBug && isFunction; - if (isString && object.length > 0 && !has.call(object, 0)) { - for (var i = 0; i < object.length; ++i) { - theKeys.push(String(i)); - } - } - - if (isArguments && object.length > 0) { - for (var j = 0; j < object.length; ++j) { - theKeys.push(String(j)); - } - } else { - for (var name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(String(name)); - } - } - } - - if (hasDontEnumBug) { - var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); - - for (var k = 0; k < dontEnums.length; ++k) { - if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { - theKeys.push(dontEnums[k]); - } - } - } - return theKeys; - }; -} -module.exports = keysShim; - - -/***/ }), - -/***/ 806: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var slice = Array.prototype.slice; -var isArgs = __webpack_require__(4418); - -var origKeys = Object.keys; -var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8383); - -var originalKeys = Object.keys; - -keysShim.shim = function shimObjectKeys() { - if (Object.keys) { - var keysWorksWithArguments = (function () { - // Safari 5.0 bug - var args = Object.keys(arguments); - return args && args.length === arguments.length; - }(1, 2)); - if (!keysWorksWithArguments) { - Object.keys = function keys(object) { // eslint-disable-line func-name-matching - if (isArgs(object)) { - return originalKeys(slice.call(object)); - } - return originalKeys(object); - }; - } - } else { - Object.keys = keysShim; - } - return Object.keys || keysShim; -}; - -module.exports = keysShim; - - -/***/ }), - -/***/ 4418: -/***/ (function(module) { - -"use strict"; - - -var toStr = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toStr.call(value); - var isArgs = str === '[object Arguments]'; - if (!isArgs) { - isArgs = str !== '[object Array]' && - value !== null && - typeof value === 'object' && - typeof value.length === 'number' && - value.length >= 0 && - toStr.call(value.callee) === '[object Function]'; - } - return isArgs; -}; - - -/***/ }), - -/***/ 2148: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -// modified from https://github.com/es-shims/es6-shim -var keys = __webpack_require__(806); -var canBeObject = function (obj) { - return typeof obj !== 'undefined' && obj !== null; -}; -var hasSymbols = __webpack_require__(5682)(); -var callBound = __webpack_require__(7615); -var toObject = Object; -var $push = callBound('Array.prototype.push'); -var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable'); -var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; - -// eslint-disable-next-line no-unused-vars -module.exports = function assign(target, source1) { - if (!canBeObject(target)) { throw new TypeError('target must be an object'); } - var objTarget = toObject(target); - var s, source, i, props, syms, value, key; - for (s = 1; s < arguments.length; ++s) { - source = toObject(arguments[s]); - props = keys(source); - var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); - if (getSymbols) { - syms = getSymbols(source); - for (i = 0; i < syms.length; ++i) { - key = syms[i]; - if ($propIsEnumerable(source, key)) { - $push(props, key); - } - } - } - for (i = 0; i < props.length; ++i) { - key = props[i]; - value = source[key]; - if ($propIsEnumerable(source, key)) { - objTarget[key] = value; - } - } - } - return objTarget; -}; - - -/***/ }), - -/***/ 4011: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var defineProperties = __webpack_require__(9170); -var callBind = __webpack_require__(2550); - -var implementation = __webpack_require__(2148); -var getPolyfill = __webpack_require__(293); -var shim = __webpack_require__(2666); - -var polyfill = callBind.apply(getPolyfill()); -// eslint-disable-next-line no-unused-vars -var bound = function assign(target, source1) { - return polyfill(Object, arguments); -}; - -defineProperties(bound, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = bound; +if (true) { + module.exports = __webpack_require__(2950); +} else {} /***/ }), -/***/ 293: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var implementation = __webpack_require__(2148); - -var lacksProperEnumerationOrder = function () { - if (!Object.assign) { - return false; - } - /* - * v8, specifically in node 4.x, has a bug with incorrect property enumeration order - * note: this does not detect the bug unless there's 20 characters - */ - var str = 'abcdefghijklmnopqrst'; - var letters = str.split(''); - var map = {}; - for (var i = 0; i < letters.length; ++i) { - map[letters[i]] = letters[i]; - } - var obj = Object.assign({}, map); - var actual = ''; - for (var k in obj) { - actual += k; - } - return str !== actual; -}; - -var assignHasPendingExceptions = function () { - if (!Object.assign || !Object.preventExtensions) { - return false; - } - /* - * Firefox 37 still has "pending exception" logic in its Object.assign implementation, - * which is 72% slower than our shim, and Firefox 40's native implementation. - */ - var thrower = Object.preventExtensions({ 1: 2 }); - try { - Object.assign(thrower, 'xy'); - } catch (e) { - return thrower[1] === 'y'; - } - return false; -}; - -module.exports = function getPolyfill() { - if (!Object.assign) { - return implementation; - } - if (lacksProperEnumerationOrder()) { - return implementation; - } - if (assignHasPendingExceptions()) { - return implementation; - } - return Object.assign; -}; - - -/***/ }), - -/***/ 2666: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var define = __webpack_require__(9170); -var getPolyfill = __webpack_require__(293); - -module.exports = function shimAssign() { - var polyfill = getPolyfill(); - define( - Object, - { assign: polyfill }, - { assign: function () { return Object.assign !== polyfill; } } - ); - return polyfill; -}; - - -/***/ }), - -/***/ 1631: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var has = __webpack_require__(9284); -var RequireObjectCoercible = __webpack_require__(604); -var callBound = __webpack_require__(7615); - -var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); - -module.exports = function values(O) { - var obj = RequireObjectCoercible(O); - var vals = []; - for (var key in obj) { - if (has(obj, key) && $isEnumerable(obj, key)) { - vals.push(obj[key]); - } - } - return vals; -}; - - -/***/ }), - -/***/ 5861: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var define = __webpack_require__(9170); -var callBind = __webpack_require__(2550); - -var implementation = __webpack_require__(1631); -var getPolyfill = __webpack_require__(779); -var shim = __webpack_require__(7256); - -var polyfill = callBind(getPolyfill(), Object); - -define(polyfill, { - getPolyfill: getPolyfill, - implementation: implementation, - shim: shim -}); - -module.exports = polyfill; - - -/***/ }), - -/***/ 604: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -module.exports = __webpack_require__(2559); - - -/***/ }), - -/***/ 2559: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(6732); - -var $TypeError = GetIntrinsic('%TypeError%'); - -// http://www.ecma-international.org/ecma-262/5.1/#sec-9.10 - -module.exports = function CheckObjectCoercible(value, optMessage) { - if (value == null) { - throw new $TypeError(optMessage || ('Cannot call method on ' + value)); - } - return value; -}; - - -/***/ }), - -/***/ 6732: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -/* globals - AggregateError, - Atomics, - FinalizationRegistry, - SharedArrayBuffer, - WeakRef, -*/ - -var undefined; - -var $SyntaxError = SyntaxError; -var $Function = Function; -var $TypeError = TypeError; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - // eslint-disable-next-line no-new-func - return Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = Object.getOwnPropertyDescriptor; -if ($gOPD) { - try { - $gOPD({}, ''); - } catch (e) { - $gOPD = null; // this is IE 8, which has a broken gOPD - } -} - -var throwTypeError = function () { throw new $TypeError(); }; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = __webpack_require__(9905)(); - -var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto - -var asyncGenFunction = getEvalledConstructor('async function* () {}'); -var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined; -var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined; - -var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': getEvalledConstructor('async function () {}'), - '%AsyncGenerator%': asyncGenFunctionPrototype, - '%AsyncGeneratorFunction%': asyncGenFunction, - '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': EvalError, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': getEvalledConstructor('function* () {}'), - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': Object, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': RangeError, - '%ReferenceError%': ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet -}; - -var LEGACY_ALIASES = { - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = __webpack_require__(1930); -var hasOwn = __webpack_require__(9284); -var $concat = bind.call(Function.call, Array.prototype.concat); -var $spliceApply = bind.call(Function.apply, Array.prototype.splice); -var $replace = bind.call(Function.call, String.prototype.replace); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - if (!allowMissing && !(part in value)) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; - - -/***/ }), - -/***/ 779: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var implementation = __webpack_require__(1631); - -module.exports = function getPolyfill() { - return typeof Object.values === 'function' ? Object.values : implementation; -}; - - -/***/ }), - -/***/ 7256: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var getPolyfill = __webpack_require__(779); -var define = __webpack_require__(9170); - -module.exports = function shimValues() { - var polyfill = getPolyfill(); - define(Object, { values: polyfill }, { - values: function testValues() { - return Object.values !== polyfill; - } - }); - return polyfill; -}; - - -/***/ }), - -/***/ 5372: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 628: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** @@ -6241,7 +1026,7 @@ -var ReactPropTypesSecret = __webpack_require__(9567); +var ReactPropTypesSecret = __webpack_require__(4067); function emptyFunction() {} function emptyFunctionWithReset() {} @@ -6301,8 +1086,8 @@ /***/ }), -/***/ 2652: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 5826: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * Copyright (c) 2013-present, Facebook, Inc. @@ -6314,14 +1099,14 @@ if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(5372)(); + module.exports = __webpack_require__(628)(); } /***/ }), -/***/ 9567: -/***/ (function(module) { +/***/ 4067: +/***/ ((module) => { "use strict"; /** @@ -6340,9815 +1125,532 @@ /***/ }), -/***/ 2541: -/***/ (function(module) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @providesModule shallowCompare - */ - - - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ -function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - // Added the nonzero y check to make Flow happy, but it is redundant - return x !== 0 || y !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } -} - -/** - * Performs equality by iterating through keys on an object and returning false - * when any key has values which are not strictly equal between the arguments. - * Returns true when the values of all keys are strictly equal. - */ -function shallowEqual(objA, objB) { - if (is(objA, objB)) { - return true; - } - - if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { - return false; - } - - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); - - if (keysA.length !== keysB.length) { - return false; - } - - // Test for A's keys different from B. - for (var i = 0; i < keysA.length; i++) { - if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { - return false; - } - } - - return true; -} - -/** - * Does a shallow comparison for props and state. - * See ReactComponentWithPureRenderMixin - * See also https://facebook.github.io/react/docs/shallow-compare.html - */ -function shallowCompare(instance, nextProps, nextState) { - return ( - !shallowEqual(instance.props, nextProps) || - !shallowEqual(instance.state, nextState) - ); -} - -module.exports = shallowCompare; - - -/***/ }), - -/***/ 4185: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -// eslint-disable-next-line import/no-unresolved -__webpack_require__(17); +/***/ 9681: +/***/ ((module) => { + +var characterMap = { + "À": "A", + "Á": "A", + "Â": "A", + "Ã": "A", + "Ä": "A", + "Å": "A", + "Ấ": "A", + "Ắ": "A", + "Ẳ": "A", + "Ẵ": "A", + "Ặ": "A", + "Æ": "AE", + "Ầ": "A", + "Ằ": "A", + "Ȃ": "A", + "Ả": "A", + "Ạ": "A", + "Ẩ": "A", + "Ẫ": "A", + "Ậ": "A", + "Ç": "C", + "Ḉ": "C", + "È": "E", + "É": "E", + "Ê": "E", + "Ë": "E", + "Ế": "E", + "Ḗ": "E", + "Ề": "E", + "Ḕ": "E", + "Ḝ": "E", + "Ȇ": "E", + "Ẻ": "E", + "Ẽ": "E", + "Ẹ": "E", + "Ể": "E", + "Ễ": "E", + "Ệ": "E", + "Ì": "I", + "Í": "I", + "Î": "I", + "Ï": "I", + "Ḯ": "I", + "Ȋ": "I", + "Ỉ": "I", + "Ị": "I", + "Ð": "D", + "Ñ": "N", + "Ò": "O", + "Ó": "O", + "Ô": "O", + "Õ": "O", + "Ö": "O", + "Ø": "O", + "Ố": "O", + "Ṍ": "O", + "Ṓ": "O", + "Ȏ": "O", + "Ỏ": "O", + "Ọ": "O", + "Ổ": "O", + "Ỗ": "O", + "Ộ": "O", + "Ờ": "O", + "Ở": "O", + "Ỡ": "O", + "Ớ": "O", + "Ợ": "O", + "Ù": "U", + "Ú": "U", + "Û": "U", + "Ü": "U", + "Ủ": "U", + "Ụ": "U", + "Ử": "U", + "Ữ": "U", + "Ự": "U", + "Ý": "Y", + "à": "a", + "á": "a", + "â": "a", + "ã": "a", + "ä": "a", + "å": "a", + "ấ": "a", + "ắ": "a", + "ẳ": "a", + "ẵ": "a", + "ặ": "a", + "æ": "ae", + "ầ": "a", + "ằ": "a", + "ȃ": "a", + "ả": "a", + "ạ": "a", + "ẩ": "a", + "ẫ": "a", + "ậ": "a", + "ç": "c", + "ḉ": "c", + "è": "e", + "é": "e", + "ê": "e", + "ë": "e", + "ế": "e", + "ḗ": "e", + "ề": "e", + "ḕ": "e", + "ḝ": "e", + "ȇ": "e", + "ẻ": "e", + "ẽ": "e", + "ẹ": "e", + "ể": "e", + "ễ": "e", + "ệ": "e", + "ì": "i", + "í": "i", + "î": "i", + "ï": "i", + "ḯ": "i", + "ȋ": "i", + "ỉ": "i", + "ị": "i", + "ð": "d", + "ñ": "n", + "ò": "o", + "ó": "o", + "ô": "o", + "õ": "o", + "ö": "o", + "ø": "o", + "ố": "o", + "ṍ": "o", + "ṓ": "o", + "ȏ": "o", + "ỏ": "o", + "ọ": "o", + "ổ": "o", + "ỗ": "o", + "ộ": "o", + "ờ": "o", + "ở": "o", + "ỡ": "o", + "ớ": "o", + "ợ": "o", + "ù": "u", + "ú": "u", + "û": "u", + "ü": "u", + "ủ": "u", + "ụ": "u", + "ử": "u", + "ữ": "u", + "ự": "u", + "ý": "y", + "ÿ": "y", + "Ā": "A", + "ā": "a", + "Ă": "A", + "ă": "a", + "Ą": "A", + "ą": "a", + "Ć": "C", + "ć": "c", + "Ĉ": "C", + "ĉ": "c", + "Ċ": "C", + "ċ": "c", + "Č": "C", + "č": "c", + "C̆": "C", + "c̆": "c", + "Ď": "D", + "ď": "d", + "Đ": "D", + "đ": "d", + "Ē": "E", + "ē": "e", + "Ĕ": "E", + "ĕ": "e", + "Ė": "E", + "ė": "e", + "Ę": "E", + "ę": "e", + "Ě": "E", + "ě": "e", + "Ĝ": "G", + "Ǵ": "G", + "ĝ": "g", + "ǵ": "g", + "Ğ": "G", + "ğ": "g", + "Ġ": "G", + "ġ": "g", + "Ģ": "G", + "ģ": "g", + "Ĥ": "H", + "ĥ": "h", + "Ħ": "H", + "ħ": "h", + "Ḫ": "H", + "ḫ": "h", + "Ĩ": "I", + "ĩ": "i", + "Ī": "I", + "ī": "i", + "Ĭ": "I", + "ĭ": "i", + "Į": "I", + "į": "i", + "İ": "I", + "ı": "i", + "IJ": "IJ", + "ij": "ij", + "Ĵ": "J", + "ĵ": "j", + "Ķ": "K", + "ķ": "k", + "Ḱ": "K", + "ḱ": "k", + "K̆": "K", + "k̆": "k", + "Ĺ": "L", + "ĺ": "l", + "Ļ": "L", + "ļ": "l", + "Ľ": "L", + "ľ": "l", + "Ŀ": "L", + "ŀ": "l", + "Ł": "l", + "ł": "l", + "Ḿ": "M", + "ḿ": "m", + "M̆": "M", + "m̆": "m", + "Ń": "N", + "ń": "n", + "Ņ": "N", + "ņ": "n", + "Ň": "N", + "ň": "n", + "ʼn": "n", + "N̆": "N", + "n̆": "n", + "Ō": "O", + "ō": "o", + "Ŏ": "O", + "ŏ": "o", + "Ő": "O", + "ő": "o", + "Œ": "OE", + "œ": "oe", + "P̆": "P", + "p̆": "p", + "Ŕ": "R", + "ŕ": "r", + "Ŗ": "R", + "ŗ": "r", + "Ř": "R", + "ř": "r", + "R̆": "R", + "r̆": "r", + "Ȓ": "R", + "ȓ": "r", + "Ś": "S", + "ś": "s", + "Ŝ": "S", + "ŝ": "s", + "Ş": "S", + "Ș": "S", + "ș": "s", + "ş": "s", + "Š": "S", + "š": "s", + "Ţ": "T", + "ţ": "t", + "ț": "t", + "Ț": "T", + "Ť": "T", + "ť": "t", + "Ŧ": "T", + "ŧ": "t", + "T̆": "T", + "t̆": "t", + "Ũ": "U", + "ũ": "u", + "Ū": "U", + "ū": "u", + "Ŭ": "U", + "ŭ": "u", + "Ů": "U", + "ů": "u", + "Ű": "U", + "ű": "u", + "Ų": "U", + "ų": "u", + "Ȗ": "U", + "ȗ": "u", + "V̆": "V", + "v̆": "v", + "Ŵ": "W", + "ŵ": "w", + "Ẃ": "W", + "ẃ": "w", + "X̆": "X", + "x̆": "x", + "Ŷ": "Y", + "ŷ": "y", + "Ÿ": "Y", + "Y̆": "Y", + "y̆": "y", + "Ź": "Z", + "ź": "z", + "Ż": "Z", + "ż": "z", + "Ž": "Z", + "ž": "z", + "ſ": "s", + "ƒ": "f", + "Ơ": "O", + "ơ": "o", + "Ư": "U", + "ư": "u", + "Ǎ": "A", + "ǎ": "a", + "Ǐ": "I", + "ǐ": "i", + "Ǒ": "O", + "ǒ": "o", + "Ǔ": "U", + "ǔ": "u", + "Ǖ": "U", + "ǖ": "u", + "Ǘ": "U", + "ǘ": "u", + "Ǚ": "U", + "ǚ": "u", + "Ǜ": "U", + "ǜ": "u", + "Ứ": "U", + "ứ": "u", + "Ṹ": "U", + "ṹ": "u", + "Ǻ": "A", + "ǻ": "a", + "Ǽ": "AE", + "ǽ": "ae", + "Ǿ": "O", + "ǿ": "o", + "Þ": "TH", + "þ": "th", + "Ṕ": "P", + "ṕ": "p", + "Ṥ": "S", + "ṥ": "s", + "X́": "X", + "x́": "x", + "Ѓ": "Г", + "ѓ": "г", + "Ќ": "К", + "ќ": "к", + "A̋": "A", + "a̋": "a", + "E̋": "E", + "e̋": "e", + "I̋": "I", + "i̋": "i", + "Ǹ": "N", + "ǹ": "n", + "Ồ": "O", + "ồ": "o", + "Ṑ": "O", + "ṑ": "o", + "Ừ": "U", + "ừ": "u", + "Ẁ": "W", + "ẁ": "w", + "Ỳ": "Y", + "ỳ": "y", + "Ȁ": "A", + "ȁ": "a", + "Ȅ": "E", + "ȅ": "e", + "Ȉ": "I", + "ȉ": "i", + "Ȍ": "O", + "ȍ": "o", + "Ȑ": "R", + "ȑ": "r", + "Ȕ": "U", + "ȕ": "u", + "B̌": "B", + "b̌": "b", + "Č̣": "C", + "č̣": "c", + "Ê̌": "E", + "ê̌": "e", + "F̌": "F", + "f̌": "f", + "Ǧ": "G", + "ǧ": "g", + "Ȟ": "H", + "ȟ": "h", + "J̌": "J", + "ǰ": "j", + "Ǩ": "K", + "ǩ": "k", + "M̌": "M", + "m̌": "m", + "P̌": "P", + "p̌": "p", + "Q̌": "Q", + "q̌": "q", + "Ř̩": "R", + "ř̩": "r", + "Ṧ": "S", + "ṧ": "s", + "V̌": "V", + "v̌": "v", + "W̌": "W", + "w̌": "w", + "X̌": "X", + "x̌": "x", + "Y̌": "Y", + "y̌": "y", + "A̧": "A", + "a̧": "a", + "B̧": "B", + "b̧": "b", + "Ḑ": "D", + "ḑ": "d", + "Ȩ": "E", + "ȩ": "e", + "Ɛ̧": "E", + "ɛ̧": "e", + "Ḩ": "H", + "ḩ": "h", + "I̧": "I", + "i̧": "i", + "Ɨ̧": "I", + "ɨ̧": "i", + "M̧": "M", + "m̧": "m", + "O̧": "O", + "o̧": "o", + "Q̧": "Q", + "q̧": "q", + "U̧": "U", + "u̧": "u", + "X̧": "X", + "x̧": "x", + "Z̧": "Z", + "z̧": "z", + "й":"и", + "Й":"И", + "ё":"е", + "Ё":"Е", +}; + +var chars = Object.keys(characterMap).join('|'); +var allAccents = new RegExp(chars, 'g'); +var firstAccent = new RegExp(chars, ''); + +function matcher(match) { + return characterMap[match]; +} + +var removeAccents = function(string) { + return string.replace(allAccents, matcher); +}; + +var hasAccents = function(string) { + return !!string.match(firstAccent); +}; + +module.exports = removeAccents; +module.exports.has = hasAccents; +module.exports.remove = removeAccents; /***/ }), -/***/ 7617: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.PureCalendarDay = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _reactAddonsShallowCompare = __webpack_require__(2541); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _reactMomentProptypes = __webpack_require__(6150); - -var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _getCalendarDaySettings = __webpack_require__(7475); - -var _getCalendarDaySettings2 = _interopRequireDefault(_getCalendarDaySettings); - -var _ModifiersShape = __webpack_require__(6747); - -var _ModifiersShape2 = _interopRequireDefault(_ModifiersShape); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - day: _reactMomentProptypes2['default'].momentObj, - daySize: _airbnbPropTypes.nonNegativeInteger, - isOutsideDay: _propTypes2['default'].bool, - modifiers: _ModifiersShape2['default'], - isFocused: _propTypes2['default'].bool, - tabIndex: _propTypes2['default'].oneOf([0, -1]), - onDayClick: _propTypes2['default'].func, - onDayMouseEnter: _propTypes2['default'].func, - onDayMouseLeave: _propTypes2['default'].func, - renderDayContents: _propTypes2['default'].func, - ariaLabelFormat: _propTypes2['default'].string, - - // internationalization - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.CalendarDayPhrases)) -})); - -var defaultProps = { - day: (0, _moment2['default'])(), - daySize: _constants.DAY_SIZE, - isOutsideDay: false, - modifiers: new Set(), - isFocused: false, - tabIndex: -1, - onDayClick: function () { - function onDayClick() {} - - return onDayClick; - }(), - onDayMouseEnter: function () { - function onDayMouseEnter() {} - - return onDayMouseEnter; - }(), - onDayMouseLeave: function () { - function onDayMouseLeave() {} - - return onDayMouseLeave; - }(), - - renderDayContents: null, - ariaLabelFormat: 'dddd, LL', - - // internationalization - phrases: _defaultPhrases.CalendarDayPhrases -}; - -var CalendarDay = function (_React$Component) { - _inherits(CalendarDay, _React$Component); - - function CalendarDay() { - var _ref; - - _classCallCheck(this, CalendarDay); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _this = _possibleConstructorReturn(this, (_ref = CalendarDay.__proto__ || Object.getPrototypeOf(CalendarDay)).call.apply(_ref, [this].concat(args))); - - _this.setButtonRef = _this.setButtonRef.bind(_this); - return _this; - } - - _createClass(CalendarDay, [{ - key: 'shouldComponentUpdate', - value: function () { - function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState); - } - - return shouldComponentUpdate; - }() - }, { - key: 'componentDidUpdate', - value: function () { - function componentDidUpdate(prevProps) { - var _props = this.props, - isFocused = _props.isFocused, - tabIndex = _props.tabIndex; - - if (tabIndex === 0) { - if (isFocused || tabIndex !== prevProps.tabIndex) { - this.buttonRef.focus(); - } - } - } - - return componentDidUpdate; - }() - }, { - key: 'onDayClick', - value: function () { - function onDayClick(day, e) { - var onDayClick = this.props.onDayClick; - - onDayClick(day, e); - } - - return onDayClick; - }() - }, { - key: 'onDayMouseEnter', - value: function () { - function onDayMouseEnter(day, e) { - var onDayMouseEnter = this.props.onDayMouseEnter; - - onDayMouseEnter(day, e); - } - - return onDayMouseEnter; - }() - }, { - key: 'onDayMouseLeave', - value: function () { - function onDayMouseLeave(day, e) { - var onDayMouseLeave = this.props.onDayMouseLeave; - - onDayMouseLeave(day, e); - } - - return onDayMouseLeave; - }() - }, { - key: 'onKeyDown', - value: function () { - function onKeyDown(day, e) { - var onDayClick = this.props.onDayClick; - var key = e.key; - - if (key === 'Enter' || key === ' ') { - onDayClick(day, e); - } - } - - return onKeyDown; - }() - }, { - key: 'setButtonRef', - value: function () { - function setButtonRef(ref) { - this.buttonRef = ref; - } - - return setButtonRef; - }() - }, { - key: 'render', - value: function () { - function render() { - var _this2 = this; - - var _props2 = this.props, - day = _props2.day, - ariaLabelFormat = _props2.ariaLabelFormat, - daySize = _props2.daySize, - isOutsideDay = _props2.isOutsideDay, - modifiers = _props2.modifiers, - renderDayContents = _props2.renderDayContents, - tabIndex = _props2.tabIndex, - styles = _props2.styles, - phrases = _props2.phrases; - - - if (!day) return _react2['default'].createElement('td', null); - - var _getCalendarDaySettin = (0, _getCalendarDaySettings2['default'])(day, ariaLabelFormat, daySize, modifiers, phrases), - daySizeStyles = _getCalendarDaySettin.daySizeStyles, - useDefaultCursor = _getCalendarDaySettin.useDefaultCursor, - selected = _getCalendarDaySettin.selected, - hoveredSpan = _getCalendarDaySettin.hoveredSpan, - isOutsideRange = _getCalendarDaySettin.isOutsideRange, - ariaLabel = _getCalendarDaySettin.ariaLabel; - - return _react2['default'].createElement( - 'td', - _extends({}, (0, _reactWithStyles.css)(styles.CalendarDay, useDefaultCursor && styles.CalendarDay__defaultCursor, styles.CalendarDay__default, isOutsideDay && styles.CalendarDay__outside, modifiers.has('today') && styles.CalendarDay__today, modifiers.has('first-day-of-week') && styles.CalendarDay__firstDayOfWeek, modifiers.has('last-day-of-week') && styles.CalendarDay__lastDayOfWeek, modifiers.has('hovered-offset') && styles.CalendarDay__hovered_offset, modifiers.has('highlighted-calendar') && styles.CalendarDay__highlighted_calendar, modifiers.has('blocked-minimum-nights') && styles.CalendarDay__blocked_minimum_nights, modifiers.has('blocked-calendar') && styles.CalendarDay__blocked_calendar, hoveredSpan && styles.CalendarDay__hovered_span, modifiers.has('selected-span') && styles.CalendarDay__selected_span, modifiers.has('last-in-range') && styles.CalendarDay__last_in_range, modifiers.has('selected-start') && styles.CalendarDay__selected_start, modifiers.has('selected-end') && styles.CalendarDay__selected_end, selected && styles.CalendarDay__selected, isOutsideRange && styles.CalendarDay__blocked_out_of_range, daySizeStyles), { - role: 'button' // eslint-disable-line jsx-a11y/no-noninteractive-element-to-interactive-role - , ref: this.setButtonRef, - 'aria-label': ariaLabel, - onMouseEnter: function () { - function onMouseEnter(e) { - _this2.onDayMouseEnter(day, e); - } - - return onMouseEnter; - }(), - onMouseLeave: function () { - function onMouseLeave(e) { - _this2.onDayMouseLeave(day, e); - } - - return onMouseLeave; - }(), - onMouseUp: function () { - function onMouseUp(e) { - e.currentTarget.blur(); - } - - return onMouseUp; - }(), - onClick: function () { - function onClick(e) { - _this2.onDayClick(day, e); - } - - return onClick; - }(), - onKeyDown: function () { - function onKeyDown(e) { - _this2.onKeyDown(day, e); - } - - return onKeyDown; - }(), - tabIndex: tabIndex - }), - renderDayContents ? renderDayContents(day, modifiers) : day.format('D') - ); - } - - return render; - }() - }]); - - return CalendarDay; -}(_react2['default'].Component); - -CalendarDay.propTypes = propTypes; -CalendarDay.defaultProps = defaultProps; - -exports.PureCalendarDay = CalendarDay; -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref2) { - var _ref2$reactDates = _ref2.reactDates, - color = _ref2$reactDates.color, - font = _ref2$reactDates.font; - return { - CalendarDay: { - boxSizing: 'border-box', - cursor: 'pointer', - fontSize: font.size, - textAlign: 'center', - - ':active': { - outline: 0 - } - }, - - CalendarDay__defaultCursor: { - cursor: 'default' - }, - - CalendarDay__default: { - border: '1px solid ' + String(color.core.borderLight), - color: color.text, - background: color.background, - - ':hover': { - background: color.core.borderLight, - border: '1px double ' + String(color.core.borderLight), - color: 'inherit' - } - }, - - CalendarDay__hovered_offset: { - background: color.core.borderBright, - border: '1px double ' + String(color.core.borderLight), - color: 'inherit' - }, - - CalendarDay__outside: { - border: 0, - background: color.outside.backgroundColor, - color: color.outside.color, - - ':hover': { - border: 0 - } - }, - - CalendarDay__blocked_minimum_nights: { - background: color.minimumNights.backgroundColor, - border: '1px solid ' + String(color.minimumNights.borderColor), - color: color.minimumNights.color, - - ':hover': { - background: color.minimumNights.backgroundColor_hover, - color: color.minimumNights.color_active - }, - - ':active': { - background: color.minimumNights.backgroundColor_active, - color: color.minimumNights.color_active - } - }, - - CalendarDay__highlighted_calendar: { - background: color.highlighted.backgroundColor, - color: color.highlighted.color, - - ':hover': { - background: color.highlighted.backgroundColor_hover, - color: color.highlighted.color_active - }, - - ':active': { - background: color.highlighted.backgroundColor_active, - color: color.highlighted.color_active - } - }, - - CalendarDay__selected_span: { - background: color.selectedSpan.backgroundColor, - border: '1px solid ' + String(color.selectedSpan.borderColor), - color: color.selectedSpan.color, - - ':hover': { - background: color.selectedSpan.backgroundColor_hover, - border: '1px solid ' + String(color.selectedSpan.borderColor), - color: color.selectedSpan.color_active - }, - - ':active': { - background: color.selectedSpan.backgroundColor_active, - border: '1px solid ' + String(color.selectedSpan.borderColor), - color: color.selectedSpan.color_active - } - }, - - CalendarDay__last_in_range: { - borderRight: color.core.primary - }, - - CalendarDay__selected: { - background: color.selected.backgroundColor, - border: '1px solid ' + String(color.selected.borderColor), - color: color.selected.color, - - ':hover': { - background: color.selected.backgroundColor_hover, - border: '1px solid ' + String(color.selected.borderColor), - color: color.selected.color_active - }, - - ':active': { - background: color.selected.backgroundColor_active, - border: '1px solid ' + String(color.selected.borderColor), - color: color.selected.color_active - } - }, - - CalendarDay__hovered_span: { - background: color.hoveredSpan.backgroundColor, - border: '1px solid ' + String(color.hoveredSpan.borderColor), - color: color.hoveredSpan.color, - - ':hover': { - background: color.hoveredSpan.backgroundColor_hover, - border: '1px solid ' + String(color.hoveredSpan.borderColor), - color: color.hoveredSpan.color_active - }, - - ':active': { - background: color.hoveredSpan.backgroundColor_active, - border: '1px solid ' + String(color.hoveredSpan.borderColor), - color: color.hoveredSpan.color_active - } - }, - - CalendarDay__blocked_calendar: { - background: color.blocked_calendar.backgroundColor, - border: '1px solid ' + String(color.blocked_calendar.borderColor), - color: color.blocked_calendar.color, - - ':hover': { - background: color.blocked_calendar.backgroundColor_hover, - border: '1px solid ' + String(color.blocked_calendar.borderColor), - color: color.blocked_calendar.color_active - }, - - ':active': { - background: color.blocked_calendar.backgroundColor_active, - border: '1px solid ' + String(color.blocked_calendar.borderColor), - color: color.blocked_calendar.color_active - } - }, - - CalendarDay__blocked_out_of_range: { - background: color.blocked_out_of_range.backgroundColor, - border: '1px solid ' + String(color.blocked_out_of_range.borderColor), - color: color.blocked_out_of_range.color, - - ':hover': { - background: color.blocked_out_of_range.backgroundColor_hover, - border: '1px solid ' + String(color.blocked_out_of_range.borderColor), - color: color.blocked_out_of_range.color_active - }, - - ':active': { - background: color.blocked_out_of_range.backgroundColor_active, - border: '1px solid ' + String(color.blocked_out_of_range.borderColor), - color: color.blocked_out_of_range.color_active - } - }, - - CalendarDay__selected_start: {}, - CalendarDay__selected_end: {}, - CalendarDay__today: {}, - CalendarDay__firstDayOfWeek: {}, - CalendarDay__lastDayOfWeek: {} - }; -})(CalendarDay); - -/***/ }), - -/***/ 5986: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _reactAddonsShallowCompare = __webpack_require__(2541); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _reactMomentProptypes = __webpack_require__(6150); - -var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _CalendarWeek = __webpack_require__(4604); - -var _CalendarWeek2 = _interopRequireDefault(_CalendarWeek); - -var _CalendarDay = __webpack_require__(7617); - -var _CalendarDay2 = _interopRequireDefault(_CalendarDay); - -var _calculateDimension = __webpack_require__(8607); - -var _calculateDimension2 = _interopRequireDefault(_calculateDimension); - -var _getCalendarMonthWeeks = __webpack_require__(5644); - -var _getCalendarMonthWeeks2 = _interopRequireDefault(_getCalendarMonthWeeks); - -var _isSameDay = __webpack_require__(3923); - -var _isSameDay2 = _interopRequireDefault(_isSameDay); - -var _toISODateString = __webpack_require__(7310); - -var _toISODateString2 = _interopRequireDefault(_toISODateString); - -var _ModifiersShape = __webpack_require__(6747); - -var _ModifiersShape2 = _interopRequireDefault(_ModifiersShape); - -var _ScrollableOrientationShape = __webpack_require__(6553); - -var _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape); - -var _DayOfWeekShape = __webpack_require__(243); - -var _DayOfWeekShape2 = _interopRequireDefault(_DayOfWeekShape); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint react/no-array-index-key: 0 */ - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - month: _reactMomentProptypes2['default'].momentObj, - horizontalMonthPadding: _airbnbPropTypes.nonNegativeInteger, - isVisible: _propTypes2['default'].bool, - enableOutsideDays: _propTypes2['default'].bool, - modifiers: _propTypes2['default'].objectOf(_ModifiersShape2['default']), - orientation: _ScrollableOrientationShape2['default'], - daySize: _airbnbPropTypes.nonNegativeInteger, - onDayClick: _propTypes2['default'].func, - onDayMouseEnter: _propTypes2['default'].func, - onDayMouseLeave: _propTypes2['default'].func, - onMonthSelect: _propTypes2['default'].func, - onYearSelect: _propTypes2['default'].func, - renderMonthText: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - renderCalendarDay: _propTypes2['default'].func, - renderDayContents: _propTypes2['default'].func, - renderMonthElement: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - firstDayOfWeek: _DayOfWeekShape2['default'], - setMonthTitleHeight: _propTypes2['default'].func, - verticalBorderSpacing: _airbnbPropTypes.nonNegativeInteger, - - focusedDate: _reactMomentProptypes2['default'].momentObj, // indicates focusable day - isFocused: _propTypes2['default'].bool, // indicates whether or not to move focus to focusable day - - // i18n - monthFormat: _propTypes2['default'].string, - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.CalendarDayPhrases)), - dayAriaLabelFormat: _propTypes2['default'].string -})); - -var defaultProps = { - month: (0, _moment2['default'])(), - horizontalMonthPadding: 13, - isVisible: true, - enableOutsideDays: false, - modifiers: {}, - orientation: _constants.HORIZONTAL_ORIENTATION, - daySize: _constants.DAY_SIZE, - onDayClick: function () { - function onDayClick() {} - - return onDayClick; - }(), - onDayMouseEnter: function () { - function onDayMouseEnter() {} - - return onDayMouseEnter; - }(), - onDayMouseLeave: function () { - function onDayMouseLeave() {} - - return onDayMouseLeave; - }(), - onMonthSelect: function () { - function onMonthSelect() {} - - return onMonthSelect; - }(), - onYearSelect: function () { - function onYearSelect() {} - - return onYearSelect; - }(), - - renderMonthText: null, - renderCalendarDay: function () { - function renderCalendarDay(props) { - return _react2['default'].createElement(_CalendarDay2['default'], props); - } - - return renderCalendarDay; - }(), - renderDayContents: null, - renderMonthElement: null, - firstDayOfWeek: null, - setMonthTitleHeight: null, - - focusedDate: null, - isFocused: false, - - // i18n - monthFormat: 'MMMM YYYY', // english locale - phrases: _defaultPhrases.CalendarDayPhrases, - dayAriaLabelFormat: undefined, - verticalBorderSpacing: undefined -}; - -var CalendarMonth = function (_React$Component) { - _inherits(CalendarMonth, _React$Component); - - function CalendarMonth(props) { - _classCallCheck(this, CalendarMonth); - - var _this = _possibleConstructorReturn(this, (CalendarMonth.__proto__ || Object.getPrototypeOf(CalendarMonth)).call(this, props)); - - _this.state = { - weeks: (0, _getCalendarMonthWeeks2['default'])(props.month, props.enableOutsideDays, props.firstDayOfWeek == null ? _moment2['default'].localeData().firstDayOfWeek() : props.firstDayOfWeek) - }; - - _this.setCaptionRef = _this.setCaptionRef.bind(_this); - _this.setMonthTitleHeight = _this.setMonthTitleHeight.bind(_this); - return _this; - } - - _createClass(CalendarMonth, [{ - key: 'componentDidMount', - value: function () { - function componentDidMount() { - this.setMonthTitleHeightTimeout = setTimeout(this.setMonthTitleHeight, 0); - } - - return componentDidMount; - }() - }, { - key: 'componentWillReceiveProps', - value: function () { - function componentWillReceiveProps(nextProps) { - var month = nextProps.month, - enableOutsideDays = nextProps.enableOutsideDays, - firstDayOfWeek = nextProps.firstDayOfWeek; - var _props = this.props, - prevMonth = _props.month, - prevEnableOutsideDays = _props.enableOutsideDays, - prevFirstDayOfWeek = _props.firstDayOfWeek; - - if (!month.isSame(prevMonth) || enableOutsideDays !== prevEnableOutsideDays || firstDayOfWeek !== prevFirstDayOfWeek) { - this.setState({ - weeks: (0, _getCalendarMonthWeeks2['default'])(month, enableOutsideDays, firstDayOfWeek == null ? _moment2['default'].localeData().firstDayOfWeek() : firstDayOfWeek) - }); - } - } - - return componentWillReceiveProps; - }() - }, { - key: 'shouldComponentUpdate', - value: function () { - function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState); - } - - return shouldComponentUpdate; - }() - }, { - key: 'componentWillUnmount', - value: function () { - function componentWillUnmount() { - if (this.setMonthTitleHeightTimeout) { - clearTimeout(this.setMonthTitleHeightTimeout); - } - } - - return componentWillUnmount; - }() - }, { - key: 'setMonthTitleHeight', - value: function () { - function setMonthTitleHeight() { - var setMonthTitleHeight = this.props.setMonthTitleHeight; - - if (setMonthTitleHeight) { - var captionHeight = (0, _calculateDimension2['default'])(this.captionRef, 'height', true, true); - setMonthTitleHeight(captionHeight); - } - } - - return setMonthTitleHeight; - }() - }, { - key: 'setCaptionRef', - value: function () { - function setCaptionRef(ref) { - this.captionRef = ref; - } - - return setCaptionRef; - }() - }, { - key: 'render', - value: function () { - function render() { - var _props2 = this.props, - dayAriaLabelFormat = _props2.dayAriaLabelFormat, - daySize = _props2.daySize, - focusedDate = _props2.focusedDate, - horizontalMonthPadding = _props2.horizontalMonthPadding, - isFocused = _props2.isFocused, - isVisible = _props2.isVisible, - modifiers = _props2.modifiers, - month = _props2.month, - monthFormat = _props2.monthFormat, - onDayClick = _props2.onDayClick, - onDayMouseEnter = _props2.onDayMouseEnter, - onDayMouseLeave = _props2.onDayMouseLeave, - onMonthSelect = _props2.onMonthSelect, - onYearSelect = _props2.onYearSelect, - orientation = _props2.orientation, - phrases = _props2.phrases, - renderCalendarDay = _props2.renderCalendarDay, - renderDayContents = _props2.renderDayContents, - renderMonthElement = _props2.renderMonthElement, - renderMonthText = _props2.renderMonthText, - styles = _props2.styles, - verticalBorderSpacing = _props2.verticalBorderSpacing; - var weeks = this.state.weeks; - - var monthTitle = renderMonthText ? renderMonthText(month) : month.format(monthFormat); - - var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; - - return _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.CalendarMonth, { padding: '0 ' + String(horizontalMonthPadding) + 'px' }), { - 'data-visible': isVisible - }), - _react2['default'].createElement( - 'div', - _extends({ - ref: this.setCaptionRef - }, (0, _reactWithStyles.css)(styles.CalendarMonth_caption, verticalScrollable && styles.CalendarMonth_caption__verticalScrollable)), - renderMonthElement ? renderMonthElement({ month: month, onMonthSelect: onMonthSelect, onYearSelect: onYearSelect }) : _react2['default'].createElement( - 'strong', - null, - monthTitle - ) - ), - _react2['default'].createElement( - 'table', - _extends({}, (0, _reactWithStyles.css)(!verticalBorderSpacing && styles.CalendarMonth_table, verticalBorderSpacing && styles.CalendarMonth_verticalSpacing, verticalBorderSpacing && { borderSpacing: '0px ' + String(verticalBorderSpacing) + 'px' }), { - role: 'presentation' - }), - _react2['default'].createElement( - 'tbody', - null, - weeks.map(function (week, i) { - return _react2['default'].createElement( - _CalendarWeek2['default'], - { key: i }, - week.map(function (day, dayOfWeek) { - return renderCalendarDay({ - key: dayOfWeek, - day: day, - daySize: daySize, - isOutsideDay: !day || day.month() !== month.month(), - tabIndex: isVisible && (0, _isSameDay2['default'])(day, focusedDate) ? 0 : -1, - isFocused: isFocused, - onDayMouseEnter: onDayMouseEnter, - onDayMouseLeave: onDayMouseLeave, - onDayClick: onDayClick, - renderDayContents: renderDayContents, - phrases: phrases, - modifiers: modifiers[(0, _toISODateString2['default'])(day)], - ariaLabelFormat: dayAriaLabelFormat - }); - }) - ); - }) - ) - ) - ); - } - - return render; - }() - }]); - - return CalendarMonth; -}(_react2['default'].Component); - -CalendarMonth.propTypes = propTypes; -CalendarMonth.defaultProps = defaultProps; - -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref) { - var _ref$reactDates = _ref.reactDates, - color = _ref$reactDates.color, - font = _ref$reactDates.font, - spacing = _ref$reactDates.spacing; - return { - CalendarMonth: { - background: color.background, - textAlign: 'center', - verticalAlign: 'top', - userSelect: 'none' - }, - - CalendarMonth_table: { - borderCollapse: 'collapse', - borderSpacing: 0 - }, - - CalendarMonth_verticalSpacing: { - borderCollapse: 'separate' - }, - - CalendarMonth_caption: { - color: color.text, - fontSize: font.captionSize, - textAlign: 'center', - paddingTop: spacing.captionPaddingTop, - paddingBottom: spacing.captionPaddingBottom, - captionSide: 'initial' - }, - - CalendarMonth_caption__verticalScrollable: { - paddingTop: 12, - paddingBottom: 7 - } - }; -})(CalendarMonth); - -/***/ }), - -/***/ 7938: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _reactAddonsShallowCompare = __webpack_require__(2541); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _reactMomentProptypes = __webpack_require__(6150); - -var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _consolidatedEvents = __webpack_require__(8495); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _CalendarMonth = __webpack_require__(5986); - -var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth); - -var _isTransitionEndSupported = __webpack_require__(7978); - -var _isTransitionEndSupported2 = _interopRequireDefault(_isTransitionEndSupported); - -var _getTransformStyles = __webpack_require__(8304); - -var _getTransformStyles2 = _interopRequireDefault(_getTransformStyles); - -var _getCalendarMonthWidth = __webpack_require__(8964); - -var _getCalendarMonthWidth2 = _interopRequireDefault(_getCalendarMonthWidth); - -var _toISOMonthString = __webpack_require__(2705); - -var _toISOMonthString2 = _interopRequireDefault(_toISOMonthString); - -var _isPrevMonth = __webpack_require__(3858); - -var _isPrevMonth2 = _interopRequireDefault(_isPrevMonth); - -var _isNextMonth = __webpack_require__(1310); - -var _isNextMonth2 = _interopRequireDefault(_isNextMonth); - -var _ModifiersShape = __webpack_require__(6747); - -var _ModifiersShape2 = _interopRequireDefault(_ModifiersShape); - -var _ScrollableOrientationShape = __webpack_require__(6553); - -var _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape); - -var _DayOfWeekShape = __webpack_require__(243); - -var _DayOfWeekShape2 = _interopRequireDefault(_DayOfWeekShape); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - enableOutsideDays: _propTypes2['default'].bool, - firstVisibleMonthIndex: _propTypes2['default'].number, - horizontalMonthPadding: _airbnbPropTypes.nonNegativeInteger, - initialMonth: _reactMomentProptypes2['default'].momentObj, - isAnimating: _propTypes2['default'].bool, - numberOfMonths: _propTypes2['default'].number, - modifiers: _propTypes2['default'].objectOf(_propTypes2['default'].objectOf(_ModifiersShape2['default'])), - orientation: _ScrollableOrientationShape2['default'], - onDayClick: _propTypes2['default'].func, - onDayMouseEnter: _propTypes2['default'].func, - onDayMouseLeave: _propTypes2['default'].func, - onMonthTransitionEnd: _propTypes2['default'].func, - onMonthChange: _propTypes2['default'].func, - onYearChange: _propTypes2['default'].func, - renderMonthText: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - renderCalendarDay: _propTypes2['default'].func, - renderDayContents: _propTypes2['default'].func, - translationValue: _propTypes2['default'].number, - renderMonthElement: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - daySize: _airbnbPropTypes.nonNegativeInteger, - focusedDate: _reactMomentProptypes2['default'].momentObj, // indicates focusable day - isFocused: _propTypes2['default'].bool, // indicates whether or not to move focus to focusable day - firstDayOfWeek: _DayOfWeekShape2['default'], - setMonthTitleHeight: _propTypes2['default'].func, - isRTL: _propTypes2['default'].bool, - transitionDuration: _airbnbPropTypes.nonNegativeInteger, - verticalBorderSpacing: _airbnbPropTypes.nonNegativeInteger, - - // i18n - monthFormat: _propTypes2['default'].string, - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.CalendarDayPhrases)), - dayAriaLabelFormat: _propTypes2['default'].string -})); - -var defaultProps = { - enableOutsideDays: false, - firstVisibleMonthIndex: 0, - horizontalMonthPadding: 13, - initialMonth: (0, _moment2['default'])(), - isAnimating: false, - numberOfMonths: 1, - modifiers: {}, - orientation: _constants.HORIZONTAL_ORIENTATION, - onDayClick: function () { - function onDayClick() {} - - return onDayClick; - }(), - onDayMouseEnter: function () { - function onDayMouseEnter() {} - - return onDayMouseEnter; - }(), - onDayMouseLeave: function () { - function onDayMouseLeave() {} - - return onDayMouseLeave; - }(), - onMonthChange: function () { - function onMonthChange() {} - - return onMonthChange; - }(), - onYearChange: function () { - function onYearChange() {} - - return onYearChange; - }(), - onMonthTransitionEnd: function () { - function onMonthTransitionEnd() {} - - return onMonthTransitionEnd; - }(), - - renderMonthText: null, - renderCalendarDay: undefined, - renderDayContents: null, - translationValue: null, - renderMonthElement: null, - daySize: _constants.DAY_SIZE, - focusedDate: null, - isFocused: false, - firstDayOfWeek: null, - setMonthTitleHeight: null, - isRTL: false, - transitionDuration: 200, - verticalBorderSpacing: undefined, - - // i18n - monthFormat: 'MMMM YYYY', // english locale - phrases: _defaultPhrases.CalendarDayPhrases, - dayAriaLabelFormat: undefined -}; - -function getMonths(initialMonth, numberOfMonths, withoutTransitionMonths) { - var month = initialMonth.clone(); - if (!withoutTransitionMonths) month = month.subtract(1, 'month'); - - var months = []; - for (var i = 0; i < (withoutTransitionMonths ? numberOfMonths : numberOfMonths + 2); i += 1) { - months.push(month); - month = month.clone().add(1, 'month'); - } - - return months; -} - -var CalendarMonthGrid = function (_React$Component) { - _inherits(CalendarMonthGrid, _React$Component); - - function CalendarMonthGrid(props) { - _classCallCheck(this, CalendarMonthGrid); - - var _this = _possibleConstructorReturn(this, (CalendarMonthGrid.__proto__ || Object.getPrototypeOf(CalendarMonthGrid)).call(this, props)); - - var withoutTransitionMonths = props.orientation === _constants.VERTICAL_SCROLLABLE; - _this.state = { - months: getMonths(props.initialMonth, props.numberOfMonths, withoutTransitionMonths) - }; - - _this.isTransitionEndSupported = (0, _isTransitionEndSupported2['default'])(); - _this.onTransitionEnd = _this.onTransitionEnd.bind(_this); - _this.setContainerRef = _this.setContainerRef.bind(_this); - - _this.locale = _moment2['default'].locale(); - _this.onMonthSelect = _this.onMonthSelect.bind(_this); - _this.onYearSelect = _this.onYearSelect.bind(_this); - return _this; - } - - _createClass(CalendarMonthGrid, [{ - key: 'componentDidMount', - value: function () { - function componentDidMount() { - this.removeEventListener = (0, _consolidatedEvents.addEventListener)(this.container, 'transitionend', this.onTransitionEnd); - } - - return componentDidMount; - }() - }, { - key: 'componentWillReceiveProps', - value: function () { - function componentWillReceiveProps(nextProps) { - var _this2 = this; - - var initialMonth = nextProps.initialMonth, - numberOfMonths = nextProps.numberOfMonths, - orientation = nextProps.orientation; - var months = this.state.months; - var _props = this.props, - prevInitialMonth = _props.initialMonth, - prevNumberOfMonths = _props.numberOfMonths; - - var hasMonthChanged = !prevInitialMonth.isSame(initialMonth, 'month'); - var hasNumberOfMonthsChanged = prevNumberOfMonths !== numberOfMonths; - var newMonths = months; - - if (hasMonthChanged && !hasNumberOfMonthsChanged) { - if ((0, _isNextMonth2['default'])(prevInitialMonth, initialMonth)) { - newMonths = months.slice(1); - newMonths.push(months[months.length - 1].clone().add(1, 'month')); - } else if ((0, _isPrevMonth2['default'])(prevInitialMonth, initialMonth)) { - newMonths = months.slice(0, months.length - 1); - newMonths.unshift(months[0].clone().subtract(1, 'month')); - } else { - var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; - newMonths = getMonths(initialMonth, numberOfMonths, withoutTransitionMonths); - } - } - - if (hasNumberOfMonthsChanged) { - var _withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; - newMonths = getMonths(initialMonth, numberOfMonths, _withoutTransitionMonths); - } - - var momentLocale = _moment2['default'].locale(); - if (this.locale !== momentLocale) { - this.locale = momentLocale; - newMonths = newMonths.map(function (m) { - return m.locale(_this2.locale); - }); - } - - this.setState({ - months: newMonths - }); - } - - return componentWillReceiveProps; - }() - }, { - key: 'shouldComponentUpdate', - value: function () { - function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState); - } - - return shouldComponentUpdate; - }() - }, { - key: 'componentDidUpdate', - value: function () { - function componentDidUpdate() { - var _props2 = this.props, - isAnimating = _props2.isAnimating, - transitionDuration = _props2.transitionDuration, - onMonthTransitionEnd = _props2.onMonthTransitionEnd; - - // For IE9, immediately call onMonthTransitionEnd instead of - // waiting for the animation to complete. Similarly, if transitionDuration - // is set to 0, also immediately invoke the onMonthTransitionEnd callback - - if ((!this.isTransitionEndSupported || !transitionDuration) && isAnimating) { - onMonthTransitionEnd(); - } - } - - return componentDidUpdate; - }() - }, { - key: 'componentWillUnmount', - value: function () { - function componentWillUnmount() { - if (this.removeEventListener) this.removeEventListener(); - } - - return componentWillUnmount; - }() - }, { - key: 'onTransitionEnd', - value: function () { - function onTransitionEnd() { - var onMonthTransitionEnd = this.props.onMonthTransitionEnd; - - onMonthTransitionEnd(); - } - - return onTransitionEnd; - }() - }, { - key: 'onMonthSelect', - value: function () { - function onMonthSelect(currentMonth, newMonthVal) { - var newMonth = currentMonth.clone(); - var _props3 = this.props, - onMonthChange = _props3.onMonthChange, - orientation = _props3.orientation; - var months = this.state.months; - - var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; - var initialMonthSubtraction = months.indexOf(currentMonth); - if (!withoutTransitionMonths) { - initialMonthSubtraction -= 1; - } - newMonth.set('month', newMonthVal).subtract(initialMonthSubtraction, 'months'); - onMonthChange(newMonth); - } - - return onMonthSelect; - }() - }, { - key: 'onYearSelect', - value: function () { - function onYearSelect(currentMonth, newYearVal) { - var newMonth = currentMonth.clone(); - var _props4 = this.props, - onYearChange = _props4.onYearChange, - orientation = _props4.orientation; - var months = this.state.months; - - var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; - var initialMonthSubtraction = months.indexOf(currentMonth); - if (!withoutTransitionMonths) { - initialMonthSubtraction -= 1; - } - newMonth.set('year', newYearVal).subtract(initialMonthSubtraction, 'months'); - onYearChange(newMonth); - } - - return onYearSelect; - }() - }, { - key: 'setContainerRef', - value: function () { - function setContainerRef(ref) { - this.container = ref; - } - - return setContainerRef; - }() - }, { - key: 'render', - value: function () { - function render() { - var _this3 = this; - - var _props5 = this.props, - enableOutsideDays = _props5.enableOutsideDays, - firstVisibleMonthIndex = _props5.firstVisibleMonthIndex, - horizontalMonthPadding = _props5.horizontalMonthPadding, - isAnimating = _props5.isAnimating, - modifiers = _props5.modifiers, - numberOfMonths = _props5.numberOfMonths, - monthFormat = _props5.monthFormat, - orientation = _props5.orientation, - translationValue = _props5.translationValue, - daySize = _props5.daySize, - onDayMouseEnter = _props5.onDayMouseEnter, - onDayMouseLeave = _props5.onDayMouseLeave, - onDayClick = _props5.onDayClick, - renderMonthText = _props5.renderMonthText, - renderCalendarDay = _props5.renderCalendarDay, - renderDayContents = _props5.renderDayContents, - renderMonthElement = _props5.renderMonthElement, - onMonthTransitionEnd = _props5.onMonthTransitionEnd, - firstDayOfWeek = _props5.firstDayOfWeek, - focusedDate = _props5.focusedDate, - isFocused = _props5.isFocused, - isRTL = _props5.isRTL, - styles = _props5.styles, - phrases = _props5.phrases, - dayAriaLabelFormat = _props5.dayAriaLabelFormat, - transitionDuration = _props5.transitionDuration, - verticalBorderSpacing = _props5.verticalBorderSpacing, - setMonthTitleHeight = _props5.setMonthTitleHeight; - var months = this.state.months; - - var isVertical = orientation === _constants.VERTICAL_ORIENTATION; - var isVerticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; - var isHorizontal = orientation === _constants.HORIZONTAL_ORIENTATION; - - var calendarMonthWidth = (0, _getCalendarMonthWidth2['default'])(daySize, horizontalMonthPadding); - - var width = isVertical || isVerticalScrollable ? calendarMonthWidth : (numberOfMonths + 2) * calendarMonthWidth; - - var transformType = isVertical || isVerticalScrollable ? 'translateY' : 'translateX'; - var transformValue = transformType + '(' + String(translationValue) + 'px)'; - - return _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.CalendarMonthGrid, isHorizontal && styles.CalendarMonthGrid__horizontal, isVertical && styles.CalendarMonthGrid__vertical, isVerticalScrollable && styles.CalendarMonthGrid__vertical_scrollable, isAnimating && styles.CalendarMonthGrid__animating, isAnimating && transitionDuration && { - transition: 'transform ' + String(transitionDuration) + 'ms ease-in-out' - }, (0, _object2['default'])({}, (0, _getTransformStyles2['default'])(transformValue), { - width: width - })), { - ref: this.setContainerRef, - onTransitionEnd: onMonthTransitionEnd - }), - months.map(function (month, i) { - var isVisible = i >= firstVisibleMonthIndex && i < firstVisibleMonthIndex + numberOfMonths; - var hideForAnimation = i === 0 && !isVisible; - var showForAnimation = i === 0 && isAnimating && isVisible; - var monthString = (0, _toISOMonthString2['default'])(month); - return _react2['default'].createElement( - 'div', - _extends({ - key: monthString - }, (0, _reactWithStyles.css)(isHorizontal && styles.CalendarMonthGrid_month__horizontal, hideForAnimation && styles.CalendarMonthGrid_month__hideForAnimation, showForAnimation && !isVertical && !isRTL && { - position: 'absolute', - left: -calendarMonthWidth - }, showForAnimation && !isVertical && isRTL && { - position: 'absolute', - right: 0 - }, showForAnimation && isVertical && { - position: 'absolute', - top: -translationValue - }, !isVisible && !isAnimating && styles.CalendarMonthGrid_month__hidden)), - _react2['default'].createElement(_CalendarMonth2['default'], { - month: month, - isVisible: isVisible, - enableOutsideDays: enableOutsideDays, - modifiers: modifiers[monthString], - monthFormat: monthFormat, - orientation: orientation, - onDayMouseEnter: onDayMouseEnter, - onDayMouseLeave: onDayMouseLeave, - onDayClick: onDayClick, - onMonthSelect: _this3.onMonthSelect, - onYearSelect: _this3.onYearSelect, - renderMonthText: renderMonthText, - renderCalendarDay: renderCalendarDay, - renderDayContents: renderDayContents, - renderMonthElement: renderMonthElement, - firstDayOfWeek: firstDayOfWeek, - daySize: daySize, - focusedDate: isVisible ? focusedDate : null, - isFocused: isFocused, - phrases: phrases, - setMonthTitleHeight: setMonthTitleHeight, - dayAriaLabelFormat: dayAriaLabelFormat, - verticalBorderSpacing: verticalBorderSpacing, - horizontalMonthPadding: horizontalMonthPadding - }) - ); - }) - ); - } - - return render; - }() - }]); - - return CalendarMonthGrid; -}(_react2['default'].Component); - -CalendarMonthGrid.propTypes = propTypes; -CalendarMonthGrid.defaultProps = defaultProps; - -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref) { - var _ref$reactDates = _ref.reactDates, - color = _ref$reactDates.color, - noScrollBarOnVerticalScrollable = _ref$reactDates.noScrollBarOnVerticalScrollable, - spacing = _ref$reactDates.spacing, - zIndex = _ref$reactDates.zIndex; - return { - CalendarMonthGrid: { - background: color.background, - textAlign: 'left', - zIndex: zIndex - }, - - CalendarMonthGrid__animating: { - zIndex: zIndex + 1 - }, - - CalendarMonthGrid__horizontal: { - position: 'absolute', - left: spacing.dayPickerHorizontalPadding - }, - - CalendarMonthGrid__vertical: { - margin: '0 auto' - }, - - CalendarMonthGrid__vertical_scrollable: (0, _object2['default'])({ - margin: '0 auto', - overflowY: 'scroll' - }, noScrollBarOnVerticalScrollable && { - '-webkitOverflowScrolling': 'touch', - '::-webkit-scrollbar': { - '-webkit-appearance': 'none', - display: 'none' - } - }), - - CalendarMonthGrid_month__horizontal: { - display: 'inline-block', - verticalAlign: 'top', - minHeight: '100%' - }, - - CalendarMonthGrid_month__hideForAnimation: { - position: 'absolute', - zIndex: zIndex - 1, - opacity: 0, - pointerEvents: 'none' - }, - - CalendarMonthGrid_month__hidden: { - visibility: 'hidden' - } - }; -})(CalendarMonthGrid); - -/***/ }), - -/***/ 4604: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = CalendarWeek; - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _CalendarDay = __webpack_require__(7617); - -var _CalendarDay2 = _interopRequireDefault(_CalendarDay); - -var _CustomizableCalendarDay = __webpack_require__(6698); - -var _CustomizableCalendarDay2 = _interopRequireDefault(_CustomizableCalendarDay); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)({ - children: (0, _airbnbPropTypes.or)([(0, _airbnbPropTypes.childrenOfType)(_CalendarDay2['default']), (0, _airbnbPropTypes.childrenOfType)(_CustomizableCalendarDay2['default'])]).isRequired -}); - -function CalendarWeek(_ref) { - var children = _ref.children; - - return _react2['default'].createElement( - 'tr', - null, - children - ); -} - -CalendarWeek.propTypes = propTypes; - -/***/ }), - -/***/ 9588: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var ChevronDown = function () { - function ChevronDown(props) { - return _react2['default'].createElement( - 'svg', - props, - _react2['default'].createElement('path', { - d: 'M967.5 288.5L514.3 740.7c-11 11-21 11-32 0L29.1 288.5c-4-5-6-11-6-16 0-13 10-23 23-23 6 0 11 2 15 7l437.2 436.2 437.2-436.2c4-5 9-7 16-7 6 0 11 2 16 7 9 10.9 9 21 0 32z' - }) - ); - } - - return ChevronDown; -}(); - -ChevronDown.defaultProps = { - viewBox: '0 0 1000 1000' -}; -exports["default"] = ChevronDown; - -/***/ }), - -/***/ 1809: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var ChevronUp = function () { - function ChevronUp(props) { - return _react2['default'].createElement( - 'svg', - props, - _react2['default'].createElement('path', { - d: 'M32.1 712.6l453.2-452.2c11-11 21-11 32 0l453.2 452.2c4 5 6 10 6 16 0 13-10 23-22 23-7 0-12-2-16-7L501.3 308.5 64.1 744.7c-4 5-9 7-15 7-7 0-12-2-17-7-9-11-9-21 0-32.1z' - }) - ); - } - - return ChevronUp; -}(); - -ChevronUp.defaultProps = { - viewBox: '0 0 1000 1000' -}; -exports["default"] = ChevronUp; - -/***/ }), - -/***/ 6973: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var CloseButton = function () { - function CloseButton(props) { - return _react2['default'].createElement( - 'svg', - props, - _react2['default'].createElement('path', { - fillRule: 'evenodd', - d: 'M11.53.47a.75.75 0 0 0-1.061 0l-4.47 4.47L1.529.47A.75.75 0 1 0 .468 1.531l4.47 4.47-4.47 4.47a.75.75 0 1 0 1.061 1.061l4.47-4.47 4.47 4.47a.75.75 0 1 0 1.061-1.061l-4.47-4.47 4.47-4.47a.75.75 0 0 0 0-1.061z' - }) - ); - } - - return CloseButton; -}(); - -CloseButton.defaultProps = { - viewBox: '0 0 12 12' -}; -exports["default"] = CloseButton; - -/***/ }), - -/***/ 6698: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.PureCustomizableCalendarDay = exports.selectedStyles = exports.lastInRangeStyles = exports.selectedSpanStyles = exports.hoveredSpanStyles = exports.blockedOutOfRangeStyles = exports.blockedCalendarStyles = exports.blockedMinNightsStyles = exports.highlightedCalendarStyles = exports.outsideStyles = exports.defaultStyles = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _reactAddonsShallowCompare = __webpack_require__(2541); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _reactMomentProptypes = __webpack_require__(6150); - -var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _getCalendarDaySettings = __webpack_require__(7475); - -var _getCalendarDaySettings2 = _interopRequireDefault(_getCalendarDaySettings); - -var _constants = __webpack_require__(257); - -var _DefaultTheme = __webpack_require__(8158); - -var _DefaultTheme2 = _interopRequireDefault(_DefaultTheme); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var color = _DefaultTheme2['default'].reactDates.color; - - -function getStyles(stylesObj, isHovered) { - if (!stylesObj) return null; - - var hover = stylesObj.hover; - - if (isHovered && hover) { - return hover; - } - - return stylesObj; -} - -var DayStyleShape = _propTypes2['default'].shape({ - background: _propTypes2['default'].string, - border: (0, _airbnbPropTypes.or)([_propTypes2['default'].string, _propTypes2['default'].number]), - color: _propTypes2['default'].string, - - hover: _propTypes2['default'].shape({ - background: _propTypes2['default'].string, - border: (0, _airbnbPropTypes.or)([_propTypes2['default'].string, _propTypes2['default'].number]), - color: _propTypes2['default'].string - }) -}); - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - day: _reactMomentProptypes2['default'].momentObj, - daySize: _airbnbPropTypes.nonNegativeInteger, - isOutsideDay: _propTypes2['default'].bool, - modifiers: _propTypes2['default'].instanceOf(Set), - isFocused: _propTypes2['default'].bool, - tabIndex: _propTypes2['default'].oneOf([0, -1]), - onDayClick: _propTypes2['default'].func, - onDayMouseEnter: _propTypes2['default'].func, - onDayMouseLeave: _propTypes2['default'].func, - renderDayContents: _propTypes2['default'].func, - ariaLabelFormat: _propTypes2['default'].string, - - // style overrides - defaultStyles: DayStyleShape, - outsideStyles: DayStyleShape, - todayStyles: DayStyleShape, - firstDayOfWeekStyles: DayStyleShape, - lastDayOfWeekStyles: DayStyleShape, - highlightedCalendarStyles: DayStyleShape, - blockedMinNightsStyles: DayStyleShape, - blockedCalendarStyles: DayStyleShape, - blockedOutOfRangeStyles: DayStyleShape, - hoveredSpanStyles: DayStyleShape, - selectedSpanStyles: DayStyleShape, - lastInRangeStyles: DayStyleShape, - selectedStyles: DayStyleShape, - selectedStartStyles: DayStyleShape, - selectedEndStyles: DayStyleShape, - afterHoveredStartStyles: DayStyleShape, - - // internationalization - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.CalendarDayPhrases)) -})); - -var defaultStyles = exports.defaultStyles = { - border: '1px solid ' + String(color.core.borderLight), - color: color.text, - background: color.background, - - hover: { - background: color.core.borderLight, - border: '1px double ' + String(color.core.borderLight), - color: 'inherit' - } -}; - -var outsideStyles = exports.outsideStyles = { - background: color.outside.backgroundColor, - border: 0, - color: color.outside.color -}; - -var highlightedCalendarStyles = exports.highlightedCalendarStyles = { - background: color.highlighted.backgroundColor, - color: color.highlighted.color, - - hover: { - background: color.highlighted.backgroundColor_hover, - color: color.highlighted.color_active - } -}; - -var blockedMinNightsStyles = exports.blockedMinNightsStyles = { - background: color.minimumNights.backgroundColor, - border: '1px solid ' + String(color.minimumNights.borderColor), - color: color.minimumNights.color, - - hover: { - background: color.minimumNights.backgroundColor_hover, - color: color.minimumNights.color_active - } -}; - -var blockedCalendarStyles = exports.blockedCalendarStyles = { - background: color.blocked_calendar.backgroundColor, - border: '1px solid ' + String(color.blocked_calendar.borderColor), - color: color.blocked_calendar.color, - - hover: { - background: color.blocked_calendar.backgroundColor_hover, - border: '1px solid ' + String(color.blocked_calendar.borderColor), - color: color.blocked_calendar.color_active - } -}; - -var blockedOutOfRangeStyles = exports.blockedOutOfRangeStyles = { - background: color.blocked_out_of_range.backgroundColor, - border: '1px solid ' + String(color.blocked_out_of_range.borderColor), - color: color.blocked_out_of_range.color, - - hover: { - background: color.blocked_out_of_range.backgroundColor_hover, - border: '1px solid ' + String(color.blocked_out_of_range.borderColor), - color: color.blocked_out_of_range.color_active - } -}; - -var hoveredSpanStyles = exports.hoveredSpanStyles = { - background: color.hoveredSpan.backgroundColor, - border: '1px solid ' + String(color.hoveredSpan.borderColor), - color: color.hoveredSpan.color, - - hover: { - background: color.hoveredSpan.backgroundColor_hover, - border: '1px solid ' + String(color.hoveredSpan.borderColor), - color: color.hoveredSpan.color_active - } -}; - -var selectedSpanStyles = exports.selectedSpanStyles = { - background: color.selectedSpan.backgroundColor, - border: '1px solid ' + String(color.selectedSpan.borderColor), - color: color.selectedSpan.color, - - hover: { - background: color.selectedSpan.backgroundColor_hover, - border: '1px solid ' + String(color.selectedSpan.borderColor), - color: color.selectedSpan.color_active - } -}; - -var lastInRangeStyles = exports.lastInRangeStyles = { - borderRight: color.core.primary -}; - -var selectedStyles = exports.selectedStyles = { - background: color.selected.backgroundColor, - border: '1px solid ' + String(color.selected.borderColor), - color: color.selected.color, - - hover: { - background: color.selected.backgroundColor_hover, - border: '1px solid ' + String(color.selected.borderColor), - color: color.selected.color_active - } -}; - -var defaultProps = { - day: (0, _moment2['default'])(), - daySize: _constants.DAY_SIZE, - isOutsideDay: false, - modifiers: new Set(), - isFocused: false, - tabIndex: -1, - onDayClick: function () { - function onDayClick() {} - - return onDayClick; - }(), - onDayMouseEnter: function () { - function onDayMouseEnter() {} - - return onDayMouseEnter; - }(), - onDayMouseLeave: function () { - function onDayMouseLeave() {} - - return onDayMouseLeave; - }(), - - renderDayContents: null, - ariaLabelFormat: 'dddd, LL', - - // style defaults - defaultStyles: defaultStyles, - outsideStyles: outsideStyles, - todayStyles: {}, - highlightedCalendarStyles: highlightedCalendarStyles, - blockedMinNightsStyles: blockedMinNightsStyles, - blockedCalendarStyles: blockedCalendarStyles, - blockedOutOfRangeStyles: blockedOutOfRangeStyles, - hoveredSpanStyles: hoveredSpanStyles, - selectedSpanStyles: selectedSpanStyles, - lastInRangeStyles: lastInRangeStyles, - selectedStyles: selectedStyles, - selectedStartStyles: {}, - selectedEndStyles: {}, - afterHoveredStartStyles: {}, - firstDayOfWeekStyles: {}, - lastDayOfWeekStyles: {}, - - // internationalization - phrases: _defaultPhrases.CalendarDayPhrases -}; - -var CustomizableCalendarDay = function (_React$Component) { - _inherits(CustomizableCalendarDay, _React$Component); - - function CustomizableCalendarDay() { - var _ref; - - _classCallCheck(this, CustomizableCalendarDay); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _this = _possibleConstructorReturn(this, (_ref = CustomizableCalendarDay.__proto__ || Object.getPrototypeOf(CustomizableCalendarDay)).call.apply(_ref, [this].concat(args))); - - _this.state = { - isHovered: false - }; - - _this.setButtonRef = _this.setButtonRef.bind(_this); - return _this; - } - - _createClass(CustomizableCalendarDay, [{ - key: 'shouldComponentUpdate', - value: function () { - function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState); - } - - return shouldComponentUpdate; - }() - }, { - key: 'componentDidUpdate', - value: function () { - function componentDidUpdate(prevProps) { - var _props = this.props, - isFocused = _props.isFocused, - tabIndex = _props.tabIndex; - - if (tabIndex === 0) { - if (isFocused || tabIndex !== prevProps.tabIndex) { - this.buttonRef.focus(); - } - } - } - - return componentDidUpdate; - }() - }, { - key: 'onDayClick', - value: function () { - function onDayClick(day, e) { - var onDayClick = this.props.onDayClick; - - onDayClick(day, e); - } - - return onDayClick; - }() - }, { - key: 'onDayMouseEnter', - value: function () { - function onDayMouseEnter(day, e) { - var onDayMouseEnter = this.props.onDayMouseEnter; - - this.setState({ isHovered: true }); - onDayMouseEnter(day, e); - } - - return onDayMouseEnter; - }() - }, { - key: 'onDayMouseLeave', - value: function () { - function onDayMouseLeave(day, e) { - var onDayMouseLeave = this.props.onDayMouseLeave; - - this.setState({ isHovered: false }); - onDayMouseLeave(day, e); - } - - return onDayMouseLeave; - }() - }, { - key: 'onKeyDown', - value: function () { - function onKeyDown(day, e) { - var onDayClick = this.props.onDayClick; - var key = e.key; - - if (key === 'Enter' || key === ' ') { - onDayClick(day, e); - } - } - - return onKeyDown; - }() - }, { - key: 'setButtonRef', - value: function () { - function setButtonRef(ref) { - this.buttonRef = ref; - } - - return setButtonRef; - }() - }, { - key: 'render', - value: function () { - function render() { - var _this2 = this; - - var _props2 = this.props, - day = _props2.day, - ariaLabelFormat = _props2.ariaLabelFormat, - daySize = _props2.daySize, - isOutsideDay = _props2.isOutsideDay, - modifiers = _props2.modifiers, - tabIndex = _props2.tabIndex, - renderDayContents = _props2.renderDayContents, - styles = _props2.styles, - phrases = _props2.phrases, - defaultStylesWithHover = _props2.defaultStyles, - outsideStylesWithHover = _props2.outsideStyles, - todayStylesWithHover = _props2.todayStyles, - firstDayOfWeekStylesWithHover = _props2.firstDayOfWeekStyles, - lastDayOfWeekStylesWithHover = _props2.lastDayOfWeekStyles, - highlightedCalendarStylesWithHover = _props2.highlightedCalendarStyles, - blockedMinNightsStylesWithHover = _props2.blockedMinNightsStyles, - blockedCalendarStylesWithHover = _props2.blockedCalendarStyles, - blockedOutOfRangeStylesWithHover = _props2.blockedOutOfRangeStyles, - hoveredSpanStylesWithHover = _props2.hoveredSpanStyles, - selectedSpanStylesWithHover = _props2.selectedSpanStyles, - lastInRangeStylesWithHover = _props2.lastInRangeStyles, - selectedStylesWithHover = _props2.selectedStyles, - selectedStartStylesWithHover = _props2.selectedStartStyles, - selectedEndStylesWithHover = _props2.selectedEndStyles, - afterHoveredStartStylesWithHover = _props2.afterHoveredStartStyles; - var isHovered = this.state.isHovered; - - - if (!day) return _react2['default'].createElement('td', null); - - var _getCalendarDaySettin = (0, _getCalendarDaySettings2['default'])(day, ariaLabelFormat, daySize, modifiers, phrases), - daySizeStyles = _getCalendarDaySettin.daySizeStyles, - useDefaultCursor = _getCalendarDaySettin.useDefaultCursor, - selected = _getCalendarDaySettin.selected, - hoveredSpan = _getCalendarDaySettin.hoveredSpan, - isOutsideRange = _getCalendarDaySettin.isOutsideRange, - ariaLabel = _getCalendarDaySettin.ariaLabel; - - return _react2['default'].createElement( - 'td', - _extends({}, (0, _reactWithStyles.css)(styles.CalendarDay, useDefaultCursor && styles.CalendarDay__defaultCursor, daySizeStyles, getStyles(defaultStylesWithHover, isHovered), isOutsideDay && getStyles(outsideStylesWithHover, isHovered), modifiers.has('today') && getStyles(todayStylesWithHover, isHovered), modifiers.has('first-day-of-week') && getStyles(firstDayOfWeekStylesWithHover, isHovered), modifiers.has('last-day-of-week') && getStyles(lastDayOfWeekStylesWithHover, isHovered), modifiers.has('highlighted-calendar') && getStyles(highlightedCalendarStylesWithHover, isHovered), modifiers.has('blocked-minimum-nights') && getStyles(blockedMinNightsStylesWithHover, isHovered), modifiers.has('blocked-calendar') && getStyles(blockedCalendarStylesWithHover, isHovered), hoveredSpan && getStyles(hoveredSpanStylesWithHover, isHovered), modifiers.has('after-hovered-start') && getStyles(afterHoveredStartStylesWithHover, isHovered), modifiers.has('selected-span') && getStyles(selectedSpanStylesWithHover, isHovered), modifiers.has('last-in-range') && getStyles(lastInRangeStylesWithHover, isHovered), selected && getStyles(selectedStylesWithHover, isHovered), modifiers.has('selected-start') && getStyles(selectedStartStylesWithHover, isHovered), modifiers.has('selected-end') && getStyles(selectedEndStylesWithHover, isHovered), isOutsideRange && getStyles(blockedOutOfRangeStylesWithHover, isHovered)), { - role: 'button' // eslint-disable-line jsx-a11y/no-noninteractive-element-to-interactive-role - , ref: this.setButtonRef, - 'aria-label': ariaLabel, - onMouseEnter: function () { - function onMouseEnter(e) { - _this2.onDayMouseEnter(day, e); - } - - return onMouseEnter; - }(), - onMouseLeave: function () { - function onMouseLeave(e) { - _this2.onDayMouseLeave(day, e); - } - - return onMouseLeave; - }(), - onMouseUp: function () { - function onMouseUp(e) { - e.currentTarget.blur(); - } - - return onMouseUp; - }(), - onClick: function () { - function onClick(e) { - _this2.onDayClick(day, e); - } - - return onClick; - }(), - onKeyDown: function () { - function onKeyDown(e) { - _this2.onKeyDown(day, e); - } - - return onKeyDown; - }(), - tabIndex: tabIndex - }), - renderDayContents ? renderDayContents(day, modifiers) : day.format('D') - ); - } - - return render; - }() - }]); - - return CustomizableCalendarDay; -}(_react2['default'].Component); - -CustomizableCalendarDay.propTypes = propTypes; -CustomizableCalendarDay.defaultProps = defaultProps; - -exports.PureCustomizableCalendarDay = CustomizableCalendarDay; -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref2) { - var font = _ref2.reactDates.font; - return { - CalendarDay: { - boxSizing: 'border-box', - cursor: 'pointer', - fontSize: font.size, - textAlign: 'center', - - ':active': { - outline: 0 - } - }, - - CalendarDay__defaultCursor: { - cursor: 'default' - } - }; -})(CustomizableCalendarDay); - -/***/ }), - -/***/ 8665: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ 8477: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.PureDayPicker = exports.defaultProps = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _reactAddonsShallowCompare = __webpack_require__(2541); - -var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _throttle = __webpack_require__(8172); - -var _throttle2 = _interopRequireDefault(_throttle); - -var _isTouchDevice = __webpack_require__(5834); - -var _isTouchDevice2 = _interopRequireDefault(_isTouchDevice); - -var _reactOutsideClickHandler = __webpack_require__(6606); - -var _reactOutsideClickHandler2 = _interopRequireDefault(_reactOutsideClickHandler); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _CalendarMonthGrid = __webpack_require__(7938); - -var _CalendarMonthGrid2 = _interopRequireDefault(_CalendarMonthGrid); - -var _DayPickerNavigation = __webpack_require__(3895); - -var _DayPickerNavigation2 = _interopRequireDefault(_DayPickerNavigation); - -var _DayPickerKeyboardShortcuts = __webpack_require__(600); - -var _DayPickerKeyboardShortcuts2 = _interopRequireDefault(_DayPickerKeyboardShortcuts); - -var _getNumberOfCalendarMonthWeeks = __webpack_require__(4112); - -var _getNumberOfCalendarMonthWeeks2 = _interopRequireDefault(_getNumberOfCalendarMonthWeeks); - -var _getCalendarMonthWidth = __webpack_require__(8964); - -var _getCalendarMonthWidth2 = _interopRequireDefault(_getCalendarMonthWidth); - -var _calculateDimension = __webpack_require__(8607); - -var _calculateDimension2 = _interopRequireDefault(_calculateDimension); - -var _getActiveElement = __webpack_require__(5814); - -var _getActiveElement2 = _interopRequireDefault(_getActiveElement); - -var _isDayVisible = __webpack_require__(5713); - -var _isDayVisible2 = _interopRequireDefault(_isDayVisible); - -var _ModifiersShape = __webpack_require__(6747); - -var _ModifiersShape2 = _interopRequireDefault(_ModifiersShape); - -var _ScrollableOrientationShape = __webpack_require__(6553); - -var _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape); - -var _DayOfWeekShape = __webpack_require__(243); - -var _DayOfWeekShape2 = _interopRequireDefault(_DayOfWeekShape); - -var _CalendarInfoPositionShape = __webpack_require__(8182); - -var _CalendarInfoPositionShape2 = _interopRequireDefault(_CalendarInfoPositionShape); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var MONTH_PADDING = 23; -var PREV_TRANSITION = 'prev'; -var NEXT_TRANSITION = 'next'; -var MONTH_SELECTION_TRANSITION = 'month_selection'; -var YEAR_SELECTION_TRANSITION = 'year_selection'; - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - - // calendar presentation props - enableOutsideDays: _propTypes2['default'].bool, - numberOfMonths: _propTypes2['default'].number, - orientation: _ScrollableOrientationShape2['default'], - withPortal: _propTypes2['default'].bool, - onOutsideClick: _propTypes2['default'].func, - hidden: _propTypes2['default'].bool, - initialVisibleMonth: _propTypes2['default'].func, - firstDayOfWeek: _DayOfWeekShape2['default'], - renderCalendarInfo: _propTypes2['default'].func, - calendarInfoPosition: _CalendarInfoPositionShape2['default'], - hideKeyboardShortcutsPanel: _propTypes2['default'].bool, - daySize: _airbnbPropTypes.nonNegativeInteger, - isRTL: _propTypes2['default'].bool, - verticalHeight: _airbnbPropTypes.nonNegativeInteger, - noBorder: _propTypes2['default'].bool, - transitionDuration: _airbnbPropTypes.nonNegativeInteger, - verticalBorderSpacing: _airbnbPropTypes.nonNegativeInteger, - horizontalMonthPadding: _airbnbPropTypes.nonNegativeInteger, - - // navigation props - navPrev: _propTypes2['default'].node, - navNext: _propTypes2['default'].node, - noNavButtons: _propTypes2['default'].bool, - onPrevMonthClick: _propTypes2['default'].func, - onNextMonthClick: _propTypes2['default'].func, - onMonthChange: _propTypes2['default'].func, - onYearChange: _propTypes2['default'].func, - onMultiplyScrollableMonths: _propTypes2['default'].func, // VERTICAL_SCROLLABLE daypickers only - - // month props - renderMonthText: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - renderMonthElement: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - - // day props - modifiers: _propTypes2['default'].objectOf(_propTypes2['default'].objectOf(_ModifiersShape2['default'])), - renderCalendarDay: _propTypes2['default'].func, - renderDayContents: _propTypes2['default'].func, - onDayClick: _propTypes2['default'].func, - onDayMouseEnter: _propTypes2['default'].func, - onDayMouseLeave: _propTypes2['default'].func, - - // accessibility props - isFocused: _propTypes2['default'].bool, - getFirstFocusableDay: _propTypes2['default'].func, - onBlur: _propTypes2['default'].func, - showKeyboardShortcuts: _propTypes2['default'].bool, - - // internationalization - monthFormat: _propTypes2['default'].string, - weekDayFormat: _propTypes2['default'].string, - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.DayPickerPhrases)), - dayAriaLabelFormat: _propTypes2['default'].string -})); - -var defaultProps = exports.defaultProps = { - // calendar presentation props - enableOutsideDays: false, - numberOfMonths: 2, - orientation: _constants.HORIZONTAL_ORIENTATION, - withPortal: false, - onOutsideClick: function () { - function onOutsideClick() {} - - return onOutsideClick; - }(), - - hidden: false, - initialVisibleMonth: function () { - function initialVisibleMonth() { - return (0, _moment2['default'])(); - } - - return initialVisibleMonth; - }(), - firstDayOfWeek: null, - renderCalendarInfo: null, - calendarInfoPosition: _constants.INFO_POSITION_BOTTOM, - hideKeyboardShortcutsPanel: false, - daySize: _constants.DAY_SIZE, - isRTL: false, - verticalHeight: null, - noBorder: false, - transitionDuration: undefined, - verticalBorderSpacing: undefined, - horizontalMonthPadding: 13, - - // navigation props - navPrev: null, - navNext: null, - noNavButtons: false, - onPrevMonthClick: function () { - function onPrevMonthClick() {} - - return onPrevMonthClick; - }(), - onNextMonthClick: function () { - function onNextMonthClick() {} - - return onNextMonthClick; - }(), - onMonthChange: function () { - function onMonthChange() {} - - return onMonthChange; - }(), - onYearChange: function () { - function onYearChange() {} - - return onYearChange; - }(), - onMultiplyScrollableMonths: function () { - function onMultiplyScrollableMonths() {} - - return onMultiplyScrollableMonths; - }(), - - - // month props - renderMonthText: null, - renderMonthElement: null, - - // day props - modifiers: {}, - renderCalendarDay: undefined, - renderDayContents: null, - onDayClick: function () { - function onDayClick() {} - - return onDayClick; - }(), - onDayMouseEnter: function () { - function onDayMouseEnter() {} - - return onDayMouseEnter; - }(), - onDayMouseLeave: function () { - function onDayMouseLeave() {} - - return onDayMouseLeave; - }(), - - - // accessibility props - isFocused: false, - getFirstFocusableDay: null, - onBlur: function () { - function onBlur() {} - - return onBlur; - }(), - - showKeyboardShortcuts: false, - - // internationalization - monthFormat: 'MMMM YYYY', - weekDayFormat: 'dd', - phrases: _defaultPhrases.DayPickerPhrases, - dayAriaLabelFormat: undefined -}; - -var DayPicker = function (_React$Component) { - _inherits(DayPicker, _React$Component); - - function DayPicker(props) { - _classCallCheck(this, DayPicker); - - var _this = _possibleConstructorReturn(this, (DayPicker.__proto__ || Object.getPrototypeOf(DayPicker)).call(this, props)); - - var currentMonth = props.hidden ? (0, _moment2['default'])() : props.initialVisibleMonth(); - - var focusedDate = currentMonth.clone().startOf('month'); - if (props.getFirstFocusableDay) { - focusedDate = props.getFirstFocusableDay(currentMonth); - } - - var horizontalMonthPadding = props.horizontalMonthPadding; - - - var translationValue = props.isRTL && _this.isHorizontal() ? -(0, _getCalendarMonthWidth2['default'])(props.daySize, horizontalMonthPadding) : 0; - - _this.hasSetInitialVisibleMonth = !props.hidden; - _this.state = { - currentMonth: currentMonth, - monthTransition: null, - translationValue: translationValue, - scrollableMonthMultiple: 1, - calendarMonthWidth: (0, _getCalendarMonthWidth2['default'])(props.daySize, horizontalMonthPadding), - focusedDate: !props.hidden || props.isFocused ? focusedDate : null, - nextFocusedDate: null, - showKeyboardShortcuts: props.showKeyboardShortcuts, - onKeyboardShortcutsPanelClose: function () { - function onKeyboardShortcutsPanelClose() {} - - return onKeyboardShortcutsPanelClose; - }(), - - isTouchDevice: (0, _isTouchDevice2['default'])(), - withMouseInteractions: true, - calendarInfoWidth: 0, - monthTitleHeight: null, - hasSetHeight: false - }; - - _this.setCalendarMonthWeeks(currentMonth); - - _this.calendarMonthGridHeight = 0; - _this.setCalendarInfoWidthTimeout = null; - - _this.onKeyDown = _this.onKeyDown.bind(_this); - _this.throttledKeyDown = (0, _throttle2['default'])(_this.onFinalKeyDown, 200, { trailing: false }); - _this.onPrevMonthClick = _this.onPrevMonthClick.bind(_this); - _this.onNextMonthClick = _this.onNextMonthClick.bind(_this); - _this.onMonthChange = _this.onMonthChange.bind(_this); - _this.onYearChange = _this.onYearChange.bind(_this); - - _this.multiplyScrollableMonths = _this.multiplyScrollableMonths.bind(_this); - _this.updateStateAfterMonthTransition = _this.updateStateAfterMonthTransition.bind(_this); - - _this.openKeyboardShortcutsPanel = _this.openKeyboardShortcutsPanel.bind(_this); - _this.closeKeyboardShortcutsPanel = _this.closeKeyboardShortcutsPanel.bind(_this); - - _this.setCalendarInfoRef = _this.setCalendarInfoRef.bind(_this); - _this.setContainerRef = _this.setContainerRef.bind(_this); - _this.setTransitionContainerRef = _this.setTransitionContainerRef.bind(_this); - _this.setMonthTitleHeight = _this.setMonthTitleHeight.bind(_this); - return _this; - } - - _createClass(DayPicker, [{ - key: 'componentDidMount', - value: function () { - function componentDidMount() { - var currentMonth = this.state.currentMonth; - - if (this.calendarInfo) { - this.setState({ - isTouchDevice: (0, _isTouchDevice2['default'])(), - calendarInfoWidth: (0, _calculateDimension2['default'])(this.calendarInfo, 'width', true, true) - }); - } else { - this.setState({ isTouchDevice: (0, _isTouchDevice2['default'])() }); - } - - this.setCalendarMonthWeeks(currentMonth); - } - - return componentDidMount; - }() - }, { - key: 'componentWillReceiveProps', - value: function () { - function componentWillReceiveProps(nextProps) { - var hidden = nextProps.hidden, - isFocused = nextProps.isFocused, - showKeyboardShortcuts = nextProps.showKeyboardShortcuts, - onBlur = nextProps.onBlur, - renderMonthText = nextProps.renderMonthText, - horizontalMonthPadding = nextProps.horizontalMonthPadding; - var currentMonth = this.state.currentMonth; - - - if (!hidden) { - if (!this.hasSetInitialVisibleMonth) { - this.hasSetInitialVisibleMonth = true; - this.setState({ - currentMonth: nextProps.initialVisibleMonth() - }); - } - } - - var _props = this.props, - daySize = _props.daySize, - prevIsFocused = _props.isFocused, - prevRenderMonthText = _props.renderMonthText; - - - if (nextProps.daySize !== daySize) { - this.setState({ - calendarMonthWidth: (0, _getCalendarMonthWidth2['default'])(nextProps.daySize, horizontalMonthPadding) - }); - } - - if (isFocused !== prevIsFocused) { - if (isFocused) { - var focusedDate = this.getFocusedDay(currentMonth); - - var onKeyboardShortcutsPanelClose = this.state.onKeyboardShortcutsPanelClose; - - if (nextProps.showKeyboardShortcuts) { - // the ? shortcut came from the input and we should return input there once it is close - onKeyboardShortcutsPanelClose = onBlur; - } - - this.setState({ - showKeyboardShortcuts: showKeyboardShortcuts, - onKeyboardShortcutsPanelClose: onKeyboardShortcutsPanelClose, - focusedDate: focusedDate, - withMouseInteractions: false - }); - } else { - this.setState({ focusedDate: null }); - } - } - - if (renderMonthText !== prevRenderMonthText) { - this.setState({ - monthTitleHeight: null - }); - } - } - - return componentWillReceiveProps; - }() - }, { - key: 'shouldComponentUpdate', - value: function () { - function shouldComponentUpdate(nextProps, nextState) { - return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState); - } - - return shouldComponentUpdate; - }() - }, { - key: 'componentWillUpdate', - value: function () { - function componentWillUpdate() { - var _this2 = this; - - var transitionDuration = this.props.transitionDuration; - - // Calculating the dimensions trigger a DOM repaint which - // breaks the CSS transition. - // The setTimeout will wait until the transition ends. - - if (this.calendarInfo) { - this.setCalendarInfoWidthTimeout = setTimeout(function () { - var calendarInfoWidth = _this2.state.calendarInfoWidth; - - var calendarInfoPanelWidth = (0, _calculateDimension2['default'])(_this2.calendarInfo, 'width', true, true); - if (calendarInfoWidth !== calendarInfoPanelWidth) { - _this2.setState({ - calendarInfoWidth: calendarInfoPanelWidth - }); - } - }, transitionDuration); - } - } - - return componentWillUpdate; - }() - }, { - key: 'componentDidUpdate', - value: function () { - function componentDidUpdate(prevProps) { - var _props2 = this.props, - orientation = _props2.orientation, - daySize = _props2.daySize, - isFocused = _props2.isFocused, - numberOfMonths = _props2.numberOfMonths; - var _state = this.state, - focusedDate = _state.focusedDate, - monthTitleHeight = _state.monthTitleHeight; - - - if (this.isHorizontal() && (orientation !== prevProps.orientation || daySize !== prevProps.daySize)) { - var visibleCalendarWeeks = this.calendarMonthWeeks.slice(1, numberOfMonths + 1); - var calendarMonthWeeksHeight = Math.max.apply(Math, [0].concat(_toConsumableArray(visibleCalendarWeeks))) * (daySize - 1); - var newMonthHeight = monthTitleHeight + calendarMonthWeeksHeight + 1; - this.adjustDayPickerHeight(newMonthHeight); - } - - if (!prevProps.isFocused && isFocused && !focusedDate) { - this.container.focus(); - } - } - - return componentDidUpdate; - }() - }, { - key: 'componentWillUnmount', - value: function () { - function componentWillUnmount() { - clearTimeout(this.setCalendarInfoWidthTimeout); - } - - return componentWillUnmount; - }() - }, { - key: 'onKeyDown', - value: function () { - function onKeyDown(e) { - e.stopPropagation(); - if (!_constants.MODIFIER_KEY_NAMES.has(e.key)) { - this.throttledKeyDown(e); - } - } - - return onKeyDown; - }() - }, { - key: 'onFinalKeyDown', - value: function () { - function onFinalKeyDown(e) { - this.setState({ withMouseInteractions: false }); - - var _props3 = this.props, - onBlur = _props3.onBlur, - isRTL = _props3.isRTL; - var _state2 = this.state, - focusedDate = _state2.focusedDate, - showKeyboardShortcuts = _state2.showKeyboardShortcuts; - - if (!focusedDate) return; - - var newFocusedDate = focusedDate.clone(); - - var didTransitionMonth = false; - - // focus might be anywhere when the keyboard shortcuts panel is opened so we want to - // return it to wherever it was before when the panel was opened - var activeElement = (0, _getActiveElement2['default'])(); - var onKeyboardShortcutsPanelClose = function () { - function onKeyboardShortcutsPanelClose() { - if (activeElement) activeElement.focus(); - } - - return onKeyboardShortcutsPanelClose; - }(); - - switch (e.key) { - case 'ArrowUp': - e.preventDefault(); - newFocusedDate.subtract(1, 'week'); - didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); - break; - case 'ArrowLeft': - e.preventDefault(); - if (isRTL) { - newFocusedDate.add(1, 'day'); - } else { - newFocusedDate.subtract(1, 'day'); - } - didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); - break; - case 'Home': - e.preventDefault(); - newFocusedDate.startOf('week'); - didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); - break; - case 'PageUp': - e.preventDefault(); - newFocusedDate.subtract(1, 'month'); - didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); - break; - - case 'ArrowDown': - e.preventDefault(); - newFocusedDate.add(1, 'week'); - didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); - break; - case 'ArrowRight': - e.preventDefault(); - if (isRTL) { - newFocusedDate.subtract(1, 'day'); - } else { - newFocusedDate.add(1, 'day'); - } - didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); - break; - case 'End': - e.preventDefault(); - newFocusedDate.endOf('week'); - didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); - break; - case 'PageDown': - e.preventDefault(); - newFocusedDate.add(1, 'month'); - didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); - break; - - case '?': - this.openKeyboardShortcutsPanel(onKeyboardShortcutsPanelClose); - break; - - case 'Escape': - if (showKeyboardShortcuts) { - this.closeKeyboardShortcutsPanel(); - } else { - onBlur(); - } - break; - - default: - break; - } - - // If there was a month transition, do not update the focused date until the transition has - // completed. Otherwise, attempting to focus on a DOM node may interrupt the CSS animation. If - // didTransitionMonth is true, the focusedDate gets updated in #updateStateAfterMonthTransition - if (!didTransitionMonth) { - this.setState({ - focusedDate: newFocusedDate - }); - } - } - - return onFinalKeyDown; - }() - }, { - key: 'onPrevMonthClick', - value: function () { - function onPrevMonthClick(nextFocusedDate, e) { - var _props4 = this.props, - daySize = _props4.daySize, - isRTL = _props4.isRTL, - numberOfMonths = _props4.numberOfMonths; - var _state3 = this.state, - calendarMonthWidth = _state3.calendarMonthWidth, - monthTitleHeight = _state3.monthTitleHeight; - - - if (e) e.preventDefault(); - - var translationValue = void 0; - if (this.isVertical()) { - var calendarMonthWeeksHeight = this.calendarMonthWeeks[0] * (daySize - 1); - translationValue = monthTitleHeight + calendarMonthWeeksHeight + 1; - } else if (this.isHorizontal()) { - translationValue = calendarMonthWidth; - if (isRTL) { - translationValue = -2 * calendarMonthWidth; - } - - var visibleCalendarWeeks = this.calendarMonthWeeks.slice(0, numberOfMonths); - var _calendarMonthWeeksHeight = Math.max.apply(Math, [0].concat(_toConsumableArray(visibleCalendarWeeks))) * (daySize - 1); - var newMonthHeight = monthTitleHeight + _calendarMonthWeeksHeight + 1; - this.adjustDayPickerHeight(newMonthHeight); - } - - this.setState({ - monthTransition: PREV_TRANSITION, - translationValue: translationValue, - focusedDate: null, - nextFocusedDate: nextFocusedDate - }); - } - - return onPrevMonthClick; - }() - }, { - key: 'onMonthChange', - value: function () { - function onMonthChange(currentMonth) { - this.setCalendarMonthWeeks(currentMonth); - this.calculateAndSetDayPickerHeight(); - - // Translation value is a hack to force an invisible transition that - // properly rerenders the CalendarMonthGrid - this.setState({ - monthTransition: MONTH_SELECTION_TRANSITION, - translationValue: 0.00001, - focusedDate: null, - nextFocusedDate: currentMonth, - currentMonth: currentMonth - }); - } - - return onMonthChange; - }() - }, { - key: 'onYearChange', - value: function () { - function onYearChange(currentMonth) { - this.setCalendarMonthWeeks(currentMonth); - this.calculateAndSetDayPickerHeight(); - - // Translation value is a hack to force an invisible transition that - // properly rerenders the CalendarMonthGrid - this.setState({ - monthTransition: YEAR_SELECTION_TRANSITION, - translationValue: 0.0001, - focusedDate: null, - nextFocusedDate: currentMonth, - currentMonth: currentMonth - }); - } - - return onYearChange; - }() - }, { - key: 'onNextMonthClick', - value: function () { - function onNextMonthClick(nextFocusedDate, e) { - var _props5 = this.props, - isRTL = _props5.isRTL, - numberOfMonths = _props5.numberOfMonths, - daySize = _props5.daySize; - var _state4 = this.state, - calendarMonthWidth = _state4.calendarMonthWidth, - monthTitleHeight = _state4.monthTitleHeight; - - - if (e) e.preventDefault(); - - var translationValue = void 0; - - if (this.isVertical()) { - var firstVisibleMonthWeeks = this.calendarMonthWeeks[1]; - var calendarMonthWeeksHeight = firstVisibleMonthWeeks * (daySize - 1); - translationValue = -(monthTitleHeight + calendarMonthWeeksHeight + 1); - } - - if (this.isHorizontal()) { - translationValue = -calendarMonthWidth; - if (isRTL) { - translationValue = 0; - } - - var visibleCalendarWeeks = this.calendarMonthWeeks.slice(2, numberOfMonths + 2); - var _calendarMonthWeeksHeight2 = Math.max.apply(Math, [0].concat(_toConsumableArray(visibleCalendarWeeks))) * (daySize - 1); - var newMonthHeight = monthTitleHeight + _calendarMonthWeeksHeight2 + 1; - this.adjustDayPickerHeight(newMonthHeight); - } - - this.setState({ - monthTransition: NEXT_TRANSITION, - translationValue: translationValue, - focusedDate: null, - nextFocusedDate: nextFocusedDate - }); - } - - return onNextMonthClick; - }() - }, { - key: 'getFirstDayOfWeek', - value: function () { - function getFirstDayOfWeek() { - var firstDayOfWeek = this.props.firstDayOfWeek; - - if (firstDayOfWeek == null) { - return _moment2['default'].localeData().firstDayOfWeek(); - } - - return firstDayOfWeek; - } - - return getFirstDayOfWeek; - }() - }, { - key: 'getFirstVisibleIndex', - value: function () { - function getFirstVisibleIndex() { - var orientation = this.props.orientation; - var monthTransition = this.state.monthTransition; - - - if (orientation === _constants.VERTICAL_SCROLLABLE) return 0; - - var firstVisibleMonthIndex = 1; - if (monthTransition === PREV_TRANSITION) { - firstVisibleMonthIndex -= 1; - } else if (monthTransition === NEXT_TRANSITION) { - firstVisibleMonthIndex += 1; - } - - return firstVisibleMonthIndex; - } - - return getFirstVisibleIndex; - }() - }, { - key: 'getFocusedDay', - value: function () { - function getFocusedDay(newMonth) { - var _props6 = this.props, - getFirstFocusableDay = _props6.getFirstFocusableDay, - numberOfMonths = _props6.numberOfMonths; - - - var focusedDate = void 0; - if (getFirstFocusableDay) { - focusedDate = getFirstFocusableDay(newMonth); - } - - if (newMonth && (!focusedDate || !(0, _isDayVisible2['default'])(focusedDate, newMonth, numberOfMonths))) { - focusedDate = newMonth.clone().startOf('month'); - } - - return focusedDate; - } - - return getFocusedDay; - }() - }, { - key: 'setMonthTitleHeight', - value: function () { - function setMonthTitleHeight(monthTitleHeight) { - var _this3 = this; - - this.setState({ - monthTitleHeight: monthTitleHeight - }, function () { - _this3.calculateAndSetDayPickerHeight(); - }); - } - - return setMonthTitleHeight; - }() - }, { - key: 'setCalendarMonthWeeks', - value: function () { - function setCalendarMonthWeeks(currentMonth) { - var numberOfMonths = this.props.numberOfMonths; - - - this.calendarMonthWeeks = []; - var month = currentMonth.clone().subtract(1, 'months'); - var firstDayOfWeek = this.getFirstDayOfWeek(); - for (var i = 0; i < numberOfMonths + 2; i += 1) { - var numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks2['default'])(month, firstDayOfWeek); - this.calendarMonthWeeks.push(numberOfWeeks); - month = month.add(1, 'months'); - } - } - - return setCalendarMonthWeeks; - }() - }, { - key: 'setContainerRef', - value: function () { - function setContainerRef(ref) { - this.container = ref; - } - - return setContainerRef; - }() - }, { - key: 'setCalendarInfoRef', - value: function () { - function setCalendarInfoRef(ref) { - this.calendarInfo = ref; - } - - return setCalendarInfoRef; - }() - }, { - key: 'setTransitionContainerRef', - value: function () { - function setTransitionContainerRef(ref) { - this.transitionContainer = ref; - } - - return setTransitionContainerRef; - }() - }, { - key: 'maybeTransitionNextMonth', - value: function () { - function maybeTransitionNextMonth(newFocusedDate) { - var numberOfMonths = this.props.numberOfMonths; - var _state5 = this.state, - currentMonth = _state5.currentMonth, - focusedDate = _state5.focusedDate; - - - var newFocusedDateMonth = newFocusedDate.month(); - var focusedDateMonth = focusedDate.month(); - var isNewFocusedDateVisible = (0, _isDayVisible2['default'])(newFocusedDate, currentMonth, numberOfMonths); - if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) { - this.onNextMonthClick(newFocusedDate); - return true; - } - - return false; - } - - return maybeTransitionNextMonth; - }() - }, { - key: 'maybeTransitionPrevMonth', - value: function () { - function maybeTransitionPrevMonth(newFocusedDate) { - var numberOfMonths = this.props.numberOfMonths; - var _state6 = this.state, - currentMonth = _state6.currentMonth, - focusedDate = _state6.focusedDate; - - - var newFocusedDateMonth = newFocusedDate.month(); - var focusedDateMonth = focusedDate.month(); - var isNewFocusedDateVisible = (0, _isDayVisible2['default'])(newFocusedDate, currentMonth, numberOfMonths); - if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) { - this.onPrevMonthClick(newFocusedDate); - return true; - } - - return false; - } - - return maybeTransitionPrevMonth; - }() - }, { - key: 'multiplyScrollableMonths', - value: function () { - function multiplyScrollableMonths(e) { - var onMultiplyScrollableMonths = this.props.onMultiplyScrollableMonths; - - if (e) e.preventDefault(); - - if (onMultiplyScrollableMonths) onMultiplyScrollableMonths(e); - - this.setState(function (_ref) { - var scrollableMonthMultiple = _ref.scrollableMonthMultiple; - return { - scrollableMonthMultiple: scrollableMonthMultiple + 1 - }; - }); - } - - return multiplyScrollableMonths; - }() - }, { - key: 'isHorizontal', - value: function () { - function isHorizontal() { - var orientation = this.props.orientation; - - return orientation === _constants.HORIZONTAL_ORIENTATION; - } - - return isHorizontal; - }() - }, { - key: 'isVertical', - value: function () { - function isVertical() { - var orientation = this.props.orientation; - - return orientation === _constants.VERTICAL_ORIENTATION || orientation === _constants.VERTICAL_SCROLLABLE; - } - - return isVertical; - }() - }, { - key: 'updateStateAfterMonthTransition', - value: function () { - function updateStateAfterMonthTransition() { - var _this4 = this; - - var _props7 = this.props, - onPrevMonthClick = _props7.onPrevMonthClick, - onNextMonthClick = _props7.onNextMonthClick, - numberOfMonths = _props7.numberOfMonths, - onMonthChange = _props7.onMonthChange, - onYearChange = _props7.onYearChange, - isRTL = _props7.isRTL; - var _state7 = this.state, - currentMonth = _state7.currentMonth, - monthTransition = _state7.monthTransition, - focusedDate = _state7.focusedDate, - nextFocusedDate = _state7.nextFocusedDate, - withMouseInteractions = _state7.withMouseInteractions, - calendarMonthWidth = _state7.calendarMonthWidth; - - - if (!monthTransition) return; - - var newMonth = currentMonth.clone(); - var firstDayOfWeek = this.getFirstDayOfWeek(); - if (monthTransition === PREV_TRANSITION) { - newMonth.subtract(1, 'month'); - if (onPrevMonthClick) onPrevMonthClick(newMonth); - var newInvisibleMonth = newMonth.clone().subtract(1, 'month'); - var numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks2['default'])(newInvisibleMonth, firstDayOfWeek); - this.calendarMonthWeeks = [numberOfWeeks].concat(_toConsumableArray(this.calendarMonthWeeks.slice(0, -1))); - } else if (monthTransition === NEXT_TRANSITION) { - newMonth.add(1, 'month'); - if (onNextMonthClick) onNextMonthClick(newMonth); - var _newInvisibleMonth = newMonth.clone().add(numberOfMonths, 'month'); - var _numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks2['default'])(_newInvisibleMonth, firstDayOfWeek); - this.calendarMonthWeeks = [].concat(_toConsumableArray(this.calendarMonthWeeks.slice(1)), [_numberOfWeeks]); - } else if (monthTransition === MONTH_SELECTION_TRANSITION) { - if (onMonthChange) onMonthChange(newMonth); - } else if (monthTransition === YEAR_SELECTION_TRANSITION) { - if (onYearChange) onYearChange(newMonth); - } - - var newFocusedDate = null; - if (nextFocusedDate) { - newFocusedDate = nextFocusedDate; - } else if (!focusedDate && !withMouseInteractions) { - newFocusedDate = this.getFocusedDay(newMonth); - } - - this.setState({ - currentMonth: newMonth, - monthTransition: null, - translationValue: isRTL && this.isHorizontal() ? -calendarMonthWidth : 0, - nextFocusedDate: null, - focusedDate: newFocusedDate - }, function () { - // we don't want to focus on the relevant calendar day after a month transition - // if the user is navigating around using a mouse - if (withMouseInteractions) { - var activeElement = (0, _getActiveElement2['default'])(); - if (activeElement && activeElement !== document.body && _this4.container.contains(activeElement)) { - activeElement.blur(); - } - } - }); - } - - return updateStateAfterMonthTransition; - }() - }, { - key: 'adjustDayPickerHeight', - value: function () { - function adjustDayPickerHeight(newMonthHeight) { - var _this5 = this; - - var monthHeight = newMonthHeight + MONTH_PADDING; - if (monthHeight !== this.calendarMonthGridHeight) { - this.transitionContainer.style.height = String(monthHeight) + 'px'; - if (!this.calendarMonthGridHeight) { - setTimeout(function () { - _this5.setState({ hasSetHeight: true }); - }, 0); - } - this.calendarMonthGridHeight = monthHeight; - } - } - - return adjustDayPickerHeight; - }() - }, { - key: 'calculateAndSetDayPickerHeight', - value: function () { - function calculateAndSetDayPickerHeight() { - var _props8 = this.props, - daySize = _props8.daySize, - numberOfMonths = _props8.numberOfMonths; - var monthTitleHeight = this.state.monthTitleHeight; - - - var visibleCalendarWeeks = this.calendarMonthWeeks.slice(1, numberOfMonths + 1); - var calendarMonthWeeksHeight = Math.max.apply(Math, [0].concat(_toConsumableArray(visibleCalendarWeeks))) * (daySize - 1); - var newMonthHeight = monthTitleHeight + calendarMonthWeeksHeight + 1; - - if (this.isHorizontal()) { - this.adjustDayPickerHeight(newMonthHeight); - } - } - - return calculateAndSetDayPickerHeight; - }() - }, { - key: 'openKeyboardShortcutsPanel', - value: function () { - function openKeyboardShortcutsPanel(onCloseCallBack) { - this.setState({ - showKeyboardShortcuts: true, - onKeyboardShortcutsPanelClose: onCloseCallBack - }); - } - - return openKeyboardShortcutsPanel; - }() - }, { - key: 'closeKeyboardShortcutsPanel', - value: function () { - function closeKeyboardShortcutsPanel() { - var onKeyboardShortcutsPanelClose = this.state.onKeyboardShortcutsPanelClose; - - - if (onKeyboardShortcutsPanelClose) { - onKeyboardShortcutsPanelClose(); - } - - this.setState({ - onKeyboardShortcutsPanelClose: null, - showKeyboardShortcuts: false - }); - } - - return closeKeyboardShortcutsPanel; - }() - }, { - key: 'renderNavigation', - value: function () { - function renderNavigation() { - var _this6 = this; - - var _props9 = this.props, - navPrev = _props9.navPrev, - navNext = _props9.navNext, - noNavButtons = _props9.noNavButtons, - orientation = _props9.orientation, - phrases = _props9.phrases, - isRTL = _props9.isRTL; - - - if (noNavButtons) { - return null; - } - - var onNextMonthClick = void 0; - if (orientation === _constants.VERTICAL_SCROLLABLE) { - onNextMonthClick = this.multiplyScrollableMonths; - } else { - onNextMonthClick = function () { - function onNextMonthClick(e) { - _this6.onNextMonthClick(null, e); - } - - return onNextMonthClick; - }(); - } - - return _react2['default'].createElement(_DayPickerNavigation2['default'], { - onPrevMonthClick: function () { - function onPrevMonthClick(e) { - _this6.onPrevMonthClick(null, e); - } - - return onPrevMonthClick; - }(), - onNextMonthClick: onNextMonthClick, - navPrev: navPrev, - navNext: navNext, - orientation: orientation, - phrases: phrases, - isRTL: isRTL - }); - } - - return renderNavigation; - }() - }, { - key: 'renderWeekHeader', - value: function () { - function renderWeekHeader(index) { - var _props10 = this.props, - daySize = _props10.daySize, - horizontalMonthPadding = _props10.horizontalMonthPadding, - orientation = _props10.orientation, - weekDayFormat = _props10.weekDayFormat, - styles = _props10.styles; - var calendarMonthWidth = this.state.calendarMonthWidth; - - var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; - var horizontalStyle = { - left: index * calendarMonthWidth - }; - var verticalStyle = { - marginLeft: -calendarMonthWidth / 2 - }; - - var weekHeaderStyle = {}; // no styles applied to the vertical-scrollable orientation - if (this.isHorizontal()) { - weekHeaderStyle = horizontalStyle; - } else if (this.isVertical() && !verticalScrollable) { - weekHeaderStyle = verticalStyle; - } - - var firstDayOfWeek = this.getFirstDayOfWeek(); - - var header = []; - for (var i = 0; i < 7; i += 1) { - header.push(_react2['default'].createElement( - 'li', - _extends({ key: i }, (0, _reactWithStyles.css)(styles.DayPicker_weekHeader_li, { width: daySize })), - _react2['default'].createElement( - 'small', - null, - (0, _moment2['default'])().day((i + firstDayOfWeek) % 7).format(weekDayFormat) - ) - )); - } - - return _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.DayPicker_weekHeader, this.isVertical() && styles.DayPicker_weekHeader__vertical, verticalScrollable && styles.DayPicker_weekHeader__verticalScrollable, weekHeaderStyle, { padding: '0 ' + String(horizontalMonthPadding) + 'px' }), { - key: 'week-' + String(index) - }), - _react2['default'].createElement( - 'ul', - (0, _reactWithStyles.css)(styles.DayPicker_weekHeader_ul), - header - ) - ); - } - - return renderWeekHeader; - }() - }, { - key: 'render', - value: function () { - function render() { - var _this7 = this; - - var _state8 = this.state, - calendarMonthWidth = _state8.calendarMonthWidth, - currentMonth = _state8.currentMonth, - monthTransition = _state8.monthTransition, - translationValue = _state8.translationValue, - scrollableMonthMultiple = _state8.scrollableMonthMultiple, - focusedDate = _state8.focusedDate, - showKeyboardShortcuts = _state8.showKeyboardShortcuts, - isTouch = _state8.isTouchDevice, - hasSetHeight = _state8.hasSetHeight, - calendarInfoWidth = _state8.calendarInfoWidth, - monthTitleHeight = _state8.monthTitleHeight; - var _props11 = this.props, - enableOutsideDays = _props11.enableOutsideDays, - numberOfMonths = _props11.numberOfMonths, - orientation = _props11.orientation, - modifiers = _props11.modifiers, - withPortal = _props11.withPortal, - onDayClick = _props11.onDayClick, - onDayMouseEnter = _props11.onDayMouseEnter, - onDayMouseLeave = _props11.onDayMouseLeave, - firstDayOfWeek = _props11.firstDayOfWeek, - renderMonthText = _props11.renderMonthText, - renderCalendarDay = _props11.renderCalendarDay, - renderDayContents = _props11.renderDayContents, - renderCalendarInfo = _props11.renderCalendarInfo, - renderMonthElement = _props11.renderMonthElement, - calendarInfoPosition = _props11.calendarInfoPosition, - hideKeyboardShortcutsPanel = _props11.hideKeyboardShortcutsPanel, - onOutsideClick = _props11.onOutsideClick, - monthFormat = _props11.monthFormat, - daySize = _props11.daySize, - isFocused = _props11.isFocused, - isRTL = _props11.isRTL, - styles = _props11.styles, - theme = _props11.theme, - phrases = _props11.phrases, - verticalHeight = _props11.verticalHeight, - dayAriaLabelFormat = _props11.dayAriaLabelFormat, - noBorder = _props11.noBorder, - transitionDuration = _props11.transitionDuration, - verticalBorderSpacing = _props11.verticalBorderSpacing, - horizontalMonthPadding = _props11.horizontalMonthPadding; - var dayPickerHorizontalPadding = theme.reactDates.spacing.dayPickerHorizontalPadding; - - - var isHorizontal = this.isHorizontal(); - - var numOfWeekHeaders = this.isVertical() ? 1 : numberOfMonths; - var weekHeaders = []; - for (var i = 0; i < numOfWeekHeaders; i += 1) { - weekHeaders.push(this.renderWeekHeader(i)); - } - - var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; - var height = void 0; - if (isHorizontal) { - height = this.calendarMonthGridHeight; - } else if (this.isVertical() && !verticalScrollable && !withPortal) { - // If the user doesn't set a desired height, - // we default back to this kind of made-up value that generally looks good - height = verticalHeight || 1.75 * calendarMonthWidth; - } - - var isCalendarMonthGridAnimating = monthTransition !== null; - - var shouldFocusDate = !isCalendarMonthGridAnimating && isFocused; - - var keyboardShortcutButtonLocation = _DayPickerKeyboardShortcuts.BOTTOM_RIGHT; - if (this.isVertical()) { - keyboardShortcutButtonLocation = withPortal ? _DayPickerKeyboardShortcuts.TOP_LEFT : _DayPickerKeyboardShortcuts.TOP_RIGHT; - } - - var shouldAnimateHeight = isHorizontal && hasSetHeight; - - var calendarInfoPositionTop = calendarInfoPosition === _constants.INFO_POSITION_TOP; - var calendarInfoPositionBottom = calendarInfoPosition === _constants.INFO_POSITION_BOTTOM; - var calendarInfoPositionBefore = calendarInfoPosition === _constants.INFO_POSITION_BEFORE; - var calendarInfoPositionAfter = calendarInfoPosition === _constants.INFO_POSITION_AFTER; - var calendarInfoIsInline = calendarInfoPositionBefore || calendarInfoPositionAfter; - - var calendarInfo = renderCalendarInfo && _react2['default'].createElement( - 'div', - _extends({ - ref: this.setCalendarInfoRef - }, (0, _reactWithStyles.css)(calendarInfoIsInline && styles.DayPicker_calendarInfo__horizontal)), - renderCalendarInfo() - ); - - var calendarInfoPanelWidth = renderCalendarInfo && calendarInfoIsInline ? calendarInfoWidth : 0; - - var firstVisibleMonthIndex = this.getFirstVisibleIndex(); - var wrapperHorizontalWidth = calendarMonthWidth * numberOfMonths + 2 * dayPickerHorizontalPadding; - // Adding `1px` because of whitespace between 2 inline-block - var fullHorizontalWidth = wrapperHorizontalWidth + calendarInfoPanelWidth + 1; - - var transitionContainerStyle = { - width: isHorizontal && wrapperHorizontalWidth, - height: height - }; - - var dayPickerWrapperStyle = { - width: isHorizontal && wrapperHorizontalWidth - }; - - var dayPickerStyle = { - width: isHorizontal && fullHorizontalWidth, - - // These values are to center the datepicker (approximately) on the page - marginLeft: isHorizontal && withPortal ? -fullHorizontalWidth / 2 : null, - marginTop: isHorizontal && withPortal ? -calendarMonthWidth / 2 : null - }; - - return _react2['default'].createElement( - 'div', - _extends({ - role: 'application', - 'aria-label': phrases.calendarLabel - }, (0, _reactWithStyles.css)(styles.DayPicker, isHorizontal && styles.DayPicker__horizontal, verticalScrollable && styles.DayPicker__verticalScrollable, isHorizontal && withPortal && styles.DayPicker_portal__horizontal, this.isVertical() && withPortal && styles.DayPicker_portal__vertical, dayPickerStyle, !monthTitleHeight && styles.DayPicker__hidden, !noBorder && styles.DayPicker__withBorder)), - _react2['default'].createElement( - _reactOutsideClickHandler2['default'], - { onOutsideClick: onOutsideClick }, - (calendarInfoPositionTop || calendarInfoPositionBefore) && calendarInfo, - _react2['default'].createElement( - 'div', - (0, _reactWithStyles.css)(dayPickerWrapperStyle, calendarInfoIsInline && isHorizontal && styles.DayPicker_wrapper__horizontal), - _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.DayPicker_weekHeaders, isHorizontal && styles.DayPicker_weekHeaders__horizontal), { - 'aria-hidden': 'true', - role: 'presentation' - }), - weekHeaders - ), - _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.DayPicker_focusRegion), { - ref: this.setContainerRef, - onClick: function () { - function onClick(e) { - e.stopPropagation(); - } - - return onClick; - }(), - onKeyDown: this.onKeyDown, - onMouseUp: function () { - function onMouseUp() { - _this7.setState({ withMouseInteractions: true }); - } - - return onMouseUp; - }(), - role: 'region', - tabIndex: -1 - }), - !verticalScrollable && this.renderNavigation(), - _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.DayPicker_transitionContainer, shouldAnimateHeight && styles.DayPicker_transitionContainer__horizontal, this.isVertical() && styles.DayPicker_transitionContainer__vertical, verticalScrollable && styles.DayPicker_transitionContainer__verticalScrollable, transitionContainerStyle), { - ref: this.setTransitionContainerRef - }), - _react2['default'].createElement(_CalendarMonthGrid2['default'], { - setMonthTitleHeight: !monthTitleHeight ? this.setMonthTitleHeight : undefined, - translationValue: translationValue, - enableOutsideDays: enableOutsideDays, - firstVisibleMonthIndex: firstVisibleMonthIndex, - initialMonth: currentMonth, - isAnimating: isCalendarMonthGridAnimating, - modifiers: modifiers, - orientation: orientation, - numberOfMonths: numberOfMonths * scrollableMonthMultiple, - onDayClick: onDayClick, - onDayMouseEnter: onDayMouseEnter, - onDayMouseLeave: onDayMouseLeave, - onMonthChange: this.onMonthChange, - onYearChange: this.onYearChange, - renderMonthText: renderMonthText, - renderCalendarDay: renderCalendarDay, - renderDayContents: renderDayContents, - renderMonthElement: renderMonthElement, - onMonthTransitionEnd: this.updateStateAfterMonthTransition, - monthFormat: monthFormat, - daySize: daySize, - firstDayOfWeek: firstDayOfWeek, - isFocused: shouldFocusDate, - focusedDate: focusedDate, - phrases: phrases, - isRTL: isRTL, - dayAriaLabelFormat: dayAriaLabelFormat, - transitionDuration: transitionDuration, - verticalBorderSpacing: verticalBorderSpacing, - horizontalMonthPadding: horizontalMonthPadding - }), - verticalScrollable && this.renderNavigation() - ), - !isTouch && !hideKeyboardShortcutsPanel && _react2['default'].createElement(_DayPickerKeyboardShortcuts2['default'], { - block: this.isVertical() && !withPortal, - buttonLocation: keyboardShortcutButtonLocation, - showKeyboardShortcutsPanel: showKeyboardShortcuts, - openKeyboardShortcutsPanel: this.openKeyboardShortcutsPanel, - closeKeyboardShortcutsPanel: this.closeKeyboardShortcutsPanel, - phrases: phrases - }) - ) - ), - (calendarInfoPositionBottom || calendarInfoPositionAfter) && calendarInfo - ) - ); - } - - return render; - }() - }]); - - return DayPicker; -}(_react2['default'].Component); - -DayPicker.propTypes = propTypes; -DayPicker.defaultProps = defaultProps; - -exports.PureDayPicker = DayPicker; -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref2) { - var _ref2$reactDates = _ref2.reactDates, - color = _ref2$reactDates.color, - font = _ref2$reactDates.font, - noScrollBarOnVerticalScrollable = _ref2$reactDates.noScrollBarOnVerticalScrollable, - spacing = _ref2$reactDates.spacing, - zIndex = _ref2$reactDates.zIndex; - return { - DayPicker: { - background: color.background, - position: 'relative', - textAlign: 'left' - }, - - DayPicker__horizontal: { - background: color.background - }, - - DayPicker__verticalScrollable: { - height: '100%' - }, - - DayPicker__hidden: { - visibility: 'hidden' - }, - - DayPicker__withBorder: { - boxShadow: '0 2px 6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.07)', - borderRadius: 3 - }, - - DayPicker_portal__horizontal: { - boxShadow: 'none', - position: 'absolute', - left: '50%', - top: '50%' - }, - - DayPicker_portal__vertical: { - position: 'initial' - }, - - DayPicker_focusRegion: { - outline: 'none' - }, - - DayPicker_calendarInfo__horizontal: { - display: 'inline-block', - verticalAlign: 'top' - }, - - DayPicker_wrapper__horizontal: { - display: 'inline-block', - verticalAlign: 'top' - }, - - DayPicker_weekHeaders: { - position: 'relative' - }, - - DayPicker_weekHeaders__horizontal: { - marginLeft: spacing.dayPickerHorizontalPadding - }, - - DayPicker_weekHeader: { - color: color.placeholderText, - position: 'absolute', - top: 62, - zIndex: zIndex + 2, - textAlign: 'left' - }, - - DayPicker_weekHeader__vertical: { - left: '50%' - }, - - DayPicker_weekHeader__verticalScrollable: { - top: 0, - display: 'table-row', - borderBottom: '1px solid ' + String(color.core.border), - background: color.background, - marginLeft: 0, - left: 0, - width: '100%', - textAlign: 'center' - }, - - DayPicker_weekHeader_ul: { - listStyle: 'none', - margin: '1px 0', - paddingLeft: 0, - paddingRight: 0, - fontSize: font.size - }, - - DayPicker_weekHeader_li: { - display: 'inline-block', - textAlign: 'center' - }, - - DayPicker_transitionContainer: { - position: 'relative', - overflow: 'hidden', - borderRadius: 3 - }, - - DayPicker_transitionContainer__horizontal: { - transition: 'height 0.2s ease-in-out' - }, - - DayPicker_transitionContainer__vertical: { - width: '100%' - }, - - DayPicker_transitionContainer__verticalScrollable: (0, _object2['default'])({ - paddingTop: 20, - height: '100%', - position: 'absolute', - top: 0, - bottom: 0, - right: 0, - left: 0, - overflowY: 'scroll' - }, noScrollBarOnVerticalScrollable && { - '-webkitOverflowScrolling': 'touch', - '::-webkit-scrollbar': { - '-webkit-appearance': 'none', - display: 'none' - } - }) - }; -})(DayPicker); - -/***/ }), - -/***/ 600: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.BOTTOM_RIGHT = exports.TOP_RIGHT = exports.TOP_LEFT = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _KeyboardShortcutRow = __webpack_require__(5820); - -var _KeyboardShortcutRow2 = _interopRequireDefault(_KeyboardShortcutRow); - -var _CloseButton = __webpack_require__(6973); - -var _CloseButton2 = _interopRequireDefault(_CloseButton); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var TOP_LEFT = exports.TOP_LEFT = 'top-left'; -var TOP_RIGHT = exports.TOP_RIGHT = 'top-right'; -var BOTTOM_RIGHT = exports.BOTTOM_RIGHT = 'bottom-right'; - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - block: _propTypes2['default'].bool, - buttonLocation: _propTypes2['default'].oneOf([TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT]), - showKeyboardShortcutsPanel: _propTypes2['default'].bool, - openKeyboardShortcutsPanel: _propTypes2['default'].func, - closeKeyboardShortcutsPanel: _propTypes2['default'].func, - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.DayPickerKeyboardShortcutsPhrases)) -})); - -var defaultProps = { - block: false, - buttonLocation: BOTTOM_RIGHT, - showKeyboardShortcutsPanel: false, - openKeyboardShortcutsPanel: function () { - function openKeyboardShortcutsPanel() {} - - return openKeyboardShortcutsPanel; - }(), - closeKeyboardShortcutsPanel: function () { - function closeKeyboardShortcutsPanel() {} - - return closeKeyboardShortcutsPanel; - }(), - - phrases: _defaultPhrases.DayPickerKeyboardShortcutsPhrases -}; - -function getKeyboardShortcuts(phrases) { - return [{ - unicode: '↵', - label: phrases.enterKey, - action: phrases.selectFocusedDate - }, { - unicode: '←/→', - label: phrases.leftArrowRightArrow, - action: phrases.moveFocusByOneDay - }, { - unicode: '↑/↓', - label: phrases.upArrowDownArrow, - action: phrases.moveFocusByOneWeek - }, { - unicode: 'PgUp/PgDn', - label: phrases.pageUpPageDown, - action: phrases.moveFocusByOneMonth - }, { - unicode: 'Home/End', - label: phrases.homeEnd, - action: phrases.moveFocustoStartAndEndOfWeek - }, { - unicode: 'Esc', - label: phrases.escape, - action: phrases.returnFocusToInput - }, { - unicode: '?', - label: phrases.questionMark, - action: phrases.openThisPanel - }]; -} - -var DayPickerKeyboardShortcuts = function (_React$Component) { - _inherits(DayPickerKeyboardShortcuts, _React$Component); - - function DayPickerKeyboardShortcuts() { - var _ref; - - _classCallCheck(this, DayPickerKeyboardShortcuts); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _this = _possibleConstructorReturn(this, (_ref = DayPickerKeyboardShortcuts.__proto__ || Object.getPrototypeOf(DayPickerKeyboardShortcuts)).call.apply(_ref, [this].concat(args))); - - var phrases = _this.props.phrases; - - _this.keyboardShortcuts = getKeyboardShortcuts(phrases); - - _this.onShowKeyboardShortcutsButtonClick = _this.onShowKeyboardShortcutsButtonClick.bind(_this); - _this.setShowKeyboardShortcutsButtonRef = _this.setShowKeyboardShortcutsButtonRef.bind(_this); - _this.setHideKeyboardShortcutsButtonRef = _this.setHideKeyboardShortcutsButtonRef.bind(_this); - _this.handleFocus = _this.handleFocus.bind(_this); - _this.onKeyDown = _this.onKeyDown.bind(_this); - return _this; - } - - _createClass(DayPickerKeyboardShortcuts, [{ - key: 'componentWillReceiveProps', - value: function () { - function componentWillReceiveProps(nextProps) { - var phrases = this.props.phrases; - - if (nextProps.phrases !== phrases) { - this.keyboardShortcuts = getKeyboardShortcuts(nextProps.phrases); - } - } - - return componentWillReceiveProps; - }() - }, { - key: 'componentDidUpdate', - value: function () { - function componentDidUpdate() { - this.handleFocus(); - } - - return componentDidUpdate; - }() - }, { - key: 'onKeyDown', - value: function () { - function onKeyDown(e) { - e.stopPropagation(); - - var closeKeyboardShortcutsPanel = this.props.closeKeyboardShortcutsPanel; - // Because the close button is the only focusable element inside of the panel, this - // amounts to a very basic focus trap. The user can exit the panel by "pressing" the - // close button or hitting escape - - switch (e.key) { - case 'Enter': - case ' ': - case 'Spacebar': // for older browsers - case 'Escape': - closeKeyboardShortcutsPanel(); - break; - - // do nothing - this allows the up and down arrows continue their - // default behavior of scrolling the content of the Keyboard Shortcuts Panel - // which is needed when only a single month is shown for instance. - case 'ArrowUp': - case 'ArrowDown': - break; - - // completely block the rest of the keys that have functionality outside of this panel - case 'Tab': - case 'Home': - case 'End': - case 'PageUp': - case 'PageDown': - case 'ArrowLeft': - case 'ArrowRight': - e.preventDefault(); - break; - - default: - break; - } - } - - return onKeyDown; - }() - }, { - key: 'onShowKeyboardShortcutsButtonClick', - value: function () { - function onShowKeyboardShortcutsButtonClick() { - var _this2 = this; - - var openKeyboardShortcutsPanel = this.props.openKeyboardShortcutsPanel; - - // we want to return focus to this button after closing the keyboard shortcuts panel - - openKeyboardShortcutsPanel(function () { - _this2.showKeyboardShortcutsButton.focus(); - }); - } - - return onShowKeyboardShortcutsButtonClick; - }() - }, { - key: 'setShowKeyboardShortcutsButtonRef', - value: function () { - function setShowKeyboardShortcutsButtonRef(ref) { - this.showKeyboardShortcutsButton = ref; - } - - return setShowKeyboardShortcutsButtonRef; - }() - }, { - key: 'setHideKeyboardShortcutsButtonRef', - value: function () { - function setHideKeyboardShortcutsButtonRef(ref) { - this.hideKeyboardShortcutsButton = ref; - } - - return setHideKeyboardShortcutsButtonRef; - }() - }, { - key: 'handleFocus', - value: function () { - function handleFocus() { - if (this.hideKeyboardShortcutsButton) { - // automatically move focus into the dialog by moving - // to the only interactive element, the hide button - this.hideKeyboardShortcutsButton.focus(); - } - } - - return handleFocus; - }() - }, { - key: 'render', - value: function () { - function render() { - var _this3 = this; - - var _props = this.props, - block = _props.block, - buttonLocation = _props.buttonLocation, - showKeyboardShortcutsPanel = _props.showKeyboardShortcutsPanel, - closeKeyboardShortcutsPanel = _props.closeKeyboardShortcutsPanel, - styles = _props.styles, - phrases = _props.phrases; - - - var toggleButtonText = showKeyboardShortcutsPanel ? phrases.hideKeyboardShortcutsPanel : phrases.showKeyboardShortcutsPanel; - - var bottomRight = buttonLocation === BOTTOM_RIGHT; - var topRight = buttonLocation === TOP_RIGHT; - var topLeft = buttonLocation === TOP_LEFT; - - return _react2['default'].createElement( - 'div', - null, - _react2['default'].createElement( - 'button', - _extends({ - ref: this.setShowKeyboardShortcutsButtonRef - }, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_buttonReset, styles.DayPickerKeyboardShortcuts_show, bottomRight && styles.DayPickerKeyboardShortcuts_show__bottomRight, topRight && styles.DayPickerKeyboardShortcuts_show__topRight, topLeft && styles.DayPickerKeyboardShortcuts_show__topLeft), { - type: 'button', - 'aria-label': toggleButtonText, - onClick: this.onShowKeyboardShortcutsButtonClick, - onKeyDown: function () { - function onKeyDown(e) { - if (e.key === 'Enter') { - e.preventDefault(); - } else if (e.key === 'Space') { - _this3.onShowKeyboardShortcutsButtonClick(e); - } - } - - return onKeyDown; - }(), - onMouseUp: function () { - function onMouseUp(e) { - e.currentTarget.blur(); - } - - return onMouseUp; - }() - }), - _react2['default'].createElement( - 'span', - (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_showSpan, bottomRight && styles.DayPickerKeyboardShortcuts_showSpan__bottomRight, topRight && styles.DayPickerKeyboardShortcuts_showSpan__topRight, topLeft && styles.DayPickerKeyboardShortcuts_showSpan__topLeft), - '?' - ) - ), - showKeyboardShortcutsPanel && _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_panel), { - role: 'dialog', - 'aria-labelledby': 'DayPickerKeyboardShortcuts_title', - 'aria-describedby': 'DayPickerKeyboardShortcuts_description' - }), - _react2['default'].createElement( - 'div', - _extends({}, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_title), { - id: 'DayPickerKeyboardShortcuts_title' - }), - phrases.keyboardShortcuts - ), - _react2['default'].createElement( - 'button', - _extends({ - ref: this.setHideKeyboardShortcutsButtonRef - }, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_buttonReset, styles.DayPickerKeyboardShortcuts_close), { - type: 'button', - tabIndex: '0', - 'aria-label': phrases.hideKeyboardShortcutsPanel, - onClick: closeKeyboardShortcutsPanel, - onKeyDown: this.onKeyDown - }), - _react2['default'].createElement(_CloseButton2['default'], (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_closeSvg)) - ), - _react2['default'].createElement( - 'ul', - _extends({}, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_list), { - id: 'DayPickerKeyboardShortcuts_description' - }), - this.keyboardShortcuts.map(function (_ref2) { - var unicode = _ref2.unicode, - label = _ref2.label, - action = _ref2.action; - return _react2['default'].createElement(_KeyboardShortcutRow2['default'], { - key: label, - unicode: unicode, - label: label, - action: action, - block: block - }); - }) - ) - ) - ); - } - - return render; - }() - }]); - - return DayPickerKeyboardShortcuts; -}(_react2['default'].Component); - -DayPickerKeyboardShortcuts.propTypes = propTypes; -DayPickerKeyboardShortcuts.defaultProps = defaultProps; - -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref3) { - var _ref3$reactDates = _ref3.reactDates, - color = _ref3$reactDates.color, - font = _ref3$reactDates.font, - zIndex = _ref3$reactDates.zIndex; - return { - DayPickerKeyboardShortcuts_buttonReset: { - background: 'none', - border: 0, - borderRadius: 0, - color: 'inherit', - font: 'inherit', - lineHeight: 'normal', - overflow: 'visible', - padding: 0, - cursor: 'pointer', - fontSize: font.size, - - ':active': { - outline: 'none' - } - }, - - DayPickerKeyboardShortcuts_show: { - width: 22, - position: 'absolute', - zIndex: zIndex + 2 - }, - - DayPickerKeyboardShortcuts_show__bottomRight: { - borderTop: '26px solid transparent', - borderRight: '33px solid ' + String(color.core.primary), - bottom: 0, - right: 0, - - ':hover': { - borderRight: '33px solid ' + String(color.core.primary_dark) - } - }, - - DayPickerKeyboardShortcuts_show__topRight: { - borderBottom: '26px solid transparent', - borderRight: '33px solid ' + String(color.core.primary), - top: 0, - right: 0, - - ':hover': { - borderRight: '33px solid ' + String(color.core.primary_dark) - } - }, - - DayPickerKeyboardShortcuts_show__topLeft: { - borderBottom: '26px solid transparent', - borderLeft: '33px solid ' + String(color.core.primary), - top: 0, - left: 0, - - ':hover': { - borderLeft: '33px solid ' + String(color.core.primary_dark) - } - }, - - DayPickerKeyboardShortcuts_showSpan: { - color: color.core.white, - position: 'absolute' - }, - - DayPickerKeyboardShortcuts_showSpan__bottomRight: { - bottom: 0, - right: -28 - }, - - DayPickerKeyboardShortcuts_showSpan__topRight: { - top: 1, - right: -28 - }, - - DayPickerKeyboardShortcuts_showSpan__topLeft: { - top: 1, - left: -28 - }, - - DayPickerKeyboardShortcuts_panel: { - overflow: 'auto', - background: color.background, - border: '1px solid ' + String(color.core.border), - borderRadius: 2, - position: 'absolute', - top: 0, - bottom: 0, - right: 0, - left: 0, - zIndex: zIndex + 2, - padding: 22, - margin: 33 - }, - - DayPickerKeyboardShortcuts_title: { - fontSize: 16, - fontWeight: 'bold', - margin: 0 - }, - - DayPickerKeyboardShortcuts_list: { - listStyle: 'none', - padding: 0, - fontSize: font.size - }, - - DayPickerKeyboardShortcuts_close: { - position: 'absolute', - right: 22, - top: 22, - zIndex: zIndex + 2, - - ':active': { - outline: 'none' - } - }, - - DayPickerKeyboardShortcuts_closeSvg: { - height: 15, - width: 15, - fill: color.core.grayLighter, - - ':hover': { - fill: color.core.grayLight - }, - - ':focus': { - fill: color.core.grayLight - } - } - }; -})(DayPickerKeyboardShortcuts); - -/***/ }), - -/***/ 3895: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _LeftArrow = __webpack_require__(8); - -var _LeftArrow2 = _interopRequireDefault(_LeftArrow); - -var _RightArrow = __webpack_require__(4921); - -var _RightArrow2 = _interopRequireDefault(_RightArrow); - -var _ChevronUp = __webpack_require__(1809); - -var _ChevronUp2 = _interopRequireDefault(_ChevronUp); - -var _ChevronDown = __webpack_require__(9588); - -var _ChevronDown2 = _interopRequireDefault(_ChevronDown); - -var _ScrollableOrientationShape = __webpack_require__(6553); - -var _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - navPrev: _propTypes2['default'].node, - navNext: _propTypes2['default'].node, - orientation: _ScrollableOrientationShape2['default'], - - onPrevMonthClick: _propTypes2['default'].func, - onNextMonthClick: _propTypes2['default'].func, - - // internationalization - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.DayPickerNavigationPhrases)), - - isRTL: _propTypes2['default'].bool -})); - -var defaultProps = { - navPrev: null, - navNext: null, - orientation: _constants.HORIZONTAL_ORIENTATION, - - onPrevMonthClick: function () { - function onPrevMonthClick() {} - - return onPrevMonthClick; - }(), - onNextMonthClick: function () { - function onNextMonthClick() {} - - return onNextMonthClick; - }(), - - - // internationalization - phrases: _defaultPhrases.DayPickerNavigationPhrases, - isRTL: false -}; - -function DayPickerNavigation(_ref) { - var navPrev = _ref.navPrev, - navNext = _ref.navNext, - onPrevMonthClick = _ref.onPrevMonthClick, - onNextMonthClick = _ref.onNextMonthClick, - orientation = _ref.orientation, - phrases = _ref.phrases, - isRTL = _ref.isRTL, - styles = _ref.styles; - - var isHorizontal = orientation === _constants.HORIZONTAL_ORIENTATION; - var isVertical = orientation !== _constants.HORIZONTAL_ORIENTATION; - var isVerticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; - - var navPrevIcon = navPrev; - var navNextIcon = navNext; - var isDefaultNavPrev = false; - var isDefaultNavNext = false; - if (!navPrevIcon) { - isDefaultNavPrev = true; - var Icon = isVertical ? _ChevronUp2['default'] : _LeftArrow2['default']; - if (isRTL && !isVertical) { - Icon = _RightArrow2['default']; - } - navPrevIcon = _react2['default'].createElement(Icon, (0, _reactWithStyles.css)(isHorizontal && styles.DayPickerNavigation_svg__horizontal, isVertical && styles.DayPickerNavigation_svg__vertical)); - } - - if (!navNextIcon) { - isDefaultNavNext = true; - var _Icon = isVertical ? _ChevronDown2['default'] : _RightArrow2['default']; - if (isRTL && !isVertical) { - _Icon = _LeftArrow2['default']; - } - navNextIcon = _react2['default'].createElement(_Icon, (0, _reactWithStyles.css)(isHorizontal && styles.DayPickerNavigation_svg__horizontal, isVertical && styles.DayPickerNavigation_svg__vertical)); - } - - var isDefaultNav = isVerticalScrollable ? isDefaultNavNext : isDefaultNavNext || isDefaultNavPrev; - - return _react2['default'].createElement( - 'div', - _reactWithStyles.css.apply(undefined, [styles.DayPickerNavigation, isHorizontal && styles.DayPickerNavigation__horizontal].concat(_toConsumableArray(isVertical && [styles.DayPickerNavigation__vertical, isDefaultNav && styles.DayPickerNavigation__verticalDefault]), _toConsumableArray(isVerticalScrollable && [styles.DayPickerNavigation__verticalScrollable, isDefaultNav && styles.DayPickerNavigation__verticalScrollableDefault]))), - !isVerticalScrollable && _react2['default'].createElement( - 'div', - _extends({ - role: 'button', - tabIndex: '0' - }, _reactWithStyles.css.apply(undefined, [styles.DayPickerNavigation_button, isDefaultNavPrev && styles.DayPickerNavigation_button__default].concat(_toConsumableArray(isHorizontal && [styles.DayPickerNavigation_button__horizontal].concat(_toConsumableArray(isDefaultNavPrev && [styles.DayPickerNavigation_button__horizontalDefault, !isRTL && styles.DayPickerNavigation_leftButton__horizontalDefault, isRTL && styles.DayPickerNavigation_rightButton__horizontalDefault]))), _toConsumableArray(isVertical && [styles.DayPickerNavigation_button__vertical].concat(_toConsumableArray(isDefaultNavPrev && [styles.DayPickerNavigation_button__verticalDefault, styles.DayPickerNavigation_prevButton__verticalDefault]))))), { - 'aria-label': phrases.jumpToPrevMonth, - onClick: onPrevMonthClick, - onKeyUp: function () { - function onKeyUp(e) { - var key = e.key; - - if (key === 'Enter' || key === ' ') onPrevMonthClick(e); - } - - return onKeyUp; - }(), - onMouseUp: function () { - function onMouseUp(e) { - e.currentTarget.blur(); - } - - return onMouseUp; - }() - }), - navPrevIcon - ), - _react2['default'].createElement( - 'div', - _extends({ - role: 'button', - tabIndex: '0' - }, _reactWithStyles.css.apply(undefined, [styles.DayPickerNavigation_button, isDefaultNavNext && styles.DayPickerNavigation_button__default].concat(_toConsumableArray(isHorizontal && [styles.DayPickerNavigation_button__horizontal].concat(_toConsumableArray(isDefaultNavNext && [styles.DayPickerNavigation_button__horizontalDefault, isRTL && styles.DayPickerNavigation_leftButton__horizontalDefault, !isRTL && styles.DayPickerNavigation_rightButton__horizontalDefault]))), _toConsumableArray(isVertical && [styles.DayPickerNavigation_button__vertical, styles.DayPickerNavigation_nextButton__vertical].concat(_toConsumableArray(isDefaultNavNext && [styles.DayPickerNavigation_button__verticalDefault, styles.DayPickerNavigation_nextButton__verticalDefault, isVerticalScrollable && styles.DayPickerNavigation_nextButton__verticalScrollableDefault]))))), { - 'aria-label': phrases.jumpToNextMonth, - onClick: onNextMonthClick, - onKeyUp: function () { - function onKeyUp(e) { - var key = e.key; - - if (key === 'Enter' || key === ' ') onNextMonthClick(e); - } - - return onKeyUp; - }(), - onMouseUp: function () { - function onMouseUp(e) { - e.currentTarget.blur(); - } - - return onMouseUp; - }() - }), - navNextIcon - ) - ); -} - -DayPickerNavigation.propTypes = propTypes; -DayPickerNavigation.defaultProps = defaultProps; - -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref2) { - var _ref2$reactDates = _ref2.reactDates, - color = _ref2$reactDates.color, - zIndex = _ref2$reactDates.zIndex; - return { - DayPickerNavigation: { - position: 'relative', - zIndex: zIndex + 2 - }, - - DayPickerNavigation__horizontal: { - height: 0 - }, - - DayPickerNavigation__vertical: {}, - DayPickerNavigation__verticalScrollable: {}, - - DayPickerNavigation__verticalDefault: { - position: 'absolute', - width: '100%', - height: 52, - bottom: 0, - left: 0 - }, - - DayPickerNavigation__verticalScrollableDefault: { - position: 'relative' - }, - - DayPickerNavigation_button: { - cursor: 'pointer', - userSelect: 'none', - border: 0, - padding: 0, - margin: 0 - }, - - DayPickerNavigation_button__default: { - border: '1px solid ' + String(color.core.borderLight), - backgroundColor: color.background, - color: color.placeholderText, - - ':focus': { - border: '1px solid ' + String(color.core.borderMedium) - }, - - ':hover': { - border: '1px solid ' + String(color.core.borderMedium) - }, - - ':active': { - background: color.backgroundDark - } - }, - - DayPickerNavigation_button__horizontal: {}, - - DayPickerNavigation_button__horizontalDefault: { - position: 'absolute', - top: 18, - lineHeight: 0.78, - borderRadius: 3, - padding: '6px 9px' - }, - - DayPickerNavigation_leftButton__horizontalDefault: { - left: 22 - }, - - DayPickerNavigation_rightButton__horizontalDefault: { - right: 22 - }, - - DayPickerNavigation_button__vertical: {}, - - DayPickerNavigation_button__verticalDefault: { - padding: 5, - background: color.background, - boxShadow: '0 0 5px 2px rgba(0, 0, 0, 0.1)', - position: 'relative', - display: 'inline-block', - height: '100%', - width: '50%' - }, - - DayPickerNavigation_prevButton__verticalDefault: {}, - - DayPickerNavigation_nextButton__verticalDefault: { - borderLeft: 0 - }, - - DayPickerNavigation_nextButton__verticalScrollableDefault: { - width: '100%' - }, - - DayPickerNavigation_svg__horizontal: { - height: 19, - width: 19, - fill: color.core.grayLight, - display: 'block' - }, - - DayPickerNavigation_svg__vertical: { - height: 42, - width: 42, - fill: color.text, - display: 'block' - } - }; -})(DayPickerNavigation); - -/***/ }), - -/***/ 6302: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -var __webpack_unused_export__; - - -__webpack_unused_export__ = ({ - value: true -}); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _reactMomentProptypes = __webpack_require__(6150); - -var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _object3 = __webpack_require__(5861); - -var _object4 = _interopRequireDefault(_object3); - -var _isTouchDevice = __webpack_require__(5834); - -var _isTouchDevice2 = _interopRequireDefault(_isTouchDevice); - -var _defaultPhrases = __webpack_require__(6030); - -var _getPhrasePropTypes = __webpack_require__(2893); - -var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes); - -var _isSameDay = __webpack_require__(3923); - -var _isSameDay2 = _interopRequireDefault(_isSameDay); - -var _isAfterDay = __webpack_require__(7365); - -var _isAfterDay2 = _interopRequireDefault(_isAfterDay); - -var _getVisibleDays = __webpack_require__(3268); - -var _getVisibleDays2 = _interopRequireDefault(_getVisibleDays); - -var _isDayVisible = __webpack_require__(5713); - -var _isDayVisible2 = _interopRequireDefault(_isDayVisible); - -var _toISODateString = __webpack_require__(7310); - -var _toISODateString2 = _interopRequireDefault(_toISODateString); - -var _toISOMonthString = __webpack_require__(2705); - -var _toISOMonthString2 = _interopRequireDefault(_toISOMonthString); - -var _ScrollableOrientationShape = __webpack_require__(6553); - -var _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape); - -var _DayOfWeekShape = __webpack_require__(243); - -var _DayOfWeekShape2 = _interopRequireDefault(_DayOfWeekShape); - -var _CalendarInfoPositionShape = __webpack_require__(8182); - -var _CalendarInfoPositionShape2 = _interopRequireDefault(_CalendarInfoPositionShape); - -var _constants = __webpack_require__(257); - -var _DayPicker = __webpack_require__(8665); - -var _DayPicker2 = _interopRequireDefault(_DayPicker); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)({ - date: _reactMomentProptypes2['default'].momentObj, - onDateChange: _propTypes2['default'].func, - - focused: _propTypes2['default'].bool, - onFocusChange: _propTypes2['default'].func, - onClose: _propTypes2['default'].func, - - keepOpenOnDateSelect: _propTypes2['default'].bool, - isOutsideRange: _propTypes2['default'].func, - isDayBlocked: _propTypes2['default'].func, - isDayHighlighted: _propTypes2['default'].func, - - // DayPicker props - renderMonthText: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - renderMonthElement: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'), - enableOutsideDays: _propTypes2['default'].bool, - numberOfMonths: _propTypes2['default'].number, - orientation: _ScrollableOrientationShape2['default'], - withPortal: _propTypes2['default'].bool, - initialVisibleMonth: _propTypes2['default'].func, - firstDayOfWeek: _DayOfWeekShape2['default'], - hideKeyboardShortcutsPanel: _propTypes2['default'].bool, - daySize: _airbnbPropTypes.nonNegativeInteger, - verticalHeight: _airbnbPropTypes.nonNegativeInteger, - noBorder: _propTypes2['default'].bool, - verticalBorderSpacing: _airbnbPropTypes.nonNegativeInteger, - transitionDuration: _airbnbPropTypes.nonNegativeInteger, - horizontalMonthPadding: _airbnbPropTypes.nonNegativeInteger, - - navPrev: _propTypes2['default'].node, - navNext: _propTypes2['default'].node, - - onPrevMonthClick: _propTypes2['default'].func, - onNextMonthClick: _propTypes2['default'].func, - onOutsideClick: _propTypes2['default'].func, - renderCalendarDay: _propTypes2['default'].func, - renderDayContents: _propTypes2['default'].func, - renderCalendarInfo: _propTypes2['default'].func, - calendarInfoPosition: _CalendarInfoPositionShape2['default'], - - // accessibility - onBlur: _propTypes2['default'].func, - isFocused: _propTypes2['default'].bool, - showKeyboardShortcuts: _propTypes2['default'].bool, - - // i18n - monthFormat: _propTypes2['default'].string, - weekDayFormat: _propTypes2['default'].string, - phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.DayPickerPhrases)), - dayAriaLabelFormat: _propTypes2['default'].string, - - isRTL: _propTypes2['default'].bool -}); - -var defaultProps = { - date: undefined, // TODO: use null - onDateChange: function () { - function onDateChange() {} - - return onDateChange; - }(), - - - focused: false, - onFocusChange: function () { - function onFocusChange() {} - - return onFocusChange; - }(), - onClose: function () { - function onClose() {} - - return onClose; - }(), - - - keepOpenOnDateSelect: false, - isOutsideRange: function () { - function isOutsideRange() {} - - return isOutsideRange; - }(), - isDayBlocked: function () { - function isDayBlocked() {} - - return isDayBlocked; - }(), - isDayHighlighted: function () { - function isDayHighlighted() {} - - return isDayHighlighted; - }(), - - - // DayPicker props - renderMonthText: null, - enableOutsideDays: false, - numberOfMonths: 1, - orientation: _constants.HORIZONTAL_ORIENTATION, - withPortal: false, - hideKeyboardShortcutsPanel: false, - initialVisibleMonth: null, - firstDayOfWeek: null, - daySize: _constants.DAY_SIZE, - verticalHeight: null, - noBorder: false, - verticalBorderSpacing: undefined, - transitionDuration: undefined, - horizontalMonthPadding: 13, - - navPrev: null, - navNext: null, - - onPrevMonthClick: function () { - function onPrevMonthClick() {} - - return onPrevMonthClick; - }(), - onNextMonthClick: function () { - function onNextMonthClick() {} - - return onNextMonthClick; - }(), - onOutsideClick: function () { - function onOutsideClick() {} - - return onOutsideClick; - }(), - - - renderCalendarDay: undefined, - renderDayContents: null, - renderCalendarInfo: null, - renderMonthElement: null, - calendarInfoPosition: _constants.INFO_POSITION_BOTTOM, - - // accessibility - onBlur: function () { - function onBlur() {} - - return onBlur; - }(), - - isFocused: false, - showKeyboardShortcuts: false, - - // i18n - monthFormat: 'MMMM YYYY', - weekDayFormat: 'dd', - phrases: _defaultPhrases.DayPickerPhrases, - dayAriaLabelFormat: undefined, - - isRTL: false -}; - -var DayPickerSingleDateController = function (_React$Component) { - _inherits(DayPickerSingleDateController, _React$Component); - - function DayPickerSingleDateController(props) { - _classCallCheck(this, DayPickerSingleDateController); - - var _this = _possibleConstructorReturn(this, (DayPickerSingleDateController.__proto__ || Object.getPrototypeOf(DayPickerSingleDateController)).call(this, props)); - - _this.isTouchDevice = false; - _this.today = (0, _moment2['default'])(); - - _this.modifiers = { - today: function () { - function today(day) { - return _this.isToday(day); - } - - return today; - }(), - blocked: function () { - function blocked(day) { - return _this.isBlocked(day); - } - - return blocked; - }(), - 'blocked-calendar': function () { - function blockedCalendar(day) { - return props.isDayBlocked(day); - } - - return blockedCalendar; - }(), - 'blocked-out-of-range': function () { - function blockedOutOfRange(day) { - return props.isOutsideRange(day); - } - - return blockedOutOfRange; - }(), - 'highlighted-calendar': function () { - function highlightedCalendar(day) { - return props.isDayHighlighted(day); - } - - return highlightedCalendar; - }(), - valid: function () { - function valid(day) { - return !_this.isBlocked(day); - } - - return valid; - }(), - hovered: function () { - function hovered(day) { - return _this.isHovered(day); - } - - return hovered; - }(), - selected: function () { - function selected(day) { - return _this.isSelected(day); - } - - return selected; - }(), - 'first-day-of-week': function () { - function firstDayOfWeek(day) { - return _this.isFirstDayOfWeek(day); - } - - return firstDayOfWeek; - }(), - 'last-day-of-week': function () { - function lastDayOfWeek(day) { - return _this.isLastDayOfWeek(day); - } - - return lastDayOfWeek; - }() - }; - - var _this$getStateForNewM = _this.getStateForNewMonth(props), - currentMonth = _this$getStateForNewM.currentMonth, - visibleDays = _this$getStateForNewM.visibleDays; - - _this.state = { - hoverDate: null, - currentMonth: currentMonth, - visibleDays: visibleDays - }; - - _this.onDayMouseEnter = _this.onDayMouseEnter.bind(_this); - _this.onDayMouseLeave = _this.onDayMouseLeave.bind(_this); - _this.onDayClick = _this.onDayClick.bind(_this); - - _this.onPrevMonthClick = _this.onPrevMonthClick.bind(_this); - _this.onNextMonthClick = _this.onNextMonthClick.bind(_this); - _this.onMonthChange = _this.onMonthChange.bind(_this); - _this.onYearChange = _this.onYearChange.bind(_this); - - _this.getFirstFocusableDay = _this.getFirstFocusableDay.bind(_this); - return _this; - } - - _createClass(DayPickerSingleDateController, [{ - key: 'componentDidMount', - value: function () { - function componentDidMount() { - this.isTouchDevice = (0, _isTouchDevice2['default'])(); - } - - return componentDidMount; - }() - }, { - key: 'componentWillReceiveProps', - value: function () { - function componentWillReceiveProps(nextProps) { - var _this2 = this; - - var date = nextProps.date, - focused = nextProps.focused, - isOutsideRange = nextProps.isOutsideRange, - isDayBlocked = nextProps.isDayBlocked, - isDayHighlighted = nextProps.isDayHighlighted, - initialVisibleMonth = nextProps.initialVisibleMonth, - numberOfMonths = nextProps.numberOfMonths, - enableOutsideDays = nextProps.enableOutsideDays; - var _props = this.props, - prevIsOutsideRange = _props.isOutsideRange, - prevIsDayBlocked = _props.isDayBlocked, - prevIsDayHighlighted = _props.isDayHighlighted, - prevNumberOfMonths = _props.numberOfMonths, - prevEnableOutsideDays = _props.enableOutsideDays, - prevInitialVisibleMonth = _props.initialVisibleMonth, - prevFocused = _props.focused, - prevDate = _props.date; - var visibleDays = this.state.visibleDays; - - - var recomputeOutsideRange = false; - var recomputeDayBlocked = false; - var recomputeDayHighlighted = false; - - if (isOutsideRange !== prevIsOutsideRange) { - this.modifiers['blocked-out-of-range'] = function (day) { - return isOutsideRange(day); - }; - recomputeOutsideRange = true; - } - - if (isDayBlocked !== prevIsDayBlocked) { - this.modifiers['blocked-calendar'] = function (day) { - return isDayBlocked(day); - }; - recomputeDayBlocked = true; - } - - if (isDayHighlighted !== prevIsDayHighlighted) { - this.modifiers['highlighted-calendar'] = function (day) { - return isDayHighlighted(day); - }; - recomputeDayHighlighted = true; - } - - var recomputePropModifiers = recomputeOutsideRange || recomputeDayBlocked || recomputeDayHighlighted; - - if (numberOfMonths !== prevNumberOfMonths || enableOutsideDays !== prevEnableOutsideDays || initialVisibleMonth !== prevInitialVisibleMonth && !prevFocused && focused) { - var newMonthState = this.getStateForNewMonth(nextProps); - var currentMonth = newMonthState.currentMonth; - visibleDays = newMonthState.visibleDays; - - this.setState({ - currentMonth: currentMonth, - visibleDays: visibleDays - }); - } - - var didDateChange = date !== prevDate; - var didFocusChange = focused !== prevFocused; - - var modifiers = {}; - - if (didDateChange) { - modifiers = this.deleteModifier(modifiers, prevDate, 'selected'); - modifiers = this.addModifier(modifiers, date, 'selected'); - } - - if (didFocusChange || recomputePropModifiers) { - (0, _object4['default'])(visibleDays).forEach(function (days) { - Object.keys(days).forEach(function (day) { - var momentObj = (0, _moment2['default'])(day); - if (_this2.isBlocked(momentObj)) { - modifiers = _this2.addModifier(modifiers, momentObj, 'blocked'); - } else { - modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked'); - } - - if (didFocusChange || recomputeOutsideRange) { - if (isOutsideRange(momentObj)) { - modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-out-of-range'); - } else { - modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-out-of-range'); - } - } - - if (didFocusChange || recomputeDayBlocked) { - if (isDayBlocked(momentObj)) { - modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-calendar'); - } else { - modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-calendar'); - } - } - - if (didFocusChange || recomputeDayHighlighted) { - if (isDayHighlighted(momentObj)) { - modifiers = _this2.addModifier(modifiers, momentObj, 'highlighted-calendar'); - } else { - modifiers = _this2.deleteModifier(modifiers, momentObj, 'highlighted-calendar'); - } - } - }); - }); - } - - var today = (0, _moment2['default'])(); - if (!(0, _isSameDay2['default'])(this.today, today)) { - modifiers = this.deleteModifier(modifiers, this.today, 'today'); - modifiers = this.addModifier(modifiers, today, 'today'); - this.today = today; - } - - if (Object.keys(modifiers).length > 0) { - this.setState({ - visibleDays: (0, _object2['default'])({}, visibleDays, modifiers) - }); - } - } - - return componentWillReceiveProps; - }() - }, { - key: 'componentWillUpdate', - value: function () { - function componentWillUpdate() { - this.today = (0, _moment2['default'])(); - } - - return componentWillUpdate; - }() - }, { - key: 'onDayClick', - value: function () { - function onDayClick(day, e) { - if (e) e.preventDefault(); - if (this.isBlocked(day)) return; - var _props2 = this.props, - onDateChange = _props2.onDateChange, - keepOpenOnDateSelect = _props2.keepOpenOnDateSelect, - onFocusChange = _props2.onFocusChange, - onClose = _props2.onClose; - - - onDateChange(day); - if (!keepOpenOnDateSelect) { - onFocusChange({ focused: false }); - onClose({ date: day }); - } - } - - return onDayClick; - }() - }, { - key: 'onDayMouseEnter', - value: function () { - function onDayMouseEnter(day) { - if (this.isTouchDevice) return; - var _state = this.state, - hoverDate = _state.hoverDate, - visibleDays = _state.visibleDays; - - - var modifiers = this.deleteModifier({}, hoverDate, 'hovered'); - modifiers = this.addModifier(modifiers, day, 'hovered'); - - this.setState({ - hoverDate: day, - visibleDays: (0, _object2['default'])({}, visibleDays, modifiers) - }); - } - - return onDayMouseEnter; - }() - }, { - key: 'onDayMouseLeave', - value: function () { - function onDayMouseLeave() { - var _state2 = this.state, - hoverDate = _state2.hoverDate, - visibleDays = _state2.visibleDays; - - if (this.isTouchDevice || !hoverDate) return; - - var modifiers = this.deleteModifier({}, hoverDate, 'hovered'); - - this.setState({ - hoverDate: null, - visibleDays: (0, _object2['default'])({}, visibleDays, modifiers) - }); - } - - return onDayMouseLeave; - }() - }, { - key: 'onPrevMonthClick', - value: function () { - function onPrevMonthClick() { - var _props3 = this.props, - onPrevMonthClick = _props3.onPrevMonthClick, - numberOfMonths = _props3.numberOfMonths, - enableOutsideDays = _props3.enableOutsideDays; - var _state3 = this.state, - currentMonth = _state3.currentMonth, - visibleDays = _state3.visibleDays; - - - var newVisibleDays = {}; - Object.keys(visibleDays).sort().slice(0, numberOfMonths + 1).forEach(function (month) { - newVisibleDays[month] = visibleDays[month]; - }); - - var prevMonth = currentMonth.clone().subtract(1, 'month'); - var prevMonthVisibleDays = (0, _getVisibleDays2['default'])(prevMonth, 1, enableOutsideDays); - - this.setState({ - currentMonth: prevMonth, - visibleDays: (0, _object2['default'])({}, newVisibleDays, this.getModifiers(prevMonthVisibleDays)) - }, function () { - onPrevMonthClick(prevMonth.clone()); - }); - } - - return onPrevMonthClick; - }() - }, { - key: 'onNextMonthClick', - value: function () { - function onNextMonthClick() { - var _props4 = this.props, - onNextMonthClick = _props4.onNextMonthClick, - numberOfMonths = _props4.numberOfMonths, - enableOutsideDays = _props4.enableOutsideDays; - var _state4 = this.state, - currentMonth = _state4.currentMonth, - visibleDays = _state4.visibleDays; - - - var newVisibleDays = {}; - Object.keys(visibleDays).sort().slice(1).forEach(function (month) { - newVisibleDays[month] = visibleDays[month]; - }); - - var nextMonth = currentMonth.clone().add(numberOfMonths, 'month'); - var nextMonthVisibleDays = (0, _getVisibleDays2['default'])(nextMonth, 1, enableOutsideDays); - - var newCurrentMonth = currentMonth.clone().add(1, 'month'); - this.setState({ - currentMonth: newCurrentMonth, - visibleDays: (0, _object2['default'])({}, newVisibleDays, this.getModifiers(nextMonthVisibleDays)) - }, function () { - onNextMonthClick(newCurrentMonth.clone()); - }); - } - - return onNextMonthClick; - }() - }, { - key: 'onMonthChange', - value: function () { - function onMonthChange(newMonth) { - var _props5 = this.props, - numberOfMonths = _props5.numberOfMonths, - enableOutsideDays = _props5.enableOutsideDays, - orientation = _props5.orientation; - - var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; - var newVisibleDays = (0, _getVisibleDays2['default'])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); - - this.setState({ - currentMonth: newMonth.clone(), - visibleDays: this.getModifiers(newVisibleDays) - }); - } - - return onMonthChange; - }() - }, { - key: 'onYearChange', - value: function () { - function onYearChange(newMonth) { - var _props6 = this.props, - numberOfMonths = _props6.numberOfMonths, - enableOutsideDays = _props6.enableOutsideDays, - orientation = _props6.orientation; - - var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; - var newVisibleDays = (0, _getVisibleDays2['default'])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); - - this.setState({ - currentMonth: newMonth.clone(), - visibleDays: this.getModifiers(newVisibleDays) - }); - } - - return onYearChange; - }() - }, { - key: 'getFirstFocusableDay', - value: function () { - function getFirstFocusableDay(newMonth) { - var _this3 = this; - - var _props7 = this.props, - date = _props7.date, - numberOfMonths = _props7.numberOfMonths; - - - var focusedDate = newMonth.clone().startOf('month'); - if (date) { - focusedDate = date.clone(); - } - - if (this.isBlocked(focusedDate)) { - var days = []; - var lastVisibleDay = newMonth.clone().add(numberOfMonths - 1, 'months').endOf('month'); - var currentDay = focusedDate.clone(); - while (!(0, _isAfterDay2['default'])(currentDay, lastVisibleDay)) { - currentDay = currentDay.clone().add(1, 'day'); - days.push(currentDay); - } - - var viableDays = days.filter(function (day) { - return !_this3.isBlocked(day) && (0, _isAfterDay2['default'])(day, focusedDate); - }); - if (viableDays.length > 0) { - var _viableDays = _slicedToArray(viableDays, 1); - - focusedDate = _viableDays[0]; - } - } - - return focusedDate; - } - - return getFirstFocusableDay; - }() - }, { - key: 'getModifiers', - value: function () { - function getModifiers(visibleDays) { - var _this4 = this; - - var modifiers = {}; - Object.keys(visibleDays).forEach(function (month) { - modifiers[month] = {}; - visibleDays[month].forEach(function (day) { - modifiers[month][(0, _toISODateString2['default'])(day)] = _this4.getModifiersForDay(day); - }); - }); - - return modifiers; - } - - return getModifiers; - }() - }, { - key: 'getModifiersForDay', - value: function () { - function getModifiersForDay(day) { - var _this5 = this; - - return new Set(Object.keys(this.modifiers).filter(function (modifier) { - return _this5.modifiers[modifier](day); - })); - } - - return getModifiersForDay; - }() - }, { - key: 'getStateForNewMonth', - value: function () { - function getStateForNewMonth(nextProps) { - var _this6 = this; - - var initialVisibleMonth = nextProps.initialVisibleMonth, - date = nextProps.date, - numberOfMonths = nextProps.numberOfMonths, - enableOutsideDays = nextProps.enableOutsideDays; - - var initialVisibleMonthThunk = initialVisibleMonth || (date ? function () { - return date; - } : function () { - return _this6.today; - }); - var currentMonth = initialVisibleMonthThunk(); - var visibleDays = this.getModifiers((0, _getVisibleDays2['default'])(currentMonth, numberOfMonths, enableOutsideDays)); - return { currentMonth: currentMonth, visibleDays: visibleDays }; - } - - return getStateForNewMonth; - }() - }, { - key: 'addModifier', - value: function () { - function addModifier(updatedDays, day, modifier) { - var _props8 = this.props, - numberOfVisibleMonths = _props8.numberOfMonths, - enableOutsideDays = _props8.enableOutsideDays, - orientation = _props8.orientation; - var _state5 = this.state, - firstVisibleMonth = _state5.currentMonth, - visibleDays = _state5.visibleDays; - - - var currentMonth = firstVisibleMonth; - var numberOfMonths = numberOfVisibleMonths; - if (orientation === _constants.VERTICAL_SCROLLABLE) { - numberOfMonths = Object.keys(visibleDays).length; - } else { - currentMonth = currentMonth.clone().subtract(1, 'month'); - numberOfMonths += 2; - } - if (!day || !(0, _isDayVisible2['default'])(day, currentMonth, numberOfMonths, enableOutsideDays)) { - return updatedDays; - } - - var iso = (0, _toISODateString2['default'])(day); - - var updatedDaysAfterAddition = (0, _object2['default'])({}, updatedDays); - if (enableOutsideDays) { - var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) { - return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1; - }); - - updatedDaysAfterAddition = monthsToUpdate.reduce(function (days, monthIso) { - var month = updatedDays[monthIso] || visibleDays[monthIso]; - var modifiers = new Set(month[iso]); - modifiers.add(modifier); - return (0, _object2['default'])({}, days, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers)))); - }, updatedDaysAfterAddition); - } else { - var monthIso = (0, _toISOMonthString2['default'])(day); - var month = updatedDays[monthIso] || visibleDays[monthIso]; - - var modifiers = new Set(month[iso]); - modifiers.add(modifier); - updatedDaysAfterAddition = (0, _object2['default'])({}, updatedDaysAfterAddition, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers)))); - } - - return updatedDaysAfterAddition; - } - - return addModifier; - }() - }, { - key: 'deleteModifier', - value: function () { - function deleteModifier(updatedDays, day, modifier) { - var _props9 = this.props, - numberOfVisibleMonths = _props9.numberOfMonths, - enableOutsideDays = _props9.enableOutsideDays, - orientation = _props9.orientation; - var _state6 = this.state, - firstVisibleMonth = _state6.currentMonth, - visibleDays = _state6.visibleDays; - - - var currentMonth = firstVisibleMonth; - var numberOfMonths = numberOfVisibleMonths; - if (orientation === _constants.VERTICAL_SCROLLABLE) { - numberOfMonths = Object.keys(visibleDays).length; - } else { - currentMonth = currentMonth.clone().subtract(1, 'month'); - numberOfMonths += 2; - } - if (!day || !(0, _isDayVisible2['default'])(day, currentMonth, numberOfMonths, enableOutsideDays)) { - return updatedDays; - } - - var iso = (0, _toISODateString2['default'])(day); - - var updatedDaysAfterDeletion = (0, _object2['default'])({}, updatedDays); - if (enableOutsideDays) { - var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) { - return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1; - }); - - updatedDaysAfterDeletion = monthsToUpdate.reduce(function (days, monthIso) { - var month = updatedDays[monthIso] || visibleDays[monthIso]; - var modifiers = new Set(month[iso]); - modifiers['delete'](modifier); - return (0, _object2['default'])({}, days, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers)))); - }, updatedDaysAfterDeletion); - } else { - var monthIso = (0, _toISOMonthString2['default'])(day); - var month = updatedDays[monthIso] || visibleDays[monthIso]; - - var modifiers = new Set(month[iso]); - modifiers['delete'](modifier); - updatedDaysAfterDeletion = (0, _object2['default'])({}, updatedDaysAfterDeletion, _defineProperty({}, monthIso, (0, _object2['default'])({}, month, _defineProperty({}, iso, modifiers)))); - } - - return updatedDaysAfterDeletion; - } - - return deleteModifier; - }() - }, { - key: 'isBlocked', - value: function () { - function isBlocked(day) { - var _props10 = this.props, - isDayBlocked = _props10.isDayBlocked, - isOutsideRange = _props10.isOutsideRange; - - return isDayBlocked(day) || isOutsideRange(day); - } - - return isBlocked; - }() - }, { - key: 'isHovered', - value: function () { - function isHovered(day) { - var _ref = this.state || {}, - hoverDate = _ref.hoverDate; - - return (0, _isSameDay2['default'])(day, hoverDate); - } - - return isHovered; - }() - }, { - key: 'isSelected', - value: function () { - function isSelected(day) { - var date = this.props.date; - - return (0, _isSameDay2['default'])(day, date); - } - - return isSelected; - }() - }, { - key: 'isToday', - value: function () { - function isToday(day) { - return (0, _isSameDay2['default'])(day, this.today); - } - - return isToday; - }() - }, { - key: 'isFirstDayOfWeek', - value: function () { - function isFirstDayOfWeek(day) { - var firstDayOfWeek = this.props.firstDayOfWeek; - - return day.day() === (firstDayOfWeek || _moment2['default'].localeData().firstDayOfWeek()); - } - - return isFirstDayOfWeek; - }() - }, { - key: 'isLastDayOfWeek', - value: function () { - function isLastDayOfWeek(day) { - var firstDayOfWeek = this.props.firstDayOfWeek; - - return day.day() === ((firstDayOfWeek || _moment2['default'].localeData().firstDayOfWeek()) + 6) % 7; - } - - return isLastDayOfWeek; - }() - }, { - key: 'render', - value: function () { - function render() { - var _props11 = this.props, - numberOfMonths = _props11.numberOfMonths, - orientation = _props11.orientation, - monthFormat = _props11.monthFormat, - renderMonthText = _props11.renderMonthText, - navPrev = _props11.navPrev, - navNext = _props11.navNext, - onOutsideClick = _props11.onOutsideClick, - withPortal = _props11.withPortal, - focused = _props11.focused, - enableOutsideDays = _props11.enableOutsideDays, - hideKeyboardShortcutsPanel = _props11.hideKeyboardShortcutsPanel, - daySize = _props11.daySize, - firstDayOfWeek = _props11.firstDayOfWeek, - renderCalendarDay = _props11.renderCalendarDay, - renderDayContents = _props11.renderDayContents, - renderCalendarInfo = _props11.renderCalendarInfo, - renderMonthElement = _props11.renderMonthElement, - calendarInfoPosition = _props11.calendarInfoPosition, - isFocused = _props11.isFocused, - isRTL = _props11.isRTL, - phrases = _props11.phrases, - dayAriaLabelFormat = _props11.dayAriaLabelFormat, - onBlur = _props11.onBlur, - showKeyboardShortcuts = _props11.showKeyboardShortcuts, - weekDayFormat = _props11.weekDayFormat, - verticalHeight = _props11.verticalHeight, - noBorder = _props11.noBorder, - transitionDuration = _props11.transitionDuration, - verticalBorderSpacing = _props11.verticalBorderSpacing, - horizontalMonthPadding = _props11.horizontalMonthPadding; - var _state7 = this.state, - currentMonth = _state7.currentMonth, - visibleDays = _state7.visibleDays; - - - return _react2['default'].createElement(_DayPicker2['default'], { - orientation: orientation, - enableOutsideDays: enableOutsideDays, - modifiers: visibleDays, - numberOfMonths: numberOfMonths, - onDayClick: this.onDayClick, - onDayMouseEnter: this.onDayMouseEnter, - onDayMouseLeave: this.onDayMouseLeave, - onPrevMonthClick: this.onPrevMonthClick, - onNextMonthClick: this.onNextMonthClick, - onMonthChange: this.onMonthChange, - onYearChange: this.onYearChange, - monthFormat: monthFormat, - withPortal: withPortal, - hidden: !focused, - hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, - initialVisibleMonth: function () { - function initialVisibleMonth() { - return currentMonth; - } - - return initialVisibleMonth; - }(), - firstDayOfWeek: firstDayOfWeek, - onOutsideClick: onOutsideClick, - navPrev: navPrev, - navNext: navNext, - renderMonthText: renderMonthText, - renderCalendarDay: renderCalendarDay, - renderDayContents: renderDayContents, - renderCalendarInfo: renderCalendarInfo, - renderMonthElement: renderMonthElement, - calendarInfoPosition: calendarInfoPosition, - isFocused: isFocused, - getFirstFocusableDay: this.getFirstFocusableDay, - onBlur: onBlur, - phrases: phrases, - daySize: daySize, - isRTL: isRTL, - showKeyboardShortcuts: showKeyboardShortcuts, - weekDayFormat: weekDayFormat, - dayAriaLabelFormat: dayAriaLabelFormat, - verticalHeight: verticalHeight, - noBorder: noBorder, - transitionDuration: transitionDuration, - verticalBorderSpacing: verticalBorderSpacing, - horizontalMonthPadding: horizontalMonthPadding - }); - } - - return render; - }() - }]); - - return DayPickerSingleDateController; -}(_react2['default'].Component); - -exports.Z = DayPickerSingleDateController; - - -DayPickerSingleDateController.propTypes = propTypes; -DayPickerSingleDateController.defaultProps = defaultProps; - -/***/ }), - -/***/ 5820: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _reactWithStyles = __webpack_require__(3576); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)((0, _object2['default'])({}, _reactWithStyles.withStylesPropTypes, { - unicode: _propTypes2['default'].string.isRequired, - label: _propTypes2['default'].string.isRequired, - action: _propTypes2['default'].string.isRequired, - block: _propTypes2['default'].bool -})); - -var defaultProps = { - block: false -}; - -function KeyboardShortcutRow(_ref) { - var unicode = _ref.unicode, - label = _ref.label, - action = _ref.action, - block = _ref.block, - styles = _ref.styles; - - return _react2['default'].createElement( - 'li', - (0, _reactWithStyles.css)(styles.KeyboardShortcutRow, block && styles.KeyboardShortcutRow__block), - _react2['default'].createElement( - 'div', - (0, _reactWithStyles.css)(styles.KeyboardShortcutRow_keyContainer, block && styles.KeyboardShortcutRow_keyContainer__block), - _react2['default'].createElement( - 'span', - _extends({}, (0, _reactWithStyles.css)(styles.KeyboardShortcutRow_key), { - role: 'img', - 'aria-label': String(label) + ',' // add comma so screen readers will pause before reading action - }), - unicode - ) - ), - _react2['default'].createElement( - 'div', - (0, _reactWithStyles.css)(styles.KeyboardShortcutRow_action), - action - ) - ); -} - -KeyboardShortcutRow.propTypes = propTypes; -KeyboardShortcutRow.defaultProps = defaultProps; - -exports["default"] = (0, _reactWithStyles.withStyles)(function (_ref2) { - var color = _ref2.reactDates.color; - return { - KeyboardShortcutRow: { - listStyle: 'none', - margin: '6px 0' - }, - - KeyboardShortcutRow__block: { - marginBottom: 16 - }, - - KeyboardShortcutRow_keyContainer: { - display: 'inline-block', - whiteSpace: 'nowrap', - textAlign: 'right', - marginRight: 6 - }, - - KeyboardShortcutRow_keyContainer__block: { - textAlign: 'left', - display: 'inline' - }, - - KeyboardShortcutRow_key: { - fontFamily: 'monospace', - fontSize: 12, - textTransform: 'uppercase', - background: color.core.grayLightest, - padding: '2px 6px' - }, - - KeyboardShortcutRow_action: { - display: 'inline', - wordBreak: 'break-word', - marginLeft: 8 - } - }; -})(KeyboardShortcutRow); - -/***/ }), - -/***/ 8: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var LeftArrow = function () { - function LeftArrow(props) { - return _react2['default'].createElement( - 'svg', - props, - _react2['default'].createElement('path', { - d: 'M336.2 274.5l-210.1 210h805.4c13 0 23 10 23 23s-10 23-23 23H126.1l210.1 210.1c11 11 11 21 0 32-5 5-10 7-16 7s-11-2-16-7l-249.1-249c-11-11-11-21 0-32l249.1-249.1c21-21.1 53 10.9 32 32z' - }) - ); - } - - return LeftArrow; -}(); - -LeftArrow.defaultProps = { - viewBox: '0 0 1000 1000' -}; -exports["default"] = LeftArrow; - -/***/ }), - -/***/ 4921: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var RightArrow = function () { - function RightArrow(props) { - return _react2['default'].createElement( - 'svg', - props, - _react2['default'].createElement('path', { - d: 'M694.4 242.4l249.1 249.1c11 11 11 21 0 32L694.4 772.7c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210.1-210.1H67.1c-13 0-23-10-23-23s10-23 23-23h805.4L662.4 274.5c-21-21.1 11-53.1 32-32.1z' - }) - ); - } - - return RightArrow; -}(); - -RightArrow.defaultProps = { - viewBox: '0 0 1000 1000' -}; -exports["default"] = RightArrow; - -/***/ }), - -/***/ 257: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var DISPLAY_FORMAT = exports.DISPLAY_FORMAT = 'L'; -var ISO_FORMAT = exports.ISO_FORMAT = 'YYYY-MM-DD'; -var ISO_MONTH_FORMAT = exports.ISO_MONTH_FORMAT = 'YYYY-MM'; - -var START_DATE = exports.START_DATE = 'startDate'; -var END_DATE = exports.END_DATE = 'endDate'; - -var HORIZONTAL_ORIENTATION = exports.HORIZONTAL_ORIENTATION = 'horizontal'; -var VERTICAL_ORIENTATION = exports.VERTICAL_ORIENTATION = 'vertical'; -var VERTICAL_SCROLLABLE = exports.VERTICAL_SCROLLABLE = 'verticalScrollable'; - -var ICON_BEFORE_POSITION = exports.ICON_BEFORE_POSITION = 'before'; -var ICON_AFTER_POSITION = exports.ICON_AFTER_POSITION = 'after'; - -var INFO_POSITION_TOP = exports.INFO_POSITION_TOP = 'top'; -var INFO_POSITION_BOTTOM = exports.INFO_POSITION_BOTTOM = 'bottom'; -var INFO_POSITION_BEFORE = exports.INFO_POSITION_BEFORE = 'before'; -var INFO_POSITION_AFTER = exports.INFO_POSITION_AFTER = 'after'; - -var ANCHOR_LEFT = exports.ANCHOR_LEFT = 'left'; -var ANCHOR_RIGHT = exports.ANCHOR_RIGHT = 'right'; - -var OPEN_DOWN = exports.OPEN_DOWN = 'down'; -var OPEN_UP = exports.OPEN_UP = 'up'; - -var DAY_SIZE = exports.DAY_SIZE = 39; -var BLOCKED_MODIFIER = exports.BLOCKED_MODIFIER = 'blocked'; -var WEEKDAYS = exports.WEEKDAYS = [0, 1, 2, 3, 4, 5, 6]; - -var FANG_WIDTH_PX = exports.FANG_WIDTH_PX = 20; -var FANG_HEIGHT_PX = exports.FANG_HEIGHT_PX = 10; -var DEFAULT_VERTICAL_SPACING = exports.DEFAULT_VERTICAL_SPACING = 22; - -var MODIFIER_KEY_NAMES = exports.MODIFIER_KEY_NAMES = new Set(['Shift', 'Control', 'Alt', 'Meta']); - -/***/ }), - -/***/ 6030: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var calendarLabel = 'Calendar'; -var closeDatePicker = 'Close'; -var focusStartDate = 'Interact with the calendar and add the check-in date for your trip.'; -var clearDate = 'Clear Date'; -var clearDates = 'Clear Dates'; -var jumpToPrevMonth = 'Move backward to switch to the previous month.'; -var jumpToNextMonth = 'Move forward to switch to the next month.'; -var keyboardShortcuts = 'Keyboard Shortcuts'; -var showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.'; -var hideKeyboardShortcutsPanel = 'Close the shortcuts panel.'; -var openThisPanel = 'Open this panel.'; -var enterKey = 'Enter key'; -var leftArrowRightArrow = 'Right and left arrow keys'; -var upArrowDownArrow = 'up and down arrow keys'; -var pageUpPageDown = 'page up and page down keys'; -var homeEnd = 'Home and end keys'; -var escape = 'Escape key'; -var questionMark = 'Question mark'; -var selectFocusedDate = 'Select the date in focus.'; -var moveFocusByOneDay = 'Move backward (left) and forward (right) by one day.'; -var moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.'; -var moveFocusByOneMonth = 'Switch months.'; -var moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.'; -var returnFocusToInput = 'Return to the date input field.'; -var keyboardNavigationInstructions = 'Press the down arrow key to interact with the calendar and\n select a date. Press the question mark key to get the keyboard shortcuts for changing dates.'; - -var chooseAvailableStartDate = function chooseAvailableStartDate(_ref) { - var date = _ref.date; - return 'Choose ' + String(date) + ' as your check-in date. It\u2019s available.'; -}; -var chooseAvailableEndDate = function chooseAvailableEndDate(_ref2) { - var date = _ref2.date; - return 'Choose ' + String(date) + ' as your check-out date. It\u2019s available.'; -}; -var chooseAvailableDate = function chooseAvailableDate(_ref3) { - var date = _ref3.date; - return date; -}; -var dateIsUnavailable = function dateIsUnavailable(_ref4) { - var date = _ref4.date; - return 'Not available. ' + String(date); -}; -var dateIsSelected = function dateIsSelected(_ref5) { - var date = _ref5.date; - return 'Selected. ' + String(date); -}; - -exports["default"] = { - calendarLabel: calendarLabel, - closeDatePicker: closeDatePicker, - focusStartDate: focusStartDate, - clearDate: clearDate, - clearDates: clearDates, - jumpToPrevMonth: jumpToPrevMonth, - jumpToNextMonth: jumpToNextMonth, - keyboardShortcuts: keyboardShortcuts, - showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, - hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, - openThisPanel: openThisPanel, - enterKey: enterKey, - leftArrowRightArrow: leftArrowRightArrow, - upArrowDownArrow: upArrowDownArrow, - pageUpPageDown: pageUpPageDown, - homeEnd: homeEnd, - escape: escape, - questionMark: questionMark, - selectFocusedDate: selectFocusedDate, - moveFocusByOneDay: moveFocusByOneDay, - moveFocusByOneWeek: moveFocusByOneWeek, - moveFocusByOneMonth: moveFocusByOneMonth, - moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, - returnFocusToInput: returnFocusToInput, - keyboardNavigationInstructions: keyboardNavigationInstructions, - - chooseAvailableStartDate: chooseAvailableStartDate, - chooseAvailableEndDate: chooseAvailableEndDate, - dateIsUnavailable: dateIsUnavailable, - dateIsSelected: dateIsSelected -}; -var DateRangePickerPhrases = exports.DateRangePickerPhrases = { - calendarLabel: calendarLabel, - closeDatePicker: closeDatePicker, - clearDates: clearDates, - focusStartDate: focusStartDate, - jumpToPrevMonth: jumpToPrevMonth, - jumpToNextMonth: jumpToNextMonth, - keyboardShortcuts: keyboardShortcuts, - showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, - hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, - openThisPanel: openThisPanel, - enterKey: enterKey, - leftArrowRightArrow: leftArrowRightArrow, - upArrowDownArrow: upArrowDownArrow, - pageUpPageDown: pageUpPageDown, - homeEnd: homeEnd, - escape: escape, - questionMark: questionMark, - selectFocusedDate: selectFocusedDate, - moveFocusByOneDay: moveFocusByOneDay, - moveFocusByOneWeek: moveFocusByOneWeek, - moveFocusByOneMonth: moveFocusByOneMonth, - moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, - returnFocusToInput: returnFocusToInput, - keyboardNavigationInstructions: keyboardNavigationInstructions, - chooseAvailableStartDate: chooseAvailableStartDate, - chooseAvailableEndDate: chooseAvailableEndDate, - dateIsUnavailable: dateIsUnavailable, - dateIsSelected: dateIsSelected -}; - -var DateRangePickerInputPhrases = exports.DateRangePickerInputPhrases = { - focusStartDate: focusStartDate, - clearDates: clearDates, - keyboardNavigationInstructions: keyboardNavigationInstructions -}; - -var SingleDatePickerPhrases = exports.SingleDatePickerPhrases = { - calendarLabel: calendarLabel, - closeDatePicker: closeDatePicker, - clearDate: clearDate, - jumpToPrevMonth: jumpToPrevMonth, - jumpToNextMonth: jumpToNextMonth, - keyboardShortcuts: keyboardShortcuts, - showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, - hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, - openThisPanel: openThisPanel, - enterKey: enterKey, - leftArrowRightArrow: leftArrowRightArrow, - upArrowDownArrow: upArrowDownArrow, - pageUpPageDown: pageUpPageDown, - homeEnd: homeEnd, - escape: escape, - questionMark: questionMark, - selectFocusedDate: selectFocusedDate, - moveFocusByOneDay: moveFocusByOneDay, - moveFocusByOneWeek: moveFocusByOneWeek, - moveFocusByOneMonth: moveFocusByOneMonth, - moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, - returnFocusToInput: returnFocusToInput, - keyboardNavigationInstructions: keyboardNavigationInstructions, - chooseAvailableDate: chooseAvailableDate, - dateIsUnavailable: dateIsUnavailable, - dateIsSelected: dateIsSelected -}; - -var SingleDatePickerInputPhrases = exports.SingleDatePickerInputPhrases = { - clearDate: clearDate, - keyboardNavigationInstructions: keyboardNavigationInstructions -}; - -var DayPickerPhrases = exports.DayPickerPhrases = { - calendarLabel: calendarLabel, - jumpToPrevMonth: jumpToPrevMonth, - jumpToNextMonth: jumpToNextMonth, - keyboardShortcuts: keyboardShortcuts, - showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, - hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, - openThisPanel: openThisPanel, - enterKey: enterKey, - leftArrowRightArrow: leftArrowRightArrow, - upArrowDownArrow: upArrowDownArrow, - pageUpPageDown: pageUpPageDown, - homeEnd: homeEnd, - escape: escape, - questionMark: questionMark, - selectFocusedDate: selectFocusedDate, - moveFocusByOneDay: moveFocusByOneDay, - moveFocusByOneWeek: moveFocusByOneWeek, - moveFocusByOneMonth: moveFocusByOneMonth, - moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, - returnFocusToInput: returnFocusToInput, - chooseAvailableStartDate: chooseAvailableStartDate, - chooseAvailableEndDate: chooseAvailableEndDate, - chooseAvailableDate: chooseAvailableDate, - dateIsUnavailable: dateIsUnavailable, - dateIsSelected: dateIsSelected -}; - -var DayPickerKeyboardShortcutsPhrases = exports.DayPickerKeyboardShortcutsPhrases = { - keyboardShortcuts: keyboardShortcuts, - showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, - hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, - openThisPanel: openThisPanel, - enterKey: enterKey, - leftArrowRightArrow: leftArrowRightArrow, - upArrowDownArrow: upArrowDownArrow, - pageUpPageDown: pageUpPageDown, - homeEnd: homeEnd, - escape: escape, - questionMark: questionMark, - selectFocusedDate: selectFocusedDate, - moveFocusByOneDay: moveFocusByOneDay, - moveFocusByOneWeek: moveFocusByOneWeek, - moveFocusByOneMonth: moveFocusByOneMonth, - moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, - returnFocusToInput: returnFocusToInput -}; - -var DayPickerNavigationPhrases = exports.DayPickerNavigationPhrases = { - jumpToPrevMonth: jumpToPrevMonth, - jumpToNextMonth: jumpToNextMonth -}; - -var CalendarDayPhrases = exports.CalendarDayPhrases = { - chooseAvailableDate: chooseAvailableDate, - dateIsUnavailable: dateIsUnavailable, - dateIsSelected: dateIsSelected -}; - -/***/ }), - -/***/ 17: -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var _registerCSSInterfaceWithDefaultTheme = __webpack_require__(9305); - -var _registerCSSInterfaceWithDefaultTheme2 = _interopRequireDefault(_registerCSSInterfaceWithDefaultTheme); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -(0, _registerCSSInterfaceWithDefaultTheme2['default'])(); - -/***/ }), - -/***/ 8182: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -exports["default"] = _propTypes2['default'].oneOf([_constants.INFO_POSITION_TOP, _constants.INFO_POSITION_BOTTOM, _constants.INFO_POSITION_BEFORE, _constants.INFO_POSITION_AFTER]); - -/***/ }), - -/***/ 243: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -exports["default"] = _propTypes2['default'].oneOf(_constants.WEEKDAYS); - -/***/ }), - -/***/ 6747: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -exports["default"] = (0, _airbnbPropTypes.and)([_propTypes2['default'].instanceOf(Set), function () { - function modifiers(props, propName) { - for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - rest[_key - 2] = arguments[_key]; - } - - var propValue = props[propName]; - - var firstError = void 0; - [].concat(_toConsumableArray(propValue)).some(function (v, i) { - var _PropTypes$string; - - var fakePropName = String(propName) + ': index ' + String(i); - firstError = (_PropTypes$string = _propTypes2['default'].string).isRequired.apply(_PropTypes$string, [_defineProperty({}, fakePropName, v), fakePropName].concat(rest)); - return firstError != null; - }); - return firstError == null ? null : firstError; - } - - return modifiers; -}()], 'Modifiers (Set of Strings)'); - -/***/ }), - -/***/ 6553: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -exports["default"] = _propTypes2['default'].oneOf([_constants.HORIZONTAL_ORIENTATION, _constants.VERTICAL_ORIENTATION, _constants.VERTICAL_SCROLLABLE]); - -/***/ }), - -/***/ 8158: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var core = { - white: '#fff', - gray: '#484848', - grayLight: '#82888a', - grayLighter: '#cacccd', - grayLightest: '#f2f2f2', - - borderMedium: '#c4c4c4', - border: '#dbdbdb', - borderLight: '#e4e7e7', - borderLighter: '#eceeee', - borderBright: '#f4f5f5', - - primary: '#00a699', - primaryShade_1: '#33dacd', - primaryShade_2: '#66e2da', - primaryShade_3: '#80e8e0', - primaryShade_4: '#b2f1ec', - primary_dark: '#008489', - - secondary: '#007a87', - - yellow: '#ffe8bc', - yellow_dark: '#ffce71' -}; - -exports["default"] = { - reactDates: { - zIndex: 0, - border: { - input: { - border: 0, - borderTop: 0, - borderRight: 0, - borderBottom: '2px solid transparent', - borderLeft: 0, - outlineFocused: 0, - borderFocused: 0, - borderTopFocused: 0, - borderLeftFocused: 0, - borderBottomFocused: '2px solid ' + String(core.primary_dark), - borderRightFocused: 0, - borderRadius: 0 - }, - pickerInput: { - borderWidth: 1, - borderStyle: 'solid', - borderRadius: 2 - } - }, - - color: { - core: core, - - disabled: core.grayLightest, - - background: core.white, - backgroundDark: '#f2f2f2', - backgroundFocused: core.white, - border: 'rgb(219, 219, 219)', - text: core.gray, - textDisabled: core.border, - textFocused: '#007a87', - placeholderText: '#757575', - - outside: { - backgroundColor: core.white, - backgroundColor_active: core.white, - backgroundColor_hover: core.white, - color: core.gray, - color_active: core.gray, - color_hover: core.gray - }, - - highlighted: { - backgroundColor: core.yellow, - backgroundColor_active: core.yellow_dark, - backgroundColor_hover: core.yellow_dark, - color: core.gray, - color_active: core.gray, - color_hover: core.gray - }, - - minimumNights: { - backgroundColor: core.white, - backgroundColor_active: core.white, - backgroundColor_hover: core.white, - borderColor: core.borderLighter, - color: core.grayLighter, - color_active: core.grayLighter, - color_hover: core.grayLighter - }, - - hoveredSpan: { - backgroundColor: core.primaryShade_4, - backgroundColor_active: core.primaryShade_3, - backgroundColor_hover: core.primaryShade_4, - borderColor: core.primaryShade_3, - borderColor_active: core.primaryShade_3, - borderColor_hover: core.primaryShade_3, - color: core.secondary, - color_active: core.secondary, - color_hover: core.secondary - }, - - selectedSpan: { - backgroundColor: core.primaryShade_2, - backgroundColor_active: core.primaryShade_1, - backgroundColor_hover: core.primaryShade_1, - borderColor: core.primaryShade_1, - borderColor_active: core.primary, - borderColor_hover: core.primary, - color: core.white, - color_active: core.white, - color_hover: core.white - }, - - selected: { - backgroundColor: core.primary, - backgroundColor_active: core.primary, - backgroundColor_hover: core.primary, - borderColor: core.primary, - borderColor_active: core.primary, - borderColor_hover: core.primary, - color: core.white, - color_active: core.white, - color_hover: core.white - }, - - blocked_calendar: { - backgroundColor: core.grayLighter, - backgroundColor_active: core.grayLighter, - backgroundColor_hover: core.grayLighter, - borderColor: core.grayLighter, - borderColor_active: core.grayLighter, - borderColor_hover: core.grayLighter, - color: core.grayLight, - color_active: core.grayLight, - color_hover: core.grayLight - }, - - blocked_out_of_range: { - backgroundColor: core.white, - backgroundColor_active: core.white, - backgroundColor_hover: core.white, - borderColor: core.borderLight, - borderColor_active: core.borderLight, - borderColor_hover: core.borderLight, - color: core.grayLighter, - color_active: core.grayLighter, - color_hover: core.grayLighter - } - }, - - spacing: { - dayPickerHorizontalPadding: 9, - captionPaddingTop: 22, - captionPaddingBottom: 37, - inputPadding: 0, - displayTextPaddingVertical: undefined, - displayTextPaddingTop: 11, - displayTextPaddingBottom: 9, - displayTextPaddingHorizontal: undefined, - displayTextPaddingLeft: 11, - displayTextPaddingRight: 11, - displayTextPaddingVertical_small: undefined, - displayTextPaddingTop_small: 7, - displayTextPaddingBottom_small: 5, - displayTextPaddingHorizontal_small: undefined, - displayTextPaddingLeft_small: 7, - displayTextPaddingRight_small: 7 - }, - - sizing: { - inputWidth: 130, - inputWidth_small: 97, - arrowWidth: 24 - }, - - noScrollBarOnVerticalScrollable: false, - - font: { - size: 14, - captionSize: 18, - input: { - size: 19, - lineHeight: '24px', - size_small: 15, - lineHeight_small: '18px', - letterSpacing_small: '0.2px', - styleDisabled: 'italic' - } - } - } -}; - -/***/ }), - -/***/ 8607: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = calculateDimension; -function calculateDimension(el, axis) { - var borderBox = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var withMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - - if (!el) { - return 0; - } - - var axisStart = axis === 'width' ? 'Left' : 'Top'; - var axisEnd = axis === 'width' ? 'Right' : 'Bottom'; - - // Only read styles if we need to - var style = !borderBox || withMargin ? window.getComputedStyle(el) : null; - - // Offset includes border and padding - var offsetWidth = el.offsetWidth, - offsetHeight = el.offsetHeight; - - var size = axis === 'width' ? offsetWidth : offsetHeight; - - // Get the inner size - if (!borderBox) { - size -= parseFloat(style['padding' + axisStart]) + parseFloat(style['padding' + axisEnd]) + parseFloat(style['border' + axisStart + 'Width']) + parseFloat(style['border' + axisEnd + 'Width']); - } - - // Apply margin - if (withMargin) { - size += parseFloat(style['margin' + axisStart]) + parseFloat(style['margin' + axisEnd]); - } - - return size; -} - -/***/ }), - -/***/ 5814: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getActiveElement; -function getActiveElement() { - return typeof document !== 'undefined' && document.activeElement; -} - -/***/ }), - -/***/ 7475: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getCalendarDaySettings; - -var _getPhrase = __webpack_require__(7098); - -var _getPhrase2 = _interopRequireDefault(_getPhrase); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function getCalendarDaySettings(day, ariaLabelFormat, daySize, modifiers, phrases) { - var chooseAvailableDate = phrases.chooseAvailableDate, - dateIsUnavailable = phrases.dateIsUnavailable, - dateIsSelected = phrases.dateIsSelected; - - - var daySizeStyles = { - width: daySize, - height: daySize - 1 - }; - - var useDefaultCursor = modifiers.has('blocked-minimum-nights') || modifiers.has('blocked-calendar') || modifiers.has('blocked-out-of-range'); - - var selected = modifiers.has('selected') || modifiers.has('selected-start') || modifiers.has('selected-end'); - - var hoveredSpan = !selected && (modifiers.has('hovered-span') || modifiers.has('after-hovered-start')); - - var isOutsideRange = modifiers.has('blocked-out-of-range'); - - var formattedDate = { date: day.format(ariaLabelFormat) }; - - var ariaLabel = (0, _getPhrase2['default'])(chooseAvailableDate, formattedDate); - if (modifiers.has(_constants.BLOCKED_MODIFIER)) { - ariaLabel = (0, _getPhrase2['default'])(dateIsUnavailable, formattedDate); - } else if (selected) { - ariaLabel = (0, _getPhrase2['default'])(dateIsSelected, formattedDate); - } - - return { - daySizeStyles: daySizeStyles, - useDefaultCursor: useDefaultCursor, - selected: selected, - hoveredSpan: hoveredSpan, - isOutsideRange: isOutsideRange, - ariaLabel: ariaLabel - }; -} - -/***/ }), - -/***/ 5644: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getCalendarMonthWeeks; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function getCalendarMonthWeeks(month, enableOutsideDays) { - var firstDayOfWeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _moment2['default'].localeData().firstDayOfWeek(); - - if (!_moment2['default'].isMoment(month) || !month.isValid()) { - throw new TypeError('`month` must be a valid moment object'); - } - if (_constants.WEEKDAYS.indexOf(firstDayOfWeek) === -1) { - throw new TypeError('`firstDayOfWeek` must be an integer between 0 and 6'); - } - - // set utc offset to get correct dates in future (when timezone changes) - var firstOfMonth = month.clone().startOf('month').hour(12); - var lastOfMonth = month.clone().endOf('month').hour(12); - - // calculate the exact first and last days to fill the entire matrix - // (considering days outside month) - var prevDays = (firstOfMonth.day() + 7 - firstDayOfWeek) % 7; - var nextDays = (firstDayOfWeek + 6 - lastOfMonth.day()) % 7; - var firstDay = firstOfMonth.clone().subtract(prevDays, 'day'); - var lastDay = lastOfMonth.clone().add(nextDays, 'day'); - - var totalDays = lastDay.diff(firstDay, 'days') + 1; - - var currentDay = firstDay.clone(); - var weeksInMonth = []; - - for (var i = 0; i < totalDays; i += 1) { - if (i % 7 === 0) { - weeksInMonth.push([]); - } - - var day = null; - if (i >= prevDays && i < totalDays - nextDays || enableOutsideDays) { - day = currentDay.clone(); - } - - weeksInMonth[weeksInMonth.length - 1].push(day); - - currentDay.add(1, 'day'); - } - - return weeksInMonth; -} - -/***/ }), - -/***/ 8964: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getCalendarMonthWidth; -function getCalendarMonthWidth(daySize, calendarMonthPadding) { - return 7 * daySize + 2 * calendarMonthPadding + 1; -} - -/***/ }), - -/***/ 4112: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getNumberOfCalendarMonthWeeks; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function getBlankDaysBeforeFirstDay(firstDayOfMonth, firstDayOfWeek) { - var weekDayDiff = firstDayOfMonth.day() - firstDayOfWeek; - return (weekDayDiff + 7) % 7; -} - -function getNumberOfCalendarMonthWeeks(month) { - var firstDayOfWeek = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _moment2['default'].localeData().firstDayOfWeek(); - - var firstDayOfMonth = month.clone().startOf('month'); - var numBlankDays = getBlankDaysBeforeFirstDay(firstDayOfMonth, firstDayOfWeek); - return Math.ceil((numBlankDays + month.daysInMonth()) / 7); -} - -/***/ }), - -/***/ 7098: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getPhrase; -function getPhrase(phrase, args) { - if (typeof phrase === 'string') return phrase; - - if (typeof phrase === 'function') { - return phrase(args); - } - - return ''; -} - -/***/ }), - -/***/ 2893: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getPhrasePropTypes; - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -function getPhrasePropTypes(defaultPhrases) { - return Object.keys(defaultPhrases).reduce(function (phrases, key) { - return (0, _object2['default'])({}, phrases, _defineProperty({}, key, _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].func, _propTypes2['default'].node]))); - }, {}); -} - -/***/ }), - -/***/ 8304: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getTransformStyles; -function getTransformStyles(transformValue) { - return { - transform: transformValue, - msTransform: transformValue, - MozTransform: transformValue, - WebkitTransform: transformValue - }; -} - -/***/ }), - -/***/ 3268: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getVisibleDays; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _toISOMonthString = __webpack_require__(2705); - -var _toISOMonthString2 = _interopRequireDefault(_toISOMonthString); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function getVisibleDays(month, numberOfMonths, enableOutsideDays, withoutTransitionMonths) { - if (!_moment2['default'].isMoment(month)) return {}; - - var visibleDaysByMonth = {}; - var currentMonth = withoutTransitionMonths ? month.clone() : month.clone().subtract(1, 'month'); - for (var i = 0; i < (withoutTransitionMonths ? numberOfMonths : numberOfMonths + 2); i += 1) { - var visibleDays = []; - - // set utc offset to get correct dates in future (when timezone changes) - var baseDate = currentMonth.clone(); - var firstOfMonth = baseDate.clone().startOf('month').hour(12); - var lastOfMonth = baseDate.clone().endOf('month').hour(12); - - var currentDay = firstOfMonth.clone(); - - // days belonging to the previous month - if (enableOutsideDays) { - for (var j = 0; j < currentDay.weekday(); j += 1) { - var prevDay = currentDay.clone().subtract(j + 1, 'day'); - visibleDays.unshift(prevDay); - } - } - - while (currentDay < lastOfMonth) { - visibleDays.push(currentDay.clone()); - currentDay.add(1, 'day'); - } - - if (enableOutsideDays) { - // weekday() returns the index of the day of the week according to the locale - // this means if the week starts on Monday, weekday() will return 0 for a Monday date, not 1 - if (currentDay.weekday() !== 0) { - // days belonging to the next month - for (var k = currentDay.weekday(), count = 0; k < 7; k += 1, count += 1) { - var nextDay = currentDay.clone().add(count, 'day'); - visibleDays.push(nextDay); - } - } - } - - visibleDaysByMonth[(0, _toISOMonthString2['default'])(currentMonth)] = visibleDays; - currentMonth = currentMonth.clone().add(1, 'month'); - } - - return visibleDaysByMonth; -} - -/***/ }), - -/***/ 7365: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isAfterDay; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _isBeforeDay = __webpack_require__(862); - -var _isBeforeDay2 = _interopRequireDefault(_isBeforeDay); - -var _isSameDay = __webpack_require__(3923); - -var _isSameDay2 = _interopRequireDefault(_isSameDay); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function isAfterDay(a, b) { - if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false; - return !(0, _isBeforeDay2['default'])(a, b) && !(0, _isSameDay2['default'])(a, b); -} - -/***/ }), - -/***/ 862: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isBeforeDay; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function isBeforeDay(a, b) { - if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false; - - var aYear = a.year(); - var aMonth = a.month(); - - var bYear = b.year(); - var bMonth = b.month(); - - var isSameYear = aYear === bYear; - var isSameMonth = aMonth === bMonth; - - if (isSameYear && isSameMonth) return a.date() < b.date(); - if (isSameYear) return aMonth < bMonth; - return aYear < bYear; -} - -/***/ }), - -/***/ 5713: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isDayVisible; - -var _isBeforeDay = __webpack_require__(862); - -var _isBeforeDay2 = _interopRequireDefault(_isBeforeDay); - -var _isAfterDay = __webpack_require__(7365); - -var _isAfterDay2 = _interopRequireDefault(_isAfterDay); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function isDayVisible(day, month, numberOfMonths, enableOutsideDays) { - var firstDayOfFirstMonth = month.clone().startOf('month'); - if (enableOutsideDays) firstDayOfFirstMonth = firstDayOfFirstMonth.startOf('week'); - if ((0, _isBeforeDay2['default'])(day, firstDayOfFirstMonth)) return false; - - var lastDayOfLastMonth = month.clone().add(numberOfMonths - 1, 'months').endOf('month'); - if (enableOutsideDays) lastDayOfLastMonth = lastDayOfLastMonth.endOf('week'); - return !(0, _isAfterDay2['default'])(day, lastDayOfLastMonth); -} - -/***/ }), - -/***/ 1310: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isNextMonth; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _isSameMonth = __webpack_require__(4669); - -var _isSameMonth2 = _interopRequireDefault(_isSameMonth); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function isNextMonth(a, b) { - if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false; - return (0, _isSameMonth2['default'])(a.clone().add(1, 'month'), b); -} - -/***/ }), - -/***/ 3858: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isPrevMonth; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _isSameMonth = __webpack_require__(4669); - -var _isSameMonth2 = _interopRequireDefault(_isSameMonth); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function isPrevMonth(a, b) { - if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false; - return (0, _isSameMonth2['default'])(a.clone().subtract(1, 'month'), b); -} - -/***/ }), - -/***/ 3923: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isSameDay; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function isSameDay(a, b) { - if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false; - // Compare least significant, most likely to change units first - // Moment's isSame clones moment inputs and is a tad slow - return a.date() === b.date() && a.month() === b.month() && a.year() === b.year(); -} - -/***/ }), - -/***/ 4669: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isSameMonth; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function isSameMonth(a, b) { - if (!_moment2['default'].isMoment(a) || !_moment2['default'].isMoment(b)) return false; - // Compare least significant, most likely to change units first - // Moment's isSame clones moment inputs and is a tad slow - return a.month() === b.month() && a.year() === b.year(); -} - -/***/ }), - -/***/ 7978: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = isTransitionEndSupported; -function isTransitionEndSupported() { - return !!(typeof window !== 'undefined' && 'TransitionEvent' in window); -} - -/***/ }), - -/***/ 9305: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = registerCSSInterfaceWithDefaultTheme; - -var _reactWithStylesInterfaceCss = __webpack_require__(5553); - -var _reactWithStylesInterfaceCss2 = _interopRequireDefault(_reactWithStylesInterfaceCss); - -var _registerInterfaceWithDefaultTheme = __webpack_require__(1980); - -var _registerInterfaceWithDefaultTheme2 = _interopRequireDefault(_registerInterfaceWithDefaultTheme); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function registerCSSInterfaceWithDefaultTheme() { - (0, _registerInterfaceWithDefaultTheme2['default'])(_reactWithStylesInterfaceCss2['default']); -} - -/***/ }), - -/***/ 1980: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = registerInterfaceWithDefaultTheme; - -var _ThemedStyleSheet = __webpack_require__(9349); - -var _ThemedStyleSheet2 = _interopRequireDefault(_ThemedStyleSheet); - -var _DefaultTheme = __webpack_require__(8158); - -var _DefaultTheme2 = _interopRequireDefault(_DefaultTheme); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function registerInterfaceWithDefaultTheme(reactWithStylesInterface) { - _ThemedStyleSheet2['default'].registerInterface(reactWithStylesInterface); - _ThemedStyleSheet2['default'].registerTheme(_DefaultTheme2['default']); -} - -/***/ }), - -/***/ 7310: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = toISODateString; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _toMomentObject = __webpack_require__(2008); - -var _toMomentObject2 = _interopRequireDefault(_toMomentObject); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function toISODateString(date, currentFormat) { - var dateObj = _moment2['default'].isMoment(date) ? date : (0, _toMomentObject2['default'])(date, currentFormat); - if (!dateObj) return null; - - return dateObj.format(_constants.ISO_FORMAT); -} - -/***/ }), - -/***/ 2705: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = toISOMonthString; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _toMomentObject = __webpack_require__(2008); - -var _toMomentObject2 = _interopRequireDefault(_toMomentObject); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function toISOMonthString(date, currentFormat) { - var dateObj = _moment2['default'].isMoment(date) ? date : (0, _toMomentObject2['default'])(date, currentFormat); - if (!dateObj) return null; - - return dateObj.format(_constants.ISO_MONTH_FORMAT); -} - -/***/ }), - -/***/ 2008: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = toMomentObject; - -var _moment = __webpack_require__(6292); - -var _moment2 = _interopRequireDefault(_moment); - -var _constants = __webpack_require__(257); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function toMomentObject(dateString, customFormat) { - var dateFormats = customFormat ? [customFormat, _constants.DISPLAY_FORMAT, _constants.ISO_FORMAT] : [_constants.DISPLAY_FORMAT, _constants.ISO_FORMAT]; - - var date = (0, _moment2['default'])(dateString, dateFormats, true); - return date.isValid() ? date.hour(12) : null; -} - -/***/ }), - -/***/ 4821: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; -/** @license React v16.13.1 - * react-is.production.min.js +/** + * @license React + * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - -var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? -Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; -function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; -exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; -exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; -exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; +var e=__webpack_require__(1609);function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d} +function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u; /***/ }), -/***/ 338: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ 422: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { - module.exports = __webpack_require__(4821); + module.exports = __webpack_require__(8477); } else {} /***/ }), -/***/ 9217: -/***/ (function(module) { - -var messages = { - invalidPredicate: '`predicate` must be a function', - invalidPropValidator: '`propValidator` must be a function', - requiredCore: 'is marked as required', - invalidTypeCore: 'Invalid input type', - predicateFailureCore: 'Failed to succeed with predicate', - anonymousMessage: '<>', - baseInvalidMessage: 'Invalid ', -}; - -function constructPropValidatorVariations(propValidator) { - if (typeof propValidator !== 'function') { - throw new Error(messages.invalidPropValidator); - } - - var requiredPropValidator = propValidator.bind(null, false, null); - requiredPropValidator.isRequired = propValidator.bind(null, true, null); - - requiredPropValidator.withPredicate = function predicateApplication(predicate) { - if (typeof predicate !== 'function') { - throw new Error(messages.invalidPredicate); - } - var basePropValidator = propValidator.bind(null, false, predicate); - basePropValidator.isRequired = propValidator.bind(null, true, predicate); - return basePropValidator; - }; - - return requiredPropValidator; -} - -function createInvalidRequiredErrorMessage(propName, componentName, value) { - return new Error( - 'The prop `' + propName + '` ' + messages.requiredCore + - ' in `' + componentName + '`, but its value is `' + value + '`.' - ); -} - -var independentGuardianValue = -1; - -function preValidationRequireCheck(isRequired, componentName, propFullName, propValue) { - var isPropValueUndefined = typeof propValue === 'undefined'; - var isPropValueNull = propValue === null; - - if (isRequired) { - if (isPropValueUndefined) { - return createInvalidRequiredErrorMessage(propFullName, componentName, 'undefined'); - } else if (isPropValueNull) { - return createInvalidRequiredErrorMessage(propFullName, componentName, 'null'); - } - } - - if (isPropValueUndefined || isPropValueNull) { - return null; - } - - return independentGuardianValue; -} - -function createMomentChecker(type, typeValidator, validator, momentType) { - - function propValidator( - isRequired, // Bound parameter to indicate with the propType is required - predicate, // Bound parameter to allow user to add dynamic validation - props, - propName, - componentName, - location, - propFullName - ) { - var propValue = props[ propName ]; - var propType = typeof propValue; - - componentName = componentName || messages.anonymousMessage; - propFullName = propFullName || propName; - - var preValidationRequireCheckValue = preValidationRequireCheck( - isRequired, componentName, propFullName, propValue - ); - - if (preValidationRequireCheckValue !== independentGuardianValue) { - return preValidationRequireCheckValue; - } - - if (typeValidator && !typeValidator(propValue)) { - return new Error( - messages.invalidTypeCore + ': `' + propName + '` of type `' + propType + '` ' + - 'supplied to `' + componentName + '`, expected `' + type + '`.' - ); - } - - if (!validator(propValue)) { - return new Error( - messages.baseInvalidMessage + location + ' `' + propName + '` of type `' + propType + '` ' + - 'supplied to `' + componentName + '`, expected `' + momentType + '`.' - ); - } - - if (predicate && !predicate(propValue)) { - var predicateName = predicate.name || messages.anonymousMessage; - return new Error( - messages.baseInvalidMessage + location + ' `' + propName + '` of type `' + propType + '` ' + - 'supplied to `' + componentName + '`. ' + messages.predicateFailureCore + ' `' + - predicateName + '`.' - ); - } - - return null; - - } - - return constructPropValidatorVariations(propValidator); - -} - -module.exports = { - constructPropValidatorVariations: constructPropValidatorVariations, - createMomentChecker: createMomentChecker, - messages: messages, -}; - - -/***/ }), - -/***/ 6150: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var moment = __webpack_require__(6292); -var momentValidationWrapper = __webpack_require__(3416); -var core = __webpack_require__(9217); - -module.exports = { - - momentObj : core.createMomentChecker( - 'object', - function(obj) { - return typeof obj === 'object'; - }, - function isValid(value) { - return momentValidationWrapper.isValidMoment(value); - }, - 'Moment' - ), - - momentString : core.createMomentChecker( - 'string', - function(str) { - return typeof str === 'string'; - }, - function isValid(value) { - return momentValidationWrapper.isValidMoment(moment(value)); - }, - 'Moment' - ), - - momentDurationObj : core.createMomentChecker( - 'object', - function(obj) { - return typeof obj === 'object'; - }, - function isValid(value) { - return moment.isDuration(value); - }, - 'Duration' - ), - -}; - - -/***/ }), - -/***/ 3416: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var moment = __webpack_require__(6292); - -function isValidMoment(testMoment) { - if (typeof moment.isMoment === 'function' && !moment.isMoment(testMoment)) { - return false; - } - - /* istanbul ignore else */ - if (typeof testMoment.isValid === 'function') { - // moment 1.7.0+ - return testMoment.isValid(); - } - - /* istanbul ignore next */ - return !isNaN(testMoment); -} - -module.exports = { - isValidMoment : isValidMoment, -}; - - -/***/ }), - -/***/ 2239: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _airbnbPropTypes = __webpack_require__(4882); - -var _consolidatedEvents = __webpack_require__(8495); - -var _object = __webpack_require__(5861); - -var _object2 = _interopRequireDefault(_object); - -var _document = __webpack_require__(6789); - -var _document2 = _interopRequireDefault(_document); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -var DISPLAY = { - BLOCK: 'block', - FLEX: 'flex', - INLINE: 'inline', - INLINE_BLOCK: 'inline-block', - CONTENTS: 'contents' -}; - -var propTypes = (0, _airbnbPropTypes.forbidExtraProps)({ - children: _propTypes2['default'].node.isRequired, - onOutsideClick: _propTypes2['default'].func.isRequired, - disabled: _propTypes2['default'].bool, - useCapture: _propTypes2['default'].bool, - display: _propTypes2['default'].oneOf((0, _object2['default'])(DISPLAY)) -}); - -var defaultProps = { - disabled: false, - - // `useCapture` is set to true by default so that a `stopPropagation` in the - // children will not prevent all outside click handlers from firing - maja - useCapture: true, - display: DISPLAY.BLOCK -}; - -var OutsideClickHandler = function (_React$Component) { - _inherits(OutsideClickHandler, _React$Component); - - function OutsideClickHandler() { - var _ref; - - _classCallCheck(this, OutsideClickHandler); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - var _this = _possibleConstructorReturn(this, (_ref = OutsideClickHandler.__proto__ || Object.getPrototypeOf(OutsideClickHandler)).call.apply(_ref, [this].concat(args))); - - _this.onMouseDown = _this.onMouseDown.bind(_this); - _this.onMouseUp = _this.onMouseUp.bind(_this); - _this.setChildNodeRef = _this.setChildNodeRef.bind(_this); - return _this; - } - - _createClass(OutsideClickHandler, [{ - key: 'componentDidMount', - value: function () { - function componentDidMount() { - var _props = this.props, - disabled = _props.disabled, - useCapture = _props.useCapture; - - - if (!disabled) this.addMouseDownEventListener(useCapture); - } - - return componentDidMount; - }() - }, { - key: 'componentDidUpdate', - value: function () { - function componentDidUpdate(_ref2) { - var prevDisabled = _ref2.disabled; - var _props2 = this.props, - disabled = _props2.disabled, - useCapture = _props2.useCapture; - - if (prevDisabled !== disabled) { - if (disabled) { - this.removeEventListeners(); - } else { - this.addMouseDownEventListener(useCapture); - } - } - } - - return componentDidUpdate; - }() - }, { - key: 'componentWillUnmount', - value: function () { - function componentWillUnmount() { - this.removeEventListeners(); - } - - return componentWillUnmount; - }() - - // Use mousedown/mouseup to enforce that clicks remain outside the root's - // descendant tree, even when dragged. This should also get triggered on - // touch devices. - - }, { - key: 'onMouseDown', - value: function () { - function onMouseDown(e) { - var useCapture = this.props.useCapture; - - - var isDescendantOfRoot = this.childNode && (0, _document2['default'])(this.childNode, e.target); - if (!isDescendantOfRoot) { - if (this.removeMouseUp) { - this.removeMouseUp(); - this.removeMouseUp = null; - } - this.removeMouseUp = (0, _consolidatedEvents.addEventListener)(document, 'mouseup', this.onMouseUp, { capture: useCapture }); - } - } - - return onMouseDown; - }() - - // Use mousedown/mouseup to enforce that clicks remain outside the root's - // descendant tree, even when dragged. This should also get triggered on - // touch devices. - - }, { - key: 'onMouseUp', - value: function () { - function onMouseUp(e) { - var onOutsideClick = this.props.onOutsideClick; - - - var isDescendantOfRoot = this.childNode && (0, _document2['default'])(this.childNode, e.target); - if (this.removeMouseUp) { - this.removeMouseUp(); - this.removeMouseUp = null; - } - - if (!isDescendantOfRoot) { - onOutsideClick(e); - } - } - - return onMouseUp; - }() - }, { - key: 'setChildNodeRef', - value: function () { - function setChildNodeRef(ref) { - this.childNode = ref; - } - - return setChildNodeRef; - }() - }, { - key: 'addMouseDownEventListener', - value: function () { - function addMouseDownEventListener(useCapture) { - this.removeMouseDown = (0, _consolidatedEvents.addEventListener)(document, 'mousedown', this.onMouseDown, { capture: useCapture }); - } - - return addMouseDownEventListener; - }() - }, { - key: 'removeEventListeners', - value: function () { - function removeEventListeners() { - if (this.removeMouseDown) this.removeMouseDown(); - if (this.removeMouseUp) this.removeMouseUp(); - } - - return removeEventListeners; - }() - }, { - key: 'render', - value: function () { - function render() { - var _props3 = this.props, - children = _props3.children, - display = _props3.display; - - - return _react2['default'].createElement( - 'div', - { - ref: this.setChildNodeRef, - style: display !== DISPLAY.BLOCK && (0, _object2['default'])(DISPLAY).includes(display) ? { display: display } : undefined - }, - children - ); - } - - return render; - }() - }]); - - return OutsideClickHandler; -}(_react2['default'].Component); - -exports["default"] = OutsideClickHandler; - - -OutsideClickHandler.propTypes = propTypes; -OutsideClickHandler.defaultProps = defaultProps; - -/***/ }), - -/***/ 6606: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -// eslint-disable-next-line import/no-unresolved -module.exports = __webpack_require__(2239); - - -/***/ }), - -/***/ 235: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -var e=__webpack_require__(9196),n={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},t=function(t){var r=t.onResize,u=e.useRef();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function u(){t();var e=r();e&&e.addEventListener("resize",t)}e.useEffect((function(){return r()?u():n.current&&n.current.addEventListener&&n.current.addEventListener("load",u),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(u,(function(){return r(u)})),e.createElement("iframe",{style:n,src:"about:blank",ref:u,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},r=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};module.exports=function(n){void 0===n&&(n=r);var u=e.useState(n(null)),o=u[0],i=u[1],c=e.useCallback((function(e){return i(n(e.current))}),[n]);return[e.useMemo((function(){return e.createElement(t,{onResize:c})}),[c]),o]}; - - -/***/ }), - -/***/ 5080: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var CHANNEL = exports.CHANNEL = '__direction__'; - -var DIRECTIONS = exports.DIRECTIONS = { - LTR: 'ltr', - RTL: 'rtl' -}; - -/***/ }), - -/***/ 6640: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -exports["default"] = _propTypes2['default'].shape({ - getState: _propTypes2['default'].func, - setState: _propTypes2['default'].func, - subscribe: _propTypes2['default'].func -}); - -/***/ }), - -/***/ 3688: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -var __webpack_unused_export__; -__webpack_unused_export__ = ({ - value: true -}); - -var _arrayPrototype = __webpack_require__(116); - -var _arrayPrototype2 = _interopRequireDefault(_arrayPrototype); - -var _globalCache = __webpack_require__(5371); - -var _globalCache2 = _interopRequireDefault(_globalCache); - -var _constants = __webpack_require__(6930); - -var _getClassName = __webpack_require__(1689); - -var _getClassName2 = _interopRequireDefault(_getClassName); - -var _separateStyles2 = __webpack_require__(1881); - -var _separateStyles3 = _interopRequireDefault(_separateStyles2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -/** - * Function required as part of the react-with-styles interface. Parses the styles provided by - * react-with-styles to produce class names based on the style name and optionally the namespace if - * available. - * - * stylesObject {Object} The styles object passed to withStyles. - * - * Return an object mapping style names to class names. - */ -function create(stylesObject) { - var stylesToClasses = {}; - var styleNames = Object.keys(stylesObject); - var sharedState = _globalCache2['default'].get(_constants.GLOBAL_CACHE_KEY) || {}; - var _sharedState$namespac = sharedState.namespace, - namespace = _sharedState$namespac === undefined ? '' : _sharedState$namespac; - - styleNames.forEach(function (styleName) { - var className = (0, _getClassName2['default'])(namespace, styleName); - stylesToClasses[styleName] = className; - }); - return stylesToClasses; -} - -/** - * Process styles to be consumed by a component. - * - * stylesArray {Array} Array of the following: values returned by create, plain JavaScript objects - * representing inline styles, or arrays thereof. - * - * Return an object with optional className and style properties to be spread on a component. - */ -function resolve(stylesArray) { - var flattenedStyles = (0, _arrayPrototype2['default'])(stylesArray, Infinity); - - var _separateStyles = (0, _separateStyles3['default'])(flattenedStyles), - classNames = _separateStyles.classNames, - hasInlineStyles = _separateStyles.hasInlineStyles, - inlineStyles = _separateStyles.inlineStyles; - - var specificClassNames = classNames.map(function (name, index) { - return String(name) + ' ' + String(name) + '_' + String(index + 1); - }); - var className = specificClassNames.join(' '); - - var result = { className: className }; - if (hasInlineStyles) result.style = inlineStyles; - return result; -} - -exports["default"] = { create: create, resolve: resolve }; - -/***/ }), - -/***/ 6930: -/***/ (function(__unused_webpack_module, exports) { - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var GLOBAL_CACHE_KEY = 'reactWithStylesInterfaceCSS'; -var MAX_SPECIFICITY = 20; - -exports.GLOBAL_CACHE_KEY = GLOBAL_CACHE_KEY; -exports.MAX_SPECIFICITY = MAX_SPECIFICITY; - -/***/ }), - -/***/ 1689: -/***/ (function(__unused_webpack_module, exports) { - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = getClassName; -/** - * Construct a class name. - * - * namespace {String} Used to construct unique class names. - * styleName {String} Name identifying the specific style. - * - * Return the class name. - */ -function getClassName(namespace, styleName) { - var namespaceSegment = namespace.length > 0 ? String(namespace) + '__' : ''; - return '' + namespaceSegment + String(styleName); -} - -/***/ }), - -/***/ 1881: -/***/ (function(__unused_webpack_module, exports) { - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -// This function takes an array of styles and separates them into styles that -// are handled by Aphrodite and inline styles. -function separateStyles(stylesArray) { - var classNames = []; - - // Since determining if an Object is empty requires collecting all of its - // keys, and we want the best performance in this code because we are in the - // render path, we are going to do a little bookkeeping ourselves. - var hasInlineStyles = false; - var inlineStyles = {}; - - // This is run on potentially every node in the tree when rendering, where - // performance is critical. Normally we would prefer using `forEach`, but - // old-fashioned for loops are faster so that's what we have chosen here. - for (var i = 0; i < stylesArray.length; i++) { - // eslint-disable-line no-plusplus - var style = stylesArray[i]; - - // If this style is falsy, we just want to disregard it. This allows for - // syntax like: - // - // css(isFoo && styles.foo) - if (style) { - if (typeof style === 'string') { - classNames.push(style); - } else { - Object.assign(inlineStyles, style); - hasInlineStyles = true; - } - } - } - - return { - classNames: classNames, - hasInlineStyles: hasInlineStyles, - inlineStyles: inlineStyles - }; -} - -exports["default"] = separateStyles; - -/***/ }), - -/***/ 5553: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -// eslint-disable-next-line import/no-unresolved -module.exports = __webpack_require__(3688)["default"]; - - -/***/ }), - -/***/ 9349: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -var styleInterface = void 0; -var styleTheme = void 0; - -var START_MARK = 'react-with-styles.resolve.start'; -var END_MARK = 'react-with-styles.resolve.end'; -var MEASURE_MARK = '\uD83D\uDC69\u200D\uD83C\uDFA8 [resolve]'; - -function registerTheme(theme) { - styleTheme = theme; -} - -function registerInterface(interfaceToRegister) { - styleInterface = interfaceToRegister; -} - -function create(makeFromTheme, createWithDirection) { - var styles = createWithDirection(makeFromTheme(styleTheme)); - return function () { - return styles; - }; -} - -function createLTR(makeFromTheme) { - return create(makeFromTheme, styleInterface.createLTR || styleInterface.create); -} - -function createRTL(makeFromTheme) { - return create(makeFromTheme, styleInterface.createRTL || styleInterface.create); -} - -function get() { - return styleTheme; -} - -function resolve() { - if (false) {} - - for (var _len = arguments.length, styles = Array(_len), _key = 0; _key < _len; _key++) { - styles[_key] = arguments[_key]; - } - - var result = styleInterface.resolve(styles); - - if (false) {} - - return result; -} - -function resolveLTR() { - for (var _len2 = arguments.length, styles = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - styles[_key2] = arguments[_key2]; - } - - if (styleInterface.resolveLTR) { - return styleInterface.resolveLTR(styles); - } - - return resolve(styles); -} - -function resolveRTL() { - for (var _len3 = arguments.length, styles = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { - styles[_key3] = arguments[_key3]; - } - - if (styleInterface.resolveRTL) { - return styleInterface.resolveRTL(styles); - } - - return resolve(styles); -} - -function flush() { - if (styleInterface.flush) { - styleInterface.flush(); - } -} - -exports["default"] = { - registerTheme: registerTheme, - registerInterface: registerInterface, - create: createLTR, - createLTR: createLTR, - createRTL: createRTL, - get: get, - resolve: resolveLTR, - resolveLTR: resolveLTR, - resolveRTL: resolveRTL, - flush: flush -}; - -/***/ }), - -/***/ 3576: -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports.withStylesPropTypes = exports.css = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -exports.withStyles = withStyles; - -var _object = __webpack_require__(4011); - -var _object2 = _interopRequireDefault(_object); - -var _react = __webpack_require__(9196); - -var _react2 = _interopRequireDefault(_react); - -var _propTypes = __webpack_require__(2652); - -var _propTypes2 = _interopRequireDefault(_propTypes); - -var _hoistNonReactStatics = __webpack_require__(1281); - -var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); - -var _constants = __webpack_require__(5080); - -var _brcast = __webpack_require__(6640); - -var _brcast2 = _interopRequireDefault(_brcast); - -var _ThemedStyleSheet = __webpack_require__(9349); - -var _ThemedStyleSheet2 = _interopRequireDefault(_ThemedStyleSheet); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /* eslint react/forbid-foreign-prop-types: off */ - -// Add some named exports to assist in upgrading and for convenience -var css = exports.css = _ThemedStyleSheet2['default'].resolveLTR; -var withStylesPropTypes = exports.withStylesPropTypes = { - styles: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types - theme: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types - css: _propTypes2['default'].func.isRequired -}; - -var EMPTY_STYLES = {}; -var EMPTY_STYLES_FN = function EMPTY_STYLES_FN() { - return EMPTY_STYLES; -}; - -var START_MARK = 'react-with-styles.createStyles.start'; -var END_MARK = 'react-with-styles.createStyles.end'; - -function baseClass(pureComponent) { - if (pureComponent) { - if (!_react2['default'].PureComponent) { - throw new ReferenceError('withStyles() pureComponent option requires React 15.3.0 or later'); - } - - return _react2['default'].PureComponent; - } - - return _react2['default'].Component; -} - -var contextTypes = _defineProperty({}, _constants.CHANNEL, _brcast2['default']); - -var defaultDirection = _constants.DIRECTIONS.LTR; - -function withStyles(styleFn) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$stylesPropName = _ref.stylesPropName, - stylesPropName = _ref$stylesPropName === undefined ? 'styles' : _ref$stylesPropName, - _ref$themePropName = _ref.themePropName, - themePropName = _ref$themePropName === undefined ? 'theme' : _ref$themePropName, - _ref$cssPropName = _ref.cssPropName, - cssPropName = _ref$cssPropName === undefined ? 'css' : _ref$cssPropName, - _ref$flushBefore = _ref.flushBefore, - flushBefore = _ref$flushBefore === undefined ? false : _ref$flushBefore, - _ref$pureComponent = _ref.pureComponent, - pureComponent = _ref$pureComponent === undefined ? false : _ref$pureComponent; - - var styleDefLTR = void 0; - var styleDefRTL = void 0; - var currentThemeLTR = void 0; - var currentThemeRTL = void 0; - var BaseClass = baseClass(pureComponent); - - function getResolveMethod(direction) { - return direction === _constants.DIRECTIONS.LTR ? _ThemedStyleSheet2['default'].resolveLTR : _ThemedStyleSheet2['default'].resolveRTL; - } - - function getCurrentTheme(direction) { - return direction === _constants.DIRECTIONS.LTR ? currentThemeLTR : currentThemeRTL; - } - - function getStyleDef(direction, wrappedComponentName) { - var currentTheme = getCurrentTheme(direction); - var styleDef = direction === _constants.DIRECTIONS.LTR ? styleDefLTR : styleDefRTL; - - var registeredTheme = _ThemedStyleSheet2['default'].get(); - - // Return the existing styles if they've already been defined - // and if the theme used to create them corresponds to the theme - // registered with ThemedStyleSheet - if (styleDef && currentTheme === registeredTheme) { - return styleDef; - } - - if (false) {} - - var isRTL = direction === _constants.DIRECTIONS.RTL; - - if (isRTL) { - styleDefRTL = styleFn ? _ThemedStyleSheet2['default'].createRTL(styleFn) : EMPTY_STYLES_FN; - - currentThemeRTL = registeredTheme; - styleDef = styleDefRTL; - } else { - styleDefLTR = styleFn ? _ThemedStyleSheet2['default'].createLTR(styleFn) : EMPTY_STYLES_FN; - - currentThemeLTR = registeredTheme; - styleDef = styleDefLTR; - } - - if (false) { var measureName; } - - return styleDef; - } - - function getState(direction, wrappedComponentName) { - return { - resolveMethod: getResolveMethod(direction), - styleDef: getStyleDef(direction, wrappedComponentName) - }; - } - - return function () { - function withStylesHOC(WrappedComponent) { - var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; - - // NOTE: Use a class here so components are ref-able if need be: - // eslint-disable-next-line react/prefer-stateless-function - - var WithStyles = function (_BaseClass) { - _inherits(WithStyles, _BaseClass); - - function WithStyles(props, context) { - _classCallCheck(this, WithStyles); - - var _this = _possibleConstructorReturn(this, (WithStyles.__proto__ || Object.getPrototypeOf(WithStyles)).call(this, props, context)); - - var direction = _this.context[_constants.CHANNEL] ? _this.context[_constants.CHANNEL].getState() : defaultDirection; - - _this.state = getState(direction, wrappedComponentName); - return _this; - } - - _createClass(WithStyles, [{ - key: 'componentDidMount', - value: function () { - function componentDidMount() { - var _this2 = this; - - if (this.context[_constants.CHANNEL]) { - // subscribe to future direction changes - this.channelUnsubscribe = this.context[_constants.CHANNEL].subscribe(function (direction) { - _this2.setState(getState(direction, wrappedComponentName)); - }); - } - } - - return componentDidMount; - }() - }, { - key: 'componentWillUnmount', - value: function () { - function componentWillUnmount() { - if (this.channelUnsubscribe) { - this.channelUnsubscribe(); - } - } - - return componentWillUnmount; - }() - }, { - key: 'render', - value: function () { - function render() { - var _ref2; - - // As some components will depend on previous styles in - // the component tree, we provide the option of flushing the - // buffered styles (i.e. to a style tag) **before** the rendering - // cycle begins. - // - // The interfaces provide the optional "flush" method which - // is run in turn by ThemedStyleSheet.flush. - if (flushBefore) { - _ThemedStyleSheet2['default'].flush(); - } - - var _state = this.state, - resolveMethod = _state.resolveMethod, - styleDef = _state.styleDef; - - - return _react2['default'].createElement(WrappedComponent, _extends({}, this.props, (_ref2 = {}, _defineProperty(_ref2, themePropName, _ThemedStyleSheet2['default'].get()), _defineProperty(_ref2, stylesPropName, styleDef()), _defineProperty(_ref2, cssPropName, resolveMethod), _ref2))); - } - - return render; - }() - }]); - - return WithStyles; - }(BaseClass); - - WithStyles.WrappedComponent = WrappedComponent; - WithStyles.displayName = 'withStyles(' + String(wrappedComponentName) + ')'; - WithStyles.contextTypes = contextTypes; - if (WrappedComponent.propTypes) { - WithStyles.propTypes = (0, _object2['default'])({}, WrappedComponent.propTypes); - delete WithStyles.propTypes[stylesPropName]; - delete WithStyles.propTypes[themePropName]; - delete WithStyles.propTypes[cssPropName]; - } - if (WrappedComponent.defaultProps) { - WithStyles.defaultProps = (0, _object2['default'])({}, WrappedComponent.defaultProps); - } - - return (0, _hoistNonReactStatics2['default'])(WithStyles, WrappedComponent); - } - - return withStylesHOC; - }(); -} - -/***/ }), - -/***/ 9196: -/***/ (function(module) { +/***/ 1609: +/***/ ((module) => { "use strict"; module.exports = window["React"]; -/***/ }), - -/***/ 6292: -/***/ (function(module) { - -"use strict"; -module.exports = window["moment"]; - -/***/ }), - -/***/ 4080: -/***/ (function() { - -/* (ignored) */ - -/***/ }), - -/***/ 3665: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $ArrayPrototype = GetIntrinsic('%Array.prototype%'); -var $RangeError = GetIntrinsic('%RangeError%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); -var $TypeError = GetIntrinsic('%TypeError%'); - -var IsIntegralNumber = __webpack_require__(485); - -var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1; - -var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || ( - // eslint-disable-next-line no-proto, no-negated-condition - [].__proto__ !== $ArrayPrototype - ? null - : function (O, proto) { - O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign - return O; - } -); - -// https://www.ecma-international.org/ecma-262/12.0/#sec-arraycreate - -module.exports = function ArrayCreate(length) { - if (!IsIntegralNumber(length) || length < 0) { - throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0'); - } - if (length > MAX_ARRAY_LENGTH) { - throw new $RangeError('length is greater than (2**32 - 1)'); - } - var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype; - var A = []; // steps 3, 5 - if (proto !== $ArrayPrototype) { // step 4 - if (!$setProto) { - throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]'); - } - $setProto(A, proto); - } - if (length !== 0) { // bypasses the need for step 6 - A.length = length; - } - /* step 6, the above as a shortcut for the below - OrdinaryDefineOwnProperty(A, 'length', { - '[[Configurable]]': false, - '[[Enumerable]]': false, - '[[Value]]': length, - '[[Writable]]': true - }); - */ - return A; -}; - - -/***/ }), - -/***/ 1539: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $species = GetIntrinsic('%Symbol.species%', true); -var $TypeError = GetIntrinsic('%TypeError%'); - -var ArrayCreate = __webpack_require__(3665); -var Get = __webpack_require__(6448); -var IsArray = __webpack_require__(5971); -var IsConstructor = __webpack_require__(4065); -var IsIntegralNumber = __webpack_require__(485); -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/12.0/#sec-arrayspeciescreate - -module.exports = function ArraySpeciesCreate(originalArray, length) { - if (!IsIntegralNumber(length) || length < 0) { - throw new $TypeError('Assertion failed: length must be an integer >= 0'); - } - - var isArray = IsArray(originalArray); - if (!isArray) { - return ArrayCreate(length); - } - - var C = Get(originalArray, 'constructor'); - // TODO: figure out how to make a cross-realm normal Array, a same-realm Array - // if (IsConstructor(C)) { - // if C is another realm's Array, C = undefined - // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? - // } - if ($species && Type(C) === 'Object') { - C = Get(C, $species); - if (C === null) { - C = void 0; - } - } - - if (typeof C === 'undefined') { - return ArrayCreate(length); - } - if (!IsConstructor(C)) { - throw new $TypeError('C must be a constructor'); - } - return new C(length); // Construct(C, length); -}; - - - -/***/ }), - -/***/ 8323: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); -var callBound = __webpack_require__(9630); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var IsArray = __webpack_require__(5971); - -var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('%Function.prototype.apply%'); - -// https://ecma-international.org/ecma-262/6.0/#sec-call - -module.exports = function Call(F, V) { - var argumentsList = arguments.length > 2 ? arguments[2] : []; - if (!IsArray(argumentsList)) { - throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List'); - } - return $apply(F, V, argumentsList); -}; - - -/***/ }), - -/***/ 5597: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var DefineOwnProperty = __webpack_require__(1327); - -var FromPropertyDescriptor = __webpack_require__(8487); -var OrdinaryGetOwnProperty = __webpack_require__(6403); -var IsDataDescriptor = __webpack_require__(1392); -var IsExtensible = __webpack_require__(3428); -var IsPropertyKey = __webpack_require__(3290); -var SameValue = __webpack_require__(9836); -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty - -module.exports = function CreateDataProperty(O, P, V) { - if (Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (!IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - var oldDesc = OrdinaryGetOwnProperty(O, P); - var extensible = !oldDesc || IsExtensible(O); - var nonConfigurable = oldDesc && !oldDesc['[[Configurable]]']; - if (nonConfigurable || !extensible) { - return false; - } - return DefineOwnProperty( - IsDataDescriptor, - SameValue, - FromPropertyDescriptor, - O, - P, - { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Value]]': V, - '[[Writable]]': true - } - ); -}; - - -/***/ }), - -/***/ 3323: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var CreateDataProperty = __webpack_require__(5597); -var IsPropertyKey = __webpack_require__(3290); -var Type = __webpack_require__(9747); - -// // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow - -module.exports = function CreateDataPropertyOrThrow(O, P, V) { - if (Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - if (!IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - var success = CreateDataProperty(O, P, V); - if (!success) { - throw new $TypeError('unable to create data property'); - } - return success; -}; - - -/***/ }), - -/***/ 6356: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var isPropertyDescriptor = __webpack_require__(8682); -var DefineOwnProperty = __webpack_require__(1327); - -var FromPropertyDescriptor = __webpack_require__(8487); -var IsAccessorDescriptor = __webpack_require__(7857); -var IsDataDescriptor = __webpack_require__(1392); -var IsPropertyKey = __webpack_require__(3290); -var SameValue = __webpack_require__(9836); -var ToPropertyDescriptor = __webpack_require__(2402); -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-definepropertyorthrow - -module.exports = function DefinePropertyOrThrow(O, P, desc) { - if (Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - - if (!IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); - } - - var Desc = isPropertyDescriptor({ - Type: Type, - IsDataDescriptor: IsDataDescriptor, - IsAccessorDescriptor: IsAccessorDescriptor - }, desc) ? desc : ToPropertyDescriptor(desc); - if (!isPropertyDescriptor({ - Type: Type, - IsDataDescriptor: IsDataDescriptor, - IsAccessorDescriptor: IsAccessorDescriptor - }, Desc)) { - throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor'); - } - - return DefineOwnProperty( - IsDataDescriptor, - SameValue, - FromPropertyDescriptor, - O, - P, - Desc - ); -}; - - -/***/ }), - -/***/ 6739: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var MAX_SAFE_INTEGER = __webpack_require__(8540); - -var Call = __webpack_require__(8323); -var CreateDataPropertyOrThrow = __webpack_require__(3323); -var Get = __webpack_require__(6448); -var HasProperty = __webpack_require__(3059); -var IsArray = __webpack_require__(5971); -var LengthOfArrayLike = __webpack_require__(2151); -var ToString = __webpack_require__(6888); - -// https://262.ecma-international.org/11.0/#sec-flattenintoarray - -// eslint-disable-next-line max-params -module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) { - var mapperFunction; - if (arguments.length > 5) { - mapperFunction = arguments[5]; - } - - var targetIndex = start; - var sourceIndex = 0; - while (sourceIndex < sourceLen) { - var P = ToString(sourceIndex); - var exists = HasProperty(source, P); - if (exists === true) { - var element = Get(source, P); - if (typeof mapperFunction !== 'undefined') { - if (arguments.length <= 6) { - throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); - } - element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]); - } - var shouldFlatten = false; - if (depth > 0) { - shouldFlatten = IsArray(element); - } - if (shouldFlatten) { - var elementLen = LengthOfArrayLike(element); - targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); - } else { - if (targetIndex >= MAX_SAFE_INTEGER) { - throw new $TypeError('index too large'); - } - CreateDataPropertyOrThrow(target, ToString(targetIndex), element); - targetIndex += 1; - } - } - sourceIndex += 1; - } - - return targetIndex; -}; - - -/***/ }), - -/***/ 8487: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var assertRecord = __webpack_require__(5114); -var fromPropertyDescriptor = __webpack_require__(3359); - -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor - -module.exports = function FromPropertyDescriptor(Desc) { - if (typeof Desc !== 'undefined') { - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - } - - return fromPropertyDescriptor(Desc); -}; - - -/***/ }), - -/***/ 6448: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var inspect = __webpack_require__(3205); - -var IsPropertyKey = __webpack_require__(3290); -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-get-o-p - -module.exports = function Get(O, P) { - // 7.3.1.1 - if (Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: Type(O) is not Object'); - } - // 7.3.1.2 - if (!IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P)); - } - // 7.3.1.3 - return O[P]; -}; - - -/***/ }), - -/***/ 3059: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var IsPropertyKey = __webpack_require__(3290); -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-hasproperty - -module.exports = function HasProperty(O, P) { - if (Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: `O` must be an Object'); - } - if (!IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: `P` must be a Property Key'); - } - return P in O; -}; - - -/***/ }), - -/***/ 7857: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var has = __webpack_require__(9284); - -var assertRecord = __webpack_require__(5114); - -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-isaccessordescriptor - -module.exports = function IsAccessorDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { - return false; - } - - return true; -}; - - -/***/ }), - -/***/ 5971: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -// https://ecma-international.org/ecma-262/6.0/#sec-isarray -module.exports = __webpack_require__(4351); - - -/***/ }), - -/***/ 1089: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -// http://262.ecma-international.org/5.1/#sec-9.11 - -module.exports = __webpack_require__(4363); - - -/***/ }), - -/***/ 4065: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(137); - -var $construct = GetIntrinsic('%Reflect.construct%', true); - -var DefinePropertyOrThrow = __webpack_require__(6356); -try { - DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} }); -} catch (e) { - // Accessor properties aren't supported - DefinePropertyOrThrow = null; -} - -// https://ecma-international.org/ecma-262/6.0/#sec-isconstructor - -if (DefinePropertyOrThrow && $construct) { - var isConstructorMarker = {}; - var badArrayLike = {}; - DefinePropertyOrThrow(badArrayLike, 'length', { - '[[Get]]': function () { - throw isConstructorMarker; - }, - '[[Enumerable]]': true - }); - - module.exports = function IsConstructor(argument) { - try { - // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`: - $construct(argument, badArrayLike); - } catch (err) { - return err === isConstructorMarker; - } - }; -} else { - module.exports = function IsConstructor(argument) { - // unfortunately there's no way to truly check this without try/catch `new argument` in old environments - return typeof argument === 'function' && !!argument.prototype; - }; -} - - -/***/ }), - -/***/ 1392: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var has = __webpack_require__(9284); - -var assertRecord = __webpack_require__(5114); - -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor - -module.exports = function IsDataDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return false; - } - - assertRecord(Type, 'Property Descriptor', 'Desc', Desc); - - if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { - return false; - } - - return true; -}; - - -/***/ }), - -/***/ 3428: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true); -var $isExtensible = GetIntrinsic('%Object.isExtensible%', true); - -var isPrimitive = __webpack_require__(5019); - -// https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o - -module.exports = $preventExtensions - ? function IsExtensible(obj) { - return !isPrimitive(obj) && $isExtensible(obj); - } - : function IsExtensible(obj) { - return !isPrimitive(obj); - }; - - -/***/ }), - -/***/ 485: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var abs = __webpack_require__(13); -var floor = __webpack_require__(5127); -var Type = __webpack_require__(9747); - -var $isNaN = __webpack_require__(3234); -var $isFinite = __webpack_require__(7061); - -// https://tc39.es/ecma262/#sec-isintegralnumber - -module.exports = function IsIntegralNumber(argument) { - if (Type(argument) !== 'Number' || $isNaN(argument) || !$isFinite(argument)) { - return false; - } - var absValue = abs(argument); - return floor(absValue) === absValue; -}; - - -/***/ }), - -/***/ 3290: -/***/ (function(module) { - -"use strict"; - - -// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey - -module.exports = function IsPropertyKey(argument) { - return typeof argument === 'string' || typeof argument === 'symbol'; -}; - - -/***/ }), - -/***/ 1275: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $match = GetIntrinsic('%Symbol.match%', true); - -var hasRegExpMatcher = __webpack_require__(4221); - -var ToBoolean = __webpack_require__(3704); - -// https://ecma-international.org/ecma-262/6.0/#sec-isregexp - -module.exports = function IsRegExp(argument) { - if (!argument || typeof argument !== 'object') { - return false; - } - if ($match) { - var isRegExp = argument[$match]; - if (typeof isRegExp !== 'undefined') { - return ToBoolean(isRegExp); - } - } - return hasRegExpMatcher(argument); -}; - - -/***/ }), - -/***/ 2151: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var Get = __webpack_require__(6448); -var ToLength = __webpack_require__(6840); -var Type = __webpack_require__(9747); - -// https://262.ecma-international.org/11.0/#sec-lengthofarraylike - -module.exports = function LengthOfArrayLike(obj) { - if (Type(obj) !== 'Object') { - throw new $TypeError('Assertion failed: `obj` must be an Object'); - } - return ToLength(Get(obj, 'length')); -}; - -// TODO: use this all over - - -/***/ }), - -/***/ 6403: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $gOPD = __webpack_require__(5180); -var $TypeError = GetIntrinsic('%TypeError%'); - -var callBound = __webpack_require__(9630); - -var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); - -var has = __webpack_require__(9284); - -var IsArray = __webpack_require__(5971); -var IsPropertyKey = __webpack_require__(3290); -var IsRegExp = __webpack_require__(1275); -var ToPropertyDescriptor = __webpack_require__(2402); -var Type = __webpack_require__(9747); - -// https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty - -module.exports = function OrdinaryGetOwnProperty(O, P) { - if (Type(O) !== 'Object') { - throw new $TypeError('Assertion failed: O must be an Object'); - } - if (!IsPropertyKey(P)) { - throw new $TypeError('Assertion failed: P must be a Property Key'); - } - if (!has(O, P)) { - return void 0; - } - if (!$gOPD) { - // ES3 / IE 8 fallback - var arrayLength = IsArray(O) && P === 'length'; - var regexLastIndex = IsRegExp(O) && P === 'lastIndex'; - return { - '[[Configurable]]': !(arrayLength || regexLastIndex), - '[[Enumerable]]': $isEnumerable(O, P), - '[[Value]]': O[P], - '[[Writable]]': true - }; - } - return ToPropertyDescriptor($gOPD(O, P)); -}; - - -/***/ }), - -/***/ 6953: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -module.exports = __webpack_require__(3031); - - -/***/ }), - -/***/ 9836: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var $isNaN = __webpack_require__(3234); - -// http://262.ecma-international.org/5.1/#sec-9.12 - -module.exports = function SameValue(x, y) { - if (x === y) { // 0 === -0, but they are not identical. - if (x === 0) { return 1 / x === 1 / y; } - return true; - } - return $isNaN(x) && $isNaN(y); -}; - - -/***/ }), - -/***/ 3704: -/***/ (function(module) { - -"use strict"; - - -// http://262.ecma-international.org/5.1/#sec-9.2 - -module.exports = function ToBoolean(value) { return !!value; }; - - -/***/ }), - -/***/ 1723: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var abs = __webpack_require__(13); -var floor = __webpack_require__(5127); -var ToNumber = __webpack_require__(5541); - -var $isNaN = __webpack_require__(3234); -var $isFinite = __webpack_require__(7061); -var $sign = __webpack_require__(2163); - -// https://262.ecma-international.org/12.0/#sec-tointegerorinfinity - -module.exports = function ToIntegerOrInfinity(value) { - var number = ToNumber(value); - if ($isNaN(number) || number === 0) { return 0; } - if (!$isFinite(number)) { return number; } - return $sign(number) * floor(abs(number)); -}; - - -/***/ }), - -/***/ 6840: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var MAX_SAFE_INTEGER = __webpack_require__(8540); - -var ToIntegerOrInfinity = __webpack_require__(1723); - -module.exports = function ToLength(argument) { - var len = ToIntegerOrInfinity(argument); - if (len <= 0) { return 0; } // includes converting -0 to +0 - if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } - return len; -}; - - -/***/ }), - -/***/ 5541: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $Number = GetIntrinsic('%Number%'); -var $RegExp = GetIntrinsic('%RegExp%'); -var $parseInteger = GetIntrinsic('%parseInt%'); - -var callBound = __webpack_require__(9630); -var regexTester = __webpack_require__(8441); -var isPrimitive = __webpack_require__(5019); - -var $strSlice = callBound('String.prototype.slice'); -var isBinary = regexTester(/^0b[01]+$/i); -var isOctal = regexTester(/^0o[0-7]+$/i); -var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); -var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); -var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); -var hasNonWS = regexTester(nonWSregex); - -// whitespace from: https://es5.github.io/#x15.5.4.20 -// implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 -var ws = [ - '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', - '\u2029\uFEFF' -].join(''); -var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); -var $replace = callBound('String.prototype.replace'); -var $trim = function (value) { - return $replace(value, trimRegex, ''); -}; - -var ToPrimitive = __webpack_require__(6745); - -// https://ecma-international.org/ecma-262/6.0/#sec-tonumber - -module.exports = function ToNumber(argument) { - var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number); - if (typeof value === 'symbol') { - throw new $TypeError('Cannot convert a Symbol value to a number'); - } - if (typeof value === 'bigint') { - throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.'); - } - if (typeof value === 'string') { - if (isBinary(value)) { - return ToNumber($parseInteger($strSlice(value, 2), 2)); - } else if (isOctal(value)) { - return ToNumber($parseInteger($strSlice(value, 2), 8)); - } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { - return NaN; - } - var trimmed = $trim(value); - if (trimmed !== value) { - return ToNumber(trimmed); - } - - } - return $Number(value); -}; - - -/***/ }), - -/***/ 1283: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $Object = GetIntrinsic('%Object%'); - -var RequireObjectCoercible = __webpack_require__(6953); - -// https://ecma-international.org/ecma-262/6.0/#sec-toobject - -module.exports = function ToObject(value) { - RequireObjectCoercible(value); - return $Object(value); -}; - - -/***/ }), - -/***/ 6745: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var toPrimitive = __webpack_require__(5249); - -// https://ecma-international.org/ecma-262/6.0/#sec-toprimitive - -module.exports = function ToPrimitive(input) { - if (arguments.length > 1) { - return toPrimitive(input, arguments[1]); - } - return toPrimitive(input); -}; - - -/***/ }), - -/***/ 2402: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var has = __webpack_require__(9284); - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -var Type = __webpack_require__(9747); -var ToBoolean = __webpack_require__(3704); -var IsCallable = __webpack_require__(1089); - -// https://262.ecma-international.org/5.1/#sec-8.10.5 - -module.exports = function ToPropertyDescriptor(Obj) { - if (Type(Obj) !== 'Object') { - throw new $TypeError('ToPropertyDescriptor requires an object'); - } - - var desc = {}; - if (has(Obj, 'enumerable')) { - desc['[[Enumerable]]'] = ToBoolean(Obj.enumerable); - } - if (has(Obj, 'configurable')) { - desc['[[Configurable]]'] = ToBoolean(Obj.configurable); - } - if (has(Obj, 'value')) { - desc['[[Value]]'] = Obj.value; - } - if (has(Obj, 'writable')) { - desc['[[Writable]]'] = ToBoolean(Obj.writable); - } - if (has(Obj, 'get')) { - var getter = Obj.get; - if (typeof getter !== 'undefined' && !IsCallable(getter)) { - throw new $TypeError('getter must be a function'); - } - desc['[[Get]]'] = getter; - } - if (has(Obj, 'set')) { - var setter = Obj.set; - if (typeof setter !== 'undefined' && !IsCallable(setter)) { - throw new $TypeError('setter must be a function'); - } - desc['[[Set]]'] = setter; - } - - if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { - throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); - } - return desc; -}; - - -/***/ }), - -/***/ 6888: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $String = GetIntrinsic('%String%'); -var $TypeError = GetIntrinsic('%TypeError%'); - -// https://ecma-international.org/ecma-262/6.0/#sec-tostring - -module.exports = function ToString(argument) { - if (typeof argument === 'symbol') { - throw new $TypeError('Cannot convert a Symbol value to a string'); - } - return $String(argument); -}; - - -/***/ }), - -/***/ 9747: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var ES5Type = __webpack_require__(290); - -// https://262.ecma-international.org/11.0/#sec-ecmascript-data-types-and-values - -module.exports = function Type(x) { - if (typeof x === 'symbol') { - return 'Symbol'; - } - if (typeof x === 'bigint') { - return 'BigInt'; - } - return ES5Type(x); -}; - - -/***/ }), - -/***/ 13: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $abs = GetIntrinsic('%Math.abs%'); - -// http://262.ecma-international.org/5.1/#sec-5.2 - -module.exports = function abs(x) { - return $abs(x); -}; - - -/***/ }), - -/***/ 5127: -/***/ (function(module) { - -"use strict"; - - -// var modulo = require('./modulo'); -var $floor = Math.floor; - -// http://262.ecma-international.org/5.1/#sec-5.2 - -module.exports = function floor(x) { - // return x - modulo(x, 1); - return $floor(x); -}; - - -/***/ }), - -/***/ 3031: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); - -// http://262.ecma-international.org/5.1/#sec-9.10 - -module.exports = function CheckObjectCoercible(value, optMessage) { - if (value == null) { - throw new $TypeError(optMessage || ('Cannot call method on ' + value)); - } - return value; -}; - - -/***/ }), - -/***/ 290: -/***/ (function(module) { - -"use strict"; - - -// https://262.ecma-international.org/5.1/#sec-8 - -module.exports = function Type(x) { - if (x === null) { - return 'Null'; - } - if (typeof x === 'undefined') { - return 'Undefined'; - } - if (typeof x === 'function' || typeof x === 'object') { - return 'Object'; - } - if (typeof x === 'number') { - return 'Number'; - } - if (typeof x === 'boolean') { - return 'Boolean'; - } - if (typeof x === 'string') { - return 'String'; - } -}; - - -/***/ }), - -/***/ 137: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -// TODO: remove, semver-major - -module.exports = __webpack_require__(4219); - - -/***/ }), - -/***/ 1327: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var hasPropertyDescriptors = __webpack_require__(8198); - -var GetIntrinsic = __webpack_require__(4219); - -var $defineProperty = hasPropertyDescriptors() && GetIntrinsic('%Object.defineProperty%', true); - -var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); - -// eslint-disable-next-line global-require -var isArray = hasArrayLengthDefineBug && __webpack_require__(4351); - -var callBound = __webpack_require__(9630); - -var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); - -// eslint-disable-next-line max-params -module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) { - if (!$defineProperty) { - if (!IsDataDescriptor(desc)) { - // ES3 does not support getters/setters - return false; - } - if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) { - return false; - } - - // fallback for ES3 - if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) { - // a non-enumerable existing property - return false; - } - - // property does not exist at all, or exists but is enumerable - var V = desc['[[Value]]']; - // eslint-disable-next-line no-param-reassign - O[P] = V; // will use [[Define]] - return SameValue(O[P], V); - } - if ( - hasArrayLengthDefineBug - && P === 'length' - && '[[Value]]' in desc - && isArray(O) - && O.length !== desc['[[Value]]'] - ) { - // eslint-disable-next-line no-param-reassign - O.length = desc['[[Value]]']; - return O.length === desc['[[Value]]']; - } - - $defineProperty(O, P, FromPropertyDescriptor(desc)); - return true; -}; - - -/***/ }), - -/***/ 4351: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $Array = GetIntrinsic('%Array%'); - -// eslint-disable-next-line global-require -var toStr = !$Array.isArray && __webpack_require__(9630)('Object.prototype.toString'); - -module.exports = $Array.isArray || function IsArray(argument) { - return toStr(argument) === '[object Array]'; -}; - - -/***/ }), - -/***/ 5114: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $TypeError = GetIntrinsic('%TypeError%'); -var $SyntaxError = GetIntrinsic('%SyntaxError%'); - -var has = __webpack_require__(9284); - -var isMatchRecord = __webpack_require__(7040); - -var predicates = { - // https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type - 'Property Descriptor': function isPropertyDescriptor(Desc) { - var allowed = { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Get]]': true, - '[[Set]]': true, - '[[Value]]': true, - '[[Writable]]': true - }; - - for (var key in Desc) { // eslint-disable-line - if (has(Desc, key) && !allowed[key]) { - return false; - } - } - - var isData = has(Desc, '[[Value]]'); - var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); - if (isData && IsAccessor) { - throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); - } - return true; - }, - // https://262.ecma-international.org/13.0/#sec-match-records - 'Match Record': isMatchRecord -}; - -module.exports = function assertRecord(Type, recordType, argumentName, value) { - var predicate = predicates[recordType]; - if (typeof predicate !== 'function') { - throw new $SyntaxError('unknown record type: ' + recordType); - } - if (Type(value) !== 'Object' || !predicate(value)) { - throw new $TypeError(argumentName + ' must be a ' + recordType); - } -}; - - -/***/ }), - -/***/ 3359: -/***/ (function(module) { - -"use strict"; - - -module.exports = function fromPropertyDescriptor(Desc) { - if (typeof Desc === 'undefined') { - return Desc; - } - var obj = {}; - if ('[[Value]]' in Desc) { - obj.value = Desc['[[Value]]']; - } - if ('[[Writable]]' in Desc) { - obj.writable = !!Desc['[[Writable]]']; - } - if ('[[Get]]' in Desc) { - obj.get = Desc['[[Get]]']; - } - if ('[[Set]]' in Desc) { - obj.set = Desc['[[Set]]']; - } - if ('[[Enumerable]]' in Desc) { - obj.enumerable = !!Desc['[[Enumerable]]']; - } - if ('[[Configurable]]' in Desc) { - obj.configurable = !!Desc['[[Configurable]]']; - } - return obj; -}; - - -/***/ }), - -/***/ 5180: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; - - -/***/ }), - -/***/ 7061: -/***/ (function(module) { - -"use strict"; - - -var $isNaN = Number.isNaN || function (a) { return a !== a; }; - -module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; - - -/***/ }), - -/***/ 7040: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var has = __webpack_require__(9284); - -// https://262.ecma-international.org/13.0/#sec-match-records - -module.exports = function isMatchRecord(record) { - return ( - has(record, '[[StartIndex]]') - && has(record, '[[EndIndex]]') - && record['[[StartIndex]]'] >= 0 - && record['[[EndIndex]]'] >= record['[[StartIndex]]'] - && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]']) - && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]']) - ); -}; - - -/***/ }), - -/***/ 3234: -/***/ (function(module) { - -"use strict"; - - -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; - - -/***/ }), - -/***/ 5019: -/***/ (function(module) { - -"use strict"; - - -module.exports = function isPrimitive(value) { - return value === null || (typeof value !== 'function' && typeof value !== 'object'); -}; - - -/***/ }), - -/***/ 8682: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var has = __webpack_require__(9284); -var $TypeError = GetIntrinsic('%TypeError%'); - -module.exports = function IsPropertyDescriptor(ES, Desc) { - if (ES.Type(Desc) !== 'Object') { - return false; - } - var allowed = { - '[[Configurable]]': true, - '[[Enumerable]]': true, - '[[Get]]': true, - '[[Set]]': true, - '[[Value]]': true, - '[[Writable]]': true - }; - - for (var key in Desc) { // eslint-disable-line no-restricted-syntax - if (has(Desc, key) && !allowed[key]) { - return false; - } - } - - if (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) { - throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); - } - return true; -}; - - -/***/ }), - -/***/ 8540: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var GetIntrinsic = __webpack_require__(4219); - -var $Math = GetIntrinsic('%Math%'); -var $Number = GetIntrinsic('%Number%'); - -module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1; - - -/***/ }), - -/***/ 8441: -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -"use strict"; - - -var callBound = __webpack_require__(9630); - -var $exec = callBound('RegExp.prototype.exec'); - -module.exports = function regexTester(regex) { - return function test(s) { return $exec(regex, s) !== null; }; -}; - - -/***/ }), - -/***/ 2163: -/***/ (function(module) { - -"use strict"; - - -module.exports = function sign(number) { - return number >= 0 ? 1 : -1; -}; - - /***/ }) /******/ }); @@ -16179,3255 +1681,8693 @@ /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ -/******/ !function() { +/******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { +/******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? -/******/ function() { return module['default']; } : -/******/ function() { return module; }; +/******/ () => (module['default']) : +/******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; -/******/ }(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/create fake namespace object */ +/******/ (() => { +/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); +/******/ var leafPrototypes; +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 16: return value when it's Promise-like +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = this(value); +/******/ if(mode & 8) return value; +/******/ if(typeof value === 'object' && value) { +/******/ if((mode & 4) && value.__esModule) return value; +/******/ if((mode & 16) && typeof value.then === 'function') return value; +/******/ } +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ var def = {}; +/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; +/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { +/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); +/******/ } +/******/ def['default'] = () => (value); +/******/ __webpack_require__.d(ns, def); +/******/ return ns; +/******/ }; +/******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ -/******/ !function() { +/******/ (() => { /******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { +/******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/global */ -/******/ !function() { -/******/ __webpack_require__.g = (function() { -/******/ if (typeof globalThis === 'object') return globalThis; -/******/ try { -/******/ return this || new Function('return this')(); -/******/ } catch (e) { -/******/ if (typeof window === 'object') return window; -/******/ } -/******/ })(); -/******/ }(); +/******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ -/******/ !function() { +/******/ (() => { /******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { +/******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; -/******/ }(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/nonce */ +/******/ (() => { +/******/ __webpack_require__.nc = undefined; +/******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. -!function() { +(() => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { - "AnglePickerControl": function() { return /* reexport */ AnglePickerControl; }, - "Animate": function() { return /* reexport */ Animate; }, - "Autocomplete": function() { return /* reexport */ Autocomplete; }, - "BaseControl": function() { return /* reexport */ base_control; }, - "BlockQuotation": function() { return /* reexport */ external_wp_primitives_namespaceObject.BlockQuotation; }, - "Button": function() { return /* reexport */ build_module_button; }, - "ButtonGroup": function() { return /* reexport */ button_group; }, - "Card": function() { return /* reexport */ card_component; }, - "CardBody": function() { return /* reexport */ card_body_component; }, - "CardDivider": function() { return /* reexport */ card_divider_component; }, - "CardFooter": function() { return /* reexport */ card_footer_component; }, - "CardHeader": function() { return /* reexport */ card_header_component; }, - "CardMedia": function() { return /* reexport */ card_media_component; }, - "CheckboxControl": function() { return /* reexport */ CheckboxControl; }, - "Circle": function() { return /* reexport */ external_wp_primitives_namespaceObject.Circle; }, - "ClipboardButton": function() { return /* reexport */ ClipboardButton; }, - "ColorIndicator": function() { return /* reexport */ color_indicator; }, - "ColorPalette": function() { return /* reexport */ ColorPalette; }, - "ColorPicker": function() { return /* reexport */ LegacyAdapter; }, - "ComboboxControl": function() { return /* reexport */ combobox_control; }, - "CustomGradientPicker": function() { return /* reexport */ CustomGradientPicker; }, - "CustomSelectControl": function() { return /* reexport */ CustomSelectControl; }, - "Dashicon": function() { return /* reexport */ dashicon; }, - "DatePicker": function() { return /* reexport */ date; }, - "DateTimePicker": function() { return /* reexport */ date_time; }, - "Disabled": function() { return /* reexport */ disabled; }, - "Draggable": function() { return /* reexport */ Draggable; }, - "DropZone": function() { return /* reexport */ DropZoneComponent; }, - "DropZoneProvider": function() { return /* reexport */ DropZoneProvider; }, - "Dropdown": function() { return /* reexport */ Dropdown; }, - "DropdownMenu": function() { return /* reexport */ dropdown_menu; }, - "DuotonePicker": function() { return /* reexport */ duotone_picker; }, - "DuotoneSwatch": function() { return /* reexport */ duotone_swatch; }, - "ExternalLink": function() { return /* reexport */ external_link; }, - "Fill": function() { return /* reexport */ slot_fill_Fill; }, - "Flex": function() { return /* reexport */ flex_component; }, - "FlexBlock": function() { return /* reexport */ flex_block_component; }, - "FlexItem": function() { return /* reexport */ flex_item_component; }, - "FocalPointPicker": function() { return /* reexport */ focal_point_picker; }, - "FocusReturnProvider": function() { return /* reexport */ with_focus_return_Provider; }, - "FocusableIframe": function() { return /* reexport */ FocusableIframe; }, - "FontSizePicker": function() { return /* reexport */ font_size_picker; }, - "FormFileUpload": function() { return /* reexport */ form_file_upload; }, - "FormToggle": function() { return /* reexport */ form_toggle; }, - "FormTokenField": function() { return /* reexport */ form_token_field; }, - "G": function() { return /* reexport */ external_wp_primitives_namespaceObject.G; }, - "GradientPicker": function() { return /* reexport */ GradientPicker; }, - "Guide": function() { return /* reexport */ Guide; }, - "GuidePage": function() { return /* reexport */ GuidePage; }, - "HorizontalRule": function() { return /* reexport */ external_wp_primitives_namespaceObject.HorizontalRule; }, - "Icon": function() { return /* reexport */ build_module_icon; }, - "IconButton": function() { return /* reexport */ deprecated; }, - "IsolatedEventContainer": function() { return /* reexport */ isolated_event_container; }, - "KeyboardShortcuts": function() { return /* reexport */ keyboard_shortcuts; }, - "MenuGroup": function() { return /* reexport */ menu_group; }, - "MenuItem": function() { return /* reexport */ menu_item; }, - "MenuItemsChoice": function() { return /* reexport */ MenuItemsChoice; }, - "Modal": function() { return /* reexport */ modal; }, - "NavigableMenu": function() { return /* reexport */ navigable_container_menu; }, - "Notice": function() { return /* reexport */ build_module_notice; }, - "NoticeList": function() { return /* reexport */ list; }, - "Panel": function() { return /* reexport */ panel; }, - "PanelBody": function() { return /* reexport */ body; }, - "PanelHeader": function() { return /* reexport */ panel_header; }, - "PanelRow": function() { return /* reexport */ row; }, - "Path": function() { return /* reexport */ external_wp_primitives_namespaceObject.Path; }, - "Placeholder": function() { return /* reexport */ placeholder; }, - "Polygon": function() { return /* reexport */ external_wp_primitives_namespaceObject.Polygon; }, - "Popover": function() { return /* reexport */ popover; }, - "QueryControls": function() { return /* reexport */ QueryControls; }, - "RadioControl": function() { return /* reexport */ RadioControl; }, - "RangeControl": function() { return /* reexport */ range_control; }, - "Rect": function() { return /* reexport */ external_wp_primitives_namespaceObject.Rect; }, - "ResizableBox": function() { return /* reexport */ resizable_box; }, - "ResponsiveWrapper": function() { return /* reexport */ responsive_wrapper; }, - "SVG": function() { return /* reexport */ external_wp_primitives_namespaceObject.SVG; }, - "SandBox": function() { return /* reexport */ Sandbox; }, - "ScrollLock": function() { return /* reexport */ ScrollLock; }, - "SearchControl": function() { return /* reexport */ search_control; }, - "SelectControl": function() { return /* reexport */ select_control; }, - "Slot": function() { return /* reexport */ slot_fill_Slot; }, - "SlotFillProvider": function() { return /* reexport */ Provider; }, - "Snackbar": function() { return /* reexport */ snackbar; }, - "SnackbarList": function() { return /* reexport */ snackbar_list; }, - "Spinner": function() { return /* reexport */ Spinner; }, - "TabPanel": function() { return /* reexport */ TabPanel; }, - "TabbableContainer": function() { return /* reexport */ tabbable; }, - "TextControl": function() { return /* reexport */ text_control; }, - "TextHighlight": function() { return /* reexport */ text_highlight; }, - "TextareaControl": function() { return /* reexport */ TextareaControl; }, - "TimePicker": function() { return /* reexport */ time; }, - "Tip": function() { return /* reexport */ build_module_tip; }, - "ToggleControl": function() { return /* reexport */ ToggleControl; }, - "Toolbar": function() { return /* reexport */ toolbar; }, - "ToolbarButton": function() { return /* reexport */ toolbar_button; }, - "ToolbarDropdownMenu": function() { return /* reexport */ toolbar_dropdown_menu; }, - "ToolbarGroup": function() { return /* reexport */ toolbar_group; }, - "ToolbarItem": function() { return /* reexport */ toolbar_item; }, - "Tooltip": function() { return /* reexport */ tooltip; }, - "TreeSelect": function() { return /* reexport */ TreeSelect; }, - "VisuallyHidden": function() { return /* reexport */ visually_hidden_component; }, - "__experimentalAlignmentMatrixControl": function() { return /* reexport */ AlignmentMatrixControl; }, - "__experimentalBorderBoxControl": function() { return /* reexport */ border_box_control_component; }, - "__experimentalBorderControl": function() { return /* reexport */ border_control_component; }, - "__experimentalBoxControl": function() { return /* reexport */ BoxControl; }, - "__experimentalConfirmDialog": function() { return /* reexport */ confirm_dialog_component; }, - "__experimentalDimensionControl": function() { return /* reexport */ dimension_control; }, - "__experimentalDivider": function() { return /* reexport */ divider_component; }, - "__experimentalElevation": function() { return /* reexport */ elevation_component; }, - "__experimentalFlyout": function() { return /* reexport */ flyout_component; }, - "__experimentalGrid": function() { return /* reexport */ grid_component; }, - "__experimentalHStack": function() { return /* reexport */ h_stack_component; }, - "__experimentalHasSplitBorders": function() { return /* reexport */ hasSplitBorders; }, - "__experimentalHeading": function() { return /* reexport */ heading_component; }, - "__experimentalInputControl": function() { return /* reexport */ input_control; }, - "__experimentalIsDefinedBorder": function() { return /* reexport */ isDefinedBorder; }, - "__experimentalIsEmptyBorder": function() { return /* reexport */ isEmptyBorder; }, - "__experimentalItem": function() { return /* reexport */ item_component; }, - "__experimentalItemGroup": function() { return /* reexport */ item_group_component; }, - "__experimentalNavigation": function() { return /* reexport */ Navigation; }, - "__experimentalNavigationBackButton": function() { return /* reexport */ back_button; }, - "__experimentalNavigationGroup": function() { return /* reexport */ NavigationGroup; }, - "__experimentalNavigationItem": function() { return /* reexport */ NavigationItem; }, - "__experimentalNavigationMenu": function() { return /* reexport */ NavigationMenu; }, - "__experimentalNavigatorBackButton": function() { return /* reexport */ navigator_back_button_component; }, - "__experimentalNavigatorButton": function() { return /* reexport */ navigator_button_component; }, - "__experimentalNavigatorProvider": function() { return /* reexport */ navigator_provider_component; }, - "__experimentalNavigatorScreen": function() { return /* reexport */ navigator_screen_component; }, - "__experimentalNumberControl": function() { return /* reexport */ number_control; }, - "__experimentalPaletteEdit": function() { return /* reexport */ PaletteEdit; }, - "__experimentalParseQuantityAndUnitFromRawValue": function() { return /* reexport */ parseQuantityAndUnitFromRawValue; }, - "__experimentalRadio": function() { return /* reexport */ build_module_radio; }, - "__experimentalRadioGroup": function() { return /* reexport */ radio_group; }, - "__experimentalScrollable": function() { return /* reexport */ scrollable_component; }, - "__experimentalSpacer": function() { return /* reexport */ spacer_component; }, - "__experimentalStyleProvider": function() { return /* reexport */ StyleProvider; }, - "__experimentalSurface": function() { return /* reexport */ surface_component; }, - "__experimentalText": function() { return /* reexport */ text_component; }, - "__experimentalToggleGroupControl": function() { return /* reexport */ toggle_group_control_component; }, - "__experimentalToggleGroupControlOption": function() { return /* reexport */ ToggleGroupControlOption; }, - "__experimentalToggleGroupControlOptionIcon": function() { return /* reexport */ ToggleGroupControlOptionIcon; }, - "__experimentalToolbarContext": function() { return /* reexport */ toolbar_context; }, - "__experimentalToolsPanel": function() { return /* reexport */ tools_panel_component; }, - "__experimentalToolsPanelContext": function() { return /* reexport */ ToolsPanelContext; }, - "__experimentalToolsPanelItem": function() { return /* reexport */ tools_panel_item_component; }, - "__experimentalTreeGrid": function() { return /* reexport */ tree_grid; }, - "__experimentalTreeGridCell": function() { return /* reexport */ cell; }, - "__experimentalTreeGridItem": function() { return /* reexport */ tree_grid_item; }, - "__experimentalTreeGridRow": function() { return /* reexport */ tree_grid_row; }, - "__experimentalTruncate": function() { return /* reexport */ truncate_component; }, - "__experimentalUnitControl": function() { return /* reexport */ unit_control; }, - "__experimentalUseCustomUnits": function() { return /* reexport */ useCustomUnits; }, - "__experimentalUseNavigator": function() { return /* reexport */ use_navigator; }, - "__experimentalUseSlot": function() { return /* reexport */ use_slot_useSlot; }, - "__experimentalVStack": function() { return /* reexport */ v_stack_component; }, - "__experimentalView": function() { return /* reexport */ component; }, - "__experimentalZStack": function() { return /* reexport */ z_stack_component; }, - "__unstableComposite": function() { return /* reexport */ Composite; }, - "__unstableCompositeGroup": function() { return /* reexport */ CompositeGroup; }, - "__unstableCompositeItem": function() { return /* reexport */ CompositeItem; }, - "__unstableDisclosureContent": function() { return /* reexport */ DisclosureContent; }, - "__unstableGetAnimateClassName": function() { return /* reexport */ getAnimateClassName; }, - "__unstableMotion": function() { return /* reexport */ motion; }, - "__unstableUseAutocompleteProps": function() { return /* reexport */ useAutocompleteProps; }, - "__unstableUseCompositeState": function() { return /* reexport */ useCompositeState; }, - "__unstableUseNavigateRegions": function() { return /* reexport */ useNavigateRegions; }, - "createSlotFill": function() { return /* reexport */ createSlotFill; }, - "navigateRegions": function() { return /* reexport */ navigate_regions; }, - "withConstrainedTabbing": function() { return /* reexport */ with_constrained_tabbing; }, - "withFallbackStyles": function() { return /* reexport */ with_fallback_styles; }, - "withFilters": function() { return /* reexport */ withFilters; }, - "withFocusOutside": function() { return /* reexport */ with_focus_outside; }, - "withFocusReturn": function() { return /* reexport */ with_focus_return; }, - "withNotices": function() { return /* reexport */ with_notices; }, - "withSpokenMessages": function() { return /* reexport */ with_spoken_messages; } + AnglePickerControl: () => (/* reexport */ angle_picker_control), + Animate: () => (/* reexport */ animate), + Autocomplete: () => (/* reexport */ Autocomplete), + BaseControl: () => (/* reexport */ base_control), + BlockQuotation: () => (/* reexport */ external_wp_primitives_namespaceObject.BlockQuotation), + Button: () => (/* reexport */ build_module_button), + ButtonGroup: () => (/* reexport */ button_group), + Card: () => (/* reexport */ card_component), + CardBody: () => (/* reexport */ card_body_component), + CardDivider: () => (/* reexport */ card_divider_component), + CardFooter: () => (/* reexport */ card_footer_component), + CardHeader: () => (/* reexport */ card_header_component), + CardMedia: () => (/* reexport */ card_media_component), + CheckboxControl: () => (/* reexport */ checkbox_control), + Circle: () => (/* reexport */ external_wp_primitives_namespaceObject.Circle), + ClipboardButton: () => (/* reexport */ ClipboardButton), + ColorIndicator: () => (/* reexport */ color_indicator), + ColorPalette: () => (/* reexport */ color_palette), + ColorPicker: () => (/* reexport */ LegacyAdapter), + ComboboxControl: () => (/* reexport */ combobox_control), + CustomGradientPicker: () => (/* reexport */ custom_gradient_picker), + CustomSelectControl: () => (/* reexport */ StableCustomSelectControl), + Dashicon: () => (/* reexport */ dashicon), + DatePicker: () => (/* reexport */ date), + DateTimePicker: () => (/* reexport */ build_module_date_time), + Disabled: () => (/* reexport */ disabled), + Draggable: () => (/* reexport */ draggable), + DropZone: () => (/* reexport */ drop_zone), + DropZoneProvider: () => (/* reexport */ DropZoneProvider), + Dropdown: () => (/* reexport */ dropdown), + DropdownMenu: () => (/* reexport */ dropdown_menu), + DuotonePicker: () => (/* reexport */ duotone_picker), + DuotoneSwatch: () => (/* reexport */ duotone_swatch), + ExternalLink: () => (/* reexport */ external_link), + Fill: () => (/* reexport */ slot_fill_Fill), + Flex: () => (/* reexport */ flex_component), + FlexBlock: () => (/* reexport */ flex_block_component), + FlexItem: () => (/* reexport */ flex_item_component), + FocalPointPicker: () => (/* reexport */ focal_point_picker), + FocusReturnProvider: () => (/* reexport */ with_focus_return_Provider), + FocusableIframe: () => (/* reexport */ FocusableIframe), + FontSizePicker: () => (/* reexport */ font_size_picker), + FormFileUpload: () => (/* reexport */ form_file_upload), + FormToggle: () => (/* reexport */ form_toggle), + FormTokenField: () => (/* reexport */ form_token_field), + G: () => (/* reexport */ external_wp_primitives_namespaceObject.G), + GradientPicker: () => (/* reexport */ gradient_picker), + Guide: () => (/* reexport */ guide), + GuidePage: () => (/* reexport */ GuidePage), + HorizontalRule: () => (/* reexport */ external_wp_primitives_namespaceObject.HorizontalRule), + Icon: () => (/* reexport */ build_module_icon), + IconButton: () => (/* reexport */ deprecated), + IsolatedEventContainer: () => (/* reexport */ isolated_event_container), + KeyboardShortcuts: () => (/* reexport */ keyboard_shortcuts), + Line: () => (/* reexport */ external_wp_primitives_namespaceObject.Line), + MenuGroup: () => (/* reexport */ menu_group), + MenuItem: () => (/* reexport */ menu_item), + MenuItemsChoice: () => (/* reexport */ menu_items_choice), + Modal: () => (/* reexport */ modal), + NavigableMenu: () => (/* reexport */ navigable_container_menu), + Notice: () => (/* reexport */ build_module_notice), + NoticeList: () => (/* reexport */ list), + Panel: () => (/* reexport */ panel), + PanelBody: () => (/* reexport */ body), + PanelHeader: () => (/* reexport */ panel_header), + PanelRow: () => (/* reexport */ row), + Path: () => (/* reexport */ external_wp_primitives_namespaceObject.Path), + Placeholder: () => (/* reexport */ placeholder), + Polygon: () => (/* reexport */ external_wp_primitives_namespaceObject.Polygon), + Popover: () => (/* reexport */ popover), + ProgressBar: () => (/* reexport */ progress_bar), + QueryControls: () => (/* reexport */ query_controls), + RadioControl: () => (/* reexport */ radio_control), + RangeControl: () => (/* reexport */ range_control), + Rect: () => (/* reexport */ external_wp_primitives_namespaceObject.Rect), + ResizableBox: () => (/* reexport */ resizable_box), + ResponsiveWrapper: () => (/* reexport */ responsive_wrapper), + SVG: () => (/* reexport */ external_wp_primitives_namespaceObject.SVG), + SandBox: () => (/* reexport */ sandbox), + ScrollLock: () => (/* reexport */ scroll_lock), + SearchControl: () => (/* reexport */ search_control), + SelectControl: () => (/* reexport */ select_control), + Slot: () => (/* reexport */ slot_fill_Slot), + SlotFillProvider: () => (/* reexport */ Provider), + Snackbar: () => (/* reexport */ snackbar), + SnackbarList: () => (/* reexport */ snackbar_list), + Spinner: () => (/* reexport */ spinner), + TabPanel: () => (/* reexport */ tab_panel), + TabbableContainer: () => (/* reexport */ tabbable), + TextControl: () => (/* reexport */ text_control), + TextHighlight: () => (/* reexport */ text_highlight), + TextareaControl: () => (/* reexport */ textarea_control), + TimePicker: () => (/* reexport */ date_time_time), + Tip: () => (/* reexport */ build_module_tip), + ToggleControl: () => (/* reexport */ toggle_control), + Toolbar: () => (/* reexport */ toolbar), + ToolbarButton: () => (/* reexport */ toolbar_button), + ToolbarDropdownMenu: () => (/* reexport */ toolbar_dropdown_menu), + ToolbarGroup: () => (/* reexport */ toolbar_group), + ToolbarItem: () => (/* reexport */ toolbar_item), + Tooltip: () => (/* reexport */ tooltip), + TreeSelect: () => (/* reexport */ tree_select), + VisuallyHidden: () => (/* reexport */ visually_hidden_component), + __experimentalAlignmentMatrixControl: () => (/* reexport */ alignment_matrix_control), + __experimentalApplyValueToSides: () => (/* reexport */ applyValueToSides), + __experimentalBorderBoxControl: () => (/* reexport */ border_box_control_component), + __experimentalBorderControl: () => (/* reexport */ border_control_component), + __experimentalBoxControl: () => (/* reexport */ box_control), + __experimentalConfirmDialog: () => (/* reexport */ confirm_dialog_component), + __experimentalDimensionControl: () => (/* reexport */ dimension_control), + __experimentalDivider: () => (/* reexport */ divider_component), + __experimentalDropdownContentWrapper: () => (/* reexport */ dropdown_content_wrapper), + __experimentalElevation: () => (/* reexport */ elevation_component), + __experimentalGrid: () => (/* reexport */ grid_component), + __experimentalHStack: () => (/* reexport */ h_stack_component), + __experimentalHasSplitBorders: () => (/* reexport */ hasSplitBorders), + __experimentalHeading: () => (/* reexport */ heading_component), + __experimentalInputControl: () => (/* reexport */ input_control), + __experimentalInputControlPrefixWrapper: () => (/* reexport */ input_prefix_wrapper), + __experimentalInputControlSuffixWrapper: () => (/* reexport */ input_suffix_wrapper), + __experimentalIsDefinedBorder: () => (/* reexport */ isDefinedBorder), + __experimentalIsEmptyBorder: () => (/* reexport */ isEmptyBorder), + __experimentalItem: () => (/* reexport */ item_component), + __experimentalItemGroup: () => (/* reexport */ item_group_component), + __experimentalNavigation: () => (/* reexport */ navigation), + __experimentalNavigationBackButton: () => (/* reexport */ back_button), + __experimentalNavigationGroup: () => (/* reexport */ group), + __experimentalNavigationItem: () => (/* reexport */ navigation_item), + __experimentalNavigationMenu: () => (/* reexport */ navigation_menu), + __experimentalNavigatorBackButton: () => (/* reexport */ navigator_back_button_component), + __experimentalNavigatorButton: () => (/* reexport */ navigator_button_component), + __experimentalNavigatorProvider: () => (/* reexport */ navigator_provider_component), + __experimentalNavigatorScreen: () => (/* reexport */ navigator_screen_component), + __experimentalNavigatorToParentButton: () => (/* reexport */ navigator_to_parent_button_component), + __experimentalNumberControl: () => (/* reexport */ number_control), + __experimentalPaletteEdit: () => (/* reexport */ palette_edit), + __experimentalParseQuantityAndUnitFromRawValue: () => (/* reexport */ parseQuantityAndUnitFromRawValue), + __experimentalRadio: () => (/* reexport */ radio_group_radio), + __experimentalRadioGroup: () => (/* reexport */ radio_group), + __experimentalScrollable: () => (/* reexport */ scrollable_component), + __experimentalSpacer: () => (/* reexport */ spacer_component), + __experimentalStyleProvider: () => (/* reexport */ style_provider), + __experimentalSurface: () => (/* reexport */ surface_component), + __experimentalText: () => (/* reexport */ text_component), + __experimentalToggleGroupControl: () => (/* reexport */ toggle_group_control_component), + __experimentalToggleGroupControlOption: () => (/* reexport */ toggle_group_control_option_component), + __experimentalToggleGroupControlOptionIcon: () => (/* reexport */ toggle_group_control_option_icon_component), + __experimentalToolbarContext: () => (/* reexport */ toolbar_context), + __experimentalToolsPanel: () => (/* reexport */ tools_panel_component), + __experimentalToolsPanelContext: () => (/* reexport */ ToolsPanelContext), + __experimentalToolsPanelItem: () => (/* reexport */ tools_panel_item_component), + __experimentalTreeGrid: () => (/* reexport */ tree_grid), + __experimentalTreeGridCell: () => (/* reexport */ cell), + __experimentalTreeGridItem: () => (/* reexport */ tree_grid_item), + __experimentalTreeGridRow: () => (/* reexport */ tree_grid_row), + __experimentalTruncate: () => (/* reexport */ truncate_component), + __experimentalUnitControl: () => (/* reexport */ unit_control), + __experimentalUseCustomUnits: () => (/* reexport */ useCustomUnits), + __experimentalUseNavigator: () => (/* reexport */ use_navigator), + __experimentalUseSlot: () => (/* reexport */ useSlot), + __experimentalUseSlotFills: () => (/* reexport */ useSlotFills), + __experimentalVStack: () => (/* reexport */ v_stack_component), + __experimentalView: () => (/* reexport */ component), + __experimentalZStack: () => (/* reexport */ z_stack_component), + __unstableAnimatePresence: () => (/* reexport */ AnimatePresence), + __unstableComposite: () => (/* reexport */ legacy_Composite), + __unstableCompositeGroup: () => (/* reexport */ legacy_CompositeGroup), + __unstableCompositeItem: () => (/* reexport */ legacy_CompositeItem), + __unstableDisclosureContent: () => (/* reexport */ disclosure_DisclosureContent), + __unstableGetAnimateClassName: () => (/* reexport */ getAnimateClassName), + __unstableMotion: () => (/* reexport */ motion), + __unstableMotionContext: () => (/* reexport */ MotionContext), + __unstableUseAutocompleteProps: () => (/* reexport */ useAutocompleteProps), + __unstableUseCompositeState: () => (/* reexport */ useCompositeState), + __unstableUseNavigateRegions: () => (/* reexport */ useNavigateRegions), + createSlotFill: () => (/* reexport */ createSlotFill), + navigateRegions: () => (/* reexport */ navigate_regions), + privateApis: () => (/* reexport */ privateApis), + useBaseControlProps: () => (/* reexport */ useBaseControlProps), + withConstrainedTabbing: () => (/* reexport */ with_constrained_tabbing), + withFallbackStyles: () => (/* reexport */ with_fallback_styles), + withFilters: () => (/* reexport */ withFilters), + withFocusOutside: () => (/* reexport */ with_focus_outside), + withFocusReturn: () => (/* reexport */ with_focus_return), + withNotices: () => (/* reexport */ with_notices), + withSpokenMessages: () => (/* reexport */ with_spoken_messages) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/text/styles.js var text_styles_namespaceObject = {}; __webpack_require__.r(text_styles_namespaceObject); __webpack_require__.d(text_styles_namespaceObject, { - "Text": function() { return Text; }, - "block": function() { return styles_block; }, - "destructive": function() { return destructive; }, - "highlighterText": function() { return highlighterText; }, - "muted": function() { return muted; }, - "positive": function() { return positive; }, - "upperCase": function() { return upperCase; } -}); - -// NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/ui/tooltip/styles.js -var tooltip_styles_namespaceObject = {}; -__webpack_require__.r(tooltip_styles_namespaceObject); -__webpack_require__.d(tooltip_styles_namespaceObject, { - "TooltipContent": function() { return TooltipContent; }, - "TooltipPopoverView": function() { return TooltipPopoverView; }, - "TooltipShortcut": function() { return TooltipShortcut; }, - "noOutline": function() { return noOutline; } + Text: () => (Text), + block: () => (styles_block), + destructive: () => (destructive), + highlighterText: () => (highlighterText), + muted: () => (muted), + positive: () => (positive), + upperCase: () => (upperCase) }); // NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/toggle-group-control/toggle-group-control-option-base/styles.js var toggle_group_control_option_base_styles_namespaceObject = {}; __webpack_require__.r(toggle_group_control_option_base_styles_namespaceObject); __webpack_require__.d(toggle_group_control_option_base_styles_namespaceObject, { - "ButtonContentView": function() { return ButtonContentView; }, - "LabelView": function() { return LabelView; }, - "buttonActive": function() { return buttonActive; }, - "buttonView": function() { return buttonView; }, - "labelBlock": function() { return labelBlock; }, - "medium": function() { return medium; }, - "separatorActive": function() { return separatorActive; } + ButtonContentView: () => (ButtonContentView), + LabelView: () => (LabelView), + ou: () => (backdropView), + uG: () => (buttonView), + eh: () => (labelBlock) }); ;// CONCATENATED MODULE: external ["wp","primitives"] -var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; -;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js -function extends_extends() { - extends_extends = Object.assign ? Object.assign.bind() : function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - - return target; - }; - return extends_extends.apply(this, arguments); -} -;// CONCATENATED MODULE: external ["wp","element"] -var external_wp_element_namespaceObject = window["wp"]["element"]; -;// CONCATENATED MODULE: external "lodash" -var external_lodash_namespaceObject = window["lodash"]; -// EXTERNAL MODULE: ./node_modules/classnames/index.js -var classnames = __webpack_require__(4403); -var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); +const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; +;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs +function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var _4R3V3JGP_spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +var _4R3V3JGP_spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +var __objRest = (source, exclude) => { + var target = {}; + for (var prop in source) + if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) + target[prop] = source[prop]; + if (source != null && __getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(source)) { + if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) + target[prop] = source[prop]; + } + return target; +}; + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/4R3V3JGP.js +"use client"; +var _4R3V3JGP_defProp = Object.defineProperty; +var _4R3V3JGP_defProps = Object.defineProperties; +var _4R3V3JGP_getOwnPropDescs = Object.getOwnPropertyDescriptors; +var _4R3V3JGP_getOwnPropSymbols = Object.getOwnPropertySymbols; +var _4R3V3JGP_hasOwnProp = Object.prototype.hasOwnProperty; +var _4R3V3JGP_propIsEnum = Object.prototype.propertyIsEnumerable; +var _4R3V3JGP_defNormalProp = (obj, key, value) => key in obj ? _4R3V3JGP_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var _chunks_4R3V3JGP_spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (_4R3V3JGP_hasOwnProp.call(b, prop)) + _4R3V3JGP_defNormalProp(a, prop, b[prop]); + if (_4R3V3JGP_getOwnPropSymbols) + for (var prop of _4R3V3JGP_getOwnPropSymbols(b)) { + if (_4R3V3JGP_propIsEnum.call(b, prop)) + _4R3V3JGP_defNormalProp(a, prop, b[prop]); + } + return a; +}; +var _chunks_4R3V3JGP_spreadProps = (a, b) => _4R3V3JGP_defProps(a, _4R3V3JGP_getOwnPropDescs(b)); +var _4R3V3JGP_objRest = (source, exclude) => { + var target = {}; + for (var prop in source) + if (_4R3V3JGP_hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) + target[prop] = source[prop]; + if (source != null && _4R3V3JGP_getOwnPropSymbols) + for (var prop of _4R3V3JGP_getOwnPropSymbols(source)) { + if (exclude.indexOf(prop) < 0 && _4R3V3JGP_propIsEnum.call(source, prop)) + target[prop] = source[prop]; + } + return target; +}; + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/Y3OOHFCN.js +"use client"; + + +// src/utils/misc.ts +function noop(..._) { +} +function shallowEqual(a, b) { + if (a === b) + return true; + if (!a) + return false; + if (!b) + return false; + if (typeof a !== "object") + return false; + if (typeof b !== "object") + return false; + const aKeys = Object.keys(a); + const bKeys = Object.keys(b); + const { length } = aKeys; + if (bKeys.length !== length) + return false; + for (const key of aKeys) { + if (a[key] !== b[key]) { + return false; + } + } + return true; +} +function Y3OOHFCN_applyState(argument, currentValue) { + if (isUpdater(argument)) { + const value = isLazyValue(currentValue) ? currentValue() : currentValue; + return argument(value); + } + return argument; +} +function isUpdater(argument) { + return typeof argument === "function"; +} +function isLazyValue(value) { + return typeof value === "function"; +} +function isObject(arg) { + return typeof arg === "object" && arg != null; +} +function isEmpty(arg) { + if (Array.isArray(arg)) + return !arg.length; + if (isObject(arg)) + return !Object.keys(arg).length; + if (arg == null) + return true; + if (arg === "") + return true; + return false; +} +function isInteger(arg) { + if (typeof arg === "number") { + return Math.floor(arg) === arg; + } + return String(Math.floor(Number(arg))) === arg; +} +function Y3OOHFCN_hasOwnProperty(object, prop) { + if (typeof Object.hasOwn === "function") { + return Object.hasOwn(object, prop); + } + return Object.prototype.hasOwnProperty.call(object, prop); +} +function chain(...fns) { + return (...args) => { + for (const fn of fns) { + if (typeof fn === "function") { + fn(...args); + } + } + }; +} +function cx(...args) { + return args.filter(Boolean).join(" ") || void 0; +} +function normalizeString(str) { + return str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); +} +function omit(object, keys) { + const result = _chunks_4R3V3JGP_spreadValues({}, object); + for (const key of keys) { + if (Y3OOHFCN_hasOwnProperty(result, key)) { + delete result[key]; + } + } + return result; +} +function pick(object, paths) { + const result = {}; + for (const key of paths) { + if (Y3OOHFCN_hasOwnProperty(object, key)) { + result[key] = object[key]; + } + } + return result; +} +function identity(value) { + return value; +} +function beforePaint(cb = noop) { + const raf = requestAnimationFrame(cb); + return () => cancelAnimationFrame(raf); +} +function afterPaint(cb = noop) { + let raf = requestAnimationFrame(() => { + raf = requestAnimationFrame(cb); + }); + return () => cancelAnimationFrame(raf); +} +function invariant(condition, message) { + if (condition) + return; + if (typeof message !== "string") + throw new Error("Invariant failed"); + throw new Error(message); +} +function getKeys(obj) { + return Object.keys(obj); +} +function isFalsyBooleanCallback(booleanOrCallback, ...args) { + const result = typeof booleanOrCallback === "function" ? booleanOrCallback(...args) : booleanOrCallback; + if (result == null) + return false; + return !result; +} +function disabledFromProps(props) { + return props.disabled || props["aria-disabled"] === true || props["aria-disabled"] === "true"; +} +function defaultValue(...values) { + for (const value of values) { + if (value !== void 0) + return value; + } + return void 0; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/XM66DUTO.js +"use client"; + + +// src/utils/misc.ts + + +function setRef(ref, value) { + if (typeof ref === "function") { + ref(value); + } else if (ref) { + ref.current = value; + } +} +function isValidElementWithRef(element) { + if (!element) + return false; + if (!(0,external_React_.isValidElement)(element)) + return false; + if (!("ref" in element)) + return false; + return true; +} +function getRefProperty(element) { + if (!isValidElementWithRef(element)) + return null; + return element.ref; +} +function mergeProps(base, overrides) { + const props = _4R3V3JGP_spreadValues({}, base); + for (const key in overrides) { + if (!Y3OOHFCN_hasOwnProperty(overrides, key)) + continue; + if (key === "className") { + const prop = "className"; + props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop]; + continue; + } + if (key === "style") { + const prop = "style"; + props[prop] = base[prop] ? _4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({}, base[prop]), overrides[prop]) : overrides[prop]; + continue; + } + const overrideValue = overrides[key]; + if (typeof overrideValue === "function" && key.startsWith("on")) { + const baseValue = base[key]; + if (typeof baseValue === "function") { + props[key] = (...args) => { + overrideValue(...args); + baseValue(...args); + }; + continue; + } + } + props[key] = overrideValue; + } + return props; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/DLOEKDPY.js +"use client"; + +// src/utils/dom.ts +var canUseDOM = checkIsBrowser(); +function checkIsBrowser() { + var _a; + return typeof window !== "undefined" && !!((_a = window.document) == null ? void 0 : _a.createElement); +} +function DLOEKDPY_getDocument(node) { + return node ? node.ownerDocument || node : document; +} +function getWindow(node) { + return DLOEKDPY_getDocument(node).defaultView || window; +} +function getActiveElement(node, activeDescendant = false) { + const { activeElement } = DLOEKDPY_getDocument(node); + if (!(activeElement == null ? void 0 : activeElement.nodeName)) { + return null; + } + if (isFrame(activeElement) && activeElement.contentDocument) { + return getActiveElement( + activeElement.contentDocument.body, + activeDescendant + ); + } + if (activeDescendant) { + const id = activeElement.getAttribute("aria-activedescendant"); + if (id) { + const element = DLOEKDPY_getDocument(activeElement).getElementById(id); + if (element) { + return element; + } + } + } + return activeElement; +} +function contains(parent, child) { + return parent === child || parent.contains(child); +} +function isFrame(element) { + return element.tagName === "IFRAME"; +} +function isButton(element) { + const tagName = element.tagName.toLowerCase(); + if (tagName === "button") + return true; + if (tagName === "input" && element.type) { + return buttonInputTypes.indexOf(element.type) !== -1; + } + return false; +} +var buttonInputTypes = [ + "button", + "color", + "file", + "image", + "reset", + "submit" +]; +function matches(element, selectors) { + if ("matches" in element) { + return element.matches(selectors); + } + if ("msMatchesSelector" in element) { + return element.msMatchesSelector(selectors); + } + return element.webkitMatchesSelector(selectors); +} +function isVisible(element) { + const htmlElement = element; + return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0; +} +function DLOEKDPY_closest(element, selectors) { + if ("closest" in element) + return element.closest(selectors); + do { + if (matches(element, selectors)) + return element; + element = element.parentElement || element.parentNode; + } while (element !== null && element.nodeType === 1); + return null; +} +function DLOEKDPY_isTextField(element) { + try { + const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null; + const isTextArea = element.tagName === "TEXTAREA"; + return isTextInput || isTextArea || false; + } catch (error) { + return false; + } +} +function getPopupRole(element, fallback) { + const allowedPopupRoles = ["dialog", "menu", "listbox", "tree", "grid"]; + const role = element == null ? void 0 : element.getAttribute("role"); + if (role && allowedPopupRoles.indexOf(role) !== -1) { + return role; + } + return fallback; +} +function getPopupItemRole(element, fallback) { + var _a; + const itemRoleByPopupRole = { + menu: "menuitem", + listbox: "option", + tree: "treeitem", + grid: "gridcell" + }; + const popupRole = getPopupRole(element); + if (!popupRole) + return fallback; + const key = popupRole; + return (_a = itemRoleByPopupRole[key]) != null ? _a : fallback; +} +function getTextboxSelection(element) { + let start = 0; + let end = 0; + if (DLOEKDPY_isTextField(element)) { + start = element.selectionStart || 0; + end = element.selectionEnd || 0; + } else if (element.isContentEditable) { + const selection = DLOEKDPY_getDocument(element).getSelection(); + if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && contains(element, selection.anchorNode) && selection.focusNode && contains(element, selection.focusNode)) { + const range = selection.getRangeAt(0); + const nextRange = range.cloneRange(); + nextRange.selectNodeContents(element); + nextRange.setEnd(range.startContainer, range.startOffset); + start = nextRange.toString().length; + nextRange.setEnd(range.endContainer, range.endOffset); + end = nextRange.toString().length; + } + } + return { start, end }; +} +function scrollIntoViewIfNeeded(element, arg) { + if (isPartiallyHidden(element) && "scrollIntoView" in element) { + element.scrollIntoView(arg); + } +} +function getScrollingElement(element) { + if (!element) + return null; + if (element.clientHeight && element.scrollHeight > element.clientHeight) { + const { overflowY } = getComputedStyle(element); + const isScrollable = overflowY !== "visible" && overflowY !== "hidden"; + if (isScrollable) + return element; + } else if (element.clientWidth && element.scrollWidth > element.clientWidth) { + const { overflowX } = getComputedStyle(element); + const isScrollable = overflowX !== "visible" && overflowX !== "hidden"; + if (isScrollable) + return element; + } + return getScrollingElement(element.parentElement) || document.scrollingElement || document.body; +} +function isPartiallyHidden(element) { + const elementRect = element.getBoundingClientRect(); + const scroller = getScrollingElement(element); + if (!scroller) + return false; + const scrollerRect = scroller.getBoundingClientRect(); + const isHTML = scroller.tagName === "HTML"; + const scrollerTop = isHTML ? scrollerRect.top + scroller.scrollTop : scrollerRect.top; + const scrollerBottom = isHTML ? scroller.clientHeight : scrollerRect.bottom; + const scrollerLeft = isHTML ? scrollerRect.left + scroller.scrollLeft : scrollerRect.left; + const scrollerRight = isHTML ? scroller.clientWidth : scrollerRect.right; + const top = elementRect.top < scrollerTop; + const left = elementRect.left < scrollerLeft; + const bottom = elementRect.bottom > scrollerBottom; + const right = elementRect.right > scrollerRight; + return top || left || bottom || right; +} +function setSelectionRange(element, ...args) { + if (/text|search|password|tel|url/i.test(element.type)) { + element.setSelectionRange(...args); + } +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/MHPO2BXA.js +"use client"; + + +// src/utils/platform.ts +function isTouchDevice() { + return canUseDOM && !!navigator.maxTouchPoints; +} +function isApple() { + if (!canUseDOM) + return false; + return /mac|iphone|ipad|ipod/i.test(navigator.platform); +} +function isSafari() { + return canUseDOM && isApple() && /apple/i.test(navigator.vendor); +} +function isFirefox() { + return canUseDOM && /firefox\//i.test(navigator.userAgent); +} +function isMac() { + return canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice(); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/utils/events.js +"use client"; + + + + +// src/utils/events.ts +function isPortalEvent(event) { + return Boolean( + event.currentTarget && !contains(event.currentTarget, event.target) + ); +} +function isSelfTarget(event) { + return event.target === event.currentTarget; +} +function isOpeningInNewTab(event) { + const element = event.currentTarget; + if (!element) + return false; + const isAppleDevice = isApple(); + if (isAppleDevice && !event.metaKey) + return false; + if (!isAppleDevice && !event.ctrlKey) + return false; + const tagName = element.tagName.toLowerCase(); + if (tagName === "a") + return true; + if (tagName === "button" && element.type === "submit") + return true; + if (tagName === "input" && element.type === "submit") + return true; + return false; +} +function isDownloading(event) { + const element = event.currentTarget; + if (!element) + return false; + const tagName = element.tagName.toLowerCase(); + if (!event.altKey) + return false; + if (tagName === "a") + return true; + if (tagName === "button" && element.type === "submit") + return true; + if (tagName === "input" && element.type === "submit") + return true; + return false; +} +function fireEvent(element, type, eventInit) { + const event = new Event(type, eventInit); + return element.dispatchEvent(event); +} +function fireBlurEvent(element, eventInit) { + const event = new FocusEvent("blur", eventInit); + const defaultAllowed = element.dispatchEvent(event); + const bubbleInit = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, eventInit), { bubbles: true }); + element.dispatchEvent(new FocusEvent("focusout", bubbleInit)); + return defaultAllowed; +} +function fireFocusEvent(element, eventInit) { + const event = new FocusEvent("focus", eventInit); + const defaultAllowed = element.dispatchEvent(event); + const bubbleInit = __spreadProps(__spreadValues({}, eventInit), { bubbles: true }); + element.dispatchEvent(new FocusEvent("focusin", bubbleInit)); + return defaultAllowed; +} +function fireKeyboardEvent(element, type, eventInit) { + const event = new KeyboardEvent(type, eventInit); + return element.dispatchEvent(event); +} +function fireClickEvent(element, eventInit) { + const event = new MouseEvent("click", eventInit); + return element.dispatchEvent(event); +} +function isFocusEventOutside(event, container) { + const containerElement = container || event.currentTarget; + const relatedTarget = event.relatedTarget; + return !relatedTarget || !contains(containerElement, relatedTarget); +} +function queueBeforeEvent(element, type, callback) { + const raf = requestAnimationFrame(() => { + element.removeEventListener(type, callImmediately, true); + callback(); + }); + const callImmediately = () => { + cancelAnimationFrame(raf); + callback(); + }; + element.addEventListener(type, callImmediately, { + once: true, + capture: true + }); + return raf; +} +function addGlobalEventListener(type, listener, options, scope = window) { + const children = []; + try { + scope.document.addEventListener(type, listener, options); + for (const frame of Array.from(scope.frames)) { + children.push(addGlobalEventListener(type, listener, options, frame)); + } + } catch (e) { + } + const removeEventListener = () => { + try { + scope.document.removeEventListener(type, listener, options); + } catch (e) { + } + children.forEach((remove) => remove()); + }; + return removeEventListener; +} + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6O5OEQGF.js +"use client"; + + + +// src/utils/hooks.ts + + + + + +var _React = _4R3V3JGP_spreadValues({}, external_React_namespaceObject); +var useReactId = _React.useId; +var useReactDeferredValue = _React.useDeferredValue; +var useReactInsertionEffect = _React.useInsertionEffect; +var useSafeLayoutEffect = canUseDOM ? external_React_.useLayoutEffect : external_React_.useEffect; +function useInitialValue(value) { + const [initialValue] = (0,external_React_.useState)(value); + return initialValue; +} +function useLazyValue(init) { + const ref = useRef(); + if (ref.current === void 0) { + ref.current = init(); + } + return ref.current; +} +function useLiveRef(value) { + const ref = (0,external_React_.useRef)(value); + useSafeLayoutEffect(() => { + ref.current = value; + }); + return ref; +} +function usePreviousValue(value) { + const [previousValue, setPreviousValue] = useState(value); + if (value !== previousValue) { + setPreviousValue(value); + } + return previousValue; +} +function useEvent(callback) { + const ref = (0,external_React_.useRef)(() => { + throw new Error("Cannot call an event handler while rendering."); + }); + if (useReactInsertionEffect) { + useReactInsertionEffect(() => { + ref.current = callback; }); } else { - obj[key] = value; - } - - return obj; -} - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - - return target; -} - -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -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; -} - -function _createForOfIteratorHelperLoose(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - 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."); - } - - it = o[Symbol.iterator](); - return it.next.bind(it); -} - - - -// EXTERNAL MODULE: external "React" -var external_React_ = __webpack_require__(9196); -var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js -function _rollupPluginBabelHelpers_0c84a174_defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -function _rollupPluginBabelHelpers_0c84a174_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - - return keys; -} - -function _rollupPluginBabelHelpers_0c84a174_objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - _rollupPluginBabelHelpers_0c84a174_ownKeys(Object(source), true).forEach(function (key) { - _rollupPluginBabelHelpers_0c84a174_defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - _rollupPluginBabelHelpers_0c84a174_ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - - return target; -} - -function _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -function _rollupPluginBabelHelpers_0c84a174_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _rollupPluginBabelHelpers_0c84a174_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 _rollupPluginBabelHelpers_0c84a174_arrayLikeToArray(o, minLen); -} - -function _rollupPluginBabelHelpers_0c84a174_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; -} - -function _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _rollupPluginBabelHelpers_0c84a174_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."); - } - - it = o[Symbol.iterator](); - return it.next.bind(it); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/SystemContext.js - - -var SystemContext = /*#__PURE__*/(0,external_React_.createContext)({}); - - - -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useCreateElement.js - + ref.current = callback; + } + return (0,external_React_.useCallback)((...args) => { + var _a; + return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args); + }, []); +} +function useMergeRefs(...refs) { + return (0,external_React_.useMemo)(() => { + if (!refs.some(Boolean)) + return; + return (value) => { + refs.forEach((ref) => setRef(ref, value)); + }; + }, refs); +} +function useRefId(ref, deps) { + const [id, setId] = useState(void 0); + useSafeLayoutEffect(() => { + var _a; + setId((_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.id); + }, deps); + return id; +} +function useId(defaultId) { + if (useReactId) { + const reactId = useReactId(); + if (defaultId) + return defaultId; + return reactId; + } + const [id, setId] = (0,external_React_.useState)(defaultId); + useSafeLayoutEffect(() => { + if (defaultId || id) + return; + const random = Math.random().toString(36).substr(2, 6); + setId(`id-${random}`); + }, [defaultId, id]); + return defaultId || id; +} +function useDeferredValue(value) { + if (useReactDeferredValue) { + return useReactDeferredValue(value); + } + const [deferredValue, setDeferredValue] = useState(value); + useEffect(() => { + const raf = requestAnimationFrame(() => setDeferredValue(value)); + return () => cancelAnimationFrame(raf); + }, [value]); + return deferredValue; +} +function useTagName(refOrElement, type) { + const stringOrUndefined = (type2) => { + if (typeof type2 !== "string") + return; + return type2; + }; + const [tagName, setTagName] = (0,external_React_.useState)(() => stringOrUndefined(type)); + useSafeLayoutEffect(() => { + const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement; + setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type)); + }, [refOrElement, type]); + return tagName; +} +function useAttribute(refOrElement, attributeName, defaultValue) { + const [attribute, setAttribute] = useState(defaultValue); + useSafeLayoutEffect(() => { + const element = refOrElement && "current" in refOrElement ? refOrElement.current : refOrElement; + const value = element == null ? void 0 : element.getAttribute(attributeName); + if (value == null) + return; + setAttribute(value); + }, [refOrElement, attributeName]); + return attribute; +} +function useUpdateEffect(effect, deps) { + const mounted = (0,external_React_.useRef)(false); + (0,external_React_.useEffect)(() => { + if (mounted.current) { + return effect(); + } + mounted.current = true; + }, deps); + (0,external_React_.useEffect)( + () => () => { + mounted.current = false; + }, + [] + ); +} +function useUpdateLayoutEffect(effect, deps) { + const mounted = useRef(false); + useSafeLayoutEffect(() => { + if (mounted.current) { + return effect(); + } + mounted.current = true; + }, deps); + useSafeLayoutEffect( + () => () => { + mounted.current = false; + }, + [] + ); +} +function useControlledState(defaultState, state, setState) { + const [localState, setLocalState] = useState(defaultState); + const nextState = state !== void 0 ? state : localState; + const stateRef = useLiveRef(state); + const setStateRef = useLiveRef(setState); + const nextStateRef = useLiveRef(nextState); + const setNextState = useCallback((prevValue) => { + const setStateProp = setStateRef.current; + if (setStateProp) { + if (isSetNextState(setStateProp)) { + setStateProp(prevValue); + } else { + const nextValue = applyState(prevValue, nextStateRef.current); + nextStateRef.current = nextValue; + setStateProp(nextValue); + } + } + if (stateRef.current === void 0) { + setLocalState(prevValue); + } + }, []); + defineSetNextState(setNextState); + return [nextState, setNextState]; +} +var SET_NEXT_STATE = Symbol("setNextState"); +function isSetNextState(arg) { + return arg[SET_NEXT_STATE] === true; +} +function defineSetNextState(arg) { + if (!isSetNextState(arg)) { + Object.defineProperty(arg, SET_NEXT_STATE, { value: true }); + } +} +function useForceUpdate() { + return (0,external_React_.useReducer)(() => [], []); +} +function useBooleanEvent(booleanOrCallback) { + return useEvent( + typeof booleanOrCallback === "function" ? booleanOrCallback : () => booleanOrCallback + ); +} +function useWrapElement(props, callback, deps = []) { + const wrapElement = (0,external_React_.useCallback)( + (element) => { + if (props.wrapElement) { + element = props.wrapElement(element); + } + return callback(element); + }, + [...deps, props.wrapElement] + ); + return _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { wrapElement }); +} +function usePortalRef(portalProp = false, portalRefProp) { + const [portalNode, setPortalNode] = (0,external_React_.useState)(null); + const portalRef = useMergeRefs(setPortalNode, portalRefProp); + const domReady = !portalProp || portalNode; + return { portalRef, portalNode, domReady }; +} +function useMetadataProps(props, key, value) { + const parent = props.onLoadedMetadataCapture; + const onLoadedMetadataCapture = (0,external_React_.useMemo)(() => { + return Object.assign(() => { + }, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, parent), { [key]: value })); + }, [parent, key, value]); + return [parent == null ? void 0 : parent[key], { onLoadedMetadataCapture }]; +} +function useIsMouseMoving() { + (0,external_React_.useEffect)(() => { + addGlobalEventListener("mousemove", setMouseMoving, true); + addGlobalEventListener("mousedown", resetMouseMoving, true); + addGlobalEventListener("mouseup", resetMouseMoving, true); + addGlobalEventListener("keydown", resetMouseMoving, true); + addGlobalEventListener("scroll", resetMouseMoving, true); + }, []); + const isMouseMoving = useEvent(() => mouseMoving); + return isMouseMoving; +} +var mouseMoving = false; +var previousScreenX = 0; +var previousScreenY = 0; +function hasMouseMovement(event) { + const movementX = event.movementX || event.screenX - previousScreenX; + const movementY = event.movementY || event.screenY - previousScreenY; + previousScreenX = event.screenX; + previousScreenY = event.screenY; + return movementX || movementY || "production" === "test"; +} +function setMouseMoving(event) { + if (!hasMouseMovement(event)) + return; + mouseMoving = true; +} +function resetMouseMoving() { + mouseMoving = false; +} + + + +;// CONCATENATED MODULE: external "ReactJSXRuntime" +const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"]; +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/3ORBWXWF.js +"use client"; + + + + +// src/utils/system.tsx function isRenderProp(children) { return typeof children === "function"; } - -/** - * Custom hook that will call `children` if it's a function. If - * `useCreateElement` has been passed to the context, it'll be used instead. - * - * @example - * import React from "react"; - * import { SystemProvider, useCreateElement } from "reakit-system"; - * - * const system = { - * useCreateElement(type, props, children = props.children) { - * // very similar to what `useCreateElement` does already - * if (typeof children === "function") { - * const { children: _, ...rest } = props; - * return children(rest); - * } - * return React.createElement(type, props, children); - * }, - * }; - * - * function Component(props) { - * return useCreateElement("div", props); - * } - * - * function App() { - * return ( - * - * {({ url }) => link} - * - * ); - * } - */ - -var useCreateElement = function useCreateElement(type, props, children) { - if (children === void 0) { - children = props.children; - } - - var context = (0,external_React_.useContext)(SystemContext); - - if (context.useCreateElement) { - return context.useCreateElement(type, props, children); - } - - if (typeof type === "string" && isRenderProp(children)) { - var _ = props.children, - rest = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(props, ["children"]); - - return children(rest); - } - - return /*#__PURE__*/(0,external_React_.createElement)(type, props, children); -}; - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/_rollupPluginBabelHelpers-1f0bf8c2.js -function _rollupPluginBabelHelpers_1f0bf8c2_defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -function _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - - return keys; -} - -function _rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(Object(source), true).forEach(function (key) { - _rollupPluginBabelHelpers_1f0bf8c2_defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - - return target; -} - -function _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -function _rollupPluginBabelHelpers_1f0bf8c2_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _rollupPluginBabelHelpers_1f0bf8c2_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 _rollupPluginBabelHelpers_1f0bf8c2_arrayLikeToArray(o, minLen); -} - -function _rollupPluginBabelHelpers_1f0bf8c2_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; -} - -function _rollupPluginBabelHelpers_1f0bf8c2_createForOfIteratorHelperLoose(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _rollupPluginBabelHelpers_1f0bf8c2_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."); - } - - it = o[Symbol.iterator](); - return it.next.bind(it); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isObject.js -/** - * Checks whether `arg` is an object or not. - * - * @returns {boolean} - */ -function isObject_isObject(arg) { - return typeof arg === "object" && arg != null; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPlainObject.js - - -/** - * Checks whether `arg` is a plain object or not. - * - * @returns {boolean} - */ - -function isPlainObject(arg) { - var _proto$constructor; - - if (!isObject_isObject(arg)) return false; - var proto = Object.getPrototypeOf(arg); - if (proto == null) return true; - return ((_proto$constructor = proto.constructor) === null || _proto$constructor === void 0 ? void 0 : _proto$constructor.toString()) === Object.toString(); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/splitProps.js - - - - -/** - * Splits an object (`props`) into a tuple where the first item is an object - * with the passed `keys`, and the second item is an object with these keys - * omitted. - * - * @deprecated will be removed in version 2 - * - * @example - * import { splitProps } from "reakit-utils"; - * - * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }] - */ - -function __deprecatedSplitProps(props, keys) { - var propsKeys = Object.keys(props); - var picked = {}; - var omitted = {}; - - for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) { - var key = _propsKeys[_i]; - - if (keys.indexOf(key) >= 0) { - picked[key] = props[key]; - } else { - omitted[key] = props[key]; - } - } - - return [picked, omitted]; -} -/** - * Splits an object (`props`) into a tuple where the first item - * is the `state` property, and the second item is the rest of the properties. - * - * It is also backward compatible with version 1. If `keys` are passed then - * splits an object (`props`) into a tuple where the first item is an object - * with the passed `keys`, and the second item is an object with these keys - * omitted. - * - * @example - * import { splitProps } from "reakit-utils"; - * - * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }] - * - * @example - * import { splitProps } from "reakit-utils"; - * - * splitProps({ state: { a: "a" }, b: "b" }); // [{ a: "a" }, { b: "b" }] - */ - - -function splitProps(props, keys) { - if (keys === void 0) { - keys = []; - } - - if (!isPlainObject(props.state)) { - return __deprecatedSplitProps(props, keys); - } - - var _deprecatedSplitProp = __deprecatedSplitProps(props, [].concat(keys, ["state"])), - picked = _deprecatedSplitProp[0], - omitted = _deprecatedSplitProp[1]; - - var state = picked.state, - restPicked = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(picked, ["state"]); - - return [_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, state), restPicked), omitted]; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/shallowEqual.js -/** - * Compares two objects. - * - * @example - * import { shallowEqual } from "reakit-utils"; - * - * shallowEqual({ a: "a" }, {}); // false - * shallowEqual({ a: "a" }, { b: "b" }); // false - * shallowEqual({ a: "a" }, { a: "a" }); // true - * shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false - */ -function shallowEqual(objA, objB) { - if (objA === objB) return true; - if (!objA) return false; - if (!objB) return false; - if (typeof objA !== "object") return false; - if (typeof objB !== "object") return false; - var aKeys = Object.keys(objA); - var bKeys = Object.keys(objB); - var length = aKeys.length; - if (bKeys.length !== length) return false; - - for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) { - var key = _aKeys[_i]; - - if (objA[key] !== objB[key]) { - return false; - } - } - - return true; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/normalizePropsAreEqual.js - - - - -/** - * This higher order functions take `propsAreEqual` function and - * returns a new function which normalizes the props. - * - * Normalizing in our case is making sure the `propsAreEqual` works with - * both version 1 (object spreading) and version 2 (state object) state passing. - * - * To achieve this, the returned function in case of a state object - * will spread the state object in both `prev` and `next props. - * - * Other case it just returns the function as is which makes sure - * that we are still backward compatible - */ -function normalizePropsAreEqual(propsAreEqual) { - if (propsAreEqual.name === "normalizePropsAreEqualInner") { - return propsAreEqual; - } - - return function normalizePropsAreEqualInner(prev, next) { - if (!isPlainObject(prev.state) || !isPlainObject(next.state)) { - return propsAreEqual(prev, next); - } - - return propsAreEqual(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, prev.state), prev), _rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, next.state), next)); - }; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/createComponent.js - - - - - - - - -function createComponent_forwardRef(component) { - return /*#__PURE__*/(0,external_React_.forwardRef)(component); -} - -function memo(component, propsAreEqual) { - return /*#__PURE__*/(0,external_React_.memo)(component, propsAreEqual); -} - -/** - * Creates a React component. - * - * @example - * import { createComponent } from "reakit-system"; - * - * const A = createComponent({ as: "a" }); - * - * @param options - */ -function createComponent(_ref) { - var type = _ref.as, - useHook = _ref.useHook, - shouldMemo = _ref.memo, - _ref$propsAreEqual = _ref.propsAreEqual, - propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual, - _ref$keys = _ref.keys, - keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys, - _ref$useCreateElement = _ref.useCreateElement, - useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement : _ref$useCreateElement; - - var Comp = function Comp(_ref2, ref) { - var _ref2$as = _ref2.as, - as = _ref2$as === void 0 ? type : _ref2$as, - props = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(_ref2, ["as"]); - - if (useHook) { - var _as$render; - - var _splitProps = splitProps(props, keys), - _options = _splitProps[0], - htmlProps = _splitProps[1]; - - var _useHook = useHook(_options, _rollupPluginBabelHelpers_0c84a174_objectSpread2({ - ref: ref - }, htmlProps)), - wrapElement = _useHook.wrapElement, - elementProps = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(_useHook, ["wrapElement"]); // @ts-ignore - - - var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys; - var asOptions = asKeys && splitProps(props, asKeys)[0]; - var allProps = asOptions ? _rollupPluginBabelHelpers_0c84a174_objectSpread2(_rollupPluginBabelHelpers_0c84a174_objectSpread2({}, elementProps), asOptions) : elementProps; - - var _element = useCreateElement$1(as, allProps); - - if (wrapElement) { - return wrapElement(_element); - } - - return _element; - } - - return useCreateElement$1(as, _rollupPluginBabelHelpers_0c84a174_objectSpread2({ - ref: ref - }, props)); - }; - +function forwardRef2(render) { + const Role = React.forwardRef((props, ref) => render(__spreadProps(__spreadValues({}, props), { ref }))); + Role.displayName = render.displayName || render.name; + return Role; +} +function memo2(Component, propsAreEqual) { + const Role = React.memo(Component, propsAreEqual); + Role.displayName = Component.displayName || Component.name; + return Role; +} +function createComponent(render) { + const Role = (props, ref) => render(_4R3V3JGP_spreadValues({ ref }, props)); + return external_React_.forwardRef(Role); +} +function createMemoComponent(render) { + const Role = createComponent(render); + return external_React_.memo(Role); +} +function _3ORBWXWF_createElement(Type, props) { + const _a = props, { as: As, wrapElement, render } = _a, rest = __objRest(_a, ["as", "wrapElement", "render"]); + let element; + const mergedRef = useMergeRefs(props.ref, getRefProperty(render)); if (false) {} - - Comp = createComponent_forwardRef(Comp); - - if (shouldMemo) { - Comp = memo(Comp, propsAreEqual && normalizePropsAreEqual(propsAreEqual)); - } - - Comp.__keys = keys; - Comp.unstable_propsAreEqual = normalizePropsAreEqual(propsAreEqual || shallowEqual); - return Comp; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useToken.js - - - -/** - * React custom hook that returns the value of any token defined in the - * SystemContext. It's mainly used internally in [`useOptions`](#useoptions) - * and [`useProps`](#useprops). - * - * @example - * import { SystemProvider, useToken } from "reakit-system"; - * - * const system = { - * token: "value", - * }; - * - * function Component(props) { - * const token = useToken("token", "default value"); - * return
{token}
; - * } - * - * function App() { - * return ( - * - * - * - * ); - * } - */ - -function useToken(token, defaultValue) { - (0,external_React_.useDebugValue)(token); - var context = (0,external_React_.useContext)(SystemContext); - return context[token] != null ? context[token] : defaultValue; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useProps.js - - - - -/** - * React custom hook that returns the props returned by a given - * `use${name}Props` in the SystemContext. - * - * @example - * import { SystemProvider, useProps } from "reakit-system"; - * - * const system = { - * useAProps(options, htmlProps) { - * return { - * ...htmlProps, - * href: options.url, - * }; - * }, - * }; - * - * function A({ url, ...htmlProps }) { - * const props = useProps("A", { url }, htmlProps); - * return ; - * } - * - * function App() { - * return ( - * - * It will convert url into href in useAProps - * - * ); - * } - */ - -function useProps(name, options, htmlProps) { - if (options === void 0) { - options = {}; - } - - if (htmlProps === void 0) { - htmlProps = {}; - } - - var hookName = "use" + name + "Props"; - (0,external_React_.useDebugValue)(hookName); - var useHook = useToken(hookName); - - if (useHook) { - return useHook(options, htmlProps); - } - - return htmlProps; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useOptions.js - - - - - -/** - * React custom hook that returns the options returned by a given - * `use${name}Options` in the SystemContext. - * - * @example - * import React from "react"; - * import { SystemProvider, useOptions } from "reakit-system"; - * - * const system = { - * useAOptions(options, htmlProps) { - * return { - * ...options, - * url: htmlProps.href, - * }; - * }, - * }; - * - * function A({ url, ...htmlProps }) { - * const options = useOptions("A", { url }, htmlProps); - * return ; - * } - * - * function App() { - * return ( - * - * - * It will convert href into url in useAOptions and then url into href in A - * - * - * ); - * } - */ - -function useOptions(name, options, htmlProps) { - if (options === void 0) { - options = {}; - } - - if (htmlProps === void 0) { - htmlProps = {}; - } - - var hookName = "use" + name + "Options"; - (0,external_React_.useDebugValue)(hookName); - var useHook = useToken(hookName); - - if (useHook) { - return _rollupPluginBabelHelpers_0c84a174_objectSpread2(_rollupPluginBabelHelpers_0c84a174_objectSpread2({}, options), useHook(options, htmlProps)); - } - - return options; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/toArray.js -/** - * Transforms `arg` into an array if it's not already. - * - * @example - * import { toArray } from "reakit-utils"; - * - * toArray("a"); // ["a"] - * toArray(["a"]); // ["a"] - */ -function toArray(arg) { - if (Array.isArray(arg)) { - return arg; - } - - return typeof arg !== "undefined" ? [arg] : []; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-system/es/createHook.js - - - - - - - - - -/** - * Creates a React custom hook that will return component props. - * - * @example - * import { createHook } from "reakit-system"; - * - * const useA = createHook({ - * name: "A", - * keys: ["url"], // custom props/options keys - * useProps(options, htmlProps) { - * return { - * ...htmlProps, - * href: options.url, - * }; - * }, - * }); - * - * function A({ url, ...htmlProps }) { - * const props = useA({ url }, htmlProps); - * return ; - * } - * - * @param options - */ -function createHook(options) { - var _options$useState, _composedHooks$; - - var composedHooks = toArray(options.compose); - - var __useOptions = function __useOptions(hookOptions, htmlProps) { - // Call the current hook's useOptions first - if (options.useOptions) { - hookOptions = options.useOptions(hookOptions, htmlProps); - } // If there's name, call useOptions from the system context - - - if (options.name) { - hookOptions = useOptions(options.name, hookOptions, htmlProps); - } // Run composed hooks useOptions - - - if (options.compose) { - for (var _iterator = _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(composedHooks), _step; !(_step = _iterator()).done;) { - var hook = _step.value; - hookOptions = hook.__useOptions(hookOptions, htmlProps); - } - } - - return hookOptions; - }; - - var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) { - if (hookOptions === void 0) { - hookOptions = {}; - } - - if (htmlProps === void 0) { - htmlProps = {}; - } - - if (unstable_ignoreUseOptions === void 0) { - unstable_ignoreUseOptions = false; - } - - // This won't execute when useHook was called from within another useHook - if (!unstable_ignoreUseOptions) { - hookOptions = __useOptions(hookOptions, htmlProps); - } // Call the current hook's useProps - - - if (options.useProps) { - htmlProps = options.useProps(hookOptions, htmlProps); - } // If there's name, call useProps from the system context - - - if (options.name) { - htmlProps = useProps(options.name, hookOptions, htmlProps); - } - - if (options.compose) { - if (options.useComposeOptions) { - hookOptions = options.useComposeOptions(hookOptions, htmlProps); - } - - if (options.useComposeProps) { - htmlProps = options.useComposeProps(hookOptions, htmlProps); - } else { - for (var _iterator2 = _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(composedHooks), _step2; !(_step2 = _iterator2()).done;) { - var hook = _step2.value; - htmlProps = hook(hookOptions, htmlProps, true); - } - } - } // Remove undefined values from htmlProps - - - var finalHTMLProps = {}; - var definedHTMLProps = htmlProps || {}; - - for (var prop in definedHTMLProps) { - if (definedHTMLProps[prop] !== undefined) { - finalHTMLProps[prop] = definedHTMLProps[prop]; - } - } - - return finalHTMLProps; - }; - - useHook.__useOptions = __useOptions; - var composedKeys = composedHooks.reduce(function (keys, hook) { - keys.push.apply(keys, hook.__keys || []); - return keys; - }, []); // It's used by createComponent to split option props (keys) and html props - - useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []); - useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual; - - if (false) {} - - return useHook; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useForkRef.js - - -// https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js - -function setRef(ref, value) { - if (value === void 0) { - value = null; - } - - if (!ref) return; - - if (typeof ref === "function") { - ref(value); + if (As && typeof As !== "string") { + element = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(As, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, rest), { render })); + } else if (external_React_.isValidElement(render)) { + const renderProps = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, render.props), { ref: mergedRef }); + element = external_React_.cloneElement(render, mergeProps(rest, renderProps)); + } else if (render) { + element = render(rest); + } else if (isRenderProp(props.children)) { + if (false) {} + const _b = rest, { children } = _b, otherProps = __objRest(_b, ["children"]); + element = props.children(otherProps); + } else if (As) { + element = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(As, _4R3V3JGP_spreadValues({}, rest)); } else { - ref.current = value; - } -} -/** - * Merges up to two React Refs into a single memoized function React Ref so you - * can pass it to an element. - * - * @example - * import React from "react"; - * import { useForkRef } from "reakit-utils"; - * - * const Component = React.forwardRef((props, ref) => { - * const internalRef = React.useRef(); - * return
; - * }); - */ - - -function useForkRef(refA, refB) { - return (0,external_React_.useMemo)(function () { - if (refA == null && refB == null) { - return null; - } - - return function (value) { - setRef(refA, value); - setRef(refB, value); - }; - }, [refA, refB]); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-warning/es/useWarning.js - - - - - -function isRefObject(ref) { - return isObject(ref) && "current" in ref; -} -/** - * Logs `messages` to the console using `console.warn` based on a `condition`. - * This should be used inside components. - */ - - -function useWarning(condition) { - for (var _len = arguments.length, messages = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - messages[_key - 1] = arguments[_key]; - } - - if (false) {} -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-warning/es/index.js - - - - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getDocument.js -/** - * Returns `element.ownerDocument || document`. - */ -function getDocument(element) { - return element ? element.ownerDocument || element : document; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getWindow.js - - -// Thanks to Fluent UI for doing the [research on IE11 memory leak](https://github.com/microsoft/fluentui/pull/9010#issuecomment-490768427) - -var _window; // Note: Accessing "window" in IE11 is somewhat expensive, and calling "typeof window" -// hits a memory leak, whereas aliasing it and calling "typeof _window" does not. -// Caching the window value at the file scope lets us minimize the impact. - - -try { - _window = window; -} catch (e) { - /* no-op */ -} -/** - * Returns `element.ownerDocument.defaultView || window`. - */ - - -function getWindow(element) { - if (!element) { - return _window; - } - - return getDocument(element).defaultView || _window; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/canUseDOM.js - - - -function checkIsBrowser() { - var _window = getWindow(); - - return Boolean(typeof _window !== "undefined" && _window.document && _window.document.createElement); -} -/** - * It's `true` if it is running in a browser environment or `false` if it is not (SSR). - * - * @example - * import { canUseDOM } from "reakit-utils"; - * - * const title = canUseDOM ? document.title : ""; - */ - - -var canUseDOM = checkIsBrowser(); - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useIsomorphicEffect.js - - - - - -/** - * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side - * rendering. - */ - -var useIsomorphicEffect = !canUseDOM ? external_React_.useEffect : external_React_.useLayoutEffect; - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useLiveRef.js - - - - - - -/** - * A `React.Ref` that keeps track of the passed `value`. - */ - -function useLiveRef(value) { - var ref = (0,external_React_.useRef)(value); - useIsomorphicEffect(function () { - ref.current = value; - }); - return ref; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isSelfTarget.js -/** - * Returns `true` if `event.target` and `event.currentTarget` are the same. - */ -function isSelfTarget(event) { - return event.target === event.currentTarget; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getActiveElement.js - - -/** - * Returns `element.ownerDocument.activeElement`. - */ - -function getActiveElement_getActiveElement(element) { - var _getDocument = getDocument(element), - activeElement = _getDocument.activeElement; - - if (!(activeElement !== null && activeElement !== void 0 && activeElement.nodeName)) { - // In IE11, activeElement might be an empty object if we're interacting - // with elements inside of an iframe. - return null; - } - - return activeElement; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/contains.js -/** - * Similar to `Element.prototype.contains`, but a little bit faster when - * `element` is the same as `child`. - * - * @example - * import { contains } from "reakit-utils"; - * - * contains(document.getElementById("parent"), document.getElementById("child")); - */ -function contains(parent, child) { - return parent === child || parent.contains(child); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/hasFocusWithin.js - - - - -/** - * Checks if `element` has focus within. Elements that are referenced by - * `aria-activedescendant` are also considered. - * - * @example - * import { hasFocusWithin } from "reakit-utils"; - * - * hasFocusWithin(document.getElementById("id")); - */ - -function hasFocusWithin(element) { - var activeElement = getActiveElement_getActiveElement(element); - if (!activeElement) return false; - if (contains(element, activeElement)) return true; - var activeDescendant = activeElement.getAttribute("aria-activedescendant"); - if (!activeDescendant) return false; - if (activeDescendant === element.id) return true; - return !!element.querySelector("#" + activeDescendant); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPortalEvent.js - - -/** - * Returns `true` if `event` has been fired within a React Portal element. - */ - -function isPortalEvent(event) { - return !contains(event.currentTarget, event.target); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isButton.js -var buttonInputTypes = ["button", "color", "file", "image", "reset", "submit"]; -/** - * Checks whether `element` is a native HTML button element. - * - * @example - * import { isButton } from "reakit-utils"; - * - * isButton(document.querySelector("button")); // true - * isButton(document.querySelector("input[type='button']")); // true - * isButton(document.querySelector("div")); // false - * isButton(document.querySelector("input[type='text']")); // false - * isButton(document.querySelector("div[role='button']")); // false - * - * @returns {boolean} - */ - -function isButton(element) { - if (element.tagName === "BUTTON") return true; - - if (element.tagName === "INPUT") { - var input = element; - return buttonInputTypes.indexOf(input.type) !== -1; - } - + element = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Type, _4R3V3JGP_spreadValues({}, rest)); + } + if (wrapElement) { + return wrapElement(element); + } + return element; +} +function createHook(useProps) { + const useRole = (props = {}) => { + const htmlProps = useProps(props); + const copy = {}; + for (const prop in htmlProps) { + if (Y3OOHFCN_hasOwnProperty(htmlProps, prop) && htmlProps[prop] !== void 0) { + copy[prop] = htmlProps[prop]; + } + } + return copy; + }; + return useRole; +} +function createStoreContext(providers = [], scopedProviders = []) { + const context = external_React_.createContext(void 0); + const scopedContext = external_React_.createContext(void 0); + const useContext2 = () => external_React_.useContext(context); + const useScopedContext = (onlyScoped = false) => { + const scoped = external_React_.useContext(scopedContext); + const store = useContext2(); + if (onlyScoped) + return scoped; + return scoped || store; + }; + const useProviderContext = () => { + const scoped = external_React_.useContext(scopedContext); + const store = useContext2(); + if (scoped && scoped === store) + return; + return store; + }; + const ContextProvider = (props) => { + return providers.reduceRight( + (children, Provider) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Provider, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { children })), + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(context.Provider, _4R3V3JGP_spreadValues({}, props)) + ); + }; + const ScopedContextProvider = (props) => { + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ContextProvider, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { children: scopedProviders.reduceRight( + (children, Provider) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Provider, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { children })), + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(scopedContext.Provider, _4R3V3JGP_spreadValues({}, props)) + ) })); + }; + return { + context, + scopedContext, + useContext: useContext2, + useScopedContext, + useProviderContext, + ContextProvider, + ScopedContextProvider + }; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/utils/focus.js +"use client"; + + + +// src/utils/focus.ts +var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])"; +function hasNegativeTabIndex(element) { + const tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10); + return tabIndex < 0; +} +function isFocusable(element) { + if (!matches(element, selector)) + return false; + if (!isVisible(element)) + return false; + if (DLOEKDPY_closest(element, "[inert]")) + return false; + return true; +} +function isTabbable(element) { + if (!isFocusable(element)) + return false; + if (hasNegativeTabIndex(element)) + return false; + if (!("form" in element)) + return true; + if (!element.form) + return true; + if (element.checked) + return true; + if (element.type !== "radio") + return true; + const radioGroup = element.form.elements.namedItem(element.name); + if (!radioGroup) + return true; + if (!("length" in radioGroup)) + return true; + const activeElement = getActiveElement(element); + if (!activeElement) + return true; + if (activeElement === element) + return true; + if (!("form" in activeElement)) + return true; + if (activeElement.form !== element.form) + return true; + if (activeElement.name !== element.name) + return true; return false; } - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/dom.js - - - - -/** - * Checks if a given string exists in the user agent string. - */ - -function isUA(string) { - if (!canUseDOM) return false; - return window.navigator.userAgent.indexOf(string) !== -1; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/matches.js -/** - * Ponyfill for `Element.prototype.matches` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches - */ -function matches(element, selectors) { - if ("matches" in element) { - return element.matches(selectors); - } - - if ("msMatchesSelector" in element) { - return element.msMatchesSelector(selectors); - } - - return element.webkitMatchesSelector(selectors); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/tabbable.js - - - - - -/** @module tabbable */ -var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), " + "textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], " + "iframe, object, embed, area[href], audio[controls], video[controls], " + "[contenteditable]:not([contenteditable='false'])"; - -function isVisible(element) { - var htmlElement = element; - return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0; -} - -function hasNegativeTabIndex(element) { - var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10); - return tabIndex < 0; -} -/** - * Checks whether `element` is focusable or not. - * - * @memberof tabbable - * - * @example - * import { isFocusable } from "reakit-utils"; - * - * isFocusable(document.querySelector("input")); // true - * isFocusable(document.querySelector("input[tabindex='-1']")); // true - * isFocusable(document.querySelector("input[hidden]")); // false - * isFocusable(document.querySelector("input:disabled")); // false - */ - - -function isFocusable(element) { - return matches(element, selector) && isVisible(element); -} -/** - * Checks whether `element` is tabbable or not. - * - * @memberof tabbable - * - * @example - * import { isTabbable } from "reakit-utils"; - * - * isTabbable(document.querySelector("input")); // true - * isTabbable(document.querySelector("input[tabindex='-1']")); // false - * isTabbable(document.querySelector("input[hidden]")); // false - * isTabbable(document.querySelector("input:disabled")); // false - */ - -function isTabbable(element) { - return isFocusable(element) && !hasNegativeTabIndex(element); -} -/** - * Returns all the focusable elements in `container`. - * - * @memberof tabbable - * - * @param {Element} container - * - * @returns {Element[]} - */ - -function getAllFocusableIn(container) { - var allFocusable = Array.from(container.querySelectorAll(selector)); - allFocusable.unshift(container); - return allFocusable.filter(isFocusable); -} -/** - * Returns the first focusable element in `container`. - * - * @memberof tabbable - * - * @param {Element} container - * - * @returns {Element|null} - */ - -function getFirstFocusableIn(container) { - var _getAllFocusableIn = getAllFocusableIn(container), - first = _getAllFocusableIn[0]; - +function getAllFocusableIn(container, includeContainer) { + const elements = Array.from( + container.querySelectorAll(selector) + ); + if (includeContainer) { + elements.unshift(container); + } + const focusableElements = elements.filter(isFocusable); + focusableElements.forEach((element, i) => { + if (isFrame(element) && element.contentDocument) { + const frameBody = element.contentDocument.body; + focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody)); + } + }); + return focusableElements; +} +function getAllFocusable(includeBody) { + return getAllFocusableIn(document.body, includeBody); +} +function getFirstFocusableIn(container, includeContainer) { + const [first] = getAllFocusableIn(container, includeContainer); return first || null; } -/** - * Returns all the tabbable elements in `container`, including the container - * itself. - * - * @memberof tabbable - * - * @param {Element} container - * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones. - * - * @returns {Element[]} - */ - -function getAllTabbableIn(container, fallbackToFocusable) { - var allFocusable = Array.from(container.querySelectorAll(selector)); - var allTabbable = allFocusable.filter(isTabbable); - - if (isTabbable(container)) { - allTabbable.unshift(container); - } - - if (!allTabbable.length && fallbackToFocusable) { - return allFocusable; - } - - return allTabbable; -} -/** - * Returns the first tabbable element in `container`, including the container - * itself if it's tabbable. - * - * @memberof tabbable - * - * @param {Element} container - * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones. - * - * @returns {Element|null} - */ - -function getFirstTabbableIn(container, fallbackToFocusable) { - var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable), - first = _getAllTabbableIn[0]; - +function getFirstFocusable(includeBody) { + return getFirstFocusableIn(document.body, includeBody); +} +function getAllTabbableIn(container, includeContainer, fallbackToFocusable) { + const elements = Array.from( + container.querySelectorAll(selector) + ); + const tabbableElements = elements.filter(isTabbable); + if (includeContainer && isTabbable(container)) { + tabbableElements.unshift(container); + } + tabbableElements.forEach((element, i) => { + if (isFrame(element) && element.contentDocument) { + const frameBody = element.contentDocument.body; + const allFrameTabbable = getAllTabbableIn( + frameBody, + false, + fallbackToFocusable + ); + tabbableElements.splice(i, 1, ...allFrameTabbable); + } + }); + if (!tabbableElements.length && fallbackToFocusable) { + return elements; + } + return tabbableElements; +} +function getAllTabbable(fallbackToFocusable) { + return getAllTabbableIn(document.body, false, fallbackToFocusable); +} +function getFirstTabbableIn(container, includeContainer, fallbackToFocusable) { + const [first] = getAllTabbableIn( + container, + includeContainer, + fallbackToFocusable + ); return first || null; } -/** - * Returns the last tabbable element in `container`, including the container - * itself if it's tabbable. - * - * @memberof tabbable - * - * @param {Element} container - * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones. - * - * @returns {Element|null} - */ - -function getLastTabbableIn(container, fallbackToFocusable) { - var allTabbable = getAllTabbableIn(container, fallbackToFocusable); +function getFirstTabbable(fallbackToFocusable) { + return getFirstTabbableIn(document.body, false, fallbackToFocusable); +} +function getLastTabbableIn(container, includeContainer, fallbackToFocusable) { + const allTabbable = getAllTabbableIn( + container, + includeContainer, + fallbackToFocusable + ); return allTabbable[allTabbable.length - 1] || null; } -/** - * Returns the next tabbable element in `container`. - * - * @memberof tabbable - * - * @param {Element} container - * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones. - * - * @returns {Element|null} - */ - -function getNextTabbableIn(container, fallbackToFocusable) { - var activeElement = getActiveElement(container); - var allFocusable = getAllFocusableIn(container); - var index = allFocusable.indexOf(activeElement); - var slice = allFocusable.slice(index + 1); - return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null); -} -/** - * Returns the previous tabbable element in `container`. - * - * @memberof tabbable - * - * @param {Element} container - * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones. - * - * @returns {Element|null} - */ - -function getPreviousTabbableIn(container, fallbackToFocusable) { - var activeElement = getActiveElement(container); - var allFocusable = getAllFocusableIn(container).reverse(); - var index = allFocusable.indexOf(activeElement); - var slice = allFocusable.slice(index + 1); - return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null); -} -/** - * Returns the closest focusable element. - * - * @memberof tabbable - * - * @param {Element} container - * - * @returns {Element|null} - */ - +function getLastTabbable(fallbackToFocusable) { + return getLastTabbableIn(document.body, false, fallbackToFocusable); +} +function getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) { + const activeElement = getActiveElement(container); + const allFocusable = getAllFocusableIn(container, includeContainer); + const activeIndex = allFocusable.indexOf(activeElement); + const nextFocusableElements = allFocusable.slice(activeIndex + 1); + return nextFocusableElements.find(isTabbable) || (fallbackToFirst ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? nextFocusableElements[0] : null) || null; +} +function getNextTabbable(fallbackToFirst, fallbackToFocusable) { + return getNextTabbableIn( + document.body, + false, + fallbackToFirst, + fallbackToFocusable + ); +} +function getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) { + const activeElement = getActiveElement(container); + const allFocusable = getAllFocusableIn(container, includeContainer).reverse(); + const activeIndex = allFocusable.indexOf(activeElement); + const previousFocusableElements = allFocusable.slice(activeIndex + 1); + return previousFocusableElements.find(isTabbable) || (fallbackToLast ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? previousFocusableElements[0] : null) || null; +} +function getPreviousTabbable(fallbackToFirst, fallbackToFocusable) { + return getPreviousTabbableIn( + document.body, + false, + fallbackToFirst, + fallbackToFocusable + ); +} function getClosestFocusable(element) { while (element && !isFocusable(element)) { element = closest(element, selector); } - - return element; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/Role/Role.js - - - - - -// Automatically generated -var ROLE_KEYS = ["unstable_system"]; - -var useRole = createHook({ - name: "Role", - keys: ROLE_KEYS, - propsAreEqual: function propsAreEqual(prev, next) { - var prevSystem = prev.unstable_system, - prevProps = _objectWithoutPropertiesLoose(prev, ["unstable_system"]); - - var nextSystem = next.unstable_system, - nextProps = _objectWithoutPropertiesLoose(next, ["unstable_system"]); - - if (prevSystem !== nextSystem && !shallowEqual(prevSystem, nextSystem)) { - return false; - } - - return shallowEqual(prevProps, nextProps); - } -}); -var Role = createComponent({ - as: "div", - useHook: useRole -}); - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/Tabbable/Tabbable.js - - - - - - - - - - - - - - - - -// Automatically generated -var TABBABLE_KEYS = ["disabled", "focusable"]; - -var isSafariOrFirefoxOnMac = isUA("Mac") && !isUA("Chrome") && (isUA("Safari") || isUA("Firefox")); - + return element || null; +} +function hasFocus(element) { + const activeElement = getActiveElement(element); + if (!activeElement) + return false; + if (activeElement === element) + return true; + const activeDescendant = activeElement.getAttribute("aria-activedescendant"); + if (!activeDescendant) + return false; + return activeDescendant === element.id; +} +function hasFocusWithin(element) { + const activeElement = getActiveElement(element); + if (!activeElement) + return false; + if (contains(element, activeElement)) + return true; + const activeDescendant = activeElement.getAttribute("aria-activedescendant"); + if (!activeDescendant) + return false; + if (!("id" in element)) + return false; + if (activeDescendant === element.id) + return true; + return !!element.querySelector(`#${CSS.escape(activeDescendant)}`); +} function focusIfNeeded(element) { if (!hasFocusWithin(element) && isFocusable(element)) { element.focus(); } } - -function isNativeTabbable(element) { - return ["BUTTON", "INPUT", "SELECT", "TEXTAREA", "A"].includes(element.tagName); -} - -function supportsDisabledAttribute(element) { - return ["BUTTON", "INPUT", "SELECT", "TEXTAREA"].includes(element.tagName); -} - -function getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex) { +function disableFocus(element) { + var _a; + const currentTabindex = (_a = element.getAttribute("tabindex")) != null ? _a : ""; + element.setAttribute("data-tabindex", currentTabindex); + element.setAttribute("tabindex", "-1"); +} +function disableFocusIn(container, includeContainer) { + const tabbableElements = getAllTabbableIn(container, includeContainer); + tabbableElements.forEach(disableFocus); +} +function restoreFocusIn(container) { + const elements = container.querySelectorAll("[data-tabindex]"); + const restoreTabIndex = (element) => { + const tabindex = element.getAttribute("data-tabindex"); + element.removeAttribute("data-tabindex"); + if (tabindex) { + element.setAttribute("tabindex", tabindex); + } else { + element.removeAttribute("tabindex"); + } + }; + if (container.hasAttribute("data-tabindex")) { + restoreTabIndex(container); + } + elements.forEach(restoreTabIndex); +} +function focusIntoView(element, options) { + if (!("scrollIntoView" in element)) { + element.focus(); + } else { + element.focus({ preventScroll: true }); + element.scrollIntoView(_chunks_4R3V3JGP_spreadValues({ block: "nearest", inline: "nearest" }, options)); + } +} + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/KK7H3W2B.js +"use client"; + + + + + +// src/focusable/focusable.ts + + + + + + +var isSafariBrowser = isSafari(); +var alwaysFocusVisibleInputTypes = [ + "text", + "search", + "url", + "tel", + "email", + "password", + "number", + "date", + "month", + "week", + "time", + "datetime", + "datetime-local" +]; +function isAlwaysFocusVisible(element) { + const { tagName, readOnly, type } = element; + if (tagName === "TEXTAREA" && !readOnly) + return true; + if (tagName === "SELECT" && !readOnly) + return true; + if (tagName === "INPUT" && !readOnly) { + return alwaysFocusVisibleInputTypes.includes(type); + } + if (element.isContentEditable) + return true; + return false; +} +function isAlwaysFocusVisibleDelayed(element) { + const role = element.getAttribute("role"); + if (role !== "combobox") + return false; + return !!element.dataset.name; +} +function getLabels(element) { + if ("labels" in element) { + return element.labels; + } + return null; +} +function isNativeCheckboxOrRadio(element) { + const tagName = element.tagName.toLowerCase(); + if (tagName === "input" && element.type) { + return element.type === "radio" || element.type === "checkbox"; + } + return false; +} +function isNativeTabbable(tagName) { + if (!tagName) + return true; + return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea" || tagName === "a"; +} +function supportsDisabledAttribute(tagName) { + if (!tagName) + return true; + return tagName === "button" || tagName === "input" || tagName === "select" || tagName === "textarea"; +} +function getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) { + if (!focusable) { + return tabIndexProp; + } if (trulyDisabled) { if (nativeTabbable && !supportsDisabled) { - // Anchor, audio and video tags don't support the `disabled` attribute. - // We must pass tabIndex={-1} so they don't receive focus on tab. return -1; - } // Elements that support the `disabled` attribute don't need tabIndex. - - - return undefined; - } - + } + return; + } if (nativeTabbable) { - // If the element is enabled and it's natively tabbable, we don't need to - // specify a tabIndex attribute unless it's explicitly set by the user. - return htmlTabIndex; - } // If the element is enabled and is not natively tabbable, we have to - // fallback tabIndex={0}. - - - return htmlTabIndex || 0; -} - -function useDisableEvent(htmlEventRef, disabled) { - return (0,external_React_.useCallback)(function (event) { - var _htmlEventRef$current; - - (_htmlEventRef$current = htmlEventRef.current) === null || _htmlEventRef$current === void 0 ? void 0 : _htmlEventRef$current.call(htmlEventRef, event); - if (event.defaultPrevented) return; - + return tabIndexProp; + } + return tabIndexProp || 0; +} +function useDisableEvent(onEvent, disabled) { + return useEvent((event) => { + onEvent == null ? void 0 : onEvent(event); + if (event.defaultPrevented) + return; if (disabled) { event.stopPropagation(); event.preventDefault(); } - }, [htmlEventRef, disabled]); -} - -var useTabbable = createHook({ - name: "Tabbable", - compose: useRole, - keys: TABBABLE_KEYS, - useOptions: function useOptions(options, _ref) { - var disabled = _ref.disabled; - return _objectSpread2({ - disabled: disabled - }, options); - }, - useProps: function useProps(options, _ref2) { - var htmlRef = _ref2.ref, - htmlTabIndex = _ref2.tabIndex, - htmlOnClickCapture = _ref2.onClickCapture, - htmlOnMouseDownCapture = _ref2.onMouseDownCapture, - htmlOnMouseDown = _ref2.onMouseDown, - htmlOnKeyPressCapture = _ref2.onKeyPressCapture, - htmlStyle = _ref2.style, - htmlProps = _objectWithoutPropertiesLoose(_ref2, ["ref", "tabIndex", "onClickCapture", "onMouseDownCapture", "onMouseDown", "onKeyPressCapture", "style"]); - - var ref = (0,external_React_.useRef)(null); - var onClickCaptureRef = useLiveRef(htmlOnClickCapture); - var onMouseDownCaptureRef = useLiveRef(htmlOnMouseDownCapture); - var onMouseDownRef = useLiveRef(htmlOnMouseDown); - var onKeyPressCaptureRef = useLiveRef(htmlOnKeyPressCapture); - var trulyDisabled = !!options.disabled && !options.focusable; - - var _React$useState = (0,external_React_.useState)(true), - nativeTabbable = _React$useState[0], - setNativeTabbable = _React$useState[1]; - - var _React$useState2 = (0,external_React_.useState)(true), - supportsDisabled = _React$useState2[0], - setSupportsDisabled = _React$useState2[1]; - - var style = options.disabled ? _objectSpread2({ - pointerEvents: "none" - }, htmlStyle) : htmlStyle; - useIsomorphicEffect(function () { - var tabbable = ref.current; - - if (!tabbable) { - false ? 0 : void 0; - return; - } - - if (!isNativeTabbable(tabbable)) { - setNativeTabbable(false); - } - - if (!supportsDisabledAttribute(tabbable)) { - setSupportsDisabled(false); - } - }, []); - var onClickCapture = useDisableEvent(onClickCaptureRef, options.disabled); - var onMouseDownCapture = useDisableEvent(onMouseDownCaptureRef, options.disabled); - var onKeyPressCapture = useDisableEvent(onKeyPressCaptureRef, options.disabled); - var onMouseDown = (0,external_React_.useCallback)(function (event) { - var _onMouseDownRef$curre; - - (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event); - var element = event.currentTarget; - if (event.defaultPrevented) return; // Safari and Firefox on MacOS don't focus on buttons on mouse down - // like other browsers/platforms. Instead, they focus on the closest - // focusable ancestor element, which is ultimately the body element. So - // we make sure to give focus to the tabbable element on mouse down so - // it works consistently across browsers. - - if (!isSafariOrFirefoxOnMac) return; - if (isPortalEvent(event)) return; - if (!isButton(element)) return; // We can't focus right away after on mouse down, otherwise it would - // prevent drag events from happening. So we schedule the focus to the - // next animation frame. - - var raf = requestAnimationFrame(function () { - element.removeEventListener("mouseup", focusImmediately, true); + }); +} +var isKeyboardModality = true; +function onGlobalMouseDown(event) { + const target = event.target; + if (target && "hasAttribute" in target) { + if (!target.hasAttribute("data-focus-visible")) { + isKeyboardModality = false; + } + } +} +function onGlobalKeyDown(event) { + if (event.metaKey) + return; + if (event.ctrlKey) + return; + if (event.altKey) + return; + isKeyboardModality = true; +} +var useFocusable = createHook( + (_a) => { + var _b = _a, { + focusable = true, + accessibleWhenDisabled, + autoFocus, + onFocusVisible + } = _b, props = __objRest(_b, [ + "focusable", + "accessibleWhenDisabled", + "autoFocus", + "onFocusVisible" + ]); + const ref = (0,external_React_.useRef)(null); + (0,external_React_.useEffect)(() => { + if (!focusable) + return; + addGlobalEventListener("mousedown", onGlobalMouseDown, true); + addGlobalEventListener("keydown", onGlobalKeyDown, true); + }, [focusable]); + if (isSafariBrowser) { + (0,external_React_.useEffect)(() => { + if (!focusable) + return; + const element = ref.current; + if (!element) + return; + if (!isNativeCheckboxOrRadio(element)) + return; + const labels = getLabels(element); + if (!labels) + return; + const onMouseUp = () => queueMicrotask(() => element.focus()); + labels.forEach((label) => label.addEventListener("mouseup", onMouseUp)); + return () => { + labels.forEach( + (label) => label.removeEventListener("mouseup", onMouseUp) + ); + }; + }, [focusable]); + } + const disabled = focusable && disabledFromProps(props); + const trulyDisabled = !!disabled && !accessibleWhenDisabled; + const [focusVisible, setFocusVisible] = (0,external_React_.useState)(false); + (0,external_React_.useEffect)(() => { + if (!focusable) + return; + if (trulyDisabled && focusVisible) { + setFocusVisible(false); + } + }, [focusable, trulyDisabled, focusVisible]); + (0,external_React_.useEffect)(() => { + if (!focusable) + return; + if (!focusVisible) + return; + const element = ref.current; + if (!element) + return; + if (typeof IntersectionObserver === "undefined") + return; + const observer = new IntersectionObserver(() => { + if (!isFocusable(element)) { + setFocusVisible(false); + } + }); + observer.observe(element); + return () => observer.disconnect(); + }, [focusable, focusVisible]); + const onKeyPressCapture = useDisableEvent( + props.onKeyPressCapture, + disabled + ); + const onMouseDownCapture = useDisableEvent( + props.onMouseDownCapture, + disabled + ); + const onClickCapture = useDisableEvent(props.onClickCapture, disabled); + const onMouseDownProp = props.onMouseDown; + const onMouseDown = useEvent((event) => { + onMouseDownProp == null ? void 0 : onMouseDownProp(event); + if (event.defaultPrevented) + return; + if (!focusable) + return; + const element = event.currentTarget; + if (!isSafariBrowser) + return; + if (isPortalEvent(event)) + return; + if (!isButton(element) && !isNativeCheckboxOrRadio(element)) + return; + let receivedFocus = false; + const onFocus = () => { + receivedFocus = true; + }; + const options = { capture: true, once: true }; + element.addEventListener("focusin", onFocus, options); + queueBeforeEvent(element, "mouseup", () => { + element.removeEventListener("focusin", onFocus, true); + if (receivedFocus) + return; focusIfNeeded(element); - }); // If mouseUp happens before the next animation frame (which is common - // on touch screens or by just tapping the trackpad on MacBook's), we - // cancel the animation frame and immediately focus on the element. - - var focusImmediately = function focusImmediately() { - cancelAnimationFrame(raf); - focusIfNeeded(element); - }; // By listening to the event in the capture phase, we make sure the - // focus event is fired before the onMouseUp and onMouseUpCapture React - // events, which is aligned with the default browser behavior. - - - element.addEventListener("mouseup", focusImmediately, { - once: true, - capture: true - }); - }, []); - return _objectSpread2({ - ref: useForkRef(ref, htmlRef), - style: style, - tabIndex: getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex), - disabled: trulyDisabled && supportsDisabled ? true : undefined, - "aria-disabled": options.disabled ? true : undefined, - onClickCapture: onClickCapture, - onMouseDownCapture: onMouseDownCapture, - onMouseDown: onMouseDown, - onKeyPressCapture: onKeyPressCapture - }, htmlProps); - } -}); -var Tabbable = createComponent({ - as: "div", - useHook: useTabbable -}); - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/Clickable/Clickable.js - - - - - - - - - - - - - - - - - - -// Automatically generated -var CLICKABLE_KEYS = ["unstable_clickOnEnter", "unstable_clickOnSpace"]; + }); + }); + const handleFocusVisible = (event, currentTarget) => { + if (currentTarget) { + event.currentTarget = currentTarget; + } + if (!focusable) + return; + const element = event.currentTarget; + if (!element) + return; + if (!hasFocus(element)) + return; + onFocusVisible == null ? void 0 : onFocusVisible(event); + if (event.defaultPrevented) + return; + setFocusVisible(true); + }; + const onKeyDownCaptureProp = props.onKeyDownCapture; + const onKeyDownCapture = useEvent( + (event) => { + onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event); + if (event.defaultPrevented) + return; + if (!focusable) + return; + if (focusVisible) + return; + if (event.metaKey) + return; + if (event.altKey) + return; + if (event.ctrlKey) + return; + if (!isSelfTarget(event)) + return; + const element = event.currentTarget; + queueMicrotask(() => handleFocusVisible(event, element)); + } + ); + const onFocusCaptureProp = props.onFocusCapture; + const onFocusCapture = useEvent((event) => { + onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event); + if (event.defaultPrevented) + return; + if (!focusable) + return; + if (!isSelfTarget(event)) { + setFocusVisible(false); + return; + } + const element = event.currentTarget; + const applyFocusVisible = () => handleFocusVisible(event, element); + if (isKeyboardModality || isAlwaysFocusVisible(event.target)) { + queueMicrotask(applyFocusVisible); + } else if (isAlwaysFocusVisibleDelayed(event.target)) { + queueBeforeEvent(event.target, "focusout", applyFocusVisible); + } else { + setFocusVisible(false); + } + }); + const onBlurProp = props.onBlur; + const onBlur = useEvent((event) => { + onBlurProp == null ? void 0 : onBlurProp(event); + if (!focusable) + return; + if (!isFocusEventOutside(event)) + return; + setFocusVisible(false); + }); + const autoFocusOnShow = (0,external_React_.useContext)(FocusableContext); + const autoFocusRef = useEvent((element) => { + if (!focusable) + return; + if (!autoFocus) + return; + if (!element) + return; + if (!autoFocusOnShow) + return; + queueMicrotask(() => { + if (hasFocus(element)) + return; + if (!isFocusable(element)) + return; + element.focus(); + }); + }); + const tagName = useTagName(ref, props.as); + const nativeTabbable = focusable && isNativeTabbable(tagName); + const supportsDisabled = focusable && supportsDisabledAttribute(tagName); + const style = trulyDisabled ? _4R3V3JGP_spreadValues({ pointerEvents: "none" }, props.style) : props.style; + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + "data-focus-visible": focusable && focusVisible ? "" : void 0, + "data-autofocus": autoFocus ? true : void 0, + "aria-disabled": disabled ? true : void 0 + }, props), { + ref: useMergeRefs(ref, autoFocusRef, props.ref), + style, + tabIndex: getTabIndex( + focusable, + trulyDisabled, + nativeTabbable, + supportsDisabled, + props.tabIndex + ), + disabled: supportsDisabled && trulyDisabled ? true : void 0, + // TODO: Test Focusable contentEditable. + contentEditable: disabled ? void 0 : props.contentEditable, + onKeyPressCapture, + onClickCapture, + onMouseDownCapture, + onMouseDown, + onKeyDownCapture, + onFocusCapture, + onBlur + }); + return props; + } +); +var Focusable = createComponent((props) => { + props = useFocusable(props); + return _3ORBWXWF_createElement("div", props); +}); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/NWCBQ4CV.js +"use client"; + + + + + +// src/command/command.ts + + + + function isNativeClick(event) { - var element = event.currentTarget; - if (!event.isTrusted) return false; // istanbul ignore next: can't test trusted events yet - - return isButton(element) || element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "SELECT"; -} - -var useClickable = createHook({ - name: "Clickable", - compose: useTabbable, - keys: CLICKABLE_KEYS, - useOptions: function useOptions(_ref) { - var _ref$unstable_clickOn = _ref.unstable_clickOnEnter, - unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? true : _ref$unstable_clickOn, - _ref$unstable_clickOn2 = _ref.unstable_clickOnSpace, - unstable_clickOnSpace = _ref$unstable_clickOn2 === void 0 ? true : _ref$unstable_clickOn2, - options = _objectWithoutPropertiesLoose(_ref, ["unstable_clickOnEnter", "unstable_clickOnSpace"]); - - return _objectSpread2({ - unstable_clickOnEnter: unstable_clickOnEnter, - unstable_clickOnSpace: unstable_clickOnSpace - }, options); - }, - useProps: function useProps(options, _ref2) { - var htmlOnKeyDown = _ref2.onKeyDown, - htmlOnKeyUp = _ref2.onKeyUp, - htmlProps = _objectWithoutPropertiesLoose(_ref2, ["onKeyDown", "onKeyUp"]); - - var _React$useState = (0,external_React_.useState)(false), - active = _React$useState[0], - setActive = _React$useState[1]; - - var onKeyDownRef = useLiveRef(htmlOnKeyDown); - var onKeyUpRef = useLiveRef(htmlOnKeyUp); - var onKeyDown = (0,external_React_.useCallback)(function (event) { - var _onKeyDownRef$current; - - (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event); - if (event.defaultPrevented) return; - if (options.disabled) return; - if (event.metaKey) return; - if (!isSelfTarget(event)) return; - var isEnter = options.unstable_clickOnEnter && event.key === "Enter"; - var isSpace = options.unstable_clickOnSpace && event.key === " "; - + if (!event.isTrusted) + return false; + const element = event.currentTarget; + if (event.key === "Enter") { + return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "A"; + } + if (event.key === " ") { + return isButton(element) || element.tagName === "SUMMARY" || element.tagName === "INPUT" || element.tagName === "SELECT"; + } + return false; +} +var symbol = Symbol("command"); +var useCommand = createHook( + (_a) => { + var _b = _a, { clickOnEnter = true, clickOnSpace = true } = _b, props = __objRest(_b, ["clickOnEnter", "clickOnSpace"]); + const ref = (0,external_React_.useRef)(null); + const tagName = useTagName(ref, props.as); + const type = props.type; + const [isNativeButton, setIsNativeButton] = (0,external_React_.useState)( + () => !!tagName && isButton({ tagName, type }) + ); + (0,external_React_.useEffect)(() => { + if (!ref.current) + return; + setIsNativeButton(isButton(ref.current)); + }, []); + const [active, setActive] = (0,external_React_.useState)(false); + const activeRef = (0,external_React_.useRef)(false); + const disabled = disabledFromProps(props); + const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true); + const onKeyDownProp = props.onKeyDown; + const onKeyDown = useEvent((event) => { + onKeyDownProp == null ? void 0 : onKeyDownProp(event); + const element = event.currentTarget; + if (event.defaultPrevented) + return; + if (isDuplicate) + return; + if (disabled) + return; + if (!isSelfTarget(event)) + return; + if (DLOEKDPY_isTextField(element)) + return; + if (element.isContentEditable) + return; + const isEnter = clickOnEnter && event.key === "Enter"; + const isSpace = clickOnSpace && event.key === " "; + const shouldPreventEnter = event.key === "Enter" && !clickOnEnter; + const shouldPreventSpace = event.key === " " && !clickOnSpace; + if (shouldPreventEnter || shouldPreventSpace) { + event.preventDefault(); + return; + } if (isEnter || isSpace) { - if (isNativeClick(event)) return; - event.preventDefault(); - + const nativeClick = isNativeClick(event); if (isEnter) { - event.currentTarget.click(); + if (!nativeClick) { + event.preventDefault(); + const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, ["view"]); + const click = () => fireClickEvent(element, eventInit); + if (isFirefox()) { + queueBeforeEvent(element, "keyup", click); + } else { + queueMicrotask(click); + } + } } else if (isSpace) { - setActive(true); - } - } - }, [options.disabled, options.unstable_clickOnEnter, options.unstable_clickOnSpace]); - var onKeyUp = (0,external_React_.useCallback)(function (event) { - var _onKeyUpRef$current; - - (_onKeyUpRef$current = onKeyUpRef.current) === null || _onKeyUpRef$current === void 0 ? void 0 : _onKeyUpRef$current.call(onKeyUpRef, event); - if (event.defaultPrevented) return; - if (options.disabled) return; - if (event.metaKey) return; - var isSpace = options.unstable_clickOnSpace && event.key === " "; - - if (active && isSpace) { - setActive(false); - event.currentTarget.click(); - } - }, [options.disabled, options.unstable_clickOnSpace, active]); - return _objectSpread2({ - "data-active": active || undefined, - onKeyDown: onKeyDown, - onKeyUp: onKeyUp - }, htmlProps); - } -}); -var Clickable = createComponent({ - as: "button", - memo: true, - useHook: useClickable -}); - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/getCurrentId-5aa9849e.js + activeRef.current = true; + if (!nativeClick) { + event.preventDefault(); + setActive(true); + } + } + } + }); + const onKeyUpProp = props.onKeyUp; + const onKeyUp = useEvent((event) => { + onKeyUpProp == null ? void 0 : onKeyUpProp(event); + if (event.defaultPrevented) + return; + if (isDuplicate) + return; + if (disabled) + return; + if (event.metaKey) + return; + const isSpace = clickOnSpace && event.key === " "; + if (activeRef.current && isSpace) { + activeRef.current = false; + if (!isNativeClick(event)) { + event.preventDefault(); + setActive(false); + const element = event.currentTarget; + const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, ["view"]); + queueMicrotask(() => fireClickEvent(element, eventInit)); + } + } + }); + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({ + "data-active": active ? "" : void 0, + type: isNativeButton ? "button" : void 0 + }, metadataProps), props), { + ref: useMergeRefs(ref, props.ref), + onKeyDown, + onKeyUp + }); + props = useFocusable(props); + return props; + } +); +var Command = createComponent((props) => { + props = useCommand(props); + return _3ORBWXWF_createElement("button", props); +}); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/4UUKJZ4V.js +"use client"; + + +// src/collection/collection-context.tsx +var ctx = createStoreContext(); +var useCollectionContext = ctx.useContext; +var useCollectionScopedContext = ctx.useScopedContext; +var useCollectionProviderContext = ctx.useProviderContext; +var CollectionContextProvider = ctx.ContextProvider; +var CollectionScopedContextProvider = ctx.ScopedContextProvider; + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/UH3I23HL.js +"use client"; + + + + + +// src/collection/collection-item.ts + + +var useCollectionItem = createHook( + (_a) => { + var _b = _a, { + store, + shouldRegisterItem = true, + getItem = identity, + element: element + } = _b, props = __objRest(_b, [ + "store", + "shouldRegisterItem", + "getItem", + // @ts-expect-error This prop may come from a collection renderer. + "element" + ]); + const context = useCollectionContext(); + store = store || context; + const id = useId(props.id); + const ref = (0,external_React_.useRef)(element); + (0,external_React_.useEffect)(() => { + const element2 = ref.current; + if (!id) + return; + if (!element2) + return; + if (!shouldRegisterItem) + return; + const item = getItem({ id, element: element2 }); + return store == null ? void 0 : store.renderItem(item); + }, [id, shouldRegisterItem, getItem, store]); + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + ref: useMergeRefs(ref, props.ref) + }); + return props; + } +); +var CollectionItem = createComponent( + (props) => { + const htmlProps = useCollectionItem(props); + return _3ORBWXWF_createElement("div", htmlProps); + } +); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/3IEDWLST.js +"use client"; + +// src/composite/utils.ts + +var NULL_ITEM = { id: null }; +function flipItems(items, activeId, shouldInsertNullItem = false) { + const index = items.findIndex((item) => item.id === activeId); + return [ + ...items.slice(index + 1), + ...shouldInsertNullItem ? [NULL_ITEM] : [], + ...items.slice(0, index) + ]; +} function findFirstEnabledItem(items, excludeId) { - if (excludeId) { - return items.find(function (item) { + return items.find((item) => { + if (excludeId) { return !item.disabled && item.id !== excludeId; - }); - } - - return items.find(function (item) { + } return !item.disabled; }); } - -function getCurrentId(options, passedId) { - var _findFirstEnabledItem; - - if (passedId || passedId === null) { - return passedId; - } - - if (options.currentId || options.currentId === null) { - return options.currentId; - } - - return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/__keys-6742f591.js -// Automatically generated -var COMPOSITE_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"]; -var COMPOSITE_KEYS = COMPOSITE_STATE_KEYS; -var COMPOSITE_GROUP_KEYS = COMPOSITE_KEYS; -var COMPOSITE_ITEM_KEYS = COMPOSITE_GROUP_KEYS; -var COMPOSITE_ITEM_WIDGET_KEYS = (/* unused pure expression or super */ null && (COMPOSITE_ITEM_KEYS)); - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/userFocus-e16425e3.js -function userFocus(element) { - element.userFocus = true; - element.focus(); - element.userFocus = false; -} -function hasUserFocus(element) { - return !!element.userFocus; -} -function setUserFocus(element, value) { - element.userFocus = value; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isTextField.js -/** - * Check whether the given element is a text field, where text field is defined - * by the ability to select within the input, or that it is contenteditable. - * - * @example - * import { isTextField } from "reakit-utils"; - * - * isTextField(document.querySelector("div")); // false - * isTextField(document.querySelector("input")); // true - * isTextField(document.querySelector("input[type='button']")); // false - * isTextField(document.querySelector("textarea")); // true - * isTextField(document.querySelector("div[contenteditable='true']")); // true - */ -function isTextField(element) { - try { - var isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null; - var isTextArea = element.tagName === "TEXTAREA"; - var isContentEditable = element.contentEditable === "true"; - return isTextInput || isTextArea || isContentEditable || false; - } catch (error) { - // Safari throws an exception when trying to get `selectionStart` - // on non-text elements (which, understandably, don't - // have the text selection API). We catch this via a try/catch - // block, as opposed to a more explicit check of the element's - // input types, because of Safari's non-standard behavior. This - // also means we don't have to worry about the list of input - // types that support `selectionStart` changing as the HTML spec - // evolves over time. +function getEnabledItem(store, id) { + if (!id) + return null; + return store.item(id) || null; +} +function groupItemsByRows(items) { + const rows = []; + for (const item of items) { + const row = rows.find((currentRow) => { + var _a; + return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId; + }); + if (row) { + row.push(item); + } else { + rows.push([item]); + } + } + return rows; +} +function selectTextField(element, collapseToEnd = false) { + if (isTextField(element)) { + element.setSelectionRange( + collapseToEnd ? element.value.length : 0, + element.value.length + ); + } else if (element.isContentEditable) { + const selection = getDocument(element).getSelection(); + selection == null ? void 0 : selection.selectAllChildren(element); + if (collapseToEnd) { + selection == null ? void 0 : selection.collapseToEnd(); + } + } +} +var FOCUS_SILENTLY = Symbol("FOCUS_SILENTLY"); +function focusSilently(element) { + element[FOCUS_SILENTLY] = true; + element.focus({ preventScroll: true }); +} +function silentlyFocused(element) { + const isSilentlyFocused = element[FOCUS_SILENTLY]; + delete element[FOCUS_SILENTLY]; + return isSilentlyFocused; +} +function isItem(store, element, exclude) { + if (!element) + return false; + if (element === exclude) + return false; + const item = store.item(element.id); + if (!item) + return false; + if (exclude && item.element === exclude) return false; - } -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/hasFocus.js - - - -/** - * Checks if `element` has focus. Elements that are referenced by - * `aria-activedescendant` are also considered. - * - * @example - * import { hasFocus } from "reakit-utils"; - * - * hasFocus(document.getElementById("id")); - */ - -function hasFocus(element) { - var activeElement = getActiveElement_getActiveElement(element); - if (!activeElement) return false; - if (activeElement === element) return true; - var activeDescendant = activeElement.getAttribute("aria-activedescendant"); - if (!activeDescendant) return false; - return activeDescendant === element.id; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/ensureFocus.js - - - - -/** - * Ensures `element` will receive focus if it's not already. - * - * @example - * import { ensureFocus } from "reakit-utils"; - * - * ensureFocus(document.activeElement); // does nothing - * - * const element = document.querySelector("input"); - * - * ensureFocus(element); // focuses element - * ensureFocus(element, { preventScroll: true }); // focuses element preventing scroll jump - * - * function isActive(el) { - * return el.dataset.active === "true"; - * } - * - * ensureFocus(document.querySelector("[data-active='true']"), { isActive }); // does nothing - * - * @returns {number} `requestAnimationFrame` call ID so it can be passed to `cancelAnimationFrame` if needed. - */ -function ensureFocus(element, _temp) { - var _ref = _temp === void 0 ? {} : _temp, - preventScroll = _ref.preventScroll, - _ref$isActive = _ref.isActive, - isActive = _ref$isActive === void 0 ? hasFocus : _ref$isActive; - - if (isActive(element)) return -1; - element.focus({ - preventScroll: preventScroll - }); - if (isActive(element)) return -1; - return requestAnimationFrame(function () { - element.focus({ - preventScroll: preventScroll - }); - }); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/Id/IdProvider.js - - -var defaultPrefix = "id"; -function generateRandomString(prefix) { - if (prefix === void 0) { - prefix = defaultPrefix; - } - - return "" + (prefix ? prefix + "-" : "") + Math.random().toString(32).substr(2, 6); -} - -var unstable_IdContext = /*#__PURE__*/(0,external_React_.createContext)(generateRandomString); -function unstable_IdProvider(_ref) { - var children = _ref.children, - _ref$prefix = _ref.prefix, - prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix; - var count = useRef(0); - var generateId = useCallback(function (localPrefix) { - if (localPrefix === void 0) { - localPrefix = prefix; - } - - return "" + (localPrefix ? localPrefix + "-" : "") + ++count.current; - }, [prefix]); - return /*#__PURE__*/createElement(unstable_IdContext.Provider, { - value: generateId - }, children); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/Id/Id.js - - - - - - -// Automatically generated -var ID_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId"]; -var ID_KEYS = [].concat(ID_STATE_KEYS, ["id"]); - -var unstable_useId = createHook({ - keys: ID_KEYS, - useOptions: function useOptions(options, htmlProps) { - var generateId = (0,external_React_.useContext)(unstable_IdContext); - - var _React$useState = (0,external_React_.useState)(function () { - // This comes from useIdState - if (options.unstable_idCountRef) { - options.unstable_idCountRef.current += 1; - return "-" + options.unstable_idCountRef.current; - } // If there's no useIdState, we check if `baseId` was passed (as a prop, - // not from useIdState). - - - if (options.baseId) { - return "-" + generateId(""); - } - - return ""; - }), - suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState. - // If there's neither, then it'll fallback to Context's generateId. - // This generateId can result in a sequential ID (if there's a Provider) - // or a random string (without Provider). - - - var baseId = (0,external_React_.useMemo)(function () { - return options.baseId || generateId(); - }, [options.baseId, generateId]); - var id = htmlProps.id || options.id || "" + baseId + suffix; - return _objectSpread2(_objectSpread2({}, options), {}, { - id: id - }); - }, - useProps: function useProps(options, htmlProps) { - return _objectSpread2({ - id: options.id - }, htmlProps); - } -}); -var unstable_Id = createComponent({ - as: "div", - useHook: unstable_useId -}); - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/createEvent.js - - -/** - * Creates an `Event` in a way that also works on IE 11. - * - * @example - * import { createEvent } from "reakit-utils"; - * - * const el = document.getElementById("id"); - * el.dispatchEvent(createEvent(el, "blur", { bubbles: false })); - */ - -function createEvent(element, type, eventInit) { - if (typeof Event === "function") { - return new Event(type, eventInit); - } // IE 11 doesn't support Event constructors - - - var event = getDocument(element).createEvent("Event"); - event.initEvent(type, eventInit === null || eventInit === void 0 ? void 0 : eventInit.bubbles, eventInit === null || eventInit === void 0 ? void 0 : eventInit.cancelable); - return event; -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireEvent.js - - - -/** - * Creates and dispatches `Event` in a way that also works on IE 11. - * - * @example - * import { fireEvent } from "reakit-utils"; - * - * fireEvent(document.getElementById("id"), "blur", { - * bubbles: true, - * cancelable: true, - * }); - */ - -function fireEvent(element, type, eventInit) { - return element.dispatchEvent(createEvent(element, type, eventInit)); -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/setTextFieldValue-0a221f4e.js - - -function setTextFieldValue(element, value) { - if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) { - var _Object$getOwnPropert; - - var proto = Object.getPrototypeOf(element); - var setValue = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(proto, "value")) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.set; - - if (setValue) { - setValue.call(element, value); - fireEvent(element, "input", { - bubbles: true - }); - } - } -} - - - -;// CONCATENATED MODULE: ./node_modules/reakit/es/Composite/CompositeItem.js - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function getWidget(itemElement) { - return itemElement.querySelector("[data-composite-item-widget]"); -} - -function useItem(options) { - return (0,external_React_.useMemo)(function () { - var _options$items; - - return (_options$items = options.items) === null || _options$items === void 0 ? void 0 : _options$items.find(function (item) { - return options.id && item.id === options.id; - }); - }, [options.items, options.id]); -} - -function targetIsAnotherItem(event, items) { - if (isSelfTarget(event)) return false; - - for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) { - var item = _step.value; - - if (item.ref.current === event.target) { - return true; - } - } - + return true; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/IB7YUKH5.js +"use client"; + + + +// src/composite/composite-context.tsx + +var IB7YUKH5_ctx = createStoreContext( + [CollectionContextProvider], + [CollectionScopedContextProvider] +); +var useCompositeContext = IB7YUKH5_ctx.useContext; +var useCompositeScopedContext = IB7YUKH5_ctx.useScopedContext; +var useCompositeProviderContext = IB7YUKH5_ctx.useProviderContext; +var CompositeContextProvider = IB7YUKH5_ctx.ContextProvider; +var CompositeScopedContextProvider = IB7YUKH5_ctx.ScopedContextProvider; +var CompositeItemContext = (0,external_React_.createContext)( + void 0 +); +var CompositeRowContext = (0,external_React_.createContext)( + void 0 +); + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/EAHJFCU4.js +"use client"; + + + +// src/utils/store.ts +function getInternal(store, key) { + const internals = store.__unstableInternals; + invariant(internals, "Invalid store"); + return internals[key]; +} +function createStore(initialState, ...stores) { + let state = initialState; + let prevStateBatch = state; + let lastUpdate = Symbol(); + let destroy = noop; + const instances = /* @__PURE__ */ new Set(); + const updatedKeys = /* @__PURE__ */ new Set(); + const setups = /* @__PURE__ */ new Set(); + const listeners = /* @__PURE__ */ new Set(); + const batchListeners = /* @__PURE__ */ new Set(); + const disposables = /* @__PURE__ */ new WeakMap(); + const listenerKeys = /* @__PURE__ */ new WeakMap(); + const storeSetup = (callback) => { + setups.add(callback); + return () => setups.delete(callback); + }; + const storeInit = () => { + const initialized = instances.size; + const instance = Symbol(); + instances.add(instance); + const maybeDestroy = () => { + instances.delete(instance); + if (instances.size) + return; + destroy(); + }; + if (initialized) + return maybeDestroy; + const desyncs = getKeys(state).map( + (key) => chain( + ...stores.map((store) => { + var _a; + const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store); + if (!storeState) + return; + if (!Y3OOHFCN_hasOwnProperty(storeState, key)) + return; + return sync(store, [key], (state2) => { + setState( + key, + state2[key], + // @ts-expect-error - Not public API. This is just to prevent + // infinite loops. + true + ); + }); + }) + ) + ); + const teardowns = []; + setups.forEach((setup2) => teardowns.push(setup2())); + const cleanups = stores.map(init); + destroy = chain(...desyncs, ...teardowns, ...cleanups); + return maybeDestroy; + }; + const sub = (keys, listener, set = listeners) => { + set.add(listener); + listenerKeys.set(listener, keys); + return () => { + var _a; + (_a = disposables.get(listener)) == null ? void 0 : _a(); + disposables.delete(listener); + listenerKeys.delete(listener); + set.delete(listener); + }; + }; + const storeSubscribe = (keys, listener) => sub(keys, listener); + const storeSync = (keys, listener) => { + disposables.set(listener, listener(state, state)); + return sub(keys, listener); + }; + const storeBatch = (keys, listener) => { + disposables.set(listener, listener(state, prevStateBatch)); + return sub(keys, listener, batchListeners); + }; + const storePick = (keys) => createStore(pick(state, keys), finalStore); + const storeOmit = (keys) => createStore(omit(state, keys), finalStore); + const getState = () => state; + const setState = (key, value, fromStores = false) => { + if (!Y3OOHFCN_hasOwnProperty(state, key)) + return; + const nextValue = Y3OOHFCN_applyState(value, state[key]); + if (nextValue === state[key]) + return; + if (!fromStores) { + stores.forEach((store) => { + var _a; + (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue); + }); + } + const prevState = state; + state = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, state), { [key]: nextValue }); + const thisUpdate = Symbol(); + lastUpdate = thisUpdate; + updatedKeys.add(key); + const run = (listener, prev, uKeys) => { + var _a; + const keys = listenerKeys.get(listener); + const updated = (k) => uKeys ? uKeys.has(k) : k === key; + if (!keys || keys.some(updated)) { + (_a = disposables.get(listener)) == null ? void 0 : _a(); + disposables.set(listener, listener(state, prev)); + } + }; + listeners.forEach((listener) => { + run(listener, prevState); + }); + queueMicrotask(() => { + if (lastUpdate !== thisUpdate) + return; + const snapshot = state; + batchListeners.forEach((listener) => { + run(listener, prevStateBatch, updatedKeys); + }); + prevStateBatch = snapshot; + updatedKeys.clear(); + }); + }; + const finalStore = { + getState, + setState, + __unstableInternals: { + setup: storeSetup, + init: storeInit, + subscribe: storeSubscribe, + sync: storeSync, + batch: storeBatch, + pick: storePick, + omit: storeOmit + } + }; + return finalStore; +} +function setup(store, ...args) { + if (!store) + return; + return getInternal(store, "setup")(...args); +} +function init(store, ...args) { + if (!store) + return; + return getInternal(store, "init")(...args); +} +function subscribe(store, ...args) { + if (!store) + return; + return getInternal(store, "subscribe")(...args); +} +function sync(store, ...args) { + if (!store) + return; + return getInternal(store, "sync")(...args); +} +function batch(store, ...args) { + if (!store) + return; + return getInternal(store, "batch")(...args); +} +function omit2(store, ...args) { + if (!store) + return; + return getInternal(store, "omit")(...args); +} +function pick2(store, ...args) { + if (!store) + return; + return getInternal(store, "pick")(...args); +} +function mergeStore(...stores) { + const initialState = stores.reduce((state, store2) => { + var _a; + const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2); + if (!nextState) + return state; + return _chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, state), nextState); + }, {}); + const store = createStore(initialState, ...stores); + return store; +} +function throwOnConflictingProps(props, store) { + if (true) + return; + if (!store) + return; + const defaultKeys = Object.entries(props).filter(([key, value]) => key.startsWith("default") && value !== void 0).map(([key]) => { + var _a; + const stateKey = key.replace("default", ""); + return `${((_a = stateKey[0]) == null ? void 0 : _a.toLowerCase()) || ""}${stateKey.slice(1)}`; + }); + if (!defaultKeys.length) + return; + const storeState = store.getState(); + const conflictingProps = defaultKeys.filter( + (key) => Y3OOHFCN_hasOwnProperty(storeState, key) + ); + if (!conflictingProps.length) + return; + throw new Error( + `Passing a store prop in conjunction with a default state is not supported. + +const store = useSelectStore(); + + ^ ^ + +Instead, pass the default state to the topmost store: + +const store = useSelectStore({ defaultValue: "Apple" }); + + +See https://github.com/ariakit/ariakit/pull/2745 for more details. + +If there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit +` + ); +} + + + +// EXTERNAL MODULE: ./node_modules/use-sync-external-store/shim/index.js +var shim = __webpack_require__(422); +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/EKQEJRUF.js +"use client"; + + + +// src/utils/store.tsx + + + + +var { useSyncExternalStore } = shim; +var noopSubscribe = () => () => { +}; +function useStoreState(store, keyOrSelector = identity) { + const storeSubscribe = external_React_.useCallback( + (callback) => { + if (!store) + return noopSubscribe(); + return subscribe(store, null, callback); + }, + [store] + ); + const getSnapshot = () => { + const key = typeof keyOrSelector === "string" ? keyOrSelector : null; + const selector = typeof keyOrSelector === "function" ? keyOrSelector : null; + const state = store == null ? void 0 : store.getState(); + if (selector) + return selector(state); + if (!state) + return; + if (!key) + return; + if (!Y3OOHFCN_hasOwnProperty(state, key)) + return; + return state[key]; + }; + return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot); +} +function useStoreProps(store, props, key, setKey) { + const value = Y3OOHFCN_hasOwnProperty(props, key) ? props[key] : void 0; + const setValue = setKey ? props[setKey] : void 0; + const propsRef = useLiveRef({ value, setValue }); + useSafeLayoutEffect(() => { + return sync(store, [key], (state, prev) => { + const { value: value2, setValue: setValue2 } = propsRef.current; + if (!setValue2) + return; + if (state[key] === prev[key]) + return; + if (state[key] === value2) + return; + setValue2(state[key]); + }); + }, [store, key]); + useSafeLayoutEffect(() => { + if (value === void 0) + return; + store.setState(key, value); + return batch(store, [key], () => { + if (value === void 0) + return; + store.setState(key, value); + }); + }); +} +function EKQEJRUF_useStore(createStore, props) { + const [store, setStore] = external_React_.useState(() => createStore(props)); + useSafeLayoutEffect(() => init(store), [store]); + const useState2 = external_React_.useCallback( + (keyOrSelector) => useStoreState(store, keyOrSelector), + [store] + ); + const memoizedStore = external_React_.useMemo( + () => _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, store), { useState: useState2 }), + [store, useState2] + ); + const updateStore = useEvent(() => { + setStore((store2) => createStore(_4R3V3JGP_spreadValues(_4R3V3JGP_spreadValues({}, props), store2.getState()))); + }); + return [memoizedStore, updateStore]; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/QZLXIDNP.js +"use client"; + + + + + + + + + +// src/composite/composite-item.tsx + + + + + +function isEditableElement(element) { + if (element.isContentEditable) + return true; + if (DLOEKDPY_isTextField(element)) + return true; + return element.tagName === "INPUT" && !isButton(element); +} +function getNextPageOffset(scrollingElement, pageUp = false) { + const height = scrollingElement.clientHeight; + const { top } = scrollingElement.getBoundingClientRect(); + const pageSize = Math.max(height * 0.875, height - 40) * 1.5; + const pageOffset = pageUp ? height - pageSize + top : pageSize + top; + if (scrollingElement.tagName === "HTML") { + return pageOffset + scrollingElement.scrollTop; + } + return pageOffset; +} +function getItemOffset(itemElement, pageUp = false) { + const { top } = itemElement.getBoundingClientRect(); + if (pageUp) { + return top + itemElement.clientHeight; + } + return top; +} +function findNextPageItemId(element, store, next, pageUp = false) { + var _a; + if (!store) + return; + if (!next) + return; + const { renderedItems } = store.getState(); + const scrollingElement = getScrollingElement(element); + if (!scrollingElement) + return; + const nextPageOffset = getNextPageOffset(scrollingElement, pageUp); + let id; + let prevDifference; + for (let i = 0; i < renderedItems.length; i += 1) { + const previousId = id; + id = next(i); + if (!id) + break; + if (id === previousId) + continue; + const itemElement = (_a = getEnabledItem(store, id)) == null ? void 0 : _a.element; + if (!itemElement) + continue; + const itemOffset = getItemOffset(itemElement, pageUp); + const difference = itemOffset - nextPageOffset; + const absDifference = Math.abs(difference); + if (pageUp && difference <= 0 || !pageUp && difference >= 0) { + if (prevDifference !== void 0 && prevDifference < absDifference) { + id = previousId; + } + break; + } + prevDifference = absDifference; + } + return id; +} +function targetIsAnotherItem(event, store) { + if (isSelfTarget(event)) + return false; + return isItem(store, event.target); +} +function useRole(ref, props) { + const roleProp = props.role; + const [role, setRole] = (0,external_React_.useState)(roleProp); + useSafeLayoutEffect(() => { + const element = ref.current; + if (!element) + return; + setRole(element.getAttribute("role") || roleProp); + }, [roleProp]); + return role; +} +function requiresAriaSelected(role) { + return role === "option" || role === "treeitem"; +} +function supportsAriaSelected(role) { + if (role === "option") + return true; + if (role === "tab") + return true; + if (role === "treeitem") + return true; + if (role === "gridcell") + return true; + if (role === "row") + return true; + if (role === "columnheader") + return true; + if (role === "rowheader") + return true; return false; } - -var useCompositeItem = createHook({ - name: "CompositeItem", - compose: [useClickable, unstable_useId], - keys: COMPOSITE_ITEM_KEYS, - propsAreEqual: function propsAreEqual(prev, next) { - if (!next.id || prev.id !== next.id) { - return useClickable.unstable_propsAreEqual(prev, next); - } - - var prevCurrentId = prev.currentId, - prevMoves = prev.unstable_moves, - prevProps = _objectWithoutPropertiesLoose(prev, ["currentId", "unstable_moves"]); - - var nextCurrentId = next.currentId, - nextMoves = next.unstable_moves, - nextProps = _objectWithoutPropertiesLoose(next, ["currentId", "unstable_moves"]); - - if (nextCurrentId !== prevCurrentId) { - if (next.id === nextCurrentId || next.id === prevCurrentId) { - return false; - } - } else if (prevMoves !== nextMoves) { - return false; - } - - return useClickable.unstable_propsAreEqual(prevProps, nextProps); - }, - useOptions: function useOptions(options) { - return _objectSpread2(_objectSpread2({}, options), {}, { - id: options.id, - currentId: getCurrentId(options), - unstable_clickOnSpace: options.unstable_hasActiveWidget ? false : options.unstable_clickOnSpace - }); - }, - useProps: function useProps(options, _ref) { - var _options$items2; - - var htmlRef = _ref.ref, - _ref$tabIndex = _ref.tabIndex, - htmlTabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex, - htmlOnMouseDown = _ref.onMouseDown, - htmlOnFocus = _ref.onFocus, - htmlOnBlurCapture = _ref.onBlurCapture, - htmlOnKeyDown = _ref.onKeyDown, - htmlOnClick = _ref.onClick, - htmlProps = _objectWithoutPropertiesLoose(_ref, ["ref", "tabIndex", "onMouseDown", "onFocus", "onBlurCapture", "onKeyDown", "onClick"]); - - var ref = (0,external_React_.useRef)(null); - var id = options.id; - var trulyDisabled = options.disabled && !options.focusable; - var isCurrentItem = options.currentId === id; - var isCurrentItemRef = useLiveRef(isCurrentItem); - var hasFocusedComposite = (0,external_React_.useRef)(false); - var item = useItem(options); - var onMouseDownRef = useLiveRef(htmlOnMouseDown); - var onFocusRef = useLiveRef(htmlOnFocus); - var onBlurCaptureRef = useLiveRef(htmlOnBlurCapture); - var onKeyDownRef = useLiveRef(htmlOnKeyDown); - var onClickRef = useLiveRef(htmlOnClick); - var shouldTabIndex = !options.unstable_virtual && !options.unstable_hasActiveWidget && isCurrentItem || // We don't want to set tabIndex="-1" when using CompositeItem as a - // standalone component, without state props. - !((_options$items2 = options.items) !== null && _options$items2 !== void 0 && _options$items2.length); - (0,external_React_.useEffect)(function () { - var _options$registerItem; - - if (!id) return undefined; - (_options$registerItem = options.registerItem) === null || _options$registerItem === void 0 ? void 0 : _options$registerItem.call(options, { - id: id, - ref: ref, - disabled: !!trulyDisabled - }); - return function () { - var _options$unregisterIt; - - (_options$unregisterIt = options.unregisterItem) === null || _options$unregisterIt === void 0 ? void 0 : _options$unregisterIt.call(options, id); - }; - }, [id, trulyDisabled, options.registerItem, options.unregisterItem]); - (0,external_React_.useEffect)(function () { - var element = ref.current; - - if (!element) { - false ? 0 : void 0; - return; - } // `moves` will be incremented whenever next, previous, up, down, first, - // last or move have been called. This means that the composite item will - // be focused whenever some of these functions are called. We're using - // isCurrentItemRef instead of isCurrentItem because we don't want to - // focus the item if isCurrentItem changes (and options.moves doesn't). - - - if (options.unstable_moves && isCurrentItemRef.current) { - userFocus(element); - } - }, [options.unstable_moves]); - var onMouseDown = (0,external_React_.useCallback)(function (event) { - var _onMouseDownRef$curre; - - (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event); - setUserFocus(event.currentTarget, true); - }, []); - var onFocus = (0,external_React_.useCallback)(function (event) { - var _onFocusRef$current, _options$setCurrentId; - - var shouldFocusComposite = hasUserFocus(event.currentTarget); - setUserFocus(event.currentTarget, false); - (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event); - if (event.defaultPrevented) return; - if (isPortalEvent(event)) return; - if (!id) return; - if (targetIsAnotherItem(event, options.items)) return; - (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, id); // When using aria-activedescendant, we want to make sure that the - // composite container receives focus, not the composite item. - // But we don't want to do this if the target is another focusable - // element inside the composite item, such as CompositeItemWidget. - - if (shouldFocusComposite && options.unstable_virtual && options.baseId && isSelfTarget(event)) { - var target = event.target; - var composite = getDocument(target).getElementById(options.baseId); - - if (composite) { - hasFocusedComposite.current = true; - ensureFocus(composite); - } - } - }, [id, options.items, options.setCurrentId, options.unstable_virtual, options.baseId]); - var onBlurCapture = (0,external_React_.useCallback)(function (event) { - var _onBlurCaptureRef$cur; - - (_onBlurCaptureRef$cur = onBlurCaptureRef.current) === null || _onBlurCaptureRef$cur === void 0 ? void 0 : _onBlurCaptureRef$cur.call(onBlurCaptureRef, event); - if (event.defaultPrevented) return; - - if (options.unstable_virtual && hasFocusedComposite.current) { - // When hasFocusedComposite is true, composite has been focused right - // after focusing this item. This is an intermediate blur event, so - // we ignore it. +var useCompositeItem = createHook( + (_a) => { + var _b = _a, { + store, + rowId: rowIdProp, + preventScrollOnKeyDown = false, + moveOnKeyPress = true, + tabbable = false, + getItem: getItemProp, + "aria-setsize": ariaSetSizeProp, + "aria-posinset": ariaPosInSetProp + } = _b, props = __objRest(_b, [ + "store", + "rowId", + "preventScrollOnKeyDown", + "moveOnKeyPress", + "tabbable", + "getItem", + "aria-setsize", + "aria-posinset" + ]); + const context = useCompositeContext(); + store = store || context; + const id = useId(props.id); + const ref = (0,external_React_.useRef)(null); + const row = (0,external_React_.useContext)(CompositeRowContext); + const rowId = useStoreState(store, (state) => { + if (rowIdProp) + return rowIdProp; + if (!state) + return; + if (!(row == null ? void 0 : row.baseElement)) + return; + if (row.baseElement !== state.baseElement) + return; + return row.id; + }); + const disabled = disabledFromProps(props); + const trulyDisabled = disabled && !props.accessibleWhenDisabled; + const getItem = (0,external_React_.useCallback)( + (item) => { + const nextItem = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, item), { + id: id || item.id, + rowId, + disabled: !!trulyDisabled + }); + if (getItemProp) { + return getItemProp(nextItem); + } + return nextItem; + }, + [id, rowId, trulyDisabled, getItemProp] + ); + const onFocusProp = props.onFocus; + const hasFocusedComposite = (0,external_React_.useRef)(false); + const onFocus = useEvent((event) => { + onFocusProp == null ? void 0 : onFocusProp(event); + if (event.defaultPrevented) + return; + if (isPortalEvent(event)) + return; + if (!id) + return; + if (!store) + return; + const { activeId, virtualFocus: virtualFocus2, baseElement: baseElement2 } = store.getState(); + if (targetIsAnotherItem(event, store)) + return; + if (activeId !== id) { + store.setActiveId(id); + } + if (!virtualFocus2) + return; + if (!isSelfTarget(event)) + return; + if (isEditableElement(event.currentTarget)) + return; + if (!(baseElement2 == null ? void 0 : baseElement2.isConnected)) + return; + hasFocusedComposite.current = true; + const fromComposite = event.relatedTarget === baseElement2 || isItem(store, event.relatedTarget); + if (fromComposite) { + focusSilently(baseElement2); + } else { + baseElement2.focus(); + } + }); + const onBlurCaptureProp = props.onBlurCapture; + const onBlurCapture = useEvent((event) => { + onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event); + if (event.defaultPrevented) + return; + const state = store == null ? void 0 : store.getState(); + if ((state == null ? void 0 : state.virtualFocus) && hasFocusedComposite.current) { hasFocusedComposite.current = false; event.preventDefault(); event.stopPropagation(); } - }, [options.unstable_virtual]); - var onKeyDown = (0,external_React_.useCallback)(function (event) { - var _onKeyDownRef$current; - - if (!isSelfTarget(event)) return; - var isVertical = options.orientation !== "horizontal"; - var isHorizontal = options.orientation !== "vertical"; - var isGrid = !!(item !== null && item !== void 0 && item.groupId); - var keyMap = { - ArrowUp: (isGrid || isVertical) && options.up, - ArrowRight: (isGrid || isHorizontal) && options.next, - ArrowDown: (isGrid || isVertical) && options.down, - ArrowLeft: (isGrid || isHorizontal) && options.previous, - Home: function Home() { + }); + const onKeyDownProp = props.onKeyDown; + const preventScrollOnKeyDownProp = useBooleanEvent(preventScrollOnKeyDown); + const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress); + const onKeyDown = useEvent((event) => { + onKeyDownProp == null ? void 0 : onKeyDownProp(event); + if (event.defaultPrevented) + return; + if (!isSelfTarget(event)) + return; + if (!store) + return; + const { currentTarget } = event; + const state = store.getState(); + const item = store.item(id); + const isGrid = !!(item == null ? void 0 : item.rowId); + const isVertical = state.orientation !== "horizontal"; + const isHorizontal = state.orientation !== "vertical"; + const canHomeEnd = () => { + if (isGrid) + return true; + if (isHorizontal) + return true; + if (!state.baseElement) + return true; + if (!DLOEKDPY_isTextField(state.baseElement)) + return true; + return false; + }; + const keyMap = { + ArrowUp: (isGrid || isVertical) && store.up, + ArrowRight: (isGrid || isHorizontal) && store.next, + ArrowDown: (isGrid || isVertical) && store.down, + ArrowLeft: (isGrid || isHorizontal) && store.previous, + Home: () => { + if (!canHomeEnd()) + return; + if (!isGrid || event.ctrlKey) { + return store == null ? void 0 : store.first(); + } + return store == null ? void 0 : store.previous(-1); + }, + End: () => { + if (!canHomeEnd()) + return; if (!isGrid || event.ctrlKey) { - var _options$first; - - (_options$first = options.first) === null || _options$first === void 0 ? void 0 : _options$first.call(options); + return store == null ? void 0 : store.last(); + } + return store == null ? void 0 : store.next(-1); + }, + PageUp: () => { + return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.up, true); + }, + PageDown: () => { + return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.down); + } + }; + const action = keyMap[event.key]; + if (action) { + const nextId = action(); + if (preventScrollOnKeyDownProp(event) || nextId !== void 0) { + if (!moveOnKeyPressProp(event)) + return; + event.preventDefault(); + store.move(nextId); + } + } + }); + const baseElement = useStoreState( + store, + (state) => (state == null ? void 0 : state.baseElement) || void 0 + ); + const providerValue = (0,external_React_.useMemo)( + () => ({ id, baseElement }), + [id, baseElement] + ); + props = useWrapElement( + props, + (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CompositeItemContext.Provider, { value: providerValue, children: element }), + [providerValue] + ); + const isActiveItem = useStoreState( + store, + (state) => !!state && state.activeId === id + ); + const virtualFocus = useStoreState(store, "virtualFocus"); + const role = useRole(ref, props); + let ariaSelected; + if (isActiveItem) { + if (requiresAriaSelected(role)) { + ariaSelected = true; + } else if (virtualFocus && supportsAriaSelected(role)) { + ariaSelected = true; + } + } + const ariaSetSize = useStoreState(store, (state) => { + if (ariaSetSizeProp != null) + return ariaSetSizeProp; + if (!state) + return; + if (!(row == null ? void 0 : row.ariaSetSize)) + return; + if (row.baseElement !== state.baseElement) + return; + return row.ariaSetSize; + }); + const ariaPosInSet = useStoreState(store, (state) => { + if (ariaPosInSetProp != null) + return ariaPosInSetProp; + if (!state) + return; + if (!(row == null ? void 0 : row.ariaPosInSet)) + return; + if (row.baseElement !== state.baseElement) + return; + const itemsInRow = state.renderedItems.filter( + (item) => item.rowId === rowId + ); + return row.ariaPosInSet + itemsInRow.findIndex((item) => item.id === id); + }); + const isTabbable = useStoreState(store, (state) => { + if (!(state == null ? void 0 : state.renderedItems.length)) + return true; + if (state.virtualFocus) + return false; + if (tabbable) + return true; + return state.activeId === id; + }); + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + id, + "aria-selected": ariaSelected, + "data-active-item": isActiveItem ? "" : void 0 + }, props), { + ref: useMergeRefs(ref, props.ref), + tabIndex: isTabbable ? props.tabIndex : -1, + onFocus, + onBlurCapture, + onKeyDown + }); + props = useCommand(props); + props = useCollectionItem(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + store + }, props), { + getItem, + shouldRegisterItem: !!id ? props.shouldRegisterItem : false + })); + return _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + "aria-setsize": ariaSetSize, + "aria-posinset": ariaPosInSet + }); + } +); +var CompositeItem = createMemoComponent( + (props) => { + const htmlProps = useCompositeItem(props); + return _3ORBWXWF_createElement("button", htmlProps); + } +); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/Z5IGYIPT.js +"use client"; + + + + +// src/disclosure/disclosure-store.ts +function createDisclosureStore(props = {}) { + const store = mergeStore( + props.store, + omit2(props.disclosure, ["contentElement", "disclosureElement"]) + ); + throwOnConflictingProps(props, store); + const syncState = store == null ? void 0 : store.getState(); + const open = defaultValue( + props.open, + syncState == null ? void 0 : syncState.open, + props.defaultOpen, + false + ); + const animated = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false); + const initialState = { + open, + animated, + animating: !!animated && open, + mounted: open, + contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null), + disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null) + }; + const disclosure = createStore(initialState, store); + setup( + disclosure, + () => sync(disclosure, ["animated", "animating"], (state) => { + if (state.animated) + return; + disclosure.setState("animating", false); + }) + ); + setup( + disclosure, + () => subscribe(disclosure, ["open"], () => { + if (!disclosure.getState().animated) + return; + disclosure.setState("animating", true); + }) + ); + setup( + disclosure, + () => sync(disclosure, ["open", "animating"], (state) => { + disclosure.setState("mounted", state.open || state.animating); + }) + ); + return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, disclosure), { + setOpen: (value) => disclosure.setState("open", value), + show: () => disclosure.setState("open", true), + hide: () => disclosure.setState("open", false), + toggle: () => disclosure.setState("open", (open2) => !open2), + stopAnimation: () => disclosure.setState("animating", false), + setContentElement: (value) => disclosure.setState("contentElement", value), + setDisclosureElement: (value) => disclosure.setState("disclosureElement", value) + }); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/SFCBA2JZ.js +"use client"; + + + +// src/disclosure/disclosure-store.ts + +function useDisclosureStoreProps(store, update, props) { + useUpdateEffect(update, [props.store, props.disclosure]); + useStoreProps(store, props, "open", "setOpen"); + useStoreProps(store, props, "mounted", "setMounted"); + useStoreProps(store, props, "animated"); + return store; +} +function useDisclosureStore(props = {}) { + const [store, update] = EKQEJRUF_useStore(createDisclosureStore, props); + return useDisclosureStoreProps(store, update, props); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/SX2XFD6A.js +"use client"; + + +// src/dialog/dialog-store.ts +function createDialogStore(props = {}) { + return createDisclosureStore(props); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/ZSELSBRM.js +"use client"; + + + +// src/dialog/dialog-store.ts + +function useDialogStoreProps(store, update, props) { + return useDisclosureStoreProps(store, update, props); +} +function useDialogStore(props = {}) { + const [store, update] = EKQEJRUF_useStore(createDialogStore, props); + return useDialogStoreProps(store, update, props); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/MG4P3223.js +"use client"; + + + + +// src/popover/popover-store.ts + +function usePopoverStoreProps(store, update, props) { + useUpdateEffect(update, [props.popover]); + store = useDialogStoreProps(store, update, props); + useStoreProps(store, props, "placement"); + return store; +} +function usePopoverStore(props = {}) { + const [store, update] = useStore(Core.createPopoverStore, props); + return usePopoverStoreProps(store, update, props); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/ZU7LQC5V.js +"use client"; + + + +// src/hovercard/hovercard-store.ts + +function useHovercardStoreProps(store, update, props) { + store = usePopoverStoreProps(store, update, props); + useStoreProps(store, props, "timeout"); + useStoreProps(store, props, "showTimeout"); + useStoreProps(store, props, "hideTimeout"); + return store; +} +function useHovercardStore(props = {}) { + const [store, update] = useStore(Core.createHovercardStore, props); + return useHovercardStoreProps(store, update, props); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/AF6IUUFN.js +"use client"; + + + + + +// src/popover/popover-store.ts +function createPopoverStore(_a = {}) { + var _b = _a, { + popover: otherPopover + } = _b, props = _4R3V3JGP_objRest(_b, [ + "popover" + ]); + const store = mergeStore( + props.store, + omit2(otherPopover, [ + "arrowElement", + "anchorElement", + "contentElement", + "popoverElement", + "disclosureElement" + ]) + ); + throwOnConflictingProps(props, store); + const syncState = store == null ? void 0 : store.getState(); + const dialog = createDialogStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), { store })); + const placement = defaultValue( + props.placement, + syncState == null ? void 0 : syncState.placement, + "bottom" + ); + const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, dialog.getState()), { + placement, + currentPlacement: placement, + anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null), + popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null), + arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null), + rendered: Symbol("rendered") + }); + const popover = createStore(initialState, dialog, store); + return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, dialog), popover), { + setAnchorElement: (element) => popover.setState("anchorElement", element), + setPopoverElement: (element) => popover.setState("popoverElement", element), + setArrowElement: (element) => popover.setState("arrowElement", element), + render: () => popover.setState("rendered", Symbol("rendered")) + }); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/SOLWE6E5.js +"use client"; + + + + + +// src/hovercard/hovercard-store.ts +function createHovercardStore(props = {}) { + var _a; + const syncState = (_a = props.store) == null ? void 0 : _a.getState(); + const popover = createPopoverStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), { + placement: defaultValue( + props.placement, + syncState == null ? void 0 : syncState.placement, + "bottom" + ) + })); + const timeout = defaultValue(props.timeout, syncState == null ? void 0 : syncState.timeout, 500); + const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, popover.getState()), { + timeout, + showTimeout: defaultValue(props.showTimeout, syncState == null ? void 0 : syncState.showTimeout), + hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout), + autoFocusOnShow: defaultValue(syncState == null ? void 0 : syncState.autoFocusOnShow, false) + }); + const hovercard = createStore(initialState, popover, props.store); + return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, popover), hovercard), { + setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value) + }); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/tooltip/tooltip-store.js +"use client"; + + + + + + + + +// src/tooltip/tooltip-store.ts +function createTooltipStore(props = {}) { + var _a; + const syncState = (_a = props.store) == null ? void 0 : _a.getState(); + const hovercard = createHovercardStore(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, props), { + placement: defaultValue( + props.placement, + syncState == null ? void 0 : syncState.placement, + "top" + ), + hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0) + })); + const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, hovercard.getState()), { + type: defaultValue(props.type, syncState == null ? void 0 : syncState.type, "description"), + skipTimeout: defaultValue(props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300) + }); + const tooltip = createStore(initialState, hovercard, props.store); + return _chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, hovercard), tooltip); +} + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/2QMN5E6B.js +"use client"; + + + +// src/tooltip/tooltip-store.ts + +function useTooltipStoreProps(store, update, props) { + store = useHovercardStoreProps(store, update, props); + useStoreProps(store, props, "type"); + useStoreProps(store, props, "skipTimeout"); + return store; +} +function useTooltipStore(props = {}) { + const [store, update] = EKQEJRUF_useStore(createTooltipStore, props); + return useTooltipStoreProps(store, update, props); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/FSFPRQFR.js +"use client"; + + +// src/role/role.ts +var FSFPRQFR_elements = [ + "a", + "button", + "details", + "dialog", + "div", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "img", + "input", + "label", + "li", + "nav", + "ol", + "p", + "section", + "select", + "span", + "textarea", + "ul", + "svg" +]; +var FSFPRQFR_useRole = createHook((props) => { + return props; +}); +var Role = createComponent((props) => { + return _3ORBWXWF_createElement("div", props); +}); +if (false) {} +Object.assign( + Role, + FSFPRQFR_elements.reduce((acc, element) => { + acc[element] = createComponent((props) => { + return _3ORBWXWF_createElement(element, props); + }); + return acc; + }, {}) +); + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/OAYFXAQ2.js +"use client"; + + +// src/disclosure/disclosure-context.tsx +var OAYFXAQ2_ctx = createStoreContext(); +var useDisclosureContext = OAYFXAQ2_ctx.useContext; +var useDisclosureScopedContext = OAYFXAQ2_ctx.useScopedContext; +var useDisclosureProviderContext = OAYFXAQ2_ctx.useProviderContext; +var DisclosureContextProvider = OAYFXAQ2_ctx.ContextProvider; +var DisclosureScopedContextProvider = OAYFXAQ2_ctx.ScopedContextProvider; + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/G6BJYYBK.js +"use client"; + + + +// src/dialog/dialog-context.tsx + +var G6BJYYBK_ctx = createStoreContext( + [DisclosureContextProvider], + [DisclosureScopedContextProvider] +); +var useDialogContext = G6BJYYBK_ctx.useContext; +var useDialogScopedContext = G6BJYYBK_ctx.useScopedContext; +var useDialogProviderContext = G6BJYYBK_ctx.useProviderContext; +var DialogContextProvider = G6BJYYBK_ctx.ContextProvider; +var DialogScopedContextProvider = G6BJYYBK_ctx.ScopedContextProvider; +var DialogHeadingContext = (0,external_React_.createContext)(void 0); +var DialogDescriptionContext = (0,external_React_.createContext)(void 0); + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/7H5KSHHF.js +"use client"; + + + +// src/popover/popover-context.tsx +var _7H5KSHHF_ctx = createStoreContext( + [DialogContextProvider], + [DialogScopedContextProvider] +); +var usePopoverContext = _7H5KSHHF_ctx.useContext; +var usePopoverScopedContext = _7H5KSHHF_ctx.useScopedContext; +var usePopoverProviderContext = _7H5KSHHF_ctx.useProviderContext; +var PopoverContextProvider = _7H5KSHHF_ctx.ContextProvider; +var PopoverScopedContextProvider = _7H5KSHHF_ctx.ScopedContextProvider; + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/TI7CMBHW.js +"use client"; + + + +// src/hovercard/hovercard-context.tsx +var TI7CMBHW_ctx = createStoreContext( + [PopoverContextProvider], + [PopoverScopedContextProvider] +); +var useHovercardContext = TI7CMBHW_ctx.useContext; +var useHovercardScopedContext = TI7CMBHW_ctx.useScopedContext; +var useHovercardProviderContext = TI7CMBHW_ctx.useProviderContext; +var HovercardContextProvider = TI7CMBHW_ctx.ContextProvider; +var HovercardScopedContextProvider = TI7CMBHW_ctx.ScopedContextProvider; + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/7X4DYKYU.js +"use client"; + + + + + + +// src/hovercard/hovercard-anchor.ts + + + +var useHovercardAnchor = createHook( + (_a) => { + var _b = _a, { store, showOnHover = true } = _b, props = __objRest(_b, ["store", "showOnHover"]); + const context = useHovercardProviderContext(); + store = store || context; + invariant( + store, + false && 0 + ); + const disabled = disabledFromProps(props); + const showTimeoutRef = (0,external_React_.useRef)(0); + (0,external_React_.useEffect)(() => () => window.clearTimeout(showTimeoutRef.current), []); + (0,external_React_.useEffect)(() => { + const onMouseLeave = (event) => { + if (!store) + return; + const { anchorElement } = store.getState(); + if (!anchorElement) + return; + if (event.target !== anchorElement) + return; + window.clearTimeout(showTimeoutRef.current); + showTimeoutRef.current = 0; + }; + return addGlobalEventListener("mouseleave", onMouseLeave, true); + }, [store]); + const onMouseMoveProp = props.onMouseMove; + const showOnHoverProp = useBooleanEvent(showOnHover); + const isMouseMoving = useIsMouseMoving(); + const onMouseMove = useEvent( + (event) => { + onMouseMoveProp == null ? void 0 : onMouseMoveProp(event); + if (disabled) + return; + if (!store) + return; + if (event.defaultPrevented) + return; + if (showTimeoutRef.current) + return; + if (!isMouseMoving()) + return; + if (!showOnHoverProp(event)) + return; + const element = event.currentTarget; + store.setAnchorElement(element); + store.setDisclosureElement(element); + const { showTimeout, timeout } = store.getState(); + const showHovercard = () => { + showTimeoutRef.current = 0; + if (!isMouseMoving()) + return; + store == null ? void 0 : store.setAnchorElement(element); + store == null ? void 0 : store.show(); + queueMicrotask(() => { + store == null ? void 0 : store.setDisclosureElement(element); + }); + }; + const timeoutMs = showTimeout != null ? showTimeout : timeout; + if (timeoutMs === 0) { + showHovercard(); + } else { + showTimeoutRef.current = window.setTimeout(showHovercard, timeoutMs); + } + } + ); + const ref = (0,external_React_.useCallback)( + (element) => { + if (!store) + return; + const { anchorElement } = store.getState(); + if (anchorElement == null ? void 0 : anchorElement.isConnected) + return; + store.setAnchorElement(element); + }, + [store] + ); + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + ref: useMergeRefs(ref, props.ref), + onMouseMove + }); + props = useFocusable(props); + return props; + } +); +var HovercardAnchor = createComponent( + (props) => { + const htmlProps = useHovercardAnchor(props); + return _3ORBWXWF_createElement("a", htmlProps); + } +); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/MNFF5YOJ.js +"use client"; + + + +// src/tooltip/tooltip-context.tsx +var MNFF5YOJ_ctx = createStoreContext( + [HovercardContextProvider], + [HovercardScopedContextProvider] +); +var useTooltipContext = MNFF5YOJ_ctx.useContext; +var useTooltipScopedContext = MNFF5YOJ_ctx.useScopedContext; +var useTooltipProviderContext = MNFF5YOJ_ctx.useProviderContext; +var TooltipContextProvider = MNFF5YOJ_ctx.ContextProvider; +var TooltipScopedContextProvider = MNFF5YOJ_ctx.ScopedContextProvider; + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/tooltip/tooltip-anchor.js +"use client"; + + + + + + + + + + + + + +// src/tooltip/tooltip-anchor.ts + + + +var globalStore = createStore({ + activeStore: null +}); +var useTooltipAnchor = createHook( + (_a) => { + var _b = _a, { store, showOnHover = true } = _b, props = __objRest(_b, ["store", "showOnHover"]); + const context = useTooltipProviderContext(); + store = store || context; + invariant( + store, + false && 0 + ); + const canShowOnHoverRef = (0,external_React_.useRef)(false); + (0,external_React_.useEffect)(() => { + return sync(store, ["mounted"], (state) => { + if (state.mounted) + return; + canShowOnHoverRef.current = false; + }); + }, [store]); + (0,external_React_.useEffect)(() => { + return sync(store, ["mounted", "skipTimeout"], (state) => { + if (!store) + return; + if (state.mounted) { + const { activeStore } = globalStore.getState(); + if (activeStore !== store) { + activeStore == null ? void 0 : activeStore.hide(); + } + return globalStore.setState("activeStore", store); + } + const id = setTimeout(() => { + const { activeStore } = globalStore.getState(); + if (activeStore !== store) + return; + globalStore.setState("activeStore", null); + }, state.skipTimeout); + return () => clearTimeout(id); + }); + }, [store]); + const onMouseEnterProp = props.onMouseEnter; + const onMouseEnter = useEvent((event) => { + onMouseEnterProp == null ? void 0 : onMouseEnterProp(event); + canShowOnHoverRef.current = true; + }); + const onFocusVisibleProp = props.onFocusVisible; + const onFocusVisible = useEvent((event) => { + onFocusVisibleProp == null ? void 0 : onFocusVisibleProp(event); + if (event.defaultPrevented) + return; + store == null ? void 0 : store.setAnchorElement(event.currentTarget); + store == null ? void 0 : store.show(); + }); + const onBlurProp = props.onBlur; + const onBlur = useEvent((event) => { + onBlurProp == null ? void 0 : onBlurProp(event); + if (event.defaultPrevented) + return; + const { activeStore } = globalStore.getState(); + if (activeStore === store) { + globalStore.setState("activeStore", null); + } + }); + const type = store.useState("type"); + const contentId = store.useState((state) => { + var _a2; + return (_a2 = state.contentElement) == null ? void 0 : _a2.id; + }); + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + "aria-labelledby": type === "label" ? contentId : void 0, + "aria-describedby": type === "description" ? contentId : void 0 + }, props), { + onMouseEnter, + onFocusVisible, + onBlur + }); + props = useHovercardAnchor(_4R3V3JGP_spreadValues({ + store, + showOnHover: (event) => { + if (!canShowOnHoverRef.current) + return false; + if (isFalsyBooleanCallback(showOnHover, event)) + return false; + const { activeStore } = globalStore.getState(); + if (!activeStore) + return true; + store == null ? void 0 : store.show(); + return false; + } + }, props)); + return props; + } +); +var TooltipAnchor = createComponent((props) => { + const htmlProps = useTooltipAnchor(props); + return _3ORBWXWF_createElement("div", htmlProps); +}); +if (false) {} + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/YMV43K4F.js +"use client"; + +// src/hovercard/utils/polygon.ts +function getEventPoint(event) { + return [event.clientX, event.clientY]; +} +function isPointInPolygon(point, polygon) { + const [x, y] = point; + let inside = false; + const length = polygon.length; + for (let l = length, i = 0, j = l - 1; i < l; j = i++) { + const [xi, yi] = polygon[i]; + const [xj, yj] = polygon[j]; + const [, vy] = polygon[j === 0 ? l - 1 : j - 1] || [0, 0]; + const where = (yi - yj) * (x - xi) - (xi - xj) * (y - yi); + if (yj < yi) { + if (y >= yj && y < yi) { + if (where === 0) + return true; + if (where > 0) { + if (y === yj) { + if (y > vy) { + inside = !inside; + } + } else { + inside = !inside; + } + } + } + } else if (yi < yj) { + if (y > yi && y <= yj) { + if (where === 0) + return true; + if (where < 0) { + if (y === yj) { + if (y < vy) { + inside = !inside; + } } else { - var _options$previous; - - (_options$previous = options.previous) === null || _options$previous === void 0 ? void 0 : _options$previous.call(options, true); - } + inside = !inside; + } + } + } + } else if (y == yi && (x >= xj && x <= xi || x >= xi && x <= xj)) { + return true; + } + } + return inside; +} +function getEnterPointPlacement(enterPoint, rect) { + const { top, right, bottom, left } = rect; + const [x, y] = enterPoint; + const placementX = x < left ? "left" : x > right ? "right" : null; + const placementY = y < top ? "top" : y > bottom ? "bottom" : null; + return [placementX, placementY]; +} +function getElementPolygon(element, enterPoint) { + const rect = element.getBoundingClientRect(); + const { top, right, bottom, left } = rect; + const [x, y] = getEnterPointPlacement(enterPoint, rect); + const polygon = [enterPoint]; + if (x) { + if (y !== "top") { + polygon.push([x === "left" ? left : right, top]); + } + polygon.push([x === "left" ? right : left, top]); + polygon.push([x === "left" ? right : left, bottom]); + if (y !== "bottom") { + polygon.push([x === "left" ? left : right, bottom]); + } + } else if (y === "top") { + polygon.push([left, top]); + polygon.push([left, bottom]); + polygon.push([right, bottom]); + polygon.push([right, top]); + } else { + polygon.push([left, bottom]); + polygon.push([left, top]); + polygon.push([right, top]); + polygon.push([right, bottom]); + } + return polygon; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/MKDDWKFK.js +"use client"; + +// src/dialog/utils/is-backdrop.ts +function MKDDWKFK_isBackdrop(element, ...ids) { + if (!element) + return false; + const backdrop = element.getAttribute("data-backdrop"); + if (backdrop == null) + return false; + if (backdrop === "") + return true; + if (backdrop === "true") + return true; + if (!ids.length) + return true; + return ids.some((id) => backdrop === id); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/X6WIMZJE.js +"use client"; + +// src/dialog/utils/orchestrate.ts +var cleanups = /* @__PURE__ */ new WeakMap(); +function orchestrate(element, key, setup) { + if (!cleanups.has(element)) { + cleanups.set(element, /* @__PURE__ */ new Map()); + } + const elementCleanups = cleanups.get(element); + const prevCleanup = elementCleanups.get(key); + if (!prevCleanup) { + elementCleanups.set(key, setup()); + return () => { + var _a; + (_a = elementCleanups.get(key)) == null ? void 0 : _a(); + elementCleanups.delete(key); + }; + } + const cleanup = setup(); + const nextCleanup = () => { + cleanup(); + prevCleanup(); + elementCleanups.delete(key); + }; + elementCleanups.set(key, nextCleanup); + return () => { + const isCurrent = elementCleanups.get(key) === nextCleanup; + if (!isCurrent) + return; + cleanup(); + elementCleanups.set(key, prevCleanup); + }; +} +function setAttribute(element, attr, value) { + const setup = () => { + const previousValue = element.getAttribute(attr); + element.setAttribute(attr, value); + return () => { + if (previousValue == null) { + element.removeAttribute(attr); + } else { + element.setAttribute(attr, previousValue); + } + }; + }; + return orchestrate(element, attr, setup); +} +function setProperty(element, property, value) { + const setup = () => { + const exists = property in element; + const previousValue = element[property]; + element[property] = value; + return () => { + if (!exists) { + delete element[property]; + } else { + element[property] = previousValue; + } + }; + }; + return orchestrate(element, property, setup); +} +function assignStyle(element, style) { + if (!element) + return () => { + }; + const setup = () => { + const prevStyle = element.style.cssText; + Object.assign(element.style, style); + return () => { + element.style.cssText = prevStyle; + }; + }; + return orchestrate(element, "style", setup); +} +function setCSSProperty(element, property, value) { + if (!element) + return () => { + }; + const setup = () => { + const previousValue = element.style.getPropertyValue(property); + element.style.setProperty(property, value); + return () => { + if (previousValue) { + element.style.setProperty(property, previousValue); + } else { + element.style.removeProperty(property); + } + }; + }; + return orchestrate(element, property, setup); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/72E5EPFF.js +"use client"; + + +// src/dialog/utils/walk-tree-outside.ts + + +var ignoreTags = ["SCRIPT", "STYLE"]; +function getSnapshotPropertyName(id) { + return `__ariakit-dialog-snapshot-${id}`; +} +function inSnapshot(id, element) { + const doc = DLOEKDPY_getDocument(element); + const propertyName = getSnapshotPropertyName(id); + if (!doc.body[propertyName]) + return true; + do { + if (element === doc.body) + return false; + if (!!element[propertyName]) + return true; + if (!element.parentElement) + return false; + element = element.parentElement; + } while (true); +} +function isValidElement(id, element, ignoredElements) { + if (ignoreTags.includes(element.tagName)) + return false; + if (!inSnapshot(id, element)) + return false; + return !ignoredElements.some( + (enabledElement) => enabledElement && contains(element, enabledElement) + ); +} +function _72E5EPFF_walkTreeOutside(id, elements, callback, ancestorCallback) { + for (let element of elements) { + if (!(element == null ? void 0 : element.isConnected)) + continue; + const hasAncestorAlready = elements.some((maybeAncestor) => { + if (!maybeAncestor) + return false; + if (maybeAncestor === element) + return false; + return maybeAncestor.contains(element); + }); + const doc = DLOEKDPY_getDocument(element); + const originalElement = element; + while (element.parentElement && element !== doc.body) { + ancestorCallback == null ? void 0 : ancestorCallback(element.parentElement, originalElement); + if (!hasAncestorAlready) { + for (const child of element.parentElement.children) { + if (isValidElement(id, child, elements)) { + callback(child, originalElement); + } + } + } + element = element.parentElement; + } + } +} +function createWalkTreeSnapshot(id, elements) { + const { body } = DLOEKDPY_getDocument(elements[0]); + const cleanups = []; + const markElement = (element) => { + cleanups.push(setProperty(element, getSnapshotPropertyName(id), true)); + }; + _72E5EPFF_walkTreeOutside(id, elements, markElement); + return chain( + setProperty(body, getSnapshotPropertyName(id), true), + () => cleanups.forEach((fn) => fn()) + ); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/TL67WVI6.js +"use client"; + + + + +// src/dialog/utils/mark-tree-outside.ts + +function getPropertyName(id = "", ancestor = false) { + return `__ariakit-dialog-${ancestor ? "ancestor" : "outside"}${id ? `-${id}` : ""}`; +} +function markElement(element, id = "") { + return chain( + setProperty(element, getPropertyName(), true), + setProperty(element, getPropertyName(id), true) + ); +} +function markAncestor(element, id = "") { + return chain( + setProperty(element, getPropertyName("", true), true), + setProperty(element, getPropertyName(id, true), true) + ); +} +function isElementMarked(element, id) { + const ancestorProperty = getPropertyName(id, true); + if (element[ancestorProperty]) + return true; + const elementProperty = getPropertyName(id); + do { + if (element[elementProperty]) + return true; + if (!element.parentElement) + return false; + element = element.parentElement; + } while (true); +} +function markTreeOutside(id, elements) { + const cleanups = []; + const ids = elements.map((el) => el == null ? void 0 : el.id); + _72E5EPFF_walkTreeOutside( + id, + elements, + (element) => { + if (MKDDWKFK_isBackdrop(element, ...ids)) + return; + cleanups.unshift(markElement(element, id)); + }, + (ancestor, element) => { + const isAnotherDialogAncestor = element.hasAttribute("data-dialog") && element.id !== id; + if (isAnotherDialogAncestor) + return; + cleanups.unshift(markAncestor(ancestor, id)); + } + ); + const restoreAccessibilityTree = () => { + cleanups.forEach((fn) => fn()); + }; + return restoreAccessibilityTree; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CLE7NTOY.js +"use client"; + + + + + + + +// src/disclosure/disclosure-content.tsx + + + +function afterTimeout(timeoutMs, cb) { + const timeoutId = setTimeout(cb, timeoutMs); + return () => clearTimeout(timeoutId); +} +function CLE7NTOY_afterPaint(cb) { + let raf = requestAnimationFrame(() => { + raf = requestAnimationFrame(cb); + }); + return () => cancelAnimationFrame(raf); +} +function parseCSSTime(...times) { + return times.join(", ").split(", ").reduce((longestTime, currentTimeString) => { + const currentTime = parseFloat(currentTimeString || "0s") * 1e3; + if (currentTime > longestTime) + return currentTime; + return longestTime; + }, 0); +} +function isHidden(mounted, hidden, alwaysVisible) { + return !alwaysVisible && hidden !== false && (!mounted || !!hidden); +} +var useDisclosureContent = createHook( + (_a) => { + var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, ["store", "alwaysVisible"]); + const context = useDisclosureProviderContext(); + store = store || context; + invariant( + store, + false && 0 + ); + const id = useId(props.id); + const [transition, setTransition] = (0,external_React_.useState)(null); + const open = store.useState("open"); + const mounted = store.useState("mounted"); + const animated = store.useState("animated"); + const contentElement = store.useState("contentElement"); + useSafeLayoutEffect(() => { + if (!animated) + return; + if (!(contentElement == null ? void 0 : contentElement.isConnected)) { + setTransition(null); + return; + } + return CLE7NTOY_afterPaint(() => { + setTransition(open ? "enter" : "leave"); + }); + }, [animated, contentElement, open]); + useSafeLayoutEffect(() => { + if (!store) + return; + if (!animated) + return; + if (!contentElement) + return; + if (!transition) + return; + if (transition === "enter" && !open) + return; + if (transition === "leave" && open) + return; + if (typeof animated === "number") { + const timeoutMs2 = animated; + return afterTimeout(timeoutMs2, store.stopAnimation); + } + const { + transitionDuration, + animationDuration, + transitionDelay, + animationDelay + } = getComputedStyle(contentElement); + const delay = parseCSSTime(transitionDelay, animationDelay); + const duration = parseCSSTime(transitionDuration, animationDuration); + const timeoutMs = delay + duration; + if (!timeoutMs) + return; + return afterTimeout(timeoutMs, store.stopAnimation); + }, [store, animated, contentElement, open, transition]); + props = useWrapElement( + props, + (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DialogScopedContextProvider, { value: store, children: element }), + [store] + ); + const hidden = isHidden(mounted, props.hidden, alwaysVisible); + const style = hidden ? _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props.style), { display: "none" }) : props.style; + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + id, + "data-enter": transition === "enter" ? "" : void 0, + "data-leave": transition === "leave" ? "" : void 0, + hidden + }, props), { + ref: useMergeRefs(id ? store.setContentElement : null, props.ref), + style + }); + return props; + } +); +var DisclosureContentImpl = createComponent( + (props) => { + const htmlProps = useDisclosureContent(props); + return _3ORBWXWF_createElement("div", htmlProps); + } +); +var DisclosureContent = createComponent( + (_a) => { + var _b = _a, { unmountOnHide } = _b, props = __objRest(_b, ["unmountOnHide"]); + const context = useDisclosureProviderContext(); + const store = props.store || context; + const mounted = useStoreState( + store, + (state) => !unmountOnHide || (state == null ? void 0 : state.mounted) + ); + if (mounted === false) + return null; + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DisclosureContentImpl, _4R3V3JGP_spreadValues({}, props)); + } +); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/LWHPHW7Q.js +"use client"; + + + + + + + +// src/dialog/dialog-backdrop.tsx + + +function DialogBackdrop({ + store, + backdrop, + backdropProps, + alwaysVisible, + hidden +}) { + const ref = (0,external_React_.useRef)(null); + const disclosure = useDisclosureStore({ disclosure: store }); + const contentElement = store.useState("contentElement"); + useSafeLayoutEffect(() => { + const backdrop2 = ref.current; + const dialog = contentElement; + if (!backdrop2) + return; + if (!dialog) + return; + backdrop2.style.zIndex = getComputedStyle(dialog).zIndex; + }, [contentElement]); + useSafeLayoutEffect(() => { + const id = contentElement == null ? void 0 : contentElement.id; + if (!id) + return; + const backdrop2 = ref.current; + if (!backdrop2) + return; + return markAncestor(backdrop2, id); + }, [contentElement]); + if (hidden != null) { + backdropProps = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, backdropProps), { hidden }); + } + const props = useDisclosureContent(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + store: disclosure, + role: "presentation", + "data-backdrop": (contentElement == null ? void 0 : contentElement.id) || "", + alwaysVisible + }, backdropProps), { + ref: useMergeRefs(backdropProps == null ? void 0 : backdropProps.ref, ref), + style: _4R3V3JGP_spreadValues({ + position: "fixed", + top: 0, + right: 0, + bottom: 0, + left: 0 + }, backdropProps == null ? void 0 : backdropProps.style) + })); + if (!backdrop) + return null; + if ((0,external_React_.isValidElement)(backdrop)) { + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Role, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { render: backdrop })); + } + const Component = typeof backdrop !== "boolean" ? backdrop : "div"; + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Role, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { render: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {}) })); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/BULCTPRV.js +"use client"; + + + + +// src/dialog/utils/disable-accessibility-tree-outside.ts +function hideElementFromAccessibilityTree(element) { + return setAttribute(element, "aria-hidden", "true"); +} +function disableAccessibilityTreeOutside(id, elements) { + const cleanups = []; + const ids = elements.map((el) => el == null ? void 0 : el.id); + walkTreeOutside(id, elements, (element) => { + if (isBackdrop(element, ...ids)) + return; + cleanups.unshift(hideElementFromAccessibilityTree(element)); + }); + const restoreAccessibilityTree = () => { + cleanups.forEach((fn) => fn()); + }; + return restoreAccessibilityTree; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/677M2CI3.js +"use client"; + +// src/dialog/utils/supports-inert.ts +function supportsInert() { + return "inert" in HTMLElement.prototype; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/TQYOGOE2.js +"use client"; + + + + + + +// src/dialog/utils/disable-tree.ts + + + +function disableTree(element, ignoredElements) { + if (!("style" in element)) + return noop; + if (supportsInert()) { + return setProperty(element, "inert", true); + } + const tabbableElements = getAllTabbableIn(element, true); + const enableElements = tabbableElements.map((element2) => { + if (ignoredElements == null ? void 0 : ignoredElements.some((el) => el && contains(el, element2))) + return noop; + return setAttribute(element2, "tabindex", "-1"); + }); + return chain( + ...enableElements, + hideElementFromAccessibilityTree(element), + assignStyle(element, { + pointerEvents: "none", + userSelect: "none", + cursor: "default" + }) + ); +} +function disableTreeOutside(id, elements) { + const cleanups = []; + const ids = elements.map((el) => el == null ? void 0 : el.id); + _72E5EPFF_walkTreeOutside(id, elements, (element) => { + if (MKDDWKFK_isBackdrop(element, ...ids)) + return; + cleanups.unshift(disableTree(element, elements)); + }); + const restoreTreeOutside = () => { + cleanups.forEach((fn) => fn()); + }; + return restoreTreeOutside; +} + + + +;// CONCATENATED MODULE: external "ReactDOM" +const external_ReactDOM_namespaceObject = window["ReactDOM"]; +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CS347UVZ.js +"use client"; + + +// src/dialog/utils/use-root-dialog.ts + + + +function useRootDialog({ + attribute, + contentId, + contentElement, + enabled +}) { + const [updated, retry] = useForceUpdate(); + const isRootDialog = (0,external_React_.useCallback)(() => { + if (!enabled) + return false; + if (!contentElement) + return false; + const { body } = DLOEKDPY_getDocument(contentElement); + const id = body.getAttribute(attribute); + return !id || id === contentId; + }, [updated, enabled, contentElement, attribute, contentId]); + (0,external_React_.useEffect)(() => { + if (!enabled) + return; + if (!contentId) + return; + if (!contentElement) + return; + const { body } = DLOEKDPY_getDocument(contentElement); + if (isRootDialog()) { + body.setAttribute(attribute, contentId); + return () => body.removeAttribute(attribute); + } + const observer = new MutationObserver(() => (0,external_ReactDOM_namespaceObject.flushSync)(retry)); + observer.observe(body, { attributeFilter: [attribute] }); + return () => observer.disconnect(); + }, [updated, enabled, contentId, contentElement, isRootDialog, attribute]); + return isRootDialog; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6BJGLK2C.js +"use client"; + + + +// src/dialog/utils/use-prevent-body-scroll.ts + + + + +function getPaddingProperty(documentElement) { + const documentLeft = documentElement.getBoundingClientRect().left; + const scrollbarX = Math.round(documentLeft) + documentElement.scrollLeft; + return scrollbarX ? "paddingLeft" : "paddingRight"; +} +function usePreventBodyScroll(contentElement, contentId, enabled) { + const isRootDialog = useRootDialog({ + attribute: "data-dialog-prevent-body-scroll", + contentElement, + contentId, + enabled + }); + (0,external_React_.useEffect)(() => { + if (!isRootDialog()) + return; + if (!contentElement) + return; + const doc = DLOEKDPY_getDocument(contentElement); + const win = getWindow(contentElement); + const { documentElement, body } = doc; + const cssScrollbarWidth = documentElement.style.getPropertyValue("--scrollbar-width"); + const scrollbarWidth = cssScrollbarWidth ? parseInt(cssScrollbarWidth) : win.innerWidth - documentElement.clientWidth; + const setScrollbarWidthProperty = () => setCSSProperty( + documentElement, + "--scrollbar-width", + `${scrollbarWidth}px` + ); + const paddingProperty = getPaddingProperty(documentElement); + const setStyle = () => assignStyle(body, { + overflow: "hidden", + [paddingProperty]: `${scrollbarWidth}px` + }); + const setIOSStyle = () => { + var _a, _b; + const { scrollX, scrollY, visualViewport } = win; + const offsetLeft = (_a = visualViewport == null ? void 0 : visualViewport.offsetLeft) != null ? _a : 0; + const offsetTop = (_b = visualViewport == null ? void 0 : visualViewport.offsetTop) != null ? _b : 0; + const restoreStyle = assignStyle(body, { + position: "fixed", + overflow: "hidden", + top: `${-(scrollY - Math.floor(offsetTop))}px`, + left: `${-(scrollX - Math.floor(offsetLeft))}px`, + right: "0", + [paddingProperty]: `${scrollbarWidth}px` + }); + return () => { + restoreStyle(); + if (true) { + win.scrollTo(scrollX, scrollY); + } + }; + }; + const isIOS = isApple() && !isMac(); + return chain( + setScrollbarWidthProperty(), + isIOS ? setIOSStyle() : setStyle() + ); + }, [isRootDialog, contentElement]); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/IUB2BTEK.js +"use client"; + + +// src/dialog/utils/use-nested-dialogs.tsx + + + + +var NestedDialogsContext = (0,external_React_.createContext)({}); +function useNestedDialogs(store) { + const context = (0,external_React_.useContext)(NestedDialogsContext); + const [dialogs, setDialogs] = (0,external_React_.useState)([]); + const add = (0,external_React_.useCallback)( + (dialog) => { + var _a; + setDialogs((dialogs2) => [...dialogs2, dialog]); + return chain((_a = context.add) == null ? void 0 : _a.call(context, dialog), () => { + setDialogs((dialogs2) => dialogs2.filter((d) => d !== dialog)); + }); + }, + [context] + ); + useSafeLayoutEffect(() => { + return sync(store, ["open", "contentElement"], (state) => { + var _a; + if (!state.open) + return; + if (!state.contentElement) + return; + return (_a = context.add) == null ? void 0 : _a.call(context, store); + }); + }, [store, context]); + const providerValue = (0,external_React_.useMemo)(() => ({ store, add }), [store, add]); + const wrapElement = (0,external_React_.useCallback)( + (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NestedDialogsContext.Provider, { value: providerValue, children: element }), + [providerValue] + ); + return { wrapElement, nestedDialogs: dialogs }; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/OOBDFMJL.js +"use client"; + +// src/dialog/utils/use-previous-mouse-down-ref.ts + + +function usePreviousMouseDownRef(enabled) { + const previousMouseDownRef = (0,external_React_.useRef)(); + (0,external_React_.useEffect)(() => { + if (!enabled) { + previousMouseDownRef.current = null; + return; + } + const onMouseDown = (event) => { + previousMouseDownRef.current = event.target; + }; + return addGlobalEventListener("mousedown", onMouseDown, true); + }, [enabled]); + return previousMouseDownRef; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/XHJGS6Z5.js +"use client"; + + + + + +// src/dialog/utils/use-hide-on-interact-outside.ts + + + +function isInDocument(target) { + if (target.tagName === "HTML") + return true; + return contains(DLOEKDPY_getDocument(target).body, target); +} +function isDisclosure(disclosure, target) { + if (!disclosure) + return false; + if (contains(disclosure, target)) + return true; + const activeId = target.getAttribute("aria-activedescendant"); + if (activeId) { + const activeElement = DLOEKDPY_getDocument(disclosure).getElementById(activeId); + if (activeElement) { + return contains(disclosure, activeElement); + } + } + return false; +} +function isMouseEventOnDialog(event, dialog) { + if (!("clientY" in event)) + return false; + const rect = dialog.getBoundingClientRect(); + if (rect.width === 0 || rect.height === 0) + return false; + return rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width; +} +function useEventOutside({ + store, + type, + listener, + capture, + domReady +}) { + const callListener = useEvent(listener); + const open = store.useState("open"); + const focusedRef = (0,external_React_.useRef)(false); + useSafeLayoutEffect(() => { + if (!open) + return; + if (!domReady) + return; + const { contentElement } = store.getState(); + if (!contentElement) + return; + const onFocus = () => { + focusedRef.current = true; + }; + contentElement.addEventListener("focusin", onFocus, true); + return () => contentElement.removeEventListener("focusin", onFocus, true); + }, [store, open, domReady]); + (0,external_React_.useEffect)(() => { + if (!open) + return; + const onEvent = (event) => { + const { contentElement, disclosureElement } = store.getState(); + const target = event.target; + if (!contentElement) + return; + if (!target) + return; + if (!isInDocument(target)) + return; + if (contains(contentElement, target)) + return; + if (isDisclosure(disclosureElement, target)) + return; + if (target.hasAttribute("data-focus-trap")) + return; + if (isMouseEventOnDialog(event, contentElement)) + return; + const focused = focusedRef.current; + if (focused && !isElementMarked(target, contentElement.id)) + return; + callListener(event); + }; + return addGlobalEventListener(type, onEvent, capture); + }, [open, capture]); +} +function shouldHideOnInteractOutside(hideOnInteractOutside, event) { + if (typeof hideOnInteractOutside === "function") { + return hideOnInteractOutside(event); + } + return !!hideOnInteractOutside; +} +function useHideOnInteractOutside(store, hideOnInteractOutside, domReady) { + const open = store.useState("open"); + const previousMouseDownRef = usePreviousMouseDownRef(open); + const props = { store, domReady, capture: true }; + useEventOutside(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + type: "click", + listener: (event) => { + const { contentElement } = store.getState(); + const previousMouseDown = previousMouseDownRef.current; + if (!previousMouseDown) + return; + if (!isVisible(previousMouseDown)) + return; + if (!isElementMarked(previousMouseDown, contentElement == null ? void 0 : contentElement.id)) + return; + if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) + return; + store.hide(); + } + })); + useEventOutside(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + type: "focusin", + listener: (event) => { + const { contentElement } = store.getState(); + if (!contentElement) + return; + if (event.target === DLOEKDPY_getDocument(contentElement)) + return; + if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) + return; + store.hide(); + } + })); + useEventOutside(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + type: "contextmenu", + listener: (event) => { + if (!shouldHideOnInteractOutside(hideOnInteractOutside, event)) + return; + store.hide(); + } + })); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6GXEOXGT.js +"use client"; + +// src/dialog/utils/prepend-hidden-dismiss.ts + +function prependHiddenDismiss(container, onClick) { + const document = DLOEKDPY_getDocument(container); + const button = document.createElement("button"); + button.type = "button"; + button.tabIndex = -1; + button.textContent = "Dismiss popup"; + Object.assign(button.style, { + border: "0px", + clip: "rect(0 0 0 0)", + height: "1px", + margin: "-1px", + overflow: "hidden", + padding: "0px", + position: "absolute", + whiteSpace: "nowrap", + width: "1px" + }); + button.addEventListener("click", onClick); + container.prepend(button); + const removeHiddenDismiss = () => { + button.removeEventListener("click", onClick); + button.remove(); + }; + return removeHiddenDismiss; +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/HPP6CWMY.js +"use client"; + + + + + +// src/focusable/focusable-container.tsx + +var useFocusableContainer = createHook( + (_a) => { + var _b = _a, { autoFocusOnShow = true } = _b, props = __objRest(_b, ["autoFocusOnShow"]); + props = useWrapElement( + props, + (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(FocusableContext.Provider, { value: autoFocusOnShow, children: element }), + [autoFocusOnShow] + ); + return props; + } +); +var FocusableContainer = createComponent( + (props) => { + const htmlProps = useFocusableContainer(props); + return _3ORBWXWF_createElement("div", htmlProps); + } +); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/XPF5GU3Q.js +"use client"; + +// src/heading/heading-context.ts + +var HeadingContext = (0,external_React_.createContext)(0); + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/UYRJLDVS.js +"use client"; + + +// src/heading/heading-level.tsx + + +function HeadingLevel({ level, children }) { + const contextLevel = (0,external_React_.useContext)(HeadingContext); + const nextLevel = Math.max( + Math.min(level || contextLevel + 1, 6), + 1 + ); + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(HeadingContext.Provider, { value: nextLevel, children }); +} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/BG6HZDS7.js +"use client"; + + + +// src/visually-hidden/visually-hidden.ts +var useVisuallyHidden = createHook((props) => { + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + style: _4R3V3JGP_spreadValues({ + border: 0, + clip: "rect(0 0 0 0)", + height: "1px", + margin: "-1px", + overflow: "hidden", + padding: 0, + position: "absolute", + whiteSpace: "nowrap", + width: "1px" + }, props.style) + }); + return props; +}); +var VisuallyHidden = createComponent( + (props) => { + const htmlProps = useVisuallyHidden(props); + return _3ORBWXWF_createElement("span", htmlProps); + } +); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CHKJ74UC.js +"use client"; + + + + +// src/focus-trap/focus-trap.ts +var useFocusTrap = createHook((props) => { + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + "data-focus-trap": "", + tabIndex: 0, + "aria-hidden": true + }, props), { + style: _4R3V3JGP_spreadValues({ + // Prevents unintended scroll jumps. + position: "fixed", + top: 0, + left: 0 + }, props.style) + }); + props = useVisuallyHidden(props); + return props; +}); +var FocusTrap = createComponent((props) => { + const htmlProps = useFocusTrap(props); + return _3ORBWXWF_createElement("span", htmlProps); +}); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/7452U3HH.js +"use client"; + +// src/portal/portal-context.ts + +var PortalContext = (0,external_React_.createContext)(null); + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/JPXNJYSO.js +"use client"; + + + + + + + +// src/portal/portal.tsx + + + + + + +function getRootElement(element) { + return DLOEKDPY_getDocument(element).body; +} +function getPortalElement(element, portalElement) { + if (!portalElement) { + return DLOEKDPY_getDocument(element).createElement("div"); + } + if (typeof portalElement === "function") { + return portalElement(element); + } + return portalElement; +} +function getRandomId(prefix = "id") { + return `${prefix ? `${prefix}-` : ""}${Math.random().toString(36).substr(2, 6)}`; +} +function queueFocus(element) { + queueMicrotask(() => { + element == null ? void 0 : element.focus(); + }); +} +var usePortal = createHook( + (_a) => { + var _b = _a, { + preserveTabOrder, + preserveTabOrderAnchor, + portalElement, + portalRef, + portal = true + } = _b, props = __objRest(_b, [ + "preserveTabOrder", + "preserveTabOrderAnchor", + "portalElement", + "portalRef", + "portal" + ]); + const ref = (0,external_React_.useRef)(null); + const refProp = useMergeRefs(ref, props.ref); + const context = (0,external_React_.useContext)(PortalContext); + const [portalNode, setPortalNode] = (0,external_React_.useState)(null); + const [anchorPortalNode, setAnchorPortalNode] = (0,external_React_.useState)(null); + const outerBeforeRef = (0,external_React_.useRef)(null); + const innerBeforeRef = (0,external_React_.useRef)(null); + const innerAfterRef = (0,external_React_.useRef)(null); + const outerAfterRef = (0,external_React_.useRef)(null); + useSafeLayoutEffect(() => { + const element = ref.current; + if (!element || !portal) { + setPortalNode(null); + return; + } + const portalEl = getPortalElement(element, portalElement); + if (!portalEl) { + setPortalNode(null); + return; + } + const isPortalInDocument = portalEl.isConnected; + if (!isPortalInDocument) { + const rootElement = context || getRootElement(element); + rootElement.appendChild(portalEl); + } + if (!portalEl.id) { + portalEl.id = element.id ? `portal/${element.id}` : getRandomId(); + } + setPortalNode(portalEl); + setRef(portalRef, portalEl); + if (isPortalInDocument) + return; + return () => { + portalEl.remove(); + setRef(portalRef, null); + }; + }, [portal, portalElement, context, portalRef]); + useSafeLayoutEffect(() => { + if (!preserveTabOrder) + return; + if (!preserveTabOrderAnchor) + return; + const doc = DLOEKDPY_getDocument(preserveTabOrderAnchor); + const element = doc.createElement("span"); + element.style.position = "fixed"; + preserveTabOrderAnchor.insertAdjacentElement("afterend", element); + setAnchorPortalNode(element); + return () => { + element.remove(); + setAnchorPortalNode(null); + }; + }, [preserveTabOrder, preserveTabOrderAnchor]); + (0,external_React_.useEffect)(() => { + if (!portalNode) + return; + if (!preserveTabOrder) + return; + let raf = 0; + const onFocus = (event) => { + if (!isFocusEventOutside(event)) + return; + const focusing = event.type === "focusin"; + cancelAnimationFrame(raf); + if (focusing) { + return restoreFocusIn(portalNode); + } + raf = requestAnimationFrame(() => { + disableFocusIn(portalNode, true); + }); + }; + portalNode.addEventListener("focusin", onFocus, true); + portalNode.addEventListener("focusout", onFocus, true); + return () => { + cancelAnimationFrame(raf); + portalNode.removeEventListener("focusin", onFocus, true); + portalNode.removeEventListener("focusout", onFocus, true); + }; + }, [portalNode, preserveTabOrder]); + props = useWrapElement( + props, + (element) => { + element = // While the portal node is not in the DOM, we need to pass the + // current context to the portal context, otherwise it's going to + // reset to the body element on nested portals. + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PortalContext.Provider, { value: portalNode || context, children: element }); + if (!portal) + return element; + if (!portalNode) { + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( + "span", + { + ref: refProp, + id: props.id, + style: { position: "fixed" }, + hidden: true + } + ); + } + element = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ + preserveTabOrder && portalNode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( + FocusTrap, + { + ref: innerBeforeRef, + className: "__focus-trap-inner-before", + onFocus: (event) => { + if (isFocusEventOutside(event, portalNode)) { + queueFocus(getNextTabbable()); + } else { + queueFocus(outerBeforeRef.current); + } + } + } + ), + element, + preserveTabOrder && portalNode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( + FocusTrap, + { + ref: innerAfterRef, + className: "__focus-trap-inner-after", + onFocus: (event) => { + if (isFocusEventOutside(event, portalNode)) { + queueFocus(getPreviousTabbable()); + } else { + queueFocus(outerAfterRef.current); + } + } + } + ) + ] }); + if (portalNode) { + element = (0,external_ReactDOM_namespaceObject.createPortal)(element, portalNode); + } + let preserveTabOrderElement = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ + preserveTabOrder && portalNode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( + FocusTrap, + { + ref: outerBeforeRef, + className: "__focus-trap-outer-before", + onFocus: (event) => { + const fromOuter = event.relatedTarget === outerAfterRef.current; + if (!fromOuter && isFocusEventOutside(event, portalNode)) { + queueFocus(innerBeforeRef.current); + } else { + queueFocus(getPreviousTabbable()); + } + } + } + ), + preserveTabOrder && // We're using position: fixed here so that the browser doesn't + // add margin to the element when setting gap on a parent element. + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { "aria-owns": portalNode == null ? void 0 : portalNode.id, style: { position: "fixed" } }), + preserveTabOrder && portalNode && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( + FocusTrap, + { + ref: outerAfterRef, + className: "__focus-trap-outer-after", + onFocus: (event) => { + if (isFocusEventOutside(event, portalNode)) { + queueFocus(innerAfterRef.current); + } else { + const nextTabbable = getNextTabbable(); + if (nextTabbable === innerBeforeRef.current) { + requestAnimationFrame(() => { + var _a2; + return (_a2 = getNextTabbable()) == null ? void 0 : _a2.focus(); + }); + return; + } + queueFocus(nextTabbable); + } + } + } + ) + ] }); + if (anchorPortalNode && preserveTabOrder) { + preserveTabOrderElement = (0,external_ReactDOM_namespaceObject.createPortal)( + preserveTabOrderElement, + anchorPortalNode + ); + } + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ + preserveTabOrderElement, + element + ] }); + }, + [ + portalNode, + context, + portal, + props.id, + preserveTabOrder, + anchorPortalNode + ] + ); + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + ref: refProp + }); + return props; + } +); +var Portal = createComponent((props) => { + const htmlProps = usePortal(props); + return _3ORBWXWF_createElement("div", htmlProps); +}); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/NERBASET.js +"use client"; + + + + + + + + + + + + + + + + + + + + +// src/dialog/dialog.tsx + + + + + + + +var NERBASET_isSafariBrowser = isSafari(); +function isAlreadyFocusingAnotherElement(dialog) { + const activeElement = getActiveElement(); + if (!activeElement) + return false; + if (dialog && contains(dialog, activeElement)) + return false; + if (isFocusable(activeElement)) + return true; + return false; +} +function getElementFromProp(prop, focusable = false) { + if (!prop) + return null; + const element = "current" in prop ? prop.current : prop; + if (!element) + return null; + if (focusable) + return isFocusable(element) ? element : null; + return element; +} +var useDialog = createHook( + (_a) => { + var _b = _a, { + store: storeProp, + open: openProp, + onClose, + focusable = true, + modal = true, + portal = !!modal, + backdrop = !!modal, + backdropProps, + hideOnEscape = true, + hideOnInteractOutside = true, + getPersistentElements, + preventBodyScroll = !!modal, + autoFocusOnShow = true, + autoFocusOnHide = true, + initialFocus, + finalFocus, + unmountOnHide + } = _b, props = __objRest(_b, [ + "store", + "open", + "onClose", + "focusable", + "modal", + "portal", + "backdrop", + "backdropProps", + "hideOnEscape", + "hideOnInteractOutside", + "getPersistentElements", + "preventBodyScroll", + "autoFocusOnShow", + "autoFocusOnHide", + "initialFocus", + "finalFocus", + "unmountOnHide" + ]); + const context = useDialogProviderContext(); + const ref = (0,external_React_.useRef)(null); + const store = useDialogStore({ + store: storeProp || context, + open: openProp, + setOpen(open2) { + if (open2) + return; + const dialog = ref.current; + if (!dialog) + return; + const event = new Event("close", { bubbles: false, cancelable: true }); + if (onClose) { + dialog.addEventListener("close", onClose, { once: true }); + } + dialog.dispatchEvent(event); + if (!event.defaultPrevented) + return; + store.setOpen(true); + } + }); + const { portalRef, domReady } = usePortalRef(portal, props.portalRef); + const preserveTabOrderProp = props.preserveTabOrder; + const preserveTabOrder = store.useState( + (state) => preserveTabOrderProp && !modal && state.mounted + ); + const id = useId(props.id); + const open = store.useState("open"); + const mounted = store.useState("mounted"); + const contentElement = store.useState("contentElement"); + const hidden = isHidden(mounted, props.hidden, props.alwaysVisible); + usePreventBodyScroll(contentElement, id, preventBodyScroll && !hidden); + useHideOnInteractOutside(store, hideOnInteractOutside, domReady); + const { wrapElement, nestedDialogs } = useNestedDialogs(store); + props = useWrapElement(props, wrapElement, [wrapElement]); + if (false) {} + useSafeLayoutEffect(() => { + if (!open) + return; + const dialog = ref.current; + const activeElement = getActiveElement(dialog, true); + if (!activeElement) + return; + if (activeElement.tagName === "BODY") + return; + if (dialog && contains(dialog, activeElement)) + return; + store.setDisclosureElement(activeElement); + }, [store, open]); + if (NERBASET_isSafariBrowser) { + (0,external_React_.useEffect)(() => { + if (!mounted) + return; + const { disclosureElement } = store.getState(); + if (!disclosureElement) + return; + if (!isButton(disclosureElement)) + return; + const onMouseDown = () => { + let receivedFocus = false; + const onFocus = () => { + receivedFocus = true; + }; + const options = { capture: true, once: true }; + disclosureElement.addEventListener("focusin", onFocus, options); + queueBeforeEvent(disclosureElement, "mouseup", () => { + disclosureElement.removeEventListener("focusin", onFocus, true); + if (receivedFocus) + return; + focusIfNeeded(disclosureElement); + }); + }; + disclosureElement.addEventListener("mousedown", onMouseDown); + return () => { + disclosureElement.removeEventListener("mousedown", onMouseDown); + }; + }, [store, mounted]); + } + (0,external_React_.useEffect)(() => { + if (!modal) + return; + if (!mounted) + return; + if (!domReady) + return; + const dialog = ref.current; + if (!dialog) + return; + const existingDismiss = dialog.querySelector("[data-dialog-dismiss]"); + if (existingDismiss) + return; + return prependHiddenDismiss(dialog, store.hide); + }, [store, modal, mounted, domReady]); + useSafeLayoutEffect(() => { + if (open) + return; + if (!mounted) + return; + if (!domReady) + return; + const dialog = ref.current; + if (!dialog) + return; + return disableTree(dialog); + }, [open, mounted, domReady]); + const canTakeTreeSnapshot = open && domReady; + useSafeLayoutEffect(() => { + if (!id) + return; + if (!canTakeTreeSnapshot) + return; + const dialog = ref.current; + return createWalkTreeSnapshot(id, [dialog]); + }, [id, canTakeTreeSnapshot]); + const getPersistentElementsProp = useEvent(getPersistentElements); + useSafeLayoutEffect(() => { + if (!id) + return; + if (!canTakeTreeSnapshot) + return; + const { disclosureElement } = store.getState(); + const dialog = ref.current; + const persistentElements = getPersistentElementsProp() || []; + const allElements = [ + dialog, + ...persistentElements, + ...nestedDialogs.map((dialog2) => dialog2.getState().contentElement) + ]; + if (modal) { + return chain( + markTreeOutside(id, allElements), + disableTreeOutside(id, allElements) + ); + } + return markTreeOutside(id, [disclosureElement, ...allElements]); + }, [ + id, + store, + canTakeTreeSnapshot, + getPersistentElementsProp, + nestedDialogs, + modal + ]); + const mayAutoFocusOnShow = !!autoFocusOnShow; + const autoFocusOnShowProp = useBooleanEvent(autoFocusOnShow); + const [autoFocusEnabled, setAutoFocusEnabled] = (0,external_React_.useState)(false); + (0,external_React_.useEffect)(() => { + if (!open) + return; + if (!mayAutoFocusOnShow) + return; + if (!domReady) + return; + if (!(contentElement == null ? void 0 : contentElement.isConnected)) + return; + const element = getElementFromProp(initialFocus, true) || // If no initial focus is specified, we try to focus the first element + // with the autofocus attribute. If it's an Ariakit component, the + // Focusable component will consume the autoFocus prop and add the + // data-autofocus attribute to the element instead. + contentElement.querySelector( + "[data-autofocus=true],[autofocus]" + ) || // We have to fallback to the first focusable element otherwise portaled + // dialogs with preserveTabOrder set to true will not receive focus + // properly because the elements aren't tabbable until the dialog + // receives focus. + getFirstTabbableIn(contentElement, true, portal && preserveTabOrder) || // Finally, we fallback to the dialog element itself. + contentElement; + const isElementFocusable = isFocusable(element); + if (!autoFocusOnShowProp(isElementFocusable ? element : null)) + return; + setAutoFocusEnabled(true); + queueMicrotask(() => { + element.focus(); + if (!NERBASET_isSafariBrowser) + return; + element.scrollIntoView({ block: "nearest", inline: "nearest" }); + }); + }, [ + open, + mayAutoFocusOnShow, + domReady, + contentElement, + initialFocus, + portal, + preserveTabOrder, + autoFocusOnShowProp + ]); + const mayAutoFocusOnHide = !!autoFocusOnHide; + const autoFocusOnHideProp = useBooleanEvent(autoFocusOnHide); + const [hasOpened, setHasOpened] = (0,external_React_.useState)(false); + (0,external_React_.useEffect)(() => { + if (!open) + return; + setHasOpened(true); + return () => setHasOpened(false); + }, [open]); + const focusOnHide = (0,external_React_.useCallback)( + (dialog, retry = true) => { + const { disclosureElement } = store.getState(); + if (isAlreadyFocusingAnotherElement(dialog)) + return; + let element = getElementFromProp(finalFocus) || disclosureElement; + if (element == null ? void 0 : element.id) { + const doc = DLOEKDPY_getDocument(element); + const selector = `[aria-activedescendant="${element.id}"]`; + const composite = doc.querySelector(selector); + if (composite) { + element = composite; + } + } + if (element && !isFocusable(element)) { + const maybeParentDialog = DLOEKDPY_closest(element, "[data-dialog]"); + if (maybeParentDialog && maybeParentDialog.id) { + const doc = DLOEKDPY_getDocument(maybeParentDialog); + const selector = `[aria-controls~="${maybeParentDialog.id}"]`; + const control = doc.querySelector(selector); + if (control) { + element = control; + } + } + } + const isElementFocusable = element && isFocusable(element); + if (!isElementFocusable && retry) { + requestAnimationFrame(() => focusOnHide(dialog, false)); + return; + } + if (!autoFocusOnHideProp(isElementFocusable ? element : null)) + return; + if (!isElementFocusable) + return; + element == null ? void 0 : element.focus(); + }, + [store, finalFocus, autoFocusOnHideProp] + ); + useSafeLayoutEffect(() => { + if (open) + return; + if (!hasOpened) + return; + if (!mayAutoFocusOnHide) + return; + const dialog = ref.current; + focusOnHide(dialog); + }, [open, hasOpened, domReady, mayAutoFocusOnHide, focusOnHide]); + (0,external_React_.useEffect)(() => { + if (!hasOpened) + return; + if (!mayAutoFocusOnHide) + return; + const dialog = ref.current; + return () => focusOnHide(dialog); + }, [hasOpened, mayAutoFocusOnHide, focusOnHide]); + const hideOnEscapeProp = useBooleanEvent(hideOnEscape); + (0,external_React_.useEffect)(() => { + if (!domReady) + return; + if (!mounted) + return; + const onKeyDown = (event) => { + if (event.key !== "Escape") + return; + if (event.defaultPrevented) + return; + const dialog = ref.current; + if (!dialog) + return; + if (isElementMarked(dialog)) + return; + const target = event.target; + if (!target) + return; + const { disclosureElement } = store.getState(); + const isValidTarget = () => { + if (target.tagName === "BODY") + return true; + if (contains(dialog, target)) + return true; + if (!disclosureElement) + return true; + if (contains(disclosureElement, target)) + return true; + return false; + }; + if (!isValidTarget()) + return; + if (!hideOnEscapeProp(event)) + return; + store.hide(); + }; + return addGlobalEventListener("keydown", onKeyDown, true); + }, [store, domReady, mounted, hideOnEscapeProp]); + props = useWrapElement( + props, + (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(HeadingLevel, { level: modal ? 1 : void 0, children: element }), + [modal] + ); + const hiddenProp = props.hidden; + const alwaysVisible = props.alwaysVisible; + props = useWrapElement( + props, + (element) => { + if (!backdrop) + return element; + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [ + /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)( + DialogBackdrop, + { + store, + backdrop, + backdropProps, + hidden: hiddenProp, + alwaysVisible + } + ), + element + ] }); + }, + [store, backdrop, backdropProps, hiddenProp, alwaysVisible] + ); + const [headingId, setHeadingId] = (0,external_React_.useState)(); + const [descriptionId, setDescriptionId] = (0,external_React_.useState)(); + props = useWrapElement( + props, + (element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DialogScopedContextProvider, { value: store, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DialogHeadingContext.Provider, { value: setHeadingId, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DialogDescriptionContext.Provider, { value: setDescriptionId, children: element }) }) }), + [store] + ); + props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ + id, + "data-dialog": "", + role: "dialog", + tabIndex: focusable ? -1 : void 0, + "aria-labelledby": headingId, + "aria-describedby": descriptionId + }, props), { + ref: useMergeRefs(ref, props.ref) + }); + props = useFocusableContainer(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { + autoFocusOnShow: autoFocusEnabled + })); + props = useDisclosureContent(_4R3V3JGP_spreadValues({ store }, props)); + props = useFocusable(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { focusable })); + props = usePortal(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({ portal }, props), { portalRef, preserveTabOrder })); + return props; + } +); +function createDialogComponent(Component, useProviderContext = useDialogProviderContext) { + return createComponent((props) => { + const context = useProviderContext(); + const store = props.store || context; + const mounted = useStoreState( + store, + (state) => !props.unmountOnHide || (state == null ? void 0 : state.mounted) || !!props.open + ); + if (!mounted) + return null; + return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, _4R3V3JGP_spreadValues({}, props)); + }); +} +var Dialog = createDialogComponent( + createComponent((props) => { + const htmlProps = useDialog(props); + return _3ORBWXWF_createElement("div", htmlProps); + }), + useDialogProviderContext +); +if (false) {} + + + +;// CONCATENATED MODULE: ./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +const floating_ui_utils_sides = (/* unused pure expression or super */ null && (['top', 'right', 'bottom', 'left'])); +const alignments = (/* unused pure expression or super */ null && (['start', 'end'])); +const floating_ui_utils_placements = /*#__PURE__*/(/* unused pure expression or super */ null && (floating_ui_utils_sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []))); +const floating_ui_utils_min = Math.min; +const floating_ui_utils_max = Math.max; +const round = Math.round; +const floor = Math.floor; +const createCoords = v => ({ + x: v, + y: v +}); +const oppositeSideMap = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +const oppositeAlignmentMap = { + start: 'end', + end: 'start' +}; +function clamp(start, value, end) { + return floating_ui_utils_max(start, floating_ui_utils_min(value, end)); +} +function floating_ui_utils_evaluate(value, param) { + return typeof value === 'function' ? value(param) : value; +} +function floating_ui_utils_getSide(placement) { + return placement.split('-')[0]; +} +function floating_ui_utils_getAlignment(placement) { + return placement.split('-')[1]; +} +function getOppositeAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +function getAxisLength(axis) { + return axis === 'y' ? 'height' : 'width'; +} +function floating_ui_utils_getSideAxis(placement) { + return ['top', 'bottom'].includes(floating_ui_utils_getSide(placement)) ? 'y' : 'x'; +} +function getAlignmentAxis(placement) { + return getOppositeAxis(floating_ui_utils_getSideAxis(placement)); +} +function floating_ui_utils_getAlignmentSides(placement, rects, rtl) { + if (rtl === void 0) { + rtl = false; + } + const alignment = floating_ui_utils_getAlignment(placement); + const alignmentAxis = getAlignmentAxis(placement); + const length = getAxisLength(alignmentAxis); + let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; + if (rects.reference[length] > rects.floating[length]) { + mainAlignmentSide = getOppositePlacement(mainAlignmentSide); + } + return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; +} +function getExpandedPlacements(placement) { + const oppositePlacement = getOppositePlacement(placement); + return [floating_ui_utils_getOppositeAlignmentPlacement(placement), oppositePlacement, floating_ui_utils_getOppositeAlignmentPlacement(oppositePlacement)]; +} +function floating_ui_utils_getOppositeAlignmentPlacement(placement) { + return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]); +} +function getSideList(side, isStart, rtl) { + const lr = ['left', 'right']; + const rl = ['right', 'left']; + const tb = ['top', 'bottom']; + const bt = ['bottom', 'top']; + switch (side) { + case 'top': + case 'bottom': + if (rtl) return isStart ? rl : lr; + return isStart ? lr : rl; + case 'left': + case 'right': + return isStart ? tb : bt; + default: + return []; + } +} +function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { + const alignment = floating_ui_utils_getAlignment(placement); + let list = getSideList(floating_ui_utils_getSide(placement), direction === 'start', rtl); + if (alignment) { + list = list.map(side => side + "-" + alignment); + if (flipAlignment) { + list = list.concat(list.map(floating_ui_utils_getOppositeAlignmentPlacement)); + } + } + return list; +} +function getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]); +} +function expandPaddingObject(padding) { + return { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...padding + }; +} +function floating_ui_utils_getPaddingObject(padding) { + return typeof padding !== 'number' ? expandPaddingObject(padding) : { + top: padding, + right: padding, + bottom: padding, + left: padding + }; +} +function floating_ui_utils_rectToClientRect(rect) { + return { + ...rect, + top: rect.y, + left: rect.x, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }; +} + + + +;// CONCATENATED MODULE: ./node_modules/@floating-ui/core/dist/floating-ui.core.mjs + + + +function computeCoordsFromPlacement(_ref, placement, rtl) { + let { + reference, + floating + } = _ref; + const sideAxis = floating_ui_utils_getSideAxis(placement); + const alignmentAxis = getAlignmentAxis(placement); + const alignLength = getAxisLength(alignmentAxis); + const side = floating_ui_utils_getSide(placement); + const isVertical = sideAxis === 'y'; + const commonX = reference.x + reference.width / 2 - floating.width / 2; + const commonY = reference.y + reference.height / 2 - floating.height / 2; + const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2; + let coords; + switch (side) { + case 'top': + coords = { + x: commonX, + y: reference.y - floating.height + }; + break; + case 'bottom': + coords = { + x: commonX, + y: reference.y + reference.height + }; + break; + case 'right': + coords = { + x: reference.x + reference.width, + y: commonY + }; + break; + case 'left': + coords = { + x: reference.x - floating.width, + y: commonY + }; + break; + default: + coords = { + x: reference.x, + y: reference.y + }; + } + switch (floating_ui_utils_getAlignment(placement)) { + case 'start': + coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1); + break; + case 'end': + coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1); + break; + } + return coords; +} + +/** + * Computes the `x` and `y` coordinates that will place the floating element + * next to a reference element when it is given a certain positioning strategy. + * + * This export does not have any `platform` interface logic. You will need to + * write one for the platform you are using Floating UI with. + */ +const computePosition = async (reference, floating, config) => { + const { + placement = 'bottom', + strategy = 'absolute', + middleware = [], + platform + } = config; + const validMiddleware = middleware.filter(Boolean); + const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating)); + let rects = await platform.getElementRects({ + reference, + floating, + strategy + }); + let { + x, + y + } = computeCoordsFromPlacement(rects, placement, rtl); + let statefulPlacement = placement; + let middlewareData = {}; + let resetCount = 0; + for (let i = 0; i < validMiddleware.length; i++) { + const { + name, + fn + } = validMiddleware[i]; + const { + x: nextX, + y: nextY, + data, + reset + } = await fn({ + x, + y, + initialPlacement: placement, + placement: statefulPlacement, + strategy, + middlewareData, + rects, + platform, + elements: { + reference, + floating + } + }); + x = nextX != null ? nextX : x; + y = nextY != null ? nextY : y; + middlewareData = { + ...middlewareData, + [name]: { + ...middlewareData[name], + ...data + } + }; + if (reset && resetCount <= 50) { + resetCount++; + if (typeof reset === 'object') { + if (reset.placement) { + statefulPlacement = reset.placement; + } + if (reset.rects) { + rects = reset.rects === true ? await platform.getElementRects({ + reference, + floating, + strategy + }) : reset.rects; + } + ({ + x, + y + } = computeCoordsFromPlacement(rects, statefulPlacement, rtl)); + } + i = -1; + continue; + } + } + return { + x, + y, + placement: statefulPlacement, + strategy, + middlewareData + }; +}; + +/** + * Resolves with an object of overflow side offsets that determine how much the + * element is overflowing a given clipping boundary on each side. + * - positive = overflowing the boundary by that number of pixels + * - negative = how many pixels left before it will overflow + * - 0 = lies flush with the boundary + * @see https://floating-ui.com/docs/detectOverflow + */ +async function detectOverflow(state, options) { + var _await$platform$isEle; + if (options === void 0) { + options = {}; + } + const { + x, + y, + platform, + rects, + elements, + strategy + } = state; + const { + boundary = 'clippingAncestors', + rootBoundary = 'viewport', + elementContext = 'floating', + altBoundary = false, + padding = 0 + } = floating_ui_utils_evaluate(options, state); + const paddingObject = floating_ui_utils_getPaddingObject(padding); + const altContext = elementContext === 'floating' ? 'reference' : 'floating'; + const element = elements[altBoundary ? altContext : elementContext]; + const clippingClientRect = floating_ui_utils_rectToClientRect(await platform.getClippingRect({ + element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))), + boundary, + rootBoundary, + strategy + })); + const rect = elementContext === 'floating' ? { + ...rects.floating, + x, + y + } : rects.reference; + const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating)); + const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || { + x: 1, + y: 1 + } : { + x: 1, + y: 1 + }; + const elementClientRect = floating_ui_utils_rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({ + rect, + offsetParent, + strategy + }) : rect); + return { + top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y, + bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y, + left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x, + right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x + }; +} + +/** + * Provides data to position an inner element of the floating element so that it + * appears centered to the reference element. + * @see https://floating-ui.com/docs/arrow + */ +const arrow = options => ({ + name: 'arrow', + options, + async fn(state) { + const { + x, + y, + placement, + rects, + platform, + elements, + middlewareData + } = state; + // Since `element` is required, we don't Partial<> the type. + const { + element, + padding = 0 + } = floating_ui_utils_evaluate(options, state) || {}; + if (element == null) { + return {}; + } + const paddingObject = floating_ui_utils_getPaddingObject(padding); + const coords = { + x, + y + }; + const axis = getAlignmentAxis(placement); + const length = getAxisLength(axis); + const arrowDimensions = await platform.getDimensions(element); + const isYAxis = axis === 'y'; + const minProp = isYAxis ? 'top' : 'left'; + const maxProp = isYAxis ? 'bottom' : 'right'; + const clientProp = isYAxis ? 'clientHeight' : 'clientWidth'; + const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length]; + const startDiff = coords[axis] - rects.reference[axis]; + const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element)); + let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; + + // DOM platform can return `window` as the `offsetParent`. + if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) { + clientSize = elements.floating[clientProp] || rects.floating[length]; + } + const centerToReference = endDiff / 2 - startDiff / 2; + + // If the padding is large enough that it causes the arrow to no longer be + // centered, modify the padding so that it is centered. + const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1; + const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding); + const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding); + + // Make sure the arrow doesn't overflow the floating element if the center + // point is outside the floating element's bounds. + const min$1 = minPadding; + const max = clientSize - arrowDimensions[length] - maxPadding; + const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference; + const offset = clamp(min$1, center, max); + + // If the reference is small enough that the arrow's padding causes it to + // to point to nothing for an aligned placement, adjust the offset of the + // floating element itself. To ensure `shift()` continues to take action, + // a single reset is performed when this is true. + const shouldAddOffset = !middlewareData.arrow && floating_ui_utils_getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0; + const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0; + return { + [axis]: coords[axis] + alignmentOffset, + data: { + [axis]: offset, + centerOffset: center - offset - alignmentOffset, + ...(shouldAddOffset && { + alignmentOffset + }) + }, + reset: shouldAddOffset + }; + } +}); + +function getPlacementList(alignment, autoAlignment, allowedPlacements) { + const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement); + return allowedPlacementsSortedByAlignment.filter(placement => { + if (alignment) { + return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false); + } + return true; + }); +} +/** + * Optimizes the visibility of the floating element by choosing the placement + * that has the most space available automatically, without needing to specify a + * preferred placement. Alternative to `flip`. + * @see https://floating-ui.com/docs/autoPlacement + */ +const autoPlacement = function (options) { + if (options === void 0) { + options = {}; + } + return { + name: 'autoPlacement', + options, + async fn(state) { + var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE; + const { + rects, + middlewareData, + placement, + platform, + elements + } = state; + const { + crossAxis = false, + alignment, + allowedPlacements = placements, + autoAlignment = true, + ...detectOverflowOptions + } = evaluate(options, state); + const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements; + const overflow = await detectOverflow(state, detectOverflowOptions); + const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0; + const currentPlacement = placements$1[currentIndex]; + if (currentPlacement == null) { + return {}; + } + const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))); + + // Make `computeCoords` start from the right place. + if (placement !== currentPlacement) { + return { + reset: { + placement: placements$1[0] + } + }; + } + const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]]; + const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), { + placement: currentPlacement, + overflows: currentOverflows + }]; + const nextPlacement = placements$1[currentIndex + 1]; + + // There are more placements to check. + if (nextPlacement) { + return { + data: { + index: currentIndex + 1, + overflows: allOverflows + }, + reset: { + placement: nextPlacement + } + }; + } + const placementsSortedByMostSpace = allOverflows.map(d => { + const alignment = getAlignment(d.placement); + return [d.placement, alignment && crossAxis ? + // Check along the mainAxis and main crossAxis side. + d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) : + // Check only the mainAxis. + d.overflows[0], d.overflows]; + }).sort((a, b) => a[1] - b[1]); + const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0, + // Aligned placements should not check their opposite crossAxis + // side. + getAlignment(d[0]) ? 2 : 3).every(v => v <= 0)); + const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0]; + if (resetPlacement !== placement) { + return { + data: { + index: currentIndex + 1, + overflows: allOverflows + }, + reset: { + placement: resetPlacement + } + }; + } + return {}; + } + }; +}; + +/** + * Optimizes the visibility of the floating element by flipping the `placement` + * in order to keep it in view when the preferred placement(s) will overflow the + * clipping boundary. Alternative to `autoPlacement`. + * @see https://floating-ui.com/docs/flip + */ +const flip = function (options) { + if (options === void 0) { + options = {}; + } + return { + name: 'flip', + options, + async fn(state) { + var _middlewareData$arrow, _middlewareData$flip; + const { + placement, + middlewareData, + rects, + initialPlacement, + platform, + elements + } = state; + const { + mainAxis: checkMainAxis = true, + crossAxis: checkCrossAxis = true, + fallbackPlacements: specifiedFallbackPlacements, + fallbackStrategy = 'bestFit', + fallbackAxisSideDirection = 'none', + flipAlignment = true, + ...detectOverflowOptions + } = floating_ui_utils_evaluate(options, state); + + // If a reset by the arrow was caused due to an alignment offset being + // added, we should skip any logic now since `flip()` has already done its + // work. + // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643 + if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) { + return {}; + } + const side = floating_ui_utils_getSide(placement); + const isBasePlacement = floating_ui_utils_getSide(initialPlacement) === initialPlacement; + const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); + const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement)); + if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') { + fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)); + } + const placements = [initialPlacement, ...fallbackPlacements]; + const overflow = await detectOverflow(state, detectOverflowOptions); + const overflows = []; + let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || []; + if (checkMainAxis) { + overflows.push(overflow[side]); + } + if (checkCrossAxis) { + const sides = floating_ui_utils_getAlignmentSides(placement, rects, rtl); + overflows.push(overflow[sides[0]], overflow[sides[1]]); + } + overflowsData = [...overflowsData, { + placement, + overflows + }]; + + // One or more sides is overflowing. + if (!overflows.every(side => side <= 0)) { + var _middlewareData$flip2, _overflowsData$filter; + const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1; + const nextPlacement = placements[nextIndex]; + if (nextPlacement) { + // Try next placement and re-run the lifecycle. + return { + data: { + index: nextIndex, + overflows: overflowsData + }, + reset: { + placement: nextPlacement + } + }; + } + + // First, find the candidates that fit on the mainAxis side of overflow, + // then find the placement that fits the best on the main crossAxis side. + let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; + + // Otherwise fallback. + if (!resetPlacement) { + switch (fallbackStrategy) { + case 'bestFit': + { + var _overflowsData$map$so; + const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0]; + if (placement) { + resetPlacement = placement; + } + break; + } + case 'initialPlacement': + resetPlacement = initialPlacement; + break; + } + } + if (placement !== resetPlacement) { + return { + reset: { + placement: resetPlacement + } + }; + } + } + return {}; + } + }; +}; + +function getSideOffsets(overflow, rect) { + return { + top: overflow.top - rect.height, + right: overflow.right - rect.width, + bottom: overflow.bottom - rect.height, + left: overflow.left - rect.width + }; +} +function isAnySideFullyClipped(overflow) { + return sides.some(side => overflow[side] >= 0); +} +/** + * Provides data to hide the floating element in applicable situations, such as + * when it is not in the same clipping context as the reference element. + * @see https://floating-ui.com/docs/hide + */ +const hide = function (options) { + if (options === void 0) { + options = {}; + } + return { + name: 'hide', + options, + async fn(state) { + const { + rects + } = state; + const { + strategy = 'referenceHidden', + ...detectOverflowOptions + } = evaluate(options, state); + switch (strategy) { + case 'referenceHidden': + { + const overflow = await detectOverflow(state, { + ...detectOverflowOptions, + elementContext: 'reference' + }); + const offsets = getSideOffsets(overflow, rects.reference); + return { + data: { + referenceHiddenOffsets: offsets, + referenceHidden: isAnySideFullyClipped(offsets) + } + }; + } + case 'escaped': + { + const overflow = await detectOverflow(state, { + ...detectOverflowOptions, + altBoundary: true + }); + const offsets = getSideOffsets(overflow, rects.floating); + return { + data: { + escapedOffsets: offsets, + escaped: isAnySideFullyClipped(offsets) + } + }; + } + default: + { + return {}; + } + } + } + }; +}; + +function getBoundingRect(rects) { + const minX = min(...rects.map(rect => rect.left)); + const minY = min(...rects.map(rect => rect.top)); + const maxX = max(...rects.map(rect => rect.right)); + const maxY = max(...rects.map(rect => rect.bottom)); + return { + x: minX, + y: minY, + width: maxX - minX, + height: maxY - minY + }; +} +function getRectsByLine(rects) { + const sortedRects = rects.slice().sort((a, b) => a.y - b.y); + const groups = []; + let prevRect = null; + for (let i = 0; i < sortedRects.length; i++) { + const rect = sortedRects[i]; + if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) { + groups.push([rect]); + } else { + groups[groups.length - 1].push(rect); + } + prevRect = rect; + } + return groups.map(rect => rectToClientRect(getBoundingRect(rect))); +} +/** + * Provides improved positioning for inline reference elements that can span + * over multiple lines, such as hyperlinks or range selections. + * @see https://floating-ui.com/docs/inline + */ +const inline = function (options) { + if (options === void 0) { + options = {}; + } + return { + name: 'inline', + options, + async fn(state) { + const { + placement, + elements, + rects, + platform, + strategy + } = state; + // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a + // ClientRect's bounds, despite the event listener being triggered. A + // padding of 2 seems to handle this issue. + const { + padding = 2, + x, + y + } = evaluate(options, state); + const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []); + const clientRects = getRectsByLine(nativeClientRects); + const fallback = rectToClientRect(getBoundingRect(nativeClientRects)); + const paddingObject = getPaddingObject(padding); + function getBoundingClientRect() { + // There are two rects and they are disjoined. + if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) { + // Find the first rect in which the point is fully inside. + return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback; + } + + // There are 2 or more connected rects. + if (clientRects.length >= 2) { + if (getSideAxis(placement) === 'y') { + const firstRect = clientRects[0]; + const lastRect = clientRects[clientRects.length - 1]; + const isTop = getSide(placement) === 'top'; + const top = firstRect.top; + const bottom = lastRect.bottom; + const left = isTop ? firstRect.left : lastRect.left; + const right = isTop ? firstRect.right : lastRect.right; + const width = right - left; + const height = bottom - top; + return { + top, + bottom, + left, + right, + width, + height, + x: left, + y: top + }; + } + const isLeftSide = getSide(placement) === 'left'; + const maxRight = max(...clientRects.map(rect => rect.right)); + const minLeft = min(...clientRects.map(rect => rect.left)); + const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight); + const top = measureRects[0].top; + const bottom = measureRects[measureRects.length - 1].bottom; + const left = minLeft; + const right = maxRight; + const width = right - left; + const height = bottom - top; + return { + top, + bottom, + left, + right, + width, + height, + x: left, + y: top + }; + } + return fallback; + } + const resetRects = await platform.getElementRects({ + reference: { + getBoundingClientRect }, - End: function End() { - if (!isGrid || event.ctrlKey) { - var _options$last; - - (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options); - } else { - var _options$next; - - (_options$next = options.next) === null || _options$next === void 0 ? void 0 : _options$next.call(options, true); - } - }, - PageUp: function PageUp() { - if (isGrid) { - var _options$up; - - (_options$up = options.up) === null || _options$up === void 0 ? void 0 : _options$up.call(options, true); - } else { - var _options$first2; - - (_options$first2 = options.first) === null || _options$first2 === void 0 ? void 0 : _options$first2.call(options); + floating: elements.floating, + strategy + }); + if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) { + return { + reset: { + rects: resetRects + } + }; + } + return {}; + } + }; +}; + +// For type backwards-compatibility, the `OffsetOptions` type was also +// Derivable. +async function convertValueToCoords(state, options) { + const { + placement, + platform, + elements + } = state; + const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)); + const side = floating_ui_utils_getSide(placement); + const alignment = floating_ui_utils_getAlignment(placement); + const isVertical = floating_ui_utils_getSideAxis(placement) === 'y'; + const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1; + const crossAxisMulti = rtl && isVertical ? -1 : 1; + const rawValue = floating_ui_utils_evaluate(options, state); + + // eslint-disable-next-line prefer-const + let { + mainAxis, + crossAxis, + alignmentAxis + } = typeof rawValue === 'number' ? { + mainAxis: rawValue, + crossAxis: 0, + alignmentAxis: null + } : { + mainAxis: 0, + crossAxis: 0, + alignmentAxis: null, + ...rawValue + }; + if (alignment && typeof alignmentAxis === 'number') { + crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis; + } + return isVertical ? { + x: crossAxis * crossAxisMulti, + y: mainAxis * mainAxisMulti + } : { + x: mainAxis * mainAxisMulti, + y: crossAxis * crossAxisMulti + }; +} + +/** + * Modifies the placement by translating the floating element along the + * specified axes. + * A number (shorthand for `mainAxis` or distance), or an axes configuration + * object may be passed. + * @see https://floating-ui.com/docs/offset + */ +const offset = function (options) { + if (options === void 0) { + options = 0; + } + return { + name: 'offset', + options, + async fn(state) { + const { + x, + y + } = state; + const diffCoords = await convertValueToCoords(state, options); + return { + x: x + diffCoords.x, + y: y + diffCoords.y, + data: diffCoords + }; + } + }; +}; + +/** + * Optimizes the visibility of the floating element by shifting it in order to + * keep it in view when it will overflow the clipping boundary. + * @see https://floating-ui.com/docs/shift + */ +const shift = function (options) { + if (options === void 0) { + options = {}; + } + return { + name: 'shift', + options, + async fn(state) { + const { + x, + y, + placement + } = state; + const { + mainAxis: checkMainAxis = true, + crossAxis: checkCrossAxis = false, + limiter = { + fn: _ref => { + let { + x, + y + } = _ref; + return { + x, + y + }; } }, - PageDown: function PageDown() { - if (isGrid) { - var _options$down; - - (_options$down = options.down) === null || _options$down === void 0 ? void 0 : _options$down.call(options, true); - } else { - var _options$last2; - - (_options$last2 = options.last) === null || _options$last2 === void 0 ? void 0 : _options$last2.call(options); - } - } - }; - var action = keyMap[event.key]; - - if (action) { - event.preventDefault(); - action(); - return; - } - - (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event); - if (event.defaultPrevented) return; - - if (event.key.length === 1 && event.key !== " ") { - var widget = getWidget(event.currentTarget); - - if (widget && isTextField(widget)) { - widget.focus(); - setTextFieldValue(widget, ""); - } - } else if (event.key === "Delete" || event.key === "Backspace") { - var _widget = getWidget(event.currentTarget); - - if (_widget && isTextField(_widget)) { + ...detectOverflowOptions + } = floating_ui_utils_evaluate(options, state); + const coords = { + x, + y + }; + const overflow = await detectOverflow(state, detectOverflowOptions); + const crossAxis = floating_ui_utils_getSideAxis(floating_ui_utils_getSide(placement)); + const mainAxis = getOppositeAxis(crossAxis); + let mainAxisCoord = coords[mainAxis]; + let crossAxisCoord = coords[crossAxis]; + if (checkMainAxis) { + const minSide = mainAxis === 'y' ? 'top' : 'left'; + const maxSide = mainAxis === 'y' ? 'bottom' : 'right'; + const min = mainAxisCoord + overflow[minSide]; + const max = mainAxisCoord - overflow[maxSide]; + mainAxisCoord = clamp(min, mainAxisCoord, max); + } + if (checkCrossAxis) { + const minSide = crossAxis === 'y' ? 'top' : 'left'; + const maxSide = crossAxis === 'y' ? 'bottom' : 'right'; + const min = crossAxisCoord + overflow[minSide]; + const max = crossAxisCoord - overflow[maxSide]; + crossAxisCoord = clamp(min, crossAxisCoord, max); + } + const limitedCoords = limiter.fn({ + ...state, + [mainAxis]: mainAxisCoord, + [crossAxis]: crossAxisCoord + }); + return { + ...limitedCoords, + data: { + x: limitedCoords.x - x, + y: limitedCoords.y - y + } + }; + } + }; +}; +/** + * Built-in `limiter` that will stop `shift()` at a certain point. + */ +const limitShift = function (options) { + if (options === void 0) { + options = {}; + } + return { + options, + fn(state) { + const { + x, + y, + placement, + rects, + middlewareData + } = state; + const { + offset = 0, + mainAxis: checkMainAxis = true, + crossAxis: checkCrossAxis = true + } = floating_ui_utils_evaluate(options, state); + const coords = { + x, + y + }; + const crossAxis = floating_ui_utils_getSideAxis(placement); + const mainAxis = getOppositeAxis(crossAxis); + let mainAxisCoord = coords[mainAxis]; + let crossAxisCoord = coords[crossAxis]; + const rawOffset = floating_ui_utils_evaluate(offset, state); + const computedOffset = typeof rawOffset === 'number' ? { + mainAxis: rawOffset, + crossAxis: 0 + } : { + mainAxis: 0, + crossAxis: 0, + ...rawOffset + }; + if (checkMainAxis) { + const len = mainAxis === 'y' ? 'height' : 'width'; + const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis; + const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis; + if (mainAxisCoord < limitMin) { + mainAxisCoord = limitMin; + } else if (mainAxisCoord > limitMax) { + mainAxisCoord = limitMax; + } + } + if (checkCrossAxis) { + var _middlewareData$offse, _middlewareData$offse2; + const len = mainAxis === 'y' ? 'width' : 'height'; + const isOriginSide = ['top', 'left'].includes(floating_ui_utils_getSide(placement)); + const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis); + const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0); + if (crossAxisCoord < limitMin) { + crossAxisCoord = limitMin; + } else if (crossAxisCoord > limitMax) { + crossAxisCoord = limitMax; + } + } + return { + [mainAxis]: mainAxisCoord, + [crossAxis]: crossAxisCoord + }; + } + }; +}; + +/** + * Provides data that allows you to change the size of the floating element — + * for instance, prevent it from overflowing the clipping boundary or match the + * width of the reference element. + * @see https://floating-ui.com/docs/size + */ +const size = function (options) { + if (options === void 0) { + options = {}; + } + return { + name: 'size', + options, + async fn(state) { + const { + placement, + rects, + platform, + elements + } = state; + const { + apply = () => {}, + ...detectOverflowOptions + } = floating_ui_utils_evaluate(options, state); + const overflow = await detectOverflow(state, detectOverflowOptions); + const side = floating_ui_utils_getSide(placement); + const alignment = floating_ui_utils_getAlignment(placement); + const isYAxis = floating_ui_utils_getSideAxis(placement) === 'y'; + const { + width, + height + } = rects.floating; + let heightSide; + let widthSide; + if (side === 'top' || side === 'bottom') { + heightSide = side; + widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right'; + } else { + widthSide = side; + heightSide = alignment === 'end' ? 'top' : 'bottom'; + } + const overflowAvailableHeight = height - overflow[heightSide]; + const overflowAvailableWidth = width - overflow[widthSide]; + const noShift = !state.middlewareData.shift; + let availableHeight = overflowAvailableHeight; + let availableWidth = overflowAvailableWidth; + if (isYAxis) { + const maximumClippingWidth = width - overflow.left - overflow.right; + availableWidth = alignment || noShift ? floating_ui_utils_min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth; + } else { + const maximumClippingHeight = height - overflow.top - overflow.bottom; + availableHeight = alignment || noShift ? floating_ui_utils_min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight; + } + if (noShift && !alignment) { + const xMin = floating_ui_utils_max(overflow.left, 0); + const xMax = floating_ui_utils_max(overflow.right, 0); + const yMin = floating_ui_utils_max(overflow.top, 0); + const yMax = floating_ui_utils_max(overflow.bottom, 0); + if (isYAxis) { + availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : floating_ui_utils_max(overflow.left, overflow.right)); + } else { + availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : floating_ui_utils_max(overflow.top, overflow.bottom)); + } + } + await apply({ + ...state, + availableWidth, + availableHeight + }); + const nextDimensions = await platform.getDimensions(elements.floating); + if (width !== nextDimensions.width || height !== nextDimensions.height) { + return { + reset: { + rects: true + } + }; + } + return {}; + } + }; +}; + + + +;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +/** + * Custom positioning reference element. + * @see https://floating-ui.com/docs/virtual-elements + */ + +const dist_floating_ui_utils_sides = (/* unused pure expression or super */ null && (['top', 'right', 'bottom', 'left'])); +const floating_ui_utils_alignments = (/* unused pure expression or super */ null && (['start', 'end'])); +const dist_floating_ui_utils_placements = /*#__PURE__*/(/* unused pure expression or super */ null && (dist_floating_ui_utils_sides.reduce((acc, side) => acc.concat(side, side + "-" + floating_ui_utils_alignments[0], side + "-" + floating_ui_utils_alignments[1]), []))); +const dist_floating_ui_utils_min = Math.min; +const dist_floating_ui_utils_max = Math.max; +const floating_ui_utils_round = Math.round; +const floating_ui_utils_floor = Math.floor; +const floating_ui_utils_createCoords = v => ({ + x: v, + y: v +}); +const floating_ui_utils_oppositeSideMap = { + left: 'right', + right: 'left', + bottom: 'top', + top: 'bottom' +}; +const floating_ui_utils_oppositeAlignmentMap = { + start: 'end', + end: 'start' +}; +function floating_ui_utils_clamp(start, value, end) { + return dist_floating_ui_utils_max(start, dist_floating_ui_utils_min(value, end)); +} +function dist_floating_ui_utils_evaluate(value, param) { + return typeof value === 'function' ? value(param) : value; +} +function dist_floating_ui_utils_getSide(placement) { + return placement.split('-')[0]; +} +function dist_floating_ui_utils_getAlignment(placement) { + return placement.split('-')[1]; +} +function floating_ui_utils_getOppositeAxis(axis) { + return axis === 'x' ? 'y' : 'x'; +} +function floating_ui_utils_getAxisLength(axis) { + return axis === 'y' ? 'height' : 'width'; +} +function dist_floating_ui_utils_getSideAxis(placement) { + return ['top', 'bottom'].includes(dist_floating_ui_utils_getSide(placement)) ? 'y' : 'x'; +} +function floating_ui_utils_getAlignmentAxis(placement) { + return floating_ui_utils_getOppositeAxis(dist_floating_ui_utils_getSideAxis(placement)); +} +function dist_floating_ui_utils_getAlignmentSides(placement, rects, rtl) { + if (rtl === void 0) { + rtl = false; + } + const alignment = dist_floating_ui_utils_getAlignment(placement); + const alignmentAxis = floating_ui_utils_getAlignmentAxis(placement); + const length = floating_ui_utils_getAxisLength(alignmentAxis); + let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; + if (rects.reference[length] > rects.floating[length]) { + mainAlignmentSide = floating_ui_utils_getOppositePlacement(mainAlignmentSide); + } + return [mainAlignmentSide, floating_ui_utils_getOppositePlacement(mainAlignmentSide)]; +} +function floating_ui_utils_getExpandedPlacements(placement) { + const oppositePlacement = floating_ui_utils_getOppositePlacement(placement); + return [dist_floating_ui_utils_getOppositeAlignmentPlacement(placement), oppositePlacement, dist_floating_ui_utils_getOppositeAlignmentPlacement(oppositePlacement)]; +} +function dist_floating_ui_utils_getOppositeAlignmentPlacement(placement) { + return placement.replace(/start|end/g, alignment => floating_ui_utils_oppositeAlignmentMap[alignment]); +} +function floating_ui_utils_getSideList(side, isStart, rtl) { + const lr = ['left', 'right']; + const rl = ['right', 'left']; + const tb = ['top', 'bottom']; + const bt = ['bottom', 'top']; + switch (side) { + case 'top': + case 'bottom': + if (rtl) return isStart ? rl : lr; + return isStart ? lr : rl; + case 'left': + case 'right': + return isStart ? tb : bt; + default: + return []; + } +} +function floating_ui_utils_getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { + const alignment = dist_floating_ui_utils_getAlignment(placement); + let list = floating_ui_utils_getSideList(dist_floating_ui_utils_getSide(placement), direction === 'start', rtl); + if (alignment) { + list = list.map(side => side + "-" + alignment); + if (flipAlignment) { + list = list.concat(list.map(dist_floating_ui_utils_getOppositeAlignmentPlacement)); + } + } + return list; +} +function floating_ui_utils_getOppositePlacement(placement) { + return placement.replace(/left|right|bottom|top/g, side => floating_ui_utils_oppositeSideMap[side]); +} +function floating_ui_utils_expandPaddingObject(padding) { + return { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...padding + }; +} +function dist_floating_ui_utils_getPaddingObject(padding) { + return typeof padding !== 'number' ? floating_ui_utils_expandPaddingObject(padding) : { + top: padding, + right: padding, + bottom: padding, + left: padding + }; +} +function dist_floating_ui_utils_rectToClientRect(rect) { + return { + ...rect, + top: rect.y, + left: rect.x, + right: rect.x + rect.width, + bottom: rect.y + rect.height + }; +} + + + +;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +function getNodeName(node) { + if (isNode(node)) { + return (node.nodeName || '').toLowerCase(); + } + // Mocked nodes in testing environments may not be instances of Node. By + // returning `#document` an infinite loop won't occur. + // https://github.com/floating-ui/floating-ui/issues/2317 + return '#document'; +} +function floating_ui_utils_dom_getWindow(node) { + var _node$ownerDocument; + return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; +} +function getDocumentElement(node) { + var _ref; + return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; +} +function isNode(value) { + return value instanceof Node || value instanceof floating_ui_utils_dom_getWindow(value).Node; +} +function isElement(value) { + return value instanceof Element || value instanceof floating_ui_utils_dom_getWindow(value).Element; +} +function isHTMLElement(value) { + return value instanceof HTMLElement || value instanceof floating_ui_utils_dom_getWindow(value).HTMLElement; +} +function isShadowRoot(value) { + // Browsers without `ShadowRoot` support. + if (typeof ShadowRoot === 'undefined') { + return false; + } + return value instanceof ShadowRoot || value instanceof floating_ui_utils_dom_getWindow(value).ShadowRoot; +} +function isOverflowElement(element) { + const { + overflow, + overflowX, + overflowY, + display + } = floating_ui_utils_dom_getComputedStyle(element); + return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display); +} +function isTableElement(element) { + return ['table', 'td', 'th'].includes(getNodeName(element)); +} +function isContainingBlock(element) { + const webkit = isWebKit(); + const css = floating_ui_utils_dom_getComputedStyle(element); + + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value)); +} +function getContainingBlock(element) { + let currentNode = getParentNode(element); + while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { + if (isContainingBlock(currentNode)) { + return currentNode; + } else { + currentNode = getParentNode(currentNode); + } + } + return null; +} +function isWebKit() { + if (typeof CSS === 'undefined' || !CSS.supports) return false; + return CSS.supports('-webkit-backdrop-filter', 'none'); +} +function isLastTraversableNode(node) { + return ['html', 'body', '#document'].includes(getNodeName(node)); +} +function floating_ui_utils_dom_getComputedStyle(element) { + return floating_ui_utils_dom_getWindow(element).getComputedStyle(element); +} +function getNodeScroll(element) { + if (isElement(element)) { + return { + scrollLeft: element.scrollLeft, + scrollTop: element.scrollTop + }; + } + return { + scrollLeft: element.pageXOffset, + scrollTop: element.pageYOffset + }; +} +function getParentNode(node) { + if (getNodeName(node) === 'html') { + return node; + } + const result = + // Step into the shadow DOM of the parent of a slotted node. + node.assignedSlot || + // DOM Element detected. + node.parentNode || + // ShadowRoot detected. + isShadowRoot(node) && node.host || + // Fallback. + getDocumentElement(node); + return isShadowRoot(result) ? result.host : result; +} +function getNearestOverflowAncestor(node) { + const parentNode = getParentNode(node); + if (isLastTraversableNode(parentNode)) { + return node.ownerDocument ? node.ownerDocument.body : node.body; + } + if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { + return parentNode; + } + return getNearestOverflowAncestor(parentNode); +} +function getOverflowAncestors(node, list, traverseIframes) { + var _node$ownerDocument2; + if (list === void 0) { + list = []; + } + if (traverseIframes === void 0) { + traverseIframes = true; + } + const scrollableAncestor = getNearestOverflowAncestor(node); + const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); + const win = floating_ui_utils_dom_getWindow(scrollableAncestor); + if (isBody) { + return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []); + } + return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); +} + + + +;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs + + + + + + +function getCssDimensions(element) { + const css = floating_ui_utils_dom_getComputedStyle(element); + // In testing environments, the `width` and `height` properties are empty + // strings for SVG elements, returning NaN. Fallback to `0` in this case. + let width = parseFloat(css.width) || 0; + let height = parseFloat(css.height) || 0; + const hasOffset = isHTMLElement(element); + const offsetWidth = hasOffset ? element.offsetWidth : width; + const offsetHeight = hasOffset ? element.offsetHeight : height; + const shouldFallback = floating_ui_utils_round(width) !== offsetWidth || floating_ui_utils_round(height) !== offsetHeight; + if (shouldFallback) { + width = offsetWidth; + height = offsetHeight; + } + return { + width, + height, + $: shouldFallback + }; +} + +function unwrapElement(element) { + return !isElement(element) ? element.contextElement : element; +} + +function getScale(element) { + const domElement = unwrapElement(element); + if (!isHTMLElement(domElement)) { + return floating_ui_utils_createCoords(1); + } + const rect = domElement.getBoundingClientRect(); + const { + width, + height, + $ + } = getCssDimensions(domElement); + let x = ($ ? floating_ui_utils_round(rect.width) : rect.width) / width; + let y = ($ ? floating_ui_utils_round(rect.height) : rect.height) / height; + + // 0, NaN, or Infinity should always fallback to 1. + + if (!x || !Number.isFinite(x)) { + x = 1; + } + if (!y || !Number.isFinite(y)) { + y = 1; + } + return { + x, + y + }; +} + +const noOffsets = /*#__PURE__*/floating_ui_utils_createCoords(0); +function getVisualOffsets(element) { + const win = floating_ui_utils_dom_getWindow(element); + if (!isWebKit() || !win.visualViewport) { + return noOffsets; + } + return { + x: win.visualViewport.offsetLeft, + y: win.visualViewport.offsetTop + }; +} +function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { + if (isFixed === void 0) { + isFixed = false; + } + if (!floatingOffsetParent || isFixed && floatingOffsetParent !== floating_ui_utils_dom_getWindow(element)) { + return false; + } + return isFixed; +} + +function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { + if (includeScale === void 0) { + includeScale = false; + } + if (isFixedStrategy === void 0) { + isFixedStrategy = false; + } + const clientRect = element.getBoundingClientRect(); + const domElement = unwrapElement(element); + let scale = floating_ui_utils_createCoords(1); + if (includeScale) { + if (offsetParent) { + if (isElement(offsetParent)) { + scale = getScale(offsetParent); + } + } else { + scale = getScale(element); + } + } + const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : floating_ui_utils_createCoords(0); + let x = (clientRect.left + visualOffsets.x) / scale.x; + let y = (clientRect.top + visualOffsets.y) / scale.y; + let width = clientRect.width / scale.x; + let height = clientRect.height / scale.y; + if (domElement) { + const win = floating_ui_utils_dom_getWindow(domElement); + const offsetWin = offsetParent && isElement(offsetParent) ? floating_ui_utils_dom_getWindow(offsetParent) : offsetParent; + let currentWin = win; + let currentIFrame = currentWin.frameElement; + while (currentIFrame && offsetParent && offsetWin !== currentWin) { + const iframeScale = getScale(currentIFrame); + const iframeRect = currentIFrame.getBoundingClientRect(); + const css = floating_ui_utils_dom_getComputedStyle(currentIFrame); + const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; + const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; + x *= iframeScale.x; + y *= iframeScale.y; + width *= iframeScale.x; + height *= iframeScale.y; + x += left; + y += top; + currentWin = floating_ui_utils_dom_getWindow(currentIFrame); + currentIFrame = currentWin.frameElement; + } + } + return floating_ui_utils_rectToClientRect({ + width, + height, + x, + y + }); +} + +const topLayerSelectors = [':popover-open', ':modal']; +function isTopLayer(floating) { + return topLayerSelectors.some(selector => { + try { + return floating.matches(selector); + } catch (e) { + return false; + } + }); +} + +function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { + let { + elements, + rect, + offsetParent, + strategy + } = _ref; + const isFixed = strategy === 'fixed'; + const documentElement = getDocumentElement(offsetParent); + const topLayer = elements ? isTopLayer(elements.floating) : false; + if (offsetParent === documentElement || topLayer && isFixed) { + return rect; + } + let scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + let scale = floating_ui_utils_createCoords(1); + const offsets = floating_ui_utils_createCoords(0); + const isOffsetParentAnElement = isHTMLElement(offsetParent); + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isHTMLElement(offsetParent)) { + const offsetRect = getBoundingClientRect(offsetParent); + scale = getScale(offsetParent); + offsets.x = offsetRect.x + offsetParent.clientLeft; + offsets.y = offsetRect.y + offsetParent.clientTop; + } + } + return { + width: rect.width * scale.x, + height: rect.height * scale.y, + x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x, + y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + }; +} + +function getClientRects(element) { + return Array.from(element.getClientRects()); +} + +function getWindowScrollBarX(element) { + // If has a CSS width greater than the viewport, then this will be + // incorrect for RTL. + return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft; +} + +// Gets the entire size of the scrollable document area, even extending outside +// of the `` and `` rect bounds if horizontally scrollable. +function getDocumentRect(element) { + const html = getDocumentElement(element); + const scroll = getNodeScroll(element); + const body = element.ownerDocument.body; + const width = dist_floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); + const height = dist_floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); + let x = -scroll.scrollLeft + getWindowScrollBarX(element); + const y = -scroll.scrollTop; + if (floating_ui_utils_dom_getComputedStyle(body).direction === 'rtl') { + x += dist_floating_ui_utils_max(html.clientWidth, body.clientWidth) - width; + } + return { + width, + height, + x, + y + }; +} + +function getViewportRect(element, strategy) { + const win = floating_ui_utils_dom_getWindow(element); + const html = getDocumentElement(element); + const visualViewport = win.visualViewport; + let width = html.clientWidth; + let height = html.clientHeight; + let x = 0; + let y = 0; + if (visualViewport) { + width = visualViewport.width; + height = visualViewport.height; + const visualViewportBased = isWebKit(); + if (!visualViewportBased || visualViewportBased && strategy === 'fixed') { + x = visualViewport.offsetLeft; + y = visualViewport.offsetTop; + } + } + return { + width, + height, + x, + y + }; +} + +// Returns the inner client rect, subtracting scrollbars if present. +function getInnerBoundingClientRect(element, strategy) { + const clientRect = getBoundingClientRect(element, true, strategy === 'fixed'); + const top = clientRect.top + element.clientTop; + const left = clientRect.left + element.clientLeft; + const scale = isHTMLElement(element) ? getScale(element) : floating_ui_utils_createCoords(1); + const width = element.clientWidth * scale.x; + const height = element.clientHeight * scale.y; + const x = left * scale.x; + const y = top * scale.y; + return { + width, + height, + x, + y + }; +} +function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { + let rect; + if (clippingAncestor === 'viewport') { + rect = getViewportRect(element, strategy); + } else if (clippingAncestor === 'document') { + rect = getDocumentRect(getDocumentElement(element)); + } else if (isElement(clippingAncestor)) { + rect = getInnerBoundingClientRect(clippingAncestor, strategy); + } else { + const visualOffsets = getVisualOffsets(element); + rect = { + ...clippingAncestor, + x: clippingAncestor.x - visualOffsets.x, + y: clippingAncestor.y - visualOffsets.y + }; + } + return floating_ui_utils_rectToClientRect(rect); +} +function hasFixedPositionAncestor(element, stopNode) { + const parentNode = getParentNode(element); + if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) { + return false; + } + return floating_ui_utils_dom_getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode); +} + +// A "clipping ancestor" is an `overflow` element with the characteristic of +// clipping (or hiding) child elements. This returns all clipping ancestors +// of the given element up the tree. +function getClippingElementAncestors(element, cache) { + const cachedResult = cache.get(element); + if (cachedResult) { + return cachedResult; + } + let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body'); + let currentContainingBlockComputedStyle = null; + const elementIsFixed = floating_ui_utils_dom_getComputedStyle(element).position === 'fixed'; + let currentNode = elementIsFixed ? getParentNode(element) : element; + + // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block + while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { + const computedStyle = floating_ui_utils_dom_getComputedStyle(currentNode); + const currentNodeIsContaining = isContainingBlock(currentNode); + if (!currentNodeIsContaining && computedStyle.position === 'fixed') { + currentContainingBlockComputedStyle = null; + } + const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); + if (shouldDropCurrentNode) { + // Drop non-containing blocks. + result = result.filter(ancestor => ancestor !== currentNode); + } else { + // Record last containing block for next iteration. + currentContainingBlockComputedStyle = computedStyle; + } + currentNode = getParentNode(currentNode); + } + cache.set(element, result); + return result; +} + +// Gets the maximum area that the element is visible in due to any number of +// clipping ancestors. +function getClippingRect(_ref) { + let { + element, + boundary, + rootBoundary, + strategy + } = _ref; + const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary); + const clippingAncestors = [...elementClippingAncestors, rootBoundary]; + const firstClippingAncestor = clippingAncestors[0]; + const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { + const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); + accRect.top = dist_floating_ui_utils_max(rect.top, accRect.top); + accRect.right = dist_floating_ui_utils_min(rect.right, accRect.right); + accRect.bottom = dist_floating_ui_utils_min(rect.bottom, accRect.bottom); + accRect.left = dist_floating_ui_utils_max(rect.left, accRect.left); + return accRect; + }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); + return { + width: clippingRect.right - clippingRect.left, + height: clippingRect.bottom - clippingRect.top, + x: clippingRect.left, + y: clippingRect.top + }; +} + +function getDimensions(element) { + const { + width, + height + } = getCssDimensions(element); + return { + width, + height + }; +} + +function getRectRelativeToOffsetParent(element, offsetParent, strategy) { + const isOffsetParentAnElement = isHTMLElement(offsetParent); + const documentElement = getDocumentElement(offsetParent); + const isFixed = strategy === 'fixed'; + const rect = getBoundingClientRect(element, true, isFixed, offsetParent); + let scroll = { + scrollLeft: 0, + scrollTop: 0 + }; + const offsets = floating_ui_utils_createCoords(0); + if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { + if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { + scroll = getNodeScroll(offsetParent); + } + if (isOffsetParentAnElement) { + const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); + offsets.x = offsetRect.x + offsetParent.clientLeft; + offsets.y = offsetRect.y + offsetParent.clientTop; + } else if (documentElement) { + offsets.x = getWindowScrollBarX(documentElement); + } + } + const x = rect.left + scroll.scrollLeft - offsets.x; + const y = rect.top + scroll.scrollTop - offsets.y; + return { + x, + y, + width: rect.width, + height: rect.height + }; +} + +function getTrueOffsetParent(element, polyfill) { + if (!isHTMLElement(element) || floating_ui_utils_dom_getComputedStyle(element).position === 'fixed') { + return null; + } + if (polyfill) { + return polyfill(element); + } + return element.offsetParent; +} + +// Gets the closest ancestor positioned element. Handles some edge cases, +// such as table ancestors and cross browser bugs. +function getOffsetParent(element, polyfill) { + const window = floating_ui_utils_dom_getWindow(element); + if (!isHTMLElement(element) || isTopLayer(element)) { + return window; + } + let offsetParent = getTrueOffsetParent(element, polyfill); + while (offsetParent && isTableElement(offsetParent) && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static') { + offsetParent = getTrueOffsetParent(offsetParent, polyfill); + } + if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && floating_ui_utils_dom_getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) { + return window; + } + return offsetParent || getContainingBlock(element) || window; +} + +const getElementRects = async function (data) { + const getOffsetParentFn = this.getOffsetParent || getOffsetParent; + const getDimensionsFn = this.getDimensions; + return { + reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), + floating: { + x: 0, + y: 0, + ...(await getDimensionsFn(data.floating)) + } + }; +}; + +function isRTL(element) { + return floating_ui_utils_dom_getComputedStyle(element).direction === 'rtl'; +} + +const platform = { + convertOffsetParentRelativeRectToViewportRelativeRect, + getDocumentElement: getDocumentElement, + getClippingRect, + getOffsetParent, + getElementRects, + getClientRects, + getDimensions, + getScale, + isElement: isElement, + isRTL +}; + +// https://samthor.au/2021/observing-dom/ +function observeMove(element, onMove) { + let io = null; + let timeoutId; + const root = getDocumentElement(element); + function cleanup() { + var _io; + clearTimeout(timeoutId); + (_io = io) == null || _io.disconnect(); + io = null; + } + function refresh(skip, threshold) { + if (skip === void 0) { + skip = false; + } + if (threshold === void 0) { + threshold = 1; + } + cleanup(); + const { + left, + top, + width, + height + } = element.getBoundingClientRect(); + if (!skip) { + onMove(); + } + if (!width || !height) { + return; + } + const insetTop = floating_ui_utils_floor(top); + const insetRight = floating_ui_utils_floor(root.clientWidth - (left + width)); + const insetBottom = floating_ui_utils_floor(root.clientHeight - (top + height)); + const insetLeft = floating_ui_utils_floor(left); + const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; + const options = { + rootMargin, + threshold: dist_floating_ui_utils_max(0, dist_floating_ui_utils_min(1, threshold)) || 1 + }; + let isFirstUpdate = true; + function handleObserve(entries) { + const ratio = entries[0].intersectionRatio; + if (ratio !== threshold) { + if (!isFirstUpdate) { + return refresh(); + } + if (!ratio) { + timeoutId = setTimeout(() => { + refresh(false, 1e-7); + }, 100); + } else { + refresh(false, ratio); + } + } + isFirstUpdate = false; + } + + // Older browsers don't support a `document` as the root and will throw an + // error. + try { + io = new IntersectionObserver(handleObserve, { + ...options, + // Handle