UNPKG

swipe-angular-list

Version:

![](https://img.shields.io/npm/dy/swipe-angular-list.svg) ![](https://img.shields.io/github/stars/leifermendez/swipe-angular-list) ![](https://img.shields.io/github/license/leifermendez/swipe-angular-list) # Swiper List (Angular)

85 lines (83 loc) 49.4 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("swipe-angular-list",["exports","@angular/core","@angular/common"],e):e((t=t||self)["swipe-angular-list"]={},t.ng.core,t.ng.common)}(this,(function(t,e,n){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e){return function(n,r){e(n,r,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function p(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a} /** * @license Angular v8.2.14 * (c) 2010-2019 Google LLC. https://angular.io/ * License: MIT */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ var c=null;function l(){return c}var d,f=function(t){function e(){var e=t.call(this)||this;e._animationPrefix=null,e._transitionEnd=null;try{var n=e.createElement("div",document);if(null!=e.getStyle(n,"animationName"))e._animationPrefix="";else for(var r=["Webkit","Moz","O","ms"],o=0;o<r.length;o++)if(null!=e.getStyle(n,r[o]+"AnimationName")){e._animationPrefix="-"+r[o].toLowerCase()+"-";break}var i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(i).forEach((function(t){null!=e.getStyle(n,t)&&(e._transitionEnd=i[t])}))}catch(t){e._animationPrefix=null,e._transitionEnd=null}return e}return o(e,t),e.prototype.getDistributedNodes=function(t){return t.getDistributedNodes()},e.prototype.resolveAndSetHref=function(t,e,n){t.href=null==n?e:e+"/../"+n},e.prototype.supportsDOMEvents=function(){return!0},e.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},e.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},e.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},e.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},e}(function(){function t(){this.resourceLoaderType=null}return Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(t){this._attrToPropMap=t},enumerable:!0,configurable:!0}),t}()),h={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},y={"\b":"Backspace","\t":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},m={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","":"NumLock"},g=function(){if(e.ɵglobal.Node)return e.ɵglobal.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))}}(),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parse=function(t){throw new Error("parse not implemented")},e.makeCurrent=function(){var t;t=new e,c||(c=t)},e.prototype.hasProperty=function(t,e){return e in t},e.prototype.setProperty=function(t,e,n){t[e]=n},e.prototype.getProperty=function(t,e){return t[e]},e.prototype.invoke=function(t,e,n){var r;(r=t)[e].apply(r,function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t}(n))},e.prototype.logError=function(t){window.console&&(console.error?console.error(t):console.log(t))},e.prototype.log=function(t){window.console&&window.console.log&&window.console.log(t)},e.prototype.logGroup=function(t){window.console&&window.console.group&&window.console.group(t)},e.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return h},enumerable:!0,configurable:!0}),e.prototype.contains=function(t,e){return g.call(t,e)},e.prototype.querySelector=function(t,e){return t.querySelector(e)},e.prototype.querySelectorAll=function(t,e){return t.querySelectorAll(e)},e.prototype.on=function(t,e,n){t.addEventListener(e,n,!1)},e.prototype.onAndCancel=function(t,e,n){return t.addEventListener(e,n,!1),function(){t.removeEventListener(e,n,!1)}},e.prototype.dispatchEvent=function(t,e){t.dispatchEvent(e)},e.prototype.createMouseEvent=function(t){var e=this.getDefaultDocument().createEvent("MouseEvent");return e.initEvent(t,!0,!0),e},e.prototype.createEvent=function(t){var e=this.getDefaultDocument().createEvent("Event");return e.initEvent(t,!0,!0),e},e.prototype.preventDefault=function(t){t.preventDefault(),t.returnValue=!1},e.prototype.isPrevented=function(t){return t.defaultPrevented||null!=t.returnValue&&!t.returnValue},e.prototype.getInnerHTML=function(t){return t.innerHTML},e.prototype.getTemplateContent=function(t){return"content"in t&&this.isTemplateElement(t)?t.content:null},e.prototype.getOuterHTML=function(t){return t.outerHTML},e.prototype.nodeName=function(t){return t.nodeName},e.prototype.nodeValue=function(t){return t.nodeValue},e.prototype.type=function(t){return t.type},e.prototype.content=function(t){return this.hasProperty(t,"content")?t.content:t},e.prototype.firstChild=function(t){return t.firstChild},e.prototype.nextSibling=function(t){return t.nextSibling},e.prototype.parentElement=function(t){return t.parentNode},e.prototype.childNodes=function(t){return t.childNodes},e.prototype.childNodesAsList=function(t){for(var e=t.childNodes,n=new Array(e.length),r=0;r<e.length;r++)n[r]=e[r];return n},e.prototype.clearNodes=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},e.prototype.appendChild=function(t,e){t.appendChild(e)},e.prototype.removeChild=function(t,e){t.removeChild(e)},e.prototype.replaceChild=function(t,e,n){t.replaceChild(e,n)},e.prototype.remove=function(t){return t.parentNode&&t.parentNode.removeChild(t),t},e.prototype.insertBefore=function(t,e,n){t.insertBefore(n,e)},e.prototype.insertAllBefore=function(t,e,n){n.forEach((function(n){return t.insertBefore(n,e)}))},e.prototype.insertAfter=function(t,e,n){t.insertBefore(n,e.nextSibling)},e.prototype.setInnerHTML=function(t,e){t.innerHTML=e},e.prototype.getText=function(t){return t.textContent},e.prototype.setText=function(t,e){t.textContent=e},e.prototype.getValue=function(t){return t.value},e.prototype.setValue=function(t,e){t.value=e},e.prototype.getChecked=function(t){return t.checked},e.prototype.setChecked=function(t,e){t.checked=e},e.prototype.createComment=function(t){return this.getDefaultDocument().createComment(t)},e.prototype.createTemplate=function(t){var e=this.getDefaultDocument().createElement("template");return e.innerHTML=t,e},e.prototype.createElement=function(t,e){return(e=e||this.getDefaultDocument()).createElement(t)},e.prototype.createElementNS=function(t,e,n){return(n=n||this.getDefaultDocument()).createElementNS(t,e)},e.prototype.createTextNode=function(t,e){return(e=e||this.getDefaultDocument()).createTextNode(t)},e.prototype.createScriptTag=function(t,e,n){var r=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return r.setAttribute(t,e),r},e.prototype.createStyleElement=function(t,e){var n=(e=e||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(t,e)),n},e.prototype.createShadowRoot=function(t){return t.createShadowRoot()},e.prototype.getShadowRoot=function(t){return t.shadowRoot},e.prototype.getHost=function(t){return t.host},e.prototype.clone=function(t){return t.cloneNode(!0)},e.prototype.getElementsByClassName=function(t,e){return t.getElementsByClassName(e)},e.prototype.getElementsByTagName=function(t,e){return t.getElementsByTagName(e)},e.prototype.classList=function(t){return Array.prototype.slice.call(t.classList,0)},e.prototype.addClass=function(t,e){t.classList.add(e)},e.prototype.removeClass=function(t,e){t.classList.remove(e)},e.prototype.hasClass=function(t,e){return t.classList.contains(e)},e.prototype.setStyle=function(t,e,n){t.style[e]=n},e.prototype.removeStyle=function(t,e){t.style[e]=""},e.prototype.getStyle=function(t,e){return t.style[e]},e.prototype.hasStyle=function(t,e,n){var r=this.getStyle(t,e)||"";return n?r==n:r.length>0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,r=0;r<n.length;r++){var o=n.item(r);e.set(o.name,o.value)}return e},e.prototype.hasAttribute=function(t,e){return t.hasAttribute(e)},e.prototype.hasAttributeNS=function(t,e,n){return t.hasAttributeNS(e,n)},e.prototype.getAttribute=function(t,e){return t.getAttribute(e)},e.prototype.getAttributeNS=function(t,e,n){return t.getAttributeNS(e,n)},e.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},e.prototype.setAttributeNS=function(t,e,n,r){t.setAttributeNS(e,n,r)},e.prototype.removeAttribute=function(t,e){t.removeAttribute(e)},e.prototype.removeAttributeNS=function(t,e,n){t.removeAttributeNS(e,n)},e.prototype.templateAwareRoot=function(t){return this.isTemplateElement(t)?this.content(t):t},e.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},e.prototype.getDefaultDocument=function(){return document},e.prototype.getBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},e.prototype.getTitle=function(t){return t.title},e.prototype.setTitle=function(t,e){t.title=e||""},e.prototype.elementMatches=function(t,e){return!!this.isElementNode(t)&&(t.matches&&t.matches(e)||t.msMatchesSelector&&t.msMatchesSelector(e)||t.webkitMatchesSelector&&t.webkitMatchesSelector(e))},e.prototype.isTemplateElement=function(t){return this.isElementNode(t)&&"TEMPLATE"===t.nodeName},e.prototype.isTextNode=function(t){return t.nodeType===Node.TEXT_NODE},e.prototype.isCommentNode=function(t){return t.nodeType===Node.COMMENT_NODE},e.prototype.isElementNode=function(t){return t.nodeType===Node.ELEMENT_NODE},e.prototype.hasShadowRoot=function(t){return null!=t.shadowRoot&&t instanceof HTMLElement},e.prototype.isShadowRoot=function(t){return t instanceof DocumentFragment},e.prototype.importIntoDoc=function(t){return document.importNode(this.templateAwareRoot(t),!0)},e.prototype.adoptNode=function(t){return document.adoptNode(t)},e.prototype.getHref=function(t){return t.getAttribute("href")},e.prototype.getEventKey=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&m.hasOwnProperty(e)&&(e=m[e]))}return y[e]||e},e.prototype.getGlobalEventTarget=function(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null},e.prototype.getHistory=function(){return window.history},e.prototype.getLocation=function(){return window.location},e.prototype.getBaseHref=function(t){var e=function(){if(!w&&!(w=document.querySelector("base")))return null;return w.getAttribute("href")}();return null==e?null:function(t){d||(d=document.createElement("a"));return d.setAttribute("href",t),"/"===d.pathname.charAt(0)?d.pathname:"/"+d.pathname} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */(e)},e.prototype.resetBaseElement=function(){w=null},e.prototype.getUserAgent=function(){return window.navigator.userAgent},e.prototype.setData=function(t,e,n){this.setAttribute(t,"data-"+e,n)},e.prototype.getData=function(t,e){return this.getAttribute(t,"data-"+e)},e.prototype.getComputedStyle=function(t){return getComputedStyle(t)},e.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},e.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},e.prototype.supportsCookies=function(){return!0},e.prototype.getCookie=function(t){return n.ɵparseCookieValue(document.cookie,t)},e.prototype.setCookie=function(t,e){document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)},e}(f),w=null; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function b(){return!!window.history.pushState} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var E=function(t){function r(e){var n=t.call(this)||this;return n._doc=e,n._init(),n}return o(r,t),r.prototype._init=function(){this.location=l().getLocation(),this._history=l().getHistory()},r.prototype.getBaseHrefFromDOM=function(){return l().getBaseHref(this._doc)},r.prototype.onPopState=function(t){l().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)},r.prototype.onHashChange=function(t){l().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)},Object.defineProperty(r.prototype,"href",{get:function(){return this.location.href},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"protocol",{get:function(){return this.location.protocol},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"hostname",{get:function(){return this.location.hostname},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"port",{get:function(){return this.location.port},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pathname",{get:function(){return this.location.pathname},set:function(t){this.location.pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"search",{get:function(){return this.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"hash",{get:function(){return this.location.hash},enumerable:!0,configurable:!0}),r.prototype.pushState=function(t,e,n){b()?this._history.pushState(t,e,n):this.location.hash=n},r.prototype.replaceState=function(t,e,n){b()?this._history.replaceState(t,e,n):this.location.hash=n},r.prototype.forward=function(){this._history.forward()},r.prototype.back=function(){this._history.back()},r.prototype.getState=function(){return this._history.state},r=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],r)}(n.PlatformLocation),C=new e.InjectionToken("TRANSITION_ID"); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var T=[{provide:e.APP_INITIALIZER,useFactory:function(t,n,r){return function(){r.get(e.ApplicationInitStatus).donePromise.then((function(){var e=l();Array.prototype.slice.apply(e.querySelectorAll(n,"style[ng-transition]")).filter((function(n){return e.getAttribute(n,"ng-transition")===t})).forEach((function(t){return e.remove(t)}))}))}},deps:[C,n.DOCUMENT,e.Injector],multi:!0}],S=function(){function t(){}return t.init=function(){e.setTestabilityGetter(new t)},t.prototype.addToWindow=function(t){e.ɵglobal.getAngularTestability=function(e,n){void 0===n&&(n=!0);var r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return r},e.ɵglobal.getAllAngularTestabilities=function(){return t.getAllTestabilities()},e.ɵglobal.getAllAngularRootElements=function(){return t.getAllRootElements()};e.ɵglobal.frameworkStabilizers||(e.ɵglobal.frameworkStabilizers=[]),e.ɵglobal.frameworkStabilizers.push((function(t){var n=e.ɵglobal.getAllAngularTestabilities(),r=n.length,o=!1,i=function(e){o=o||e,0==--r&&t(o)};n.forEach((function(t){t.whenStable(i)}))}))},t.prototype.findTestabilityInTree=function(t,e,n){if(null==e)return null;var r=t.getTestability(e);return null!=r?r:n?l().isShadowRoot(e)?this.findTestabilityInTree(t,l().getHost(e),!0):this.findTestabilityInTree(t,l().parentElement(e),!0):null},t}(); /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */function _(t,n){"undefined"!=typeof COMPILED&&COMPILED||((e.ɵglobal.ng=e.ɵglobal.ng||{})[t]=n)} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var N={ApplicationRef:e.ApplicationRef,NgZone:e.NgZone};function k(t){return e.getDebugNode(t)}var A=[{provide:e.APP_INITIALIZER,useFactory:function(t){return _("probe",k),_("coreTokens",i({},N,(t||[]).reduce((function(t,e){return t[e.name]=e.token,t}),{}))),function(){return k}},deps:[[e.NgProbeToken,new e.Optional]],multi:!0}],I=new e.InjectionToken("EventManagerPlugins"),M=function(){function t(t,e){var n=this;this._zone=e,this._eventNameToPlugin=new Map,t.forEach((function(t){return t.manager=n})),this._plugins=t.slice().reverse()}return t.prototype.addEventListener=function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)},t.prototype.addGlobalEventListener=function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)},t.prototype.getZone=function(){return this._zone},t.prototype._findPluginFor=function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,r=0;r<n.length;r++){var o=n[r];if(o.supports(t))return this._eventNameToPlugin.set(t,o),o}throw new Error("No event manager plugin found for event "+t)},t=a([e.Injectable(),s(0,e.Inject(I)),u("design:paramtypes",[Array,e.NgZone])],t)}(),O=function(){function t(t){this._doc=t}return t.prototype.addGlobalEventListener=function(t,e,n){var r=l().getGlobalEventTarget(this._doc,t);if(!r)throw new Error("Unsupported event target "+r+" for event "+e);return this.addEventListener(r,e,n)},t}(),D=function(){function t(){this._stylesSet=new Set}return t.prototype.addStyles=function(t){var e=this,n=new Set;t.forEach((function(t){e._stylesSet.has(t)||(e._stylesSet.add(t),n.add(t))})),this.onStylesAdded(n)},t.prototype.onStylesAdded=function(t){},t.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},t=a([e.Injectable()],t)}(),P=function(t){function r(e){var n=t.call(this)||this;return n._doc=e,n._hostNodes=new Set,n._styleNodes=new Set,n._hostNodes.add(e.head),n}return o(r,t),r.prototype._addStylesToHost=function(t,e){var n=this;t.forEach((function(t){var r=n._doc.createElement("style");r.textContent=t,n._styleNodes.add(e.appendChild(r))}))},r.prototype.addHost=function(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)},r.prototype.removeHost=function(t){this._hostNodes.delete(t)},r.prototype.onStylesAdded=function(t){var e=this;this._hostNodes.forEach((function(n){return e._addStylesToHost(t,n)}))},r.prototype.ngOnDestroy=function(){this._styleNodes.forEach((function(t){return l().remove(t)}))},r=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],r)}(D),L={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},x=/%COMP%/g,R="_nghost-%COMP%",j="_ngcontent-%COMP%";function H(t,e,n){for(var r=0;r<e.length;r++){var o=e[r];Array.isArray(o)?H(t,o,n):(o=o.replace(x,t),n.push(o))}return n}function V(t){return function(e){!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}var U=function(){function t(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new B(t)}return t.prototype.createRenderer=function(t,n){if(!t||!n)return this.defaultRenderer;switch(n.encapsulation){case e.ViewEncapsulation.Emulated:var r=this.rendererByCompId.get(n.id);return r||(r=new Z(this.eventManager,this.sharedStylesHost,n,this.appId),this.rendererByCompId.set(n.id,r)),r.applyToHost(t),r;case e.ViewEncapsulation.Native:case e.ViewEncapsulation.ShadowDom:return new G(this.eventManager,this.sharedStylesHost,t,n);default:if(!this.rendererByCompId.has(n.id)){var o=H(n.id,n.styles,[]);this.sharedStylesHost.addStyles(o),this.rendererByCompId.set(n.id,this.defaultRenderer)}return this.defaultRenderer}},t.prototype.begin=function(){},t.prototype.end=function(){},t=a([e.Injectable(),s(2,e.Inject(e.APP_ID)),u("design:paramtypes",[M,P,String])],t)}(),B=function(){function t(t){this.eventManager=t,this.data=Object.create(null)}return t.prototype.destroy=function(){},t.prototype.createElement=function(t,e){return e?document.createElementNS(L[e]||e,t):document.createElement(t)},t.prototype.createComment=function(t){return document.createComment(t)},t.prototype.createText=function(t){return document.createTextNode(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.insertBefore=function(t,e,n){t&&t.insertBefore(e,n)},t.prototype.removeChild=function(t,e){t&&t.removeChild(e)},t.prototype.selectRootElement=function(t,e){var n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error('The selector "'+t+'" did not match any elements');return e||(n.textContent=""),n},t.prototype.parentNode=function(t){return t.parentNode},t.prototype.nextSibling=function(t){return t.nextSibling},t.prototype.setAttribute=function(t,e,n,r){if(r){e=r+":"+e;var o=L[r];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)},t.prototype.removeAttribute=function(t,e,n){if(n){var r=L[n];r?t.removeAttributeNS(r,e):t.removeAttribute(n+":"+e)}else t.removeAttribute(e)},t.prototype.addClass=function(t,e){t.classList.add(e)},t.prototype.removeClass=function(t,e){t.classList.remove(e)},t.prototype.setStyle=function(t,n,r,o){o&e.RendererStyleFlags2.DashCase?t.style.setProperty(n,r,o&e.RendererStyleFlags2.Important?"important":""):t.style[n]=r},t.prototype.removeStyle=function(t,n,r){r&e.RendererStyleFlags2.DashCase?t.style.removeProperty(n):t.style[n]=""},t.prototype.setProperty=function(t,e,n){F(e,"property"),t[e]=n},t.prototype.setValue=function(t,e){t.nodeValue=e},t.prototype.listen=function(t,e,n){return F(e,"listener"),"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,V(n)):this.eventManager.addEventListener(t,e,V(n))},t}(),z="@".charCodeAt(0);function F(t,e){if(t.charCodeAt(0)===z)throw new Error("Found the synthetic "+e+" "+t+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}var Z=function(t){function e(e,n,r,o){var i=t.call(this,e)||this;i.component=r;var a,s=H(o+"-"+r.id,r.styles,[]);return n.addStyles(s),i.contentAttr=(a=o+"-"+r.id,j.replace(x,a)),i.hostAttr=function(t){return R.replace(x,t)}(o+"-"+r.id),i}return o(e,t),e.prototype.applyToHost=function(e){t.prototype.setAttribute.call(this,e,this.hostAttr,"")},e.prototype.createElement=function(e,n){var r=t.prototype.createElement.call(this,e,n);return t.prototype.setAttribute.call(this,r,this.contentAttr,""),r},e}(B),G=function(t){function n(n,r,o,i){var a=t.call(this,n)||this;a.sharedStylesHost=r,a.hostEl=o,a.component=i,i.encapsulation===e.ViewEncapsulation.ShadowDom?a.shadowRoot=o.attachShadow({mode:"open"}):a.shadowRoot=o.createShadowRoot(),a.sharedStylesHost.addHost(a.shadowRoot);for(var s=H(i.id,i.styles,[]),u=0;u<s.length;u++){var p=document.createElement("style");p.textContent=s[u],a.shadowRoot.appendChild(p)}return a}return o(n,t),n.prototype.nodeOrShadowRoot=function(t){return t===this.hostEl?this.shadowRoot:t},n.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},n.prototype.appendChild=function(e,n){return t.prototype.appendChild.call(this,this.nodeOrShadowRoot(e),n)},n.prototype.insertBefore=function(e,n,r){return t.prototype.insertBefore.call(this,this.nodeOrShadowRoot(e),n,r)},n.prototype.removeChild=function(e,n){return t.prototype.removeChild.call(this,this.nodeOrShadowRoot(e),n)},n.prototype.parentNode=function(e){return this.nodeOrShadowRoot(t.prototype.parentNode.call(this,this.nodeOrShadowRoot(e)))},n}(B),K="undefined"!=typeof Zone&&Zone.__symbol__||function(t){return"__zone_symbol__"+t},q=K("addEventListener"),J=K("removeEventListener"),W={},$="__zone_symbol__propagationStopped",X=function(){var t="undefined"!=typeof Zone&&Zone[K("BLACK_LISTED_EVENTS")];if(t){var e={};return t.forEach((function(t){e[t]=t})),e}}(),Y=function(t){return!!X&&X.hasOwnProperty(t)},Q=function(t){var e=W[t.type];if(e){var n=this[e];if(n){var r=[t];if(1===n.length)return(a=n[0]).zone!==Zone.current?a.zone.run(a.handler,this,r):a.handler.apply(this,r);for(var o=n.slice(),i=0;i<o.length&&!0!==t[$];i++){var a;(a=o[i]).zone!==Zone.current?a.zone.run(a.handler,this,r):a.handler.apply(this,r)}}}},tt=function(t){function r(e,r,o){var i=t.call(this,e)||this;return i.ngZone=r,o&&n.isPlatformServer(o)||i.patchEvent(),i}return o(r,t),r.prototype.patchEvent=function(){if("undefined"!=typeof Event&&Event&&Event.prototype&&!Event.prototype.__zone_symbol__stopImmediatePropagation){var t=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[$]=!0),t&&t.apply(this,arguments)}}},r.prototype.supports=function(t){return!0},r.prototype.addEventListener=function(t,n,r){var o=this,i=t[q],a=r;if(!i||e.NgZone.isInAngularZone()&&!Y(n))t.addEventListener(n,a,!1);else{var s=W[n];s||(s=W[n]=K("ANGULAR"+n+"FALSE"));var u=t[s],p=u&&u.length>0;u||(u=t[s]=[]);var c=Y(n)?Zone.root:Zone.current;if(0===u.length)u.push({zone:c,handler:a});else{for(var l=!1,d=0;d<u.length;d++)if(u[d].handler===a){l=!0;break}l||u.push({zone:c,handler:a})}p||t[q](n,Q,!1)}return function(){return o.removeEventListener(t,n,a)}},r.prototype.removeEventListener=function(t,e,n){var r=t[J];if(!r)return t.removeEventListener.apply(t,[e,n,!1]);var o=W[e],i=o&&t[o];if(!i)return t.removeEventListener.apply(t,[e,n,!1]);for(var a=!1,s=0;s<i.length;s++)if(i[s].handler===n){a=!0,i.splice(s,1);break}a?0===i.length&&r.apply(t,[e,Q,!1]):t.removeEventListener.apply(t,[e,n,!1])},r=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),s(2,e.Optional()),s(2,e.Inject(e.PLATFORM_ID)),u("design:paramtypes",[Object,e.NgZone,Object])],r)}(O),et={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},nt=new e.InjectionToken("HammerGestureConfig"),rt=new e.InjectionToken("HammerLoader"),ot=function(){function t(){this.events=[],this.overrides={}}return t.prototype.buildHammer=function(t){var e=new Hammer(t,this.options);for(var n in e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0}),this.overrides)e.get(n).set(this.overrides[n]);return e},t=a([e.Injectable()],t)}(),it=function(t){function r(e,n,r,o){var i=t.call(this,e)||this;return i._config=n,i.console=r,i.loader=o,i}return o(r,t),r.prototype.supports=function(t){return!(!et.hasOwnProperty(t.toLowerCase())&&!this.isCustomEvent(t))&&(!(!window.Hammer&&!this.loader)||(this.console.warn('The "'+t+'" event cannot be bound because Hammer.JS is not loaded and no custom loader has been specified.'),!1))},r.prototype.addEventListener=function(t,e,n){var r=this,o=this.manager.getZone();if(e=e.toLowerCase(),!window.Hammer&&this.loader){var i=!1,a=function(){i=!0};return this.loader().then((function(){if(!window.Hammer)return r.console.warn("The custom HAMMER_LOADER completed, but Hammer.JS is not present."),void(a=function(){});i||(a=r.addEventListener(t,e,n))})).catch((function(){r.console.warn('The "'+e+'" event cannot be bound because the custom Hammer.JS loader failed.'),a=function(){}})),function(){a()}}return o.runOutsideAngular((function(){var i=r._config.buildHammer(t),a=function(t){o.runGuarded((function(){n(t)}))};return i.on(e,a),function(){i.off(e,a),"function"==typeof i.destroy&&i.destroy()}}))},r.prototype.isCustomEvent=function(t){return this._config.events.indexOf(t)>-1},r=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),s(1,e.Inject(nt)),s(3,e.Optional()),s(3,e.Inject(rt)),u("design:paramtypes",[Object,ot,e.ɵConsole,Object])],r)}(O),at=["alt","control","meta","shift"],st={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},ut=function(t){function r(e){return t.call(this,e)||this}var i;return o(r,t),i=r,r.prototype.supports=function(t){return null!=i.parseEventName(t)},r.prototype.addEventListener=function(t,e,n){var r=i.parseEventName(e),o=i.eventCallback(r.fullKey,n,this.manager.getZone());return this.manager.getZone().runOutsideAngular((function(){return l().onAndCancel(t,r.domEventName,o)}))},r.parseEventName=function(t){var e=t.toLowerCase().split("."),n=e.shift();if(0===e.length||"keydown"!==n&&"keyup"!==n)return null;var r=i._normalizeKey(e.pop()),o="";if(at.forEach((function(t){var n=e.indexOf(t);n>-1&&(e.splice(n,1),o+=t+".")})),o+=r,0!=e.length||0===r.length)return null;var a={};return a.domEventName=n,a.fullKey=o,a},r.getEventFullKey=function(t){var e="",n=l().getEventKey(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),at.forEach((function(r){r!=n&&((0,st[r])(t)&&(e+=r+"."))})),e+=n},r.eventCallback=function(t,e,n){return function(r){i.getEventFullKey(r)===t&&n.runGuarded((function(){return e(r)}))}},r._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},r=i=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],r)}(O),pt=function(){},ct=function(t){function r(e){var n=t.call(this)||this;return n._doc=e,n}return o(r,t),r.prototype.sanitize=function(t,n){if(null==n)return null;switch(t){case e.SecurityContext.NONE:return n;case e.SecurityContext.HTML:return n instanceof dt?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"HTML"),e.ɵ_sanitizeHtml(this._doc,String(n)));case e.SecurityContext.STYLE:return n instanceof ft?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"Style"),e.ɵ_sanitizeStyle(n));case e.SecurityContext.SCRIPT:if(n instanceof ht)return n.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(n,"Script"),new Error("unsafe value used in a script context");case e.SecurityContext.URL:return n instanceof mt||n instanceof yt?n.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(n,"URL"),e.ɵ_sanitizeUrl(String(n)));case e.SecurityContext.RESOURCE_URL:if(n instanceof mt)return n.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(n,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+t+" (see http://g.co/ng/security#xss)")}},r.prototype.checkNotSafeValue=function(t,e){if(t instanceof lt)throw new Error("Required a safe "+e+", got a "+t.getTypeName()+" (see http://g.co/ng/security#xss)")},r.prototype.bypassSecurityTrustHtml=function(t){return new dt(t)},r.prototype.bypassSecurityTrustStyle=function(t){return new ft(t)},r.prototype.bypassSecurityTrustScript=function(t){return new ht(t)},r.prototype.bypassSecurityTrustUrl=function(t){return new yt(t)},r.prototype.bypassSecurityTrustResourceUrl=function(t){return new mt(t)},r=a([e.Injectable(),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],r)}(pt),lt=function(){function t(t){this.changingThisBreaksApplicationSecurity=t}return t.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},t}(),dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getTypeName=function(){return"HTML"},e}(lt),ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getTypeName=function(){return"Style"},e}(lt),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getTypeName=function(){return"Script"},e}(lt),yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getTypeName=function(){return"URL"},e}(lt),mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.getTypeName=function(){return"ResourceURL"},e}(lt),gt=n.ɵPLATFORM_BROWSER_ID,vt=[{provide:e.PLATFORM_ID,useValue:gt},{provide:e.PLATFORM_INITIALIZER,useValue:function(){v.makeCurrent(),S.init()},multi:!0},{provide:n.PlatformLocation,useClass:E,deps:[n.DOCUMENT]},{provide:n.DOCUMENT,useFactory:function(){return document},deps:[]}],wt=[{provide:e.Sanitizer,useExisting:pt},{provide:pt,useClass:ct,deps:[n.DOCUMENT]}];e.createPlatformFactory(e.platformCore,"browser",vt);var bt=[wt,{provide:e.ɵAPP_ROOT,useValue:!0},{provide:e.ErrorHandler,useFactory:function(){return new e.ErrorHandler},deps:[]},{provide:I,useClass:tt,multi:!0,deps:[n.DOCUMENT,e.NgZone,e.PLATFORM_ID]},{provide:I,useClass:ut,multi:!0,deps:[n.DOCUMENT]},{provide:I,useClass:it,multi:!0,deps:[n.DOCUMENT,nt,e.ɵConsole,[new e.Optional,rt]]},{provide:nt,useClass:ot,deps:[]},{provide:U,useClass:U,deps:[M,P,e.APP_ID]},{provide:e.RendererFactory2,useExisting:U},{provide:D,useExisting:P},{provide:P,useClass:P,deps:[n.DOCUMENT]},{provide:e.Testability,useClass:e.Testability,deps:[e.NgZone]},{provide:M,useClass:M,deps:[I,e.NgZone]},A];!function(){function t(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}var r;r=t,t.withServerTransition=function(t){return{ngModule:r,providers:[{provide:e.APP_ID,useValue:t.appId},{provide:C,useExisting:e.APP_ID},T]}},t=r=a([e.NgModule({providers:bt,exports:[n.CommonModule,e.ApplicationModule]}),s(0,e.Optional()),s(0,e.SkipSelf()),s(0,e.Inject(r)),u("design:paramtypes",[Object])],t)}();function Et(){return new Ct(e.ɵɵinject(n.DOCUMENT))}var Ct=function(){function t(t){this._doc=t,this._dom=l()}return t.prototype.addTag=function(t,e){return void 0===e&&(e=!1),t?this._getOrCreateElement(t,e):null},t.prototype.addTags=function(t,e){var n=this;return void 0===e&&(e=!1),t?t.reduce((function(t,r){return r&&t.push(n._getOrCreateElement(r,e)),t}),[]):[]},t.prototype.getTag=function(t){return t&&this._dom.querySelector(this._doc,"meta["+t+"]")||null},t.prototype.getTags=function(t){if(!t)return[];var e=this._dom.querySelectorAll(this._doc,"meta["+t+"]");return e?[].slice.call(e):[]},t.prototype.updateTag=function(t,e){if(!t)return null;e=e||this._parseSelector(t);var n=this.getTag(e);return n?this._setMetaElementAttributes(t,n):this._getOrCreateElement(t,!0)},t.prototype.removeTag=function(t){this.removeTagElement(this.getTag(t))},t.prototype.removeTagElement=function(t){t&&this._dom.remove(t)},t.prototype._getOrCreateElement=function(t,e){if(void 0===e&&(e=!1),!e){var n=this._parseSelector(t),r=this.getTag(n);if(r&&this._containsAttributes(t,r))return r}var o=this._dom.createElement("meta");this._setMetaElementAttributes(t,o);var i=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(i,o),o},t.prototype._setMetaElementAttributes=function(t,e){var n=this;return Object.keys(t).forEach((function(r){return n._dom.setAttribute(e,r,t[r])})),e},t.prototype._parseSelector=function(t){var e=t.name?"name":"property";return e+'="'+t[e]+'"'},t.prototype._containsAttributes=function(t,e){var n=this;return Object.keys(t).every((function(r){return n._dom.getAttribute(e,r)===t[r]}))},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:Et,token:t,providedIn:"root"}),t=a([e.Injectable({providedIn:"root",useFactory:Et,deps:[]}),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],t)}();function Tt(){return new St(e.ɵɵinject(n.DOCUMENT))}var St=function(){function t(t){this._doc=t}return t.prototype.getTitle=function(){return l().getTitle(this._doc)},t.prototype.setTitle=function(t){l().setTitle(this._doc,t)},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:Tt,token:t,providedIn:"root"}),t=a([e.Injectable({providedIn:"root",useFactory:Tt,deps:[]}),s(0,e.Inject(n.DOCUMENT)),u("design:paramtypes",[Object])],t)}(),_t="undefined"!=typeof window&&window||{},Nt=function(t,e){this.msPerTick=t,this.numTicks=e}; /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */!function(){function t(t){this.appRef=t.injector.get(e.ApplicationRef)}t.prototype.timeChangeDetection=function(t){var e=t&&t.record,n=null!=_t.console.profile;e&&n&&_t.console.profile("Change Detection");for(var r=l().performanceNow(),o=0;o<5||l().performanceNow()-r<500;)this.appRef.tick(),o++;var i=l().performanceNow();e&&n&&_t.console.profileEnd("Change Detection");var a=(i-r)/o;return _t.console.log("ran "+o+" change detection cycles"),_t.console.log(a.toFixed(2)+" ms per check"),new Nt(a,o)}}();var kt=function(){function t(){this.store={},this.onSerializeCallbacks={}}var n;return n=t,t.init=function(t){var e=new n;return e.store=t,e},t.prototype.get=function(t,e){return void 0!==this.store[t]?this.store[t]:e},t.prototype.set=function(t,e){this.store[t]=e},t.prototype.remove=function(t){delete this.store[t]},t.prototype.hasKey=function(t){return this.store.hasOwnProperty(t)},t.prototype.onSerialize=function(t,e){this.onSerializeCallbacks[t]=e},t.prototype.toJson=function(){for(var t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(t){console.warn("Exception in onSerialize callback: ",t)}return JSON.stringify(this.store)},t=n=a([e.Injectable()],t)}();function At(t,e){var n,r,o=t.getElementById(e+"-state"),i={};if(o&&o.textContent)try{i=JSON.parse((n=o.textContent,r={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"},n.replace(/&[^;]+;/g,(function(t){return r[t]}))))}catch(t){console.warn("Exception while restoring TransferState for app "+e,t)}return kt.init(i)}(function(){function t(){}t=a([e.NgModule({providers:[{provide:kt,useFactory:At,deps:[n.DOCUMENT,e.APP_ID]}]})],t)})(),function(){function t(){}t.all=function(){return function(){return!0}},t.css=function(t){return function(e){return null!=e.nativeElement&&l().elementMatches(e.nativeElement,t)}},t.directive=function(t){return function(e){return-1!==e.providerTokens.indexOf(t)}}}(),new e.Version("8.2.14") /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */;var It=function(){function t(){}return t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Mt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:e.Component,args:[{selector:"sw-swipe-angular-list",template:"\n <p>\n swipe-angular-list works!\n </p>\n "}]}],t.ctorParameters=function(){return[]},t}(),Ot=function(){function t(){this.swipeObserver=new e.EventEmitter}return t.prototype.closeAll=function(t){this.swipeObserver.emit(t)},t.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var Dt=function(){function t(t,n){var r=this;this.swService=n,this.alive=!0,this.selfElement=null,this.idElement=null,this.disabledMark=!1,this.showMark=!1,this.itemClass="",this.callback=new e.EventEmitter,this.swClick=new e.EventEmitter,this.swipeCb=new e.EventEmitter,this.random=function(){return(new Date).getTime()},this.swipeleft=function(t){r.swipeCb.emit(t),r.swService.closeAll(r.selfElement.id),r.disabledMark||(r.result=t.deltaX<0)},this.clickItem=function(t){return r.swClick.emit(t)},this.action=function(t){void 0===t&&(t="");try{r.result=!1;var e=r.inside.id;"edit"===t?r.callback.emit({action:"edit",value:e}):"trash"===t&&r.callback.emit({action:"trash",value:e})}catch(t){console.error("Debes definir ID de edit, y trash")}},this.render=function(){if(r.showMark){if(r.inside.mark&&!r.markTemplate){var t=r.defaultMark.createEmbeddedView(null);r.viewContainerMark.insert(t)}else if(r.inside.mark&&r.markTemplate){t=r.markTemplate.createEmbeddedView(null);r.viewContainerMark.insert(t)}if(r.inside.mark||r.notMarkTemplate){if(!r.inside.mark&&r.notMarkTemplate){t=r.notMarkTemplate.createEmbeddedView(null);r.viewContainerMark.insert(t)}}else{var t=r.defaultNotMark.createEmbeddedView(null);r.viewContainerMark.insert(t)}}if(r.editTemplate){var e=r.editTemplate.createEmbeddedView(null);r.viewContainerEdit&&r.viewContainerEdit.insert(e)}else if(null!==r.editTemplate){e=r.defaultEdit.createEmbeddedView(null);r.viewContainerEdit.insert(e)}if(r.trashTemplate){var n=r.trashTemplate.createEmbeddedView(null);r.viewContainerTrash&&r.viewContainerTrash.insert(n)}else if(null!==r.trashTemplate){n=r.defaultTrash.createEmbeddedView(null);r.viewContainerTrash.insert(n)}setTimeout((function(){if(r.customTemplate){var t=i({},r.inside,{touch:r.selfElement.id});(e=r.customTemplate.createEmbeddedView({item:t,id:r.selfElement.id}))&&r.viewContainerCustom.insert(e)}else{var e=r.defaultCustom.createEmbeddedView(null);r.viewContainerCustom.insert(e)}}),10)},this.selfElement=t.nativeElement,this.idElement="list-swipe-"+this.random(),this.selfElement.setAttribute("data-id",this.idElement),this.selfElement.id=this.idElement,this.subsriberElement=this.swService.swipeObserver.subscribe((function(t){t!==r.selfElement.id&&(r.result=!1)}))}return t.prototype.clickOut=function(t){this.selfElement.contains(t.target)||(this.result=!1)},t.prototype.ngOnDestroy=function(){try{this.subsriberElement.unsubscribe()}catch(t){return null}},t.prototype.ngAfterViewInit=function(){this.render()},t.prototype.ngOnInit=function(){},t.decorators=[{type:e.Component,args:[{selector:"sw-item-list",template:'<div class="{{itemClass}}" (swipeleft)="swipeleft($event)" (swipe)="swipeleft($event)" >\n <ng-template #defaultEdit>\n edit\n </ng-template>\n <ng-template #defaultTrash>\n trash\n </ng-template>\n <ng-template #defaultMark>\n <div class="yes-marker"></div>\n </ng-template>\n <ng-template #defaultNotMark>\n <div class="not-marker"></div>\n </ng-template>\n\n <ng-template #defaultCustom>\n <div data-id="{{idElement}}" class="text truncate">{{inside?.title}}</div>\n <div data-id="{{idElement}}" class="small truncate">{{inside?.subTitle}}</div>\n </ng-template>\n\n\n <div [ngClass]="{\'active\':(result)}" data-id="{{idElement}}"\n class=" options-btn swipe-d-flex justify-content-between">\n <div (click)="action(\'edit\')" class="option-list" *ngIf="editTemplate !== null">\n <ng-template let-show="show" #viewContainerEdit></ng-template>\n </div>\n <div (click)="action(\'trash\')" class="option-list" *ngIf="trashTemplate !== null">\n <ng-template let-show="show" #viewContainerTrash></ng-template>\n </div>\n </div>\n <div [ngClass]="{\'left-swipe\':(result)}" data-id="{{idElement}}" class="list-swipe swipe-d-flex">\n\n <div *ngIf="showMark" class="swipe-w-10">\n <ng-container #viewContainerMark></ng-container>\n </div>\n\n <div (click)="clickItem($event)" [ngClass]="{\'swipe-w-90\':showMark, \'swipe-w-100\':!showMark}">\n <div *ngIf="customTemplate" data-id="{{idElement}}">\n <ng-template #viewContainerCustom>\n </ng-template>\n </div>\n\n <div *ngIf="!customTemplate">\n <ng-template #viewContainerCustom></ng-template>\n </div>\n\n </div>\n <div class="mark"></div>\n </div>\n</div>\n',styles:[":host{display:block;font-family:Arial,serif}.not-marker{background:red;width:1rem;height:1rem;border-radius:3rem}.yes-marker{background:green;width:1rem;height:1rem;border-radius:3rem}.swipe-d-flex{display:flex}.swipe-w-10{width:10%}.swipe-w-100{width:100%}.swipe-w-90{width:90%}.options-btn.active{display:flex;transform:translate(66vw,0)}.list-swipe{box-shadow:0 5px 7px rgba(181,181,181,.18);border-radius:.25em;padding:.75em;font-weight:500;font-size:16px;line-height:19px;z-index:9;margin:.75rem 0;transition:50ms ease-out}.left-swipe{transform:translate(-29vw,0);transition:50ms ease-out;box-shadow:6px 0 7px rgba(181,181,181,.31)}.options-btn{position:absolute;display:none;transform:translate(100vw,0);padding:.5rem 0;width:28vw}.list-swipe .text{color:#313131}.list-swipe .small{font-weight:500;font-size:16px;line-height:19px;color:#9b9b9b;padding:1rem 0 0}.list-swipe .mark{background:#fff;height:2rem;margin-top:.75rem;margin-right:-.3rem;border-right:.175rem solid #f96060}.option-list{width:100%;min-height:3.75rem;line-height:3.75rem;border-right:1px solid rgba(0,0,0,.1);text-align:center}.option-list:last-child{border-right:0}.truncate{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:Ot}]},t.propDecorators={inside:[{type:e.Input}],disabledMark:[{type:e.Input,args:["disable-mark"]}],showMark:[{type:e.Input,args:["show-mark"]}],itemClass:[{type:e.Input,args:["item-class"]}],defaultEdit:[{type:e.ViewChild,args:["defaultEdit"]}],defaultTrash:[{type:e.ViewChild,args:["defaultTrash"]}],defaultMark:[{type:e.ViewChild,args:["defaultMark"]}],defaultNotMark:[{type:e.ViewChild,args:["defaultNotMark"]}],defaultCustom:[{type:e.ViewChild,args:["defaultCustom"]}],customTemplate:[{type:e.Input,args:["customTemplate"]}],editTemplate:[{type:e.Input,args:["editTemplate"]}],trashTemplate:[{type:e.Input,args:["trashTemplate"]}],markTemplate:[{type:e.Input,args:["markTemplate"]}],notMarkTemplate:[{type:e.Input,args:["notMarkTemplate"]}],callback:[{type:e.Output}],swClick:[{type:e.Output}],swipeCb:[{type:e.Output}],viewContainerEdit:[{type:e.ViewChild,args:["viewContainerEdit",{static:!1,read:e.ViewContainerRef}]}],viewContainerTrash:[{type:e.ViewChild,args:["viewContainerTrash",{static:!1,read:e.ViewContainerRef}]}],viewContainerMark:[{type:e.ViewChild,args:["viewContainerMark",{static:!1,read:e.ViewContainerRef}]}],viewContainerCustom:[{type:e.ViewChild,args:["viewContainerCustom",{static:!1,read:e.ViewContainerRef}]}],clickOut:[{type:e.HostListener,args:["document:click",["$event"]]}]},t}();var Pt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.overrides={pinch:{enable:!1},rotate:{enable:!1}},e}return o(e,t),e}(ot);var Lt=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{declarations:[Mt,Dt],imports:[n.CommonModule],providers:[{provide:nt,useClass:Pt}],exports:[Mt,Dt]}]}],t}();t.HammerConfig=Pt,t.SwipeAngularListComponent=Mt,t.SwipeAngularListModule=Lt,t.SwipeAngularListService=It,t.ɵa=Dt,t.ɵb=Ot,Object.defineProperty(t,"__esModule",{value:!0})})); //# sourceMappingURL=swipe-angular-list.umd.min.js.map