UNPKG

ionic-image-loader

Version:

Ionic Component and Service to load images in a background thread and cache them for later use

25 lines (21 loc) 4.94 kB
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[142],{ /***/ "./node_modules/@ionic/core/dist/esm/es5/build/rt66rp5t.entry.js": /*!***********************************************************************!*\ !*** ./node_modules/@ionic/core/dist/esm/es5/build/rt66rp5t.entry.js ***! \***********************************************************************/ /*! exports provided: IonHideWhen, IonShowWhen */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IonHideWhen", function() { return HideWhen; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IonShowWhen", function() { return ShowWhen; }); /* harmony import */ var _ionic_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ionic.core.js */ "./node_modules/@ionic/core/dist/esm/es5/ionic.core.js"); /* harmony import */ var _chunk_e7816c0b_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-e7816c0b.js */ "./node_modules/@ionic/core/dist/esm/es5/build/chunk-e7816c0b.js"); /*! * (C) Ionic http://ionicframework.com - MIT License * Built with http://stenciljs.com */ function isPlatformMatch(e,t){return split(t).some(function(t){return Object(_chunk_e7816c0b_js__WEBPACK_IMPORTED_MODULE_1__["m"])(e,t)})}function isModeMatch(e,t){var n=split(t),r=e.get("mode");return n.includes(r)}function isSizeMatch(e,t){return split(t).some(function(t){return Object(_chunk_e7816c0b_js__WEBPACK_IMPORTED_MODULE_1__["a"])(e,t)})}function split(e){return e.replace(/\s/g,"").split(",")}function getTestResult(e){var t=[];return void 0!==e.mediaQuery&&t.push(matchMedia(e.win,e.mediaQuery)),void 0!==e.size&&t.push(isSizeMatch(e.win,e.size)),void 0!==e.modes&&t.push(isModeMatch(e.config,e.modes)),void 0!==e.platform&&t.push(isPlatformMatch(e.win,e.platform)),void 0!==e.orientation&&t.push(isOrientationMatch(e.win,e.orientation)),e.or?t.some(function(e){return e}):t.every(function(e){return e})}function isOrientationMatch(e,t){return"portrait"===t?isPortrait(e):"landscape"===t&&!isPortrait(e)}function isPortrait(e){return matchMedia(e,"(orientation: portrait)")}function matchMedia(e,t){return e.matchMedia(t).matches}var HideWhen=function(){function e(){this.or=!1,this.passesTest=!1}return e.prototype.componentWillLoad=function(){this.onResize()},e.prototype.onResize=function(){this.passesTest=getTestResult(this)},e.prototype.hostData=function(){return{class:{"hide-content":this.passesTest}}},e.prototype.render=function(){return Object(_ionic_core_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot",null)},Object.defineProperty(e,"is",{get:function(){return"ion-hide-when"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{config:{context:"config"},element:{elementRef:!0},mediaQuery:{type:String,attr:"media-query"},modes:{type:String,attr:"modes"},or:{type:Boolean,attr:"or"},orientation:{type:String,attr:"orientation"},passesTest:{state:!0},platform:{type:String,attr:"platform"},size:{type:String,attr:"size"},win:{context:"window"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"listeners",{get:function(){return[{name:"window:resize",method:"onResize",passive:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return":host{display:block}:host(.hide-content){display:none}"},enumerable:!0,configurable:!0}),e}(),ShowWhen=function(){function e(){this.or=!1,this.passesTest=!1}return e.prototype.componentWillLoad=function(){this.onResize()},e.prototype.onResize=function(){this.passesTest=getTestResult(this)},e.prototype.hostData=function(){return{class:{"show-content":this.passesTest}}},e.prototype.render=function(){return Object(_ionic_core_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot",null)},Object.defineProperty(e,"is",{get:function(){return"ion-show-when"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{config:{context:"config"},element:{elementRef:!0},mediaQuery:{type:String,attr:"media-query"},modes:{type:String,attr:"modes"},or:{type:Boolean,attr:"or"},orientation:{type:String,attr:"orientation"},passesTest:{state:!0},platform:{type:String,attr:"platform"},size:{type:String,attr:"size"},win:{context:"window"}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"listeners",{get:function(){return[{name:"window:resize",method:"onResize",passive:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"style",{get:function(){return":host{display:none}:host(.show-content){display:block}"},enumerable:!0,configurable:!0}),e}(); /***/ }) }]); //# sourceMappingURL=142.js.map