-
Notifications
You must be signed in to change notification settings - Fork 0
/
13-es2015.js.map
1 lines (1 loc) · 2.98 KB
/
13-es2015.js.map
1
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAA6G;AAChD;;AAE7D,sBAAsB,cAAc,sBAAsB,mBAAmB,IAAI,cAAc,WAAW,YAAY,sBAAsB,mBAAmB,2BAA2B,wBAAwB;;AAElN;AACA;AACA,IAAI,4DAAgB;AACpB,0BAA0B,4DAAW;AACrC,yBAAyB,4DAAW;AACpC,oBAAoB,4DAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAC,CAAC,oDAAI,GAAG,QAAQ,mEAAU,QAAQ,EAAE,4DAAC,SAAS,mHAAmH;AAC9K;AACA,YAAY,QAAQ,4DAAU,OAAO;AACrC,yBAAyB;AACzB;AACA,IAAI;AACJ;AACA;;AAE0B","file":"13-es2015.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\n\nconst imgCss = \":host{display:block;-o-object-fit:contain;object-fit:contain}img{display:block;width:100%;height:100%;-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit}\";\n\nconst Img = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionImgWillLoad = createEvent(this, \"ionImgWillLoad\", 7);\n this.ionImgDidLoad = createEvent(this, \"ionImgDidLoad\", 7);\n this.ionError = createEvent(this, \"ionError\", 7);\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n }\n srcChanged() {\n this.addIO();\n }\n componentDidLoad() {\n this.addIO();\n }\n addIO() {\n if (this.src === undefined) {\n return;\n }\n if (typeof window !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype) {\n this.removeIO();\n this.io = new IntersectionObserver(data => {\n // because there will only ever be one instance\n // of the element we are observing\n // we can just use data[0]\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n this.io.observe(this.el);\n }\n else {\n // fall back to setTimeout for Safari and IE\n setTimeout(() => this.load(), 200);\n }\n }\n load() {\n this.loadError = this.onError;\n this.loadSrc = this.src;\n this.ionImgWillLoad.emit();\n }\n removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n render() {\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: \"image\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"],"sourceRoot":"webpack:///"}