{"version":3,"sources":["jsdelivr-header.js","/npm/flipclock@1.0.1/src/EventEmitter.ts","/npm/flipclock@1.0.1/node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/dist/solid.js","/npm/flipclock@1.0.1/src/helpers/parser.js","/npm/flipclock@1.0.1/src/helpers/digitizer.ts","/npm/flipclock@1.0.1/src/helpers/structure.ts","/npm/flipclock@1.0.1/src/FaceValue.ts","/npm/flipclock@1.0.1/src/helpers/charset.ts","/npm/flipclock@1.0.1/node_modules/.pnpm/goober@2.1.16_csstype@3.1.3/node_modules/goober/dist/goober.modern.js","/npm/flipclock@1.0.1/src/helpers/css.ts","/npm/flipclock@1.0.1/src/helpers/dictionary.ts","/npm/flipclock@1.0.1/src/helpers/date.ts","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addDays.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addMonths.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/add.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/compareAsc.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInDays.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getRoundingMethod.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInMilliseconds.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isLastDayOfMonth.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfDay.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfMonth.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/setMonth.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDaysInMonth.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/set.js","/npm/flipclock@1.0.1/src/helpers/duration.ts","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInYears.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarYears.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInMonths.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarMonths.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInWeeks.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInHours.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInMinutes.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInSeconds.js","/npm/flipclock@1.0.1/src/helpers/functions.ts","/npm/flipclock@1.0.1/src/helpers/sequencer.ts","/npm/flipclock@1.0.1/src/faces/Alphanumeric.ts","/npm/flipclock@1.0.1/src/faces/Clock.ts","/npm/flipclock@1.0.1/src/faces/Counter.ts","/npm/flipclock@1.0.1/src/faces/ElapsedTime.ts","/npm/flipclock@1.0.1/src/Timer.ts","/npm/flipclock@1.0.1/src/FlipClock.ts","/npm/flipclock@1.0.1/node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/web/dist/web.js","/npm/flipclock@1.0.1/src/themes/flipclock/index.tsx","/npm/flipclock@1.0.1/src/themes/flipclock/flipclock.css.ts","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/sub.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subDays.js","/npm/flipclock@1.0.1/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subMonths.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,+NCiBO,MAAM,EAMC,OAA0B,GAO7B,IAAA,CAAkC,KAAW,GAChD,UAAW,KAAS,KAAK,OACjB,EAAM,MAAQ,GAIlB,EAAM,MAAM,EAEpB,CAOO,EAAA,CAAgC,EAAQ,GAC3C,MAAM,EAAU,KACZ,MAAM,EAAQ,KAAK,OAAO,WAAU,GACzB,EAAM,MAAQ,GAAO,EAAM,KAAO,IAG7C,KAAK,OAAO,OAAO,EAAO,EAAC,EAG/B,OAAA,KAAK,OAAO,KAAK,CAAE,MAAK,KAAI,YAErB,CACX,CAOA,IAAA,CAAkC,EAAQ,GACtC,MAAM,EAAU,KAAK,GAAG,GAAK,IAAI,KAC7B,KAAM,GACN,GAAA,IAGJ,OAAO,CACX,CASA,GAAA,CAAiC,EAAQ,GACrC,UAAW,KAAS,KAAK,OACjB,EAAM,MAAQ,KAAS,GAAM,IAAO,EAAM,KAC1C,EAAM,SAGlB,CAOA,KAAA,GACI,KAAK,OAAS,EAClB,EC4CJ,MAIM,EAAS,OAAO,e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yCwJE,EAAA,aAAA,EAAA,EAAA,mBAAA,GAAA,EAAA,aAAA,GAAA,OAAA,eAAA,EAAA,OAAA,YAAA,CAAA,MAAA","file":"/npm/flipclock@1.0.1/dist/FlipClock.umd.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/flipclock@1.0.1/dist/FlipClock.umd.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * The event instance.\n * \n * @public\n */\nexport type Event<T, K extends keyof T> = {\n    key: keyof T,\n    fn: EventEmitterCallback<T, K>,\n    unwatch: () => void;\n}\n\n/**\n * The callback from the event emitter.\n * \n * @public\n */\nexport type EventEmitterCallback<T, K extends keyof Required<T>> = (...args: Required<T>[K][]) => void\n\n/**\n * An event emitter to facilitate emitter and listening for events.\n * \n * @public\n */\nexport class EventEmitter<T> {\n    /**\n     * The registered events.\n     * \n     * @protected\n     */\n    protected events: Event<T, any>[] = [];\n\n    /**\n     * Emit an event.\n     * \n     * @public\n    */\n    public emit<K extends keyof Required<T>>(key: K, ...args: Required<T>[K] extends (...args: infer P) => void ? P : any[]) {\n        for (const event of this.events) {\n            if (event.key !== key) {\n                continue;\n            }\n\n            event.fn(...args);\n        }\n    }\n\n    /**\n     * Listen for an event. This returns a function to unwatch the event.\n     * \n     * @public\n     */\n    public on<K extends keyof Required<T>>(key: K, fn: EventEmitterCallback<T, K>): () => void {\n        const unwatch = () => {\n            const index = this.events.findIndex(event => {\n                return event.key === key && event.fn === fn;\n            });\n\n            this.events.splice(index, 1);\n        };\n\n        this.events.push({ key, fn, unwatch });\n\n        return unwatch;\n    }\n\n    /**\n     * Listen for an event once.\n     * \n     * @public\n     */\n    once<K extends keyof Required<T>>(key: K, fn: EventEmitterCallback<T, K>): () => void {\n        const unwatch = this.on(key, (...args: T[K][]) => {\n            fn(...args);\n            unwatch();\n        });\n\n        return unwatch;\n    }\n\n    /**\n     * Stop listening for all events using a, or with a key and a function.\n     * \n     * @public\n     */\n    off<K extends keyof Required<T>>(key: K): void\n    off<K extends keyof Required<T>>(key: K, fn: T[K]): void\n    off<K extends keyof Required<T>>(key: K, fn?: T[K]): void {\n        for (const event of this.events) {\n            if (event.key === key && (!fn || fn === event.fn)) {\n                event.unwatch();\n            }\n        }\n    }\n\n    /**\n     * Reset the event bus and remove all watchers.\n     * \n     * @public\n     */\n    reset(): void {\n        this.events = [];\n    }\n}\n\nexport function eventEmitter<T>() {\n    return new EventEmitter<T>();\n}","let taskIdCounter = 1,\n  isCallbackScheduled = false,\n  isPerformingWork = false,\n  taskQueue = [],\n  currentTask = null,\n  shouldYieldToHost = null,\n  yieldInterval = 5,\n  deadline = 0,\n  maxYieldInterval = 300,\n  maxDeadline = 0,\n  scheduleCallback = null,\n  scheduledCallback = null;\nconst maxSigned31BitInt = 1073741823;\nfunction setupScheduler() {\n  const channel = new MessageChannel(),\n    port = channel.port2;\n  scheduleCallback = () => port.postMessage(null);\n  channel.port1.onmessage = () => {\n    if (scheduledCallback !== null) {\n      const currentTime = performance.now();\n      deadline = currentTime + yieldInterval;\n      maxDeadline = currentTime + maxYieldInterval;\n      try {\n        const hasMoreWork = scheduledCallback(currentTime);\n        if (!hasMoreWork) {\n          scheduledCallback = null;\n        } else port.postMessage(null);\n      } catch (error) {\n        port.postMessage(null);\n        throw error;\n      }\n    }\n  };\n  if (navigator && navigator.scheduling && navigator.scheduling.isInputPending) {\n    const scheduling = navigator.scheduling;\n    shouldYieldToHost = () => {\n      const currentTime = performance.now();\n      if (currentTime >= deadline) {\n        if (scheduling.isInputPending()) {\n          return true;\n        }\n        return currentTime >= maxDeadline;\n      } else {\n        return false;\n      }\n    };\n  } else {\n    shouldYieldToHost = () => performance.now() >= deadline;\n  }\n}\nfunction enqueue(taskQueue, task) {\n  function findIndex() {\n    let m = 0;\n    let n = taskQueue.length - 1;\n    while (m <= n) {\n      const k = n + m >> 1;\n      const cmp = task.expirationTime - taskQueue[k].expirationTime;\n      if (cmp > 0) m = k + 1;else if (cmp < 0) n = k - 1;else return k;\n    }\n    return m;\n  }\n  taskQueue.splice(findIndex(), 0, task);\n}\nfunction requestCallback(fn, options) {\n  if (!scheduleCallback) setupScheduler();\n  let startTime = performance.now(),\n    timeout = maxSigned31BitInt;\n  if (options && options.timeout) timeout = options.timeout;\n  const newTask = {\n    id: taskIdCounter++,\n    fn,\n    startTime,\n    expirationTime: startTime + timeout\n  };\n  enqueue(taskQueue, newTask);\n  if (!isCallbackScheduled && !isPerformingWork) {\n    isCallbackScheduled = true;\n    scheduledCallback = flushWork;\n    scheduleCallback();\n  }\n  return newTask;\n}\nfunction cancelCallback(task) {\n  task.fn = null;\n}\nfunction flushWork(initialTime) {\n  isCallbackScheduled = false;\n  isPerformingWork = true;\n  try {\n    return workLoop(initialTime);\n  } finally {\n    currentTask = null;\n    isPerformingWork = false;\n  }\n}\nfunction workLoop(initialTime) {\n  let currentTime = initialTime;\n  currentTask = taskQueue[0] || null;\n  while (currentTask !== null) {\n    if (currentTask.expirationTime > currentTime && shouldYieldToHost()) {\n      break;\n    }\n    const callback = currentTask.fn;\n    if (callback !== null) {\n      currentTask.fn = null;\n      const didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n      callback(didUserCallbackTimeout);\n      currentTime = performance.now();\n      if (currentTask === taskQueue[0]) {\n        taskQueue.shift();\n      }\n    } else taskQueue.shift();\n    currentTask = taskQueue[0] || null;\n  }\n  return currentTask !== null;\n}\n\nconst sharedConfig = {\n  context: undefined,\n  registry: undefined,\n  effects: undefined,\n  done: false,\n  getContextId() {\n    return getContextId(this.context.count);\n  },\n  getNextContextId() {\n    return getContextId(this.context.count++);\n  }\n};\nfunction getContextId(count) {\n  const num = String(count),\n    len = num.length - 1;\n  return sharedConfig.context.id + (len ? String.fromCharCode(96 + len) : \"\") + num;\n}\nfunction setHydrateContext(context) {\n  sharedConfig.context = context;\n}\nfunction nextHydrateContext() {\n  return {\n    ...sharedConfig.context,\n    id: sharedConfig.getNextContextId(),\n    count: 0\n  };\n}\n\nconst IS_DEV = false;\nconst equalFn = (a, b) => a === b;\nconst $PROXY = Symbol(\"solid-proxy\");\nconst SUPPORTS_PROXY = typeof Proxy === \"function\";\nconst $TRACK = Symbol(\"solid-track\");\nconst $DEVCOMP = Symbol(\"solid-dev-component\");\nconst signalOptions = {\n  equals: equalFn\n};\nlet ERROR = null;\nlet runEffects = runQueue;\nconst STALE = 1;\nconst PENDING = 2;\nconst UNOWNED = {\n  owned: null,\n  cleanups: null,\n  context: null,\n  owner: null\n};\nconst NO_INIT = {};\nvar Owner = null;\nlet Transition = null;\nlet Scheduler = null;\nlet ExternalSourceConfig = null;\nlet Listener = null;\nlet Updates = null;\nlet Effects = null;\nlet ExecCount = 0;\nfunction createRoot(fn, detachedOwner) {\n  const listener = Listener,\n    owner = Owner,\n    unowned = fn.length === 0,\n    current = detachedOwner === undefined ? owner : detachedOwner,\n    root = unowned ? UNOWNED : {\n      owned: null,\n      cleanups: null,\n      context: current ? current.context : null,\n      owner: current\n    },\n    updateFn = unowned ? fn : () => fn(() => untrack(() => cleanNode(root)));\n  Owner = root;\n  Listener = null;\n  try {\n    return runUpdates(updateFn, true);\n  } finally {\n    Listener = listener;\n    Owner = owner;\n  }\n}\nfunction createSignal(value, options) {\n  options = options ? Object.assign({}, signalOptions, options) : signalOptions;\n  const s = {\n    value,\n    observers: null,\n    observerSlots: null,\n    comparator: options.equals || undefined\n  };\n  const setter = value => {\n    if (typeof value === \"function\") {\n      if (Transition && Transition.running && Transition.sources.has(s)) value = value(s.tValue);else value = value(s.value);\n    }\n    return writeSignal(s, value);\n  };\n  return [readSignal.bind(s), setter];\n}\nfunction createComputed(fn, value, options) {\n  const c = createComputation(fn, value, true, STALE);\n  if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);\n}\nfunction createRenderEffect(fn, value, options) {\n  const c = createComputation(fn, value, false, STALE);\n  if (Scheduler && Transition && Transition.running) Updates.push(c);else updateComputation(c);\n}\nfunction createEffect(fn, value, options) {\n  runEffects = runUserEffects;\n  const c = createComputation(fn, value, false, STALE),\n    s = SuspenseContext && useContext(SuspenseContext);\n  if (s) c.suspense = s;\n  if (!options || !options.render) c.user = true;\n  Effects ? Effects.push(c) : updateComputation(c);\n}\nfunction createReaction(onInvalidate, options) {\n  let fn;\n  const c = createComputation(() => {\n      fn ? fn() : untrack(onInvalidate);\n      fn = undefined;\n    }, undefined, false, 0),\n    s = SuspenseContext && useContext(SuspenseContext);\n  if (s) c.suspense = s;\n  c.user = true;\n  return tracking => {\n    fn = tracking;\n    updateComputation(c);\n  };\n}\nfunction createMemo(fn, value, options) {\n  options = options ? Object.assign({}, signalOptions, options) : signalOptions;\n  const c = createComputation(fn, value, true, 0);\n  c.observers = null;\n  c.observerSlots = null;\n  c.comparator = options.equals || undefined;\n  if (Scheduler && Transition && Transition.running) {\n    c.tState = STALE;\n    Updates.push(c);\n  } else updateComputation(c);\n  return readSignal.bind(c);\n}\nfunction isPromise(v) {\n  return v && typeof v === \"object\" && \"then\" in v;\n}\nfunction createResource(pSource, pFetcher, pOptions) {\n  let source;\n  let fetcher;\n  let options;\n  if (typeof pFetcher === \"function\") {\n    source = pSource;\n    fetcher = pFetcher;\n    options = pOptions || {};\n  } else {\n    source = true;\n    fetcher = pSource;\n    options = pFetcher || {};\n  }\n  let pr = null,\n    initP = NO_INIT,\n    id = null,\n    loadedUnderTransition = false,\n    scheduled = false,\n    resolved = \"initialValue\" in options,\n    dynamic = typeof source === \"function\" && createMemo(source);\n  const contexts = new Set(),\n    [value, setValue] = (options.storage || createSignal)(options.initialValue),\n    [error, setError] = createSignal(undefined),\n    [track, trigger] = createSignal(undefined, {\n      equals: false\n    }),\n    [state, setState] = createSignal(resolved ? \"ready\" : \"unresolved\");\n  if (sharedConfig.context) {\n    id = sharedConfig.getNextContextId();\n    if (options.ssrLoadFrom === \"initial\") initP = options.initialValue;else if (sharedConfig.load && sharedConfig.has(id)) initP = sharedConfig.load(id);\n  }\n  function loadEnd(p, v, error, key) {\n    if (pr === p) {\n      pr = null;\n      key !== undefined && (resolved = true);\n      if ((p === initP || v === initP) && options.onHydrated) queueMicrotask(() => options.onHydrated(key, {\n        value: v\n      }));\n      initP = NO_INIT;\n      if (Transition && p && loadedUnderTransition) {\n        Transition.promises.delete(p);\n        loadedUnderTransition = false;\n        runUpdates(() => {\n          Transition.running = true;\n          completeLoad(v, error);\n        }, false);\n      } else completeLoad(v, error);\n    }\n    return v;\n  }\n  function completeLoad(v, err) {\n    runUpdates(() => {\n      if (err === undefined) setValue(() => v);\n      setState(err !== undefined ? \"errored\" : resolved ? \"ready\" : \"unresolved\");\n      setError(err);\n      for (const c of contexts.keys()) c.decrement();\n      contexts.clear();\n    }, false);\n  }\n  function read() {\n    const c = SuspenseContext && useContext(SuspenseContext),\n      v = value(),\n      err = error();\n    if (err !== undefined && !pr) throw err;\n    if (Listener && !Listener.user && c) {\n      createComputed(() => {\n        track();\n        if (pr) {\n          if (c.resolved && Transition && loadedUnderTransition) Transition.promises.add(pr);else if (!contexts.has(c)) {\n            c.increment();\n            contexts.add(c);\n          }\n        }\n      });\n    }\n    return v;\n  }\n  function load(refetching = true) {\n    if (refetching !== false && scheduled) return;\n    scheduled = false;\n    const lookup = dynamic ? dynamic() : source;\n    loadedUnderTransition = Transition && Transition.running;\n    if (lookup == null || lookup === false) {\n      loadEnd(pr, untrack(value));\n      return;\n    }\n    if (Transition && pr) Transition.promises.delete(pr);\n    let error;\n    const p = initP !== NO_INIT ? initP : untrack(() => {\n      try {\n        return fetcher(lookup, {\n          value: value(),\n          refetching\n        });\n      } catch (fetcherError) {\n        error = fetcherError;\n      }\n    });\n    if (error !== undefined) {\n      loadEnd(pr, undefined, castError(error), lookup);\n      return;\n    } else if (!isPromise(p)) {\n      loadEnd(pr, p, undefined, lookup);\n      return p;\n    }\n    pr = p;\n    if (\"v\" in p) {\n      if (p.s === 1) loadEnd(pr, p.v, undefined, lookup);else loadEnd(pr, undefined, castError(p.v), lookup);\n      return p;\n    }\n    scheduled = true;\n    queueMicrotask(() => scheduled = false);\n    runUpdates(() => {\n      setState(resolved ? \"refreshing\" : \"pending\");\n      trigger();\n    }, false);\n    return p.then(v => loadEnd(p, v, undefined, lookup), e => loadEnd(p, undefined, castError(e), lookup));\n  }\n  Object.defineProperties(read, {\n    state: {\n      get: () => state()\n    },\n    error: {\n      get: () => error()\n    },\n    loading: {\n      get() {\n        const s = state();\n        return s === \"pending\" || s === \"refreshing\";\n      }\n    },\n    latest: {\n      get() {\n        if (!resolved) return read();\n        const err = error();\n        if (err && !pr) throw err;\n        return value();\n      }\n    }\n  });\n  let owner = Owner;\n  if (dynamic) createComputed(() => (owner = Owner, load(false)));else load(false);\n  return [read, {\n    refetch: info => runWithOwner(owner, () => load(info)),\n    mutate: setValue\n  }];\n}\nfunction createDeferred(source, options) {\n  let t,\n    timeout = options ? options.timeoutMs : undefined;\n  const node = createComputation(() => {\n    if (!t || !t.fn) t = requestCallback(() => setDeferred(() => node.value), timeout !== undefined ? {\n      timeout\n    } : undefined);\n    return source();\n  }, undefined, true);\n  const [deferred, setDeferred] = createSignal(Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, options);\n  updateComputation(node);\n  setDeferred(() => Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value);\n  return deferred;\n}\nfunction createSelector(source, fn = equalFn, options) {\n  const subs = new Map();\n  const node = createComputation(p => {\n    const v = source();\n    for (const [key, val] of subs.entries()) if (fn(key, v) !== fn(key, p)) {\n      for (const c of val.values()) {\n        c.state = STALE;\n        if (c.pure) Updates.push(c);else Effects.push(c);\n      }\n    }\n    return v;\n  }, undefined, true, STALE);\n  updateComputation(node);\n  return key => {\n    const listener = Listener;\n    if (listener) {\n      let l;\n      if (l = subs.get(key)) l.add(listener);else subs.set(key, l = new Set([listener]));\n      onCleanup(() => {\n        l.delete(listener);\n        !l.size && subs.delete(key);\n      });\n    }\n    return fn(key, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value);\n  };\n}\nfunction batch(fn) {\n  return runUpdates(fn, false);\n}\nfunction untrack(fn) {\n  if (!ExternalSourceConfig && Listener === null) return fn();\n  const listener = Listener;\n  Listener = null;\n  try {\n    if (ExternalSourceConfig) return ExternalSourceConfig.untrack(fn);\n    return fn();\n  } finally {\n    Listener = listener;\n  }\n}\nfunction on(deps, fn, options) {\n  const isArray = Array.isArray(deps);\n  let prevInput;\n  let defer = options && options.defer;\n  return prevValue => {\n    let input;\n    if (isArray) {\n      input = Array(deps.length);\n      for (let i = 0; i < deps.length; i++) input[i] = deps[i]();\n    } else input = deps();\n    if (defer) {\n      defer = false;\n      return prevValue;\n    }\n    const result = untrack(() => fn(input, prevInput, prevValue));\n    prevInput = input;\n    return result;\n  };\n}\nfunction onMount(fn) {\n  createEffect(() => untrack(fn));\n}\nfunction onCleanup(fn) {\n  if (Owner === null) ;else if (Owner.cleanups === null) Owner.cleanups = [fn];else Owner.cleanups.push(fn);\n  return fn;\n}\nfunction catchError(fn, handler) {\n  ERROR || (ERROR = Symbol(\"error\"));\n  Owner = createComputation(undefined, undefined, true);\n  Owner.context = {\n    ...Owner.context,\n    [ERROR]: [handler]\n  };\n  if (Transition && Transition.running) Transition.sources.add(Owner);\n  try {\n    return fn();\n  } catch (err) {\n    handleError(err);\n  } finally {\n    Owner = Owner.owner;\n  }\n}\nfunction getListener() {\n  return Listener;\n}\nfunction getOwner() {\n  return Owner;\n}\nfunction runWithOwner(o, fn) {\n  const prev = Owner;\n  const prevListener = Listener;\n  Owner = o;\n  Listener = null;\n  try {\n    return runUpdates(fn, true);\n  } catch (err) {\n    handleError(err);\n  } finally {\n    Owner = prev;\n    Listener = prevListener;\n  }\n}\nfunction enableScheduling(scheduler = requestCallback) {\n  Scheduler = scheduler;\n}\nfunction startTransition(fn) {\n  if (Transition && Transition.running) {\n    fn();\n    return Transition.done;\n  }\n  const l = Listener;\n  const o = Owner;\n  return Promise.resolve().then(() => {\n    Listener = l;\n    Owner = o;\n    let t;\n    if (Scheduler || SuspenseContext) {\n      t = Transition || (Transition = {\n        sources: new Set(),\n        effects: [],\n        promises: new Set(),\n        disposed: new Set(),\n        queue: new Set(),\n        running: true\n      });\n      t.done || (t.done = new Promise(res => t.resolve = res));\n      t.running = true;\n    }\n    runUpdates(fn, false);\n    Listener = Owner = null;\n    return t ? t.done : undefined;\n  });\n}\nconst [transPending, setTransPending] = /*@__PURE__*/createSignal(false);\nfunction useTransition() {\n  return [transPending, startTransition];\n}\nfunction resumeEffects(e) {\n  Effects.push.apply(Effects, e);\n  e.length = 0;\n}\nfunction createContext(defaultValue, options) {\n  const id = Symbol(\"context\");\n  return {\n    id,\n    Provider: createProvider(id),\n    defaultValue\n  };\n}\nfunction useContext(context) {\n  let value;\n  return Owner && Owner.context && (value = Owner.context[context.id]) !== undefined ? value : context.defaultValue;\n}\nfunction children(fn) {\n  const children = createMemo(fn);\n  const memo = createMemo(() => resolveChildren(children()));\n  memo.toArray = () => {\n    const c = memo();\n    return Array.isArray(c) ? c : c != null ? [c] : [];\n  };\n  return memo;\n}\nlet SuspenseContext;\nfunction getSuspenseContext() {\n  return SuspenseContext || (SuspenseContext = createContext());\n}\nfunction enableExternalSource(factory, untrack = fn => fn()) {\n  if (ExternalSourceConfig) {\n    const {\n      factory: oldFactory,\n      untrack: oldUntrack\n    } = ExternalSourceConfig;\n    ExternalSourceConfig = {\n      factory: (fn, trigger) => {\n        const oldSource = oldFactory(fn, trigger);\n        const source = factory(x => oldSource.track(x), trigger);\n        return {\n          track: x => source.track(x),\n          dispose() {\n            source.dispose();\n            oldSource.dispose();\n          }\n        };\n      },\n      untrack: fn => oldUntrack(() => untrack(fn))\n    };\n  } else {\n    ExternalSourceConfig = {\n      factory,\n      untrack\n    };\n  }\n}\nfunction readSignal() {\n  const runningTransition = Transition && Transition.running;\n  if (this.sources && (runningTransition ? this.tState : this.state)) {\n    if ((runningTransition ? this.tState : this.state) === STALE) updateComputation(this);else {\n      const updates = Updates;\n      Updates = null;\n      runUpdates(() => lookUpstream(this), false);\n      Updates = updates;\n    }\n  }\n  if (Listener) {\n    const sSlot = this.observers ? this.observers.length : 0;\n    if (!Listener.sources) {\n      Listener.sources = [this];\n      Listener.sourceSlots = [sSlot];\n    } else {\n      Listener.sources.push(this);\n      Listener.sourceSlots.push(sSlot);\n    }\n    if (!this.observers) {\n      this.observers = [Listener];\n      this.observerSlots = [Listener.sources.length - 1];\n    } else {\n      this.observers.push(Listener);\n      this.observerSlots.push(Listener.sources.length - 1);\n    }\n  }\n  if (runningTransition && Transition.sources.has(this)) return this.tValue;\n  return this.value;\n}\nfunction writeSignal(node, value, isComp) {\n  let current = Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value;\n  if (!node.comparator || !node.comparator(current, value)) {\n    if (Transition) {\n      const TransitionRunning = Transition.running;\n      if (TransitionRunning || !isComp && Transition.sources.has(node)) {\n        Transition.sources.add(node);\n        node.tValue = value;\n      }\n      if (!TransitionRunning) node.value = value;\n    } else node.value = value;\n    if (node.observers && node.observers.length) {\n      runUpdates(() => {\n        for (let i = 0; i < node.observers.length; i += 1) {\n          const o = node.observers[i];\n          const TransitionRunning = Transition && Transition.running;\n          if (TransitionRunning && Transition.disposed.has(o)) continue;\n          if (TransitionRunning ? !o.tState : !o.state) {\n            if (o.pure) Updates.push(o);else Effects.push(o);\n            if (o.observers) markDownstream(o);\n          }\n          if (!TransitionRunning) o.state = STALE;else o.tState = STALE;\n        }\n        if (Updates.length > 10e5) {\n          Updates = [];\n          if (IS_DEV) ;\n          throw new Error();\n        }\n      }, false);\n    }\n  }\n  return value;\n}\nfunction updateComputation(node) {\n  if (!node.fn) return;\n  cleanNode(node);\n  const time = ExecCount;\n  runComputation(node, Transition && Transition.running && Transition.sources.has(node) ? node.tValue : node.value, time);\n  if (Transition && !Transition.running && Transition.sources.has(node)) {\n    queueMicrotask(() => {\n      runUpdates(() => {\n        Transition && (Transition.running = true);\n        Listener = Owner = node;\n        runComputation(node, node.tValue, time);\n        Listener = Owner = null;\n      }, false);\n    });\n  }\n}\nfunction runComputation(node, value, time) {\n  let nextValue;\n  const owner = Owner,\n    listener = Listener;\n  Listener = Owner = node;\n  try {\n    nextValue = node.fn(value);\n  } catch (err) {\n    if (node.pure) {\n      if (Transition && Transition.running) {\n        node.tState = STALE;\n        node.tOwned && node.tOwned.forEach(cleanNode);\n        node.tOwned = undefined;\n      } else {\n        node.state = STALE;\n        node.owned && node.owned.forEach(cleanNode);\n        node.owned = null;\n      }\n    }\n    node.updatedAt = time + 1;\n    return handleError(err);\n  } finally {\n    Listener = listener;\n    Owner = owner;\n  }\n  if (!node.updatedAt || node.updatedAt <= time) {\n    if (node.updatedAt != null && \"observers\" in node) {\n      writeSignal(node, nextValue, true);\n    } else if (Transition && Transition.running && node.pure) {\n      Transition.sources.add(node);\n      node.tValue = nextValue;\n    } else node.value = nextValue;\n    node.updatedAt = time;\n  }\n}\nfunction createComputation(fn, init, pure, state = STALE, options) {\n  const c = {\n    fn,\n    state: state,\n    updatedAt: null,\n    owned: null,\n    sources: null,\n    sourceSlots: null,\n    cleanups: null,\n    value: init,\n    owner: Owner,\n    context: Owner ? Owner.context : null,\n    pure\n  };\n  if (Transition && Transition.running) {\n    c.state = 0;\n    c.tState = state;\n  }\n  if (Owner === null) ;else if (Owner !== UNOWNED) {\n    if (Transition && Transition.running && Owner.pure) {\n      if (!Owner.tOwned) Owner.tOwned = [c];else Owner.tOwned.push(c);\n    } else {\n      if (!Owner.owned) Owner.owned = [c];else Owner.owned.push(c);\n    }\n  }\n  if (ExternalSourceConfig && c.fn) {\n    const [track, trigger] = createSignal(undefined, {\n      equals: false\n    });\n    const ordinary = ExternalSourceConfig.factory(c.fn, trigger);\n    onCleanup(() => ordinary.dispose());\n    const triggerInTransition = () => startTransition(trigger).then(() => inTransition.dispose());\n    const inTransition = ExternalSourceConfig.factory(c.fn, triggerInTransition);\n    c.fn = x => {\n      track();\n      return Transition && Transition.running ? inTransition.track(x) : ordinary.track(x);\n    };\n  }\n  return c;\n}\nfunction runTop(node) {\n  const runningTransition = Transition && Transition.running;\n  if ((runningTransition ? node.tState : node.state) === 0) return;\n  if ((runningTransition ? node.tState : node.state) === PENDING) return lookUpstream(node);\n  if (node.suspense && untrack(node.suspense.inFallback)) return node.suspense.effects.push(node);\n  const ancestors = [node];\n  while ((node = node.owner) && (!node.updatedAt || node.updatedAt < ExecCount)) {\n    if (runningTransition && Transition.disposed.has(node)) return;\n    if (runningTransition ? node.tState : node.state) ancestors.push(node);\n  }\n  for (let i = ancestors.length - 1; i >= 0; i--) {\n    node = ancestors[i];\n    if (runningTransition) {\n      let top = node,\n        prev = ancestors[i + 1];\n      while ((top = top.owner) && top !== prev) {\n        if (Transition.disposed.has(top)) return;\n      }\n    }\n    if ((runningTransition ? node.tState : node.state) === STALE) {\n      updateComputation(node);\n    } else if ((runningTransition ? node.tState : node.state) === PENDING) {\n      const updates = Updates;\n      Updates = null;\n      runUpdates(() => lookUpstream(node, ancestors[0]), false);\n      Updates = updates;\n    }\n  }\n}\nfunction runUpdates(fn, init) {\n  if (Updates) return fn();\n  let wait = false;\n  if (!init) Updates = [];\n  if (Effects) wait = true;else Effects = [];\n  ExecCount++;\n  try {\n    const res = fn();\n    completeUpdates(wait);\n    return res;\n  } catch (err) {\n    if (!wait) Effects = null;\n    Updates = null;\n    handleError(err);\n  }\n}\nfunction completeUpdates(wait) {\n  if (Updates) {\n    if (Scheduler && Transition && Transition.running) scheduleQueue(Updates);else runQueue(Updates);\n    Updates = null;\n  }\n  if (wait) return;\n  let res;\n  if (Transition) {\n    if (!Transition.promises.size && !Transition.queue.size) {\n      const sources = Transition.sources;\n      const disposed = Transition.disposed;\n      Effects.push.apply(Effects, Transition.effects);\n      res = Transition.resolve;\n      for (const e of Effects) {\n        \"tState\" in e && (e.state = e.tState);\n        delete e.tState;\n      }\n      Transition = null;\n      runUpdates(() => {\n        for (const d of disposed) cleanNode(d);\n        for (const v of sources) {\n          v.value = v.tValue;\n          if (v.owned) {\n            for (let i = 0, len = v.owned.length; i < len; i++) cleanNode(v.owned[i]);\n          }\n          if (v.tOwned) v.owned = v.tOwned;\n          delete v.tValue;\n          delete v.tOwned;\n          v.tState = 0;\n        }\n        setTransPending(false);\n      }, false);\n    } else if (Transition.running) {\n      Transition.running = false;\n      Transition.effects.push.apply(Transition.effects, Effects);\n      Effects = null;\n      setTransPending(true);\n      return;\n    }\n  }\n  const e = Effects;\n  Effects = null;\n  if (e.length) runUpdates(() => runEffects(e), false);\n  if (res) res();\n}\nfunction runQueue(queue) {\n  for (let i = 0; i < queue.length; i++) runTop(queue[i]);\n}\nfunction scheduleQueue(queue) {\n  for (let i = 0; i < queue.length; i++) {\n    const item = queue[i];\n    const tasks = Transition.queue;\n    if (!tasks.has(item)) {\n      tasks.add(item);\n      Scheduler(() => {\n        tasks.delete(item);\n        runUpdates(() => {\n          Transition.running = true;\n          runTop(item);\n        }, false);\n        Transition && (Transition.running = false);\n      });\n    }\n  }\n}\nfunction runUserEffects(queue) {\n  let i,\n    userLength = 0;\n  for (i = 0; i < queue.length; i++) {\n    const e = queue[i];\n    if (!e.user) runTop(e);else queue[userLength++] = e;\n  }\n  if (sharedConfig.context) {\n    if (sharedConfig.count) {\n      sharedConfig.effects || (sharedConfig.effects = []);\n      sharedConfig.effects.push(...queue.slice(0, userLength));\n      return;\n    }\n    setHydrateContext();\n  }\n  if (sharedConfig.effects && (sharedConfig.done || !sharedConfig.count)) {\n    queue = [...sharedConfig.effects, ...queue];\n    userLength += sharedConfig.effects.length;\n    delete sharedConfig.effects;\n  }\n  for (i = 0; i < userLength; i++) runTop(queue[i]);\n}\nfunction lookUpstream(node, ignore) {\n  const runningTransition = Transition && Transition.running;\n  if (runningTransition) node.tState = 0;else node.state = 0;\n  for (let i = 0; i < node.sources.length; i += 1) {\n    const source = node.sources[i];\n    if (source.sources) {\n      const state = runningTransition ? source.tState : source.state;\n      if (state === STALE) {\n        if (source !== ignore && (!source.updatedAt || source.updatedAt < ExecCount)) runTop(source);\n      } else if (state === PENDING) lookUpstream(source, ignore);\n    }\n  }\n}\nfunction markDownstream(node) {\n  const runningTransition = Transition && Transition.running;\n  for (let i = 0; i < node.observers.length; i += 1) {\n    const o = node.observers[i];\n    if (runningTransition ? !o.tState : !o.state) {\n      if (runningTransition) o.tState = PENDING;else o.state = PENDING;\n      if (o.pure) Updates.push(o);else Effects.push(o);\n      o.observers && markDownstream(o);\n    }\n  }\n}\nfunction cleanNode(node) {\n  let i;\n  if (node.sources) {\n    while (node.sources.length) {\n      const source = node.sources.pop(),\n        index = node.sourceSlots.pop(),\n        obs = source.observers;\n      if (obs && obs.length) {\n        const n = obs.pop(),\n          s = source.observerSlots.pop();\n        if (index < obs.length) {\n          n.sourceSlots[s] = index;\n          obs[index] = n;\n          source.observerSlots[index] = s;\n        }\n      }\n    }\n  }\n  if (node.tOwned) {\n    for (i = node.tOwned.length - 1; i >= 0; i--) cleanNode(node.tOwned[i]);\n    delete node.tOwned;\n  }\n  if (Transition && Transition.running && node.pure) {\n    reset(node, true);\n  } else if (node.owned) {\n    for (i = node.owned.length - 1; i >= 0; i--) cleanNode(node.owned[i]);\n    node.owned = null;\n  }\n  if (node.cleanups) {\n    for (i = node.cleanups.length - 1; i >= 0; i--) node.cleanups[i]();\n    node.cleanups = null;\n  }\n  if (Transition && Transition.running) node.tState = 0;else node.state = 0;\n}\nfunction reset(node, top) {\n  if (!top) {\n    node.tState = 0;\n    Transition.disposed.add(node);\n  }\n  if (node.owned) {\n    for (let i = 0; i < node.owned.length; i++) reset(node.owned[i]);\n  }\n}\nfunction castError(err) {\n  if (err instanceof Error) return err;\n  return new Error(typeof err === \"string\" ? err : \"Unknown error\", {\n    cause: err\n  });\n}\nfunction runErrors(err, fns, owner) {\n  try {\n    for (const f of fns) f(err);\n  } catch (e) {\n    handleError(e, owner && owner.owner || null);\n  }\n}\nfunction handleError(err, owner = Owner) {\n  const fns = ERROR && owner && owner.context && owner.context[ERROR];\n  const error = castError(err);\n  if (!fns) throw error;\n  if (Effects) Effects.push({\n    fn() {\n      runErrors(error, fns, owner);\n    },\n    state: STALE\n  });else runErrors(error, fns, owner);\n}\nfunction resolveChildren(children) {\n  if (typeof children === \"function\" && !children.length) return resolveChildren(children());\n  if (Array.isArray(children)) {\n    const results = [];\n    for (let i = 0; i < children.length; i++) {\n      const result = resolveChildren(children[i]);\n      Array.isArray(result) ? results.push.apply(results, result) : results.push(result);\n    }\n    return results;\n  }\n  return children;\n}\nfunction createProvider(id, options) {\n  return function provider(props) {\n    let res;\n    createRenderEffect(() => res = untrack(() => {\n      Owner.context = {\n        ...Owner.context,\n        [id]: props.value\n      };\n      return children(() => props.children);\n    }), undefined);\n    return res;\n  };\n}\nfunction onError(fn) {\n  ERROR || (ERROR = Symbol(\"error\"));\n  if (Owner === null) ;else if (Owner.context === null || !Owner.context[ERROR]) {\n    Owner.context = {\n      ...Owner.context,\n      [ERROR]: [fn]\n    };\n    mutateContext(Owner, ERROR, [fn]);\n  } else Owner.context[ERROR].push(fn);\n}\nfunction mutateContext(o, key, value) {\n  if (o.owned) {\n    for (let i = 0; i < o.owned.length; i++) {\n      if (o.owned[i].context === o.context) mutateContext(o.owned[i], key, value);\n      if (!o.owned[i].context) {\n        o.owned[i].context = o.context;\n        mutateContext(o.owned[i], key, value);\n      } else if (!o.owned[i].context[key]) {\n        o.owned[i].context[key] = value;\n        mutateContext(o.owned[i], key, value);\n      }\n    }\n  }\n}\n\nfunction observable(input) {\n  return {\n    subscribe(observer) {\n      if (!(observer instanceof Object) || observer == null) {\n        throw new TypeError(\"Expected the observer to be an object.\");\n      }\n      const handler = typeof observer === \"function\" ? observer : observer.next && observer.next.bind(observer);\n      if (!handler) {\n        return {\n          unsubscribe() {}\n        };\n      }\n      const dispose = createRoot(disposer => {\n        createEffect(() => {\n          const v = input();\n          untrack(() => handler(v));\n        });\n        return disposer;\n      });\n      if (getOwner()) onCleanup(dispose);\n      return {\n        unsubscribe() {\n          dispose();\n        }\n      };\n    },\n    [Symbol.observable || \"@@observable\"]() {\n      return this;\n    }\n  };\n}\nfunction from(producer, initalValue = undefined) {\n  const [s, set] = createSignal(initalValue, {\n    equals: false\n  });\n  if (\"subscribe\" in producer) {\n    const unsub = producer.subscribe(v => set(() => v));\n    onCleanup(() => \"unsubscribe\" in unsub ? unsub.unsubscribe() : unsub());\n  } else {\n    const clean = producer(set);\n    onCleanup(clean);\n  }\n  return s;\n}\n\nconst FALLBACK = Symbol(\"fallback\");\nfunction dispose(d) {\n  for (let i = 0; i < d.length; i++) d[i]();\n}\nfunction mapArray(list, mapFn, options = {}) {\n  let items = [],\n    mapped = [],\n    disposers = [],\n    len = 0,\n    indexes = mapFn.length > 1 ? [] : null;\n  onCleanup(() => dispose(disposers));\n  return () => {\n    let newItems = list() || [],\n      newLen = newItems.length,\n      i,\n      j;\n    newItems[$TRACK];\n    return untrack(() => {\n      let newIndices, newIndicesNext, temp, tempdisposers, tempIndexes, start, end, newEnd, item;\n      if (newLen === 0) {\n        if (len !== 0) {\n          dispose(disposers);\n          disposers = [];\n          items = [];\n          mapped = [];\n          len = 0;\n          indexes && (indexes = []);\n        }\n        if (options.fallback) {\n          items = [FALLBACK];\n          mapped[0] = createRoot(disposer => {\n            disposers[0] = disposer;\n            return options.fallback();\n          });\n          len = 1;\n        }\n      }\n      else if (len === 0) {\n        mapped = new Array(newLen);\n        for (j = 0; j < newLen; j++) {\n          items[j] = newItems[j];\n          mapped[j] = createRoot(mapper);\n        }\n        len = newLen;\n      } else {\n        temp = new Array(newLen);\n        tempdisposers = new Array(newLen);\n        indexes && (tempIndexes = new Array(newLen));\n        for (start = 0, end = Math.min(len, newLen); start < end && items[start] === newItems[start]; start++);\n        for (end = len - 1, newEnd = newLen - 1; end >= start && newEnd >= start && items[end] === newItems[newEnd]; end--, newEnd--) {\n          temp[newEnd] = mapped[end];\n          tempdisposers[newEnd] = disposers[end];\n          indexes && (tempIndexes[newEnd] = indexes[end]);\n        }\n        newIndices = new Map();\n        newIndicesNext = new Array(newEnd + 1);\n        for (j = newEnd; j >= start; j--) {\n          item = newItems[j];\n          i = newIndices.get(item);\n          newIndicesNext[j] = i === undefined ? -1 : i;\n          newIndices.set(item, j);\n        }\n        for (i = start; i <= end; i++) {\n          item = items[i];\n          j = newIndices.get(item);\n          if (j !== undefined && j !== -1) {\n            temp[j] = mapped[i];\n            tempdisposers[j] = disposers[i];\n            indexes && (tempIndexes[j] = indexes[i]);\n            j = newIndicesNext[j];\n            newIndices.set(item, j);\n          } else disposers[i]();\n        }\n        for (j = start; j < newLen; j++) {\n          if (j in temp) {\n            mapped[j] = temp[j];\n            disposers[j] = tempdisposers[j];\n            if (indexes) {\n              indexes[j] = tempIndexes[j];\n              indexes[j](j);\n            }\n          } else mapped[j] = createRoot(mapper);\n        }\n        mapped = mapped.slice(0, len = newLen);\n        items = newItems.slice(0);\n      }\n      return mapped;\n    });\n    function mapper(disposer) {\n      disposers[j] = disposer;\n      if (indexes) {\n        const [s, set] = createSignal(j);\n        indexes[j] = set;\n        return mapFn(newItems[j], s);\n      }\n      return mapFn(newItems[j]);\n    }\n  };\n}\nfunction indexArray(list, mapFn, options = {}) {\n  let items = [],\n    mapped = [],\n    disposers = [],\n    signals = [],\n    len = 0,\n    i;\n  onCleanup(() => dispose(disposers));\n  return () => {\n    const newItems = list() || [],\n      newLen = newItems.length;\n    newItems[$TRACK];\n    return untrack(() => {\n      if (newLen === 0) {\n        if (len !== 0) {\n          dispose(disposers);\n          disposers = [];\n          items = [];\n          mapped = [];\n          len = 0;\n          signals = [];\n        }\n        if (options.fallback) {\n          items = [FALLBACK];\n          mapped[0] = createRoot(disposer => {\n            disposers[0] = disposer;\n            return options.fallback();\n          });\n          len = 1;\n        }\n        return mapped;\n      }\n      if (items[0] === FALLBACK) {\n        disposers[0]();\n        disposers = [];\n        items = [];\n        mapped = [];\n        len = 0;\n      }\n      for (i = 0; i < newLen; i++) {\n        if (i < items.length && items[i] !== newItems[i]) {\n          signals[i](() => newItems[i]);\n        } else if (i >= items.length) {\n          mapped[i] = createRoot(mapper);\n        }\n      }\n      for (; i < items.length; i++) {\n        disposers[i]();\n      }\n      len = signals.length = disposers.length = newLen;\n      items = newItems.slice(0);\n      return mapped = mapped.slice(0, len);\n    });\n    function mapper(disposer) {\n      disposers[i] = disposer;\n      const [s, set] = createSignal(newItems[i]);\n      signals[i] = set;\n      return mapFn(s, i);\n    }\n  };\n}\n\nlet hydrationEnabled = false;\nfunction enableHydration() {\n  hydrationEnabled = true;\n}\nfunction createComponent(Comp, props) {\n  if (hydrationEnabled) {\n    if (sharedConfig.context) {\n      const c = sharedConfig.context;\n      setHydrateContext(nextHydrateContext());\n      const r = untrack(() => Comp(props || {}));\n      setHydrateContext(c);\n      return r;\n    }\n  }\n  return untrack(() => Comp(props || {}));\n}\nfunction trueFn() {\n  return true;\n}\nconst propTraps = {\n  get(_, property, receiver) {\n    if (property === $PROXY) return receiver;\n    return _.get(property);\n  },\n  has(_, property) {\n    if (property === $PROXY) return true;\n    return _.has(property);\n  },\n  set: trueFn,\n  deleteProperty: trueFn,\n  getOwnPropertyDescriptor(_, property) {\n    return {\n      configurable: true,\n      enumerable: true,\n      get() {\n        return _.get(property);\n      },\n      set: trueFn,\n      deleteProperty: trueFn\n    };\n  },\n  ownKeys(_) {\n    return _.keys();\n  }\n};\nfunction resolveSource(s) {\n  return !(s = typeof s === \"function\" ? s() : s) ? {} : s;\n}\nfunction resolveSources() {\n  for (let i = 0, length = this.length; i < length; ++i) {\n    const v = this[i]();\n    if (v !== undefined) return v;\n  }\n}\nfunction mergeProps(...sources) {\n  let proxy = false;\n  for (let i = 0; i < sources.length; i++) {\n    const s = sources[i];\n    proxy = proxy || !!s && $PROXY in s;\n    sources[i] = typeof s === \"function\" ? (proxy = true, createMemo(s)) : s;\n  }\n  if (SUPPORTS_PROXY && proxy) {\n    return new Proxy({\n      get(property) {\n        for (let i = sources.length - 1; i >= 0; i--) {\n          const v = resolveSource(sources[i])[property];\n          if (v !== undefined) return v;\n        }\n      },\n      has(property) {\n        for (let i = sources.length - 1; i >= 0; i--) {\n          if (property in resolveSource(sources[i])) return true;\n        }\n        return false;\n      },\n      keys() {\n        const keys = [];\n        for (let i = 0; i < sources.length; i++) keys.push(...Object.keys(resolveSource(sources[i])));\n        return [...new Set(keys)];\n      }\n    }, propTraps);\n  }\n  const sourcesMap = {};\n  const defined = Object.create(null);\n  for (let i = sources.length - 1; i >= 0; i--) {\n    const source = sources[i];\n    if (!source) continue;\n    const sourceKeys = Object.getOwnPropertyNames(source);\n    for (let i = sourceKeys.length - 1; i >= 0; i--) {\n      const key = sourceKeys[i];\n      if (key === \"__proto__\" || key === \"constructor\") continue;\n      const desc = Object.getOwnPropertyDescriptor(source, key);\n      if (!defined[key]) {\n        defined[key] = desc.get ? {\n          enumerable: true,\n          configurable: true,\n          get: resolveSources.bind(sourcesMap[key] = [desc.get.bind(source)])\n        } : desc.value !== undefined ? desc : undefined;\n      } else {\n        const sources = sourcesMap[key];\n        if (sources) {\n          if (desc.get) sources.push(desc.get.bind(source));else if (desc.value !== undefined) sources.push(() => desc.value);\n        }\n      }\n    }\n  }\n  const target = {};\n  const definedKeys = Object.keys(defined);\n  for (let i = definedKeys.length - 1; i >= 0; i--) {\n    const key = definedKeys[i],\n      desc = defined[key];\n    if (desc && desc.get) Object.defineProperty(target, key, desc);else target[key] = desc ? desc.value : undefined;\n  }\n  return target;\n}\nfunction splitProps(props, ...keys) {\n  if (SUPPORTS_PROXY && $PROXY in props) {\n    const blocked = new Set(keys.length > 1 ? keys.flat() : keys[0]);\n    const res = keys.map(k => {\n      return new Proxy({\n        get(property) {\n          return k.includes(property) ? props[property] : undefined;\n        },\n        has(property) {\n          return k.includes(property) && property in props;\n        },\n        keys() {\n          return k.filter(property => property in props);\n        }\n      }, propTraps);\n    });\n    res.push(new Proxy({\n      get(property) {\n        return blocked.has(property) ? undefined : props[property];\n      },\n      has(property) {\n        return blocked.has(property) ? false : property in props;\n      },\n      keys() {\n        return Object.keys(props).filter(k => !blocked.has(k));\n      }\n    }, propTraps));\n    return res;\n  }\n  const otherObject = {};\n  const objects = keys.map(() => ({}));\n  for (const propName of Object.getOwnPropertyNames(props)) {\n    const desc = Object.getOwnPropertyDescriptor(props, propName);\n    const isDefaultDesc = !desc.get && !desc.set && desc.enumerable && desc.writable && desc.configurable;\n    let blocked = false;\n    let objectIndex = 0;\n    for (const k of keys) {\n      if (k.includes(propName)) {\n        blocked = true;\n        isDefaultDesc ? objects[objectIndex][propName] = desc.value : Object.defineProperty(objects[objectIndex], propName, desc);\n      }\n      ++objectIndex;\n    }\n    if (!blocked) {\n      isDefaultDesc ? otherObject[propName] = desc.value : Object.defineProperty(otherObject, propName, desc);\n    }\n  }\n  return [...objects, otherObject];\n}\nfunction lazy(fn) {\n  let comp;\n  let p;\n  const wrap = props => {\n    const ctx = sharedConfig.context;\n    if (ctx) {\n      const [s, set] = createSignal();\n      sharedConfig.count || (sharedConfig.count = 0);\n      sharedConfig.count++;\n      (p || (p = fn())).then(mod => {\n        !sharedConfig.done && setHydrateContext(ctx);\n        sharedConfig.count--;\n        set(() => mod.default);\n        setHydrateContext();\n      });\n      comp = s;\n    } else if (!comp) {\n      const [s] = createResource(() => (p || (p = fn())).then(mod => mod.default));\n      comp = s;\n    }\n    let Comp;\n    return createMemo(() => (Comp = comp()) ? untrack(() => {\n      if (IS_DEV) ;\n      if (!ctx || sharedConfig.done) return Comp(props);\n      const c = sharedConfig.context;\n      setHydrateContext(ctx);\n      const r = Comp(props);\n      setHydrateContext(c);\n      return r;\n    }) : \"\");\n  };\n  wrap.preload = () => p || ((p = fn()).then(mod => comp = () => mod.default), p);\n  return wrap;\n}\nlet counter = 0;\nfunction createUniqueId() {\n  const ctx = sharedConfig.context;\n  return ctx ? sharedConfig.getNextContextId() : `cl-${counter++}`;\n}\n\nconst narrowedError = name => `Stale read from <${name}>.`;\nfunction For(props) {\n  const fallback = \"fallback\" in props && {\n    fallback: () => props.fallback\n  };\n  return createMemo(mapArray(() => props.each, props.children, fallback || undefined));\n}\nfunction Index(props) {\n  const fallback = \"fallback\" in props && {\n    fallback: () => props.fallback\n  };\n  return createMemo(indexArray(() => props.each, props.children, fallback || undefined));\n}\nfunction Show(props) {\n  const keyed = props.keyed;\n  const conditionValue = createMemo(() => props.when, undefined, undefined);\n  const condition = keyed ? conditionValue : createMemo(conditionValue, undefined, {\n    equals: (a, b) => !a === !b\n  });\n  return createMemo(() => {\n    const c = condition();\n    if (c) {\n      const child = props.children;\n      const fn = typeof child === \"function\" && child.length > 0;\n      return fn ? untrack(() => child(keyed ? c : () => {\n        if (!untrack(condition)) throw narrowedError(\"Show\");\n        return conditionValue();\n      })) : child;\n    }\n    return props.fallback;\n  }, undefined, undefined);\n}\nfunction Switch(props) {\n  const chs = children(() => props.children);\n  const switchFunc = createMemo(() => {\n    const ch = chs();\n    const mps = Array.isArray(ch) ? ch : [ch];\n    let func = () => undefined;\n    for (let i = 0; i < mps.length; i++) {\n      const index = i;\n      const mp = mps[i];\n      const prevFunc = func;\n      const conditionValue = createMemo(() => prevFunc() ? undefined : mp.when, undefined, undefined);\n      const condition = mp.keyed ? conditionValue : createMemo(conditionValue, undefined, {\n        equals: (a, b) => !a === !b\n      });\n      func = () => prevFunc() || (condition() ? [index, conditionValue, mp] : undefined);\n    }\n    return func;\n  });\n  return createMemo(() => {\n    const sel = switchFunc()();\n    if (!sel) return props.fallback;\n    const [index, conditionValue, mp] = sel;\n    const child = mp.children;\n    const fn = typeof child === \"function\" && child.length > 0;\n    return fn ? untrack(() => child(mp.keyed ? conditionValue() : () => {\n      if (untrack(switchFunc)()?.[0] !== index) throw narrowedError(\"Match\");\n      return conditionValue();\n    })) : child;\n  }, undefined, undefined);\n}\nfunction Match(props) {\n  return props;\n}\nlet Errors;\nfunction resetErrorBoundaries() {\n  Errors && [...Errors].forEach(fn => fn());\n}\nfunction ErrorBoundary(props) {\n  let err;\n  if (sharedConfig.context && sharedConfig.load) err = sharedConfig.load(sharedConfig.getContextId());\n  const [errored, setErrored] = createSignal(err, undefined);\n  Errors || (Errors = new Set());\n  Errors.add(setErrored);\n  onCleanup(() => Errors.delete(setErrored));\n  return createMemo(() => {\n    let e;\n    if (e = errored()) {\n      const f = props.fallback;\n      return typeof f === \"function\" && f.length ? untrack(() => f(e, () => setErrored())) : f;\n    }\n    return catchError(() => props.children, setErrored);\n  }, undefined, undefined);\n}\n\nconst suspenseListEquals = (a, b) => a.showContent === b.showContent && a.showFallback === b.showFallback;\nconst SuspenseListContext = /* #__PURE__ */createContext();\nfunction SuspenseList(props) {\n  let [wrapper, setWrapper] = createSignal(() => ({\n      inFallback: false\n    })),\n    show;\n  const listContext = useContext(SuspenseListContext);\n  const [registry, setRegistry] = createSignal([]);\n  if (listContext) {\n    show = listContext.register(createMemo(() => wrapper()().inFallback));\n  }\n  const resolved = createMemo(prev => {\n    const reveal = props.revealOrder,\n      tail = props.tail,\n      {\n        showContent = true,\n        showFallback = true\n      } = show ? show() : {},\n      reg = registry(),\n      reverse = reveal === \"backwards\";\n    if (reveal === \"together\") {\n      const all = reg.every(inFallback => !inFallback());\n      const res = reg.map(() => ({\n        showContent: all && showContent,\n        showFallback\n      }));\n      res.inFallback = !all;\n      return res;\n    }\n    let stop = false;\n    let inFallback = prev.inFallback;\n    const res = [];\n    for (let i = 0, len = reg.length; i < len; i++) {\n      const n = reverse ? len - i - 1 : i,\n        s = reg[n]();\n      if (!stop && !s) {\n        res[n] = {\n          showContent,\n          showFallback\n        };\n      } else {\n        const next = !stop;\n        if (next) inFallback = true;\n        res[n] = {\n          showContent: next,\n          showFallback: !tail || next && tail === \"collapsed\" ? showFallback : false\n        };\n        stop = true;\n      }\n    }\n    if (!stop) inFallback = false;\n    res.inFallback = inFallback;\n    return res;\n  }, {\n    inFallback: false\n  });\n  setWrapper(() => resolved);\n  return createComponent(SuspenseListContext.Provider, {\n    value: {\n      register: inFallback => {\n        let index;\n        setRegistry(registry => {\n          index = registry.length;\n          return [...registry, inFallback];\n        });\n        return createMemo(() => resolved()[index], undefined, {\n          equals: suspenseListEquals\n        });\n      }\n    },\n    get children() {\n      return props.children;\n    }\n  });\n}\nfunction Suspense(props) {\n  let counter = 0,\n    show,\n    ctx,\n    p,\n    flicker,\n    error;\n  const [inFallback, setFallback] = createSignal(false),\n    SuspenseContext = getSuspenseContext(),\n    store = {\n      increment: () => {\n        if (++counter === 1) setFallback(true);\n      },\n      decrement: () => {\n        if (--counter === 0) setFallback(false);\n      },\n      inFallback,\n      effects: [],\n      resolved: false\n    },\n    owner = getOwner();\n  if (sharedConfig.context && sharedConfig.load) {\n    const key = sharedConfig.getContextId();\n    let ref = sharedConfig.load(key);\n    if (ref) {\n      if (typeof ref !== \"object\" || ref.s !== 1) p = ref;else sharedConfig.gather(key);\n    }\n    if (p && p !== \"$$f\") {\n      const [s, set] = createSignal(undefined, {\n        equals: false\n      });\n      flicker = s;\n      p.then(() => {\n        if (sharedConfig.done) return set();\n        sharedConfig.gather(key);\n        setHydrateContext(ctx);\n        set();\n        setHydrateContext();\n      }, err => {\n        error = err;\n        set();\n      });\n    }\n  }\n  const listContext = useContext(SuspenseListContext);\n  if (listContext) show = listContext.register(store.inFallback);\n  let dispose;\n  onCleanup(() => dispose && dispose());\n  return createComponent(SuspenseContext.Provider, {\n    value: store,\n    get children() {\n      return createMemo(() => {\n        if (error) throw error;\n        ctx = sharedConfig.context;\n        if (flicker) {\n          flicker();\n          return flicker = undefined;\n        }\n        if (ctx && p === \"$$f\") setHydrateContext();\n        const rendered = createMemo(() => props.children);\n        return createMemo(prev => {\n          const inFallback = store.inFallback(),\n            {\n              showContent = true,\n              showFallback = true\n            } = show ? show() : {};\n          if ((!inFallback || p && p !== \"$$f\") && showContent) {\n            store.resolved = true;\n            dispose && dispose();\n            dispose = ctx = p = undefined;\n            resumeEffects(store.effects);\n            return rendered();\n          }\n          if (!showFallback) return;\n          if (dispose) return prev;\n          return createRoot(disposer => {\n            dispose = disposer;\n            if (ctx) {\n              setHydrateContext({\n                id: ctx.id + \"F\",\n                count: 0\n              });\n              ctx = undefined;\n            }\n            return props.fallback;\n          }, owner);\n        });\n      });\n    }\n  });\n}\n\nconst DEV = undefined;\n\nexport { $DEVCOMP, $PROXY, $TRACK, DEV, ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, batch, cancelCallback, catchError, children, createComponent, createComputed, createContext, createDeferred, createEffect, createMemo, createReaction, createRenderEffect, createResource, createRoot, createSelector, createSignal, createUniqueId, enableExternalSource, enableHydration, enableScheduling, equalFn, from, getListener, getOwner, indexArray, lazy, mapArray, mergeProps, observable, on, onCleanup, onError, onMount, requestCallback, resetErrorBoundaries, runWithOwner, sharedConfig, splitProps, startTransition, untrack, useContext, useTransition };\n","// @generated by Peggy 5.0.6.\n//\n// https://peggyjs.org/\n\n\nclass peg$SyntaxError extends SyntaxError {\n    constructor(message, expected, found, location) {\n        super(message);\n        this.expected = expected;\n        this.found = found;\n        this.location = location;\n        this.name = \"SyntaxError\";\n    }\n\n    format(sources) {\n        let str = \"Error: \" + this.message;\n        if (this.location) {\n            let src = null;\n            const st = sources.find(s => s.source === this.location.source);\n            if (st) {\n                src = st.text.split(/\\r\\n|\\n|\\r/g);\n            }\n            const s = this.location.start;\n            const offset_s = (this.location.source && (typeof this.location.source.offset === \"function\"))\n                ? this.location.source.offset(s)\n                : s;\n            const loc = this.location.source + \":\" + offset_s.line + \":\" + offset_s.column;\n            if (src) {\n                const e = this.location.end;\n                const filler = \"\".padEnd(offset_s.line.toString().length, \" \");\n                const line = src[s.line - 1];\n                const last = s.line === e.line ? e.column : line.length + 1;\n                const hatLen = (last - s.column) || 1;\n                str += \"\\n --> \" + loc + \"\\n\"\n            + filler + \" |\\n\"\n            + offset_s.line + \" | \" + line + \"\\n\"\n            + filler + \" | \" + \"\".padEnd(s.column - 1, \" \")\n            + \"\".padEnd(hatLen, \"^\");\n            } else {\n                str += \"\\n at \" + loc;\n            }\n        }\n        return str;\n    }\n\n    static buildMessage(expected, found) {\n        function hex(ch) {\n            return ch.codePointAt(0).toString(16).toUpperCase();\n        }\n\n        const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, \"unicode\")\n            ? new RegExp(\"[\\\\p{C}\\\\p{Mn}\\\\p{Mc}]\", \"gu\")\n            : null;\n        function unicodeEscape(s) {\n            if (nonPrintable) {\n                return s.replace(nonPrintable,  ch => \"\\\\u{\" + hex(ch) + \"}\");\n            }\n            return s;\n        }\n\n        function literalEscape(s) {\n            return unicodeEscape(s\n                .replace(/\\\\/g, \"\\\\\\\\\")\n                .replace(/\"/g,  \"\\\\\\\"\")\n                .replace(/\\0/g, \"\\\\0\")\n                .replace(/\\t/g, \"\\\\t\")\n                .replace(/\\n/g, \"\\\\n\")\n                .replace(/\\r/g, \"\\\\r\")\n                .replace(/[\\x00-\\x0F]/g,          ch => \"\\\\x0\" + hex(ch))\n                .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, ch => \"\\\\x\"  + hex(ch)));\n        }\n\n        function classEscape(s) {\n            return unicodeEscape(s\n                .replace(/\\\\/g, \"\\\\\\\\\")\n                .replace(/\\]/g, \"\\\\]\")\n                .replace(/\\^/g, \"\\\\^\")\n                .replace(/-/g,  \"\\\\-\")\n                .replace(/\\0/g, \"\\\\0\")\n                .replace(/\\t/g, \"\\\\t\")\n                .replace(/\\n/g, \"\\\\n\")\n                .replace(/\\r/g, \"\\\\r\")\n                .replace(/[\\x00-\\x0F]/g,          ch => \"\\\\x0\" + hex(ch))\n                .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, ch => \"\\\\x\"  + hex(ch)));\n        }\n\n        const DESCRIBE_EXPECTATION_FNS = {\n            literal(expectation) {\n                return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n            },\n\n            class(expectation) {\n                const escapedParts = expectation.parts.map(\n                    part => (Array.isArray(part)\n                        ? classEscape(part[0]) + \"-\" + classEscape(part[1])\n                        : classEscape(part))\n                );\n\n                return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts.join(\"\") + \"]\" + (expectation.unicode ? \"u\" : \"\");\n            },\n\n            any() {\n                return \"any character\";\n            },\n\n            end() {\n                return \"end of input\";\n            },\n\n            other(expectation) {\n                return expectation.description;\n            },\n        };\n\n        function describeExpectation(expectation) {\n            return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n        }\n\n        function describeExpected(expected) {\n            const descriptions = expected.map(describeExpectation);\n            descriptions.sort();\n\n            if (descriptions.length > 0) {\n                let j = 1;\n                for (let i = 1; i < descriptions.length; i++) {\n                    if (descriptions[i - 1] !== descriptions[i]) {\n                        descriptions[j] = descriptions[i];\n                        j++;\n                    }\n                }\n                descriptions.length = j;\n            }\n\n            switch (descriptions.length) {\n            case 1:\n                return descriptions[0];\n\n            case 2:\n                return descriptions[0] + \" or \" + descriptions[1];\n\n            default:\n                return descriptions.slice(0, -1).join(\", \")\n            + \", or \"\n            + descriptions[descriptions.length - 1];\n            }\n        }\n\n        function describeFound(found) {\n            return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n        }\n\n        return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n    }\n}\n\nfunction peg$parse(input, options) {\n    options = options !== undefined ? options : {};\n\n    const peg$FAILED = {};\n    const peg$source = options.grammarSource;\n\n    const peg$startRuleFunctions = {\n        array: peg$parsearray,\n    };\n    let peg$startRuleFunction = peg$parsearray;\n\n    const peg$c0 = \"[\";\n    const peg$c1 = \"]\";\n\n    const peg$r0 = /^[[\\]]/;\n\n    const peg$e0 = peg$literalExpectation(\"[\", false);\n    const peg$e1 = peg$literalExpectation(\"]\", false);\n    const peg$e2 = peg$classExpectation([\"[\", \"]\"], false, false, false);\n    const peg$e3 = peg$anyExpectation();\n\n    function peg$f0(value) {    return () => value;  }\n    function peg$f1(value) {    return value;  }\n    function peg$f2(value) {\n        for (const item of value) {\n    \tif (typeof item === 'function') {\n        \tvalue.splice(value.indexOf(item), 1, ...item());\n            }\n        }\n    \n        return value;\n    }\n    function peg$f3(value) {    return value.flat(1).filter(Boolean);  }\n    let peg$currPos = options.peg$currPos | 0;\n    let peg$savedPos = peg$currPos;\n    const peg$posDetailsCache = [{ line: 1, column: 1 }];\n    let peg$maxFailPos = peg$currPos;\n    let peg$maxFailExpected = options.peg$maxFailExpected || [];\n    let peg$silentFails = options.peg$silentFails | 0;\n\n    let peg$result;\n\n    if (options.startRule) {\n        if (!(options.startRule in peg$startRuleFunctions)) {\n            throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n        }\n\n        peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n    }\n\n    function peg$getUnicode(pos = peg$currPos) {\n        const cp = input.codePointAt(pos);\n        if (cp === undefined) {\n            return \"\";\n        }\n        return String.fromCodePoint(cp);\n    }\n\n    function peg$literalExpectation(text, ignoreCase) {\n        return { type: \"literal\", text, ignoreCase };\n    }\n\n    function peg$classExpectation(parts, inverted, ignoreCase, unicode) {\n        return { type: \"class\", parts, inverted, ignoreCase, unicode };\n    }\n\n    function peg$anyExpectation() {\n        return { type: \"any\" };\n    }\n\n    function peg$endExpectation() {\n        return { type: \"end\" };\n    }\n\n    function peg$computePosDetails(pos) {\n        let details = peg$posDetailsCache[pos];\n        let p;\n\n        if (details) {\n            return details;\n        } else {\n            if (pos >= peg$posDetailsCache.length) {\n                p = peg$posDetailsCache.length - 1;\n            } else {\n                p = pos;\n                while (!peg$posDetailsCache[--p]) {}\n            }\n\n            details = peg$posDetailsCache[p];\n            details = {\n                line: details.line,\n                column: details.column,\n            };\n\n            while (p < pos) {\n                if (input.charCodeAt(p) === 10) {\n                    details.line++;\n                    details.column = 1;\n                } else {\n                    details.column++;\n                }\n\n                p++;\n            }\n\n            peg$posDetailsCache[pos] = details;\n\n            return details;\n        }\n    }\n\n    function peg$computeLocation(startPos, endPos, offset) {\n        const startPosDetails = peg$computePosDetails(startPos);\n        const endPosDetails = peg$computePosDetails(endPos);\n\n        const res = {\n            source: peg$source,\n            start: {\n                offset: startPos,\n                line: startPosDetails.line,\n                column: startPosDetails.column,\n            },\n            end: {\n                offset: endPos,\n                line: endPosDetails.line,\n                column: endPosDetails.column,\n            },\n        };\n        if (offset && peg$source && (typeof peg$source.offset === \"function\")) {\n            res.start = peg$source.offset(res.start);\n            res.end = peg$source.offset(res.end);\n        }\n        return res;\n    }\n\n    function peg$fail(expected) {\n        if (peg$currPos < peg$maxFailPos) { return; }\n\n        if (peg$currPos > peg$maxFailPos) {\n            peg$maxFailPos = peg$currPos;\n            peg$maxFailExpected = [];\n        }\n\n        peg$maxFailExpected.push(expected);\n    }\n\n    function peg$buildStructuredError(expected, found, location) {\n        return new peg$SyntaxError(\n            peg$SyntaxError.buildMessage(expected, found),\n            expected,\n            found,\n            location\n        );\n    }\n\n    function peg$parsearray() {\n        let s0, s1, s2, s3, s4, s5;\n\n        s0 = peg$currPos;\n        s1 = [];\n        s2 = peg$currPos;\n        s3 = peg$parsestring();\n        if (s3 !== peg$FAILED) {\n            peg$savedPos = s2;\n            s3 = peg$f0(s3);\n        }\n        s2 = s3;\n        if (s2 === peg$FAILED) {\n            s2 = peg$currPos;\n            if (input.charCodeAt(peg$currPos) === 91) {\n                s3 = peg$c0;\n                peg$currPos++;\n            } else {\n                s3 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$e0); }\n            }\n            if (s3 !== peg$FAILED) {\n                s4 = peg$parsearray();\n                if (input.charCodeAt(peg$currPos) === 93) {\n                    s5 = peg$c1;\n                    peg$currPos++;\n                } else {\n                    s5 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$e1); }\n                }\n                if (s5 !== peg$FAILED) {\n                    peg$savedPos = s2;\n                    s2 = peg$f1(s4);\n                } else {\n                    peg$currPos = s2;\n                    s2 = peg$FAILED;\n                }\n            } else {\n                peg$currPos = s2;\n                s2 = peg$FAILED;\n            }\n        }\n        while (s2 !== peg$FAILED) {\n            s1.push(s2);\n            s2 = peg$currPos;\n            s3 = peg$parsestring();\n            if (s3 !== peg$FAILED) {\n                peg$savedPos = s2;\n                s3 = peg$f0(s3);\n            }\n            s2 = s3;\n            if (s2 === peg$FAILED) {\n                s2 = peg$currPos;\n                if (input.charCodeAt(peg$currPos) === 91) {\n                    s3 = peg$c0;\n                    peg$currPos++;\n                } else {\n                    s3 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$e0); }\n                }\n                if (s3 !== peg$FAILED) {\n                    s4 = peg$parsearray();\n                    if (input.charCodeAt(peg$currPos) === 93) {\n                        s5 = peg$c1;\n                        peg$currPos++;\n                    } else {\n                        s5 = peg$FAILED;\n                        if (peg$silentFails === 0) { peg$fail(peg$e1); }\n                    }\n                    if (s5 !== peg$FAILED) {\n                        peg$savedPos = s2;\n                        s2 = peg$f1(s4);\n                    } else {\n                        peg$currPos = s2;\n                        s2 = peg$FAILED;\n                    }\n                } else {\n                    peg$currPos = s2;\n                    s2 = peg$FAILED;\n                }\n            }\n        }\n        peg$savedPos = s0;\n        s1 = peg$f2(s1);\n        s0 = s1;\n\n        return s0;\n    }\n\n    function peg$parsestring() {\n        let s0, s1, s2;\n\n        s0 = peg$currPos;\n        s1 = [];\n        s2 = peg$parsechar();\n        if (s2 !== peg$FAILED) {\n            while (s2 !== peg$FAILED) {\n                s1.push(s2);\n                s2 = peg$parsechar();\n            }\n        } else {\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$f3(s1);\n        }\n        s0 = s1;\n\n        return s0;\n    }\n\n    function peg$parsechar() {\n        let s0, s1, s2;\n\n        s0 = peg$currPos;\n        s1 = peg$currPos;\n        peg$silentFails++;\n        s2 = input.charAt(peg$currPos);\n        if (peg$r0.test(s2)) {\n            peg$currPos++;\n        } else {\n            s2 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$e2); }\n        }\n        peg$silentFails--;\n        if (s2 === peg$FAILED) {\n            s1 = undefined;\n        } else {\n            peg$currPos = s1;\n            s1 = peg$FAILED;\n        }\n        if (s1 !== peg$FAILED) {\n            if (input.length > peg$currPos) {\n                s2 = input.charAt(peg$currPos);\n                peg$currPos++;\n            } else {\n                s2 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$e3); }\n            }\n            if (s2 !== peg$FAILED) {\n                s1 = [s1, s2];\n                s0 = s1;\n            } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n            }\n        } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n        }\n\n        return s0;\n    }\n\n    peg$result = peg$startRuleFunction();\n\n    const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);\n    function peg$throw() {\n        if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n            peg$fail(peg$endExpectation());\n        }\n\n        throw peg$buildStructuredError(\n            peg$maxFailExpected,\n            peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null,\n            peg$maxFailPos < input.length\n                ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n                : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n        );\n    }\n    if (options.peg$library) {\n        return /** @type {any} */ ({\n            peg$result,\n            peg$currPos,\n            peg$FAILED,\n            peg$maxFailExpected,\n            peg$maxFailPos,\n            peg$success,\n            peg$throw: peg$success ? undefined : peg$throw,\n        });\n    }\n    if (peg$success) {\n        return peg$result;\n    } else {\n        peg$throw();\n    }\n}\n\nconst peg$allowedStartRules = [\n    \"array\"\n];\n\nexport {\n    peg$parse as parse, peg$allowedStartRules as StartRules,\n    peg$SyntaxError as SyntaxError\n};\n\n","import { parse } from './parser';\n\n/**\n * A single digitized value.\n * \n * @public\n */\nexport type DigitizedValue = string;\n\n/**\n * An array of digitized values.\n * \n * @public\n */\nexport type DigitizedValues = (DigitizedValue | DigitizedValues)[];\n\n/**\n * The default empty character for digitization.\n * \n * @public\n */\nexport const EMPTY_CHAR = ' ';\n\n/**\n * The return type for `useDigitizer()`.\n * \n * @public\n */\nexport type UseDigitizer = {\n    digitize: (value: any) => DigitizedValues;\n    isDigitized: (value: any) => boolean;\n}\n\n/**\n * Create a digiter that can be used to convert a string into arrays of\n * individual characters.\n * \n * @public\n */\nexport function useDigitizer(): UseDigitizer {\n    /**\n     * Parse a string, number or an array into `DigitizedValues`.\n     * \n     * @public\n     */\n    function digitize(value?: number | string | DigitizedValue | DigitizedValues): DigitizedValues {\n        if (value === undefined) {\n            return [];\n        }\n\n        if (typeof value === 'string') {\n            return value.match(/\\[|\\]/) ? parse(value) : Array.from(value);\n        }\n\n        if (typeof value === 'number') {\n            return Array.from(value.toString());\n        }\n\n        for (const item of value) {\n            const index = value.indexOf(item);\n            const response = digitize(item);\n\n            if (typeof item == 'string') {\n                value.splice(index, 1, ...response);\n            }\n            else {\n                value.splice(index, 1, response);\n            }\n        }\n\n        return value.filter(Boolean);\n    }\n\n    /**\n     * Check if the value is the type `DigitizedValues`.\n     * \n     * @public\n     */\n    function isDigitized(value: any): boolean {\n        if (!Array.isArray(value)) {\n            return false;\n        }\n\n        for (const i in value) {\n            if (typeof value[i] === 'string' && value[i].length === 1) {\n                continue;\n            }\n\n            if (!Array.isArray(value[i])) {\n                return false;\n            }\n            else if (!value[i].length) {\n                continue;\n            }\n\n            if (!isDigitized(value[i])) {\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    return {\n        digitize,\n        isDigitized\n    };\n}\n","import { type DigitizedValue, type DigitizedValues } from './digitizer';\n\n/**\n * The options for matchArrayStructure().\n * \n * @public\n */\n\nexport type MatchArrayStructureOptions = {\n    backwards?: boolean;\n}\n\n/**\n * The callback for matchArrayStructure().\n * \n * @public\n */\nexport type MatchArrayStructureCallback = Callback<[value?: DigitizedValue, target?: DigitizedValue | DigitizedValues], DigitizedValue | undefined>\n\n/**\n * Match the structure of the current value to the target.\n * \n * @public\n */\nexport function matchArrayStructure(current: DigitizedValues, target: DigitizedValues, fn?: MatchArrayStructureCallback): DigitizedValues\nexport function matchArrayStructure(current: DigitizedValues, target: DigitizedValues, options: MatchArrayStructureOptions | undefined, fn?: MatchArrayStructureCallback): DigitizedValues\nexport function matchArrayStructure(current: DigitizedValues, target: DigitizedValues, options?: MatchArrayStructureOptions | MatchArrayStructureCallback, fn?: MatchArrayStructureCallback): DigitizedValues {\n    // Allow for the method overloading. If options is a function, assign it.\n    if (typeof options === 'function') {\n        fn = options;\n        options = {};\n    }\n    else if (!options) {\n        options = {};\n    }\n    \n    const forwards = !options.backwards;\n        \n    function recurse(current: DigitizedValues | DigitizedValue | undefined, target: DigitizedValues | DigitizedValue): DigitizedValues | DigitizedValue | undefined {\n        // If target is a digit group, then loop through them and recursively\n        // iterate over the groups.\n        if (isDigitizedGroup(target)) {\n            // Cast the current value to a digitized group.\n            current = castDigitizedGroup(current);\n\n            // Loop through the current using the max length of target and\n            // current. This recursively interates through the arrays\n            // regardless of which is longer.\n            const length = Math.max(target.length, current.length);\n          \n            for (let i = forwards ? 0 : length - 1; forwards ? i < length : i >= 0; forwards ? i++ : i--) {\n                // If the current value doesn't exist, recurively match the\n                // target array against an empty array to match the structure.\n                // If the current value exists recursively match against target.\n                const value = !current[i]\n                    ? recurse([], target[i] as DigitizedValue | DigitizedValues)\n                    : recurse(current[i], target[i] as DigitizedValue | DigitizedValues);\n\n                // This typescript could be improved. It is cast to `any`\n                // because `DigitizedValues` doesn't accept `undefined`. We\n                // should probably add a placeholder type to accept undefined\n                // and recast to `DigitizedValues`. But this hack is fine for\n                // now. The loop below removes the undefined so its still\n                // guaranteed to be typesafe.\n                if (current[i]) {\n                    current[i] = value as DigitizedValue | DigitizedValues;\n                }\n                else {\n                    current.push(value as DigitizedValue | DigitizedValues);\n                }\n            }\n            \n            // Remove the undefined items in the array. Use this instead of\n            // filter to avoid copying the array.\n            for (let i = 0; i < current.length; i++) {\n                if (current[i] === undefined) {\n                    current.splice(i, 1);\n                }\n            }\n    \n            return current;\n        }\n\n        // If the target is an array of digitized values, then recursively\n        // force the current value to be an array of digitized values.\n        if (Array.isArray(target) && !isDigitizedGroup(target)) {\n            current = castDigitizedValues(current);\n\n            // Loop over the existing digitized value to ensure the digits are\n            // valid and gives the walker a chance to touch it. The walker will\n            // touch the existing digits before adding new ones or removing\n            // excess digits.\n            let i = 0;\n\n            while (i < current.length) {\n                const currentIndex = forwards ? i : current.length - 1 - i;\n                const targetIndex = forwards ? i : target.length - 1 - i;\n\n                // Again we type `any` to because we remove undefined below.\n                current[currentIndex] = recurse(\n                    current[currentIndex], target[targetIndex] as DigitizedValue | DigitizedValues\n                ) as any;\n\n                if (current[currentIndex] === undefined) {\n                    current.splice(currentIndex, 1);\n                }\n                else {\n                    i++;\n                }\n            }\n                        \n            // If the current length is less than the target length, recursively\n            // loop through it an add the digits. If a walker is used, it can\n            // add the values.\n            for (\n                let i = forwards ? current.length : target.length - 1;\n                forwards ? i < target.length : i >= current.length;\n                forwards ? i++ : i--\n            ) {\n                const response = recurse(undefined, target[i] as DigitizedValue | DigitizedValues);\n\n                // If the response gets undefined, just break the array and\n                // assume the manipulation has finished.\n                if (response === undefined) {\n                    break;\n                }\n\n                // If we are still here, the push the response \n                current.push(response);\n            }\n            \n            return current;\n        }\n        \n        return fn\n            ? fn(castDigitizedString(current), target)\n            : castDigitizedString(current); \n    }\n\n    // Recursively match the current and target array structures.\n    return recurse(current, target) as DigitizedValues;\n}\n\n/**\n * Cast a value to a string.\n * \n * @public\n */\nexport function castDigitizedString(value?: DigitizedValue | DigitizedValues): DigitizedValue | undefined {\n    if (Array.isArray(value)) {\n        return castDigitizedString(value[0]);\n    }\n\n    return value;\n}\n\n/**\n * Cast a value to an array of strings.\n * \n * @public\n */\nexport function castDigitizedValues(value?: DigitizedValue | DigitizedValues): DigitizedValue[] {\n    if (isDigitizedGroup(value)) {\n        return (value as DigitizedValue[]).flat(Infinity);\n    }\n\n    if (Array.isArray(value)) {\n        return value as DigitizedValue[];\n    }\n    \n    if (value === undefined) {\n        return [];\n    }\n\n    return [value];\n}\n\n/**\n * Cast a value to a array of digitized arrays.\n * \n * @public\n */\nexport function castDigitizedGroup(value?: DigitizedValue | DigitizedValues): DigitizedValues {\n    if (isDigitizedGroup(value)) {\n        return value as DigitizedValues;\n    }\n\n    if (Array.isArray(value)) {\n        return [value];\n    }\n\n    if (value === undefined) {\n        return [[]];\n    }\n\n    return [[value]];\n}\n\n/**\n * Determines if the value is a digitized group, which is an array of digitized\n * values.\n * \n * @public\n */\nexport function isDigitizedGroup(value: DigitizedValues | DigitizedValue | undefined) {\n    if (!Array.isArray(value) || !value.length) {\n        return false;\n    }\n\n    for (const i in value) {\n        if (Array.isArray(value[i])) {\n            return true;\n        }\n    }\n\n    return false;\n}\n\n/**\n * Counts the digits recursively.\n * \n * @public \n */\nexport function count(values: DigitizedValues) {\n    function recurse(values: DigitizedValues, count: number = 0) {\n        for (const value of values) {\n            if (Array.isArray(value)) {\n                count += recurse(value);\n            }\n            else {\n                count += value.length;\n            }\n        }\n\n        return count;\n    }\n\n    return recurse(values);\n}\n\nexport type Callback<P extends CallbackParams<any[]>, R = undefined> = (...args: P) => R;\n\nexport type CallbackParams<T> = T extends any[] ? T : never; \n\n/**\n * A change object that tracks changes within an iterator.\n * \n * @public\n */\nexport type Change<R> = {\n    from: R,\n    to: R\n}\n\n/**\n * A readonly object that when returned will stop an iterator.\n */\nexport type Stop = Readonly<{\n    stop: true\n}>\n\n/**\n * Utility function to stop an iterator.\n * \n * @public\n */\nexport function stop(): Stop {\n    return { stop: true };\n}\n\n/**\n * Call for for `trackChanges()`.\n * \n * @public\n */\nexport type TrackChangesCallback<P extends any[], R, C = P[0]|undefined> = (changes: Change<C>[], ...args: P) => R | Stop;\n\n/**\n * Create a callback with the values that can be tracked.\n * \n * @public\n */\nexport function trackChanges<P extends any[], R>(fn: TrackChangesCallback<P, R>): Callback<P, R> {\n    const changes: Change<R>[] = [];\n\n    return (...args: P) => {\n        const [ value ] = args;\n        \n        const originalValue = typeof value === 'object' || Array.isArray(value)\n            ? JSON.stringify(value)\n            : value;\n\n        const stopOrValue = fn(changes, ...args);\n\n        if (stopOrValue\n            && typeof stopOrValue === 'object'\n            && 'stop' in stopOrValue) {\n            return value;\n        }\n\n        const response = stopOrValue;\n\n        const newValue = typeof response === 'object' || Array.isArray(response)\n            ? JSON.stringify(response)\n            : response;\n\n        if (originalValue !== newValue) {\n            changes.push({\n                from: value,\n                to: response\n            });\n        }\n\n        return response;\n    };\n}\n\n/**\n * Determines if a iterator should stop.\n * \n * @public\n */\nexport type StopPredicateFunction<T extends CallbackParams<any[]> = any[]> = TrackChangesCallback<T, boolean>;\n\n/**\n * Stop the walker using a predicate function. Return `false` to stop and `true`\n * to continue. The predicate is ran before the callback function.\n * \n * @public\n */\nexport function stopWhen<P extends CallbackParams<any[]>, R>(predicate: StopPredicateFunction<P>, fn: Callback<P, R>) {\n    return trackChanges<P, R>((changes, ...args: P) => {\n        if (!predicate(changes, ...args)) {\n            return stop();\n        }\n        \n        return fn(...args);\n    });\n}\n\n/**\n * Stop the walker after X number of changes.\n * \n * @public\n */\nexport function stopAfterChanges<P extends CallbackParams<any[]>, R>(totalChanges: number, fn: Callback<P, R>) {\n    return stopWhen<P, R>((changes, ..._: P) => {\n        return changes.length < totalChanges;\n    }, fn);\n}","import { createSignal, type Signal } from 'solid-js';\nimport { DigitizedValues, UseDigitizer, useDigitizer } from './helpers/digitizer';\nimport { count } from './helpers/structure';\n\n/**\n * The `FaceValue` face options.\n * \n * @public\n */\nexport type FaceValueProps = {\n    /**\n     * The digitized values.\n     */\n    digits?: DigitizedValues;\n\n    /**\n     * The digitizer instance.\n     */\n    digitizer?: UseDigitizer;\n}\n\n/**\n * The FaceValue class digitizes the raw value and so it can be used by the\n * clock face.\n * \n * @public\n */\nexport class FaceValue<T extends Exclude<unknown, Function>> {\n\n    /**\n     * Parameters that are passed to the digiter.\n     * \n     * @public\n     */\n    public readonly digitizer: UseDigitizer;\n\n    /**\n     * The face's value.\n     * \n     * @protected\n     */\n    protected $value: Signal<T>;\n\n    /**\n     * The face's digits.\n     * \n     * @protected\n     */\n    protected $digits: Signal<DigitizedValues>;\n\n    /**\n     * Instantiate the face value.\n     * \n     * @public\n     */\n    constructor(value: T, props?: FaceValueProps) {\n        this.digitizer = props?.digitizer || useDigitizer();\n        this.$value = createSignal<T>(value);\n        this.$digits = createSignal(props?.digits ?? this.digitizer.digitize(value));\n    }\n\n    /**\n     * The digitized value.\n     * \n     * @public\n     */\n    public get digits() {\n        return this.$digits[0]();\n    }\n\n    /**\n     * Set the digits from a `DigitizedValues`.\n     * \n     * @public\n     */\n    public set digits(value: DigitizedValues) {\n        this.$digits[1](value);\n    }\n\n    /**\n     * Get the length of the flattened digitized array.\n     * \n     * @public\n     */\n    public get length() {\n        return count(this.$digits[0]());\n    }\n\n    /**\n     * Get the value.\n     * \n     * @public\n     */\n    public get value(): T {\n        return this.$value[0]();\n    }\n\n    /**\n     * Set the value.\n     * \n     * @public\n     */\n    public set value(value: Exclude<T, Function>) {\n        this.$value[1](value);\n        this.$digits[1](this.digitizer.digitize(value));\n    }\n\n    /**\n     * Compare the face value with the given subject.\n     * \n     * @public\n     */\n    public compare(subject?: FaceValue<any>) {\n        return JSON.stringify(this.digits) === JSON.stringify(subject?.digits);\n    }\n\n    /**\n     * Create a new instance with the given value.\n     * \n     * @public\n     */\n    public copy(): FaceValue<T> {\n        return new FaceValue(this.value, {\n            digits: this.digits,\n            digitizer: this.digitizer\n        });\n    }\n}\n\n/**\n * Create a new `FaceValue` instance.\n * \n * @public\n */\nexport function faceValue<T>(value: T): FaceValue<T>;\nexport function faceValue<T>(value: T, props: FaceValueProps): FaceValue<T>;\nexport function faceValue<T>(value: T, props?: FaceValueProps): FaceValue<T>;\nexport function faceValue<T>(value: T, props?: FaceValueProps): FaceValue<T> {\n    return new FaceValue(value, props);\n}","import { EMPTY_CHAR, type DigitizedValue, type DigitizedValues } from './digitizer';\n\n/**\n * Get a range of numbers using the given size and starting point.\n * \n * @public\n */\nexport function range(startAt: number = 0, size: number): number[] {\n    return Array.from(Array(size).keys()).map(i => i + startAt);\n}\n\n/**\n * Generates a random array of characters using the given range.\n * \n * @public\n */\nexport function characterRange(startChar: string, endChar: string): string[] {\n    const nums = range(\n        startChar.charCodeAt(0), endChar.charCodeAt(0) + 1 - startChar.charCodeAt(0)\n    );\n\n    return nums.map(i => String.fromCharCode(i));\n}\n\n/**\n * Shuffles array in place.\n * \n * @public\n */\nexport function fisherYatesShuffle(chars: string[]): string[] {\n    const newArr: string[] = [];\n\n    while (chars.length) {\n        const randomIndex = Math.floor(\n            Math.random() * chars.length\n        );\n\n        newArr.push(...chars.splice(randomIndex, 1));\n    }\n\n    return newArr;\n}\n\n/**\n * Get the default character set.\n * \n * @public\n */\nexport function defaultCharset(): string[] {\n    return [\n        ...characterRange('a', 'z'),\n        ...characterRange('A', 'Z'),\n        ...characterRange('0', '9'),\n        '\"', '\\'', ':', '-', '.', ',', '!', '?'\n    ];\n}\n\n/**\n * The options for `useCharset()`.\n * \n * @public\n */\nexport type UseCharsetOptions = {\n    /**\n     * A function that returns an array of characters.\n     */\n    charset?: () => string[];\n\n    /**\n     * The empty character. Defaults to a space.\n     */\n    emptyChar?: string;\n\n    /**\n     * Provide a shuffle function `boolean` to enable/disable the default shuffle.\n     */\n    shuffle?: ((chars: string[]) => string[]) | boolean;\n\n    /**\n     * An array of characters to omit from the `charset`.\n     */\n    blacklist?: string[];\n\n    /**\n     * An array of characters to include in the `charset`.\n     */\n    whitelist?: string[];\n}\n\n/**\n * The return type for `useCharset()`.\n * \n * @public\n */\nexport type UseCharset = {\n    /**\n     * The charset that was given.\n     */\n    charset: string[];\n\n    /**\n     * The empty character from the charset.\n     */\n    emptyChar: string;\n\n    /**\n     * Determines if the given value is blacklisted.\n     */\n    isBlacklisted: (value: DigitizedValue) => boolean;\n    \n    /**\n     * Determines if the given value is whitelisted.\n     */\n    isWhitelisted: (value: DigitizedValue) => boolean;\n\n    /**\n     * Get a chunk of the charset for the given count.\n     */\n    chunk: (value: DigitizedValue | undefined, count: number) => string[];\n\n    /**\n     * Gets the next characters in the charset for the given count.\n     */\n    next: (value?: DigitizedValue, target?: DigitizedValue | DigitizedValues, count?: number) => DigitizedValue | undefined;\n\n    /**\n     * Gets the previous characters in the charset for the given count.\n     */\n    prev: (value?: DigitizedValue, target?: DigitizedValue | DigitizedValues, count?: number) => DigitizedValue | undefined;\n}\n\n/**\n * A composable that uses a set of characters to create a charset.\n * \n * @public\n */\nexport function useCharset(): UseCharset;\nexport function useCharset(options: UseCharsetOptions): UseCharset;\nexport function useCharset(options?: UseCharsetOptions): UseCharset;\nexport function useCharset(options?: UseCharsetOptions): UseCharset {\n    const blacklist = options?.blacklist ?? [];\n    const whitelist = options?.whitelist ?? [];\n    const emptyChar = options?.emptyChar ?? EMPTY_CHAR;\n\n    const shuffle = typeof options?.shuffle === 'function'\n        ? options.shuffle\n        : options?.shuffle ? fisherYatesShuffle : undefined;\n\n    /**\n     * Creates a charset and shuffles it if required.\n     */\n    function createCharset(): string[] {\n        const fn = options?.charset || defaultCharset;\n\n        return shuffle ? shuffle(fn()) : fn();\n    };\n\n    /**\n     * Create a charset.\n     */\n    const charset = createCharset();\n\n    /**\n     * Find the nearest character in the charset to the given value.\n     */\n    function nearest(value: DigitizedValue) {\n        const currentCode = value.charCodeAt(0);\n        const charCodes = charset.map(char => char.charCodeAt(0));\n\n        return String.fromCharCode(\n            charCodes.reduce((prev, curr) => {\n                return Math.abs(curr - currentCode) < Math.abs(prev - currentCode) ? curr : prev;\n            })\n        );\n    }\n\n    /**\n     * Get the next chunks of characters relative to another character.\n     */\n    function chunk(value?: DigitizedValue, count: number = 1): string[] {\n        let chunked = [emptyChar, ...charset, emptyChar, ...charset];\n\n        if (count < 0) {\n            chunked = chunked.reverse();\n        }\n\n        let offset = 1;\n\n        if (value === undefined) {\n            value = emptyChar;\n        }\n        else if (!chunked.includes(value)) {\n            value = emptyChar;\n            offset = 0;\n        }\n\n        const index = chunked.indexOf(value);\n\n        const sequence = chunked.slice(\n            index + offset, chunked.indexOf(value, index + 1) + offset\n        );\n\n        return sequence.splice(0, Math.abs(count));\n    }\n\n    /**\n     * Get the next character in the charset relative to the given value.\n     */\n    function next(current?: DigitizedValue, target?: DigitizedValue | DigitizedValues, count: number = 1) {\n        if (target === undefined && current === emptyChar) {\n            return undefined;\n        }\n        else if (typeof target === 'string' && !charset.includes(target)) {\n            return target;\n        }\n\n        if (current && (isWhitelisted(current) || target === current)) {\n            return current;\n        }\n\n        if (current && isBlacklisted(current)) {\n            return nearest(current);\n        }\n\n        const matches = chunk(current, count);\n\n        if (typeof target === 'string' && matches.includes(target)) {\n            return target;\n        }\n\n        const lastMatch = matches[count - 1];\n\n        if (target === undefined\n            && current\n            && lastMatch\n            && charset.indexOf(lastMatch) < charset.indexOf(current)\n        ) {\n            return undefined;\n        }\n\n        return matches[count - 1];\n    }\n\n    /**\n     * Get the prev character in the charset relative to the given value.\n     */\n    function prev(current?: DigitizedValue, target?: DigitizedValue | DigitizedValues, count: number = 1) {\n        \n        if (target === undefined && current === emptyChar) {\n            return undefined;\n        }\n        else if (typeof target === 'string' && !charset.includes(target)) {\n            return target;\n        }\n\n        if (current && (isWhitelisted(current) || target === current)) {\n            return current;\n        }\n\n        if (current && isBlacklisted(current)) {\n            return nearest(current);\n        }\n\n        const matches = chunk(current, -count);\n\n        if (typeof target === 'string' && matches.includes(target)) {\n            return target;\n        }\n\n        const lastMatch = matches[count - 1];\n\n        if (target === undefined\n            && current\n            && lastMatch\n            && charset.indexOf(lastMatch) > charset.indexOf(current)\n        ) {\n            return undefined;\n        }\n\n        return matches[count - 1];\n    }\n\n    /**\n     * Clean the array of undesired values.\n     */\n    function isBlacklisted(value: DigitizedValue): boolean {\n        return blacklist.includes(value);\n    }\n\n    /**\n     * Clean the array of undesired values.\n     */\n    function isWhitelisted(value: DigitizedValue): boolean {\n        return whitelist.includes(value);\n    }\n\n    return {\n        charset,\n        chunk,\n        emptyChar,\n        isBlacklisted,\n        isWhitelisted,\n        next,\n        prev\n    };\n}","let e={data:\"\"},t=t=>\"object\"==typeof window?((t?t.querySelector(\"#_goober\"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement(\"style\")),{innerHTML:\" \",id:\"_goober\"})).firstChild:t||e,r=e=>{let r=t(e),l=r.data;return r.data=\"\",l},l=/(?:([\\u0080-\\uFFFF\\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\\s*)/g,a=/\\/\\*[^]*?\\*\\/|  +/g,n=/\\n+/g,o=(e,t)=>{let r=\"\",l=\"\",a=\"\";for(let n in e){let c=e[n];\"@\"==n[0]?\"i\"==n[1]?r=n+\" \"+c+\";\":l+=\"f\"==n[1]?o(c,n):n+\"{\"+o(c,\"k\"==n[1]?\"\":t)+\"}\":\"object\"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\\S+\\([^)]*\\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+\" \"+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,\"-$&\").toLowerCase(),a+=o.p?o.p(n,c):n+\":\"+c+\";\")}return r+(t&&a?t+\"{\"+a+\"}\":a)+l},c={},s=e=>{if(\"object\"==typeof e){let t=\"\";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return\"go\"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,\"\"));)t[4]?o.shift():t[3]?(r=t[3].replace(n,\" \").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n,\" \").trim();return o[0]})(e);c[d]=o(p?{[\"@keyframes \"+d]:t}:t,r?\"\":\".\"+d)}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?\".\"+t:e&&\"object\"==typeof e?e.props?\"\":o(e,\"\"):!1===e?\"\":e}return e+l+(null==n?\"\":n)},\"\");function u(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g,b=u.bind({g:1}),h=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\\d+/.test(s),c.className=u.apply(r,l)+(s?\" \"+s:\"\"),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}export{u as css,r as extractCss,b as glob,h as keyframes,m as setup,j as styled};\n","import type { Properties } from \"csstype\";\nimport { css } from \"goober\";\n\n/**\n * A CSS-in-JS style object.\n * \n * @public\n */\nexport interface CSSProperties extends Properties {\n    [key: string]: CSSProperties | string | number | undefined | null;\n}\n\nfunction isPlainObject(value: unknown): value is CSSProperties {\n    return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/**\n * Merge the target object into the source.\n * \n * @public\n */\nexport function mergeCss<TSource extends CSSProperties, TTarget extends CSSProperties>(\n    source: TSource,\n    target: TTarget\n): TSource {\n    for (const key in target) {\n        const targetVal = target[key];\n        const sourceVal = source[key];\n\n        if (isPlainObject(sourceVal) && isPlainObject(targetVal)) {\n            source[key] = mergeCss(sourceVal, targetVal) as TSource[typeof key];\n        } else if (isPlainObject(targetVal)) {\n            source[key] = mergeCss({}, targetVal) as TSource[typeof key];\n        } else {\n            source[key] = targetVal as unknown as TSource[typeof key];\n        }\n    }\n\n    return source;\n}\n\nexport type MergedCssDeclaration<T, U> = {\n  [K in keyof T | keyof U]:\n    K extends keyof U\n      ? U[K]\n      : K extends keyof T\n      ? T[K]\n      : never;\n};\n\nexport type CssDeclaration<T extends CSSProperties = CSSProperties> = {\n    css: T;\n    toString(): string;\n};\n\nexport type UseCssDeclaration<T extends readonly unknown[], V extends CSSProperties> = (...args: T) => V;\n\nexport type UseCss<T extends readonly unknown[] = unknown[], V extends CSSProperties = CSSProperties> = {\n    /**\n     * Get the CSS declaration.\n     */\n    (...args: T): CssDeclaration<V>;\n\n    /**\n     * Merge the given CSS into the current definition.\n     */\n    merge: <TExtension extends CSSProperties>(\n        fn: UseCssDeclaration<T, TExtension>\n    ) => UseCss<T, MergedCssDeclaration<V, TExtension>>;\n\n    /**\n     * Extend the current definition with the given CSS.\n     */\n    extend: <TExtension extends CSSProperties>(\n        fn: UseCssDeclaration<T, TExtension>\n    ) => UseCss<T, MergedCssDeclaration<V, TExtension>>;\n}\n\nexport function useCss<T extends readonly unknown[], V extends CSSProperties>(\n    fn: UseCssDeclaration<T, V>\n): UseCss<T, V> {\n    const merges: UseCssDeclaration<T, CSSProperties>[] = [];\n\n    function apply(...args: T): CssDeclaration<V> {\n        const cssObj = merges.reduce((carry, fn) => mergeCss(carry, fn(...args)), fn(...args));\n        return {\n            css: cssObj,\n            toString() {\n                return css(cssObj);\n            }\n        };\n    }\n\n    function merge<TExtension extends CSSProperties>(\n        mergeFn: UseCssDeclaration<T, TExtension>\n    ): UseCss<T, MergedCssDeclaration<V, TExtension>> {\n        merges.push(mergeFn);\n        return apply as UseCss<T, MergedCssDeclaration<V, TExtension>>;\n    }\n\n    function extend<TExtension extends CSSProperties>(\n        extendFn: UseCssDeclaration<T, TExtension>\n    ): UseCss<T, MergedCssDeclaration<V, TExtension>> {\n        return useCss<T, MergedCssDeclaration<V, TExtension>>((...args) => {\n            return mergeCss(apply(...args).css, extendFn(...args)) as MergedCssDeclaration<V, TExtension>;\n        });\n    }\n\n    (apply as UseCss<T, V>).merge = merge;\n    (apply as UseCss<T, V>).extend = extend;\n\n    return apply as UseCss<T, V>;\n}","export type UseDefinitionMap<T> = {\n    /**\n     * A map of key/value pairs.\n     */\n    map: Map<string, T>;\n\n    /**\n     * Define a new definition.\n     */\n    define(key: string, value: T): void;\n    define(key: [string, T][]): void;\n    define(key: Record<string, T>): void;\n    define(key: string | [string, T][] | Record<string, T>, value?: T): void;\n\n    /**\n     * Removes a definition.\n     */\n    unset(keys: string): void;\n    unset(keys: string[]): void;\n    unset(keys: string | string[]): void;\n}\n\ntype InferType<T> = T extends [string, infer V][] ? V : never;\n\nexport function useDefinitionMap<T extends [string, unknown][]>(items: T): UseDefinitionMap<InferType<T>>;\nexport function useDefinitionMap<T>(items: Record<string,T>): UseDefinitionMap<T>;\nexport function useDefinitionMap<T>(items: [string, T][] | Record<string,T>): UseDefinitionMap<T> {\n    const map = new Map(Array.isArray(items) ? items : Object.entries(items));\n\n    function define(key: string, value: T): void;\n    function define(key: [string, T][]): void;\n    function define(key: Record<string, T>): void;\n    function define(key: string | [string, T][] | Record<string, T>, value?: T): void {\n        if (typeof key === 'string' && value !== undefined) {\n            map.set(key, value);\n        }\n        else if (Array.isArray(key)) {\n            for (const [entryKey, entryValue] of key) {\n                map.set(entryKey, entryValue);\n            }\n        }\n        else if (typeof key === 'object') {\n            for (const [entryKey, entryValue] of Object.entries(key)) {\n                map.set(entryKey, entryValue);\n            }\n        }\n    }\n\n    function unset(keys: string | string[]): void {\n        if (Array.isArray(keys)) {\n            for (const key of keys) {\n                map.delete(key);\n            }\n        }\n        else {\n            map.delete(keys);\n        }\n    }\n\n    return {\n        map, define, unset\n    };\n}\n\n/**\n * The translator function.\n */\nexport type Translator<T, K = string> = (value: K) => T;\n\n/**\n * The return type for `useDictionary()`.\n * \n * @public\n */\nexport type UseDictionary<T, K = string> = UseDefinitionMap<T | Translator<T>> & {\n    /**\n     * Translate a key. If no key is found, use the fallback.\n     */\n    translate(key: K): T;\n    translate(key: K, fallback: T): T;\n    translate(key: K, fallback?: T): T;\n}\n\n/**\n * Use the provided terms to create a reusable translation dictionary.\n * \n * @public\n */\nexport function useDictionary<T>(terms: [string, T | Translator<T>][]): UseDictionary<T>;\nexport function useDictionary<T>(terms: Record<string, T | Translator<T>>): UseDictionary<T>;\nexport function useDictionary<T>(terms: [string, T | Translator<T>][] | Record<string, T | Translator<T>>): UseDictionary<T> {\n    const { map, define, unset } = useDefinitionMap(\n        Array.isArray(terms) ? terms : Object.entries(terms)\n    );\n\n    function translate(key: string): T;\n    function translate(key: string, fallback: T): T;\n    function translate(key: string, fallback?: T): T {\n        const term = map.get(key);\n\n        if (typeof term === 'function') {\n            return (term as Translator<T>)(key);\n        }\n\n        if (term !== undefined) {\n            return term as T;\n        }\n\n        if (fallback !== undefined) {\n            return fallback;\n        }\n        \n        return key as unknown as T;\n    }\n\n    return {\n        map,\n        define,\n        translate,\n        unset,\n    };\n}","import { useDefinitionMap, type Translator, type UseDefinitionMap, type UseDictionary } from './dictionary';\nimport { type UseDigitizer } from './digitizer';\n\n/**\n * The number of days in a week.\n * \n * @public\n */\nexport const daysInWeek: number = 7;\n\n/**\n * The number of milliseconds in 1 day.\n * \n * @public\n */\nexport const millisecondsInDay: number = 86400000;\n\n/**\n * The number of milliseconds in 1 hour.\n * \n * @public\n */\nexport const millisecondsInHour: number = 3600000;\n\n/**\n * The number of milliseconds in 1 minute.\n * \n * @public\n */\nexport const millisecondsInMinute: number = 60000;\n\n/**\n * The proper names of the days in English.\n * \n * @public\n */\nexport const days = [\n    'Sunday',\n    'Monday',\n    'Tuesday',\n    'Wednesday',\n    'Thursday',\n    'Friday',\n    'Saturday'\n];\n\n/**\n * The abbreviated names of the days in English.\n * \n * @public\n */\nexport const dayAbbreviations = [\n    'Sun',\n    'Mon',\n    'Tue',\n    'Wed',\n    'Thu',\n    'Fri',\n    'Sat',\n    'Sun'\n];\n\n/**\n * The proper names of the months in English.\n * \n * @public\n */\nexport const months = [\n    'January',\n    'February',\n    'March',\n    'April',\n    'May',\n    'June',\n    'July',\n    'August',\n    'September',\n    'October',\n    'November',\n    'December'\n];\n\n/**\n * The abbreviated names of the months in English.\n * \n * @public\n */\nexport const monthAbbreviations = [\n    'Jan',\n    'Feb',\n    'Mar',\n    'Apr',\n    'May',\n    'Jun',\n    'Jul',\n    'Aug',\n    'Sep',\n    'Oct',\n    'Nov',\n    'Dec'\n];\n\n/**\n * Formats a date into a string.\n * \n * @public\n */\nexport type DateFlagFormatFunction = (date: Date) => string;\n\n/**\n * The options for `useDateFormats()`.\n * \n * @public\n */\nexport type UseDateFormatsOptions = {\n    /**\n     * The digitizer instance.\n     */\n    digitizer?: UseDigitizer;\n\n    /**\n     * A translate function or Dictionary.\n     */\n    translate?: Translator<string> | UseDictionary<string>;\n\n    /**\n     * The date format flags.\n     */\n    formats?: Record<string, DateFlagFormatFunction>;\n}\n\n/**\n * The return type for `useDateFormats()`.\n * \n * @public\n */\nexport type UseDateFormats = UseDefinitionMap<DateFlagFormatFunction> & {\n    format: (date: Date, format: string) => string\n}\n\n/**\n * Create a new date string formatter.\n * \n * @public\n */\nexport function useDateFormats(): UseDateFormats;\nexport function useDateFormats(options: UseDateFormatsOptions): UseDateFormats;\nexport function useDateFormats(options?: UseDateFormatsOptions): UseDateFormats {\n    const { map, define, unset } = useDefinitionMap<DateFlagFormatFunction>({\n        A: (date: Date) => date.getHours() < 12 ? 'AM' : 'PM',\n        a: (date: Date) => date.getHours() < 12 ? 'am' : 'pm',\n        Q: (date: Date) => Math.ceil((date.getMonth() + 1) / 3).toString(),\n        YYYY: (date: Date) => date.getFullYear().toString(),\n        YY: (date: Date) => pad(date.getFullYear().toString().slice(2), 2),\n        MMMM: (date: Date) => String(months[date.getMonth()]),\n        MMM: (date: Date) => String(monthAbbreviations[date.getMonth()]),\n        MM: (date: Date) => pad(date.getMonth() + 1, 2),\n        M: (date: Date) => String(date.getMonth() + 1),\n        DDDD: (date: Date) => String(days[date.getDay()]),\n        DDD: (date: Date) => String(dayAbbreviations[date.getDay()]),\n        DD: (date: Date) => pad(date.getDate(), 2),\n        D: (date: Date) => String(date.getDate()),\n        HH: (date: Date) => pad(date.getHours(), 2),\n        H: (date: Date) => String(date.getHours()),\n        hh: (date: Date) => pad(getTwelveHourFormat(date), 2),\n        h: (date: Date) => getTwelveHourFormat(date),\n        mm: (date: Date) => pad(date.getMinutes(), 2),\n        m: (date: Date) => String(date.getMinutes()),\n        ss: (date: Date) => pad(date.getSeconds(), 2),\n        s: (date: Date) => String(date.getSeconds()),\n        vvvv: (date: Date) => pad(date.getMilliseconds(), 4),\n        vvv: (date: Date) => pad(date.getMilliseconds(), 3),\n        vv: (date: Date) => pad(date.getMilliseconds(), 2),\n        v: (date: Date) => String(date.getMilliseconds()),\n        ...options?.formats\n    });\n\n    const translate = typeof options?.translate === 'function'\n        ? options.translate\n        : options?.translate?.translate;\n\n    /**\n     * Formats a date using a format string.\n     * \n     * @public\n     */\n    function format(date: Date, str: string): string {\n        const flagPattern: RegExp = new RegExp([...sort(map)].join('|'), 'g');\n\n        return str.replace(flagPattern, key => {\n            const str =  map.get(key)!(date);\n\n            return translate?.(str) ?? str;\n        });\n    }\n\n    return { map, define, format, unset };\n}\n\n\n/**\n * So an array based on the index position of another.\n * \n * @public\n */\nexport function sort(map: Map<string, unknown>) {\n    return Array.from(map.keys()).sort((a, b) => {\n        if (a.length < b.length) {\n            return 1;\n        }\n\n        if (a.length > b.length) {\n            return -1;\n        }\n\n        return 0;\n    });\n}\n\n/**\n * Left pad another value with zero if its less then the given length.\n * \n * @public\n */\nexport function pad(value: string | number | undefined, length: number): string {\n    if (value === undefined) {\n        return '';\n    }\n\n    if (typeof value === 'number') {\n        value = value.toString();\n    }\n\n    if (length < value.length) {\n        return value;\n    }\n\n    return Array(length - value.length + 1).join('0') + value;\n}\n\n/**\n * Get the twelve hour format of the current date.\n * \n * @public\n */\nexport function getTwelveHourFormat(date: Date): string {\n    const mod: number = date.getHours() % 12;\n\n    return String(mod === 0 ? 12 : mod);\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n *   return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n *   return constructFrom(\n *     date, // Use constructor from the given date\n *     date.getTime() // Use the date value to create a new date\n *   );\n * }\n */\nexport function constructFrom(date, value) {\n  if (typeof date === \"function\") return date(value);\n\n  if (date && typeof date === \"object\" && constructFromSymbol in date)\n    return date[constructFromSymbol](value);\n\n  if (date instanceof Date) return new date.constructor(value);\n\n  return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n  // [TODO] Get rid of `toDate` or `constructFrom`?\n  return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount, options) {\n  const _date = toDate(date, options?.in);\n  if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n  // If 0 days, no-op to avoid changing times in the hour before end of DST\n  if (!amount) return _date;\n\n  _date.setDate(_date.getDate() + amount);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n  const _date = toDate(date, options?.in);\n  if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return _date;\n  }\n  const dayOfMonth = _date.getDate();\n\n  // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n  const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n  endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n  const daysInMonth = endOfDesiredMonth.getDate();\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    _date.setFullYear(\n      endOfDesiredMonth.getFullYear(),\n      endOfDesiredMonth.getMonth(),\n      dayOfMonth,\n    );\n    return _date;\n  }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { addDays } from \"./addDays.js\";\nimport { addMonths } from \"./addMonths.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link add} function options.\n */\n\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes, and seconds to the given date.\n *\n * @typeParam DateType - The `Date` type the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes, and seconds to be added.\n * @param options - An object with options\n *\n * @returns The new date with the seconds added\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * const result = add(new Date(2014, 8, 1, 10, 19, 50), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\n *   minutes: 9,\n *   seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\nexport function add(date, duration, options) {\n  const {\n    years = 0,\n    months = 0,\n    weeks = 0,\n    days = 0,\n    hours = 0,\n    minutes = 0,\n    seconds = 0,\n  } = duration;\n\n  // Add years and months\n  const _date = toDate(date, options?.in);\n  const dateWithMonths =\n    months || years ? addMonths(_date, months + years * 12) : _date;\n\n  // Add weeks and days\n  const dateWithDays =\n    days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths;\n\n  // Add days, hours, minutes, and seconds\n  const minutesToAdd = minutes + hours * 60;\n  const secondsToAdd = seconds + minutesToAdd * 60;\n  const msToAdd = secondsToAdd * 1000;\n\n  return constructFrom(options?.in || date, +dateWithDays + msToAdd);\n}\n\n// Fallback for modularized imports:\nexport default add;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n  const _date = toDate(date);\n  const utcDate = new Date(\n    Date.UTC(\n      _date.getFullYear(),\n      _date.getMonth(),\n      _date.getDate(),\n      _date.getHours(),\n      _date.getMinutes(),\n      _date.getSeconds(),\n      _date.getMilliseconds(),\n    ),\n  );\n  utcDate.setUTCFullYear(_date.getFullYear());\n  return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n  const normalize = constructFrom.bind(\n    null,\n    context || dates.find((date) => typeof date === \"object\"),\n  );\n  return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n *   new Date(1995, 6, 2),\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * //   Wed Feb 11 1987 00:00:00,\n * //   Mon Jul 10 1989 00:00:00,\n * //   Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n  const diff = +toDate(dateLeft) - +toDate(dateRight);\n\n  if (diff < 0) return -1;\n  else if (diff > 0) return 1;\n\n  // Return 0 if diff is 0; return NaN if diff is NaN\n  return diff;\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\n\n/**\n * The {@link differenceInDays} function options.\n */\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full days according to the local timezone\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n *\n * @example\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n *   new Date(2020, 5, 1),\n *   new Date(2020, 2, 1)\n * )\n * //=> 92\n */\nexport function differenceInDays(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const sign = compareLocalAsc(laterDate_, earlierDate_);\n  const difference = Math.abs(\n    differenceInCalendarDays(laterDate_, earlierDate_),\n  );\n\n  laterDate_.setDate(laterDate_.getDate() - sign * difference);\n\n  // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n  // If so, result must be decreased by 1 in absolute value\n  const isLastDayNotFull = Number(\n    compareLocalAsc(laterDate_, earlierDate_) === -sign,\n  );\n\n  const result = sign * (difference - isLastDayNotFull);\n  // Prevent negative zero\n  return result === 0 ? 0 : result;\n}\n\n// Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(laterDate, earlierDate) {\n  const diff =\n    laterDate.getFullYear() - earlierDate.getFullYear() ||\n    laterDate.getMonth() - earlierDate.getMonth() ||\n    laterDate.getDate() - earlierDate.getDate() ||\n    laterDate.getHours() - earlierDate.getHours() ||\n    laterDate.getMinutes() - earlierDate.getMinutes() ||\n    laterDate.getSeconds() - earlierDate.getSeconds() ||\n    laterDate.getMilliseconds() - earlierDate.getMilliseconds();\n\n  if (diff < 0) return -1;\n  if (diff > 0) return 1;\n\n  // Return 0 if diff is 0; return NaN if diff is NaN\n  return diff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInDays;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const laterStartOfDay = startOfDay(laterDate_);\n  const earlierStartOfDay = startOfDay(earlierDate_);\n\n  const laterTimestamp =\n    +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n  const earlierTimestamp =\n    +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n  // Round the number of days to the nearest integer because the number of\n  // milliseconds in a day is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","export function getRoundingMethod(method) {\n  return (number) => {\n    const round = method ? Math[method] : Math.trunc;\n    const result = round(number);\n    // Prevent negative zero\n    return result === 0 ? 0 : result;\n  };\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n *   new Date(2014, 6, 2, 12, 30, 21, 700),\n *   new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(laterDate, earlierDate) {\n  return +toDate(laterDate) - +toDate(earlierDate);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { endOfDay } from \"./endOfDay.js\";\nimport { endOfMonth } from \"./endOfMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param date - The date to check\n * @param options - An object with options\n *\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  return +endOfDay(_date, options) === +endOfMonth(_date, options);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfDay} function options.\n */\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  const month = _date.getMonth();\n  _date.setFullYear(_date.getFullYear(), month + 1, 0);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n  const day = _date.getDate();\n\n  const midMonth = constructFrom(options?.in || date, 0);\n  midMonth.setFullYear(year, month, 15);\n  midMonth.setHours(0, 0, 0, 0);\n  const daysInMonth = getDaysInMonth(midMonth);\n\n  // Set the earlier date, allows to wrap Jan 31 to Feb 28\n  _date.setMonth(month, Math.min(day, daysInMonth));\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n  const monthIndex = _date.getMonth();\n  const lastDayOfMonth = constructFrom(_date, 0);\n  lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n  lastDayOfMonth.setHours(0, 0, 0, 0);\n  return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { setMonth } from \"./setMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link set} function options.\n */\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param values - The date values to be set\n * @param options - The options\n *\n * @returns The new date with options set\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport function set(date, values, options) {\n  let _date = toDate(date, options?.in);\n\n  // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n  if (isNaN(+_date)) return constructFrom(options?.in || date, NaN);\n\n  if (values.year != null) _date.setFullYear(values.year);\n  if (values.month != null) _date = setMonth(_date, values.month);\n  if (values.date != null) _date.setDate(values.date);\n  if (values.hours != null) _date.setHours(values.hours);\n  if (values.minutes != null) _date.setMinutes(values.minutes);\n  if (values.seconds != null) _date.setSeconds(values.seconds);\n  if (values.milliseconds != null) _date.setMilliseconds(values.milliseconds);\n\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default set;\n","import { add, differenceInDays, differenceInHours, differenceInMinutes, differenceInMonths, differenceInSeconds, differenceInWeeks, differenceInYears, set, type Duration } from \"date-fns\";\nimport { pad } from \"./date\";\n\n/**\n * The duration flag format function.\n * \n * @public\n */\nexport type DurationFlagFormatter = (duration: Duration, length: number) => string;\n\n/**\n * The duration map definition.\n * \n * @public\n */\nexport type DurationMapDefinition = [keyof Duration, DurationFlagFormatter]\n\nconst unitConverters = {\n    years: differenceInYears,\n    months: differenceInMonths,\n    weeks: differenceInWeeks,\n    days: differenceInDays,\n    hours: differenceInHours,\n    minutes: differenceInMinutes,\n    seconds: differenceInSeconds\n} as const;\n\nconst unitAdders = {\n    years: (date: Date, value: number) => add(date, { years: value }),\n    months: (date: Date, value: number) => add(date, { months: value }),\n    weeks: (date: Date, value: number) => add(date, { weeks: value }),\n    days: (date: Date, value: number) => add(date, { days: value }),\n    hours: (date: Date, value: number) => add(date, { hours: value }),\n    minutes: (date: Date, value: number) => add(date, { minutes: value }),\n    seconds: (date: Date, value: number) => add(date, { seconds: value })\n} as const;\n\n/**\n * Get duration between two dates with only specified keys\n * \n * @public\n */\nexport function getFilteredDuration<T extends keyof Duration>(\n    start: Date | number,\n    end: Date | number,\n    keys: T[]\n): Pick<Duration, T> {\n    return keys\n        .sort((a, b) => Object.keys(unitConverters).indexOf(a as string) - Object.keys(unitConverters).indexOf(b as string))\n        .reduce((carry, key) => {\n            const converter = unitConverters[key as keyof typeof unitConverters];\n            const adder = unitAdders[key as keyof typeof unitAdders];\n            const value = converter(carry.end, carry.start);\n\n            return {\n                ...carry,\n                result: { ...carry.result, [key]: value },\n                start: adder(carry.start, value)\n            };\n        }, {\n            result: {} as Pick<Duration, T>,\n            start: new Date(start),\n            end: new Date(end)\n        }).result;\n}\n\n/**\n * The return type for `useDurationFormats()`.\n * \n * @public\n */\nexport type UseDurationFormats = {\n    /**\n     * Format the start and end date into a string.\n     */\n    format: (start: Date, end: Date, format: string) => string\n}\n\nexport function useDurationFormats(): UseDurationFormats {\n    const flags: Record<keyof Duration, string> = {\n        years: 'Y',\n        months: 'M',\n        weeks: 'W',\n        days: 'D',\n        hours: 'h',\n        minutes: 'm',\n        seconds: 's'\n    };\n\n    function format(start: Date, end: Date, format: string) {\n        const flagPattern: RegExp = new RegExp(\n            Object.values(flags).map(value => `${value}+`).join('|'), 'g'\n        );\n\n        const durationKeys = format.match(flagPattern)\n            ?.map(value => value[0])\n            .filter((value, index, self) => self.indexOf(value) === index)\n            .reduce<(keyof Duration)[]>((carry, flag) => {\n                const match = Object.keys(flags).find(\n                    (key) => flags[key as keyof Duration] === flag\n                ) as keyof Duration;\n\n                return [...carry, match];\n            }, [])!;\n        \n        const duration = getFilteredDuration(\n            set(new Date(start), {milliseconds: 0}),\n            set(new Date(end), {milliseconds: 0}),\n            durationKeys\n        );\n\n        const entries = Object.entries(duration) as [keyof Duration, number][];\n        \n        return entries.reduce((carry, [key, value]) => {\n            const pattern = new RegExp(`${flags[key]}+`, 'g');\n\n            return carry.replace(pattern, flag => {\n                return pad(Math.abs(value), flag.length);\n            });\n        }, format);        \n    }\n    \n    return {\n        format\n    };\n}","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarYears } from \"./differenceInCalendarYears.js\";\n\n/**\n * The {@link differenceInYears} function options.\n */\n\n/**\n * @name differenceInYears\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full years\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))\n * //=> 1\n */\nexport function differenceInYears(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  // -1 if the left date is earlier than the right date\n  // 2023-12-31 - 2024-01-01 = -1\n  const sign = compareAsc(laterDate_, earlierDate_);\n\n  // First calculate the difference in calendar years\n  // 2024-01-01 - 2023-12-31 = 1 year\n  const diff = Math.abs(differenceInCalendarYears(laterDate_, earlierDate_));\n\n  // Now we need to calculate if the difference is full. To do that we set\n  // both dates to the same year and check if the both date's month and day\n  // form a full year.\n  laterDate_.setFullYear(1584);\n  earlierDate_.setFullYear(1584);\n\n  // For it to be true, when the later date is indeed later than the earlier date\n  // (2026-02-01 - 2023-12-10 = 3 years), the difference is full if\n  // the normalized later date is also later than the normalized earlier date.\n  // In our example, 1584-02-01 is earlier than 1584-12-10, so the difference\n  // is partial, hence we need to subtract 1 from the difference 3 - 1 = 2.\n  const partial = compareAsc(laterDate_, earlierDate_) === -sign;\n\n  const result = sign * (diff - +partial);\n\n  // Prevent negative zero\n  return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInYears;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarYears} function options.\n */\n\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n\n * @returns The number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n *   new Date(2015, 1, 11),\n *   new Date(2013, 11, 31)\n * );\n * //=> 2\n */\nexport function differenceInCalendarYears(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n  return laterDate_.getFullYear() - earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarYears;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { compareAsc } from \"./compareAsc.js\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.js\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.js\";\n\n/**\n * The {@link differenceInMonths} function options.\n */\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(laterDate, earlierDate, options) {\n  const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    laterDate,\n    earlierDate,\n  );\n\n  const sign = compareAsc(workingLaterDate, earlierDate_);\n  const difference = Math.abs(\n    differenceInCalendarMonths(workingLaterDate, earlierDate_),\n  );\n\n  if (difference < 1) return 0;\n\n  if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)\n    workingLaterDate.setDate(30);\n\n  workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);\n\n  let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;\n\n  if (\n    isLastDayOfMonth(laterDate_) &&\n    difference === 1 &&\n    compareAsc(laterDate_, earlierDate_) === 1\n  ) {\n    isLastMonthNotFull = false;\n  }\n\n  const result = sign * (difference - +isLastMonthNotFull);\n  return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n *   new Date(2014, 8, 1),\n *   new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n  const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n  return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { differenceInDays } from \"./differenceInDays.js\";\n\n/**\n * The {@link differenceInWeeks} function options.\n */\n\n/**\n * @name differenceInWeeks\n * @category Week Helpers\n * @summary Get the number of full weeks between the given dates.\n *\n * @description\n * Get the number of full weeks between two dates. Fractional weeks are\n * truncated towards zero by default.\n *\n * One \"full week\" is the distance between a local time in one day to the same\n * local time 7 days earlier or later. A full week can sometimes be less than\n * or more than 7*24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 7*24-hour periods, use this instead:\n * `Math.trunc(differenceInHours(dateLeft, dateRight)/(7*24))|0`.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full weeks\n *\n * @example\n * // How many full weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInWeeks(new Date(2014, 6, 20), new Date(2014, 6, 5))\n * //=> 2\n *\n * @example\n * // How many full weeks are between\n * // 1 March 2020 0:00 and 6 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 8 weeks (54 days),\n * // even if DST starts and the period has\n * // only 54*24-1 hours.\n * const result = differenceInWeeks(\n *   new Date(2020, 5, 1),\n *   new Date(2020, 2, 6)\n * )\n * //=> 8\n */\nexport function differenceInWeeks(laterDate, earlierDate, options) {\n  const diff = differenceInDays(laterDate, earlierDate, options) / 7;\n  return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInWeeks;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInHour } from \"./constants.js\";\n\n/**\n * The {@link differenceInHours} function options.\n */\n\n/**\n * @name differenceInHours\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of hours\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * const result = differenceInHours(\n *   new Date(2014, 6, 2, 19, 0),\n *   new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\nexport function differenceInHours(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n  const diff = (+laterDate_ - +earlierDate_) / millisecondsInHour;\n  return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInHours;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { millisecondsInMinute } from \"./constants.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\n\n/**\n * The {@link differenceInMinutes} function options.\n */\n\n/**\n * @name differenceInMinutes\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the signed number of full (rounded towards 0) minutes between the given dates.\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of minutes\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * const result = differenceInMinutes(\n *   new Date(2014, 6, 2, 12, 20, 0),\n *   new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n *\n * @example\n * // How many minutes are between 10:01:59 and 10:00:00\n * const result = differenceInMinutes(\n *   new Date(2000, 0, 1, 10, 0, 0),\n *   new Date(2000, 0, 1, 10, 1, 59)\n * )\n * //=> -1\n */\nexport function differenceInMinutes(dateLeft, dateRight, options) {\n  const diff =\n    differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;\n  return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMinutes;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.js\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.js\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n *   new Date(2014, 6, 2, 12, 30, 20, 0),\n *   new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(laterDate, earlierDate, options) {\n  const diff = differenceInMilliseconds(laterDate, earlierDate) / 1000;\n  return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","export function parseDuration(duration: string | null | undefined): number {\n    const match = duration?.trim().split(',')[0]?.match(/^([+-]?(?:\\d+\\.?\\d*|\\.\\d+))\\s*(ms|s|m|h)$/i);\n    \n    if (!match) {\n        return 0;\n    }\n\n    const [, val, unit] = match;\n\n    return parseFloat(val!) * {\n        ms: 1,\n        s: 1000,\n        m: 60000,\n        h: 3600000\n    }[unit!.toLowerCase()]!;\n}\n\nexport function getAnimationRate(el: Element) {\n    return parseDuration(\n        getComputedStyle(el).getPropertyValue('--animation-duration')\n    );\n}","import { type FaceValue } from '../FaceValue';\nimport { useCharset, type UseCharset, type UseCharsetOptions } from './charset';\nimport { type DigitizedValue, type DigitizedValues } from './digitizer';\nimport { matchArrayStructure, stopWhen, type MatchArrayStructureOptions, type StopPredicateFunction } from './structure';\n\n/** \n * The options for `useSequencer()`.\n * \n * @public\n */\nexport type SequencerOptions = {\n    /**\n     * The charset instance or options used to generate a charset.\n     */\n    charset?: UseCharset | UseCharsetOptions;\n    \n    /**\n     * The options passed the function that ensure the array structures are the same.\n     */\n    matchArray?: MatchArrayStructureOptions;\n\n    /**\n     * A call that determines when the sequencer should stop.\n     */\n    stopWhen?: StopPredicateFunction<[current?: DigitizedValue, target?: DigitizedValue | DigitizedValues ]>;\n\n    /**\n     * A number of changes that stops the sequencer.\n     */\n    stopAfterChanges?: number;\n}\n\n/**\n * The return type for `useSequencer()`.\n * \n * @public\n */\nexport type UseSequencer = {\n    /**\n     * The charset used by the sequencer.\n     */\n    charset: string[];\n\n    /**\n     * Decrement the current value towards the target value.\n     */\n    decrement: (current: FaceValue<any>, target: FaceValue<any>, count?: number, backwards?: boolean) => FaceValue<any>;\n\n    /**\n     * Increment the current value towards the target value.\n     */\n    increment: (current: FaceValue<any>, target: FaceValue<any>, count?: number, backwards?: boolean) => FaceValue<any>;\n}\n\n/**\n * A composable that creates or uses a charset to increment and decrement\n * face values.\n * \n * @public\n */\nexport function useSequencer(): UseSequencer;\nexport function useSequencer(options: SequencerOptions): UseSequencer;\nexport function useSequencer(options?: SequencerOptions): UseSequencer;\nexport function useSequencer(options?: SequencerOptions): UseSequencer {\n    const { charset, next, prev } = (\n        options?.charset && 'next' in (options.charset)\n            ? options.charset\n            : useCharset(options?.charset as UseCharsetOptions)\n    );\n    \n    /**\n     * Decrement the current face towards the target value. The count determines\n     * how many digits are skipped. If the array structures differ, they will be\n     * matched.\n     * \n     * @public\n     */\n    function decrement(current: FaceValue<any>, target: FaceValue<any>, count: number = 1, backwards: boolean = false): FaceValue<any> {\n        const walkerOptions: MatchArrayStructureOptions = {\n            backwards, ...options?.matchArray\n        };\n\n        current.digits = matchArrayStructure(\n            current.digits,\n            target.digits,\n            walkerOptions,\n            stopWhen((changes, current, target) => {\n                if (options?.stopWhen) {\n                    return options.stopWhen(changes, current, target);\n                }\n\n                if (options?.stopAfterChanges) {\n                    return changes.length < options.stopAfterChanges;\n                }\n                \n                return true;\n            }, (current, target) => {\n                if (current === target) {\n                    return current;\n                }\n\n                return prev(current ?? '', target, count);\n            })\n        );\n\n        return current;\n    }\n\n    /**\n     * Increment the current face towards the target value. The count determines\n     * how many digits are skipped. If the array structures differ, they will be\n     * matched.\n     * \n     * @public\n     */\n    function increment(current: FaceValue<any>, target: FaceValue<any>, count: number = 1, backwards: boolean = false): FaceValue<any> {\n        const walkerOptions: MatchArrayStructureOptions = {\n            ...options?.matchArray, backwards\n        };\n\n        current.digits = matchArrayStructure(\n            current.digits,\n            target.digits,\n            walkerOptions,\n            stopWhen((changes, current, target) => {\n                if (options?.stopWhen) {\n                    return options.stopWhen(changes, current, target);\n                }\n\n                if (options?.stopAfterChanges) {\n                    return changes.length < options.stopAfterChanges;\n                }\n\n                return true;\n            }, (current, target) => {\n                if (current === target) {\n                    return current;\n                }\n\n                return next(current, target, count);\n            })\n        );\n\n        return current;\n    }\n    \n    return {\n        charset,\n        decrement,\n        increment,\n    } as const;\n}","import { type Face } from '../Face';\nimport { faceValue, FaceValue } from '../FaceValue';\nimport { FlipClock } from '../FlipClock';\nimport { count } from '../helpers';\nimport { type DigitizedValues } from '../helpers/digitizer';\nimport { useSequencer, type UseSequencer } from '../helpers/sequencer';\nimport { type SequencerOptions } from './../helpers/sequencer';\n\n/**\n * The `Alphanumeric` face options.\n * \n * @public\n */\nexport type AlphanumericProps = {\n    /**\n     * The starting value of the clock.\n     */\n    value: FaceValue<string> | FaceValue<DigitizedValues>;\n    \n    /**\n     * The target value of the clock.\n     */\n    targetValue?: FaceValue<string> | FaceValue<DigitizedValues>;\n\n    /**\n     * Determines if the clock increments or decrements towards the target.\n     */\n    method?: 'increment' | 'decrement';\n\n    /**\n     * Determines if the sequencer works forwards or backwards.\n     */\n    direction?: 'auto' | 'forwards' | 'backwards';\n\n    /**\n     * The sequencer instance or options used for the sequencer.\n     */\n    sequencer?: UseSequencer | SequencerOptions;\n\n    /**\n     * Determines how many characters to skip with each interval.\n     */\n    skipChars?: number;\n}\n\n/**\n * This face is designed to flip through alphanumeric values similar to a flip\n * board at a train station. The value will incrementally/decrementally flip\n * the digits until it reaches the target.\n * \n * @public\n */\nexport class Alphanumeric implements Face {\n    /**\n     * The sequencer method.\n     * \n     * @public\n     */\n    public readonly method: 'increment' | 'decrement' = 'increment';\n\n    /**\n     * The flip direction. If auto, the direction is automatically determined\n     * based on the current value and target value.\n     * \n     * @public\n     */\n    public readonly direction: 'auto' | 'forwards' | 'backwards' = 'auto';\n\n    /**\n     * Override how digits are sequenced.\n     * \n     * @public\n     */\n    public readonly sequencer: UseSequencer;\n\n    /**\n     * The number of characters to skip during the incrementing/decrementing.\n     * \n     * @public\n     */\n    public skipChars?: number;\n\n    /**\n     * The face's current value.\n     * \n     * @public\n     */\n    public readonly value: FaceValue<string> | FaceValue<DigitizedValues>;\n\n    /**\n     * The face's target value.\n     * \n     * @public\n     */\n    public readonly targetValue: FaceValue<string> | FaceValue<DigitizedValues>;\n\n    /**\n     * The face's current value.\n     * \n     * @protected\n     */\n    protected currentValue: FaceValue<DigitizedValues>;\n    \n    /**\n     * Construct the clock face.\n     * \n     * @public\n     */\n    constructor(props: AlphanumericProps) {\n        if (props.skipChars) {\n            this.skipChars = props.skipChars;\n        }\n\n        if (props.direction) {\n            this.direction = props.direction;\n        }\n\n        if (props.method) {\n            this.method = props.method;\n        }\n\n        this.sequencer = props.sequencer && 'increment' in props.sequencer\n            ? props.sequencer\n            : useSequencer(props.sequencer);\n\n        this.value = props.value;\n        this.targetValue = props.targetValue ?? this.value.copy();\n        this.currentValue = faceValue(this.value.digits);\n    }\n\n    /**\n     * The sequencer method to call.\n     * \n     * @public\n     */\n    public get backwards(): boolean {\n        if (this.direction === 'backwards') {\n            return true;\n        }\n\n        if (this.direction === 'forwards') {\n            return false;\n        }\n\n        return count(this.value.digits) > count(this.targetValue.digits);\n    }\n\n    /**\n     * The face's current value.\n     * \n     * @public\n     */\n    public faceValue(): FaceValue<any> {\n        return this.currentValue;\n    }\n\n    /**\n     * This method is called with every interval, or every time the clock\n     * should change, and handles the actual incrementing and decrementing the\n     * clock's `FaceValue`.\n     * \n     * @public\n     */\n    public interval(instance: FlipClock<Alphanumeric>): void {\n        this[this.method]();\n\n        if (this.currentValue.compare(this.targetValue)) {\n            instance.stop();\n        }\n    }\n\n    /**\n     * Increment the value to the next sequence.\n     * \n     * @public\n     */\n    public increment() {\n        this.sequencer.increment(\n            this.value, this.targetValue, this.skipChars, this.backwards\n        );\n        \n        this.currentValue.value = this.value.digits;\n    }\n\n    /**\n     * Decrement the value to the next sequence.\n     * \n     * @public\n     */\n    public decrement() {\n        this.sequencer.decrement(\n            this.value, this.targetValue, this.skipChars, this.backwards\n        );\n        \n        this.currentValue.value = this.value.digits;\n    }\n\n}\n\n/**\n * Create a new `Alphanumeric` instance.\n * \n * @public\n */\nexport function alphanumeric(props: AlphanumericProps) {\n    return new Alphanumeric(props);\n}\n","import { createRoot } from 'solid-js';\nimport { Face } from '../Face';\nimport { faceValue, type FaceValue } from '../FaceValue';\nimport { FlipClock } from '../FlipClock';\nimport { useDateFormats, type UseDateFormats, type UseDateFormatsOptions } from '../helpers/date';\n\n/**\n * The `Clock` face options.\n * \n * @public\n */\nexport type ClockProps = {\n    /**\n     * Specify a date used to start the display on the clock.\n     */\n    date?: Date;\n\n    /**\n     * A format string for how the date is displayed.\n     */\n    format?: string;\n\n    /**\n     * A formatter to display the date in the given format. \n     */\n    formatter?: UseDateFormats | UseDateFormatsOptions;\n}\n\n/**\n * This face will show a clock in a given format. * \n * \n * @public\n */\nexport class Clock implements Face {\n\n    /**\n     * The starting date on the clock. If no date is set, the current time\n     * will be used.\n     * \n     * @public\n     */\n    public readonly date: Date;\n\n    /**\n     * The current formatted value.\n     * \n     * @public\n     */\n    public readonly value: FaceValue<string>;\n\n    /**\n     * The format string.\n     * \n     * @public\n     */\n    public format: string = '[hh]:[mm]:[ss][A]';\n\n    /**\n     * The duration formatter.\n     * \n     * @public\n     */\n    public formatter: UseDateFormats;\n\n    /**\n     * Instantiate the clock face.\n     * \n     * @public\n     */\n    constructor(props?: ClockProps) {\n        this.date = props?.date ?? new Date();\n\n        if (props?.format) {\n            this.format = props.format;\n        }\n\n        if (props?.formatter === undefined) {\n            this.formatter = useDateFormats();\n        }\n        else if ('format' in props.formatter) {\n            this.formatter = props.formatter;\n        }\n        else {\n            this.formatter = useDateFormats(props.formatter);\n        }\n\n        this.value = createRoot(() => {\n            return faceValue(this.formatter.format(this.date, this.format));\n        });\n    }\n\n    /**\n     * The face's current value.\n     * \n     * @public\n     */\n    public faceValue(): FaceValue<string> {\n        return this.value;\n    }\n\n    /**\n     * Format the face value to the current date/time.\n     * \n     * @public\n     */\n    public interval(instance: FlipClock<Clock>): void {\n        this.value.value = this.formatter.format(\n            new Date(this.date.getTime() + instance.timer.elapsed), this.format\n        );\n    }\n}\n\n/**\n * Create a new `Clock` instance.\n * \n * @public\n */\nexport function clock(props?: ClockProps) {\n    return new Clock(props);\n}\n","import { createEffect, createRoot } from 'solid-js';\nimport { Face } from '../Face';\nimport { FaceValue, faceValue } from '../FaceValue';\nimport { FlipClock } from '../FlipClock';\n\n/**\n * The `Counter` face options.\n * \n * @public\n */\nexport type CounterProps = {\n    /**\n     * Determines if a clock should count down instead of up.\n     */\n\tcountdown?: boolean;\n\n    /**\n     * A format function for how the counter is displayed.\n     */\n\tformat?: (value: number) => string;\n\n    /**\n     * A number formatter for how the counter is displayed.\n     */\n\tformatter?: Intl.NumberFormat,\n\n    /**\n     * The starting value of the counter.\n     */\n\tvalue?: FaceValue<number> | number;\n\n    /**\n     * The number of steps the counter ticks each interval.\n     */\n\tstep?: number;\n\n    /**\n     * The clock will automatically stop when the target value is reached.\n     */\n\ttargetValue?: FaceValue<number> | number;\n}\n\n/**\n * This face is designed to increment and decrement values. Usually this face\n * is used as a counter for 0, 1, 2, 3, 4 (etc) for something like page views.\n * \n * @public\n */\nexport class Counter implements Face {\n\n    /**\n     * Should the face count down instead of up.\n     * \n     * @public\n     */\n    public countdown: boolean = false;\n\n    /**\n     * The number to increment/decrement in the interval.\n     * \n     * @public\n     */\n    public step: number = 1;\n\n    /**\n     * The formatted face value to display on the clock.\n     * \n     * @protected\n     */\n    protected formattedValue: FaceValue<string>;\n\n    /**\n     * The target value determines when the counter should stop.\n     * \n     * @public\n     */\n    public targetValue?: FaceValue<number>;\n\n    /**\n     * The current face value.\n     * \n     * @public\n     */\n    public value: FaceValue<number>;\n\n    /**\n     * A format callback. If the `formatter` is defined, this prop is ignored.\n     * \n     * @public\n     */\n    public format?: (number: number) => string;\n\n    /**\n     * An `Intl.NumberFormat` instance used to format the number into a string.\n     * \n     * @public\n     */\n    public formatter?: Intl.NumberFormat;\n\n    /**\n     * Construct the clock face.\n     * \n     * @public\n     */\n    constructor(props?: CounterProps) {\n        this.value = typeof props?.value === 'number' || props?.value === undefined\n            ? faceValue(props?.value ?? 0)\n            : props.value;\n\n        this.targetValue = typeof props?.targetValue === 'number'\n            ? faceValue(props.targetValue)\n            : props?.targetValue;\n\n        this.format = props?.format;\n        this.formatter = props?.formatter;\n        this.formattedValue = createRoot(() => {\n            const formattedValue = faceValue(this.formattedString);\n\n            createEffect(() => {\n                formattedValue.value = this.formattedString;\n            });\n\n            return formattedValue;\n        });\n\n        if (typeof props?.countdown === 'boolean') {\n            this.countdown = props.countdown;\n        }\n\n        if (typeof props?.step === 'number') {\n            this.step = props.step;\n        }\n    }\n\n    /**\n     * Get the number as a formatted string.\n     * \n     * @public\n     */\n    public get formattedString() {\n        if (this.formatter) {\n            return this.formatter.format(this.value.value);\n        }\n\n        if (this.format) {\n            return this.format(this.value.value);\n        }\n\n        return this.value.value.toString();\n    }\n\n    /**\n     * The face's current value.\n     * \n     * @public\n     */\n    public faceValue(): FaceValue<string> {\n        return this.formattedValue;\n    }\n\n    /**\n     * This method is called with every interval, or every time the clock\n     * should change, and handles the actual incrementing and decrementing the\n     * clock's `FaceValue`.\n     * \n     * @public\n     */\n    public interval(instance: FlipClock<Counter>): void {\n        if (this.countdown) {\n            this.decrement(this.step);\n        }\n        else {\n            this.increment(this.step);\n        }\n\n        if (this.value.compare(this.targetValue)) {\n            instance.stop();\n        }\n    }\n\n    /**\n     * Substract the face value by the given value.\n     * \n     * @public\n     */\n    public decrement(value?: number): void {\n        this.value.value = this.value.value - (value ?? this.step);\n    }\n\n    /**\n     * Add to the face value by the given value.\n     * \n     * @public\n     */\n    public increment(value?: number): void {\n        this.value.value = this.value.value + (value ?? this.step);\n    }\n\n}\n\n/**\n * Create a new `Counter` instance.\n * \n * @public\n */\nexport function counter(props?: CounterProps) {\n    return new Counter(props);\n}","import { differenceInMilliseconds } from 'date-fns';\nimport { createRoot } from 'solid-js';\nimport { type Face } from '../Face';\nimport { faceValue, type FaceValue } from '../FaceValue';\nimport { FlipClock } from '../FlipClock';\nimport { useDurationFormats, type UseDurationFormats } from '../helpers/duration';\n\n/**\n * The `ElapsedTime` face options.\n * \n * @public\n */\nexport type ElapsedTimeProps = {\n    /**\n     * The date from which the elapsed time is calculated.\n     */\n    from?: Date;\n\n    /**\n     * The date to which the elapsed time is calculated.\n     */\n    to?: Date;\n    \n    /**\n     * A format string for how the duration is displayed.\n     */\n    format?: string;\n\n    /**\n     * A formatter to display the duration in the given format. \n     */\n    formatter?: UseDurationFormats;\n}\n\n/**\n * This face will show the amount of time elapsed since the given value and\n * display it a specific format. For example 'hh:mm:ss' will show the elapsed\n * time in hours, minutes, seconds.\n * \n * @public\n */\nexport class ElapsedTime implements Face {\n    \n    /**\n     * The date used to calculate the current.\n     * \n     * @protected\n     */\n    protected start: Date;\n\n    /**\n     * The date used to calculate the current.\n     * \n     * @protected\n     */\n    protected current: Date;\n    \n    /**\n     * The \"from\" date used to calculate the elsapsed time.\n     * \n     * @public\n     */\n    public from?: Date;\n\n    /**\n     * The \"to\" date used to calculate the elsapsed time.\n     * \n     * @public\n     */\n    public to?: Date;\n\n    /**\n     * The format string.\n     * \n     * @public\n     */\n    public format: string = '[mm]:[ss]';\n\n    /**\n     * The duration formatter.\n     * \n     * @public\n     */\n    public formatter: UseDurationFormats;\n\n    /**\n     * The current face value.\n     * \n     * @public\n     */\n    public value: FaceValue<string>;\n\n    /**\n     * Construct the clock face.\n     * \n     * @public\n     */\n    constructor(props?: ElapsedTimeProps) {\n        this.from = props?.from;\n        this.to = props?.to;\n        this.start = new Date;\n        this.current = new Date(this.start);\n        \n        if (props?.format) {\n            this.format = props.format;\n        }\n    \n        if (!props?.formatter) {\n            this.formatter = useDurationFormats();\n        }\n        else {\n            this.formatter = props.formatter;\n        }\n\n        this.value = createRoot(() => faceValue(this.formattedString));\n    }\n\n    /**\n     * Get the elapsed time as a formatted string.\n     * \n     * @public\n     */\n    public get formattedString() {\n        if (this.from) {\n            return this.formatter.format(\n                this.from, this.current, this.format\n            );\n        }\n\n        if (this.to) {\n            return this.formatter.format(\n                this.to, this.current, this.format\n            );\n        }\n\n        return this.formatter.format(\n            this.start, this.current, this.format\n        );\n    }\n\n    /**\n     * The face's current value.\n     * \n     * @public\n     */\n    public faceValue(): FaceValue<string> {\n        return this.value;\n    }\n        \n    /**\n     * Format the value with the new elapsed time.\n     * \n     * @public\n     */\n    public interval(instance: FlipClock<ElapsedTime>): void {\n        if (this.shouldStop()) {\n            instance.stop();\n        }\n        else {\n            this.current.setTime(instance.timer.lastLoop);\n\n            this.value.value = this.formattedString;\n        }\n    }\n\n    /**\n     * Set the dates before the clock starts.\n     * \n     * @public\n     */\n    public beforeStart(): void {\n        this.start = new Date;\n        this.current = new Date(this.start);\n    }\n    \n    /**\n     * Determines if the clock should be stopped.\n     * \n     * @public\n     */\n    public shouldStop(): boolean {\n        if (this.from && this.from > this.start) {\n            return differenceInMilliseconds(this.from, this.current) <= 0;\n        }\n\n        if (this.to) {\n            return differenceInMilliseconds(this.to, this.current) <= 0;\n        }\n\n        return false;\n    }\n}\n\n/**\n * Create a new `ElapsedTime` instance.\n * \n * @public\n */\nexport function elapsedTime(props?: ElapsedTimeProps) {\n    return new ElapsedTime(props);\n}","/**\n * The Timer class uses a requestAnimationFrame loop to build a timer that can\n * start and stop.\n * \n * @public\n */\nexport class Timer {\n\n    /**\n     * The count increments with each interval.\n     * \n     * @protected\n     */\n    protected $count: number = 0;\n\n    /**\n     * The requestAnimationFrame handle number.\n     * \n     * @protected\n     */\n    protected $handle?: number;\n\n    /**\n     * The number of milliseconds that define an interval.\n     * \n     * @public\n     */\n    public readonly interval: number;\n\n    /**\n     * The timestamp of the last loop.\n     * \n     * @protected\n     */\n    protected $lastLoop?: number;\n\n    /**\n     * The date the timer starts.\n     * \n     * @protected\n     */\n    protected $startDate?: Date;\n\n    /**\n     * Construct the timer.\n     * \n     * @public\n     */\n    constructor(ms: number = 1000) {\n        this.interval = ms;\n    }\n\n    /**\n     * Get the number of times the timer has ticked.\n     * \n     * @public\n     */\n    get count(): number {\n        return this.$count;\n    }\n\n    /**\n     * The `elapsed` attribute.\n     * \n     * @public\n     */\n    get elapsed(): number {\n        if (!this.$startDate) {\n            return 0;\n        }\n\n        return Math.max(0, Date.now() - this.$startDate.getTime());\n    }\n\n    /**\n     * The `elapsedSinceLastLoop` attribute.\n     * \n     * @public\n     */\n    get elapsedSinceLastLoop(): number {\n        if (!this.lastLoop) {\n            return 0;\n        }\n        \n        return Date.now() - this.lastLoop;\n    }\n\n    /**\n     * Determines if the Timer is currently running.\n     * \n     * @public\n     */\n    get isRunning(): boolean {\n        return this.$handle !== undefined;\n    }\n\n    /**\n     * Determines if the Timer is currently stopped.\n     * \n     * @public\n     */\n    get isStopped(): boolean {\n        return !this.isRunning;\n    }\n\n    /**\n     * Get the last timestamp the timer looped.\n     * \n     * @public\n     */\n    get lastLoop(): number {\n        return this.$lastLoop || 0;\n    }\n\n    /**\n     * Set the last timestamp the timer looped.\n     * \n     * @public\n     */\n    set lastLoop(value: number) {\n        this.$lastLoop = value;\n    }\n\n    /**\n     * Get the date object when the timer started.\n     * \n     * @public\n     */\n    get started(): Date | undefined {\n        return this.$startDate;\n    }\n\n    /**\n     * Resets the timer. If a callback is provided, re-start the clock.\n     * \n     * @public\n     */\n    reset(fn?: (timer: Timer) => void): Timer {\n        this.stop(() => {\n            this.$count = 0;\n            this.$lastLoop = 0;\n            this.start(fn);\n        });\n\n        return this;\n    }\n\n    /**\n     * Starts the timer.\n     * \n     * @public\n     */\n    start(fn?: (timer: Timer) => void): Timer {\n        this.$startDate = new Date;\n        this.$lastLoop = this.$startDate.getTime();\n\n        const loop = () => {\n            if (Date.now() - this.lastLoop >= this.interval) {\n                if (typeof fn === 'function') {\n                    fn(this);\n                }\n\n                this.$lastLoop = Date.now();\n                this.$count++;\n            }\n\n            this.$handle = requestAnimationFrame(loop);\n\n            return this;\n        };\n\n        return loop();\n    }\n\n    /**\n     * Stops the timer.\n     * \n     * @public\n     */\n    stop(fn?: (timer: Timer) => void): Timer {\n        if (this.isRunning && this.$handle) {\n            window.cancelAnimationFrame(this.$handle);\n\n            this.$lastLoop = 0;\n            this.$handle = undefined;\n\n            if (typeof fn === 'function') {\n                fn(this);\n            }\n        }\n\n        return this;\n    }\n}\n\n/**\n * Create a new `Timer` instance.\n * \n * @public\n */\nexport function timer(interval: number = 1000) {\n    return new Timer(interval);\n}\n","import { EventEmitter } from './EventEmitter';\nimport { Face, FaceHooks } from './Face';\nimport { getAnimationRate } from './helpers/functions';\nimport { Timer } from './Timer';\n\n/**\n * The dispose function.\n * \n * @public\n */\nexport type DisposeFunction = () => void;\n\n/**\n * A FlipClock theme definition.\n * \n * @public\n */\nexport type Theme<T extends Face<T>> = {\n    render: (el: Element, instance: FlipClock<T>) => [Element, DisposeFunction]\n} & FaceHooks<T>;\n\n/**\n * The options for `FlipClock`.\n * \n * @public\n */\nexport type FlipClockProps<T extends Face<T>> = {\n    /**\n     * Automatically start the clock after it is mounted.\n     */\n    autoStart?: boolean;\n\n    /**\n     * The face displayed on the clock.\n     */\n    face: T;\n\n    /**\n     * The theme used to render the clock/\n     */\n    theme: Theme<T>;\n\n    /**\n     * The timer that controls the clock interval.\n     */\n    timer?: Timer | number;\n\n    /**\n     * The DOM element the clock is mounted.\n     */\n    parent?: Element | null;\n}\n\n/**\n * The FlipClock class starts, stops, resets, mounts, and unmounts the clock.\n * The clock also tracks the time and renders the clock with each interval.\n * \n * @public\n */\nexport class FlipClock<T extends Face<T>> extends EventEmitter<Face<T>> {\n    /**\n     * Determines if the clock should automatically start when it is mounted.\n     * \n     * @public\n     */\n    public readonly autoStart: boolean = true;\n\n    /**\n     * The parent element to which the clock is mounted.\n     * \n     * @public\n     */\n    public parent?: Element;\n\n    /**\n     * The clock element.\n     * \n     * @public\n     */\n    public el?: Element;\n\n    /**\n     * The face used to display the clock.\n     * \n     * @public\n     */\n    public readonly face: T;\n\n    /**\n     * The face used to display the clock.\n     * \n     * @public\n     */\n    public readonly theme: Theme<T>;\n\n    /**\n     * The face value displayed on the clock.\n     * \n     * @public\n     */\n    public readonly timer: Timer;\n\n    /**\n     * Dispose of the clock.\n     * \n     * @private\n     */\n    protected dispose?: DisposeFunction;\n\n    /**\n     * Construct the FlipClock.\n     * \n     * @public\n     */\n    constructor(props: FlipClockProps<T>) {\n        super();\n\n        this.face = props.face;\n        this.theme = props.theme;\n\n        if (typeof props.autoStart === 'boolean') {\n            this.autoStart = props.autoStart;\n        }\n\n        this.timer = props.timer instanceof Timer\n            ? props.timer\n            : new Timer(props.timer);\n\n        this.hook('afterCreate', this);\n\n        if (props.parent) {\n            this.mount(props.parent);\n        }\n    }\n\n    /**\n     * Get the animation rate of the clock.\n     * \n     * @public\n     */\n    public get animationRate() {\n        if (!this.el) {\n            return 0;\n        }\n\n        return getAnimationRate(this.el);\n    }\n\n    /**\n     * Mount the clock instance to the DOM.\n     * \n     * @public\n     */\n    public mount(parent: Element) {\n        this.hook('beforeMount', this);\n\n        this.parent = parent;\n\n        const [el, dispose] = this.theme.render(this.parent, this);\n\n        this.el = el;\n        this.dispose = dispose;\n\n        this.hook('afterMount', this);\n\n        if (this.autoStart && this.timer.isStopped) {\n            requestAnimationFrame(() => this.start());\n        }\n\n        return this;\n    }\n\n    /**\n     * Start the clock instance.\n     * \n     * @public\n     */\n    public start(fn?: (instance: FlipClock<T>) => void): this {\n        this.hook('beforeStart', this);\n        \n        this.timer.start(() => {\n            requestAnimationFrame(() => {\n                this.hook('beforeInterval', this);\n\n                this.face.interval(this);\n\n                this.hook('afterInterval', this);\n\n                if (typeof fn === 'function') {\n                    fn(this);\n                }\n\n                this.hook('afterStart', this);\n            });\n        });\n\n        return this;\n    }\n\n    /**\n     * Stop the clock instance.\n     * \n     * @public\n     */\n    public stop(fn?: (instance: FlipClock<T>) => void): this {\n        this.hook('beforeStop', this);\n\n        this.timer.stop(() => {\n            if (typeof fn === 'function') {\n                fn(this);\n            }\n\n            this.hook('afterStop', this);\n        });\n\n        return this;\n    }\n\n    /**\n     * Toggle starting/stopping the clock instance.\n     * \n     * @public\n     */\n    public toggle(fn?: (instance: FlipClock<T>) => void): this {\n        if (this.timer.isStopped) {\n            this.start(fn);\n        }\n        else {\n            this.stop(fn);\n        }\n\n        return this;\n    }\n\n    /**\n     * Unmount the clock instance from the DOM.\n     * \n     * @public\n     */\n    public unmount(): this {\n        this.hook('beforeUnmount', this);\n\n        this.timer.stop();\n\n        this.el?.remove();\n        this.dispose?.();\n        \n        this.hook('afterUnmount', this);\n\n        return this;\n    }\n\n    /**\n     * Dispatch the event and call the method that corresponds to given hook.\n     * \n     * @protected\n     */\n    protected hook<K extends keyof Required<FaceHooks<T>>>(key: K, ...args: Required<FaceHooks<T>>[K] extends (...args: infer P) => void ? P : any[]): void {\n        if (key in this.face && typeof this.face[key] === 'function') {\n            const fn = this.face[key] as Function;\n\n            fn.apply(this.face, args);\n        }\n\n        if (key in this.theme && typeof this.theme[key] === 'function') {\n            const fn = this.theme[key] as Function;\n\n            fn(...args);\n        }\n\n        this.emit(key, ...args);\n    }\n}\n\n/**\n * Create a new `FlipClock` instance.\n * \n * @public\n */\nexport function flipClock<T extends Face<T>>(props: FlipClockProps<T>): FlipClock<T> {\n    return new FlipClock<T>(props);\n}","import { createMemo, createRoot, createRenderEffect, untrack, sharedConfig, enableHydration, getOwner, createEffect, runWithOwner, createSignal, onCleanup, splitProps } from 'solid-js';\nexport { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';\n\nconst booleans = [\"allowfullscreen\", \"async\", \"alpha\",\n\"autofocus\",\n\"autoplay\", \"checked\", \"controls\", \"default\", \"disabled\", \"formnovalidate\", \"hidden\",\n\"indeterminate\", \"inert\",\n\"ismap\", \"loop\", \"multiple\", \"muted\", \"nomodule\", \"novalidate\", \"open\", \"playsinline\", \"readonly\", \"required\", \"reversed\", \"seamless\",\n\"selected\", \"adauctionheaders\",\n\"browsingtopics\",\n\"credentialless\",\n\"defaultchecked\", \"defaultmuted\", \"defaultselected\", \"defer\", \"disablepictureinpicture\", \"disableremoteplayback\", \"preservespitch\",\n\"shadowrootclonable\", \"shadowrootcustomelementregistry\",\n\"shadowrootdelegatesfocus\", \"shadowrootserializable\",\n\"sharedstoragewritable\"\n];\nconst Properties = /*#__PURE__*/new Set([\n\"className\", \"value\",\n\"readOnly\", \"noValidate\", \"formNoValidate\", \"isMap\", \"noModule\", \"playsInline\", \"adAuctionHeaders\",\n\"allowFullscreen\", \"browsingTopics\",\n\"defaultChecked\", \"defaultMuted\", \"defaultSelected\", \"disablePictureInPicture\", \"disableRemotePlayback\", \"preservesPitch\", \"shadowRootClonable\", \"shadowRootCustomElementRegistry\",\n\"shadowRootDelegatesFocus\", \"shadowRootSerializable\",\n\"sharedStorageWritable\",\n...booleans]);\nconst ChildProperties = /*#__PURE__*/new Set([\"innerHTML\", \"textContent\", \"innerText\", \"children\"]);\nconst Aliases = /*#__PURE__*/Object.assign(Object.create(null), {\n  className: \"class\",\n  htmlFor: \"for\"\n});\nconst PropAliases = /*#__PURE__*/Object.assign(Object.create(null), {\n  class: \"className\",\n  novalidate: {\n    $: \"noValidate\",\n    FORM: 1\n  },\n  formnovalidate: {\n    $: \"formNoValidate\",\n    BUTTON: 1,\n    INPUT: 1\n  },\n  ismap: {\n    $: \"isMap\",\n    IMG: 1\n  },\n  nomodule: {\n    $: \"noModule\",\n    SCRIPT: 1\n  },\n  playsinline: {\n    $: \"playsInline\",\n    VIDEO: 1\n  },\n  readonly: {\n    $: \"readOnly\",\n    INPUT: 1,\n    TEXTAREA: 1\n  },\n  adauctionheaders: {\n    $: \"adAuctionHeaders\",\n    IFRAME: 1\n  },\n  allowfullscreen: {\n    $: \"allowFullscreen\",\n    IFRAME: 1\n  },\n  browsingtopics: {\n    $: \"browsingTopics\",\n    IMG: 1\n  },\n  defaultchecked: {\n    $: \"defaultChecked\",\n    INPUT: 1\n  },\n  defaultmuted: {\n    $: \"defaultMuted\",\n    AUDIO: 1,\n    VIDEO: 1\n  },\n  defaultselected: {\n    $: \"defaultSelected\",\n    OPTION: 1\n  },\n  disablepictureinpicture: {\n    $: \"disablePictureInPicture\",\n    VIDEO: 1\n  },\n  disableremoteplayback: {\n    $: \"disableRemotePlayback\",\n    AUDIO: 1,\n    VIDEO: 1\n  },\n  preservespitch: {\n    $: \"preservesPitch\",\n    AUDIO: 1,\n    VIDEO: 1\n  },\n  shadowrootclonable: {\n    $: \"shadowRootClonable\",\n    TEMPLATE: 1\n  },\n  shadowrootdelegatesfocus: {\n    $: \"shadowRootDelegatesFocus\",\n    TEMPLATE: 1\n  },\n  shadowrootserializable: {\n    $: \"shadowRootSerializable\",\n    TEMPLATE: 1\n  },\n  sharedstoragewritable: {\n    $: \"sharedStorageWritable\",\n    IFRAME: 1,\n    IMG: 1\n  }\n});\nfunction getPropAlias(prop, tagName) {\n  const a = PropAliases[prop];\n  return typeof a === \"object\" ? a[tagName] ? a[\"$\"] : undefined : a;\n}\nconst DelegatedEvents = /*#__PURE__*/new Set([\"beforeinput\", \"click\", \"dblclick\", \"contextmenu\", \"focusin\", \"focusout\", \"input\", \"keydown\", \"keyup\", \"mousedown\", \"mousemove\", \"mouseout\", \"mouseover\", \"mouseup\", \"pointerdown\", \"pointermove\", \"pointerout\", \"pointerover\", \"pointerup\", \"touchend\", \"touchmove\", \"touchstart\"]);\nconst SVGElements = /*#__PURE__*/new Set([\n\"altGlyph\", \"altGlyphDef\", \"altGlyphItem\", \"animate\", \"animateColor\", \"animateMotion\", \"animateTransform\", \"circle\", \"clipPath\", \"color-profile\", \"cursor\", \"defs\", \"desc\", \"ellipse\", \"feBlend\", \"feColorMatrix\", \"feComponentTransfer\", \"feComposite\", \"feConvolveMatrix\", \"feDiffuseLighting\", \"feDisplacementMap\", \"feDistantLight\", \"feDropShadow\", \"feFlood\", \"feFuncA\", \"feFuncB\", \"feFuncG\", \"feFuncR\", \"feGaussianBlur\", \"feImage\", \"feMerge\", \"feMergeNode\", \"feMorphology\", \"feOffset\", \"fePointLight\", \"feSpecularLighting\", \"feSpotLight\", \"feTile\", \"feTurbulence\", \"filter\", \"font\", \"font-face\", \"font-face-format\", \"font-face-name\", \"font-face-src\", \"font-face-uri\", \"foreignObject\", \"g\", \"glyph\", \"glyphRef\", \"hkern\", \"image\", \"line\", \"linearGradient\", \"marker\", \"mask\", \"metadata\", \"missing-glyph\", \"mpath\", \"path\", \"pattern\", \"polygon\", \"polyline\", \"radialGradient\", \"rect\",\n\"set\", \"stop\",\n\"svg\", \"switch\", \"symbol\", \"text\", \"textPath\",\n\"tref\", \"tspan\", \"use\", \"view\", \"vkern\"]);\nconst SVGNamespace = {\n  xlink: \"http://www.w3.org/1999/xlink\",\n  xml: \"http://www.w3.org/XML/1998/namespace\"\n};\nconst DOMElements = /*#__PURE__*/new Set([\"html\", \"base\", \"head\", \"link\", \"meta\", \"style\", \"title\", \"body\", \"address\", \"article\", \"aside\", \"footer\", \"header\", \"main\", \"nav\", \"section\", \"body\", \"blockquote\", \"dd\", \"div\", \"dl\", \"dt\", \"figcaption\", \"figure\", \"hr\", \"li\", \"ol\", \"p\", \"pre\", \"ul\", \"a\", \"abbr\", \"b\", \"bdi\", \"bdo\", \"br\", \"cite\", \"code\", \"data\", \"dfn\", \"em\", \"i\", \"kbd\", \"mark\", \"q\", \"rp\", \"rt\", \"ruby\", \"s\", \"samp\", \"small\", \"span\", \"strong\", \"sub\", \"sup\", \"time\", \"u\", \"var\", \"wbr\", \"area\", \"audio\", \"img\", \"map\", \"track\", \"video\", \"embed\", \"iframe\", \"object\", \"param\", \"picture\", \"portal\", \"source\", \"svg\", \"math\", \"canvas\", \"noscript\", \"script\", \"del\", \"ins\", \"caption\", \"col\", \"colgroup\", \"table\", \"tbody\", \"td\", \"tfoot\", \"th\", \"thead\", \"tr\", \"button\", \"datalist\", \"fieldset\", \"form\", \"input\", \"label\", \"legend\", \"meter\", \"optgroup\", \"option\", \"output\", \"progress\", \"select\", \"textarea\", \"details\", \"dialog\", \"menu\", \"summary\", \"details\", \"slot\", \"template\", \"acronym\", \"applet\", \"basefont\", \"bgsound\", \"big\", \"blink\", \"center\", \"content\", \"dir\", \"font\", \"frame\", \"frameset\", \"hgroup\", \"image\", \"keygen\", \"marquee\", \"menuitem\", \"nobr\", \"noembed\", \"noframes\", \"plaintext\", \"rb\", \"rtc\", \"shadow\", \"spacer\", \"strike\", \"tt\", \"xmp\", \"a\", \"abbr\", \"acronym\", \"address\", \"applet\", \"area\", \"article\", \"aside\", \"audio\", \"b\", \"base\", \"basefont\", \"bdi\", \"bdo\", \"bgsound\", \"big\", \"blink\", \"blockquote\", \"body\", \"br\", \"button\", \"canvas\", \"caption\", \"center\", \"cite\", \"code\", \"col\", \"colgroup\", \"content\", \"data\", \"datalist\", \"dd\", \"del\", \"details\", \"dfn\", \"dialog\", \"dir\", \"div\", \"dl\", \"dt\", \"em\", \"embed\", \"fieldset\", \"figcaption\", \"figure\", \"font\", \"footer\", \"form\", \"frame\", \"frameset\", \"head\", \"header\", \"hgroup\", \"hr\", \"html\", \"i\", \"iframe\", \"image\", \"img\", \"input\", \"ins\", \"kbd\", \"keygen\", \"label\", \"legend\", \"li\", \"link\", \"main\", \"map\", \"mark\", \"marquee\", \"menu\", \"menuitem\", \"meta\", \"meter\", \"nav\", \"nobr\", \"noembed\", \"noframes\", \"noscript\", \"object\", \"ol\", \"optgroup\", \"option\", \"output\", \"p\", \"param\", \"picture\", \"plaintext\", \"portal\", \"pre\", \"progress\", \"q\", \"rb\", \"rp\", \"rt\", \"rtc\", \"ruby\", \"s\", \"samp\", \"script\", \"section\", \"select\", \"shadow\", \"slot\", \"small\", \"source\", \"spacer\", \"span\", \"strike\", \"strong\", \"style\", \"sub\", \"summary\", \"sup\", \"table\", \"tbody\", \"td\", \"template\", \"textarea\", \"tfoot\", \"th\", \"thead\", \"time\", \"title\", \"tr\", \"track\", \"tt\", \"u\", \"ul\", \"var\", \"video\", \"wbr\", \"xmp\", \"input\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\",\n\"webview\",\n\"isindex\", \"listing\", \"multicol\", \"nextid\", \"noindex\", \"search\"]);\n\nconst memo = fn => createMemo(() => fn());\n\nfunction reconcileArrays(parentNode, a, b) {\n  let bLength = b.length,\n    aEnd = a.length,\n    bEnd = bLength,\n    aStart = 0,\n    bStart = 0,\n    after = a[aEnd - 1].nextSibling,\n    map = null;\n  while (aStart < aEnd || bStart < bEnd) {\n    if (a[aStart] === b[bStart]) {\n      aStart++;\n      bStart++;\n      continue;\n    }\n    while (a[aEnd - 1] === b[bEnd - 1]) {\n      aEnd--;\n      bEnd--;\n    }\n    if (aEnd === aStart) {\n      const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;\n      while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);\n    } else if (bEnd === bStart) {\n      while (aStart < aEnd) {\n        if (!map || !map.has(a[aStart])) a[aStart].remove();\n        aStart++;\n      }\n    } else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {\n      const node = a[--aEnd].nextSibling;\n      parentNode.insertBefore(b[bStart++], a[aStart++].nextSibling);\n      parentNode.insertBefore(b[--bEnd], node);\n      a[aEnd] = b[bEnd];\n    } else {\n      if (!map) {\n        map = new Map();\n        let i = bStart;\n        while (i < bEnd) map.set(b[i], i++);\n      }\n      const index = map.get(a[aStart]);\n      if (index != null) {\n        if (bStart < index && index < bEnd) {\n          let i = aStart,\n            sequence = 1,\n            t;\n          while (++i < aEnd && i < bEnd) {\n            if ((t = map.get(a[i])) == null || t !== index + sequence) break;\n            sequence++;\n          }\n          if (sequence > index - bStart) {\n            const node = a[aStart];\n            while (bStart < index) parentNode.insertBefore(b[bStart++], node);\n          } else parentNode.replaceChild(b[bStart++], a[aStart++]);\n        } else aStart++;\n      } else a[aStart++].remove();\n    }\n  }\n}\n\nconst $$EVENTS = \"_$DX_DELEGATE\";\nfunction render(code, element, init, options = {}) {\n  let disposer;\n  createRoot(dispose => {\n    disposer = dispose;\n    element === document ? code() : insert(element, code(), element.firstChild ? null : undefined, init);\n  }, options.owner);\n  return () => {\n    disposer();\n    element.textContent = \"\";\n  };\n}\nfunction template(html, isImportNode, isSVG, isMathML) {\n  let node;\n  const create = () => {\n    const t = isMathML ? document.createElementNS(\"http://www.w3.org/1998/Math/MathML\", \"template\") : document.createElement(\"template\");\n    t.innerHTML = html;\n    return isSVG ? t.content.firstChild.firstChild : isMathML ? t.firstChild : t.content.firstChild;\n  };\n  const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);\n  fn.cloneNode = fn;\n  return fn;\n}\nfunction delegateEvents(eventNames, document = window.document) {\n  const e = document[$$EVENTS] || (document[$$EVENTS] = new Set());\n  for (let i = 0, l = eventNames.length; i < l; i++) {\n    const name = eventNames[i];\n    if (!e.has(name)) {\n      e.add(name);\n      document.addEventListener(name, eventHandler);\n    }\n  }\n}\nfunction clearDelegatedEvents(document = window.document) {\n  if (document[$$EVENTS]) {\n    for (let name of document[$$EVENTS].keys()) document.removeEventListener(name, eventHandler);\n    delete document[$$EVENTS];\n  }\n}\nfunction setProperty(node, name, value) {\n  if (isHydrating(node)) return;\n  node[name] = value;\n}\nfunction setAttribute(node, name, value) {\n  if (isHydrating(node)) return;\n  if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);\n}\nfunction setAttributeNS(node, namespace, name, value) {\n  if (isHydrating(node)) return;\n  if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);\n}\nfunction setBoolAttribute(node, name, value) {\n  if (isHydrating(node)) return;\n  value ? node.setAttribute(name, \"\") : node.removeAttribute(name);\n}\nfunction className(node, value) {\n  if (isHydrating(node)) return;\n  if (value == null) node.removeAttribute(\"class\");else node.className = value;\n}\nfunction addEventListener(node, name, handler, delegate) {\n  if (delegate) {\n    if (Array.isArray(handler)) {\n      node[`$$${name}`] = handler[0];\n      node[`$$${name}Data`] = handler[1];\n    } else node[`$$${name}`] = handler;\n  } else if (Array.isArray(handler)) {\n    const handlerFn = handler[0];\n    node.addEventListener(name, handler[0] = e => handlerFn.call(node, handler[1], e));\n  } else node.addEventListener(name, handler, typeof handler !== \"function\" && handler);\n}\nfunction classList(node, value, prev = {}) {\n  const classKeys = Object.keys(value || {}),\n    prevKeys = Object.keys(prev);\n  let i, len;\n  for (i = 0, len = prevKeys.length; i < len; i++) {\n    const key = prevKeys[i];\n    if (!key || key === \"undefined\" || value[key]) continue;\n    toggleClassKey(node, key, false);\n    delete prev[key];\n  }\n  for (i = 0, len = classKeys.length; i < len; i++) {\n    const key = classKeys[i],\n      classValue = !!value[key];\n    if (!key || key === \"undefined\" || prev[key] === classValue || !classValue) continue;\n    toggleClassKey(node, key, true);\n    prev[key] = classValue;\n  }\n  return prev;\n}\nfunction style(node, value, prev) {\n  if (!value) return prev ? setAttribute(node, \"style\") : value;\n  const nodeStyle = node.style;\n  if (typeof value === \"string\") return nodeStyle.cssText = value;\n  typeof prev === \"string\" && (nodeStyle.cssText = prev = undefined);\n  prev || (prev = {});\n  value || (value = {});\n  let v, s;\n  for (s in prev) {\n    value[s] == null && nodeStyle.removeProperty(s);\n    delete prev[s];\n  }\n  for (s in value) {\n    v = value[s];\n    if (v !== prev[s]) {\n      nodeStyle.setProperty(s, v);\n      prev[s] = v;\n    }\n  }\n  return prev;\n}\nfunction setStyleProperty(node, name, value) {\n  value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);\n}\nfunction spread(node, props = {}, isSVG, skipChildren) {\n  const prevProps = {};\n  if (!skipChildren) {\n    createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));\n  }\n  createRenderEffect(() => typeof props.ref === \"function\" && use(props.ref, node));\n  createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));\n  return prevProps;\n}\nfunction dynamicProperty(props, key) {\n  const src = props[key];\n  Object.defineProperty(props, key, {\n    get() {\n      return src();\n    },\n    enumerable: true\n  });\n  return props;\n}\nfunction use(fn, element, arg) {\n  return untrack(() => fn(element, arg));\n}\nfunction insert(parent, accessor, marker, initial) {\n  if (marker !== undefined && !initial) initial = [];\n  if (typeof accessor !== \"function\") return insertExpression(parent, accessor, initial, marker);\n  createRenderEffect(current => insertExpression(parent, accessor(), current, marker), initial);\n}\nfunction assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {\n  props || (props = {});\n  for (const prop in prevProps) {\n    if (!(prop in props)) {\n      if (prop === \"children\") continue;\n      prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props);\n    }\n  }\n  for (const prop in props) {\n    if (prop === \"children\") {\n      if (!skipChildren) insertExpression(node, props.children);\n      continue;\n    }\n    const value = props[prop];\n    prevProps[prop] = assignProp(node, prop, value, prevProps[prop], isSVG, skipRef, props);\n  }\n}\nfunction hydrate$1(code, element, options = {}) {\n  if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);\n  sharedConfig.completed = globalThis._$HY.completed;\n  sharedConfig.events = globalThis._$HY.events;\n  sharedConfig.load = id => globalThis._$HY.r[id];\n  sharedConfig.has = id => id in globalThis._$HY.r;\n  sharedConfig.gather = root => gatherHydratable(element, root);\n  sharedConfig.registry = new Map();\n  sharedConfig.context = {\n    id: options.renderId || \"\",\n    count: 0\n  };\n  try {\n    gatherHydratable(element, options.renderId);\n    return render(code, element, [...element.childNodes], options);\n  } finally {\n    sharedConfig.context = null;\n  }\n}\nfunction getNextElement(template) {\n  let node,\n    key,\n    hydrating = isHydrating();\n  if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {\n    return template();\n  }\n  if (sharedConfig.completed) sharedConfig.completed.add(node);\n  sharedConfig.registry.delete(key);\n  return node;\n}\nfunction getNextMatch(el, nodeName) {\n  while (el && el.localName !== nodeName) el = el.nextSibling;\n  return el;\n}\nfunction getNextMarker(start) {\n  let end = start,\n    count = 0,\n    current = [];\n  if (isHydrating(start)) {\n    while (end) {\n      if (end.nodeType === 8) {\n        const v = end.nodeValue;\n        if (v === \"$\") count++;else if (v === \"/\") {\n          if (count === 0) return [end, current];\n          count--;\n        }\n      }\n      current.push(end);\n      end = end.nextSibling;\n    }\n  }\n  return [end, current];\n}\nfunction runHydrationEvents() {\n  if (sharedConfig.events && !sharedConfig.events.queued) {\n    queueMicrotask(() => {\n      const {\n        completed,\n        events\n      } = sharedConfig;\n      if (!events) return;\n      events.queued = false;\n      while (events.length) {\n        const [el, e] = events[0];\n        if (!completed.has(el)) return;\n        events.shift();\n        eventHandler(e);\n      }\n      if (sharedConfig.done) {\n        sharedConfig.events = _$HY.events = null;\n        sharedConfig.completed = _$HY.completed = null;\n      }\n    });\n    sharedConfig.events.queued = true;\n  }\n}\nfunction isHydrating(node) {\n  return !!sharedConfig.context && !sharedConfig.done && (!node || node.isConnected);\n}\nfunction toPropertyName(name) {\n  return name.toLowerCase().replace(/-([a-z])/g, (_, w) => w.toUpperCase());\n}\nfunction toggleClassKey(node, key, value) {\n  const classNames = key.trim().split(/\\s+/);\n  for (let i = 0, nameLen = classNames.length; i < nameLen; i++) node.classList.toggle(classNames[i], value);\n}\nfunction assignProp(node, prop, value, prev, isSVG, skipRef, props) {\n  let isCE, isProp, isChildProp, propAlias, forceProp;\n  if (prop === \"style\") return style(node, value, prev);\n  if (prop === \"classList\") return classList(node, value, prev);\n  if (value === prev) return prev;\n  if (prop === \"ref\") {\n    if (!skipRef) value(node);\n  } else if (prop.slice(0, 3) === \"on:\") {\n    const e = prop.slice(3);\n    prev && node.removeEventListener(e, prev, typeof prev !== \"function\" && prev);\n    value && node.addEventListener(e, value, typeof value !== \"function\" && value);\n  } else if (prop.slice(0, 10) === \"oncapture:\") {\n    const e = prop.slice(10);\n    prev && node.removeEventListener(e, prev, true);\n    value && node.addEventListener(e, value, true);\n  } else if (prop.slice(0, 2) === \"on\") {\n    const name = prop.slice(2).toLowerCase();\n    const delegate = DelegatedEvents.has(name);\n    if (!delegate && prev) {\n      const h = Array.isArray(prev) ? prev[0] : prev;\n      node.removeEventListener(name, h);\n    }\n    if (delegate || value) {\n      addEventListener(node, name, value, delegate);\n      delegate && delegateEvents([name]);\n    }\n  } else if (prop.slice(0, 5) === \"attr:\") {\n    setAttribute(node, prop.slice(5), value);\n  } else if (prop.slice(0, 5) === \"bool:\") {\n    setBoolAttribute(node, prop.slice(5), value);\n  } else if ((forceProp = prop.slice(0, 5) === \"prop:\") || (isChildProp = ChildProperties.has(prop)) || !isSVG && ((propAlias = getPropAlias(prop, node.tagName)) || (isProp = Properties.has(prop))) || (isCE = node.nodeName.includes(\"-\") || \"is\" in props)) {\n    if (forceProp) {\n      prop = prop.slice(5);\n      isProp = true;\n    } else if (isHydrating(node)) return value;\n    if (prop === \"class\" || prop === \"className\") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;\n  } else {\n    const ns = isSVG && prop.indexOf(\":\") > -1 && SVGNamespace[prop.split(\":\")[0]];\n    if (ns) setAttributeNS(node, ns, prop, value);else setAttribute(node, Aliases[prop] || prop, value);\n  }\n  return value;\n}\nfunction eventHandler(e) {\n  if (sharedConfig.registry && sharedConfig.events) {\n    if (sharedConfig.events.find(([el, ev]) => ev === e)) return;\n  }\n  let node = e.target;\n  const key = `$$${e.type}`;\n  const oriTarget = e.target;\n  const oriCurrentTarget = e.currentTarget;\n  const retarget = value => Object.defineProperty(e, \"target\", {\n    configurable: true,\n    value\n  });\n  const handleNode = () => {\n    const handler = node[key];\n    if (handler && !node.disabled) {\n      const data = node[`${key}Data`];\n      data !== undefined ? handler.call(node, data, e) : handler.call(node, e);\n      if (e.cancelBubble) return;\n    }\n    node.host && typeof node.host !== \"string\" && !node.host._$host && node.contains(e.target) && retarget(node.host);\n    return true;\n  };\n  const walkUpTree = () => {\n    while (handleNode() && (node = node._$host || node.parentNode || node.host));\n  };\n  Object.defineProperty(e, \"currentTarget\", {\n    configurable: true,\n    get() {\n      return node || document;\n    }\n  });\n  if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;\n  if (e.composedPath) {\n    const path = e.composedPath();\n    retarget(path[0]);\n    for (let i = 0; i < path.length - 2; i++) {\n      node = path[i];\n      if (!handleNode()) break;\n      if (node._$host) {\n        node = node._$host;\n        walkUpTree();\n        break;\n      }\n      if (node.parentNode === oriCurrentTarget) {\n        break;\n      }\n    }\n  }\n  else walkUpTree();\n  retarget(oriTarget);\n}\nfunction insertExpression(parent, value, current, marker, unwrapArray) {\n  const hydrating = isHydrating(parent);\n  if (hydrating) {\n    !current && (current = [...parent.childNodes]);\n    let cleaned = [];\n    for (let i = 0; i < current.length; i++) {\n      const node = current[i];\n      if (node.nodeType === 8 && node.data.slice(0, 2) === \"!$\") node.remove();else cleaned.push(node);\n    }\n    current = cleaned;\n  }\n  while (typeof current === \"function\") current = current();\n  if (value === current) return current;\n  const t = typeof value,\n    multi = marker !== undefined;\n  parent = multi && current[0] && current[0].parentNode || parent;\n  if (t === \"string\" || t === \"number\") {\n    if (hydrating) return current;\n    if (t === \"number\") {\n      value = value.toString();\n      if (value === current) return current;\n    }\n    if (multi) {\n      let node = current[0];\n      if (node && node.nodeType === 3) {\n        node.data !== value && (node.data = value);\n      } else node = document.createTextNode(value);\n      current = cleanChildren(parent, current, marker, node);\n    } else {\n      if (current !== \"\" && typeof current === \"string\") {\n        current = parent.firstChild.data = value;\n      } else current = parent.textContent = value;\n    }\n  } else if (value == null || t === \"boolean\") {\n    if (hydrating) return current;\n    current = cleanChildren(parent, current, marker);\n  } else if (t === \"function\") {\n    createRenderEffect(() => {\n      let v = value();\n      while (typeof v === \"function\") v = v();\n      current = insertExpression(parent, v, current, marker);\n    });\n    return () => current;\n  } else if (Array.isArray(value)) {\n    const array = [];\n    const currentArray = current && Array.isArray(current);\n    if (normalizeIncomingArray(array, value, current, unwrapArray)) {\n      createRenderEffect(() => current = insertExpression(parent, array, current, marker, true));\n      return () => current;\n    }\n    if (hydrating) {\n      if (!array.length) return current;\n      if (marker === undefined) return current = [...parent.childNodes];\n      let node = array[0];\n      if (node.parentNode !== parent) return current;\n      const nodes = [node];\n      while ((node = node.nextSibling) !== marker) nodes.push(node);\n      return current = nodes;\n    }\n    if (array.length === 0) {\n      current = cleanChildren(parent, current, marker);\n      if (multi) return current;\n    } else if (currentArray) {\n      if (current.length === 0) {\n        appendNodes(parent, array, marker);\n      } else reconcileArrays(parent, current, array);\n    } else {\n      current && cleanChildren(parent);\n      appendNodes(parent, array);\n    }\n    current = array;\n  } else if (value.nodeType) {\n    if (hydrating && value.parentNode) return current = multi ? [value] : value;\n    if (Array.isArray(current)) {\n      if (multi) return current = cleanChildren(parent, current, marker, value);\n      cleanChildren(parent, current, null, value);\n    } else if (current == null || current === \"\" || !parent.firstChild) {\n      parent.appendChild(value);\n    } else parent.replaceChild(value, parent.firstChild);\n    current = value;\n  } else ;\n  return current;\n}\nfunction normalizeIncomingArray(normalized, array, current, unwrap) {\n  let dynamic = false;\n  for (let i = 0, len = array.length; i < len; i++) {\n    let item = array[i],\n      prev = current && current[normalized.length],\n      t;\n    if (item == null || item === true || item === false) ; else if ((t = typeof item) === \"object\" && item.nodeType) {\n      normalized.push(item);\n    } else if (Array.isArray(item)) {\n      dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;\n    } else if (t === \"function\") {\n      if (unwrap) {\n        while (typeof item === \"function\") item = item();\n        dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;\n      } else {\n        normalized.push(item);\n        dynamic = true;\n      }\n    } else {\n      const value = String(item);\n      if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);else normalized.push(document.createTextNode(value));\n    }\n  }\n  return dynamic;\n}\nfunction appendNodes(parent, array, marker = null) {\n  for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);\n}\nfunction cleanChildren(parent, current, marker, replacement) {\n  if (marker === undefined) return parent.textContent = \"\";\n  const node = replacement || document.createTextNode(\"\");\n  if (current.length) {\n    let inserted = false;\n    for (let i = current.length - 1; i >= 0; i--) {\n      const el = current[i];\n      if (node !== el) {\n        const isParent = el.parentNode === parent;\n        if (!inserted && !i) isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);else isParent && el.remove();\n      } else inserted = true;\n    }\n  } else parent.insertBefore(node, marker);\n  return [node];\n}\nfunction gatherHydratable(element, root) {\n  const templates = element.querySelectorAll(`*[data-hk]`);\n  for (let i = 0; i < templates.length; i++) {\n    const node = templates[i];\n    const key = node.getAttribute(\"data-hk\");\n    if ((!root || key.startsWith(root)) && !sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);\n  }\n}\nfunction getHydrationKey() {\n  return sharedConfig.getNextContextId();\n}\nfunction NoHydration(props) {\n  return sharedConfig.context ? undefined : props.children;\n}\nfunction Hydration(props) {\n  return props.children;\n}\nconst voidFn = () => undefined;\nconst RequestContext = Symbol();\nfunction innerHTML(parent, content) {\n  !sharedConfig.context && (parent.innerHTML = content);\n}\n\nfunction throwInBrowser(func) {\n  const err = new Error(`${func.name} is not supported in the browser, returning undefined`);\n  console.error(err);\n}\nfunction renderToString(fn, options) {\n  throwInBrowser(renderToString);\n}\nfunction renderToStringAsync(fn, options) {\n  throwInBrowser(renderToStringAsync);\n}\nfunction renderToStream(fn, options) {\n  throwInBrowser(renderToStream);\n}\nfunction ssr(template, ...nodes) {}\nfunction ssrElement(name, props, children, needsId) {}\nfunction ssrClassList(value) {}\nfunction ssrStyle(value) {}\nfunction ssrAttribute(key, value) {}\nfunction ssrHydrationKey() {}\nfunction resolveSSRNode(node) {}\nfunction escape(html) {}\nfunction ssrSpread(props, isSVG, skipChildren) {}\n\nconst isServer = false;\nconst isDev = false;\nconst SVG_NAMESPACE = \"http://www.w3.org/2000/svg\";\nfunction createElement(tagName, isSVG = false, is = undefined) {\n  return isSVG ? document.createElementNS(SVG_NAMESPACE, tagName) : document.createElement(tagName, {\n    is\n  });\n}\nconst hydrate = (...args) => {\n  enableHydration();\n  return hydrate$1(...args);\n};\nfunction Portal(props) {\n  const {\n      useShadow\n    } = props,\n    marker = document.createTextNode(\"\"),\n    mount = () => props.mount || document.body,\n    owner = getOwner();\n  let content;\n  let hydrating = !!sharedConfig.context;\n  createEffect(() => {\n    if (hydrating) getOwner().user = hydrating = false;\n    content || (content = runWithOwner(owner, () => createMemo(() => props.children)));\n    const el = mount();\n    if (el instanceof HTMLHeadElement) {\n      const [clean, setClean] = createSignal(false);\n      const cleanup = () => setClean(true);\n      createRoot(dispose => insert(el, () => !clean() ? content() : dispose(), null));\n      onCleanup(cleanup);\n    } else {\n      const container = createElement(props.isSVG ? \"g\" : \"div\", props.isSVG),\n        renderRoot = useShadow && container.attachShadow ? container.attachShadow({\n          mode: \"open\"\n        }) : container;\n      Object.defineProperty(container, \"_$host\", {\n        get() {\n          return marker.parentNode;\n        },\n        configurable: true\n      });\n      insert(renderRoot, content);\n      el.appendChild(container);\n      props.ref && props.ref(container);\n      onCleanup(() => el.removeChild(container));\n    }\n  }, undefined, {\n    render: !hydrating\n  });\n  return marker;\n}\nfunction createDynamic(component, props) {\n  const cached = createMemo(component);\n  return createMemo(() => {\n    const component = cached();\n    switch (typeof component) {\n      case \"function\":\n        return untrack(() => component(props));\n      case \"string\":\n        const isSvg = SVGElements.has(component);\n        const el = sharedConfig.context ? getNextElement() : createElement(component, isSvg, untrack(() => props.is));\n        spread(el, props, isSvg);\n        return el;\n    }\n  });\n}\nfunction Dynamic(props) {\n  const [, others] = splitProps(props, [\"component\"]);\n  return createDynamic(() => props.component, others);\n}\n\nexport { Aliases, voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, assign, classList, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, escape, voidFn as generateHydrationScript, voidFn as getAssets, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getPropAlias, voidFn as getRequestEvent, hydrate, innerHTML, insert, isDev, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setBoolAttribute, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrSpread, ssrStyle, style, template, use, voidFn as useAssets };\n","import { createEffect, createMemo, createRoot, createSignal, Index, Match, Show, Switch, type JSX } from \"solid-js\";\nimport { render } from \"solid-js/web\";\nimport type { Face } from \"../../Face\";\nimport { type FlipClock, type Theme } from \"../../FlipClock\";\nimport type { CssDeclaration } from \"../../helpers/css\";\nimport type { DigitizedValue, DigitizedValues } from \"../../helpers/digitizer\";\n\n/**\n * The FlipClock theme labels.\n * \n * @public\n * \n */\nexport type FlipClockThemeLabels = (string|FlipClockThemeLabels)[];\n\n/**\n * The FlipClock theme options.\n * \n * @public\n */\nexport type FlipClockThemeOptions<T extends CssDeclaration = CssDeclaration> = {\n    /**\n     * The CSS declarations used for the theme.\n     */\n    css?: T | T[];\n\n    /**\n     * The characters that should be rendered as dividers.\n     */\n    dividers?: RegExp | string | string[];\n\n    /**\n     * The labels that appear above the groups.\n     */\n    labels?: FlipClockThemeLabels;\n};\n\n/**\n * Renders a FlipClock theme.\n * \n * @public\n */\nexport function theme(): Theme<any>;\nexport function theme<T extends CssDeclaration>(options: FlipClockThemeOptions<T>): Theme<any>;\nexport function theme<T extends CssDeclaration>(options?: FlipClockThemeOptions<T>): Theme<any>;\nexport function theme<T extends CssDeclaration>(options?: FlipClockThemeOptions<T>): Theme<any> {\n    return {\n        render<T extends Face<T>>(el: Element, instance: FlipClock<T>) {\n            return createRoot(dispose => {\n                let node: HTMLDivElement|undefined;\n\n                const css = createMemo(() => {\n                    return (Array.isArray(options?.css)\n                        ? options.css\n                        : [options?.css]\n                    )\n                        .filter(Boolean)\n                        .map(css => String(css))\n                        .join(' ');\n                });\n\n                render(() => (\n                    <div ref={el => node = el} class=\"flip-clock\" classList={{\n                        [css()]: true\n                    }}>\n                        <Group\n                            digits={instance.face.faceValue().digits}\n                            dividers={options?.dividers}\n                            labels={options?.labels ? [...options.labels] : undefined} />\n                    </div>\n                ), el);\n\n                return [node!, dispose];\n            });\n        }\n    };\n}\n\nfunction regexp(dividers?: FlipClockThemeOptions['dividers']): RegExp|undefined {\n    if (dividers === undefined) {\n        return;\n    }\n\n    if (dividers instanceof RegExp) {\n        return dividers;\n    }\n\n    return new RegExp(\n        `[${(Array.isArray(dividers) ? dividers : [dividers]).join('|')}]`\n    );\n}\n\nfunction isDivider(value: DigitizedValue, dividers?: FlipClockThemeOptions['dividers']) {\n    const pattern = regexp(dividers);\n\n    if (!pattern) {\n        return false;\n    }\n\n    return !!value.match(pattern)?.length;\n}\n\ntype GroupProps = {\n    labels?: FlipClockThemeLabels;\n    digits: DigitizedValues;\n    dividers?: FlipClockThemeOptions['dividers'];\n}\n\nfunction Group(props: GroupProps): JSX.Element {\n    const label = props.labels?.shift();\n\n    let group = 0;\n\n    return (\n        <div class=\"flip-clock-group\">\n            <Show when={typeof label === 'string'}>\n                <div class=\"flip-clock-label\">{label}</div>\n            </Show>\n            <div class=\"flip-clock-group-items\">\n                <Index each={props.digits}>\n                    {digit => {\n                        const itemType = createMemo(() => {\n                            const value = digit();\n\n                            if (Array.isArray(value)) {\n                                return 'group';\n                            };\n\n                            if (isDivider(value, props.dividers)) {\n                                return 'divider';\n                            }\n\n                            return 'card';\n                        });\n                        \n                        return (\n                            <Switch>\n                                <Match when={itemType() === 'group'}>\n                                    {(() => {\n                                        const labels = Array.isArray(props.labels?.[group])\n                                            ? props.labels[group++] as FlipClockThemeLabels\n                                            : undefined;\n                                        return <Group\n                                            digits={digit() as DigitizedValues}\n                                            dividers={props.dividers}\n                                            labels={labels}/>;\n                                    })()}\n                                </Match>\n                                <Match when={itemType() === 'divider'}>\n                                    <Divider value={digit() as DigitizedValue} />\n                                </Match>\n                                <Match when={itemType() === 'card'}>\n                                    <Card value={digit() as DigitizedValue} />\n                                </Match>\n                            </Switch>\n                        );\n                    }}\n                </Index>\n            </div>\n        </div>\n    );\n}\n\ntype CardProps = {\n    value: DigitizedValue;\n    lastValue?: DigitizedValue | DigitizedValues;\n}\n\nfunction Card(props: CardProps): JSX.Element {\n    const [value, setValue] = createSignal(props.value);\n    const [beforeValue, setBeforeValue] = createSignal(props.value);\n    const [getAnimate, setAnimate] = createSignal(false);\n\n    setBeforeValue(props.value);\n    setValue(props.value);\n  \n    createEffect(() => {\n        const nextValue = props.value;\n        \n        setAnimate(false);\n        \n        requestAnimationFrame(() => {\n            setBeforeValue(value());\n            setValue(nextValue);\n\n            if (nextValue !== beforeValue()) {\n                setAnimate(true);\n            }\n        });\n    });\n\n    return (\n        <div\n            class=\"flip-clock-card\"\n            data-value={value()}\n            data-before-value={beforeValue()}\n            classList={{\n                animate: getAnimate()\n            }}>\n            <CardItem\n                value={value()}\n                classList={{\n                    active: true\n                }} />\n            <CardItem\n                value={beforeValue()}\n                classList={{\n                    before: true\n                }} />\n        </div>\n    );\n};\n\ntype CardItemProps = {\n    value: string;\n    classList?: JSX.CustomAttributes<'div'>['classList'];\n    onAnimationEnd?: (event: AnimationEvent) => void;\n}\n\nfunction CardItem(props: CardItemProps): JSX.Element {\n    return (\n        <div\n            class=\"flip-clock-card-item\"\n            classList={props.classList} \n            onanimationend={props.onAnimationEnd}>\n            <div class=\"flip-clock-card-item-inner\">\n                <div class=\"top\">\n                    {props.value}\n                </div>\n                <div class=\"bottom\">\n                    {props.value}\n                </div>\n            </div>\n        </div>\n    );\n}\n\ntype DividerProps = {\n    value: string\n}\n\nfunction Divider(props: DividerProps): JSX.Element {\n    return (\n        <div class=\"flip-clock-divider\" data-value={props.value}>\n            <div class=\"flip-clock-divider-inner\">\n                {props.value}\n            </div>\n        </div>\n    );\n}","import { useCss } from \"../../helpers/css\";\n\n/**\n * The FlipClock CSS options.\n * \n * @public\n */\nexport type FlipClockCssOptions = {\n    borderRadius?: string;\n    fontSize?: string;\n    fontFamily?: string;\n    width?: string;\n    height?: string;\n    animationDuration?: string;\n    animationDelay?: string;\n}\n\n/**\n * The FlipClock Theme CSS.\n * \n * @public\n */\nexport const css = useCss((options?: FlipClockCssOptions) => ({\n    '&': {\n        '--border-radius': options?.borderRadius ?? '.15em',\n        '--font-size': options?.fontSize ?? '4.5em',\n        '--font-family': options?.fontFamily ?? '\"Helvetica Neue\", Helvetica, sans-serif',\n        '--width': options?.width ?? '1em',\n        '--height': options?.height ?? '1.45em',\n        '--animation-duration': options?.animationDuration ?? '250ms',\n        '--animation-delay': options?.animationDelay ?? 'var(--animation-duration)',\n\n        fontFamily: 'var(--font-family)',\n        fontSize: 'var(--font-size)',\n        userSelect: 'none',\n        textAlign: 'center',\n        position: 'relative',\n        width: '100%',\n        display: 'inline-flex',\n        boxSizing: 'border-box',\n        alignItems: 'flex-end',\n        gap: '.25rem'\n    },\n    '.flip-clock-label': {\n        fontSize: '1rem',\n        marginBottom: '.5rem',\n    },\n    '.flip-clock-meridium': {\n        lineHeight: '1em',\n        top: '50%',\n        left: '100%',\n        flex: '0',\n        width: 'auto',\n        textTransform: 'uppercase',\n        fontWeight: '200',\n        transform: 'translate(.5em, -50%)' \n    },\n    '.flip-clock-divider': {\n        position: 'relative',\n        display: 'flex',\n        alignItems: 'center',\n        justifyContent: 'center',\n        fontFamily: 'serif',\n        color: '#333',\n        height: 'var(--height)',\n        '.flip-clock-divider-inner': {\n            fontSize: '1.25em' \n        },\n        '&[data-value=\" \"]': {\n            minWidth: '1rem'\n        },\n        '.dark &': {\n            color: '#ccc'\n        },\n    },\n    '.flip-clock-group': {\n        display: 'flex',\n        flexDirection: 'column',\n        '+ .flip-clock-group': {\n            marginLeft: '1rem' \n        },\n        '.flip-clock-group-items': {\n            display: 'flex',\n            alignItems: 'end',\n            gap: '.25rem' \n        }\n    },\n    '.flip-clock-card': {\n        width: 'var(--width)',\n        height: 'var(--height)',\n        position: 'relative',\n        borderRadius: 'var(--border-radius)',\n        boxShadow: '0 1.5px 3px rgba(0, 0, 0, 0.24), 0 3px 8px rgba(0, 0, 0, 0.05)',\n        fontWeight: 'bold',\n        color: '#ccc',\n        flexShrink: 0,\n        '&:not(.animate)': {\n            '.active .flip-clock-card-item-inner': {\n                zIndex: '4' \n            },\n            '.flip-clock-card-item-inner': {\n                '.top, .bottom': {\n                    '&:after': {\n                        display: 'none' \n                    } \n                } \n            } \n        },\n        '.flip-clock-card-item': {\n            \n        },\n        '.flip-clock-card-item-inner': {\n            position: 'absolute',\n            width: '100%',\n            height: '100%',\n            '&:first-child': {\n                zIndex: '2' \n            },\n            '.top, .bottom': {\n                width: '100%',\n                height: '50%',\n                overflow: 'hidden',\n                position: 'relative',\n                fontSize: '1em',\n                background: '#333',\n                boxShadow: 'inset 0 0 .2em rgba(0,0,0,.5)',\n                '&:after': {\n                    content: '\" \"',\n                    display: 'block',\n                    position: 'absolute',\n                    top: '0',\n                    right: '0',\n                    bottom: '0',\n                    left: '0',\n                    overflow: 'hidden' \n                },\n                '&:before': {\n                    content: '\" \"',\n                    display: 'block',\n                    width: '100%',\n                    height: '1px',\n                    position: 'absolute' \n                } \n            },\n            '.top': {\n                borderRadius: 'var(--border-radius) var(--border-radius) 0 0',\n                lineHeight: 'var(--height)',\n                '&:after': {\n                    borderRadius: 'var(--border-radius) var(--border-radius) 0 0' \n                },\n                '&:before': {\n                    background: '#333',\n                    opacity: '.4',\n                    bottom: '0' \n                } \n            },\n            '.bottom': {\n                borderRadius: '0 0 var(--border-radius) var(--border-radius)',\n                lineHeight: '0',\n                '&:after': {\n                    borderRadius: '0 0 var(--border-radius) var(--border-radius)' \n                },\n                '&:before': {\n                    background: '#ccc',\n                    opacity: '.1' \n                } \n            } \n        },\n        '&.animate': {\n            animationDuration: 'var(--animation-duration)',\n            animationDelay: 'var(--animation-delay)',\n            '.flip-clock-card-item-inner': {\n                perspective: '15em' \n            },\n            '.top, .bottom, .active, .active > div, .before, .before > div': {\n                animationDelay: 'inherit',\n                animationFillMode: 'forwards',\n                animationDuration: 'inherit',\n                animationTimingFunction: 'inherit',\n                '&:after': {\n                    animationDuration: 'inherit',\n                    animationFillMode: 'inherit' \n                } \n            },\n            '.before': {\n                animationDelay: '0s',\n                animationTimingFunction: 'ease-in',\n                '.top': {\n                    animationName: 'flip-clock-top' \n                },\n                '.top:after, .bottom:after': {\n                    animationName: 'flip-clock-show-shadow' \n                } \n            },\n            '.active': {\n                animationTimingFunction: 'ease-out',\n                '& > div': {\n                    animationName: 'flip-clock-indexing' \n                },\n                '.top:after, .bottom:after': {\n                    animationName: 'flip-clock-hide-shadow' \n                },\n                '.bottom': {\n                    animationName: 'flip-clock-bottom' \n                } \n            } \n        },\n        '.active': {\n            zIndex: '2',\n            '.bottom': {\n                zIndex: '2',\n                transformOrigin: 'top center' \n            } \n        },\n        '.before': {\n            zIndex: '3',\n            '.top': {\n                zIndex: '2',\n                transformOrigin: 'bottom center',\n                '&:after': {\n                    background: 'linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,1) 100%)' \n                } \n            },\n            '.bottom': {\n                '&:after': {\n                    background: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,.1) 100%)' \n                } \n            } \n        } \n    },\n    '@keyframes flip-clock-indexing': {\n        '0%': {\n            zIndex: '2' \n        },\n        '1%': {\n            zIndex: '3' \n        },\n        '100%': {\n            zIndex: '4' \n        } \n    },\n    '@keyframes flip-clock-bottom': {\n        '0%': {\n            transform: 'rotateX(90deg)' \n        },\n        '100%': {\n            transform: 'rotateX(0)' \n        } \n    },\n    '@keyframes flip-clock-top': {\n        '0%': {\n            transform: 'rotateX(0)' \n        },\n        '100%': {\n            transform: 'rotateX(-90deg)' \n        } \n    },\n    '@keyframes flip-clock-show-shadow': {\n        '0%': {\n            opacity: '0' \n        },\n        '100%': {\n            opacity: '1' \n        } \n    },\n    '@keyframes flip-clock-hide-shadow': {\n        '0%': {\n            opacity: '1' \n        },\n        '100%': {\n            opacity: '0' \n        } \n    } \n}));","import { constructFrom } from \"./constructFrom.js\";\nimport { subDays } from \"./subDays.js\";\nimport { subMonths } from \"./subMonths.js\";\n\n/**\n * The {@link sub} function options.\n */\n\n/**\n * @name sub\n * @category Common Helpers\n * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @description\n * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be subtracted\n * @param options - An object with options\n *\n * | Key     | Description                        |\n * |---------|------------------------------------|\n * | years   | Amount of years to be subtracted   |\n * | months  | Amount of months to be subtracted  |\n * | weeks   | Amount of weeks to be subtracted   |\n * | days    | Amount of days to be subtracted    |\n * | hours   | Amount of hours to be subtracted   |\n * | minutes | Amount of minutes to be subtracted |\n * | seconds | Amount of seconds to be subtracted |\n *\n * All values default to 0\n *\n * @returns The new date with the seconds subtracted\n *\n * @example\n * // Subtract the following duration from 15 June 2017 15:29:20\n * const result = sub(new Date(2017, 5, 15, 15, 29, 20), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\n *   minutes: 9,\n *   seconds: 30\n * })\n * //=> Mon Sep 1 2014 10:19:50\n */\nexport function sub(date, duration, options) {\n  const {\n    years = 0,\n    months = 0,\n    weeks = 0,\n    days = 0,\n    hours = 0,\n    minutes = 0,\n    seconds = 0,\n  } = duration;\n\n  const withoutMonths = subMonths(date, months + years * 12, options);\n  const withoutDays = subDays(withoutMonths, days + weeks * 7, options);\n\n  const minutesToSub = minutes + hours * 60;\n  const secondsToSub = seconds + minutesToSub * 60;\n  const msToSub = secondsToSub * 1000;\n\n  return constructFrom(options?.in || date, +withoutDays - msToSub);\n}\n\n// Fallback for modularized imports:\nexport default sub;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link subDays} function options.\n */\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nexport function subDays(date, amount, options) {\n  return addDays(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subDays;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n  return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n"]}