{"version":3,"file":"scripts.modern.mjs","sources":["../src/js/Breakpoint.js","../src/js/Collection.js","../src/js/FocusTrap.js","../src/js/getConfig.js","../src/js/getPrefix.js","../src/js/localStore.js","../src/js/teleport.js","../src/js/transition.js","../src/js/updateGlobalState.js"],"sourcesContent":["export class Breakpoint {\n  #handler;\n\n  constructor(value, handler) {\n    this.value = value;\n    this.#handler = handler;\n    this.mql = null;\n  }\n\n  get handler() {\n    return this.#handler;\n  }\n\n  // Unmount existing handler before setting a new one.\n  set handler(func) {\n    if (this.mql) {\n      // Conditionally use removeListener() for IE11 support.\n      if (typeof this.mql.removeEventListener === \"function\") {\n        this.mql.removeEventListener(\"change\", this.#handler);\n      } else {\n        this.mql.removeListener(this.#handler);\n      }\n    }\n    this.#handler = func;\n  }\n\n  mount(value, handler) {\n    // Update passed params.\n    if (value) this.value = value;\n    if (handler) this.#handler = handler;\n\n    // Guard if no breakpoint was set.\n    if (!this.value) return this;\n\n    // Setup and store the MediaQueryList instance.\n    this.mql = window.matchMedia(`(min-width: ${this.value})`);\n\n    // Conditionally use addListener() for IE11 support.\n    if (typeof this.mql.addEventListener === \"function\") {\n      this.mql.addEventListener(\"change\", this.#handler);\n    } else {\n      this.mql.addListener(this.#handler);\n    }\n\n    // Run the handler.\n    this.#handler(this.mql);\n\n    return this;\n  }\n\n  unmount() {\n    // Guard if no MediaQueryList instance exists.\n    if (!this.mql) return this;\n\n    // Conditionally use removeListener() for IE11 support.\n    if (typeof this.mql.removeEventListener === \"function\") {\n      this.mql.removeEventListener(\"change\", this.#handler);\n    } else {\n      this.mql.removeListener(this.#handler);\n    }\n\n    // Set value, handler and MediaQueryList to null.\n    this.value = null;\n    this.#handler = null;\n    this.mql = null;\n\n    return this;\n  }\n}\n","export class Collection {\n  constructor() {\n    this.collection = [];\n  }\n\n  async register(item) {\n    await this.deregister(item);\n    this.collection.push(item);\n    return this.collection;\n  }\n\n  async deregister(ref) {\n    const index = this.collection.findIndex((entry) => {\n      return (entry === ref);\n    });\n    if (index >= 0) {\n      const entry = this.collection[index];\n      Object.getOwnPropertyNames(entry).forEach((prop) => {\n        delete entry[prop];\n      });\n      this.collection.splice(index, 1);\n    }\n    return this.collection;\n  }\n\n  async registerCollection(items) {\n    await Promise.all(Array.from(items, (item) => {\n      this.register(item);\n    }));\n    return this.collection;\n  }\n\n  async deregisterCollection() {\n    while (this.collection.length > 0) {\n      await this.deregister(this.collection[0]);\n    }\n    return this.collection;\n  }\n\n  get(value, key = \"id\") {\n    return this.collection.find((item) => {\n      return item[key] === value;\n    });\n  }\n}\n","export class FocusTrap {\n  #focusable;\n  #handleFocusTrap;\n  #handleFocusLock;\n\n  constructor(el = null, selectorFocus = \"[data-focus]\") {\n    this.el = el;\n    this.selectorFocus = selectorFocus;\n    this.#handleFocusTrap = handleFocusTrap.bind(this);\n    this.#handleFocusLock = handleFocusLock.bind(this);\n  }\n\n  get focusable() {\n    return this.#focusable;\n  }\n\n  set focusable(value) {\n    // Update the focusable value.\n    this.#focusable = value;\n\n    // Apply event listeners based on new focusable array length.\n    if (this.#focusable.length) {\n      document.removeEventListener(\"keydown\", this.#handleFocusLock);\n      document.addEventListener(\"keydown\", this.#handleFocusTrap);\n    } else {\n      document.removeEventListener(\"keydown\", this.#handleFocusTrap);\n      document.addEventListener(\"keydown\", this.#handleFocusLock);\n    }\n  }\n\n  get focusableFirst() {\n    return this.focusable[0];\n  }\n\n  get focusableLast() {\n    return this.focusable[this.focusable.length - 1];\n  }\n\n  mount(el, selectorFocus) {\n    // Update passed params.\n    if (el) this.el = el;\n    if (selectorFocus) this.selectorFocus = selectorFocus;\n\n    // Get the focusable elements.\n    this.focusable = this.getFocusable();\n\n    // Set the focus on the element.\n    this.focus();\n  }\n\n  unmount() {\n    // Set element to null.\n    this.el = null;\n\n    // Apply empty array to focusable.\n    this.focusable = [];\n\n    // Remove event listeners\n    document.removeEventListener(\"keydown\", this.#handleFocusTrap);\n    document.removeEventListener(\"keydown\", this.#handleFocusLock);\n  }\n\n  focus(el = this.el, selectorFocus = this.selectorFocus) {\n    // Query for the focus selector, otherwise return this element.\n    const result = el.querySelector(selectorFocus) || el;\n    // Give the returned element focus.\n    result.focus();\n  }\n\n  getFocusable(el = this.el) {\n    // Initialize the focusable array.\n    const focusable = [];\n\n    // Store the initial focus and scroll position.\n    const initFocus = document.activeElement;\n    const initScrollTop = el.scrollTop;\n\n    // Query for all the focusable elements.\n    const selector = focusableSelectors.join(\",\");\n    const els = el.querySelectorAll(selector);\n\n    // Loop through all focusable elements.\n    els.forEach((el) => {\n      // Set them to focus and check \n      el.focus();\n      // Test that the element took focus.\n      if (document.activeElement === el) {\n        // Add element to the focusable array.\n        focusable.push(el);\n      }\n    });\n\n    // Restore the initial scroll position and focus.\n    el.scrollTop = initScrollTop;\n    initFocus.focus();\n\n    // Return the focusable array.\n    return focusable;\n  }\n}\n\n// This has been copied over from focusable-selectors package and modified.\n// https://github.com/KittyGiraudel/focusable-selectors\nconst notInert = \":not([inert])\"; // Previously `:not([inert]):not([inert] *)`\nconst notNegTabIndex = \":not([tabindex^=\\\"-\\\"])\";\nconst notDisabled = \":not(:disabled)\";\nconst focusableSelectors = [\n  `a[href]${notInert}${notNegTabIndex}`,\n  `area[href]${notInert}${notNegTabIndex}`,\n  `input:not([type=\"hidden\"]):not([type=\"radio\"])${notInert}${notNegTabIndex}${notDisabled}`,\n  `input[type=\"radio\"]${notInert}${notNegTabIndex}${notDisabled}`,\n  `select${notInert}${notNegTabIndex}${notDisabled}`,\n  `textarea${notInert}${notNegTabIndex}${notDisabled}`,\n  `button${notInert}${notNegTabIndex}${notDisabled}`,\n  `details${notInert} > summary:first-of-type${notNegTabIndex}`,\n  `iframe${notInert}${notNegTabIndex}`,\n  `audio[controls]${notInert}${notNegTabIndex}`,\n  `video[controls]${notInert}${notNegTabIndex}`,\n  `[contenteditable]${notInert}${notNegTabIndex}`,\n  `[tabindex]${notInert}${notNegTabIndex}`,\n];\n\nfunction handleFocusTrap(event) {\n  // Check if the click was a tab and return if not.\n  const isTab = (event.key === \"Tab\" || event.keyCode === 9);\n  if (!isTab) return;\n\n  // If the shift key is pressed.\n  if (event.shiftKey) {\n    // If the active element is either the root el or first focusable.\n    if (\n      document.activeElement === this.focusableFirst ||\n      document.activeElement === this.el\n    ) {\n      // Prevent default and focus the last focusable element instead.\n      event.preventDefault();\n      this.focusableLast.focus();\n    }\n  } else {\n    // If the active element is either the root el or last focusable.\n    if (\n      document.activeElement === this.focusableLast ||\n      document.activeElement === this.el\n    ) {\n      // Prevent default and focus the first focusable element instead.\n      event.preventDefault();\n      this.focusableFirst.focus();\n    }\n  }\n}\n\nfunction handleFocusLock(event) {\n  // Ignore the tab key by preventing default.\n  const isTab = (event.key === \"Tab\" || event.keyCode === 9);\n  if (isTab) event.preventDefault();\n}\n","export function getConfig(el, dataConfig) {\n  const string = el.getAttribute(`data-${dataConfig}`) || \"\";\n  const json = string.replace(/'/g, \"\\\"\");\n  return (json) ? JSON.parse(json) : {};\n}\n","export function getPrefix() {\n  return getComputedStyle(document.body).getPropertyValue(\"--vrembem-variable-prefix\").trim();\n}\n","export function localStore(key, enable = true) {\n  const local = localStorage.getItem(key);\n  const store = (local) ? JSON.parse(local) : {};\n\n  return {\n    get(prop) {\n      return (prop) ? store[prop] : store;\n    },\n\n    set(prop, value) {\n      if (value) {\n        store[prop] = value;\n      } else {\n        delete store[prop];\n      }\n      if (enable) localStorage.setItem(key, JSON.stringify(store));\n      return store;\n    }\n  };\n}\n","/**\n * Teleports an element in the DOM based on a reference and teleport method.\n * Provide the comment node as the reference to teleport the element back to its\n * previous location.\n * @param {Node} what - What element to teleport.\n * @param {String || Node} where - Where to teleport the element.\n * @param {String} how - How (method) to teleport the element, e.g: 'after',\n *   'before', 'append' or 'prepend'.\n * @return {Node} Return the return reference if it was teleported else return\n *   null if it was returned to a comment reference.\n */\nexport function teleport(what, where, how) {\n  // Check if ref is either a comment or element node.\n  const isComment = (where.nodeType === Node.COMMENT_NODE);\n  const isElement = (where.nodeType === Node.ELEMENT_NODE);\n\n  // Get the reference element.\n  where = (isComment || isElement) ? where : document.querySelector(where);\n\n  // If ref is a comment, set teleport type to 'after'.\n  if (isComment) how = \"after\";\n\n  // Must be a valid reference element and method.\n  if (!where) throw new Error(`Not a valid teleport reference: '${where}'`);\n  if (typeof where[how] != \"function\") throw new Error(`Not a valid teleport method: '${how}'`);\n\n  // Initial return ref is null.\n  let returnRef = null;\n\n  // If ref is not a comment, set a return reference comment.\n  if (!isComment) {\n    returnRef = document.createComment(\"teleported #\" + what.id);\n    what.before(returnRef);\n  }\n\n  // Teleport the target node.\n  where[how](what);\n\n  // Delete the comment node if element was returned to a comment reference.\n  if (isComment) {\n    where.remove();\n  }\n\n  // Return the return reference if it was teleported else return null if it was\n  // returned to a comment reference.\n  return returnRef;\n}\n","export const openTransition = (el, settings) => {\n  return new Promise((resolve) => {\n    // Check if transitions are enabled.\n    if (settings.transition) {\n      // Toggle classes for opening transition.\n      el.classList.remove(settings.stateClosed);\n      el.classList.add(settings.stateOpening);\n\n      // Add event listener for when the transition is finished.\n      el.addEventListener(\"transitionend\", function _f(event) {\n        // Prevent child transition bubbling from firing this event.\n        if (event.target != el) return;\n\n        // Toggle final opened state classes.\n        el.classList.add(settings.stateOpened);\n        el.classList.remove(settings.stateOpening);\n\n        // Resolve the promise and remove the event listener.\n        resolve(el);\n        this.removeEventListener(\"transitionend\", _f);\n      });\n    } else {\n      // Toggle final opened state classes and resolve the promise.\n      el.classList.add(settings.stateOpened);\n      el.classList.remove(settings.stateClosed);\n      resolve(el);\n    }\n  });\n};\n\nexport const closeTransition = (el, settings) => {\n  return new Promise((resolve) => {\n    // Check if transitions are enabled.\n    if (settings.transition) {\n      // Toggle classes for closing transition.\n      el.classList.add(settings.stateClosing);\n      el.classList.remove(settings.stateOpened);\n\n      // Add event listener for when the transition is finished.\n      el.addEventListener(\"transitionend\", function _f(event) {\n        // Prevent child transition bubbling from firing this event.\n        if (event.target != el) return;\n        \n        // Toggle final closed state classes.\n        el.classList.remove(settings.stateClosing);\n        el.classList.add(settings.stateClosed);\n\n        // Resolve the promise and remove the event listener.\n        resolve(el);\n        this.removeEventListener(\"transitionend\", _f);\n      });\n    } else {\n      // Toggle final closed state classes and resolve the promise.\n      el.classList.add(settings.stateClosed);\n      el.classList.remove(settings.stateOpened);\n      resolve(el);\n    }\n  });\n};\n","function setOverflowHidden(state, selector) {\n  if (selector) {\n    const els = document.querySelectorAll(selector);\n    els.forEach((el) => {\n      if (state) {\n        el.style.overflow = \"hidden\";\n      } else {\n        el.style.removeProperty(\"overflow\");\n      }\n    });\n  }\n}\n\nfunction setInert(state, selector) {\n  if (selector) {\n    document.querySelectorAll(selector).forEach((el) => {\n      el.inert = state;\n    });\n  }\n}\n\nexport function updateGlobalState(param, config) {\n  // Set inert state based on if a modal is active.\n  setInert(!!param, config.selectorInert);\n\n  // Set overflow state based on if a modal is active.\n  setOverflowHidden(!!param, config.selectorOverflow);\n}\n"],"names":["_handler","_classPrivateFieldLooseKey","Breakpoint","constructor","value","handler","Object","defineProperty","this","writable","_classPrivateFieldLooseBase","mql","func","removeEventListener","removeListener","mount","window","matchMedia","addEventListener","addListener","unmount","Collection","collection","async","item","deregister","push","ref","index","findIndex","entry","getOwnPropertyNames","forEach","prop","splice","items","Promise","all","Array","from","register","length","get","key","find","_focusable","_handleFocusTrap","_handleFocusLock","FocusTrap","el","selectorFocus","handleFocusTrap","bind","handleFocusLock","focusable","document","focusableFirst","focusableLast","getFocusable","focus","querySelector","initFocus","activeElement","initScrollTop","scrollTop","selector","focusableSelectors","join","querySelectorAll","notInert","notNegTabIndex","notDisabled","event","keyCode","shiftKey","preventDefault","getConfig","dataConfig","json","getAttribute","replace","JSON","parse","getPrefix","getComputedStyle","body","getPropertyValue","trim","localStore","enable","local","localStorage","getItem","store","set","setItem","stringify","teleport","what","where","how","isComment","nodeType","Node","COMMENT_NODE","isElement","ELEMENT_NODE","Error","returnRef","createComment","id","before","remove","openTransition","settings","resolve","transition","classList","stateClosed","add","stateOpening","_f","target","stateOpened","closeTransition","stateClosing","updateGlobalState","param","config","state","selectorInert","inert","style","overflow","removeProperty","setOverflowHidden","selectorOverflow"],"mappings":"kLAAA,IAAAA,eAAAC,EAAA,iBAAaC,EAGXC,YAAYC,EAAOC,GAASC,OAAAC,eAAAC,KAAAR,EAAAS,CAAAA,UAAAL,EAAAA,eAC1BI,KAAKJ,MAAQA,EACbM,EAAIF,KAAAR,GAAAA,GAAYK,EAChBG,KAAKG,IAAM,IACb,CAEIN,cACF,OAAAK,EAAOF,KAAIR,GAAAA,EACb,CAGIK,YAAQO,GACNJ,KAAKG,MAEqC,mBAAjCH,KAAKG,IAAIE,oBAClBL,KAAKG,IAAIE,oBAAoB,SAAQH,EAAEF,KAAIR,GAAAA,IAE3CQ,KAAKG,IAAIG,eAAcJ,EAACF,KAAIR,GAAAA,KAGhCU,EAAAF,KAAIR,GAAAA,GAAYY,CAClB,CAEAG,MAAMX,EAAOC,GAMX,OAJID,IAAOI,KAAKJ,MAAQA,GACpBC,IAASK,OAAIV,GAAAA,GAAYK,GAGxBG,KAAKJ,OAGVI,KAAKG,IAAMK,OAAOC,WAAW,eAAeT,KAAKJ,UAGR,mBAA1BI,KAACG,IAAIO,iBAClBV,KAAKG,IAAIO,iBAAiB,SAAQR,EAAEF,KAAIR,GAAAA,IAExCQ,KAAKG,IAAIQ,YAAWT,EAACF,KAAIR,GAAAA,IAI3BU,EAAIF,KAAAR,GAAAA,GAAUQ,KAAKG,KAGrBH,MAhB0BA,IAgB1B,CAEAY,UAEE,OAAKZ,KAAKG,KAGkC,wBAA5BA,IAAIE,oBAClBL,KAAKG,IAAIE,oBAAoB,SAAQH,EAAEF,KAAIR,GAAAA,IAE3CQ,KAAKG,IAAIG,eAAcJ,EAACF,KAAIR,GAAAA,IAI9BQ,KAAKJ,MAAQ,KACbM,EAAIF,KAAAR,GAAAA,GAAY,KAChBQ,KAAKG,IAAM,WAZeH,IAe5B,ECnEK,MAAMa,EACXlB,cACEK,KAAKc,W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