{"version":3,"sources":["webpack:///./node_modules/v-clipboard/dist/v-clipboard.es.js"],"names":["g","Object","defineProperty","d","t","e","r","enumerable","configurable","writable","value","m","C","asString","console","warn","JSON","stringify","x","createTextarea","document","createElement","addEventListener","stopPropagation","setAttribute","style","cssText","c","navigator","permissions","query","name","requestClipboardPermission","state","clipboard","writeText","writeClipboardExecCommand","body","appendChild","userAgent","match","contentEditable","readOnly","n","createRange","selectNodeContents","o","window","getSelection","removeAllRanges","addRange","setSelectionRange","select","execCommand","removeChild","writeClipboard","i","constructor","this","Map","id","Date","now","toString","seed","add","data","set","get","delete","E","install","version","config","globalProperties","prototype","$clipboard","copy","directive","beforeMount","arg","a","s","dataset","clipboardError","clipboardSuccess","l","async","p","u","b","event","clipboardClick","unmounted","clipboardSuccessHandler","clipboardErrorHandler","clipboardClickHandler","removeEventListener"],"mappings":"4FAAA,6FAAIA,EAAIC,OAAOC,eAEXC,EAAI,CAACC,EAAGC,EAAGC,KADP,EAACF,EAAGC,EAAGC,KAAMD,KAAKD,EAAIJ,EAAEI,EAAGC,EAAG,CAAEE,YAAY,EAAIC,cAAc,EAAIC,UAAU,EAAIC,MAAOJ,IAAOF,EAAEC,GAAKC,GACvFK,CAAEP,EAAe,iBAALC,EAAgBA,EAAI,GAAKA,EAAGC,GAAIA,GAmBlE,MAA8DM,EAAI,CAChEC,SAAST,GACP,GAAS,MAALA,EACF,OAAOU,QAAQC,KAAK,4BAA6B,GACnD,GAAgB,iBAALX,EACT,IACE,OAAOY,KAAKC,UAAUb,GACtB,MAAOC,GACP,OAAOS,QAAQC,KARb,mDAQqBV,GAAI,GAE/B,OAAOD,IAE8Dc,EAAI,CAC3EC,eAAef,GACb,MAAMC,EAAIe,SAASC,cAAc,YACjC,OAAOhB,EAAEiB,iBAAiB,WAAYhB,IACpCA,EAAEiB,qBACAlB,EAAEK,MAAQN,EAAGC,EAAEmB,aAAa,WAAY,IAAKnB,EAAEoB,MAAMC,QALtD,iEAKmErB,IAEvEsB,EAAI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CC,YAAYzE,EAAGqC,GACb,MAAMG,EAAIH,EAAEqC,IAAKC,EAAItC,EAAEjC,MAAOwE,EAAgB,mBAALD,EACzC,GAAU,UAANnC,GAAiBoC,EAEnB,YADA5E,EAAE6E,QAAQC,eAAiB5B,EAAES,IAAIgB,IAGnC,GAAU,UAANnC,GAAiBoC,EAEnB,YADA5E,EAAE6E,QAAQE,iBAAmB7B,EAAES,IAAIgB,IAGrC,MAAMK,EAAIC,MAAOC,IACf,IAAIC,EACJ,MAAMC,QAAU/D,EAAEkD,KAAKI,GAAK3E,EAAE6E,QAAQE,iBAAmB/E,EAAE6E,QAAQC,eACjD,OAAjBK,EAAIjC,EAAEY,IAAIsB,KAAeD,EAAE,CAAE/E,MAAOuE,EAAGU,MAAOH,KAEjDlF,EAAE6E,QAAQS,eAAiBpC,EAAES,IAAIqB,GAAIhF,EAAEgB,iBAAiB,QAASgE,IAEnEO,UAAUvF,GACR,MACEwF,wBAAyBnD,EACzBoD,sBAAuBjD,EACvBkD,sBAAuBf,GACrB3E,EAAE6E,QACN,GAAIxC,GAAKa,EAAEa,OAAO1B,GAAIG,GAAKU,EAAEa,OAAOvB,GAAImC,EAAG,CACzC,MAAMC,EAAI1B,EAAEY,IAAIa,GAChBC,IAAM5E,EAAE2F,oBAAoB,QAASf,GAAI1B,EAAEa,OAAOY,MAGtD,WACE,OAAOvB,KAAKqB,aAEd,aACE,OAAOrB,KAAKmC","file":"c807abf.js","sourcesContent":["var g = Object.defineProperty;\nvar m = (t, e, r) => e in t ? g(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;\nvar d = (t, e, r) => (m(t, typeof e != \"symbol\" ? e + \"\" : e, r), r);\nclass f {\n constructor() {\n d(this, \"seed\", 0);\n d(this, \"data\", /* @__PURE__ */ new Map());\n }\n id() {\n return Date.now().toString(26) + this.seed++;\n }\n add(e, r = this.id()) {\n return this.data.set(r, e), r;\n }\n get(e) {\n return this.data.get(e);\n }\n delete(e) {\n this.delete(e);\n }\n}\nconst y = \"Failed to copy value to clipboard. Unknown type.\", C = {\n asString(t) {\n if (t == null)\n return console.warn(\"Clipboard input is empty\"), \"\";\n if (typeof t != \"string\")\n try {\n return JSON.stringify(t);\n } catch (e) {\n return console.warn(y, e), \"\";\n }\n return t;\n }\n}, w = \"position:fixed; pointer-events:none; z-index:-9999; opacity:0;\", x = {\n createTextarea(t) {\n const e = document.createElement(\"textarea\");\n return e.addEventListener(\"focusin\", (r) => {\n r.stopPropagation();\n }), e.value = t, e.setAttribute(\"readonly\", \"\"), e.style.cssText = w, e;\n }\n}, c = {\n async requestClipboardPermission() {\n return navigator.permissions.query({\n name: \"clipboard-write\"\n });\n },\n async writeClipboard(t) {\n return (await c.requestClipboardPermission()).state === \"granted\" ? (await navigator.clipboard.writeText(t), !0) : !1;\n },\n writeClipboardExecCommand(t) {\n const e = x.createTextarea(t);\n if (document.body.appendChild(e), navigator.userAgent.match(/ipad|ipod|iphone/i)) {\n e.contentEditable = \"true\", e.readOnly = !0;\n const n = document.createRange();\n n.selectNodeContents(e);\n const o = window.getSelection();\n o && (o.removeAllRanges(), o.addRange(n), e.setSelectionRange(0, 999999));\n } else\n e.select();\n const r = document.execCommand(\"copy\");\n return document.body.removeChild(e), r;\n },\n async copy(t) {\n const e = typeof t == \"function\" ? t() : t, r = C.asString(e);\n if (c.writeClipboardExecCommand(r))\n return !0;\n await c.writeClipboard(r);\n }\n}, i = new f(), E = {\n install(t) {\n const e = t.version[0] === \"3\" ? t.config.globalProperties : t.prototype;\n e.$clipboard = c.copy, t.directive(\"clipboard\", {\n beforeMount(r, n) {\n const o = n.arg, a = n.value, s = typeof a == \"function\";\n if (o === \"error\" && s) {\n r.dataset.clipboardError = i.add(a);\n return;\n }\n if (o === \"error\" && s) {\n r.dataset.clipboardSuccess = i.add(a);\n return;\n }\n const l = async (p) => {\n var u;\n const b = await c.copy(a) ? r.dataset.clipboardSuccess : r.dataset.clipboardError;\n (u = i.get(b)) == null || u({ value: a, event: p });\n };\n r.dataset.clipboardClick = i.add(l), r.addEventListener(\"click\", l);\n },\n unmounted(r) {\n const {\n clipboardSuccessHandler: n,\n clipboardErrorHandler: o,\n clipboardClickHandler: a\n } = r.dataset;\n if (n && i.delete(n), o && i.delete(o), a) {\n const s = i.get(a);\n s && (r.removeEventListener(\"click\", s), i.delete(a));\n }\n },\n get bind() {\n return this.beforeMount;\n },\n get unbind() {\n return this.unmounted;\n }\n });\n }\n};\nexport {\n c as Clipboard,\n E as default\n};\n//# sourceMappingURL=v-clipboard.es.js.map\n"],"sourceRoot":""}