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K,OACL,KAAK,MAAO,EACZ,KAAK,WAAa,EAClB,MAAM,mBACV,EAEJ,OAAO","file":"/npm/p-d.p-u@0.0.126/p-d.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/p-d.p-u@0.0.126/p-d.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 { P } from './p.js';\nimport { define } from 'trans-render/define.js';\nimport { NavDown } from 'xtal-element/NavDown.js';\nconst m = 'm';\n/**\n * `p-d`\n *  Pass data from one element down the DOM tree to other elements\n *\n * @customElement\n * @polymer\n * @demo demo/index.html\n */\nexport class PD extends P {\n    constructor() {\n        super(...arguments);\n        this._pdNavDown = null;\n        //_hasMax!: boolean;\n        this._m = Infinity;\n        this._iIP = false;\n    }\n    static get is() { return 'p-d'; }\n    get m() {\n        return this._m;\n    }\n    set m(val) {\n        this.attr(m, val.toString());\n    }\n    static get observedAttributes() {\n        return super.observedAttributes.concat([m]);\n    }\n    pass(e) {\n        this._lastEvent = e;\n        this.attr('pds', '🌩️');\n        //this.passDown(this.nextElementSibling, e, 0);\n        const count = this.applyProps(this._pdNavDown);\n        this.attr('pds', '👂');\n        this.attr('mtch', count.toString());\n    }\n    getMatches(pd) {\n        return pd.matches;\n    }\n    applyProps(pd) {\n        //if(this._iIP && this.skI()) return;\n        if (this._iIP)\n            return 0;\n        const matches = this.getMatches(pd); //const matches = pd.getMatches();\n        matches.forEach(el => {\n            if (pd._inMutLoop) {\n                if (el.dataset.__pdWIP !== '1')\n                    return;\n            }\n            this.setVal(this._lastEvent, el);\n        });\n        return matches.length;\n    }\n    attributeChangedCallback(name, oldVal, newVal) {\n        switch (name) {\n            case m:\n                if (newVal !== null) {\n                    this._m = parseInt(newVal);\n                }\n        }\n        super.attributeChangedCallback(name, oldVal, newVal);\n    }\n    newNavDown() {\n        const bndApply = this.applyProps.bind(this);\n        return new NavDown(this, this.to, bndApply, this.m);\n    }\n    connectedCallback() {\n        this.propUp([m]);\n        this.attr('pds', '📞');\n        if (!this.to) {\n            //apply to next only\n            this.to = '*';\n            this.m = 1;\n        }\n        const pdnd = this.newNavDown();\n        //const pdnd = new PDNavDown(this, this.to, nd => bndApply(nd), this.m);\n        //pdnd.root = this;\n        pdnd.ignore = 'p-d,p-d-x,p-d-r,script';\n        this._iIP = true;\n        pdnd.init();\n        this._iIP = false;\n        this._pdNavDown = pdnd;\n        super.connectedCallback();\n    }\n}\ndefine(PD);\n"]}