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AAK,SAAU,KAAM,CAAC,CAClB,QAAS,CACL,EAAO,cAEX,aAAc,CACV,GAEJ,QAAS,CACL,OAIb,CACX,CA7B6B,GA+B7B,EAAQ,uBAAyB,EACjC,EAAQ,sBAAwB,EAEhC,OAAO,eAAe,EAAS,aAAc,CAAE,OAAO,GAErD","file":"/npm/angular2-text-show-more-less@0.1.5/text-show-more-less.umd.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/angular2-text-show-more-less@0.1.5/text-show-more-less.umd.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common'], factory) :\n\t(factory((global['text-show-more-less'] = {}),global.core,global.common));\n}(this, (function (exports,core,common) { 'use strict';\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes} checked by tsc\r\n */\r\nvar TextShowLessComponent = (function () {\r\n    function TextShowLessComponent() {\r\n        this.showTail = false;\r\n        // @Input() textData;\r\n        this.data = '';\r\n        //data = 'Mufthi Mohammed Ali'\r\n        this.tempLength = 0;\r\n        this.readMore = false;\r\n        this.showMoreText = '+ Read More';\r\n        this.showLessText = '- Read Less';\r\n    }\r\n    /**\r\n     * @return {?}\r\n     */\r\n    TextShowLessComponent.prototype.ngOnInit = /**\r\n     * @return {?}\r\n     */\r\n    function () {\r\n        this.tempLength = this.data.length;\r\n        this.maxLengthCloned = this.maxLength || 0;\r\n        this.data = this.data || '';\r\n    };\r\n    /**\r\n     * @param {?} data\r\n     * @return {?}\r\n     */\r\n    TextShowLessComponent.prototype.swap = /**\r\n     * @param {?} data\r\n     * @return {?}\r\n     */\r\n    function (data) {\r\n        // console.log('read more..readless fired'+ this.data.length);\r\n        // console.log('tempLength ' + this.tempLength);\r\n        // console.log('maxLengthCloned ' + this.maxLengthCloned);\r\n        // console.log('maxLength' + this.maxLength);\r\n        // this.tempLength =  this.data.length + this.maxLengthCloned;\r\n        // this.maxLengthCloned =  this.data.length - this.maxLengthCloned;\r\n        // this.tempLength =  this.data.length - this.maxLengthCloned;\r\n        if (this.maxLengthCloned === this.maxLength) {\r\n            this.maxLengthCloned = this.data.length;\r\n        }\r\n        else {\r\n            this.maxLengthCloned = this.maxLength;\r\n        }\r\n        // console.log('tempLength ' + this.tempLength);\r\n        // console.log('maxLengthCloned ' + this.maxLengthCloned);\r\n        // console.log('maxLength' + this.maxLength);\r\n        // this.readMore = data;\r\n    };\r\n    TextShowLessComponent.decorators = [\r\n        { type: core.Component, args: [{\r\n                    selector: 'crystal-text-show-less',\r\n                    template: \"<div class=\\\"text-show-less\\\" style=\\\"text-align: justify;\\\"> <div *ngIf=\\\"maxLength < data?.length\\\">   <div *ngIf=\\\"maxLengthCloned < data?.length\\\"  > <!-- {{maxLengthCloned}} - {{data?.length}} - {{maxLength}} --> {{ (data  | slice: 0:maxLength) + '...' }}  <div *ngIf=\\\"showTail\\\" class=\\\"custom-end d-inline-block custom-font-size\\\" style=\\\"position: relative;\\\" (click)=\\\"swap('show more')\\\"> {{showMoreText}} </div> <!-- {{data.length}} --> </div> <div *ngIf=\\\"maxLengthCloned >= data?.length\\\"> {{ data  }}  <div *ngIf=\\\"maxLengthCloned >= data?.length && showTail\\\" style=\\\"position: relative;\\\" class=\\\"custom-end d-inline-block custom-font-size\\\" (click)=\\\"swap('show less')\\\"> {{showLessText}}</div>  </div> </div> <div *ngIf=\\\"maxLength >= data?.length\\\"  >{{ data }}  </div> </div> <!-- <div class=\\\"truncate\\\" [ngClass]=\\\"{'truncated':readMore}\\\"> {{data}} <div *ngIf=\\\"!readMore\\\" class=\\\"custom-end d-inline-block custom-font-size\\\" (click)=\\\"swap(true)\\\"> {{showMoreText}} </div> <div *ngIf=\\\"readMore\\\" class=\\\"custom-end d-inline-block custom-font-size\\\" (click)=\\\"swap(false)\\\"> {{showLessText}} </div> </div> --> \",\r\n                    styles: [\".custom-end { color: #007bff; text-decoration: none; -ms-touch-action: manipulation; touch-action: manipulation; background-color: transparent; cursor: pointer; } div { line-height: 1.3; font-size: 13px; } .d-inline-block { display: inline-block; } .custom-font-size { font-size: 12px; } .truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; float: left; word-wrap: break-word; width: 300px; } .truncate.truncated { white-space: initial; } .form-control:focus { border-color: transparent; } \"]\r\n                },] },\r\n    ];\r\n    /** @nocollapse */\r\n    TextShowLessComponent.ctorParameters = function () { return []; };\r\n    TextShowLessComponent.propDecorators = {\r\n        \"maxLength\": [{ type: core.Input },],\r\n        \"showTail\": [{ type: core.Input },],\r\n        \"data\": [{ type: core.Input },],\r\n    };\r\n    return TextShowLessComponent;\r\n}());\n\n/**\r\n * @fileoverview added by tsickle\r\n * @suppress {checkTypes} checked by tsc\r\n */\r\nvar TextShowMoreLessModule = (function () {\r\n    function TextShowMoreLessModule() {\r\n    }\r\n    /**\r\n     * @return {?}\r\n     */\r\n    TextShowMoreLessModule.forRoot = /**\r\n     * @return {?}\r\n     */\r\n    function () {\r\n        return {\r\n            ngModule: TextShowMoreLessModule,\r\n            providers: []\r\n        };\r\n    };\r\n    TextShowMoreLessModule.decorators = [\r\n        { type: core.NgModule, args: [{\r\n                    imports: [\r\n                        common.CommonModule\r\n                    ],\r\n                    declarations: [\r\n                        TextShowLessComponent,\r\n                    ],\r\n                    exports: [\r\n                        TextShowLessComponent,\r\n                    ]\r\n                },] },\r\n    ];\r\n    return TextShowMoreLessModule;\r\n}());\n\nexports.TextShowMoreLessModule = TextShowMoreLessModule;\nexports.TextShowLessComponent = TextShowLessComponent;\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n"]}