{"version":3,"file":"Linkify.mjs","sources":["../../src/utils/Linkify.js","../../src/directives/Linkify/index.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport linkifyStr from 'linkify-string'\n\n/**\n * Linkify text\n *\n * @param {string} text The text to linkify\n * @return {string} The linkified string\n */\nconst Linkify = (text) => {\n\treturn linkifyStr(text, {\n\t\tdefaultProtocol: 'https',\n\t\ttarget: '_blank',\n\t\tclassName: 'external linkified',\n\t\tattributes: {\n\t\t\trel: 'nofollow noopener noreferrer',\n\t\t},\n\t})\n}\n\nexport default Linkify\n","/**\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Linkify from '../../utils/Linkify.js'\n\n// Use function shorthand for same behavior on bind and update\n// https://vuejs.org/v2/guide/custom-directive.html#Function-Shorthand\nexport const directive = function(el, binding) {\n\tif (binding.value?.linkify === true) {\n\t\tel.innerHTML = Linkify(binding.value.text)\n\t}\n}\n\nexport default directive\n"],"names":[],"mappings":";AAaA,MAAM,UAAU,CAAC,SAAS;AACzB,SAAO,WAAW,MAAM;AAAA,IACvB,iBAAiB;AAAA,IACjB,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,YAAY;AAAA,MACX,KAAK;AAAA,IACL;AAAA,EACH,CAAE;AACF;ACbY,MAAC,YAAY,SAAS,IAAI,SAAS;AAC9C,MAAI,QAAQ,OAAO,YAAY,MAAM;AACpC,OAAG,YAAY,QAAQ,QAAQ,MAAM,IAAI;AAAA,EACzC;AACF;"}