{"version":3,"file":"resolve-p5TNDBYN.js","sources":["../../../node_modules/deepmerge/dist/cjs.js","../../../node_modules/es-errors/type.js","../../../__vite-browser-external","../../../node_modules/object-inspect/index.js","../../../node_modules/side-channel-list/index.js","../../../node_modules/es-object-atoms/index.js","../../../node_modules/es-errors/index.js","../../../node_modules/es-errors/eval.js","../../../node_modules/es-errors/range.js","../../../node_modules/es-errors/ref.js","../../../node_modules/es-errors/syntax.js","../../../node_modules/es-errors/uri.js","../../../node_modules/math-intrinsics/abs.js","../../../node_modules/math-intrinsics/floor.js","../../../node_modules/math-intrinsics/max.js","../../../node_modules/math-intrinsics/min.js","../../../node_modules/math-intrinsics/pow.js","../../../node_modules/math-intrinsics/round.js","../../../node_modules/math-intrinsics/isNaN.js","../../../node_modules/math-intrinsics/sign.js","../../../node_modules/gopd/gOPD.js","../../../node_modules/gopd/index.js","../../../node_modules/es-define-property/index.js","../../../node_modules/has-symbols/shams.js","../../../node_modules/has-symbols/index.js","../../../node_modules/get-proto/Reflect.getPrototypeOf.js","../../../node_modules/get-proto/Object.getPrototypeOf.js","../../../node_modules/function-bind/implementation.js","../../../node_modules/function-bind/index.js","../../../node_modules/call-bind-apply-helpers/functionCall.js","../../../node_modules/call-bind-apply-helpers/functionApply.js","../../../node_modules/call-bind-apply-helpers/reflectApply.js","../../../node_modules/call-bind-apply-helpers/actualApply.js","../../../node_modules/call-bind-apply-helpers/index.js","../../../node_modules/dunder-proto/get.js","../../../node_modules/get-proto/index.js","../../../node_modules/hasown/index.js","../../../node_modules/get-intrinsic/index.js","../../../node_modules/call-bound/index.js","../../../node_modules/side-channel-map/index.js","../../../node_modules/side-channel-weakmap/index.js","../../../node_modules/side-channel/index.js","../../../node_modules/qs/lib/formats.js","../../../node_modules/qs/lib/utils.js","../../../node_modules/qs/lib/stringify.js","../../../node_modules/qs/lib/parse.js","../../../node_modules/qs/lib/index.js","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/helpers/null.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../../node_modules/axios/lib/platform/browser/index.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/helpers/throttle.js","../../../node_modules/axios/lib/helpers/progressEventReducer.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/helpers/resolveConfig.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/helpers/composeSignals.js","../../../node_modules/axios/lib/helpers/trackStream.js","../../../node_modules/axios/lib/adapters/fetch.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/axios/index.js","../../../node_modules/@inertiajs/core/dist/index.esm.js","../../../node_modules/svelte/src/version.js","../../../node_modules/svelte/src/internal/disclose-version.js","../../../node_modules/svelte/src/internal/flags/index.js","../../../node_modules/svelte/src/internal/flags/legacy.js","../../../node_modules/svelte/src/constants.js","../../../node_modules/esm-env/false.js","../../../node_modules/svelte/src/internal/client/constants.js","../../../node_modules/svelte/src/internal/shared/utils.js","../../../node_modules/svelte/src/internal/client/dom/task.js","../../../node_modules/svelte/src/internal/client/reactivity/equality.js","../../../node_modules/svelte/src/internal/client/errors.js","../../../node_modules/svelte/src/internal/shared/clone.js","../../../node_modules/svelte/src/internal/client/reactivity/sources.js","../../../node_modules/svelte/src/internal/client/reactivity/deriveds.js","../../../node_modules/svelte/src/internal/client/warnings.js","../../../node_modules/svelte/src/internal/client/dom/hydration.js","../../../node_modules/svelte/src/internal/client/proxy.js","../../../node_modules/svelte/src/internal/client/dom/operations.js","../../../node_modules/svelte/src/internal/client/runtime.js","../../../node_modules/svelte/src/internal/client/reactivity/effects.js","../../../node_modules/svelte/src/internal/shared/errors.js","../../../node_modules/svelte/src/internal/client/context.js","../../../node_modules/svelte/src/utils.js","../../../node_modules/svelte/src/internal/client/dom/elements/misc.js","../../../node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js","../../../node_modules/svelte/src/internal/client/dom/elements/events.js","../../../node_modules/svelte/src/internal/client/dom/blocks/svelte-head.js","../../../node_modules/svelte/src/internal/client/dom/reconciler.js","../../../node_modules/svelte/src/internal/client/dom/template.js","../../../node_modules/svelte/src/internal/client/render.js","../../../node_modules/svelte/src/internal/client/dom/blocks/await.js","../../../node_modules/svelte/src/internal/client/dom/blocks/if.js","../../../node_modules/svelte/src/internal/client/dom/blocks/key.js","../../../node_modules/svelte/src/internal/client/dom/blocks/each.js","../../../node_modules/svelte/src/internal/client/dom/blocks/html.js","../../../node_modules/svelte/src/internal/client/dom/blocks/slot.js","../../../node_modules/svelte/src/internal/client/dom/blocks/snippet.js","../../../node_modules/svelte/src/internal/client/dom/blocks/svelte-component.js","../../../node_modules/svelte/src/internal/client/dom/elements/actions.js","../../../node_modules/clsx/dist/clsx.mjs","../../../node_modules/svelte/src/internal/shared/attributes.js","../../../node_modules/svelte/src/internal/client/dom/elements/class.js","../../../node_modules/svelte/src/internal/client/dom/elements/attributes.js","../../../node_modules/svelte/src/internal/client/timing.js","../../../node_modules/svelte/src/internal/client/loop.js","../../../node_modules/svelte/src/internal/client/dom/elements/transitions.js","../../../node_modules/svelte/src/internal/client/dom/elements/bindings/input.js","../../../node_modules/svelte/src/internal/client/dom/elements/bindings/size.js","../../../node_modules/svelte/src/internal/client/dom/elements/bindings/this.js","../../../node_modules/svelte/src/internal/client/dom/legacy/lifecycle.js","../../../node_modules/svelte/src/internal/client/dom/legacy/misc.js","../../../node_modules/svelte/src/index-client.js","../../../node_modules/svelte/src/store/utils.js","../../../node_modules/svelte/src/store/shared/index.js","../../../node_modules/svelte/src/internal/client/reactivity/store.js","../../../node_modules/svelte/src/internal/client/reactivity/props.js","../../../node_modules/html-escape/index.js","../../../node_modules/svelte/src/reactivity/utils.js","../../../node_modules/svelte/src/reactivity/create-subscriber.js","../../../node_modules/@inertiajs/svelte/dist/page.js","../../../node_modules/@inertiajs/svelte/dist/link.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_arrayEach.js","../../../node_modules/lodash/_defineProperty.js","../../../node_modules/lodash/_baseAssignValue.js","../../../node_modules/lodash/_assignValue.js","../../../node_modules/lodash/_copyObject.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_baseAssign.js","../../../node_modules/lodash/_nativeKeysIn.js","../../../node_modules/lodash/_baseKeysIn.js","../../../node_modules/lodash/keysIn.js","../../../node_modules/lodash/_baseAssignIn.js","../../../node_modules/lodash/_cloneBuffer.js","../../../node_modules/lodash/_copyArray.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_copySymbols.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/_getPrototype.js","../../../node_modules/lodash/_getSymbolsIn.js","../../../node_modules/lodash/_copySymbolsIn.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_getAllKeysIn.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_initCloneArray.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_cloneArrayBuffer.js","../../../node_modules/lodash/_cloneDataView.js","../../../node_modules/lodash/_cloneRegExp.js","../../../node_modules/lodash/_cloneSymbol.js","../../../node_modules/lodash/_cloneTypedArray.js","../../../node_modules/lodash/_initCloneByTag.js","../../../node_modules/lodash/_baseCreate.js","../../../node_modules/lodash/_initCloneObject.js","../../../node_modules/lodash/_baseIsMap.js","../../../node_modules/lodash/isMap.js","../../../node_modules/lodash/_baseIsSet.js","../../../node_modules/lodash/isSet.js","../../../node_modules/lodash/_baseClone.js","../../../node_modules/lodash/cloneDeep.js","../../../node_modules/lodash/_setCacheAdd.js","../../../node_modules/lodash/_setCacheHas.js","../../../node_modules/lodash/_SetCache.js","../../../node_modules/lodash/_arraySome.js","../../../node_modules/lodash/_cacheHas.js","../../../node_modules/lodash/_equalArrays.js","../../../node_modules/lodash/_mapToArray.js","../../../node_modules/lodash/_setToArray.js","../../../node_modules/lodash/_equalByTag.js","../../../node_modules/lodash/_equalObjects.js","../../../node_modules/lodash/_baseIsEqualDeep.js","../../../node_modules/lodash/_baseIsEqual.js","../../../node_modules/lodash/isEqual.js","../../../node_modules/@inertiajs/svelte/dist/usePoll.js","../../../app/frontend/lib/utilities/arrayToSentence.js","../../../app/frontend/lib/utilities/arrayPartition.js","../../../app/frontend/lib/utilities/copy_to_clipboard.js","../../../app/frontend/lib/utilities/generateColor.js","../../../app/frontend/lib/utilities/highlight.js","../../../app/frontend/lib/utilities/debounce.ts","../../../app/frontend/lib/stores/store.js","../../../app/frontend/lib/stores/misc.js","../../../app/frontend/lib/stores/time_zone.js","../../../app/frontend/lib/stores/notifications.svelte.js","../../../app/frontend/lib/utilities/notify.js","../../../app/frontend/lib/utilities/attendance_label.js","../../../app/frontend/lib/config/notifications.js","../../../node_modules/awesome-phonenumber/index-esm.mjs","../../../app/frontend/lib/config/notification_channels.js","../../../app/frontend/lib/config/social_platforms.js","../../../node_modules/date-fns/constants.js","../../../node_modules/date-fns/constructFrom.js","../../../node_modules/date-fns/toDate.js","../../../node_modules/date-fns/addDays.js","../../../node_modules/date-fns/_lib/defaultOptions.js","../../../node_modules/date-fns/startOfWeek.js","../../../node_modules/date-fns/startOfISOWeek.js","../../../node_modules/date-fns/getISOWeekYear.js","../../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../../../node_modules/date-fns/_lib/normalizeDates.js","../../../node_modules/date-fns/startOfDay.js","../../../node_modules/date-fns/differenceInCalendarDays.js","../../../node_modules/date-fns/startOfISOWeekYear.js","../../../node_modules/date-fns/compareAsc.js","../../../node_modules/date-fns/constructNow.js","../../../node_modules/date-fns/isSameDay.js","../../../node_modules/date-fns/isDate.js","../../../node_modules/date-fns/isValid.js","../../../node_modules/date-fns/_lib/getRoundingMethod.js","../../../node_modules/date-fns/startOfYear.js","../../../node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../../../node_modules/date-fns/locale/en-US/_lib/formatLong.js","../../../node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../../../node_modules/date-fns/locale/en-US/_lib/localize.js","../../../node_modules/date-fns/locale/_lib/buildMatchFn.js","../../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../../../node_modules/date-fns/locale/en-US/_lib/match.js","../../../node_modules/date-fns/locale/en-US.js","../../../node_modules/date-fns/getDayOfYear.js","../../../node_modules/date-fns/getISOWeek.js","../../../node_modules/date-fns/getWeekYear.js","../../../node_modules/date-fns/startOfWeekYear.js","../../../node_modules/date-fns/getWeek.js","../../../node_modules/date-fns/_lib/addLeadingZeros.js","../../../node_modules/date-fns/_lib/format/lightFormatters.js","../../../node_modules/date-fns/_lib/format/formatters.js","../../../node_modules/date-fns/_lib/format/longFormatters.js","../../../node_modules/date-fns/_lib/protectedTokens.js","../../../node_modules/date-fns/format.js","../../../node_modules/date-fns/formatDistanceStrict.js","../../../node_modules/date-fns/formatDistanceToNowStrict.js","../../../node_modules/date-fns/getDaysInMonth.js","../../../node_modules/date-fns/getDefaultOptions.js","../../../node_modules/date-fns/isAfter.js","../../../node_modules/date-fns/isBefore.js","../../../node_modules/date-fns/isPast.js","../../../node_modules/date-fns/isSameMonth.js","../../../node_modules/date-fns/isSameYear.js","../../../node_modules/date-fns/parseJSON.js","../../../node_modules/date-fns/setMonth.js","../../../node_modules/date-fns/set.js","../../../app/frontend/lib/config/attendance_states.js","../../../app/frontend/lib/utilities/create_notification.js","../../../app/frontend/lib/utilities/group_array.js","../../../app/frontend/lib/utilities/random_id.js","../../../node_modules/date-fns/locale/en-GB/_lib/formatLong.js","../../../node_modules/date-fns/locale/en-GB.js","../../../node_modules/date-fns-tz/dist/esm/_lib/tzIntlTimeZoneName/index.js","../../../node_modules/date-fns-tz/dist/esm/_lib/tzTokenizeDate/index.js","../../../node_modules/date-fns-tz/dist/esm/_lib/newDateUTC/index.js","../../../node_modules/date-fns-tz/dist/esm/_lib/tzParseTimezone/index.js","../../../node_modules/date-fns-tz/dist/esm/format/formatters/index.js","../../../node_modules/date-fns-tz/dist/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","../../../node_modules/date-fns-tz/dist/esm/_lib/tzPattern/index.js","../../../node_modules/date-fns-tz/dist/esm/toDate/index.js","../../../node_modules/date-fns-tz/dist/esm/format/index.js","../../../node_modules/date-fns-tz/dist/esm/toZonedTime/index.js","../../../node_modules/date-fns-tz/dist/esm/formatInTimeZone/index.js","../../../app/frontend/lib/utilities/format_datetime.js","../../../app/frontend/lib/utilities/handle_shortcuts.svelte.js","../../../app/frontend/lib/components/events/InvitationModal/InvitationPreview.svelte","../../../app/frontend/lib/components/events/InvitationModal/InvitationModal.svelte","../../../app/frontend/lib/components/events/EventAttendance/status_forms/MaybeForm.svelte","../../../node_modules/@stripe/stripe-js/dist/index.mjs","../../../app/frontend/lib/components/events/EventAttendance/status_forms/AdditionalGuestsPage.svelte","../../../app/frontend/lib/components/events/EventAttendance/EventAttendance.svelte","../../../app/frontend/lib/components/events/ExportModal/ExportModal.svelte","../../../app/frontend/lib/components/events/GuestList/AttendeeDetails.svelte","../../../app/frontend/lib/components/events/GuestList/AttendanceItem.svelte","../../../app/frontend/lib/components/events/GuestList/GuestList.svelte","../../../app/frontend/lib/components/events/calendar/CalendarFeeds.svelte","../../../app/frontend/lib/components/events/calendar/SubscribeToGcal.svelte","../../../app/frontend/lib/components/events/calendar/AddToCalendarForm.svelte","../../../node_modules/cally/dist/cally.js","../../../app/frontend/lib/components/events/EventForm/EventTimeForm.svelte","../../../node_modules/svelte-toolbelt/dist/utils/is.js","../../../node_modules/svelte-toolbelt/dist/box/box.svelte.js","../../../node_modules/svelte-toolbelt/dist/utils/compose-handlers.js","../../../node_modules/inline-style-parser/index.js","../../../node_modules/style-to-object/cjs/index.js","../../../node_modules/style-to-object/esm/index.mjs","../../../node_modules/svelte-toolbelt/dist/utils/strings.js","../../../node_modules/svelte-toolbelt/dist/utils/css-to-style-obj.js","../../../node_modules/svelte-toolbelt/dist/utils/execute-callbacks.js","../../../node_modules/svelte-toolbelt/dist/utils/style-to-css.js","../../../node_modules/svelte-toolbelt/dist/utils/style.js","../../../node_modules/svelte-toolbelt/dist/utils/merge-props.js","../../../node_modules/runed/dist/internal/configurable-globals.js","../../../node_modules/runed/dist/internal/utils/dom.js","../../../node_modules/svelte/src/reactivity/map.js","../../../node_modules/runed/dist/utilities/active-element/active-element.svelte.js","../../../node_modules/runed/dist/internal/utils/is.js","../../../node_modules/runed/dist/utilities/watch/watch.svelte.js","../../../node_modules/runed/dist/internal/utils/get.js","../../../node_modules/runed/dist/utilities/element-size/element-size.svelte.js","../../../node_modules/runed/dist/utilities/previous/previous.svelte.js","../../../node_modules/runed/dist/utilities/context/context.js","../../../node_modules/svelte-toolbelt/dist/utils/on-destroy-effect.svelte.js","../../../node_modules/svelte-toolbelt/dist/utils/use-ref-by-id.svelte.js","../../../node_modules/svelte-toolbelt/dist/utils/after-sleep.js","../../../node_modules/svelte-toolbelt/dist/utils/after-tick.js","../../../node_modules/svelte-toolbelt/dist/utils/on-mount-effect.svelte.js","../../../node_modules/bits-ui/dist/internal/attrs.js","../../../node_modules/bits-ui/dist/internal/kbd-constants.js","../../../node_modules/bits-ui/dist/internal/is.js","../../../node_modules/bits-ui/dist/internal/use-id.js","../../../node_modules/bits-ui/dist/internal/noop.js","../../../node_modules/bits-ui/dist/internal/use-state-machine.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/presence-layer/use-presence.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/presence-layer/presence-layer.svelte","../../../node_modules/bits-ui/dist/internal/events.js","../../../node_modules/bits-ui/dist/internal/debounce.js","../../../node_modules/bits-ui/dist/internal/elements.js","../../../node_modules/bits-ui/dist/internal/dom.js","../../../node_modules/bits-ui/dist/bits/utilities/dismissible-layer/use-dismissable-layer.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/dismissible-layer/dismissible-layer.svelte","../../../node_modules/bits-ui/dist/bits/utilities/escape-layer/use-escape-layer.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/escape-layer/escape-layer.svelte","../../../node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope-stack.svelte.js","../../../node_modules/bits-ui/dist/internal/focus.js","../../../node_modules/tabbable/dist/index.esm.js","../../../node_modules/bits-ui/dist/bits/utilities/focus-scope/use-focus-scope.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/focus-scope/focus-scope.svelte","../../../node_modules/bits-ui/dist/bits/utilities/text-selection-layer/use-text-selection-layer.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/text-selection-layer/text-selection-layer.svelte","../../../node_modules/bits-ui/dist/internal/create-shared-hook.svelte.js","../../../node_modules/bits-ui/dist/internal/use-body-scroll-lock.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/scroll-lock/scroll-lock.svelte","../../../node_modules/bits-ui/dist/internal/arrays.js","../../../node_modules/bits-ui/dist/bits/utilities/hidden-input.svelte","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../node_modules/bits-ui/dist/internal/floating-svelte/floating-utils.svelte.js","../../../node_modules/bits-ui/dist/internal/floating-svelte/use-floating.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/floating-layer/use-floating-layer.svelte.js","../../../node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer.svelte","../../../node_modules/bits-ui/dist/bits/select/select.svelte.js","../../../node_modules/bits-ui/dist/bits/select/components/select-hidden-input.svelte","../../../node_modules/bits-ui/dist/bits/combobox/components/combobox.svelte","../../../node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-anchor.svelte","../../../node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content.svelte","../../../node_modules/bits-ui/dist/bits/utilities/floating-layer/components/floating-layer-content-static.svelte","../../../node_modules/bits-ui/dist/bits/combobox/components/combobox-input.svelte","../../../node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-content.svelte","../../../node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-inner.svelte","../../../node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer.svelte","../../../node_modules/bits-ui/dist/bits/utilities/popper-layer/popper-layer-force-mount.svelte","../../../node_modules/bits-ui/dist/bits/select/components/select-content.svelte","../../../node_modules/bits-ui/dist/bits/utilities/mounted.svelte","../../../node_modules/bits-ui/dist/bits/select/components/select-item.svelte","../../../app/frontend/lib/components/events/EventForm/LocationInput.svelte","../../../app/frontend/lib/components/events/EventForm/ThemeInput.svelte","../../../app/frontend/lib/components/events/EventForm/EventForm.svelte","../../../app/frontend/lib/components/events/EventLayout.svelte","../../../node_modules/rrule/dist/esm/weekday.js","../../../node_modules/rrule/dist/esm/helpers.js","../../../node_modules/rrule/dist/esm/dateutil.js","../../../node_modules/rrule/dist/esm/iterresult.js","../../../node_modules/tslib/tslib.es6.mjs","../../../node_modules/rrule/dist/esm/callbackiterresult.js","../../../node_modules/rrule/dist/esm/nlp/i18n.js","../../../node_modules/rrule/dist/esm/nlp/totext.js","../../../node_modules/rrule/dist/esm/nlp/parsetext.js","../../../node_modules/rrule/dist/esm/types.js","../../../node_modules/rrule/dist/esm/nlp/index.js","../../../node_modules/rrule/dist/esm/datetime.js","../../../node_modules/rrule/dist/esm/parseoptions.js","../../../node_modules/rrule/dist/esm/parsestring.js","../../../node_modules/rrule/dist/esm/datewithzone.js","../../../node_modules/rrule/dist/esm/optionstostring.js","../../../node_modules/rrule/dist/esm/cache.js","../../../node_modules/rrule/dist/esm/masks.js","../../../node_modules/rrule/dist/esm/iterinfo/yearinfo.js","../../../node_modules/rrule/dist/esm/iterinfo/monthinfo.js","../../../node_modules/rrule/dist/esm/iterinfo/easter.js","../../../node_modules/rrule/dist/esm/iterinfo/index.js","../../../node_modules/rrule/dist/esm/iter/poslist.js","../../../node_modules/rrule/dist/esm/iter/index.js","../../../node_modules/rrule/dist/esm/rrule.js","../../../node_modules/rrule/dist/esm/iterset.js","../../../node_modules/rrule/dist/esm/rrulestr.js","../../../node_modules/rrule/dist/esm/rruleset.js","../../../app/frontend/lib/components/events/EventDetails.svelte","../../../node_modules/marked/lib/marked.esm.js","../../../app/frontend/lib/components/events/EventChatModal.svelte","../../../app/frontend/lib/components/events/DeleteEventModal.svelte","../../../app/frontend/lib/components/events/EventActions.svelte","../../../app/frontend/lib/components/events/GenerateEventModal.svelte","../../../app/frontend/lib/components/events/RegenerateEventModal.svelte","../../../app/frontend/lib/components/events/FeaturedEvent.svelte","../../../app/frontend/lib/components/WhatsAppMarkdown.svelte","../../../app/frontend/lib/components/events/EventItem.svelte","../../../app/frontend/lib/components/events/EventInvitation.svelte","../../../app/frontend/lib/components/events/EventHeader.svelte","../../../node_modules/svelte/src/transition/index.js","../../../app/frontend/lib/components/entries/PollEntry.svelte","../../../app/frontend/lib/components/entries/BroadcastEntryModal.svelte","../../../node_modules/svelte/src/easing/index.js","../../../node_modules/svelte/src/animate/index.js","../../../app/frontend/lib/components/entries/EntryReactions.svelte","../../../app/frontend/lib/components/entries/GroupChatForm.svelte","../../../app/frontend/lib/components/entries/GroupChatModal.svelte","../../../app/frontend/lib/components/entries/EventEntry.svelte","../../../app/frontend/lib/components/entries/PhotoAlbumModal.svelte","../../../app/frontend/lib/components/entries/EventEntries.svelte","../../../app/frontend/lib/components/Header/LoginModal.svelte","../../../app/frontend/lib/components/Header/Header.svelte","../../../app/frontend/lib/components/Footer/Footer.svelte","../../../app/frontend/lib/components/inputs/Form.svelte","../../../node_modules/dayjs/plugin/quarterOfYear.js","../../../node_modules/dayjs/dayjs.min.js","../../../node_modules/chrono-node/dist/esm/types.js","../../../node_modules/chrono-node/dist/esm/utils/dayjs.js","../../../node_modules/chrono-node/dist/esm/timezone.js","../../../node_modules/chrono-node/dist/esm/results.js","../../../node_modules/chrono-node/dist/esm/utils/pattern.js","../../../node_modules/chrono-node/dist/esm/calculation/years.js","../../../node_modules/chrono-node/dist/esm/locales/en/constants.js","../../../node_modules/chrono-node/dist/esm/common/parsers/AbstractParserWithWordBoundary.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENTimeUnitWithinFormatParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENMonthNameLittleEndianParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENMonthNameMiddleEndianParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENMonthNameParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENYearMonthDayParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENSlashMonthFormatParser.js","../../../node_modules/chrono-node/dist/esm/common/parsers/AbstractTimeExpressionParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENTimeExpressionParser.js","../../../node_modules/chrono-node/dist/esm/utils/timeunits.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENTimeUnitAgoFormatParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENTimeUnitLaterFormatParser.js","../../../node_modules/chrono-node/dist/esm/common/abstractRefiners.js","../../../node_modules/chrono-node/dist/esm/common/refiners/AbstractMergeDateRangeRefiner.js","../../../node_modules/chrono-node/dist/esm/locales/en/refiners/ENMergeDateRangeRefiner.js","../../../node_modules/chrono-node/dist/esm/calculation/mergingCalculation.js","../../../node_modules/chrono-node/dist/esm/common/refiners/AbstractMergeDateTimeRefiner.js","../../../node_modules/chrono-node/dist/esm/locales/en/refiners/ENMergeDateTimeRefiner.js","../../../node_modules/chrono-node/dist/esm/common/refiners/ExtractTimezoneAbbrRefiner.js","../../../node_modules/chrono-node/dist/esm/common/refiners/ExtractTimezoneOffsetRefiner.js","../../../node_modules/chrono-node/dist/esm/common/refiners/OverlapRemovalRefiner.js","../../../node_modules/chrono-node/dist/esm/common/refiners/ForwardDateRefiner.js","../../../node_modules/chrono-node/dist/esm/common/refiners/UnlikelyFormatFilter.js","../../../node_modules/chrono-node/dist/esm/common/parsers/ISOFormatParser.js","../../../node_modules/chrono-node/dist/esm/common/refiners/MergeWeekdayComponentRefiner.js","../../../node_modules/chrono-node/dist/esm/configurations.js","../../../node_modules/chrono-node/dist/esm/common/casualReferences.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENCasualDateParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENCasualTimeParser.js","../../../node_modules/chrono-node/dist/esm/common/calculation/weekdays.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENWeekdayParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENRelativeDateFormatParser.js","../../../node_modules/chrono-node/dist/esm/common/parsers/SlashDateFormatParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/parsers/ENTimeUnitCasualRelativeFormatParser.js","../../../node_modules/chrono-node/dist/esm/locales/en/refiners/ENMergeRelativeAfterDateRefiner.js","../../../node_modules/chrono-node/dist/esm/locales/en/refiners/ENMergeRelativeFollowByDateRefiner.js","../../../node_modules/chrono-node/dist/esm/locales/en/refiners/ENExtractYearSuffixRefiner.js","../../../node_modules/chrono-node/dist/esm/locales/en/refiners/ENUnlikelyFormatFilter.js","../../../node_modules/chrono-node/dist/esm/locales/en/configuration.js","../../../node_modules/chrono-node/dist/esm/chrono.js","../../../node_modules/chrono-node/dist/esm/locales/en/index.js","../../../app/frontend/lib/components/inputs/DateTimeInput.svelte","../../../node_modules/svelte5-tiny-virtual-list/dist/constants.js","../../../node_modules/svelte5-tiny-virtual-list/dist/SizeAndPositionManager.js","../../../node_modules/svelte5-tiny-virtual-list/dist/utils/listState.svelte.js","../../../node_modules/svelte5-tiny-virtual-list/dist/utils/listProps.svelte.js","../../../node_modules/svelte5-tiny-virtual-list/dist/VirtualList.svelte","../../../node_modules/@vvo/tzdb/lib/formatTimeZone.js","../../../node_modules/@vvo/tzdb/lib/utils/timeZone.js","../../../node_modules/@vvo/tzdb/lib/getTimeZones.js","../../../app/frontend/lib/components/inputs/TimeZonePicker.svelte","../../../app/frontend/lib/components/inputs/Errors.svelte","../../../app/frontend/lib/components/inputs/ImageGenerationForm.svelte","../../../node_modules/cropperjs/dist/cropper.esm.js","../../../app/frontend/lib/components/inputs/PhotoForm.svelte","../../../app/frontend/lib/components/inputs/NewContactForm.svelte","../../../app/frontend/lib/components/inputs/NewUserFields.svelte","../../../app/frontend/lib/components/inputs/TextInput.svelte","../../../app/frontend/lib/components/Pages/Pages.svelte","../../../app/frontend/lib/components/Pages/Page.svelte","../../../app/frontend/lib/components/Pages/index.js","../../../app/frontend/lib/components/ContactList/ContactListItem.svelte","../../../app/frontend/lib/components/ContactList/SelectedContactListItems.svelte","../../../app/frontend/lib/components/ContactList/ContactList.svelte","../../../app/frontend/lib/components/SlideTransition/SlideTransition.svelte","../../../app/frontend/lib/components/Notifications/Notifications.svelte","../../../app/frontend/lib/components/profile/NotificationChannelModal.svelte","../../../app/frontend/lib/components/pricing/PricingChecklist.svelte","../../../app/frontend/lib/components/pricing/ProSubscriptionButton.svelte","../../../app/frontend/lib/components/Modal/Modal.svelte","../../../app/frontend/lib/components/CommandK/CommandK.svelte","../../../node_modules/@rails/actioncable/app/assets/javascripts/actioncable.esm.js","../../../app/frontend/lib/components/ActionCable/Stream.svelte","../../../app/frontend/lib/components/Avatar.svelte","../../../app/frontend/lib/components/ButtonNotifier.svelte","../../../app/frontend/lib/components/Transition.svelte","../../../app/frontend/lib/components/Loadable.svelte","../../../app/frontend/lib/components/NamePromptModal.svelte","../../../app/frontend/lib/components/TimeZoneChangedModal.svelte","../../../app/frontend/lib/components/LinkCopier.svelte","../../../app/frontend/lib/components/UserList.svelte","../../../app/frontend/lib/components/ChangelogModal.svelte","../../../app/views/calendars/index.svelte","../../../app/views/events/edit.svelte","../../../app/views/events/index.svelte","../../../app/views/events/new.svelte","../../../app/views/events/public/index.svelte","../../../app/views/events/show.svelte","../../../app/views/layouts/app.svelte","../../../app/views/layouts/root.svelte","../../../app/views/profiles/show.svelte","../../../app/views/prose/thank-you.md","../../../app/views/static/error.svelte","../../../app/frontend/lib/components/homepage/Hero.svelte","../../../app/views/static/pricing.svelte","../../../app/views/static/updates/index.svelte","../../../app/views/static/updates/show.svelte","../../../app/views/unassigned_attendances/index.svelte","../../../app/frontend/entrypoints/resolve.js"],"sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","export default {}","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nvar quotes = {\n __proto__: null,\n 'double': '\"',\n single: \"'\"\n};\nvar quoteREs = {\n __proto__: null,\n 'double': /([\"\\\\])/g,\n single: /(['\\\\])/g\n};\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other\n /* eslint-env browser */\n if (typeof window !== 'undefined' && obj === window) {\n return '{ [object Window] }';\n }\n if (\n (typeof globalThis !== 'undefined' && obj === globalThis)\n || (typeof global !== 'undefined' && obj === global)\n ) {\n return '{ [object globalThis] }';\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var style = opts.quoteStyle || defaultStyle;\n var quoteChar = quotes[style];\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction canTrustToString(obj) {\n return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));\n}\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n var quoteRE = quoteREs[opts.quoteStyle || 'single'];\n quoteRE.lastIndex = 0;\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, quoteRE, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","'use strict';\n\nvar inspect = require('object-inspect');\n\nvar $TypeError = require('es-errors/type');\n\n/*\n* This function traverses the list returning the node corresponding to the given key.\n*\n* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.\n* By doing so, all the recently used nodes can be accessed relatively quickly.\n*/\n/** @type {import('./list.d.ts').listGetNode} */\n// eslint-disable-next-line consistent-return\nvar listGetNode = function (list, key, isDelete) {\n\t/** @type {typeof list | NonNullable<(typeof list)['next']>} */\n\tvar prev = list;\n\t/** @type {(typeof list)['next']} */\n\tvar curr;\n\t// eslint-disable-next-line eqeqeq\n\tfor (; (curr = prev.next) != null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tif (!isDelete) {\n\t\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\t\tcurr.next = /** @type {NonNullable} */ (list.next);\n\t\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\t}\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\n/** @type {import('./list.d.ts').listGet} */\nvar listGet = function (objects, key) {\n\tif (!objects) {\n\t\treturn void undefined;\n\t}\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\n/** @type {import('./list.d.ts').listSet} */\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = /** @type {import('./list.d.ts').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t});\n\t}\n};\n/** @type {import('./list.d.ts').listHas} */\nvar listHas = function (objects, key) {\n\tif (!objects) {\n\t\treturn false;\n\t}\n\treturn !!listGetNode(objects, key);\n};\n/** @type {import('./list.d.ts').listDelete} */\n// eslint-disable-next-line consistent-return\nvar listDelete = function (objects, key) {\n\tif (objects) {\n\t\treturn listGetNode(objects, key, true);\n\t}\n};\n\n/** @type {import('.')} */\nmodule.exports = function getSideChannelList() {\n\t/** @typedef {ReturnType} Channel */\n\t/** @typedef {Parameters[0]} K */\n\t/** @typedef {Parameters[1]} V */\n\n\t/** @type {import('./list.d.ts').RootNode | undefined} */ var $o;\n\n\t/** @type {Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\t'delete': function (key) {\n\t\t\tvar root = $o && $o.next;\n\t\t\tvar deletedNode = listDelete($o, key);\n\t\t\tif (deletedNode && root && root === deletedNode) {\n\t\t\t\t$o = void undefined;\n\t\t\t}\n\t\t\treturn !!deletedNode;\n\t\t},\n\t\tget: function (key) {\n\t\t\treturn listGet($o, key);\n\t\t},\n\t\thas: function (key) {\n\t\t\treturn listHas($o, key);\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (!$o) {\n\t\t\t\t// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head\n\t\t\t\t$o = {\n\t\t\t\t\tnext: void undefined\n\t\t\t\t};\n\t\t\t}\n\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\tlistSet(/** @type {NonNullable} */ ($o), key, value);\n\t\t}\n\t};\n\t// @ts-expect-error TODO: figure out why this is erroring\n\treturn channel;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Object;\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","'use strict';\n\n/** @type {import('./abs')} */\nmodule.exports = Math.abs;\n","'use strict';\n\n/** @type {import('./floor')} */\nmodule.exports = Math.floor;\n","'use strict';\n\n/** @type {import('./max')} */\nmodule.exports = Math.max;\n","'use strict';\n\n/** @type {import('./min')} */\nmodule.exports = Math.min;\n","'use strict';\n\n/** @type {import('./pow')} */\nmodule.exports = Math.pow;\n","'use strict';\n\n/** @type {import('./round')} */\nmodule.exports = Math.round;\n","'use strict';\n\n/** @type {import('./isNaN')} */\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n","'use strict';\n\nvar $isNaN = require('./isNaN');\n\n/** @type {import('./sign')} */\nmodule.exports = function sign(number) {\n\tif ($isNaN(number) || number === 0) {\n\t\treturn number;\n\t}\n\treturn number < 0 ? -1 : +1;\n};\n","'use strict';\n\n/** @type {import('./gOPD')} */\nmodule.exports = Object.getOwnPropertyDescriptor;\n","'use strict';\n\n/** @type {import('.')} */\nvar $gOPD = require('./gOPD');\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\n/** @type {import('.')} */\nvar $defineProperty = Object.defineProperty || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\n/** @type {import('./shams')} */\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\t/** @type {{ [k in symbol]?: unknown }} */\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\t// eslint-disable-next-line no-extra-parens\n\t\tvar descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/** @type {import('./Reflect.getPrototypeOf')} */\nmodule.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;\n","'use strict';\n\nvar $Object = require('es-object-atoms');\n\n/** @type {import('./Object.getPrototypeOf')} */\nmodule.exports = $Object.getPrototypeOf || null;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\n/** @type {import('./functionCall')} */\nmodule.exports = Function.prototype.call;\n","'use strict';\n\n/** @type {import('./functionApply')} */\nmodule.exports = Function.prototype.apply;\n","'use strict';\n\n/** @type {import('./reflectApply')} */\nmodule.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;\n","'use strict';\n\nvar bind = require('function-bind');\n\nvar $apply = require('./functionApply');\nvar $call = require('./functionCall');\nvar $reflectApply = require('./reflectApply');\n\n/** @type {import('./actualApply')} */\nmodule.exports = $reflectApply || bind.call($call, $apply);\n","'use strict';\n\nvar bind = require('function-bind');\nvar $TypeError = require('es-errors/type');\n\nvar $call = require('./functionCall');\nvar $actualApply = require('./actualApply');\n\n/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */\nmodule.exports = function callBindBasic(args) {\n\tif (args.length < 1 || typeof args[0] !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\treturn $actualApply(bind, $call, args);\n};\n","'use strict';\n\nvar callBind = require('call-bind-apply-helpers');\nvar gOPD = require('gopd');\n\nvar hasProtoAccessor;\ntry {\n\t// eslint-disable-next-line no-extra-parens, no-proto\n\thasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;\n} catch (e) {\n\tif (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {\n\t\tthrow e;\n\t}\n}\n\n// eslint-disable-next-line no-extra-parens\nvar desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));\n\nvar $Object = Object;\nvar $getPrototypeOf = $Object.getPrototypeOf;\n\n/** @type {import('./get')} */\nmodule.exports = desc && typeof desc.get === 'function'\n\t? callBind([desc.get])\n\t: typeof $getPrototypeOf === 'function'\n\t\t? /** @type {import('./get')} */ function getDunder(value) {\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\treturn $getPrototypeOf(value == null ? value : $Object(value));\n\t\t}\n\t\t: false;\n","'use strict';\n\nvar reflectGetProto = require('./Reflect.getPrototypeOf');\nvar originalGetProto = require('./Object.getPrototypeOf');\n\nvar getDunderProto = require('dunder-proto/get');\n\n/** @type {import('.')} */\nmodule.exports = reflectGetProto\n\t? function getProto(O) {\n\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\treturn reflectGetProto(O);\n\t}\n\t: originalGetProto\n\t\t? function getProto(O) {\n\t\t\tif (!O || (typeof O !== 'object' && typeof O !== 'function')) {\n\t\t\t\tthrow new TypeError('getProto: not an object');\n\t\t\t}\n\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\treturn originalGetProto(O);\n\t\t}\n\t\t: getDunderProto\n\t\t\t? function getProto(O) {\n\t\t\t\t// @ts-expect-error TS can't narrow inside a closure, for some reason\n\t\t\t\treturn getDunderProto(O);\n\t\t\t}\n\t\t\t: null;\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar undefined;\n\nvar $Object = require('es-object-atoms');\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar abs = require('math-intrinsics/abs');\nvar floor = require('math-intrinsics/floor');\nvar max = require('math-intrinsics/max');\nvar min = require('math-intrinsics/min');\nvar pow = require('math-intrinsics/pow');\nvar round = require('math-intrinsics/round');\nvar sign = require('math-intrinsics/sign');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = require('gopd');\nvar $defineProperty = require('es-define-property');\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = require('get-proto');\nvar $ObjectGPO = require('get-proto/Object.getPrototypeOf');\nvar $ReflectGPO = require('get-proto/Reflect.getPrototypeOf');\n\nvar $apply = require('call-bind-apply-helpers/functionApply');\nvar $call = require('call-bind-apply-helpers/functionCall');\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': $Object,\n\t'%Object.getOwnPropertyDescriptor%': $gOPD,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\n\t'%Function.prototype.call%': $call,\n\t'%Function.prototype.apply%': $apply,\n\t'%Object.defineProperty%': $defineProperty,\n\t'%Object.getPrototypeOf%': $ObjectGPO,\n\t'%Math.abs%': abs,\n\t'%Math.floor%': floor,\n\t'%Math.max%': max,\n\t'%Math.min%': min,\n\t'%Math.pow%': pow,\n\t'%Math.round%': round,\n\t'%Math.sign%': sign,\n\t'%Reflect.getPrototypeOf%': $ReflectGPO\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call($call, Array.prototype.concat);\nvar $spliceApply = bind.call($apply, Array.prototype.splice);\nvar $replace = bind.call($call, String.prototype.replace);\nvar $strSlice = bind.call($call, String.prototype.slice);\nvar $exec = bind.call($call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBindBasic = require('call-bind-apply-helpers');\n\n/** @type {(thisArg: string, searchString: string, position?: number) => number} */\nvar $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);\n\n/** @type {import('.')} */\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\t// eslint-disable-next-line no-extra-parens\n\tvar intrinsic = /** @type {Parameters[0][0]} */ (GetIntrinsic(name, !!allowMissing));\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBindBasic([intrinsic]);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = require('es-errors/type');\nvar $Map = GetIntrinsic('%Map%', true);\n\n/** @type {(thisArg: Map, key: K) => V} */\nvar $mapGet = callBound('Map.prototype.get', true);\n/** @type {(thisArg: Map, key: K, value: V) => void} */\nvar $mapSet = callBound('Map.prototype.set', true);\n/** @type {(thisArg: Map, key: K) => boolean} */\nvar $mapHas = callBound('Map.prototype.has', true);\n/** @type {(thisArg: Map, key: K) => boolean} */\nvar $mapDelete = callBound('Map.prototype.delete', true);\n/** @type {(thisArg: Map) => number} */\nvar $mapSize = callBound('Map.prototype.size', true);\n\n/** @type {import('.')} */\nmodule.exports = !!$Map && /** @type {Exclude} */ function getSideChannelMap() {\n\t/** @typedef {ReturnType} Channel */\n\t/** @typedef {Parameters[0]} K */\n\t/** @typedef {Parameters[1]} V */\n\n\t/** @type {Map | undefined} */ var $m;\n\n\t/** @type {Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\t'delete': function (key) {\n\t\t\tif ($m) {\n\t\t\t\tvar result = $mapDelete($m, key);\n\t\t\t\tif ($mapSize($m) === 0) {\n\t\t\t\t\t$m = void undefined;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($m) {\n\t\t\t\treturn $mapGet($m, key);\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($m) {\n\t\t\t\treturn $mapHas($m, key);\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (!$m) {\n\t\t\t\t// @ts-expect-error TS can't handle narrowing a variable inside a closure\n\t\t\t\t$m = new $Map();\n\t\t\t}\n\t\t\t$mapSet($m, key, value);\n\t\t}\n\t};\n\n\t// @ts-expect-error TODO: figure out why TS is erroring here\n\treturn channel;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bound');\nvar inspect = require('object-inspect');\nvar getSideChannelMap = require('side-channel-map');\n\nvar $TypeError = require('es-errors/type');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\n\n/** @type {(thisArg: WeakMap, key: K) => V} */\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\n/** @type {(thisArg: WeakMap, key: K, value: V) => void} */\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\n/** @type {(thisArg: WeakMap, key: K) => boolean} */\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\n/** @type {(thisArg: WeakMap, key: K) => boolean} */\nvar $weakMapDelete = callBound('WeakMap.prototype.delete', true);\n\n/** @type {import('.')} */\nmodule.exports = $WeakMap\n\t? /** @type {Exclude} */ function getSideChannelWeakMap() {\n\t\t/** @typedef {ReturnType} Channel */\n\t\t/** @typedef {Parameters[0]} K */\n\t\t/** @typedef {Parameters[1]} V */\n\n\t\t/** @type {WeakMap | undefined} */ var $wm;\n\t\t/** @type {Channel | undefined} */ var $m;\n\n\t\t/** @type {Channel} */\n\t\tvar channel = {\n\t\t\tassert: function (key) {\n\t\t\t\tif (!channel.has(key)) {\n\t\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t\t}\n\t\t\t},\n\t\t\t'delete': function (key) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif ($wm) {\n\t\t\t\t\t\treturn $weakMapDelete($wm, key);\n\t\t\t\t\t}\n\t\t\t\t} else if (getSideChannelMap) {\n\t\t\t\t\tif ($m) {\n\t\t\t\t\t\treturn $m['delete'](key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tget: function (key) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif ($wm) {\n\t\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $m && $m.get(key);\n\t\t\t},\n\t\t\thas: function (key) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif ($wm) {\n\t\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn !!$m && $m.has(key);\n\t\t\t},\n\t\t\tset: function (key, value) {\n\t\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\t\tif (!$wm) {\n\t\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t\t}\n\t\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t\t} else if (getSideChannelMap) {\n\t\t\t\t\tif (!$m) {\n\t\t\t\t\t\t$m = getSideChannelMap();\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line no-extra-parens\n\t\t\t\t\t/** @type {NonNullable} */ ($m).set(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// @ts-expect-error TODO: figure out why this is erroring\n\t\treturn channel;\n\t}\n\t: getSideChannelMap;\n","'use strict';\n\nvar $TypeError = require('es-errors/type');\nvar inspect = require('object-inspect');\nvar getSideChannelList = require('side-channel-list');\nvar getSideChannelMap = require('side-channel-map');\nvar getSideChannelWeakMap = require('side-channel-weakmap');\n\nvar makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;\n\n/** @type {import('.')} */\nmodule.exports = function getSideChannel() {\n\t/** @typedef {ReturnType} Channel */\n\n\t/** @type {Channel | undefined} */ var $channelData;\n\n\t/** @type {Channel} */\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\t'delete': function (key) {\n\t\t\treturn !!$channelData && $channelData['delete'](key);\n\t\t},\n\t\tget: function (key) {\n\t\t\treturn $channelData && $channelData.get(key);\n\t\t},\n\t\thas: function (key) {\n\t\t\treturn !!$channelData && $channelData.has(key);\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif (!$channelData) {\n\t\t\t\t$channelData = makeChannel();\n\t\t\t}\n\n\t\t\t$channelData.set(key, value);\n\t\t}\n\t};\n\t// @ts-expect-error TODO: figure out why this is erroring\n\treturn channel;\n};\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? { __proto__: null } : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object' && typeof source !== 'function') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if (\n (options && (options.plainObjects || options.allowPrototypes))\n || !has.call(Object.prototype, source)\n ) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, defaultDecoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar limit = 1024;\n\n/* eslint operator-linebreak: [2, \"before\"] */\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var j = 0; j < string.length; j += limit) {\n var segment = string.length >= limit ? string.slice(j, j + limit) : string;\n var arr = [];\n\n for (var i = 0; i < segment.length; ++i) {\n var c = segment.charCodeAt(i);\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n arr[arr.length] = segment.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n arr[arr.length] = hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n arr[arr.length] = hexTable[0xC0 | (c >> 6)]\n + hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n arr[arr.length] = hexTable[0xE0 | (c >> 12)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));\n\n arr[arr.length] = hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n out += arr.join('');\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n allowEmptyArrays: false,\n arrayFormat: 'indices',\n charset: 'utf-8',\n charsetSentinel: false,\n commaRoundTrip: false,\n delimiter: '&',\n encode: true,\n encodeDotInKeys: false,\n encoder: utils.encode,\n encodeValuesOnly: false,\n filter: void undefined,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n allowEmptyArrays,\n strictNullHandling,\n skipNulls,\n encodeDotInKeys,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\\./g, '%2E') : String(prefix);\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;\n\n if (allowEmptyArrays && isArray(obj) && obj.length === 0) {\n return adjustedPrefix + '[]';\n }\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && key && typeof key.value !== 'undefined'\n ? key.value\n : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\\./g, '%2E') : String(key);\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n allowEmptyArrays,\n strictNullHandling,\n skipNulls,\n encodeDotInKeys,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n\n if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {\n throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n var arrayFormat;\n if (opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if ('indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = defaults.arrayFormat;\n }\n\n if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n arrayFormat: arrayFormat,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n commaRoundTrip: !!opts.commaRoundTrip,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];\n var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n var value = obj[key];\n\n if (options.skipNulls && value === null) {\n continue;\n }\n pushToArray(keys, stringify(\n value,\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.allowEmptyArrays,\n options.strictNullHandling,\n options.skipNulls,\n options.encodeDotInKeys,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowEmptyArrays: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decodeDotInKeys: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n duplicates: 'combine',\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictDepth: false,\n strictNullHandling: false,\n throwOnLimitExceeded: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options, currentArrayLength) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {\n throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(\n options.delimiter,\n options.throwOnLimitExceeded ? limit + 1 : limit\n );\n\n if (options.throwOnLimitExceeded && parts.length > limit) {\n throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');\n }\n\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key;\n var val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n\n val = utils.maybeMap(\n parseArrayValue(\n part.slice(pos + 1),\n options,\n isArray(obj[key]) ? obj[key].length : 0\n ),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(String(val));\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n var existing = has.call(obj, key);\n if (existing && options.duplicates === 'combine') {\n obj[key] = utils.combine(obj[key], val);\n } else if (!existing || options.duplicates === 'last') {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var currentArrayLength = 0;\n if (chain.length > 0 && chain[chain.length - 1] === '[]') {\n var parentKey = chain.slice(0, -1).join('');\n currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;\n }\n\n var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null))\n ? []\n : utils.combine([], leaf);\n } else {\n obj = options.plainObjects ? { __proto__: null } : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;\n var index = parseInt(decodedRoot, 10);\n if (!options.parseArrays && decodedRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== decodedRoot\n && String(index) === decodedRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (decodedRoot !== '__proto__') {\n obj[decodedRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, check strictDepth option for throw, else just add whatever is left\n\n if (segment) {\n if (options.strictDepth === true) {\n throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');\n }\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {\n throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');\n }\n\n if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {\n throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');\n }\n\n if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') {\n throw new TypeError('`throwOnLimitExceeded` option must be a boolean');\n }\n\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;\n\n if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {\n throw new TypeError('The duplicates option must be either combine, first, or last');\n }\n\n var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;\n\n return {\n allowDots: allowDots,\n allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n duplicates: duplicates,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,\n throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? { __proto__: null } : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? { __proto__: null } : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isHeaders(header)) {\n for (const [key, value] of header.entries()) {\n setHeader(value, key, rewrite);\n }\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.7.9\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","function F(r,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>r.apply(this,i),e)}}function P(r,e){return document.dispatchEvent(new CustomEvent(`inertia:${r}`,e))}var _=r=>P(\"before\",{cancelable:!0,detail:{visit:r}}),pe=r=>P(\"error\",{detail:{errors:r}}),de=r=>P(\"exception\",{cancelable:!0,detail:{exception:r}}),he=r=>P(\"finish\",{detail:{visit:r}}),me=r=>P(\"invalid\",{cancelable:!0,detail:{response:r}}),R=r=>P(\"navigate\",{detail:{page:r}}),fe=r=>P(\"progress\",{detail:{progress:r}}),ge=r=>P(\"start\",{detail:{visit:r}}),ve=r=>P(\"success\",{detail:{page:r}}),be=(r,e)=>P(\"prefetched\",{detail:{fetchedAt:Date.now(),response:r.data,visit:e}}),ye=r=>P(\"prefetching\",{detail:{visit:r}});var u=class{static set(e,t){typeof window<\"u\"&&window.sessionStorage.setItem(e,JSON.stringify(t))}static get(e){if(typeof window<\"u\")return JSON.parse(window.sessionStorage.getItem(e)||\"null\")}static merge(e,t){let i=this.get(e);i===null?this.set(e,t):this.set(e,{...i,...t})}static remove(e){typeof window<\"u\"&&window.sessionStorage.removeItem(e)}static removeNested(e,t){let i=this.get(e);i!==null&&(delete i[t],this.set(e,i))}static exists(e){try{return this.get(e)!==null}catch{return!1}}static clear(){typeof window<\"u\"&&window.sessionStorage.clear()}};u.locationVisitKey=\"inertiaLocationVisit\";var Pe=async r=>{if(typeof window>\"u\")throw new Error(\"Unable to encrypt history\");let e=Se(),t=await Ee(),i=await je(t);if(!i)throw new Error(\"Unable to encrypt history\");return await $e(e,i,r)},T={key:\"historyKey\",iv:\"historyIv\"},we=async r=>{let e=Se(),t=await Ee();if(!t)throw new Error(\"Unable to decrypt history\");return await Be(e,t,r)},$e=async(r,e,t)=>{if(typeof window>\"u\")throw new Error(\"Unable to encrypt history\");if(typeof window.crypto.subtle>\"u\")return console.warn(\"Encryption is not supported in this environment. SSL is required.\"),Promise.resolve(t);let i=new TextEncoder,n=JSON.stringify(t),a=new Uint8Array(n.length*3),c=i.encodeInto(n,a);return window.crypto.subtle.encrypt({name:\"AES-GCM\",iv:r},e,a.subarray(0,c.written))},Be=async(r,e,t)=>{if(typeof window.crypto.subtle>\"u\")return console.warn(\"Decryption is not supported in this environment. SSL is required.\"),Promise.resolve(t);let i=await window.crypto.subtle.decrypt({name:\"AES-GCM\",iv:r},e,t);return JSON.parse(new TextDecoder().decode(i))},Se=()=>{let r=u.get(T.iv);if(r)return new Uint8Array(r);let e=window.crypto.getRandomValues(new Uint8Array(12));return u.set(T.iv,Array.from(e)),e},Ge=async()=>typeof window.crypto.subtle>\"u\"?(console.warn(\"Encryption is not supported in this environment. SSL is required.\"),Promise.resolve(null)):window.crypto.subtle.generateKey({name:\"AES-GCM\",length:256},!0,[\"encrypt\",\"decrypt\"]),Ke=async r=>{if(typeof window.crypto.subtle>\"u\")return console.warn(\"Encryption is not supported in this environment. SSL is required.\"),Promise.resolve();let e=await window.crypto.subtle.exportKey(\"raw\",r);u.set(T.key,Array.from(new Uint8Array(e)))},je=async r=>{if(r)return r;let e=await Ge();return e?(await Ke(e),e):null},Ee=async()=>{let r=u.get(T.key);return r?await window.crypto.subtle.importKey(\"raw\",new Uint8Array(r),{name:\"AES-GCM\",length:256},!0,[\"encrypt\",\"decrypt\"]):null};var g=class{static save(){o.saveScrollPositions(Array.from(this.regions()).map(e=>({top:e.scrollTop,left:e.scrollLeft})))}static regions(){return document.querySelectorAll(\"[scroll-region]\")}static reset(){typeof window<\"u\"&&window.scrollTo(0,0),this.regions().forEach(e=>{typeof e.scrollTo==\"function\"?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.save(),window.location.hash&&setTimeout(()=>document.getElementById(window.location.hash.slice(1))?.scrollIntoView())}static restore(e){this.restoreDocument(),this.regions().forEach((t,i)=>{let n=e[i];n&&(typeof t.scrollTo==\"function\"?t.scrollTo(n.left,n.top):(t.scrollTop=n.top,t.scrollLeft=n.left))})}static restoreDocument(){let e=o.getDocumentScrollPosition();typeof window<\"u\"&&window.scrollTo(e.left,e.top)}static onScroll(e){let t=e.target;typeof t.hasAttribute==\"function\"&&t.hasAttribute(\"scroll-region\")&&this.save()}static onWindowScroll(){o.saveDocumentScrollPosition({top:window.scrollY,left:window.scrollX})}};import We from\"deepmerge\";import*as $ from\"qs\";function M(r){return r instanceof File||r instanceof Blob||r instanceof FileList&&r.length>0||r instanceof FormData&&Array.from(r.values()).some(e=>M(e))||typeof r==\"object\"&&r!==null&&Object.values(r).some(e=>M(e))}var Y=r=>r instanceof FormData;function Z(r,e=new FormData,t=null){r=r||{};for(let i in r)Object.prototype.hasOwnProperty.call(r,i)&&xe(e,Re(t,i),r[i]);return e}function Re(r,e){return r?r+\"[\"+e+\"]\":e}function xe(r,e,t){if(Array.isArray(t))return Array.from(t.keys()).forEach(i=>xe(r,Re(e,i.toString()),t[i]));if(t instanceof Date)return r.append(e,t.toISOString());if(t instanceof File)return r.append(e,t,t.name);if(t instanceof Blob)return r.append(e,t);if(typeof t==\"boolean\")return r.append(e,t?\"1\":\"0\");if(typeof t==\"string\")return r.append(e,t);if(typeof t==\"number\")return r.append(e,`${t}`);if(t==null)return r.append(e,\"\");Z(t,r,e)}function y(r){return new URL(r.toString(),typeof window>\"u\"?void 0:window.location.toString())}var Ce=(r,e,t,i,n)=>{let a=typeof r==\"string\"?y(r):r;if((M(e)||i)&&!Y(e)&&(e=Z(e)),Y(e))return[a,e];let[c,d]=Te(t,a,e,n);return[y(c),d]};function Te(r,e,t,i=\"brackets\"){let n=/^https?:\\/\\//.test(e.toString()),a=n||e.toString().startsWith(\"/\"),c=!a&&!e.toString().startsWith(\"#\")&&!e.toString().startsWith(\"?\"),d=e.toString().includes(\"?\")||r===\"get\"&&Object.keys(t).length,m=e.toString().includes(\"#\"),h=new URL(e.toString(),\"http://localhost\");return r===\"get\"&&Object.keys(t).length&&(h.search=$.stringify(We($.parse(h.search,{ignoreQueryPrefix:!0}),t),{encodeValuesOnly:!0,arrayFormat:i}),t={}),[[n?`${h.protocol}//${h.host}`:\"\",a?h.pathname:\"\",c?h.pathname.substring(1):\"\",d?h.search:\"\",m?h.hash:\"\"].join(\"\"),t]}function I(r){return r=new URL(r.href),r.hash=\"\",r}var ee=(r,e)=>{r.hash&&!e.hash&&I(r).href===e.href&&(e.hash=r.hash)},O=(r,e)=>I(r).href===I(e).href;var te=class{constructor(){this.componentId={};this.listeners=[];this.isFirstPageLoad=!0;this.cleared=!1}init({initialPage:e,swapComponent:t,resolveComponent:i}){return this.page=e,this.swapComponent=t,this.resolveComponent=i,this}set(e,{replace:t=!1,preserveScroll:i=!1,preserveState:n=!1}={}){this.componentId={};let a=this.componentId;return e.clearHistory&&o.clear(),this.resolve(e.component).then(c=>{if(a!==this.componentId)return;e.rememberedState??(e.rememberedState={});let d=typeof window<\"u\"?window.location:new URL(e.url);return t=t||O(y(e.url),d),new Promise(m=>{t?o.replaceState(e,()=>m(null)):o.pushState(e,()=>m(null))}).then(()=>{let m=!this.isTheSame(e);return this.page=e,this.cleared=!1,m&&this.fireEventsFor(\"newComponent\"),this.isFirstPageLoad&&this.fireEventsFor(\"firstLoad\"),this.isFirstPageLoad=!1,this.swap({component:c,page:e,preserveState:n}).then(()=>{i||g.reset(),w.fireInternalEvent(\"loadDeferredProps\"),t||R(e)})})})}setQuietly(e,{preserveState:t=!1}={}){return this.resolve(e.component).then(i=>(this.page=e,this.cleared=!1,o.setCurrent(e),this.swap({component:i,page:e,preserveState:t})))}clear(){this.cleared=!0}isCleared(){return this.cleared}get(){return this.page}merge(e){this.page={...this.page,...e}}setUrlHash(e){this.page.url.includes(e)||(this.page.url+=e)}remember(e){this.page.rememberedState=e}swap({component:e,page:t,preserveState:i}){return this.swapComponent({component:e,page:t,preserveState:i})}resolve(e){return Promise.resolve(this.resolveComponent(e))}isTheSame(e){return this.page.component===e.component}on(e,t){return this.listeners.push({event:e,callback:t}),()=>{this.listeners=this.listeners.filter(i=>i.event!==e&&i.callback!==t)}}fireEventsFor(e){this.listeners.filter(t=>t.event===e).forEach(t=>t.callback())}},s=new te;var q=class{constructor(){this.items=[];this.processingPromise=null}add(e){return this.items.push(e),this.process()}process(){return this.processingPromise??(this.processingPromise=this.processNext().then(()=>{this.processingPromise=null})),this.processingPromise}processNext(){let e=this.items.shift();return e?Promise.resolve(e()).then(()=>this.processNext()):Promise.resolve()}};var D=typeof window>\"u\",U=new q,qe=!D&&/CriOS/.test(window.navigator.userAgent),re=class{constructor(){this.rememberedState=\"rememberedState\";this.scrollRegions=\"scrollRegions\";this.preserveUrl=!1;this.current={};this.initialState=null}remember(e,t){this.replaceState({...s.get(),rememberedState:{...s.get()?.rememberedState??{},[t]:e}})}restore(e){if(!D)return this.initialState?.[this.rememberedState]?.[e]}pushState(e,t=null){if(!D){if(this.preserveUrl){t&&t();return}this.current=e,U.add(()=>this.getPageData(e).then(i=>{let n=()=>{this.doPushState({page:i},e.url),t&&t()};qe?setTimeout(n):n()}))}}getPageData(e){return new Promise(t=>e.encryptHistory?Pe(e).then(t):t(e))}processQueue(){return U.process()}decrypt(e=null){if(D)return Promise.resolve(e??s.get());let t=e??window.history.state?.page;return this.decryptPageData(t).then(i=>{if(!i)throw new Error(\"Unable to decrypt history\");return this.initialState===null?this.initialState=i??void 0:this.current=i??{},i})}decryptPageData(e){return e instanceof ArrayBuffer?we(e):Promise.resolve(e)}saveScrollPositions(e){U.add(()=>Promise.resolve().then(()=>{window.history.state?.page&&this.doReplaceState({page:window.history.state.page,scrollRegions:e},this.current.url)}))}saveDocumentScrollPosition(e){U.add(()=>Promise.resolve().then(()=>{this.doReplaceState({page:window.history.state.page,documentScrollPosition:e},this.current.url)}))}getScrollRegions(){return window.history.state.scrollRegions||[]}getDocumentScrollPosition(){return window.history.state.documentScrollPosition||{top:0,left:0}}replaceState(e,t=null){if(s.merge(e),!D){if(this.preserveUrl){t&&t();return}this.current=e,U.add(()=>this.getPageData(e).then(i=>{let n=()=>{this.doReplaceState({page:i},e.url),t&&t()};qe?setTimeout(n):n()}))}}doReplaceState(e,t){window.history.replaceState({...e,scrollRegions:e.scrollRegions??window.history.state?.scrollRegions,documentScrollPosition:e.documentScrollPosition??window.history.state?.documentScrollPosition},\"\",t)}doPushState(e,t){window.history.pushState(e,\"\",t)}getState(e,t){return this.current?.[e]??t}deleteState(e){this.current[e]!==void 0&&(delete this.current[e],this.replaceState(this.current))}hasAnyState(){return!!this.getAllState()}clear(){u.remove(T.key),u.remove(T.iv)}setCurrent(e){this.current=e}isValidState(e){return!!e.page}getAllState(){return this.current}};typeof window<\"u\"&&window.history.scrollRestoration&&(window.history.scrollRestoration=\"manual\");var o=new re;var ie=class{constructor(){this.internalListeners=[]}init(){typeof window<\"u\"&&(window.addEventListener(\"popstate\",this.handlePopstateEvent.bind(this)),window.addEventListener(\"scroll\",F(g.onWindowScroll.bind(g),100),!0)),typeof document<\"u\"&&document.addEventListener(\"scroll\",F(g.onScroll.bind(g),100),!0)}onGlobalEvent(e,t){let i=n=>{let a=t(n);n.cancelable&&!n.defaultPrevented&&a===!1&&n.preventDefault()};return this.registerListener(`inertia:${e}`,i)}on(e,t){return this.internalListeners.push({event:e,listener:t}),()=>{this.internalListeners=this.internalListeners.filter(i=>i.listener!==t)}}onMissingHistoryItem(){s.clear(),this.fireInternalEvent(\"missingHistoryItem\")}fireInternalEvent(e){this.internalListeners.filter(t=>t.event===e).forEach(t=>t.listener())}registerListener(e,t){return document.addEventListener(e,t),()=>document.removeEventListener(e,t)}handlePopstateEvent(e){let t=e.state||null;if(t===null){let i=y(s.get().url);i.hash=window.location.hash,o.replaceState({...s.get(),url:i.href}),g.reset();return}if(!o.isValidState(t))return this.onMissingHistoryItem();o.decrypt(t.page).then(i=>{s.setQuietly(i,{preserveState:!1}).then(()=>{g.restore(o.getScrollRegions()),R(s.get())})}).catch(()=>{this.onMissingHistoryItem()})}},w=new ie;var ne=class{constructor(){this.type=this.resolveType()}resolveType(){return typeof window>\"u\"?\"navigate\":window.performance&&window.performance.getEntriesByType&&window.performance.getEntriesByType(\"navigation\").length>0?window.performance.getEntriesByType(\"navigation\")[0].type:\"navigate\"}get(){return this.type}isBackForward(){return this.type===\"back_forward\"}isReload(){return this.type===\"reload\"}},se=new ne;var B=class{static handle(){this.clearRememberedStateOnReload(),[this.handleBackForward,this.handleLocation,this.handleDefault].find(t=>t.bind(this)())}static clearRememberedStateOnReload(){se.isReload()&&o.deleteState(o.rememberedState)}static handleBackForward(){if(!se.isBackForward()||!o.hasAnyState())return!1;let e=o.getScrollRegions();return o.decrypt().then(t=>{s.set(t,{preserveScroll:!0,preserveState:!0}).then(()=>{g.restore(e),R(s.get())})}).catch(()=>{w.onMissingHistoryItem()}),!0}static handleLocation(){if(!u.exists(u.locationVisitKey))return!1;let e=u.get(u.locationVisitKey)||{};return u.remove(u.locationVisitKey),typeof window<\"u\"&&s.setUrlHash(window.location.hash),o.decrypt().then(()=>{let t=o.getState(o.rememberedState,{}),i=o.getScrollRegions();s.remember(t),s.set(s.get(),{preserveScroll:e.preserveScroll,preserveState:!0}).then(()=>{e.preserveScroll&&g.restore(i),R(s.get())})}).catch(()=>{w.onMissingHistoryItem()}),!0}static handleDefault(){typeof window<\"u\"&&s.setUrlHash(window.location.hash),s.set(s.get(),{preserveScroll:!0,preserveState:!0}).then(()=>{g.restore(o.getScrollRegions()),R(s.get())})}};var G=class{constructor(e,t,i){this.id=null;this.throttle=!1;this.keepAlive=!1;this.cbCount=0;this.keepAlive=i.keepAlive??!1,this.cb=t,this.interval=e,(i.autoStart??!0)&&this.start()}stop(){this.id&&clearInterval(this.id)}start(){typeof window>\"u\"||(this.stop(),this.id=window.setInterval(()=>{(!this.throttle||this.cbCount%10===0)&&this.cb(),this.throttle&&this.cbCount++},this.interval))}isInBackground(e){this.throttle=this.keepAlive?!1:e,this.throttle&&(this.cbCount=0)}};var oe=class{constructor(){this.polls=[];this.setupVisibilityListener()}add(e,t,i){let n=new G(e,t,i);return this.polls.push(n),{stop:()=>n.stop(),start:()=>n.start()}}clear(){this.polls.forEach(e=>e.stop()),this.polls=[]}setupVisibilityListener(){typeof document>\"u\"||document.addEventListener(\"visibilitychange\",()=>{this.polls.forEach(e=>e.isInBackground(document.hidden))},!1)}},Ae=new oe;var ae=(r,e,t)=>{if(r===e)return!0;for(let i in r)if(!t.includes(i)&&r[i]!==e[i]&&!Xe(r[i],e[i]))return!1;return!0},Xe=(r,e)=>{switch(typeof r){case\"object\":return ae(r,e,[]);case\"function\":return r.toString()===e.toString();default:return r===e}};var Je={ms:1,s:1e3,m:6e4,h:36e5,d:864e5},le=r=>{if(typeof r==\"number\")return r;for(let[e,t]of Object.entries(Je))if(r.endsWith(e))return parseFloat(r)*t;return parseInt(r)};var ce=class{constructor(){this.cached=[];this.inFlightRequests=[];this.removalTimers=[];this.currentUseId=null}add(e,t,{cacheFor:i}){if(this.findInFlight(e))return Promise.resolve();let a=this.findCached(e);if(!e.fresh&&a&&a.staleTimestamp>Date.now())return Promise.resolve();let[c,d]=this.extractStaleValues(i),m=new Promise((h,l)=>{t({...e,onCancel:()=>{this.remove(e),e.onCancel(),l()},onError:v=>{this.remove(e),e.onError(v),l()},onPrefetching(v){e.onPrefetching(v)},onPrefetched(v,z){e.onPrefetched(v,z)},onPrefetchResponse(v){h(v)}})}).then(h=>(this.remove(e),this.cached.push({params:{...e},staleTimestamp:Date.now()+c,response:m,singleUse:i===0,timestamp:Date.now(),inFlight:!1}),this.scheduleForRemoval(e,d),this.inFlightRequests=this.inFlightRequests.filter(l=>!this.paramsAreEqual(l.params,e)),h.handlePrefetch(),h));return this.inFlightRequests.push({params:{...e},response:m,staleTimestamp:null,inFlight:!0}),m}removeAll(){this.cached=[],this.removalTimers.forEach(e=>{clearTimeout(e.timer)}),this.removalTimers=[]}remove(e){this.cached=this.cached.filter(t=>!this.paramsAreEqual(t.params,e)),this.clearTimer(e)}extractStaleValues(e){let[t,i]=this.cacheForToStaleAndExpires(e);return[le(t),le(i)]}cacheForToStaleAndExpires(e){if(!Array.isArray(e))return[e,e];switch(e.length){case 0:return[0,0];case 1:return[e[0],e[0]];default:return[e[0],e[1]]}}clearTimer(e){let t=this.removalTimers.find(i=>this.paramsAreEqual(i.params,e));t&&(clearTimeout(t.timer),this.removalTimers=this.removalTimers.filter(i=>i!==t))}scheduleForRemoval(e,t){if(!(typeof window>\"u\")&&(this.clearTimer(e),t>0)){let i=window.setTimeout(()=>this.remove(e),t);this.removalTimers.push({params:e,timer:i})}}get(e){return this.findCached(e)||this.findInFlight(e)}use(e,t){let i=`${t.url.pathname}-${Date.now()}-${Math.random().toString(36).substring(7)}`;return this.currentUseId=i,e.response.then(n=>{if(this.currentUseId===i)return n.mergeParams({...t,onPrefetched:()=>{}}),this.removeSingleUseItems(t),n.handle()})}removeSingleUseItems(e){this.cached=this.cached.filter(t=>this.paramsAreEqual(t.params,e)?!t.singleUse:!0)}findCached(e){return this.cached.find(t=>this.paramsAreEqual(t.params,e))||null}findInFlight(e){return this.inFlightRequests.find(t=>this.paramsAreEqual(t.params,e))||null}paramsAreEqual(e,t){return ae(e,t,[\"showProgress\",\"replace\",\"prefetch\",\"onBefore\",\"onStart\",\"onProgress\",\"onFinish\",\"onCancel\",\"onSuccess\",\"onError\",\"onPrefetched\",\"onCancelToken\",\"onPrefetching\",\"async\"])}},x=new ce;import{default as Fe}from\"axios\";var L=class{constructor(e){this.callbacks=[];if(!e.prefetch)this.params=e;else{let t={onBefore:this.wrapCallback(e,\"onBefore\"),onStart:this.wrapCallback(e,\"onStart\"),onProgress:this.wrapCallback(e,\"onProgress\"),onFinish:this.wrapCallback(e,\"onFinish\"),onCancel:this.wrapCallback(e,\"onCancel\"),onSuccess:this.wrapCallback(e,\"onSuccess\"),onError:this.wrapCallback(e,\"onError\"),onCancelToken:this.wrapCallback(e,\"onCancelToken\"),onPrefetched:this.wrapCallback(e,\"onPrefetched\"),onPrefetching:this.wrapCallback(e,\"onPrefetching\")};this.params={...e,...t,onPrefetchResponse:e.onPrefetchResponse||(()=>{})}}}static create(e){return new L(e)}data(){return this.params.method===\"get\"?{}:this.params.data}queryParams(){return this.params.method===\"get\"?this.params.data:{}}isPartial(){return this.params.only.length>0||this.params.except.length>0||this.params.reset.length>0}onCancelToken(e){this.params.onCancelToken({cancel:e})}markAsFinished(){this.params.completed=!0,this.params.cancelled=!1,this.params.interrupted=!1}markAsCancelled({cancelled:e=!0,interrupted:t=!1}){this.params.onCancel(),this.params.completed=!1,this.params.cancelled=e,this.params.interrupted=t}wasCancelledAtAll(){return this.params.cancelled||this.params.interrupted}onFinish(){this.params.onFinish(this.params)}onStart(){this.params.onStart(this.params)}onPrefetching(){this.params.onPrefetching(this.params)}onPrefetchResponse(e){this.params.onPrefetchResponse&&this.params.onPrefetchResponse(e)}all(){return this.params}headers(){let e={...this.params.headers};this.isPartial()&&(e[\"X-Inertia-Partial-Component\"]=s.get().component);let t=this.params.only.concat(this.params.reset);return t.length>0&&(e[\"X-Inertia-Partial-Data\"]=t.join(\",\")),this.params.except.length>0&&(e[\"X-Inertia-Partial-Except\"]=this.params.except.join(\",\")),this.params.reset.length>0&&(e[\"X-Inertia-Reset\"]=this.params.reset.join(\",\")),this.params.errorBag&&this.params.errorBag.length>0&&(e[\"X-Inertia-Error-Bag\"]=this.params.errorBag),e}setPreserveOptions(e){this.params.preserveScroll=this.resolvePreserveOption(this.params.preserveScroll,e),this.params.preserveState=this.resolvePreserveOption(this.params.preserveState,e)}runCallbacks(){this.callbacks.forEach(({name:e,args:t})=>{this.params[e](...t)})}merge(e){this.params={...this.params,...e}}wrapCallback(e,t){return(...i)=>{this.recordCallback(t,i),e[t](...i)}}recordCallback(e,t){this.callbacks.push({name:e,args:t})}resolvePreserveOption(e,t){return typeof e==\"function\"?e(t):e===\"errors\"?Object.keys(t.props.errors||{}).length>0:e}};var Ve={modal:null,listener:null,show(r){typeof r==\"object\"&&(r=`All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.
${JSON.stringify(r)}`);let e=document.createElement(\"html\");e.innerHTML=r,e.querySelectorAll(\"a\").forEach(i=>i.setAttribute(\"target\",\"_top\")),this.modal=document.createElement(\"div\"),this.modal.style.position=\"fixed\",this.modal.style.width=\"100vw\",this.modal.style.height=\"100vh\",this.modal.style.padding=\"50px\",this.modal.style.boxSizing=\"border-box\",this.modal.style.backgroundColor=\"rgba(0, 0, 0, .6)\",this.modal.style.zIndex=2e5,this.modal.addEventListener(\"click\",()=>this.hide());let t=document.createElement(\"iframe\");if(t.style.backgroundColor=\"white\",t.style.borderRadius=\"5px\",t.style.width=\"100%\",t.style.height=\"100%\",this.modal.appendChild(t),document.body.prepend(this.modal),document.body.style.overflow=\"hidden\",!t.contentWindow)throw new Error(\"iframe not yet ready.\");t.contentWindow.document.open(),t.contentWindow.document.write(e.outerHTML),t.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener(\"keydown\",this.listener)},hide(){this.modal.outerHTML=\"\",this.modal=null,document.body.style.overflow=\"visible\",document.removeEventListener(\"keydown\",this.listener)},hideOnEscape(r){r.keyCode===27&&this.hide()}};var Qe=new q,A=class{constructor(e,t,i){this.requestParams=e;this.response=t;this.originatingPage=i}static create(e,t,i){return new A(e,t,i)}async handlePrefetch(){O(this.requestParams.all().url,window.location)&&this.handle()}async handle(){return Qe.add(()=>this.process())}async process(){if(this.requestParams.all().prefetch)return this.requestParams.all().prefetch=!1,this.requestParams.all().onPrefetched(this.response,this.requestParams.all()),be(this.response,this.requestParams.all()),Promise.resolve();if(this.requestParams.runCallbacks(),!this.isInertiaResponse())return this.handleNonInertiaResponse();await o.processQueue(),o.preserveUrl=this.requestParams.all().preserveUrl,await this.setPage();let e=s.get().props.errors||{};if(Object.keys(e).length>0){let t=this.getScopedErrors(e);return pe(t),this.requestParams.all().onError(t)}ve(s.get()),await this.requestParams.all().onSuccess(s.get()),o.preserveUrl=!1}mergeParams(e){this.requestParams.merge(e)}async handleNonInertiaResponse(){if(this.isLocationVisit()){let t=y(this.getHeader(\"x-inertia-location\"));return ee(this.requestParams.all().url,t),this.locationVisit(t)}let e={...this.response,data:this.getDataFromResponse(this.response.data)};if(me(e))return Ve.show(e.data)}isInertiaResponse(){return this.hasHeader(\"x-inertia\")}hasStatus(e){return this.response.status===e}getHeader(e){return this.response.headers[e]}hasHeader(e){return this.getHeader(e)!==void 0}isLocationVisit(){return this.hasStatus(409)&&this.hasHeader(\"x-inertia-location\")}locationVisit(e){try{if(u.set(u.locationVisitKey,{preserveScroll:this.requestParams.all().preserveScroll===!0}),typeof window>\"u\")return;O(window.location,e)?window.location.reload():window.location.href=e.href}catch{return!1}}async setPage(){let e=this.getDataFromResponse(this.response.data);return this.shouldSetPage(e)?(this.mergeProps(e),await this.setRememberedState(e),this.requestParams.setPreserveOptions(e),e.url=o.preserveUrl?s.get().url:this.pageUrl(e),s.set(e,{replace:this.requestParams.all().replace,preserveScroll:this.requestParams.all().preserveScroll,preserveState:this.requestParams.all().preserveState})):Promise.resolve()}getDataFromResponse(e){if(typeof e!=\"string\")return e;try{return JSON.parse(e)}catch{return e}}shouldSetPage(e){if(!this.requestParams.all().async||this.originatingPage.component!==e.component)return!0;if(this.originatingPage.component!==s.get().component)return!1;let t=y(this.originatingPage.url),i=y(s.get().url);return t.origin===i.origin&&t.pathname===i.pathname}pageUrl(e){let t=y(e.url);return ee(this.requestParams.all().url,t),t.pathname+t.search+t.hash}mergeProps(e){this.requestParams.isPartial()&&e.component===s.get().component&&((e.mergeProps||[]).forEach(i=>{let n=e.props[i];Array.isArray(n)?e.props[i]=[...s.get().props[i]||[],...n]:typeof n==\"object\"&&(e.props[i]={...s.get().props[i]||[],...n})}),e.props={...s.get().props,...e.props})}async setRememberedState(e){let t=await o.getState(o.rememberedState,{});this.requestParams.all().preserveState&&t&&e.component===s.get().component&&(e.rememberedState=t)}getScopedErrors(e){return this.requestParams.all().errorBag?e[this.requestParams.all().errorBag||\"\"]||{}:e}};var V=class{constructor(e,t){this.page=t;this.requestHasFinished=!1;this.requestParams=L.create(e),this.cancelToken=new AbortController}static create(e,t){return new V(e,t)}async send(){this.requestParams.onCancelToken(()=>this.cancel({cancelled:!0})),ge(this.requestParams.all()),this.requestParams.onStart(),this.requestParams.all().prefetch&&(this.requestParams.onPrefetching(),ye(this.requestParams.all()));let e=this.requestParams.all().prefetch;return Fe({method:this.requestParams.all().method,url:I(this.requestParams.all().url).href,data:this.requestParams.data(),params:this.requestParams.queryParams(),signal:this.cancelToken.signal,headers:this.getHeaders(),onUploadProgress:this.onProgress.bind(this),responseType:\"text\"}).then(t=>(this.response=A.create(this.requestParams,t,this.page),this.response.handle())).catch(t=>t?.response?(this.response=A.create(this.requestParams,t.response,this.page),this.response.handle()):Promise.reject(t)).catch(t=>{if(!Fe.isCancel(t)&&de(t))return Promise.reject(t)}).finally(()=>{this.finish(),e&&this.response&&this.requestParams.onPrefetchResponse(this.response)})}finish(){this.requestParams.wasCancelledAtAll()||(this.requestParams.markAsFinished(),this.fireFinishEvents())}fireFinishEvents(){this.requestHasFinished||(this.requestHasFinished=!0,he(this.requestParams.all()),this.requestParams.onFinish())}cancel({cancelled:e=!1,interrupted:t=!1}){this.requestHasFinished||(this.cancelToken.abort(),this.requestParams.markAsCancelled({cancelled:e,interrupted:t}),this.fireFinishEvents())}onProgress(e){this.requestParams.data()instanceof FormData&&(e.percentage=e.progress?Math.round(e.progress*100):0,fe(e),this.requestParams.all().onProgress(e))}getHeaders(){let e={...this.requestParams.headers(),Accept:\"text/html, application/xhtml+xml\",\"X-Requested-With\":\"XMLHttpRequest\",\"X-Inertia\":!0};return s.get().version&&(e[\"X-Inertia-Version\"]=s.get().version),e}};var H=class{constructor({maxConcurrent:e,interruptible:t}){this.requests=[];this.maxConcurrent=e,this.interruptible=t}send(e){this.requests.push(e),e.send().then(()=>{this.requests=this.requests.filter(t=>t!==e)})}interruptInFlight(){this.cancel({interrupted:!0},!1)}cancelInFlight(){this.cancel({cancelled:!0},!0)}cancel({cancelled:e=!1,interrupted:t=!1}={},i){if(!this.shouldCancel(i))return;this.requests.shift()?.cancel({interrupted:t,cancelled:e})}shouldCancel(e){return e?!0:this.interruptible&&this.requests.length>=this.maxConcurrent}};var K=class{constructor(){this.syncRequestStream=new H({maxConcurrent:1,interruptible:!0});this.asyncRequestStream=new H({maxConcurrent:1/0,interruptible:!1})}init({initialPage:e,resolveComponent:t,swapComponent:i}){s.init({initialPage:e,resolveComponent:t,swapComponent:i}),B.handle(),w.init(),w.on(\"missingHistoryItem\",()=>{typeof window<\"u\"&&this.visit(window.location.href,{preserveState:!0,preserveScroll:!0,replace:!0})}),w.on(\"loadDeferredProps\",()=>{this.loadDeferredProps()})}get(e,t={},i={}){return this.visit(e,{...i,method:\"get\",data:t})}post(e,t={},i={}){return this.visit(e,{preserveState:!0,...i,method:\"post\",data:t})}put(e,t={},i={}){return this.visit(e,{preserveState:!0,...i,method:\"put\",data:t})}patch(e,t={},i={}){return this.visit(e,{preserveState:!0,...i,method:\"patch\",data:t})}delete(e,t={}){return this.visit(e,{preserveState:!0,...t,method:\"delete\"})}reload(e={}){if(!(typeof window>\"u\"))return this.visit(window.location.href,{...e,preserveScroll:!0,preserveState:!0,async:!0,headers:{...e.headers||{},\"Cache-Control\":\"no-cache\"}})}remember(e,t=\"default\"){o.remember(e,t)}restore(e=\"default\"){return o.restore(e)}on(e,t){return typeof window>\"u\"?()=>{}:w.onGlobalEvent(e,t)}cancel(){this.syncRequestStream.cancelInFlight()}cancelAll(){this.asyncRequestStream.cancelInFlight(),this.syncRequestStream.cancelInFlight()}poll(e,t={},i={}){return Ae.add(e,()=>this.reload(t),{autoStart:i.autoStart??!0,keepAlive:i.keepAlive??!1})}visit(e,t={}){let i=this.getPendingVisit(e,{...t,showProgress:t.showProgress??!t.async}),n=this.getVisitEvents(t);if(n.onBefore(i)===!1||!_(i))return;let a=i.async?this.asyncRequestStream:this.syncRequestStream;a.interruptInFlight(),!s.isCleared()&&!i.preserveUrl&&g.save();let c={...i,...n},d=x.get(c);d?(j(d.inFlight),x.use(d,c)):(j(!0),a.send(V.create(c,s.get())))}getCached(e,t={}){return x.findCached(this.getPrefetchParams(e,t))}flush(e,t={}){x.remove(this.getPrefetchParams(e,t))}flushAll(){x.removeAll()}getPrefetching(e,t={}){return x.findInFlight(this.getPrefetchParams(e,t))}prefetch(e,t={},{cacheFor:i=3e4}){if(t.method!==\"get\")throw new Error(\"Prefetch requests must use the GET method\");let n=this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0}),a=n.url.origin+n.url.pathname+n.url.search,c=window.location.origin+window.location.pathname+window.location.search;if(a===c)return;let d=this.getVisitEvents(t);if(d.onBefore(n)===!1||!_(n))return;W(),this.asyncRequestStream.interruptInFlight();let m={...n,...d};(()=>new Promise(l=>{let v=()=>{s.get()?l():setTimeout(v,50)};v()}))().then(()=>{x.add(m,l=>{this.asyncRequestStream.send(V.create(l,s.get()))},{cacheFor:i})})}clearHistory(){o.clear()}decryptHistory(){return o.decrypt()}replace(e){this.clientVisit(e,{replace:!0})}push(e){this.clientVisit(e)}clientVisit(e,{replace:t=!1}={}){let i=s.get(),n=typeof e.props==\"function\"?e.props(i.props):e.props??i.props;s.set({...i,...e,props:n},{replace:t,preserveScroll:e.preserveScroll,preserveState:e.preserveState})}getPrefetchParams(e,t){return{...this.getPendingVisit(e,{...t,async:!0,showProgress:!1,prefetch:!0}),...this.getVisitEvents(t)}}getPendingVisit(e,t,i={}){let n={method:\"get\",data:{},replace:!1,preserveScroll:!1,preserveState:!1,only:[],except:[],headers:{},errorBag:\"\",forceFormData:!1,queryStringArrayFormat:\"brackets\",async:!1,showProgress:!0,fresh:!1,reset:[],preserveUrl:!1,prefetch:!1,...t},[a,c]=Ce(e,n.data,n.method,n.forceFormData,n.queryStringArrayFormat);return{cancelled:!1,completed:!1,interrupted:!1,...n,...i,url:a,data:c}}getVisitEvents(e){return{onCancelToken:e.onCancelToken||(()=>{}),onBefore:e.onBefore||(()=>{}),onStart:e.onStart||(()=>{}),onProgress:e.onProgress||(()=>{}),onFinish:e.onFinish||(()=>{}),onCancel:e.onCancel||(()=>{}),onSuccess:e.onSuccess||(()=>{}),onError:e.onError||(()=>{}),onPrefetched:e.onPrefetched||(()=>{}),onPrefetching:e.onPrefetching||(()=>{})}}loadDeferredProps(){let e=s.get()?.deferredProps;e&&Object.entries(e).forEach(([t,i])=>{this.reload({only:i})})}};var ze={buildDOMElement(r){let e=document.createElement(\"template\");e.innerHTML=r;let t=e.content.firstChild;if(!r.startsWith(\"\n\n
\n

Here's what the invitation{invite_count === 1 ? '' : 's'} will look like:

\n\n \n
\n","\n\n\n \n {@render contact_list_page()}\n {@render invitations_page()}\n {@render create_contacts_page()}\n \n\n\n{#snippet contact_list_page()}\n \n

{ as_hosts ? 'Add hosts' : 'Invite people' } to { event.title }

\n\n \n {#if contacts.length}\n \n\n \n {#if total_people}\n { as_hosts ? 'Add' : 'Invite'} {total_people} { total_people === 1 ? 'person' : 'people' }\n {:else}\n Select people to { as_hosts ? 'add' : 'invite' }\n {/if}\n \n {/if}\n \n
\n{/snippet}\n\n{#snippet invitations_page()}\n \n

Invite {total_people} {total_people === 1 ? 'person' : 'people'} to {as_hosts ? 'host ' : ''}{event.title}

\n\n \n {\n let contact = contacts.find(contact => contact.id === id)\n if (contact) return [...selected_items, contact]\n\n return selected_items\n }, [])\n }]}\n selectable={false}\n searchable={false}\n let:item\n >\n \n\n {#if as_hosts}\n \n {/if}\n \n\n {#if as_hosts}\n

Hosts can invite people, invite others to host, send event updates and change event details. They can also see the names for any contacts you've uploaded.

\n\n

We'll send them an invitation to host, which they first need to accept.

\n {/if}\n\n \n\n Send {total_people} invitation{total_people === 1 ? '' : 's'}\n \n
\n{/snippet}\n\n{#snippet create_contacts_page()}\n \n {@const can_whatsapp_upload = !as_hosts && current_user?.notification_channels?.some(({ name, is_active }) => is_active && name.includes('whatsapp')) }\n

{as_hosts ? 'Add' : 'Invite'} new people

\n\n

You can {#if can_whatsapp_upload}upload contacts through WhatsApp, or{/if} enter their details below.

\n\n {#if can_whatsapp_upload}\n
\n pages.reset() }\n >\n Upload contacts\n \n\n
Or
\n
\n {/if}\n\n\n\n {\n let old_contacts = contacts\n\n await fetch_contacts()\n\n let new_contacts = contacts.filter(contact => !old_contacts.some(old_contact => old_contact.id === contact.id))\n\n selected_item_ids = Array.from(new Set([...selected_item_ids, ...new_contacts.map(contact => contact.id)]))\n\n pages.reset()\n }}\n />\n
\n{/snippet}","\n\n
\n {#if event_id}\n \n {/if}\n\n
\n

\n How likely are { is_current_user ? 'you' : 'they' } to go?\n

\n\n
\n
\n
\n
\n Not going\n 50/50\n Going\n
\n\n \n
\n\n
\n \n\n
\n {value}\n \n
\n
\n
\n\n {#if is_current_user}\n \n {/if}\n
\n
\n\n \n Submit\n\n {#if bind_keyboard_submission}\n
\n \n \n
\n {/if}\n \n\n\n\n","var V3_URL = 'https://js.stripe.com/v3';\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\nvar findScript = function findScript() {\n var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(V3_URL, \"\\\"]\"));\n\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i];\n\n if (!V3_URL_REGEX.test(script.src)) {\n continue;\n }\n\n return script;\n }\n\n return null;\n};\n\nvar injectScript = function injectScript(params) {\n var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n var script = document.createElement('script');\n script.src = \"\".concat(V3_URL).concat(queryString);\n var headOrBody = document.head || document.body;\n\n if (!headOrBody) {\n throw new Error('Expected document.body not to be null. Stripe.js requires a element.');\n }\n\n headOrBody.appendChild(script);\n return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n if (!stripe || !stripe._registerWrapper) {\n return;\n }\n\n stripe._registerWrapper({\n name: 'stripe-js',\n version: \"4.6.0\",\n startTime: startTime\n });\n};\n\nvar stripePromise = null;\nvar onErrorListener = null;\nvar onLoadListener = null;\n\nvar onError = function onError(reject) {\n return function () {\n reject(new Error('Failed to load Stripe.js'));\n };\n};\n\nvar onLoad = function onLoad(resolve, reject) {\n return function () {\n if (window.Stripe) {\n resolve(window.Stripe);\n } else {\n reject(new Error('Stripe.js not available'));\n }\n };\n};\n\nvar loadScript = function loadScript(params) {\n // Ensure that we only attempt to load Stripe.js at most once\n if (stripePromise !== null) {\n return stripePromise;\n }\n\n stripePromise = new Promise(function (resolve, reject) {\n if (typeof window === 'undefined' || typeof document === 'undefined') {\n // Resolve to null when imported server side. This makes the module\n // safe to import in an isomorphic code base.\n resolve(null);\n return;\n }\n\n if (window.Stripe && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n }\n\n if (window.Stripe) {\n resolve(window.Stripe);\n return;\n }\n\n try {\n var script = findScript();\n\n if (script && params) {\n console.warn(EXISTING_SCRIPT_MESSAGE);\n } else if (!script) {\n script = injectScript(params);\n } else if (script && onLoadListener !== null && onErrorListener !== null) {\n var _script$parentNode;\n\n // remove event listeners\n script.removeEventListener('load', onLoadListener);\n script.removeEventListener('error', onErrorListener); // if script exists, but we are reloading due to an error,\n // reload script to trigger 'load' event\n\n (_script$parentNode = script.parentNode) === null || _script$parentNode === void 0 ? void 0 : _script$parentNode.removeChild(script);\n script = injectScript(params);\n }\n\n onLoadListener = onLoad(resolve, reject);\n onErrorListener = onError(reject);\n script.addEventListener('load', onLoadListener);\n script.addEventListener('error', onErrorListener);\n } catch (error) {\n reject(error);\n return;\n }\n }); // Resets stripePromise on error\n\n return stripePromise[\"catch\"](function (error) {\n stripePromise = null;\n return Promise.reject(error);\n });\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n if (maybeStripe === null) {\n return null;\n }\n\n var stripe = maybeStripe.apply(undefined, args);\n registerWrapper(stripe, startTime);\n return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nvar stripePromise$1;\nvar loadCalled = false;\n\nvar getStripePromise = function getStripePromise() {\n if (stripePromise$1) {\n return stripePromise$1;\n }\n\n stripePromise$1 = loadScript(null)[\"catch\"](function (error) {\n // clear cache on error\n stripePromise$1 = null;\n return Promise.reject(error);\n });\n return stripePromise$1;\n}; // Execute our own script injection after a tick to give users time to do their\n// own script injection.\n\n\nPromise.resolve().then(function () {\n return getStripePromise();\n})[\"catch\"](function (error) {\n if (!loadCalled) {\n console.warn(error);\n }\n});\nvar loadStripe = function loadStripe() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n loadCalled = true;\n var startTime = Date.now(); // if previous attempts are unsuccessful, will re-load script\n\n return getStripePromise().then(function (maybeStripe) {\n return initStripe(maybeStripe, args, startTime);\n });\n};\n\nexport { loadStripe };\n","\n\n\n \n {@render title?.()}\n\n bringing_additional_guests = !bringing_additional_guests}\n >\n Bring additional guests (max {max_additional_guests})\n \n\n {#if bringing_additional_guests}\n \n
\n \n
\n
\n {/if}\n\n {@render children?.()}\n
\n\n \n {\n let old_contacts = contacts\n\n await fetch_contacts()\n\n let new_contacts = contacts.filter(contact => !old_contacts.some(old_contact => old_contact.id === contact.id))\n\n selected_contact_ids = Array.from(new Set([...selected_contact_ids, ...new_contacts.map(contact => contact.id)]))\n\n pages.reset()\n }}\n />\n \n
","\n\n\n\n {@render attendance_text()}\n\n {#if user_has_responded || !attendance_limit_reached}\n
\n {#if $page.props.current_user}\n
\n \n\n
\n {#if current_attendance?.can_host && !current_attendance.is_host }\n {@render host_buttons()}\n {:else if show_buttons}\n {@render attendance_buttons()}\n {:else if current_attendance}\n {@render attendance_menu()}\n {/if}\n
\n
\n\n \n \n\n \n {#if event.max_additional_guests}\n \n {@render going_form()}\n \n {/if}\n\n \n \n \n \n\n \n \n {@render cannot_go_form()}\n \n {:else}\n \n\n \n {@render rsvp_form()}\n \n {/if}\n
\n {/if}\n\n\n{#snippet attendance_text()}\n \n

\n {#if current_attendance?.can_host && !current_attendance.is_host }\n You're invited to host this event.\n {:else if show_buttons }\n {#if attendance_limit_reached && current_attendance?.status !== 'maybe' }\n This event has reached the guest limit.\n {:else }\n { is_past ? 'Did you go?' : 'Are you going?' }\n {/if}\n {:else}\n {#if !is_past && current_attendance?.status === 'maybe'}\n \n {:else if !is_past && event.ticket_price && current_attendance?.status === 'going' }\n You've bought a ticket!\n {:else if current_attendance}\n { attendance_label(current_attendance, { is_past }) }\n {/if}\n {/if}\n

\n
\n{/snippet}\n\n{#snippet host_buttons()}\n \n \n Yes, host\n \n\n \n \n No\n \n{/snippet}\n\n{#snippet attendance_buttons()}\n {#if event.ticket_price && !is_past}\n \n {:else}\n {#if event.max_additional_guests}\n \n\n {:else}\n \n \n Yes\n \n {/if}\n {/if}\n\n {#if !is_past}\n \n {/if}\n\n \n{/snippet}\n\n\n{#snippet attendance_menu()}\n {@const button_class = `btn h-10 min-h-10 ${BUTTON_COLORS[current_attendance.status]}`}\n {@const label = attendance_label(current_attendance, { short: true, is_past })}\n\n
\n {#if current_attendance.status === 'going' && event.ticket_price}\n
{label}
\n {:else}\n
\n
\n {label}\n \n
\n\n \n
\n
    \n {#if !event.ticket_price}\n
  • \n {#if event.max_additional_guests}\n \n {:else}\n \n {/if}\n
  • \n {/if}\n\n {#if !is_past}\n
  • \n \n
  • \n {/if}\n\n
  • \n \n
  • \n
\n
\n
\n {/if}\n
\n{/snippet}\n\n{#snippet going_title()}\n

Going to {event.title}.

\n{/snippet}\n\n{#snippet going_form()}\n
\n \n\n {#each additional_guests as guest}\n \n {/each}\n\n \n \n {#if additional_guests.length === 1}\n You + {additional_guests[0].name}\n {:else if additional_guests.length}\n You + {additional_guests.length} others\n {:else}\n Going\n {/if}\n\n
\n \n \n
\n \n
\n
\n{/snippet}\n\n{#snippet cannot_go_form()}\n
\n \n\n
\n

Not going to {event.title}.

\n\n \n
\n\n \n Submit\n\n
\n \n \n
\n \n \n{/snippet}\n\n{#snippet rsvp_form()}\n
\n

\n RSVP to {event.title} by entering your name and email, WhatsApp, Signal or Telegram number below.\n

\n\n {#if event.ticket_price}\n

Tickets are £{ (event.ticket_price / 100).toFixed(2) }, and we'll send you a link to buy one.

\n {/if}\n\n \n\n Request invite\n \n{/snippet}\n","\n\n\n

Export { event.title }

\n\n {#if current_user.is_google_authenticated}\n \n {#if event.google_sheet_connection}\n
\n \n\n

Syncing this event with your Google Sheet .

\n
\n\n
\n
\n \n
\n\n modal_open = false}\n >\n \n \n
\n {:else}\n

Sync with a Google Sheet by entering its ID or URL below, or create a new one.

\n\n

We'll use the \"Attendees\" worksheet or create a new one, overwriting any existing data.

\n\n
id_or_url = ''}>\n \n\n
\n \n\n Sync\n
\n\n \n\n Create new Google Sheet\n \n {/if}\n
\n {:else}\n

\n Sign in with Google to sync the event attendees with a Google Sheet, or download a one-time spreadsheet below.\n

\n\n

\n We only use the Google Sheets you explicitly link, or that we create on your behalf.\n

\n\n
\n \n
\n \n\n Sign in with Google\n
\n \n \n {/if}\n\n
Or
\n\n \n Download CSV\n \n
\n\n\n","\n\n
\n
\n

{attendance.user?.name}

\n\n {#if active_platforms.length}\n
\n {#each active_platforms as platform}\n \n \n \n {/each}\n
\n {/if}\n\n
\n
\n

\n { attendance_label(attendance, { is_past, article }) }\n

\n\n {#if current_attendance.is_host && !is_current_user}\n

\n Updating the RSVP won't notify them, and we'll add a flag to the guest list saying they didn't update it.\n

\n {/if}\n
\n\n {#if current_attendance.is_host || attendance.id == current_attendance.id}\n
\n onupdate()}\n >\n
\n
\n { attendance_label(attendance, { short: true, is_past, article }) }\n \n
\n\n \n
\n
    \n
  • \n \n
  • \n\n
  • \n \n
  • \n\n
  • \n \n
  • \n
\n
\n
\n \n
\n {/if}\n
\n\n {#if attendance.reason}\n
\n

{article} left this message:

\n\n
\n {attendance.reason}\n
\n
\n {/if}\n\n {#if attendance.guest_attendances?.length}\n
\n
\n

Plus-ones

\n\n user).filter(user => user)\n }]}\n selectable={false}\n searchable={false}\n />\n
\n
\n {/if}\n\n {#if current_attendance.is_host}\n
\n
\n \n\n

\n Hosts can invite others, send event updates and change event details.\n

\n
\n\n {#if attendance.is_host}\n \n {:else if attendance.can_host}\n
Invited
\n {:else}\n \n {/if}\n
\n\n {#if !is_current_user && !(attendance.status === 'going' && event.ticket_price)}\n
\n
\n

\n Remove {attendance.user?.name?.split?.(' ')?.[0] || 'attendee'}\n

\n\n

\n Removing them won't notify them.\n

\n
\n\n
\n ondestroy()}\n >\n \n \n
\n
\n {/if}\n\n onupdate()}\n >\n\n \n\n \n \n {/if}\n
\n
","\n\n
  • \n \n \n select_attendance(attendance)}\n >\n
    \n \n\n {#if attendance.is_host}\n
    \n \n
    \n {/if}\n\n {#if attendance.reason}\n
    \n \n
    \n {/if}\n
    \n\n

    \n \n {@html highlight(attendance.user?.name || '', query)}\n \n

    \n\n {#if attendance.guest_attendances?.length}\n \n + {attendance.guest_attendances.length}\n \n {/if}\n \n\n
    \n {#if attendance.probability}\n ({ parseFloat(attendance.probability.toFixed(2)) }% likely)\n {/if}\n\n
    \n {#if attendance.updated_by_user_id && attendance.updated_by_user_id !== attendance.user_id}\n
    \n
    \n \n
    \n
    \n {/if}\n
    \n\n {#if current_attendance?.is_host}\n
    \n {@render notification_statuses(attendance.notification?.statuses || {})}\n
    \n {/if}\n
    \n
  • \n\n{#snippet notification_statuses(/** @type {import('$lib/types').Notification['statuses']} */ statuses)}\n
    \n \n {@html delivery_text(statuses)}\n \n\n
    \n {#if statuses.error_at}\n \n {:else if statuses.read_at || statuses.device_at}\n \n {:else if statuses.server_at}\n \n {:else if statuses.pending_at}\n \n {:else}\n \n {/if}\n
    \n
    \n{/snippet}\n","\n\n{#if event.is_guest_list_visible || current_attendance?.is_host}\n
    \n \n
    \n{/if}\n\n{#snippet is_host_badge()}\n
    \n \n\n Host\n
    \n{/snippet}\n\n\n \n \n

    Guest list

    \n\n \n {#if attendances.length > 3}\n \n {/if}\n\n
    \n {#each active_states as state}\n {@const scoped_attendances = filtered_attendances.filter(({ status }) => status === state.key).sort(sort_by_probability) }\n {@const count = scoped_attendances.reduce((total, attendance) => total + 1 + (attendance.guest_attendances || []).length, 0)}\n {@const [named, nameless] = arrayPartition(scoped_attendances, ({ user }) => !!user?.name) }\n\n
    \n
    \n \n
    \n\n

    {state.title} ({ count })

    \n
    \n\n
      \n {#each named as attendance}\n active_attendance_index = attendances.findIndex(({ id }) => id === attendance.id)\n }\n />\n {/each}\n\n {#if nameless.length}\n
    • \n
      \n {#each nameless.slice(0, 3) as _ }\n \n {/each}\n
      \n\n \n {#if named.length}\n and { nameless.length } other{ nameless.length === 1 ? '' : 's' }\n {:else}\n { nameless.length } { nameless.length === 1 ? 'person' : 'people' }\n {/if}\n \n
    • \n {/if}\n
    \n {/each}\n\n {#if !filtered_attendances.length}\n
    \n

    We couldn't find anyone with those details.

    \n
    \n {/if}\n
    \n
    \n\n {#if current_attendance?.is_host || event.guests_can_invite}\n {\n modal_open = false\n\n $misc.invite_modal?.show()\n }}\n bind:this={invitation_modal_button}\n class=\"w-full btn btn-primary relative mt-3\"\n >\n Invite people\n\n
    \n i\n
    \n \n {/if}\n
    \n\n {#if active_attendance}\n \n {\n pages?.reset()\n fetch_attendances()\n }}\n ondestroy={() => {\n pages?.reset()\n fetch_attendances()\n active_attendance_index = -1\n }}\n />\n \n\n \n {\n pages?.reset()\n fetch_attendances()\n }}\n />\n \n\n {#if current_attendance?.is_host}\n \n

    Make {active_attendance.user?.name} an event host

    \n\n

    Hosts can invite people, invite others to host, send event updates and change event details. They can also see the names for any contacts you've uploaded.

    \n\n

    We'll send them an invite to host, which they first need to accept.

    \n\n {\n pages?.pop()\n fetch_attendances()\n }}\n >\n Invite to host\n \n
    \n {/if}\n {/if}\n
    \n\n","\n\n
    \n \n \n\n Apple Calendar\n \n\n \n \n\n Microsoft Outlook\n \n\n \n \n\n Google Calendar\n \n
    \n\n","\n\n

    \n Subscribe with your Google Calendar\n

    \n\n\n\n
    \n Do not share this link with anyone.\n
    \n\n
      \n
    • Copy the link above to your clipboard.
    • \n
    • Open Google Calendar on the web (in the mobile app won't work).
    • \n
    • On the left side, choose \"Other calendars + > From URL\".
    • \n
    • Paste the link you copied from above and click \"Add calendar\".
    • \n
    \n","\n\n\n

    \n Add { event.title } to your calendar\n

    \n\n Add to Calendar\n\n
    \n {#if current_user}\n
    Or
    \n\n

    \n Subscribe to your automatically-updated feed of events:\n

    \n\n \n {:else}\n

    \n Sign in\n to subscribe to a feed of your events.\n

    \n {/if}\n
    \n
    \n\n{#if current_user}\n \n \n \n{/if}","class se {\n /**\n * @type {T}\n */\n #t;\n #e = /* @__PURE__ */ new Set();\n /**\n * @param {T} current\n */\n constructor(t) {\n this.#t = t;\n }\n /**\n * @return {T}\n */\n get current() {\n return this.#t;\n }\n /**\n * @param {T} value\n */\n set current(t) {\n this.#t != t && (this.#t = t, this.#e.forEach((n) => n(t)));\n }\n /**\n * @type {import(\"hooks\").Ref[\"on\"]}\n */\n on(t) {\n return this.#e.add(t), () => this.#e.delete(t);\n }\n}\nconst At = (e) => new se(e), nt = Symbol.for(\"atomico.hooks\");\nglobalThis[nt] = globalThis[nt] || {};\nlet O = globalThis[nt];\nconst oe = Symbol.for(\"Atomico.suspense\"), Ft = Symbol.for(\"Atomico.effect\"), re = Symbol.for(\"Atomico.layoutEffect\"), Rt = Symbol.for(\"Atomico.insertionEffect\"), M = (e, t, n) => {\n const { i: s, hooks: r } = O.c, o = r[s] = r[s] || {};\n return o.value = e(o.value), o.effect = t, o.tag = n, O.c.i++, r[s].value;\n}, ae = (e) => M((t = At(e)) => t), _ = () => M((e = At(O.c.host)) => e), $t = () => O.c.update, ce = (e, t, n = 0) => {\n let s = {}, r = !1;\n const o = () => r, a = (l, c) => {\n for (const d in s) {\n const f = s[d];\n f.effect && f.tag === l && (f.value = f.effect(f.value, c));\n }\n };\n return { load: (l) => {\n O.c = { host: t, hooks: s, update: e, i: 0, id: n };\n let c;\n try {\n r = !1, c = l();\n } catch (d) {\n if (d !== oe)\n throw d;\n r = !0;\n } finally {\n O.c = null;\n }\n return c;\n }, cleanEffects: (l) => (a(Rt, l), () => (a(re, l), () => {\n a(Ft, l);\n })), isSuspense: o };\n}, A = Symbol.for;\nfunction It(e, t) {\n const n = e.length;\n if (n !== t.length)\n return !1;\n for (let s = 0; s < n; s++) {\n let r = e[s], o = t[s];\n if (r !== o)\n return !1;\n }\n return !0;\n}\nconst T = (e) => typeof e == \"function\", R = (e) => typeof e == \"object\", { isArray: ie } = Array, st = (e, t) => (t ? e instanceof HTMLStyleElement : !0) && \"hydrate\" in (e?.dataset || {});\nfunction Ut(e, t) {\n let n;\n const s = (r) => {\n let { length: o } = r;\n for (let a = 0; a < o; a++) {\n const u = r[a];\n if (u && Array.isArray(u))\n s(u);\n else {\n const i = typeof u;\n if (u == null || i === \"function\" || i === \"boolean\")\n continue;\n i === \"string\" || i === \"number\" ? (n == null && (n = \"\"), n += u) : (n != null && (t(n), n = null), t(u));\n }\n }\n };\n s(e), n != null && t(n);\n}\nconst Lt = (e, t, n) => (e.addEventListener(t, n), () => e.removeEventListener(t, n));\nclass _t {\n /**\n *\n * @param {HTMLElement} target\n * @param {string} message\n * @param {string} value\n */\n constructor(t, n, s) {\n this.message = n, this.target = t, this.value = s;\n }\n}\nclass jt extends _t {\n}\nclass le extends _t {\n}\nconst x = \"Custom\", ue = null, fe = { true: 1, \"\": 1, 1: 1 };\nfunction de(e, t, n, s, r) {\n const {\n type: o,\n reflect: a,\n event: u,\n value: i,\n attr: l = he(t)\n } = n?.name != x && R(n) && n != ue ? n : { type: n }, c = o?.name === x && o.map, d = i != null ? o == Function || !T(i) ? () => i : i : null;\n Object.defineProperty(e, t, {\n configurable: !0,\n /**\n * @this {import(\"dom\").AtomicoThisInternal}\n * @param {any} newValue\n */\n set(f) {\n const m = this[t];\n d && o != Boolean && f == null && (f = d());\n const { error: E, value: g } = (c ? pe : be)(\n o,\n f\n );\n if (E && g != null)\n throw new jt(\n this,\n `The value defined for prop '${t}' must be of type '${o.name}'`,\n g\n );\n m != g && (this._props[t] = g ?? void 0, this.update(), u && Yt(this, u), this.updated.then(() => {\n a && (this._ignoreAttr = l, me(this, o, l, this[t]), this._ignoreAttr = null);\n }));\n },\n /**\n * @this {import(\"dom\").AtomicoThisInternal}\n */\n get() {\n return this._props[t];\n }\n }), d && (r[t] = d()), s[l] = { prop: t, type: o };\n}\nconst Yt = (e, { type: t, base: n = CustomEvent, ...s }) => e.dispatchEvent(new n(t, s)), he = (e) => e.replace(/([A-Z])/g, \"-$1\").toLowerCase(), me = (e, t, n, s) => s == null || t == Boolean && !s ? e.removeAttribute(n) : e.setAttribute(\n n,\n t?.name === x && t?.serialize ? t?.serialize(s) : R(s) ? JSON.stringify(s) : t == Boolean ? \"\" : s\n), ye = (e, t) => e == Boolean ? !!fe[t] : e == Number ? Number(t) : e == String ? t : e == Array || e == Object ? JSON.parse(t) : e.name == x ? t : (\n // TODO: If when defining reflect the prop can also be of type string?\n new e(t)\n), pe = ({ map: e }, t) => {\n try {\n return { value: e(t), error: !1 };\n } catch {\n return { value: t, error: !0 };\n }\n}, be = (e, t) => e == null || t == null ? { value: t, error: !1 } : e != String && t === \"\" ? { value: void 0, error: !1 } : e == Object || e == Array || e == Symbol ? {\n value: t,\n error: {}.toString.call(t) !== `[object ${e.name}]`\n} : t instanceof e ? {\n value: t,\n error: e == Number && Number.isNaN(t.valueOf())\n} : e == String || e == Number || e == Boolean ? {\n value: t,\n error: e == Number ? typeof t != \"number\" ? !0 : Number.isNaN(t) : e == String ? typeof t != \"string\" : typeof t != \"boolean\"\n} : { value: t, error: !0 };\nlet ge = 0;\nconst ve = (e) => {\n const t = (e?.dataset || {})?.hydrate || \"\";\n return t || \"c\" + ge++;\n}, j = (e, t = HTMLElement) => {\n const n = {}, s = {}, r = \"prototype\" in t && t.prototype instanceof Element, o = r ? t : \"base\" in t ? t.base : HTMLElement, { props: a, styles: u } = r ? e : t;\n class i extends o {\n constructor() {\n super(), this._setup(), this._render = () => e({ ...this._props });\n for (const c in s)\n this[c] = s[c];\n }\n /**\n * @returns {import(\"core\").Sheets[]}\n */\n static get styles() {\n return [super.styles, u];\n }\n async _setup() {\n if (this._props)\n return;\n this._props = {};\n let c, d;\n this.mounted = new Promise(\n (y) => this.mount = () => {\n y(), c != this.parentNode && (d != c ? this.unmounted.then(this.update) : this.update()), c = this.parentNode;\n }\n ), this.unmounted = new Promise(\n (y) => this.unmount = () => {\n y(), (c != this.parentNode || !this.isConnected) && (f.cleanEffects(!0)()(), d = this.parentNode, c = null);\n }\n ), this.symbolId = this.symbolId || Symbol(), this.symbolIdParent = Symbol();\n const f = ce(\n () => this.update(),\n this,\n ve(this)\n );\n let m, E = !0;\n const g = st(this);\n this.update = () => (m || (m = !0, this.updated = (this.updated || this.mounted).then(() => {\n try {\n const y = f.load(this._render), h = f.cleanEffects();\n return y && //@ts-ignore\n y.render(this, this.symbolId, g), m = !1, E && !f.isSuspense() && (E = !1, !g && Ee(this)), h();\n } finally {\n m = !1;\n }\n }).then(\n /**\n * @param {import(\"internal/hooks.js\").CleanUseEffects} [cleanUseEffect]\n */\n (y) => {\n y && y();\n }\n )), this.updated), this.update();\n }\n connectedCallback() {\n this.mount(), super.connectedCallback && super.connectedCallback();\n }\n disconnectedCallback() {\n super.disconnectedCallback && super.disconnectedCallback(), this.unmount();\n }\n /**\n * @this {import(\"dom\").AtomicoThisInternal}\n * @param {string} attr\n * @param {(string|null)} oldValue\n * @param {(string|null)} value\n */\n attributeChangedCallback(c, d, f) {\n if (n[c]) {\n if (c === this._ignoreAttr || d === f)\n return;\n const { prop: m, type: E } = n[c];\n try {\n this[m] = ye(E, f);\n } catch {\n throw new le(\n this,\n `The value defined as attr '${c}' cannot be parsed by type '${E.name}'`,\n f\n );\n }\n } else\n super.attributeChangedCallback(c, d, f);\n }\n static get props() {\n return { ...super.props, ...a };\n }\n static get observedAttributes() {\n const c = super.observedAttributes || [];\n for (const d in a)\n de(this.prototype, d, a[d], n, s);\n return Object.keys(n).concat(c);\n }\n }\n return i;\n};\nfunction Ee(e) {\n const { styles: t } = e.constructor, { shadowRoot: n } = e;\n if (n && t.length) {\n const s = [];\n Ut(t, (r) => {\n r && (r instanceof Element ? n.appendChild(r.cloneNode(!0)) : s.push(r));\n }), s.length && (n.adoptedStyleSheets = s);\n }\n}\nconst Bt = (e) => (t, n) => {\n M(\n /**\n * Clean the effect hook\n * @type {import(\"internal/hooks.js\").CollectorEffect}\n */\n ([s, r] = []) => ((r || !r) && (r && It(r, n) ? s = s || !0 : (T(s) && s(), s = null)), [s, n]),\n /**\n * @returns {any}\n */\n ([s, r], o) => o ? (T(s) && s(), []) : [s || t(), r],\n e\n );\n}, U = Bt(Ft), De = Bt(Rt);\nclass qt extends Array {\n /**\n *\n * @param {any} initialState\n * @param {(nextState: any, state:any[], mount: boolean )=>void} mapState\n */\n constructor(t, n) {\n let s = !0;\n const r = (o) => {\n try {\n n(o, this, s);\n } finally {\n s = !1;\n }\n };\n super(void 0, r, n), r(t);\n }\n /**\n * The following code allows a mutable approach to useState\n * and useProp this with the idea of allowing an alternative\n * approach similar to Vue or Qwik of state management\n * @todo pending review with the community\n */\n // get value() {\n // return this[0];\n // }\n // set value(nextState) {\n // this[2](nextState, this);\n // }\n}\nconst ct = (e) => {\n const t = $t();\n return M(\n (n = new qt(e, (s, r, o) => {\n s = T(s) ? s(r[0]) : s, s !== r[0] && (r[0] = s, o || t());\n })) => n\n );\n}, C = (e, t) => {\n const [n] = M(([s, r, o = 0] = []) => ((!r || r && !It(r, t)) && (s = e()), [s, t, o]));\n return n;\n}, it = (e) => {\n const { current: t } = _();\n if (!(e in t))\n throw new jt(\n t,\n `For useProp(\"${e}\"), the prop does not exist on the host.`,\n e\n );\n return M(\n (n = new qt(t[e], (s, r) => {\n s = T(s) ? s(t[e]) : s, t[e] = s;\n })) => (n[0] = t[e], n)\n );\n}, P = (e, t = {}) => {\n const n = _();\n return n[e] || (n[e] = (s = t.detail) => Yt(n.current, {\n type: e,\n ...t,\n detail: s\n })), n[e];\n}, ot = A(\"atomico/options\");\nglobalThis[ot] = globalThis[ot] || {\n sheet: !!document.adoptedStyleSheets\n};\nconst xt = globalThis[ot], Se = {\n checked: 1,\n value: 1,\n selected: 1\n}, we = {\n list: 1,\n type: 1,\n size: 1,\n form: 1,\n width: 1,\n height: 1,\n src: 1,\n href: 1,\n slot: 1\n}, Te = {\n shadowDom: 1,\n staticNode: 1,\n cloneNode: 1,\n children: 1,\n key: 1\n}, q = {}, rt = [];\nclass at extends Text {\n}\nconst Ce = A(\"atomico/id\"), $ = A(\"atomico/type\"), X = A(\"atomico/ref\"), zt = A(\"atomico/vnode\"), Pe = () => {\n};\nfunction Ne(e, t, n) {\n return Kt(this, e, t, n);\n}\nconst Ht = (e, t, ...n) => {\n const s = t || q;\n let { children: r } = s;\n if (r = r ?? (n.length ? n : rt), e === Pe)\n return r;\n const o = e ? e instanceof Node ? 1 : (\n //@ts-ignore\n e.prototype instanceof HTMLElement && 2\n ) : 0;\n if (o === !1 && e instanceof Function)\n return e(\n r != rt ? { children: r, ...s } : s\n );\n const a = xt.render || Ne;\n return {\n [$]: zt,\n type: e,\n props: s,\n children: r,\n key: s.key,\n // key for lists by keys\n // define if the node declares its shadowDom\n shadow: s.shadowDom,\n // allows renderings to run only once\n static: s.staticNode,\n // defines whether the type is a childNode `1` or a constructor `2`\n raw: o,\n // defines whether to use the second parameter for document.createElement\n is: s.is,\n // clone the node if it comes from a reference\n clone: s.cloneNode,\n render: a\n };\n};\nfunction Kt(e, t, n = Ce, s, r) {\n let o;\n if (t && t[n] && t[n].vnode == e || e[$] != zt)\n return t;\n (e || !t) && (r = r || e.type == \"svg\", o = e.type != \"host\" && (e.raw == 1 ? (t && e.clone ? t[X] : t) != e.type : e.raw == 2 ? !(t instanceof e.type) : t ? t[X] || t.localName != e.type : !t), o && e.type != null && (e.raw == 1 && e.clone ? (s = !0, t = e.type.cloneNode(!0), t[X] = e.type) : t = e.raw == 1 ? e.type : e.raw == 2 ? new e.type() : r ? document.createElementNS(\n \"http://www.w3.org/2000/svg\",\n e.type\n ) : document.createElement(\n e.type,\n e.is ? { is: e.is } : void 0\n )));\n const a = t[n] ? t[n] : q, { vnode: u = q, cycle: i = 0 } = a;\n let { fragment: l, handlers: c } = a;\n const { children: d = rt, props: f = q } = u;\n if (c = o ? {} : c || {}, e.static && !o)\n return t;\n if (e.shadow && !t.shadowRoot && // @ts-ignore\n t.attachShadow({ mode: \"open\", ...e.shadow }), e.props != f && Me(t, f, e.props, c, r), e.children !== d) {\n const m = e.shadow ? t.shadowRoot : t;\n l = Oe(\n e.children,\n /**\n * @todo for hydration use attribute and send childNodes\n */\n l,\n m,\n n,\n // add support to foreignObject, children will escape from svg\n !i && s,\n r && e.type == \"foreignObject\" ? !1 : r\n );\n }\n return t[n] = { vnode: e, handlers: c, fragment: l, cycle: i + 1 }, t;\n}\nfunction ke(e, t) {\n const n = new at(\"\"), s = new at(\"\");\n let r;\n if (e[t ? \"prepend\" : \"append\"](n), t) {\n let { lastElementChild: o } = e;\n for (; o; ) {\n const { previousElementSibling: a } = o;\n if (st(o, !0) && !st(a, !0)) {\n r = o;\n break;\n }\n o = a;\n }\n }\n return r ? r.before(s) : e.append(s), {\n markStart: n,\n markEnd: s\n };\n}\nfunction Oe(e, t, n, s, r, o) {\n e = e == null ? null : ie(e) ? e : [e];\n const a = t || ke(n, r), { markStart: u, markEnd: i, keyes: l } = a;\n let c;\n const d = l && /* @__PURE__ */ new Set();\n let f = u;\n if (e && Ut(e, (m) => {\n if (typeof m == \"object\" && !m[$])\n return;\n const E = m[$] && m.key, g = l && E != null && l.get(E);\n f != i && f === g ? d.delete(f) : f = f == i ? i : f.nextSibling;\n const y = l ? g : f;\n let h = y;\n if (m[$])\n h = Kt(m, y, s, r, o);\n else {\n const S = m + \"\";\n !(h instanceof Text) || h instanceof at ? h = new Text(S) : h.data != S && (h.data = S);\n }\n h != f && (l && d.delete(h), !y || l ? (n.insertBefore(h, f), l && f != i && d.add(f)) : y == i ? n.insertBefore(h, i) : (n.replaceChild(h, y), f = h)), E != null && (c = c || /* @__PURE__ */ new Map(), c.set(E, h));\n }), f = f == i ? i : f.nextSibling, t && f != i)\n for (; f != i; ) {\n const m = f;\n f = f.nextSibling, m.remove();\n }\n return d && d.forEach((m) => m.remove()), a.keyes = c, a;\n}\nfunction Me(e, t, n, s, r) {\n for (const o in t)\n !(o in n) && St(e, o, t[o], null, r, s);\n for (const o in n)\n St(e, o, t[o], n[o], r, s);\n}\nfunction St(e, t, n, s, r, o) {\n if (t = t == \"class\" && !r ? \"className\" : t, n = n ?? null, s = s ?? null, t in e && Se[t] && (n = e[t]), !(s === n || Te[t] || t[0] == \"_\"))\n if (t[0] == \"o\" && t[1] == \"n\" && (T(s) || T(n)))\n Ae(e, t.slice(2), s, o);\n else if (t == \"ref\")\n s && (T(s) ? s(e) : s.current = e);\n else if (t == \"style\") {\n const { style: a } = e;\n n = n || \"\", s = s || \"\";\n const u = R(n), i = R(s);\n if (u)\n for (const l in n)\n if (i)\n !(l in s) && wt(a, l, null);\n else\n break;\n if (i)\n for (const l in s) {\n const c = s[l];\n u && n[l] === c || wt(a, l, c);\n }\n else\n a.cssText = s;\n } else {\n const a = t[0] == \"$\" ? t.slice(1) : t;\n a === t && (!r && !we[t] && t in e || T(s) || T(n)) ? e[t] = s ?? \"\" : s == null ? e.removeAttribute(a) : e.setAttribute(\n a,\n R(s) ? JSON.stringify(s) : s\n );\n }\n}\nfunction Ae(e, t, n, s) {\n if (s.handleEvent || (s.handleEvent = (r) => s[r.type].call(e, r)), n) {\n if (!s[t]) {\n const r = n.capture || n.once || n.passive ? Object.assign({}, n) : null;\n e.addEventListener(t, s, r);\n }\n s[t] = n;\n } else\n s[t] && (e.removeEventListener(t, s), delete s[t]);\n}\nfunction wt(e, t, n) {\n let s = \"setProperty\";\n n == null && (s = \"removeProperty\", n = null), ~t.indexOf(\"-\") ? e[s](t, n) : e[t] = n;\n}\nconst Tt = {};\nfunction H(e, ...t) {\n const n = (e.raw || e).reduce(\n (s, r, o) => s + r + (t[o] || \"\"),\n \"\"\n );\n return Tt[n] = Tt[n] || Fe(n);\n}\nfunction Fe(e) {\n if (xt.sheet) {\n const t = new CSSStyleSheet();\n return t.replaceSync(e), t;\n } else {\n const t = document.createElement(\"style\");\n return t.textContent = e, t;\n }\n}\nconst Re = Ht(\"host\", { style: \"display: contents\" }), G = A(\"atomico/context\"), $e = (e, t) => {\n const n = _();\n De(\n () => Lt(\n n.current,\n \"ConnectContext\",\n /**\n * @param {CustomEvent} event\n */\n (s) => {\n e === s.detail.id && (s.stopPropagation(), s.detail.connect(t));\n }\n ),\n [e]\n );\n}, Ie = (e) => {\n const t = P(\"ConnectContext\", {\n bubbles: !0,\n composed: !0\n }), n = () => {\n let o;\n return t({\n id: e,\n connect(a) {\n o = a;\n }\n }), o;\n }, [s, r] = ct(\n n\n );\n return U(() => {\n s || (e[G] || (e[G] = customElements.whenDefined(\n new e().localName\n )), e[G].then(\n () => r(n)\n ));\n }, [e]), s;\n}, Ue = (e) => {\n const t = Ie(e), n = $t();\n return U(() => {\n if (t)\n return Lt(t, \"UpdatedValue\", n);\n }, [t]), (t || e).value;\n}, Le = (e) => {\n const t = j(\n () => ($e(t, _().current), Re),\n {\n props: {\n value: {\n type: Object,\n event: { type: \"UpdatedValue\" },\n value: () => e\n }\n }\n }\n );\n return t.value = e, t;\n}, p = (e, t, n) => (t == null ? t = { key: n } : t.key = n, Ht(e, t)), I = p, Wt = H`*,*:before,*:after{box-sizing:border-box}button{padding:0;touch-action:manipulation;cursor:pointer;user-select:none}`, Jt = H`.vh{position:absolute;transform:scale(0)}`;\nfunction lt() {\n const e = /* @__PURE__ */ new Date();\n return new v(e.getFullYear(), e.getMonth() + 1, e.getDate());\n}\nfunction ut(e, t = 0) {\n const n = w(e), s = n.getUTCDay(), r = (s < t ? 7 : 0) + s - t;\n return n.setUTCDate(n.getUTCDate() - r), v.from(n);\n}\nfunction Zt(e, t = 0) {\n return ut(e, t).add({ days: 6 });\n}\nfunction Xt(e) {\n return v.from(new Date(Date.UTC(e.year, e.month, 0)));\n}\nfunction K(e, t, n) {\n return t && v.compare(e, t) < 0 ? t : n && v.compare(e, n) > 0 ? n : e;\n}\nconst _e = { days: 1 };\nfunction je(e, t = 0) {\n let n = ut(e.toPlainDate(), t);\n const s = Zt(Xt(e), t), r = [];\n for (; v.compare(n, s) < 0; ) {\n const o = [];\n for (let a = 0; a < 7; a++)\n o.push(n), n = n.add(_e);\n r.push(o);\n }\n return r;\n}\nfunction w(e) {\n return new Date(Date.UTC(e.year, e.month - 1, e.day ?? 1));\n}\nconst Ye = /^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/, Q = (e, t) => e.toString().padStart(t, \"0\");\nclass v {\n constructor(t, n, s) {\n this.year = t, this.month = n, this.day = s;\n }\n // this is an incomplete implementation that only handles arithmetic on a single unit at a time.\n // i didn't want to get into more complex arithmetic since it get tricky fast\n // this is enough to serve my needs and will still be a drop-in replacement when actual Temporal API lands\n add(t) {\n const n = w(this);\n if (\"days\" in t)\n return n.setUTCDate(this.day + t.days), v.from(n);\n let { year: s, month: r } = this;\n \"months\" in t ? (r = this.month + t.months, n.setUTCMonth(r - 1)) : (s = this.year + t.years, n.setUTCFullYear(s));\n const o = v.from(w({ year: s, month: r, day: 1 }));\n return K(v.from(n), o, Xt(o));\n }\n toString() {\n return `${Q(this.year, 4)}-${Q(this.month, 2)}-${Q(this.day, 2)}`;\n }\n toPlainYearMonth() {\n return new W(this.year, this.month);\n }\n equals(t) {\n return v.compare(this, t) === 0;\n }\n static compare(t, n) {\n return t.year < n.year ? -1 : t.year > n.year ? 1 : t.month < n.month ? -1 : t.month > n.month ? 1 : t.day < n.day ? -1 : t.day > n.day ? 1 : 0;\n }\n static from(t) {\n if (typeof t == \"string\") {\n const n = t.match(Ye);\n if (!n)\n throw new TypeError(t);\n const [, s, r, o] = n;\n return new v(\n parseInt(s, 10),\n parseInt(r, 10),\n parseInt(o, 10)\n );\n }\n return new v(\n t.getUTCFullYear(),\n t.getUTCMonth() + 1,\n t.getUTCDate()\n );\n }\n}\nclass W {\n constructor(t, n) {\n this.year = t, this.month = n;\n }\n add(t) {\n const n = w(this), s = (t.months ?? 0) + (t.years ?? 0) * 12;\n return n.setUTCMonth(n.getUTCMonth() + s), new W(n.getUTCFullYear(), n.getUTCMonth() + 1);\n }\n equals(t) {\n return this.year === t.year && this.month === t.month;\n }\n toPlainDate() {\n return new v(this.year, this.month, 1);\n }\n}\nfunction z(e, t) {\n if (t)\n try {\n return e.from(t);\n } catch {\n }\n}\nfunction N(e) {\n const [t, n] = it(e);\n return [C(() => z(v, t), [t]), (o) => n(o?.toString())];\n}\nfunction Be(e) {\n const [t = \"\", n] = it(e);\n return [C(() => {\n const [o, a] = t.split(\"/\"), u = z(v, o), i = z(v, a);\n return u && i ? [u, i] : [];\n }, [t]), (o) => n(`${o[0]}/${o[1]}`)];\n}\nfunction qe(e) {\n const [t = \"\", n] = it(e);\n return [C(() => {\n const o = [];\n for (const a of t.trim().split(/\\s+/)) {\n const u = z(v, a);\n u && o.push(u);\n }\n return o;\n }, [t]), (o) => n(o.join(\" \"))];\n}\nfunction L(e, t) {\n return C(\n () => new Intl.DateTimeFormat(t, { timeZone: \"UTC\", ...e }),\n [t, e]\n );\n}\nfunction Ct(e, t, n) {\n const s = L(e, n);\n return C(() => {\n const r = [], o = /* @__PURE__ */ new Date();\n for (var a = 0; a < 7; a++) {\n const u = (o.getUTCDay() - t + 7) % 7;\n r[u] = s.format(o), o.setUTCDate(o.getUTCDate() + 1);\n }\n return r;\n }, [t, s]);\n}\nconst Pt = (e, t, n) => K(e, t, n) === e, Nt = (e) => e.target.matches(\":dir(ltr)\"), xe = { month: \"long\", day: \"numeric\" }, ze = { month: \"long\" }, He = { weekday: \"long\" }, V = { bubbles: !0 };\nfunction Ke({ props: e, context: t }) {\n const { offset: n } = e, {\n firstDayOfWeek: s,\n isDateDisallowed: r,\n min: o,\n max: a,\n today: u,\n page: i,\n locale: l,\n focusedDate: c,\n formatWeekday: d\n } = t, f = u ?? lt(), m = Ct(He, s, l), E = C(\n () => ({ weekday: d }),\n [d]\n ), g = Ct(E, s, l), y = L(xe, l), h = L(ze, l), S = C(\n () => i.start.add({ months: n }),\n [i, n]\n ), J = C(\n () => je(S, s),\n [S, s]\n ), Gt = P(\"focusday\", V), Qt = P(\"selectday\", V), Vt = P(\"hoverday\", V);\n function pt(b) {\n Gt(K(b, o, a));\n }\n function te(b) {\n let D;\n switch (b.key) {\n case \"ArrowRight\":\n D = c.add({ days: Nt(b) ? 1 : -1 });\n break;\n case \"ArrowLeft\":\n D = c.add({ days: Nt(b) ? -1 : 1 });\n break;\n case \"ArrowDown\":\n D = c.add({ days: 7 });\n break;\n case \"ArrowUp\":\n D = c.add({ days: -7 });\n break;\n case \"PageUp\":\n D = c.add(b.shiftKey ? { years: -1 } : { months: -1 });\n break;\n case \"PageDown\":\n D = c.add(b.shiftKey ? { years: 1 } : { months: 1 });\n break;\n case \"Home\":\n D = ut(c, s);\n break;\n case \"End\":\n D = Zt(c, s);\n break;\n default:\n return;\n }\n pt(D), b.preventDefault();\n }\n function ee(b) {\n const D = S.equals(b);\n if (!t.showOutsideDays && !D)\n return;\n const ne = b.equals(c), bt = b.equals(f), Y = w(b), B = r?.(Y), gt = !Pt(b, o, a);\n let vt = \"\", k;\n if (t.type === \"range\") {\n const [F, Z] = t.value, Et = F?.equals(b), Dt = Z?.equals(b);\n k = F && Z && Pt(b, F, Z), vt = `${Et ? \"range-start\" : \"\"} ${Dt ? \"range-end\" : \"\"} ${k && !Et && !Dt ? \"range-inner\" : \"\"}`;\n } else\n t.type === \"multi\" ? k = t.value.some((F) => F.equals(b)) : k = t.value?.equals(b);\n return {\n part: `${`button day day-${Y.getDay()} ${// we don't want outside days to ever be shown as selected\n D ? k ? \"selected\" : \"\" : \"outside\"} ${B ? \"disallowed\" : \"\"} ${bt ? \"today\" : \"\"} ${t.getDayParts?.(Y) ?? \"\"}`} ${vt}`,\n tabindex: D && ne ? 0 : -1,\n disabled: gt,\n \"aria-disabled\": B ? \"true\" : void 0,\n \"aria-pressed\": D && k,\n \"aria-current\": bt ? \"date\" : void 0,\n \"aria-label\": y.format(Y),\n onkeydown: te,\n onclick() {\n B || Qt(b), pt(b);\n },\n onmouseover() {\n !B && !gt && Vt(b);\n }\n };\n }\n return {\n weeks: J,\n yearMonth: S,\n daysLong: m,\n daysVisible: g,\n formatter: h,\n getDayProps: ee\n };\n}\nconst tt = lt(), ft = Le({\n type: \"date\",\n firstDayOfWeek: 1,\n focusedDate: tt,\n page: { start: tt.toPlainYearMonth(), end: tt.toPlainYearMonth() }\n});\ncustomElements.define(\"calendar-ctx\", ft);\nconst We = (e, t) => (t + e) % 7, Je = j(\n (e) => {\n const t = Ue(ft), n = ae(), s = Ke({ props: e, context: t });\n function r() {\n n.current.querySelector(\"button[tabindex='0']\")?.focus();\n }\n return /* @__PURE__ */ I(\"host\", { shadowDom: !0, focus: r, children: [\n /* @__PURE__ */ p(\"div\", { id: \"h\", part: \"heading\", children: s.formatter.format(w(s.yearMonth)) }),\n /* @__PURE__ */ I(\"table\", { ref: n, \"aria-labelledby\": \"h\", part: \"table\", children: [\n /* @__PURE__ */ p(\"thead\", { children: /* @__PURE__ */ p(\"tr\", { part: \"tr head\", children: s.daysLong.map((o, a) => /* @__PURE__ */ I(\n \"th\",\n {\n part: `th day day-${We(t.firstDayOfWeek, a)}`,\n scope: \"col\",\n children: [\n /* @__PURE__ */ p(\"span\", { class: \"vh\", children: o }),\n /* @__PURE__ */ p(\"span\", { \"aria-hidden\": \"true\", children: s.daysVisible[a] })\n ]\n }\n )) }) }),\n /* @__PURE__ */ p(\"tbody\", { children: s.weeks.map((o, a) => /* @__PURE__ */ p(\"tr\", { part: \"tr week\", children: o.map((u, i) => {\n const l = s.getDayProps(u);\n return /* @__PURE__ */ p(\"td\", { part: \"td\", children: l && /* @__PURE__ */ p(\"button\", { ...l, children: u.day }) }, i);\n }) }, a)) })\n ] })\n ] });\n },\n {\n props: {\n offset: {\n type: Number,\n value: 0\n }\n },\n styles: [\n Wt,\n Jt,\n H`:host{--color-accent: black;--color-text-on-accent: white;display:flex;flex-direction:column;gap:.25rem;text-align:center;inline-size:fit-content}table{border-collapse:collapse;font-size:.875rem}th{font-weight:700;block-size:2.25rem}td{padding-inline:0}button{color:inherit;font-size:inherit;background:transparent;border:0;font-variant-numeric:tabular-nums;block-size:2.25rem;inline-size:2.25rem}button:hover:where(:not(:disabled,[aria-disabled])){background:#0000000d}button:is([aria-pressed=true],:focus-visible){background:var(--color-accent);color:var(--color-text-on-accent)}button:focus-visible{outline:1px solid var(--color-text-on-accent);outline-offset:-2px}button:disabled,:host::part(outside),:host::part(disallowed){cursor:default;opacity:.5}`\n ]\n }\n);\ncustomElements.define(\"calendar-month\", Je);\nfunction kt(e) {\n return /* @__PURE__ */ p(\n \"button\",\n {\n part: `button ${e.name} ${e.onclick ? \"\" : \"disabled\"}`,\n onclick: e.onclick,\n \"aria-disabled\": e.onclick ? null : \"true\",\n children: /* @__PURE__ */ p(\"slot\", { name: e.name, children: e.children })\n }\n );\n}\nfunction dt(e) {\n const t = w(e.page.start), n = w(e.page.end);\n return /* @__PURE__ */ I(\"div\", { role: \"group\", \"aria-labelledby\": \"h\", part: \"container\", children: [\n /* @__PURE__ */ p(\"div\", { id: \"h\", class: \"vh\", \"aria-live\": \"polite\", \"aria-atomic\": \"true\", children: e.formatVerbose.formatRange(t, n) }),\n /* @__PURE__ */ I(\"div\", { part: \"header\", children: [\n /* @__PURE__ */ p(kt, { name: \"previous\", onclick: e.previous, children: \"Previous\" }),\n /* @__PURE__ */ p(\"slot\", { part: \"heading\", name: \"heading\", children: /* @__PURE__ */ p(\"div\", { \"aria-hidden\": \"true\", children: e.format.formatRange(t, n) }) }),\n /* @__PURE__ */ p(kt, { name: \"next\", onclick: e.next, children: \"Next\" })\n ] }),\n /* @__PURE__ */ p(\n ft,\n {\n value: e,\n onselectday: e.onSelect,\n onfocusday: e.onFocus,\n onhoverday: e.onHover,\n children: /* @__PURE__ */ p(\"slot\", {})\n }\n )\n ] });\n}\nconst ht = {\n value: {\n type: String,\n value: \"\"\n },\n min: {\n type: String,\n value: \"\"\n },\n max: {\n type: String,\n value: \"\"\n },\n today: {\n type: String,\n value: \"\"\n },\n isDateDisallowed: {\n type: Function,\n value: (e) => !1\n },\n formatWeekday: {\n type: String,\n value: () => \"narrow\"\n },\n getDayParts: {\n type: Function,\n value: (e) => \"\"\n },\n firstDayOfWeek: {\n type: Number,\n value: () => 1\n },\n showOutsideDays: {\n type: Boolean,\n value: !1\n },\n locale: {\n type: String,\n value: () => {\n }\n },\n months: {\n type: Number,\n value: 1\n },\n focusedDate: {\n type: String,\n value: () => {\n }\n },\n pageBy: {\n type: String,\n value: () => \"months\"\n }\n}, mt = [\n Wt,\n Jt,\n H`:host{display:block;inline-size:fit-content}[role=group]{display:flex;flex-direction:column;gap:1em}:host::part(header){display:flex;align-items:center;justify-content:space-between}:host::part(heading){font-weight:700;font-size:1.25em}button{display:flex;align-items:center;justify-content:center}button[aria-disabled]{cursor:default;opacity:.5}`\n], Ze = { year: \"numeric\" }, Xe = { year: \"numeric\", month: \"long\" };\nfunction et(e, t) {\n return (t.year - e.year) * 12 + t.month - e.month;\n}\nconst Ot = (e, t) => (e = t === 12 ? new W(e.year, 1) : e, {\n start: e,\n end: e.add({ months: t - 1 })\n});\nfunction Ge({\n pageBy: e,\n focusedDate: t,\n months: n,\n max: s,\n min: r,\n goto: o\n}) {\n const a = e === \"single\" ? 1 : n, [u, i] = ct(\n () => Ot(t.toPlainYearMonth(), n)\n ), l = (d) => i(Ot(u.start.add({ months: d }), n)), c = (d) => {\n const f = et(u.start, d.toPlainYearMonth());\n return f >= 0 && f < n;\n };\n return U(() => {\n if (c(t))\n return;\n const d = et(t.toPlainYearMonth(), u.start);\n o(t.add({ months: d }));\n }, [u.start]), U(() => {\n if (c(t))\n return;\n const d = et(u.start, t.toPlainYearMonth());\n l(d === -1 ? -a : d === n ? a : Math.floor(d / n) * n);\n }, [t, a, n]), {\n page: u,\n previous: !r || !c(r) ? () => l(-a) : void 0,\n next: !s || !c(s) ? () => l(a) : void 0\n };\n}\nfunction yt({\n months: e,\n pageBy: t,\n locale: n,\n focusedDate: s,\n setFocusedDate: r\n}) {\n const [o] = N(\"min\"), [a] = N(\"max\"), [u] = N(\"today\"), i = P(\"focusday\"), l = P(\"change\"), c = C(\n () => K(s ?? u ?? lt(), o, a),\n [s, u, o, a]\n );\n function d(h) {\n r(h), i(w(h));\n }\n const { next: f, previous: m, page: E } = Ge({\n pageBy: t,\n focusedDate: c,\n months: e,\n min: o,\n max: a,\n goto: d\n }), g = _();\n function y(h) {\n const S = h?.target ?? \"day\";\n S === \"day\" ? g.current.querySelectorAll(\"calendar-month\").forEach((J) => J.focus(h)) : g.current.shadowRoot.querySelector(`[part~='${S}']`).focus(h);\n }\n return {\n format: L(Ze, n),\n formatVerbose: L(Xe, n),\n page: E,\n focusedDate: c,\n dispatch: l,\n onFocus(h) {\n h.stopPropagation(), d(h.detail), setTimeout(y);\n },\n min: o,\n max: a,\n today: u,\n next: f,\n previous: m,\n focus: y\n };\n}\nconst Qe = j(\n (e) => {\n const [t, n] = N(\"value\"), [s = t, r] = N(\"focusedDate\"), o = yt({\n ...e,\n focusedDate: s,\n setFocusedDate: r\n });\n function a(u) {\n n(u.detail), o.dispatch();\n }\n return /* @__PURE__ */ p(\"host\", { shadowDom: !0, focus: o.focus, children: /* @__PURE__ */ p(\n dt,\n {\n ...e,\n ...o,\n type: \"date\",\n value: t,\n onSelect: a\n }\n ) });\n },\n { props: ht, styles: mt }\n);\ncustomElements.define(\"calendar-date\", Qe);\nconst Mt = (e, t) => v.compare(e, t) < 0 ? [e, t] : [t, e], Ve = j(\n (e) => {\n const [t, n] = Be(\"value\"), [s = t[0], r] = N(\"focusedDate\"), o = yt({\n ...e,\n focusedDate: s,\n setFocusedDate: r\n }), a = P(\"rangestart\"), u = P(\"rangeend\"), [i, l] = N(\n \"tentative\"\n ), [c, d] = ct();\n U(() => d(void 0), [i]);\n function f(y) {\n o.onFocus(y), m(y);\n }\n function m(y) {\n y.stopPropagation(), i && d(y.detail);\n }\n function E(y) {\n const h = y.detail;\n y.stopPropagation(), i ? (n(Mt(i, h)), l(void 0), u(w(h)), o.dispatch()) : (l(h), a(w(h)));\n }\n const g = i ? Mt(i, c ?? i) : t;\n return /* @__PURE__ */ p(\"host\", { shadowDom: !0, focus: o.focus, children: /* @__PURE__ */ p(\n dt,\n {\n ...e,\n ...o,\n type: \"range\",\n value: g,\n onFocus: f,\n onHover: m,\n onSelect: E\n }\n ) });\n },\n {\n props: {\n ...ht,\n tentative: {\n type: String,\n value: \"\"\n }\n },\n styles: mt\n }\n);\ncustomElements.define(\"calendar-range\", Ve);\nconst tn = j(\n (e) => {\n const [t, n] = qe(\"value\"), [s = t[0], r] = N(\"focusedDate\"), o = yt({\n ...e,\n focusedDate: s,\n setFocusedDate: r\n });\n function a(u) {\n const i = [...t], l = t.findIndex((c) => c.equals(u.detail));\n l < 0 ? i.push(u.detail) : i.splice(l, 1), n(i), o.dispatch();\n }\n return /* @__PURE__ */ p(\"host\", { shadowDom: !0, focus: o.focus, children: /* @__PURE__ */ p(\n dt,\n {\n ...e,\n ...o,\n type: \"multi\",\n value: t,\n onSelect: a\n }\n ) });\n },\n { props: ht, styles: mt }\n);\ncustomElements.define(\"calendar-multi\", tn);\nexport {\n Qe as CalendarDate,\n Je as CalendarMonth,\n tn as CalendarMulti,\n Ve as CalendarRange\n};\n","\n\n
    \n
    \n \n\n
    \n \n\n \n\n \n
    \n
    \n\n
    \n
    \n \n\n \n
    \n\n
    \n \n
    \n
    \n\n \n
    \n","export function isFunction(value) {\n return typeof value === \"function\";\n}\nexport function isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nconst CLASS_VALUE_PRIMITIVE_TYPES = [\"string\", \"number\", \"bigint\", \"boolean\"];\nexport function isClassValue(value) {\n // handle primitive types\n if (value === null || value === undefined)\n return true;\n if (CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value))\n return true;\n // handle arrays (ClassArray)\n if (Array.isArray(value))\n return value.every((item) => isClassValue(item));\n // handle objects (ClassDictionary)\n if (typeof value === \"object\") {\n // ensure it's a plain object and not some other object type\n if (Object.getPrototypeOf(value) !== Object.prototype)\n return false;\n return true;\n }\n return false;\n}\nconst ELEMENT_NODE = 1;\nconst DOCUMENT_NODE = 9;\nconst DOCUMENT_FRAGMENT_NODE = 11;\nexport function isHTMLElement(v) {\n return isObject(v) && v.nodeType === ELEMENT_NODE && typeof v.nodeName === \"string\";\n}\nexport function isDocument(v) {\n return isObject(v) && v.nodeType === DOCUMENT_NODE;\n}\nexport function isWindow(v) {\n return isObject(v) && v === v.window;\n}\nexport function getNodeName(node) {\n if (isHTMLElement(node))\n return node.localName || \"\";\n return \"#document\";\n}\nexport function isRootElement(node) {\n return [\"html\", \"body\", \"#document\"].includes(getNodeName(node));\n}\nexport function isNode(v) {\n return isObject(v) && v.nodeType !== undefined;\n}\nexport function isShadowRoot(v) {\n return isNode(v) && v.nodeType === DOCUMENT_FRAGMENT_NODE && \"host\" in v;\n}\n","import { isFunction, isObject } from \"../utils/is.js\";\nconst BoxSymbol = Symbol(\"box\");\nconst isWritableSymbol = Symbol(\"is-writable\");\n/**\n * @returns Whether the value is a Box\n *\n * @see {@link https://runed.dev/docs/functions/box}\n */\nfunction isBox(value) {\n return isObject(value) && BoxSymbol in value;\n}\n/**\n * @returns Whether the value is a WritableBox\n *\n * @see {@link https://runed.dev/docs/functions/box}\n */\nfunction isWritableBox(value) {\n return box.isBox(value) && isWritableSymbol in value;\n}\nexport function box(initialValue) {\n let current = $state(initialValue);\n return {\n [BoxSymbol]: true,\n [isWritableSymbol]: true,\n get current() {\n return current;\n },\n set current(v) {\n current = v;\n }\n };\n}\nfunction boxWith(getter, setter) {\n const derived = $derived.by(getter);\n if (setter) {\n return {\n [BoxSymbol]: true,\n [isWritableSymbol]: true,\n get current() {\n return derived;\n },\n set current(v) {\n setter(v);\n }\n };\n }\n return {\n [BoxSymbol]: true,\n get current() {\n return getter();\n }\n };\n}\nfunction boxFrom(value) {\n if (box.isBox(value))\n return value;\n if (isFunction(value))\n return box.with(value);\n return box(value);\n}\n/**\n * Function that gets an object of boxes, and returns an object of reactive values\n *\n * @example\n * const count = box(0)\n * const flat = box.flatten({ count, double: box.with(() => count.current) })\n * // type of flat is { count: number, readonly double: number }\n *\n * @see {@link https://runed.dev/docs/functions/box}\n */\nfunction boxFlatten(boxes) {\n return Object.entries(boxes).reduce((acc, [key, b]) => {\n if (!box.isBox(b)) {\n return Object.assign(acc, { [key]: b });\n }\n if (box.isWritableBox(b)) {\n Object.defineProperty(acc, key, {\n get() {\n return b.current;\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n set(v) {\n b.current = v;\n }\n });\n }\n else {\n Object.defineProperty(acc, key, {\n get() {\n return b.current;\n }\n });\n }\n return acc;\n }, {});\n}\n/**\n * Function that converts a box to a readonly box.\n *\n * @example\n * const count = box(0) // WritableBox\n * const countReadonly = box.readonly(count) // ReadableBox\n *\n * @see {@link https://runed.dev/docs/functions/box}\n */\nfunction toReadonlyBox(b) {\n if (!box.isWritableBox(b))\n return b;\n return {\n [BoxSymbol]: true,\n get current() {\n return b.current;\n }\n };\n}\nbox.from = boxFrom;\nbox.with = boxWith;\nbox.flatten = boxFlatten;\nbox.readonly = toReadonlyBox;\nbox.isBox = isBox;\nbox.isWritableBox = isWritableBox;\n","/**\n * Composes event handlers into a single function that can be called with an event.\n * If the previous handler cancels the event using `event.preventDefault()`, the handlers\n * that follow will not be called.\n */\nexport function composeHandlers(...handlers) {\n return function (e) {\n for (const handler of handlers) {\n if (!handler)\n continue;\n if (e.defaultPrevented)\n return;\n if (typeof handler === \"function\") {\n handler.call(this, e);\n }\n else {\n handler.current?.call(this, e);\n }\n }\n };\n}\n","// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nmodule.exports = function (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n var errorsList = [];\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n var decls = [];\n\n comments(decls);\n\n // declarations\n var decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n return decls;\n }\n\n whitespace();\n return declarations();\n};\n\n/**\n * Trim `str`.\n *\n * @param {String} str\n * @return {String}\n */\nfunction trim(str) {\n return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;\n}\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = StyleToObject;\nvar inline_style_parser_1 = __importDefault(require(\"inline-style-parser\"));\n/**\n * Parses inline style to object.\n *\n * @param style - Inline style.\n * @param iterator - Iterator.\n * @returns - Style object or null.\n *\n * @example Parsing inline style to object:\n *\n * ```js\n * import parse from 'style-to-object';\n * parse('line-height: 42;'); // { 'line-height': '42' }\n * ```\n */\nfunction StyleToObject(style, iterator) {\n var styleObject = null;\n if (!style || typeof style !== 'string') {\n return styleObject;\n }\n var declarations = (0, inline_style_parser_1.default)(style);\n var hasIterator = typeof iterator === 'function';\n declarations.forEach(function (declaration) {\n if (declaration.type !== 'declaration') {\n return;\n }\n var property = declaration.property, value = declaration.value;\n if (hasIterator) {\n iterator(property, value, declaration);\n }\n else if (value) {\n styleObject = styleObject || {};\n styleObject[property] = value;\n }\n });\n return styleObject;\n}\n//# sourceMappingURL=index.js.map","import StyleToObject from '../cjs/index.js';\n\n// ensure compatibility with rollup umd build\nexport default StyleToObject.default || StyleToObject;\n","const NUMBER_CHAR_RE = /\\d/;\nconst STR_SPLITTERS = [\"-\", \"_\", \"/\", \".\"];\nfunction isUppercase(char = \"\") {\n if (NUMBER_CHAR_RE.test(char))\n return undefined;\n return char !== char.toLowerCase();\n}\nfunction splitByCase(str) {\n const parts = [];\n let buff = \"\";\n let previousUpper;\n let previousSplitter;\n for (const char of str) {\n // Splitter\n const isSplitter = STR_SPLITTERS.includes(char);\n if (isSplitter === true) {\n parts.push(buff);\n buff = \"\";\n previousUpper = undefined;\n continue;\n }\n const isUpper = isUppercase(char);\n if (previousSplitter === false) {\n // Case rising edge\n if (previousUpper === false && isUpper === true) {\n parts.push(buff);\n buff = char;\n previousUpper = isUpper;\n continue;\n }\n // Case falling edge\n if (previousUpper === true && isUpper === false && buff.length > 1) {\n const lastChar = buff.at(-1);\n parts.push(buff.slice(0, Math.max(0, buff.length - 1)));\n buff = lastChar + char;\n previousUpper = isUpper;\n continue;\n }\n }\n // Normal char\n buff += char;\n previousUpper = isUpper;\n previousSplitter = isSplitter;\n }\n parts.push(buff);\n return parts;\n}\nexport function pascalCase(str) {\n if (!str)\n return \"\";\n return splitByCase(str)\n .map((p) => upperFirst(p))\n .join(\"\");\n}\nexport function camelCase(str) {\n return lowerFirst(pascalCase(str || \"\"));\n}\nexport function kebabCase(str) {\n return str\n ? splitByCase(str)\n .map((p) => p.toLowerCase())\n .join(\"-\")\n : \"\";\n}\nfunction upperFirst(str) {\n return str ? str[0].toUpperCase() + str.slice(1) : \"\";\n}\nfunction lowerFirst(str) {\n return str ? str[0].toLowerCase() + str.slice(1) : \"\";\n}\n","import parse from \"style-to-object\";\nimport { camelCase, pascalCase } from \"./strings.js\";\nexport function cssToStyleObj(css) {\n if (!css)\n return {};\n const styleObj = {};\n function iterator(name, value) {\n if (name.startsWith(\"-moz-\") ||\n name.startsWith(\"-webkit-\") ||\n name.startsWith(\"-ms-\") ||\n name.startsWith(\"-o-\")) {\n styleObj[pascalCase(name)] = value;\n return;\n }\n if (name.startsWith(\"--\")) {\n styleObj[name] = value;\n return;\n }\n styleObj[camelCase(name)] = value;\n }\n parse(css, iterator);\n return styleObj;\n}\n","/**\n * Executes an array of callback functions with the same arguments.\n * @template T The types of the arguments that the callback functions take.\n * @param callbacks array of callback functions to execute.\n * @returns A new function that executes all of the original callback functions with the same arguments.\n */\nexport function executeCallbacks(...callbacks) {\n return (...args) => {\n for (const callback of callbacks) {\n if (typeof callback === \"function\") {\n callback(...args);\n }\n }\n };\n}\n","function createParser(matcher, replacer) {\n const regex = RegExp(matcher, \"g\");\n return (str) => {\n // throw an error if not a string\n if (typeof str !== \"string\") {\n throw new TypeError(`expected an argument of type string, but got ${typeof str}`);\n }\n // if no match between string and matcher\n if (!str.match(regex))\n return str;\n // executes the replacer function for each match\n return str.replace(regex, replacer);\n };\n}\nconst camelToKebab = createParser(/[A-Z]/, (match) => `-${match.toLowerCase()}`);\nexport function styleToCSS(styleObj) {\n if (!styleObj || typeof styleObj !== \"object\" || Array.isArray(styleObj)) {\n throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);\n }\n return Object.keys(styleObj)\n .map((property) => `${camelToKebab(property)}: ${styleObj[property]};`)\n .join(\"\\n\");\n}\n","import { styleToCSS } from \"./style-to-css.js\";\nexport function styleToString(style = {}) {\n return styleToCSS(style).replace(\"\\n\", \" \");\n}\nexport const srOnlyStyles = {\n position: \"absolute\",\n width: \"1px\",\n height: \"1px\",\n padding: \"0\",\n margin: \"-1px\",\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n borderWidth: \"0\",\n transform: \"translateX(-100%)\"\n};\nexport const srOnlyStylesString = styleToString(srOnlyStyles);\n","/**\n * Modified from https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/utils/src/mergeProps.ts (see NOTICE.txt for source)\n */\nimport { clsx } from \"clsx\";\nimport { composeHandlers } from \"./compose-handlers.js\";\nimport { cssToStyleObj } from \"./css-to-style-obj.js\";\nimport { isClassValue } from \"./is.js\";\nimport { executeCallbacks } from \"./execute-callbacks.js\";\nimport { styleToString } from \"./style.js\";\nfunction isEventHandler(key) {\n // we check if the 3rd character is uppercase to avoid merging our own\n // custom callbacks like `onValueChange` and strictly merge native event handlers\n return key.length > 2 && key.startsWith(\"on\") && key[2] === key[2]?.toLowerCase();\n}\n/**\n * Given a list of prop objects, merges them into a single object.\n * - Automatically composes event handlers (e.g. `onclick`, `oninput`, etc.)\n * - Chains regular functions with the same name so they are called in order\n * - Merges class strings with `clsx`\n * - Merges style objects and converts them to strings\n * - Handles a bug with Svelte where setting the `hidden` attribute to `false` doesn't remove it\n * - Overrides other values with the last one\n */\nexport function mergeProps(...args) {\n const result = { ...args[0] };\n for (let i = 1; i < args.length; i++) {\n const props = args[i];\n for (const key in props) {\n const a = result[key];\n const b = props[key];\n const aIsFunction = typeof a === \"function\";\n const bIsFunction = typeof b === \"function\";\n // compose event handlers\n if (aIsFunction && typeof bIsFunction && isEventHandler(key)) {\n // handle merging of event handlers\n const aHandler = a;\n const bHandler = b;\n result[key] = composeHandlers(aHandler, bHandler);\n }\n else if (aIsFunction && bIsFunction) {\n // chain non-event handler functions\n result[key] = executeCallbacks(a, b);\n }\n else if (key === \"class\") {\n // handle merging acceptable class values from clsx\n const aIsClassValue = isClassValue(a);\n const bIsClassValue = isClassValue(b);\n if (aIsClassValue && bIsClassValue) {\n result[key] = clsx(a, b);\n }\n else if (aIsClassValue) {\n result[key] = clsx(a);\n }\n else if (bIsClassValue) {\n result[key] = clsx(b);\n }\n }\n else if (key === \"style\") {\n const aIsObject = typeof a === \"object\";\n const bIsObject = typeof b === \"object\";\n const aIsString = typeof a === \"string\";\n const bIsString = typeof b === \"string\";\n if (aIsObject && bIsObject) {\n // both are style objects, merge them\n result[key] = { ...a, ...b };\n }\n else if (aIsObject && bIsString) {\n // a is style object, b is string, convert b to style object and merge\n const parsedStyle = cssToStyleObj(b);\n result[key] = { ...a, ...parsedStyle };\n }\n else if (aIsString && bIsObject) {\n // a is string, b is style object, convert a to style object and merge\n const parsedStyle = cssToStyleObj(a);\n result[key] = { ...parsedStyle, ...b };\n }\n else if (aIsString && bIsString) {\n // both are strings, convert both to objects and merge\n const parsedStyleA = cssToStyleObj(a);\n const parsedStyleB = cssToStyleObj(b);\n result[key] = { ...parsedStyleA, ...parsedStyleB };\n }\n else if (aIsObject) {\n result[key] = a;\n }\n else if (bIsObject) {\n result[key] = b;\n }\n else if (aIsString) {\n result[key] = a;\n }\n else if (bIsString) {\n result[key] = b;\n }\n }\n else {\n // override other values\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n // convert style object to string\n if (typeof result.style === \"object\") {\n result.style = styleToString(result.style).replaceAll(\"\\n\", \" \");\n }\n // handle weird svelte bug where `hidden` is not removed when set to `false`\n if (result.hidden !== true) {\n result.hidden = undefined;\n delete result.hidden;\n }\n // handle weird svelte bug where `disabled` is not removed when set to `false`\n if (result.disabled !== true) {\n result.disabled = undefined;\n delete result.disabled;\n }\n return result;\n}\n","import { BROWSER } from \"esm-env\";\nexport const defaultWindow = BROWSER && typeof window !== \"undefined\" ? window : undefined;\nexport const defaultDocument = BROWSER && typeof window !== \"undefined\" ? window.document : undefined;\nexport const defaultNavigator = BROWSER && typeof window !== \"undefined\" ? window.navigator : undefined;\nexport const defaultLocation = BROWSER && typeof window !== \"undefined\" ? window.location : undefined;\n","import { defaultDocument } from \"../configurable-globals.js\";\n/**\n * Handles getting the active element in a document or shadow root.\n * If the active element is within a shadow root, it will traverse the shadow root\n * to find the active element.\n * If not, it will return the active element in the document.\n *\n * @param document A document or shadow root to get the active element from.\n * @returns The active element in the document or shadow root.\n */\nexport function getActiveElement(document) {\n let activeElement = document.activeElement;\n while (activeElement?.shadowRoot) {\n const node = activeElement.shadowRoot.activeElement;\n if (node === activeElement)\n break;\n else\n activeElement = node;\n }\n return activeElement;\n}\n/**\n * Returns the owner document of a given element.\n *\n * @param node The element to get the owner document from.\n * @returns\n */\nexport function getOwnerDocument(node, fallback = defaultDocument) {\n return node?.ownerDocument ?? fallback;\n}\n/**\n * Checks if an element is or is contained by another element.\n *\n * @param node The element to check if it or its descendants contain the target element.\n * @param target The element to check if it is contained by the node.\n * @returns\n */\nexport function isOrContainsTarget(node, target) {\n return node === target || node.contains(target);\n}\n","/** @import { Source } from '#client' */\nimport { DEV } from 'esm-env';\nimport { set, source } from '../internal/client/reactivity/sources.js';\nimport { get } from '../internal/client/runtime.js';\nimport { increment } from './utils.js';\n\n/**\n * @template K\n * @template V\n * @extends {Map}\n */\nexport class SvelteMap extends Map {\n\t/** @type {Map>} */\n\t#sources = new Map();\n\t#version = source(0);\n\t#size = source(0);\n\n\t/**\n\t * @param {Iterable | null | undefined} [value]\n\t */\n\tconstructor(value) {\n\t\tsuper();\n\n\t\t// If the value is invalid then the native exception will fire here\n\t\tif (DEV) value = new Map(value);\n\n\t\tif (value) {\n\t\t\tfor (var [key, v] of value) {\n\t\t\t\tsuper.set(key, v);\n\t\t\t}\n\t\t\tthis.#size.v = super.size;\n\t\t}\n\t}\n\n\t/** @param {K} key */\n\thas(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tvar ret = super.get(key);\n\t\t\tif (ret !== undefined) {\n\t\t\t\ts = source(0);\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn true;\n\t}\n\n\t/**\n\t * @param {(value: V, key: K, map: Map) => void} callbackfn\n\t * @param {any} [this_arg]\n\t */\n\tforEach(callbackfn, this_arg) {\n\t\tthis.#read_all();\n\t\tsuper.forEach(callbackfn, this_arg);\n\t}\n\n\t/** @param {K} key */\n\tget(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\n\t\tif (s === undefined) {\n\t\t\tvar ret = super.get(key);\n\t\t\tif (ret !== undefined) {\n\t\t\t\ts = source(0);\n\t\t\t\tsources.set(key, s);\n\t\t\t} else {\n\t\t\t\t// We should always track the version in case\n\t\t\t\t// the Set ever gets this value in the future.\n\t\t\t\tget(this.#version);\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}\n\n\t\tget(s);\n\t\treturn super.get(key);\n\t}\n\n\t/**\n\t * @param {K} key\n\t * @param {V} value\n\t * */\n\tset(key, value) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar prev_res = super.get(key);\n\t\tvar res = super.set(key, value);\n\t\tvar version = this.#version;\n\n\t\tif (s === undefined) {\n\t\t\tsources.set(key, source(0));\n\t\t\tset(this.#size, super.size);\n\t\t\tincrement(version);\n\t\t} else if (prev_res !== value) {\n\t\t\tincrement(s);\n\n\t\t\t// if not every reaction of s is a reaction of version we need to also include version\n\t\t\tvar v_reactions = version.reactions === null ? null : new Set(version.reactions);\n\t\t\tvar needs_version_increase =\n\t\t\t\tv_reactions === null ||\n\t\t\t\t!s.reactions?.every((r) =>\n\t\t\t\t\t/** @type {NonNullable} */ (v_reactions).has(r)\n\t\t\t\t);\n\t\t\tif (needs_version_increase) {\n\t\t\t\tincrement(version);\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/** @param {K} key */\n\tdelete(key) {\n\t\tvar sources = this.#sources;\n\t\tvar s = sources.get(key);\n\t\tvar res = super.delete(key);\n\n\t\tif (s !== undefined) {\n\t\t\tsources.delete(key);\n\t\t\tset(this.#size, super.size);\n\t\t\tset(s, -1);\n\t\t\tincrement(this.#version);\n\t\t}\n\n\t\treturn res;\n\t}\n\n\tclear() {\n\t\tif (super.size === 0) {\n\t\t\treturn;\n\t\t}\n\t\t// Clear first, so we get nice console.log outputs with $inspect\n\t\tsuper.clear();\n\t\tvar sources = this.#sources;\n\t\tset(this.#size, 0);\n\t\tfor (var s of sources.values()) {\n\t\t\tset(s, -1);\n\t\t}\n\t\tincrement(this.#version);\n\t\tsources.clear();\n\t}\n\n\t#read_all() {\n\t\tget(this.#version);\n\n\t\tvar sources = this.#sources;\n\t\tif (this.#size.v !== sources.size) {\n\t\t\tfor (var key of super.keys()) {\n\t\t\t\tif (!sources.has(key)) {\n\t\t\t\t\tsources.set(key, source(0));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (var [, s] of this.#sources) {\n\t\t\tget(s);\n\t\t}\n\t}\n\n\tkeys() {\n\t\tget(this.#version);\n\t\treturn super.keys();\n\t}\n\n\tvalues() {\n\t\tthis.#read_all();\n\t\treturn super.values();\n\t}\n\n\tentries() {\n\t\tthis.#read_all();\n\t\treturn super.entries();\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn this.entries();\n\t}\n\n\tget size() {\n\t\tget(this.#size);\n\t\treturn super.size;\n\t}\n}\n","import { defaultWindow, } from \"../../internal/configurable-globals.js\";\nimport { getActiveElement } from \"../../internal/utils/dom.js\";\nimport { on } from \"svelte/events\";\nimport { createSubscriber } from \"svelte/reactivity\";\nexport class ActiveElement {\n #document;\n #subscribe;\n constructor(options = {}) {\n const { window = defaultWindow, document = window?.document } = options;\n if (window === undefined)\n return;\n this.#document = document;\n this.#subscribe = createSubscriber((update) => {\n const cleanupFocusIn = on(window, \"focusin\", update);\n const cleanupFocusOut = on(window, \"focusout\", update);\n return () => {\n cleanupFocusIn();\n cleanupFocusOut();\n };\n });\n }\n get current() {\n this.#subscribe?.();\n if (!this.#document)\n return null;\n return getActiveElement(this.#document);\n }\n}\n/**\n * An object holding a reactive value that is equal to `document.activeElement`.\n * It automatically listens for changes, keeping the reference up to date.\n *\n * If you wish to use a custom document or shadowRoot, you should use\n * [useActiveElement](https://runed.dev/docs/utilities/active-element) instead.\n *\n * @see {@link https://runed.dev/docs/utilities/active-element}\n */\nexport const activeElement = new ActiveElement();\n","export function isFunction(value) {\n return typeof value === \"function\";\n}\nexport function isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nexport function isElement(value) {\n return value instanceof Element;\n}\n","import { untrack } from \"svelte\";\nfunction runEffect(flush, effect) {\n switch (flush) {\n case \"post\":\n $effect(effect);\n break;\n case \"pre\":\n $effect.pre(effect);\n break;\n }\n}\nfunction runWatcher(sources, flush, effect, options = {}) {\n const { lazy = false } = options;\n // Run the effect immediately if `lazy` is `false`.\n let active = !lazy;\n // On the first run, if the dependencies are an array, pass an empty array\n // to the previous value instead of `undefined` to allow destructuring.\n //\n // watch(() => [a, b], ([a, b], [prevA, prevB]) => { ... });\n let previousValues = Array.isArray(sources)\n ? []\n : undefined;\n runEffect(flush, () => {\n const values = Array.isArray(sources) ? sources.map((source) => source()) : sources();\n if (!active) {\n active = true;\n previousValues = values;\n return;\n }\n const cleanup = untrack(() => effect(values, previousValues));\n previousValues = values;\n return cleanup;\n });\n}\nfunction runWatcherOnce(sources, flush, effect) {\n const cleanupRoot = $effect.root(() => {\n let stop = false;\n runWatcher(sources, flush, (values, previousValues) => {\n if (stop) {\n cleanupRoot();\n return;\n }\n // Since `lazy` is `true`, `previousValues` is always defined.\n const cleanup = effect(values, previousValues);\n stop = true;\n return cleanup;\n }, \n // Running the effect immediately just once makes no sense at all.\n // That's just `onMount` with extra steps.\n { lazy: true });\n });\n $effect(() => {\n return cleanupRoot;\n });\n}\nexport function watch(sources, effect, options) {\n runWatcher(sources, \"post\", effect, options);\n}\nfunction watchPre(sources, effect, options) {\n runWatcher(sources, \"pre\", effect, options);\n}\nwatch.pre = watchPre;\nexport function watchOnce(source, effect) {\n runWatcherOnce(source, \"post\", effect);\n}\nfunction watchOncePre(source, effect) {\n runWatcherOnce(source, \"pre\", effect);\n}\nwatchOnce.pre = watchOncePre;\n","import { isFunction } from \"./is.js\";\nexport function get(value) {\n if (isFunction(value)) {\n return value();\n }\n return value;\n}\n","import { defaultWindow } from \"../../internal/configurable-globals.js\";\nimport { get } from \"../../internal/utils/get.js\";\n/**\n * Returns a reactive value holding the size of `node`.\n *\n * Accepts an `options` object with the following properties:\n * - `initialSize`: The initial size of the element. Defaults to `{ width: 0, height: 0 }`.\n * - `box`: The box model to use. Can be either `\"content-box\"` or `\"border-box\"`. Defaults to `\"border-box\"`.\n *\n * @returns an object with `width` and `height` properties.\n *\n * @see {@link https://runed.dev/docs/utilities/element-size}\n */\nexport class ElementSize {\n #size = $state({\n width: 0,\n height: 0,\n });\n constructor(node, options = { box: \"border-box\" }) {\n const window = options.window ?? defaultWindow;\n this.#size = {\n width: options.initialSize?.width ?? 0,\n height: options.initialSize?.height ?? 0,\n };\n $effect(() => {\n if (!window)\n return;\n const node$ = get(node);\n if (!node$)\n return;\n const observer = new window.ResizeObserver((entries) => {\n for (const entry of entries) {\n const boxSize = options.box === \"content-box\" ? entry.contentBoxSize : entry.borderBoxSize;\n const boxSizeArr = Array.isArray(boxSize) ? boxSize : [boxSize];\n this.#size.width = boxSizeArr.reduce((acc, size) => Math.max(acc, size.inlineSize), 0);\n this.#size.height = boxSizeArr.reduce((acc, size) => Math.max(acc, size.blockSize), 0);\n }\n });\n observer.observe(node$);\n return () => {\n observer.disconnect();\n };\n });\n }\n get current() {\n return this.#size;\n }\n get width() {\n return this.#size.width;\n }\n get height() {\n return this.#size.height;\n }\n}\n","/**\n * Holds the previous value of a getter.\n *\n * @see {@link https://runed.dev/docs/utilities/previous}\n */\nexport class Previous {\n #previous = $state(undefined);\n #curr;\n constructor(getter) {\n $effect(() => {\n this.#previous = this.#curr;\n this.#curr = getter();\n });\n }\n get current() {\n return this.#previous;\n }\n}\n","import { getContext, hasContext, setContext } from \"svelte\";\nexport class Context {\n #name;\n #key;\n /**\n * @param name The name of the context.\n * This is used for generating the context key and error messages.\n */\n constructor(name) {\n this.#name = name;\n this.#key = Symbol(name);\n }\n /**\n * The key used to get and set the context.\n *\n * It is not recommended to use this value directly.\n * Instead, use the methods provided by this class.\n */\n get key() {\n return this.#key;\n }\n /**\n * Checks whether this has been set in the context of a parent component.\n *\n * Must be called during component initialisation.\n */\n exists() {\n return hasContext(this.#key);\n }\n /**\n * Retrieves the context that belongs to the closest parent component.\n *\n * Must be called during component initialisation.\n *\n * @throws An error if the context does not exist.\n */\n get() {\n const context = getContext(this.#key);\n if (context === undefined) {\n throw new Error(`Context \"${this.#name}\" not found`);\n }\n return context;\n }\n /**\n * Retrieves the context that belongs to the closest parent component,\n * or the given fallback value if the context does not exist.\n *\n * Must be called during component initialisation.\n */\n getOr(fallback) {\n const context = getContext(this.#key);\n if (context === undefined) {\n return fallback;\n }\n return context;\n }\n /**\n * Associates the given value with the current component and returns it.\n *\n * Must be called during component initialisation.\n */\n set(context) {\n return setContext(this.#key, context);\n }\n}\n","export function onDestroyEffect(fn) {\n $effect(() => {\n return () => {\n fn();\n };\n });\n}\n","import { watch } from \"runed\";\nimport { onDestroyEffect } from \"./on-destroy-effect.svelte.js\";\n/**\n * Finds the node with that ID and sets it to the boxed node.\n * Reactive using `$effect` to ensure when the ID or deps change,\n * an update is triggered and new node is found.\n */\nexport function useRefById({ id, ref, deps = () => true, onRefChange, getRootNode }) {\n watch([() => id.current, deps], ([_id]) => {\n const rootNode = getRootNode?.() ?? document;\n const node = rootNode?.getElementById(_id);\n if (node)\n ref.current = node;\n else\n ref.current = null;\n onRefChange?.(ref.current);\n });\n onDestroyEffect(() => {\n ref.current = null;\n onRefChange?.(null);\n });\n}\n","/**\n * A utility function that executes a callback after a specified number of milliseconds.\n */\nexport function afterSleep(ms, cb) {\n return setTimeout(cb, ms);\n}\n","import { tick } from \"svelte\";\nexport function afterTick(fn) {\n tick().then(fn);\n}\n","import { untrack } from \"svelte\";\nexport function onMountEffect(fn) {\n $effect(() => {\n const cleanup = untrack(() => fn());\n return cleanup;\n });\n}\n","export function getDataOpenClosed(condition) {\n return condition ? \"open\" : \"closed\";\n}\nexport function getDataChecked(condition) {\n return condition ? \"checked\" : \"unchecked\";\n}\nexport function getAriaDisabled(condition) {\n return condition ? \"true\" : \"false\";\n}\nexport function getAriaReadonly(condition) {\n return condition ? \"true\" : \"false\";\n}\nexport function getAriaExpanded(condition) {\n return condition ? \"true\" : \"false\";\n}\nexport function getDataDisabled(condition) {\n return condition ? \"\" : undefined;\n}\nexport function getAriaRequired(condition) {\n return condition ? \"true\" : \"false\";\n}\nexport function getAriaSelected(condition) {\n return condition ? \"true\" : \"false\";\n}\nexport function getAriaChecked(checked, indeterminate) {\n if (indeterminate) {\n return \"mixed\";\n }\n return checked ? \"true\" : \"false\";\n}\nexport function getAriaOrientation(orientation) {\n return orientation;\n}\nexport function getAriaHidden(condition) {\n return condition ? \"true\" : undefined;\n}\nexport function getAriaInvalid(condition) {\n return condition ? \"true\" : undefined;\n}\nexport function getDataOrientation(orientation) {\n return orientation;\n}\nexport function getDataInvalid(condition) {\n return condition ? \"\" : undefined;\n}\nexport function getDataRequired(condition) {\n return condition ? \"\" : undefined;\n}\nexport function getDataReadonly(condition) {\n return condition ? \"\" : undefined;\n}\nexport function getDataSelected(condition) {\n return condition ? \"\" : undefined;\n}\nexport function getDataUnavailable(condition) {\n return condition ? \"\" : undefined;\n}\nexport function getHidden(condition) {\n return condition ? true : undefined;\n}\nexport function getDisabled(condition) {\n return condition ? true : undefined;\n}\nexport function getAriaPressed(condition) {\n return condition ? \"true\" : \"false\";\n}\nexport function getRequired(condition) {\n return condition ? true : undefined;\n}\n","export const ALT = \"Alt\";\nexport const ARROW_DOWN = \"ArrowDown\";\nexport const ARROW_LEFT = \"ArrowLeft\";\nexport const ARROW_RIGHT = \"ArrowRight\";\nexport const ARROW_UP = \"ArrowUp\";\nexport const BACKSPACE = \"Backspace\";\nexport const CAPS_LOCK = \"CapsLock\";\nexport const CONTROL = \"Control\";\nexport const DELETE = \"Delete\";\nexport const END = \"End\";\nexport const ENTER = \"Enter\";\nexport const ESCAPE = \"Escape\";\nexport const F1 = \"F1\";\nexport const F10 = \"F10\";\nexport const F11 = \"F11\";\nexport const F12 = \"F12\";\nexport const F2 = \"F2\";\nexport const F3 = \"F3\";\nexport const F4 = \"F4\";\nexport const F5 = \"F5\";\nexport const F6 = \"F6\";\nexport const F7 = \"F7\";\nexport const F8 = \"F8\";\nexport const F9 = \"F9\";\nexport const HOME = \"Home\";\nexport const META = \"Meta\";\nexport const PAGE_DOWN = \"PageDown\";\nexport const PAGE_UP = \"PageUp\";\nexport const SHIFT = \"Shift\";\nexport const SPACE = \" \";\nexport const TAB = \"Tab\";\nexport const CTRL = \"Control\";\nexport const ASTERISK = \"*\";\nexport const a = \"a\";\nexport const P = \"P\";\nexport const A = \"A\";\nexport const p = \"p\";\nexport const n = \"n\";\nexport const j = \"j\";\nexport const k = \"k\";\n","export const isBrowser = typeof document !== \"undefined\";\nexport const isIOS = getIsIOS();\nfunction getIsIOS() {\n return (isBrowser &&\n window?.navigator?.userAgent &&\n (/iP(ad|hone|od)/.test(window.navigator.userAgent) ||\n // The new iPad Pro Gen3 does not identify itself as iPad, but as Macintosh.\n (window?.navigator?.maxTouchPoints > 2 &&\n /iPad|Macintosh/.test(window?.navigator.userAgent))));\n}\nexport function isFunction(value) {\n return typeof value === \"function\";\n}\nexport function isHTMLElement(element) {\n return element instanceof HTMLElement;\n}\nexport function isElement(element) {\n return element instanceof Element;\n}\nexport function isElementOrSVGElement(element) {\n return element instanceof Element || element instanceof SVGElement;\n}\nexport function isNumberString(value) {\n return !Number.isNaN(Number(value)) && !Number.isNaN(Number.parseFloat(value));\n}\nexport function isNull(value) {\n return value === null;\n}\nexport function isTouch(e) {\n return e.pointerType === \"touch\";\n}\nexport function isFocusVisible(element) {\n return element.matches(\":focus-visible\");\n}\nexport function isNotNull(value) {\n return value !== null;\n}\n/**\n * Determines if the provided object is a valid `HTMLInputElement` with\n * a `select` method available.\n */\nexport function isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\n/**\n * Given a node, determine if it is hidden by walking up the\n * DOM tree until we hit the `stopAt` node (exclusive), if provided)\n * otherwise we stop at the document root.\n */\nexport function isElementHidden(node, stopAt) {\n if (getComputedStyle(node).visibility === \"hidden\")\n return true;\n while (node) {\n // we stop at `upTo` (excluding it)\n if (stopAt !== undefined && node === stopAt)\n return false;\n if (getComputedStyle(node).display === \"none\")\n return true;\n node = node.parentElement;\n }\n return false;\n}\n","globalThis.bitsIdCounter ??= { current: 0 };\n/**\n * Generates a unique ID based on a global counter.\n */\nexport function useId(prefix = \"bits\") {\n globalThis.bitsIdCounter.current++;\n return `${prefix}-${globalThis.bitsIdCounter.current}`;\n}\n","/**\n * A no operation function (does nothing)\n */\nexport function noop() { }\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { box } from \"svelte-toolbelt\";\n/**\n * The `useStateMachine` function is a TypeScript function that creates a state machine and returns the\n * current state and a dispatch function to update the state based on events.\n * @param initialState - The `initialState` parameter is the initial state of the state machine. It\n * represents the starting point of the state machine's state.\n * @param machine - The `machine` parameter is an object that represents a state machine. It should\n * have keys that correspond to the possible states of the machine, and the values should be objects\n * that represent the possible events and their corresponding next states.\n * @returns The `useStateMachine` function returns an object with two properties: `state` and\n * `dispatch`.\n */\nexport function useStateMachine(initialState, machine) {\n const state = box(initialState);\n function reducer(event) {\n // @ts-expect-error state.value is keyof M\n const nextState = machine[state.current][event];\n return nextState ?? state.current;\n }\n const dispatch = (event) => {\n state.current = reducer(event);\n };\n return {\n state,\n dispatch,\n };\n}\n","import { afterTick, executeCallbacks } from \"svelte-toolbelt\";\nimport { Previous, watch } from \"runed\";\nimport { on } from \"svelte/events\";\nimport { useStateMachine } from \"../../../internal/use-state-machine.svelte.js\";\nexport function usePresence(present, id) {\n let styles = $state({});\n let prevAnimationNameState = $state(\"none\");\n const initialState = present.current ? \"mounted\" : \"unmounted\";\n let node = $state(null);\n const prevPresent = new Previous(() => present.current);\n watch([() => id.current, () => present.current], ([id, present]) => {\n if (!id || !present)\n return;\n afterTick(() => {\n node = document.getElementById(id);\n });\n });\n const { state, dispatch } = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\",\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\",\n },\n unmounted: {\n MOUNT: \"mounted\",\n },\n });\n watch(() => present.current, (currPresent) => {\n if (!node) {\n node = document.getElementById(id.current);\n }\n if (!node)\n return;\n const hasPresentChanged = currPresent !== prevPresent.current;\n if (!hasPresentChanged)\n return;\n const prevAnimationName = prevAnimationNameState;\n const currAnimationName = getAnimationName(node);\n if (currPresent) {\n dispatch(\"MOUNT\");\n }\n else if (currAnimationName === \"none\" || styles.display === \"none\") {\n // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n dispatch(\"UNMOUNT\");\n }\n else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */\n const isAnimating = prevAnimationName !== currAnimationName;\n if (prevPresent && isAnimating) {\n dispatch(\"ANIMATION_OUT\");\n }\n else {\n dispatch(\"UNMOUNT\");\n }\n }\n });\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */\n function handleAnimationEnd(event) {\n if (!node)\n node = document.getElementById(id.current);\n if (!node)\n return;\n const currAnimationName = getAnimationName(node);\n const isCurrentAnimation = currAnimationName.includes(event.animationName) || currAnimationName === \"none\";\n if (event.target === node && isCurrentAnimation) {\n dispatch(\"ANIMATION_END\");\n }\n }\n function handleAnimationStart(event) {\n if (!node)\n node = document.getElementById(id.current);\n if (!node)\n return;\n if (event.target === node) {\n prevAnimationNameState = getAnimationName(node);\n }\n }\n watch(() => state.current, () => {\n if (!node)\n node = document.getElementById(id.current);\n if (!node)\n return;\n const currAnimationName = getAnimationName(node);\n prevAnimationNameState = state.current === \"mounted\" ? currAnimationName : \"none\";\n });\n watch(() => node, (node) => {\n if (!node)\n return;\n styles = getComputedStyle(node);\n return executeCallbacks(on(node, \"animationstart\", handleAnimationStart), on(node, \"animationcancel\", handleAnimationEnd), on(node, \"animationend\", handleAnimationEnd));\n });\n const isPresentDerived = $derived([\"mounted\", \"unmountSuspended\"].includes(state.current));\n return {\n get current() {\n return isPresentDerived;\n },\n };\n}\nfunction getAnimationName(node) {\n return node ? getComputedStyle(node).animationName || \"none\" : \"none\";\n}\n","\n\n{#if forceMount || present || isPresent.current}\n\t{@render presence?.({ present: isPresent })}\n{/if}\n","import { on } from \"svelte/events\";\n/**\n * Adds an event listener to the specified target element(s) for the given event(s), and returns a function to remove it.\n * @param target The target element(s) to add the event listener to.\n * @param event The event(s) to listen for.\n * @param handler The function to be called when the event is triggered.\n * @param options An optional object that specifies characteristics about the event listener.\n * @returns A function that removes the event listener from the target element(s).\n */\nexport function addEventListener(target, event, handler, options) {\n const events = Array.isArray(event) ? event : [event];\n // Add the event listener to each specified event for the target element(s).\n events.forEach((_event) => target.addEventListener(_event, handler, options));\n // Return a function that removes the event listener from the target element(s).\n return () => {\n events.forEach((_event) => target.removeEventListener(_event, handler, options));\n };\n}\n/**\n * Creates a typed event dispatcher and listener pair for custom events\n * @template T - The type of data that will be passed in the event detail\n * @param eventName - The name of the custom event\n * @param options - CustomEvent options (bubbles, cancelable, etc.)\n */\nexport class CustomEventDispatcher {\n eventName;\n options;\n constructor(eventName, options = { bubbles: true, cancelable: true }) {\n this.eventName = eventName;\n this.options = options;\n }\n createEvent(detail) {\n return new CustomEvent(this.eventName, {\n ...this.options,\n detail,\n });\n }\n dispatch(element, detail) {\n const event = this.createEvent(detail);\n element.dispatchEvent(event);\n return event;\n }\n listen(element, callback, options) {\n const handler = (event) => {\n callback(event);\n };\n return on(element, this.eventName, handler, options);\n }\n}\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce(fn, wait = 500) {\n let timeout = null;\n const debounced = (...args) => {\n if (timeout !== null) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n fn(...args);\n }, wait);\n };\n debounced.destroy = () => {\n if (timeout !== null) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n return debounced;\n}\n","export function isOrContainsTarget(node, target) {\n return node === target || node.contains(target);\n}\nexport function getOwnerDocument(el) {\n return el?.ownerDocument ?? document;\n}\n","export function getDocument(element) {\n return element?.ownerDocument ?? document;\n}\nexport function activeElement(doc) {\n let activeElement = doc.activeElement;\n while (activeElement?.shadowRoot?.activeElement != null) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\nexport function getFirstNonCommentChild(element) {\n if (!element)\n return null;\n for (const child of element.childNodes) {\n if (child.nodeType !== Node.COMMENT_NODE) {\n return child;\n }\n }\n return null;\n}\n/**\n * Determines if the click event truly occurred outside the content node.\n * This was added to handle password managers and other elements that may be injected\n * into the DOM but visually appear inside the content.\n */\nexport function isClickTrulyOutside(event, contentNode) {\n const { clientX, clientY } = event;\n const rect = contentNode.getBoundingClientRect();\n return (clientX < rect.left || clientX > rect.right || clientY < rect.top || clientY > rect.bottom);\n}\nexport function getTarget(event) {\n if (\"composedPath\" in event) {\n return event.composedPath()[0];\n }\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\n","import { afterSleep, afterTick, box, executeCallbacks, onDestroyEffect, useRefById, } from \"svelte-toolbelt\";\nimport { watch } from \"runed\";\nimport { on } from \"svelte/events\";\nimport { addEventListener } from \"../../../internal/events.js\";\nimport { debounce } from \"../../../internal/debounce.js\";\nimport { noop } from \"../../../internal/noop.js\";\nimport { getOwnerDocument, isOrContainsTarget } from \"../../../internal/elements.js\";\nimport { isElement } from \"../../../internal/is.js\";\nimport { isClickTrulyOutside } from \"../../../internal/dom.js\";\nglobalThis.bitsDismissableLayers ??= new Map();\nexport class DismissibleLayerState {\n opts;\n #interactOutsideProp;\n #behaviorType;\n #interceptedEvents = {\n pointerdown: false,\n };\n #isResponsibleLayer = false;\n #isFocusInsideDOMTree = false;\n node = box(null);\n #documentObj = undefined;\n #onFocusOutside;\n currNode = $state(null);\n #unsubClickListener = noop;\n constructor(opts) {\n this.opts = opts;\n useRefById({\n id: opts.id,\n ref: this.node,\n deps: () => opts.enabled.current,\n onRefChange: (node) => {\n this.currNode = node;\n },\n });\n this.#behaviorType = opts.interactOutsideBehavior;\n this.#interactOutsideProp = opts.onInteractOutside;\n this.#onFocusOutside = opts.onFocusOutside;\n $effect(() => {\n this.#documentObj = getOwnerDocument(this.currNode);\n });\n let unsubEvents = noop;\n const cleanup = () => {\n this.#resetState();\n globalThis.bitsDismissableLayers.delete(this);\n this.#handleInteractOutside.destroy();\n unsubEvents();\n };\n watch([() => this.opts.enabled.current, () => this.currNode], ([enabled, currNode]) => {\n if (!enabled || !currNode)\n return;\n afterSleep(1, () => {\n if (!this.currNode)\n return;\n globalThis.bitsDismissableLayers.set(this, this.#behaviorType);\n unsubEvents();\n unsubEvents = this.#addEventListeners();\n });\n return cleanup;\n });\n onDestroyEffect(() => {\n this.#resetState.destroy();\n globalThis.bitsDismissableLayers.delete(this);\n this.#handleInteractOutside.destroy();\n this.#unsubClickListener();\n unsubEvents();\n });\n }\n #handleFocus = (event) => {\n if (event.defaultPrevented)\n return;\n if (!this.currNode)\n return;\n afterTick(() => {\n if (!this.currNode || this.#isTargetWithinLayer(event.target))\n return;\n if (event.target && !this.#isFocusInsideDOMTree) {\n this.#onFocusOutside.current?.(event);\n }\n });\n };\n #addEventListeners() {\n return executeCallbacks(\n /**\n * CAPTURE INTERACTION START\n * mark interaction-start event as intercepted.\n * mark responsible layer during interaction start\n * to avoid checking if is responsible layer during interaction end\n * when a new floating element may have been opened.\n */\n on(this.#documentObj, \"pointerdown\", executeCallbacks(this.#markInterceptedEvent, this.#markResponsibleLayer), { capture: true }), \n /**\n * BUBBLE INTERACTION START\n * Mark interaction-start event as non-intercepted. Debounce `onInteractOutsideStart`\n * to avoid prematurely checking if other events were intercepted.\n */\n on(this.#documentObj, \"pointerdown\", executeCallbacks(this.#markNonInterceptedEvent, this.#handleInteractOutside)), \n /**\n * HANDLE FOCUS OUTSIDE\n */\n on(this.#documentObj, \"focusin\", this.#handleFocus));\n }\n #handleDismiss = (e) => {\n let event = e;\n if (event.defaultPrevented) {\n event = createWrappedEvent(e);\n }\n this.#interactOutsideProp.current(e);\n };\n #handleInteractOutside = debounce((e) => {\n if (!this.currNode) {\n this.#unsubClickListener();\n return;\n }\n const isEventValid = this.opts.isValidEvent.current(e, this.currNode) || isValidEvent(e, this.currNode);\n if (!this.#isResponsibleLayer || this.#isAnyEventIntercepted() || !isEventValid) {\n this.#unsubClickListener();\n return;\n }\n let event = e;\n if (event.defaultPrevented) {\n event = createWrappedEvent(event);\n }\n if (this.#behaviorType.current !== \"close\" &&\n this.#behaviorType.current !== \"defer-otherwise-close\") {\n this.#unsubClickListener();\n return;\n }\n if (e.pointerType === \"touch\") {\n this.#unsubClickListener();\n // @ts-expect-error - later\n this.#unsubClickListener = addEventListener(this.#documentObj, \"click\", this.#handleDismiss, { once: true });\n }\n else {\n this.#interactOutsideProp.current(event);\n }\n }, 10);\n #markInterceptedEvent = (e) => {\n this.#interceptedEvents[e.type] = true;\n };\n #markNonInterceptedEvent = (e) => {\n this.#interceptedEvents[e.type] = false;\n };\n #markResponsibleLayer = () => {\n if (!this.node.current)\n return;\n this.#isResponsibleLayer = isResponsibleLayer(this.node.current);\n };\n #isTargetWithinLayer = (target) => {\n if (!this.node.current)\n return false;\n return isOrContainsTarget(this.node.current, target);\n };\n #resetState = debounce(() => {\n for (const eventType in this.#interceptedEvents) {\n this.#interceptedEvents[eventType] = false;\n }\n this.#isResponsibleLayer = false;\n }, 20);\n #isAnyEventIntercepted() {\n const i = Object.values(this.#interceptedEvents).some(Boolean);\n return i;\n }\n #onfocuscapture = () => {\n this.#isFocusInsideDOMTree = true;\n };\n #onblurcapture = () => {\n this.#isFocusInsideDOMTree = false;\n };\n props = {\n onfocuscapture: this.#onfocuscapture,\n onblurcapture: this.#onblurcapture,\n };\n}\nexport function useDismissibleLayer(props) {\n return new DismissibleLayerState(props);\n}\nfunction getTopMostLayer(layersArr) {\n return layersArr.findLast(([_, { current: behaviorType }]) => behaviorType === \"close\" || behaviorType === \"ignore\");\n}\nfunction isResponsibleLayer(node) {\n const layersArr = [...globalThis.bitsDismissableLayers];\n /**\n * We first check if we can find a top layer with `close` or `ignore`.\n * If that top layer was found and matches the provided node, then the node is\n * responsible for the outside interaction. Otherwise, we know that all layers defer so\n * the first layer is the responsible one.\n */\n const topMostLayer = getTopMostLayer(layersArr);\n if (topMostLayer)\n return topMostLayer[0].node.current === node;\n const [firstLayerNode] = layersArr[0];\n return firstLayerNode.node.current === node;\n}\nfunction isValidEvent(e, node) {\n if (\"button\" in e && e.button > 0)\n return false;\n const target = e.target;\n if (!isElement(target))\n return false;\n const ownerDocument = getOwnerDocument(target);\n const isValid = ownerDocument.documentElement.contains(target) &&\n !isOrContainsTarget(node, target) &&\n isClickTrulyOutside(e, node);\n return isValid;\n}\nfunction createWrappedEvent(e) {\n const capturedCurrentTarget = e.currentTarget;\n const capturedTarget = e.target;\n let newEvent;\n if (e instanceof PointerEvent) {\n newEvent = new PointerEvent(e.type, e);\n }\n else {\n newEvent = new PointerEvent(\"pointerdown\", e);\n }\n // track the prevented state separately\n let isPrevented = false;\n // Create a proxy to intercept property access and method calls\n const wrappedEvent = new Proxy(newEvent, {\n get: (target, prop) => {\n if (prop === \"currentTarget\") {\n return capturedCurrentTarget;\n }\n if (prop === \"target\") {\n return capturedTarget;\n }\n if (prop === \"preventDefault\") {\n return () => {\n isPrevented = true;\n if (typeof target.preventDefault === \"function\") {\n target.preventDefault();\n }\n };\n }\n if (prop === \"defaultPrevented\") {\n return isPrevented;\n }\n if (prop in target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return target[prop];\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return e[prop];\n },\n });\n return wrappedEvent;\n}\n","\n\n{@render children?.({ props: dismissibleLayerState.props })}\n","import { watch } from \"runed\";\nimport { on } from \"svelte/events\";\nimport { kbd } from \"../../../internal/kbd.js\";\nimport { noop } from \"../../../internal/noop.js\";\nglobalThis.bitsEscapeLayers ??= new Map();\nexport class EscapeLayerState {\n opts;\n constructor(opts) {\n this.opts = opts;\n let unsubEvents = noop;\n watch(() => opts.enabled.current, (enabled) => {\n if (enabled) {\n globalThis.bitsEscapeLayers.set(this, opts.escapeKeydownBehavior);\n unsubEvents = this.#addEventListener();\n }\n return () => {\n unsubEvents();\n globalThis.bitsEscapeLayers.delete(this);\n };\n });\n }\n #addEventListener = () => {\n return on(document, \"keydown\", this.#onkeydown, { passive: false });\n };\n #onkeydown = (e) => {\n if (e.key !== kbd.ESCAPE || !isResponsibleEscapeLayer(this))\n return;\n const clonedEvent = new KeyboardEvent(e.type, e);\n e.preventDefault();\n const behaviorType = this.opts.escapeKeydownBehavior.current;\n if (behaviorType !== \"close\" && behaviorType !== \"defer-otherwise-close\")\n return;\n this.opts.onEscapeKeydown.current(clonedEvent);\n };\n}\nexport function useEscapeLayer(props) {\n return new EscapeLayerState(props);\n}\nfunction isResponsibleEscapeLayer(instance) {\n const layersArr = [...globalThis.bitsEscapeLayers];\n /**\n * We first check if we can find a top layer with `close` or `ignore`.\n * If that top layer was found and matches the provided node, then the node is\n * responsible for the escape. Otherwise, we know that all layers defer so\n * the first layer is the responsible one.\n */\n const topMostLayer = layersArr.findLast(([_, { current: behaviorType }]) => behaviorType === \"close\" || behaviorType === \"ignore\");\n if (topMostLayer)\n return topMostLayer[0] === instance;\n const [firstLayerNode] = layersArr[0];\n return firstLayerNode === instance;\n}\n","\n\n{@render children?.()}\n","import { box } from \"svelte-toolbelt\";\nimport { useId } from \"../../../internal/use-id.js\";\nconst focusStack = box([]);\nexport function createFocusScopeStack() {\n return {\n add(focusScope) {\n const activeFocusScope = focusStack.current[0];\n if (activeFocusScope && focusScope.id !== activeFocusScope.id) {\n activeFocusScope.pause();\n }\n focusStack.current = removeFromFocusScopeArray(focusStack.current, focusScope);\n focusStack.current.unshift(focusScope);\n },\n remove(focusScope) {\n focusStack.current = removeFromFocusScopeArray(focusStack.current, focusScope);\n focusStack.current[0]?.resume();\n },\n get current() {\n return focusStack.current;\n },\n };\n}\nexport function createFocusScopeAPI() {\n let paused = $state(false);\n let isHandlingFocus = $state(false);\n return {\n id: useId(),\n get paused() {\n return paused;\n },\n get isHandlingFocus() {\n return isHandlingFocus;\n },\n set isHandlingFocus(value) {\n isHandlingFocus = value;\n },\n pause() {\n paused = true;\n },\n resume() {\n paused = false;\n },\n };\n}\nfunction removeFromFocusScopeArray(arr, item) {\n return [...arr].filter((i) => i.id !== item.id);\n}\nexport function removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\n","import { isBrowser, isElementHidden, isSelectableInput } from \"./is.js\";\n/**\n * Handles `initialFocus` prop behavior for the\n * Calendar & RangeCalendar components.\n */\nexport function handleCalendarInitialFocus(calendar) {\n if (!isBrowser)\n return;\n const selectedDay = calendar.querySelector(\"[data-selected]\");\n if (selectedDay)\n return focusWithoutScroll(selectedDay);\n const today = calendar.querySelector(\"[data-today]\");\n if (today)\n return focusWithoutScroll(today);\n const firstDay = calendar.querySelector(\"[data-calendar-date]\");\n if (firstDay)\n return focusWithoutScroll(firstDay);\n}\n/**\n * A utility function that focuses an element without scrolling.\n */\nexport function focusWithoutScroll(element) {\n const scrollPosition = {\n x: window.pageXOffset || document.documentElement.scrollLeft,\n y: window.pageYOffset || document.documentElement.scrollTop,\n };\n element.focus();\n window.scrollTo(scrollPosition.x, scrollPosition.y);\n}\n/**\n * A utility function that focuses an element.\n */\nexport function focus(element, { select = false } = {}) {\n if (!(element && element.focus))\n return;\n if (document.activeElement === element)\n return;\n const previouslyFocusedElement = document.activeElement;\n // prevent scroll on focus\n element.focus({ preventScroll: true });\n // only elect if its not the same element, it supports selection, and we need to select it\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select) {\n element.select();\n }\n}\n/**\n * Attempts to focus the first element in a list of candidates.\n * Stops when focus is successful.\n */\nexport function focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) {\n return true;\n }\n }\n}\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */\nexport function findVisible(elements, container) {\n for (const element of elements) {\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!isElementHidden(element, container))\n return element;\n }\n}\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */\nexport function getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput)\n return NodeFilter.FILTER_SKIP;\n // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode())\n nodes.push(walker.currentNode);\n // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n/**\n * A utility function that returns the first and last elements within a container that are\n * visible and focusable.\n */\nexport function getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\n","/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome,
    ,