{"version":3,"file":"module-CGzIBJZi.js","sources":["../../../app/javascript/shared/helpers/HTMLSanitizer.js","../../../node_modules/.pnpm/vue3-click-away@1.2.4/node_modules/vue3-click-away/dist/module.js"],"sourcesContent":["export const escapeHtml = (unsafe = '') => {\n  return unsafe\n    .replace(/&/g, '&amp;')\n    .replace(/</g, '&lt;')\n    .replace(/>/g, '&gt;')\n    .replace(/\"/g, '&quot;')\n    .replace(/'/g, '&#039;');\n};\n\nexport const afterSanitizeAttributes = currentNode => {\n  if ('target' in currentNode) {\n    currentNode.setAttribute('target', '_blank');\n  }\n};\n\nexport const domPurifyConfig = {\n  hooks: {\n    afterSanitizeAttributes,\n  },\n};\n","const clickEventType = function () {\n  return document.ontouchstart !== null ? \"click\" : \"touchstart\";\n};\n\nconst UNIQUE_ID = \"__vue_click_away__\";\n\nconst onMounted = function (el, binding, vnode) {\n  onUnmounted(el);\n  let vm = vnode.context;\n  let callback = binding.value;\n  let nextTick = false;\n  setTimeout(function () {\n    nextTick = true;\n  }, 0);\n\n  el[UNIQUE_ID] = function (event) {\n    if ((!el || !el.contains(event.target)) && callback && nextTick && typeof callback === \"function\") {\n      return callback.call(vm, event);\n    }\n  };\n\n  document.addEventListener(clickEventType(), el[UNIQUE_ID], false);\n};\n\nconst onUnmounted = function (el) {\n  document.removeEventListener(clickEventType(), el[UNIQUE_ID], false);\n  delete el[UNIQUE_ID];\n};\n\nconst onUpdated = function (el, binding, vnode) {\n  if (binding.value === binding.oldValue) {\n    return;\n  }\n\n  onMounted(el, binding, vnode);\n};\n\nconst plugin = {\n  install: function (app) {\n    app.directive('click-away', directive);\n  }\n};\nconst directive = {\n  mounted: onMounted,\n  updated: onUpdated,\n  unmounted: onUnmounted\n};\nconst mixin = {\n  directives: {\n    ClickAway: directive\n  }\n};\n\nexport default plugin;\nexport { directive, mixin };\n//# sourceMappingURL=module.js.map\n"],"names":["afterSanitizeAttributes","currentNode","domPurifyConfig","clickEventType","UNIQUE_ID","onMounted","el","binding","vnode","onUnmounted","vm","callback","nextTick","event","onUpdated","directive"],"mappings":"AASO,MAAMA,EAA0BC,GAAe,CAChD,WAAYA,GACdA,EAAY,aAAa,SAAU,QAAQ,CAE/C,EAEaC,EAAkB,CAC7B,MAAO,CACL,wBAAAF,CACD,CACH,ECnBMG,EAAiB,UAAY,CACjC,OAAO,SAAS,eAAiB,KAAO,QAAU,YACpD,EAEMC,EAAY,qBAEZC,EAAY,SAAUC,EAAIC,EAASC,EAAO,CAC9CC,EAAYH,CAAE,EACd,IAAII,EAAKF,EAAM,QACXG,EAAWJ,EAAQ,MACnBK,EAAW,GACf,WAAW,UAAY,CACrBA,EAAW,EACZ,EAAE,CAAC,EAEJN,EAAGF,CAAS,EAAI,SAAUS,EAAO,CAC/B,IAAK,CAACP,GAAM,CAACA,EAAG,SAASO,EAAM,MAAM,IAAMF,GAAYC,GAAY,OAAOD,GAAa,WACrF,OAAOA,EAAS,KAAKD,EAAIG,CAAK,CAEpC,EAEE,SAAS,iBAAiBV,EAAgB,EAAEG,EAAGF,CAAS,EAAG,EAAK,CAClE,EAEMK,EAAc,SAAUH,EAAI,CAChC,SAAS,oBAAoBH,EAAgB,EAAEG,EAAGF,CAAS,EAAG,EAAK,EACnE,OAAOE,EAAGF,CAAS,CACrB,EAEMU,EAAY,SAAUR,EAAIC,EAASC,EAAO,CAC1CD,EAAQ,QAAUA,EAAQ,UAI9BF,EAAUC,EAAIC,EAASC,CAAK,CAC9B,EAOMO,EAAY,CAChB,QAASV,EACT,QAASS,EACT,UAAWL,CACb","x_google_ignoreList":[1]}