UNPKG

ngoffline2

Version:

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.10.

505 lines (492 loc) 32.1 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@angular/common')) : typeof define === 'function' && define.amd ? define('ngoffline2', ['exports', '@angular/core', '@angular/platform-browser', '@angular/common'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ngoffline2 = {}, global.ng.core, global.ng.platformBrowser, global.ng.common)); })(this, (function (exports, i0, i1, i2) { 'use strict'; function _interopNamespace(e) { if (e && e.__esModule) return e; var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== 'default') { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); } n["default"] = e; return Object.freeze(n); } var i0__namespace = /*#__PURE__*/_interopNamespace(i0); var i1__namespace = /*#__PURE__*/_interopNamespace(i1); var i2__namespace = /*#__PURE__*/_interopNamespace(i2); var NgOfflineComponent = /** @class */ (function () { function NgOfflineComponent(sanitizer) { var _this = this; this.sanitizer = sanitizer; this.msg = 'You are not connected'; this.cnx = new i0.EventEmitter(true); this.onLine = false; // is en ligne 🔥 window.addEventListener('online', function () { // 🔥 we're back online! _this.onLine = true; _this.cnx.emit(true); }); window.addEventListener('offline', function () { // 😱 oh no! _this.onLine = false; _this.cnx.emit(false); }); } return NgOfflineComponent; }()); NgOfflineComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgOfflineComponent, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Component }); NgOfflineComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.10", type: NgOfflineComponent, selector: "ngoffline", inputs: { msg: ["message", "msg"] }, outputs: { cnx: "isOnline" }, ngImport: i0__namespace, template: "\n <div\n id=\"box--ngoffline\"\n class=\"box\"\n *ngIf=\"!onLine\"\n (click)=\"onLine = true\"\n >\n <div class=\"centreMessage\">\n <div class=\"close\">\n <svg\n version=\"1.0\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 1280.000000 1280.000000\"\n >\n <metadata></metadata>\n <g\n transform=\"translate(0.000000,1280.000000) scale(0.100000,-0.100000)\"\n fill=\"#9c27b0\"\n stroke=\"none\"\n >\n <path\n d=\"M1545 12784 c-85 -19 -167 -51 -243 -95 -69 -41 -1089 -1049 -1157\n -1144 -101 -141 -140 -263 -140 -440 0 -169 36 -293 125 -427 29 -43 705 -726\n 2149 -2170 l2106 -2108 -2111 -2112 c-1356 -1358 -2124 -2133 -2147 -2169 -88\n -137 -121 -249 -121 -419 -1 -181 37 -302 139 -445 68 -95 1088 -1103 1157\n -1144 273 -159 604 -143 853 42 22 17 986 976 2143 2131 l2102 2101 2103\n -2101 c1156 -1155 2120 -2114 2142 -2131 69 -51 130 -82 224 -113 208 -70 431\n -44 629 71 69 41 1089 1049 1157 1144 101 141 140 263 140 440 0 166 -36 290\n -121 422 -25 39 -746 767 -2148 2171 l-2111 2112 2107 2108 c2207 2208 2162\n 2161 2219 2303 75 187 77 392 4 572 -53 132 -74 157 -615 700 -289 291 -552\n 548 -585 572 -141 101 -263 140 -440 140 -166 0 -289 -35 -420 -120 -41 -26\n -724 -702 -2172 -2149 l-2113 -2111 -2112 2111 c-1454 1452 -2132 2123 -2173\n 2150 -64 41 -149 78 -230 101 -79 22 -258 26 -340 7z\"\n />\n </g>\n </svg>\n </div>\n <div class=\"text\">\n <div>\n <svg\n version=\"1.0\"\n class=\"icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100px\"\n height=\"100px\"\n viewBox=\"0 0 1280.000000 924.000000\"\n >\n <metadata></metadata>\n <g\n transform=\"translate(0.000000,924.000000) scale(0.100000,-0.100000)\"\n fill=\"#9c27b0\"\n stroke=\"none\"\n >\n <path\n d=\"M5905 9230 c-1798 -115 -3490 -914 -5175 -2444 -91 -83 -293 -277\n-449 -431 l-283 -281 528 -506 529 -506 270 267 c149 146 335 325 415 397\n1869 1685 3702 2322 5595 1943 1358 -271 2797 -1094 4214 -2409 74 -69 158\n-146 187 -173 l52 -47 448 467 c247 258 475 495 507 529 l57 61 -173 160\nc-1962 1823 -3826 2779 -5767 2958 -194 18 -768 27 -955 15z\"\n />\n <path\n d=\"M5945 6613 c-487 -39 -853 -114 -1300 -267 -920 -312 -1813 -899\n-2709 -1777 -125 -122 -226 -225 -226 -229 0 -5 199 -199 442 -431 244 -233\n480 -459 525 -503 l82 -79 189 184 c300 294 518 484 797 694 642 485 1278 784\n1915 899 231 41 342 51 610 51 267 -1 368 -9 610 -51 936 -163 1919 -718 2938\n-1658 85 -77 156 -140 158 -139 14 9 1004 1045 1004 1052 0 16 -394 372 -610\n552 -967 804 -1919 1320 -2880 1559 -281 70 -549 114 -855 140 -108 9 -591 11\n-690 3z\"\n />\n <path\n d=\"M6035 4054 c-671 -53 -1337 -336 -1945 -827 -199 -161 -545 -486\n-539 -506 2 -5 239 -235 527 -510 l522 -500 103 101 c574 564 1131 825 1664\n778 326 -29 633 -144 983 -368 180 -115 437 -319 593 -471 l68 -66 57 60 c32\n33 258 269 502 524 245 255 446 468 447 475 1 6 -49 57 -110 113 -761 692\n-1495 1072 -2273 1178 -114 16 -490 27 -599 19z\"\n />\n <path\n d=\"M6115 1659 c-299 -43 -565 -236 -689 -500 -55 -116 -70 -187 -70\n-324 0 -137 15 -208 70 -324 154 -326 504 -527 884 -507 354 18 652 207 791\n502 54 113 72 197 72 329 0 136 -19 220 -78 340 -167 344 -570 543 -980 484z\"\n />\n </g>\n </svg>\n </div>\n <div>{{ msg }}</div>\n </div>\n </div>\n </div>\n ", isInline: true, styles: [".box{width:100vw;height:100vh;background:#0000009c;position:absolute;z-index:2}.box .centreMessage{color:#fff;border:1px solid #252525;width:clamp(20px,60vw,500px);position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:#ffffffd1;border-radius:8px}.box .centreMessage .text{margin:15px;text-align:center;color:#000;font-size:clamp(1rem,2.5vw,2rem);font-family:inherit}.box .centreMessage .text img{width:clamp(20px,60vw,100px)}.box .centreMessage .icon{-webkit-animation:icon_animate;animation:icon_animate;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-direction:alternate;animation-direction:alternate;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.box .centreMessage .close{color:#000;background:#e3e3e3;border-radius:50%;cursor:pointer;width:40px;height:40px;position:absolute;top:-28px;right:-31px}.box .centreMessage .close svg{width:20px;transform:translate(10px,10px)}@-webkit-keyframes icon_animate{0%{opacity:0}to{opacity:1}}@keyframes icon_animate{0%{opacity:0}to{opacity:1}}\n"], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgOfflineComponent, decorators: [{ type: i0.Component, args: [{ selector: 'ngoffline', template: "\n <div\n id=\"box--ngoffline\"\n class=\"box\"\n *ngIf=\"!onLine\"\n (click)=\"onLine = true\"\n >\n <div class=\"centreMessage\">\n <div class=\"close\">\n <svg\n version=\"1.0\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 1280.000000 1280.000000\"\n >\n <metadata></metadata>\n <g\n transform=\"translate(0.000000,1280.000000) scale(0.100000,-0.100000)\"\n fill=\"#9c27b0\"\n stroke=\"none\"\n >\n <path\n d=\"M1545 12784 c-85 -19 -167 -51 -243 -95 -69 -41 -1089 -1049 -1157\n -1144 -101 -141 -140 -263 -140 -440 0 -169 36 -293 125 -427 29 -43 705 -726\n 2149 -2170 l2106 -2108 -2111 -2112 c-1356 -1358 -2124 -2133 -2147 -2169 -88\n -137 -121 -249 -121 -419 -1 -181 37 -302 139 -445 68 -95 1088 -1103 1157\n -1144 273 -159 604 -143 853 42 22 17 986 976 2143 2131 l2102 2101 2103\n -2101 c1156 -1155 2120 -2114 2142 -2131 69 -51 130 -82 224 -113 208 -70 431\n -44 629 71 69 41 1089 1049 1157 1144 101 141 140 263 140 440 0 166 -36 290\n -121 422 -25 39 -746 767 -2148 2171 l-2111 2112 2107 2108 c2207 2208 2162\n 2161 2219 2303 75 187 77 392 4 572 -53 132 -74 157 -615 700 -289 291 -552\n 548 -585 572 -141 101 -263 140 -440 140 -166 0 -289 -35 -420 -120 -41 -26\n -724 -702 -2172 -2149 l-2113 -2111 -2112 2111 c-1454 1452 -2132 2123 -2173\n 2150 -64 41 -149 78 -230 101 -79 22 -258 26 -340 7z\"\n />\n </g>\n </svg>\n </div>\n <div class=\"text\">\n <div>\n <svg\n version=\"1.0\"\n class=\"icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100px\"\n height=\"100px\"\n viewBox=\"0 0 1280.000000 924.000000\"\n >\n <metadata></metadata>\n <g\n transform=\"translate(0.000000,924.000000) scale(0.100000,-0.100000)\"\n fill=\"#9c27b0\"\n stroke=\"none\"\n >\n <path\n d=\"M5905 9230 c-1798 -115 -3490 -914 -5175 -2444 -91 -83 -293 -277\n-449 -431 l-283 -281 528 -506 529 -506 270 267 c149 146 335 325 415 397\n1869 1685 3702 2322 5595 1943 1358 -271 2797 -1094 4214 -2409 74 -69 158\n-146 187 -173 l52 -47 448 467 c247 258 475 495 507 529 l57 61 -173 160\nc-1962 1823 -3826 2779 -5767 2958 -194 18 -768 27 -955 15z\"\n />\n <path\n d=\"M5945 6613 c-487 -39 -853 -114 -1300 -267 -920 -312 -1813 -899\n-2709 -1777 -125 -122 -226 -225 -226 -229 0 -5 199 -199 442 -431 244 -233\n480 -459 525 -503 l82 -79 189 184 c300 294 518 484 797 694 642 485 1278 784\n1915 899 231 41 342 51 610 51 267 -1 368 -9 610 -51 936 -163 1919 -718 2938\n-1658 85 -77 156 -140 158 -139 14 9 1004 1045 1004 1052 0 16 -394 372 -610\n552 -967 804 -1919 1320 -2880 1559 -281 70 -549 114 -855 140 -108 9 -591 11\n-690 3z\"\n />\n <path\n d=\"M6035 4054 c-671 -53 -1337 -336 -1945 -827 -199 -161 -545 -486\n-539 -506 2 -5 239 -235 527 -510 l522 -500 103 101 c574 564 1131 825 1664\n778 326 -29 633 -144 983 -368 180 -115 437 -319 593 -471 l68 -66 57 60 c32\n33 258 269 502 524 245 255 446 468 447 475 1 6 -49 57 -110 113 -761 692\n-1495 1072 -2273 1178 -114 16 -490 27 -599 19z\"\n />\n <path\n d=\"M6115 1659 c-299 -43 -565 -236 -689 -500 -55 -116 -70 -187 -70\n-324 0 -137 15 -208 70 -324 154 -326 504 -527 884 -507 354 18 652 207 791\n502 54 113 72 197 72 329 0 136 -19 220 -78 340 -167 344 -570 543 -980 484z\"\n />\n </g>\n </svg>\n </div>\n <div>{{ msg }}</div>\n </div>\n </div>\n </div>\n ", styleUrls: ['./ngoffline.component.scss'], }] }], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; }, propDecorators: { msg: [{ type: i0.Input, args: ['message'] }], cnx: [{ type: i0.Output, args: ['isOnline'] }] } }); var NgOfflineDirective = /** @class */ (function () { function NgOfflineDirective(el) { var _this = this; this.cnx = new i0.EventEmitter(true); this.onLine = true; this._el = el; this.goOnline(); window.addEventListener('online', function () { // 🔥 we're back online! _this.goOnline(); _this.cnx.emit(true); }); window.addEventListener('offline', function () { // 😱 oh no! _this.goOffline(); _this.cnx.emit(false); }); } NgOfflineDirective.prototype.goOnline = function () { this._el.nativeElement.style.display = 'none'; this.onLine = true; }; NgOfflineDirective.prototype.goOffline = function () { this._el.nativeElement.style.display = 'inherit'; this.onLine = false; }; return NgOfflineDirective; }()); NgOfflineDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgOfflineDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive }); NgOfflineDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: NgOfflineDirective, selector: "[ngoffline]", outputs: { cnx: "isOnline" }, ngImport: i0__namespace }); i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgOfflineDirective, decorators: [{ type: i0.Directive, args: [{ selector: '[ngoffline]', }] }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { cnx: [{ type: i0.Output, args: ['isOnline'] }] } }); var NgOnlineDirective = /** @class */ (function () { function NgOnlineDirective(el) { var _this = this; this.cnx = new i0.EventEmitter(true); this.onLine = true; this._el = el; this.goOnline(); window.addEventListener('online', function () { // 🔥 we're back online! _this.goOnline(); _this.cnx.emit(true); }); window.addEventListener('offline', function () { // 😱 oh no! _this.goOffline(); _this.cnx.emit(false); }); } NgOnlineDirective.prototype.goOnline = function () { this._el.nativeElement.style.display = 'inherit'; this.onLine = true; }; NgOnlineDirective.prototype.goOffline = function () { this._el.nativeElement.style.display = 'none'; this.onLine = false; }; return NgOnlineDirective; }()); NgOnlineDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgOnlineDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive }); NgOnlineDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.10", type: NgOnlineDirective, selector: "[ngonline]", outputs: { cnx: "isOnline" }, ngImport: i0__namespace }); i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgOnlineDirective, decorators: [{ type: i0.Directive, args: [{ selector: '[ngonline]', }] }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { cnx: [{ type: i0.Output, args: ['isOnline'] }] } }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function () { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); }; } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function () { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function (o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } }); }) : (function (o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; } ; var __setModuleDefault = Object.create ? (function (o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function (o, v) { o["default"] = v; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } var features = [ NgOfflineComponent, NgOfflineDirective, NgOnlineDirective ]; var NgofflineModule = /** @class */ (function () { function NgofflineModule() { } return NgofflineModule; }()); NgofflineModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgofflineModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule }); NgofflineModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgofflineModule, declarations: [NgOfflineComponent, NgOfflineDirective, NgOnlineDirective], imports: [i1.BrowserModule], exports: [NgOfflineComponent, NgOfflineDirective, NgOnlineDirective] }); NgofflineModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgofflineModule, imports: [[i1.BrowserModule]] }); i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.10", ngImport: i0__namespace, type: NgofflineModule, decorators: [{ type: i0.NgModule, args: [{ declarations: __spreadArray([], __read(features)), imports: [i1.BrowserModule], exports: __spreadArray([], __read(features)) }] }] }); /* * Public API Surface of ngoffline */ /** * Generated bundle index. Do not edit. */ exports.NgOfflineComponent = NgOfflineComponent; exports.NgOfflineDirective = NgOfflineDirective; exports.NgOnlineDirective = NgOnlineDirective; exports.NgofflineModule = NgofflineModule; Object.defineProperty(exports, '__esModule', { value: true }); })); //# sourceMappingURL=ngoffline2.umd.js.map