diff --git a/package-lock.json b/package-lock.json index 92f30ad3..f3ba5842 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,6 +52,7 @@ "get-youtube-id": "^1.0.1", "ionicons": "^7.0.0", "jquery": "^3.7.1", + "jsqr": "^1.4.0", "plyr": "^3.7.8", "reflect-metadata": "^0.1.13", "rxjs": "~7.8.0", @@ -12818,6 +12819,11 @@ "node": "*" } }, + "node_modules/jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" + }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 99f5ebea..ea805513 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -41,8 +41,6 @@ export class AppComponent implements OnInit { case 'VERSION_DETECTED': console.log(`Downloading new app version: ${evt.version.hash}`); this.presentUpdateAlert(); - // if (confirm('A new version is available. Load it?')) - // window.location.reload(); break; case 'VERSION_READY': console.log(`Current app version: ${evt.currentVersion.hash}`); diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a879dd85..d35700be 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -108,11 +108,20 @@ export function initializeFactory(init: DbService) { }) export class AppModule { - constructor(private translate: TranslateService) { - this.setDefaultLanguage(); - } + constructor(private translate: TranslateService, private storage: StorageService) { + this.storage.getData('lang').then(lang =>{ + console.log(lang); + if(!lang) + { + this.setDefaultLanguage(); + } + }); + +} + private setDefaultLanguage() { + this.storage.setData('lang', 'hi'); this.translate.setDefaultLang('hi'); this.translate.use("hi"); } diff --git a/src/app/components/application-header/application-header.component.html b/src/app/components/application-header/application-header.component.html index 75c7ea77..9367042e 100644 --- a/src/app/components/application-header/application-header.component.html +++ b/src/app/components/application-header/application-header.component.html @@ -11,15 +11,16 @@ =0)">{{ configVariables.siteName }} + *ngIf="!(headerConfig?.showbackButton && (headerConfig?.actionButtons?.indexOf('search') >=0 || headerConfig?.actionButtons?.indexOf('edit') >=0))">{{ configVariables.siteName }} + =0">{{ headerConfig.pageTitle }} =0" #searchInput [placeholder]="'SEARCH_HINT' | translate"> - + diff --git a/src/app/components/bot-messages/bot-messages.component.html b/src/app/components/bot-messages/bot-messages.component.html index b4813655..3b9448d0 100644 --- a/src/app/components/bot-messages/bot-messages.component.html +++ b/src/app/components/bot-messages/bot-messages.component.html @@ -30,19 +30,20 @@ - - + [disabled]="disabled" + aria-label="" + value="" + [placeholder]="'Type here' | translate" + (keyup.enter)="handleMessage()" + fill="outline" + shape="round" + [(ngModel)]="textMessage" + #textareaField + (ionFocus)="onInputFocus()" + (ionBlur)="onInputBlur()"> + {{durationDisplay}} diff --git a/src/app/components/bot-messages/bot-messages.component.scss b/src/app/components/bot-messages/bot-messages.component.scss index ea5d332b..9bbe2651 100644 --- a/src/app/components/bot-messages/bot-messages.component.scss +++ b/src/app/components/bot-messages/bot-messages.component.scss @@ -49,7 +49,7 @@ ion-content{ box-shadow: 0px -0.33px 0px 0px #A6A6AA; display: flex; align-items: center; - ion-input { + ion-textarea { width: 90%; } ion-button { diff --git a/src/app/components/qrcode-popup/qrcode-popup.component.ts b/src/app/components/qrcode-popup/qrcode-popup.component.ts index e6b8200e..dafd7ec7 100644 --- a/src/app/components/qrcode-popup/qrcode-popup.component.ts +++ b/src/app/components/qrcode-popup/qrcode-popup.component.ts @@ -89,10 +89,6 @@ export class QrcodePopupComponent implements OnInit { this.scanResult = null; } - stopScan() { - this.scanActive = false; - } - async startScan() { // Not working on iOS standalone mode! const stream = await navigator.mediaDevices.getUserMedia({ @@ -109,6 +105,21 @@ export class QrcodePopupComponent implements OnInit { this.videoElement.play(); requestAnimationFrame(this.scan.bind(this)); } + + stopScan() { + this.scanActive = false; + + const stream = this.videoElement.srcObject; + if (stream) { + const tracks = stream.getTracks(); + tracks.forEach(function(track: MediaStreamTrack) { + track.stop(); + console.log('Track stopped:', track.readyState); + + }); + this.videoElement.srcObject = null; + } + } async scan() { try { @@ -140,9 +151,10 @@ export class QrcodePopupComponent implements OnInit { inversionAttempts: 'dontInvert' }); - if (code) { + if (code?.data) { this.scanActive = false; this.scanResult = code.data; + this.stopScan(); this.showQrToast(); } else { if (this.scanActive) { diff --git a/src/app/pages/create-playlist/create-playlist.page.ts b/src/app/pages/create-playlist/create-playlist.page.ts index 2d1cf0da..f5104428 100644 --- a/src/app/pages/create-playlist/create-playlist.page.ts +++ b/src/app/pages/create-playlist/create-playlist.page.ts @@ -174,7 +174,8 @@ export class CreatePlaylistPage implements OnInit { this.selectedContents.forEach((ele) => { if (!ele.metaData['thumbnail']) { if (ele.metaData.mimetype === PlayerType.YOUTUBE) { - ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData); + // ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData); + ele.metaData['thumbnail'] = ele.metaData.thumbnail; } else { ele.metaData['thumbnail'] = (ele.metaData.thumbnail && !ele.metaData.identifier.startsWith('do_')) ? ele.metaData.thumbnail : ContentUtil.getImagePath(ele.metaData.mimetype || ele.metaData.mimeType) } diff --git a/src/app/pages/home/home.page.ts b/src/app/pages/home/home.page.ts index 50da747e..8fe79603 100644 --- a/src/app/pages/home/home.page.ts +++ b/src/app/pages/home/home.page.ts @@ -50,6 +50,7 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy { selectedLang: any = ""; appName: string = ""; configVariables = ConfigVariables; + responseList: Array = []; constructor( private headerService: AppHeaderService, private router: Router, @@ -115,6 +116,7 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy { if(val == 'language') { let lang = await this.storage.getData('lang'); console.log('lang ', lang, this.selectedLang); + this.responseList = await this.searchService.postContentSearch(req, await this.storage.getData('lang')); if (this.selectedLang !== lang) { this.selectedLang = lang; this.showSheenAnimation = true; @@ -143,7 +145,7 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy { this.serverError = false; this.showSheenAnimation = true; // try { - let lang = 'en';//await this.storage.getData('lang') + let lang = await this.storage.getData('lang') let content = await this.configService.getAllContent(req, lang); this.mappUIContentList(content); // } @@ -163,9 +165,11 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy { console.log(val); this.showSheenAnimation = true; try { - let res: any = await this.searchService.postContentSearch(req, await this.storage.getData('lang')); - console.log('Response', res); - this.mappUIContentList(res); + this.responseList = []; + this.responseList = await this.searchService.postContentSearch(req, await this.storage.getData('lang')); + // let res: any = await this.searchService.postContentSearch(req, await this.storage.getData('lang')); + console.log('Response', this.responseList); + this.mappUIContentList(this.responseList); } catch (e) { console.log('error', e); @@ -173,6 +177,7 @@ export class HomePage implements OnInit, OnTabViewWillEnter, OnDestroy { }) this.networkConnected = await this.networkService.getNetworkStatus() let forceRefresh = await this.cacheService.getCacheTimeout(); + let lang = await this.storage.getData('lang'); if (forceRefresh) { this.getServerMetaConfig(); } else if (!this.networkConnected) { diff --git a/src/app/pages/mypitara/mypitara.page.ts b/src/app/pages/mypitara/mypitara.page.ts index 6ca46878..3b982635 100644 --- a/src/app/pages/mypitara/mypitara.page.ts +++ b/src/app/pages/mypitara/mypitara.page.ts @@ -62,15 +62,23 @@ export class MyPitaraPage implements OnTabViewWillEnter{ async getRecentlyviewedContent() { await this.contentService.getRecentlyViewedContent('guest').then((result) => { - this.contentList = result; - this.contentList.forEach((ele: any) => { - if (ele.metaData.mimetype === PlayerType.YOUTUBE) { - ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData) - } else { - ele.metaData['thumbnail'] = (ele.metaData.thumbnail && !ele?.metaData.identifier?.startsWith('do_')) ? ele.metaData.thumbnail : ContentUtil.getImagePath(ele.metaData.mimeType || ele.metaData.mimetype) + this.contentList = []; + let uniqueIds: any = {}; + result.filter((item : any) => { + if (!uniqueIds[item.contentIdentifier]) { + uniqueIds[item.contentIdentifier] = true; + this.contentList.push(item); + if (item.metaData.mimetype === PlayerType.YOUTUBE) { + // item.metaData['thumbnail'] = this.loadYoutubeImg(item.metaData) + item.metaData['thumbnail'] = item.metaData.thumbnail; + + } else { + item.metaData['thumbnail'] = (item.metaData.thumbnail && !item?.metaData.identifier?.startsWith('do_')) ? item.metaData.thumbnail : ContentUtil.getImagePath(item.metaData.mimeType || item.metaData.mimetype) + } + return true; } - }) - console.log('contentList', this.contentList); + return false; + }); }).catch((err) => { console.log('error', err) }) diff --git a/src/app/pages/playlist-details/playlist-details.page.html b/src/app/pages/playlist-details/playlist-details.page.html index c296e17f..ae367851 100644 --- a/src/app/pages/playlist-details/playlist-details.page.html +++ b/src/app/pages/playlist-details/playlist-details.page.html @@ -5,12 +5,22 @@ - + + + + + + + + + + + + + + + + - {{content.metaData?.name}} diff --git a/src/app/pages/view-all/view-all.page.ts b/src/app/pages/view-all/view-all.page.ts index 1d66415a..bdced130 100644 --- a/src/app/pages/view-all/view-all.page.ts +++ b/src/app/pages/view-all/view-all.page.ts @@ -84,7 +84,16 @@ export class ViewAllPage implements OnInit { async getRecentlyviewedContent() { await this.contentService.getRecentlyViewedContent('guest').then((result) => { - this.contentList = result; + let uniqueIds: any = {}; + result.filter(item => { + if (!uniqueIds[item.contentIdentifier]) { + uniqueIds[item.contentIdentifier] = true; + this.contentList.push(item); + return true; + } + return false; + }); + this.contentList.map((e) => e.metaData = (typeof e.metaData === 'string') ? JSON.parse(e.metaData) : e.metaData) this.contentList = this.getContentImgPath(this.contentList); }).catch((err) => { @@ -231,7 +240,8 @@ export class ViewAllPage implements OnInit { getContentImgPath(contents: Array, isSelected?: boolean) : Array{ contents.forEach((ele) => { if (ele.metaData.mimetype === PlayerType.YOUTUBE) { - ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData); + // ele.metaData['thumbnail'] = this.loadYoutubeImg(ele.metaData.thumbnail) + ele.metaData['thumbnail'] = ele.metaData.thumbnail; } else { ele.metaData['thumbnail'] = (ele.metaData.thumbnail && !ele?.metaData.identifier?.startsWith('do_')) ? ele.mediaData.thumbnail : ContentUtil.getImagePath(ele.metaData.mimetype || ele.metaData.mimeType) } @@ -341,7 +351,7 @@ export class ViewAllPage implements OnInit { metaData: { identifier: content?.identifier, name: content?.name, - thumbnail: content?.posterImage, + thumbnail: content?.thumbnail, description: content?.name, mimetype: content?.mimetype || content?.mimeType, url: content?.streamingUrl, diff --git a/src/app/services/config.service.ts b/src/app/services/config.service.ts index ede8000a..678f4baf 100644 --- a/src/app/services/config.service.ts +++ b/src/app/services/config.service.ts @@ -30,14 +30,16 @@ export class ConfigService { } async getAllContent(req: any, lang: any): Promise { - console.log('req ', req); + let request = { + language: lang + } const apiRequest = new ApiRequest.Builder() .withHost(config.api.BASE_URL) .withPath(config.api.PAGE_SEARCH_API) .withType(ApiHttpRequestType.POST) .withBearerToken(true) - // .withBody(req) - // .withLanguge(lang) + .withBody(request) + .withLanguge(lang) .build() return lastValueFrom(this.apiService.fetch(apiRequest).pipe( map((apiResponse) => apiResponse.body.result), diff --git a/src/app/services/search.service.ts b/src/app/services/search.service.ts index 03fd6e13..c6a76823 100644 --- a/src/app/services/search.service.ts +++ b/src/app/services/search.service.ts @@ -23,7 +23,7 @@ export class SearchService { } } else { request = { - "text": data.text, + "name": data.text, "language": data.currentLang } } @@ -31,7 +31,7 @@ export class SearchService { console.log("body ", body); const apiRequest = new ApiRequest.Builder() .withHost(config.api.BASE_URL) - .withPath(config.api.CONTEXT_SEARCH) + .withPath(config.api.CONTENT_SEARCH_API) .withType(ApiHttpRequestType.POST) .withBody(body) .withBearerToken(true) @@ -48,17 +48,24 @@ export class SearchService { } postContentSearch(data: any, lang: any): Promise { - // let request = { - // request: { - // query: data.query, - // filters: data.filter ?? "" - // } - // } + let req : any= {}; + if(data['name']) + { + req['name'] = data?.name; + } + + if(data['category']) + { + req['category'] = data?.category; + } + + req['language'] = lang; + const apiRequest = new ApiRequest.Builder() .withHost(config.api.BASE_URL) .withPath(config.api.CONTENT_SEARCH_API) .withType(ApiHttpRequestType.POST) - .withBody(data) + .withBody(req) .withBearerToken(true) .withLanguge(lang) .build() diff --git a/www/1983.0f19c07e9fc68691.js b/www/1983.0f19c07e9fc68691.js new file mode 100644 index 00000000..6456f8e9 --- /dev/null +++ b/www/1983.0f19c07e9fc68691.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1983],{334:(S,_,s)=>{s.d(_,{s3:()=>f});const f=(0,s(5083).F3)("Keyboard")},1983:(S,_,s)=>{s.r(_),s.d(_,{SearchPageModule:()=>q});var p=s(177),u=s(9417),h=s(8974),f=s(3021),m=s(467),M=s(56),b=s(2849),x=s(9441),D=s(3649),O=s(334),t=s(4438),v=s(5402);let k=(()=>{var o;class d{constructor(a){this.modalCtrl=a}ngOnInit(){}hadleAudioSearch(){this.modalCtrl.dismiss("search")}}return(o=d).\u0275fac=function(a){return new(a||o)(t.rXU(h.W3))},o.\u0275cmp=t.VBU({type:o,selectors:[["app-recording-alert"]],decls:15,vars:6,consts:[["lines","none"],[1,"record_audio"],[1,"msg_speak"],[1,"circle_ripple"],[1,"circle_ripple-2"],[1,"circle"],[1,"circle-2"],["aria-hidden","true","src","assets/icon/mic.svg"],[1,"search_div"],[3,"click"]],template:function(a,i){1&a&&(t.j41(0,"div")(1,"ion-item",0)(2,"ion-label",1),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.j41(5,"div",2),t.nrm(6,"div",3)(7,"div",4),t.j41(8,"div",5)(9,"div",6),t.nrm(10,"ion-icon",7),t.k0s()()(),t.j41(11,"div",8)(12,"ion-button",9),t.bIt("click",function(){return i.hadleAudioSearch()}),t.EFF(13),t.nI1(14,"translate"),t.k0s()()()),2&a&&(t.R7$(3),t.JRh(t.bMT(4,2,"Speak...")),t.R7$(10),t.JRh(t.bMT(14,4,"Search")))},dependencies:[h.Jm,h.iq,h.uz,h.he,v.D9],styles:[".record_audio[_ngcontent-%COMP%]{font-size:20px;margin:.5rem 0 0 .5rem}.search_div[_ngcontent-%COMP%]{position:absolute;top:33%;left:50%;transform:translate(-50%,-50%)}.msg_speak[_ngcontent-%COMP%]{position:absolute;left:40%;top:-2%;bottom:100%;transform:translate(-50%)}.msg_speak[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:2rem!important;width:2rem!important}.circle_ripple[_ngcontent-%COMP%]{height:50px;width:50px;background:#36b37e;border-radius:50%;animation:_ngcontent-%COMP%_ripple 2s infinite;position:absolute;left:10px;top:110px;z-index:0}.circle_ripple-2[_ngcontent-%COMP%]{height:50px;width:50px;background:#36b37e;border-radius:50%;animation:_ngcontent-%COMP%_ripple-2 2s infinite;position:absolute;left:10px;top:110px}@keyframes _ngcontent-%COMP%_ripple{0%{transform:scale(1)}50%{transform:scale(2);opacity:.3}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_ripple-2{0%{transform:scale(1)}50%{transform:scale(2.5);opacity:.3}to{transform:scale(1)}}.circle[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:50%;background:#eaeaea;position:absolute;left:5px;top:105px}.circle-2[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50%;background:#fff;position:absolute;left:5px;top:5px;box-shadow:0 0 8px #00000029;z-index:2}.circle-2[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px;position:absolute;left:10px;top:10px}"]}),d})();var R=s(8666),w=s(7420),P=s(5293),y=s(2904),T=s(9836),A=s(2186),G=s(444),I=s(5173),B=s(2297);const j=["searchInput"],F=()=>[0,1,2,3,4,5,6,7,8];function $(o,d){1&o&&(t.j41(0,"ion-item",16)(1,"div",17),t.nrm(2,"app-skeleton-item",18),t.k0s(),t.j41(3,"ion-label",19),t.nrm(4,"app-skeleton-item",20)(5,"app-skeleton-item",21),t.k0s(),t.j41(6,"ion-label",22),t.nrm(7,"app-skeleton-item",23),t.k0s()())}function X(o,d){1&o&&(t.j41(0,"ion-list",12)(1,"ion-item",13)(2,"ion-label",14),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.DNE(5,$,8,0,"ion-item",15),t.k0s()),2&o&&(t.R7$(3),t.JRh(t.bMT(4,2,"Searching...")),t.R7$(2),t.Y8G("ngForOf",t.lJ4(4,F)))}function Y(o,d){if(1&o&&(t.j41(0,"ion-list")(1,"ion-item",13)(2,"ion-label",24),t.EFF(3),t.nI1(4,"translate"),t.k0s()()()),2&o){const e=t.XpG();t.R7$(3),t.JRh(t.bMT(4,1,e.errMsg))}}function N(o,d){if(1&o&&t.nrm(0,"img",32),2&o){const e=t.XpG().$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Audio.png",t.B4B)}}function U(o,d){if(1&o&&t.nrm(0,"img",32),2&o){const e=t.XpG().$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/youtube-video.png",t.B4B)}}function E(o,d){if(1&o&&t.nrm(0,"img",32),2&o){const e=t.XpG().$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Video.png",t.B4B)}}function V(o,d){if(1&o&&t.nrm(0,"img",32),2&o){const e=t.XpG().$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/PDF.png",t.B4B)}}function L(o,d){if(1&o&&t.nrm(0,"img",32),2&o){const e=t.XpG().$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/LINK.png",t.B4B)}}function W(o,d){if(1&o&&t.nrm(0,"img",32),2&o){const e=t.XpG().$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/LINK.png",t.B4B)}}function K(o,d){if(1&o){const e=t.RV6();t.j41(0,"ion-item",26)(1,"div",27),t.bIt("click",function(i){const n=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.playContent(i,n))}),t.DNE(2,N,1,1,"img",28)(3,U,1,1,"img",28)(4,E,1,1,"img",28)(5,V,1,1,"img",28)(6,L,1,1,"img",28)(7,W,1,1,"img",28),t.k0s(),t.j41(8,"div",29)(9,"div",30),t.EFF(10),t.k0s(),t.j41(11,"ion-icon",31),t.bIt("click",function(){const i=t.eBV(e).$implicit,n=t.XpG(2);return t.Njj(n.moreOtions(i))}),t.k0s()()()}if(2&o){const e=d.$implicit,a=t.XpG(2);t.R7$(2),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.AUDIO),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.YOUTUBE),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.MP4),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.PDF),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.LINK),t.R7$(),t.Y8G("ngIf","text/html"===(null==e||null==e.metaData?null:e.metaData.mimetype)),t.R7$(3),t.JRh(null==e.metaData?null:e.metaData.name)}}function J(o,d){if(1&o&&(t.j41(0,"ion-list"),t.DNE(1,K,12,7,"ion-item",25),t.k0s()),2&o){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.searchContentResult)}}const H=[{path:"",component:(()=>{var o;class d{constructor(a,i,n,c,l,g,r,C,tt){this.headerService=a,this.location=i,this.record=n,this.searchApi=c,this.modalCtrl=l,this.contentService=g,this.router=r,this.telemetryGeneratorService=C,this.storage=tt,this.showSheenAnimation=!1,this.searchKeywords="",this.searchContentResult=[],this.optModalOpen=!1,this.mimeType=M.Cc,this.noSearchData=!1,this.errMsg="",this.modalPresent=!1,this.disabled=!1,this.startRecording=!1,this.duration=0,this.durationDisplay=""}tabViewWillEnter(){this.headerService.hideHeader(),this.headerService.showStatusBar(!1)}ngOnInit(){}navigateBack(){this.location.back()}ionViewWillEnter(){this.headerService.hideHeader(),this.headerService.showStatusBar(!1)}handleSearch(a,i=!1){var n=this;return(0,m.A)(function*(){if(i){n.showSheenAnimation=!0;let r=yield n.makeSearchContextApiCall(a,i);var c;null!=r&&r.input?(null!==(c=r.input)&&void 0!==c&&c.sourceText&&(n.searchKeywords=r.input.sourceText),n.handleContentSearch(r,i)):(n.disabled=!1,n.showSheenAnimation=!1,n.noSearchData=!0,n.searchContentResult=[],n.errMsg="Sorry, please try again!")}else if(n.searchKeywords.replace(/\s/g,"").length>0){var l;n.showSheenAnimation=!0,O.s3.hide();let r=yield n.makeSearchContextApiCall(n.searchKeywords,i);var g;null!=r&&null!==(l=r.input)&&void 0!==l&&l.sourceText&&(n.searchKeywords=null==r||null===(g=r.input)||void 0===g?void 0:g.sourceText),n.handleContentSearch(r,!1)}})()}makeSearchContextApiCall(a,i){var n=this;return(0,m.A)(function*(){return yield n.searchApi.postSearchContext({text:a,currentLang:yield n.storage.getData("lang")},i).then(c=>c).catch(c=>{var l;i?(n.disabled=!1,n.showSheenAnimation=!1,n.noSearchData=!0,n.searchContentResult=[],n.errMsg="unsupported language!"==(null==c||null===(l=c.body)||void 0===l||null===(l=l.detail)||void 0===l?void 0:l.toLowerCase())?"Sorry, this language is not currently supported.":"Sorry, please try again!"):n.handleContentSearch("",!1)})})()}handleContentSearch(a,i=!1){var n=this;return(0,m.A)(function*(){var c;let l={name:null!==(c=null==a?void 0:a.context)&&void 0!==c?c:n.searchKeywords};yield n.searchApi.postContentSearch(l,yield n.storage.getData("lang")).then(g=>{if(console.log("searchRes ",g),n.telemetryGeneratorService.generateSearchTelemetry(i?"audio":"text",i?"":n.searchKeywords,g.length,"search",""),n.disabled=!1,g.length>0){n.showSheenAnimation=!1,n.noSearchData=!1;let r={};n.searchContentResult=[],g.forEach(C=>{r={},r.source="djp",r.sourceType="djp-content",r.metaData=C,n.searchContentResult.push(r)})}else n.showSheenAnimation=!1,n.noSearchData=!0,n.searchContentResult=[],n.errMsg="No Result"}).catch(g=>{var r;n.disabled=!1,n.showSheenAnimation=!1,n.noSearchData=!0,n.searchContentResult=[],n.errMsg="unsupported language!"==(null==g||null===(r=g.body)||void 0===r||null===(r=r.detail)||void 0===r?void 0:r.toLowerCase())?"Sorry, this language is not currently supported.":"Sorry, please try again!"})})()}moreOtions(a){var i=this;return(0,m.A)(function*(){let n;i.optModalOpen||(i.optModalOpen=!0,n=yield i.modalCtrl.create({component:b.q,componentProps:{content:a},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield n.present()),n.onDidDismiss().then(function(){var c=(0,m.A)(function*(l){i.optModalOpen=!1,l.data&&"addToPitara"===l.data.type?i.addContentToMyPitara(l.data.content||a):l.data&&"like"==l.data.type&&(i.contentService.likeContent(l.data.content||a,"guest",!0),l.data.content.metaData.isLiked&&(yield R.Q.play({assetId:"windchime"}),(0,w.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})),i.telemetryGeneratorService.generateInteractTelemetry("TOUCH","content-liked","search","search",new D.$i(null==a?void 0:a.metaData.identifier,null==a?void 0:a.metaData.mimetype,"")))});return function(l){return c.apply(this,arguments)}}())})()}addContentToMyPitara(a){var i=this;return(0,m.A)(function*(){const n=yield i.modalCtrl.create({component:x.$,componentProps:{content:a},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield n.present(),n.onWillDismiss().then(c=>{})})()}playContent(a,i){var n=this;return(0,m.A)(function*(){n.contentService.markContentAsViewed(i),yield n.router.navigate(["/player"],{state:{content:i}})})()}onLongPressStart(){var a=this;return(0,m.A)(function*(){console.log("long press on search start"),a.searchKeywords="",(yield(yield P.R.hasAudioRecordingPermission()).value)?(a.record.startRecognition("search"),a.disabled=!0,a.startRecording=!0,a.presentPopover(event),a.calculation()):yield P.R.requestAudioRecordingPermission()})()}presentPopover(a){var i=this;return(0,m.A)(function*(){i.modal=yield i.modalCtrl.create({component:k,cssClass:"sheet-modal",breakpoints:[.4],showBackdrop:!1,initialBreakpoint:.4,handle:!1,handleBehavior:"none"}),i.modalPresent=!0,yield i.modal.present(),yield i.modal.onDidDismiss().then(n=>{"search"===n.data&&i.onLongPressEnd()})})()}calculation(){if(!this.startRecording)return this.duration=0,void(this.durationDisplay="");this.duration+=1;const a=Math.floor(this.duration/60),i=(this.duration%60).toString().padStart(2,"0");this.durationDisplay=`${a}:${i}`,this.durationDisplay>"0:05"&&this.onLongPressEnd(),setTimeout(()=>{this.calculation()},1e3)}onLongPressEnd(){var a=this;return(0,m.A)(function*(){console.log("long press on search end"),yield a.record.stopRecognition("search").then(function(){var i=(0,m.A)(function*(n){a.modalPresent&&(a.modalPresent=!1,yield a.modal.dismiss()),a.startRecording=!1,a.handleSearch(n,!0)});return function(n){return i.apply(this,arguments)}}())})()}}return(o=d).\u0275fac=function(a){return new(a||o)(t.rXU(y.Ux),t.rXU(p.aZ),t.rXU(T.X),t.rXU(A.S),t.rXU(h.W3),t.rXU(G.f),t.rXU(f.Ix),t.rXU(I.O),t.rXU(y.n$))},o.\u0275cmp=t.VBU({type:o,selectors:[["app-search"]],viewQuery:function(a,i){if(1&a&&t.GBs(j,5),2&a){let n;t.mGM(n=t.lsd())&&(i.searchBar=n.first)}},decls:16,vars:9,consts:[["searchInput",""],[1,"custom-header"],[1,"header-content"],["slot","start",1,"start-icon"],[3,"click"],["aria-hidden","true","src","assets/icon/back.svg"],["type","search","fill","outline","shape","round",3,"keyup.enter","ngModelChange","disabled","ngModel","placeholder"],["slot","end"],[3,"click","disabled"],["aria-hidden","true","src","assets/icon/mic.svg"],["class","m-n",4,"ngIf"],[4,"ngIf"],[1,"m-n"],["lines","none"],[1,"ion-text-center"],["lines","none","style","padding: 5px;",4,"ngFor","ngForOf"],["lines","none",2,"padding","5px"],["item-start","",2,"border-radius","16px"],["height","100px","width","200px","radius","16px",2,"border-radius","16px"],[2,"padding-left","10px"],["height","12px","width","100px",2,"padding-bottom","8px"],["height","12px","width","80px",2,"padding-bottom","8px"],[2,"padding-left","30px"],["height","12px","width","10px",2,"padding-bottom","8px"],[1,"no-data"],["lines","none","class","card",4,"ngFor","ngForOf"],["lines","none",1,"card"],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],[1,"card__metadata"],[1,"card__title"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",3,"click"],["alt","",3,"src"]],template:function(a,i){if(1&a){const n=t.RV6();t.j41(0,"ion-header")(1,"ion-toolbar",1)(2,"div",2)(3,"ion-buttons",3)(4,"ion-button",4),t.bIt("click",function(){return t.eBV(n),t.Njj(i.navigateBack())}),t.nrm(5,"ion-icon",5),t.k0s()(),t.j41(6,"ion-input",6,0),t.nI1(8,"translate"),t.bIt("keyup.enter",function(){return t.eBV(n),t.Njj(i.handleSearch())})("ngModelChange",function(){return t.eBV(n),t.Njj(!i.searchContentResult)}),t.mxI("ngModelChange",function(l){return t.eBV(n),t.DH7(i.searchKeywords,l)||(i.searchKeywords=l),t.Njj(l)}),t.k0s(),t.j41(9,"ion-buttons",7)(10,"ion-button",8),t.bIt("click",function(){return t.eBV(n),t.Njj(i.onLongPressStart())}),t.nrm(11,"ion-icon",9),t.k0s()()()()(),t.j41(12,"ion-content"),t.DNE(13,X,6,5,"ion-list",10)(14,Y,5,3,"ion-list",11)(15,J,2,1,"ion-list",11),t.k0s()}2&a&&(t.R7$(6),t.Y8G("disabled",i.disabled),t.R50("ngModel",i.searchKeywords),t.Y8G("placeholder",t.bMT(8,7,"SEARCH_HINT")),t.R7$(4),t.Y8G("disabled",i.disabled),t.R7$(3),t.Y8G("ngIf",i.showSheenAnimation),t.R7$(),t.Y8G("ngIf",!i.showSheenAnimation&&i.noSearchData),t.R7$(),t.Y8G("ngIf",!i.showSheenAnimation&&i.searchContentResult.length>0))},dependencies:[p.Sq,p.bT,u.BC,u.vS,h.Jm,h.QW,h.W9,h.eU,h.iq,h.$w,h.uz,h.he,h.nf,h.ai,h.Gw,B.O,v.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-header[_ngcontent-%COMP%]{box-shadow:none}ion-header[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary)}ion-content[_ngcontent-%COMP%]{--padding-top: 0 !important}.header-content[_ngcontent-%COMP%]{display:flex} .toolbar-container{padding:0!important;min-height:auto}ion-input[_ngcontent-%COMP%]{margin-top:.5rem;min-height:3rem!important;--border-color: var(--ion-color-medium) !important;--highlight-color: var(--ion-color-secondary-contrast) !important}ion-icon[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;margin-left:0}.card__img[_ngcontent-%COMP%]{width:40%;height:auto}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%!important}.card__metadata[_ngcontent-%COMP%]{padding-top:0;padding-left:1rem;align-items:center;width:60%;height:90%}ion-list[_ngcontent-%COMP%]{background-color:transparent}ion-item[_ngcontent-%COMP%]{--background: transparent}.search_text[_ngcontent-%COMP%]{text-align:center}"]}),d})()}];let z=(()=>{var o;class d{}return(o=d).\u0275fac=function(a){return new(a||o)},o.\u0275mod=t.$C({type:o}),o.\u0275inj=t.G2t({imports:[f.iI.forChild(H),f.iI]}),d})();var Q=s(3721),Z=s(5553);let q=(()=>{var o;class d{}return(o=d).\u0275fac=function(a){return new(a||o)},o.\u0275mod=t.$C({type:o}),o.\u0275inj=t.G2t({imports:[p.MD,u.YN,h.bv,z,v.h,Z.h,Q.h]}),d})()}}]); \ No newline at end of file diff --git a/www/2741.f151f86686f6696f.js b/www/2741.f151f86686f6696f.js deleted file mode 100644 index dee7eb2d..00000000 --- a/www/2741.f151f86686f6696f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2741],{4294:(f,g,a)=>{"use strict";a.r(g),a.d(g,{PlaylistDetailsPageModule:()=>F});var m=a(177),r=a(9417),c=a(8974),d=a(3021),p=a(467),D=a(56),b=a(5301),t=a(4438),C=a(2904),O=a(7803),M=a(4254),v=a(5402);function x(n,s){1&n&&(t.j41(0,"div",3)(1,"div",4),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&n&&(t.R7$(2),t.JRh(t.bMT(3,1,"Add content to the playlist")))}function G(n,s){if(1&n&&t.nrm(0,"img",15),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Audio.png",t.B4B)}}function T(n,s){if(1&n&&t.nrm(0,"img",16),2&n){const e=t.XpG(2).$implicit;t.Y8G("appThumbnail",null==e?null:e.metaData)}}function j(n,s){if(1&n&&t.nrm(0,"img",15),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Video.png",t.B4B)}}function $(n,s){if(1&n&&t.nrm(0,"img",15),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/PDF.png",t.B4B)}}function I(n,s){if(1&n&&t.nrm(0,"img",15),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/LINK.png",t.B4B)}}function R(n,s){1&n&&t.nrm(0,"ion-icon",17)}function Y(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",7)(1,"div",8),t.bIt("click",function(){t.eBV(e);const l=t.XpG().$implicit,o=t.XpG();return t.Njj(o.playContent(l))}),t.DNE(2,G,1,1,"img",9)(3,T,1,1,"img",10)(4,j,1,1,"img",9)(5,$,1,1,"img",9)(6,I,1,1,"img",9),t.k0s(),t.j41(7,"div",11)(8,"div",12),t.EFF(9),t.k0s(),t.j41(10,"ion-buttons"),t.DNE(11,R,1,0,"ion-icon",13),t.j41(12,"ion-icon",14),t.bIt("click",function(){t.eBV(e);const l=t.XpG().$implicit,o=t.XpG();return t.Njj(o.moreOtions(l))}),t.k0s()()()()}if(2&n){const e=t.XpG().$implicit,i=t.XpG();t.R7$(2),t.Y8G("ngIf",(null==e||null==e.metaData?null:e.metaData.mimetype)===i.mimeType.AUDIO),t.R7$(),t.Y8G("ngIf",(null==e||null==e.metaData?null:e.metaData.mimetype)===i.mimeType.YOUTUBE&&!e.play),t.R7$(),t.Y8G("ngIf",(null==e||null==e.metaData?null:e.metaData.mimetype)===i.mimeType.MP4),t.R7$(),t.Y8G("ngIf",(null==e||null==e.metaData?null:e.metaData.mimetype)===i.mimeType.PDF),t.R7$(),t.Y8G("ngIf","text/html"===(null==e||null==e.metaData?null:e.metaData.mimetype)),t.R7$(3),t.JRh(null==e.metaData?null:e.metaData.name),t.R7$(2),t.Y8G("ngIf","local"===e.source)}}function B(n,s){if(1&n&&(t.j41(0,"div",5),t.DNE(1,Y,13,7,"div",6),t.k0s()),2&n){const e=s.$implicit;t.R7$(),t.Y8G("ngIf",null==e?null:e.metaData)}}const X=[{path:"",component:(()=>{var n;class s{constructor(i,l,o,u){var h;this.router=i,this.headerService=l,this.modalCtrl=o,this.playlistService=u,this.playlists=[],this.mimeType=D.Cc,this.navigated=!1,this.headerEventSub=null;let _=null===(h=this.router.getCurrentNavigation())||void 0===h?void 0:h.extras;var y;_&&(this.playContentObject=null===(y=_.state)||void 0===y?void 0:y.playlist,this.playContentObject.playListcontentList.map(P=>{P.metaData=JSON.parse(P.content_metadata)}),this.playlists=this.playContentObject.playListcontentList,console.log("playlists",this.playlists))}ngOnInit(){this.headerService.showHeader(this.playContentObject.name,!0,["edit"]),this.headerService.headerEventEmitted$.subscribe(i=>{"edit"===i?this.router.navigate(["/create-playlist"],{state:{playlists:this.playContentObject,islocal:!0}}):"back"===i&&!this.navigated&&(this.navigated=!0,this.router.navigate(["/tabs/my-pitara"]))})}ionViewWillEnter(){this.navigated=!1,this.headerService.showHeader(this.playContentObject.name,!0,["edit"])}ngOnDestroy(){try{this.headerEventSub&&this.headerEventSub.unsubscribe()}catch(i){console.log("error in unsubscribe",i)}}playContent(i){var l=this;return(0,p.A)(function*(){yield l.router.navigate(["/player"],{state:{content:i}})})()}deletePlaylist(i){var l=this;return(0,p.A)(function*(){yield l.playlistService.deleteContentFromPlayList(l.playContentObject.identifier,[i.identifier]).then(o=>{l.getPlaylistContent()}).catch(o=>{console.log("err",o)})})()}getPlaylistContent(){var i=this;return(0,p.A)(function*(){yield i.playlistService.getPlayListContents(i.playContentObject.identifier).then(l=>{i.playlists=l,i.playlists.map(o=>{o.metaData=JSON.parse(o.content_metadata)}),i.playContentObject.playListcontentList=i.playlists})})()}moreOtions(i){var l=this;return(0,p.A)(function*(){const o=yield l.modalCtrl.create({component:b.J,cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield o.present(),o.onWillDismiss().then(u=>{u&&"delete"===u.data.type?l.deletePlaylist(i):u&&"edit"===u.data.type&&l.router.navigate(["/create-playlist"],{state:{playlists:l.playContentObject,islocal:!0}})})})()}}return(n=s).\u0275fac=function(i){return new(i||n)(t.rXU(d.Ix),t.rXU(C.Ux),t.rXU(c.W3),t.rXU(O.q))},n.\u0275cmp=t.VBU({type:n,selectors:[["app-playlist-details"]],decls:3,vars:3,consts:[[3,"fullscreen"],["class","bot-section",4,"ngIf"],["class","cards-container",4,"ngFor","ngForOf"],[1,"bot-section"],[1,"bot-section__text"],[1,"cards-container"],["class","card",4,"ngIf"],[1,"card"],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],["appThumbnail","","alt","",3,"appThumbnail",4,"ngIf"],[1,"card__metadata"],[1,"card__title"],["aria-hidden","true","class","icon-right","src","assets/icon/sd-card.svg",4,"ngIf"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",1,"icon-left",3,"click"],["alt","",3,"src"],["appThumbnail","","alt","",3,"appThumbnail"],["aria-hidden","true","src","assets/icon/sd-card.svg",1,"icon-right"]],template:function(i,l){1&i&&(t.j41(0,"ion-content",0),t.DNE(1,x,4,3,"div",1)(2,B,2,1,"div",2),t.k0s()),2&i&&(t.Y8G("fullscreen",!0),t.R7$(),t.Y8G("ngIf",!l.playlists.length),t.R7$(),t.Y8G("ngForOf",l.playlists))},dependencies:[m.Sq,m.bT,c.QW,c.W9,c.iq,M.g,v.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-content[_ngcontent-%COMP%]{--padding-top: 3.5rem }.landscape-icon[_ngcontent-%COMP%]{position:absolute;width:100%;background:transparent;bottom:3.5rem;z-index:9999;background:var(--ion-color-secondary-contrast);opacity:.5}.landscape-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{float:right;font-size:1.5rem;margin-right:.5rem}.icon-right[_ngcontent-%COMP%]{margin-right:10px}.icon-left[_ngcontent-%COMP%]{margin-left:10px}.bot-section__text[_ngcontent-%COMP%]{position:absolute;left:46%;right:0;top:16%;transform:translate(-50%,-50%);text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),s})()}];let w=(()=>{var n;class s{}return(n=s).\u0275fac=function(i){return new(i||n)},n.\u0275mod=t.$C({type:n}),n.\u0275inj=t.G2t({imports:[d.iI.forChild(X),d.iI]}),s})();var E=a(3721);let F=(()=>{var n;class s{}return(n=s).\u0275fac=function(i){return new(i||n)},n.\u0275mod=t.$C({type:n}),n.\u0275inj=t.G2t({imports:[m.MD,r.YN,c.bv,w,v.h,E.h]}),s})()},5318:function(f){f.exports=function(a,m){if(null==m&&(m={fuzzy:!0}),/youtu\.?be/.test(a)){var r,c=[/youtu\.be\/([^#\&\?]{11})/,/\?v=([^#\&\?]{11})/,/\&v=([^#\&\?]{11})/,/embed\/([^#\&\?]{11})/,/\/v\/([^#\&\?]{11})/];for(r=0;r{l.d(x,{r:()=>L});var k=l(56),e=l(4438),c=l(8974),E=l(4517),C=l(177),S=l(9417),g=l(5402);function N(p,D){if(1&p){const t=e.RV6();e.j41(0,"ion-item",9)(1,"ion-input",10),e.nI1(2,"translate"),e.mxI("ngModelChange",function(s){e.eBV(t);const _=e.XpG();return e.DH7(_.name,s)||(_.name=s),e.Njj(s)}),e.k0s()()}if(2&p){const t=e.XpG();e.R7$(),e.R50("ngModel",t.name),e.Y8G("placeholder",e.bMT(2,2,t.placeholder))}}function F(p,D){if(1&p){const t=e.RV6();e.j41(0,"ion-item",9)(1,"ion-input",11),e.nI1(2,"translate"),e.mxI("ngModelChange",function(s){e.eBV(t);const _=e.XpG();return e.DH7(_.url,s)||(_.url=s),e.Njj(s)}),e.bIt("ionInput",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.onInputChange())}),e.k0s()()}if(2&p){const t=e.XpG();e.R7$(),e.R50("ngModel",t.url),e.Y8G("placeholder",e.bMT(2,2,"url"))}}function U(p,D){if(1&p&&(e.j41(0,"ion-item",12)(1,"ion-label",13),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&p){const t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,1,t.errMsg))}}let L=(()=>{var p;class D{constructor(h,s){this.modalCtrl=h,this.navParams=s,this.name="",this.title="",this.placeholder="",this.url="",this.errMsg=""}ngOnInit(){this.title=this.navParams.get("title"),this.placeholder=this.navParams.get("placeholder")}cancel(){this.modalCtrl.dismiss()}createPlaylist(){if(this.name)"Add Youtube URL"==this.title&&this.url?this.url.match(/(?:youtu\.be\/|youtube\.com(?:\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=|shorts\/)|youtu\.be\/|embed\/|v\/|m\/|watch\?(?:[^=]+=[^&]+&)*?v=))([^"&?\/\s]{11})/gm)?this.modalCtrl.dismiss({type:"create",name:this.name,url:this.url}):this.errMsg="Please enter a valid url":this.modalCtrl.dismiss({type:"create",playlistName:this.name});else if("Add Diksha URL"==this.title&&this.url){let h=!1;k.Hs.forEach(s=>{this.url.match(new RegExp(s.pattern))&&(h=!0)}),h?this.modalCtrl.dismiss({type:"create",url:this.url}):this.errMsg="Please enter a valid url"}}onInputChange(){this.errMsg=""}}return(p=D).\u0275fac=function(h){return new(h||p)(e.rXU(c.W3),e.rXU(E.y8))},p.\u0275cmp=e.VBU({type:p,selectors:[["app-new-playlist-modal"]],decls:18,vars:12,consts:[[1,"inner-content"],[1,"header-info"],["class","roundedInput",4,"ngIf"],["lines","none",4,"ngIf"],[1,"btn-row"],["size","6",1,"btn-pr-8"],["fill","outline","expand","block",1,"app-rate-btn-outline",3,"click"],["size","6",1,"btn-pl-8"],["expand","block","color","warning",1,"app-rate-btn","app-rate-btn-ellipsis",3,"click"],[1,"roundedInput"],["type","text",3,"ngModelChange","ngModel","placeholder"],["type","url",3,"ngModelChange","ionInput","ngModel","placeholder"],["lines","none"],["color","danger"]],template:function(h,s){1&h&&(e.j41(0,"div",0)(1,"ion-toolbar")(2,"div",1),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.DNE(5,N,3,4,"ion-item",2)(6,F,3,4,"ion-item",2)(7,U,4,3,"ion-item",3),e.j41(8,"div",4)(9,"ion-row")(10,"ion-col",5)(11,"ion-button",6),e.bIt("click",function(){return s.cancel()}),e.EFF(12),e.nI1(13,"translate"),e.k0s()(),e.j41(14,"ion-col",7)(15,"ion-button",8),e.bIt("click",function(){return s.createPlaylist()}),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()()()),2&h&&(e.R7$(3),e.JRh(e.bMT(4,6,s.title)),e.R7$(2),e.Y8G("ngIf","Add Diksha URL"!==s.title),e.R7$(),e.Y8G("ngIf","New Playlist"!==s.title),e.R7$(),e.Y8G("ngIf",s.errMsg),e.R7$(5),e.SpI(" ",e.bMT(13,8,"Cancel"),""),e.R7$(4),e.SpI(" ",e.bMT(17,10,"Create"),""))},dependencies:[C.bT,S.BC,S.vS,c.Jm,c.hU,c.$w,c.uz,c.he,c.ln,c.ai,c.Gw,g.D9],styles:[".btn-info[_ngcontent-%COMP%]{height:3rem;width:34%;--border-radius: 1.25rem;font-size:.875rem}.btn-info__left[_ngcontent-%COMP%]{margin-left:.625rem}.btn-info__right[_ngcontent-%COMP%]{margin-top:3rem}.header-info[_ngcontent-%COMP%]{padding:.688rem 1rem;color:#2f2c2a;font-size:1.1rem;font-family:Noto Sans Devanagari;font-weight:700;line-height:25.2px;word-wrap:break-word}.roundedInput[_ngcontent-%COMP%]{--border-color: var(--ion-color-medium-shade);--border-radius: 4rem;--border-width: 1px;--box-shadow: 2px gray;--highlight-height: 0;--background: #f8f9fa;padding:.5rem 1.125rem .938rem}.app-rate-btn-outline[_ngcontent-%COMP%]{border-color:var(--ion-color-primary-contrast);color:var(--ion-color-medium);height:3rem;--border-radius: 1.25rem;font-size:.75rem;font-family:Noto Sans;font-weight:700;text-transform:uppercase;line-height:19.6px;word-wrap:break-word;--border-color: var(--ion-color-medium)}.app-rate-btn-ellipsis[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block}.app-rate-btn[_ngcontent-%COMP%]{height:3rem;--border-radius: 1.25rem;font-size:.75rem;font-family:Noto Sans;font-weight:700;text-transform:uppercase;line-height:19.6px;word-wrap:break-word}.app-rate-btn[_ngcontent-%COMP%]::part(native){--ion-color-contrast: var(--ion-color-primary-contrast)}.btn-row[_ngcontent-%COMP%]{padding:0 .625rem .625rem;margin-top:.625rem}.btn-pr-8[_ngcontent-%COMP%], .btn-pl-8[_ngcontent-%COMP%]{padding-right:1rem}"]}),D})()},3066:(Y,x,l)=>{l.r(x),l.d(x,{CreatePlaylistPageModule:()=>X});var k=l(177),e=l(9417),c=l(8974),E=l(3021),C=l(467),S=l(4715),g=l(56),N=l(4733),F=l(5318),U=l.n(F),L=l(1471),p=l(1129),D=l(8113),t=l(4438),h=l(444),s=l(7803),_=l(2904),G=l(5402);function z(r,v){1&r&&(t.j41(0,"div",16),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"Add content to the playlist")))}function A(r,v){if(1&r){const d=t.RV6();t.j41(0,"div",17)(1,"div",18),t.nrm(2,"img",19),t.k0s(),t.j41(3,"div",20)(4,"div",21),t.EFF(5),t.k0s(),t.j41(6,"ion-checkbox",22),t.bIt("ionChange",function(a){const o=t.eBV(d).index,m=t.XpG();return t.Njj(m.isContentSelect(a,o))}),t.k0s()()()}if(2&r){const d=v.$implicit;t.R7$(2),t.Y8G("src",null!=d&&null!=d.metaData&&d.metaData.thumbnail?null==d||null==d.metaData?null:d.metaData.thumbnail:"../../../assets/images/slider-img.svg",t.B4B),t.R7$(3),t.JRh(null==d||null==d.metaData?null:d.metaData.name),t.R7$(),t.Y8G("checked",d.isSelected)}}const $=[{path:"",component:(()=>{var r;class v{constructor(n,a,o,m,y,f,O){var T;this.contentService=n,this.playListService=a,this.headerService=o,this.router=m,this.location=y,this.utilService=f,this.modalCtrl=O,this.contentList=[],this.playlistName="",this.disableCreateBtn=!0,this.files=[],this.navigateBack=!1,this.resolveNativePath=u=>new Promise((R,i)=>{window.FilePath.resolveNativePath(u,R,M=>{console.error(`${u} could not be resolved by the plugin: ${M.message}`),i(M)})}),this.selectedContents=[],this.reSelectedContent=[],this.localContents=0,this.status="",this.optModalOpen=!1;let w=null===(T=this.router.getCurrentNavigation())||void 0===T?void 0:T.extras;var P,B,b,I;w&&(null!==(P=w.state)&&void 0!==P&&P.islocal?(this.playlists=null===(B=w.state)||void 0===B?void 0:B.playlists,this.selectedContents=this.playlists.playListcontentList,this.selectedContents.map(u=>{u.isSelected=!0,!u.metaData&&u.content_metadata&&(u.metaData=JSON.parse(u.content_metadata))}),this.playlistName=this.playlists.name,this.status=null===(b=w.state)||void 0===b?void 0:b.status):this.selectedContents=null===(I=w.state)||void 0===I?void 0:I.selectedContents,this.selectedContents=this.selectedContents.filter(u=>u.metaData),this.reSelectedContent=this.selectedContents)}ngOnInit(){this.getContentImgPath(),this.contentService.getRecentlyViewedContent("guest").then(n=>{this.contentList=n,console.log("result",n)}),this.headerService.headerEventEmitted$.subscribe(n=>{"back"===n&&"edit"===this.status&&!this.navigateBack&&(this.navigateBack=!0,this.router.navigate(["/tabs/my-pitara"]))})}ionViewWillEnter(){this.headerService.showHeader("create New Playlist",!0)}isContentSelect(n,a){this.selectedContents[a].isSelected=n.detail.checked,this.reSelectedContent=[],this.selectedContents.forEach(o=>{o.isSelected&&this.reSelectedContent.push({identifier:o.metaData.contentIdentifier})}),this.disableCreateBtn=!1,(0==this.reSelectedContent.length||0==this.playlistName.length)&&(this.disableCreateBtn=!0)}playlistNameChange(){var n;this.disableCreateBtn=!(this.playlistName.replace(/\s/g,"").length>0&&this.selectedContents.length>0||""!==this.playlistName&&this.playlistName!==(null===(n=this.playlists)||void 0===n?void 0:n.name))}createList(){var n=this;return(0,C.A)(function*(){let a=[];n.selectedContents.forEach(o=>{a.push("local"===o.type||"local"===o.source?{identifier:o.identifier,type:"diksha"==o.sourceType?"local_diksha":"local",localContent:o,isDeleted:!o.isSelected}:o.isSelected?{identifier:o.contentIdentifier,type:"recentlyViewed",localContent:o}:{identifier:o.identifier,type:o.type,localContent:o,isDeleted:!0})}),n.playlistName.replace(/\s/g,"").length>0&&n.playListService.createPlayList(n.playlistName,"guest",a,n.playlists?n.playlists.identifier:void 0).then(m=>{n.headerService.deviceBackBtnEvent({name:"backBtn"}),"edit"===n.status?n.location.back():window.history.go(-2)}).catch(m=>{console.log("errrrr",m)})})()}openFilePicker(){var n=this;return(0,C.A)(function*(){let a=[g.z5.PDF];a=a.concat(g.z5.VIDEOS).concat(g.z5.AUDIO);const{files:o}=yield S.N.pickFiles({types:a,multiple:!0,readData:!0}),m=yield n.utilService.getLoader();yield m.present();for(let y=0;y{n.metaData.thumbnail?n.metaData.mimeType!==g.Cc.YOUTUBE&&(n.metaData.thumbnail=n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?n.metaData.thumbnail:N.O.getImagePath(n.metaData.mimetype||n.metaData.mimeType)):n.metaData.thumbnail=n.metaData.mimetype===g.Cc.YOUTUBE||n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?n.metaData.thumbnail:N.O.getImagePath(n.metaData.mimetype||n.metaData.mimeType)})}loadYoutubeImg(n){let a=n.identifier;return a&&a.startsWith("do_")&&(a=U()(n.url)),`https://img.youtube.com/vi/${a}/mqdefault.jpg`}uploadLocalContents(){var n=this;return(0,C.A)(function*(){let a;n.optModalOpen||(n.optModalOpen=!0,a=yield n.modalCtrl.create({component:p.W,componentProps:{uploadType:[{type:"url",label:"Upload from Youtube"},{type:"diksha",label:"Upload from Diksha"}]},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield a.present()),a.onDidDismiss().then(function(){var o=(0,C.A)(function*(m){n.optModalOpen=!1,"file"===m.data.type?n.openFilePicker():n.createYoutubeContent(m.data.type)});return function(m){return o.apply(this,arguments)}}())})()}createYoutubeContent(n){var a=this;return(0,C.A)(function*(){const o=yield a.modalCtrl.create({component:D.r,componentProps:{title:"url"==n?"Add Youtube URL":"Add Diksha URL",placeholder:"Name"},cssClass:"auto-height"});yield o.present(),o.onDidDismiss().then(function(){var m=(0,C.A)(function*(y){var f,O;let T=null===(f=y.data)||void 0===f?void 0:f.url;if(y&&"create"===(null===(O=y.data)||void 0===O?void 0:O.type)){const w=yield a.utilService.getLoader();yield w.present();let P="";if("url"===n)P=U()(T),a.selectedContents.push({source:"local",sourceType:"local",metaData:{identifier:P,url:"https://www.youtube.com/watch?v="+P,name:y.data.name,mimetype:g.z5.YOUTUBE,thumbnail:""}}),a.selectedContents.length&&a.getContentImgPath();else if("diksha"==n){P=T.split("/").filter(b=>b.startsWith("do_"));try{yield a.contentService.readDikshaContents(P[0]).then(function(){var b=(0,C.A)(function*(I){var u,R;console.log("res ",I);let i=null===(u=I.body)||void 0===u||null===(u=u.result)||void 0===u?void 0:u.content;if((null===(R=i.dialcodes)||void 0===R?void 0:R.length)>0)yield a.contentService.getContents(i.dialcodes[0]).then(M=>{console.log("content data ",M),M.forEach(j=>{j.source="local",(j.metaData.mimetype==g.z5.PDF||j.metaData.mimetype==g.z5.VIDEO)&&a.selectedContents.push(j)}),a.getContentImgPath()});else if(i.mediaType="content"){let M={source:"local",sourceType:"diksha",metaData:{identifier:null==i?void 0:i.identifier,name:null==i?void 0:i.name,thumbnail:null==i?void 0:i.posterImage,description:null==i?void 0:i.name,mimetype:(null==i?void 0:i.mimetype)||(null==i?void 0:i.mimeType),url:null==i?void 0:i.streamingUrl,focus:null==i?void 0:i.focus,keyword:null==i?void 0:i.keyword,domain:null==i?void 0:i.domain,curriculargoal:null==i?void 0:i.curriculargoal,competencies:null==i?void 0:i.competencies,language:null==i?void 0:i.language,category:null==i?void 0:i.category,audience:null==i?void 0:i.audience,status:null==i?void 0:i.status,createdon:null==i?void 0:i.createdOn,lastupdatedon:(null==i?void 0:i.lastupdatedon)||(null==i?void 0:i.lastUpdatedOn),artifactUrl:null==i?void 0:i.artifactUrl}};(M.metaData.mimetype==g.z5.PDF||M.metaData.mimetype==g.z5.VIDEO)&&(a.selectedContents.push(M),a.getContentImgPath())}});return function(I){return b.apply(this,arguments)}}())}catch(b){console.log("Server error ",b)}}yield w.dismiss()}});return function(y){return m.apply(this,arguments)}}())})()}}return(r=v).\u0275fac=function(n){return new(n||r)(t.rXU(h.f),t.rXU(s.q),t.rXU(_.Ux),t.rXU(E.Ix),t.rXU(k.aZ),t.rXU(_.a0),t.rXU(c.W3))},r.\u0275cmp=t.VBU({type:r,selectors:[["app-create-playlist"]],decls:20,vars:9,consts:[[3,"fullscreen"],[1,"create-playlist"],["type","text","placeholder","Name Your Playlist","opacity","0.5",3,"ngModelChange","ionInput","ngModel"],["slot","end","aria-hidden","true","src","assets/icon/edit.svg"],[1,"create-playlist-container"],["class","bot-section__text",4,"ngIf"],["class","card",4,"ngFor","ngForOf"],[1,"view-all-btn"],[1,"view-playlist"],[1,"view-playlist__icon"],[1,"count"],["aria-hidden","true","src","assets/icon/pitara-blue.svg"],[1,"view-playlist__icon",3,"click"],["aria-hidden","true","src","assets/icon/file-upload.svg"],[1,"view-playlist__button"],["fill","outline",1,"new-playlist__btn",3,"click","disabled"],[1,"bot-section__text"],[1,"card"],[1,"card__img"],["alt","Playlist Image",3,"src"],[1,"card__metadata"],[1,"card__title"],[3,"ionChange","checked"]],template:function(n,a){1&n&&(t.j41(0,"ion-content",0)(1,"div",1)(2,"ion-item")(3,"ion-input",2),t.mxI("ngModelChange",function(m){return t.DH7(a.playlistName,m)||(a.playlistName=m),m}),t.bIt("ionInput",function(){return a.playlistNameChange()}),t.k0s(),t.nrm(4,"ion-icon",3),t.k0s(),t.j41(5,"div",4),t.DNE(6,z,3,3,"div",5)(7,A,7,3,"div",6),t.k0s()()(),t.j41(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),t.EFF(12),t.k0s(),t.nrm(13,"ion-icon",11),t.k0s(),t.j41(14,"div",12),t.bIt("click",function(){return a.uploadLocalContents()}),t.nrm(15,"ion-icon",13),t.k0s(),t.j41(16,"div",14)(17,"ion-button",15),t.bIt("click",function(){return a.createList()}),t.EFF(18),t.nI1(19,"translate"),t.k0s()()()()),2&n&&(t.Y8G("fullscreen",!0),t.R7$(3),t.R50("ngModel",a.playlistName),t.R7$(3),t.Y8G("ngIf",!a.selectedContents.length),t.R7$(),t.Y8G("ngForOf",a.selectedContents),t.R7$(5),t.JRh(a.reSelectedContent.length),t.R7$(5),t.Y8G("disabled",a.disableCreateBtn),t.R7$(),t.SpI(" ",t.bMT(19,7,"Save Playlist")," "))},dependencies:[k.Sq,k.bT,e.BC,e.vS,c.Jm,c.eY,c.W9,c.iq,c.$w,c.uz,c.hB,c.Gw,G.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}.cards-container[_ngcontent-%COMP%]{padding-top:.5rem}.card[_ngcontent-%COMP%]{display:flex}.card__img[_ngcontent-%COMP%]{width:100%;height:4.5rem;max-width:7.5rem}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:.5rem}.card__metadata[_ngcontent-%COMP%]{padding-top:0;padding-left:.5rem;align-items:flex-start;width:100%}.view-playlist[_ngcontent-%COMP%]{position:fixed;bottom:.188rem;width:98%;height:4rem;background-color:var(--ion-color-secondary);border-radius:3.125rem;display:flex;align-items:center;padding:.5rem}.view-playlist__icon[_ngcontent-%COMP%]{width:3rem;height:3rem;background-color:var(--ion-color-primary-contrast);border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;margin-right:5%}.view-playlist__icon[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{position:absolute;top:-.188rem;right:-.188rem;background:var(--ion-color-primary);border-radius:50%;font-size:.625rem;width:1.125rem;height:1.125rem;display:flex;align-items:center;justify-content:center;color:var(--ion-color-primary-contrast)}.view-playlist__icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.view-playlist__button[_ngcontent-%COMP%]{margin-left:auto}.view-playlist__button[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:.75rem;font-weight:700}.view-all-btn[_ngcontent-%COMP%]{display:flex;justify-content:center}[_nghost-%COMP%] ion-checkbox[_ngcontent-%COMP%]{--border-radius: 50% !important;--border-color: var(--ion-color-medium) !important;--size: 1.5rem !important;--checkbox-background-checked: var(--ion-color-secondary) !important;--border-color-checked: var(--ion-color-secondary) !important;margin:0}[_nghost-%COMP%] ion-button.new-playlist__btn[_ngcontent-%COMP%]{--background: var(--ion-color-secondary);--color: var(--ion-color-primary-contrast);--border-radius: 1.875rem;--border-color: var(--ion-color-primary-contrast);--border-style: solid;--border-width: 1px;--box-shadow: none}ion-content[_ngcontent-%COMP%]{--padding-top: 2.5rem}ion-item[_ngcontent-%COMP%]{width:100%}ion-input[_ngcontent-%COMP%]{--placeholder-opacity: .5}.create-playlist[_ngcontent-%COMP%]{padding:1rem}.create-playlist-container[_ngcontent-%COMP%]{margin-top:1rem;height:calc(100vh - 195px);overflow-y:auto}.bot-section__text[_ngcontent-%COMP%]{position:absolute;left:46%;right:0;top:16%;transform:translate(-50%,-50%);text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),v})()}];let W=(()=>{var r;class v{}return(r=v).\u0275fac=function(n){return new(n||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[E.iI.forChild($),E.iI]}),v})(),X=(()=>{var r;class v{}return(r=v).\u0275fac=function(n){return new(n||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[k.MD,e.YN,c.bv,W,G.h]}),v})()}}]); \ No newline at end of file diff --git a/www/3066.1cfd22d031dc2e1c.js b/www/3066.1cfd22d031dc2e1c.js deleted file mode 100644 index 737a68c9..00000000 --- a/www/3066.1cfd22d031dc2e1c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3066],{8113:(G,x,l)=>{l.d(x,{r:()=>L});var k=l(56),e=l(4438),c=l(8974),E=l(4517),C=l(177),S=l(9417),g=l(5402);function N(p,D){if(1&p){const t=e.RV6();e.j41(0,"ion-item",9)(1,"ion-input",10),e.nI1(2,"translate"),e.mxI("ngModelChange",function(s){e.eBV(t);const _=e.XpG();return e.DH7(_.name,s)||(_.name=s),e.Njj(s)}),e.k0s()()}if(2&p){const t=e.XpG();e.R7$(),e.R50("ngModel",t.name),e.Y8G("placeholder",e.bMT(2,2,t.placeholder))}}function F(p,D){if(1&p){const t=e.RV6();e.j41(0,"ion-item",9)(1,"ion-input",11),e.nI1(2,"translate"),e.mxI("ngModelChange",function(s){e.eBV(t);const _=e.XpG();return e.DH7(_.url,s)||(_.url=s),e.Njj(s)}),e.bIt("ionInput",function(){e.eBV(t);const s=e.XpG();return e.Njj(s.onInputChange())}),e.k0s()()}if(2&p){const t=e.XpG();e.R7$(),e.R50("ngModel",t.url),e.Y8G("placeholder",e.bMT(2,2,"url"))}}function U(p,D){if(1&p&&(e.j41(0,"ion-item",12)(1,"ion-label",13),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&p){const t=e.XpG();e.R7$(2),e.JRh(e.bMT(3,1,t.errMsg))}}let L=(()=>{var p;class D{constructor(h,s){this.modalCtrl=h,this.navParams=s,this.name="",this.title="",this.placeholder="",this.url="",this.errMsg=""}ngOnInit(){this.title=this.navParams.get("title"),this.placeholder=this.navParams.get("placeholder")}cancel(){this.modalCtrl.dismiss()}createPlaylist(){if(this.name)"Add Youtube URL"==this.title&&this.url?this.url.match(/(?:youtu\.be\/|youtube\.com(?:\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=|shorts\/)|youtu\.be\/|embed\/|v\/|m\/|watch\?(?:[^=]+=[^&]+&)*?v=))([^"&?\/\s]{11})/gm)?this.modalCtrl.dismiss({type:"create",name:this.name,url:this.url}):this.errMsg="Please enter a valid url":this.modalCtrl.dismiss({type:"create",playlistName:this.name});else if("Add Diksha URL"==this.title&&this.url){let h=!1;k.Hs.forEach(s=>{this.url.match(new RegExp(s.pattern))&&(h=!0)}),h?this.modalCtrl.dismiss({type:"create",url:this.url}):this.errMsg="Please enter a valid url"}}onInputChange(){this.errMsg=""}}return(p=D).\u0275fac=function(h){return new(h||p)(e.rXU(c.W3),e.rXU(E.y8))},p.\u0275cmp=e.VBU({type:p,selectors:[["app-new-playlist-modal"]],decls:18,vars:12,consts:[[1,"inner-content"],[1,"header-info"],["class","roundedInput",4,"ngIf"],["lines","none",4,"ngIf"],[1,"btn-row"],["size","6",1,"btn-pr-8"],["fill","outline","expand","block",1,"app-rate-btn-outline",3,"click"],["size","6",1,"btn-pl-8"],["expand","block","color","warning",1,"app-rate-btn","app-rate-btn-ellipsis",3,"click"],[1,"roundedInput"],["type","text",3,"ngModelChange","ngModel","placeholder"],["type","url",3,"ngModelChange","ionInput","ngModel","placeholder"],["lines","none"],["color","danger"]],template:function(h,s){1&h&&(e.j41(0,"div",0)(1,"ion-toolbar")(2,"div",1),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.DNE(5,N,3,4,"ion-item",2)(6,F,3,4,"ion-item",2)(7,U,4,3,"ion-item",3),e.j41(8,"div",4)(9,"ion-row")(10,"ion-col",5)(11,"ion-button",6),e.bIt("click",function(){return s.cancel()}),e.EFF(12),e.nI1(13,"translate"),e.k0s()(),e.j41(14,"ion-col",7)(15,"ion-button",8),e.bIt("click",function(){return s.createPlaylist()}),e.EFF(16),e.nI1(17,"translate"),e.k0s()()()()()),2&h&&(e.R7$(3),e.JRh(e.bMT(4,6,s.title)),e.R7$(2),e.Y8G("ngIf","Add Diksha URL"!==s.title),e.R7$(),e.Y8G("ngIf","New Playlist"!==s.title),e.R7$(),e.Y8G("ngIf",s.errMsg),e.R7$(5),e.SpI(" ",e.bMT(13,8,"Cancel"),""),e.R7$(4),e.SpI(" ",e.bMT(17,10,"Create"),""))},dependencies:[C.bT,S.BC,S.vS,c.Jm,c.hU,c.$w,c.uz,c.he,c.ln,c.ai,c.Gw,g.D9],styles:[".btn-info[_ngcontent-%COMP%]{height:3rem;width:34%;--border-radius: 1.25rem;font-size:.875rem}.btn-info__left[_ngcontent-%COMP%]{margin-left:.625rem}.btn-info__right[_ngcontent-%COMP%]{margin-top:3rem}.header-info[_ngcontent-%COMP%]{padding:.688rem 1rem;color:#2f2c2a;font-size:1.1rem;font-family:Noto Sans Devanagari;font-weight:700;line-height:25.2px;word-wrap:break-word}.roundedInput[_ngcontent-%COMP%]{--border-color: var(--ion-color-medium-shade);--border-radius: 4rem;--border-width: 1px;--box-shadow: 2px gray;--highlight-height: 0;--background: #f8f9fa;padding:.5rem 1.125rem .938rem}.app-rate-btn-outline[_ngcontent-%COMP%]{border-color:var(--ion-color-primary-contrast);color:var(--ion-color-medium);height:3rem;--border-radius: 1.25rem;font-size:.75rem;font-family:Noto Sans;font-weight:700;text-transform:uppercase;line-height:19.6px;word-wrap:break-word;--border-color: var(--ion-color-medium)}.app-rate-btn-ellipsis[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block}.app-rate-btn[_ngcontent-%COMP%]{height:3rem;--border-radius: 1.25rem;font-size:.75rem;font-family:Noto Sans;font-weight:700;text-transform:uppercase;line-height:19.6px;word-wrap:break-word}.app-rate-btn[_ngcontent-%COMP%]::part(native){--ion-color-contrast: var(--ion-color-primary-contrast)}.btn-row[_ngcontent-%COMP%]{padding:0 .625rem .625rem;margin-top:.625rem}.btn-pr-8[_ngcontent-%COMP%], .btn-pl-8[_ngcontent-%COMP%]{padding-right:1rem}"]}),D})()},3066:(G,x,l)=>{l.r(x),l.d(x,{CreatePlaylistPageModule:()=>X});var k=l(177),e=l(9417),c=l(8974),E=l(3021),C=l(467),S=l(4715),g=l(56),N=l(4733),F=l(5318),U=l.n(F),L=l(1471),p=l(1129),D=l(8113),t=l(4438),h=l(444),s=l(7803),_=l(2904),Y=l(5402);function z(r,v){1&r&&(t.j41(0,"div",16),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&r&&(t.R7$(),t.JRh(t.bMT(2,1,"Add content to the playlist")))}function A(r,v){if(1&r){const d=t.RV6();t.j41(0,"div",17)(1,"div",18),t.nrm(2,"img",19),t.k0s(),t.j41(3,"div",20)(4,"div",21),t.EFF(5),t.k0s(),t.j41(6,"ion-checkbox",22),t.bIt("ionChange",function(a){const o=t.eBV(d).index,m=t.XpG();return t.Njj(m.isContentSelect(a,o))}),t.k0s()()()}if(2&r){const d=v.$implicit;t.R7$(2),t.Y8G("src",null!=d&&null!=d.metaData&&d.metaData.thumbnail?null==d||null==d.metaData?null:d.metaData.thumbnail:"../../../assets/images/slider-img.svg",t.B4B),t.R7$(3),t.JRh(null==d||null==d.metaData?null:d.metaData.name),t.R7$(),t.Y8G("checked",d.isSelected)}}const $=[{path:"",component:(()=>{var r;class v{constructor(n,a,o,m,y,f,O){var T;this.contentService=n,this.playListService=a,this.headerService=o,this.router=m,this.location=y,this.utilService=f,this.modalCtrl=O,this.contentList=[],this.playlistName="",this.disableCreateBtn=!0,this.files=[],this.navigateBack=!1,this.resolveNativePath=u=>new Promise((R,i)=>{window.FilePath.resolveNativePath(u,R,M=>{console.error(`${u} could not be resolved by the plugin: ${M.message}`),i(M)})}),this.selectedContents=[],this.reSelectedContent=[],this.localContents=0,this.status="",this.optModalOpen=!1;let w=null===(T=this.router.getCurrentNavigation())||void 0===T?void 0:T.extras;var P,B,b,I;w&&(null!==(P=w.state)&&void 0!==P&&P.islocal?(this.playlists=null===(B=w.state)||void 0===B?void 0:B.playlists,this.selectedContents=this.playlists.playListcontentList,this.selectedContents.map(u=>{u.isSelected=!0,!u.metaData&&u.content_metadata&&(u.metaData=JSON.parse(u.content_metadata))}),this.playlistName=this.playlists.name,this.status=null===(b=w.state)||void 0===b?void 0:b.status):this.selectedContents=null===(I=w.state)||void 0===I?void 0:I.selectedContents,this.selectedContents=this.selectedContents.filter(u=>u.metaData),this.reSelectedContent=this.selectedContents)}ngOnInit(){this.getContentImgPath(),this.contentService.getRecentlyViewedContent("guest").then(n=>{this.contentList=n,console.log("result",n)}),this.headerService.headerEventEmitted$.subscribe(n=>{"back"===n&&"edit"===this.status&&!this.navigateBack&&(this.navigateBack=!0,this.router.navigate(["/tabs/my-pitara"]))})}ionViewWillEnter(){this.headerService.showHeader("create New Playlist",!0)}isContentSelect(n,a){this.selectedContents[a].isSelected=n.detail.checked,this.reSelectedContent=[],this.selectedContents.forEach(o=>{o.isSelected&&this.reSelectedContent.push({identifier:o.metaData.contentIdentifier})}),this.disableCreateBtn=!1,(0==this.reSelectedContent.length||0==this.playlistName.length)&&(this.disableCreateBtn=!0)}playlistNameChange(){var n;this.disableCreateBtn=!(this.playlistName.replace(/\s/g,"").length>0&&this.selectedContents.length>0||""!==this.playlistName&&this.playlistName!==(null===(n=this.playlists)||void 0===n?void 0:n.name))}createList(){var n=this;return(0,C.A)(function*(){let a=[];n.selectedContents.forEach(o=>{a.push("local"===o.type||"local"===o.source?{identifier:o.identifier,type:"diksha"==o.sourceType?"local_diksha":"local",localContent:o,isDeleted:!o.isSelected}:o.isSelected?{identifier:o.contentIdentifier,type:"recentlyViewed",localContent:o}:{identifier:o.identifier,type:o.type,localContent:o,isDeleted:!0})}),n.playlistName.replace(/\s/g,"").length>0&&n.playListService.createPlayList(n.playlistName,"guest",a,n.playlists?n.playlists.identifier:void 0).then(m=>{n.headerService.deviceBackBtnEvent({name:"backBtn"}),"edit"===n.status?n.location.back():window.history.go(-2)}).catch(m=>{console.log("errrrr",m)})})()}openFilePicker(){var n=this;return(0,C.A)(function*(){let a=[g.z5.PDF];a=a.concat(g.z5.VIDEOS).concat(g.z5.AUDIO);const{files:o}=yield S.N.pickFiles({types:a,multiple:!0,readData:!0}),m=yield n.utilService.getLoader();yield m.present();for(let y=0;y{n.metaData.thumbnail?n.metaData.mimeType!==g.Cc.YOUTUBE&&(n.metaData.thumbnail=n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?n.metaData.thumbnail:N.O.getImagePath(n.metaData.mimetype||n.metaData.mimeType)):n.metaData.thumbnail=n.metaData.mimetype===g.Cc.YOUTUBE?this.loadYoutubeImg(n.metaData):n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?n.metaData.thumbnail:N.O.getImagePath(n.metaData.mimetype||n.metaData.mimeType)})}loadYoutubeImg(n){let a=n.identifier;return a&&a.startsWith("do_")&&(a=U()(n.url)),`https://img.youtube.com/vi/${a}/mqdefault.jpg`}uploadLocalContents(){var n=this;return(0,C.A)(function*(){let a;n.optModalOpen||(n.optModalOpen=!0,a=yield n.modalCtrl.create({component:p.W,componentProps:{uploadType:[{type:"url",label:"Upload from Youtube"},{type:"diksha",label:"Upload from Diksha"}]},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield a.present()),a.onDidDismiss().then(function(){var o=(0,C.A)(function*(m){n.optModalOpen=!1,"file"===m.data.type?n.openFilePicker():n.createYoutubeContent(m.data.type)});return function(m){return o.apply(this,arguments)}}())})()}createYoutubeContent(n){var a=this;return(0,C.A)(function*(){const o=yield a.modalCtrl.create({component:D.r,componentProps:{title:"url"==n?"Add Youtube URL":"Add Diksha URL",placeholder:"Name"},cssClass:"auto-height"});yield o.present(),o.onDidDismiss().then(function(){var m=(0,C.A)(function*(y){var f,O;let T=null===(f=y.data)||void 0===f?void 0:f.url;if(y&&"create"===(null===(O=y.data)||void 0===O?void 0:O.type)){const w=yield a.utilService.getLoader();yield w.present();let P="";if("url"===n)P=U()(T),a.selectedContents.push({source:"local",sourceType:"local",metaData:{identifier:P,url:"https://www.youtube.com/watch?v="+P,name:y.data.name,mimetype:g.z5.YOUTUBE,thumbnail:""}}),a.selectedContents.length&&a.getContentImgPath();else if("diksha"==n){P=T.split("/").filter(b=>b.startsWith("do_"));try{yield a.contentService.readDikshaContents(P[0]).then(function(){var b=(0,C.A)(function*(I){var u,R;console.log("res ",I);let i=null===(u=I.body)||void 0===u||null===(u=u.result)||void 0===u?void 0:u.content;if((null===(R=i.dialcodes)||void 0===R?void 0:R.length)>0)yield a.contentService.getContents(i.dialcodes[0]).then(M=>{console.log("content data ",M),M.forEach(j=>{j.source="local",(j.metaData.mimetype==g.z5.PDF||j.metaData.mimetype==g.z5.VIDEO)&&a.selectedContents.push(j)}),a.getContentImgPath()});else if(i.mediaType="content"){let M={source:"local",sourceType:"diksha",metaData:{identifier:null==i?void 0:i.identifier,name:null==i?void 0:i.name,thumbnail:null==i?void 0:i.posterImage,description:null==i?void 0:i.name,mimetype:(null==i?void 0:i.mimetype)||(null==i?void 0:i.mimeType),url:null==i?void 0:i.streamingUrl,focus:null==i?void 0:i.focus,keyword:null==i?void 0:i.keyword,domain:null==i?void 0:i.domain,curriculargoal:null==i?void 0:i.curriculargoal,competencies:null==i?void 0:i.competencies,language:null==i?void 0:i.language,category:null==i?void 0:i.category,audience:null==i?void 0:i.audience,status:null==i?void 0:i.status,createdon:null==i?void 0:i.createdOn,lastupdatedon:(null==i?void 0:i.lastupdatedon)||(null==i?void 0:i.lastUpdatedOn),artifactUrl:null==i?void 0:i.artifactUrl}};(M.metaData.mimetype==g.z5.PDF||M.metaData.mimetype==g.z5.VIDEO)&&(a.selectedContents.push(M),a.getContentImgPath())}});return function(I){return b.apply(this,arguments)}}())}catch(b){console.log("Server error ",b)}}yield w.dismiss()}});return function(y){return m.apply(this,arguments)}}())})()}}return(r=v).\u0275fac=function(n){return new(n||r)(t.rXU(h.f),t.rXU(s.q),t.rXU(_.Ux),t.rXU(E.Ix),t.rXU(k.aZ),t.rXU(_.a0),t.rXU(c.W3))},r.\u0275cmp=t.VBU({type:r,selectors:[["app-create-playlist"]],decls:20,vars:9,consts:[[3,"fullscreen"],[1,"create-playlist"],["type","text","placeholder","Name Your Playlist","opacity","0.5",3,"ngModelChange","ionInput","ngModel"],["slot","end","aria-hidden","true","src","assets/icon/edit.svg"],[1,"create-playlist-container"],["class","bot-section__text",4,"ngIf"],["class","card",4,"ngFor","ngForOf"],[1,"view-all-btn"],[1,"view-playlist"],[1,"view-playlist__icon"],[1,"count"],["aria-hidden","true","src","assets/icon/pitara-blue.svg"],[1,"view-playlist__icon",3,"click"],["aria-hidden","true","src","assets/icon/file-upload.svg"],[1,"view-playlist__button"],["fill","outline",1,"new-playlist__btn",3,"click","disabled"],[1,"bot-section__text"],[1,"card"],[1,"card__img"],["alt","Playlist Image",3,"src"],[1,"card__metadata"],[1,"card__title"],[3,"ionChange","checked"]],template:function(n,a){1&n&&(t.j41(0,"ion-content",0)(1,"div",1)(2,"ion-item")(3,"ion-input",2),t.mxI("ngModelChange",function(m){return t.DH7(a.playlistName,m)||(a.playlistName=m),m}),t.bIt("ionInput",function(){return a.playlistNameChange()}),t.k0s(),t.nrm(4,"ion-icon",3),t.k0s(),t.j41(5,"div",4),t.DNE(6,z,3,3,"div",5)(7,A,7,3,"div",6),t.k0s()()(),t.j41(8,"div",7)(9,"div",8)(10,"div",9)(11,"div",10),t.EFF(12),t.k0s(),t.nrm(13,"ion-icon",11),t.k0s(),t.j41(14,"div",12),t.bIt("click",function(){return a.uploadLocalContents()}),t.nrm(15,"ion-icon",13),t.k0s(),t.j41(16,"div",14)(17,"ion-button",15),t.bIt("click",function(){return a.createList()}),t.EFF(18),t.nI1(19,"translate"),t.k0s()()()()),2&n&&(t.Y8G("fullscreen",!0),t.R7$(3),t.R50("ngModel",a.playlistName),t.R7$(3),t.Y8G("ngIf",!a.selectedContents.length),t.R7$(),t.Y8G("ngForOf",a.selectedContents),t.R7$(5),t.JRh(a.reSelectedContent.length),t.R7$(5),t.Y8G("disabled",a.disableCreateBtn),t.R7$(),t.SpI(" ",t.bMT(19,7,"Save Playlist")," "))},dependencies:[k.Sq,k.bT,e.BC,e.vS,c.Jm,c.eY,c.W9,c.iq,c.$w,c.uz,c.hB,c.Gw,Y.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}.cards-container[_ngcontent-%COMP%]{padding-top:.5rem}.card[_ngcontent-%COMP%]{display:flex}.card__img[_ngcontent-%COMP%]{width:100%;height:4.5rem;max-width:7.5rem}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:.5rem}.card__metadata[_ngcontent-%COMP%]{padding-top:0;padding-left:.5rem;align-items:flex-start;width:100%}.view-playlist[_ngcontent-%COMP%]{position:fixed;bottom:.188rem;width:98%;height:4rem;background-color:var(--ion-color-secondary);border-radius:3.125rem;display:flex;align-items:center;padding:.5rem}.view-playlist__icon[_ngcontent-%COMP%]{width:3rem;height:3rem;background-color:var(--ion-color-primary-contrast);border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;margin-right:5%}.view-playlist__icon[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{position:absolute;top:-.188rem;right:-.188rem;background:var(--ion-color-primary);border-radius:50%;font-size:.625rem;width:1.125rem;height:1.125rem;display:flex;align-items:center;justify-content:center;color:var(--ion-color-primary-contrast)}.view-playlist__icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.view-playlist__button[_ngcontent-%COMP%]{margin-left:auto}.view-playlist__button[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:.75rem;font-weight:700}.view-all-btn[_ngcontent-%COMP%]{display:flex;justify-content:center}[_nghost-%COMP%] ion-checkbox[_ngcontent-%COMP%]{--border-radius: 50% !important;--border-color: var(--ion-color-medium) !important;--size: 1.5rem !important;--checkbox-background-checked: var(--ion-color-secondary) !important;--border-color-checked: var(--ion-color-secondary) !important;margin:0}[_nghost-%COMP%] ion-button.new-playlist__btn[_ngcontent-%COMP%]{--background: var(--ion-color-secondary);--color: var(--ion-color-primary-contrast);--border-radius: 1.875rem;--border-color: var(--ion-color-primary-contrast);--border-style: solid;--border-width: 1px;--box-shadow: none}ion-content[_ngcontent-%COMP%]{--padding-top: 2.5rem}ion-item[_ngcontent-%COMP%]{width:100%}ion-input[_ngcontent-%COMP%]{--placeholder-opacity: .5}.create-playlist[_ngcontent-%COMP%]{padding:1rem}.create-playlist-container[_ngcontent-%COMP%]{margin-top:1rem;height:calc(100vh - 195px);overflow-y:auto}.bot-section__text[_ngcontent-%COMP%]{position:absolute;left:46%;right:0;top:16%;transform:translate(-50%,-50%);text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),v})()}];let W=(()=>{var r;class v{}return(r=v).\u0275fac=function(n){return new(n||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[E.iI.forChild($),E.iI]}),v})(),X=(()=>{var r;class v{}return(r=v).\u0275fac=function(n){return new(n||r)},r.\u0275mod=t.$C({type:r}),r.\u0275inj=t.G2t({imports:[k.MD,e.YN,c.bv,W,Y.h]}),v})()}}]); \ No newline at end of file diff --git a/www/3119.65ac85d6c4833634.js b/www/3119.65ac85d6c4833634.js deleted file mode 100644 index 51dcdefa..00000000 --- a/www/3119.65ac85d6c4833634.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3119],{3119:(et,A,r)=>{r.r(A),r.d(A,{ViewAllPageModule:()=>tt});var w=r(177),S=r(9417),v=r(8974),D=r(3021),m=r(467),g=r(56),j=r(4715),x=r(4733),R=r(1471),T=r(2849),G=r(9441),B=r(8666),U=r(7420),$=r(5318),V=r.n($),Y=r(1129),E=r(8113),t=r(4438),F=r(444),I=r(2904),X=r(7803),N=r(4517),L=r(5402);const z=a=>({"createList-cards":a});function W(a,u){if(1&a&&(t.j41(0,"div",11),t.EFF(1),t.k0s()),2&a){const l=t.XpG().$implicit;t.R7$(),t.JRh(null==l||null==l.metaData?null:l.metaData.name)}}function J(a,u){if(1&a){const l=t.RV6();t.j41(0,"div",12),t.bIt("click",function(){t.eBV(l);const n=t.XpG().$implicit,o=t.XpG();return t.Njj(o.openModal(n))}),t.nrm(1,"ion-icon",13),t.k0s()}}function H(a,u){if(1&a){const l=t.RV6();t.j41(0,"div")(1,"ion-checkbox",14),t.bIt("ionChange",function(n){t.eBV(l);const o=t.XpG().index,c=t.XpG();return t.Njj(c.isContentSelect(n,o))}),t.k0s()()}if(2&a){const l=t.XpG().$implicit;t.R7$(),t.Y8G("checked",l.isSelected)}}function Q(a,u){if(1&a){const l=t.RV6();t.j41(0,"div",4),t.bIt("click",function(){const n=t.eBV(l).$implicit,o=t.XpG();return t.Njj(o.playcontent(n))}),t.j41(1,"div",5),t.nrm(2,"img",6),t.k0s(),t.j41(3,"div",7),t.DNE(4,W,2,1,"div",8)(5,J,2,0,"div",9)(6,H,2,1,"div",10),t.k0s()()}if(2&a){const l=u.$implicit,e=t.XpG();t.R7$(2),t.Y8G("src",null==l||null==l.metaData?null:l.metaData.thumbnail,t.B4B),t.R7$(2),t.Y8G("ngIf",null==l||null==l.metaData?null:l.metaData.name),t.R7$(),t.Y8G("ngIf","recentlyviewed"===e.type),t.R7$(),t.Y8G("ngIf","playlist"===e.type)}}function Z(a,u){if(1&a){const l=t.RV6();t.j41(0,"div",15)(1,"div",16)(2,"div",17)(3,"div",18),t.EFF(4),t.k0s(),t.nrm(5,"ion-icon",19),t.k0s(),t.j41(6,"div",20),t.bIt("click",function(){t.eBV(l);const n=t.XpG();return t.Njj(n.uploadLocalContents())}),t.nrm(7,"ion-icon",21),t.k0s(),t.j41(8,"div",22)(9,"ion-button",23),t.bIt("click",function(){t.eBV(l);const n=t.XpG();return t.Njj(n.createList())}),t.EFF(10),t.nI1(11,"translate"),t.k0s()()()()}if(2&a){const l=t.XpG();t.R7$(4),t.JRh(l.selectedContents.length),t.R7$(5),t.Y8G("disabled",!l.selectedContents.length),t.R7$(),t.SpI(" ",t.bMT(11,3,"createPlaylist")," ")}}const K=[{path:"",component:(()=>{var a;class u{constructor(e,n,o,c,s,h,p,d){var P;this.contentService=e,this.router=n,this.headerService=o,this.playListService=c,this.platform=s,this.location=h,this.modalCtrl=p,this.utilService=d,this.contentList=[],this.type="",this.playlists=[],this.selectedContents=[],this.optModalOpen=!1,this.resolveNativePath=y=>new Promise((M,_)=>{window.FilePath.resolveNativePath(y,M,b=>{console.error(`${y} could not be resolved by the plugin: ${b.message}`),_(b)})}),this.navigated=!1;let f=null===(P=this.router.getCurrentNavigation())||void 0===P?void 0:P.extras;var O;f&&(this.type=null===(O=f.state)||void 0===O?void 0:O.type)}ngOnInit(){var e=this;return(0,m.A)(function*(){e.platform.backButton.subscribeWithPriority(11,(0,m.A)(function*(){e.location.back(),e.headerService.deviceBackBtnEvent({name:"backBtn"})})),e.headerService.headerEventEmitted$.subscribe(n=>{"back"===n&&!e.navigated&&(e.navigated=!0,e.location.back())}),e.getRecentlyviewedContent()})()}getPlaylistContent(){var e=this;return(0,m.A)(function*(){yield e.playListService.getAllPlayLists("guest").then(n=>{n&&(e.playlists=n)}).catch(n=>{console.log("error",n)})})()}getRecentlyviewedContent(){var e=this;return(0,m.A)(function*(){yield e.contentService.getRecentlyViewedContent("guest").then(n=>{e.contentList=n,e.contentList.map(o=>o.metaData="string"==typeof o.metaData?JSON.parse(o.metaData):o.metaData),e.contentList=e.getContentImgPath(e.contentList)}).catch(n=>{console.log("error",n)})})()}createList(){let e=[];this.contentList.forEach(n=>{n.isSelected&&e.push(n)}),console.log("...................",e),this.router.navigate(["/create-playlist"],{state:{selectedContents:e}})}deletePlaylist(){var e=this;return(0,m.A)(function*(){yield e.playListService.deletePlayList(e.deleteContent.identifier).then(n=>{e.getPlaylistContent()}).catch(n=>{console.log("err",n)})})()}ionViewWillEnter(){this.navigated=!1,"recentlyviewed"===this.type?this.headerService.showHeader("Recently Viewed",!0):"playlist"===this.type&&this.headerService.showHeader("Select from Recently Viewed",!0),this.getPlaylistContent()}openModal(e){var n=this;return(0,m.A)(function*(){let o;n.optModalOpen||(n.optModalOpen=!0,o=yield n.modalCtrl.create({component:T.q,componentProps:{content:e},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield o.present()),o.onDidDismiss().then(function(){var c=(0,m.A)(function*(s){n.optModalOpen=!1,s.data&&"addToPitara"===s.data.type?n.addContentToMyPitara(s.data.content||e):s.data&&"like"==s.data.type&&(n.contentService.likeContent(s.data.content||e,"guest",!0),s.data.content.metaData.isLiked&&(yield B.Q.play({assetId:"windchime"}),(0,U.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})))});return function(s){return c.apply(this,arguments)}}())})()}addContentToMyPitara(e){var n=this;return(0,m.A)(function*(){const o=yield n.modalCtrl.create({component:G.$,componentProps:{content:e},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield o.present(),o.onWillDismiss().then(c=>{})})()}isContentSelect(e,n){this.contentList[n].isSelected=e.detail.checked,this.checkSelectedContent()}checkSelectedContent(){this.selectedContents=[],this.contentList.forEach(e=>{e.isSelected&&this.selectedContents.push(e)})}openFilePicker(){var e=this;return(0,m.A)(function*(){let n=[g.z5.PDF];n=n.concat(g.z5.VIDEOS).concat(g.z5.AUDIO);const{files:o}=yield j.N.pickFiles({types:n,multiple:!0,readData:!1});let c=[];const s=yield e.utilService.getLoader();yield s.present();for(let h=0;h{var c;o.metaData.thumbnail=o.metaData.mimetype===g.Cc.YOUTUBE?this.loadYoutubeImg(o.metaData):!o.metaData.thumbnail||null!=o&&null!==(c=o.metaData.identifier)&&void 0!==c&&c.startsWith("do_")?x.O.getImagePath(o.metaData.mimetype||o.metaData.mimeType):o.mediaData.thumbnail,n&&(o.isSelected=!0,this.selectedContents.push(o))}),e}loadYoutubeImg(e){let n=e.identifier;return n&&n.startsWith("do_")&&(n=V()(e.url)),`https://img.youtube.com/vi/${n}/mqdefault.jpg`}playcontent(e){var n=this;return(0,m.A)(function*(){"recentlyviewed"===n.type&&!n.optModalOpen&&(yield n.router.navigate(["/player"],{state:{content:e}}))})()}uploadLocalContents(){var e=this;return(0,m.A)(function*(){let n;e.optModalOpen||(e.optModalOpen=!0,n=yield e.modalCtrl.create({component:Y.W,componentProps:{uploadType:[{type:"url",label:"Upload from Youtube"},{type:"diksha",label:"Upload from Diksha"}]},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield n.present()),n.onDidDismiss().then(function(){var o=(0,m.A)(function*(c){e.optModalOpen=!1,"file"===c.data.type?e.openFilePicker():e.createYoutubeContent(c.data.type)});return function(c){return o.apply(this,arguments)}}())})()}createYoutubeContent(e){var n=this;return(0,m.A)(function*(){const o=yield n.modalCtrl.create({component:E.r,componentProps:{title:"url"==e?"Add Youtube URL":"Add Diksha URL",placeholder:"Name"},cssClass:"auto-height"});yield o.present(),o.onDidDismiss().then(function(){var c=(0,m.A)(function*(s){var h;let p=null===(h=s.data)||void 0===h?void 0:h.url;if(s&&"create"===s.data.type){let d=[];const P=yield n.utilService.getLoader();yield P.present();let f="";if("url"===e)f=V()(p),d.push({source:"local",sourceType:"local",metaData:{identifier:f,url:"https://www.youtube.com/watch?v="+f,name:s.data.name,mimetype:g.z5.YOUTUBE,thumbnail:""}}),d=n.getContentImgPath(d,!0),n.contentList=d.concat(n.contentList);else if("diksha"===e){f=p.split("/").filter(y=>y.startsWith("do_"));try{yield n.contentService.readDikshaContents(f[0]).then(function(){var y=(0,m.A)(function*(M){var _,b;console.log("res ",M);let i=null===(_=M.body)||void 0===_||null===(_=_.result)||void 0===_?void 0:_.content;if((null===(b=i.dialcodes)||void 0===b?void 0:b.length)>0)yield n.contentService.getContents(i.dialcodes[0]).then(C=>{console.log("content data ",C),C.length>0&&(C.forEach(k=>{k.source="local",(k.metaData.mimetype==g.z5.PDF||k.metaData.mimetype==g.z5.VIDEO)&&d.push(k)}),d=n.getContentImgPath(d,!0),n.contentList=d.concat(n.contentList))});else if(i.mediaType="content"){let C={source:"local",sourceType:"diksha",metaData:{identifier:null==i?void 0:i.identifier,name:null==i?void 0:i.name,thumbnail:null==i?void 0:i.posterImage,description:null==i?void 0:i.name,mimetype:(null==i?void 0:i.mimetype)||(null==i?void 0:i.mimeType),url:null==i?void 0:i.streamingUrl,focus:null==i?void 0:i.focus,keyword:null==i?void 0:i.keyword,domain:null==i?void 0:i.domain,curriculargoal:null==i?void 0:i.curriculargoal,competencies:null==i?void 0:i.competencies,language:null==i?void 0:i.language,category:null==i?void 0:i.category,audience:null==i?void 0:i.audience,status:null==i?void 0:i.status,createdon:null==i?void 0:i.createdOn,lastupdatedon:(null==i?void 0:i.lastupdatedon)||(null==i?void 0:i.lastUpdatedOn),artifactUrl:null==i?void 0:i.artifactUrl}};(C.metaData.mimetype==g.z5.PDF||C.metaData.mimetype==g.z5.VIDEO)&&(d.push(C),d=n.getContentImgPath(d,!0),n.contentList=d.concat(n.contentList))}});return function(M){return y.apply(this,arguments)}}())}catch(y){console.log("server err ",y)}}yield P.dismiss()}});return function(s){return c.apply(this,arguments)}}())})()}}return(a=u).\u0275fac=function(e){return new(e||a)(t.rXU(F.f),t.rXU(D.Ix),t.rXU(I.Ux),t.rXU(X.q),t.rXU(N.OD),t.rXU(w.aZ),t.rXU(v.W3),t.rXU(I.a0))},a.\u0275cmp=t.VBU({type:a,selectors:[["app-view-all"]],viewQuery:function(e,n){if(1&e&&t.GBs(v.Sb,5),2&e){let o;t.mGM(o=t.lsd())&&(n.modal=o.first)}},decls:4,vars:6,consts:[[3,"fullscreen"],[1,"cards-container",3,"ngClass"],["class","card",3,"click",4,"ngFor","ngForOf"],["class","view-all-btn",4,"ngIf"],[1,"card",3,"click"],[1,"card__img"],["alt","Playlist Image",3,"src"],[1,"card__metadata"],["class","card__title",4,"ngIf"],[3,"click",4,"ngIf"],[4,"ngIf"],[1,"card__title"],[3,"click"],["slot","end","aria-hidden","true","src","../../../assets/icon/kabab-icon.svg"],[1,"playlist-card__checkbox",3,"ionChange","checked"],[1,"view-all-btn"],[1,"view-playlist"],[1,"view-playlist__icon"],[1,"count"],["aria-hidden","true","src","assets/icon/pitara-blue.svg"],[1,"view-playlist__icon",3,"click"],["aria-hidden","true","src","assets/icon/file-upload.svg"],[1,"view-playlist__button"],["fill","outline",1,"new-playlist__btn",3,"click","disabled"]],template:function(e,n){1&e&&(t.j41(0,"ion-content",0)(1,"div",1),t.DNE(2,Q,7,4,"div",2),t.k0s()(),t.DNE(3,Z,12,5,"div",3)),2&e&&(t.Y8G("fullscreen",!0),t.R7$(),t.Y8G("ngClass",t.eq3(4,z,"playlist"===n.type)),t.R7$(),t.Y8G("ngForOf",n.contentList),t.R7$(),t.Y8G("ngIf","playlist"===n.type))},dependencies:[w.YU,w.Sq,w.bT,v.Jm,v.eY,v.W9,v.iq,v.hB,L.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}.cards-container[_ngcontent-%COMP%]{padding-top:.5rem}.card[_ngcontent-%COMP%]{display:flex}.card__img[_ngcontent-%COMP%]{width:100%;height:4.5rem;max-width:7.5rem}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:.5rem}.card__metadata[_ngcontent-%COMP%]{padding-top:0;padding-left:.5rem;align-items:flex-start;width:100%}.view-playlist[_ngcontent-%COMP%]{position:fixed;bottom:.188rem;width:98%;height:4rem;background-color:var(--ion-color-secondary);border-radius:3.125rem;display:flex;align-items:center;padding:.5rem}.view-playlist__icon[_ngcontent-%COMP%]{width:3rem;height:3rem;background-color:var(--ion-color-primary-contrast);border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;margin-right:5%}.view-playlist__icon[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{position:absolute;top:-.188rem;right:-.188rem;background:var(--ion-color-primary);border-radius:50%;font-size:.625rem;width:1.125rem;height:1.125rem;display:flex;align-items:center;justify-content:center;color:var(--ion-color-primary-contrast)}.view-playlist__icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.view-playlist__button[_ngcontent-%COMP%]{margin-left:auto}.view-playlist__button[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:.75rem;font-weight:700}.view-all-btn[_ngcontent-%COMP%]{display:flex;justify-content:center}[_nghost-%COMP%] ion-checkbox[_ngcontent-%COMP%]{--border-radius: 50% !important;--border-color: var(--ion-color-medium) !important;--size: 1.5rem !important;--checkbox-background-checked: var(--ion-color-secondary) !important;--border-color-checked: var(--ion-color-secondary) !important;margin:0}[_nghost-%COMP%] ion-button.new-playlist__btn[_ngcontent-%COMP%]{--background: var(--ion-color-secondary);--color: var(--ion-color-primary-contrast);--border-radius: 1.875rem;--border-color: var(--ion-color-primary-contrast);--border-style: solid;--border-width: 1px;--box-shadow: none}ion-content[_ngcontent-%COMP%]{--padding-top: 3.2rem}.createList-cards[_ngcontent-%COMP%]{height:calc(100vh - 120px);overflow:auto}"]}),u})()}];let q=(()=>{var a;class u{}return(a=u).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.$C({type:a}),a.\u0275inj=t.G2t({imports:[D.iI.forChild(K),D.iI]}),u})(),tt=(()=>{var a;class u{}return(a=u).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.$C({type:a}),a.\u0275inj=t.G2t({imports:[w.MD,S.YN,v.bv,q,L.h]}),u})()}}]); \ No newline at end of file diff --git a/www/3119.9c57b2b2f9ee15bd.js b/www/3119.9c57b2b2f9ee15bd.js new file mode 100644 index 00000000..f622f8bb --- /dev/null +++ b/www/3119.9c57b2b2f9ee15bd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3119],{3119:(et,A,c)=>{c.r(A),c.d(A,{ViewAllPageModule:()=>tt});var w=c(177),S=c(9417),v=c(8974),D=c(3021),u=c(467),g=c(56),j=c(4715),x=c(4733),R=c(1471),T=c(2849),G=c(9441),B=c(8666),U=c(7420),$=c(5318),V=c.n($),Y=c(1129),E=c(8113),t=c(4438),F=c(444),I=c(2904),X=c(7803),N=c(4517),L=c(5402);const z=a=>({"createList-cards":a});function W(a,m){if(1&a&&(t.j41(0,"div",11),t.EFF(1),t.k0s()),2&a){const l=t.XpG().$implicit;t.R7$(),t.JRh(null==l||null==l.metaData?null:l.metaData.name)}}function J(a,m){if(1&a){const l=t.RV6();t.j41(0,"div",12),t.bIt("click",function(){t.eBV(l);const n=t.XpG().$implicit,o=t.XpG();return t.Njj(o.openModal(n))}),t.nrm(1,"ion-icon",13),t.k0s()}}function H(a,m){if(1&a){const l=t.RV6();t.j41(0,"div")(1,"ion-checkbox",14),t.bIt("ionChange",function(n){t.eBV(l);const o=t.XpG().index,r=t.XpG();return t.Njj(r.isContentSelect(n,o))}),t.k0s()()}if(2&a){const l=t.XpG().$implicit;t.R7$(),t.Y8G("checked",l.isSelected)}}function Q(a,m){if(1&a){const l=t.RV6();t.j41(0,"div",4),t.bIt("click",function(){const n=t.eBV(l).$implicit,o=t.XpG();return t.Njj(o.playcontent(n))}),t.j41(1,"div",5),t.nrm(2,"img",6),t.k0s(),t.j41(3,"div",7),t.DNE(4,W,2,1,"div",8)(5,J,2,0,"div",9)(6,H,2,1,"div",10),t.k0s()()}if(2&a){const l=m.$implicit,e=t.XpG();t.R7$(2),t.Y8G("src",null==l||null==l.metaData?null:l.metaData.thumbnail,t.B4B),t.R7$(2),t.Y8G("ngIf",null==l||null==l.metaData?null:l.metaData.name),t.R7$(),t.Y8G("ngIf","recentlyviewed"===e.type),t.R7$(),t.Y8G("ngIf","playlist"===e.type)}}function Z(a,m){if(1&a){const l=t.RV6();t.j41(0,"div",15)(1,"div",16)(2,"div",17)(3,"div",18),t.EFF(4),t.k0s(),t.nrm(5,"ion-icon",19),t.k0s(),t.j41(6,"div",20),t.bIt("click",function(){t.eBV(l);const n=t.XpG();return t.Njj(n.uploadLocalContents())}),t.nrm(7,"ion-icon",21),t.k0s(),t.j41(8,"div",22)(9,"ion-button",23),t.bIt("click",function(){t.eBV(l);const n=t.XpG();return t.Njj(n.createList())}),t.EFF(10),t.nI1(11,"translate"),t.k0s()()()()}if(2&a){const l=t.XpG();t.R7$(4),t.JRh(l.selectedContents.length),t.R7$(5),t.Y8G("disabled",!l.selectedContents.length),t.R7$(),t.SpI(" ",t.bMT(11,3,"createPlaylist")," ")}}const K=[{path:"",component:(()=>{var a;class m{constructor(e,n,o,r,s,h,p,d){var P;this.contentService=e,this.router=n,this.headerService=o,this.playListService=r,this.platform=s,this.location=h,this.modalCtrl=p,this.utilService=d,this.contentList=[],this.type="",this.playlists=[],this.selectedContents=[],this.optModalOpen=!1,this.resolveNativePath=y=>new Promise((M,_)=>{window.FilePath.resolveNativePath(y,M,b=>{console.error(`${y} could not be resolved by the plugin: ${b.message}`),_(b)})}),this.navigated=!1;let f=null===(P=this.router.getCurrentNavigation())||void 0===P?void 0:P.extras;var O;f&&(this.type=null===(O=f.state)||void 0===O?void 0:O.type)}ngOnInit(){var e=this;return(0,u.A)(function*(){e.platform.backButton.subscribeWithPriority(11,(0,u.A)(function*(){e.location.back(),e.headerService.deviceBackBtnEvent({name:"backBtn"})})),e.headerService.headerEventEmitted$.subscribe(n=>{"back"===n&&!e.navigated&&(e.navigated=!0,e.location.back())}),e.getRecentlyviewedContent()})()}getPlaylistContent(){var e=this;return(0,u.A)(function*(){yield e.playListService.getAllPlayLists("guest").then(n=>{n&&(e.playlists=n)}).catch(n=>{console.log("error",n)})})()}getRecentlyviewedContent(){var e=this;return(0,u.A)(function*(){yield e.contentService.getRecentlyViewedContent("guest").then(n=>{let o={};n.filter(r=>!o[r.contentIdentifier]&&(o[r.contentIdentifier]=!0,e.contentList.push(r),!0)),e.contentList.map(r=>r.metaData="string"==typeof r.metaData?JSON.parse(r.metaData):r.metaData),e.contentList=e.getContentImgPath(e.contentList)}).catch(n=>{console.log("error",n)})})()}createList(){let e=[];this.contentList.forEach(n=>{n.isSelected&&e.push(n)}),console.log("...................",e),this.router.navigate(["/create-playlist"],{state:{selectedContents:e}})}deletePlaylist(){var e=this;return(0,u.A)(function*(){yield e.playListService.deletePlayList(e.deleteContent.identifier).then(n=>{e.getPlaylistContent()}).catch(n=>{console.log("err",n)})})()}ionViewWillEnter(){this.navigated=!1,"recentlyviewed"===this.type?this.headerService.showHeader("Recently Viewed",!0):"playlist"===this.type&&this.headerService.showHeader("Select from Recently Viewed",!0),this.getPlaylistContent()}openModal(e){var n=this;return(0,u.A)(function*(){let o;n.optModalOpen||(n.optModalOpen=!0,o=yield n.modalCtrl.create({component:T.q,componentProps:{content:e},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield o.present()),o.onDidDismiss().then(function(){var r=(0,u.A)(function*(s){n.optModalOpen=!1,s.data&&"addToPitara"===s.data.type?n.addContentToMyPitara(s.data.content||e):s.data&&"like"==s.data.type&&(n.contentService.likeContent(s.data.content||e,"guest",!0),s.data.content.metaData.isLiked&&(yield B.Q.play({assetId:"windchime"}),(0,U.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})))});return function(s){return r.apply(this,arguments)}}())})()}addContentToMyPitara(e){var n=this;return(0,u.A)(function*(){const o=yield n.modalCtrl.create({component:G.$,componentProps:{content:e},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield o.present(),o.onWillDismiss().then(r=>{})})()}isContentSelect(e,n){this.contentList[n].isSelected=e.detail.checked,this.checkSelectedContent()}checkSelectedContent(){this.selectedContents=[],this.contentList.forEach(e=>{e.isSelected&&this.selectedContents.push(e)})}openFilePicker(){var e=this;return(0,u.A)(function*(){let n=[g.z5.PDF];n=n.concat(g.z5.VIDEOS).concat(g.z5.AUDIO);const{files:o}=yield j.N.pickFiles({types:n,multiple:!0,readData:!1});let r=[];const s=yield e.utilService.getLoader();yield s.present();for(let h=0;h{var r;o.metaData.thumbnail=o.metaData.mimetype===g.Cc.YOUTUBE?o.metaData.thumbnail:!o.metaData.thumbnail||null!=o&&null!==(r=o.metaData.identifier)&&void 0!==r&&r.startsWith("do_")?x.O.getImagePath(o.metaData.mimetype||o.metaData.mimeType):o.mediaData.thumbnail,n&&(o.isSelected=!0,this.selectedContents.push(o))}),e}loadYoutubeImg(e){let n=e.identifier;return n&&n.startsWith("do_")&&(n=V()(e.url)),`https://img.youtube.com/vi/${n}/mqdefault.jpg`}playcontent(e){var n=this;return(0,u.A)(function*(){"recentlyviewed"===n.type&&!n.optModalOpen&&(yield n.router.navigate(["/player"],{state:{content:e}}))})()}uploadLocalContents(){var e=this;return(0,u.A)(function*(){let n;e.optModalOpen||(e.optModalOpen=!0,n=yield e.modalCtrl.create({component:Y.W,componentProps:{uploadType:[{type:"url",label:"Upload from Youtube"},{type:"diksha",label:"Upload from Diksha"}]},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield n.present()),n.onDidDismiss().then(function(){var o=(0,u.A)(function*(r){e.optModalOpen=!1,"file"===r.data.type?e.openFilePicker():e.createYoutubeContent(r.data.type)});return function(r){return o.apply(this,arguments)}}())})()}createYoutubeContent(e){var n=this;return(0,u.A)(function*(){const o=yield n.modalCtrl.create({component:E.r,componentProps:{title:"url"==e?"Add Youtube URL":"Add Diksha URL",placeholder:"Name"},cssClass:"auto-height"});yield o.present(),o.onDidDismiss().then(function(){var r=(0,u.A)(function*(s){var h;let p=null===(h=s.data)||void 0===h?void 0:h.url;if(s&&"create"===s.data.type){let d=[];const P=yield n.utilService.getLoader();yield P.present();let f="";if("url"===e)f=V()(p),d.push({source:"local",sourceType:"local",metaData:{identifier:f,url:"https://www.youtube.com/watch?v="+f,name:s.data.name,mimetype:g.z5.YOUTUBE,thumbnail:""}}),d=n.getContentImgPath(d,!0),n.contentList=d.concat(n.contentList);else if("diksha"===e){f=p.split("/").filter(y=>y.startsWith("do_"));try{yield n.contentService.readDikshaContents(f[0]).then(function(){var y=(0,u.A)(function*(M){var _,b;console.log("res ",M);let i=null===(_=M.body)||void 0===_||null===(_=_.result)||void 0===_?void 0:_.content;if((null===(b=i.dialcodes)||void 0===b?void 0:b.length)>0)yield n.contentService.getContents(i.dialcodes[0]).then(C=>{console.log("content data ",C),C.length>0&&(C.forEach(k=>{k.source="local",(k.metaData.mimetype==g.z5.PDF||k.metaData.mimetype==g.z5.VIDEO)&&d.push(k)}),d=n.getContentImgPath(d,!0),n.contentList=d.concat(n.contentList))});else if(i.mediaType="content"){let C={source:"local",sourceType:"diksha",metaData:{identifier:null==i?void 0:i.identifier,name:null==i?void 0:i.name,thumbnail:null==i?void 0:i.thumbnail,description:null==i?void 0:i.name,mimetype:(null==i?void 0:i.mimetype)||(null==i?void 0:i.mimeType),url:null==i?void 0:i.streamingUrl,focus:null==i?void 0:i.focus,keyword:null==i?void 0:i.keyword,domain:null==i?void 0:i.domain,curriculargoal:null==i?void 0:i.curriculargoal,competencies:null==i?void 0:i.competencies,language:null==i?void 0:i.language,category:null==i?void 0:i.category,audience:null==i?void 0:i.audience,status:null==i?void 0:i.status,createdon:null==i?void 0:i.createdOn,lastupdatedon:(null==i?void 0:i.lastupdatedon)||(null==i?void 0:i.lastUpdatedOn),artifactUrl:null==i?void 0:i.artifactUrl}};(C.metaData.mimetype==g.z5.PDF||C.metaData.mimetype==g.z5.VIDEO)&&(d.push(C),d=n.getContentImgPath(d,!0),n.contentList=d.concat(n.contentList))}});return function(M){return y.apply(this,arguments)}}())}catch(y){console.log("server err ",y)}}yield P.dismiss()}});return function(s){return r.apply(this,arguments)}}())})()}}return(a=m).\u0275fac=function(e){return new(e||a)(t.rXU(F.f),t.rXU(D.Ix),t.rXU(I.Ux),t.rXU(X.q),t.rXU(N.OD),t.rXU(w.aZ),t.rXU(v.W3),t.rXU(I.a0))},a.\u0275cmp=t.VBU({type:a,selectors:[["app-view-all"]],viewQuery:function(e,n){if(1&e&&t.GBs(v.Sb,5),2&e){let o;t.mGM(o=t.lsd())&&(n.modal=o.first)}},decls:4,vars:6,consts:[[3,"fullscreen"],[1,"cards-container",3,"ngClass"],["class","card",3,"click",4,"ngFor","ngForOf"],["class","view-all-btn",4,"ngIf"],[1,"card",3,"click"],[1,"card__img"],["alt","Playlist Image",3,"src"],[1,"card__metadata"],["class","card__title",4,"ngIf"],[3,"click",4,"ngIf"],[4,"ngIf"],[1,"card__title"],[3,"click"],["slot","end","aria-hidden","true","src","../../../assets/icon/kabab-icon.svg"],[1,"playlist-card__checkbox",3,"ionChange","checked"],[1,"view-all-btn"],[1,"view-playlist"],[1,"view-playlist__icon"],[1,"count"],["aria-hidden","true","src","assets/icon/pitara-blue.svg"],[1,"view-playlist__icon",3,"click"],["aria-hidden","true","src","assets/icon/file-upload.svg"],[1,"view-playlist__button"],["fill","outline",1,"new-playlist__btn",3,"click","disabled"]],template:function(e,n){1&e&&(t.j41(0,"ion-content",0)(1,"div",1),t.DNE(2,Q,7,4,"div",2),t.k0s()(),t.DNE(3,Z,12,5,"div",3)),2&e&&(t.Y8G("fullscreen",!0),t.R7$(),t.Y8G("ngClass",t.eq3(4,z,"playlist"===n.type)),t.R7$(),t.Y8G("ngForOf",n.contentList),t.R7$(),t.Y8G("ngIf","playlist"===n.type))},dependencies:[w.YU,w.Sq,w.bT,v.Jm,v.eY,v.W9,v.iq,v.hB,L.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}.cards-container[_ngcontent-%COMP%]{padding-top:.5rem}.card[_ngcontent-%COMP%]{display:flex}.card__img[_ngcontent-%COMP%]{width:100%;height:4.5rem;max-width:7.5rem}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-radius:.5rem}.card__metadata[_ngcontent-%COMP%]{padding-top:0;padding-left:.5rem;align-items:flex-start;width:100%}.view-playlist[_ngcontent-%COMP%]{position:fixed;bottom:.188rem;width:98%;height:4rem;background-color:var(--ion-color-secondary);border-radius:3.125rem;display:flex;align-items:center;padding:.5rem}.view-playlist__icon[_ngcontent-%COMP%]{width:3rem;height:3rem;background-color:var(--ion-color-primary-contrast);border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;margin-right:5%}.view-playlist__icon[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{position:absolute;top:-.188rem;right:-.188rem;background:var(--ion-color-primary);border-radius:50%;font-size:.625rem;width:1.125rem;height:1.125rem;display:flex;align-items:center;justify-content:center;color:var(--ion-color-primary-contrast)}.view-playlist__icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.view-playlist__button[_ngcontent-%COMP%]{margin-left:auto}.view-playlist__button[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{font-size:.75rem;font-weight:700}.view-all-btn[_ngcontent-%COMP%]{display:flex;justify-content:center}[_nghost-%COMP%] ion-checkbox[_ngcontent-%COMP%]{--border-radius: 50% !important;--border-color: var(--ion-color-medium) !important;--size: 1.5rem !important;--checkbox-background-checked: var(--ion-color-secondary) !important;--border-color-checked: var(--ion-color-secondary) !important;margin:0}[_nghost-%COMP%] ion-button.new-playlist__btn[_ngcontent-%COMP%]{--background: var(--ion-color-secondary);--color: var(--ion-color-primary-contrast);--border-radius: 1.875rem;--border-color: var(--ion-color-primary-contrast);--border-style: solid;--border-width: 1px;--box-shadow: none}ion-content[_ngcontent-%COMP%]{--padding-top: 3.2rem}.createList-cards[_ngcontent-%COMP%]{height:calc(100vh - 120px);overflow:auto}"]}),m})()}];let q=(()=>{var a;class m{}return(a=m).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.$C({type:a}),a.\u0275inj=t.G2t({imports:[D.iI.forChild(K),D.iI]}),m})(),tt=(()=>{var a;class m{}return(a=m).\u0275fac=function(e){return new(e||a)},a.\u0275mod=t.$C({type:a}),a.\u0275inj=t.G2t({imports:[w.MD,S.YN,v.bv,q,L.h]}),m})()}}]); \ No newline at end of file diff --git a/www/4294.2771f6bcd50e749a.js b/www/4294.2771f6bcd50e749a.js new file mode 100644 index 00000000..6175f16a --- /dev/null +++ b/www/4294.2771f6bcd50e749a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4294],{4294:(E,h,s)=>{s.r(h),s.d(h,{PlaylistDetailsPageModule:()=>w});var d=s(177),f=s(9417),c=s(8974),g=s(3021),m=s(467),P=s(56),D=s(5301),t=s(4438),b=s(2904),C=s(7803),_=s(5402);function O(n,l){1&n&&(t.j41(0,"div",3)(1,"div",4),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&n&&(t.R7$(2),t.JRh(t.bMT(3,1,"Add content to the playlist")))}function M(n,l){if(1&n&&t.nrm(0,"img",10),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Audio.png",t.B4B)}}function G(n,l){if(1&n&&t.nrm(0,"img",10),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/youtube-video.png",t.B4B)}}function x(n,l){if(1&n&&t.nrm(0,"img",10),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Video.png",t.B4B)}}function j(n,l){if(1&n&&t.nrm(0,"img",10),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/PDF.png",t.B4B)}}function $(n,l){if(1&n&&t.nrm(0,"img",10),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/LINK.png",t.B4B)}}function I(n,l){if(1&n&&t.nrm(0,"img",10),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/LINK.png",t.B4B)}}function T(n,l){1&n&&t.nrm(0,"ion-icon",15)}function B(n,l){if(1&n){const e=t.RV6();t.j41(0,"div",7)(1,"div",8),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,o=t.XpG();return t.Njj(o.playContent(i))}),t.DNE(2,M,1,1,"img",9)(3,G,1,1,"img",9)(4,x,1,1,"img",9)(5,j,1,1,"img",9)(6,$,1,1,"img",9)(7,I,1,1,"img",9),t.nrm(8,"img",10),t.k0s(),t.j41(9,"div",11)(10,"div",12),t.EFF(11),t.k0s(),t.j41(12,"ion-buttons"),t.DNE(13,T,1,0,"ion-icon",13),t.j41(14,"ion-icon",14),t.bIt("click",function(){t.eBV(e);const i=t.XpG().$implicit,o=t.XpG();return t.Njj(o.moreOtions(i))}),t.k0s()()()()}if(2&n){const e=t.XpG().$implicit,a=t.XpG();t.R7$(2),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.AUDIO),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.YOUTUBE),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.MP4),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.PDF),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.LINK),t.R7$(),t.Y8G("ngIf","text/html"===(null==e||null==e.metaData?null:e.metaData.mimetype)),t.R7$(),t.Y8G("src",""!=(null==e||null==e.metaData?null:e.metaData.thumbnail)||e.metaData.identifier.startsWith("do_")?"":"https://ejaaduipitara.ncert.gov.in/assets/img/cards.jpg",t.B4B),t.R7$(3),t.JRh(null==e.metaData?null:e.metaData.name),t.R7$(2),t.Y8G("ngIf","local"===e.source)}}function R(n,l){if(1&n&&(t.j41(0,"div",5),t.DNE(1,B,15,9,"div",6),t.k0s()),2&n){const e=l.$implicit;t.R7$(),t.Y8G("ngIf",null==e?null:e.metaData)}}const Y=[{path:"",component:(()=>{var n;class l{constructor(a,i,o,r){var u;this.router=a,this.headerService=i,this.modalCtrl=o,this.playlistService=r,this.playlists=[],this.mimeType=P.Cc,this.navigated=!1,this.headerEventSub=null;let y=null===(u=this.router.getCurrentNavigation())||void 0===u?void 0:u.extras;var p;y&&(this.playContentObject=null===(p=y.state)||void 0===p?void 0:p.playlist,this.playContentObject.playListcontentList.map(v=>{v.metaData=JSON.parse(v.content_metadata)}),this.playlists=this.playContentObject.playListcontentList,console.log("playlists",this.playlists))}ngOnInit(){this.headerService.showHeader(this.playContentObject.name,!0,["edit"]),this.headerService.headerEventEmitted$.subscribe(a=>{"edit"===a?this.router.navigate(["/create-playlist"],{state:{playlists:this.playContentObject,islocal:!0}}):"back"===a&&!this.navigated&&(this.navigated=!0,this.router.navigate(["/tabs/my-pitara"]))})}ionViewWillEnter(){this.navigated=!1,this.headerService.showHeader(this.playContentObject.name,!0,["edit"])}ngOnDestroy(){try{this.headerEventSub&&this.headerEventSub.unsubscribe()}catch(a){console.log("error in unsubscribe",a)}}playContent(a){var i=this;return(0,m.A)(function*(){yield i.router.navigate(["/player"],{state:{content:a}})})()}deletePlaylist(a){var i=this;return(0,m.A)(function*(){yield i.playlistService.deleteContentFromPlayList(i.playContentObject.identifier,[a.identifier]).then(o=>{i.getPlaylistContent()}).catch(o=>{console.log("err",o)})})()}getPlaylistContent(){var a=this;return(0,m.A)(function*(){yield a.playlistService.getPlayListContents(a.playContentObject.identifier).then(i=>{a.playlists=i,a.playlists.map(o=>{o.metaData=JSON.parse(o.content_metadata)}),a.playContentObject.playListcontentList=a.playlists})})()}moreOtions(a){var i=this;return(0,m.A)(function*(){const o=yield i.modalCtrl.create({component:D.J,cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield o.present(),o.onWillDismiss().then(r=>{r&&"delete"===r.data.type?i.deletePlaylist(a):r&&"edit"===r.data.type&&i.router.navigate(["/create-playlist"],{state:{playlists:i.playContentObject,islocal:!0}})})})()}}return(n=l).\u0275fac=function(a){return new(a||n)(t.rXU(g.Ix),t.rXU(b.Ux),t.rXU(c.W3),t.rXU(C.q))},n.\u0275cmp=t.VBU({type:n,selectors:[["app-playlist-details"]],decls:3,vars:3,consts:[[3,"fullscreen"],["class","bot-section",4,"ngIf"],["class","cards-container",4,"ngFor","ngForOf"],[1,"bot-section"],[1,"bot-section__text"],[1,"cards-container"],["class","card",4,"ngIf"],[1,"card"],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],["alt","",3,"src"],[1,"card__metadata"],[1,"card__title"],["aria-hidden","true","class","icon-right","src","assets/icon/sd-card.svg",4,"ngIf"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",1,"icon-left",3,"click"],["aria-hidden","true","src","assets/icon/sd-card.svg",1,"icon-right"]],template:function(a,i){1&a&&(t.j41(0,"ion-content",0),t.DNE(1,O,4,3,"div",1)(2,R,2,1,"div",2),t.k0s()),2&a&&(t.Y8G("fullscreen",!0),t.R7$(),t.Y8G("ngIf",!i.playlists.length),t.R7$(),t.Y8G("ngForOf",i.playlists))},dependencies:[d.Sq,d.bT,c.QW,c.W9,c.iq,_.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-content[_ngcontent-%COMP%]{--padding-top: 3.5rem }.landscape-icon[_ngcontent-%COMP%]{position:absolute;width:100%;background:transparent;bottom:3.5rem;z-index:9999;background:var(--ion-color-secondary-contrast);opacity:.5}.landscape-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{float:right;font-size:1.5rem;margin-right:.5rem}.icon-right[_ngcontent-%COMP%]{margin-right:10px}.icon-left[_ngcontent-%COMP%]{margin-left:10px}.bot-section__text[_ngcontent-%COMP%]{position:absolute;left:46%;right:0;top:16%;transform:translate(-50%,-50%);text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),l})()}];let X=(()=>{var n;class l{}return(n=l).\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.$C({type:n}),n.\u0275inj=t.G2t({imports:[g.iI.forChild(Y),g.iI]}),l})();var k=s(3721);let w=(()=>{var n;class l{}return(n=l).\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.$C({type:n}),n.\u0275inj=t.G2t({imports:[d.MD,f.YN,c.bv,X,_.h,k.h]}),l})()}}]); \ No newline at end of file diff --git a/www/4392.48dad9e361f66ee5.js b/www/4392.48dad9e361f66ee5.js deleted file mode 100644 index b0a12084..00000000 --- a/www/4392.48dad9e361f66ee5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4392],{4392:(we,C,s)=>{s.r(C),s.d(C,{HomePageModule:()=>ue});var g=s(8974),u=s(177),I=s(9417),p=s(3021),d=s(467),M=s(56),w=s(2849),k=s(9441),T=s(3649),O=s(7420),S=s(8666),G=s(8941),R=s(446),e=s(4438),f=s(2904),A=s(444),$=s(3696),H=s(7594),y=s(6598),x=s(1413);let j=(()=>{var i;class c{constructor(){var t=this;this.connected=!1,this.networkInfo=new x.B,this.networkConnection$=this.networkInfo.asObservable(),y.l.addListener("networkStatusChange",function(){var a=(0,d.A)(function*(o){t.connected=o.connected,t.networkInfo.next(t.connected)});return function(o){return a.apply(this,arguments)}}())}getNetworkStatus(){var t=this;return(0,d.A)(function*(){return t.connected=yield(yield y.l.getStatus()).connected,t.connected})()}}return(i=c).\u0275fac=function(t){return new(t||i)},i.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),c})();var B=s(345),U=s(5173),v=s(5402),E=s(4447),X=s(3207),L=s(6354),F=s(9437),P=s(3172),b=s(985),D=s(6421),N=s(2700);let Y=(()=>{var i;class c{constructor(t){this.apiService=t,this.transaction_id=(0,D.A)(),this.message_id=(0,D.A)()}onConfirmContent(t){var a=this;return(0,d.A)(function*(){let o={};t&&(o={context:{domain:"onest:learning-experiences",action:"confirm",version:"1.1.0",bap_id:"13.201.4.186:6002",bap_uri:"http://13.201.4.186:6002/",bpp_id:t.bpp_id,bpp_uri:t.bpp_uri,transaction_id:a.transaction_id,message_id:a.message_id,timestamp:(new Date).toISOString()},message:{order:{items:[{id:t.id}],fulfillments:[{customer:{person:{name:"",age:""},contact:{phone:"",email:""}}}]}}});let l=JSON.stringify(o);const r=(new b._g.Builder).withHost(P.$.api.BASE_URL).withPath(P.$.api.CONFIRM_API).withType(b.kr.POST).withBody(l).withBearerToken(!0).withLanguge(t.currentLang).build();return(0,X.s)(a.apiService.fetch(r).pipe((0,L.T)(m=>m.body),(0,F.W)(m=>{throw m})))})()}}return(i=c).\u0275fac=function(t){return new(t||i)(e.KVO(N.G))},i.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"}),c})();var V=s(2297);const W=["refresher"],K=()=>[0,1,2,3,4,5,6,7,8];function J(i,c){1&i&&(e.j41(0,"div",8),e.nrm(1,"ion-spinner",9),e.k0s())}function z(i,c){1&i&&(e.j41(0,"div",12)(1,"div",13)(2,"div",14),e.nrm(3,"app-skeleton-item",15),e.k0s(),e.j41(4,"div",16)(5,"div",17),e.nrm(6,"app-skeleton-item",18),e.k0s(),e.j41(7,"div",19),e.nrm(8,"app-skeleton-item",18),e.k0s()()()())}function Q(i,c){1&i&&(e.j41(0,"ion-list",10),e.DNE(1,z,9,0,"div",11),e.k0s()),2&i&&(e.R7$(),e.Y8G("ngForOf",e.lJ4(1,K)))}function Z(i,c){1&i&&(e.j41(0,"ion-list")(1,"ion-item",20)(2,"ion-label",21),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&i&&(e.R7$(3),e.JRh(e.bMT(4,1,"No Result")))}function q(i,c){1&i&&(e.j41(0,"ion-list")(1,"ion-item",20)(2,"ion-label",21),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&i&&(e.R7$(3),e.JRh(e.bMT(4,1,"An unknown error occured, please try after sometime")))}function ee(i,c){if(1&i){const n=e.RV6();e.j41(0,"div",24)(1,"div",25),e.bIt("click",function(){e.eBV(n);const a=e.XpG(3);return e.Njj(a.navigateToSakhi("story"))}),e.nrm(2,"img",26),e.j41(3,"div",27),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",25),e.bIt("click",function(){e.eBV(n);const a=e.XpG(3);return e.Njj(a.navigateToSakhi("teacher"))}),e.nrm(7,"img",28),e.j41(8,"div",27),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()}2&i&&(e.R7$(4),e.JRh(e.bMT(5,2,"Katha Sakhi")),e.R7$(5),e.JRh(e.bMT(10,4,"Teacher Tara")))}function te(i,c){if(1&i&&e.nrm(0,"img",31),2&i){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/Audio.png",e.B4B)}}function ne(i,c){if(1&i&&e.nrm(0,"img",31),2&i){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/youtube-video.png",e.B4B)}}function ie(i,c){if(1&i&&e.nrm(0,"img",31),2&i){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/Video.png",e.B4B)}}function ae(i,c){if(1&i&&e.nrm(0,"img",31),2&i){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/PDF.png",e.B4B)}}function oe(i,c){if(1&i&&e.nrm(0,"img",31),2&i){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/LINK.png",e.B4B)}}function re(i,c){if(1&i&&e.nrm(0,"img",31),2&i){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/LINK.png",e.B4B)}}function se(i,c){if(1&i){const n=e.RV6();e.j41(0,"div",13)(1,"div",29),e.bIt("click",function(a){e.eBV(n);const o=e.XpG().$implicit,l=e.XpG(2);return e.Njj(l.playContent(a,o))}),e.DNE(2,te,1,1,"img",30)(3,ne,1,1,"img",30)(4,ie,1,1,"img",30)(5,ae,1,1,"img",30)(6,oe,1,1,"img",30)(7,re,1,1,"img",30),e.nrm(8,"img",31),e.k0s(),e.j41(9,"div",16)(10,"div",32),e.EFF(11),e.k0s(),e.j41(12,"ion-icon",33),e.bIt("click",function(){e.eBV(n);const a=e.XpG().$implicit,o=e.XpG(2);return e.Njj(o.moreOtions(a))}),e.k0s()()()}if(2&i){const n=e.XpG().$implicit,t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.AUDIO),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.YOUTUBE),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.MP4),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.PDF),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.LINK),e.R7$(),e.Y8G("ngIf","text/html"===(null==n||null==n.metaData?null:n.metaData.mimetype)),e.R7$(),e.Y8G("src",""!=(null==n||null==n.metaData?null:n.metaData.thumbnail)||n.metaData.identifier.startsWith("do_")?"":"https://ejaaduipitara.ncert.gov.in/assets/img/cards.jpg",e.B4B),e.R7$(3),e.JRh(null==n.metaData?null:n.metaData.name)}}function le(i,c){if(1&i&&(e.j41(0,"div",12),e.DNE(1,ee,11,6,"div",22)(2,se,13,8,"div",23),e.k0s()),2&i){const n=c.$implicit,t=c.index;e.R7$(),e.Y8G("ngIf",5===t),e.R7$(),e.Y8G("ngIf",n.metaData&&n.metaData.name)}}function ce(i,c){if(1&i&&(e.j41(0,"ion-list"),e.DNE(1,le,3,2,"div",11),e.k0s()),2&i){const n=e.XpG();e.R7$(),e.Y8G("ngForOf",n.configContents)}}function me(i,c){if(1&i){const n=e.RV6();e.j41(0,"ion-infinite-scroll",34),e.bIt("ionInfinite",function(a){e.eBV(n);const o=e.XpG();return e.Njj(o.onIonInfinite(a))}),e.nrm(1,"ion-infinite-scroll-content"),e.k0s()}}const de=[{path:"",component:(()=>{var i;class c{constructor(t,a,o,l,r,m,h,pe,ve,_e,Ce,Se,ye,Pe,be,De,Ie,Me){this.headerService=t,this.router=a,this.contentService=o,this.configService=l,this.sunbirdProcess=r,this.modalCtrl=m,this.networkService=h,this.cacheService=pe,this.domSanitiser=ve,this.storage=_e,this.telemetryGeneratorService=Ce,this.searchService=Se,this.translateService=ye,this.toastController=Pe,this.botMessageApiService=be,this.lcoalNotifService=De,this.appUpdateService=Ie,this.confirmService=Me,this.refresh=!1,this.showSheenAnimation=!0,this.contentList=[],this.isOpen=!1,this.configContents=[],this.optModalOpen=!1,this.networkConnected=!1,this.mimeType=M.Cc,this.noSearchData=!1,this.langChangeSubscription=null,this.serverError=!1,this.onlineState=!1,this.offlineState=!1,this.networkChangeSub=null,this.selectedLang="",this.appName="",this.configVariables=R.g,G.q.getInfo().then(_=>{this.appName=_.name}),this.configContents=[],this.contentList=[],this.networkChangeSub=this.networkService.networkConnection$.subscribe(_=>{this.networkConnected=_})}ngOnDestroy(){try{this.langChangeSubscription&&this.langChangeSubscription.unsubscribe(),this.networkChangeSub&&this.networkChangeSub.unsubscribe()}catch(t){console.log("error in unsubscribe",t)}}ngOnInit(){var t=this;return(0,d.A)(function*(){t.headerService.headerEventEmitted$.subscribe(function(){var l=(0,d.A)(function*(r){if("language"==r){let m=yield t.storage.getData("lang");console.log("lang ",m,t.selectedLang),t.selectedLang!==m&&(t.selectedLang=m,t.showSheenAnimation=!0,t.getServerMetaConfig())}});return function(r){return l.apply(this,arguments)}}());let a={};if(t.headerService.filterConfigEmitted$.subscribe(function(){var l=(0,d.A)(function*(r){t.configContents=[],t.contentList=[],t.serverError=!1,t.showSheenAnimation=!0;let h=yield t.configService.getAllContent(a,"en");t.mappUIContentList(h)});return function(r){return l.apply(this,arguments)}}()),t.headerService.sideMenuItemEventEmitted$.subscribe(function(){var l=(0,d.A)(function*(r){let m;m=""==r.query||"All"==(null==r?void 0:r.query)?{}:{category:r.query},console.log(r),t.showSheenAnimation=!0;try{let h=yield t.searchService.postContentSearch(m,yield t.storage.getData("lang"));console.log("Response",h),t.mappUIContentList(h)}catch(h){console.log("error",h)}});return function(r){return l.apply(this,arguments)}}()),t.networkConnected=yield t.networkService.getNetworkStatus(),yield t.cacheService.getCacheTimeout())t.getServerMetaConfig();else if(t.networkConnected){t.getServerMetaConfig(),t.configContents=[],t.contentList=[];let l=yield t.contentService.getAllContent();t.contentList=l,t.generateItems(),t.showSheenAnimation=!1}else{t.configContents=[],t.contentList=[];let l=yield t.contentService.getAllContent();t.contentList=l,t.generateItems(),0==t.contentList.length&&t.getServerMetaConfig(),t.showSheenAnimation=!1}yield S.Q.preload({assetPath:"/assets/sounds/windchime.mp3",assetId:"windchime",volume:1,audioChannelNum:1,isUrl:!1}),t.botMessageApiService.deleteExpiredChatMessages().catch(l=>{console.error(l)}),t.appUpdateService.checkForUpdate()})()}mappUIContentList(t){var a=this;return(0,d.A)(function*(){if(a.showSheenAnimation=!1,a.configContents=[],a.contentList=[],t.length>0){a.noSearchData=!1;let o={};t.forEach((l,r)=>{o={},o.source="djp",o.sourceType="djp-content",o.metaData=l,a.contentList.push(o),r<50&&a.configContents.push(o)}),yield a.contentService.saveContents(a.contentList),a.contentService.getAllContent().then(l=>{a.contentList=[],a.contentList=l})}else a.noSearchData=!0})()}getServerMetaConfig(){var t=this;return(0,d.A)(function*(){yield t.storage.getData("configMeta");let o=t.configVariables.headerFilters;o.forEach(l=>{t.filters=l.additionalFilters.sort((r,m)=>r.index-m.index)}),t.languages=t.configVariables.languages.sort((l,r)=>l.id.localeCompare(r.id)),t.headerService.filterEvent({defaultFilter:o[0].defaultFilter,filter:t.filters,languages:t.languages})})()}tabViewWillEnter(){var t=this;return(0,d.A)(function*(){yield t.headerService.showHeader(t.appName,!1),setTimeout(()=>{t.headerService.showStatusBar(!1)},0)})()}ionViewWillEnter(){var t=this;return(0,d.A)(function*(){t.tabViewWillEnter()})()}ionViewDidEnter(){this.headerService.showStatusBar(!1)}moreOtions(t){var a=this;return(0,d.A)(function*(){let o;a.optModalOpen||(a.optModalOpen=!0,o=yield a.modalCtrl.create({component:w.q,componentProps:{content:t},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield o.present()),o.onDidDismiss().then(function(){var l=(0,d.A)(function*(r){a.optModalOpen=!1,r.data&&"addToPitara"===r.data.type?a.addContentToMyPitara(r.data.content||t):r.data&&"like"==r.data.type&&(a.contentService.likeContent(r.data.content||t,"guest",!0),r.data.content.metaData.isLiked&&(yield S.Q.play({assetId:"windchime"}),(0,O.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})),a.telemetryGeneratorService.generateInteractTelemetry("TOUCH","content-liked","home","home",new T.$i(null==t?void 0:t.metaData.identifier,null==t?void 0:t.metaData.mimetype,"")))});return function(r){return l.apply(this,arguments)}}())})()}initialiseSources(t,a){const o=a.mappings;t.sources&&t.sources.length>0&&t.sources.forEach(l=>{if("sunbird"==l.sourceType){const r=o.find(m=>"sunbird"==m.sourceType);this.sunbirdProcess.process(l,r)}})}playContent(t,a){var o=this;return(0,d.A)(function*(){var l,r;o.contentService.markContentAsViewed(a),o.configContents.forEach(m=>{m.play=!1}),null!=a&&null!==(l=a.metaData)&&void 0!==l&&l.url.endsWith(".pdf")?window.open(null==a||null===(r=a.metaData)||void 0===r?void 0:r.url,"_blank"):yield o.router.navigate(["/player"],{state:{content:a}})})()}addContentToMyPitara(t){var a=this;return(0,d.A)(function*(){const o=yield a.modalCtrl.create({component:k.$,componentProps:{content:t},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield o.present(),o.onWillDismiss().then(l=>{})})()}doRefresh(t){this.refresh=!0,this.serverError=!1,this.showSheenAnimation=!0,this.getServerMetaConfig(),setTimeout(()=>{this.refresh=!1,t&&t.detail.complete()},100)}handleFilter(t){alert("handle filter "+t)}sanitiseUrl(t){let a=t.split("&")[0];return this.domSanitiser.bypassSecurityTrustResourceUrl(a.replace("watch?v=","embed/")+"?autoplay=1&controls=1")}navigateToSakhi(t){this.telemetryGeneratorService.generateStartTelemetry("bot",`${t}-sakhi`),"story"==t?this.router.navigate([`/${t}`]):"teacher"==t&&this.router.navigate(["/teacher-sakhi"])}generateItems(){const t=this.configContents.length+50;for(let a=this.configContents.length;a{this.generateItems(),t.target.complete()},500)}confirmContent(t){var a=this;return(0,d.A)(function*(){null!=t&&(yield a.confirmService.onConfirmContent(t.metaData))})()}}return(i=c).\u0275fac=function(t){return new(t||i)(e.rXU(f.Ux),e.rXU(p.Ix),e.rXU(A.f),e.rXU($.w),e.rXU(H.q),e.rXU(g.W3),e.rXU(j),e.rXU(f.dk),e.rXU(B.up),e.rXU(f.n$),e.rXU(U.O),e.rXU(f.Sc),e.rXU(v.c$),e.rXU(g.K_),e.rXU(f.F_),e.rXU(f.MK),e.rXU(E.i),e.rXU(Y))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-home"]],viewQuery:function(t,a){if(1&t&&e.GBs(W,5),2&t){let o;e.mGM(o=e.lsd())&&(a.refresher=o.first)}},decls:10,vars:7,consts:[["refresher",""],[3,"fullscreen"],["class","spinner-div",4,"ngIf"],["slot","fixed",3,"ionRefresh"],["refreshingSpinner","circles"],["class","m-n",4,"ngIf"],[4,"ngIf"],[3,"ionInfinite",4,"ngIf"],[1,"spinner-div"],["icon","spiral",1,"refreshspinner"],[1,"m-n"],["class","cards-container",4,"ngFor","ngForOf"],[1,"cards-container"],[1,"card"],["item-start","",1,"card__img"],["height","15rem","width","100%","radius","16px"],[1,"card__metadata"],[2,"width","90%"],["height","12px","width","100%"],[2,"padding-left","1.5rem","width","10%"],["lines","none"],[1,"no-data"],["class","bot-section",4,"ngIf"],["class","card",4,"ngIf"],[1,"bot-section"],[1,"image",3,"click"],["src","assets/images/Story_bot.svg","alt",""],[1,"image-title"],["src","assets/images/Question_bot.svg","alt",""],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],["alt","",3,"src"],[1,"card__title"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",3,"click"],[3,"ionInfinite"]],template:function(t,a){if(1&t){const o=e.RV6();e.j41(0,"ion-content",1),e.DNE(1,J,2,0,"div",2),e.j41(2,"ion-refresher",3,0),e.bIt("ionRefresh",function(r){return e.eBV(o),e.Njj(a.doRefresh(r))}),e.nrm(4,"ion-refresher-content",4),e.k0s(),e.DNE(5,Q,2,2,"ion-list",5)(6,Z,5,3,"ion-list",6)(7,q,5,3,"ion-list",6)(8,ce,2,1,"ion-list",6)(9,me,2,0,"ion-infinite-scroll",7),e.k0s()}2&t&&(e.Y8G("fullscreen",!0),e.R7$(),e.Y8G("ngIf",a.refresh),e.R7$(4),e.Y8G("ngIf",a.showSheenAnimation),e.R7$(),e.Y8G("ngIf",!a.showSheenAnimation&&a.noSearchData&&0==a.configContents.length),e.R7$(),e.Y8G("ngIf",!a.showSheenAnimation&&a.serverError),e.R7$(),e.Y8G("ngIf",!a.showSheenAnimation&&a.configContents.length>0),e.R7$(),e.Y8G("ngIf",!a.showSheenAnimation&&a.configContents.length>0))},dependencies:[g.W9,g.iq,g.Ax,g.Hp,g.uz,g.he,g.nf,g.To,g.Ki,g.w2,u.Sq,u.bT,V.O,v.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-label[_ngcontent-%COMP%]{width:95%}.refreshspinner[_ngcontent-%COMP%]{stroke:#024f9d!important;width:1.875rem;left:0;top:0;height:2.5rem;position:relative!important}.spinner-div[_ngcontent-%COMP%]{padding:2.5rem;background-color:#eceff0;text-align:center;border:none!important}.landscape-icon[_ngcontent-%COMP%]{position:absolute;width:100%;background:transparent;bottom:3.5rem;z-index:9999;background:var(--ion-color-secondary-contrast);opacity:.5}.landscape-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{float:right;font-size:1.5rem;margin-right:.5rem}ion-list[_ngcontent-%COMP%]{background-color:transparent}ion-item[_ngcontent-%COMP%]{--background: transparent}"]}),c})()}];let ge=(()=>{var i;class c{}return(i=c).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[p.iI.forChild(de),p.iI]}),c})();var he=s(5553),fe=s(3721);let ue=(()=>{var i;class c{}return(i=c).\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[g.bv,u.MD,I.YN,ge,v.h,he.h,fe.h]}),c})()}}]); \ No newline at end of file diff --git a/www/4392.68833b52a370976f.js b/www/4392.68833b52a370976f.js new file mode 100644 index 00000000..c84cb1b7 --- /dev/null +++ b/www/4392.68833b52a370976f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4392],{4392:(we,S,s)=>{s.r(S),s.d(S,{HomePageModule:()=>pe});var g=s(8974),p=s(177),M=s(9417),v=s(3021),d=s(467),w=s(56),k=s(2849),T=s(9441),O=s(3649),G=s(7420),y=s(8666),R=s(8941),A=s(446),e=s(4438),f=s(2904),$=s(444),H=s(3696),x=s(7594),P=s(6598),j=s(1413);let L=(()=>{var a;class l{constructor(){var t=this;this.connected=!1,this.networkInfo=new j.B,this.networkConnection$=this.networkInfo.asObservable(),P.l.addListener("networkStatusChange",function(){var i=(0,d.A)(function*(o){t.connected=o.connected,t.networkInfo.next(t.connected)});return function(o){return i.apply(this,arguments)}}())}getNetworkStatus(){var t=this;return(0,d.A)(function*(){return t.connected=yield(yield P.l.getStatus()).connected,t.connected})()}}return(a=l).\u0275fac=function(t){return new(t||a)},a.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}),l})();var B=s(345),U=s(5173),_=s(5402),E=s(4447),X=s(3207),F=s(6354),N=s(9437),b=s(3172),D=s(985),I=s(6421),Y=s(2700);let V=(()=>{var a;class l{constructor(t){this.apiService=t,this.transaction_id=(0,I.A)(),this.message_id=(0,I.A)()}onConfirmContent(t){var i=this;return(0,d.A)(function*(){let o={};t&&(o={context:{domain:"onest:learning-experiences",action:"confirm",version:"1.1.0",bap_id:"13.201.4.186:6002",bap_uri:"http://13.201.4.186:6002/",bpp_id:t.bpp_id,bpp_uri:t.bpp_uri,transaction_id:i.transaction_id,message_id:i.message_id,timestamp:(new Date).toISOString()},message:{order:{items:[{id:t.id}],fulfillments:[{customer:{person:{name:"",age:""},contact:{phone:"",email:""}}}]}}});let c=JSON.stringify(o);const r=(new D._g.Builder).withHost(b.$.api.BASE_URL).withPath(b.$.api.CONFIRM_API).withType(D.kr.POST).withBody(c).withBearerToken(!0).withLanguge(t.currentLang).build();return(0,X.s)(i.apiService.fetch(r).pipe((0,F.T)(m=>m.body),(0,N.W)(m=>{throw m})))})()}}return(a=l).\u0275fac=function(t){return new(t||a)(e.KVO(Y.G))},a.\u0275prov=e.jDH({token:a,factory:a.\u0275fac,providedIn:"root"}),l})();var W=s(2297);const K=["refresher"],J=()=>[0,1,2,3,4,5,6,7,8];function z(a,l){1&a&&(e.j41(0,"div",8),e.nrm(1,"ion-spinner",9),e.k0s())}function Q(a,l){1&a&&(e.j41(0,"div",12)(1,"div",13)(2,"div",14),e.nrm(3,"app-skeleton-item",15),e.k0s(),e.j41(4,"div",16)(5,"div",17),e.nrm(6,"app-skeleton-item",18),e.k0s(),e.j41(7,"div",19),e.nrm(8,"app-skeleton-item",18),e.k0s()()()())}function Z(a,l){1&a&&(e.j41(0,"ion-list",10),e.DNE(1,Q,9,0,"div",11),e.k0s()),2&a&&(e.R7$(),e.Y8G("ngForOf",e.lJ4(1,J)))}function q(a,l){1&a&&(e.j41(0,"ion-list")(1,"ion-item",20)(2,"ion-label",21),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&a&&(e.R7$(3),e.JRh(e.bMT(4,1,"No Result")))}function ee(a,l){1&a&&(e.j41(0,"ion-list")(1,"ion-item",20)(2,"ion-label",21),e.EFF(3),e.nI1(4,"translate"),e.k0s()()()),2&a&&(e.R7$(3),e.JRh(e.bMT(4,1,"An unknown error occured, please try after sometime")))}function te(a,l){if(1&a){const n=e.RV6();e.j41(0,"div",24)(1,"div",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.navigateToSakhi("story"))}),e.nrm(2,"img",26),e.j41(3,"div",27),e.EFF(4),e.nI1(5,"translate"),e.k0s()(),e.j41(6,"div",25),e.bIt("click",function(){e.eBV(n);const i=e.XpG(3);return e.Njj(i.navigateToSakhi("teacher"))}),e.nrm(7,"img",28),e.j41(8,"div",27),e.EFF(9),e.nI1(10,"translate"),e.k0s()()()}2&a&&(e.R7$(4),e.JRh(e.bMT(5,2,"Katha Sakhi")),e.R7$(5),e.JRh(e.bMT(10,4,"Teacher Tara")))}function ne(a,l){if(1&a&&e.nrm(0,"img",31),2&a){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/Audio.png",e.B4B)}}function ie(a,l){if(1&a&&e.nrm(0,"img",31),2&a){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/youtube-video.png",e.B4B)}}function ae(a,l){if(1&a&&e.nrm(0,"img",31),2&a){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/Video.png",e.B4B)}}function oe(a,l){if(1&a&&e.nrm(0,"img",31),2&a){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/PDF.png",e.B4B)}}function re(a,l){if(1&a&&e.nrm(0,"img",31),2&a){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/LINK.png",e.B4B)}}function se(a,l){if(1&a&&e.nrm(0,"img",31),2&a){const n=e.XpG(2).$implicit;e.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/LINK.png",e.B4B)}}function le(a,l){if(1&a){const n=e.RV6();e.j41(0,"div",13)(1,"div",29),e.bIt("click",function(i){e.eBV(n);const o=e.XpG().$implicit,c=e.XpG(2);return e.Njj(c.playContent(i,o))}),e.DNE(2,ne,1,1,"img",30)(3,ie,1,1,"img",30)(4,ae,1,1,"img",30)(5,oe,1,1,"img",30)(6,re,1,1,"img",30)(7,se,1,1,"img",30),e.nrm(8,"img",31),e.k0s(),e.j41(9,"div",16)(10,"div",32),e.EFF(11),e.k0s(),e.j41(12,"ion-icon",33),e.bIt("click",function(){e.eBV(n);const i=e.XpG().$implicit,o=e.XpG(2);return e.Njj(o.moreOtions(i))}),e.k0s()()()}if(2&a){const n=e.XpG().$implicit,t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.AUDIO),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.YOUTUBE),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.MP4),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.PDF),e.R7$(),e.Y8G("ngIf",n.metaData.mimetype===t.mimeType.LINK),e.R7$(),e.Y8G("ngIf","text/html"===(null==n||null==n.metaData?null:n.metaData.mimetype)),e.R7$(),e.Y8G("src",""!=(null==n||null==n.metaData?null:n.metaData.thumbnail)||n.metaData.identifier.startsWith("do_")?"":"https://ejaaduipitara.ncert.gov.in/assets/img/cards.jpg",e.B4B),e.R7$(3),e.JRh(null==n.metaData?null:n.metaData.name)}}function ce(a,l){if(1&a&&(e.j41(0,"div",12),e.DNE(1,te,11,6,"div",22)(2,le,13,8,"div",23),e.k0s()),2&a){const n=l.$implicit,t=l.index;e.R7$(),e.Y8G("ngIf",5===t),e.R7$(),e.Y8G("ngIf",n.metaData&&n.metaData.name)}}function me(a,l){if(1&a&&(e.j41(0,"ion-list"),e.DNE(1,ce,3,2,"div",11),e.k0s()),2&a){const n=e.XpG();e.R7$(),e.Y8G("ngForOf",n.configContents)}}function de(a,l){if(1&a){const n=e.RV6();e.j41(0,"ion-infinite-scroll",34),e.bIt("ionInfinite",function(i){e.eBV(n);const o=e.XpG();return e.Njj(o.onIonInfinite(i))}),e.nrm(1,"ion-infinite-scroll-content"),e.k0s()}}const ge=[{path:"",component:(()=>{var a;class l{constructor(t,i,o,c,r,m,h,u,ve,_e,Ce,Se,ye,Pe,be,De,Ie,Me){this.headerService=t,this.router=i,this.contentService=o,this.configService=c,this.sunbirdProcess=r,this.modalCtrl=m,this.networkService=h,this.cacheService=u,this.domSanitiser=ve,this.storage=_e,this.telemetryGeneratorService=Ce,this.searchService=Se,this.translateService=ye,this.toastController=Pe,this.botMessageApiService=be,this.lcoalNotifService=De,this.appUpdateService=Ie,this.confirmService=Me,this.refresh=!1,this.showSheenAnimation=!0,this.contentList=[],this.isOpen=!1,this.configContents=[],this.optModalOpen=!1,this.networkConnected=!1,this.mimeType=w.Cc,this.noSearchData=!1,this.langChangeSubscription=null,this.serverError=!1,this.onlineState=!1,this.offlineState=!1,this.networkChangeSub=null,this.selectedLang="",this.appName="",this.configVariables=A.g,this.responseList=[],R.q.getInfo().then(C=>{this.appName=C.name}),this.configContents=[],this.contentList=[],this.networkChangeSub=this.networkService.networkConnection$.subscribe(C=>{this.networkConnected=C})}ngOnDestroy(){try{this.langChangeSubscription&&this.langChangeSubscription.unsubscribe(),this.networkChangeSub&&this.networkChangeSub.unsubscribe()}catch(t){console.log("error in unsubscribe",t)}}ngOnInit(){var t=this;return(0,d.A)(function*(){t.headerService.headerEventEmitted$.subscribe(function(){var r=(0,d.A)(function*(m){if("language"==m){let h=yield t.storage.getData("lang");console.log("lang ",h,t.selectedLang),t.responseList=yield t.searchService.postContentSearch(i,yield t.storage.getData("lang")),t.selectedLang!==h&&(t.selectedLang=h,t.showSheenAnimation=!0,t.getServerMetaConfig())}});return function(m){return r.apply(this,arguments)}}());let i={};t.headerService.filterConfigEmitted$.subscribe(function(){var r=(0,d.A)(function*(m){t.configContents=[],t.contentList=[],t.serverError=!1,t.showSheenAnimation=!0;let h=yield t.storage.getData("lang"),u=yield t.configService.getAllContent(i,h);t.mappUIContentList(u)});return function(m){return r.apply(this,arguments)}}()),t.headerService.sideMenuItemEventEmitted$.subscribe(function(){var r=(0,d.A)(function*(m){let h;h=""==m.query||"All"==(null==m?void 0:m.query)?{}:{category:m.query},console.log(m),t.showSheenAnimation=!0;try{t.responseList=[],t.responseList=yield t.searchService.postContentSearch(h,yield t.storage.getData("lang")),console.log("Response",t.responseList),t.mappUIContentList(t.responseList)}catch(u){console.log("error",u)}});return function(m){return r.apply(this,arguments)}}()),t.networkConnected=yield t.networkService.getNetworkStatus();let o=yield t.cacheService.getCacheTimeout();if(yield t.storage.getData("lang"),o)t.getServerMetaConfig();else if(t.networkConnected){t.getServerMetaConfig(),t.configContents=[],t.contentList=[];let r=yield t.contentService.getAllContent();t.contentList=r,t.generateItems(),t.showSheenAnimation=!1}else{t.configContents=[],t.contentList=[];let r=yield t.contentService.getAllContent();t.contentList=r,t.generateItems(),0==t.contentList.length&&t.getServerMetaConfig(),t.showSheenAnimation=!1}yield y.Q.preload({assetPath:"/assets/sounds/windchime.mp3",assetId:"windchime",volume:1,audioChannelNum:1,isUrl:!1}),t.botMessageApiService.deleteExpiredChatMessages().catch(r=>{console.error(r)}),t.appUpdateService.checkForUpdate()})()}mappUIContentList(t){var i=this;return(0,d.A)(function*(){if(i.showSheenAnimation=!1,i.configContents=[],i.contentList=[],t.length>0){i.noSearchData=!1;let o={};t.forEach((c,r)=>{o={},o.source="djp",o.sourceType="djp-content",o.metaData=c,i.contentList.push(o),r<50&&i.configContents.push(o)}),yield i.contentService.saveContents(i.contentList),i.contentService.getAllContent().then(c=>{i.contentList=[],i.contentList=c})}else i.noSearchData=!0})()}getServerMetaConfig(){var t=this;return(0,d.A)(function*(){yield t.storage.getData("configMeta");let o=t.configVariables.headerFilters;o.forEach(c=>{t.filters=c.additionalFilters.sort((r,m)=>r.index-m.index)}),t.languages=t.configVariables.languages.sort((c,r)=>c.id.localeCompare(r.id)),t.headerService.filterEvent({defaultFilter:o[0].defaultFilter,filter:t.filters,languages:t.languages})})()}tabViewWillEnter(){var t=this;return(0,d.A)(function*(){yield t.headerService.showHeader(t.appName,!1),setTimeout(()=>{t.headerService.showStatusBar(!1)},0)})()}ionViewWillEnter(){var t=this;return(0,d.A)(function*(){t.tabViewWillEnter()})()}ionViewDidEnter(){this.headerService.showStatusBar(!1)}moreOtions(t){var i=this;return(0,d.A)(function*(){let o;i.optModalOpen||(i.optModalOpen=!0,o=yield i.modalCtrl.create({component:k.q,componentProps:{content:t},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield o.present()),o.onDidDismiss().then(function(){var c=(0,d.A)(function*(r){i.optModalOpen=!1,r.data&&"addToPitara"===r.data.type?i.addContentToMyPitara(r.data.content||t):r.data&&"like"==r.data.type&&(i.contentService.likeContent(r.data.content||t,"guest",!0),r.data.content.metaData.isLiked&&(yield y.Q.play({assetId:"windchime"}),(0,G.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})),i.telemetryGeneratorService.generateInteractTelemetry("TOUCH","content-liked","home","home",new O.$i(null==t?void 0:t.metaData.identifier,null==t?void 0:t.metaData.mimetype,"")))});return function(r){return c.apply(this,arguments)}}())})()}initialiseSources(t,i){const o=i.mappings;t.sources&&t.sources.length>0&&t.sources.forEach(c=>{if("sunbird"==c.sourceType){const r=o.find(m=>"sunbird"==m.sourceType);this.sunbirdProcess.process(c,r)}})}playContent(t,i){var o=this;return(0,d.A)(function*(){var c,r;o.contentService.markContentAsViewed(i),o.configContents.forEach(m=>{m.play=!1}),null!=i&&null!==(c=i.metaData)&&void 0!==c&&c.url.endsWith(".pdf")?window.open(null==i||null===(r=i.metaData)||void 0===r?void 0:r.url,"_blank"):yield o.router.navigate(["/player"],{state:{content:i}})})()}addContentToMyPitara(t){var i=this;return(0,d.A)(function*(){const o=yield i.modalCtrl.create({component:T.$,componentProps:{content:t},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield o.present(),o.onWillDismiss().then(c=>{})})()}doRefresh(t){this.refresh=!0,this.serverError=!1,this.showSheenAnimation=!0,this.getServerMetaConfig(),setTimeout(()=>{this.refresh=!1,t&&t.detail.complete()},100)}handleFilter(t){alert("handle filter "+t)}sanitiseUrl(t){let i=t.split("&")[0];return this.domSanitiser.bypassSecurityTrustResourceUrl(i.replace("watch?v=","embed/")+"?autoplay=1&controls=1")}navigateToSakhi(t){this.telemetryGeneratorService.generateStartTelemetry("bot",`${t}-sakhi`),"story"==t?this.router.navigate([`/${t}`]):"teacher"==t&&this.router.navigate(["/teacher-sakhi"])}generateItems(){const t=this.configContents.length+50;for(let i=this.configContents.length;i{this.generateItems(),t.target.complete()},500)}confirmContent(t){var i=this;return(0,d.A)(function*(){null!=t&&(yield i.confirmService.onConfirmContent(t.metaData))})()}}return(a=l).\u0275fac=function(t){return new(t||a)(e.rXU(f.Ux),e.rXU(v.Ix),e.rXU($.f),e.rXU(H.w),e.rXU(x.q),e.rXU(g.W3),e.rXU(L),e.rXU(f.dk),e.rXU(B.up),e.rXU(f.n$),e.rXU(U.O),e.rXU(f.Sc),e.rXU(_.c$),e.rXU(g.K_),e.rXU(f.F_),e.rXU(f.MK),e.rXU(E.i),e.rXU(V))},a.\u0275cmp=e.VBU({type:a,selectors:[["app-home"]],viewQuery:function(t,i){if(1&t&&e.GBs(K,5),2&t){let o;e.mGM(o=e.lsd())&&(i.refresher=o.first)}},decls:10,vars:7,consts:[["refresher",""],[3,"fullscreen"],["class","spinner-div",4,"ngIf"],["slot","fixed",3,"ionRefresh"],["refreshingSpinner","circles"],["class","m-n",4,"ngIf"],[4,"ngIf"],[3,"ionInfinite",4,"ngIf"],[1,"spinner-div"],["icon","spiral",1,"refreshspinner"],[1,"m-n"],["class","cards-container",4,"ngFor","ngForOf"],[1,"cards-container"],[1,"card"],["item-start","",1,"card__img"],["height","15rem","width","100%","radius","16px"],[1,"card__metadata"],[2,"width","90%"],["height","12px","width","100%"],[2,"padding-left","1.5rem","width","10%"],["lines","none"],[1,"no-data"],["class","bot-section",4,"ngIf"],["class","card",4,"ngIf"],[1,"bot-section"],[1,"image",3,"click"],["src","assets/images/Story_bot.svg","alt",""],[1,"image-title"],["src","assets/images/Question_bot.svg","alt",""],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],["alt","",3,"src"],[1,"card__title"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",3,"click"],[3,"ionInfinite"]],template:function(t,i){if(1&t){const o=e.RV6();e.j41(0,"ion-content",1),e.DNE(1,z,2,0,"div",2),e.j41(2,"ion-refresher",3,0),e.bIt("ionRefresh",function(r){return e.eBV(o),e.Njj(i.doRefresh(r))}),e.nrm(4,"ion-refresher-content",4),e.k0s(),e.DNE(5,Z,2,2,"ion-list",5)(6,q,5,3,"ion-list",6)(7,ee,5,3,"ion-list",6)(8,me,2,1,"ion-list",6)(9,de,2,0,"ion-infinite-scroll",7),e.k0s()}2&t&&(e.Y8G("fullscreen",!0),e.R7$(),e.Y8G("ngIf",i.refresh),e.R7$(4),e.Y8G("ngIf",i.showSheenAnimation),e.R7$(),e.Y8G("ngIf",!i.showSheenAnimation&&i.noSearchData&&0==i.configContents.length),e.R7$(),e.Y8G("ngIf",!i.showSheenAnimation&&i.serverError),e.R7$(),e.Y8G("ngIf",!i.showSheenAnimation&&i.configContents.length>0),e.R7$(),e.Y8G("ngIf",!i.showSheenAnimation&&i.configContents.length>0))},dependencies:[g.W9,g.iq,g.Ax,g.Hp,g.uz,g.he,g.nf,g.To,g.Ki,g.w2,p.Sq,p.bT,W.O,_.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-label[_ngcontent-%COMP%]{width:95%}.refreshspinner[_ngcontent-%COMP%]{stroke:#024f9d!important;width:1.875rem;left:0;top:0;height:2.5rem;position:relative!important}.spinner-div[_ngcontent-%COMP%]{padding:2.5rem;background-color:#eceff0;text-align:center;border:none!important}.landscape-icon[_ngcontent-%COMP%]{position:absolute;width:100%;background:transparent;bottom:3.5rem;z-index:9999;background:var(--ion-color-secondary-contrast);opacity:.5}.landscape-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{float:right;font-size:1.5rem;margin-right:.5rem}ion-list[_ngcontent-%COMP%]{background-color:transparent}ion-item[_ngcontent-%COMP%]{--background: transparent}"]}),l})()}];let he=(()=>{var a;class l{}return(a=l).\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.$C({type:a}),a.\u0275inj=e.G2t({imports:[v.iI.forChild(ge),v.iI]}),l})();var fe=s(5553),ue=s(3721);let pe=(()=>{var a;class l{}return(a=l).\u0275fac=function(t){return new(t||a)},a.\u0275mod=e.$C({type:a}),a.\u0275inj=e.G2t({imports:[g.bv,p.MD,M.YN,he,_.h,fe.h,ue.h]}),l})()}}]); \ No newline at end of file diff --git a/www/4503.8b8c1e1f84f5e6fd.js b/www/4503.8b8c1e1f84f5e6fd.js new file mode 100644 index 00000000..4e4c17fa --- /dev/null +++ b/www/4503.8b8c1e1f84f5e6fd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4503],{334:(S,y,g)=>{g.d(y,{s3:()=>h});const h=(0,g(5083).F3)("Keyboard")},4503:(S,y,g)=>{g.d(y,{b:()=>ne});var p=g(467),e=g(4438),f=g(8974),h=g(334),_=g(2739),I=g(5293),G=g(6421),M=g(2904),R=g(5402),A=g(5173),w=g(4517),b=g(177),P=g(9417);const j=["recordbtn"];function L(s,l){if(1&s){const o=e.RV6();e.j41(0,"ion-button",19),e.bIt("click",function(){e.eBV(o);const i=e.XpG(2).$implicit,n=e.XpG(2);return e.Njj(n.readmore(i))}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"Read more...")))}function $(s,l){1&s&&e.nrm(0,"img",26)}function N(s,l){1&s&&e.nrm(0,"img",27)}function F(s,l){if(1&s){const o=e.RV6();e.j41(0,"div",20),e.bIt("click",function(){e.eBV(o);const i=e.XpG(2).$implicit,n=e.XpG(2);return e.Njj(n.playFile(i))}),e.j41(1,"div",21),e.DNE(2,$,1,0,"img",22)(3,N,1,0,"img",23),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.j41(6,"div",24),e.nrm(7,"img",25)(8,"img",25),e.k0s()()}if(2&s){const o=e.XpG(2).$implicit;e.R7$(2),e.Y8G("ngIf",!(null!=o&&null!=o.audio&&o.audio.play)),e.R7$(),e.Y8G("ngIf",null==o||null==o.audio?null:o.audio.play),e.R7$(2),e.JRh(null==o||null==o.audio?null:o.audio.duration)}}function Y(s,l){if(1&s&&(e.j41(0,"ion-text",28),e.EFF(1),e.k0s()),2&s){const o=e.XpG(2).$implicit;e.R7$(),e.JRh(null==o?null:o.time)}}function X(s,l){if(1&s&&(e.j41(0,"div",7)(1,"ion-text"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,L,3,3,"ion-button",16)(5,F,9,3,"div",17)(6,Y,2,1,"ion-text",18),e.k0s()),2&s){const o=e.XpG(),t=o.$implicit,i=o.index;e.ZvI("bot-content__message ",null==t?null:t.type,""),e.Y8G("ngClass",0!==i?"msg-block":""),e.R7$(2),e.JRh(e.bMT(3,8,null==t?null:t.displayMsg)),e.R7$(2),e.Y8G("ngIf",null==t?null:t.readMore),e.R7$(),e.Y8G("ngIf","audio"==(null==t?null:t.messageType)),e.R7$(),e.Y8G("ngIf",null==t?null:t.time)}}function U(s,l){1&s&&e.nrm(0,"ion-icon",35)}function V(s,l){1&s&&e.nrm(0,"ion-icon",36)}function W(s,l){1&s&&e.nrm(0,"ion-icon",35)}function K(s,l){1&s&&e.nrm(0,"ion-icon",37)}function J(s,l){if(1&s){const o=e.RV6();e.j41(0,"div",29)(1,"div",30),e.bIt("click",function(){e.eBV(o);const i=e.XpG().$implicit,n=e.XpG(2);return e.Njj(n.msgLiked(i,"like"))}),e.DNE(2,U,1,0,"ion-icon",31)(3,V,1,0,"ion-icon",32),e.k0s(),e.j41(4,"div",33),e.bIt("click",function(){e.eBV(o);const i=e.XpG().$implicit,n=e.XpG(2);return e.Njj(n.msgLiked(i,"dislike"))}),e.DNE(5,W,1,0,"ion-icon",31)(6,K,1,0,"ion-icon",34),e.k0s()()}if(2&s){const o=e.XpG().$implicit;e.R7$(2),e.Y8G("ngIf",!o.likeMsg),e.R7$(),e.Y8G("ngIf",o.likeMsg),e.R7$(2),e.Y8G("ngIf",!o.dislikeMsg),e.R7$(),e.Y8G("ngIf",o.dislikeMsg)}}function q(s,l){if(1&s&&(e.j41(0,"div"),e.DNE(1,X,7,10,"div",14)(2,J,7,4,"div",15),e.k0s()),2&s){const o=l.$implicit,t=l.index;e.R7$(),e.Y8G("ngIf",""!==(null==o?null:o.type)),e.R7$(),e.Y8G("ngIf","received"===(null==o?null:o.type)&&0!==t&&o.timeStamp&&!(null!=o&&null!=o.audio&&o.audio.file)&&"An unknown error occured, please try after sometime"!==o.message)}}function H(s,l){if(1&s&&(e.j41(0,"div",12),e.DNE(1,q,3,2,"div",13),e.k0s()),2&s){const o=e.XpG();e.R7$(),e.Y8G("ngForOf",o.botMessages)}}function Z(s,l){if(1&s){const o=e.RV6();e.j41(0,"ion-textarea",38,1),e.nI1(2,"translate"),e.bIt("keyup.enter",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.handleMessage())}),e.mxI("ngModelChange",function(i){e.eBV(o);const n=e.XpG();return e.DH7(n.textMessage,i)||(n.textMessage=i),e.Njj(i)}),e.bIt("ionFocus",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.onInputFocus())})("ionBlur",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.onInputBlur())}),e.k0s()}if(2&s){const o=e.XpG();e.Y8G("disabled",o.disabled)("placeholder",e.bMT(2,3,"Type here")),e.R50("ngModel",o.textMessage)}}function z(s,l){if(1&s&&(e.j41(0,"div",39),e.nrm(1,"ion-icon",40),e.j41(2,"ion-label"),e.EFF(3),e.k0s()()),2&s){const o=e.XpG();e.R7$(3),e.JRh(o.durationDisplay)}}function Q(s,l){1&s&&(e.j41(0,"ion-label",41)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&s&&(e.R7$(2),e.SpI(" << ",e.bMT(3,1,"Swipe left to cancel"),""))}function ee(s,l){1&s&&e.nrm(0,"ion-icon",42),2&s&&e.Y8G("scrollY",!0)}function te(s,l){if(1&s){const o=e.RV6();e.j41(0,"ion-icon",43),e.bIt("click",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.handleMessage())}),e.k0s()}}let ne=(()=>{var s;class l{constructor(t,i,n,a,d,r,m,c){this.record=t,this.ngZone=i,this.headerService=n,this.messageApi=a,this.translate=d,this.telemetryGeneratorService=r,this.storage=m,this.platform=c,this.botMessages=[],this.textMessage="",this.botStartTimeStamp=Date.now(),this.config={},this.botMessageEvent=new e.bkB,this.navigated=!1,this.startRecording=!1,this.duration=0,this.durationDisplay="",this.disabled=!1,this.keyboardOpen=!1,this.defaultLoaderMsg={identifier:"",message:this.translate.instant("Loading..."),messageType:"text",displayMsg:this.translate.instant("Loading..."),type:"received",time:"",timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""},this.botMessages=[],this.audioRef=new Audio}ngOnInit(){var t=this;this.initialiseBot(),this.platform.backButton.subscribeWithPriority(11,(0,p.A)(function*(){t.handleBackNavigation()})),this.headerService.headerEventEmitted$.subscribe(i=>{"back"==i&&!this.navigated&&(this.navigated=!0,console.log("bot message back event "),this.handleBackNavigation())}),h.s3.addListener("keyboardWillShow",()=>{console.log("keyboard will show"),this.content.scrollToBottom()}),this.record.startEndEvent$.subscribe(i=>{this.ngZone.run(()=>{this.startRecording=i,this.calculation()})}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.audioRef&&(this.botMessages.forEach(i=>{i.audio&&(i.audio.play=!1)}),this.audioRef.pause())})}ngOnChanges(){var t,i;console.log("ng onchanges ",this.config),null!==(t=this.config)&&void 0!==t&&t.notification&&null!==(i=this.config)&&void 0!==i&&null!==(i=i.notif)&&void 0!==i&&i.body&&(this.textMessage=this.config.notif.body,this.handleMessage())}onInputFocus(){this.keyboardOpen=!0}onInputBlur(){this.keyboardOpen=!1}ionViewWillEnter(){this.botMessages=[],this.navigated=!1}ngAfterViewInit(){this.record.gestureControl(this.recordbtn)}initialiseBot(){var t=this;return(0,p.A)(function*(){t.botMessages=[];let i=`WELCOME_TO_${t.config.type.toUpperCase()}_SAKHI`;0===t.botMessages.length&&t.botMessages.push({messageType:"text",displayMsg:i,type:"received"}),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}),yield t.messageApi.getAllChatMessages(t.config.type).then(n=>{console.log("Bot response",n),n.forEach(a=>{var d;let r={identifier:"",message:"",messageType:"",type:"",displayMsg:"",audio:{file:"",duration:"",play:!1},time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""};var m;r.message=a.message,r.identifier=a.identifier,a.message.length>200&&a.message.length-200>100?(r.displayMsg=a.message.substring(0,200),r.readMore=!0):(r.displayMsg=a.message.substring(0,200),r.readMore=!1),r.messageType=a.messageType,r.type=0===a.fromMe?"received":"sent",r.time=new Date(JSON.parse(a.ts)).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),r.timeStamp=a.ts,r.requestId=null!==(d=a.requestId)&&void 0!==d?d:"",r.likeMsg=1==a.reaction,r.dislikeMsg=0==a.reaction,"audio"==a.messageType&&(r.audio.file="sent"==r.type?a.mediaData:a.mediaUrl,r.audio.duration=null!==(m=a.duration)&&void 0!==m?m:""),t.botMessages.push(r)}),console.log("botMessages ",t.botMessages)}),t.config.notif&&(t.textMessage=t.config.notif.body,t.handleMessage())})()}handleMessage(){var t=this;return(0,p.A)(function*(){t.ngZone.run(()=>{t.chat={identifier:"",message:"",messageType:"text",type:"sent",displayMsg:"",time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""},t.textMessage.replace(/\s/g,"").length>0&&(h.s3.hide(),t.chat.message=t.textMessage,t.chat.displayMsg=t.textMessage,t.chat.timeStamp=Date.now(),t.botMessages.push(t.chat),t.saveChatMessage(t.chat),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}),t.botMessages=JSON.parse(JSON.stringify(t.botMessages)),t.botMessages.push(t.defaultLoaderMsg),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}))}),yield t.makeBotAPICall(t.textMessage,"")})()}saveChatMessage(t){const i={identifier:(0,G.A)(),message:t.message,botType:this.config.type,fromMe:"sent"==t.type?1:0,messageType:t.messageType,mediaMimeType:t.messageType,mediaData:"sent"==t.type&&"audio"==t.messageType?t.audio.file:"",mediaUrl:"received"==t.type&&"audio"==t.messageType?t.audio.file:"",duration:"audio"==t.messageType?t.audio.duration:"",requestId:t.requestId,ts:t.timeStamp,reaction:-1};this.messageApi.saveChatMessage(i).then()}makeBotAPICall(t,i){var n=this;return(0,p.A)(function*(){n.textMessage="",n.disabled=!0;let a=n.botMessages.length,d=yield n.storage.getData("lang");yield n.messageApi.getBotMessage(t,i,n.config.type,d).then(r=>{n.botMessages=JSON.parse(JSON.stringify(n.botMessages)),n.botMessages.forEach(function(){var m=(0,p.A)(function*(c,D){if(200===r.responseCode){let u=r.body.result;if(D==a-1&&"received"===c.type&&(c.time=(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),c.timeStamp=Date.now(),c.requestId=r.requestHeaders["X-Request-ID"],null!=u&&u.output)){var C,T,x,B;if(n.disabled=!1,c.message=null===(C=u.output)||void 0===C?void 0:C.text,(null==u||null===(T=u.output)||void 0===T?void 0:T.text.length)>200&&(null==u?void 0:u.output.text.length)-200>100?(c.displayMsg=u.output.text.substring(0,200),c.readMore=!0):c.displayMsg=null===(B=u.output)||void 0===B?void 0:B.text,n.content.scrollToBottom(300).then(()=>{n.content.scrollToBottom(300)}),n.saveChatMessage(c),null!=u&&null!==(x=u.output)&&void 0!==x&&x.audio){var k;let E=yield n.fetchAudioDuration(u.output.audio);console.log("duration ",E);let v={identifier:"",message:"",messageType:"",displayMsg:"",audio:{file:"",duration:"",play:!1},type:"received",time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:Date.now(),readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""};v.audio={file:null===(k=u.output)||void 0===k?void 0:k.audio,duration:E,play:!1},v.messageType="audio",n.ngZone.run(()=>{n.botMessages.push(v),n.saveChatMessage(v),n.content.scrollToBottom(300).then(()=>{n.content.scrollToBottom(300).then()})})}n.content.scrollToBottom(300).then(()=>{n.content.scrollToBottom(300).then()})}}else{var O;c.message=r.errorMesg?r.errorMesg:null!==(O=r.data)&&void 0!==O&&O.detail?r.data.detail:"An unknown error occured, please try after sometime",c.displayMsg=c.message,c.time=(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),c.timeStamp=Date.now(),n.saveChatMessage(c),n.disabled=!1}});return function(c,D){return m.apply(this,arguments)}}())}).catch(r=>{n.disabled=!1,console.log("catch error ",r),n.botMessages[a-1].message="An unknown error occured, please try after sometime",n.botMessages[a-1].displayMsg="An unknown error occured, please try after sometime",n.botMessages[a-1].time=(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),n.botMessages[a-1].timeStamp=Date.now(),r.body.detail.length>0&&"type_error.enum"===r.body.detail[0].type&&(n.botMessages[a-1].message="Sorry, this language is not currently supported.",n.botMessages[a-1].displayMsg="Sorry, this language is not currently supported."),n.saveChatMessage(n.botMessages[a-1])})})()}readmore(t){let i=t.displayMsg,n=t.displayMsg.length;t.message!==i?(t.message.length{this.content.scrollToBottom(300).then()})):t.readMore=!1}playFile(t){var i=this;return(0,p.A)(function*(){let n=t.audio,a="";i.botMessages.forEach(d=>{var r;null!==(r=d.audio)&&void 0!==r&&r.play&&t.timeStamp!==d.timeStamp&&(d.audio.play=!1)}),"sent"===t.type?(a=`data:audio/aac;base64,${(yield _.YA.readFile({path:n.file,directory:_.__.Data})).data}`,n.play=!n.play):"received"===t.type&&(a=n.file,n.play=!n.play),i.audioRef.src="",i.audioRef.src=a,i.audioRef.load(),i.audioRef.preload="auto",i.audioRef.controls=!0,i.audioRef.oncanplaythrough=()=>{n.play?i.audioRef.play():i.audioRef.pause()},i.audioRef.ondurationchange=d=>{console.log("ondurationchange ",d)},i.audioRef.ontimeupdate=d=>{},i.audioRef.onended=()=>{n.play=!1,i.audioRef.pause()}})()}handleBackNavigation(){let t=Date.now()-this.botStartTimeStamp;if(this.botMessages.length>0){let i={audio:0,text:0};this.botMessages.forEach(n=>{"text"==n.messageType?i.text++:"audio"==n.messageType&&(i.audio++,this.audioRef&&(n.audio&&(n.audio.play=!1),this.audioRef.pause()))}),console.log("result count ",i),this.botMessageEvent.emit({audio:i.audio,text:i.text,duration:t/1e3})}else this.botMessageEvent.emit({audio:0,text:0,duration:t/1e3});this.botMessages=[]}cancelRecording(){var t=this;return(0,p.A)(function*(){console.log("cancel recording"),yield t.record.stopRecognition("audio").then(i=>{console.log("res on recorded data ",i)}),t.startRecording=!1})()}calculation(){if(!this.startRecording)return this.duration=0,void(this.durationDisplay="");this.duration+=1;const t=Math.floor(this.duration/60),i=(this.duration%60).toString().padStart(2,"0");this.durationDisplay=`${t}:${i}`,setTimeout(()=>{this.calculation()},1e3)}onLongPressStart(){var t=this;return(0,p.A)(function*(){console.log("long press start"),(yield(yield I.R.hasAudioRecordingPermission()).value)?t.record.startRecognition(""):yield I.R.requestAudioRecordingPermission()})()}onLongPressEnd(){var t=this;return(0,p.A)(function*(){console.log("long press end"),yield t.record.stopRecognition("audio").then(function(){var i=(0,p.A)(function*(n){if(console.log("result on recorded data ",n),n.value&&n.value.recordDataBase64){t.chat={identifier:"",message:"",messageType:"",displayMsg:"",audio:{file:"",duration:"",play:!1},type:"sent",time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""};const a=n.value.recordDataBase64;console.log("..................",n,t.durationDisplay);const d=(new Date).getTime()+".wav";yield _.YA.writeFile({path:d,directory:_.__.Data,data:a}),t.ngZone.run(()=>{t.chat.messageType="audio",t.chat.audio={file:d,base64Data:a,duration:t.getTimeString(n.value.msDuration),play:!1},t.chat.timeStamp=Date.now(),t.botMessages.push(t.chat),t.saveChatMessage(t.chat),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}),t.botMessages.push(t.defaultLoaderMsg),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)})}),t.makeBotAPICall("",a)}});return function(n){return i.apply(this,arguments)}}())})()}getTimeString(t){let i=Math.floor(t/1e3/60),n=Math.floor(t/1e3-60*i);return i.toString().padStart(2,"0")+":"+n.toString().padStart(2,"0")}fetchAudioDuration(t){const i=new AudioContext;return fetch(t).then(n=>n.arrayBuffer()).then(n=>i.decodeAudioData(n)).then(n=>{const a=n.duration;return console.log(`The audio file duration is ${a} seconds`),Math.floor(a/60).toString().padStart(2,"0")+":"+Math.floor(a%60).toString().padStart(2,"0")}).catch(n=>"")}msgLiked(t,i){this.botMessages.forEach((n,a)=>{if(t.timeStamp==n.timeStamp){let r={id:this.botMessages[a-1].message,type:"Request"},m=[];m.push({id:t.requestId,type:"X-Request-ID"}),"text"==this.botMessages[a-1].messageType&&m.push(r),"like"==i?(n.likeMsg=!0,n.dislikeMsg=!1,this.messageApi.updateMessageReactions(n.identifier,1),this.telemetryGeneratorService.generateInteractTelemetry("TOUCH","message-liked","bot",`${this.config.type}-sakhi`,void 0,void 0,void 0,m)):(t.dislikeMsg=!0,t.likeMsg=!1,this.messageApi.updateMessageReactions(n.identifier,0),this.telemetryGeneratorService.generateInteractTelemetry("TOUCH","message-disliked","bot",`${this.config.type}-sakhi`,void 0,void 0,void 0,m))}})}}return(s=l).\u0275fac=function(t){return new(t||s)(e.rXU(M.XI),e.rXU(e.SKi),e.rXU(M.Ux),e.rXU(M.F_),e.rXU(R.c$),e.rXU(A.O),e.rXU(M.n$),e.rXU(w.OD))},s.\u0275cmp=e.VBU({type:s,selectors:[["app-bot-messages"]],viewQuery:function(t,i){if(1&t&&(e.GBs(j,5,e.aKT),e.GBs(f.W9,7)),2&t){let n;e.mGM(n=e.lsd())&&(i.recordbtn=n.first),e.mGM(n=e.lsd())&&(i.content=n.first)}},inputs:{config:"config"},outputs:{botMessageEvent:"botMessageEvent"},features:[e.OA$],decls:11,vars:10,consts:[["recordbtn",""],["textareaField",""],["id","content",3,"fullscreen"],["class","bot-content",4,"ngIf"],[1,"bot-input",3,"ngClass"],["aria-label","","value","","fill","outline","shape","round",3,"disabled","placeholder","ngModel","keyup.enter","ngModelChange","ionFocus","ionBlur",4,"ngIf"],["class","input_record",4,"ngIf"],[3,"ngClass"],["class","cancel-record",4,"ngIf"],["fill","clear","size","small",3,"touchstart","touchend","disabled"],["aria-hidden","true","class","audio-record-mic right icon","src","assets/icon/bot-audio.svg",3,"scrollY",4,"ngIf"],["class","audio-record-mic right icon","name","send",3,"click",4,"ngIf"],[1,"bot-content"],[4,"ngFor","ngForOf"],[3,"class","ngClass",4,"ngIf"],["class","action-div",4,"ngIf"],["fill","clear","size","small",3,"click",4,"ngIf"],["class","audio_msg",3,"click",4,"ngIf"],["class","time",4,"ngIf"],["fill","clear","size","small",3,"click"],[1,"audio_msg",3,"click"],[1,"play_audio"],["src","../../../assets/icon/play.svg","alt","",4,"ngIf"],["src","../../../assets/icon/pause.svg","alt","",4,"ngIf"],[1,"audio-wave"],["src","../../../assets/icon/waveform.svg","alt",""],["src","../../../assets/icon/play.svg","alt",""],["src","../../../assets/icon/pause.svg","alt",""],[1,"time"],[1,"action-div"],[1,"action_button",3,"click"],["class","like","aria-hidden","true","src","assets/icon/thumb-up.svg",4,"ngIf"],["aria-hidden","true","src","assets/icon/like.svg",4,"ngIf"],[1,"action_button","unlike",3,"click"],["aria-hidden","true","src","assets/icon/dislike.svg",4,"ngIf"],["aria-hidden","true","src","assets/icon/thumb-up.svg",1,"like"],["aria-hidden","true","src","assets/icon/like.svg"],["aria-hidden","true","src","assets/icon/dislike.svg"],["aria-label","","value","","fill","outline","shape","round",3,"keyup.enter","ngModelChange","ionFocus","ionBlur","disabled","placeholder","ngModel"],[1,"input_record"],["aria-hidden","true","name","mic",1,"audio-record-mic","on-record"],[1,"cancel-record"],["aria-hidden","true","src","assets/icon/bot-audio.svg",1,"audio-record-mic","right","icon",3,"scrollY"],["name","send",1,"audio-record-mic","right","icon",3,"click"]],template:function(t,i){if(1&t){const n=e.RV6();e.j41(0,"ion-content",2),e.DNE(1,H,2,1,"div",3),e.j41(2,"div",4),e.DNE(3,Z,3,5,"ion-textarea",5)(4,z,4,1,"div",6),e.j41(5,"div",7,0),e.DNE(7,Q,4,3,"ion-label",8),e.j41(8,"ion-button",9),e.bIt("touchstart",function(){return e.eBV(n),e.Njj(i.onLongPressStart())})("touchend",function(){return e.eBV(n),e.Njj(i.onLongPressEnd())}),e.DNE(9,ee,1,1,"ion-icon",10),e.k0s()(),e.DNE(10,te,1,0,"ion-icon",11),e.k0s()()}2&t&&(e.Y8G("fullscreen",!0),e.R7$(),e.Y8G("ngIf",i.botMessages.length>0),e.R7$(),e.Y8G("ngClass",i.keyboardOpen?"keyboard-open":""),e.R7$(),e.Y8G("ngIf",!i.startRecording),e.R7$(),e.Y8G("ngIf",i.startRecording),e.R7$(),e.Y8G("ngClass",i.startRecording?"cancel-div":""),e.R7$(2),e.Y8G("ngIf",i.startRecording),e.R7$(),e.Y8G("disabled",i.disabled),e.R7$(),e.Y8G("ngIf",0==i.textMessage.length),e.R7$(),e.Y8G("ngIf",i.textMessage.length>0))},dependencies:[b.YU,b.Sq,b.bT,P.BC,P.vS,f.Jm,f.W9,f.iq,f.he,f.IO,f.nc,f.Gw,R.D9],styles:["ion-content[_ngcontent-%COMP%]{--padding-top: 0px;height:90%}.bot-content[_ngcontent-%COMP%]{padding:1rem;overflow:auto}.bot-content[_ngcontent-%COMP%] .msg-block[_ngcontent-%COMP%]{margin-top:1rem}.bot-content__message[_ngcontent-%COMP%]{line-height:normal;letter-spacing:-.3px;background:var(--ion-color-primary-contrast);padding:1rem 1rem 10px;max-width:80%;position:relative;width:-moz-fit-content;width:fit-content;box-shadow:0 .25rem .25rem #0000000d;white-space:pre-line}.bot-content__message[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{display:flex}.bot-content__message[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{color:#00000040;display:flex;justify-content:flex-end;font-size:.688rem;letter-spacing:.031rem;padding-top:.25rem}.bot-content__message.received[_ngcontent-%COMP%]{border-radius:1rem 1rem 1rem 0px}.bot-content__message.sent[_ngcontent-%COMP%]{background:#dcf7c5;margin-left:auto;border-radius:1rem 1rem 0px}.bot-input[_ngcontent-%COMP%]{position:fixed;bottom:0;width:100%;padding:1rem;background:var(--ion-color-primary-contrast);box-shadow:0 -.33px #a6a6aa;display:flex;align-items:center}.bot-input[_ngcontent-%COMP%] ion-textarea[_ngcontent-%COMP%]{width:90%}.bot-input[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{margin:0}.bot-input[_ngcontent-%COMP%] .input_record[_ngcontent-%COMP%]{width:30%;display:flex;align-items:center}.bot-input[_ngcontent-%COMP%] .input_record[_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{margin-left:1rem}.bot-input[_ngcontent-%COMP%] .cancel-div[_ngcontent-%COMP%]{display:flex;width:100%;margin-left:1rem;align-items:center}.bot-input[_ngcontent-%COMP%] .cancel-record[_ngcontent-%COMP%]{width:90%}.bot-input[_ngcontent-%COMP%] .audio-record-mic[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;fill:var(--ion-color-medium)}.bot-input[_ngcontent-%COMP%] .on-record[_ngcontent-%COMP%]{fill:var(--ion-color-primary)!important}.bot-input[_ngcontent-%COMP%] .sc-ion-input-md-h[_ngcontent-%COMP%]{height:2.25rem;min-height:auto;padding:0 .5rem!important;--border-color: gray;caret-color:gray!important;--highlight-color: gray !important;--highlight-color-focused: gray !important}.bot-input[_ngcontent-%COMP%] .keyboard-open[_ngcontent-%COMP%]{transform:translateY(-50%)}.audio_msg[_ngcontent-%COMP%]{display:flex;background:#c6dfc6;padding:5px;border-radius:10px}.audio_msg[_ngcontent-%COMP%] .play_audio[_ngcontent-%COMP%]{display:flex;flex-direction:column}.audio_msg[_ngcontent-%COMP%] .play_audio[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:8px;text-align:center}.audio_msg[_ngcontent-%COMP%] .audio-wave[_ngcontent-%COMP%]{padding-left:5px}.audio_msg[_ngcontent-%COMP%] .audio-wave[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:30px;height:30px}.audio_msg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:25px}.action-div[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem;margin-top:-.6rem;margin-left:.3rem}.action_button[_ngcontent-%COMP%]{padding:.1rem .5rem;width:-moz-fit-content;width:fit-content;box-shadow:0 .25rem .25rem #0000000d;white-space:pre-line;border-radius:16px;background:#fff;border:.1px solid grey;transform:scale(1)}.unlike[_ngcontent-%COMP%]{transform:scale(-1);margin-left:.75rem!important}"]}),l})()}}]); \ No newline at end of file diff --git a/www/4503.aa2a2ab210b7c8f2.js b/www/4503.aa2a2ab210b7c8f2.js deleted file mode 100644 index 9a874ce4..00000000 --- a/www/4503.aa2a2ab210b7c8f2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4503],{334:(S,y,g)=>{g.d(y,{s3:()=>h});const h=(0,g(5083).F3)("Keyboard")},4503:(S,y,g)=>{g.d(y,{b:()=>ne});var p=g(467),e=g(4438),f=g(8974),h=g(334),_=g(2739),I=g(5293),G=g(6421),M=g(2904),R=g(5402),A=g(5173),w=g(4517),b=g(177),P=g(9417);const j=["recordbtn"];function L(s,l){if(1&s){const o=e.RV6();e.j41(0,"ion-button",18),e.bIt("click",function(){e.eBV(o);const i=e.XpG(2).$implicit,n=e.XpG(2);return e.Njj(n.readmore(i))}),e.EFF(1),e.nI1(2,"translate"),e.k0s()}2&s&&(e.R7$(),e.JRh(e.bMT(2,1,"Read more...")))}function $(s,l){1&s&&e.nrm(0,"img",25)}function N(s,l){1&s&&e.nrm(0,"img",26)}function Y(s,l){if(1&s){const o=e.RV6();e.j41(0,"div",19),e.bIt("click",function(){e.eBV(o);const i=e.XpG(2).$implicit,n=e.XpG(2);return e.Njj(n.playFile(i))}),e.j41(1,"div",20),e.DNE(2,$,1,0,"img",21)(3,N,1,0,"img",22),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.j41(6,"div",23),e.nrm(7,"img",24)(8,"img",24),e.k0s()()}if(2&s){const o=e.XpG(2).$implicit;e.R7$(2),e.Y8G("ngIf",!(null!=o&&null!=o.audio&&o.audio.play)),e.R7$(),e.Y8G("ngIf",null==o||null==o.audio?null:o.audio.play),e.R7$(2),e.JRh(null==o||null==o.audio?null:o.audio.duration)}}function X(s,l){if(1&s&&(e.j41(0,"ion-text",27),e.EFF(1),e.k0s()),2&s){const o=e.XpG(2).$implicit;e.R7$(),e.JRh(null==o?null:o.time)}}function U(s,l){if(1&s&&(e.j41(0,"div",6)(1,"ion-text"),e.EFF(2),e.nI1(3,"translate"),e.k0s(),e.DNE(4,L,3,3,"ion-button",15)(5,Y,9,3,"div",16)(6,X,2,1,"ion-text",17),e.k0s()),2&s){const o=e.XpG(),t=o.$implicit,i=o.index;e.ZvI("bot-content__message ",null==t?null:t.type,""),e.Y8G("ngClass",0!==i?"msg-block":""),e.R7$(2),e.JRh(e.bMT(3,8,null==t?null:t.displayMsg)),e.R7$(2),e.Y8G("ngIf",null==t?null:t.readMore),e.R7$(),e.Y8G("ngIf","audio"==(null==t?null:t.messageType)),e.R7$(),e.Y8G("ngIf",null==t?null:t.time)}}function F(s,l){1&s&&e.nrm(0,"ion-icon",34)}function V(s,l){1&s&&e.nrm(0,"ion-icon",35)}function W(s,l){1&s&&e.nrm(0,"ion-icon",34)}function K(s,l){1&s&&e.nrm(0,"ion-icon",36)}function J(s,l){if(1&s){const o=e.RV6();e.j41(0,"div",28)(1,"div",29),e.bIt("click",function(){e.eBV(o);const i=e.XpG().$implicit,n=e.XpG(2);return e.Njj(n.msgLiked(i,"like"))}),e.DNE(2,F,1,0,"ion-icon",30)(3,V,1,0,"ion-icon",31),e.k0s(),e.j41(4,"div",32),e.bIt("click",function(){e.eBV(o);const i=e.XpG().$implicit,n=e.XpG(2);return e.Njj(n.msgLiked(i,"dislike"))}),e.DNE(5,W,1,0,"ion-icon",30)(6,K,1,0,"ion-icon",33),e.k0s()()}if(2&s){const o=e.XpG().$implicit;e.R7$(2),e.Y8G("ngIf",!o.likeMsg),e.R7$(),e.Y8G("ngIf",o.likeMsg),e.R7$(2),e.Y8G("ngIf",!o.dislikeMsg),e.R7$(),e.Y8G("ngIf",o.dislikeMsg)}}function q(s,l){if(1&s&&(e.j41(0,"div"),e.DNE(1,U,7,10,"div",13)(2,J,7,4,"div",14),e.k0s()),2&s){const o=l.$implicit,t=l.index;e.R7$(),e.Y8G("ngIf",""!==(null==o?null:o.type)),e.R7$(),e.Y8G("ngIf","received"===(null==o?null:o.type)&&0!==t&&o.timeStamp&&!(null!=o&&null!=o.audio&&o.audio.file)&&"An unknown error occured, please try after sometime"!==o.message)}}function H(s,l){if(1&s&&(e.j41(0,"div",11),e.DNE(1,q,3,2,"div",12),e.k0s()),2&s){const o=e.XpG();e.R7$(),e.Y8G("ngForOf",o.botMessages)}}function Z(s,l){if(1&s){const o=e.RV6();e.j41(0,"ion-input",37),e.nI1(1,"translate"),e.bIt("keyup.enter",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.handleMessage())}),e.mxI("ngModelChange",function(i){e.eBV(o);const n=e.XpG();return e.DH7(n.textMessage,i)||(n.textMessage=i),e.Njj(i)}),e.bIt("focus",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.onInputFocus())})("blur",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.onInputBlur())}),e.k0s()}if(2&s){const o=e.XpG();e.Y8G("disabled",o.disabled)("placeholder",e.bMT(1,3,"Type here")),e.R50("ngModel",o.textMessage)}}function z(s,l){if(1&s&&(e.j41(0,"div",38),e.nrm(1,"ion-icon",39),e.j41(2,"ion-label"),e.EFF(3),e.k0s()()),2&s){const o=e.XpG();e.R7$(3),e.JRh(o.durationDisplay)}}function Q(s,l){1&s&&(e.j41(0,"ion-label",40)(1,"span"),e.EFF(2),e.nI1(3,"translate"),e.k0s()()),2&s&&(e.R7$(2),e.SpI(" << ",e.bMT(3,1,"Swipe left to cancel"),""))}function ee(s,l){1&s&&e.nrm(0,"ion-icon",41),2&s&&e.Y8G("scrollY",!0)}function te(s,l){if(1&s){const o=e.RV6();e.j41(0,"ion-icon",42),e.bIt("click",function(){e.eBV(o);const i=e.XpG();return e.Njj(i.handleMessage())}),e.k0s()}}let ne=(()=>{var s;class l{constructor(t,i,n,a,d,r,m,c){this.record=t,this.ngZone=i,this.headerService=n,this.messageApi=a,this.translate=d,this.telemetryGeneratorService=r,this.storage=m,this.platform=c,this.botMessages=[],this.textMessage="",this.botStartTimeStamp=Date.now(),this.config={},this.botMessageEvent=new e.bkB,this.navigated=!1,this.startRecording=!1,this.duration=0,this.durationDisplay="",this.disabled=!1,this.keyboardOpen=!1,this.defaultLoaderMsg={identifier:"",message:this.translate.instant("Loading..."),messageType:"text",displayMsg:this.translate.instant("Loading..."),type:"received",time:"",timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""},this.botMessages=[],this.audioRef=new Audio}ngOnInit(){var t=this;this.initialiseBot(),this.platform.backButton.subscribeWithPriority(11,(0,p.A)(function*(){t.handleBackNavigation()})),this.headerService.headerEventEmitted$.subscribe(i=>{"back"==i&&!this.navigated&&(this.navigated=!0,console.log("bot message back event "),this.handleBackNavigation())}),h.s3.addListener("keyboardWillShow",()=>{console.log("keyboard will show"),this.content.scrollToBottom()}),this.record.startEndEvent$.subscribe(i=>{this.ngZone.run(()=>{this.startRecording=i,this.calculation()})}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.audioRef&&(this.botMessages.forEach(i=>{i.audio&&(i.audio.play=!1)}),this.audioRef.pause())})}ngOnChanges(){var t,i;console.log("ng onchanges ",this.config),null!==(t=this.config)&&void 0!==t&&t.notification&&null!==(i=this.config)&&void 0!==i&&null!==(i=i.notif)&&void 0!==i&&i.body&&(this.textMessage=this.config.notif.body,this.handleMessage())}onInputFocus(){this.keyboardOpen=!0}onInputBlur(){this.keyboardOpen=!1}ionViewWillEnter(){this.botMessages=[],this.navigated=!1}ngAfterViewInit(){this.record.gestureControl(this.recordbtn)}initialiseBot(){var t=this;return(0,p.A)(function*(){t.botMessages=[];let i=`WELCOME_TO_${t.config.type.toUpperCase()}_SAKHI`;0===t.botMessages.length&&t.botMessages.push({messageType:"text",displayMsg:i,type:"received"}),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}),yield t.messageApi.getAllChatMessages(t.config.type).then(n=>{console.log("Bot response",n),n.forEach(a=>{var d;let r={identifier:"",message:"",messageType:"",type:"",displayMsg:"",audio:{file:"",duration:"",play:!1},time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""};var m;r.message=a.message,r.identifier=a.identifier,a.message.length>200&&a.message.length-200>100?(r.displayMsg=a.message.substring(0,200),r.readMore=!0):(r.displayMsg=a.message.substring(0,200),r.readMore=!1),r.messageType=a.messageType,r.type=0===a.fromMe?"received":"sent",r.time=new Date(JSON.parse(a.ts)).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),r.timeStamp=a.ts,r.requestId=null!==(d=a.requestId)&&void 0!==d?d:"",r.likeMsg=1==a.reaction,r.dislikeMsg=0==a.reaction,"audio"==a.messageType&&(r.audio.file="sent"==r.type?a.mediaData:a.mediaUrl,r.audio.duration=null!==(m=a.duration)&&void 0!==m?m:""),t.botMessages.push(r)}),console.log("botMessages ",t.botMessages)}),t.config.notif&&(t.textMessage=t.config.notif.body,t.handleMessage())})()}handleMessage(){var t=this;return(0,p.A)(function*(){t.ngZone.run(()=>{t.chat={identifier:"",message:"",messageType:"text",type:"sent",displayMsg:"",time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""},t.textMessage.replace(/\s/g,"").length>0&&(h.s3.hide(),t.chat.message=t.textMessage,t.chat.displayMsg=t.textMessage,t.chat.timeStamp=Date.now(),t.botMessages.push(t.chat),t.saveChatMessage(t.chat),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}),t.botMessages=JSON.parse(JSON.stringify(t.botMessages)),t.botMessages.push(t.defaultLoaderMsg),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}))}),yield t.makeBotAPICall(t.textMessage,"")})()}saveChatMessage(t){const i={identifier:(0,G.A)(),message:t.message,botType:this.config.type,fromMe:"sent"==t.type?1:0,messageType:t.messageType,mediaMimeType:t.messageType,mediaData:"sent"==t.type&&"audio"==t.messageType?t.audio.file:"",mediaUrl:"received"==t.type&&"audio"==t.messageType?t.audio.file:"",duration:"audio"==t.messageType?t.audio.duration:"",requestId:t.requestId,ts:t.timeStamp,reaction:-1};this.messageApi.saveChatMessage(i).then()}makeBotAPICall(t,i){var n=this;return(0,p.A)(function*(){n.textMessage="",n.disabled=!0;let a=n.botMessages.length,d=yield n.storage.getData("lang");yield n.messageApi.getBotMessage(t,i,n.config.type,d).then(r=>{n.botMessages=JSON.parse(JSON.stringify(n.botMessages)),n.botMessages.forEach(function(){var m=(0,p.A)(function*(c,D){if(200===r.responseCode){let u=r.body.result;if(D==a-1&&"received"===c.type&&(c.time=(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),c.timeStamp=Date.now(),c.requestId=r.requestHeaders["X-Request-ID"],null!=u&&u.output)){var C,T,B,k;if(n.disabled=!1,c.message=null===(C=u.output)||void 0===C?void 0:C.text,(null==u||null===(T=u.output)||void 0===T?void 0:T.text.length)>200&&(null==u?void 0:u.output.text.length)-200>100?(c.displayMsg=u.output.text.substring(0,200),c.readMore=!0):c.displayMsg=null===(k=u.output)||void 0===k?void 0:k.text,n.content.scrollToBottom(300).then(()=>{n.content.scrollToBottom(300)}),n.saveChatMessage(c),null!=u&&null!==(B=u.output)&&void 0!==B&&B.audio){var O;let E=yield n.fetchAudioDuration(u.output.audio);console.log("duration ",E);let v={identifier:"",message:"",messageType:"",displayMsg:"",audio:{file:"",duration:"",play:!1},type:"received",time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:Date.now(),readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""};v.audio={file:null===(O=u.output)||void 0===O?void 0:O.audio,duration:E,play:!1},v.messageType="audio",n.ngZone.run(()=>{n.botMessages.push(v),n.saveChatMessage(v),n.content.scrollToBottom(300).then(()=>{n.content.scrollToBottom(300).then()})})}n.content.scrollToBottom(300).then(()=>{n.content.scrollToBottom(300).then()})}}else{var x;c.message=r.errorMesg?r.errorMesg:null!==(x=r.data)&&void 0!==x&&x.detail?r.data.detail:"An unknown error occured, please try after sometime",c.displayMsg=c.message,c.time=(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),c.timeStamp=Date.now(),n.saveChatMessage(c),n.disabled=!1}});return function(c,D){return m.apply(this,arguments)}}())}).catch(r=>{n.disabled=!1,console.log("catch error ",r),n.botMessages[a-1].message="An unknown error occured, please try after sometime",n.botMessages[a-1].displayMsg="An unknown error occured, please try after sometime",n.botMessages[a-1].time=(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),n.botMessages[a-1].timeStamp=Date.now(),r.body.detail.length>0&&"type_error.enum"===r.body.detail[0].type&&(n.botMessages[a-1].message="Sorry, this language is not currently supported.",n.botMessages[a-1].displayMsg="Sorry, this language is not currently supported."),n.saveChatMessage(n.botMessages[a-1])})})()}readmore(t){let i=t.displayMsg,n=t.displayMsg.length;t.message!==i?(t.message.length{this.content.scrollToBottom(300).then()})):t.readMore=!1}playFile(t){var i=this;return(0,p.A)(function*(){let n=t.audio,a="";i.botMessages.forEach(d=>{var r;null!==(r=d.audio)&&void 0!==r&&r.play&&t.timeStamp!==d.timeStamp&&(d.audio.play=!1)}),"sent"===t.type?(a=`data:audio/aac;base64,${(yield _.YA.readFile({path:n.file,directory:_.__.Data})).data}`,n.play=!n.play):"received"===t.type&&(a=n.file,n.play=!n.play),i.audioRef.src="",i.audioRef.src=a,i.audioRef.load(),i.audioRef.preload="auto",i.audioRef.controls=!0,i.audioRef.oncanplaythrough=()=>{n.play?i.audioRef.play():i.audioRef.pause()},i.audioRef.ondurationchange=d=>{console.log("ondurationchange ",d)},i.audioRef.ontimeupdate=d=>{},i.audioRef.onended=()=>{n.play=!1,i.audioRef.pause()}})()}handleBackNavigation(){let t=Date.now()-this.botStartTimeStamp;if(this.botMessages.length>0){let i={audio:0,text:0};this.botMessages.forEach(n=>{"text"==n.messageType?i.text++:"audio"==n.messageType&&(i.audio++,this.audioRef&&(n.audio&&(n.audio.play=!1),this.audioRef.pause()))}),console.log("result count ",i),this.botMessageEvent.emit({audio:i.audio,text:i.text,duration:t/1e3})}else this.botMessageEvent.emit({audio:0,text:0,duration:t/1e3});this.botMessages=[]}cancelRecording(){var t=this;return(0,p.A)(function*(){console.log("cancel recording"),yield t.record.stopRecognition("audio").then(i=>{console.log("res on recorded data ",i)}),t.startRecording=!1})()}calculation(){if(!this.startRecording)return this.duration=0,void(this.durationDisplay="");this.duration+=1;const t=Math.floor(this.duration/60),i=(this.duration%60).toString().padStart(2,"0");this.durationDisplay=`${t}:${i}`,setTimeout(()=>{this.calculation()},1e3)}onLongPressStart(){var t=this;return(0,p.A)(function*(){console.log("long press start"),(yield(yield I.R.hasAudioRecordingPermission()).value)?t.record.startRecognition(""):yield I.R.requestAudioRecordingPermission()})()}onLongPressEnd(){var t=this;return(0,p.A)(function*(){console.log("long press end"),yield t.record.stopRecognition("audio").then(function(){var i=(0,p.A)(function*(n){if(console.log("result on recorded data ",n),n.value&&n.value.recordDataBase64){t.chat={identifier:"",message:"",messageType:"",displayMsg:"",audio:{file:"",duration:"",play:!1},type:"sent",time:(new Date).toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit"}),timeStamp:"",readMore:!1,likeMsg:!1,dislikeMsg:!1,requestId:""};const a=n.value.recordDataBase64;console.log("..................",n,t.durationDisplay);const d=(new Date).getTime()+".wav";yield _.YA.writeFile({path:d,directory:_.__.Data,data:a}),t.ngZone.run(()=>{t.chat.messageType="audio",t.chat.audio={file:d,base64Data:a,duration:t.getTimeString(n.value.msDuration),play:!1},t.chat.timeStamp=Date.now(),t.botMessages.push(t.chat),t.saveChatMessage(t.chat),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)}),t.botMessages.push(t.defaultLoaderMsg),t.content.scrollToBottom(300).then(()=>{t.content.scrollToBottom(300)})}),t.makeBotAPICall("",a)}});return function(n){return i.apply(this,arguments)}}())})()}getTimeString(t){let i=Math.floor(t/1e3/60),n=Math.floor(t/1e3-60*i);return i.toString().padStart(2,"0")+":"+n.toString().padStart(2,"0")}fetchAudioDuration(t){const i=new AudioContext;return fetch(t).then(n=>n.arrayBuffer()).then(n=>i.decodeAudioData(n)).then(n=>{const a=n.duration;return console.log(`The audio file duration is ${a} seconds`),Math.floor(a/60).toString().padStart(2,"0")+":"+Math.floor(a%60).toString().padStart(2,"0")}).catch(n=>"")}msgLiked(t,i){this.botMessages.forEach((n,a)=>{if(t.timeStamp==n.timeStamp){let r={id:this.botMessages[a-1].message,type:"Request"},m=[];m.push({id:t.requestId,type:"X-Request-ID"}),"text"==this.botMessages[a-1].messageType&&m.push(r),"like"==i?(n.likeMsg=!0,n.dislikeMsg=!1,this.messageApi.updateMessageReactions(n.identifier,1),this.telemetryGeneratorService.generateInteractTelemetry("TOUCH","message-liked","bot",`${this.config.type}-sakhi`,void 0,void 0,void 0,m)):(t.dislikeMsg=!0,t.likeMsg=!1,this.messageApi.updateMessageReactions(n.identifier,0),this.telemetryGeneratorService.generateInteractTelemetry("TOUCH","message-disliked","bot",`${this.config.type}-sakhi`,void 0,void 0,void 0,m))}})}}return(s=l).\u0275fac=function(t){return new(t||s)(e.rXU(M.XI),e.rXU(e.SKi),e.rXU(M.Ux),e.rXU(M.F_),e.rXU(R.c$),e.rXU(A.O),e.rXU(M.n$),e.rXU(w.OD))},s.\u0275cmp=e.VBU({type:s,selectors:[["app-bot-messages"]],viewQuery:function(t,i){if(1&t&&(e.GBs(j,5,e.aKT),e.GBs(f.W9,7)),2&t){let n;e.mGM(n=e.lsd())&&(i.recordbtn=n.first),e.mGM(n=e.lsd())&&(i.content=n.first)}},inputs:{config:"config"},outputs:{botMessageEvent:"botMessageEvent"},features:[e.OA$],decls:11,vars:10,consts:[["recordbtn",""],["id","content",3,"fullscreen"],["class","bot-content",4,"ngIf"],[1,"bot-input",3,"ngClass"],["aria-label","","value","","fill","outline","shape","round",3,"disabled","placeholder","ngModel","keyup.enter","ngModelChange","focus","blur",4,"ngIf"],["class","input_record",4,"ngIf"],[3,"ngClass"],["class","cancel-record",4,"ngIf"],["fill","clear","size","small",3,"touchstart","touchend","disabled"],["aria-hidden","true","class","audio-record-mic right icon","src","assets/icon/bot-audio.svg",3,"scrollY",4,"ngIf"],["class","audio-record-mic right icon","name","send",3,"click",4,"ngIf"],[1,"bot-content"],[4,"ngFor","ngForOf"],[3,"class","ngClass",4,"ngIf"],["class","action-div",4,"ngIf"],["fill","clear","size","small",3,"click",4,"ngIf"],["class","audio_msg",3,"click",4,"ngIf"],["class","time",4,"ngIf"],["fill","clear","size","small",3,"click"],[1,"audio_msg",3,"click"],[1,"play_audio"],["src","../../../assets/icon/play.svg","alt","",4,"ngIf"],["src","../../../assets/icon/pause.svg","alt","",4,"ngIf"],[1,"audio-wave"],["src","../../../assets/icon/waveform.svg","alt",""],["src","../../../assets/icon/play.svg","alt",""],["src","../../../assets/icon/pause.svg","alt",""],[1,"time"],[1,"action-div"],[1,"action_button",3,"click"],["class","like","aria-hidden","true","src","assets/icon/thumb-up.svg",4,"ngIf"],["aria-hidden","true","src","assets/icon/like.svg",4,"ngIf"],[1,"action_button","unlike",3,"click"],["aria-hidden","true","src","assets/icon/dislike.svg",4,"ngIf"],["aria-hidden","true","src","assets/icon/thumb-up.svg",1,"like"],["aria-hidden","true","src","assets/icon/like.svg"],["aria-hidden","true","src","assets/icon/dislike.svg"],["aria-label","","value","","fill","outline","shape","round",3,"keyup.enter","ngModelChange","focus","blur","disabled","placeholder","ngModel"],[1,"input_record"],["aria-hidden","true","name","mic",1,"audio-record-mic","on-record"],[1,"cancel-record"],["aria-hidden","true","src","assets/icon/bot-audio.svg",1,"audio-record-mic","right","icon",3,"scrollY"],["name","send",1,"audio-record-mic","right","icon",3,"click"]],template:function(t,i){if(1&t){const n=e.RV6();e.j41(0,"ion-content",1),e.DNE(1,H,2,1,"div",2),e.j41(2,"div",3),e.DNE(3,Z,2,5,"ion-input",4)(4,z,4,1,"div",5),e.j41(5,"div",6,0),e.DNE(7,Q,4,3,"ion-label",7),e.j41(8,"ion-button",8),e.bIt("touchstart",function(){return e.eBV(n),e.Njj(i.onLongPressStart())})("touchend",function(){return e.eBV(n),e.Njj(i.onLongPressEnd())}),e.DNE(9,ee,1,1,"ion-icon",9),e.k0s()(),e.DNE(10,te,1,0,"ion-icon",10),e.k0s()()}2&t&&(e.Y8G("fullscreen",!0),e.R7$(),e.Y8G("ngIf",i.botMessages.length>0),e.R7$(),e.Y8G("ngClass",i.keyboardOpen?"keyboard-open":""),e.R7$(),e.Y8G("ngIf",!i.startRecording),e.R7$(),e.Y8G("ngIf",i.startRecording),e.R7$(),e.Y8G("ngClass",i.startRecording?"cancel-div":""),e.R7$(2),e.Y8G("ngIf",i.startRecording),e.R7$(),e.Y8G("disabled",i.disabled),e.R7$(),e.Y8G("ngIf",0==i.textMessage.length),e.R7$(),e.Y8G("ngIf",i.textMessage.length>0))},dependencies:[b.YU,b.Sq,b.bT,P.BC,P.vS,f.Jm,f.W9,f.iq,f.$w,f.he,f.IO,f.Gw,R.D9],styles:["ion-content[_ngcontent-%COMP%]{--padding-top: 0px;height:90%}.bot-content[_ngcontent-%COMP%]{padding:1rem;overflow:auto}.bot-content[_ngcontent-%COMP%] .msg-block[_ngcontent-%COMP%]{margin-top:1rem}.bot-content__message[_ngcontent-%COMP%]{line-height:normal;letter-spacing:-.3px;background:var(--ion-color-primary-contrast);padding:1rem 1rem 10px;max-width:80%;position:relative;width:-moz-fit-content;width:fit-content;box-shadow:0 .25rem .25rem #0000000d;white-space:pre-line}.bot-content__message[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{display:flex}.bot-content__message[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{color:#00000040;display:flex;justify-content:flex-end;font-size:.688rem;letter-spacing:.031rem;padding-top:.25rem}.bot-content__message.received[_ngcontent-%COMP%]{border-radius:1rem 1rem 1rem 0px}.bot-content__message.sent[_ngcontent-%COMP%]{background:#dcf7c5;margin-left:auto;border-radius:1rem 1rem 0px}.bot-input[_ngcontent-%COMP%]{position:fixed;bottom:0;width:100%;padding:1rem;background:var(--ion-color-primary-contrast);box-shadow:0 -.33px #a6a6aa;display:flex;align-items:center}.bot-input[_ngcontent-%COMP%] ion-input[_ngcontent-%COMP%]{width:90%}.bot-input[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{margin:0}.bot-input[_ngcontent-%COMP%] .input_record[_ngcontent-%COMP%]{width:30%;display:flex;align-items:center}.bot-input[_ngcontent-%COMP%] .input_record[_ngcontent-%COMP%] ion-label[_ngcontent-%COMP%]{margin-left:1rem}.bot-input[_ngcontent-%COMP%] .cancel-div[_ngcontent-%COMP%]{display:flex;width:100%;margin-left:1rem;align-items:center}.bot-input[_ngcontent-%COMP%] .cancel-record[_ngcontent-%COMP%]{width:90%}.bot-input[_ngcontent-%COMP%] .audio-record-mic[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;fill:var(--ion-color-medium)}.bot-input[_ngcontent-%COMP%] .on-record[_ngcontent-%COMP%]{fill:var(--ion-color-primary)!important}.bot-input[_ngcontent-%COMP%] .sc-ion-input-md-h[_ngcontent-%COMP%]{height:2.25rem;min-height:auto;padding:0 .5rem!important;--border-color: gray;caret-color:gray!important;--highlight-color: gray !important;--highlight-color-focused: gray !important}.bot-input[_ngcontent-%COMP%] .keyboard-open[_ngcontent-%COMP%]{transform:translateY(-50%)}.audio_msg[_ngcontent-%COMP%]{display:flex;background:#c6dfc6;padding:5px;border-radius:10px}.audio_msg[_ngcontent-%COMP%] .play_audio[_ngcontent-%COMP%]{display:flex;flex-direction:column}.audio_msg[_ngcontent-%COMP%] .play_audio[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:8px;text-align:center}.audio_msg[_ngcontent-%COMP%] .audio-wave[_ngcontent-%COMP%]{padding-left:5px}.audio_msg[_ngcontent-%COMP%] .audio-wave[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:30px;height:30px}.audio_msg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:25px}.action-div[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem;margin-top:-.6rem;margin-left:.3rem}.action_button[_ngcontent-%COMP%]{padding:.1rem .5rem;width:-moz-fit-content;width:fit-content;box-shadow:0 .25rem .25rem #0000000d;white-space:pre-line;border-radius:16px;background:#fff;border:.1px solid grey;transform:scale(1)}.unlike[_ngcontent-%COMP%]{transform:scale(-1);margin-left:.75rem!important}"]}),l})()}}]); \ No newline at end of file diff --git a/www/4567.4054c293df40f0d0.js b/www/4567.4054c293df40f0d0.js deleted file mode 100644 index 40cbbec6..00000000 --- a/www/4567.4054c293df40f0d0.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkapp=self.webpackChunkapp||[]).push([[4567],{4567:(y,p,a)=>{"use strict";a.r(p),a.d(p,{MyPitaraPageModule:()=>F});var s=a(8974),d=a(177),u=a(9417),l=a(3021),g=a(467),_=a(5301),f=a(4733),h=a(56),P=a(5318),M=a.n(P),t=a(4438),b=a(3568),C=a(444),O=a(7803),v=a(5402);function w(i,c){1&i&&(t.j41(0,"div",15)(1,"div",16)(2,"div",17),t.EFF(3),t.nI1(4,"translate"),t.k0s()()()),2&i&&(t.R7$(3),t.JRh(t.bMT(4,1,"No contents")))}function k(i,c){if(1&i&&(t.j41(0,"ion-card"),t.nrm(1,"img",22),t.k0s()),2&i){const r=t.XpG().$implicit;t.R7$(),t.Y8G("src",r.metaData.thumbnail,t.B4B)}}function x(i,c){if(1&i&&(t.j41(0,"div",23),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i){const r=t.XpG().$implicit;t.R7$(),t.JRh(t.bMT(2,1,r.metaData.name))}}function T(i,c){if(1&i){const r=t.RV6();t.j41(0,"div",18)(1,"div",19),t.bIt("click",function(){const n=t.eBV(r).$implicit,o=t.XpG();return t.Njj(o.playContent(n))}),t.DNE(2,k,2,1,"ion-card",20)(3,x,3,3,"div",21),t.k0s()()}if(2&i){const r=c.$implicit;t.R7$(2),t.Y8G("ngIf",null==r||null==r.metaData?null:r.metaData.thumbnail),t.R7$(),t.Y8G("ngIf",null==r||null==r.metaData?null:r.metaData.name)}}function I(i,c){1&i&&(t.j41(0,"div",24)(1,"div",25),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&i&&(t.R7$(2),t.JRh(t.bMT(3,1,"Click on New Playlist button to create your first playlist")))}function D(i,c){if(1&i&&(t.j41(0,"div",34),t.EFF(1),t.k0s()),2&i){const r=t.XpG().$implicit;t.R7$(),t.SpI(" ",r.name," ")}}function R(i,c){if(1&i){const r=t.RV6();t.j41(0,"div")(1,"div",26),t.bIt("click",function(){const n=t.eBV(r).$implicit,o=t.XpG();return t.Njj(o.navigateToDetails(n))}),t.j41(2,"div",27)(3,"ion-card"),t.nrm(4,"img",28),t.k0s(),t.nrm(5,"div",29)(6,"div",30),t.k0s(),t.DNE(7,D,2,1,"div",31),t.j41(8,"div",32),t.bIt("click",function(){const n=t.eBV(r).$implicit,o=t.XpG();return t.Njj(o.openModal(n))}),t.nrm(9,"ion-icon",33),t.k0s()()()}if(2&i){const r=c.$implicit;t.R7$(7),t.Y8G("ngIf",null==r?null:r.name)}}const E=[{path:"",component:(()=>{var i;class c{constructor(e,n,o,m,$){this.headerService=e,this.contentService=n,this.router=o,this.playListService=m,this.modalCtrl=$,this.contentList=[],this.playlists=[],this.isNavigate=!0}ngOnInit(){var e=this;return(0,g.A)(function*(){e.headerService.deviceBackbtnEmitted$.subscribe(n=>{(n.name="backBtn")&&e.tabViewWillEnter()})})()}tabViewWillEnter(){var e=this;return(0,g.A)(function*(){yield e.headerService.showHeader("My Jaadui Pitara"),e.getRecentlyviewedContent(),e.getPlaylistContent()})()}ionViewWillEnter(){this.tabViewWillEnter()}viewAllCards(e){this.router.navigate(["/view-all"],{state:{type:e}})}getPlaylistContent(){var e=this;return(0,g.A)(function*(){e.playlists=[],yield e.playListService.getAllPlayLists("guest").then(n=>{e.playlists=n}).catch(n=>{console.log("error",n)})})()}getRecentlyviewedContent(){var e=this;return(0,g.A)(function*(){yield e.contentService.getRecentlyViewedContent("guest").then(n=>{e.contentList=n,e.contentList.forEach(o=>{var m;o.metaData.thumbnail=o.metaData.mimetype===h.Cc.YOUTUBE?e.loadYoutubeImg(o.metaData):!o.metaData.thumbnail||null!=o&&null!==(m=o.metaData.identifier)&&void 0!==m&&m.startsWith("do_")?f.O.getImagePath(o.metaData.mimeType||o.metaData.mimetype):o.metaData.thumbnail}),console.log("contentList",e.contentList)}).catch(n=>{console.log("error",n)})})()}createList(){this.router.navigate(["/create-playlist"])}deletePlaylist(e){var n=this;return(0,g.A)(function*(){yield n.playListService.deletePlayList(e.identifier).then(o=>{n.getPlaylistContent()}).catch(o=>{console.log("err",o)})})()}openModal(e){var n=this;return(0,g.A)(function*(){n.isNavigate=!1;const o=yield n.modalCtrl.create({component:_.J,cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield o.present(),o.onWillDismiss().then(m=>{n.isNavigate=!0,m.data&&"delete"===m.data.type?n.deletePlaylist(e):m.data&&"edit"===m.data.type&&n.router.navigate(["/create-playlist"],{state:{playlists:e,islocal:!0,status:"edit"}})})})()}loadYoutubeImg(e){let n=e.identifier;return n&&n.startsWith("do_")&&(n=M()(e.url)),`https://img.youtube.com/vi/${n}/mqdefault.jpg`}navigateToDetails(e){this.isNavigate&&this.router.navigate(["/playlist-details"],{state:{playlist:e}})}playContent(e){var n=this;return(0,g.A)(function*(){yield n.router.navigate(["/player"],{state:{content:e}})})()}}return(i=c).\u0275fac=function(e){return new(e||i)(t.rXU(b.U),t.rXU(C.f),t.rXU(l.Ix),t.rXU(O.q),t.rXU(s.W3))},i.\u0275cmp=t.VBU({type:i,selectors:[["app-mypitara"]],decls:26,vars:17,consts:[[3,"fullscreen"],[1,"grid-slider"],[1,"grid-slider__header"],[1,""],[1,"grid-slider__header__link",3,"click"],["class","viewed-content",4,"ngIf"],[1,"grid-slider__container"],["class","grid-slider__container__card",4,"ngFor","ngForOf"],[1,"playlist"],[1,"playlist__header"],[1,"playlist__header__button",3,"click"],["slot","end","aria-hidden","true","src","../../../assets/icon/Add-circle-outline.svg"],["class","playlist-bot",4,"ngIf"],[1,"playlist__container"],[4,"ngFor","ngForOf"],[1,"viewed-content"],[1,"viewed-content__info"],[1,"viewed-content__info__text"],[1,"grid-slider__container__card"],[3,"click"],[4,"ngIf"],["class","card-title",4,"ngIf"],["alt","",3,"src"],[1,"card-title"],[1,"playlist-bot"],[1,"playlist-bot__text"],[1,"playlist__container__items",3,"click"],[1,"playlist__container__items__cards"],["src","/assets/images/Playlist.png","alt",""],[1,"layer1"],[1,"layer2"],["class","playlist__container__items__metadata",4,"ngIf"],[1,"kabab-menu-icon",3,"click"],["slot","end","aria-hidden","true","src","../../../assets/icon/kabab-icon.svg"],[1,"playlist__container__items__metadata"]],template:function(e,n){1&e&&(t.j41(0,"ion-content",0)(1,"div",1)(2,"div",2)(3,"div",3),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"div",4),t.bIt("click",function(){return n.viewAllCards("recentlyviewed")}),t.EFF(7),t.nI1(8,"translate"),t.k0s()(),t.DNE(9,w,5,3,"div",5),t.j41(10,"div",6),t.DNE(11,T,4,2,"div",7),t.k0s()(),t.j41(12,"div",8)(13,"div",9)(14,"div",3),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"div",10),t.bIt("click",function(){return n.viewAllCards("playlist")}),t.j41(18,"ion-button"),t.EFF(19),t.nI1(20,"translate"),t.nrm(21,"ion-icon",11),t.k0s()()(),t.j41(22,"div"),t.DNE(23,I,4,3,"div",12),t.k0s(),t.j41(24,"div",13),t.DNE(25,R,10,1,"div",14),t.k0s()()()),2&e&&(t.Y8G("fullscreen",!0),t.R7$(4),t.JRh(t.bMT(5,9,"Recently Viewed")),t.R7$(3),t.JRh(t.bMT(8,11,"View All")),t.R7$(2),t.Y8G("ngIf",!n.contentList.length),t.R7$(2),t.Y8G("ngForOf",n.contentList),t.R7$(4),t.JRh(t.bMT(16,13,"My Playlist")),t.R7$(4),t.SpI("",t.bMT(20,15,"New Playlist")," "),t.R7$(4),t.Y8G("ngIf",!n.playlists.length),t.R7$(2),t.Y8G("ngForOf",n.playlists))},dependencies:[s.Jm,s.b_,s.W9,s.iq,d.Sq,d.bT,v.D9],styles:["ion-content[_ngcontent-%COMP%]{--padding-top: 35px !important}.grid-slider[_ngcontent-%COMP%]{padding:1rem;margin-top:7px}.grid-slider__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.75rem;color:var(--ion-color-dark);font-weight:700}.grid-slider__header__link[_ngcontent-%COMP%]{color:var(--ion-color-primary)}.grid-slider__container[_ngcontent-%COMP%]{display:grid;gap:.75rem;overflow-y:auto;overflow-x:auto;grid-auto-flow:column;justify-content:flex-start;padding:1rem 0 3rem}.grid-slider__container__card[_ngcontent-%COMP%]{width:7.5rem;height:4.5rem}.grid-slider__container__card[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%]{margin:0;box-shadow:none;border-radius:.5rem;height:100%}.grid-slider__container__card[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:4.5rem;width:100%}.grid-slider__container__card[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{font-size:.75rem;font-style:normal;font-weight:400;color:#2f2c2a;padding-top:.5rem;line-height:.875rem;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.playlist[_ngcontent-%COMP%]{padding:0 1rem;padding-top:0}.playlist__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:.75rem;color:var(--ion-color-dark);font-weight:700}.playlist__header__button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{padding-left:.5rem}.playlist__container[_ngcontent-%COMP%]{padding-top:1rem}.playlist__container__items[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:flex-start;align-items:flex-start;gap:.5rem;margin-bottom:1.5rem}.playlist__container__items__cards[_ngcontent-%COMP%]{width:7.5rem;height:4.5rem;min-width:7.5rem;position:relative}.playlist__container__items[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%]{margin:0;box-shadow:none;border-radius:.5rem;height:100%}.playlist__container__items[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%}.playlist__container__items[_ngcontent-%COMP%] .layer1[_ngcontent-%COMP%]{height:4.5rem;background-color:#7d7d7d;margin-top:-1px;position:absolute;top:-.188rem;width:calc(100% - 12px);left:.375rem;right:.375rem;border-radius:.5rem;z-index:-1}.playlist__container__items[_ngcontent-%COMP%] .layer2[_ngcontent-%COMP%]{position:absolute;top:-8px;width:calc(100% - 20px);height:100%;left:.625rem;right:.625rem;border-radius:.5rem;background:#c3c3c3;z-index:-2;opacity:.7}.playlist__container__items__metadata[_ngcontent-%COMP%]{font-size:.75rem;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-right:1.5rem}.playlist__container__items[_ngcontent-%COMP%] .kabab-menu-icon[_ngcontent-%COMP%]{position:absolute;right:1rem}.playlist__container__items[_ngcontent-%COMP%] .kabab-menu-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}[_nghost-%COMP%] ion-button[_ngcontent-%COMP%]{--background: var(--ion-color-primary-contrast);--color: var(--ion-color-secondary);--border-radius: 30px;--border-color: var(--ion-color-secondary);--border-style: solid;--border-width: 1px;--box-shadow: none}ion-modal[_ngcontent-%COMP%]{--height: fit-content}.btn-len[_ngcontent-%COMP%]{width:88%}.playlist-bot[_ngcontent-%COMP%]{text-align:center;position:absolute;left:50%;right:0;top:55%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:12px}.playlist-bot__image[_ngcontent-%COMP%]{height:7rem;width:7rem;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center}.playlist-bot__image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%}.playlist-bot__text[_ngcontent-%COMP%]{text-align:center;color:var(--ion-color-medium);font-size:.75rem}.viewed-content[_ngcontent-%COMP%]{padding:1.5rem}.viewed-content__info[_ngcontent-%COMP%]{position:absolute;left:50%;right:0;top:20%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center}.viewed-content__info__image[_ngcontent-%COMP%]{height:5rem;width:5rem;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center}.viewed-content__info__image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%}.viewed-content__info__text[_ngcontent-%COMP%]{text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),c})()}];let j=(()=>{var i;class c{}return(i=c).\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.$C({type:i}),i.\u0275inj=t.G2t({imports:[l.iI.forChild(E),l.iI]}),c})(),F=(()=>{var i;class c{}return(i=c).\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.$C({type:i}),i.\u0275inj=t.G2t({imports:[s.bv,d.MD,u.YN,j,v.h]}),c})()},4733:(y,p,a)=>{"use strict";a.d(p,{O:()=>d});var s=a(56);class d{static isTrackable(l){return(l=l.trackable?l:l.contentData&&l.contentData.trackable?l.contentData:l).trackable&&l.trackable.enabled?l.trackable.enabled===s.Th.YES?1:l.mimeType===s.z5.COLLECTION?0:-1:l.contentType&&l.contentType.toLowerCase()===s.cM.COURSE.toLowerCase()?1:l.mimeType===s.z5.COLLECTION?0:-1}static getMimeType(l){const g=l.split(".").pop();let _="";switch(null==g?void 0:g.toLowerCase()){case"mp4":_=s.z5.VIDEO;break;case"pdf":_=s.z5.PDF;break;case"mp3":case"m4a":_=s.z5.AUDIOS;break;case"wav":_=s.z5.RECOEDED_AUDIO;break;case"youtube":_=s.z5.YOUTUBE}return _}static getImagePath(l){return{mp3:"/assets/images/Audio.png",mp4:"/assets/images/Video.png",webm:"/assets/images/Video.png",pdf:"/assets/images/PDF.png"}[l.split("/").pop()]}}},5318:function(y){y.exports=function(a,s){if(null==s&&(s={fuzzy:!0}),/youtu\.?be/.test(a)){var d,u=[/youtu\.be\/([^#\&\?]{11})/,/\?v=([^#\&\?]{11})/,/\&v=([^#\&\?]{11})/,/embed\/([^#\&\?]{11})/,/\/v\/([^#\&\?]{11})/];for(d=0;d{"use strict";a.r(p),a.d(p,{MyPitaraPageModule:()=>$});var l=a(8974),g=a(177),u=a(9417),o=a(3021),_=a(467),m=a(5301),h=a(4733),P=a(56),M=a(5318),b=a.n(M),t=a(4438),C=a(3568),O=a(444),w=a(7803),f=a(5402);function k(i,d){1&i&&(t.j41(0,"div",15)(1,"div",16)(2,"div",17),t.EFF(3),t.nI1(4,"translate"),t.k0s()()()),2&i&&(t.R7$(3),t.JRh(t.bMT(4,1,"No contents")))}function x(i,d){if(1&i&&(t.j41(0,"ion-card"),t.nrm(1,"img",22),t.k0s()),2&i){const r=t.XpG().$implicit;t.R7$(),t.Y8G("src",r.metaData.thumbnail,t.B4B)}}function I(i,d){if(1&i&&(t.j41(0,"div",23),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&i){const r=t.XpG().$implicit;t.R7$(),t.JRh(t.bMT(2,1,r.metaData.name))}}function T(i,d){if(1&i){const r=t.RV6();t.j41(0,"div",18)(1,"div",19),t.bIt("click",function(){const n=t.eBV(r).$implicit,c=t.XpG();return t.Njj(c.playContent(n))}),t.DNE(2,x,2,1,"ion-card",20)(3,I,3,3,"div",21),t.k0s()()}if(2&i){const r=d.$implicit;t.R7$(2),t.Y8G("ngIf",null==r||null==r.metaData?null:r.metaData.thumbnail),t.R7$(),t.Y8G("ngIf",null==r||null==r.metaData?null:r.metaData.name)}}function D(i,d){1&i&&(t.j41(0,"div",24)(1,"div",25),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&i&&(t.R7$(2),t.JRh(t.bMT(3,1,"Click on New Playlist button to create your first playlist")))}function R(i,d){if(1&i&&(t.j41(0,"div",34),t.EFF(1),t.k0s()),2&i){const r=t.XpG().$implicit;t.R7$(),t.SpI(" ",r.name," ")}}function j(i,d){if(1&i){const r=t.RV6();t.j41(0,"div")(1,"div",26),t.bIt("click",function(){const n=t.eBV(r).$implicit,c=t.XpG();return t.Njj(c.navigateToDetails(n))}),t.j41(2,"div",27)(3,"ion-card"),t.nrm(4,"img",28),t.k0s(),t.nrm(5,"div",29)(6,"div",30),t.k0s(),t.DNE(7,R,2,1,"div",31),t.j41(8,"div",32),t.bIt("click",function(){const n=t.eBV(r).$implicit,c=t.XpG();return t.Njj(c.openModal(n))}),t.nrm(9,"ion-icon",33),t.k0s()()()}if(2&i){const r=d.$implicit;t.R7$(7),t.Y8G("ngIf",null==r?null:r.name)}}const E=[{path:"",component:(()=>{var i;class d{constructor(e,n,c,s,y){this.headerService=e,this.contentService=n,this.router=c,this.playListService=s,this.modalCtrl=y,this.contentList=[],this.playlists=[],this.isNavigate=!0}ngOnInit(){var e=this;return(0,_.A)(function*(){e.headerService.deviceBackbtnEmitted$.subscribe(n=>{(n.name="backBtn")&&e.tabViewWillEnter()})})()}tabViewWillEnter(){var e=this;return(0,_.A)(function*(){yield e.headerService.showHeader("My Jaadui Pitara"),e.getRecentlyviewedContent(),e.getPlaylistContent()})()}ionViewWillEnter(){this.tabViewWillEnter()}viewAllCards(e){this.router.navigate(["/view-all"],{state:{type:e}})}getPlaylistContent(){var e=this;return(0,_.A)(function*(){e.playlists=[],yield e.playListService.getAllPlayLists("guest").then(n=>{e.playlists=n}).catch(n=>{console.log("error",n)})})()}getRecentlyviewedContent(){var e=this;return(0,_.A)(function*(){yield e.contentService.getRecentlyViewedContent("guest").then(n=>{e.contentList=[];let c={};n.filter(s=>{var y;return!c[s.contentIdentifier]&&(c[s.contentIdentifier]=!0,e.contentList.push(s),s.metaData.thumbnail=s.metaData.mimetype===P.Cc.YOUTUBE?s.metaData.thumbnail:!s.metaData.thumbnail||null!=s&&null!==(y=s.metaData.identifier)&&void 0!==y&&y.startsWith("do_")?h.O.getImagePath(s.metaData.mimeType||s.metaData.mimetype):s.metaData.thumbnail,!0)})}).catch(n=>{console.log("error",n)})})()}createList(){this.router.navigate(["/create-playlist"])}deletePlaylist(e){var n=this;return(0,_.A)(function*(){yield n.playListService.deletePlayList(e.identifier).then(c=>{n.getPlaylistContent()}).catch(c=>{console.log("err",c)})})()}openModal(e){var n=this;return(0,_.A)(function*(){n.isNavigate=!1;const c=yield n.modalCtrl.create({component:m.J,cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield c.present(),c.onWillDismiss().then(s=>{n.isNavigate=!0,s.data&&"delete"===s.data.type?n.deletePlaylist(e):s.data&&"edit"===s.data.type&&n.router.navigate(["/create-playlist"],{state:{playlists:e,islocal:!0,status:"edit"}})})})()}loadYoutubeImg(e){let n=e.identifier;return n&&n.startsWith("do_")&&(n=b()(e.url)),`https://img.youtube.com/vi/${n}/mqdefault.jpg`}navigateToDetails(e){this.isNavigate&&this.router.navigate(["/playlist-details"],{state:{playlist:e}})}playContent(e){var n=this;return(0,_.A)(function*(){yield n.router.navigate(["/player"],{state:{content:e}})})()}}return(i=d).\u0275fac=function(e){return new(e||i)(t.rXU(C.U),t.rXU(O.f),t.rXU(o.Ix),t.rXU(w.q),t.rXU(l.W3))},i.\u0275cmp=t.VBU({type:i,selectors:[["app-mypitara"]],decls:26,vars:17,consts:[[3,"fullscreen"],[1,"grid-slider"],[1,"grid-slider__header"],[1,""],[1,"grid-slider__header__link",3,"click"],["class","viewed-content",4,"ngIf"],[1,"grid-slider__container"],["class","grid-slider__container__card",4,"ngFor","ngForOf"],[1,"playlist"],[1,"playlist__header"],[1,"playlist__header__button",3,"click"],["slot","end","aria-hidden","true","src","../../../assets/icon/Add-circle-outline.svg"],["class","playlist-bot",4,"ngIf"],[1,"playlist__container"],[4,"ngFor","ngForOf"],[1,"viewed-content"],[1,"viewed-content__info"],[1,"viewed-content__info__text"],[1,"grid-slider__container__card"],[3,"click"],[4,"ngIf"],["class","card-title",4,"ngIf"],["alt","",3,"src"],[1,"card-title"],[1,"playlist-bot"],[1,"playlist-bot__text"],[1,"playlist__container__items",3,"click"],[1,"playlist__container__items__cards"],["src","/assets/images/Playlist.png","alt",""],[1,"layer1"],[1,"layer2"],["class","playlist__container__items__metadata",4,"ngIf"],[1,"kabab-menu-icon",3,"click"],["slot","end","aria-hidden","true","src","../../../assets/icon/kabab-icon.svg"],[1,"playlist__container__items__metadata"]],template:function(e,n){1&e&&(t.j41(0,"ion-content",0)(1,"div",1)(2,"div",2)(3,"div",3),t.EFF(4),t.nI1(5,"translate"),t.k0s(),t.j41(6,"div",4),t.bIt("click",function(){return n.viewAllCards("recentlyviewed")}),t.EFF(7),t.nI1(8,"translate"),t.k0s()(),t.DNE(9,k,5,3,"div",5),t.j41(10,"div",6),t.DNE(11,T,4,2,"div",7),t.k0s()(),t.j41(12,"div",8)(13,"div",9)(14,"div",3),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"div",10),t.bIt("click",function(){return n.viewAllCards("playlist")}),t.j41(18,"ion-button"),t.EFF(19),t.nI1(20,"translate"),t.nrm(21,"ion-icon",11),t.k0s()()(),t.j41(22,"div"),t.DNE(23,D,4,3,"div",12),t.k0s(),t.j41(24,"div",13),t.DNE(25,j,10,1,"div",14),t.k0s()()()),2&e&&(t.Y8G("fullscreen",!0),t.R7$(4),t.JRh(t.bMT(5,9,"Recently Viewed")),t.R7$(3),t.JRh(t.bMT(8,11,"View All")),t.R7$(2),t.Y8G("ngIf",!n.contentList.length),t.R7$(2),t.Y8G("ngForOf",n.contentList),t.R7$(4),t.JRh(t.bMT(16,13,"My Playlist")),t.R7$(4),t.SpI("",t.bMT(20,15,"New Playlist")," "),t.R7$(4),t.Y8G("ngIf",!n.playlists.length),t.R7$(2),t.Y8G("ngForOf",n.playlists))},dependencies:[l.Jm,l.b_,l.W9,l.iq,g.Sq,g.bT,f.D9],styles:["ion-content[_ngcontent-%COMP%]{--padding-top: 35px !important}.grid-slider[_ngcontent-%COMP%]{padding:1rem;margin-top:7px}.grid-slider__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.75rem;color:var(--ion-color-dark);font-weight:700}.grid-slider__header__link[_ngcontent-%COMP%]{color:var(--ion-color-primary)}.grid-slider__container[_ngcontent-%COMP%]{display:grid;gap:.75rem;overflow-y:auto;overflow-x:auto;grid-auto-flow:column;justify-content:flex-start;padding:1rem 0 3rem}.grid-slider__container__card[_ngcontent-%COMP%]{width:7.5rem;height:4.5rem}.grid-slider__container__card[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%]{margin:0;box-shadow:none;border-radius:.5rem;height:100%}.grid-slider__container__card[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:4.5rem;width:100%}.grid-slider__container__card[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{font-size:.75rem;font-style:normal;font-weight:400;color:#2f2c2a;padding-top:.5rem;line-height:.875rem;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.playlist[_ngcontent-%COMP%]{padding:0 1rem;padding-top:0}.playlist__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:.75rem;color:var(--ion-color-dark);font-weight:700}.playlist__header__button[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{padding-left:.5rem}.playlist__container[_ngcontent-%COMP%]{padding-top:1rem}.playlist__container__items[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:flex-start;align-items:flex-start;gap:.5rem;margin-bottom:1.5rem}.playlist__container__items__cards[_ngcontent-%COMP%]{width:7.5rem;height:4.5rem;min-width:7.5rem;position:relative}.playlist__container__items[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%]{margin:0;box-shadow:none;border-radius:.5rem;height:100%}.playlist__container__items[_ngcontent-%COMP%] ion-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%}.playlist__container__items[_ngcontent-%COMP%] .layer1[_ngcontent-%COMP%]{height:4.5rem;background-color:#7d7d7d;margin-top:-1px;position:absolute;top:-.188rem;width:calc(100% - 12px);left:.375rem;right:.375rem;border-radius:.5rem;z-index:-1}.playlist__container__items[_ngcontent-%COMP%] .layer2[_ngcontent-%COMP%]{position:absolute;top:-8px;width:calc(100% - 20px);height:100%;left:.625rem;right:.625rem;border-radius:.5rem;background:#c3c3c3;z-index:-2;opacity:.7}.playlist__container__items__metadata[_ngcontent-%COMP%]{font-size:.75rem;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-right:1.5rem}.playlist__container__items[_ngcontent-%COMP%] .kabab-menu-icon[_ngcontent-%COMP%]{position:absolute;right:1rem}.playlist__container__items[_ngcontent-%COMP%] .kabab-menu-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}[_nghost-%COMP%] ion-button[_ngcontent-%COMP%]{--background: var(--ion-color-primary-contrast);--color: var(--ion-color-secondary);--border-radius: 30px;--border-color: var(--ion-color-secondary);--border-style: solid;--border-width: 1px;--box-shadow: none}ion-modal[_ngcontent-%COMP%]{--height: fit-content}.btn-len[_ngcontent-%COMP%]{width:88%}.playlist-bot[_ngcontent-%COMP%]{text-align:center;position:absolute;left:50%;right:0;top:55%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:12px}.playlist-bot__image[_ngcontent-%COMP%]{height:7rem;width:7rem;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center}.playlist-bot__image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%}.playlist-bot__text[_ngcontent-%COMP%]{text-align:center;color:var(--ion-color-medium);font-size:.75rem}.viewed-content[_ngcontent-%COMP%]{padding:1.5rem}.viewed-content__info[_ngcontent-%COMP%]{position:absolute;left:50%;right:0;top:20%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center}.viewed-content__info__image[_ngcontent-%COMP%]{height:5rem;width:5rem;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center}.viewed-content__info__image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%}.viewed-content__info__text[_ngcontent-%COMP%]{text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),d})()}];let F=(()=>{var i;class d{}return(i=d).\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.$C({type:i}),i.\u0275inj=t.G2t({imports:[o.iI.forChild(E),o.iI]}),d})(),$=(()=>{var i;class d{}return(i=d).\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.$C({type:i}),i.\u0275inj=t.G2t({imports:[l.bv,g.MD,u.YN,F,f.h]}),d})()},4733:(v,p,a)=>{"use strict";a.d(p,{O:()=>g});var l=a(56);class g{static isTrackable(o){return(o=o.trackable?o:o.contentData&&o.contentData.trackable?o.contentData:o).trackable&&o.trackable.enabled?o.trackable.enabled===l.Th.YES?1:o.mimeType===l.z5.COLLECTION?0:-1:o.contentType&&o.contentType.toLowerCase()===l.cM.COURSE.toLowerCase()?1:o.mimeType===l.z5.COLLECTION?0:-1}static getMimeType(o){const _=o.split(".").pop();let m="";switch(null==_?void 0:_.toLowerCase()){case"mp4":m=l.z5.VIDEO;break;case"pdf":m=l.z5.PDF;break;case"mp3":case"m4a":m=l.z5.AUDIOS;break;case"wav":m=l.z5.RECOEDED_AUDIO;break;case"youtube":m=l.z5.YOUTUBE}return m}static getImagePath(o){return{mp3:"/assets/images/Audio.png",mp4:"/assets/images/Video.png",webm:"/assets/images/Video.png",pdf:"/assets/images/PDF.png"}[o.split("/").pop()]}}},5318:function(v){v.exports=function(a,l){if(null==l&&(l={fuzzy:!0}),/youtu\.?be/.test(a)){var g,u=[/youtu\.be\/([^#\&\?]{11})/,/\?v=([^#\&\?]{11})/,/\&v=([^#\&\?]{11})/,/embed\/([^#\&\?]{11})/,/\/v\/([^#\&\?]{11})/];for(g=0;g{"use strict";i.r(h),i.d(h,{QrScanResultPageModule:()=>J});var d=i(177),l=i(9417),c=i(8974),g=i(3021),v=i(467),R=i(8666),y=i(7420),S=i(56),M=i(9441),D=i(2849),O=i(3649),t=i(4438),b=i(2904),T=i(444),x=i(5173),G=i(2297),Q=i(4254),P=i(5402);const I=()=>[0,1,2,3,4,5,6,7,8];function $(n,s){1&n&&(t.j41(0,"ion-item")(1,"div",5)(2,"div",6),t.nrm(3,"app-skeleton-item",7),t.k0s(),t.j41(4,"div",8)(5,"div",9),t.nrm(6,"app-skeleton-item",10),t.k0s(),t.j41(7,"div",11),t.nrm(8,"app-skeleton-item",10),t.k0s()()()())}function k(n,s){1&n&&(t.j41(0,"ion-list",3),t.DNE(1,$,9,0,"ion-item",4),t.k0s()),2&n&&(t.R7$(),t.Y8G("ngForOf",t.lJ4(1,I)))}function j(n,s){1&n&&(t.j41(0,"div",12),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"CONTENT_IS_BEING_ADDED")))}function w(n,s){1&n&&(t.j41(0,"div",17)(1,"div",18),t.nrm(2,"img",19),t.j41(3,"div",20),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",18),t.nrm(7,"img",21),t.j41(8,"div",20),t.EFF(9),t.nI1(10,"translate"),t.k0s()()()),2&n&&(t.R7$(4),t.JRh(t.bMT(5,2,"Make a Story")),t.R7$(5),t.JRh(t.bMT(10,4,"Ask a Doubt")))}function B(n,s){if(1&n&&t.nrm(0,"img",27),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Audio.png",t.B4B)}}function F(n,s){if(1&n&&t.nrm(0,"img",28),2&n){const e=t.XpG(2).$implicit;t.Y8G("appThumbnail",null==e?null:e.metaData)}}function E(n,s){if(1&n&&t.nrm(0,"img",27),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/Video.png",t.B4B)}}function X(n,s){if(1&n&&t.nrm(0,"img",27),2&n){const e=t.XpG(2).$implicit;t.Y8G("src",null!=e&&null!=e.metaData&&e.metaData.thumbnail&&!e.metaData.identifier.startsWith("do_")?null==e||null==e.metaData?null:e.metaData.thumbnail:"assets/images/PDF.png",t.B4B)}}function Y(n,s){if(1&n){const e=t.RV6();t.j41(0,"div",5)(1,"div",22),t.bIt("click",function(o){t.eBV(e);const r=t.XpG().$implicit,u=t.XpG(2);return t.Njj(u.playContent(o,r))}),t.DNE(2,B,1,1,"img",23)(3,F,1,1,"img",24)(4,E,1,1,"img",23)(5,X,1,1,"img",23),t.k0s(),t.j41(6,"div",8)(7,"div",25),t.EFF(8),t.k0s(),t.j41(9,"ion-icon",26),t.bIt("click",function(){t.eBV(e);const o=t.XpG().$implicit,r=t.XpG(2);return t.Njj(r.moreOtions(o))}),t.k0s()()()}if(2&n){const e=t.XpG().$implicit,a=t.XpG(2);t.R7$(2),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.AUDIO),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.YOUTUBE&&!e.play),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.MP4||e.metaData.mimetype===a.mimeType.WEBM),t.R7$(),t.Y8G("ngIf",e.metaData.mimetype===a.mimeType.PDF),t.R7$(3),t.JRh(null==e.metaData?null:e.metaData.name)}}function A(n,s){if(1&n&&(t.j41(0,"div",14),t.DNE(1,w,11,6,"div",15)(2,Y,10,5,"div",16),t.k0s()),2&n){const e=s.$implicit;t.R7$(),t.Y8G("ngIf",!e.metaData||!e.metaData.name),t.R7$(),t.Y8G("ngIf",e.metaData&&e.metaData.name)}}function N(n,s){if(1&n&&(t.j41(0,"div"),t.DNE(1,A,3,2,"div",13),t.k0s()),2&n){const e=t.XpG();t.R7$(),t.Y8G("ngForOf",e.configContents)}}const U=[{path:"",component:(()=>{var n;class s{constructor(a,o,r,u,m,H){var f;this.headerService=a,this.location=o,this.modalCtrl=r,this.contentService=u,this.router=m,this.telemetryGeneratorService=H,this.optModalOpen=!1,this.showSheenAnimation=!0,this.scanText="",this.mimeType=S.Cc,this.navigated=!1;let C=null===(f=this.router.getCurrentNavigation())||void 0===f?void 0:f.extras;var p;C&&(this.scanText=null===(p=C.state)||void 0===p?void 0:p.scannedData,console.log("scan text ",this.scanText))}tabViewWillEnter(){this.headerService.showHeader("QR Scan Result",!0,[]),this.headerService.showStatusBar(!1)}ngOnInit(){this.headerService.headerEventEmitted$.subscribe(a=>{"back"==a&&!this.navigated&&(this.navigated=!0,this.location.back())}),this.configContents=[]}ionViewWillEnter(){this.navigated=!1,this.headerService.showHeader("QR Scan Result",!0,[]),this.headerService.showStatusBar(!1),this.contentService.getContents(this.scanText).then(a=>{this.showSheenAnimation=!1,console.log("Result: ",a),this.configContents=a}).catch(a=>{this.showSheenAnimation=!1})}playContent(a,o){var r=this;return(0,v.A)(function*(){r.contentService.markContentAsViewed(o),yield r.router.navigate(["/player"],{state:{content:o}})})()}moreOtions(a){var o=this;return(0,v.A)(function*(){let r;o.optModalOpen||(o.optModalOpen=!0,r=yield o.modalCtrl.create({component:D.q,componentProps:{content:a},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield r.present()),r.onDidDismiss().then(function(){var u=(0,v.A)(function*(m){o.optModalOpen=!1,m.data&&"addToPitara"===m.data.type?o.addContentToMyPitara(m.data.content||a):m.data&&"like"==m.data.type&&(o.contentService.likeContent(m.data.content||a,"guest",!0),m.data.content.metaData.isLiked&&(yield R.Q.play({assetId:"windchime"}),(0,y.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})),o.telemetryGeneratorService.generateInteractTelemetry("TOUCH","content-liked","qr-scan-result","qr-scan-result",new O.$i(null==a?void 0:a.metaData.identifier,null==a?void 0:a.metaData.mimetype,"")))});return function(m){return u.apply(this,arguments)}}())})()}addContentToMyPitara(a){var o=this;return(0,v.A)(function*(){const r=yield o.modalCtrl.create({component:M.$,componentProps:{content:a},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield r.present(),r.onWillDismiss().then(u=>{})})()}}return(n=s).\u0275fac=function(a){return new(a||n)(t.rXU(b.Ux),t.rXU(d.aZ),t.rXU(c.W3),t.rXU(T.f),t.rXU(g.Ix),t.rXU(x.O))},n.\u0275cmp=t.VBU({type:n,selectors:[["app-qr-scan-result"]],decls:4,vars:3,consts:[["class","m-n",4,"ngIf"],["class","text-not-available",4,"ngIf"],[4,"ngIf"],[1,"m-n"],[4,"ngFor","ngForOf"],[1,"card"],["item-start","",1,"card__img"],["height","15rem","width","22rem","radius","16px"],[1,"card__metadata"],[2,"width","90%"],["height","12px","width","100%"],[2,"padding-left","1.5rem","width","10%"],[1,"text-not-available"],["class","cards-container",4,"ngFor","ngForOf"],[1,"cards-container"],["class","bot-section",4,"ngIf"],["class","card",4,"ngIf"],[1,"bot-section"],[1,"image"],["src","assets/images/Story_bot.svg","alt",""],[1,"image-title"],["src","assets/images/Question_bot.svg","alt",""],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],["appThumbnail","","alt","",3,"appThumbnail",4,"ngIf"],[1,"card__title"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",3,"click"],["alt","",3,"src"],["appThumbnail","","alt","",3,"appThumbnail"]],template:function(a,o){1&a&&(t.j41(0,"ion-content"),t.DNE(1,k,2,2,"ion-list",0)(2,j,3,3,"div",1)(3,N,2,1,"div",2),t.k0s()),2&a&&(t.R7$(),t.Y8G("ngIf",o.showSheenAnimation),t.R7$(),t.Y8G("ngIf",!o.configContents.length&&!o.showSheenAnimation),t.R7$(),t.Y8G("ngIf",!o.showSheenAnimation&&o.configContents.length>0))},dependencies:[d.Sq,d.bT,c.W9,c.iq,c.uz,c.nf,G.O,Q.g,P.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-content[_ngcontent-%COMP%]{--padding-top: 5rem !important}ion-list[_ngcontent-%COMP%]{background-color:transparent}ion-item[_ngcontent-%COMP%]{--background: transparent}.text-not-available[_ngcontent-%COMP%]{position:absolute;left:30%;right:0;top:20%;transform:translate(-20%,-20%);text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),s})()}];let V=(()=>{var n;class s{}return(n=s).\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.$C({type:n}),n.\u0275inj=t.G2t({imports:[g.iI.forChild(U),g.iI]}),s})();var W=i(5553),z=i(3721);let J=(()=>{var n;class s{}return(n=s).\u0275fac=function(a){return new(a||n)},n.\u0275mod=t.$C({type:n}),n.\u0275inj=t.G2t({imports:[d.MD,l.YN,c.bv,V,P.h,W.h,z.h]}),s})()},5318:function(_){_.exports=function(i,d){if(null==d&&(d={fuzzy:!0}),/youtu\.?be/.test(i)){var l,c=[/youtu\.be\/([^#\&\?]{11})/,/\?v=([^#\&\?]{11})/,/\&v=([^#\&\?]{11})/,/embed\/([^#\&\?]{11})/,/\/v\/([^#\&\?]{11})/];for(l=0;l{"use strict";r.d(_,{s3:()=>f});const f=(0,r(5083).F3)("Keyboard")},1983:(v,_,r)=>{"use strict";r.r(_),r.d(_,{SearchPageModule:()=>q});var u=r(177),g=r(9417),d=r(8974),f=r(3021),h=r(467),M=r(56),b=r(2849),x=r(9441),O=r(3649),D=r(334),t=r(4438),C=r(5402);let k=(()=>{var o;class m{constructor(n){this.modalCtrl=n}ngOnInit(){}hadleAudioSearch(){this.modalCtrl.dismiss("search")}}return(o=m).\u0275fac=function(n){return new(n||o)(t.rXU(d.W3))},o.\u0275cmp=t.VBU({type:o,selectors:[["app-recording-alert"]],decls:15,vars:6,consts:[["lines","none"],[1,"record_audio"],[1,"msg_speak"],[1,"circle_ripple"],[1,"circle_ripple-2"],[1,"circle"],[1,"circle-2"],["aria-hidden","true","src","assets/icon/mic.svg"],[1,"search_div"],[3,"click"]],template:function(n,i){1&n&&(t.j41(0,"div")(1,"ion-item",0)(2,"ion-label",1),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.j41(5,"div",2),t.nrm(6,"div",3)(7,"div",4),t.j41(8,"div",5)(9,"div",6),t.nrm(10,"ion-icon",7),t.k0s()()(),t.j41(11,"div",8)(12,"ion-button",9),t.bIt("click",function(){return i.hadleAudioSearch()}),t.EFF(13),t.nI1(14,"translate"),t.k0s()()()),2&n&&(t.R7$(3),t.JRh(t.bMT(4,2,"Speak...")),t.R7$(10),t.JRh(t.bMT(14,4,"Search")))},dependencies:[d.Jm,d.iq,d.uz,d.he,C.D9],styles:[".record_audio[_ngcontent-%COMP%]{font-size:20px;margin:.5rem 0 0 .5rem}.search_div[_ngcontent-%COMP%]{position:absolute;top:33%;left:50%;transform:translate(-50%,-50%)}.msg_speak[_ngcontent-%COMP%]{position:absolute;left:40%;top:-2%;bottom:100%;transform:translate(-50%)}.msg_speak[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:2rem!important;width:2rem!important}.circle_ripple[_ngcontent-%COMP%]{height:50px;width:50px;background:#36b37e;border-radius:50%;animation:_ngcontent-%COMP%_ripple 2s infinite;position:absolute;left:10px;top:110px;z-index:0}.circle_ripple-2[_ngcontent-%COMP%]{height:50px;width:50px;background:#36b37e;border-radius:50%;animation:_ngcontent-%COMP%_ripple-2 2s infinite;position:absolute;left:10px;top:110px}@keyframes _ngcontent-%COMP%_ripple{0%{transform:scale(1)}50%{transform:scale(2);opacity:.3}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_ripple-2{0%{transform:scale(1)}50%{transform:scale(2.5);opacity:.3}to{transform:scale(1)}}.circle[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:50%;background:#eaeaea;position:absolute;left:5px;top:105px}.circle-2[_ngcontent-%COMP%]{width:50px;height:50px;border-radius:50%;background:#fff;position:absolute;left:5px;top:5px;box-shadow:0 0 8px #00000029;z-index:2}.circle-2[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{font-size:20px;position:absolute;left:10px;top:10px}"]}),m})();var R=r(8666),T=r(7420),P=r(5293),S=r(2904),w=r(9836),A=r(2186),G=r(444),I=r(5173),j=r(2297),B=r(4254);const F=["searchInput"],$=()=>[0,1,2,3,4,5,6,7,8];function X(o,m){1&o&&(t.j41(0,"ion-item",16)(1,"div",17),t.nrm(2,"app-skeleton-item",18),t.k0s(),t.j41(3,"ion-label",19),t.nrm(4,"app-skeleton-item",20)(5,"app-skeleton-item",21),t.k0s(),t.j41(6,"ion-label",22),t.nrm(7,"app-skeleton-item",23),t.k0s()())}function Y(o,m){1&o&&(t.j41(0,"ion-list",12)(1,"ion-item",13)(2,"ion-label",14),t.EFF(3),t.nI1(4,"translate"),t.k0s()(),t.DNE(5,X,8,0,"ion-item",15),t.k0s()),2&o&&(t.R7$(3),t.JRh(t.bMT(4,2,"Searching...")),t.R7$(2),t.Y8G("ngForOf",t.lJ4(4,$)))}function U(o,m){if(1&o&&(t.j41(0,"ion-list")(1,"ion-item",13)(2,"ion-label",24),t.EFF(3),t.nI1(4,"translate"),t.k0s()()()),2&o){const a=t.XpG();t.R7$(3),t.JRh(t.bMT(4,1,a.errMsg))}}function E(o,m){if(1&o&&t.nrm(0,"img",33),2&o){const a=t.XpG().$implicit;t.Y8G("src",null!=a&&null!=a.metaData&&a.metaData.thumbnail&&!a.metaData.identifier.startsWith("do_")?null==a||null==a.metaData?null:a.metaData.thumbnail:"assets/images/Audio.png",t.B4B)}}function N(o,m){if(1&o&&t.nrm(0,"img",34),2&o){const a=t.XpG().$implicit;t.Y8G("appThumbnail",null==a?null:a.metaData)}}function V(o,m){if(1&o&&t.nrm(0,"img",33),2&o){const a=t.XpG().$implicit;t.Y8G("src",null!=a&&null!=a.metaData&&a.metaData.thumbnail&&!a.metaData.identifier.startsWith("do_")?null==a||null==a.metaData?null:a.metaData.thumbnail:"assets/images/Video.png",t.B4B)}}function L(o,m){if(1&o&&t.nrm(0,"img",33),2&o){const a=t.XpG().$implicit;t.Y8G("src",null!=a&&null!=a.metaData&&a.metaData.thumbnail&&!a.metaData.identifier.startsWith("do_")?null==a||null==a.metaData?null:a.metaData.thumbnail:"assets/images/PDF.png",t.B4B)}}function W(o,m){if(1&o&&t.nrm(0,"img",33),2&o){const a=t.XpG().$implicit;t.Y8G("src",null!=a&&null!=a.metaData&&a.metaData.thumbnail&&!a.metaData.identifier.startsWith("do_")?null==a||null==a.metaData?null:a.metaData.thumbnail:"assets/images/LINK.png",t.B4B)}}function K(o,m){if(1&o){const a=t.RV6();t.j41(0,"ion-item",26)(1,"div",27),t.bIt("click",function(i){const e=t.eBV(a).$implicit,c=t.XpG(2);return t.Njj(c.playContent(i,e))}),t.DNE(2,E,1,1,"img",28)(3,N,1,1,"img",29)(4,V,1,1,"img",28)(5,L,1,1,"img",28)(6,W,1,1,"img",28),t.k0s(),t.j41(7,"div",30)(8,"div",31),t.EFF(9),t.k0s(),t.j41(10,"ion-icon",32),t.bIt("click",function(){const i=t.eBV(a).$implicit,e=t.XpG(2);return t.Njj(e.moreOtions(i))}),t.k0s()()()}if(2&o){const a=m.$implicit,n=t.XpG(2);t.R7$(2),t.Y8G("ngIf",a.metaData.mimetype===n.mimeType.AUDIO),t.R7$(),t.Y8G("ngIf",a.metaData.mimetype===n.mimeType.YOUTUBE),t.R7$(),t.Y8G("ngIf",a.metaData.mimetype===n.mimeType.MP4),t.R7$(),t.Y8G("ngIf",a.metaData.mimetype===n.mimeType.PDF),t.R7$(),t.Y8G("ngIf","text/html"===(null==a||null==a.metaData?null:a.metaData.mimetype)),t.R7$(3),t.JRh(null==a.metaData?null:a.metaData.name)}}function z(o,m){if(1&o&&(t.j41(0,"ion-list"),t.DNE(1,K,11,6,"ion-item",25),t.k0s()),2&o){const a=t.XpG();t.R7$(),t.Y8G("ngForOf",a.searchContentResult)}}const J=[{path:"",component:(()=>{var o;class m{constructor(n,i,e,c,l,p,s,y,tt){this.headerService=n,this.location=i,this.record=e,this.searchApi=c,this.modalCtrl=l,this.contentService=p,this.router=s,this.telemetryGeneratorService=y,this.storage=tt,this.showSheenAnimation=!1,this.searchKeywords="",this.searchContentResult=[],this.optModalOpen=!1,this.mimeType=M.Cc,this.noSearchData=!1,this.errMsg="",this.modalPresent=!1,this.disabled=!1,this.startRecording=!1,this.duration=0,this.durationDisplay=""}tabViewWillEnter(){this.headerService.hideHeader(),this.headerService.showStatusBar(!1)}ngOnInit(){}navigateBack(){this.location.back()}ionViewWillEnter(){this.headerService.hideHeader(),this.headerService.showStatusBar(!1)}handleSearch(n,i=!1){var e=this;return(0,h.A)(function*(){if(i){e.showSheenAnimation=!0;let s=yield e.makeSearchContextApiCall(n,i);var c;null!=s&&s.input?(null!==(c=s.input)&&void 0!==c&&c.sourceText&&(e.searchKeywords=s.input.sourceText),e.handleContentSearch(s,i)):(e.disabled=!1,e.showSheenAnimation=!1,e.noSearchData=!0,e.searchContentResult=[],e.errMsg="Sorry, please try again!")}else if(e.searchKeywords.replace(/\s/g,"").length>0){var l;e.showSheenAnimation=!0,D.s3.hide();let s=yield e.makeSearchContextApiCall(e.searchKeywords,i);var p;null!=s&&null!==(l=s.input)&&void 0!==l&&l.sourceText&&(e.searchKeywords=null==s||null===(p=s.input)||void 0===p?void 0:p.sourceText),e.handleContentSearch(s,!1)}})()}makeSearchContextApiCall(n,i){var e=this;return(0,h.A)(function*(){return yield e.searchApi.postSearchContext({text:n,currentLang:yield e.storage.getData("lang")},i).then(c=>c).catch(c=>{var l;i?(e.disabled=!1,e.showSheenAnimation=!1,e.noSearchData=!0,e.searchContentResult=[],e.errMsg="unsupported language!"==(null==c||null===(l=c.body)||void 0===l||null===(l=l.detail)||void 0===l?void 0:l.toLowerCase())?"Sorry, this language is not currently supported.":"Sorry, please try again!"):e.handleContentSearch("",!1)})})()}handleContentSearch(n,i=!1){var e=this;return(0,h.A)(function*(){var c;let l={name:null!==(c=null==n?void 0:n.context)&&void 0!==c?c:e.searchKeywords};yield e.searchApi.postContentSearch(l,yield e.storage.getData("lang")).then(p=>{if(console.log("searchRes ",p),e.telemetryGeneratorService.generateSearchTelemetry(i?"audio":"text",i?"":e.searchKeywords,p.length,"search",""),e.disabled=!1,p.length>0){e.showSheenAnimation=!1,e.noSearchData=!1;let s={};e.searchContentResult=[],p.forEach(y=>{s={},s.source="djp",s.sourceType="djp-content",s.metaData=y,e.searchContentResult.push(s)})}else e.showSheenAnimation=!1,e.noSearchData=!0,e.searchContentResult=[],e.errMsg="No Result"}).catch(p=>{var s;e.disabled=!1,e.showSheenAnimation=!1,e.noSearchData=!0,e.searchContentResult=[],e.errMsg="unsupported language!"==(null==p||null===(s=p.body)||void 0===s||null===(s=s.detail)||void 0===s?void 0:s.toLowerCase())?"Sorry, this language is not currently supported.":"Sorry, please try again!"})})()}moreOtions(n){var i=this;return(0,h.A)(function*(){let e;i.optModalOpen||(i.optModalOpen=!0,e=yield i.modalCtrl.create({component:b.q,componentProps:{content:n},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield e.present()),e.onDidDismiss().then(function(){var c=(0,h.A)(function*(l){i.optModalOpen=!1,l.data&&"addToPitara"===l.data.type?i.addContentToMyPitara(l.data.content||n):l.data&&"like"==l.data.type&&(i.contentService.likeContent(l.data.content||n,"guest",!0),l.data.content.metaData.isLiked&&(yield R.Q.play({assetId:"windchime"}),(0,T.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})),i.telemetryGeneratorService.generateInteractTelemetry("TOUCH","content-liked","search","search",new O.$i(null==n?void 0:n.metaData.identifier,null==n?void 0:n.metaData.mimetype,"")))});return function(l){return c.apply(this,arguments)}}())})()}addContentToMyPitara(n){var i=this;return(0,h.A)(function*(){const e=yield i.modalCtrl.create({component:x.$,componentProps:{content:n},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield e.present(),e.onWillDismiss().then(c=>{})})()}playContent(n,i){var e=this;return(0,h.A)(function*(){e.contentService.markContentAsViewed(i),yield e.router.navigate(["/player"],{state:{content:i}})})()}onLongPressStart(){var n=this;return(0,h.A)(function*(){console.log("long press on search start"),n.searchKeywords="",(yield(yield P.R.hasAudioRecordingPermission()).value)?(n.record.startRecognition("search"),n.disabled=!0,n.startRecording=!0,n.presentPopover(event),n.calculation()):yield P.R.requestAudioRecordingPermission()})()}presentPopover(n){var i=this;return(0,h.A)(function*(){i.modal=yield i.modalCtrl.create({component:k,cssClass:"sheet-modal",breakpoints:[.4],showBackdrop:!1,initialBreakpoint:.4,handle:!1,handleBehavior:"none"}),i.modalPresent=!0,yield i.modal.present(),yield i.modal.onDidDismiss().then(e=>{"search"===e.data&&i.onLongPressEnd()})})()}calculation(){if(!this.startRecording)return this.duration=0,void(this.durationDisplay="");this.duration+=1;const n=Math.floor(this.duration/60),i=(this.duration%60).toString().padStart(2,"0");this.durationDisplay=`${n}:${i}`,this.durationDisplay>"0:05"&&this.onLongPressEnd(),setTimeout(()=>{this.calculation()},1e3)}onLongPressEnd(){var n=this;return(0,h.A)(function*(){console.log("long press on search end"),yield n.record.stopRecognition("search").then(function(){var i=(0,h.A)(function*(e){n.modalPresent&&(n.modalPresent=!1,yield n.modal.dismiss()),n.startRecording=!1,n.handleSearch(e,!0)});return function(e){return i.apply(this,arguments)}}())})()}}return(o=m).\u0275fac=function(n){return new(n||o)(t.rXU(S.Ux),t.rXU(u.aZ),t.rXU(w.X),t.rXU(A.S),t.rXU(d.W3),t.rXU(G.f),t.rXU(f.Ix),t.rXU(I.O),t.rXU(S.n$))},o.\u0275cmp=t.VBU({type:o,selectors:[["app-search"]],viewQuery:function(n,i){if(1&n&&t.GBs(F,5),2&n){let e;t.mGM(e=t.lsd())&&(i.searchBar=e.first)}},decls:16,vars:9,consts:[["searchInput",""],[1,"custom-header"],[1,"header-content"],["slot","start",1,"start-icon"],[3,"click"],["aria-hidden","true","src","assets/icon/back.svg"],["type","search","fill","outline","shape","round",3,"keyup.enter","ngModelChange","disabled","ngModel","placeholder"],["slot","end"],[3,"click","disabled"],["aria-hidden","true","src","assets/icon/mic.svg"],["class","m-n",4,"ngIf"],[4,"ngIf"],[1,"m-n"],["lines","none"],[1,"ion-text-center"],["lines","none","style","padding: 5px;",4,"ngFor","ngForOf"],["lines","none",2,"padding","5px"],["item-start","",2,"border-radius","16px"],["height","100px","width","200px","radius","16px",2,"border-radius","16px"],[2,"padding-left","10px"],["height","12px","width","100px",2,"padding-bottom","8px"],["height","12px","width","80px",2,"padding-bottom","8px"],[2,"padding-left","30px"],["height","12px","width","10px",2,"padding-bottom","8px"],[1,"no-data"],["lines","none","class","card",4,"ngFor","ngForOf"],["lines","none",1,"card"],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],["appThumbnail","","alt","",3,"appThumbnail",4,"ngIf"],[1,"card__metadata"],[1,"card__title"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",3,"click"],["alt","",3,"src"],["appThumbnail","","alt","",3,"appThumbnail"]],template:function(n,i){if(1&n){const e=t.RV6();t.j41(0,"ion-header")(1,"ion-toolbar",1)(2,"div",2)(3,"ion-buttons",3)(4,"ion-button",4),t.bIt("click",function(){return t.eBV(e),t.Njj(i.navigateBack())}),t.nrm(5,"ion-icon",5),t.k0s()(),t.j41(6,"ion-input",6,0),t.nI1(8,"translate"),t.bIt("keyup.enter",function(){return t.eBV(e),t.Njj(i.handleSearch())})("ngModelChange",function(){return t.eBV(e),t.Njj(!i.searchContentResult)}),t.mxI("ngModelChange",function(l){return t.eBV(e),t.DH7(i.searchKeywords,l)||(i.searchKeywords=l),t.Njj(l)}),t.k0s(),t.j41(9,"ion-buttons",7)(10,"ion-button",8),t.bIt("click",function(){return t.eBV(e),t.Njj(i.onLongPressStart())}),t.nrm(11,"ion-icon",9),t.k0s()()()()(),t.j41(12,"ion-content"),t.DNE(13,Y,6,5,"ion-list",10)(14,U,5,3,"ion-list",11)(15,z,2,1,"ion-list",11),t.k0s()}2&n&&(t.R7$(6),t.Y8G("disabled",i.disabled),t.R50("ngModel",i.searchKeywords),t.Y8G("placeholder",t.bMT(8,7,"SEARCH_HINT")),t.R7$(4),t.Y8G("disabled",i.disabled),t.R7$(3),t.Y8G("ngIf",i.showSheenAnimation),t.R7$(),t.Y8G("ngIf",!i.showSheenAnimation&&i.noSearchData),t.R7$(),t.Y8G("ngIf",!i.showSheenAnimation&&i.searchContentResult.length>0))},dependencies:[u.Sq,u.bT,g.BC,g.vS,d.Jm,d.QW,d.W9,d.eU,d.iq,d.$w,d.uz,d.he,d.nf,d.ai,d.Gw,j.O,B.g,C.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-header[_ngcontent-%COMP%]{box-shadow:none}ion-header[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{color:var(--ion-color-primary)}ion-content[_ngcontent-%COMP%]{--padding-top: 0 !important}.header-content[_ngcontent-%COMP%]{display:flex} .toolbar-container{padding:0!important;min-height:auto}ion-input[_ngcontent-%COMP%]{margin-top:.5rem;min-height:3rem!important;--border-color: var(--ion-color-medium) !important;--highlight-color: var(--ion-color-secondary-contrast) !important}ion-icon[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;margin-left:0}.card__img[_ngcontent-%COMP%]{width:40%;height:auto}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%!important}.card__metadata[_ngcontent-%COMP%]{padding-top:0;padding-left:1rem;align-items:center;width:60%;height:90%}ion-list[_ngcontent-%COMP%]{background-color:transparent}ion-item[_ngcontent-%COMP%]{--background: transparent}.search_text[_ngcontent-%COMP%]{text-align:center}"]}),m})()}];let H=(()=>{var o;class m{}return(o=m).\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.$C({type:o}),o.\u0275inj=t.G2t({imports:[f.iI.forChild(J),f.iI]}),m})();var Q=r(3721),Z=r(5553);let q=(()=>{var o;class m{}return(o=m).\u0275fac=function(n){return new(n||o)},o.\u0275mod=t.$C({type:o}),o.\u0275inj=t.G2t({imports:[u.MD,g.YN,d.bv,H,C.h,Z.h,Q.h]}),m})()},5318:function(v){v.exports=function(r,u){if(null==u&&(u={fuzzy:!0}),/youtu\.?be/.test(r)){var g,d=[/youtu\.be\/([^#\&\?]{11})/,/\?v=([^#\&\?]{11})/,/\&v=([^#\&\?]{11})/,/embed\/([^#\&\?]{11})/,/\/v\/([^#\&\?]{11})/];for(g=0;g{"use strict";o.r(h),o.d(h,{QrScanResultPageModule:()=>K});var d=o(177),l=o(9417),c=o(8974),u=o(3021),p=o(467),C=o(8666),R=o(7420),S=o(56),b=o(9441),T=o(2849),D=o(3649),t=o(4438),M=o(2904),O=o(444),x=o(5173),G=o(2297),Q=o(5318),$=o.n(Q);let I=(()=>{var e;class r{constructor(a,i){this.el=a,this.renderer=i}ngOnChanges(a){if(a.appThumbnail){let i=a.appThumbnail.currentValue.identifier;i&&i.startsWith("do_")&&(i=$()(a.appThumbnail.currentValue.url)),this.renderer.setAttribute(this.el.nativeElement,"src",`https://img.youtube.com/vi/${i}/mqdefault.jpg`)}}}return(e=r).\u0275fac=function(a){return new(a||e)(t.rXU(t.aKT),t.rXU(t.sFG))},e.\u0275dir=t.FsC({type:e,selectors:[["","appThumbnail",""]],inputs:{appThumbnail:"appThumbnail"},features:[t.OA$]}),r})();var P=o(5402);const k=()=>[0,1,2,3,4,5,6,7,8];function j(e,r){1&e&&(t.j41(0,"ion-item")(1,"div",5)(2,"div",6),t.nrm(3,"app-skeleton-item",7),t.k0s(),t.j41(4,"div",8)(5,"div",9),t.nrm(6,"app-skeleton-item",10),t.k0s(),t.j41(7,"div",11),t.nrm(8,"app-skeleton-item",10),t.k0s()()()())}function w(e,r){1&e&&(t.j41(0,"ion-list",3),t.DNE(1,j,9,0,"ion-item",4),t.k0s()),2&e&&(t.R7$(),t.Y8G("ngForOf",t.lJ4(1,k)))}function F(e,r){1&e&&(t.j41(0,"div",12),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.JRh(t.bMT(2,1,"CONTENT_IS_BEING_ADDED")))}function B(e,r){1&e&&(t.j41(0,"div",17)(1,"div",18),t.nrm(2,"img",19),t.j41(3,"div",20),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.j41(6,"div",18),t.nrm(7,"img",21),t.j41(8,"div",20),t.EFF(9),t.nI1(10,"translate"),t.k0s()()()),2&e&&(t.R7$(4),t.JRh(t.bMT(5,2,"Make a Story")),t.R7$(5),t.JRh(t.bMT(10,4,"Ask a Doubt")))}function E(e,r){if(1&e&&t.nrm(0,"img",27),2&e){const n=t.XpG(2).$implicit;t.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/Audio.png",t.B4B)}}function X(e,r){if(1&e&&t.nrm(0,"img",28),2&e){const n=t.XpG(2).$implicit;t.Y8G("appThumbnail",null==n?null:n.metaData)}}function A(e,r){if(1&e&&t.nrm(0,"img",27),2&e){const n=t.XpG(2).$implicit;t.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/Video.png",t.B4B)}}function Y(e,r){if(1&e&&t.nrm(0,"img",27),2&e){const n=t.XpG(2).$implicit;t.Y8G("src",null!=n&&null!=n.metaData&&n.metaData.thumbnail&&!n.metaData.identifier.startsWith("do_")?null==n||null==n.metaData?null:n.metaData.thumbnail:"assets/images/PDF.png",t.B4B)}}function U(e,r){if(1&e){const n=t.RV6();t.j41(0,"div",5)(1,"div",22),t.bIt("click",function(i){t.eBV(n);const s=t.XpG().$implicit,g=t.XpG(2);return t.Njj(g.playContent(i,s))}),t.DNE(2,E,1,1,"img",23)(3,X,1,1,"img",24)(4,A,1,1,"img",23)(5,Y,1,1,"img",23),t.k0s(),t.j41(6,"div",8)(7,"div",25),t.EFF(8),t.k0s(),t.j41(9,"ion-icon",26),t.bIt("click",function(){t.eBV(n);const i=t.XpG().$implicit,s=t.XpG(2);return t.Njj(s.moreOtions(i))}),t.k0s()()()}if(2&e){const n=t.XpG().$implicit,a=t.XpG(2);t.R7$(2),t.Y8G("ngIf",n.metaData.mimetype===a.mimeType.AUDIO),t.R7$(),t.Y8G("ngIf",n.metaData.mimetype===a.mimeType.YOUTUBE&&!n.play),t.R7$(),t.Y8G("ngIf",n.metaData.mimetype===a.mimeType.MP4||n.metaData.mimetype===a.mimeType.WEBM),t.R7$(),t.Y8G("ngIf",n.metaData.mimetype===a.mimeType.PDF),t.R7$(3),t.JRh(null==n.metaData?null:n.metaData.name)}}function N(e,r){if(1&e&&(t.j41(0,"div",14),t.DNE(1,B,11,6,"div",15)(2,U,10,5,"div",16),t.k0s()),2&e){const n=r.$implicit;t.R7$(),t.Y8G("ngIf",!n.metaData||!n.metaData.name),t.R7$(),t.Y8G("ngIf",n.metaData&&n.metaData.name)}}function V(e,r){if(1&e&&(t.j41(0,"div"),t.DNE(1,N,3,2,"div",13),t.k0s()),2&e){const n=t.XpG();t.R7$(),t.Y8G("ngForOf",n.configContents)}}const W=[{path:"",component:(()=>{var e;class r{constructor(a,i,s,g,m,L){var f;this.headerService=a,this.location=i,this.modalCtrl=s,this.contentService=g,this.router=m,this.telemetryGeneratorService=L,this.optModalOpen=!1,this.showSheenAnimation=!0,this.scanText="",this.mimeType=S.Cc,this.navigated=!1;let y=null===(f=this.router.getCurrentNavigation())||void 0===f?void 0:f.extras;var v;y&&(this.scanText=null===(v=y.state)||void 0===v?void 0:v.scannedData,console.log("scan text ",this.scanText))}tabViewWillEnter(){this.headerService.showHeader("QR Scan Result",!0,[]),this.headerService.showStatusBar(!1)}ngOnInit(){this.headerService.headerEventEmitted$.subscribe(a=>{"back"==a&&!this.navigated&&(this.navigated=!0,this.location.back())}),this.configContents=[]}ionViewWillEnter(){this.navigated=!1,this.headerService.showHeader("QR Scan Result",!0,[]),this.headerService.showStatusBar(!1),this.contentService.getContents(this.scanText).then(a=>{this.showSheenAnimation=!1,console.log("Result: ",a),this.configContents=a}).catch(a=>{this.showSheenAnimation=!1})}playContent(a,i){var s=this;return(0,p.A)(function*(){s.contentService.markContentAsViewed(i),yield s.router.navigate(["/player"],{state:{content:i}})})()}moreOtions(a){var i=this;return(0,p.A)(function*(){let s;i.optModalOpen||(i.optModalOpen=!0,s=yield i.modalCtrl.create({component:T.q,componentProps:{content:a},cssClass:"sheet-modal",breakpoints:[.25],showBackdrop:!1,initialBreakpoint:.25,handle:!1,handleBehavior:"none"}),yield s.present()),s.onDidDismiss().then(function(){var g=(0,p.A)(function*(m){i.optModalOpen=!1,m.data&&"addToPitara"===m.data.type?i.addContentToMyPitara(m.data.content||a):m.data&&"like"==m.data.type&&(i.contentService.likeContent(m.data.content||a,"guest",!0),m.data.content.metaData.isLiked&&(yield C.Q.play({assetId:"windchime"}),(0,R.A)({startVelocity:30,particleCount:400,spread:360,ticks:60,origin:{y:.5,x:.5},colors:["#a864fd","#29cdff","#78ff44","#ff718d","#fdff6a"]})),i.telemetryGeneratorService.generateInteractTelemetry("TOUCH","content-liked","qr-scan-result","qr-scan-result",new D.$i(null==a?void 0:a.metaData.identifier,null==a?void 0:a.metaData.mimetype,"")))});return function(m){return g.apply(this,arguments)}}())})()}addContentToMyPitara(a){var i=this;return(0,p.A)(function*(){const s=yield i.modalCtrl.create({component:b.$,componentProps:{content:a},cssClass:"add-to-pitara",breakpoints:[0,1],showBackdrop:!1,initialBreakpoint:1,handle:!1,handleBehavior:"none"});yield s.present(),s.onWillDismiss().then(g=>{})})()}}return(e=r).\u0275fac=function(a){return new(a||e)(t.rXU(M.Ux),t.rXU(d.aZ),t.rXU(c.W3),t.rXU(O.f),t.rXU(u.Ix),t.rXU(x.O))},e.\u0275cmp=t.VBU({type:e,selectors:[["app-qr-scan-result"]],decls:4,vars:3,consts:[["class","m-n",4,"ngIf"],["class","text-not-available",4,"ngIf"],[4,"ngIf"],[1,"m-n"],[4,"ngFor","ngForOf"],[1,"card"],["item-start","",1,"card__img"],["height","15rem","width","22rem","radius","16px"],[1,"card__metadata"],[2,"width","90%"],["height","12px","width","100%"],[2,"padding-left","1.5rem","width","10%"],[1,"text-not-available"],["class","cards-container",4,"ngFor","ngForOf"],[1,"cards-container"],["class","bot-section",4,"ngIf"],["class","card",4,"ngIf"],[1,"bot-section"],[1,"image"],["src","assets/images/Story_bot.svg","alt",""],[1,"image-title"],["src","assets/images/Question_bot.svg","alt",""],[1,"card__img",3,"click"],["alt","",3,"src",4,"ngIf"],["appThumbnail","","alt","",3,"appThumbnail",4,"ngIf"],[1,"card__title"],["aria-hidden","true","src","assets/icon/kabab-icon.svg",3,"click"],["alt","",3,"src"],["appThumbnail","","alt","",3,"appThumbnail"]],template:function(a,i){1&a&&(t.j41(0,"ion-content"),t.DNE(1,w,2,2,"ion-list",0)(2,F,3,3,"div",1)(3,V,2,1,"div",2),t.k0s()),2&a&&(t.R7$(),t.Y8G("ngIf",i.showSheenAnimation),t.R7$(),t.Y8G("ngIf",!i.configContents.length&&!i.showSheenAnimation),t.R7$(),t.Y8G("ngIf",!i.showSheenAnimation&&i.configContents.length>0))},dependencies:[d.Sq,d.bT,c.W9,c.iq,c.uz,c.nf,G.O,I,P.D9],styles:[".cards-container[_ngcontent-%COMP%]{padding:.2rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:0 1rem 1rem}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%]{position:relative}.cards-container[_ngcontent-%COMP%] .bot-section[_ngcontent-%COMP%] .image[_ngcontent-%COMP%] .image-title[_ngcontent-%COMP%]{position:absolute;bottom:.625rem;color:var(--ion-color-primary-contrast);left:0;right:0;text-align:center}.card[_ngcontent-%COMP%]{position:relative;padding-bottom:1rem}.card__img[_ngcontent-%COMP%]{height:194px;width:100%;overflow:hidden}.card__img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;width:100%;height:100%;border-radius:1rem}.card__metadata[_ngcontent-%COMP%]{padding-top:.5rem;display:flex;align-items:center;justify-content:space-between}.card__metadata[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{height:1.75rem;width:1.75rem}.card__action-btns[_ngcontent-%COMP%]{display:flex;align-items:center}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:1rem}.card__action-btns[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]:last-child{margin-left:auto;margin-right:0}.card__title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:400;width:90%;text-transform:capitalize;word-break:break-word;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.no-data[_ngcontent-%COMP%]{text-align:center}ion-content[_ngcontent-%COMP%]{--padding-top: 5rem !important}ion-list[_ngcontent-%COMP%]{background-color:transparent}ion-item[_ngcontent-%COMP%]{--background: transparent}.text-not-available[_ngcontent-%COMP%]{position:absolute;left:30%;right:0;top:20%;transform:translate(-20%,-20%);text-align:center;color:var(--ion-color-medium);font-size:.75rem}"]}),r})()}];let z=(()=>{var e;class r{}return(e=r).\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.$C({type:e}),e.\u0275inj=t.G2t({imports:[u.iI.forChild(W),u.iI]}),r})();var J=o(5553),H=o(3721);let K=(()=>{var e;class r{}return(e=r).\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.$C({type:e}),e.\u0275inj=t.G2t({imports:[d.MD,l.YN,c.bv,z,P.h,J.h,H.h]}),r})()},5318:function(_){_.exports=function(o,d){if(null==d&&(d={fuzzy:!0}),/youtu\.?be/.test(o)){var l,c=[/youtu\.be\/([^#\&\?]{11})/,/\?v=([^#\&\?]{11})/,/\&v=([^#\&\?]{11})/,/embed\/([^#\&\?]{11})/,/\/v\/([^#\&\?]{11})/];for(l=0;l{a.d(f,{c:()=>i});var r=a(4363),l=a(4081),d=a(405);const i=(n,o)=>{let t,e;const h=(c,p,w)=>{if(typeof document>"u")return;const E=document.elementFromPoint(c,p);E&&o(E)?E!==t&&(s(),u(E,w)):s()},u=(c,p)=>{t=c,e||(e=t);const w=t;(0,r.w)(()=>w.classList.add("ion-activated")),p()},s=(c=!1)=>{if(!t)return;const p=t;(0,r.w)(()=>p.classList.remove("ion-activated")),c&&e!==t&&t.click(),t=void 0};return(0,d.createGesture)({el:n,gestureName:"buttonActiveDrag",threshold:0,onStart:c=>h(c.currentX,c.currentY,l.a),onMove:c=>h(c.currentX,c.currentY,l.b),onEnd:()=>{s(!0),(0,l.h)(),e=void 0}})}},8438:(y,f,a)=>{a.d(f,{g:()=>l});var r=a(8476);const l=()=>{if(void 0!==r.w)return r.w.Capacitor}},5572:(y,f,a)=>{a.d(f,{c:()=>r,i:()=>l});const r=(d,i,n)=>"function"==typeof n?n(d,i):"string"==typeof n?d[n]===i[n]:Array.isArray(i)?i.includes(d):d===i,l=(d,i,n)=>void 0!==d&&(Array.isArray(d)?d.some(o=>r(o,i,n)):r(d,i,n))},3351:(y,f,a)=>{a.d(f,{g:()=>r});const r=(o,t,e,h,u)=>d(o[1],t[1],e[1],h[1],u).map(s=>l(o[0],t[0],e[0],h[0],s)),l=(o,t,e,h,u)=>u*(3*t*Math.pow(u-1,2)+u*(-3*e*u+3*e+h*u))-o*Math.pow(u-1,3),d=(o,t,e,h,u)=>n((h-=u)-3*(e-=u)+3*(t-=u)-(o-=u),3*e-6*t+3*o,3*t-3*o,o).filter(c=>c>=0&&c<=1),n=(o,t,e,h)=>{if(0===o)return((o,t,e)=>{const h=t*t-4*o*e;return h<0?[]:[(-t+Math.sqrt(h))/(2*o),(-t-Math.sqrt(h))/(2*o)]})(t,e,h);const u=(3*(e/=o)-(t/=o)*t)/3,s=(2*t*t*t-9*t*e+27*(h/=o))/27;if(0===u)return[Math.pow(-s,1/3)];if(0===s)return[Math.sqrt(-u),-Math.sqrt(-u)];const c=Math.pow(s/2,2)+Math.pow(u/3,3);if(0===c)return[Math.pow(s/2,.5)-t/3];if(c>0)return[Math.pow(-s/2+Math.sqrt(c),1/3)-Math.pow(s/2+Math.sqrt(c),1/3)-t/3];const p=Math.sqrt(Math.pow(-u/3,3)),w=Math.acos(-s/(2*Math.sqrt(Math.pow(-u/3,3)))),E=2*Math.pow(p,1/3);return[E*Math.cos(w/3)-t/3,E*Math.cos((w+2*Math.PI)/3)-t/3,E*Math.cos((w+4*Math.PI)/3)-t/3]}},7464:(y,f,a)=>{a.d(f,{i:()=>r});const r=l=>l&&""!==l.dir?"rtl"===l.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase())},3126:(y,f,a)=>{a.r(f),a.d(f,{startFocusVisible:()=>i});const r="ion-focused",d=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End"],i=n=>{let o=[],t=!0;const e=n?n.shadowRoot:document,h=n||document.body,u=M=>{o.forEach(g=>g.classList.remove(r)),M.forEach(g=>g.classList.add(r)),o=M},s=()=>{t=!1,u([])},c=M=>{t=d.includes(M.key),t||u([])},p=M=>{if(t&&void 0!==M.composedPath){const g=M.composedPath().filter(v=>!!v.classList&&v.classList.contains("ion-focusable"));u(g)}},w=()=>{e.activeElement===h&&u([])};return e.addEventListener("keydown",c),e.addEventListener("focusin",p),e.addEventListener("focusout",w),e.addEventListener("touchstart",s,{passive:!0}),e.addEventListener("mousedown",s),{destroy:()=>{e.removeEventListener("keydown",c),e.removeEventListener("focusin",p),e.removeEventListener("focusout",w),e.removeEventListener("touchstart",s),e.removeEventListener("mousedown",s)},setFocus:u}}},8281:(y,f,a)=>{a.d(f,{c:()=>l});var r=a(5638);const l=o=>{const t=o;let e;return{hasLegacyControl:()=>{if(void 0===e){const u=void 0!==t.label||d(t),s=t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")&&null===t.shadowRoot,c=(0,r.h)(t);e=!0===t.legacy||!u&&!s&&null!==c}return e}}},d=o=>!!(i.includes(o.tagName)&&null!==o.querySelector('[slot="label"]')||n.includes(o.tagName)&&""!==o.textContent),i=["ION-INPUT","ION-TEXTAREA","ION-SELECT","ION-RANGE"],n=["ION-TOGGLE","ION-CHECKBOX","ION-RADIO"]},4081:(y,f,a)=>{a.d(f,{I:()=>l,a:()=>t,b:()=>e,c:()=>o,d:()=>u,h:()=>h});var r=a(8438),l=function(s){return s.Heavy="HEAVY",s.Medium="MEDIUM",s.Light="LIGHT",s}(l||{});const i={getEngine(){const s=window.TapticEngine;if(s)return s;const c=(0,r.g)();return null!=c&&c.isPluginAvailable("Haptics")?c.Plugins.Haptics:void 0},available(){if(!this.getEngine())return!1;const c=(0,r.g)();return"web"!==(null==c?void 0:c.getPlatform())||typeof navigator<"u"&&void 0!==navigator.vibrate},isCordova:()=>void 0!==window.TapticEngine,isCapacitor:()=>void 0!==(0,r.g)(),impact(s){const c=this.getEngine();if(!c)return;const p=this.isCapacitor()?s.style:s.style.toLowerCase();c.impact({style:p})},notification(s){const c=this.getEngine();if(!c)return;const p=this.isCapacitor()?s.type:s.type.toLowerCase();c.notification({type:p})},selection(){const s=this.isCapacitor()?l.Light:"light";this.impact({style:s})},selectionStart(){const s=this.getEngine();s&&(this.isCapacitor()?s.selectionStart():s.gestureSelectionStart())},selectionChanged(){const s=this.getEngine();s&&(this.isCapacitor()?s.selectionChanged():s.gestureSelectionChanged())},selectionEnd(){const s=this.getEngine();s&&(this.isCapacitor()?s.selectionEnd():s.gestureSelectionEnd())}},n=()=>i.available(),o=()=>{n()&&i.selection()},t=()=>{n()&&i.selectionStart()},e=()=>{n()&&i.selectionChanged()},h=()=>{n()&&i.selectionEnd()},u=s=>{n()&&i.impact(s)}},2885:(y,f,a)=>{a.d(f,{I:()=>o,a:()=>u,b:()=>n,c:()=>p,d:()=>E,f:()=>s,g:()=>h,i:()=>e,p:()=>w,r:()=>M,s:()=>c});var r=a(467),l=a(5638),d=a(4929);const n="ion-content",o=".ion-content-scroll-host",t=`${n}, ${o}`,e=g=>"ION-CONTENT"===g.tagName,h=function(){var g=(0,r.A)(function*(v){return e(v)?(yield new Promise(m=>(0,l.c)(v,m)),v.getScrollElement()):v});return function(m){return g.apply(this,arguments)}}(),u=g=>g.querySelector(o)||g.querySelector(t),s=g=>g.closest(t),c=(g,v)=>e(g)?g.scrollToTop(v):Promise.resolve(g.scrollTo({top:0,left:0,behavior:v>0?"smooth":"auto"})),p=(g,v,m,O)=>e(g)?g.scrollByPoint(v,m,O):Promise.resolve(g.scrollBy({top:m,left:v,behavior:O>0?"smooth":"auto"})),w=g=>(0,d.b)(g,n),E=g=>{if(e(g)){const m=g.scrollY;return g.scrollY=!1,m}return g.style.setProperty("overflow","hidden"),!0},M=(g,v)=>{e(g)?g.scrollY=v:g.style.removeProperty("overflow")}},6726:(y,f,a)=>{a.d(f,{a:()=>r,b:()=>p,c:()=>t,d:()=>w,e:()=>b,f:()=>o,g:()=>E,h:()=>d,i:()=>l,j:()=>O,k:()=>C,l:()=>e,m:()=>s,n:()=>M,o:()=>u,p:()=>n,q:()=>i,r:()=>m,s:()=>_,t:()=>c,u:()=>g,v:()=>v,w:()=>h});const r="data:image/svg+xml;utf8,",l="data:image/svg+xml;utf8,",d="data:image/svg+xml;utf8,",i="data:image/svg+xml;utf8,",n="data:image/svg+xml;utf8,",o="data:image/svg+xml;utf8,",t="data:image/svg+xml;utf8,",e="data:image/svg+xml;utf8,",h="data:image/svg+xml;utf8,",u="data:image/svg+xml;utf8,",s="data:image/svg+xml;utf8,",c="data:image/svg+xml;utf8,",p="data:image/svg+xml;utf8,",w="data:image/svg+xml;utf8,",E="data:image/svg+xml;utf8,",M="data:image/svg+xml;utf8,",g="data:image/svg+xml;utf8,",v="data:image/svg+xml;utf8,",m="data:image/svg+xml;utf8,",O="data:image/svg+xml;utf8,",C="data:image/svg+xml;utf8,",_="data:image/svg+xml;utf8,",b="data:image/svg+xml;utf8,"},275:(y,f,a)=>{a.d(f,{c:()=>i,g:()=>n});var r=a(8476),l=a(5638),d=a(4929);const i=(t,e,h)=>{let u,s;if(void 0!==r.w&&"MutationObserver"in r.w){const E=Array.isArray(e)?e:[e];u=new MutationObserver(M=>{for(const g of M)for(const v of g.addedNodes)if(v.nodeType===Node.ELEMENT_NODE&&E.includes(v.slot))return h(),void(0,l.r)(()=>c(v))}),u.observe(t,{childList:!0})}const c=E=>{var M;s&&(s.disconnect(),s=void 0),s=new MutationObserver(g=>{h();for(const v of g)for(const m of v.removedNodes)m.nodeType===Node.ELEMENT_NODE&&m.slot===e&&w()}),s.observe(null!==(M=E.parentElement)&&void 0!==M?M:E,{subtree:!0,childList:!0})},w=()=>{s&&(s.disconnect(),s=void 0)};return{destroy:()=>{u&&(u.disconnect(),u=void 0),w()}}},n=(t,e,h)=>{const u=null==t?0:t.toString().length,s=o(u,e);if(void 0===h)return s;try{return h(u,e)}catch(c){return(0,d.a)("Exception in provided `counterFormatter`.",c),s}},o=(t,e)=>`${t} / ${e}`},1622:(y,f,a)=>{a.r(f),a.d(f,{KEYBOARD_DID_CLOSE:()=>n,KEYBOARD_DID_OPEN:()=>i,copyVisualViewport:()=>C,keyboardDidClose:()=>g,keyboardDidOpen:()=>E,keyboardDidResize:()=>M,resetKeyboardAssist:()=>u,setKeyboardClose:()=>w,setKeyboardOpen:()=>p,startKeyboardAssist:()=>s,trackViewportChanges:()=>O});var r=a(4379);a(8438),a(8476);const i="ionKeyboardDidShow",n="ionKeyboardDidHide";let t={},e={},h=!1;const u=()=>{t={},e={},h=!1},s=_=>{if(r.K.getEngine())c(_);else{if(!_.visualViewport)return;e=C(_.visualViewport),_.visualViewport.onresize=()=>{O(_),E()||M(_)?p(_):g(_)&&w(_)}}},c=_=>{_.addEventListener("keyboardDidShow",b=>p(_,b)),_.addEventListener("keyboardDidHide",()=>w(_))},p=(_,b)=>{v(_,b),h=!0},w=_=>{m(_),h=!1},E=()=>!h&&t.width===e.width&&(t.height-e.height)*e.scale>150,M=_=>h&&!g(_),g=_=>h&&e.height===_.innerHeight,v=(_,b)=>{const P=new CustomEvent(i,{detail:{keyboardHeight:b?b.keyboardHeight:_.innerHeight-e.height}});_.dispatchEvent(P)},m=_=>{const b=new CustomEvent(n);_.dispatchEvent(b)},O=_=>{t=Object.assign({},e),e=C(_.visualViewport)},C=_=>({width:Math.round(_.width),height:Math.round(_.height),offsetTop:_.offsetTop,offsetLeft:_.offsetLeft,pageTop:_.pageTop,pageLeft:_.pageLeft,scale:_.scale})},4379:(y,f,a)=>{a.d(f,{K:()=>i,a:()=>d});var r=a(8438),l=function(n){return n.Unimplemented="UNIMPLEMENTED",n.Unavailable="UNAVAILABLE",n}(l||{}),d=function(n){return n.Body="body",n.Ionic="ionic",n.Native="native",n.None="none",n}(d||{});const i={getEngine(){const n=(0,r.g)();if(null!=n&&n.isPluginAvailable("Keyboard"))return n.Plugins.Keyboard},getResizeMode(){const n=this.getEngine();return null!=n&&n.getResizeMode?n.getResizeMode().catch(o=>{if(o.code!==l.Unimplemented)throw o}):Promise.resolve(void 0)}}},4731:(y,f,a)=>{a.d(f,{c:()=>o});var r=a(467),l=a(8476),d=a(4379);const i=t=>{if(void 0===l.d||t===d.a.None||void 0===t)return null;const e=l.d.querySelector("ion-app");return null!=e?e:l.d.body},n=t=>{const e=i(t);return null===e?0:e.clientHeight},o=function(){var t=(0,r.A)(function*(e){let h,u,s,c;const p=function(){var v=(0,r.A)(function*(){const m=yield d.K.getResizeMode(),O=void 0===m?void 0:m.mode;h=()=>{void 0===c&&(c=n(O)),s=!0,w(s,O)},u=()=>{s=!1,w(s,O)},null==l.w||l.w.addEventListener("keyboardWillShow",h),null==l.w||l.w.addEventListener("keyboardWillHide",u)});return function(){return v.apply(this,arguments)}}(),w=(v,m)=>{e&&e(v,E(m))},E=v=>{if(0===c||c===n(v))return;const m=i(v);return null!==m?new Promise(O=>{const _=new ResizeObserver(()=>{m.clientHeight===c&&(_.disconnect(),O())});_.observe(m)}):void 0};return yield p(),{init:p,destroy:()=>{null==l.w||l.w.removeEventListener("keyboardWillShow",h),null==l.w||l.w.removeEventListener("keyboardWillHide",u),h=u=void 0},isKeyboardVisible:()=>s}});return function(h){return t.apply(this,arguments)}}()},7838:(y,f,a)=>{a.d(f,{c:()=>l});var r=a(467);const l=()=>{let d;return{lock:function(){var n=(0,r.A)(function*(){const o=d;let t;return d=new Promise(e=>t=e),void 0!==o&&(yield o),t});return function(){return n.apply(this,arguments)}}()}}},2172:(y,f,a)=>{a.d(f,{c:()=>d});var r=a(8476),l=a(5638);const d=(i,n,o)=>{let t;const e=()=>!(void 0===n()||void 0!==i.label||null===o()),u=()=>{const c=n();if(void 0===c)return;if(!e())return void c.style.removeProperty("width");const p=o().scrollWidth;if(0===p&&null===c.offsetParent&&void 0!==r.w&&"IntersectionObserver"in r.w){if(void 0!==t)return;const w=t=new IntersectionObserver(E=>{1===E[0].intersectionRatio&&(u(),w.disconnect(),t=void 0)},{threshold:.01,root:i});w.observe(c)}else c.style.setProperty("width",.75*p+"px")};return{calculateNotchWidth:()=>{e()&&(0,l.r)(()=>{u()})},destroy:()=>{t&&(t.disconnect(),t=void 0)}}}},7895:(y,f,a)=>{a.d(f,{S:()=>l});const l={bubbles:{dur:1e3,circles:9,fn:(d,i,n)=>{const o=d*i/n-d+"ms",t=2*Math.PI*i/n;return{r:5,style:{top:32*Math.sin(t)+"%",left:32*Math.cos(t)+"%","animation-delay":o}}}},circles:{dur:1e3,circles:8,fn:(d,i,n)=>{const o=i/n,t=d*o-d+"ms",e=2*Math.PI*o;return{r:5,style:{top:32*Math.sin(e)+"%",left:32*Math.cos(e)+"%","animation-delay":t}}}},circular:{dur:1400,elmDuration:!0,circles:1,fn:()=>({r:20,cx:48,cy:48,fill:"none",viewBox:"24 24 48 48",transform:"translate(0,0)",style:{}})},crescent:{dur:750,circles:1,fn:()=>({r:26,style:{}})},dots:{dur:750,circles:3,fn:(d,i)=>({r:6,style:{left:32-32*i+"%","animation-delay":-110*i+"ms"}})},lines:{dur:1e3,lines:8,fn:(d,i,n)=>({y1:14,y2:26,style:{transform:`rotate(${360/n*i+(i({y1:12,y2:20,style:{transform:`rotate(${360/n*i+(i({y1:17,y2:29,style:{transform:`rotate(${30*i+(i<6?180:-180)}deg)`,"animation-delay":d*i/n-d+"ms"}})},"lines-sharp-small":{dur:1e3,lines:12,fn:(d,i,n)=>({y1:12,y2:20,style:{transform:`rotate(${30*i+(i<6?180:-180)}deg)`,"animation-delay":d*i/n-d+"ms"}})}}},6492:(y,f,a)=>{a.r(f),a.d(f,{createSwipeBackGesture:()=>n});var r=a(5638),l=a(7464),d=a(405);a(8221);const n=(o,t,e,h,u)=>{const s=o.ownerDocument.defaultView;let c=(0,l.i)(o);const w=m=>c?-m.deltaX:m.deltaX;return(0,d.createGesture)({el:o,gestureName:"goback-swipe",gesturePriority:101,threshold:10,canStart:m=>(c=(0,l.i)(o),(m=>{const{startX:C}=m;return c?C>=s.innerWidth-50:C<=50})(m)&&t()),onStart:e,onMove:m=>{const C=w(m)/s.innerWidth;h(C)},onEnd:m=>{const O=w(m),C=s.innerWidth,_=O/C,b=(m=>c?-m.velocityX:m.velocityX)(m),P=b>=0&&(b>.2||O>C/2),L=(P?1-_:_)*C;let k=0;if(L>5){const T=L/Math.abs(b);k=Math.min(T,540)}u(P,_<=0?.01:(0,r.l)(0,_,.9999),k)}})}},2935:(y,f,a)=>{a.d(f,{w:()=>r});const r=(i,n,o)=>{if(typeof MutationObserver>"u")return;const t=new MutationObserver(e=>{o(l(e,n))});return t.observe(i,{childList:!0,subtree:!0}),t},l=(i,n)=>{let o;return i.forEach(t=>{for(let e=0;e{if(1!==i.nodeType)return;const o=i;return(o.tagName===n.toUpperCase()?[o]:Array.from(o.querySelectorAll(n))).find(e=>e.value===o.value)}},5301:(y,f,a)=>{a.d(f,{J:()=>i});var r=a(4438),l=a(8974),d=a(5402);let i=(()=>{var n;class o{constructor(e){this.modalCtrl=e}ngOnInit(){}dismissModal(){this.modalCtrl.dismiss()}confirm(e){switch(e){case"edit":this.modalCtrl.dismiss({type:"edit"});break;case"delete":this.modalCtrl.dismiss({type:"delete"})}}}return(n=o).\u0275fac=function(e){return new(e||n)(r.rXU(l.W3))},n.\u0275cmp=r.VBU({type:n,selectors:[["app-edit-removed-modal"]],decls:16,vars:6,consts:[[1,"inner-content"],["fill","clear"],["aria-hidden","true","src","assets/icon/edit.svg"],[3,"click"],["aria-hidden","true","src","assets/icon/delete.svg"]],template:function(e,h){1&e&&(r.j41(0,"div",0)(1,"ion-list")(2,"ion-item")(3,"ion-button",1),r.nrm(4,"ion-icon",2),r.k0s(),r.j41(5,"ion-label",3),r.bIt("click",function(){return h.confirm("edit")}),r.j41(6,"h2"),r.EFF(7),r.nI1(8,"translate"),r.k0s()()(),r.j41(9,"ion-item")(10,"ion-button",1),r.nrm(11,"ion-icon",4),r.k0s(),r.j41(12,"ion-label",3),r.bIt("click",function(){return h.confirm("delete")}),r.j41(13,"h2"),r.EFF(14),r.nI1(15,"translate"),r.k0s()()()()()),2&e&&(r.R7$(7),r.JRh(r.bMT(8,2,"edit")),r.R7$(7),r.JRh(r.bMT(15,4,"delete")))},dependencies:[l.Jm,l.iq,l.uz,l.he,l.nf,d.D9],styles:["ion-list[_ngcontent-%COMP%]{overflow-y:auto;overflow:scroll;height:-moz-fit-content;height:fit-content;max-height:200px}ion-item[_ngcontent-%COMP%]{--border-width: 0;--inner-border-width: 0}ion-label[_ngcontent-%COMP%]{padding:0 0 0 1rem}ion-icon[_ngcontent-%COMP%]{font-size:22.5px}"]}),o})()},2297:(y,f,a)=>{a.d(f,{O:()=>d});var r=a(4438),l=a(177);let d=(()=>{var i;class n{constructor(){this.styles={}}ngOnInit(){this.styles={width:this.width?this.width:"100%",height:this.height?this.height:"1rem"},typeof this.radius<"u"&&""!==this.radius&&(this.styles.borderRadius=this.radius)}}return(i=n).\u0275fac=function(t){return new(t||i)},i.\u0275cmp=r.VBU({type:i,selectors:[["app-skeleton-item"]],inputs:{width:"width",height:"height",radius:"radius"},decls:1,vars:1,consts:[[3,"ngStyle"]],template:function(t,e){1&t&&r.nrm(0,"div",0),2&t&&r.Y8G("ngStyle",e.styles)},dependencies:[l.B3],styles:[".animated-background[_ngcontent-%COMP%], [_nghost-%COMP%] div[_ngcontent-%COMP%]{animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:#82828233;background:linear-gradient(to right,#82828233 8%,#8282824d 18%,#82828233 33%);background-size:800px 100px;position:relative}@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-468px 0}to{background-position:468px 0}}[_nghost-%COMP%]{display:block}[inline][_nghost-%COMP%]{display:inline-block}[inline][_nghost-%COMP%] div[_ngcontent-%COMP%]{display:inline-block}[rounded][_nghost-%COMP%] div[_ngcontent-%COMP%]{border-radius:999em}[radius][_nghost-%COMP%] div[_ngcontent-%COMP%]{border-radius:4px}[no-animated][_nghost-%COMP%] div[_ngcontent-%COMP%]{animation:none!important;background:#82828233}app-skeleton-item[_ngcontent-%COMP%] + app-skeleton-item[_ngcontent-%COMP%]{margin-top:6px}"]}),n})()}}]); \ No newline at end of file diff --git a/www/index.html b/www/index.html index e1a60785..a327a7cf 100644 --- a/www/index.html +++ b/www/index.html @@ -25,6 +25,10 @@ Please enable JavaScript to continue using this application. +<<<<<<< HEAD +======= +