{"version":3,"sources":["jsdelivr-header.js","/npm/@marcreichel/alpine-autosize@1.3.3/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,aAAc,WAErB,SAAS,SAAS,GACd,EAAO,UAAU,YAAY,CAAC,GAAK,cAAa,cAC5C,SAAS,GACT,MAAM,EAAa,MAAM,KAAK,EAAG,YAEjC,IAAI,GAAe,EAEnB,IAAK,IAAI,SAAC,KAAa,EACnB,GAAiB,eAAb,GAA6B,EAAS,WAAW,eAAgB,CACjE,GAAe,EACf,KACJ,EAGC,EAAG,aAAa,gBAAkB,GACnC,EAAG,aAAa,cAAe,IAGnC,MAAM,EAAS,KACX,SAAS,OAAO,EAAG,EAGvB,EAAG,iBAAiB,WAAY,GAEhC,GAAQ,KACJ,SAAS,QAAQ,GACjB,EAAG,oBAAoB,WAAY,EAAO,GAC5C,IAGN,EAAO,MAAM,YAAa,GAAU,KAChB,GAAM,GACd,cAAc,IAAI,MAAM,YAAY,GAEpD,gBAEe","file":"/npm/@marcreichel/alpine-autosize@1.3.3/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@marcreichel/alpine-autosize@1.3.3/src/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import autosize from \"autosize\";\n\nfunction Autosize(Alpine) {\n    Alpine.directive(\"autosize\", (el, {modifiers}, {cleanup}) => {\n        autosize(el);\n        const attributes = Array.from(el.attributes);\n\n        let hasWireModel = false;\n\n        for (let {nodeName} of attributes) {\n            if (nodeName === \"wire:model\" || nodeName.startsWith(\"wire:model.\")) {\n                hasWireModel = true;\n                break;\n            }\n        }\n\n        if (!el.hasAttribute(\"wire:ignore\") && hasWireModel) {\n            el.setAttribute(\"wire:ignore\", \"\");\n        }\n\n        const update = () => {\n            autosize.update(el);\n        };\n\n        el.addEventListener(\"autosize\", update);\n\n        cleanup(() => {\n            autosize.destroy(el);\n            el.removeEventListener(\"autosize\", update);\n        });\n    });\n\n    Alpine.magic(\"autosize\", (node) => (el) => {\n        const element = el || node;\n        element.dispatchEvent(new Event(\"autosize\"));\n    });\n}\n\nexport default Autosize;\n"]}