From 7714f1cddfb718174165eeddac0d4c7d0c9d1995 Mon Sep 17 00:00:00 2001 From: Bifeldy Date: Sun, 21 May 2023 02:31:21 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=94=20Build=20=F0=9F=8E=89=2021-05-2023?= =?UTF-8?q?=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/fansubid/browser/180.69c3c37e3465e381.js | 1 - dist/fansubid/browser/180.e88fa82acf1a2111.js | 1 + dist/fansubid/browser/219.46e33e31d42b4868.js | 1 - dist/fansubid/browser/219.698ea9fdc5aa1276.js | 1 + dist/fansubid/browser/241.9edb409fc65bbd97.js | 1 + dist/fansubid/browser/241.e0ae2ca5a70b640e.js | 1 - ...003c9557d4a.js => 330.d311de31b7336b96.js} | 2 +- ...1792dba7213.js => 469.5a7443725b8d7b20.js} | 2 +- dist/fansubid/browser/478.1385ed213a62dbaa.js | 1 + dist/fansubid/browser/478.26cffe3526b42d61.js | 1 - ...a53a8ed0be8.js => 750.8fffcc0b9b38b7eb.js} | 2 +- .../browser/common.1ac374edf29bcb18.js | 1 + .../browser/common.ec9ef4839de19b37.js | 1 - dist/fansubid/browser/index.html | 2 +- .../fansubid/browser/main.9219daacd31d1656.js | 1 + .../fansubid/browser/main.f0193a29fb312e15.js | 1 - dist/fansubid/browser/ngsw.json | 44 +++++++++---------- ...0d836aa.js => runtime.416267b4728342bd.js} | 2 +- dist/fansubid/server/main.js | 2 +- 19 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 dist/fansubid/browser/180.69c3c37e3465e381.js create mode 100644 dist/fansubid/browser/180.e88fa82acf1a2111.js delete mode 100644 dist/fansubid/browser/219.46e33e31d42b4868.js create mode 100644 dist/fansubid/browser/219.698ea9fdc5aa1276.js create mode 100644 dist/fansubid/browser/241.9edb409fc65bbd97.js delete mode 100644 dist/fansubid/browser/241.e0ae2ca5a70b640e.js rename dist/fansubid/browser/{330.3cc0e003c9557d4a.js => 330.d311de31b7336b96.js} (84%) rename dist/fansubid/browser/{469.4dbe01792dba7213.js => 469.5a7443725b8d7b20.js} (73%) create mode 100644 dist/fansubid/browser/478.1385ed213a62dbaa.js delete mode 100644 dist/fansubid/browser/478.26cffe3526b42d61.js rename dist/fansubid/browser/{750.8026fa53a8ed0be8.js => 750.8fffcc0b9b38b7eb.js} (54%) create mode 100644 dist/fansubid/browser/common.1ac374edf29bcb18.js delete mode 100644 dist/fansubid/browser/common.ec9ef4839de19b37.js create mode 100644 dist/fansubid/browser/main.9219daacd31d1656.js delete mode 100644 dist/fansubid/browser/main.f0193a29fb312e15.js rename dist/fansubid/browser/{runtime.20c400b920d836aa.js => runtime.416267b4728342bd.js} (51%) diff --git a/dist/fansubid/browser/180.69c3c37e3465e381.js b/dist/fansubid/browser/180.69c3c37e3465e381.js deleted file mode 100644 index e93f57832..000000000 --- a/dist/fansubid/browser/180.69c3c37e3465e381.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[180],{2180:(U,p,n)=>{n.r(p),n.d(p,{AboutModule:()=>y});var a=n(9808),g=n(8406),f=n(210),d=n(8613);const b=JSON.parse('{"HO":{"@angular-material-components/datetime-picker":"^7.0.1","@angular/animations":"~13.3.0","@angular/cdk":"^13.3.3","@angular/common":"~13.3.0","@angular/compiler":"~13.3.0","@angular/core":"~13.3.0","@angular/flex-layout":"^13.0.0-beta.38","@angular/forms":"~13.3.0","@angular/material":"^13.3.3","@angular/material-moment-adapter":"^13.3.3","@angular/platform-browser":"~13.3.0","@angular/platform-browser-dynamic":"~13.3.0","@angular/platform-server":"~13.3.0","@angular/router":"~13.3.0","@angular/service-worker":"~13.3.0","@discordjs/opus":"^0.7.0","@iamtraction/google-translate":"^1.1.2","@kolkov/angular-editor":"^2.0.0","@nestjs/common":"^8.0.0","@nestjs/core":"^8.0.0","@nestjs/ng-universal":"^6.0.0","@nestjs/platform-express":"^8.0.0","@nestjs/platform-socket.io":"^8.4.4","@nestjs/schedule":"^2.0.1","@nestjs/swagger":"^6.2.1","@nestjs/throttler":"^2.0.1","@nestjs/typeorm":"^8.0.3","@nestjs/websockets":"^8.4.4","@nguniversal/express-engine":"^13.0.1","@types/morgan":"^1.9.3","@uploadx/core":"^6.0.0","abort-controller":"^3.0.0","animate.css":"^4.1.1","bootstrap":"^5.1.3","buffer":"^6.0.3","cache-manager":"^3.6.1","chalk":"^5.0.1","chart.js":"^2.9.4","class-transformer":"^0.5.1","class-validator":"^0.13.1","compression":"^1.7.4","cookie-parser":"^1.4.6","crypto-js":"^4.1.1","discord.js":"^13.6.0","ebml":"^3.0.0","express":"^4.15.2","express-throttle-bandwidth":"^1.0.1","ffmpeg-static":"^4.4.0","file-saver":"^2.0.5","googleapis":"^100.0.0","hammerjs":"^2.0.8","helmet":"^5.0.2","idb-chunk-store":"^1.0.1","jsonwebtoken":"^8.5.1","kuroshiro":"^1.1.2","kuroshiro-analyzer-kuromoji":"^1.1.0","mailtrap":"^3.1.1","morgan":"^1.10.0","nest-morgan":"^2.0.0","ng-recaptcha":"^9.0.0","ng2-charts":"^2.4.3","ngx-material-file-input":"^3.0.0","ngx-progressbar":"^8.0.0","ngx-spinner":"^13.1.1","ngx-swiper-wrapper":"^10.0.0","ngx-toastr":"^14.3.0","ngx-typed-js":"^2.1.1","ngx-uploadx":"^5.2.0","node-fetch":"^3.2.3","p2p-graph":"^2.0.0","pg":"^8.7.3","puppeteer":"^17.1.3","puppeteer-extra":"^3.3.4","puppeteer-extra-plugin-stealth":"^2.11.1","reflect-metadata":"^0.1.13","rss-to-json":"^2.0.2","rxjs":"~7.5.0","sakura-js":"^1.1.1","socket.io-client":"^2.4.0","string-strip-html":"^11.3.0","swiper":"^6.8.4","tslib":"^2.4.0","typeorm":"^0.2.38","video.js":"^7.18.1","viewerjs":"^1.10.5","wanakana":"^5.0.0","webtorrent":"^1.5.8","webtorrent-health":"^1.1.2","winbox":"^0.2.1","xng-breadcrumb":"^7.2.0","ytdl-core":"^4.9.1","zone.js":"~0.11.4"}}');var c=n(5934),t=n(5e3),_=n(6382),h=n(8696),T=n(8020),k=n(8616),s=n(7423),r=n(9224),o=n(5245),l=n(7238);function v(i,u){if(1&i){const e=t.EpF();t.TgZ(0,"div",28)(1,"mat-card",29)(2,"mat-card-header"),t._UZ(3,"div",30),t.TgZ(4,"mat-card-title"),t._uU(5),t.qZA(),t.TgZ(6,"mat-card-subtitle"),t._uU(7),t.qZA()(),t._UZ(8,"img",31),t.TgZ(9,"mat-card-content")(10,"p"),t._uU(11),t.qZA()(),t.TgZ(12,"mat-card-actions")(13,"button",32),t.NdJ("click",function(){const E=t.CHM(e).$implicit;return t.oxw(2).openWebsite(E.site_url)}),t.TgZ(14,"mat-icon",33),t._uU(15,"web"),t.qZA(),t._uU(16," Website "),t.qZA()()()()}if(2&i){const e=u.$implicit;t.xp6(3),t.Udp("background-image","url("+e.logo+")"),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.Oqu(e.version),t.xp6(1),t.Q6J("src",e.pict,t.LSH),t.xp6(3),t.Oqu(e.description)}}function x(i,u){if(1&i&&(t.TgZ(0,"div",15)(1,"div",1),t.YNc(2,v,17,6,"div",27),t.qZA()()),2&i){const e=t.oxw();t.xp6(2),t.Q6J("ngForOf",e.aboutProject)}}function A(i,u){if(1&i&&(t.TgZ(0,"button",37),t._uU(1),t.qZA()),2&i){const e=u.$implicit;t.s9C("matTooltip",e.value),t.xp6(1),t.hij(" ",e.key," ")}}function O(i,u){if(1&i&&(t.TgZ(0,"div",34)(1,"div",1)(2,"div",35),t.YNc(3,A,2,2,"button",36),t.ALo(4,"keyvalue"),t.qZA()()()),2&i){const e=t.oxw();t.xp6(3),t.Q6J("ngForOf",t.lcZ(4,1,e.library))}}const j=[{path:"",pathMatch:"full",component:(()=>{class i{constructor(e,m,Z){this.fs=e,this.gs=m,this.wb=Z,this.detailed=!1,this.aboutProject=[{logo:"/assets/img/about/nodejs_logo.png",pict:"/assets/img/about/nodejs_pict.png",name:"NodeJS",version:"v12.16.1",description:"Node.js\xae is a JavaScript runtime built on Chrome's V8 JavaScript engine.",site_url:"https://nodejs.org"},{logo:"/assets/img/about/angular.svg",pict:"/assets/img/about/angular.svg",name:"Angular + Material",version:"v10.0.5",description:"One framework. Mobile & desktop. Material Design components.",site_url:"https://angular.io"},{logo:"/assets/img/about/express_logo.png",pict:"/assets/img/about/express_pict.png",name:"ExpressJS",version:"v4.15.2",description:"Fast, unopinionated, minimalist web framework for Node.js",site_url:"https://expressjs.com"},{logo:"/assets/img/about/mysql_logo.png",pict:"/assets/img/about/mysql_pict.png",name:"MySQL",version:"v8.0",description:"The world's most popular open source database",site_url:"https://www.mysql.com"}],this.library=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return c.N}ngOnInit(){this.gs.isBrowser&&(this.library=b.HO,this.fs.initializeFab(null,"/assets/img/discord/pink.png","Discord Server",c.N.discord.join_url,!0))}openWebsite(e){this.wb.winboxOpenUri(e)}toggleDetail(){this.detailed=!this.detailed}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(_.r),t.Y36(h.U),t.Y36(T.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-about"]],decls:71,vars:4,consts:[[1,"container"],[1,"row"],[1,"col-12","align-items-center"],[1,"text-center","my-3","mx-auto"],[1,"p-5",3,"src"],[1,"h3","mb-3","font-weight-normal","gradient-text"],[1,"text-warning","pb-3"],[1,"row","mb-3"],[1,"mouse_scroll"],[1,"mouse"],[1,"wheel"],[1,"m_scroll_arrows","unu"],[1,"m_scroll_arrows","doi"],[1,"m_scroll_arrows","trei"],[1,"row","pb-3"],[1,"col-12"],[1,"alert","alert-secondary","fade","show"],[1,"alert-heading"],[1,"ps-3"],["href","https://www.pixiv.net/en/users/1688603","target","_blank",2,"text-decoration","none"],["href","https://aoitori-jpn.booth.pm","target","_blank",2,"text-decoration","none"],["routerLink","/news",2,"text-decoration","none"],[1,"mb-0","text-end","pe-3"],[1,"col-12","text-center"],["mat-button","","color","accent",1,"m-3",3,"click"],["class","col-12",4,"ngIf"],["class","col",4,"ngIf"],["class","col-12 col-md-6 col-lg-4 col-xl-3 p-3",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-lg-4","col-xl-3","p-3"],[1,"gradient-border","rgb-border"],["mat-card-avatar","",2,"background-size","cover"],["mat-card-image","",2,"height","192px","object-fit","cover",3,"src"],["mat-button","","color","accent",3,"click"],[1,"me-1"],[1,"col"],[1,"col-12","text-center","p-3"],["mat-flat-button","","color","accent","class","m-1",3,"matTooltip",4,"ngFor","ngForOf"],["mat-flat-button","","color","accent",1,"m-1",3,"matTooltip"]],template:function(e,m){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t._UZ(4,"img",4),t.TgZ(5,"h1",5),t._uU(6),t.qZA(),t.TgZ(7,"h2",6),t._uU(8," Tempat belajar sambil berdiskusi mengenai hal-hal tentang jejepangan, berbagi dan melacak sekaligus mengabadikan berkas proyek garapan tontonan baik animasi maupun film drama dari kelompok penerjemah berbahasa Indonesia. "),t.qZA()()()(),t.TgZ(9,"div",7)(10,"div",2)(11,"div",8)(12,"div",9),t._UZ(13,"div",10),t.qZA(),t.TgZ(14,"div"),t._UZ(15,"span",11)(16,"span",12)(17,"span",13),t.qZA()()()()(),t._UZ(18,"app-notifications"),t.TgZ(19,"div",0)(20,"div",14)(21,"div",15)(22,"div",16)(23,"h2",17),t._uU(24,"Tentang & Informasi!"),t.qZA(),t.TgZ(25,"p",18),t._uU(26," Website ini sebenarnya dibuat hanya dengan tujuan untuk "),t.TgZ(27,"i"),t._uU(28,"listing"),t.qZA(),t._uU(29," daftar berkas (Anime & Drama) secara pribadi yang saya backup di tempat penyimpanan secara "),t.TgZ(30,"i"),t._uU(31,"online"),t.qZA(),t._uU(32,". Terus juga sekalian aja tambahin modul - modul belajar Nihongo karena masih memiliki bau yang sama ya 'kan, jejepangan. Hehehe~ "),t.qZA(),t.TgZ(33,"p",18)(34,"s"),t._uU(35,"Sebenernya gw gabut a.k.a pengangguran dan cuman mau ngetes tugas akhir proyek kampus~ wkwkwkwkwk~"),t.qZA(),t._uU(36," Namun apabila ada orang lain yang ikut nimbrung juga silahkan saja. "),t.qZA(),t.TgZ(37,"p",18),t._uU(38," Semua gambar yang bisa dibilang sebagai maskot atau simbol pada website ini, bukan merupakan hasil karya orisinil melainkan milik "),t.TgZ(39,"a",19),t._uU(40,"\u3042\u304a\u3044\u3068\u308a"),t.qZA(),t._uU(41,". Silahkan bantu dan atau dukung melalui tautan halaman toko "),t.TgZ(42,"a",20)(43,"i"),t._uU(44,"booth"),t.qZA()(),t._uU(45," jika ingin membeli dan mendapatkan "),t.TgZ(46,"i"),t._uU(47,"merchandise"),t.qZA(),t._uU(48," / suvenir secara fisik. "),t.qZA(),t.TgZ(49,"p",18),t._uU(50," Informasi lebih lanjut "),t.TgZ(51,"a",21),t._uU(52,"klik disini"),t.qZA(),t._uU(53," bro! "),t.qZA(),t.TgZ(54,"p",18),t._uU(55,"Terima kasih atas kontribusinya (\uff61>\ufe4f<\uff61)"),t.qZA(),t._UZ(56,"hr"),t.TgZ(57,"p",22),t._uU(58," @ "),t.TgZ(59,"a",21),t._uU(60,"Solo Koding All The Way"),t.qZA(),t._uU(61," -- "),t.qZA()()(),t.TgZ(62,"div",23)(63,"button",24),t.NdJ("click",function(){return m.toggleDetail()}),t._uU(64," So Bad Yet, So Good! "),t._UZ(65,"br"),t._uU(66," ~ (\uff61>\ufe4f<\uff61) ~ "),t._UZ(67,"br"),t._uU(68," .: Hack Me Please :. "),t.qZA()(),t.YNc(69,x,3,1,"div",25),t.YNc(70,O,5,3,"div",26),t.qZA()()),2&e&&(t.xp6(4),t.MGl("src","",m.ENV.baseUrl,"/assets/img/favicon.png",t.LSH),t.xp6(2),t.Oqu(m.ENV.siteName),t.xp6(63),t.Q6J("ngIf",m.detailed),t.xp6(1),t.Q6J("ngIf",m.detailed))},directives:[k.t,g.yS,s.lW,a.O5,a.sg,r.a8,r.dk,r.kc,r.n5,r.$j,r.G2,r.dn,r.hq,o.Hw,l.gM],pipes:[a.Nd],styles:[""]}),i})()}];let y=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[a.ez,g.Bz.forChild(j),f.m,d.F]]}),i})()},8616:(U,p,n)=>{n.d(p,{t:()=>k});var a=n(5e3),g=n(8406),f=n(8696),d=n(7140),b=n(9808),c=n(1861);function t(s,r){if(1&s&&a._UZ(0,"div",4),2&s){const o=a.oxw();a.Udp("background-size",o.GS.sizeContain?"contain":"cover")("background-image","url("+o.GS.bannerImg+")")("background-repeat",o.GS.bgRepeat?"repeat-x":"no-repeat")("height","/home"===o.ROUTER.url||"/berkas"===o.ROUTER.url?"192px":"128px")("background-position-y","/berkas"===o.ROUTER.url?"22.5%":"")}}function _(s,r){if(1&s&&(a.TgZ(0,"strong",10),a._uU(1," -- "),a.TgZ(2,"i")(3,"a",11),a._uU(4),a.qZA()()()),2&s){const o=a.oxw().$implicit;a.xp6(3),a.MGl("routerLink","/user/",o.notifCreator,""),a.xp6(1),a.hij(" ",o.notifCreator," ")}}function h(s,r){if(1&s){const o=a.EpF();a.TgZ(0,"button",12),a.NdJ("click",function(){a.CHM(o);const v=a.oxw().$implicit;return a.oxw().removeNotif(v.notifData.id)}),a.qZA()}}function T(s,r){if(1&s&&(a.TgZ(0,"div",5)(1,"div")(2,"strong",6),a._uU(3),a.qZA(),a._UZ(4,"span",7),a.ALo(5,"safeInnerHtml"),a.YNc(6,_,5,2,"strong",8),a.YNc(7,h,1,0,"button",9),a.qZA()()),2&s){const o=r.$implicit;a.xp6(1),a.Gre("alert alert-",o.notifData.type," alert-dismissible fade show"),a.xp6(2),a.Oqu(o.notifData.title),a.xp6(1),a.Q6J("innerHTML",a.lcZ(5,7,o.notifData.content),a.oJD),a.xp6(2),a.Q6J("ngIf",o.notifCreator),a.xp6(1),a.Q6J("ngIf",o.notifData.dismissible)}}let k=(()=>{class s{constructor(o,l,v){this.router=o,this.gs=l,this.notif=v}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(o){this.notif.removeNotif(o)}}return s.\u0275fac=function(o){return new(o||s)(a.Y36(g.F0),a.Y36(f.U),a.Y36(d.T))},s.\u0275cmp=a.Xpm({type:s,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(o,l){1&o&&(a.YNc(0,t,1,10,"div",0),a.TgZ(1,"div",1)(2,"div",2),a.YNc(3,T,8,9,"div",3),a.qZA()()),2&o&&(a.Q6J("ngIf",l.GS.bannerImg&&("/home"===l.ROUTER.url||"/berkas"===l.ROUTER.url||"/fansub"===l.ROUTER.url||"/berkas"===l.ROUTER.url||"/anime"===l.ROUTER.url||l.ROUTER.url.includes("/anime?")||"/dorama"===l.ROUTER.url||l.ROUTER.url.includes("/dorama?"))),a.xp6(3),a.Q6J("ngForOf",l.NOTIF.notifications))},directives:[b.O5,b.sg,g.yS],pipes:[c.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%;background-image:url(/assets/img/home-banner.png)}"]}),s})()},8613:(U,p,n)=>{n.d(p,{F:()=>b});var a=n(9808),g=n(8406),f=n(7355),d=n(5e3);let b=(()=>{class c{}return c.\u0275fac=function(_){return new(_||c)},c.\u0275mod=d.oAB({type:c}),c.\u0275inj=d.cJS({imports:[[a.ez,g.Bz,f.T]]}),c})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/180.e88fa82acf1a2111.js b/dist/fansubid/browser/180.e88fa82acf1a2111.js new file mode 100644 index 000000000..1e4af23dc --- /dev/null +++ b/dist/fansubid/browser/180.e88fa82acf1a2111.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[180],{2180:(U,p,n)=>{n.r(p),n.d(p,{AboutModule:()=>y});var a=n(9808),g=n(8406),f=n(210),d=n(8613);const b=JSON.parse('{"HO":{"@angular-material-components/datetime-picker":"^7.0.1","@angular/animations":"~13.3.0","@angular/cdk":"^13.3.3","@angular/common":"~13.3.0","@angular/compiler":"~13.3.0","@angular/core":"~13.3.0","@angular/flex-layout":"^13.0.0-beta.38","@angular/forms":"~13.3.0","@angular/material":"^13.3.3","@angular/material-moment-adapter":"^13.3.3","@angular/platform-browser":"~13.3.0","@angular/platform-browser-dynamic":"~13.3.0","@angular/platform-server":"~13.3.0","@angular/router":"~13.3.0","@angular/service-worker":"~13.3.0","@discordjs/opus":"^0.7.0","@iamtraction/google-translate":"^1.1.2","@kolkov/angular-editor":"^2.0.0","@nestjs/common":"^8.0.0","@nestjs/core":"^8.0.0","@nestjs/ng-universal":"^6.0.0","@nestjs/platform-express":"^8.0.0","@nestjs/platform-socket.io":"^8.4.4","@nestjs/schedule":"^2.0.1","@nestjs/swagger":"^6.2.1","@nestjs/throttler":"^2.0.1","@nestjs/typeorm":"^8.0.3","@nestjs/websockets":"^8.4.4","@nguniversal/express-engine":"^13.0.1","@types/morgan":"^1.9.3","@uploadx/core":"^6.0.0","abort-controller":"^3.0.0","animate.css":"^4.1.1","bootstrap":"^5.1.3","buffer":"^6.0.3","cache-manager":"^3.6.1","chalk":"^5.0.1","chart.js":"^2.9.4","class-transformer":"^0.5.1","class-validator":"^0.13.1","compression":"^1.7.4","cookie-parser":"^1.4.6","crypto-js":"^4.1.1","discord.js":"^13.6.0","ebml":"^3.0.0","express":"^4.15.2","express-throttle-bandwidth":"^1.0.1","ffmpeg-static":"^4.4.0","file-saver":"^2.0.5","googleapis":"^100.0.0","hammerjs":"^2.0.8","helmet":"^5.0.2","idb-chunk-store":"^1.0.1","jsonwebtoken":"^8.5.1","kuroshiro":"^1.1.2","kuroshiro-analyzer-kuromoji":"^1.1.0","mailtrap":"^3.1.1","morgan":"^1.10.0","nest-morgan":"^2.0.0","ng-recaptcha":"^9.0.0","ng2-charts":"^2.4.3","ngx-material-file-input":"^3.0.0","ngx-progressbar":"^8.0.0","ngx-spinner":"^13.1.1","ngx-swiper-wrapper":"^10.0.0","ngx-toastr":"^14.3.0","ngx-typed-js":"^2.1.1","ngx-uploadx":"^5.2.0","node-fetch":"^3.2.3","p2p-graph":"^2.0.0","pg":"^8.7.3","puppeteer":"^17.1.3","puppeteer-extra":"^3.3.4","puppeteer-extra-plugin-stealth":"^2.11.1","reflect-metadata":"^0.1.13","rss-to-json":"^2.0.2","rxjs":"~7.5.0","sakura-js":"^1.1.1","socket.io-client":"^2.4.0","string-strip-html":"^11.3.0","swiper":"^6.8.4","tslib":"^2.4.0","typeorm":"^0.2.38","video.js":"^7.18.1","viewerjs":"^1.10.5","wanakana":"^5.0.0","webtorrent":"^1.5.8","webtorrent-health":"^1.1.2","winbox":"^0.2.1","ws":"^8.13.0","xng-breadcrumb":"^7.2.0","ytdl-core":"^4.9.1","zone.js":"~0.11.4"}}');var c=n(5934),t=n(5e3),_=n(6382),h=n(8696),T=n(8020),k=n(8616),s=n(7423),r=n(9224),o=n(5245),l=n(7238);function v(i,u){if(1&i){const e=t.EpF();t.TgZ(0,"div",28)(1,"mat-card",29)(2,"mat-card-header"),t._UZ(3,"div",30),t.TgZ(4,"mat-card-title"),t._uU(5),t.qZA(),t.TgZ(6,"mat-card-subtitle"),t._uU(7),t.qZA()(),t._UZ(8,"img",31),t.TgZ(9,"mat-card-content")(10,"p"),t._uU(11),t.qZA()(),t.TgZ(12,"mat-card-actions")(13,"button",32),t.NdJ("click",function(){const E=t.CHM(e).$implicit;return t.oxw(2).openWebsite(E.site_url)}),t.TgZ(14,"mat-icon",33),t._uU(15,"web"),t.qZA(),t._uU(16," Website "),t.qZA()()()()}if(2&i){const e=u.$implicit;t.xp6(3),t.Udp("background-image","url("+e.logo+")"),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.Oqu(e.version),t.xp6(1),t.Q6J("src",e.pict,t.LSH),t.xp6(3),t.Oqu(e.description)}}function x(i,u){if(1&i&&(t.TgZ(0,"div",15)(1,"div",1),t.YNc(2,v,17,6,"div",27),t.qZA()()),2&i){const e=t.oxw();t.xp6(2),t.Q6J("ngForOf",e.aboutProject)}}function A(i,u){if(1&i&&(t.TgZ(0,"button",37),t._uU(1),t.qZA()),2&i){const e=u.$implicit;t.s9C("matTooltip",e.value),t.xp6(1),t.hij(" ",e.key," ")}}function O(i,u){if(1&i&&(t.TgZ(0,"div",34)(1,"div",1)(2,"div",35),t.YNc(3,A,2,2,"button",36),t.ALo(4,"keyvalue"),t.qZA()()()),2&i){const e=t.oxw();t.xp6(3),t.Q6J("ngForOf",t.lcZ(4,1,e.library))}}const j=[{path:"",pathMatch:"full",component:(()=>{class i{constructor(e,m,Z){this.fs=e,this.gs=m,this.wb=Z,this.detailed=!1,this.aboutProject=[{logo:"/assets/img/about/nodejs_logo.png",pict:"/assets/img/about/nodejs_pict.png",name:"NodeJS",version:"v12.16.1",description:"Node.js\xae is a JavaScript runtime built on Chrome's V8 JavaScript engine.",site_url:"https://nodejs.org"},{logo:"/assets/img/about/angular.svg",pict:"/assets/img/about/angular.svg",name:"Angular + Material",version:"v10.0.5",description:"One framework. Mobile & desktop. Material Design components.",site_url:"https://angular.io"},{logo:"/assets/img/about/express_logo.png",pict:"/assets/img/about/express_pict.png",name:"ExpressJS",version:"v4.15.2",description:"Fast, unopinionated, minimalist web framework for Node.js",site_url:"https://expressjs.com"},{logo:"/assets/img/about/mysql_logo.png",pict:"/assets/img/about/mysql_pict.png",name:"MySQL",version:"v8.0",description:"The world's most popular open source database",site_url:"https://www.mysql.com"}],this.library=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get ENV(){return c.N}ngOnInit(){this.gs.isBrowser&&(this.library=b.HO,this.fs.initializeFab(null,"/assets/img/discord/pink.png","Discord Server",c.N.discord.join_url,!0))}openWebsite(e){this.wb.winboxOpenUri(e)}toggleDetail(){this.detailed=!this.detailed}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(_.r),t.Y36(h.U),t.Y36(T.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-about"]],decls:71,vars:4,consts:[[1,"container"],[1,"row"],[1,"col-12","align-items-center"],[1,"text-center","my-3","mx-auto"],[1,"p-5",3,"src"],[1,"h3","mb-3","font-weight-normal","gradient-text"],[1,"text-warning","pb-3"],[1,"row","mb-3"],[1,"mouse_scroll"],[1,"mouse"],[1,"wheel"],[1,"m_scroll_arrows","unu"],[1,"m_scroll_arrows","doi"],[1,"m_scroll_arrows","trei"],[1,"row","pb-3"],[1,"col-12"],[1,"alert","alert-secondary","fade","show"],[1,"alert-heading"],[1,"ps-3"],["href","https://www.pixiv.net/en/users/1688603","target","_blank",2,"text-decoration","none"],["href","https://aoitori-jpn.booth.pm","target","_blank",2,"text-decoration","none"],["routerLink","/news",2,"text-decoration","none"],[1,"mb-0","text-end","pe-3"],[1,"col-12","text-center"],["mat-button","","color","accent",1,"m-3",3,"click"],["class","col-12",4,"ngIf"],["class","col",4,"ngIf"],["class","col-12 col-md-6 col-lg-4 col-xl-3 p-3",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-lg-4","col-xl-3","p-3"],[1,"gradient-border","rgb-border"],["mat-card-avatar","",2,"background-size","cover"],["mat-card-image","",2,"height","192px","object-fit","cover",3,"src"],["mat-button","","color","accent",3,"click"],[1,"me-1"],[1,"col"],[1,"col-12","text-center","p-3"],["mat-flat-button","","color","accent","class","m-1",3,"matTooltip",4,"ngFor","ngForOf"],["mat-flat-button","","color","accent",1,"m-1",3,"matTooltip"]],template:function(e,m){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t._UZ(4,"img",4),t.TgZ(5,"h1",5),t._uU(6),t.qZA(),t.TgZ(7,"h2",6),t._uU(8," Tempat belajar sambil berdiskusi mengenai hal-hal tentang jejepangan, berbagi dan melacak sekaligus mengabadikan berkas proyek garapan tontonan baik animasi maupun film drama dari kelompok penerjemah berbahasa Indonesia. "),t.qZA()()()(),t.TgZ(9,"div",7)(10,"div",2)(11,"div",8)(12,"div",9),t._UZ(13,"div",10),t.qZA(),t.TgZ(14,"div"),t._UZ(15,"span",11)(16,"span",12)(17,"span",13),t.qZA()()()()(),t._UZ(18,"app-notifications"),t.TgZ(19,"div",0)(20,"div",14)(21,"div",15)(22,"div",16)(23,"h2",17),t._uU(24,"Tentang & Informasi!"),t.qZA(),t.TgZ(25,"p",18),t._uU(26," Website ini sebenarnya dibuat hanya dengan tujuan untuk "),t.TgZ(27,"i"),t._uU(28,"listing"),t.qZA(),t._uU(29," daftar berkas (Anime & Drama) secara pribadi yang saya backup di tempat penyimpanan secara "),t.TgZ(30,"i"),t._uU(31,"online"),t.qZA(),t._uU(32,". Terus juga sekalian aja tambahin modul - modul belajar Nihongo karena masih memiliki bau yang sama ya 'kan, jejepangan. Hehehe~ "),t.qZA(),t.TgZ(33,"p",18)(34,"s"),t._uU(35,"Sebenernya gw gabut a.k.a pengangguran dan cuman mau ngetes tugas akhir proyek kampus~ wkwkwkwkwk~"),t.qZA(),t._uU(36," Namun apabila ada orang lain yang ikut nimbrung juga silahkan saja. "),t.qZA(),t.TgZ(37,"p",18),t._uU(38," Semua gambar yang bisa dibilang sebagai maskot atau simbol pada website ini, bukan merupakan hasil karya orisinil melainkan milik "),t.TgZ(39,"a",19),t._uU(40,"\u3042\u304a\u3044\u3068\u308a"),t.qZA(),t._uU(41,". Silahkan bantu dan atau dukung melalui tautan halaman toko "),t.TgZ(42,"a",20)(43,"i"),t._uU(44,"booth"),t.qZA()(),t._uU(45," jika ingin membeli dan mendapatkan "),t.TgZ(46,"i"),t._uU(47,"merchandise"),t.qZA(),t._uU(48," / suvenir secara fisik. "),t.qZA(),t.TgZ(49,"p",18),t._uU(50," Informasi lebih lanjut "),t.TgZ(51,"a",21),t._uU(52,"klik disini"),t.qZA(),t._uU(53," bro! "),t.qZA(),t.TgZ(54,"p",18),t._uU(55,"Terima kasih atas kontribusinya (\uff61>\ufe4f<\uff61)"),t.qZA(),t._UZ(56,"hr"),t.TgZ(57,"p",22),t._uU(58," @ "),t.TgZ(59,"a",21),t._uU(60,"Solo Koding All The Way"),t.qZA(),t._uU(61," -- "),t.qZA()()(),t.TgZ(62,"div",23)(63,"button",24),t.NdJ("click",function(){return m.toggleDetail()}),t._uU(64," So Bad Yet, So Good! "),t._UZ(65,"br"),t._uU(66," ~ (\uff61>\ufe4f<\uff61) ~ "),t._UZ(67,"br"),t._uU(68," .: Hack Me Please :. "),t.qZA()(),t.YNc(69,x,3,1,"div",25),t.YNc(70,O,5,3,"div",26),t.qZA()()),2&e&&(t.xp6(4),t.MGl("src","",m.ENV.baseUrl,"/assets/img/favicon.png",t.LSH),t.xp6(2),t.Oqu(m.ENV.siteName),t.xp6(63),t.Q6J("ngIf",m.detailed),t.xp6(1),t.Q6J("ngIf",m.detailed))},directives:[k.t,g.yS,s.lW,a.O5,a.sg,r.a8,r.dk,r.kc,r.n5,r.$j,r.G2,r.dn,r.hq,o.Hw,l.gM],pipes:[a.Nd],styles:[""]}),i})()}];let y=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[a.ez,g.Bz.forChild(j),f.m,d.F]]}),i})()},8616:(U,p,n)=>{n.d(p,{t:()=>k});var a=n(5e3),g=n(8406),f=n(8696),d=n(7140),b=n(9808),c=n(1861);function t(s,r){if(1&s&&a._UZ(0,"div",4),2&s){const o=a.oxw();a.Udp("background-size",o.GS.sizeContain?"contain":"cover")("background-image","url("+o.GS.bannerImg+")")("background-repeat",o.GS.bgRepeat?"repeat-x":"no-repeat")("height","/home"===o.ROUTER.url||"/berkas"===o.ROUTER.url?"192px":"128px")("background-position-y","/berkas"===o.ROUTER.url?"22.5%":"")}}function _(s,r){if(1&s&&(a.TgZ(0,"strong",10),a._uU(1," -- "),a.TgZ(2,"i")(3,"a",11),a._uU(4),a.qZA()()()),2&s){const o=a.oxw().$implicit;a.xp6(3),a.MGl("routerLink","/user/",o.notifCreator,""),a.xp6(1),a.hij(" ",o.notifCreator," ")}}function h(s,r){if(1&s){const o=a.EpF();a.TgZ(0,"button",12),a.NdJ("click",function(){a.CHM(o);const v=a.oxw().$implicit;return a.oxw().removeNotif(v.notifData.id)}),a.qZA()}}function T(s,r){if(1&s&&(a.TgZ(0,"div",5)(1,"div")(2,"strong",6),a._uU(3),a.qZA(),a._UZ(4,"span",7),a.ALo(5,"safeInnerHtml"),a.YNc(6,_,5,2,"strong",8),a.YNc(7,h,1,0,"button",9),a.qZA()()),2&s){const o=r.$implicit;a.xp6(1),a.Gre("alert alert-",o.notifData.type," alert-dismissible fade show"),a.xp6(2),a.Oqu(o.notifData.title),a.xp6(1),a.Q6J("innerHTML",a.lcZ(5,7,o.notifData.content),a.oJD),a.xp6(2),a.Q6J("ngIf",o.notifCreator),a.xp6(1),a.Q6J("ngIf",o.notifData.dismissible)}}let k=(()=>{class s{constructor(o,l,v){this.router=o,this.gs=l,this.notif=v}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(o){this.notif.removeNotif(o)}}return s.\u0275fac=function(o){return new(o||s)(a.Y36(g.F0),a.Y36(f.U),a.Y36(d.T))},s.\u0275cmp=a.Xpm({type:s,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(o,l){1&o&&(a.YNc(0,t,1,10,"div",0),a.TgZ(1,"div",1)(2,"div",2),a.YNc(3,T,8,9,"div",3),a.qZA()()),2&o&&(a.Q6J("ngIf",l.GS.bannerImg&&("/home"===l.ROUTER.url||"/berkas"===l.ROUTER.url||"/fansub"===l.ROUTER.url||"/berkas"===l.ROUTER.url||"/anime"===l.ROUTER.url||l.ROUTER.url.includes("/anime?")||"/dorama"===l.ROUTER.url||l.ROUTER.url.includes("/dorama?"))),a.xp6(3),a.Q6J("ngForOf",l.NOTIF.notifications))},directives:[b.O5,b.sg,g.yS],pipes:[c.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%;background-image:url(/assets/img/home-banner.png)}"]}),s})()},8613:(U,p,n)=>{n.d(p,{F:()=>b});var a=n(9808),g=n(8406),f=n(7355),d=n(5e3);let b=(()=>{class c{}return c.\u0275fac=function(_){return new(_||c)},c.\u0275mod=d.oAB({type:c}),c.\u0275inj=d.cJS({imports:[[a.ez,g.Bz,f.T]]}),c})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/219.46e33e31d42b4868.js b/dist/fansubid/browser/219.46e33e31d42b4868.js deleted file mode 100644 index 643d51a03..000000000 --- a/dist/fansubid/browser/219.46e33e31d42b4868.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[219],{325:(ka,ar,X)=>{"use strict";X.d(ar,{Y:()=>Ir});var V=X(9215),Fe=X(4249),C=X(5e3),Se=X(4137),G=X(8406),Le=X(8696),nr=X(8381),rt=X(9731);let Sa=(()=>{class E{constructor(k,M){this.api=k,this.gs=M}getAllReport(){return this.api.getData("/likedislike")}getReport(k,M){return this.api.getData(`/likedislike/${k}/${M}`)}setReport(k,M,H){return this.api.postData(`/likedislike/${k}/${M}`,H)}deleteReport(k){return this.api.deleteData(`/likedislike/${k}`)}}return E.\u0275fac=function(k){return new(k||E)(C.LFG(rt.s),C.LFG(Le.U))},E.\u0275prov=C.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})();var Ma=X(3e3),Ta=X(9808),Aa=X(7423),Da=X(5245);function Pa(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"span",14),C.NdJ("click",function(){return C.CHM(k),C.oxw().toggleAllStats()}),C._uU(1),C.qZA()}if(2&E){const k=C.oxw();C.xp6(1),C.hij(" ",k.toggleAllStatsValue?"Sederhana":"Lengkap"," ")}}function Oa(E,fe){if(1&E&&(C.TgZ(0,"div",15),C._UZ(1,"canvas",16),C.qZA()),2&E){const k=C.oxw();C.xp6(1),C.Q6J("data",k.doughnutChartKetertarikanData)("labels",k.doughnutChartKetertarikanLabels)("chartType",k.doughnutChartType)("options",k.doughnutChartKetertarikanOptions)("plugins",k.chartPlugins)("legend",!0)}}function Ia(E,fe){if(1&E&&(C.TgZ(0,"div",15),C._UZ(1,"canvas",16),C.qZA()),2&E){const k=C.oxw();C.xp6(1),C.Q6J("data",k.barChartUniqueData)("labels",k.barChartUniqueLabels)("chartType",k.barChartType)("options",k.barChartUniqueOptions)("plugins",k.chartPlugins)("legend",!1)}}function Fa(E,fe){if(1&E&&(C.TgZ(0,"div",15),C._UZ(1,"canvas",16),C.qZA()),2&E){const k=C.oxw();C.xp6(1),C.Q6J("data",k.lineChartVisitorData)("labels",k.lineChartVisitorLabels)("chartType",k.lineChartType)("options",k.lineChartVisitorOptions)("plugins",k.chartPlugins)("legend",!1)}}function La(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",17),C.NdJ("click",function(){return C.CHM(k),C.oxw().login()}),C.TgZ(1,"mat-icon",18),C._uU(2,"vpn_key"),C.qZA(),C._uU(3," Klik Untuk Login "),C.qZA()}}function at(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",19),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.LIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_up_off_alt"),C.qZA(),C._uU(3),C.qZA()}if(2&E){const k=C.oxw();C.xp6(3),C.hij(" Suka (",k.summary.like,") ")}}function Bt(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",20),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.LIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_up_off_alt"),C.qZA(),C._uU(3),C.qZA()}if(2&E){const k=C.oxw();C.xp6(3),C.hij(" Suka (",k.summary.like,") ")}}function Pr(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",17),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.DISLIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_down_off_alt"),C.qZA(),C._uU(3," Tidak Suka "),C.qZA()}}function Or(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",21),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.DISLIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_down_off_alt"),C.qZA(),C._uU(3," Tidak Suka "),C.qZA()}}let Ir=(()=>{class E{constructor(k,M,H,nt,ir,Et){this.as=k,this.router=M,this.gs=H,this.ss=nt,this.rs=ir,this.bs=Et,this.toggleAllStatsValue=!1,this.summary={like:0,dislike:0,unique_ip:0,unique_user:0,verified_user:0,un_verified_user:0},this.doughnutChartKetertarikanOptions={title:{display:!0,text:"Total Ketertarikan Pengguna"},responsive:!0,legend:{position:"right"}},this.lineChartVisitorOptions={title:{display:!0,text:"Riwayat Jumlah Pengunjung"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}]}},this.barChartUniqueOptions={title:{display:!0,text:"Total Kunjungan Unik"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}]}},this.chartPlugins=[],this.doughnutChartKetertarikanData=[],this.doughnutChartKetertarikanLabels=[],this.lineChartVisitorData=[],this.lineChartVisitorLabels=[],this.barChartUniqueData=[],this.barChartUniqueLabels=[],this.doughnutChartType="doughnut",this.lineChartType="line",this.barChartType="bar",this.reportTrackType=null,this.idSlugUsername=null,this.subsGetReport=null,this.subsSetReport=null,this.myReport=null,this.gs.isBrowser&&((0,V.Dy)(),(0,V.bF)())}get AS(){return this.as}ngOnDestroy(){var k,M;null===(k=this.subsGetReport)||void 0===k||k.unsubscribe(),null===(M=this.subsSetReport)||void 0===M||M.unsubscribe()}get LIKE(){return Fe.eK.LIKE}get DISLIKE(){return Fe.eK.DISLIKE}get SHOWALLSTATS(){return this.toggleAllStatsValue}get SHOWALLSTATSVERIFIEDONLY(){var k,M;const H=null===(M=null===(k=this.as.currentUserSubject)||void 0===k?void 0:k.value)||void 0===M?void 0:M.role;return!!H&&(H===Fe.yS.ADMIN||H===Fe.yS.MODERATOR||H===Fe.yS.FANSUBBER)&&this.SHOWALLSTATS}ngOnInit(){this.gs.isBrowser&&(this.reportTrackType=this.router.url.split("/")[1],this.idSlugUsername=this.router.url.split("/")[2],this.ss.socketEmit("track-get",{trackType:this.reportTrackType,idSlugUsername:this.idSlugUsername},k=>{this.gs.log("[SOCKET_TRACK-GET]",k),this.barChartUniqueLabels=["Alamat IP","Akun Pengguna","Terverifikasi","Belum Verifikasi"],this.barChartUniqueData=[k.unique_ip,k.unique_user,k.verified_user,k.un_verified_user],this.summary.unique_ip=k.unique_ip,this.summary.unique_user=k.unique_user,this.summary.verified_user=k.verified_user,this.summary.un_verified_user=k.un_verified_user,this.lineChartVisitorData=[],this.lineChartVisitorLabels=[];for(const M of k.visitor)this.lineChartVisitorData.push(M.visitor_count||0),this.lineChartVisitorLabels.push(new Date(new Date(M.visitor_date).getTime()-60*new Date(M.visitor_date).getTimezoneOffset()*1e3).toISOString().split("T")[0])}),this.getReport())}toggleAllStats(){this.toggleAllStatsValue=!this.toggleAllStatsValue}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:`/${this.reportTrackType}/${this.idSlugUsername}`}})}likeOrDislike(k){var M,H;let nt=null;(null===(M=this.as.currentUserSubject)||void 0===M?void 0:M.value)&&(nt=k===(null===(H=this.myReport)||void 0===H?void 0:H.type)?null:k,this.setReport(nt,!0))}setReport(k,M=!1){this.bs.busy(),this.rs.setReport(this.reportTrackType,this.idSlugUsername,{likedislike:k}).subscribe({next:H=>{this.gs.log("[LIKE-DISLIKE_SET_REPORT_SUCCESS]",H),this.myReport=H.result,this.bs.idle(),M&&this.getReport()},error:H=>{this.gs.log("[LIKE-DISLIKE_SET_REPORT_ERROR]",H,"error"),this.bs.idle()}})}getReport(){this.bs.busy(),this.rs.getReport(this.reportTrackType,this.idSlugUsername).subscribe({next:k=>{this.gs.log("[LIKE-DISLIKE_GET_REPORT_SUCCESS]",k),this.doughnutChartKetertarikanLabels=[],this.doughnutChartKetertarikanData=[],this.summary.like=0,this.summary.dislike=0;for(const M of k.result.statistics)M.type===this.LIKE?(this.doughnutChartKetertarikanLabels.push("Suka"),this.summary.like=M.count):(this.doughnutChartKetertarikanLabels.push("Tidak Suka"),this.summary.dislike=M.count),this.doughnutChartKetertarikanData.push(M.count);this.myReport=k.result.myReport,this.bs.idle()},error:k=>{this.gs.log("[LIKE-DISLIKE_GET_REPORT_ERROR]",k,"error"),this.bs.idle()}})}}return E.\u0275fac=function(k){return new(k||E)(C.Y36(Se.e),C.Y36(G.F0),C.Y36(Le.U),C.Y36(nr.R),C.Y36(Sa),C.Y36(Ma.z))},E.\u0275cmp=C.Xpm({type:E,selectors:[["app-report"]],decls:21,vars:9,consts:[[1,"row","p-0"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],["class","float-end text-warning","style","font-size: small; cursor: pointer;",3,"click",4,"ngIf"],[1,"text-bifeldy"],[1,"col-12"],["class","col-12 col-md-6 py-1 bg-bifeldy",4,"ngIf"],[1,"col","py-1","bg-bifeldy"],[1,"row","align-items-center","h-100"],[1,"col-12","mx-auto","text-center"],["mat-stroked-button","","color","accent","class","mx-1",3,"click",4,"ngIf"],["mat-flat-button","","color","accent","class","mx-1 shiny",3,"click",4,"ngIf"],["mat-stroked-button","","color","accent","class","mx-1 shiny",3,"click",4,"ngIf"],["mat-flat-button","","color","accent","class","mx-1",3,"click",4,"ngIf"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"col-12","col-md-6","py-1","bg-bifeldy"],["baseChart","",3,"data","labels","chartType","options","plugins","legend"],["mat-stroked-button","","color","accent",1,"mx-1",3,"click"],[1,"me-1"],["mat-flat-button","","color","accent",1,"mx-1","shiny",3,"click"],["mat-stroked-button","","color","accent",1,"mx-1","shiny",3,"click"],["mat-flat-button","","color","accent",1,"mx-1",3,"click"]],template:function(k,M){1&k&&(C.TgZ(0,"div",0)(1,"div",1)(2,"h2",2),C.YNc(3,Pa,2,1,"span",3),C.TgZ(4,"b",4),C._uU(5,"Data Statistik"),C.qZA()()(),C.TgZ(6,"div",5)(7,"div",0),C.YNc(8,Oa,2,6,"div",6),C.YNc(9,Ia,2,6,"div",6),C.YNc(10,Fa,2,6,"div",6),C.TgZ(11,"div",7)(12,"div",8)(13,"div",9)(14,"h2"),C._uU(15,"Penilaian Saya"),C.qZA(),C.YNc(16,La,4,0,"button",10),C.YNc(17,at,4,1,"button",11),C.YNc(18,Bt,4,1,"button",12),C.YNc(19,Pr,4,0,"button",10),C.YNc(20,Or,4,0,"button",13),C.qZA()()()()()()),2&k&&(C.xp6(3),C.Q6J("ngIf",null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value),C.xp6(5),C.Q6J("ngIf",M.SHOWALLSTATSVERIFIEDONLY&&M.doughnutChartKetertarikanData.length>0&&M.doughnutChartKetertarikanLabels.length>0),C.xp6(1),C.Q6J("ngIf",M.SHOWALLSTATSVERIFIEDONLY&&M.barChartUniqueData.length>0&&M.barChartUniqueLabels.length>0),C.xp6(1),C.Q6J("ngIf",M.lineChartVisitorData.length>0&&M.lineChartVisitorLabels.length>0),C.xp6(6),C.Q6J("ngIf",!(null!=M.AS.currentUserSubject&&M.AS.currentUserSubject.value)),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)===M.LIKE),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)!==M.LIKE),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)!==M.DISLIKE),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)===M.DISLIKE))},directives:[Ta.O5,V.jh,Aa.lW,Da.Hw],styles:[""]}),E})()},4167:(ka,ar,X)=>{"use strict";X.d(ar,{b:()=>G});var V=X(9808),Fe=X(9215),C=X(210),Se=X(5e3);let G=(()=>{class Le{}return Le.\u0275fac=function(rt){return new(rt||Le)},Le.\u0275mod=Se.oAB({type:Le}),Le.\u0275inj=Se.cJS({imports:[[V.ez,Fe.m9,C.m]]}),Le})()},8332:function(ka,ar,X){ka.exports=function(V){"use strict";V=V&&V.hasOwnProperty("default")?V.default:V;var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},G=function Fe(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){var t={};for(var r in Se)Se.hasOwnProperty(r)&&(t[Se[r]]=r);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in a)if(a.hasOwnProperty(n)){if(!("channels"in a[n]))throw new Error("missing channels property: "+n);if(!("labels"in a[n]))throw new Error("missing channel labels property: "+n);if(a[n].labels.length!==a[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=a[n].channels,o=a[n].labels;delete a[n].channels,delete a[n].labels,Object.defineProperty(a[n],"channels",{value:i}),Object.defineProperty(a[n],"labels",{value:o})}function l(s,u){return Math.pow(s[0]-u[0],2)+Math.pow(s[1]-u[1],2)+Math.pow(s[2]-u[2],2)}a.rgb.hsl=function(s){var y,w,u=s[0]/255,d=s[1]/255,f=s[2]/255,v=Math.min(u,d,f),p=Math.max(u,d,f),m=p-v;return p===v?y=0:u===p?y=(d-f)/m:d===p?y=2+(f-u)/m:f===p&&(y=4+(u-d)/m),(y=Math.min(60*y,360))<0&&(y+=360),w=(v+p)/2,[y,100*(p===v?0:w<=.5?m/(p+v):m/(2-p-v)),100*w]},a.rgb.hsv=function(s){var u,d,f,v,p,m=s[0]/255,y=s[1]/255,_=s[2]/255,w=Math.max(m,y,_),T=w-Math.min(m,y,_),A=function(R){return(w-R)/6/T+.5};return 0===T?v=p=0:(p=T/w,u=A(m),d=A(y),f=A(_),m===w?v=f-d:y===w?v=1/3+u-f:_===w&&(v=2/3+d-u),v<0?v+=1:v>1&&(v-=1)),[360*v,100*p,100*w]},a.rgb.hwb=function(s){var u=s[0],d=s[1],f=s[2];return[a.rgb.hsl(s)[0],1/255*Math.min(u,Math.min(d,f))*100,100*(f=1-1/255*Math.max(u,Math.max(d,f)))]},a.rgb.cmyk=function(s){var y,u=s[0]/255,d=s[1]/255,f=s[2]/255;return[100*((1-u-(y=Math.min(1-u,1-d,1-f)))/(1-y)||0),100*((1-d-y)/(1-y)||0),100*((1-f-y)/(1-y)||0),100*y]},a.rgb.keyword=function(s){var u=t[s];if(u)return u;var f,d=1/0;for(var v in Se)if(Se.hasOwnProperty(v)){var m=l(s,Se[v]);m.04045?Math.pow((u+.055)/1.055,2.4):u/12.92)+.3576*(d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92)+.1805*(f=f>.04045?Math.pow((f+.055)/1.055,2.4):f/12.92)),100*(.2126*u+.7152*d+.0722*f),100*(.0193*u+.1192*d+.9505*f)]},a.rgb.lab=function(s){var u=a.rgb.xyz(s),d=u[0],f=u[1],v=u[2];return f/=100,v/=108.883,d=(d/=95.047)>.008856?Math.pow(d,1/3):7.787*d+16/116,[116*(f=f>.008856?Math.pow(f,1/3):7.787*f+16/116)-16,500*(d-f),200*(f-(v=v>.008856?Math.pow(v,1/3):7.787*v+16/116))]},a.hsl.rgb=function(s){var v,p,m,y,_,u=s[0]/360,d=s[1]/100,f=s[2]/100;if(0===d)return[_=255*f,_,_];v=2*f-(p=f<.5?f*(1+d):f+d-f*d),y=[0,0,0];for(var w=0;w<3;w++)(m=u+1/3*-(w-1))<0&&m++,m>1&&m--,y[w]=255*(_=6*m<1?v+6*(p-v)*m:2*m<1?p:3*m<2?v+(p-v)*(2/3-m)*6:v);return y},a.hsl.hsv=function(s){var u=s[0],d=s[1]/100,f=s[2]/100,v=d,p=Math.max(f,.01);return d*=(f*=2)<=1?f:2-f,v*=p<=1?p:2-p,[u,100*(0===f?2*v/(p+v):2*d/(f+d)),(f+d)/2*100]},a.hsv.rgb=function(s){var u=s[0]/60,d=s[1]/100,f=s[2]/100,v=Math.floor(u)%6,p=u-Math.floor(u),m=255*f*(1-d),y=255*f*(1-d*p),_=255*f*(1-d*(1-p));switch(f*=255,v){case 0:return[f,_,m];case 1:return[y,f,m];case 2:return[m,f,_];case 3:return[m,y,f];case 4:return[_,m,f];case 5:return[f,m,y]}},a.hsv.hsl=function(s){var p,m,y,u=s[0],d=s[1]/100,f=s[2]/100,v=Math.max(f,.01);return y=(2-d)*f,m=d*v,[u,100*(m=(m/=(p=(2-d)*v)<=1?p:2-p)||0),100*(y/=2)]},a.hwb.rgb=function(s){var p,m,y,_,w,T,A,u=s[0]/360,d=s[1]/100,f=s[2]/100,v=d+f;switch(v>1&&(d/=v,f/=v),y=6*u-(p=Math.floor(6*u)),0!=(1&p)&&(y=1-y),_=d+y*((m=1-f)-d),p){default:case 6:case 0:w=m,T=_,A=d;break;case 1:w=_,T=m,A=d;break;case 2:w=d,T=m,A=_;break;case 3:w=d,T=_,A=m;break;case 4:w=_,T=d,A=m;break;case 5:w=m,T=d,A=_}return[255*w,255*T,255*A]},a.cmyk.rgb=function(s){var d=s[1]/100,f=s[2]/100,v=s[3]/100;return[255*(1-Math.min(1,s[0]/100*(1-v)+v)),255*(1-Math.min(1,d*(1-v)+v)),255*(1-Math.min(1,f*(1-v)+v))]},a.xyz.rgb=function(s){var v,p,m,u=s[0]/100,d=s[1]/100,f=s[2]/100;return p=-.9689*u+1.8758*d+.0415*f,m=.0557*u+-.204*d+1.057*f,v=(v=3.2406*u+-1.5372*d+-.4986*f)>.0031308?1.055*Math.pow(v,1/2.4)-.055:12.92*v,p=p>.0031308?1.055*Math.pow(p,1/2.4)-.055:12.92*p,m=m>.0031308?1.055*Math.pow(m,1/2.4)-.055:12.92*m,[255*(v=Math.min(Math.max(0,v),1)),255*(p=Math.min(Math.max(0,p),1)),255*(m=Math.min(Math.max(0,m),1))]},a.xyz.lab=function(s){var u=s[0],d=s[1],f=s[2];return d/=100,f/=108.883,u=(u/=95.047)>.008856?Math.pow(u,1/3):7.787*u+16/116,[116*(d=d>.008856?Math.pow(d,1/3):7.787*d+16/116)-16,500*(u-d),200*(d-(f=f>.008856?Math.pow(f,1/3):7.787*f+16/116))]},a.lab.xyz=function(s){var v,p,m;v=s[1]/500+(p=(s[0]+16)/116),m=p-s[2]/200;var y=Math.pow(p,3),_=Math.pow(v,3),w=Math.pow(m,3);return p=y>.008856?y:(p-16/116)/7.787,v=_>.008856?_:(v-16/116)/7.787,m=w>.008856?w:(m-16/116)/7.787,[v*=95.047,p*=100,m*=108.883]},a.lab.lch=function(s){var p,u=s[0],d=s[1],f=s[2];return(p=360*Math.atan2(f,d)/2/Math.PI)<0&&(p+=360),[u,Math.sqrt(d*d+f*f),p]},a.lch.lab=function(s){var m,d=s[1];return m=s[2]/360*2*Math.PI,[s[0],d*Math.cos(m),d*Math.sin(m)]},a.rgb.ansi16=function(s){var u=s[0],d=s[1],f=s[2],v=1 in arguments?arguments[1]:a.rgb.hsv(s)[2];if(0===(v=Math.round(v/50)))return 30;var p=30+(Math.round(f/255)<<2|Math.round(d/255)<<1|Math.round(u/255));return 2===v&&(p+=60),p},a.hsv.ansi16=function(s){return a.rgb.ansi16(a.hsv.rgb(s),s[2])},a.rgb.ansi256=function(s){var u=s[0],d=s[1],f=s[2];return u===d&&d===f?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(d/255*5)+Math.round(f/255*5)},a.ansi16.rgb=function(s){var u=s%10;if(0===u||7===u)return s>50&&(u+=3.5),[u=u/10.5*255,u,u];var d=.5*(1+~~(s>50));return[(1&u)*d*255,(u>>1&1)*d*255,(u>>2&1)*d*255]},a.ansi256.rgb=function(s){if(s>=232){var u=10*(s-232)+8;return[u,u,u]}var d;return s-=16,[Math.floor(s/36)/5*255,Math.floor((d=s%36)/6)/5*255,d%6/5*255]},a.rgb.hex=function(s){var d=(((255&Math.round(s[0]))<<16)+((255&Math.round(s[1]))<<8)+(255&Math.round(s[2]))).toString(16).toUpperCase();return"000000".substring(d.length)+d},a.hex.rgb=function(s){var u=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!u)return[0,0,0];var d=u[0];3===u[0].length&&(d=d.split("").map(function(y){return y+y}).join(""));var f=parseInt(d,16);return[f>>16&255,f>>8&255,255&f]},a.rgb.hcg=function(s){var _,u=s[0]/255,d=s[1]/255,f=s[2]/255,v=Math.max(Math.max(u,d),f),p=Math.min(Math.min(u,d),f),m=v-p;return _=m<=0?0:v===u?(d-f)/m%6:v===d?2+(f-u)/m:4+(u-d)/m+4,_/=6,[360*(_%=1),100*m,100*(m<1?p/(1-m):0)]},a.hsl.hcg=function(s){var f,u=s[1]/100,d=s[2]/100,v=0;return(f=d<.5?2*u*d:2*u*(1-d))<1&&(v=(d-.5*f)/(1-f)),[s[0],100*f,100*v]},a.hsv.hcg=function(s){var d=s[2]/100,f=s[1]/100*d,v=0;return f<1&&(v=(d-f)/(1-f)),[s[0],100*f,100*v]},a.hcg.rgb=function(s){var d=s[1]/100,f=s[2]/100;if(0===d)return[255*f,255*f,255*f];var _,v=[0,0,0],p=s[0]/360%1*6,m=p%1,y=1-m;switch(Math.floor(p)){case 0:v[0]=1,v[1]=m,v[2]=0;break;case 1:v[0]=y,v[1]=1,v[2]=0;break;case 2:v[0]=0,v[1]=1,v[2]=m;break;case 3:v[0]=0,v[1]=y,v[2]=1;break;case 4:v[0]=m,v[1]=0,v[2]=1;break;default:v[0]=1,v[1]=0,v[2]=y}return[255*(d*v[0]+(_=(1-d)*f)),255*(d*v[1]+_),255*(d*v[2]+_)]},a.hcg.hsv=function(s){var u=s[1]/100,f=u+s[2]/100*(1-u),v=0;return f>0&&(v=u/f),[s[0],100*v,100*f]},a.hcg.hsl=function(s){var u=s[1]/100,f=s[2]/100*(1-u)+.5*u,v=0;return f>0&&f<.5?v=u/(2*f):f>=.5&&f<1&&(v=u/(2*(1-f))),[s[0],100*v,100*f]},a.hcg.hwb=function(s){var u=s[1]/100,f=u+s[2]/100*(1-u);return[s[0],100*(f-u),100*(1-f)]},a.hwb.hcg=function(s){var f=1-s[2]/100,v=f-s[1]/100,p=0;return v<1&&(p=(f-v)/(1-v)),[s[0],100*v,100*p]},a.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},a.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},a.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},a.gray.hsl=a.gray.hsv=function(s){return[0,0,s[0]]},a.gray.hwb=function(s){return[0,100,s[0]]},a.gray.cmyk=function(s){return[0,0,0,s[0]]},a.gray.lab=function(s){return[s[0],0,0]},a.gray.hex=function(s){var u=255&Math.round(s[0]/100*255),f=((u<<16)+(u<<8)+u).toString(16).toUpperCase();return"000000".substring(f.length)+f},a.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]}});function Or(e){var t=function Pr(){for(var e={},t=Object.keys(G),r=t.length,a=0;a1&&(r=Array.prototype.slice.call(arguments));var a=e(r);if("object"==typeof a)for(var n=a.length,i=0;i1&&(r=Array.prototype.slice.call(arguments)),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})});var ir=k,Et={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Re={getRgba:Me,getHsla:Fr,getRgb:function Ra(e){var t=Me(e);return t&&t.slice(0,3)},getHsl:function Gn(e){var t=Fr(e);return t&&t.slice(0,3)},getHwb:it,getAlpha:function Zn(e){var t=Me(e);return t||(t=Fr(e))||(t=it(e))?t[3]:void 0},hexString:function Nt(e,r){return r=void 0!==r&&3===e.length?r:e[3],"#"+or(e[0])+or(e[1])+or(e[2])+(r>=0&&r<1?or(Math.round(255*r)):"")},rgbString:function Jn(e,t){return t<1||e[3]&&e[3]<1?Ba(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:Ba,percentString:function Xn(e,t){return t<1||e[3]&&e[3]<1?Ea(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"},percentaString:Ea,hslString:function Qn(e,t){return t<1||e[3]&&e[3]<1?Na(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:Na,hwbString:function ei(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function ti(e){return pt[e.slice(0,3)]}};function Me(e){if(e){var o=[0,0,0],l=1,s=e.match(/^#([a-fA-F0-9]{3,4})$/i),u="";if(s){u=(s=s[1])[3];for(var d=0;dr?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,r=(t[0]+e)%360;return t[0]=r<0?360+r:r,this.setValues("hsl",t),this},mix:function(e,t){var r=this,a=e,n=void 0===t?.5:t,i=2*n-1,o=r.alpha()-a.alpha(),l=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-l;return this.rgb(l*r.red()+s*a.red(),l*r.green()+s*a.green(),l*r.blue()+s*a.blue()).alpha(r.alpha()*n+a.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var a,n,e=new le,t=this.values,r=e.values;for(var i in t)t.hasOwnProperty(i)&&("[object Array]"===(n={}.toString.call(a=t[i]))?r[i]=a.slice(0):"[object Number]"===n?r[i]=a:console.error("unexpected color value:",a));return e}},le.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},le.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},le.prototype.getValues=function(e){for(var t=this.values,r={},a=0;a=0;n--)t.call(r,e[n],n);else for(n=0;n=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:1===e?1:(r||(r=.3),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r))},easeOutElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:1===e?1:(r||(r=.3),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},easeInOutElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:2==(e/=.5)?1:(r||(r=.45),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),e<1?a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:a*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-zt.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*zt.easeInBounce(2*e):.5*zt.easeOutBounce(2*e-1)+.5}},Wa={effects:zt};Te.easingEffects=zt;var me=Math.PI,Lr=me/180,Ha=2*me,Ae=me/2,jt=me/4,Va=2*me/3,lr={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,r,a,n,i){if(i){var o=Math.min(i,n/2,a/2),l=t+o,s=r+o,u=t+a-o,d=r+n-o;e.moveTo(t,s),lt.left-r&&e.xt.top-r&&e.y0&&e.requestAnimationFrame()},advance:function(){for(var t,r,a,n,e=this.animations,i=0;i=a?(h.callback(t.onAnimationComplete,[t],r),r.animating=!1,e.splice(i,1)):++i}},mt=h.options.resolve,qa=["push","pop","shift","splice","unshift"];function Ka(e,t){var r=e._chartjs;if(r){var a=r.listeners,n=a.indexOf(t);-1!==n&&a.splice(n,1),!(a.length>0)&&(qa.forEach(function(i){delete e[i]}),delete e._chartjs)}}var zr=function(e,t){this.initialize(e,t)};h.extend(zr.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var r=this;r.chart=e,r.index=t,r.linkScales(),r.addElements(),r._type=r.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),r=e.chart,a=r.scales,n=e.getDataset(),i=r.options.scales;(null===t.xAxisID||!(t.xAxisID in a)||n.xAxisID)&&(t.xAxisID=n.xAxisID||i.xAxes[0].id),(null===t.yAxisID||!(t.yAxisID in a)||n.yAxisID)&&(t.yAxisID=n.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Ka(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,r=t.dataElementType;return r&&new r({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var n,i,e=this,t=e.getMeta(),r=e.getDataset().data||[],a=t.data;for(n=0,i=r.length;na&&e.insertElements(a,n-a)},insertElements:function(e,t){for(var r=0;rn?e.arc(o,l,t.innerRadius-n,a+(i=n/t.innerRadius),r-i,!0):e.arc(o,l,n,a+Math.PI/2,r-Math.PI/2),e.closePath(),e.clip()}function bt(e,t,r){var a="inner"===t.borderAlign;a?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),r.fullCircles&&function mi(e,t,r,a){var i,n=r.endAngle;for(a&&(r.endAngle=r.startAngle+ze,Ya(e,r),r.endAngle=n,r.endAngle===r.startAngle&&r.fullCircles&&(r.endAngle+=ze,r.fullCircles--)),e.beginPath(),e.arc(r.x,r.y,r.innerRadius,r.startAngle+ze,r.startAngle,!0),i=0;il;)n-=ze;for(;n=o&&n<=l&&i>=r.innerRadius&&i<=r.outerRadius}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,r=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,r=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},draw:function(){var n,e=this._chart.ctx,t=this._view,r="inner"===t.borderAlign?.33:0,a={x:t.x,y:t.y,innerRadius:t.innerRadius,outerRadius:Math.max(t.outerRadius-r,0),pixelMargin:r,startAngle:t.startAngle,endAngle:t.endAngle,fullCircles:Math.floor(t.circumference/ze)};if(e.save(),e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+ze,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),n=0;ne.x&&(t=en(t,"left","right")):e.baser?r:i,r:n.right||o<0?0:o>t?t:o,b:n.bottom||l<0?0:l>r?r:l,l:n.left||s<0?0:s>t?t:s}}function Ut(e,t,r){var a=null===t,n=null===r,i=!(!e||a&&n)&&Qa(e);return i&&(a||t>=i.left&&t<=i.right)&&(n||r>=i.top&&r<=i.bottom)}P._set("global",{elements:{rectangle:{backgroundColor:Xa,borderColor:Xa,borderSkipped:"bottom",borderWidth:0}}});var ki=Ne.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,r=function yt(e){var t=Qa(e),r=t.right-t.left,a=t.bottom-t.top,n=wi(e,r/2,a/2);return{outer:{x:t.left,y:t.top,w:r,h:a},inner:{x:t.left+n.l,y:t.top+n.t,w:r-n.l-n.r,h:a-n.t-n.b}}}(t),a=r.outer,n=r.inner;e.fillStyle=t.backgroundColor,e.fillRect(a.x,a.y,a.w,a.h),(a.w!==n.w||a.h!==n.h)&&(e.save(),e.beginPath(),e.rect(a.x,a.y,a.w,a.h),e.clip(),e.fillStyle=t.borderColor,e.rect(n.x,n.y,n.w,n.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return Ut(this._view,e,t)},inLabelRange:function(e,t){var r=this._view;return dr(r)?Ut(r,e,null):Ut(r,null,t)},inXRange:function(e){return Ut(this._view,e,null)},inYRange:function(e){return Ut(this._view,null,e)},getCenterPoint:function(){var t,r,e=this._view;return dr(e)?(t=e.x,r=(e.y+e.base)/2):(t=(e.x+e.base)/2,r=e.y),{x:t,y:r}},getArea:function(){var e=this._view;return dr(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),be={},_t=bi,Mi=xi,Ti=ki;be.Arc=$a,be.Line=_t,be.Point=Mi,be.Rectangle=Ti;var qt=h._deprecated,xt=h.valueOrDefault;function Ai(e,t,r){var l,s,a=r.barThickness,n=t.stackCount,i=t.pixels[e],o=h.isNullOrUndef(a)?function tn(e,t){var a,n,i,o,r=e._length;for(i=1,o=t.length;i0?Math.min(r,Math.abs(n-a)):r,a=n;return r}(t.scale,t.pixels):-1;return h.isNullOrUndef(a)?(l=o*r.categoryPercentage,s=r.barPercentage):(l=a*n,s=1),{chunk:l/n,ratio:s,start:i-l/2}}P._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),P._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var an=De.extend({dataElementType:be.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,r,e=this;De.prototype.initialize.apply(e,arguments),(t=e.getMeta()).stack=e.getDataset().stack,t.bar=!0,r=e._getIndexScale().options,qt("bar chart",r.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),qt("bar chart",r.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),qt("bar chart",r.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),qt("bar chart",e._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),qt("bar chart",r.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var a,n,t=this,r=t.getMeta().data;for(t._ruler=t.getRuler(),a=0,n=r.length;a=0&&u.min>=0?u.min:u.max,m=void 0===u.start?u.end:u.max>=0&&u.min>=0?u.max-u.min:u.min-u.max,y=s.length;if(f||void 0===f&&void 0!==v)for(_=0;_=0&&U.max>=0?U.max:U.min,(u.min<0&&T<0||u.max>=0&&T>0)&&(p+=T));return A=i.getPixelForValue(p),L=(R=i.getPixelForValue(p+m))-A,void 0!==d&&Math.abs(L)=0&&!o||m<0&&o?A-d:A+d),{size:L,base:A,head:R,center:R+L/2}},calculateBarIndexPixels:function(e,t,r,a){var i="flex"===a.barThickness?function rn(e,t,r){var s,a=t.pixels,n=a[e],i=e>0?a[e-1]:null,o=e=je?-Ve:T<-je?Ve:0)+v,R=Math.cos(T),L=Math.sin(T),U=Math.cos(A),W=Math.sin(A),K=T<=0&&A>=0||A>=Ve,I=T<=ot&&A>=ot||A>=Ve+ot,ne=T<=-ot&&A>=-ot||A>=je+ot,ae=T===-je||A>=je?-1:Math.min(R,R*f,U,U*f),ue=ne?-1:Math.min(L,L*f,W,W*f),Ot=K?1:Math.max(R,R*f,U,U*f),It=I?1:Math.max(L,L*f,W,W*f);i=(Ot-ae)/2,o=(It-ue)/2,l=-(Ot+ae)/2,s=-(It+ue)/2}for(_=0,w=d.length;_0&&!isNaN(e)?Ve*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var n,i,o,l,s,u,d,f,r=0,a=this.chart;if(!e)for(n=0,i=a.data.datasets.length;n(r=(d=u.borderWidth)>r?d:r)?f:r);return r},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=fr(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=fr(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=fr(r.hoverBorderWidth,r.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,r=0;r0&&cr(i[o-1]._model,n)&&(s.controlPointPreviousX=d(s.controlPointPreviousX,n.left,n.right),s.controlPointPreviousY=d(s.controlPointPreviousY,n.top,n.bottom)),o0&&(i=e.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(e,t){return Kr(e,t,{intersect:!1})},point:function(e,t){return Ur(e,lt(t,e))},nearest:function(e,t,r){var a=lt(t,e);r.axis=r.axis||"xy";var n=hr(r.axis);return qr(e,a,r.intersect,n)},x:function(e,t,r){var a=lt(t,e),n=[],i=!1;return Ct(e,function(o){o.inXRange(a.x)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n},y:function(e,t,r){var a=lt(t,e),n=[],i=!1;return Ct(e,function(o){o.inYRange(a.y)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n}}},Yr=h.extend;function Yt(e,t){return h.where(e,function(r){return r.pos===t})}function vr(e,t){return e.sort(function(r,a){var n=t?a:r,i=t?r:a;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function dn(e,t,r,a){return Math.max(e[r],t[r])+Math.max(e[a],t[a])}function Ni(e,t,r){var i,o,a=r.box,n=e.maxPadding;if(r.size&&(e[r.pos]-=r.size),r.size=r.horizontal?a.height:a.width,e[r.pos]+=r.size,a.getPadding){var l=a.getPadding();n.top=Math.max(n.top,l.top),n.left=Math.max(n.left,l.left),n.bottom=Math.max(n.bottom,l.bottom),n.right=Math.max(n.right,l.right)}if(i=t.outerWidth-dn(n,e,"left","right"),o=t.outerHeight-dn(n,e,"top","bottom"),i!==e.w||o!==e.h){e.w=i,e.h=o;var s=r.horizontal?[i,e.w]:[o,e.h];return!(s[0]===s[1]||isNaN(s[0])&&isNaN(s[1]))}}function ji(e,t){var r=t.maxPadding;return function a(n){var i={left:0,top:0,right:0,bottom:0};return n.forEach(function(o){i[o]=Math.max(t[o],r[o])}),i}(e?["left","right"]:["top","bottom"])}function gr(e,t,r){var n,i,o,l,s,u,a=[];for(n=0,i=e.length;n div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"})),ce="$chartjs",$r="chartjs-",Gr=$r+"size-monitor",cn=$r+"render-monitor",hn=["animationstart","webkitAnimationStart"],Ki={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function vn(e,t){var r=h.getStyle(e,t),a=r&&r.match(/^(\d+)(\.\d+)?px$/);return a?Number(a[1]):void 0}var gn=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(r){}return e}()&&{passive:!0};function $t(e,t,r){e.addEventListener(t,r,gn)}function Y(e,t,r){e.removeEventListener(t,r,gn)}function Zr(e,t,r,a,n){return{type:e,chart:t,native:n||null,x:void 0!==r?r:null,y:void 0!==a?a:null}}function ut(e){var t=document.createElement("div");return t.className=e||"",t}function Jr(e,t,r){var a=e[ce]||(e[ce]={}),n=a.resizer=function pn(e){var t=1e6,r=ut(Gr),a=ut(Gr+"-expand"),n=ut(Gr+"-shrink");a.appendChild(ut()),n.appendChild(ut()),r.appendChild(a),r.appendChild(n),r._reset=function(){a.scrollLeft=t,a.scrollTop=t,n.scrollLeft=t,n.scrollTop=t};var i=function(){r._reset(),e()};return $t(a,"scroll",i.bind(a,"expand")),$t(n,"scroll",i.bind(n,"shrink")),r}(function Zi(e,t){var r=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),t=t||this,r||(r=!0,h.requestAnimFrame.call(window,function(){r=!1,e.apply(t,a)}))}}(function(){if(a.resizer){var i=r.options.maintainAspectRatio&&e.parentNode,o=i?i.clientWidth:0;t(Zr("resize",r)),i&&i.clientWidth0){var i=e[0];i.label?r=i.label:i.xLabel?r=i.xLabel:n>0&&i.index-1?e.split("\n"):e}function eo(e){var t=e._xScale,r=e._yScale||e._scale,a=e._index,n=e._datasetIndex,i=e._chart.getDatasetMeta(n).controller,o=i._getIndexScale(),l=i._getValueScale();return{xLabel:t?t.getLabelForIndex(a,n):"",yLabel:r?r.getLabelForIndex(a,n):"",label:o?""+o.getLabelForIndex(a,n):"",value:l?""+l.getLabelForIndex(a,n):"",index:a,datasetIndex:n,x:e._model.x,y:e._model.y}}function Qr(e){var t=P.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:qe(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:qe(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:qe(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:qe(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:qe(e.titleFontStyle,t.defaultFontStyle),titleFontSize:qe(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:qe(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:qe(e.footerFontStyle,t.defaultFontStyle),footerFontSize:qe(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function mr(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function bn(e){return We([],Ee(e))}var no=Ne.extend({initialize:function(){this._model=Qr(this._options),this._lastActive=[]},getTitle:function(){var e=this,r=e._options.callbacks,a=r.beforeTitle.apply(e,arguments),n=r.title.apply(e,arguments),i=r.afterTitle.apply(e,arguments),o=[];return o=We(o,Ee(a)),o=We(o,Ee(n)),We(o,Ee(i))},getBeforeBody:function(){return bn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var r=this,a=r._options.callbacks,n=[];return h.each(e,function(i){var o={before:[],lines:[],after:[]};We(o.before,Ee(a.beforeLabel.call(r,i,t))),We(o.lines,a.label.call(r,i,t)),We(o.after,Ee(a.afterLabel.call(r,i,t))),n.push(o)}),n},getAfterBody:function(){return bn(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,r=t.beforeFooter.apply(e,arguments),a=t.footer.apply(e,arguments),n=t.afterFooter.apply(e,arguments),i=[];return i=We(i,Ee(r)),i=We(i,Ee(a)),We(i,Ee(n))},update:function(e){var f,v,t=this,r=t._options,a=t._model,n=t._model=Qr(r),i=t._active,o=t._data,l={xAlign:a.xAlign,yAlign:a.yAlign},s={x:a.x,y:a.y},u={width:a.width,height:a.height},d={x:a.caretX,y:a.caretY};if(i.length){n.opacity=1;var p=[],m=[];d=mn[r.position].call(t,i,t._eventPosition);var y=[];for(f=0,v=i.length;fa.width&&(n=a.width-t.width),n<0&&(n=0)),"top"===d?i+=f:i-="bottom"===d?t.height+f:t.height/2,"center"===d?"left"===u?n+=f:"right"===u&&(n-=f):"left"===u?n-=v:"right"===u&&(n+=v),{x:n,y:i}}(n,u=function to(e,t){var r=e._chart.ctx,a=2*t.yPadding,n=0,i=t.body,o=i.reduce(function(m,y){return m+y.before.length+y.lines.length+y.after.length},0),l=t.title.length,s=t.footer.length,u=t.titleFontSize,d=t.bodyFontSize,f=t.footerFontSize;a+=l*u,a+=l?(l-1)*t.titleSpacing:0,a+=l?t.titleMarginBottom:0,a+=(o+=t.beforeBody.length+t.afterBody.length)*d,a+=o?(o-1)*t.bodySpacing:0,a+=s?t.footerMarginTop:0,a+=s*f,a+=s?(s-1)*t.footerSpacing:0;var v=0,p=function(m){n=Math.max(n,r.measureText(m).width+v)};return r.font=h.fontString(u,t._titleFontStyle,t._titleFontFamily),h.each(t.title,p),r.font=h.fontString(d,t._bodyFontStyle,t._bodyFontFamily),h.each(t.beforeBody.concat(t.afterBody),p),v=t.displayColors?d+2:0,h.each(i,function(m){h.each(m.before,p),h.each(m.lines,p),h.each(m.after,p)}),v=0,r.font=h.fontString(f,t._footerFontStyle,t._footerFontFamily),h.each(t.footer,p),{width:n+=2*t.xPadding,height:a}}(this,n),l=function ro(e,t){var r=e._model,a=e._chart,n=e._chart.chartArea,i="center",o="center";r.ya.height-t.height&&(o="bottom");var l,s,u,d,f,v=(n.left+n.right)/2,p=(n.top+n.bottom)/2;"center"===o?(l=function(y){return y<=v},s=function(y){return y>v}):(l=function(y){return y<=t.width/2},s=function(y){return y>=a.width-t.width/2}),u=function(y){return y+t.width+r.caretSize+r.caretPadding>a.width},d=function(y){return y-t.width-r.caretSize-r.caretPadding<0},f=function(y){return y<=p?"top":"bottom"},l(r.x)?(i="left",u(r.x)&&(i="center",o=f(r.y))):s(r.x)&&(i="right",d(r.x)&&(i="center",o=f(r.y)));var m=e._options;return{xAlign:m.xAlign?m.xAlign:i,yAlign:m.yAlign?m.yAlign:o}}(this,u),t._chart)}else n.opacity=0;return n.xAlign=l.xAlign,n.yAlign=l.yAlign,n.x=s.x,n.y=s.y,n.width=u.width,n.height=u.height,n.caretX=d.x,n.caretY=d.y,t._model=n,e&&r.custom&&r.custom.call(t,n),t},drawCaret:function(e,t){var r=this._chart.ctx,n=this.getCaretPosition(e,t,this._view);r.lineTo(n.x1,n.y1),r.lineTo(n.x2,n.y2),r.lineTo(n.x3,n.y3)},getCaretPosition:function(e,t,r){var a,n,i,o,l,s,u=r.caretSize,d=r.cornerRadius,f=r.xAlign,v=r.yAlign,p=e.x,m=e.y,y=t.width,_=t.height;if("center"===v)l=m+_/2,"left"===f?(n=(a=p)-u,i=a,o=l+u,s=l-u):(n=(a=p+y)+u,i=a,o=l-u,s=l+u);else if("left"===f?(a=(n=p+d+u)-u,i=n+u):"right"===f?(a=(n=p+y-d-u)-u,i=n+u):(a=(n=r.caretX)-u,i=n+u),"top"===v)l=(o=m)-u,s=o;else{l=(o=m+_)+u,s=o;var w=i;i=a,a=w}return{x1:a,x2:n,x3:i,y1:o,y2:l,y3:s}},drawTitle:function(e,t,r){var i,o,l,a=t.title,n=a.length;if(n){var s=pr(t.rtl,t.x,t.width);for(e.x=mr(t,t._titleAlign),r.textAlign=s.textAlign(t._titleAlign),r.textBaseline="middle",i=t.titleFontSize,o=t.titleSpacing,r.fillStyle=t.titleFontColor,r.font=h.fontString(i,t._titleFontStyle,t._titleFontFamily),l=0;l0&&r.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var r={width:t.width,height:t.height},a={x:t.x,y:t.y},n=Math.abs(t.opacity<.001)?0:t.opacity;this._options.enabled&&(t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length)&&(e.save(),e.globalAlpha=n,this.drawBackground(a,t,e,r),a.y+=t.yPadding,h.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),h.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var a,t=this,r=t._options;return t._lastActive=t._lastActive||[],"mouseout"===e.type?t._active=[]:(t._active=t._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&t._active.reverse()),(a=!h.arrayEquals(t._active,t._lastActive))&&(t._lastActive=t._active,(r.enabled||r.custom)&&(t._eventPosition={x:e.x,y:e.y},t.update(!0),t.pivot())),a}}),br=no;br.positioners=mn;var ea=h.valueOrDefault;function yr(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){if("xAxes"===e||"yAxes"===e){var i,o,l,n=r[e].length;for(t[e]||(t[e]=[]),i=0;i=t[e].length&&t[e].push({}),h.merge(t[e][i],!t[e][i].type||l.type&&l.type!==t[e][i].type?[Zt.getScaleDefaults(o),l]:l)}else h._merger(e,t,r,a)}})}function ta(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){var n=t[e]||Object.create(null),i=r[e];"scales"===e?t[e]=yr(n,i):"scale"===e?t[e]=h.merge(n,[Zt.getScaleDefaults(i.type),i]):h._merger(e,t,r,a)}})}function so(e){var t=e.options;h.each(e.scales,function(r){Pe.removeBox(e,r)}),t=ta(P.global,P[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function yn(e,t,r){var a,n=function(i){return i.id===a};do{a=t+r++}while(h.findIndex(e,n)>=0);return a}function _n(e){return"top"===e||"bottom"===e}function xn(e,t){return function(r,a){return r[e]===a[e]?r[t]-a[t]:r[e]-a[e]}}P._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ze=function(e,t){return this.construct(e,t),this};h.extend(Ze.prototype,{construct:function(e,t){var r=this;t=function oo(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=ta(P.global,P[e.type],e.options||{}),e}(t);var a=St.acquireContext(e,t),n=a&&a.canvas,i=n&&n.height,o=n&&n.width;r.id=h.uid(),r.ctx=a,r.canvas=n,r.config=t,r.width=o,r.height=i,r.aspectRatio=i?o/i:null,r.options=t.options,r._bufferedRender=!1,r._layers=[],r.chart=r,r.controller=r,Ze.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(l){r.config.data=l}}),a&&n?(r.initialize(),r.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return $.notify(e,"beforeInit"),h.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),$.notify(e,"afterInit"),e},clear:function(){return h.canvas.clear(this),this},stop:function(){return Nr.cancelAnimation(this),this},resize:function(e){var t=this,r=t.options,a=t.canvas,n=r.maintainAspectRatio&&t.aspectRatio||null,i=Math.max(0,Math.floor(h.getMaximumWidth(a))),o=Math.max(0,Math.floor(n?i/n:h.getMaximumHeight(a)));if((t.width!==i||t.height!==o)&&(a.width=t.width=i,a.height=t.height=o,a.style.width=i+"px",a.style.height=o+"px",h.retinaScale(t,r.devicePixelRatio),!e)){var l={width:i,height:o};$.notify(t,"resize",[l]),r.onResize&&r.onResize(t,l),t.stop(),t.update({duration:r.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},r=e.scale;h.each(t.xAxes,function(a,n){a.id||(a.id=yn(t.xAxes,"x-axis-",n))}),h.each(t.yAxes,function(a,n){a.id||(a.id=yn(t.yAxes,"y-axis-",n))}),r&&(r.id=r.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,r=e.scales||{},a=[],n=Object.keys(r).reduce(function(i,o){return i[o]=!1,i},{});t.scales&&(a=a.concat((t.scales.xAxes||[]).map(function(i){return{options:i,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(i){return{options:i,dtype:"linear",dposition:"left"}}))),t.scale&&a.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(a,function(i){var o=i.options,l=o.id,s=ea(o.type,i.dtype);_n(o.position)!==_n(i.dposition)&&(o.position=i.dposition),n[l]=!0;var u=null;if(l in r&&r[l].type===s)(u=r[l]).options=o,u.ctx=e.ctx,u.chart=e;else{var d=Zt.getScaleConstructor(s);if(!d)return;u=new d({id:l,type:s,options:o,ctx:e.ctx,chart:e}),r[u.id]=u}u.mergeTicksOptions(),i.isDefault&&(e.scale=u)}),h.each(n,function(i,o){i||delete r[o]}),e.scales=r,Zt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var a,n,e=this,t=[],r=e.data.datasets;for(a=0,n=r.length;a=0;--a)t.drawDataset(r[a],e);$.notify(t,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var a={meta:e,index:e.index,easingValue:t};!1!==$.notify(this,"beforeDatasetDraw",[a])&&(e.controller.draw(t),$.notify(this,"afterDatasetDraw",[a]))},_drawTooltip:function(e){var t=this,r=t.tooltip,a={tooltip:r,easingValue:e};!1!==$.notify(t,"beforeTooltipDraw",[a])&&(r.draw(),$.notify(t,"afterTooltipDraw",[a]))},getElementAtEvent:function(e){return wt.modes.single(this,e)},getElementsAtEvent:function(e){return wt.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return wt.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,r){var a=wt.modes[t];return"function"==typeof a?a(this,e,r):[]},getDatasetAtEvent:function(e){return wt.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,r=t.data.datasets[e];r._meta||(r._meta={});var a=r._meta[t.id];return a||(a=r._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r.order||0,index:e}),a},getVisibleDatasetCount:function(){for(var e=0,t=0,r=this.data.datasets.length;t3?r[2]-r[1]:r[1]-r[0];Math.abs(a)>1&&e!==Math.floor(e)&&(a=e-Math.floor(e));var n=h.log10(Math.abs(a)),i="";if(0!==e)if(Math.max(Math.abs(r[0]),Math.abs(r[r.length-1]))<1e-4){var l=h.log10(Math.abs(e)),s=Math.floor(l)-Math.floor(n);s=Math.max(Math.min(s,20),0),i=e.toExponential(s)}else{var u=-1*Math.floor(n);u=Math.max(Math.min(u,20),0),i=e.toFixed(u)}else i="0";return i},logarithmic:function(e,t,r){var a=e/Math.pow(10,Math.floor(h.log10(e)));return 0===e?"0":1===a||2===a||5===a||0===t||t===r.length-1?e.toExponential():""}}},dt=h.isArray,Tt=h.isNullOrUndef,Je=h.valueOrDefault,At=h.valueAtIndexOrDefault;function co(e,t,r){var u,a=e.getTicks().length,n=Math.min(t,a-1),i=e.getPixelForTick(n),o=e._startPixel,l=e._endPixel,s=1e-6;if(!(r&&(u=1===a?Math.max(i-o,l-i):0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(n-1))/2,i+=nl+s)))return i}function vo(e,t,r,a){var d,f,v,p,m,y,_,w,T,A,R,L,U,n=r.length,i=[],o=[],l=[],s=0,u=0;for(d=0;dt){for(i=0;i=i||a<=1||!e.isHorizontal()?e.labelRotation=n:(s=(l=e._getLabelSizes()).widest.width,u=l.highest.height-l.highest.offset,d=Math.min(e.maxWidth,e.chart.width-s),s+6>(f=t.offset?e.maxWidth/a:d/(a-1))&&(f=d/(a-(t.offset?.5:1)),v=e.maxHeight-Jt(t.gridLines)-r.padding-ra(t.scaleLabel),p=Math.sqrt(s*s+u*u),o=h.toDegrees(Math.min(Math.asin(Math.min((l.highest.height+6)/f,1)),Math.asin(Math.min(v/p,1))-Math.asin(u/p))),o=Math.max(n,Math.min(i,o))),e.labelRotation=o)},afterCalculateTickRotation:function(){h.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){h.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},r=e.chart,a=e.options,n=a.ticks,i=a.scaleLabel,o=a.gridLines,l=e._isVisible(),s="bottom"===a.position,u=e.isHorizontal();if(u?t.width=e.maxWidth:l&&(t.width=Jt(o)+ra(i)),u?l&&(t.height=Jt(o)+ra(i)):t.height=e.maxHeight,n.display&&l){var d=na(n),f=e._getLabelSizes(),v=f.first,p=f.last,m=f.widest,y=f.highest,_=.4*d.minor.lineHeight,w=n.padding;if(u){var T=0!==e.labelRotation,A=h.toRadians(e.labelRotation),R=Math.cos(A),L=Math.sin(A);t.height=Math.min(e.maxHeight,t.height+(L*m.width+R*(y.height-(T?y.offset:0))+(T?0:_))+w);var I,te,W=e.getPixelForTick(0)-e.left,K=e.right-e.getPixelForTick(e.getTicks().length-1);T?(I=s?R*v.width+L*v.offset:L*(v.height-v.offset),te=s?L*(p.height-p.offset):R*p.width+L*p.offset):(I=v.width/2,te=p.width/2),e.paddingLeft=Math.max((I-W)*e.width/(e.width-W),0)+3,e.paddingRight=Math.max((te-K)*e.width/(e.width-K),0)+3}else t.width=Math.min(e.maxWidth,t.width+(n.mirror?0:m.width+w+_)),e.paddingTop=v.height/2,e.paddingBottom=p.height/2}e.handleMargins(),u?(e.width=e._length=r.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=r.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){h.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(Tt(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var r,a,n,t=this;for(t.ticks=e.map(function(i){return i.value}),t.beforeTickToLabelConversion(),r=t.convertTicksToLabels(e)||t.ticks,t.afterTickToLabelConversion(),a=0,n=e.length;aa-1?null:t.getPixelForDecimal(e*n+(r?n/2:0))},getPixelForDecimal:function(e){var t=this;return t._reversePixels&&(e=1-e),t._startPixel+e*t._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,r=e.max;return e.beginAtZero?0:t<0&&r<0?r:t>0&&r>0?t:0},_autoSkip:function(e){var u,d,f,v,t=this,r=t.options.ticks,a=t._length,n=r.maxTicksLimit||a/t._tickSize()+1,i=r.major.enabled?function oa(e){var r,a,t=[];for(r=0,a=e.length;rn)return function po(e,t,r){var i,o,a=0,n=t[0];for(r=Math.ceil(r),i=0;ii)return l;return Math.max(i,1)}(i,e,0,n),o>0){for(u=0,d=o-1;u1?(s-l)/(o-1):null)?0:l-v,l),Cr(e,f,s,h.isNullOrUndef(v)?e.length:s+v),ia(e)}return Cr(e,f),ia(e)},_tickSize:function(){var e=this,t=e.options.ticks,r=h.toRadians(e.labelRotation),a=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=e._getLabelSizes(),o=t.autoSkipPadding||0,l=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return e.isHorizontal()?s*a>l*n?l/a:s/n:s*n=0&&(i=l),void 0!==n&&(l=t.indexOf(n))>=0&&(o=l),e.minIndex=i,e.maxIndex=o,e.min=t[i],e.max=t[o]},buildTicks:function(){var e=this,t=e._getLabels(),r=e.minIndex,a=e.maxIndex;e.ticks=0===r&&a===t.length-1?t:t.slice(r,a+1)},getLabelForIndex:function(e,t){var r=this,a=r.chart;return a.getDatasetMeta(t).controller._getValueScaleId()===r.id?r.getRightValue(a.data.datasets[t].data[e]):r._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,r=e.ticks;he.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),r&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(r.length-(t?0:1),1))},getPixelForValue:function(e,t,r){var n,i,o,a=this;return!la(t)&&!la(r)&&(e=a.chart.data.datasets[r].data[t]),la(e)||(n=a.isHorizontal()?e.x:e.y),(void 0!==n||void 0!==e&&isNaN(t))&&(i=a._getLabels(),e=h.valueOrDefault(n,e),t=-1!==(o=i.indexOf(e))?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,r=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(r,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}});kn._defaults={position:"bottom"};var ft=h.isNullOrUndef;var wr=he.extend({getRightValue:function(e){return"string"==typeof e?+e:he.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,r=e.options.ticks;if(r.beginAtZero){var a=h.sign(e.min),n=h.sign(e.max);a<0&&n<0?e.max=0:a>0&&n>0&&(e.min=0)}var i=void 0!==r.min||void 0!==r.suggestedMin,o=void 0!==r.max||void 0!==r.suggestedMax;void 0!==r.min?e.min=r.min:void 0!==r.suggestedMin&&(e.min=null===e.min?r.suggestedMin:Math.min(e.min,r.suggestedMin)),void 0!==r.max?e.max=r.max:void 0!==r.suggestedMax&&(e.max=null===e.max?r.suggestedMax:Math.max(e.max,r.suggestedMax)),i!==o&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,r.beginAtZero||e.min--)},getTickLimit:function(){var n,e=this,t=e.options.ticks,r=t.stepSize,a=t.maxTicksLimit;return r?n=Math.ceil(e.max/r)-Math.floor(e.min/r)+1:(n=e._computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:h.noop,buildTicks:function(){var e=this,r=e.options.ticks,a=e.getTickLimit(),n={maxTicks:a=Math.max(2,a),min:r.min,max:r.max,precision:r.precision,stepSize:h.valueOrDefault(r.fixedStepSize,r.stepSize)},i=e.ticks=function bo(e,t){var p,m,y,_,r=[],n=e.stepSize,i=n||1,o=e.maxTicks-1,l=e.min,s=e.max,u=e.precision,d=t.min,f=t.max,v=h.niceNum((f-d)/o/i)*i;if(v<1e-14&&ft(l)&&ft(s))return[d,f];(_=Math.ceil(f/v)-Math.floor(d/v))>o&&(v=h.niceNum(_*v/o/i)*i),n||ft(u)?p=Math.pow(10,h._decimalPlaces(v)):(p=Math.pow(10,u),v=Math.ceil(v*p)/p),m=Math.floor(d/v)*v,y=Math.ceil(f/v)*v,n&&(!ft(l)&&h.almostWhole(l/v,v/1e3)&&(m=l),!ft(s)&&h.almostWhole(s/v,v/1e3)&&(y=s)),_=h.almostEquals(_=(y-m)/v,Math.round(_),v/1e3)?Math.round(_):Math.ceil(_),m=Math.round(m*p)/p,y=Math.round(y*p)/p,r.push(ft(l)?m:l);for(var w=1;w<_;++w)r.push(Math.round((m+w*v)*p)/p);return r.push(ft(s)?y:s),r}(n,e);e.handleDirectionalChanges(),e.max=h.max(i),e.min=h.min(i),r.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),he.prototype.convertTicksToLabels.call(e)},_configure:function(){var n,e=this,t=e.getTicks(),r=e.min,a=e.max;he.prototype._configure.call(e),e.options.offset&&t.length&&(r-=n=(a-r)/Math.max(t.length-1,1)/2,a+=n),e._startValue=r,e._endValue=a,e._valueRange=a-r}}),Mn={position:"left",ticks:{callback:Mt.formatters.linear}};function Co(e,t,r,a){var d,f,n=e.options,o=function xo(e,t,r){var a=[r.type,void 0===t&&void 0===r.stack?r.index:"",r.stack].join(".");return void 0===e[a]&&(e[a]={pos:[],neg:[]}),e[a]}(t,n.stacked,r),l=o.pos,s=o.neg,u=a.length;for(d=0;dt.length-1?null:this.getPixelForValue(t[e])}});kr._defaults=Mn;var Xt=h.valueOrDefault,ye=h.math.log10;var So={position:"left",ticks:{callback:Mt.formatters.logarithmic}};function Dt(e,t){return h.isFinite(e)&&e>=0?e:t}var da=he.extend({determineDataLimits:function(){var o,l,s,u,d,f,e=this,t=e.options,r=e.chart,a=r.data.datasets,n=e.isHorizontal();function i(_){return n?_.xAxisID===e.id:_.yAxisID===e.id}e.min=Number.POSITIVE_INFINITY,e.max=Number.NEGATIVE_INFINITY,e.minNotZero=Number.POSITIVE_INFINITY;var v=t.stacked;if(void 0===v)for(o=0;o0){var w=h.min(_),T=h.max(_);e.min=Math.min(e.min,w),e.max=Math.max(e.max,T)}})}else for(o=0;o0?e.min:e.max<1?Math.pow(10,Math.floor(ye(e.max))):1)},buildTicks:function(){var e=this,t=e.options.ticks,r=!e.isHorizontal(),a={min:Dt(t.min),max:Dt(t.max)},n=e.ticks=function ua(e,t){var o,l,r=[],a=Xt(e.min,Math.pow(10,Math.floor(ye(t.min)))),n=Math.floor(ye(t.max)),i=Math.ceil(t.max/Math.pow(10,n));0===a?(o=Math.floor(ye(t.minNotZero)),l=Math.floor(t.minNotZero/Math.pow(10,o)),r.push(a),a=l*Math.pow(10,o)):(o=Math.floor(ye(a)),l=Math.floor(a/Math.pow(10,o)));var s=o<0?Math.pow(10,Math.abs(o)):1;do{r.push(a),10==++l&&(l=1,s=++o>=0?1:s),a=Math.round(l*Math.pow(10,o)*s)/s}while(ot.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(ye(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,r=0;he.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),r=Xt(e.options.ticks.fontSize,P.global.defaultFontSize)/e._length),e._startValue=ye(t),e._valueOffset=r,e._valueRange=(ye(e.max)-ye(t))/(1-r)},getPixelForValue:function(e){var t=this,r=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(r=(ye(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(r)},getValueForPixel:function(e){var t=this,r=t.getDecimalForPixel(e);return 0===r&&0===t.min?0:Math.pow(10,t._startValue+(r-t._valueOffset)*t._valueRange)}});da._defaults=So;var Qt=h.valueOrDefault,Sr=h.valueAtIndexOrDefault,fa=h.options.resolve,Tn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Mt.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function ca(e){var t=e.ticks;return t.display&&e.display?Qt(t.fontSize,P.global.defaultFontSize)+2*t.backdropPaddingY:0}function To(e,t,r){return h.isArray(r)?{w:h.longestText(e,e.font,r),h:r.length*t}:{w:e.measureText(r).width,h:t}}function An(e,t,r,a,n){return e===a||e===n?{start:t-r/2,end:t+r/2}:en?{start:t-r,end:t}:{start:t,end:t+r}}function Do(e){return 0===e||180===e?"center":e<180?"left":"right"}function ct(e,t,r,a){var i,o,n=r.y+a/2;if(h.isArray(t))for(i=0,o=t.length;i270||e<90)&&(r.y-=t.h)}function Mr(e){return h.isNumber(e)?e:0}var Dn=wr.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=ca(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;h.each(t.data.datasets,function(n,i){if(t.isDatasetVisible(i)){var o=t.getDatasetMeta(i);h.each(n.data,function(l,s){var u=+e.getRightValue(l);isNaN(u)||o.data[s].hidden||(r=Math.min(u,r),a=Math.max(u,a))})}}),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=a===Number.NEGATIVE_INFINITY?0:a,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/ca(this.options))},convertTicksToLabels:function(){var e=this;wr.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=h.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this,t=e.options;t.display&&t.pointLabels.display?function Ao(e){var n,i,o,t=h.options._parseFont(e.options.pointLabels),r={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={};e.ctx.font=t.string,e._pointLabelSizes=[];var l=e.chart.data.labels.length;for(n=0;nr.r&&(r.r=d.end,a.r=s),f.startr.b&&(r.b=f.end,a.b=s)}e.setReductions(e.drawingArea,r,a)}(e):e.setCenterPoint(0,0,0,0)},setReductions:function(e,t,r){var a=this,n=t.l/Math.sin(r.l),i=Math.max(t.r-a.width,0)/Math.sin(r.r),o=-t.t/Math.cos(r.t),l=-Math.max(t.b-(a.height-a.paddingTop),0)/Math.cos(r.b);n=Mr(n),i=Mr(i),o=Mr(o),l=Mr(l),a.drawingArea=Math.min(Math.floor(e-(n+i)/2),Math.floor(e-(o+l)/2)),a.setCenterPoint(n,i,o,l)},setCenterPoint:function(e,t,r,a){var n=this,l=r+n.drawingArea,s=n.height-n.paddingTop-a-n.drawingArea;n.xCenter=Math.floor((e+n.drawingArea+(n.width-t-n.drawingArea))/2+n.left),n.yCenter=Math.floor((l+s)/2+n.top+n.paddingTop)},getIndexAngle:function(e){var t=this.chart,i=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(h.isNullOrUndef(e))return NaN;var r=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*r:(e-t.min)*r},getPointPosition:function(e,t){var r=this,a=r.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(a)*t+r.xCenter,y:Math.sin(a)*t+r.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this,r=t.min,a=t.max;return t.getPointPositionForValue(e||0,t.beginAtZero?0:r<0&&a<0?a:r>0&&a>0?r:0)},_drawGrid:function(){var l,s,u,e=this,t=e.ctx,r=e.options,a=r.gridLines,n=r.angleLines,i=Qt(n.lineWidth,a.lineWidth),o=Qt(n.color,a.color);if(r.pointLabels.display&&function Po(e){var t=e.ctx,r=e.options,a=r.pointLabels,n=ca(r),i=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),o=h.options._parseFont(a);t.save(),t.font=o.string,t.textBaseline="middle";for(var l=e.chart.data.labels.length-1;l>=0;l--){var u=e.getPointPosition(l,i+(0===l?n/2:0)+5),d=Sr(a.fontColor,l,P.global.defaultFontColor);t.fillStyle=d;var f=e.getIndexAngle(l),v=h.toDegrees(f);t.textAlign=Do(v),ha(v,e._pointLabelSizes[l],u),ct(t,e.pointLabels[l],u,o.lineHeight)}t.restore()}(e),a.display&&h.each(e.ticks,function(d,f){0!==f&&(s=e.getDistanceFromCenterForValue(e.ticksAsNumbers[f]),function Oo(e,t,r,a){var u,n=e.ctx,i=t.circular,o=e.chart.data.labels.length,l=Sr(t.color,a-1),s=Sr(t.lineWidth,a-1);if((i||o)&&l&&s){if(n.save(),n.strokeStyle=l,n.lineWidth=s,n.setLineDash&&(n.setLineDash(t.borderDash||[]),n.lineDashOffset=t.borderDashOffset||0),n.beginPath(),i)n.arc(e.xCenter,e.yCenter,r,0,2*Math.PI);else{u=e.getPointPosition(0,r),n.moveTo(u.x,u.y);for(var d=1;d=0;l--)s=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),u=e.getPointPosition(l,s),t.beginPath(),t.moveTo(e.xCenter,e.yCenter),t.lineTo(u.x,u.y),t.stroke();t.restore()}},_drawLabels:function(){var e=this,t=e.ctx,a=e.options.ticks;if(a.display){var l,s,n=e.getIndexAngle(0),i=h.options._parseFont(a),o=Qt(a.fontColor,P.global.defaultFontColor);t.save(),t.font=i.string,t.translate(e.xCenter,e.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",h.each(e.ticks,function(u,d){0===d&&!a.reverse||(l=e.getDistanceFromCenterForValue(e.ticksAsNumbers[d]),a.showLabelBackdrop&&(s=t.measureText(u).width,t.fillStyle=a.backdropColor,t.fillRect(-s/2-a.backdropPaddingX,-l-i.size/2-a.backdropPaddingY,s+2*a.backdropPaddingX,i.size+2*a.backdropPaddingY)),t.fillStyle=o,t.fillText(u,0,-l))}),t.restore()}},_drawTitle:h.noop});Dn._defaults=Tn;var Tr=h._deprecated,Pn=h.options.resolve,va=h.valueOrDefault,On=Number.MIN_SAFE_INTEGER||-9007199254740991,ga=Number.MAX_SAFE_INTEGER||9007199254740991,Ar={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},_e=Object.keys(Ar);function In(e,t){return e-t}function pa(e){return h.valueOrDefault(e.time.min,e.ticks.min)}function Ln(e){return h.valueOrDefault(e.time.max,e.ticks.max)}function Pt(e,t,r,a){var n=function Lo(e,t,r){for(var i,o,l,a=0,n=e.length-1;a>=0&&a<=n;){if(l=e[i=a+n>>1],!(o=e[i-1]||null))return{lo:null,hi:l};if(l[t]r))return{lo:o,hi:l};n=i-1}}return{lo:l,hi:null}}(e,t,r),i=n.lo?n.hi?n.lo:e[e.length-2]:e[0],o=n.lo?n.hi?n.hi:e[e.length-1]:e[1],l=o[t]-i[t];return i[a]+(o[a]-i[a])*(l?(r-i[t])/l:0)}function ma(e,t){var r=e._adapter,a=e.options.time,n=a.parser,i=n||a.format,o=t;return"function"==typeof n&&(o=n(o)),h.isFinite(o)||(o="string"==typeof i?r.parse(o,i):r.parse(o)),null!==o?+o:(!n&&"function"==typeof i&&(o=i(t),h.isFinite(o)||(o=r.parse(o))),o)}function ht(e,t){if(h.isNullOrUndef(t))return null;var r=e.options.time,a=ma(e,e.getRightValue(t));return null===a||r.round&&(a=+e._adapter.startOf(a,r.round)),a}function Rn(e,t,r,a){var i,o,n=_e.length;for(i=_e.indexOf(e);i=0&&(t[s].major=!0);return t}(e,a,n,r):a}var En=he.extend({initialize:function(){this.mergeTicksOptions(),he.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,r=t.time||(t.time={}),a=e._adapter=new xr._date(t.adapters.date);return Tr("time scale",r.format,"time.format","time.parser"),Tr("time scale",r.min,"time.min","ticks.min"),Tr("time scale",r.max,"time.max","ticks.max"),h.mergeIf(r.displayFormats,a.formats()),he.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),he.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var d,f,v,p,m,y,_,e=this,t=e.chart,r=e._adapter,a=e.options,n=a.time.unit||"day",i=ga,o=On,l=[],s=[],u=[],w=e._getLabels();for(d=0,v=w.length;d1?function Fn(e){var a,n,i,t={},r=[];for(a=0,n=e.length;a1e5*s)throw t+" and "+r+" are too far apart with stepSize of "+s+" "+l;for(v=d;v=t&&p<=r&&l.push(p);return e.min=t,e.max=r,e._unit=i.unit||(n.autoSkip?Rn(i.minUnit,e.min,e.max,s):function Ro(e,t,r,a,n){var i,o;for(i=_e.length-1;i>=_e.indexOf(r);i--)if(Ar[o=_e[i]].common&&e._adapter.diff(n,a,o)>=t-1)return o;return _e[r?_e.indexOf(r):0]}(e,l.length,i.minUnit,e.min,e.max)),e._majorUnit=n.major.enabled&&"year"!==e._unit?function Bo(e){for(var t=_e.indexOf(e)+1,r=_e.length;tt&&u=0&&e0?l:1}});En._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Ho={category:kn,linear:kr,logarithmic:da,radialLinear:Dn,time:En},Vo={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};xr._date.override("function"==typeof V?{_id:"moment",formats:function(){return Vo},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=V(e,t):e instanceof V||(e=V(e)),e.isValid()?e.valueOf():null},format:function(e,t){return V(e).format(t)},add:function(e,t,r){return V(e).add(t,r).valueOf()},diff:function(e,t,r){return V(e).diff(V(t),r)},startOf:function(e,t,r){return e=V(e),"isoWeek"===t?e.isoWeekday(r).valueOf():e.startOf(t).valueOf()},endOf:function(e,t){return V(e).endOf(t).valueOf()},_create:function(e){return V(e)}}:{}),P._set("global",{plugins:{filler:{propagate:!0}}});var Uo={dataset:function(e){var t=e.fill,r=e.chart,a=r.getDatasetMeta(t),i=a&&r.isDatasetVisible(t)&&a.dataset._children||[],o=i.length||0;return o?function(l,s){return s=r)&&i;switch(n){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return n;default:return!1}}function $o(e){return(e.el._scale||{}).getPointPositionForValue?function Yo(e){var o,l,s,u,d,t=e.el._scale,r=t.options,a=t.chart.data.labels.length,n=e.fill,i=[];if(!a)return null;for(l=r.ticks.reverse?t.min:t.max,s=t.getPointPositionForValue(0,o=r.ticks.reverse?t.max:t.min),u=0;u0;--i)e.arc(o,l,s,r[i].angle,r[i-1].angle,!0);return}for(e.lineTo(r[n-1].x,r[n-1].y),i=n-1;i>0;--i)h.canvas.lineTo(e,r[i],r[i-1],!0)}}function Jo(e,t,r,a,n,i){var v,p,m,y,_,w,T,A,o=t.length,l=a.spanGaps,s=[],u=[],d=0,f=0;for(e.beginPath(),v=0,p=o;v=0;--n)(a=t[n].$filler)&&a.visible&&(l=(i=a.el)._children||[],u=(o=i._view).backgroundColor||P.global.defaultColor,(s=a.mapper)&&u&&l.length&&(h.canvas.clipArea(r,e.chartArea),Jo(r,l,s,o,u,i._loop),h.canvas.unclipArea(r)))}},Qo=h.rtl.getRtlAdapter,Xe=h.noop,Qe=h.valueOrDefault;function ya(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}P._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var r=t.datasetIndex,a=this.chart,n=a.getDatasetMeta(r);n.hidden=null===n.hidden?!a.data.datasets[r].hidden:null,a.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,r=e.options.legend||{},a=r.labels&&r.labels.usePointStyle;return e._getSortedDatasetMetas().map(function(n){var i=n.controller.getStyle(a?0:void 0);return{text:t[n.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(e){var a,n,i,t=document.createElement("ul"),r=e.data.datasets;for(t.setAttribute("class",e.id+"-legend"),a=0,n=r.length;as.width)&&(f+=o+r.padding,d[d.length-(A>0?0:1)]=0),l[A]={left:0,top:0,width:L,height:o},d[d.length-1]+=L+r.padding}),s.height+=f}else{var v=r.padding,p=e.columnWidths=[],m=e.columnHeights=[],y=r.padding,_=0,w=0;h.each(e.legendItems,function(T,A){var L=ya(r,o)+o/2+n.measureText(T.text).width;A>0&&w+o+2*v>s.height&&(y+=_+r.padding,p.push(_),m.push(w),_=0,w=0),_=Math.max(_,L),w+=o+v,l[A]={left:0,top:0,width:L,height:o}}),y+=_,p.push(_),m.push(w),s.width+=y}e.width=s.width,e.height=s.height}else e.width=s.width=e.height=s.height=0},afterFit:Xe,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,r=t.labels,a=P.global,n=a.defaultColor,i=a.elements.line,o=e.height,l=e.columnHeights,s=e.width,u=e.lineWidths;if(t.display){var y,d=Qo(t.rtl,e.left,e.minSize.width),f=e.ctx,v=Qe(r.fontColor,a.defaultFontColor),p=h.options._parseFont(r),m=p.size;f.textAlign=d.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=v,f.fillStyle=v,f.font=p.string;var _=ya(r,m),w=e.legendHitBoxes,R=function(W,K){switch(t.align){case"start":return r.padding;case"end":return W-K;default:return(W-K+r.padding)/2}},L=e.isHorizontal();y=L?{x:e.left+R(s,u[0]),y:e.top+r.padding,line:0}:{x:e.left+r.padding,y:e.top+R(o,l[0]),line:0},h.rtl.overrideTextDirection(e.ctx,t.textDirection);var U=m+r.padding;h.each(e.legendItems,function(W,K){var I=f.measureText(W.text).width,te=_+m/2+I,ne=y.x,ae=y.y;d.setWidth(e.minSize.width),L?K>0&&ne+te+r.padding>e.left+e.minSize.width&&(ae=y.y+=U,y.line++,ne=y.x=e.left+R(s,u[y.line])):K>0&&ae+U>e.top+e.minSize.height&&(ne=y.x=ne+e.columnWidths[y.line]+r.padding,y.line++,ae=y.y=e.top+R(o,l[y.line]));var ue=d.x(ne);(function(W,K,I){if(!(isNaN(_)||_<=0)){f.save();var te=Qe(I.lineWidth,i.borderWidth);if(f.fillStyle=Qe(I.fillStyle,n),f.lineCap=Qe(I.lineCap,i.borderCapStyle),f.lineDashOffset=Qe(I.lineDashOffset,i.borderDashOffset),f.lineJoin=Qe(I.lineJoin,i.borderJoinStyle),f.lineWidth=te,f.strokeStyle=Qe(I.strokeStyle,n),f.setLineDash&&f.setLineDash(Qe(I.lineDash,i.borderDash)),r&&r.usePointStyle){var ne=_*Math.SQRT2/2,ae=d.xPlus(W,_/2);h.canvas.drawPoint(f,I.pointStyle,ne,ae,K+m/2,I.rotation)}else f.fillRect(d.leftForLtr(W,_),K,_,m),0!==te&&f.strokeRect(d.leftForLtr(W,_),K,_,m);f.restore()}})(ue,ae,W),w[K].left=d.leftForLtr(ue,w[K].width),w[K].top=ae,function(W,K,I,te){var ne=m/2,ae=d.xPlus(W,_+ne),ue=K+ne;f.fillText(I.text,ae,ue),I.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(ae,ue),f.lineTo(d.xPlus(ae,te),ue),f.stroke())}(ue,ae,W,I),L?y.x+=te+r.padding:y.y+=U}),h.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var a,n,i,r=this;if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)for(i=r.legendHitBoxes,a=0;a=(n=i[a]).left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height)return r.legendItems[a];return null},handleEvent:function(e){var n,t=this,r=t.options,a="mouseup"===e.type?"click":e.type;if("mousemove"===a){if(!r.onHover&&!r.onLeave)return}else{if("click"!==a)return;if(!r.onClick)return}n=t._getLegendItemAt(e.x,e.y),"click"===a?n&&r.onClick&&r.onClick.call(t,e.native,n):(r.onLeave&&n!==t._hoveredItem&&(t._hoveredItem&&r.onLeave.call(t,e.native,t._hoveredItem),t._hoveredItem=n),r.onHover&&n&&r.onHover.call(t,e.native,n))}});function zn(e,t){var r=new _a({ctx:e.ctx,options:t,chart:e});Pe.configure(e,r,t),Pe.addBox(e,r),e.legend=r}var es={id:"legend",_element:_a,beforeInit:function(e){var t=e.options.legend;t&&zn(e,t)},beforeUpdate:function(e){var t=e.options.legend,r=e.legend;t?(h.mergeIf(t,P.global.legend),r?(Pe.configure(e,r,t),r.options=t):zn(e,t)):r&&(Pe.removeBox(e,r),delete e.legend)},afterEvent:function(e,t){var r=e.legend;r&&r.handleEvent(t)}},Ye=h.noop;P._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var jn=Ne.extend({initialize:function(e){h.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:Ye,update:function(e,t,r){var a=this;return a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=r,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:Ye,beforeSetDimensions:Ye,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Ye,beforeBuildLabels:Ye,buildLabels:Ye,afterBuildLabels:Ye,beforeFit:Ye,fit:function(){var i,e=this,t=e.options,r=e.minSize={},a=e.isHorizontal();t.display?(i=(h.isArray(t.text)?t.text.length:1)*h.options._parseFont(t).lineHeight+2*t.padding,e.width=r.width=a?e.maxWidth:i,e.height=r.height=a?i:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:Ye,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,r=e.options;if(r.display){var f,v,p,a=h.options._parseFont(r),n=a.lineHeight,i=n/2+r.padding,o=0,l=e.top,s=e.left,u=e.bottom,d=e.right;t.fillStyle=h.valueOrDefault(r.fontColor,P.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(v=s+(d-s)/2,p=l+i,f=d-s):(v="left"===r.position?s+i:d-i,p=l+(u-l)/2,f=u-l,o=Math.PI*("left"===r.position?-.5:.5)),t.save(),t.translate(v,p),t.rotate(o),t.textAlign="center",t.textBaseline="middle";var m=r.text;if(h.isArray(m))for(var y=0,_=0;_=0;o--){var l=a[o];if(n(l))return l}},h.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},h.almostEquals=function(a,n,i){return Math.abs(a-n)=a},h.max=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.max(n,i)},Number.NEGATIVE_INFINITY)},h.min=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.min(n,i)},Number.POSITIVE_INFINITY)},h.sign=Math.sign?function(a){return Math.sign(a)}:function(a){return 0==(a=+a)||isNaN(a)?a:a>0?1:-1},h.toRadians=function(a){return a*(Math.PI/180)},h.toDegrees=function(a){return a*(180/Math.PI)},h._decimalPlaces=function(a){if(h.isFinite(a)){for(var n=1,i=0;Math.round(a*n)/n!==a;)n*=10,i++;return i}},h.getAngleFromPoint=function(a,n){var i=n.x-a.x,o=n.y-a.y,l=Math.sqrt(i*i+o*o),s=Math.atan2(o,i);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:l}},h.distanceBetweenPoints=function(a,n){return Math.sqrt(Math.pow(n.x-a.x,2)+Math.pow(n.y-a.y,2))},h.aliasPixel=function(a){return a%2==0?0:.5},h._alignPixel=function(a,n,i){var o=a.currentDevicePixelRatio,l=i/2;return Math.round((n-l)*o)/o+l},h.splineCurve=function(a,n,i,o){var l=a.skip?n:a,s=n,u=i.skip?n:i,d=Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2)),f=Math.sqrt(Math.pow(u.x-s.x,2)+Math.pow(u.y-s.y,2)),v=d/(d+f),p=f/(d+f),m=o*(v=isNaN(v)?0:v),y=o*(p=isNaN(p)?0:p);return{previous:{x:s.x-m*(u.x-l.x),y:s.y-m*(u.y-l.y)},next:{x:s.x+y*(u.x-l.x),y:s.y+y*(u.y-l.y)}}},h.EPSILON=Number.EPSILON||1e-14,h.splineCurveMonotone=function(a){var o,l,s,u,f,v,p,m,y,n=(a||[]).map(function(_){return{model:_._model,deltaK:0,mK:0}}),i=n.length;for(o=0;o0?n[o-1]:null,(u=o0?n[o-1]:null)&&!l.model.skip&&(s.model.controlPointPreviousX=s.model.x-(y=(s.model.x-l.model.x)/3),s.model.controlPointPreviousY=s.model.y-y*s.mK),u&&!u.model.skip&&(s.model.controlPointNextX=s.model.x+(y=(u.model.x-s.model.x)/3),s.model.controlPointNextY=s.model.y+y*s.mK))},h.nextItem=function(a,n,i){return i?n>=a.length-1?a[0]:a[n+1]:n>=a.length-1?a[a.length-1]:a[n+1]},h.previousItem=function(a,n,i){return i?n<=0?a[a.length-1]:a[n-1]:n<=0?a[0]:a[n-1]},h.niceNum=function(a,n){var i=Math.floor(h.log10(a)),o=a/Math.pow(10,i);return(n?o<1.5?1:o<3?2:o<7?5:10:o<=1?1:o<=2?2:o<=5?5:10)*Math.pow(10,i)},h.requestAnimFrame="undefined"==typeof window?function(a){a()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)},h.getRelativePosition=function(a,n){var i,o,l=a.originalEvent||a,s=a.target||a.srcElement,u=s.getBoundingClientRect(),d=l.touches;d&&d.length>0?(i=d[0].clientX,o=d[0].clientY):(i=l.clientX,o=l.clientY);var f=parseFloat(h.getStyle(s,"padding-left")),v=parseFloat(h.getStyle(s,"padding-top")),p=parseFloat(h.getStyle(s,"padding-right")),m=parseFloat(h.getStyle(s,"padding-bottom")),_=u.bottom-u.top-v-m;return{x:i=Math.round((i-u.left-f)/(u.right-u.left-f-p)*s.width/n.currentDevicePixelRatio),y:o=Math.round((o-u.top-v)/_*s.height/n.currentDevicePixelRatio)}},h.getConstraintWidth=function(a){return r(a,"max-width","clientWidth")},h.getConstraintHeight=function(a){return r(a,"max-height","clientHeight")},h._calculatePadding=function(a,n,i){return(n=h.getStyle(a,n)).indexOf("%")>-1?i*parseInt(n,10)/100:parseInt(n,10)},h._getParentNode=function(a){var n=a.parentNode;return n&&"[object ShadowRoot]"===n.toString()&&(n=n.host),n},h.getMaximumWidth=function(a){var n=h._getParentNode(a);if(!n)return a.clientWidth;var i=n.clientWidth,s=i-h._calculatePadding(n,"padding-left",i)-h._calculatePadding(n,"padding-right",i),u=h.getConstraintWidth(a);return isNaN(u)?s:Math.min(s,u)},h.getMaximumHeight=function(a){var n=h._getParentNode(a);if(!n)return a.clientHeight;var i=n.clientHeight,s=i-h._calculatePadding(n,"padding-top",i)-h._calculatePadding(n,"padding-bottom",i),u=h.getConstraintHeight(a);return isNaN(u)?s:Math.min(s,u)},h.getStyle=function(a,n){return a.currentStyle?a.currentStyle[n]:document.defaultView.getComputedStyle(a,null).getPropertyValue(n)},h.retinaScale=function(a,n){var i=a.currentDevicePixelRatio=n||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var o=a.canvas,l=a.height,s=a.width;o.height=l*i,o.width=s*i,a.ctx.scale(i,i),!o.style.height&&!o.style.width&&(o.style.height=l+"px",o.style.width=s+"px")}},h.fontString=function(a,n,i){return n+" "+a+"px "+i},h.longestText=function(a,n,i,o){var l=(o=o||{}).data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==n&&(l=o.data={},s=o.garbageCollect=[],o.font=n),a.font=n;var f,v,p,m,y,u=0,d=i.length;for(f=0;fi.length){for(f=0;f<_;f++)delete l[s[f]];s.splice(0,_)}return u},h.measureText=function(a,n,i,o,l){var s=n[l];return s||(s=n[l]=a.measureText(l).width,i.push(l)),s>o&&(o=s),o},h.numberOfLabelLines=function(a){var n=1;return h.each(a,function(i){h.isArray(i)&&i.length>n&&(n=i.length)}),n},h.color=sr?function(a){return a instanceof CanvasGradient&&(a=P.global.defaultColor),sr(a)}:function(a){return console.error("Color.js not found!"),a},h.getHoverColor=function(a){return a instanceof CanvasPattern||a instanceof CanvasGradient?a:h.color(a).saturate(.5).darken(.1).rgbString()}}(),B._adapters=xr,B.Animation=Er,B.animationService=Nr,B.controllers=Vr,B.DatasetController=De,B.defaults=P,B.Element=Ne,B.elements=be,B.Interaction=wt,B.layouts=Pe,B.platform=St,B.plugins=$,B.Scale=he,B.scaleService=Zt,B.Ticks=Mt,B.Tooltip=br,B.helpers.each(Ho,function(e,t){B.scaleService.registerScaleType(t,e,e._defaults)}),et)et.hasOwnProperty(Vn)&&B.plugins.register(et[Vn]);B.platform.initialize();var Un=B;return"undefined"!=typeof window&&(window.Chart=B),B.Chart=B,B.Legend=et.legend._element,B.Title=et.title._element,B.pluginService=B.plugins,B.PluginBase=B.Element.extend({}),B.canvasHelpers=B.helpers.canvas,B.layoutService=B.layouts,B.LinearScaleBase=wr,B.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){B[e]=function(t,r){return new B(t,B.helpers.merge(r||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}}),Un}(function(){try{return X(8268)}catch(C){}}())},9215:(ka,ar,X)=>{"use strict";X.d(ar,{jh:()=>vs,m9:()=>gs,bF:()=>ps,Dy:()=>ms});var V=X(5e3),Fe=X(1135);const Le=function G(c,b){return c===b||c!=c&&b!=b},rt=function nr(c,b){for(var g=c.length;g--;)if(Le(c[g][0],b))return g;return-1};var Ma=Array.prototype.splice;function at(c){var b=-1,g=null==c?0:c.length;for(this.clear();++b-1},at.prototype.set=function Fa(c,b){var g=this.__data__,x=rt(g,c);return x<0?(++this.size,g.push([c,b])):g[x][1]=b,this};const Bt=at,ir="object"==typeof global&&global&&global.Object===Object&&global;var Et="object"==typeof self&&self&&self.Object===Object&&self;const Me=ir||Et||Function("return this")(),it=Me.Symbol;var Ra=Object.prototype,Gn=Ra.hasOwnProperty,Zn=Ra.toString,Nt=it?it.toStringTag:void 0;var Ea=Object.prototype.toString;var Be=it?it.toStringTag:void 0;const pt=function or(c){return null==c?void 0===c?"[object Undefined]":"[object Null]":Be&&Be in Object(c)?function Jn(c){var b=Gn.call(c,Nt),g=c[Nt];try{c[Nt]=void 0;var x=!0}catch(O){}var S=Zn.call(c);return x&&(b?c[Nt]=g:delete c[Nt]),S}(c):function Qn(c){return Ea.call(c)}(c)},le=function za(c){var b=typeof c;return null!=c&&("object"==b||"function"==b)},Wa=function zt(c){if(!le(c))return!1;var b=pt(c);return"[object Function]"==b||"[object GeneratorFunction]"==b||"[object AsyncFunction]"==b||"[object Proxy]"==b};var c,me=Me["__core-js_shared__"],Ha=(c=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"";var lr=Function.prototype.toString;const Ge=function ri(c){if(null!=c){try{return lr.call(c)}catch(b){}try{return c+""}catch(b){}}return""};var ur=/^\[object .+?Constructor\]$/,oi=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const li=function si(c){return!(!le(c)||function Ae(c){return!!Ha&&Ha in c}(c))&&(Wa(c)?oi:ur).test(Ge(c))},h=function fi(c,b){var g=function ui(c,b){return null==c?void 0:c[b]}(c,b);return li(g)?g:void 0},Wt=h(Me,"Map"),Ht=h(Object,"create");var Nr=Object.prototype.hasOwnProperty;var Ka=Object.prototype.hasOwnProperty;function bt(c){var b=-1,g=null==c?0:c.length;for(this.clear();++b-1&&c%1==0&&c-1&&c%1==0&&c<=9007199254740991};var Y={};Y["[object Float32Array]"]=Y["[object Float64Array]"]=Y["[object Int8Array]"]=Y["[object Int16Array]"]=Y["[object Int32Array]"]=Y["[object Uint8Array]"]=Y["[object Uint8ClampedArray]"]=Y["[object Uint16Array]"]=Y["[object Uint32Array]"]=!0,Y["[object Arguments]"]=Y["[object Array]"]=Y["[object ArrayBuffer]"]=Y["[object Boolean]"]=Y["[object DataView]"]=Y["[object Date]"]=Y["[object Error]"]=Y["[object Function]"]=Y["[object Map]"]=Y["[object Number]"]=Y["[object Object]"]=Y["[object RegExp]"]=Y["[object Set]"]=Y["[object String]"]=Y["[object WeakMap]"]=!1;const ut=function Zi(c){return function(b){return c(b)}};var pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Gt=pn&&"object"==typeof module&&module&&!module.nodeType&&module,Jr=Gt&&Gt.exports===pn&&ir.process;const kt=function(){try{return Gt&&Gt.require&&Gt.require("util").types||Jr&&Jr.binding&&Jr.binding("util")}catch(b){}}();var Xr=kt&&kt.isTypedArray;const St=Xr?ut(Xr):function Zr(c){return Kt(c)&&un(c.length)&&!!Y[pt(c)]};var Zt=Object.prototype.hasOwnProperty;const pr=function qe(c,b){var g=Hr(c),x=!g&&Fi(c),S=!g&&!x&&hr(c),O=!g&&!x&&!S&&St(c),F=g||x||S||O,re=F?function Ve(c,b){for(var g=-1,x=Array(c);++gxe(b,.6)),borderColor:c.map(()=>"#fff"),pointBackgroundColor:c.map(b=>xe(b,1)),pointBorderColor:c.map(()=>"#fff"),pointHoverBackgroundColor:c.map(b=>xe(b,1)),pointHoverBorderColor:c.map(b=>xe(b,1))}}function os(){return[ns(0,255),ns(0,255),ns(0,255)]}function ss(c){return qn[c]||os()}function Kn(c){const b=new Array(c);for(let g=0;g{class c{constructor(){this.pColorschemesOptions={},this.colorschemesOptions=new Fe.X({})}setColorschemesOptions(g){this.pColorschemesOptions=g,this.colorschemesOptions.next(g)}getColorschemesOptions(){return this.pColorschemesOptions}}return c.\u0275fac=function(g){return new(g||c)},c.\u0275prov=(0,V.Yz7)({factory:function(){return new c},token:c,providedIn:"root"}),c})();const q={Default:0,Update:1,Refresh:2};q[q.Default]="Default",q[q.Update]="Update",q[q.Refresh]="Refresh";let vs=(()=>{class c{constructor(g,x){this.element=g,this.themeService=x,this.options={},this.chartClick=new V.vpe,this.chartHover=new V.vpe,this.old={dataExists:!1,dataLength:0,datasetsExists:!1,datasetsLength:0,datasetsDataObjects:[],datasetsDataLengths:[],colorsExists:!1,colors:[],labelsExist:!1,labels:[],legendExists:!1,legend:{}},this.subs=[]}static registerPlugin(g){er.pluginService.register(g)}static unregisterPlugin(g){er.pluginService.unregister(g)}ngOnInit(){this.ctx=this.element.nativeElement.getContext("2d"),this.refresh(),this.subs.push(this.themeService.colorschemesOptions.subscribe(g=>this.themeChanged(g)))}themeChanged(g){this.refresh()}ngDoCheck(){if(!this.chart)return;let g=q.Default;const x=S=>{g=S>g?S:g};switch(!!this.data!==this.old.dataExists&&(this.propagateDataToDatasets(this.data),this.old.dataExists=!!this.data,x(q.Update)),this.data&&this.data.length!==this.old.dataLength&&(this.old.dataLength=this.data&&this.data.length||0,x(q.Update)),!!this.datasets!==this.old.datasetsExists&&(this.old.datasetsExists=!!this.datasets,x(q.Update)),this.datasets&&this.datasets.length!==this.old.datasetsLength&&(this.old.datasetsLength=this.datasets&&this.datasets.length||0,x(q.Update)),this.datasets&&this.datasets.filter((S,O)=>S.data!==this.old.datasetsDataObjects[O]).length&&(this.old.datasetsDataObjects=this.datasets.map(S=>S.data),x(q.Update)),this.datasets&&this.datasets.filter((S,O)=>S.data.length!==this.old.datasetsDataLengths[O]).length&&(this.old.datasetsDataLengths=this.datasets.map(S=>S.data.length),x(q.Update)),!!this.colors!==this.old.colorsExists&&(this.old.colorsExists=!!this.colors,this.updateColors(),x(q.Update)),this.colors&&this.colors.filter((S,O)=>!this.colorsEqual(S,this.old.colors[O])).length&&(this.old.colors=this.colors.map(S=>this.copyColor(S)),this.updateColors(),x(q.Update)),!!this.labels!==this.old.labelsExist&&(this.old.labelsExist=!!this.labels,x(q.Update)),this.labels&&this.labels.filter((S,O)=>!this.labelsEqual(S,this.old.labels[O])).length&&(this.old.labels=this.labels.map(S=>this.copyLabel(S)),x(q.Update)),!!this.options.legend!==this.old.legendExists&&(this.old.legendExists=!!this.options.legend,x(q.Refresh)),this.options.legend&&this.options.legend.position!==this.old.legend.position&&(this.old.legend.position=this.options.legend.position,x(q.Refresh)),g){case q.Default:break;case q.Update:this.update();break;case q.Refresh:this.refresh()}}copyLabel(g){return Array.isArray(g)?[...g]:g}labelsEqual(g,x){return Array.isArray(g)===Array.isArray(x)&&(Array.isArray(g)||g===x)&&(!Array.isArray(g)||g.length===x.length)&&(!Array.isArray(g)||0===g.filter((S,O)=>S!==x[O]).length)}copyColor(g){return{backgroundColor:g.backgroundColor,borderWidth:g.borderWidth,borderColor:g.borderColor,borderCapStyle:g.borderCapStyle,borderDash:g.borderDash,borderDashOffset:g.borderDashOffset,borderJoinStyle:g.borderJoinStyle,pointBorderColor:g.pointBorderColor,pointBackgroundColor:g.pointBackgroundColor,pointBorderWidth:g.pointBorderWidth,pointRadius:g.pointRadius,pointHoverRadius:g.pointHoverRadius,pointHitRadius:g.pointHitRadius,pointHoverBackgroundColor:g.pointHoverBackgroundColor,pointHoverBorderColor:g.pointHoverBorderColor,pointHoverBorderWidth:g.pointHoverBorderWidth,pointStyle:g.pointStyle,hoverBackgroundColor:g.hoverBackgroundColor,hoverBorderColor:g.hoverBorderColor,hoverBorderWidth:g.hoverBorderWidth}}colorsEqual(g,x){return!g==!x&&(!g||g.backgroundColor===x.backgroundColor&&g.borderWidth===x.borderWidth&&g.borderColor===x.borderColor&&g.borderCapStyle===x.borderCapStyle&&g.borderDash===x.borderDash&&g.borderDashOffset===x.borderDashOffset&&g.borderJoinStyle===x.borderJoinStyle&&g.pointBorderColor===x.pointBorderColor&&g.pointBackgroundColor===x.pointBackgroundColor&&g.pointBorderWidth===x.pointBorderWidth&&g.pointRadius===x.pointRadius&&g.pointHoverRadius===x.pointHoverRadius&&g.pointHitRadius===x.pointHitRadius&&g.pointHoverBackgroundColor===x.pointHoverBackgroundColor&&g.pointHoverBorderColor===x.pointHoverBorderColor&&g.pointHoverBorderWidth===x.pointHoverBorderWidth&&g.pointStyle===x.pointStyle&&g.hoverBackgroundColor===x.hoverBackgroundColor&&g.hoverBorderColor===x.hoverBorderColor&&g.hoverBorderWidth===x.hoverBorderWidth)}updateColors(){this.datasets.forEach((g,x)=>{this.colors&&this.colors[x]?Object.assign(g,this.colors[x]):Object.assign(g,function us(c,b,g){if("pie"===c||"doughnut"===c)return is(Kn(g));if("polarArea"===c)return function cs(c){return{backgroundColor:c.map(b=>xe(b,.6)),borderColor:c.map(b=>xe(b,1)),hoverBackgroundColor:c.map(b=>xe(b,.8)),hoverBorderColor:c.map(b=>xe(b,1))}}(Kn(g));if("line"===c||"radar"===c)return function ds(c){return{backgroundColor:xe(c,.4),borderColor:xe(c,1),pointBackgroundColor:xe(c,1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:xe(c,.8)}}(ss(b));if("bar"===c||"horizontalBar"===c)return function fs(c){return{backgroundColor:xe(c,.6),borderColor:xe(c,1),hoverBackgroundColor:xe(c,.8),hoverBorderColor:xe(c,1)}}(ss(b));if("bubble"===c||"scatter"===c)return is(Kn(g));throw new Error("getColors - Unsupported chart type: "+c)}(this.chartType,x,g.data.length),Object.assign({},g))})}ngOnChanges(g){let x=q.Default;const S=O=>{x=O>x?O:x};switch(g.hasOwnProperty("data")&&g.data.currentValue&&(this.propagateDataToDatasets(g.data.currentValue),S(q.Update)),g.hasOwnProperty("datasets")&&g.datasets.currentValue&&(this.propagateDatasetsToData(g.datasets.currentValue),S(q.Update)),g.hasOwnProperty("labels")&&(this.chart&&(this.chart.data.labels=g.labels.currentValue),S(q.Update)),g.hasOwnProperty("legend")&&(this.chart&&(this.chart.config.options.legend.display=g.legend.currentValue,this.chart.generateLegend()),S(q.Update)),g.hasOwnProperty("options")&&S(q.Refresh),x){case q.Update:this.update();break;case q.Refresh:case q.Default:this.refresh()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(g=>g.unsubscribe())}update(g){if(this.chart)return this.chart.update(g)}hideDataset(g,x){this.chart.getDatasetMeta(g).hidden=x,this.chart.update()}isDatasetHidden(g){return this.chart.getDatasetMeta(g).hidden}toBase64Image(){return this.chart.toBase64Image()}getChartConfiguration(){const g=this.getDatasets(),x=Object.assign({},this.options);!1===this.legend&&(x.legend={display:!1}),x.hover=x.hover||{},x.hover.onHover||(x.hover.onHover=(O,F)=>{F&&!F.length||this.chartHover.emit({event:O,active:F})}),x.onClick||(x.onClick=(O,F)=>{this.chartClick.emit({event:O,active:F})});const S=this.smartMerge(x,this.themeService.getColorschemesOptions());return{type:this.chartType,data:{labels:this.labels||[],datasets:g},plugins:this.plugins,options:S}}getChartBuilder(g){const x=this.getChartConfiguration();return new er.Chart(g,x)}smartMerge(g,x,S=0){if(0===S&&(g=function Ot(c){return ne(c,5)}(g)),Object.keys(x).forEach(F=>{if(Array.isArray(x[F])){const re=g[F];re&&re.forEach(D=>{this.smartMerge(D,x[F][0],S+1)})}else"object"==typeof x[F]?(F in g||(g[F]={}),this.smartMerge(g[F],x[F],S+1)):g[F]=x[F]}),0===S)return g}isMultiLineLabel(g){return Array.isArray(g)}joinLabel(g){return g?this.isMultiLineLabel(g)?g.join(" "):g:null}propagateDatasetsToData(g){this.data=this.datasets.map(x=>x.data),this.chart&&(this.chart.data.datasets=g),this.updateColors()}propagateDataToDatasets(g){this.isMultiDataSet(g)?this.datasets&&g.length===this.datasets.length?this.datasets.forEach((x,S)=>{x.data=g[S]}):(this.datasets=g.map((x,S)=>({data:x,label:this.joinLabel(this.labels[S])||`Label ${S}`})),this.chart&&(this.chart.data.datasets=this.datasets)):this.datasets?(this.datasets[0]||(this.datasets[0]={}),this.datasets[0].data=g,this.datasets.splice(1)):(this.datasets=[{data:g}],this.chart&&(this.chart.data.datasets=this.datasets)),this.updateColors()}isMultiDataSet(g){return Array.isArray(g[0])}getDatasets(){if(!this.datasets&&!this.data)throw new Error(`ng-charts configuration error, data or datasets field are required to render chart ${this.chartType}`);return this.datasets?(this.propagateDatasetsToData(this.datasets),this.datasets):this.data?(this.propagateDataToDatasets(this.data),this.datasets):void 0}refresh(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.ctx&&(this.chart=this.getChartBuilder(this.ctx))}}return c.\u0275fac=function(g){return new(g||c)(V.Y36(V.SBq),V.Y36(hs))},c.\u0275dir=V.lG2({type:c,selectors:[["canvas","baseChart",""]],inputs:{options:"options",data:"data",datasets:"datasets",labels:"labels",chartType:"chartType",colors:"colors",legend:"legend",plugins:"plugins"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[V.TTD]}),c})(),gs=(()=>{class c{}return c.\u0275fac=function(g){return new(g||c)},c.\u0275mod=V.oAB({type:c}),c.\u0275inj=V.cJS({imports:[[]]}),c})();function ps(){if("undefined"==typeof Chart)return void console.log("Chart not defined (guessing this is a universal build, and I don't know why this happens -- Aviad)");const b=Chart.plugins.getAll().filter(D=>"legend"===D.id)[0];b._element.prototype.fit=function F(){var D=this,Q=D.options,Z=Q.labels,ve=Q.display,Ce=D.ctx,ke=g.options._parseFont(Z),de=ke.size,Oe=D.legendHitBoxes=[],J=D.minSize,ge=D.isHorizontal();ge?(J.width=D.maxWidth,J.height=ve?10:0):(J.width=ve?10:0,J.height=D.maxHeight);var xa=function(pe){return pe.map(function(we){return Ce.measureText(we).width}).reduce(function(we,oe){return oe>we?oe:we},0)};if(ve)if(Ce.font=ke.string,ge){var vt=D.lineWidths=[0],N=D.lineHeights=[],Ft=0,Ca=0;Ce.textAlign="left",Ce.textBaseline="top",g.each(D.legendItems,function(pe,we){var oe,z;g.isArray(pe.text)?(oe=xa(pe.text),z=de*pe.text.length+Z.padding):(oe=Ce.measureText(pe.text).width,z=de+Z.padding),oe+=O(Z,de)+de/2,vt[vt.length-1]+oe+2*Z.padding>J.width&&(N.push(Ft),Ft=0,vt[vt.length-(we>0?0:1)]=0,Ca++),pe.lineOrColumnIndex=Ca,z>Ft&&(Ft=z),Oe[we]={left:0,top:0,width:oe,height:z},vt[vt.length-1]+=oe+Z.padding}),N.push(Ft),J.height+=N.reduce(function(pe,we){return pe+we},0)}else{var Ie=Z.padding,ie=D.columnWidths=[],$e=D.columnHeights=[],tr=Z.padding,gt=0,rr=0,Yn=0;g.each(D.legendItems,function(pe,we){var oe,z;g.isArray(pe.text)?(oe=xa(pe.text),z=de*pe.text.length):(oe=Ce.measureText(pe.text).width,z=de),oe+=O(Z,de)+de/2,rr+de+2*Ie>J.height&&(tr+=gt+Z.padding,ie.push(gt),$e.push(rr),gt=0,rr=0,Yn++),pe.lineOrColumnIndex=Yn,gt=Math.max(gt,oe),rr+=z+Ie,Oe[we]={left:0,top:0,width:oe,height:z}}),tr+=gt,ie.push(gt),$e.push(rr),J.width+=tr}D.width=J.width,D.height=J.height},b._element.prototype.draw=function re(){var D=this,Q=D.options,Z=Q.labels,ve=x.global,Ce=ve.defaultColor,ke=ve.elements.line,de=D.height,Oe=D.columnHeights,J=D.columnWidths,ge=D.width,xa=D.lineWidths,vt=D.lineHeights;if(Q.display){var ie,N=D.ctx,Ft=S(Z.fontColor,ve.defaultFontColor),Ca=g.options._parseFont(Z),Ie=Ca.size;N.textAlign="left",N.textBaseline="middle",N.lineWidth=.5,N.strokeStyle=Ft,N.fillStyle=Ft,N.font=Ca.string;var $e=O(Z,Ie),tr=D.legendHitBoxes,we=function(z,se){switch(Q.align){case"start":return Z.padding;case"end":return z-se;default:return(z-se+Z.padding)/2}},oe=D.isHorizontal();ie=oe?{x:D.left+we(ge,xa[0]),y:D.top+Z.padding,line:0}:{x:D.left+Z.padding,y:D.top+we(de,Oe[0]),line:0},g.each(D.legendItems,function(z,se){var ee,He,Lt;z.lineOrColumnIndex>ie.line&&(oe?(ie.y+=vt[ie.line],ie.line=z.lineOrColumnIndex,ie.x=D.left+we(ge,xa[ie.line])):(ie.x+=J[ie.line]+Z.padding,ie.line=z.lineOrColumnIndex,ie.y=D.top+we(de,Oe[ie.line]))),g.isArray(z.text)?(ee=z.text.map(function(Dr){return N.measureText(Dr).width}).reduce(function(Dr,ls){return ls>Dr?ls:Dr},0),Lt=Ie/2*(z.text.length-1),He=Ie*z.text.length):(ee=N.measureText(z.text).width,Lt=0,He=Ie);var Rt=$e+Ie/2+ee,tt=ie.x,wa=ie.y,$n=oe?Math.trunc((vt[ie.line]-tr[se].height)/2):0;(function(z,se,ee){if(!(isNaN($e)||$e<=0)){N.save();var He=S(ee.lineWidth,ke.borderWidth);if(N.fillStyle=S(ee.fillStyle,Ce),N.lineCap=S(ee.lineCap,ke.borderCapStyle),N.lineDashOffset=S(ee.lineDashOffset,ke.borderDashOffset),N.lineJoin=S(ee.lineJoin,ke.borderJoinStyle),N.lineWidth=He,N.strokeStyle=S(ee.strokeStyle,Ce),N.setLineDash&&N.setLineDash(S(ee.lineDash,ke.borderDash)),Q.labels&&Q.labels.usePointStyle){var Lt=$e*Math.SQRT2/2;g.canvas.drawPoint(N,ee.pointStyle,Lt,z+$e/2,se+Ie/2)}else 0!==He&&N.strokeRect(z,se,$e,Ie),N.fillRect(z,se,$e,Ie);N.restore()}})(tt,wa+Lt+$n,z),tr[se].left=tt,tr[se].top=wa,function(z,se,ee,He){var Lt=Ie/2,Rt=$e+Lt+z,tt=se+Lt;g.isArray(ee.text)?g.each(ee.text,function(wa,$n){N.fillText(wa,Rt,tt+$n*Ie)}):N.fillText(ee.text,Rt,tt),ee.hidden&&(g.isArray(ee.text)?function(z,se,ee,He){N.beginPath(),N.lineWidth=2,N.moveTo(z,se),N.lineTo(z+ee,se+He),N.moveTo(z,se+He),N.lineTo(z+ee,se),N.stroke()}(Rt,tt,He,(ee.text.length-1)*(Ie-1)):function(z,se,ee){N.beginPath(),N.lineWidth=2,N.moveTo(z,se),N.lineTo(z+ee,se),N.stroke()}(Rt,tt,He))}(tt,wa+$n,z,ee),oe?ie.x+=Rt+Z.padding:ie.y+=He+Z.padding})}};const g=Chart.helpers,x=Chart.defaults,S=g.valueOrDefault;function O(D,Q){return D.usePointStyle&&D.boxWidth>Q?Q:D.boxWidth}}function ms(){if("undefined"==typeof Chart)return void console.log("Chart not defined (guessing this is a universal build, and I don't know why this happens -- Aviad)");Chart.Tooltip.prototype.drawBody=function g(x,S,O){var de,F=S.bodyFontSize,re=S.bodySpacing,D=S._bodyAlign,Q=S.body,Z=S.displayColors,ve=S.labelColors,Ce=0,ke=Z?b(S,"left"):0;O.textAlign=D,O.textBaseline="top",O.font=c.fontString(F,S._bodyFontStyle,S._bodyFontFamily),x.x=b(S,D);var Oe=function(J){O.fillText(J,x.x+Ce,x.y),x.y+=F+re};O.fillStyle=S.bodyFontColor,c.each(S.beforeBody,Oe),Ce=Z&&"right"!==D?"center"===D?F/2+1:F+2:0,c.each(Q,function(J,ge){O.fillStyle=de=S.labelTextColors[ge],c.each(J.before,Oe),Z&&(O.fillStyle=S.legendColorBackground,O.fillRect(ke,x.y,F,F),O.lineWidth=1,O.strokeStyle=ve[ge].borderColor,O.strokeRect(ke,x.y,F,F),O.fillStyle=ve[ge].backgroundColor,O.fillRect(ke+1,x.y+1,F-2,F-2),O.fillStyle=de),c.each(J.lines,Oe),c.each(J.after,Oe)}),Ce=0,c.each(S.afterBody,Oe),x.y-=re};const c=Chart.helpers;function b(x,S){return"center"===S?x.x+x.width/2:"right"===S?x.x+x.width-x.xPadding:x.x+x.xPadding}}}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/219.698ea9fdc5aa1276.js b/dist/fansubid/browser/219.698ea9fdc5aa1276.js new file mode 100644 index 000000000..485a7f324 --- /dev/null +++ b/dist/fansubid/browser/219.698ea9fdc5aa1276.js @@ -0,0 +1 @@ +(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[219],{325:(ka,ar,X)=>{"use strict";X.d(ar,{Y:()=>Ir});var V=X(9215),Fe=X(4249),C=X(5e3),Se=X(4137),G=X(8406),Le=X(8696),nr=X(8381),rt=X(9731);let Sa=(()=>{class E{constructor(k,M){this.api=k,this.gs=M}getAllReport(){return this.api.getData("/likedislike")}getReport(k,M){return this.api.getData(`/likedislike/${k}/${M}`)}setReport(k,M,H){return this.api.postData(`/likedislike/${k}/${M}`,H)}deleteReport(k){return this.api.deleteData(`/likedislike/${k}`)}}return E.\u0275fac=function(k){return new(k||E)(C.LFG(rt.s),C.LFG(Le.U))},E.\u0275prov=C.Yz7({token:E,factory:E.\u0275fac,providedIn:"root"}),E})();var Ma=X(3e3),Ta=X(9808),Aa=X(7423),Da=X(5245);function Pa(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"span",14),C.NdJ("click",function(){return C.CHM(k),C.oxw().toggleAllStats()}),C._uU(1),C.qZA()}if(2&E){const k=C.oxw();C.xp6(1),C.hij(" ",k.toggleAllStatsValue?"Sederhana":"Lengkap"," ")}}function Oa(E,fe){if(1&E&&(C.TgZ(0,"div",15),C._UZ(1,"canvas",16),C.qZA()),2&E){const k=C.oxw();C.xp6(1),C.Q6J("data",k.doughnutChartKetertarikanData)("labels",k.doughnutChartKetertarikanLabels)("chartType",k.doughnutChartType)("options",k.doughnutChartKetertarikanOptions)("plugins",k.chartPlugins)("legend",!0)}}function Ia(E,fe){if(1&E&&(C.TgZ(0,"div",15),C._UZ(1,"canvas",16),C.qZA()),2&E){const k=C.oxw();C.xp6(1),C.Q6J("data",k.barChartUniqueData)("labels",k.barChartUniqueLabels)("chartType",k.barChartType)("options",k.barChartUniqueOptions)("plugins",k.chartPlugins)("legend",!1)}}function Fa(E,fe){if(1&E&&(C.TgZ(0,"div",15),C._UZ(1,"canvas",16),C.qZA()),2&E){const k=C.oxw();C.xp6(1),C.Q6J("data",k.lineChartVisitorData)("labels",k.lineChartVisitorLabels)("chartType",k.lineChartType)("options",k.lineChartVisitorOptions)("plugins",k.chartPlugins)("legend",!1)}}function La(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",17),C.NdJ("click",function(){return C.CHM(k),C.oxw().login()}),C.TgZ(1,"mat-icon",18),C._uU(2,"vpn_key"),C.qZA(),C._uU(3," Klik Untuk Login "),C.qZA()}}function at(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",19),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.LIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_up_off_alt"),C.qZA(),C._uU(3),C.qZA()}if(2&E){const k=C.oxw();C.xp6(3),C.hij(" Suka (",k.summary.like,") ")}}function Bt(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",20),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.LIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_up_off_alt"),C.qZA(),C._uU(3),C.qZA()}if(2&E){const k=C.oxw();C.xp6(3),C.hij(" Suka (",k.summary.like,") ")}}function Pr(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",17),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.DISLIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_down_off_alt"),C.qZA(),C._uU(3," Tidak Suka "),C.qZA()}}function Or(E,fe){if(1&E){const k=C.EpF();C.TgZ(0,"button",21),C.NdJ("click",function(){C.CHM(k);const H=C.oxw();return H.likeOrDislike(H.DISLIKE)}),C.TgZ(1,"mat-icon",18),C._uU(2,"thumb_down_off_alt"),C.qZA(),C._uU(3," Tidak Suka "),C.qZA()}}let Ir=(()=>{class E{constructor(k,M,H,nt,ir,Et){this.as=k,this.router=M,this.gs=H,this.ss=nt,this.rs=ir,this.bs=Et,this.toggleAllStatsValue=!1,this.summary={like:0,dislike:0,unique_ip:0,unique_user:0,verified_user:0,un_verified_user:0},this.doughnutChartKetertarikanOptions={title:{display:!0,text:"Total Ketertarikan Pengguna"},responsive:!0,legend:{position:"right"}},this.lineChartVisitorOptions={title:{display:!0,text:"Riwayat Jumlah Pengunjung"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}]}},this.barChartUniqueOptions={title:{display:!0,text:"Total Kunjungan Unik"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}]}},this.chartPlugins=[],this.doughnutChartKetertarikanData=[],this.doughnutChartKetertarikanLabels=[],this.lineChartVisitorData=[],this.lineChartVisitorLabels=[],this.barChartUniqueData=[],this.barChartUniqueLabels=[],this.doughnutChartType="doughnut",this.lineChartType="line",this.barChartType="bar",this.reportTrackType=null,this.idSlugUsername=null,this.subsGetReport=null,this.subsSetReport=null,this.myReport=null,this.gs.isBrowser&&((0,V.Dy)(),(0,V.bF)())}get AS(){return this.as}ngOnDestroy(){var k,M;null===(k=this.subsGetReport)||void 0===k||k.unsubscribe(),null===(M=this.subsSetReport)||void 0===M||M.unsubscribe()}get LIKE(){return Fe.eK.LIKE}get DISLIKE(){return Fe.eK.DISLIKE}get SHOWALLSTATS(){return this.toggleAllStatsValue}get SHOWALLSTATSVERIFIEDONLY(){var k,M;const H=null===(M=null===(k=this.as.currentUserSubject)||void 0===k?void 0:k.value)||void 0===M?void 0:M.role;return!!H&&(H===Fe.yS.ADMIN||H===Fe.yS.MODERATOR||H===Fe.yS.FANSUBBER)&&this.SHOWALLSTATS}ngOnInit(){this.gs.isBrowser&&(this.reportTrackType=this.router.url.split("?")[0].split("/")[1],this.idSlugUsername=this.router.url.split("?")[0].split("/")[2],this.ss.socketEmit("track-get",{trackType:this.reportTrackType,idSlugUsername:this.idSlugUsername},k=>{this.gs.log("[SOCKET_TRACK-GET]",k),this.barChartUniqueLabels=["Alamat IP","Akun Pengguna","Terverifikasi","Belum Verifikasi"],this.barChartUniqueData=[k.unique_ip,k.unique_user,k.verified_user,k.un_verified_user],this.summary.unique_ip=k.unique_ip,this.summary.unique_user=k.unique_user,this.summary.verified_user=k.verified_user,this.summary.un_verified_user=k.un_verified_user,this.lineChartVisitorData=[],this.lineChartVisitorLabels=[];for(const M of k.visitor)this.lineChartVisitorData.push(M.visitor_count||0),this.lineChartVisitorLabels.push(new Date(new Date(M.visitor_date).getTime()-60*new Date(M.visitor_date).getTimezoneOffset()*1e3).toISOString().split("T")[0])}),this.getReport())}toggleAllStats(){this.toggleAllStatsValue=!this.toggleAllStatsValue}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:`/${this.reportTrackType}/${this.idSlugUsername}`}})}likeOrDislike(k){var M,H;let nt=null;(null===(M=this.as.currentUserSubject)||void 0===M?void 0:M.value)&&(nt=k===(null===(H=this.myReport)||void 0===H?void 0:H.type)?null:k,this.setReport(nt,!0))}setReport(k,M=!1){this.bs.busy(),this.rs.setReport(this.reportTrackType,this.idSlugUsername,{likedislike:k}).subscribe({next:H=>{this.gs.log("[LIKE-DISLIKE_SET_REPORT_SUCCESS]",H),this.myReport=H.result,this.bs.idle(),M&&this.getReport()},error:H=>{this.gs.log("[LIKE-DISLIKE_SET_REPORT_ERROR]",H,"error"),this.bs.idle()}})}getReport(){this.bs.busy(),this.rs.getReport(this.reportTrackType,this.idSlugUsername).subscribe({next:k=>{this.gs.log("[LIKE-DISLIKE_GET_REPORT_SUCCESS]",k),this.doughnutChartKetertarikanLabels=[],this.doughnutChartKetertarikanData=[],this.summary.like=0,this.summary.dislike=0;for(const M of k.result.statistics)M.type===this.LIKE?(this.doughnutChartKetertarikanLabels.push("Suka"),this.summary.like=M.count):(this.doughnutChartKetertarikanLabels.push("Tidak Suka"),this.summary.dislike=M.count),this.doughnutChartKetertarikanData.push(M.count);this.myReport=k.result.myReport,this.bs.idle()},error:k=>{this.gs.log("[LIKE-DISLIKE_GET_REPORT_ERROR]",k,"error"),this.bs.idle()}})}}return E.\u0275fac=function(k){return new(k||E)(C.Y36(Se.e),C.Y36(G.F0),C.Y36(Le.U),C.Y36(nr.R),C.Y36(Sa),C.Y36(Ma.z))},E.\u0275cmp=C.Xpm({type:E,selectors:[["app-report"]],decls:21,vars:9,consts:[[1,"row","p-0"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],["class","float-end text-warning","style","font-size: small; cursor: pointer;",3,"click",4,"ngIf"],[1,"text-bifeldy"],[1,"col-12"],["class","col-12 col-md-6 py-1 bg-bifeldy",4,"ngIf"],[1,"col","py-1","bg-bifeldy"],[1,"row","align-items-center","h-100"],[1,"col-12","mx-auto","text-center"],["mat-stroked-button","","color","accent","class","mx-1",3,"click",4,"ngIf"],["mat-flat-button","","color","accent","class","mx-1 shiny",3,"click",4,"ngIf"],["mat-stroked-button","","color","accent","class","mx-1 shiny",3,"click",4,"ngIf"],["mat-flat-button","","color","accent","class","mx-1",3,"click",4,"ngIf"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"col-12","col-md-6","py-1","bg-bifeldy"],["baseChart","",3,"data","labels","chartType","options","plugins","legend"],["mat-stroked-button","","color","accent",1,"mx-1",3,"click"],[1,"me-1"],["mat-flat-button","","color","accent",1,"mx-1","shiny",3,"click"],["mat-stroked-button","","color","accent",1,"mx-1","shiny",3,"click"],["mat-flat-button","","color","accent",1,"mx-1",3,"click"]],template:function(k,M){1&k&&(C.TgZ(0,"div",0)(1,"div",1)(2,"h2",2),C.YNc(3,Pa,2,1,"span",3),C.TgZ(4,"b",4),C._uU(5,"Data Statistik"),C.qZA()()(),C.TgZ(6,"div",5)(7,"div",0),C.YNc(8,Oa,2,6,"div",6),C.YNc(9,Ia,2,6,"div",6),C.YNc(10,Fa,2,6,"div",6),C.TgZ(11,"div",7)(12,"div",8)(13,"div",9)(14,"h2"),C._uU(15,"Penilaian Saya"),C.qZA(),C.YNc(16,La,4,0,"button",10),C.YNc(17,at,4,1,"button",11),C.YNc(18,Bt,4,1,"button",12),C.YNc(19,Pr,4,0,"button",10),C.YNc(20,Or,4,0,"button",13),C.qZA()()()()()()),2&k&&(C.xp6(3),C.Q6J("ngIf",null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value),C.xp6(5),C.Q6J("ngIf",M.SHOWALLSTATSVERIFIEDONLY&&M.doughnutChartKetertarikanData.length>0&&M.doughnutChartKetertarikanLabels.length>0),C.xp6(1),C.Q6J("ngIf",M.SHOWALLSTATSVERIFIEDONLY&&M.barChartUniqueData.length>0&&M.barChartUniqueLabels.length>0),C.xp6(1),C.Q6J("ngIf",M.lineChartVisitorData.length>0&&M.lineChartVisitorLabels.length>0),C.xp6(6),C.Q6J("ngIf",!(null!=M.AS.currentUserSubject&&M.AS.currentUserSubject.value)),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)===M.LIKE),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)!==M.LIKE),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)!==M.DISLIKE),C.xp6(1),C.Q6J("ngIf",(null==M.AS.currentUserSubject?null:M.AS.currentUserSubject.value)&&(null==M.myReport?null:M.myReport.type)===M.DISLIKE))},directives:[Ta.O5,V.jh,Aa.lW,Da.Hw],styles:[""]}),E})()},4167:(ka,ar,X)=>{"use strict";X.d(ar,{b:()=>G});var V=X(9808),Fe=X(9215),C=X(210),Se=X(5e3);let G=(()=>{class Le{}return Le.\u0275fac=function(rt){return new(rt||Le)},Le.\u0275mod=Se.oAB({type:Le}),Le.\u0275inj=Se.cJS({imports:[[V.ez,Fe.m9,C.m]]}),Le})()},8332:function(ka,ar,X){ka.exports=function(V){"use strict";V=V&&V.hasOwnProperty("default")?V.default:V;var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},G=function Fe(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){var t={};for(var r in Se)Se.hasOwnProperty(r)&&(t[Se[r]]=r);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in a)if(a.hasOwnProperty(n)){if(!("channels"in a[n]))throw new Error("missing channels property: "+n);if(!("labels"in a[n]))throw new Error("missing channel labels property: "+n);if(a[n].labels.length!==a[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=a[n].channels,o=a[n].labels;delete a[n].channels,delete a[n].labels,Object.defineProperty(a[n],"channels",{value:i}),Object.defineProperty(a[n],"labels",{value:o})}function l(s,u){return Math.pow(s[0]-u[0],2)+Math.pow(s[1]-u[1],2)+Math.pow(s[2]-u[2],2)}a.rgb.hsl=function(s){var y,w,u=s[0]/255,d=s[1]/255,f=s[2]/255,v=Math.min(u,d,f),p=Math.max(u,d,f),m=p-v;return p===v?y=0:u===p?y=(d-f)/m:d===p?y=2+(f-u)/m:f===p&&(y=4+(u-d)/m),(y=Math.min(60*y,360))<0&&(y+=360),w=(v+p)/2,[y,100*(p===v?0:w<=.5?m/(p+v):m/(2-p-v)),100*w]},a.rgb.hsv=function(s){var u,d,f,v,p,m=s[0]/255,y=s[1]/255,_=s[2]/255,w=Math.max(m,y,_),T=w-Math.min(m,y,_),A=function(R){return(w-R)/6/T+.5};return 0===T?v=p=0:(p=T/w,u=A(m),d=A(y),f=A(_),m===w?v=f-d:y===w?v=1/3+u-f:_===w&&(v=2/3+d-u),v<0?v+=1:v>1&&(v-=1)),[360*v,100*p,100*w]},a.rgb.hwb=function(s){var u=s[0],d=s[1],f=s[2];return[a.rgb.hsl(s)[0],1/255*Math.min(u,Math.min(d,f))*100,100*(f=1-1/255*Math.max(u,Math.max(d,f)))]},a.rgb.cmyk=function(s){var y,u=s[0]/255,d=s[1]/255,f=s[2]/255;return[100*((1-u-(y=Math.min(1-u,1-d,1-f)))/(1-y)||0),100*((1-d-y)/(1-y)||0),100*((1-f-y)/(1-y)||0),100*y]},a.rgb.keyword=function(s){var u=t[s];if(u)return u;var f,d=1/0;for(var v in Se)if(Se.hasOwnProperty(v)){var m=l(s,Se[v]);m.04045?Math.pow((u+.055)/1.055,2.4):u/12.92)+.3576*(d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92)+.1805*(f=f>.04045?Math.pow((f+.055)/1.055,2.4):f/12.92)),100*(.2126*u+.7152*d+.0722*f),100*(.0193*u+.1192*d+.9505*f)]},a.rgb.lab=function(s){var u=a.rgb.xyz(s),d=u[0],f=u[1],v=u[2];return f/=100,v/=108.883,d=(d/=95.047)>.008856?Math.pow(d,1/3):7.787*d+16/116,[116*(f=f>.008856?Math.pow(f,1/3):7.787*f+16/116)-16,500*(d-f),200*(f-(v=v>.008856?Math.pow(v,1/3):7.787*v+16/116))]},a.hsl.rgb=function(s){var v,p,m,y,_,u=s[0]/360,d=s[1]/100,f=s[2]/100;if(0===d)return[_=255*f,_,_];v=2*f-(p=f<.5?f*(1+d):f+d-f*d),y=[0,0,0];for(var w=0;w<3;w++)(m=u+1/3*-(w-1))<0&&m++,m>1&&m--,y[w]=255*(_=6*m<1?v+6*(p-v)*m:2*m<1?p:3*m<2?v+(p-v)*(2/3-m)*6:v);return y},a.hsl.hsv=function(s){var u=s[0],d=s[1]/100,f=s[2]/100,v=d,p=Math.max(f,.01);return d*=(f*=2)<=1?f:2-f,v*=p<=1?p:2-p,[u,100*(0===f?2*v/(p+v):2*d/(f+d)),(f+d)/2*100]},a.hsv.rgb=function(s){var u=s[0]/60,d=s[1]/100,f=s[2]/100,v=Math.floor(u)%6,p=u-Math.floor(u),m=255*f*(1-d),y=255*f*(1-d*p),_=255*f*(1-d*(1-p));switch(f*=255,v){case 0:return[f,_,m];case 1:return[y,f,m];case 2:return[m,f,_];case 3:return[m,y,f];case 4:return[_,m,f];case 5:return[f,m,y]}},a.hsv.hsl=function(s){var p,m,y,u=s[0],d=s[1]/100,f=s[2]/100,v=Math.max(f,.01);return y=(2-d)*f,m=d*v,[u,100*(m=(m/=(p=(2-d)*v)<=1?p:2-p)||0),100*(y/=2)]},a.hwb.rgb=function(s){var p,m,y,_,w,T,A,u=s[0]/360,d=s[1]/100,f=s[2]/100,v=d+f;switch(v>1&&(d/=v,f/=v),y=6*u-(p=Math.floor(6*u)),0!=(1&p)&&(y=1-y),_=d+y*((m=1-f)-d),p){default:case 6:case 0:w=m,T=_,A=d;break;case 1:w=_,T=m,A=d;break;case 2:w=d,T=m,A=_;break;case 3:w=d,T=_,A=m;break;case 4:w=_,T=d,A=m;break;case 5:w=m,T=d,A=_}return[255*w,255*T,255*A]},a.cmyk.rgb=function(s){var d=s[1]/100,f=s[2]/100,v=s[3]/100;return[255*(1-Math.min(1,s[0]/100*(1-v)+v)),255*(1-Math.min(1,d*(1-v)+v)),255*(1-Math.min(1,f*(1-v)+v))]},a.xyz.rgb=function(s){var v,p,m,u=s[0]/100,d=s[1]/100,f=s[2]/100;return p=-.9689*u+1.8758*d+.0415*f,m=.0557*u+-.204*d+1.057*f,v=(v=3.2406*u+-1.5372*d+-.4986*f)>.0031308?1.055*Math.pow(v,1/2.4)-.055:12.92*v,p=p>.0031308?1.055*Math.pow(p,1/2.4)-.055:12.92*p,m=m>.0031308?1.055*Math.pow(m,1/2.4)-.055:12.92*m,[255*(v=Math.min(Math.max(0,v),1)),255*(p=Math.min(Math.max(0,p),1)),255*(m=Math.min(Math.max(0,m),1))]},a.xyz.lab=function(s){var u=s[0],d=s[1],f=s[2];return d/=100,f/=108.883,u=(u/=95.047)>.008856?Math.pow(u,1/3):7.787*u+16/116,[116*(d=d>.008856?Math.pow(d,1/3):7.787*d+16/116)-16,500*(u-d),200*(d-(f=f>.008856?Math.pow(f,1/3):7.787*f+16/116))]},a.lab.xyz=function(s){var v,p,m;v=s[1]/500+(p=(s[0]+16)/116),m=p-s[2]/200;var y=Math.pow(p,3),_=Math.pow(v,3),w=Math.pow(m,3);return p=y>.008856?y:(p-16/116)/7.787,v=_>.008856?_:(v-16/116)/7.787,m=w>.008856?w:(m-16/116)/7.787,[v*=95.047,p*=100,m*=108.883]},a.lab.lch=function(s){var p,u=s[0],d=s[1],f=s[2];return(p=360*Math.atan2(f,d)/2/Math.PI)<0&&(p+=360),[u,Math.sqrt(d*d+f*f),p]},a.lch.lab=function(s){var m,d=s[1];return m=s[2]/360*2*Math.PI,[s[0],d*Math.cos(m),d*Math.sin(m)]},a.rgb.ansi16=function(s){var u=s[0],d=s[1],f=s[2],v=1 in arguments?arguments[1]:a.rgb.hsv(s)[2];if(0===(v=Math.round(v/50)))return 30;var p=30+(Math.round(f/255)<<2|Math.round(d/255)<<1|Math.round(u/255));return 2===v&&(p+=60),p},a.hsv.ansi16=function(s){return a.rgb.ansi16(a.hsv.rgb(s),s[2])},a.rgb.ansi256=function(s){var u=s[0],d=s[1],f=s[2];return u===d&&d===f?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(d/255*5)+Math.round(f/255*5)},a.ansi16.rgb=function(s){var u=s%10;if(0===u||7===u)return s>50&&(u+=3.5),[u=u/10.5*255,u,u];var d=.5*(1+~~(s>50));return[(1&u)*d*255,(u>>1&1)*d*255,(u>>2&1)*d*255]},a.ansi256.rgb=function(s){if(s>=232){var u=10*(s-232)+8;return[u,u,u]}var d;return s-=16,[Math.floor(s/36)/5*255,Math.floor((d=s%36)/6)/5*255,d%6/5*255]},a.rgb.hex=function(s){var d=(((255&Math.round(s[0]))<<16)+((255&Math.round(s[1]))<<8)+(255&Math.round(s[2]))).toString(16).toUpperCase();return"000000".substring(d.length)+d},a.hex.rgb=function(s){var u=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!u)return[0,0,0];var d=u[0];3===u[0].length&&(d=d.split("").map(function(y){return y+y}).join(""));var f=parseInt(d,16);return[f>>16&255,f>>8&255,255&f]},a.rgb.hcg=function(s){var _,u=s[0]/255,d=s[1]/255,f=s[2]/255,v=Math.max(Math.max(u,d),f),p=Math.min(Math.min(u,d),f),m=v-p;return _=m<=0?0:v===u?(d-f)/m%6:v===d?2+(f-u)/m:4+(u-d)/m+4,_/=6,[360*(_%=1),100*m,100*(m<1?p/(1-m):0)]},a.hsl.hcg=function(s){var f,u=s[1]/100,d=s[2]/100,v=0;return(f=d<.5?2*u*d:2*u*(1-d))<1&&(v=(d-.5*f)/(1-f)),[s[0],100*f,100*v]},a.hsv.hcg=function(s){var d=s[2]/100,f=s[1]/100*d,v=0;return f<1&&(v=(d-f)/(1-f)),[s[0],100*f,100*v]},a.hcg.rgb=function(s){var d=s[1]/100,f=s[2]/100;if(0===d)return[255*f,255*f,255*f];var _,v=[0,0,0],p=s[0]/360%1*6,m=p%1,y=1-m;switch(Math.floor(p)){case 0:v[0]=1,v[1]=m,v[2]=0;break;case 1:v[0]=y,v[1]=1,v[2]=0;break;case 2:v[0]=0,v[1]=1,v[2]=m;break;case 3:v[0]=0,v[1]=y,v[2]=1;break;case 4:v[0]=m,v[1]=0,v[2]=1;break;default:v[0]=1,v[1]=0,v[2]=y}return[255*(d*v[0]+(_=(1-d)*f)),255*(d*v[1]+_),255*(d*v[2]+_)]},a.hcg.hsv=function(s){var u=s[1]/100,f=u+s[2]/100*(1-u),v=0;return f>0&&(v=u/f),[s[0],100*v,100*f]},a.hcg.hsl=function(s){var u=s[1]/100,f=s[2]/100*(1-u)+.5*u,v=0;return f>0&&f<.5?v=u/(2*f):f>=.5&&f<1&&(v=u/(2*(1-f))),[s[0],100*v,100*f]},a.hcg.hwb=function(s){var u=s[1]/100,f=u+s[2]/100*(1-u);return[s[0],100*(f-u),100*(1-f)]},a.hwb.hcg=function(s){var f=1-s[2]/100,v=f-s[1]/100,p=0;return v<1&&(p=(f-v)/(1-v)),[s[0],100*v,100*p]},a.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},a.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},a.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},a.gray.hsl=a.gray.hsv=function(s){return[0,0,s[0]]},a.gray.hwb=function(s){return[0,100,s[0]]},a.gray.cmyk=function(s){return[0,0,0,s[0]]},a.gray.lab=function(s){return[s[0],0,0]},a.gray.hex=function(s){var u=255&Math.round(s[0]/100*255),f=((u<<16)+(u<<8)+u).toString(16).toUpperCase();return"000000".substring(f.length)+f},a.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]}});function Or(e){var t=function Pr(){for(var e={},t=Object.keys(G),r=t.length,a=0;a1&&(r=Array.prototype.slice.call(arguments));var a=e(r);if("object"==typeof a)for(var n=a.length,i=0;i1&&(r=Array.prototype.slice.call(arguments)),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})});var ir=k,Et={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Re={getRgba:Me,getHsla:Fr,getRgb:function Ra(e){var t=Me(e);return t&&t.slice(0,3)},getHsl:function Gn(e){var t=Fr(e);return t&&t.slice(0,3)},getHwb:it,getAlpha:function Zn(e){var t=Me(e);return t||(t=Fr(e))||(t=it(e))?t[3]:void 0},hexString:function Nt(e,r){return r=void 0!==r&&3===e.length?r:e[3],"#"+or(e[0])+or(e[1])+or(e[2])+(r>=0&&r<1?or(Math.round(255*r)):"")},rgbString:function Jn(e,t){return t<1||e[3]&&e[3]<1?Ba(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:Ba,percentString:function Xn(e,t){return t<1||e[3]&&e[3]<1?Ea(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"},percentaString:Ea,hslString:function Qn(e,t){return t<1||e[3]&&e[3]<1?Na(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:Na,hwbString:function ei(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function ti(e){return pt[e.slice(0,3)]}};function Me(e){if(e){var o=[0,0,0],l=1,s=e.match(/^#([a-fA-F0-9]{3,4})$/i),u="";if(s){u=(s=s[1])[3];for(var d=0;dr?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,r=(t[0]+e)%360;return t[0]=r<0?360+r:r,this.setValues("hsl",t),this},mix:function(e,t){var r=this,a=e,n=void 0===t?.5:t,i=2*n-1,o=r.alpha()-a.alpha(),l=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-l;return this.rgb(l*r.red()+s*a.red(),l*r.green()+s*a.green(),l*r.blue()+s*a.blue()).alpha(r.alpha()*n+a.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var a,n,e=new le,t=this.values,r=e.values;for(var i in t)t.hasOwnProperty(i)&&("[object Array]"===(n={}.toString.call(a=t[i]))?r[i]=a.slice(0):"[object Number]"===n?r[i]=a:console.error("unexpected color value:",a));return e}},le.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},le.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},le.prototype.getValues=function(e){for(var t=this.values,r={},a=0;a=0;n--)t.call(r,e[n],n);else for(n=0;n=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:1===e?1:(r||(r=.3),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r))},easeOutElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:1===e?1:(r||(r=.3),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},easeInOutElastic:function(e){var t=1.70158,r=0,a=1;return 0===e?0:2==(e/=.5)?1:(r||(r=.45),a<1?(a=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/a),e<1?a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:a*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-zt.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*zt.easeInBounce(2*e):.5*zt.easeOutBounce(2*e-1)+.5}},Wa={effects:zt};Te.easingEffects=zt;var me=Math.PI,Lr=me/180,Ha=2*me,Ae=me/2,jt=me/4,Va=2*me/3,lr={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,r,a,n,i){if(i){var o=Math.min(i,n/2,a/2),l=t+o,s=r+o,u=t+a-o,d=r+n-o;e.moveTo(t,s),lt.left-r&&e.xt.top-r&&e.y0&&e.requestAnimationFrame()},advance:function(){for(var t,r,a,n,e=this.animations,i=0;i=a?(h.callback(t.onAnimationComplete,[t],r),r.animating=!1,e.splice(i,1)):++i}},mt=h.options.resolve,qa=["push","pop","shift","splice","unshift"];function Ka(e,t){var r=e._chartjs;if(r){var a=r.listeners,n=a.indexOf(t);-1!==n&&a.splice(n,1),!(a.length>0)&&(qa.forEach(function(i){delete e[i]}),delete e._chartjs)}}var zr=function(e,t){this.initialize(e,t)};h.extend(zr.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var r=this;r.chart=e,r.index=t,r.linkScales(),r.addElements(),r._type=r.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),r=e.chart,a=r.scales,n=e.getDataset(),i=r.options.scales;(null===t.xAxisID||!(t.xAxisID in a)||n.xAxisID)&&(t.xAxisID=n.xAxisID||i.xAxes[0].id),(null===t.yAxisID||!(t.yAxisID in a)||n.yAxisID)&&(t.yAxisID=n.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Ka(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,r=t.dataElementType;return r&&new r({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var n,i,e=this,t=e.getMeta(),r=e.getDataset().data||[],a=t.data;for(n=0,i=r.length;na&&e.insertElements(a,n-a)},insertElements:function(e,t){for(var r=0;rn?e.arc(o,l,t.innerRadius-n,a+(i=n/t.innerRadius),r-i,!0):e.arc(o,l,n,a+Math.PI/2,r-Math.PI/2),e.closePath(),e.clip()}function bt(e,t,r){var a="inner"===t.borderAlign;a?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),r.fullCircles&&function mi(e,t,r,a){var i,n=r.endAngle;for(a&&(r.endAngle=r.startAngle+ze,Ya(e,r),r.endAngle=n,r.endAngle===r.startAngle&&r.fullCircles&&(r.endAngle+=ze,r.fullCircles--)),e.beginPath(),e.arc(r.x,r.y,r.innerRadius,r.startAngle+ze,r.startAngle,!0),i=0;il;)n-=ze;for(;n=o&&n<=l&&i>=r.innerRadius&&i<=r.outerRadius}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,r=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,r=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},draw:function(){var n,e=this._chart.ctx,t=this._view,r="inner"===t.borderAlign?.33:0,a={x:t.x,y:t.y,innerRadius:t.innerRadius,outerRadius:Math.max(t.outerRadius-r,0),pixelMargin:r,startAngle:t.startAngle,endAngle:t.endAngle,fullCircles:Math.floor(t.circumference/ze)};if(e.save(),e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+ze,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),n=0;ne.x&&(t=en(t,"left","right")):e.baser?r:i,r:n.right||o<0?0:o>t?t:o,b:n.bottom||l<0?0:l>r?r:l,l:n.left||s<0?0:s>t?t:s}}function Ut(e,t,r){var a=null===t,n=null===r,i=!(!e||a&&n)&&Qa(e);return i&&(a||t>=i.left&&t<=i.right)&&(n||r>=i.top&&r<=i.bottom)}P._set("global",{elements:{rectangle:{backgroundColor:Xa,borderColor:Xa,borderSkipped:"bottom",borderWidth:0}}});var ki=Ne.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,r=function yt(e){var t=Qa(e),r=t.right-t.left,a=t.bottom-t.top,n=wi(e,r/2,a/2);return{outer:{x:t.left,y:t.top,w:r,h:a},inner:{x:t.left+n.l,y:t.top+n.t,w:r-n.l-n.r,h:a-n.t-n.b}}}(t),a=r.outer,n=r.inner;e.fillStyle=t.backgroundColor,e.fillRect(a.x,a.y,a.w,a.h),(a.w!==n.w||a.h!==n.h)&&(e.save(),e.beginPath(),e.rect(a.x,a.y,a.w,a.h),e.clip(),e.fillStyle=t.borderColor,e.rect(n.x,n.y,n.w,n.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return Ut(this._view,e,t)},inLabelRange:function(e,t){var r=this._view;return dr(r)?Ut(r,e,null):Ut(r,null,t)},inXRange:function(e){return Ut(this._view,e,null)},inYRange:function(e){return Ut(this._view,null,e)},getCenterPoint:function(){var t,r,e=this._view;return dr(e)?(t=e.x,r=(e.y+e.base)/2):(t=(e.x+e.base)/2,r=e.y),{x:t,y:r}},getArea:function(){var e=this._view;return dr(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),be={},_t=bi,Mi=xi,Ti=ki;be.Arc=$a,be.Line=_t,be.Point=Mi,be.Rectangle=Ti;var qt=h._deprecated,xt=h.valueOrDefault;function Ai(e,t,r){var l,s,a=r.barThickness,n=t.stackCount,i=t.pixels[e],o=h.isNullOrUndef(a)?function tn(e,t){var a,n,i,o,r=e._length;for(i=1,o=t.length;i0?Math.min(r,Math.abs(n-a)):r,a=n;return r}(t.scale,t.pixels):-1;return h.isNullOrUndef(a)?(l=o*r.categoryPercentage,s=r.barPercentage):(l=a*n,s=1),{chunk:l/n,ratio:s,start:i-l/2}}P._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),P._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var an=De.extend({dataElementType:be.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,r,e=this;De.prototype.initialize.apply(e,arguments),(t=e.getMeta()).stack=e.getDataset().stack,t.bar=!0,r=e._getIndexScale().options,qt("bar chart",r.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),qt("bar chart",r.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),qt("bar chart",r.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),qt("bar chart",e._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),qt("bar chart",r.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var a,n,t=this,r=t.getMeta().data;for(t._ruler=t.getRuler(),a=0,n=r.length;a=0&&u.min>=0?u.min:u.max,m=void 0===u.start?u.end:u.max>=0&&u.min>=0?u.max-u.min:u.min-u.max,y=s.length;if(f||void 0===f&&void 0!==v)for(_=0;_=0&&U.max>=0?U.max:U.min,(u.min<0&&T<0||u.max>=0&&T>0)&&(p+=T));return A=i.getPixelForValue(p),L=(R=i.getPixelForValue(p+m))-A,void 0!==d&&Math.abs(L)=0&&!o||m<0&&o?A-d:A+d),{size:L,base:A,head:R,center:R+L/2}},calculateBarIndexPixels:function(e,t,r,a){var i="flex"===a.barThickness?function rn(e,t,r){var s,a=t.pixels,n=a[e],i=e>0?a[e-1]:null,o=e=je?-Ve:T<-je?Ve:0)+v,R=Math.cos(T),L=Math.sin(T),U=Math.cos(A),W=Math.sin(A),K=T<=0&&A>=0||A>=Ve,I=T<=ot&&A>=ot||A>=Ve+ot,ne=T<=-ot&&A>=-ot||A>=je+ot,ae=T===-je||A>=je?-1:Math.min(R,R*f,U,U*f),ue=ne?-1:Math.min(L,L*f,W,W*f),Ot=K?1:Math.max(R,R*f,U,U*f),It=I?1:Math.max(L,L*f,W,W*f);i=(Ot-ae)/2,o=(It-ue)/2,l=-(Ot+ae)/2,s=-(It+ue)/2}for(_=0,w=d.length;_0&&!isNaN(e)?Ve*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var n,i,o,l,s,u,d,f,r=0,a=this.chart;if(!e)for(n=0,i=a.data.datasets.length;n(r=(d=u.borderWidth)>r?d:r)?f:r);return r},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=fr(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=fr(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=fr(r.hoverBorderWidth,r.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,r=0;r0&&cr(i[o-1]._model,n)&&(s.controlPointPreviousX=d(s.controlPointPreviousX,n.left,n.right),s.controlPointPreviousY=d(s.controlPointPreviousY,n.top,n.bottom)),o0&&(i=e.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(e,t){return Kr(e,t,{intersect:!1})},point:function(e,t){return Ur(e,lt(t,e))},nearest:function(e,t,r){var a=lt(t,e);r.axis=r.axis||"xy";var n=hr(r.axis);return qr(e,a,r.intersect,n)},x:function(e,t,r){var a=lt(t,e),n=[],i=!1;return Ct(e,function(o){o.inXRange(a.x)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n},y:function(e,t,r){var a=lt(t,e),n=[],i=!1;return Ct(e,function(o){o.inYRange(a.y)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n}}},Yr=h.extend;function Yt(e,t){return h.where(e,function(r){return r.pos===t})}function vr(e,t){return e.sort(function(r,a){var n=t?a:r,i=t?r:a;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function dn(e,t,r,a){return Math.max(e[r],t[r])+Math.max(e[a],t[a])}function Ni(e,t,r){var i,o,a=r.box,n=e.maxPadding;if(r.size&&(e[r.pos]-=r.size),r.size=r.horizontal?a.height:a.width,e[r.pos]+=r.size,a.getPadding){var l=a.getPadding();n.top=Math.max(n.top,l.top),n.left=Math.max(n.left,l.left),n.bottom=Math.max(n.bottom,l.bottom),n.right=Math.max(n.right,l.right)}if(i=t.outerWidth-dn(n,e,"left","right"),o=t.outerHeight-dn(n,e,"top","bottom"),i!==e.w||o!==e.h){e.w=i,e.h=o;var s=r.horizontal?[i,e.w]:[o,e.h];return!(s[0]===s[1]||isNaN(s[0])&&isNaN(s[1]))}}function ji(e,t){var r=t.maxPadding;return function a(n){var i={left:0,top:0,right:0,bottom:0};return n.forEach(function(o){i[o]=Math.max(t[o],r[o])}),i}(e?["left","right"]:["top","bottom"])}function gr(e,t,r){var n,i,o,l,s,u,a=[];for(n=0,i=e.length;n div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"})),ce="$chartjs",$r="chartjs-",Gr=$r+"size-monitor",cn=$r+"render-monitor",hn=["animationstart","webkitAnimationStart"],Ki={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function vn(e,t){var r=h.getStyle(e,t),a=r&&r.match(/^(\d+)(\.\d+)?px$/);return a?Number(a[1]):void 0}var gn=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(r){}return e}()&&{passive:!0};function $t(e,t,r){e.addEventListener(t,r,gn)}function Y(e,t,r){e.removeEventListener(t,r,gn)}function Zr(e,t,r,a,n){return{type:e,chart:t,native:n||null,x:void 0!==r?r:null,y:void 0!==a?a:null}}function ut(e){var t=document.createElement("div");return t.className=e||"",t}function Jr(e,t,r){var a=e[ce]||(e[ce]={}),n=a.resizer=function pn(e){var t=1e6,r=ut(Gr),a=ut(Gr+"-expand"),n=ut(Gr+"-shrink");a.appendChild(ut()),n.appendChild(ut()),r.appendChild(a),r.appendChild(n),r._reset=function(){a.scrollLeft=t,a.scrollTop=t,n.scrollLeft=t,n.scrollTop=t};var i=function(){r._reset(),e()};return $t(a,"scroll",i.bind(a,"expand")),$t(n,"scroll",i.bind(n,"shrink")),r}(function Zi(e,t){var r=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),t=t||this,r||(r=!0,h.requestAnimFrame.call(window,function(){r=!1,e.apply(t,a)}))}}(function(){if(a.resizer){var i=r.options.maintainAspectRatio&&e.parentNode,o=i?i.clientWidth:0;t(Zr("resize",r)),i&&i.clientWidth0){var i=e[0];i.label?r=i.label:i.xLabel?r=i.xLabel:n>0&&i.index-1?e.split("\n"):e}function eo(e){var t=e._xScale,r=e._yScale||e._scale,a=e._index,n=e._datasetIndex,i=e._chart.getDatasetMeta(n).controller,o=i._getIndexScale(),l=i._getValueScale();return{xLabel:t?t.getLabelForIndex(a,n):"",yLabel:r?r.getLabelForIndex(a,n):"",label:o?""+o.getLabelForIndex(a,n):"",value:l?""+l.getLabelForIndex(a,n):"",index:a,datasetIndex:n,x:e._model.x,y:e._model.y}}function Qr(e){var t=P.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:qe(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:qe(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:qe(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:qe(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:qe(e.titleFontStyle,t.defaultFontStyle),titleFontSize:qe(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:qe(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:qe(e.footerFontStyle,t.defaultFontStyle),footerFontSize:qe(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function mr(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function bn(e){return We([],Ee(e))}var no=Ne.extend({initialize:function(){this._model=Qr(this._options),this._lastActive=[]},getTitle:function(){var e=this,r=e._options.callbacks,a=r.beforeTitle.apply(e,arguments),n=r.title.apply(e,arguments),i=r.afterTitle.apply(e,arguments),o=[];return o=We(o,Ee(a)),o=We(o,Ee(n)),We(o,Ee(i))},getBeforeBody:function(){return bn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var r=this,a=r._options.callbacks,n=[];return h.each(e,function(i){var o={before:[],lines:[],after:[]};We(o.before,Ee(a.beforeLabel.call(r,i,t))),We(o.lines,a.label.call(r,i,t)),We(o.after,Ee(a.afterLabel.call(r,i,t))),n.push(o)}),n},getAfterBody:function(){return bn(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,r=t.beforeFooter.apply(e,arguments),a=t.footer.apply(e,arguments),n=t.afterFooter.apply(e,arguments),i=[];return i=We(i,Ee(r)),i=We(i,Ee(a)),We(i,Ee(n))},update:function(e){var f,v,t=this,r=t._options,a=t._model,n=t._model=Qr(r),i=t._active,o=t._data,l={xAlign:a.xAlign,yAlign:a.yAlign},s={x:a.x,y:a.y},u={width:a.width,height:a.height},d={x:a.caretX,y:a.caretY};if(i.length){n.opacity=1;var p=[],m=[];d=mn[r.position].call(t,i,t._eventPosition);var y=[];for(f=0,v=i.length;fa.width&&(n=a.width-t.width),n<0&&(n=0)),"top"===d?i+=f:i-="bottom"===d?t.height+f:t.height/2,"center"===d?"left"===u?n+=f:"right"===u&&(n-=f):"left"===u?n-=v:"right"===u&&(n+=v),{x:n,y:i}}(n,u=function to(e,t){var r=e._chart.ctx,a=2*t.yPadding,n=0,i=t.body,o=i.reduce(function(m,y){return m+y.before.length+y.lines.length+y.after.length},0),l=t.title.length,s=t.footer.length,u=t.titleFontSize,d=t.bodyFontSize,f=t.footerFontSize;a+=l*u,a+=l?(l-1)*t.titleSpacing:0,a+=l?t.titleMarginBottom:0,a+=(o+=t.beforeBody.length+t.afterBody.length)*d,a+=o?(o-1)*t.bodySpacing:0,a+=s?t.footerMarginTop:0,a+=s*f,a+=s?(s-1)*t.footerSpacing:0;var v=0,p=function(m){n=Math.max(n,r.measureText(m).width+v)};return r.font=h.fontString(u,t._titleFontStyle,t._titleFontFamily),h.each(t.title,p),r.font=h.fontString(d,t._bodyFontStyle,t._bodyFontFamily),h.each(t.beforeBody.concat(t.afterBody),p),v=t.displayColors?d+2:0,h.each(i,function(m){h.each(m.before,p),h.each(m.lines,p),h.each(m.after,p)}),v=0,r.font=h.fontString(f,t._footerFontStyle,t._footerFontFamily),h.each(t.footer,p),{width:n+=2*t.xPadding,height:a}}(this,n),l=function ro(e,t){var r=e._model,a=e._chart,n=e._chart.chartArea,i="center",o="center";r.ya.height-t.height&&(o="bottom");var l,s,u,d,f,v=(n.left+n.right)/2,p=(n.top+n.bottom)/2;"center"===o?(l=function(y){return y<=v},s=function(y){return y>v}):(l=function(y){return y<=t.width/2},s=function(y){return y>=a.width-t.width/2}),u=function(y){return y+t.width+r.caretSize+r.caretPadding>a.width},d=function(y){return y-t.width-r.caretSize-r.caretPadding<0},f=function(y){return y<=p?"top":"bottom"},l(r.x)?(i="left",u(r.x)&&(i="center",o=f(r.y))):s(r.x)&&(i="right",d(r.x)&&(i="center",o=f(r.y)));var m=e._options;return{xAlign:m.xAlign?m.xAlign:i,yAlign:m.yAlign?m.yAlign:o}}(this,u),t._chart)}else n.opacity=0;return n.xAlign=l.xAlign,n.yAlign=l.yAlign,n.x=s.x,n.y=s.y,n.width=u.width,n.height=u.height,n.caretX=d.x,n.caretY=d.y,t._model=n,e&&r.custom&&r.custom.call(t,n),t},drawCaret:function(e,t){var r=this._chart.ctx,n=this.getCaretPosition(e,t,this._view);r.lineTo(n.x1,n.y1),r.lineTo(n.x2,n.y2),r.lineTo(n.x3,n.y3)},getCaretPosition:function(e,t,r){var a,n,i,o,l,s,u=r.caretSize,d=r.cornerRadius,f=r.xAlign,v=r.yAlign,p=e.x,m=e.y,y=t.width,_=t.height;if("center"===v)l=m+_/2,"left"===f?(n=(a=p)-u,i=a,o=l+u,s=l-u):(n=(a=p+y)+u,i=a,o=l-u,s=l+u);else if("left"===f?(a=(n=p+d+u)-u,i=n+u):"right"===f?(a=(n=p+y-d-u)-u,i=n+u):(a=(n=r.caretX)-u,i=n+u),"top"===v)l=(o=m)-u,s=o;else{l=(o=m+_)+u,s=o;var w=i;i=a,a=w}return{x1:a,x2:n,x3:i,y1:o,y2:l,y3:s}},drawTitle:function(e,t,r){var i,o,l,a=t.title,n=a.length;if(n){var s=pr(t.rtl,t.x,t.width);for(e.x=mr(t,t._titleAlign),r.textAlign=s.textAlign(t._titleAlign),r.textBaseline="middle",i=t.titleFontSize,o=t.titleSpacing,r.fillStyle=t.titleFontColor,r.font=h.fontString(i,t._titleFontStyle,t._titleFontFamily),l=0;l0&&r.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var r={width:t.width,height:t.height},a={x:t.x,y:t.y},n=Math.abs(t.opacity<.001)?0:t.opacity;this._options.enabled&&(t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length)&&(e.save(),e.globalAlpha=n,this.drawBackground(a,t,e,r),a.y+=t.yPadding,h.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),h.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var a,t=this,r=t._options;return t._lastActive=t._lastActive||[],"mouseout"===e.type?t._active=[]:(t._active=t._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&t._active.reverse()),(a=!h.arrayEquals(t._active,t._lastActive))&&(t._lastActive=t._active,(r.enabled||r.custom)&&(t._eventPosition={x:e.x,y:e.y},t.update(!0),t.pivot())),a}}),br=no;br.positioners=mn;var ea=h.valueOrDefault;function yr(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){if("xAxes"===e||"yAxes"===e){var i,o,l,n=r[e].length;for(t[e]||(t[e]=[]),i=0;i=t[e].length&&t[e].push({}),h.merge(t[e][i],!t[e][i].type||l.type&&l.type!==t[e][i].type?[Zt.getScaleDefaults(o),l]:l)}else h._merger(e,t,r,a)}})}function ta(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){var n=t[e]||Object.create(null),i=r[e];"scales"===e?t[e]=yr(n,i):"scale"===e?t[e]=h.merge(n,[Zt.getScaleDefaults(i.type),i]):h._merger(e,t,r,a)}})}function so(e){var t=e.options;h.each(e.scales,function(r){Pe.removeBox(e,r)}),t=ta(P.global,P[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function yn(e,t,r){var a,n=function(i){return i.id===a};do{a=t+r++}while(h.findIndex(e,n)>=0);return a}function _n(e){return"top"===e||"bottom"===e}function xn(e,t){return function(r,a){return r[e]===a[e]?r[t]-a[t]:r[e]-a[e]}}P._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ze=function(e,t){return this.construct(e,t),this};h.extend(Ze.prototype,{construct:function(e,t){var r=this;t=function oo(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=ta(P.global,P[e.type],e.options||{}),e}(t);var a=St.acquireContext(e,t),n=a&&a.canvas,i=n&&n.height,o=n&&n.width;r.id=h.uid(),r.ctx=a,r.canvas=n,r.config=t,r.width=o,r.height=i,r.aspectRatio=i?o/i:null,r.options=t.options,r._bufferedRender=!1,r._layers=[],r.chart=r,r.controller=r,Ze.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(l){r.config.data=l}}),a&&n?(r.initialize(),r.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return $.notify(e,"beforeInit"),h.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),$.notify(e,"afterInit"),e},clear:function(){return h.canvas.clear(this),this},stop:function(){return Nr.cancelAnimation(this),this},resize:function(e){var t=this,r=t.options,a=t.canvas,n=r.maintainAspectRatio&&t.aspectRatio||null,i=Math.max(0,Math.floor(h.getMaximumWidth(a))),o=Math.max(0,Math.floor(n?i/n:h.getMaximumHeight(a)));if((t.width!==i||t.height!==o)&&(a.width=t.width=i,a.height=t.height=o,a.style.width=i+"px",a.style.height=o+"px",h.retinaScale(t,r.devicePixelRatio),!e)){var l={width:i,height:o};$.notify(t,"resize",[l]),r.onResize&&r.onResize(t,l),t.stop(),t.update({duration:r.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},r=e.scale;h.each(t.xAxes,function(a,n){a.id||(a.id=yn(t.xAxes,"x-axis-",n))}),h.each(t.yAxes,function(a,n){a.id||(a.id=yn(t.yAxes,"y-axis-",n))}),r&&(r.id=r.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,r=e.scales||{},a=[],n=Object.keys(r).reduce(function(i,o){return i[o]=!1,i},{});t.scales&&(a=a.concat((t.scales.xAxes||[]).map(function(i){return{options:i,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(i){return{options:i,dtype:"linear",dposition:"left"}}))),t.scale&&a.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(a,function(i){var o=i.options,l=o.id,s=ea(o.type,i.dtype);_n(o.position)!==_n(i.dposition)&&(o.position=i.dposition),n[l]=!0;var u=null;if(l in r&&r[l].type===s)(u=r[l]).options=o,u.ctx=e.ctx,u.chart=e;else{var d=Zt.getScaleConstructor(s);if(!d)return;u=new d({id:l,type:s,options:o,ctx:e.ctx,chart:e}),r[u.id]=u}u.mergeTicksOptions(),i.isDefault&&(e.scale=u)}),h.each(n,function(i,o){i||delete r[o]}),e.scales=r,Zt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var a,n,e=this,t=[],r=e.data.datasets;for(a=0,n=r.length;a=0;--a)t.drawDataset(r[a],e);$.notify(t,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var a={meta:e,index:e.index,easingValue:t};!1!==$.notify(this,"beforeDatasetDraw",[a])&&(e.controller.draw(t),$.notify(this,"afterDatasetDraw",[a]))},_drawTooltip:function(e){var t=this,r=t.tooltip,a={tooltip:r,easingValue:e};!1!==$.notify(t,"beforeTooltipDraw",[a])&&(r.draw(),$.notify(t,"afterTooltipDraw",[a]))},getElementAtEvent:function(e){return wt.modes.single(this,e)},getElementsAtEvent:function(e){return wt.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return wt.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,r){var a=wt.modes[t];return"function"==typeof a?a(this,e,r):[]},getDatasetAtEvent:function(e){return wt.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,r=t.data.datasets[e];r._meta||(r._meta={});var a=r._meta[t.id];return a||(a=r._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r.order||0,index:e}),a},getVisibleDatasetCount:function(){for(var e=0,t=0,r=this.data.datasets.length;t3?r[2]-r[1]:r[1]-r[0];Math.abs(a)>1&&e!==Math.floor(e)&&(a=e-Math.floor(e));var n=h.log10(Math.abs(a)),i="";if(0!==e)if(Math.max(Math.abs(r[0]),Math.abs(r[r.length-1]))<1e-4){var l=h.log10(Math.abs(e)),s=Math.floor(l)-Math.floor(n);s=Math.max(Math.min(s,20),0),i=e.toExponential(s)}else{var u=-1*Math.floor(n);u=Math.max(Math.min(u,20),0),i=e.toFixed(u)}else i="0";return i},logarithmic:function(e,t,r){var a=e/Math.pow(10,Math.floor(h.log10(e)));return 0===e?"0":1===a||2===a||5===a||0===t||t===r.length-1?e.toExponential():""}}},dt=h.isArray,Tt=h.isNullOrUndef,Je=h.valueOrDefault,At=h.valueAtIndexOrDefault;function co(e,t,r){var u,a=e.getTicks().length,n=Math.min(t,a-1),i=e.getPixelForTick(n),o=e._startPixel,l=e._endPixel,s=1e-6;if(!(r&&(u=1===a?Math.max(i-o,l-i):0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(n-1))/2,i+=nl+s)))return i}function vo(e,t,r,a){var d,f,v,p,m,y,_,w,T,A,R,L,U,n=r.length,i=[],o=[],l=[],s=0,u=0;for(d=0;dt){for(i=0;i=i||a<=1||!e.isHorizontal()?e.labelRotation=n:(s=(l=e._getLabelSizes()).widest.width,u=l.highest.height-l.highest.offset,d=Math.min(e.maxWidth,e.chart.width-s),s+6>(f=t.offset?e.maxWidth/a:d/(a-1))&&(f=d/(a-(t.offset?.5:1)),v=e.maxHeight-Jt(t.gridLines)-r.padding-ra(t.scaleLabel),p=Math.sqrt(s*s+u*u),o=h.toDegrees(Math.min(Math.asin(Math.min((l.highest.height+6)/f,1)),Math.asin(Math.min(v/p,1))-Math.asin(u/p))),o=Math.max(n,Math.min(i,o))),e.labelRotation=o)},afterCalculateTickRotation:function(){h.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){h.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},r=e.chart,a=e.options,n=a.ticks,i=a.scaleLabel,o=a.gridLines,l=e._isVisible(),s="bottom"===a.position,u=e.isHorizontal();if(u?t.width=e.maxWidth:l&&(t.width=Jt(o)+ra(i)),u?l&&(t.height=Jt(o)+ra(i)):t.height=e.maxHeight,n.display&&l){var d=na(n),f=e._getLabelSizes(),v=f.first,p=f.last,m=f.widest,y=f.highest,_=.4*d.minor.lineHeight,w=n.padding;if(u){var T=0!==e.labelRotation,A=h.toRadians(e.labelRotation),R=Math.cos(A),L=Math.sin(A);t.height=Math.min(e.maxHeight,t.height+(L*m.width+R*(y.height-(T?y.offset:0))+(T?0:_))+w);var I,te,W=e.getPixelForTick(0)-e.left,K=e.right-e.getPixelForTick(e.getTicks().length-1);T?(I=s?R*v.width+L*v.offset:L*(v.height-v.offset),te=s?L*(p.height-p.offset):R*p.width+L*p.offset):(I=v.width/2,te=p.width/2),e.paddingLeft=Math.max((I-W)*e.width/(e.width-W),0)+3,e.paddingRight=Math.max((te-K)*e.width/(e.width-K),0)+3}else t.width=Math.min(e.maxWidth,t.width+(n.mirror?0:m.width+w+_)),e.paddingTop=v.height/2,e.paddingBottom=p.height/2}e.handleMargins(),u?(e.width=e._length=r.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=r.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){h.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(Tt(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var r,a,n,t=this;for(t.ticks=e.map(function(i){return i.value}),t.beforeTickToLabelConversion(),r=t.convertTicksToLabels(e)||t.ticks,t.afterTickToLabelConversion(),a=0,n=e.length;aa-1?null:t.getPixelForDecimal(e*n+(r?n/2:0))},getPixelForDecimal:function(e){var t=this;return t._reversePixels&&(e=1-e),t._startPixel+e*t._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,r=e.max;return e.beginAtZero?0:t<0&&r<0?r:t>0&&r>0?t:0},_autoSkip:function(e){var u,d,f,v,t=this,r=t.options.ticks,a=t._length,n=r.maxTicksLimit||a/t._tickSize()+1,i=r.major.enabled?function oa(e){var r,a,t=[];for(r=0,a=e.length;rn)return function po(e,t,r){var i,o,a=0,n=t[0];for(r=Math.ceil(r),i=0;ii)return l;return Math.max(i,1)}(i,e,0,n),o>0){for(u=0,d=o-1;u1?(s-l)/(o-1):null)?0:l-v,l),Cr(e,f,s,h.isNullOrUndef(v)?e.length:s+v),ia(e)}return Cr(e,f),ia(e)},_tickSize:function(){var e=this,t=e.options.ticks,r=h.toRadians(e.labelRotation),a=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=e._getLabelSizes(),o=t.autoSkipPadding||0,l=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return e.isHorizontal()?s*a>l*n?l/a:s/n:s*n=0&&(i=l),void 0!==n&&(l=t.indexOf(n))>=0&&(o=l),e.minIndex=i,e.maxIndex=o,e.min=t[i],e.max=t[o]},buildTicks:function(){var e=this,t=e._getLabels(),r=e.minIndex,a=e.maxIndex;e.ticks=0===r&&a===t.length-1?t:t.slice(r,a+1)},getLabelForIndex:function(e,t){var r=this,a=r.chart;return a.getDatasetMeta(t).controller._getValueScaleId()===r.id?r.getRightValue(a.data.datasets[t].data[e]):r._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,r=e.ticks;he.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),r&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(r.length-(t?0:1),1))},getPixelForValue:function(e,t,r){var n,i,o,a=this;return!la(t)&&!la(r)&&(e=a.chart.data.datasets[r].data[t]),la(e)||(n=a.isHorizontal()?e.x:e.y),(void 0!==n||void 0!==e&&isNaN(t))&&(i=a._getLabels(),e=h.valueOrDefault(n,e),t=-1!==(o=i.indexOf(e))?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,r=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(r,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}});kn._defaults={position:"bottom"};var ft=h.isNullOrUndef;var wr=he.extend({getRightValue:function(e){return"string"==typeof e?+e:he.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,r=e.options.ticks;if(r.beginAtZero){var a=h.sign(e.min),n=h.sign(e.max);a<0&&n<0?e.max=0:a>0&&n>0&&(e.min=0)}var i=void 0!==r.min||void 0!==r.suggestedMin,o=void 0!==r.max||void 0!==r.suggestedMax;void 0!==r.min?e.min=r.min:void 0!==r.suggestedMin&&(e.min=null===e.min?r.suggestedMin:Math.min(e.min,r.suggestedMin)),void 0!==r.max?e.max=r.max:void 0!==r.suggestedMax&&(e.max=null===e.max?r.suggestedMax:Math.max(e.max,r.suggestedMax)),i!==o&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,r.beginAtZero||e.min--)},getTickLimit:function(){var n,e=this,t=e.options.ticks,r=t.stepSize,a=t.maxTicksLimit;return r?n=Math.ceil(e.max/r)-Math.floor(e.min/r)+1:(n=e._computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:h.noop,buildTicks:function(){var e=this,r=e.options.ticks,a=e.getTickLimit(),n={maxTicks:a=Math.max(2,a),min:r.min,max:r.max,precision:r.precision,stepSize:h.valueOrDefault(r.fixedStepSize,r.stepSize)},i=e.ticks=function bo(e,t){var p,m,y,_,r=[],n=e.stepSize,i=n||1,o=e.maxTicks-1,l=e.min,s=e.max,u=e.precision,d=t.min,f=t.max,v=h.niceNum((f-d)/o/i)*i;if(v<1e-14&&ft(l)&&ft(s))return[d,f];(_=Math.ceil(f/v)-Math.floor(d/v))>o&&(v=h.niceNum(_*v/o/i)*i),n||ft(u)?p=Math.pow(10,h._decimalPlaces(v)):(p=Math.pow(10,u),v=Math.ceil(v*p)/p),m=Math.floor(d/v)*v,y=Math.ceil(f/v)*v,n&&(!ft(l)&&h.almostWhole(l/v,v/1e3)&&(m=l),!ft(s)&&h.almostWhole(s/v,v/1e3)&&(y=s)),_=h.almostEquals(_=(y-m)/v,Math.round(_),v/1e3)?Math.round(_):Math.ceil(_),m=Math.round(m*p)/p,y=Math.round(y*p)/p,r.push(ft(l)?m:l);for(var w=1;w<_;++w)r.push(Math.round((m+w*v)*p)/p);return r.push(ft(s)?y:s),r}(n,e);e.handleDirectionalChanges(),e.max=h.max(i),e.min=h.min(i),r.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),he.prototype.convertTicksToLabels.call(e)},_configure:function(){var n,e=this,t=e.getTicks(),r=e.min,a=e.max;he.prototype._configure.call(e),e.options.offset&&t.length&&(r-=n=(a-r)/Math.max(t.length-1,1)/2,a+=n),e._startValue=r,e._endValue=a,e._valueRange=a-r}}),Mn={position:"left",ticks:{callback:Mt.formatters.linear}};function Co(e,t,r,a){var d,f,n=e.options,o=function xo(e,t,r){var a=[r.type,void 0===t&&void 0===r.stack?r.index:"",r.stack].join(".");return void 0===e[a]&&(e[a]={pos:[],neg:[]}),e[a]}(t,n.stacked,r),l=o.pos,s=o.neg,u=a.length;for(d=0;dt.length-1?null:this.getPixelForValue(t[e])}});kr._defaults=Mn;var Xt=h.valueOrDefault,ye=h.math.log10;var So={position:"left",ticks:{callback:Mt.formatters.logarithmic}};function Dt(e,t){return h.isFinite(e)&&e>=0?e:t}var da=he.extend({determineDataLimits:function(){var o,l,s,u,d,f,e=this,t=e.options,r=e.chart,a=r.data.datasets,n=e.isHorizontal();function i(_){return n?_.xAxisID===e.id:_.yAxisID===e.id}e.min=Number.POSITIVE_INFINITY,e.max=Number.NEGATIVE_INFINITY,e.minNotZero=Number.POSITIVE_INFINITY;var v=t.stacked;if(void 0===v)for(o=0;o0){var w=h.min(_),T=h.max(_);e.min=Math.min(e.min,w),e.max=Math.max(e.max,T)}})}else for(o=0;o0?e.min:e.max<1?Math.pow(10,Math.floor(ye(e.max))):1)},buildTicks:function(){var e=this,t=e.options.ticks,r=!e.isHorizontal(),a={min:Dt(t.min),max:Dt(t.max)},n=e.ticks=function ua(e,t){var o,l,r=[],a=Xt(e.min,Math.pow(10,Math.floor(ye(t.min)))),n=Math.floor(ye(t.max)),i=Math.ceil(t.max/Math.pow(10,n));0===a?(o=Math.floor(ye(t.minNotZero)),l=Math.floor(t.minNotZero/Math.pow(10,o)),r.push(a),a=l*Math.pow(10,o)):(o=Math.floor(ye(a)),l=Math.floor(a/Math.pow(10,o)));var s=o<0?Math.pow(10,Math.abs(o)):1;do{r.push(a),10==++l&&(l=1,s=++o>=0?1:s),a=Math.round(l*Math.pow(10,o)*s)/s}while(ot.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(ye(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,r=0;he.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),r=Xt(e.options.ticks.fontSize,P.global.defaultFontSize)/e._length),e._startValue=ye(t),e._valueOffset=r,e._valueRange=(ye(e.max)-ye(t))/(1-r)},getPixelForValue:function(e){var t=this,r=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(r=(ye(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(r)},getValueForPixel:function(e){var t=this,r=t.getDecimalForPixel(e);return 0===r&&0===t.min?0:Math.pow(10,t._startValue+(r-t._valueOffset)*t._valueRange)}});da._defaults=So;var Qt=h.valueOrDefault,Sr=h.valueAtIndexOrDefault,fa=h.options.resolve,Tn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Mt.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function ca(e){var t=e.ticks;return t.display&&e.display?Qt(t.fontSize,P.global.defaultFontSize)+2*t.backdropPaddingY:0}function To(e,t,r){return h.isArray(r)?{w:h.longestText(e,e.font,r),h:r.length*t}:{w:e.measureText(r).width,h:t}}function An(e,t,r,a,n){return e===a||e===n?{start:t-r/2,end:t+r/2}:en?{start:t-r,end:t}:{start:t,end:t+r}}function Do(e){return 0===e||180===e?"center":e<180?"left":"right"}function ct(e,t,r,a){var i,o,n=r.y+a/2;if(h.isArray(t))for(i=0,o=t.length;i270||e<90)&&(r.y-=t.h)}function Mr(e){return h.isNumber(e)?e:0}var Dn=wr.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=ca(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;h.each(t.data.datasets,function(n,i){if(t.isDatasetVisible(i)){var o=t.getDatasetMeta(i);h.each(n.data,function(l,s){var u=+e.getRightValue(l);isNaN(u)||o.data[s].hidden||(r=Math.min(u,r),a=Math.max(u,a))})}}),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=a===Number.NEGATIVE_INFINITY?0:a,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/ca(this.options))},convertTicksToLabels:function(){var e=this;wr.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=h.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this,t=e.options;t.display&&t.pointLabels.display?function Ao(e){var n,i,o,t=h.options._parseFont(e.options.pointLabels),r={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={};e.ctx.font=t.string,e._pointLabelSizes=[];var l=e.chart.data.labels.length;for(n=0;nr.r&&(r.r=d.end,a.r=s),f.startr.b&&(r.b=f.end,a.b=s)}e.setReductions(e.drawingArea,r,a)}(e):e.setCenterPoint(0,0,0,0)},setReductions:function(e,t,r){var a=this,n=t.l/Math.sin(r.l),i=Math.max(t.r-a.width,0)/Math.sin(r.r),o=-t.t/Math.cos(r.t),l=-Math.max(t.b-(a.height-a.paddingTop),0)/Math.cos(r.b);n=Mr(n),i=Mr(i),o=Mr(o),l=Mr(l),a.drawingArea=Math.min(Math.floor(e-(n+i)/2),Math.floor(e-(o+l)/2)),a.setCenterPoint(n,i,o,l)},setCenterPoint:function(e,t,r,a){var n=this,l=r+n.drawingArea,s=n.height-n.paddingTop-a-n.drawingArea;n.xCenter=Math.floor((e+n.drawingArea+(n.width-t-n.drawingArea))/2+n.left),n.yCenter=Math.floor((l+s)/2+n.top+n.paddingTop)},getIndexAngle:function(e){var t=this.chart,i=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(h.isNullOrUndef(e))return NaN;var r=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*r:(e-t.min)*r},getPointPosition:function(e,t){var r=this,a=r.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(a)*t+r.xCenter,y:Math.sin(a)*t+r.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this,r=t.min,a=t.max;return t.getPointPositionForValue(e||0,t.beginAtZero?0:r<0&&a<0?a:r>0&&a>0?r:0)},_drawGrid:function(){var l,s,u,e=this,t=e.ctx,r=e.options,a=r.gridLines,n=r.angleLines,i=Qt(n.lineWidth,a.lineWidth),o=Qt(n.color,a.color);if(r.pointLabels.display&&function Po(e){var t=e.ctx,r=e.options,a=r.pointLabels,n=ca(r),i=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),o=h.options._parseFont(a);t.save(),t.font=o.string,t.textBaseline="middle";for(var l=e.chart.data.labels.length-1;l>=0;l--){var u=e.getPointPosition(l,i+(0===l?n/2:0)+5),d=Sr(a.fontColor,l,P.global.defaultFontColor);t.fillStyle=d;var f=e.getIndexAngle(l),v=h.toDegrees(f);t.textAlign=Do(v),ha(v,e._pointLabelSizes[l],u),ct(t,e.pointLabels[l],u,o.lineHeight)}t.restore()}(e),a.display&&h.each(e.ticks,function(d,f){0!==f&&(s=e.getDistanceFromCenterForValue(e.ticksAsNumbers[f]),function Oo(e,t,r,a){var u,n=e.ctx,i=t.circular,o=e.chart.data.labels.length,l=Sr(t.color,a-1),s=Sr(t.lineWidth,a-1);if((i||o)&&l&&s){if(n.save(),n.strokeStyle=l,n.lineWidth=s,n.setLineDash&&(n.setLineDash(t.borderDash||[]),n.lineDashOffset=t.borderDashOffset||0),n.beginPath(),i)n.arc(e.xCenter,e.yCenter,r,0,2*Math.PI);else{u=e.getPointPosition(0,r),n.moveTo(u.x,u.y);for(var d=1;d=0;l--)s=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),u=e.getPointPosition(l,s),t.beginPath(),t.moveTo(e.xCenter,e.yCenter),t.lineTo(u.x,u.y),t.stroke();t.restore()}},_drawLabels:function(){var e=this,t=e.ctx,a=e.options.ticks;if(a.display){var l,s,n=e.getIndexAngle(0),i=h.options._parseFont(a),o=Qt(a.fontColor,P.global.defaultFontColor);t.save(),t.font=i.string,t.translate(e.xCenter,e.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",h.each(e.ticks,function(u,d){0===d&&!a.reverse||(l=e.getDistanceFromCenterForValue(e.ticksAsNumbers[d]),a.showLabelBackdrop&&(s=t.measureText(u).width,t.fillStyle=a.backdropColor,t.fillRect(-s/2-a.backdropPaddingX,-l-i.size/2-a.backdropPaddingY,s+2*a.backdropPaddingX,i.size+2*a.backdropPaddingY)),t.fillStyle=o,t.fillText(u,0,-l))}),t.restore()}},_drawTitle:h.noop});Dn._defaults=Tn;var Tr=h._deprecated,Pn=h.options.resolve,va=h.valueOrDefault,On=Number.MIN_SAFE_INTEGER||-9007199254740991,ga=Number.MAX_SAFE_INTEGER||9007199254740991,Ar={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},_e=Object.keys(Ar);function In(e,t){return e-t}function pa(e){return h.valueOrDefault(e.time.min,e.ticks.min)}function Ln(e){return h.valueOrDefault(e.time.max,e.ticks.max)}function Pt(e,t,r,a){var n=function Lo(e,t,r){for(var i,o,l,a=0,n=e.length-1;a>=0&&a<=n;){if(l=e[i=a+n>>1],!(o=e[i-1]||null))return{lo:null,hi:l};if(l[t]r))return{lo:o,hi:l};n=i-1}}return{lo:l,hi:null}}(e,t,r),i=n.lo?n.hi?n.lo:e[e.length-2]:e[0],o=n.lo?n.hi?n.hi:e[e.length-1]:e[1],l=o[t]-i[t];return i[a]+(o[a]-i[a])*(l?(r-i[t])/l:0)}function ma(e,t){var r=e._adapter,a=e.options.time,n=a.parser,i=n||a.format,o=t;return"function"==typeof n&&(o=n(o)),h.isFinite(o)||(o="string"==typeof i?r.parse(o,i):r.parse(o)),null!==o?+o:(!n&&"function"==typeof i&&(o=i(t),h.isFinite(o)||(o=r.parse(o))),o)}function ht(e,t){if(h.isNullOrUndef(t))return null;var r=e.options.time,a=ma(e,e.getRightValue(t));return null===a||r.round&&(a=+e._adapter.startOf(a,r.round)),a}function Rn(e,t,r,a){var i,o,n=_e.length;for(i=_e.indexOf(e);i=0&&(t[s].major=!0);return t}(e,a,n,r):a}var En=he.extend({initialize:function(){this.mergeTicksOptions(),he.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,r=t.time||(t.time={}),a=e._adapter=new xr._date(t.adapters.date);return Tr("time scale",r.format,"time.format","time.parser"),Tr("time scale",r.min,"time.min","ticks.min"),Tr("time scale",r.max,"time.max","ticks.max"),h.mergeIf(r.displayFormats,a.formats()),he.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),he.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var d,f,v,p,m,y,_,e=this,t=e.chart,r=e._adapter,a=e.options,n=a.time.unit||"day",i=ga,o=On,l=[],s=[],u=[],w=e._getLabels();for(d=0,v=w.length;d1?function Fn(e){var a,n,i,t={},r=[];for(a=0,n=e.length;a1e5*s)throw t+" and "+r+" are too far apart with stepSize of "+s+" "+l;for(v=d;v=t&&p<=r&&l.push(p);return e.min=t,e.max=r,e._unit=i.unit||(n.autoSkip?Rn(i.minUnit,e.min,e.max,s):function Ro(e,t,r,a,n){var i,o;for(i=_e.length-1;i>=_e.indexOf(r);i--)if(Ar[o=_e[i]].common&&e._adapter.diff(n,a,o)>=t-1)return o;return _e[r?_e.indexOf(r):0]}(e,l.length,i.minUnit,e.min,e.max)),e._majorUnit=n.major.enabled&&"year"!==e._unit?function Bo(e){for(var t=_e.indexOf(e)+1,r=_e.length;tt&&u=0&&e0?l:1}});En._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Ho={category:kn,linear:kr,logarithmic:da,radialLinear:Dn,time:En},Vo={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};xr._date.override("function"==typeof V?{_id:"moment",formats:function(){return Vo},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=V(e,t):e instanceof V||(e=V(e)),e.isValid()?e.valueOf():null},format:function(e,t){return V(e).format(t)},add:function(e,t,r){return V(e).add(t,r).valueOf()},diff:function(e,t,r){return V(e).diff(V(t),r)},startOf:function(e,t,r){return e=V(e),"isoWeek"===t?e.isoWeekday(r).valueOf():e.startOf(t).valueOf()},endOf:function(e,t){return V(e).endOf(t).valueOf()},_create:function(e){return V(e)}}:{}),P._set("global",{plugins:{filler:{propagate:!0}}});var Uo={dataset:function(e){var t=e.fill,r=e.chart,a=r.getDatasetMeta(t),i=a&&r.isDatasetVisible(t)&&a.dataset._children||[],o=i.length||0;return o?function(l,s){return s=r)&&i;switch(n){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return n;default:return!1}}function $o(e){return(e.el._scale||{}).getPointPositionForValue?function Yo(e){var o,l,s,u,d,t=e.el._scale,r=t.options,a=t.chart.data.labels.length,n=e.fill,i=[];if(!a)return null;for(l=r.ticks.reverse?t.min:t.max,s=t.getPointPositionForValue(0,o=r.ticks.reverse?t.max:t.min),u=0;u0;--i)e.arc(o,l,s,r[i].angle,r[i-1].angle,!0);return}for(e.lineTo(r[n-1].x,r[n-1].y),i=n-1;i>0;--i)h.canvas.lineTo(e,r[i],r[i-1],!0)}}function Jo(e,t,r,a,n,i){var v,p,m,y,_,w,T,A,o=t.length,l=a.spanGaps,s=[],u=[],d=0,f=0;for(e.beginPath(),v=0,p=o;v=0;--n)(a=t[n].$filler)&&a.visible&&(l=(i=a.el)._children||[],u=(o=i._view).backgroundColor||P.global.defaultColor,(s=a.mapper)&&u&&l.length&&(h.canvas.clipArea(r,e.chartArea),Jo(r,l,s,o,u,i._loop),h.canvas.unclipArea(r)))}},Qo=h.rtl.getRtlAdapter,Xe=h.noop,Qe=h.valueOrDefault;function ya(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}P._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var r=t.datasetIndex,a=this.chart,n=a.getDatasetMeta(r);n.hidden=null===n.hidden?!a.data.datasets[r].hidden:null,a.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,r=e.options.legend||{},a=r.labels&&r.labels.usePointStyle;return e._getSortedDatasetMetas().map(function(n){var i=n.controller.getStyle(a?0:void 0);return{text:t[n.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(e){var a,n,i,t=document.createElement("ul"),r=e.data.datasets;for(t.setAttribute("class",e.id+"-legend"),a=0,n=r.length;as.width)&&(f+=o+r.padding,d[d.length-(A>0?0:1)]=0),l[A]={left:0,top:0,width:L,height:o},d[d.length-1]+=L+r.padding}),s.height+=f}else{var v=r.padding,p=e.columnWidths=[],m=e.columnHeights=[],y=r.padding,_=0,w=0;h.each(e.legendItems,function(T,A){var L=ya(r,o)+o/2+n.measureText(T.text).width;A>0&&w+o+2*v>s.height&&(y+=_+r.padding,p.push(_),m.push(w),_=0,w=0),_=Math.max(_,L),w+=o+v,l[A]={left:0,top:0,width:L,height:o}}),y+=_,p.push(_),m.push(w),s.width+=y}e.width=s.width,e.height=s.height}else e.width=s.width=e.height=s.height=0},afterFit:Xe,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,r=t.labels,a=P.global,n=a.defaultColor,i=a.elements.line,o=e.height,l=e.columnHeights,s=e.width,u=e.lineWidths;if(t.display){var y,d=Qo(t.rtl,e.left,e.minSize.width),f=e.ctx,v=Qe(r.fontColor,a.defaultFontColor),p=h.options._parseFont(r),m=p.size;f.textAlign=d.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=v,f.fillStyle=v,f.font=p.string;var _=ya(r,m),w=e.legendHitBoxes,R=function(W,K){switch(t.align){case"start":return r.padding;case"end":return W-K;default:return(W-K+r.padding)/2}},L=e.isHorizontal();y=L?{x:e.left+R(s,u[0]),y:e.top+r.padding,line:0}:{x:e.left+r.padding,y:e.top+R(o,l[0]),line:0},h.rtl.overrideTextDirection(e.ctx,t.textDirection);var U=m+r.padding;h.each(e.legendItems,function(W,K){var I=f.measureText(W.text).width,te=_+m/2+I,ne=y.x,ae=y.y;d.setWidth(e.minSize.width),L?K>0&&ne+te+r.padding>e.left+e.minSize.width&&(ae=y.y+=U,y.line++,ne=y.x=e.left+R(s,u[y.line])):K>0&&ae+U>e.top+e.minSize.height&&(ne=y.x=ne+e.columnWidths[y.line]+r.padding,y.line++,ae=y.y=e.top+R(o,l[y.line]));var ue=d.x(ne);(function(W,K,I){if(!(isNaN(_)||_<=0)){f.save();var te=Qe(I.lineWidth,i.borderWidth);if(f.fillStyle=Qe(I.fillStyle,n),f.lineCap=Qe(I.lineCap,i.borderCapStyle),f.lineDashOffset=Qe(I.lineDashOffset,i.borderDashOffset),f.lineJoin=Qe(I.lineJoin,i.borderJoinStyle),f.lineWidth=te,f.strokeStyle=Qe(I.strokeStyle,n),f.setLineDash&&f.setLineDash(Qe(I.lineDash,i.borderDash)),r&&r.usePointStyle){var ne=_*Math.SQRT2/2,ae=d.xPlus(W,_/2);h.canvas.drawPoint(f,I.pointStyle,ne,ae,K+m/2,I.rotation)}else f.fillRect(d.leftForLtr(W,_),K,_,m),0!==te&&f.strokeRect(d.leftForLtr(W,_),K,_,m);f.restore()}})(ue,ae,W),w[K].left=d.leftForLtr(ue,w[K].width),w[K].top=ae,function(W,K,I,te){var ne=m/2,ae=d.xPlus(W,_+ne),ue=K+ne;f.fillText(I.text,ae,ue),I.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(ae,ue),f.lineTo(d.xPlus(ae,te),ue),f.stroke())}(ue,ae,W,I),L?y.x+=te+r.padding:y.y+=U}),h.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var a,n,i,r=this;if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom)for(i=r.legendHitBoxes,a=0;a=(n=i[a]).left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height)return r.legendItems[a];return null},handleEvent:function(e){var n,t=this,r=t.options,a="mouseup"===e.type?"click":e.type;if("mousemove"===a){if(!r.onHover&&!r.onLeave)return}else{if("click"!==a)return;if(!r.onClick)return}n=t._getLegendItemAt(e.x,e.y),"click"===a?n&&r.onClick&&r.onClick.call(t,e.native,n):(r.onLeave&&n!==t._hoveredItem&&(t._hoveredItem&&r.onLeave.call(t,e.native,t._hoveredItem),t._hoveredItem=n),r.onHover&&n&&r.onHover.call(t,e.native,n))}});function zn(e,t){var r=new _a({ctx:e.ctx,options:t,chart:e});Pe.configure(e,r,t),Pe.addBox(e,r),e.legend=r}var es={id:"legend",_element:_a,beforeInit:function(e){var t=e.options.legend;t&&zn(e,t)},beforeUpdate:function(e){var t=e.options.legend,r=e.legend;t?(h.mergeIf(t,P.global.legend),r?(Pe.configure(e,r,t),r.options=t):zn(e,t)):r&&(Pe.removeBox(e,r),delete e.legend)},afterEvent:function(e,t){var r=e.legend;r&&r.handleEvent(t)}},Ye=h.noop;P._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var jn=Ne.extend({initialize:function(e){h.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:Ye,update:function(e,t,r){var a=this;return a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=r,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:Ye,beforeSetDimensions:Ye,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Ye,beforeBuildLabels:Ye,buildLabels:Ye,afterBuildLabels:Ye,beforeFit:Ye,fit:function(){var i,e=this,t=e.options,r=e.minSize={},a=e.isHorizontal();t.display?(i=(h.isArray(t.text)?t.text.length:1)*h.options._parseFont(t).lineHeight+2*t.padding,e.width=r.width=a?e.maxWidth:i,e.height=r.height=a?i:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:Ye,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,r=e.options;if(r.display){var f,v,p,a=h.options._parseFont(r),n=a.lineHeight,i=n/2+r.padding,o=0,l=e.top,s=e.left,u=e.bottom,d=e.right;t.fillStyle=h.valueOrDefault(r.fontColor,P.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(v=s+(d-s)/2,p=l+i,f=d-s):(v="left"===r.position?s+i:d-i,p=l+(u-l)/2,f=u-l,o=Math.PI*("left"===r.position?-.5:.5)),t.save(),t.translate(v,p),t.rotate(o),t.textAlign="center",t.textBaseline="middle";var m=r.text;if(h.isArray(m))for(var y=0,_=0;_=0;o--){var l=a[o];if(n(l))return l}},h.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},h.almostEquals=function(a,n,i){return Math.abs(a-n)=a},h.max=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.max(n,i)},Number.NEGATIVE_INFINITY)},h.min=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.min(n,i)},Number.POSITIVE_INFINITY)},h.sign=Math.sign?function(a){return Math.sign(a)}:function(a){return 0==(a=+a)||isNaN(a)?a:a>0?1:-1},h.toRadians=function(a){return a*(Math.PI/180)},h.toDegrees=function(a){return a*(180/Math.PI)},h._decimalPlaces=function(a){if(h.isFinite(a)){for(var n=1,i=0;Math.round(a*n)/n!==a;)n*=10,i++;return i}},h.getAngleFromPoint=function(a,n){var i=n.x-a.x,o=n.y-a.y,l=Math.sqrt(i*i+o*o),s=Math.atan2(o,i);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:l}},h.distanceBetweenPoints=function(a,n){return Math.sqrt(Math.pow(n.x-a.x,2)+Math.pow(n.y-a.y,2))},h.aliasPixel=function(a){return a%2==0?0:.5},h._alignPixel=function(a,n,i){var o=a.currentDevicePixelRatio,l=i/2;return Math.round((n-l)*o)/o+l},h.splineCurve=function(a,n,i,o){var l=a.skip?n:a,s=n,u=i.skip?n:i,d=Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2)),f=Math.sqrt(Math.pow(u.x-s.x,2)+Math.pow(u.y-s.y,2)),v=d/(d+f),p=f/(d+f),m=o*(v=isNaN(v)?0:v),y=o*(p=isNaN(p)?0:p);return{previous:{x:s.x-m*(u.x-l.x),y:s.y-m*(u.y-l.y)},next:{x:s.x+y*(u.x-l.x),y:s.y+y*(u.y-l.y)}}},h.EPSILON=Number.EPSILON||1e-14,h.splineCurveMonotone=function(a){var o,l,s,u,f,v,p,m,y,n=(a||[]).map(function(_){return{model:_._model,deltaK:0,mK:0}}),i=n.length;for(o=0;o0?n[o-1]:null,(u=o0?n[o-1]:null)&&!l.model.skip&&(s.model.controlPointPreviousX=s.model.x-(y=(s.model.x-l.model.x)/3),s.model.controlPointPreviousY=s.model.y-y*s.mK),u&&!u.model.skip&&(s.model.controlPointNextX=s.model.x+(y=(u.model.x-s.model.x)/3),s.model.controlPointNextY=s.model.y+y*s.mK))},h.nextItem=function(a,n,i){return i?n>=a.length-1?a[0]:a[n+1]:n>=a.length-1?a[a.length-1]:a[n+1]},h.previousItem=function(a,n,i){return i?n<=0?a[a.length-1]:a[n-1]:n<=0?a[0]:a[n-1]},h.niceNum=function(a,n){var i=Math.floor(h.log10(a)),o=a/Math.pow(10,i);return(n?o<1.5?1:o<3?2:o<7?5:10:o<=1?1:o<=2?2:o<=5?5:10)*Math.pow(10,i)},h.requestAnimFrame="undefined"==typeof window?function(a){a()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)},h.getRelativePosition=function(a,n){var i,o,l=a.originalEvent||a,s=a.target||a.srcElement,u=s.getBoundingClientRect(),d=l.touches;d&&d.length>0?(i=d[0].clientX,o=d[0].clientY):(i=l.clientX,o=l.clientY);var f=parseFloat(h.getStyle(s,"padding-left")),v=parseFloat(h.getStyle(s,"padding-top")),p=parseFloat(h.getStyle(s,"padding-right")),m=parseFloat(h.getStyle(s,"padding-bottom")),_=u.bottom-u.top-v-m;return{x:i=Math.round((i-u.left-f)/(u.right-u.left-f-p)*s.width/n.currentDevicePixelRatio),y:o=Math.round((o-u.top-v)/_*s.height/n.currentDevicePixelRatio)}},h.getConstraintWidth=function(a){return r(a,"max-width","clientWidth")},h.getConstraintHeight=function(a){return r(a,"max-height","clientHeight")},h._calculatePadding=function(a,n,i){return(n=h.getStyle(a,n)).indexOf("%")>-1?i*parseInt(n,10)/100:parseInt(n,10)},h._getParentNode=function(a){var n=a.parentNode;return n&&"[object ShadowRoot]"===n.toString()&&(n=n.host),n},h.getMaximumWidth=function(a){var n=h._getParentNode(a);if(!n)return a.clientWidth;var i=n.clientWidth,s=i-h._calculatePadding(n,"padding-left",i)-h._calculatePadding(n,"padding-right",i),u=h.getConstraintWidth(a);return isNaN(u)?s:Math.min(s,u)},h.getMaximumHeight=function(a){var n=h._getParentNode(a);if(!n)return a.clientHeight;var i=n.clientHeight,s=i-h._calculatePadding(n,"padding-top",i)-h._calculatePadding(n,"padding-bottom",i),u=h.getConstraintHeight(a);return isNaN(u)?s:Math.min(s,u)},h.getStyle=function(a,n){return a.currentStyle?a.currentStyle[n]:document.defaultView.getComputedStyle(a,null).getPropertyValue(n)},h.retinaScale=function(a,n){var i=a.currentDevicePixelRatio=n||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==i){var o=a.canvas,l=a.height,s=a.width;o.height=l*i,o.width=s*i,a.ctx.scale(i,i),!o.style.height&&!o.style.width&&(o.style.height=l+"px",o.style.width=s+"px")}},h.fontString=function(a,n,i){return n+" "+a+"px "+i},h.longestText=function(a,n,i,o){var l=(o=o||{}).data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==n&&(l=o.data={},s=o.garbageCollect=[],o.font=n),a.font=n;var f,v,p,m,y,u=0,d=i.length;for(f=0;fi.length){for(f=0;f<_;f++)delete l[s[f]];s.splice(0,_)}return u},h.measureText=function(a,n,i,o,l){var s=n[l];return s||(s=n[l]=a.measureText(l).width,i.push(l)),s>o&&(o=s),o},h.numberOfLabelLines=function(a){var n=1;return h.each(a,function(i){h.isArray(i)&&i.length>n&&(n=i.length)}),n},h.color=sr?function(a){return a instanceof CanvasGradient&&(a=P.global.defaultColor),sr(a)}:function(a){return console.error("Color.js not found!"),a},h.getHoverColor=function(a){return a instanceof CanvasPattern||a instanceof CanvasGradient?a:h.color(a).saturate(.5).darken(.1).rgbString()}}(),B._adapters=xr,B.Animation=Er,B.animationService=Nr,B.controllers=Vr,B.DatasetController=De,B.defaults=P,B.Element=Ne,B.elements=be,B.Interaction=wt,B.layouts=Pe,B.platform=St,B.plugins=$,B.Scale=he,B.scaleService=Zt,B.Ticks=Mt,B.Tooltip=br,B.helpers.each(Ho,function(e,t){B.scaleService.registerScaleType(t,e,e._defaults)}),et)et.hasOwnProperty(Vn)&&B.plugins.register(et[Vn]);B.platform.initialize();var Un=B;return"undefined"!=typeof window&&(window.Chart=B),B.Chart=B,B.Legend=et.legend._element,B.Title=et.title._element,B.pluginService=B.plugins,B.PluginBase=B.Element.extend({}),B.canvasHelpers=B.helpers.canvas,B.layoutService=B.layouts,B.LinearScaleBase=wr,B.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){B[e]=function(t,r){return new B(t,B.helpers.merge(r||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}}),Un}(function(){try{return X(8268)}catch(C){}}())},9215:(ka,ar,X)=>{"use strict";X.d(ar,{jh:()=>vs,m9:()=>gs,bF:()=>ps,Dy:()=>ms});var V=X(5e3),Fe=X(1135);const Le=function G(c,b){return c===b||c!=c&&b!=b},rt=function nr(c,b){for(var g=c.length;g--;)if(Le(c[g][0],b))return g;return-1};var Ma=Array.prototype.splice;function at(c){var b=-1,g=null==c?0:c.length;for(this.clear();++b-1},at.prototype.set=function Fa(c,b){var g=this.__data__,x=rt(g,c);return x<0?(++this.size,g.push([c,b])):g[x][1]=b,this};const Bt=at,ir="object"==typeof global&&global&&global.Object===Object&&global;var Et="object"==typeof self&&self&&self.Object===Object&&self;const Me=ir||Et||Function("return this")(),it=Me.Symbol;var Ra=Object.prototype,Gn=Ra.hasOwnProperty,Zn=Ra.toString,Nt=it?it.toStringTag:void 0;var Ea=Object.prototype.toString;var Be=it?it.toStringTag:void 0;const pt=function or(c){return null==c?void 0===c?"[object Undefined]":"[object Null]":Be&&Be in Object(c)?function Jn(c){var b=Gn.call(c,Nt),g=c[Nt];try{c[Nt]=void 0;var x=!0}catch(O){}var S=Zn.call(c);return x&&(b?c[Nt]=g:delete c[Nt]),S}(c):function Qn(c){return Ea.call(c)}(c)},le=function za(c){var b=typeof c;return null!=c&&("object"==b||"function"==b)},Wa=function zt(c){if(!le(c))return!1;var b=pt(c);return"[object Function]"==b||"[object GeneratorFunction]"==b||"[object AsyncFunction]"==b||"[object Proxy]"==b};var c,me=Me["__core-js_shared__"],Ha=(c=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"";var lr=Function.prototype.toString;const Ge=function ri(c){if(null!=c){try{return lr.call(c)}catch(b){}try{return c+""}catch(b){}}return""};var ur=/^\[object .+?Constructor\]$/,oi=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const li=function si(c){return!(!le(c)||function Ae(c){return!!Ha&&Ha in c}(c))&&(Wa(c)?oi:ur).test(Ge(c))},h=function fi(c,b){var g=function ui(c,b){return null==c?void 0:c[b]}(c,b);return li(g)?g:void 0},Wt=h(Me,"Map"),Ht=h(Object,"create");var Nr=Object.prototype.hasOwnProperty;var Ka=Object.prototype.hasOwnProperty;function bt(c){var b=-1,g=null==c?0:c.length;for(this.clear();++b-1&&c%1==0&&c-1&&c%1==0&&c<=9007199254740991};var Y={};Y["[object Float32Array]"]=Y["[object Float64Array]"]=Y["[object Int8Array]"]=Y["[object Int16Array]"]=Y["[object Int32Array]"]=Y["[object Uint8Array]"]=Y["[object Uint8ClampedArray]"]=Y["[object Uint16Array]"]=Y["[object Uint32Array]"]=!0,Y["[object Arguments]"]=Y["[object Array]"]=Y["[object ArrayBuffer]"]=Y["[object Boolean]"]=Y["[object DataView]"]=Y["[object Date]"]=Y["[object Error]"]=Y["[object Function]"]=Y["[object Map]"]=Y["[object Number]"]=Y["[object Object]"]=Y["[object RegExp]"]=Y["[object Set]"]=Y["[object String]"]=Y["[object WeakMap]"]=!1;const ut=function Zi(c){return function(b){return c(b)}};var pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Gt=pn&&"object"==typeof module&&module&&!module.nodeType&&module,Jr=Gt&&Gt.exports===pn&&ir.process;const kt=function(){try{return Gt&&Gt.require&&Gt.require("util").types||Jr&&Jr.binding&&Jr.binding("util")}catch(b){}}();var Xr=kt&&kt.isTypedArray;const St=Xr?ut(Xr):function Zr(c){return Kt(c)&&un(c.length)&&!!Y[pt(c)]};var Zt=Object.prototype.hasOwnProperty;const pr=function qe(c,b){var g=Hr(c),x=!g&&Fi(c),S=!g&&!x&&hr(c),O=!g&&!x&&!S&&St(c),F=g||x||S||O,re=F?function Ve(c,b){for(var g=-1,x=Array(c);++gxe(b,.6)),borderColor:c.map(()=>"#fff"),pointBackgroundColor:c.map(b=>xe(b,1)),pointBorderColor:c.map(()=>"#fff"),pointHoverBackgroundColor:c.map(b=>xe(b,1)),pointHoverBorderColor:c.map(b=>xe(b,1))}}function os(){return[ns(0,255),ns(0,255),ns(0,255)]}function ss(c){return qn[c]||os()}function Kn(c){const b=new Array(c);for(let g=0;g{class c{constructor(){this.pColorschemesOptions={},this.colorschemesOptions=new Fe.X({})}setColorschemesOptions(g){this.pColorschemesOptions=g,this.colorschemesOptions.next(g)}getColorschemesOptions(){return this.pColorschemesOptions}}return c.\u0275fac=function(g){return new(g||c)},c.\u0275prov=(0,V.Yz7)({factory:function(){return new c},token:c,providedIn:"root"}),c})();const q={Default:0,Update:1,Refresh:2};q[q.Default]="Default",q[q.Update]="Update",q[q.Refresh]="Refresh";let vs=(()=>{class c{constructor(g,x){this.element=g,this.themeService=x,this.options={},this.chartClick=new V.vpe,this.chartHover=new V.vpe,this.old={dataExists:!1,dataLength:0,datasetsExists:!1,datasetsLength:0,datasetsDataObjects:[],datasetsDataLengths:[],colorsExists:!1,colors:[],labelsExist:!1,labels:[],legendExists:!1,legend:{}},this.subs=[]}static registerPlugin(g){er.pluginService.register(g)}static unregisterPlugin(g){er.pluginService.unregister(g)}ngOnInit(){this.ctx=this.element.nativeElement.getContext("2d"),this.refresh(),this.subs.push(this.themeService.colorschemesOptions.subscribe(g=>this.themeChanged(g)))}themeChanged(g){this.refresh()}ngDoCheck(){if(!this.chart)return;let g=q.Default;const x=S=>{g=S>g?S:g};switch(!!this.data!==this.old.dataExists&&(this.propagateDataToDatasets(this.data),this.old.dataExists=!!this.data,x(q.Update)),this.data&&this.data.length!==this.old.dataLength&&(this.old.dataLength=this.data&&this.data.length||0,x(q.Update)),!!this.datasets!==this.old.datasetsExists&&(this.old.datasetsExists=!!this.datasets,x(q.Update)),this.datasets&&this.datasets.length!==this.old.datasetsLength&&(this.old.datasetsLength=this.datasets&&this.datasets.length||0,x(q.Update)),this.datasets&&this.datasets.filter((S,O)=>S.data!==this.old.datasetsDataObjects[O]).length&&(this.old.datasetsDataObjects=this.datasets.map(S=>S.data),x(q.Update)),this.datasets&&this.datasets.filter((S,O)=>S.data.length!==this.old.datasetsDataLengths[O]).length&&(this.old.datasetsDataLengths=this.datasets.map(S=>S.data.length),x(q.Update)),!!this.colors!==this.old.colorsExists&&(this.old.colorsExists=!!this.colors,this.updateColors(),x(q.Update)),this.colors&&this.colors.filter((S,O)=>!this.colorsEqual(S,this.old.colors[O])).length&&(this.old.colors=this.colors.map(S=>this.copyColor(S)),this.updateColors(),x(q.Update)),!!this.labels!==this.old.labelsExist&&(this.old.labelsExist=!!this.labels,x(q.Update)),this.labels&&this.labels.filter((S,O)=>!this.labelsEqual(S,this.old.labels[O])).length&&(this.old.labels=this.labels.map(S=>this.copyLabel(S)),x(q.Update)),!!this.options.legend!==this.old.legendExists&&(this.old.legendExists=!!this.options.legend,x(q.Refresh)),this.options.legend&&this.options.legend.position!==this.old.legend.position&&(this.old.legend.position=this.options.legend.position,x(q.Refresh)),g){case q.Default:break;case q.Update:this.update();break;case q.Refresh:this.refresh()}}copyLabel(g){return Array.isArray(g)?[...g]:g}labelsEqual(g,x){return Array.isArray(g)===Array.isArray(x)&&(Array.isArray(g)||g===x)&&(!Array.isArray(g)||g.length===x.length)&&(!Array.isArray(g)||0===g.filter((S,O)=>S!==x[O]).length)}copyColor(g){return{backgroundColor:g.backgroundColor,borderWidth:g.borderWidth,borderColor:g.borderColor,borderCapStyle:g.borderCapStyle,borderDash:g.borderDash,borderDashOffset:g.borderDashOffset,borderJoinStyle:g.borderJoinStyle,pointBorderColor:g.pointBorderColor,pointBackgroundColor:g.pointBackgroundColor,pointBorderWidth:g.pointBorderWidth,pointRadius:g.pointRadius,pointHoverRadius:g.pointHoverRadius,pointHitRadius:g.pointHitRadius,pointHoverBackgroundColor:g.pointHoverBackgroundColor,pointHoverBorderColor:g.pointHoverBorderColor,pointHoverBorderWidth:g.pointHoverBorderWidth,pointStyle:g.pointStyle,hoverBackgroundColor:g.hoverBackgroundColor,hoverBorderColor:g.hoverBorderColor,hoverBorderWidth:g.hoverBorderWidth}}colorsEqual(g,x){return!g==!x&&(!g||g.backgroundColor===x.backgroundColor&&g.borderWidth===x.borderWidth&&g.borderColor===x.borderColor&&g.borderCapStyle===x.borderCapStyle&&g.borderDash===x.borderDash&&g.borderDashOffset===x.borderDashOffset&&g.borderJoinStyle===x.borderJoinStyle&&g.pointBorderColor===x.pointBorderColor&&g.pointBackgroundColor===x.pointBackgroundColor&&g.pointBorderWidth===x.pointBorderWidth&&g.pointRadius===x.pointRadius&&g.pointHoverRadius===x.pointHoverRadius&&g.pointHitRadius===x.pointHitRadius&&g.pointHoverBackgroundColor===x.pointHoverBackgroundColor&&g.pointHoverBorderColor===x.pointHoverBorderColor&&g.pointHoverBorderWidth===x.pointHoverBorderWidth&&g.pointStyle===x.pointStyle&&g.hoverBackgroundColor===x.hoverBackgroundColor&&g.hoverBorderColor===x.hoverBorderColor&&g.hoverBorderWidth===x.hoverBorderWidth)}updateColors(){this.datasets.forEach((g,x)=>{this.colors&&this.colors[x]?Object.assign(g,this.colors[x]):Object.assign(g,function us(c,b,g){if("pie"===c||"doughnut"===c)return is(Kn(g));if("polarArea"===c)return function cs(c){return{backgroundColor:c.map(b=>xe(b,.6)),borderColor:c.map(b=>xe(b,1)),hoverBackgroundColor:c.map(b=>xe(b,.8)),hoverBorderColor:c.map(b=>xe(b,1))}}(Kn(g));if("line"===c||"radar"===c)return function ds(c){return{backgroundColor:xe(c,.4),borderColor:xe(c,1),pointBackgroundColor:xe(c,1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:xe(c,.8)}}(ss(b));if("bar"===c||"horizontalBar"===c)return function fs(c){return{backgroundColor:xe(c,.6),borderColor:xe(c,1),hoverBackgroundColor:xe(c,.8),hoverBorderColor:xe(c,1)}}(ss(b));if("bubble"===c||"scatter"===c)return is(Kn(g));throw new Error("getColors - Unsupported chart type: "+c)}(this.chartType,x,g.data.length),Object.assign({},g))})}ngOnChanges(g){let x=q.Default;const S=O=>{x=O>x?O:x};switch(g.hasOwnProperty("data")&&g.data.currentValue&&(this.propagateDataToDatasets(g.data.currentValue),S(q.Update)),g.hasOwnProperty("datasets")&&g.datasets.currentValue&&(this.propagateDatasetsToData(g.datasets.currentValue),S(q.Update)),g.hasOwnProperty("labels")&&(this.chart&&(this.chart.data.labels=g.labels.currentValue),S(q.Update)),g.hasOwnProperty("legend")&&(this.chart&&(this.chart.config.options.legend.display=g.legend.currentValue,this.chart.generateLegend()),S(q.Update)),g.hasOwnProperty("options")&&S(q.Refresh),x){case q.Update:this.update();break;case q.Refresh:case q.Default:this.refresh()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(g=>g.unsubscribe())}update(g){if(this.chart)return this.chart.update(g)}hideDataset(g,x){this.chart.getDatasetMeta(g).hidden=x,this.chart.update()}isDatasetHidden(g){return this.chart.getDatasetMeta(g).hidden}toBase64Image(){return this.chart.toBase64Image()}getChartConfiguration(){const g=this.getDatasets(),x=Object.assign({},this.options);!1===this.legend&&(x.legend={display:!1}),x.hover=x.hover||{},x.hover.onHover||(x.hover.onHover=(O,F)=>{F&&!F.length||this.chartHover.emit({event:O,active:F})}),x.onClick||(x.onClick=(O,F)=>{this.chartClick.emit({event:O,active:F})});const S=this.smartMerge(x,this.themeService.getColorschemesOptions());return{type:this.chartType,data:{labels:this.labels||[],datasets:g},plugins:this.plugins,options:S}}getChartBuilder(g){const x=this.getChartConfiguration();return new er.Chart(g,x)}smartMerge(g,x,S=0){if(0===S&&(g=function Ot(c){return ne(c,5)}(g)),Object.keys(x).forEach(F=>{if(Array.isArray(x[F])){const re=g[F];re&&re.forEach(D=>{this.smartMerge(D,x[F][0],S+1)})}else"object"==typeof x[F]?(F in g||(g[F]={}),this.smartMerge(g[F],x[F],S+1)):g[F]=x[F]}),0===S)return g}isMultiLineLabel(g){return Array.isArray(g)}joinLabel(g){return g?this.isMultiLineLabel(g)?g.join(" "):g:null}propagateDatasetsToData(g){this.data=this.datasets.map(x=>x.data),this.chart&&(this.chart.data.datasets=g),this.updateColors()}propagateDataToDatasets(g){this.isMultiDataSet(g)?this.datasets&&g.length===this.datasets.length?this.datasets.forEach((x,S)=>{x.data=g[S]}):(this.datasets=g.map((x,S)=>({data:x,label:this.joinLabel(this.labels[S])||`Label ${S}`})),this.chart&&(this.chart.data.datasets=this.datasets)):this.datasets?(this.datasets[0]||(this.datasets[0]={}),this.datasets[0].data=g,this.datasets.splice(1)):(this.datasets=[{data:g}],this.chart&&(this.chart.data.datasets=this.datasets)),this.updateColors()}isMultiDataSet(g){return Array.isArray(g[0])}getDatasets(){if(!this.datasets&&!this.data)throw new Error(`ng-charts configuration error, data or datasets field are required to render chart ${this.chartType}`);return this.datasets?(this.propagateDatasetsToData(this.datasets),this.datasets):this.data?(this.propagateDataToDatasets(this.data),this.datasets):void 0}refresh(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.ctx&&(this.chart=this.getChartBuilder(this.ctx))}}return c.\u0275fac=function(g){return new(g||c)(V.Y36(V.SBq),V.Y36(hs))},c.\u0275dir=V.lG2({type:c,selectors:[["canvas","baseChart",""]],inputs:{options:"options",data:"data",datasets:"datasets",labels:"labels",chartType:"chartType",colors:"colors",legend:"legend",plugins:"plugins"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[V.TTD]}),c})(),gs=(()=>{class c{}return c.\u0275fac=function(g){return new(g||c)},c.\u0275mod=V.oAB({type:c}),c.\u0275inj=V.cJS({imports:[[]]}),c})();function ps(){if("undefined"==typeof Chart)return void console.log("Chart not defined (guessing this is a universal build, and I don't know why this happens -- Aviad)");const b=Chart.plugins.getAll().filter(D=>"legend"===D.id)[0];b._element.prototype.fit=function F(){var D=this,Q=D.options,Z=Q.labels,ve=Q.display,Ce=D.ctx,ke=g.options._parseFont(Z),de=ke.size,Oe=D.legendHitBoxes=[],J=D.minSize,ge=D.isHorizontal();ge?(J.width=D.maxWidth,J.height=ve?10:0):(J.width=ve?10:0,J.height=D.maxHeight);var xa=function(pe){return pe.map(function(we){return Ce.measureText(we).width}).reduce(function(we,oe){return oe>we?oe:we},0)};if(ve)if(Ce.font=ke.string,ge){var vt=D.lineWidths=[0],N=D.lineHeights=[],Ft=0,Ca=0;Ce.textAlign="left",Ce.textBaseline="top",g.each(D.legendItems,function(pe,we){var oe,z;g.isArray(pe.text)?(oe=xa(pe.text),z=de*pe.text.length+Z.padding):(oe=Ce.measureText(pe.text).width,z=de+Z.padding),oe+=O(Z,de)+de/2,vt[vt.length-1]+oe+2*Z.padding>J.width&&(N.push(Ft),Ft=0,vt[vt.length-(we>0?0:1)]=0,Ca++),pe.lineOrColumnIndex=Ca,z>Ft&&(Ft=z),Oe[we]={left:0,top:0,width:oe,height:z},vt[vt.length-1]+=oe+Z.padding}),N.push(Ft),J.height+=N.reduce(function(pe,we){return pe+we},0)}else{var Ie=Z.padding,ie=D.columnWidths=[],$e=D.columnHeights=[],tr=Z.padding,gt=0,rr=0,Yn=0;g.each(D.legendItems,function(pe,we){var oe,z;g.isArray(pe.text)?(oe=xa(pe.text),z=de*pe.text.length):(oe=Ce.measureText(pe.text).width,z=de),oe+=O(Z,de)+de/2,rr+de+2*Ie>J.height&&(tr+=gt+Z.padding,ie.push(gt),$e.push(rr),gt=0,rr=0,Yn++),pe.lineOrColumnIndex=Yn,gt=Math.max(gt,oe),rr+=z+Ie,Oe[we]={left:0,top:0,width:oe,height:z}}),tr+=gt,ie.push(gt),$e.push(rr),J.width+=tr}D.width=J.width,D.height=J.height},b._element.prototype.draw=function re(){var D=this,Q=D.options,Z=Q.labels,ve=x.global,Ce=ve.defaultColor,ke=ve.elements.line,de=D.height,Oe=D.columnHeights,J=D.columnWidths,ge=D.width,xa=D.lineWidths,vt=D.lineHeights;if(Q.display){var ie,N=D.ctx,Ft=S(Z.fontColor,ve.defaultFontColor),Ca=g.options._parseFont(Z),Ie=Ca.size;N.textAlign="left",N.textBaseline="middle",N.lineWidth=.5,N.strokeStyle=Ft,N.fillStyle=Ft,N.font=Ca.string;var $e=O(Z,Ie),tr=D.legendHitBoxes,we=function(z,se){switch(Q.align){case"start":return Z.padding;case"end":return z-se;default:return(z-se+Z.padding)/2}},oe=D.isHorizontal();ie=oe?{x:D.left+we(ge,xa[0]),y:D.top+Z.padding,line:0}:{x:D.left+Z.padding,y:D.top+we(de,Oe[0]),line:0},g.each(D.legendItems,function(z,se){var ee,He,Lt;z.lineOrColumnIndex>ie.line&&(oe?(ie.y+=vt[ie.line],ie.line=z.lineOrColumnIndex,ie.x=D.left+we(ge,xa[ie.line])):(ie.x+=J[ie.line]+Z.padding,ie.line=z.lineOrColumnIndex,ie.y=D.top+we(de,Oe[ie.line]))),g.isArray(z.text)?(ee=z.text.map(function(Dr){return N.measureText(Dr).width}).reduce(function(Dr,ls){return ls>Dr?ls:Dr},0),Lt=Ie/2*(z.text.length-1),He=Ie*z.text.length):(ee=N.measureText(z.text).width,Lt=0,He=Ie);var Rt=$e+Ie/2+ee,tt=ie.x,wa=ie.y,$n=oe?Math.trunc((vt[ie.line]-tr[se].height)/2):0;(function(z,se,ee){if(!(isNaN($e)||$e<=0)){N.save();var He=S(ee.lineWidth,ke.borderWidth);if(N.fillStyle=S(ee.fillStyle,Ce),N.lineCap=S(ee.lineCap,ke.borderCapStyle),N.lineDashOffset=S(ee.lineDashOffset,ke.borderDashOffset),N.lineJoin=S(ee.lineJoin,ke.borderJoinStyle),N.lineWidth=He,N.strokeStyle=S(ee.strokeStyle,Ce),N.setLineDash&&N.setLineDash(S(ee.lineDash,ke.borderDash)),Q.labels&&Q.labels.usePointStyle){var Lt=$e*Math.SQRT2/2;g.canvas.drawPoint(N,ee.pointStyle,Lt,z+$e/2,se+Ie/2)}else 0!==He&&N.strokeRect(z,se,$e,Ie),N.fillRect(z,se,$e,Ie);N.restore()}})(tt,wa+Lt+$n,z),tr[se].left=tt,tr[se].top=wa,function(z,se,ee,He){var Lt=Ie/2,Rt=$e+Lt+z,tt=se+Lt;g.isArray(ee.text)?g.each(ee.text,function(wa,$n){N.fillText(wa,Rt,tt+$n*Ie)}):N.fillText(ee.text,Rt,tt),ee.hidden&&(g.isArray(ee.text)?function(z,se,ee,He){N.beginPath(),N.lineWidth=2,N.moveTo(z,se),N.lineTo(z+ee,se+He),N.moveTo(z,se+He),N.lineTo(z+ee,se),N.stroke()}(Rt,tt,He,(ee.text.length-1)*(Ie-1)):function(z,se,ee){N.beginPath(),N.lineWidth=2,N.moveTo(z,se),N.lineTo(z+ee,se),N.stroke()}(Rt,tt,He))}(tt,wa+$n,z,ee),oe?ie.x+=Rt+Z.padding:ie.y+=He+Z.padding})}};const g=Chart.helpers,x=Chart.defaults,S=g.valueOrDefault;function O(D,Q){return D.usePointStyle&&D.boxWidth>Q?Q:D.boxWidth}}function ms(){if("undefined"==typeof Chart)return void console.log("Chart not defined (guessing this is a universal build, and I don't know why this happens -- Aviad)");Chart.Tooltip.prototype.drawBody=function g(x,S,O){var de,F=S.bodyFontSize,re=S.bodySpacing,D=S._bodyAlign,Q=S.body,Z=S.displayColors,ve=S.labelColors,Ce=0,ke=Z?b(S,"left"):0;O.textAlign=D,O.textBaseline="top",O.font=c.fontString(F,S._bodyFontStyle,S._bodyFontFamily),x.x=b(S,D);var Oe=function(J){O.fillText(J,x.x+Ce,x.y),x.y+=F+re};O.fillStyle=S.bodyFontColor,c.each(S.beforeBody,Oe),Ce=Z&&"right"!==D?"center"===D?F/2+1:F+2:0,c.each(Q,function(J,ge){O.fillStyle=de=S.labelTextColors[ge],c.each(J.before,Oe),Z&&(O.fillStyle=S.legendColorBackground,O.fillRect(ke,x.y,F,F),O.lineWidth=1,O.strokeStyle=ve[ge].borderColor,O.strokeRect(ke,x.y,F,F),O.fillStyle=ve[ge].backgroundColor,O.fillRect(ke+1,x.y+1,F-2,F-2),O.fillStyle=de),c.each(J.lines,Oe),c.each(J.after,Oe)}),Ce=0,c.each(S.afterBody,Oe),x.y-=re};const c=Chart.helpers;function b(x,S){return"center"===S?x.x+x.width/2:"right"===S?x.x+x.width-x.xPadding:x.x+x.xPadding}}}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/241.9edb409fc65bbd97.js b/dist/fansubid/browser/241.9edb409fc65bbd97.js new file mode 100644 index 000000000..e93614fbc --- /dev/null +++ b/dist/fansubid/browser/241.9edb409fc65bbd97.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[241],{4241:(K,U,m)=>{m.r(U),m.d(U,{CreateModule:()=>ze});var l=m(9808),b=m(8406),n=m(3075),C=m(9345),T=m(1385),c=m(6271),E=m(5094),q=m(210),R=m(7355),D=m(8613),k=m(8372),g=m(9094),v=m(8505),_=m(3900),h=m(8746),Z=m(5625),L=m(4249),t=m(5e3),B=m(3e3),F=m(8745),$=m(519),W=m(8439),X=m(5679),V=m(6781),tt=m(8987),O=m(7902),P=m(6925),y=m(8696),et=m(4137),it=m(6493),w=m(8616),p=m(7322),M=m(5245),A=m(7423),at=m(2368),ot=m(7238),j=m(4107),G=m(508),Q=m(7531),z=m(1079),nt=m(5899),rt=m(4834),Y=m(3626);function st(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function lt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function mt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2),t._UZ(1,"img",42),t.TgZ(2,"mat-form-field",43)(3,"mat-label"),t._uU(4,"Gambar Untuk Embed SEO"),t.qZA(),t.TgZ(5,"ngx-mat-file-input",44,45),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(6);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(7,"mat-icon",30),t._uU(8,"image"),t.qZA()(),t.TgZ(9,"mat-error",46)(10,"small"),t.YNc(11,st,3,3,"div",18),t.YNc(12,lt,2,1,"div",18),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("src",e.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",e.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",e.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageErrorText)}}function ct(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",23)(1,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",27),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ut(i,r){1&i&&(t.TgZ(0,"div",20)(1,"mat-slide-toggle",47),t._uU(2," Jadikan Private, Akses Hanya Dengan URL "),t.qZA()())}function dt(i,r){1&i&&(t.TgZ(0,"div",20)(1,"mat-slide-toggle",48),t._uU(2," Permanent Storage "),t.qZA()())}function _t(i,r){if(1&i&&(t.TgZ(0,"mat-option",49),t._uU(1),t.qZA()),2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.Oqu(e.name)}}function gt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Tidak Boleh Kosong"),t.qZA())}function pt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ft(i,r){1&i&&(t.TgZ(0,"mat-option",55),t._UZ(1,"mat-progress-bar",56),t.qZA())}function ht(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",58),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterAnimeSelected(s)}),t._UZ(1,"img",59),t.TgZ(2,"span",41),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.lnq("",e.id," :: ",null==e.media_type?null:e.media_type.toUpperCase()," :: ",e.title,"")}}function bt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,ht,4,5,"mat-option",57),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredAnime)}}function vt(i,r){if(1&i&&(t.TgZ(0,"small",60),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("anime_name").value)}}function xt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Tidak Boleh Kosong"),t.qZA())}function Ct(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Hanya Boleh Angka"),t.qZA())}function Tt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",50)(1,"mat-label"),t._uU(2,"Anime Terkait"),t.qZA(),t.TgZ(3,"input",51),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedAnime()}),t.qZA(),t.TgZ(4,"mat-icon",30),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,52),t.YNc(8,ft,2,0,"mat-option",53),t.YNc(9,bt,2,1,"ng-container",18),t.qZA(),t.YNc(10,vt,2,1,"small",54),t.TgZ(11,"mat-error"),t.YNc(12,xt,2,0,"div",18),t.YNc(13,Ct,2,0,"div",18),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("anime_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_id").hasError("pattern"))}}function Zt(i,r){1&i&&(t.TgZ(0,"mat-option",55),t._UZ(1,"mat-progress-bar",56),t.qZA())}function At(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",58),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterDoramaSelected(s)}),t._UZ(1,"img",59),t.TgZ(2,"span",41),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.mdl_id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.mdl_id," :: ",e.title,"")}}function kt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,At,4,4,"mat-option",57),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredDorama)}}function It(i,r){if(1&i&&(t.TgZ(0,"small",60),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("dorama_name").value)}}function Ut(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Tidak Boleh Kosong"),t.qZA())}function Et(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Hanya Boleh Angka"),t.qZA())}function qt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",50)(1,"mat-label"),t._uU(2,"Dorama Terkait"),t.qZA(),t.TgZ(3,"input",61),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedDorama()}),t.qZA(),t.TgZ(4,"mat-icon",30),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,62),t.YNc(8,Zt,2,0,"mat-option",53),t.YNc(9,kt,2,1,"ng-container",18),t.qZA(),t.YNc(10,It,2,1,"small",54),t.TgZ(11,"mat-error"),t.YNc(12,Ut,2,0,"div",18),t.YNc(13,Et,2,0,"div",18),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("pattern"))}}function Jt(i,r){1&i&&(t.TgZ(0,"mat-icon",30),t._uU(1,"short_text"),t.qZA())}function St(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeFansub(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Nt(i,r){1&i&&(t.TgZ(0,"mat-option",55),t._UZ(1,"mat-progress-bar",56),t.qZA())}function Bt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",58),t.NdJ("click",function(){const s=t.CHM(e).$implicit,u=t.oxw(2).index;return t.oxw(2).filterFansubSelected(s,u)}),t._UZ(1,"img",69),t.TgZ(2,"span",41),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.slug," :: ",e.name,"")}}function Ft(i,r){if(1&i&&(t.ynx(0),t.YNc(1,Bt,4,4,"mat-option",57),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredFansub)}}function yt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Tidak Boleh Kosong"),t.qZA())}function wt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Hanya Boleh Angka"),t.qZA())}function Mt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"div",63)(2,"mat-form-field",50)(3,"mat-label"),t._uU(4,"Fansub Terkait"),t.qZA(),t.TgZ(5,"input",64),t.NdJ("keyup",function(){const s=t.CHM(e).index;return t.oxw(2).resetSelectedFansub(s)}),t.qZA(),t.YNc(6,Jt,2,0,"mat-icon",65),t.YNc(7,St,3,0,"button",66),t.TgZ(8,"mat-autocomplete",null,67),t.YNc(10,Nt,2,0,"mat-option",53),t.YNc(11,Ft,2,1,"ng-container",18),t.qZA(),t.TgZ(12,"small",60),t._uU(13),t.qZA(),t.TgZ(14,"mat-error"),t.YNc(15,yt,2,0,"div",18),t.YNc(16,wt,2,0,"div",18),t.qZA()()()()}if(2&i){const e=r.$implicit,a=r.index,o=t.MAs(9),s=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",o),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").value||0===a),t.xp6(1),t.Q6J("ngIf",!e.get("fansub_id").value&&a>0),t.xp6(3),t.Q6J("ngIf",s.isLoading),t.xp6(1),t.Q6J("ngIf",!s.isLoading),t.xp6(2),t.Oqu(e.get("fansub_name").value),t.xp6(2),t.Q6J("ngIf",e.get("fansub_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").hasError("pattern"))}}function Qt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Tidak Boleh Kosong"),t.qZA())}function Rt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Dt(i,r){if(1&i&&t._UZ(0,"angular-editor",70),2&i){const e=t.oxw(2);t.Q6J("config",e.GS.angularEditorConfig)}}function Lt(i,r){1&i&&t._UZ(0,"div")}function Ot(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.attachmentLimitExceeded)," !")}}function Yt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.attachmentErrorText)}}function Ht(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",36)(1,"div",24)(2,"div",76),t._uU(3),t.ALo(4,"bytes"),t._UZ(5,"br")(6,"mat-progress-bar",77),t.qZA()(),t.TgZ(7,"div",78)(8,"button",26),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(3).submitAttachment(s)}),t.TgZ(9,"mat-icon",27),t._uU(10,"attachment"),t.qZA(),t._uU(11," Unggah "),t.qZA()()()}if(2&i){const e=r.$implicit,a=t.oxw(3);t.xp6(3),t.lnq(" ",e.status," :: ",e.progress,"% @ ",t.lcZ(4,6,e.speed),"/s "),t.xp6(3),t.Q6J("mode","determinate")("value",e.progress),t.xp6(2),t.Q6J("disabled",a.submitted||"complete"===e.status||"uploading"===e.status)}}function Kt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",10)(1,"mat-form-field",71)(2,"mat-label"),t._uU(3,"Upload Lampiran Berkas -- DDL"),t.qZA(),t.TgZ(4,"ngx-mat-file-input",72,73),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(5);return t.oxw(2).uploadAttachment(o,s)}),t.qZA(),t.TgZ(6,"mat-icon",30),t._uU(7,"attach_file"),t.qZA()(),t.TgZ(8,"mat-error",74)(9,"small"),t.YNc(10,Ot,3,3,"div",18),t.YNc(11,Yt,2,1,"div",18),t.qZA()()(),t.YNc(12,Ht,12,8,"div",75),t.ALo(13,"async")}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",null!==e.attachmentSelected)("accept",e.fileTypeAttachmentAllowed),t.xp6(6),t.Q6J("ngIf",e.attachmentLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.attachmentErrorText),t.xp6(1),t.Q6J("ngForOf",t.lcZ(13,6,e.uploads$))}}function Vt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",79),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).verify()}),t.TgZ(1,"mat-icon",27),t._uU(2,"enhanced_encryption"),t.qZA(),t._uU(3," Verifikasi Akun Untuk Upload DDL! "),t.qZA()}}function Pt(i,r){1&i&&(t.TgZ(0,"mat-icon",30),t._uU(1,"web"),t.qZA())}function jt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Gt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Tidak Boleh Kosong"),t.qZA())}function zt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function $t(i,r){1&i&&(t.TgZ(0,"mat-icon",30),t._uU(1,"link"),t.qZA())}function Wt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Xt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Tidak Boleh Kosong"),t.qZA())}function te(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Link Tidak Valid"),t.qZA())}function ee(i,r){if(1&i&&(t.TgZ(0,"div")(1,"div",80)(2,"mat-form-field",81)(3,"mat-label"),t._uU(4,"Nama Website"),t.qZA(),t._UZ(5,"input",82),t.YNc(6,Pt,2,0,"mat-icon",65),t.YNc(7,jt,3,0,"button",66),t.TgZ(8,"mat-error"),t.YNc(9,Gt,2,0,"div",18),t.YNc(10,zt,2,0,"div",18),t.qZA()(),t.TgZ(11,"mat-form-field",83)(12,"mat-label"),t._uU(13,"Tautan Link"),t.qZA(),t._UZ(14,"input",84),t.YNc(15,$t,2,0,"mat-icon",65),t.YNc(16,Wt,3,0,"button",66),t.TgZ(17,"mat-error"),t.YNc(18,Xt,2,0,"div",18),t.YNc(19,te,2,0,"div",18),t.qZA()()()()),2&i){const e=r.$implicit,a=r.index,o=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("required",o.hasRequiredField(e,"name")),t.xp6(1),t.Q6J("ngIf",e.get("name").value||0===a&&o.hasRequiredField(e,"name")),t.xp6(1),t.Q6J("ngIf",!e.get("name").value&&(a>0||!o.hasRequiredField(e,"name"))),t.xp6(2),t.Q6J("ngIf",e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("required",o.hasRequiredField(e,"url")),t.xp6(1),t.Q6J("ngIf",e.get("url").value||0===a&&o.hasRequiredField(e,"url")),t.xp6(1),t.Q6J("ngIf",!e.get("url").value&&(a>0||!o.hasRequiredField(e,"url"))),t.xp6(2),t.Q6J("ngIf",e.get("url").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("url").hasError("pattern"))}}function ie(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"span",8),t.NdJ("click",function(){return t.CHM(e),t.oxw().toggleDetailMode()}),t._uU(5),t.qZA(),t.TgZ(6,"b",9),t._uU(7,"Tambah Berkas Baru"),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",10)(10,"div",11)(11,"div",10),t.YNc(12,mt,13,6,"div",12),t.YNc(13,ct,5,1,"div",13),t.YNc(14,ut,3,0,"div",14),t.YNc(15,dt,3,0,"div",14),t.TgZ(16,"mat-form-field",15)(17,"mat-label"),t._uU(18,"Jenis Proyek"),t.qZA(),t.TgZ(19,"mat-select",16),t.YNc(20,_t,2,2,"mat-option",17),t.qZA(),t.TgZ(21,"mat-error"),t.YNc(22,gt,2,0,"div",18),t.YNc(23,pt,2,0,"div",18),t.qZA()(),t.YNc(24,Tt,14,7,"mat-form-field",19),t.YNc(25,qt,14,7,"mat-form-field",19),t.TgZ(26,"div",20),t._UZ(27,"mat-divider"),t.qZA(),t.TgZ(28,"div",21),t.YNc(29,Mt,17,10,"div",22),t.qZA(),t.TgZ(30,"div",23)(31,"div",10),t._UZ(32,"div",24),t.TgZ(33,"div",25)(34,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addFansub()}),t.TgZ(35,"mat-icon",27),t._uU(36,"add"),t.qZA(),t._uU(37," Tambah Fansub "),t.qZA()()()()()(),t.TgZ(38,"div",28)(39,"div",10)(40,"mat-form-field",15)(41,"mat-label"),t._uU(42,"Nama Berkas"),t.qZA(),t._UZ(43,"input",29),t.TgZ(44,"mat-icon",30),t._uU(45,"wysiwyg"),t.qZA(),t.TgZ(46,"mat-error"),t.YNc(47,Qt,2,0,"div",18),t.YNc(48,Rt,2,0,"div",18),t.qZA()(),t.YNc(49,Dt,1,1,"angular-editor",31),t.qZA(),t.TgZ(50,"div",10)(51,"div",20),t._UZ(52,"mat-divider"),t.qZA()(),t.YNc(53,Lt,1,0,"div",32),t.YNc(54,Kt,14,8,"ng-template",null,33,t.W1O),t.YNc(56,Vt,4,0,"ng-template",null,34,t.W1O),t.TgZ(58,"div",10)(59,"div",20),t._UZ(60,"mat-divider"),t.qZA()(),t.TgZ(61,"div",35),t.YNc(62,ee,20,13,"div",22),t.qZA(),t.TgZ(63,"div",36),t._UZ(64,"div",24)(65,"div",24)(66,"div",24),t.TgZ(67,"div",25)(68,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addDownloadLink()}),t.TgZ(69,"mat-icon",27),t._uU(70,"add"),t.qZA(),t._uU(71," Tambah URL Eksternal "),t.qZA()()()()(),t.TgZ(72,"div",10)(73,"div",37)(74,"div",10),t._UZ(75,"div",24),t.TgZ(76,"div",38)(77,"a",39)(78,"mat-icon",27),t._uU(79,"undo"),t.qZA(),t._uU(80," Batal "),t.qZA()(),t.TgZ(81,"div",38)(82,"button",40),t._uU(83," Simpan "),t.TgZ(84,"mat-icon",41),t._uU(85,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(55),a=t.MAs(57),o=t.oxw();t.Q6J("formGroup",o.fg),t.xp6(5),t.hij(" ",o.detailMode?"Sederhana":"Lengkap"," "),t.xp6(7),t.Q6J("ngIf",o.detailMode),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image&&o.detailMode),t.xp6(1),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified),t.xp6(1),t.Q6J("ngIf",o.permanentStorage&&o.isAttachmentUploaded),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngForOf",o.projectList),t.xp6(2),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("anime")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("dorama")),t.xp6(4),t.Q6J("ngForOf",o.getFansubControl.controls),t.xp6(5),t.Q6J("disabled",o.submitted),t.xp6(6),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.detailMode),t.xp6(4),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified)("ngIfThen",e)("ngIfElse",a),t.xp6(9),t.Q6J("ngForOf",o.getDownloadUrlControl.controls),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(9),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid||"uploading"===(null==o.attachmentSelected?null:o.attachmentSelected.status))}}let ae=(()=>{class i{constructor(e,a,o,s,u,d,f,I,J,S,N,$e,We,Xe){this.router=e,this.fb=a,this.bs=o,this.pi=s,this.anime=u,this.dorama=d,this.project=f,this.fansub=I,this.berkas=J,this.imgbb=S,this.toast=N,this.gs=$e,this.as=We,this.uploadService=Xe,this.detailMode=!1,this.submitted=!1,this.projectList=[],this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.uploadToast=null,this.timerTimeout=null,this.gambar=null,this.ddl=null,this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasCreate=null,this.subsUpload=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return c.t.fileTypeAttachmentAllowed.join(", ")}get permanentStorage(){var e,a;const o=null===(a=null===(e=this.AS.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role;return o===L.yS.ADMIN||o===L.yS.MODERATOR}get isAttachmentUploaded(){return null!==this.fg.controls.attachment_id.value}ngOnInit(){this.pi.updatePageMetaData("Berkas - Buat Baru","Halaman Membuat Berkas Baru","Create Berkas"),this.gs.isBrowser&&(this.loadProjectList(),this.initForm(),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:e=>{this.gs.log("[UPLOAD_EVENTS]",e),"complete"===e.status?(this.gs.log("[UPLOAD_COMPLETED]",e.response),this.fg.controls.attachment_id.patchValue(e.response.result.id),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:c.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",c.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload()},c.t.timeoutDeleteTempAttachmentTime)):"error"===e.status&&(this.gs.log("[UPLOAD_ERROR]",e.response,"error"),this.failOrCancelUpload(e.response))},error:e=>{this.gs.log("[UPLOAD_ERROR]",e,"error"),this.failOrCancelUpload(e)}}))}ngOnDestroy(){var e,a,o,s,u,d,f,I,J,S;this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),null===(e=this.subsProject)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe(),null===(o=this.subsAnimeDetail)||void 0===o||o.unsubscribe(),null===(s=this.subsDoramaDetail)||void 0===s||s.unsubscribe(),null===(u=this.subsProjectDetail)||void 0===u||u.unsubscribe();for(const N of this.subsFansubDetail)null==N||N.unsubscribe();null===(d=this.subsAnimeNew)||void 0===d||d.unsubscribe(),null===(f=this.subsDoramaNew)||void 0===f||f.unsubscribe(),null===(I=this.subsImgbb)||void 0===I||I.unsubscribe(),null===(J=this.subsBerkasCreate)||void 0===J||J.unsubscribe(),this.uploadService.disconnect(),null===(S=this.subsUpload)||void 0===S||S.unsubscribe()}toggleDetailMode(){this.detailMode=!this.detailMode}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:e=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",e),this.projectList=e.results,this.bs.idle()},error:e=>{this.gs.log("[PROJECT_LOAD_ERROR]",e,"error"),this.bs.idle()}})}hasRequiredField(e,a){return e.get(a).hasValidator(n.kI.required)}initForm(){var e,a;this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],projectType_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],anime_id:[null,n.kI.compose([])],anime_name:[null,n.kI.compose([])],dorama_id:[null,n.kI.compose([])],dorama_name:[null,n.kI.compose([])],fansub_list:this.fb.array([this.createFansub()]),image:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],attachment_id:[null,n.kI.compose([n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([]),private:[!1,n.kI.compose([n.kI.required])],permanent_storage:[!1,n.kI.compose([n.kI.required])]}),(null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.verified)||this.addDownloadLink(),this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.isLoading=!0),(0,_.w)(o=>this.anime.searchAnime(o).pipe((0,h.x)(()=>this.isLoading=!1))),(0,Z.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_SUCCESS]",o),this.filteredAnime=o.results},error:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_ERROR]",o,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.isLoading=!0),(0,_.w)(o=>this.dorama.searchDorama(o).pipe((0,h.x)(()=>this.isLoading=!1))),(0,Z.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_SUCCESS]",o);for(const s of o.results)s.mdl_id=s.mdl_id.split("-")[1],s.image_url=s.thumb;this.filteredDorama=o.results},error:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_ERROR]",o,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,Z.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_PROJECT_CHANGED]",o);const s=this.projectList.find(u=>u.id===o);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),s.name.toLowerCase().includes("anime")?(this.berkasType=s.name,this.fg.controls.anime_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([n.kI.required])):s.name.toLowerCase().includes("dorama")?(this.berkasType=s.name,this.fg.controls.dorama_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([n.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(){var e,a;const o=this.fb.group({name:[null,n.kI.compose([n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],url:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])]});return(null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.verified)||(o.controls.name.addValidators([n.kI.required]),o.controls.url.addValidators([n.kI.required])),o}removeDownloadLink(e){this.getDownloadUrlControl.removeAt(e)}addDownloadLink(){this.getDownloadUrlControl.push(this.createDownloadLink())}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(){const e=this.fb.group({fansub_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^\d+$/)])],fansub_name:[null,n.kI.compose([n.kI.required])]});return this.subsFansubDetail.push(e.get("fansub_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.isLoading=!0),(0,_.w)(a=>this.fansub.searchFansub(a).pipe((0,h.x)(()=>this.isLoading=!1))),(0,Z.X)(-1)).subscribe({next:a=>{this.gs.log("[BERKAS_CREATE_SEARCH_FANSUB_RESULT]",a),this.filteredFansub=a.results}})),e}removeFansub(e){var a;this.getFansubControl.removeAt(e),null===(a=this.subsFansubDetail[e])||void 0===a||a.unsubscribe(),this.subsFansubDetail.splice(e,1)}addFansub(){this.getFansubControl.push(this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(e){this.getFansubControl.controls[e].get("fansub_name").patchValue(null)}filterAnimeSelected(e){var a;this.gs.log("[ANIME_FILTER_CLICK]",e),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:e.id,name:e.title,image_url:e.image_url,type:null===(a=e.media_type)||void 0===a?void 0:a.toUpperCase()}).subscribe({next:o=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",o),this.animeCheckOrAddResponse=o.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(o.result.id),this.fg.controls.anime_name.patchValue(o.result.name)},error:o=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",o,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(e){this.gs.log("[DORAMA_FILTER_CLICK]",e),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(e.mdl_id,10),slug:e.slug,name:e.title,image_url:e.image_url,type:e.type}).subscribe({next:a=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",a),this.doramaCheckOrAddResponse=a.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(a.result.id),this.fg.controls.dorama_name.patchValue(a.result.name)},error:a=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",a,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(e,a){this.gs.log("[FANSUB_FILTER_CLICK]",e),this.getFansubControl.controls[a].get("fansub_id").patchValue(e.id),this.getFansubControl.controls[a].get("fansub_name").patchValue(e.name)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=c.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){var e;if(this.bs.busy(),this.submitted=!0,this.fg.invalid||"uploading"===(null===(e=this.attachmentSelected)||void 0===e?void 0:e.status))return this.submitted=!1,void this.bs.idle();const a=[];for(const o of this.fg.value.fansub_list)a.push(o.fansub_id);this.subsBerkasCreate=this.berkas.createBerkas({image:this.fg.value.image,name:this.fg.value.name,description:this.fg.value.description,private:this.fg.value.private,permanent_storage:this.fg.value.permanent_storage,projectType_id:this.fg.value.projectType_id,anime_id:this.fg.value.anime_id,dorama_id:this.fg.value.dorama_id,fansub_id:a,download_url:this.fg.value.download_url,attachment_id:this.fg.value.attachment_id}).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SUCCESS]",o),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/berkas")},error:o=>{this.gs.log("[BERKAS_CREATE_ERROR]",o,"error"),this.submitted=!1,this.bs.idle()}})}uploadAttachment(e,a){this.ddl=a;const o=e.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",o),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{o.size<=c.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(o):(this.attachmentLimitExceeded=c.t.fileSizeAttachmentTotalLimit,this.ddl.clear(e))}catch(s){this.ddl.clear(e)}}submitAttachment(e){const a=this.uploadService.state().find(o=>o.uploadId===e.uploadId);a&&(this.attachmentSelected=a,e.status="queue")}failOrCancelUpload(e=null){var a;this.attachmentSelected=null,this.attachmentErrorText=(null===(a=null==e?void 0:e.result)||void 0===a?void 0:a.message)||(null==e?void 0:e.info)||"Expired, Harap Upload Ulang!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.F0),t.Y36(n.qu),t.Y36(B.z),t.Y36(F.Z),t.Y36($.o),t.Y36(W.X),t.Y36(X.Y),t.Y36(V.T),t.Y36(tt.A),t.Y36(O.X),t.Y36(P.k),t.Y36(y.U),t.Y36(et.e),t.Y36(it.Lz))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-berkas-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["class","col-12",4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama","required",""],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],[1,"col-12","p-3"],["formArrayName","fansub_list"],[4,"ngFor","ngForOf"],[1,"col-12","mb-4"],[1,"col"],[1,"col","pb-3"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"me-1"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv","required",""],["matSuffix",""],["class","p-3 w-100","formControlName","description",3,"config",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["ddlVerified",""],["ddlNotVerified",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/berkas",1,"w-100",3,"disabled"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],[1,"px-3","w-100"],["formControlName","private","matTooltip","Hanya diakses melalui profil dan/atau url"],["formControlName","permanent_storage","matTooltip","Berkas terjamin tidak akan hilang / expired"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"border-radius","0","height","40px","width","30px","object-fit","cover",3,"src"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub","required","",3,"matAutocomplete","keyup"],["matSuffix","",4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],[1,"me-1",2,"border-radius","0","height","40px","width","40px","object-fit","cover",3,"src"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"px-3"],[3,"mode","value"],[1,"col-6","col-lg-4"],["mat-stroked-button","","color","accent",1,"w-100",3,"click"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Google Drive",3,"required"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://webshit.saya.com/01/02/halaman-post-download.html",3,"required"]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ie,86,25,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[w.t,l.O5,n._Y,n.JL,n.sg,p.KE,p.hX,T.Yh,M.Hw,p.R9,p.TO,A.lW,at.Rr,n.JJ,n.u,ot.gM,j.gD,n.Q7,l.sg,G.ey,Q.Nt,n.Fj,z.ZL,z.XC,nt.pW,rt.d,n.CE,n.x0,C.s6,A.zs,b.yS],pipes:[Y.$,l.Ov],styles:[""]}),i})();var H=m(6856),x=m(6688);function oe(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ne(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function re(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitImage()}),t.TgZ(2,"mat-icon",55),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function se(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function le(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function me(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",59)(1,"button",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitCover()}),t.TgZ(2,"mat-icon",55),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ce(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function ue(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function de(i,r){if(1&i&&(t.TgZ(0,"small",60)(1,"div"),t._uU(2),t.qZA()()),2&i){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function _e(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function ge(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function pe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function fe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function he(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function be(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ve(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",61),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(3).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",62),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function xe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function Ce(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function Te(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function Ze(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function Ae(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"RSS Link Tidak Valid"),t.qZA())}function ke(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){return t.CHM(e),t.oxw(2).onSubmit()}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Tambah Data Fansub Baru"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",13)(10,"div",6),t._UZ(11,"img",15),t.TgZ(12,"mat-form-field",16)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",17,18),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",19),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",20)(20,"small"),t.YNc(21,oe,3,3,"div",21),t.YNc(22,ne,2,1,"div",21),t.qZA()()(),t.YNc(23,re,5,1,"div",22),t.qZA()(),t.TgZ(24,"div",23)(25,"div",13)(26,"mat-form-field",24)(27,"mat-label"),t._uU(28,"Cover"),t.qZA(),t.TgZ(29,"ngx-mat-file-input",17,25),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(30);return t.oxw(2).uploadCover(o,s)}),t.qZA(),t.TgZ(31,"mat-icon",19),t._uU(32,"image"),t.qZA()(),t.TgZ(33,"mat-error",20)(34,"small"),t.YNc(35,se,3,3,"div",21),t.YNc(36,le,2,1,"div",21),t.qZA()(),t.YNc(37,me,5,1,"div",26),t.TgZ(38,"mat-form-field",27)(39,"mat-label"),t._uU(40,"Nama Fansub"),t.qZA(),t._UZ(41,"input",28),t.TgZ(42,"mat-icon",19),t._uU(43,"wysiwyg"),t.qZA(),t.TgZ(44,"mat-error"),t.YNc(45,ce,2,0,"div",21),t.YNc(46,ue,2,0,"div",21),t.qZA()(),t.TgZ(47,"mat-form-field",29)(48,"mat-label"),t._uU(49,"Singkatan"),t.qZA(),t._UZ(50,"input",30),t.TgZ(51,"mat-icon",19),t._uU(52,"short_text"),t.qZA(),t.YNc(53,de,3,1,"small",31),t.TgZ(54,"mat-error"),t.YNc(55,_e,2,0,"div",21),t.YNc(56,ge,2,0,"div",21),t.qZA()(),t._UZ(57,"angular-editor",32),t.TgZ(58,"mat-form-field",33)(59,"mat-label"),t._uU(60,"Mulai Ada Sejak"),t.qZA(),t.TgZ(61,"input",34),t.NdJ("focus",function(){return t.CHM(e),t.MAs(65).open()}),t.ALo(62,"date"),t.qZA(),t._UZ(63,"mat-datepicker-toggle",35)(64,"mat-datepicker",36,37),t.TgZ(66,"mat-error"),t.YNc(67,pe,2,0,"div",21),t.YNc(68,fe,2,0,"div",21),t.qZA()(),t.TgZ(69,"mat-form-field",33)(70,"mat-label"),t._uU(71,"Status"),t.qZA(),t.TgZ(72,"mat-select",38)(73,"mat-option",39),t._uU(74,"Tidak Aktif"),t.qZA(),t.TgZ(75,"mat-option",40),t._uU(76,"Aktif"),t.qZA()(),t.TgZ(77,"mat-hint",41),t._uU(78,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(79,"mat-error"),t.YNc(80,he,2,0,"div",21),t.YNc(81,be,2,0,"div",21),t.qZA()()()()(),t.TgZ(82,"div",13)(83,"div",6)(84,"div",13)(85,"mat-form-field",42)(86,"mat-label"),t._uU(87,"Tags & Kategori"),t.qZA(),t.TgZ(88,"mat-chip-list",null,43),t.YNc(90,ve,4,2,"mat-chip",44),t.TgZ(91,"input",45),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw(2).addTag(o)}),t.qZA(),t.TgZ(92,"mat-icon",19),t._uU(93,"loyalty"),t.qZA()(),t.TgZ(94,"mat-hint",41),t._uU(95,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(96,"div",13)(97,"div",6)(98,"div",13)(99,"mat-form-field",46)(100,"mat-label"),t._uU(101,"Tautan Website"),t.qZA(),t._UZ(102,"input",47),t.TgZ(103,"mat-icon",19),t._uU(104,"web"),t.qZA(),t.TgZ(105,"mat-error"),t.YNc(106,xe,2,0,"div",21),t.YNc(107,Ce,2,0,"div",21),t.qZA()(),t.TgZ(108,"mat-form-field",46)(109,"mat-label"),t._uU(110,"Facebook Fanpage"),t.qZA(),t._UZ(111,"input",48),t.TgZ(112,"mat-icon",19),t._uU(113,"facebook"),t.qZA(),t.TgZ(114,"mat-error"),t.YNc(115,Te,2,0,"div",21),t.qZA()(),t.TgZ(116,"mat-form-field",46)(117,"mat-label"),t._uU(118,"Tautan Discord"),t.qZA(),t._UZ(119,"input",49),t.TgZ(120,"mat-icon",19),t._UZ(121,"img",50),t.qZA(),t.TgZ(122,"mat-error"),t.YNc(123,Ze,2,0,"div",21),t.qZA()()()()(),t.TgZ(124,"div",13)(125,"mat-form-field",42)(126,"mat-label"),t._uU(127,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(128,"input",51),t.TgZ(129,"mat-icon",19),t._uU(130,"rss_feed"),t.qZA(),t.TgZ(131,"mat-error"),t.YNc(132,Ae,2,0,"div",21),t.qZA()()(),t.TgZ(133,"div",13)(134,"div",6)(135,"div",13),t._UZ(136,"div",52),t.TgZ(137,"div",53)(138,"a",54)(139,"mat-icon",55),t._uU(140,"undo"),t.qZA(),t._uU(141," Batal "),t.qZA()(),t.TgZ(142,"div",53)(143,"button",56),t._uU(144," Simpan "),t.TgZ(145,"mat-icon",57),t._uU(146,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(65),a=t.MAs(89),o=t.oxw(2);t.Q6J("formGroup",o.fg),t.xp6(11),t.Q6J("src",o.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.imageErrorText),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.coverErrorText),t.xp6(1),t.Q6J("ngIf",o.cover&&!o.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",o.slugInfo),t.xp6(2),t.Q6J("ngIf",o.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",o.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(62,48,o.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",o.fg.get("born").hasError("required")||o.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",o.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",o.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",o.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",o.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(8),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",o.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",o.fg.get("discord").hasError("pattern")),t.xp6(2),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("rss_feed").hasError("pattern")),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid)}}function Ie(i,r){if(1&i&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,ke,147,51,"form",7),t.qZA()()()),2&i){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}let Ue=(()=>{class i{constructor(e,a,o,s,u,d,f,I){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.imgbb=u,this.fansub=d,this.toast=f,this.gs=I,this.submitted=!1,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.image_url="/assets/img/form/no-image.png",this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.cover_url="/assets/img/form/no-image.png",this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsImgbb=null,this.subsFansub=null,this.subsCekFansubSlug=null,this.slugInfo="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnDestroy(){var e,a;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Buat Baru","Halaman Menambahkan Fansub Baru","Create Fansub"),this.gs.isBrowser&&this.initForm()}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],born:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],active:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],slug:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[[],n.kI.compose([])],image:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],cover:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],web:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],facebook:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],discord:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],rss_feed:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.slugInfo="Mengecek ..."),(0,_.w)(e=>this.fansub.cekSlug({slug:e})),(0,Z.X)(-1)).subscribe({next:e=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",e),this.slugInfo=e.result.message}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=c.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}uploadCover(e,a){this.gambar_=a,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[COVER_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.cover=o,this.cover_url=s.result.toString()},d.src=s.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=c.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch(s){this.cover=null,this.cover_url="/assets/img/form/no-image.png",this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.submitted=!1,this.coverErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){this.bs.busy();const e=[];if(this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord}),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansub=this.fansub.createFansub({image:this.fg.value.image,cover:this.fg.value.cover,name:this.fg.value.name,description:this.fg.value.description,born:this.fg.value.born.getTime(),active:this.fg.value.active,tags:this.fg.value.tags,slug:this.fg.value.slug,urls:e,rss_feed:this.fg.value.rss_feed}).subscribe({next:a=>{this.gs.log("[FANSUB_CREATE_SUCCESS]",a),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/fansub")},error:a=>{this.gs.log("[FANSUB_CREATE_ERROR]",a,"error"),this.submitted=!1,this.bs.idle()}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(B.z),t.Y36(F.Z),t.Y36(O.X),t.Y36(V.T),t.Y36(P.k),t.Y36(y.U))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-fansub-create"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan","required",""],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub","required",""],["class","text-info",4,"ngIf"],["formControlName","description","required","",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born","required","",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif","required",""],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["appearance","outline",1,"p-3","col-12","col-md-4",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["width","24px",3,"src"],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/fansub",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&t.YNc(0,Ie,8,3,"div",0),2&e&&t.Q6J("ngIf",a.fg)},directives:[l.O5,w.t,n._Y,n.JL,n.sg,p.KE,p.hX,T.Yh,M.Hw,p.R9,p.TO,A.lW,Q.Nt,n.Fj,n.JJ,n.u,n.Q7,C.s6,H.hl,H.nW,H.Mq,j.gD,G.ey,p.bx,x.qn,l.sg,x.HS,x.qH,x.oH,A.zs,b.yS],pipes:[Y.$,l.uU],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),i})();var Ee=m(7358);function qe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",31),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTo(s)}),t._uU(1),t.TgZ(2,"mat-icon",32),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Je(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Boleh Kosong"),t.qZA())}function Se(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Ne(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",31),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeCc(s)}),t._uU(1),t.TgZ(2,"mat-icon",32),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Be(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Fe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",31),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeBcc(s)}),t._uU(1),t.TgZ(2,"mat-icon",32),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ye(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function we(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Tidak Boleh Kosong"),t.qZA())}function Me(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Qe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Buat Email Baru & Kirim"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"mat-form-field",11)(11,"mat-label"),t._uU(12,"Penerima"),t.qZA(),t.TgZ(13,"mat-chip-list",null,12),t.YNc(15,qe,4,2,"mat-chip",13),t.qZA(),t.TgZ(16,"input",14),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTo(o)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"short_text"),t.qZA(),t.TgZ(19,"mat-hint",16)(20,"mat-error"),t.YNc(21,Je,2,0,"div",17),t.YNc(22,Se,2,0,"div",17),t.qZA()()(),t.TgZ(23,"mat-form-field",11)(24,"mat-label"),t._uU(25,"Carbon Copy"),t.qZA(),t.TgZ(26,"mat-chip-list",null,18),t.YNc(28,Ne,4,2,"mat-chip",13),t.qZA(),t.TgZ(29,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addCc(o)}),t.qZA(),t.TgZ(30,"mat-icon",15),t._uU(31,"short_text"),t.qZA(),t.TgZ(32,"mat-hint",16)(33,"mat-error"),t.YNc(34,Be,2,0,"div",17),t.qZA()()(),t.TgZ(35,"mat-form-field",11)(36,"mat-label"),t._uU(37,"Blind Carbon Copy"),t.qZA(),t.TgZ(38,"mat-chip-list",null,20),t.YNc(40,Fe,4,2,"mat-chip",13),t.qZA(),t.TgZ(41,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addBcc(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"short_text"),t.qZA(),t.TgZ(44,"mat-hint",16)(45,"mat-error"),t.YNc(46,ye,2,0,"div",17),t.qZA()()()()(),t.TgZ(47,"div",21)(48,"div",9)(49,"mat-form-field",22)(50,"mat-label"),t._uU(51,"Judul"),t.qZA(),t._UZ(52,"input",23),t.TgZ(53,"mat-icon",15),t._uU(54,"wysiwyg"),t.qZA(),t.TgZ(55,"mat-error"),t.YNc(56,we,2,0,"div",17),t.YNc(57,Me,2,0,"div",17),t.qZA()(),t._UZ(58,"angular-editor",24),t.qZA()()(),t.TgZ(59,"div",9)(60,"div",2)(61,"div",9),t._UZ(62,"div",25),t.TgZ(63,"div",26)(64,"a",27)(65,"mat-icon",28),t._uU(66,"undo"),t.qZA(),t._uU(67," Batal "),t.qZA()(),t.TgZ(68,"div",26)(69,"button",29),t._uU(70," Simpan "),t.TgZ(71,"mat-icon",30),t._uU(72,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(14),a=t.MAs(27),o=t.MAs(39),s=t.oxw();t.Q6J("formGroup",s.fg),t.xp6(10),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.to),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("to").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("to").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.cc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("cc").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.bcc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",o)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("bcc").hasError("pattern")),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",s.fg.get("subject").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("subject").hasError("pattern")),t.xp6(1),t.Q6J("config",s.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",s.submitted),t.xp6(5),t.Q6J("disabled",s.submitted||s.fg.invalid)}}let Re=(()=>{class i{constructor(e,a,o,s,u,d){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.gs=u,this.ms=d,this.submitted=!1,this.subsMail=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Mailbox - Buat Baru","Halaman Membuat Surel Baru","Create Email"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e;null===(e=this.subsMail)||void 0===e||e.unsubscribe()}initForm(){this.fg=this.fb.group({to:[[],n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEmailMulti)])],cc:[[],n.kI.compose([n.kI.pattern(c.t.regexEmailMulti)])],bcc:[[],n.kI.compose([n.kI.pattern(c.t.regexEmailMulti)])],subject:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],message:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])]})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsMail=this.ms.sendMail(this.fg.value).subscribe({next:e=>{this.gs.log("[MAIL_SEND_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/mailbox")},error:e=>{this.gs.log("[MAIL_SEND_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTo(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.to.push(o.trim()),a&&(a.value=""),this.fg.controls.to.patchValue(this.fg.value.to.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeTo(e){const a=this.fg.value.to.indexOf(e);a>=0&&this.fg.value.to.splice(a,1)}addCc(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.cc.push(o.trim()),a&&(a.value=""),this.fg.controls.cc.patchValue(this.fg.value.cc.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeCc(e){const a=this.fg.value.cc.indexOf(e);a>=0&&this.fg.value.cc.splice(a,1)}addBcc(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.bcc.push(o.trim()),a&&(a.value=""),this.fg.controls.bcc.patchValue(this.fg.value.bcc.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeBcc(e){const a=this.fg.value.bcc.indexOf(e);a>=0&&this.fg.value.bcc.splice(a,1)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(B.z),t.Y36(F.Z),t.Y36(y.U),t.Y36(Ee.Y))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mailbox-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["hintLabel","Gunakan , Jika Lebih Dari 1","appearance","outline",1,"p-3","col-12",3,"color"],["to",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","user@domain.tld","required","",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["matSuffix",""],["align","end"],[4,"ngIf"],["cc",""],["placeholder","user@domain.tld",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["bcc",""],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","subject","placeholder","Judul Pesan Blablabla ...","required",""],["formControlName","message","required","",1,"p-3","w-100",3,"config"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/mailbox",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,Qe,73,26,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[w.t,l.O5,n._Y,n.JL,n.sg,p.KE,p.hX,x.qn,l.sg,x.HS,M.Hw,x.qH,x.oH,p.R9,p.bx,p.TO,Q.Nt,n.Fj,n.JJ,n.u,n.Q7,C.s6,A.zs,b.yS,A.lW],styles:[""]}),i})();var De=m(9618);function Le(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function Oe(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageErrorText)}}function Ye(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2)(1,"button",33),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",30),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function He(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Tidak Boleh Kosong"),t.qZA())}function Ke(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Ve(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",35),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Pe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Tambah Data Berita & Informasi Baru"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),t._UZ(11,"img",11),t.TgZ(12,"mat-form-field",12)(13,"mat-label"),t._uU(14,"Gambar"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",13,14),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw().uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",16)(20,"small"),t.YNc(21,Le,3,3,"div",17),t.YNc(22,Oe,2,1,"div",17),t.qZA()()(),t.YNc(23,Ye,5,1,"div",18),t.qZA()(),t.TgZ(24,"div",19)(25,"div",9)(26,"mat-form-field",20)(27,"mat-label"),t._uU(28,"Judul"),t.qZA(),t._UZ(29,"input",21),t.TgZ(30,"mat-icon",15),t._uU(31,"wysiwyg"),t.qZA(),t.TgZ(32,"mat-error"),t.YNc(33,He,2,0,"div",17),t.YNc(34,Ke,2,0,"div",17),t.qZA()(),t.TgZ(35,"mat-form-field",20)(36,"mat-label"),t._uU(37,"Tags & Kategori"),t.qZA(),t.TgZ(38,"mat-chip-list",null,22),t.YNc(40,Ve,4,2,"mat-chip",23),t.TgZ(41,"input",24),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTag(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"loyalty"),t.qZA()(),t.TgZ(44,"mat-hint",25),t._uU(45,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()(),t._UZ(46,"angular-editor",26),t.qZA()()(),t.TgZ(47,"div",9)(48,"div",2)(49,"div",9),t._UZ(50,"div",27),t.TgZ(51,"div",28)(52,"a",29)(53,"mat-icon",30),t._uU(54,"undo"),t.qZA(),t._uU(55," Batal "),t.qZA()(),t.TgZ(56,"div",28)(57,"button",31),t._uU(58," Simpan "),t.TgZ(59,"mat-icon",32),t._uU(60,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(39),a=t.oxw();t.Q6J("formGroup",a.fg),t.xp6(11),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",a.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",a.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",a.imageErrorText),t.xp6(1),t.Q6J("ngIf",a.image&&!a.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",a.fg.get("title").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("title").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",a.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",a.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("config",a.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",a.submitted),t.xp6(5),t.Q6J("disabled",a.submitted||a.fg.invalid)}}const Ge=[{path:"",pathMatch:"full",redirectTo:"/home"},{path:"berkas",component:ae,data:{title:"Berkas - Buat Baru",description:"Halaman Unggah Berkas Baru",keywords:"Tambah Berkas Baru"}},{path:"fansub",component:Ue,canActivate:[E.H],data:{title:"Fansub - Buat Baru",description:"Halaman Menambahkan Fansub Baru",keywords:"Create Fansub",[c.t.decoratorVerifiedOnly]:!0}},{path:"mailbox",component:Re,canActivate:[E.H],data:{title:"Surel - Buat Baru",description:"Halaman Kirim Surel Baru",keywords:"Buat Surel Baru",[c.t.decoratorVerifiedOnly]:!0}},{path:"news",component:(()=>{class i{constructor(e,a,o,s,u,d,f){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.imgbb=u,this.news=d,this.gs=f,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.gambar=null,this.subsNews=null,this.subsImgbb=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Informasi - Buat Baru","Halaman Menambahkan Berita Baru","Create News"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e,a;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsNews)||void 0===a||a.unsubscribe()}initForm(){this.fg=this.fb.group({title:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],content:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],image:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],tags:[[],n.kI.compose([])]})}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=c.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNews=this.news.createNews({image:this.fg.value.image,title:this.fg.value.title,content:this.fg.value.content,tags:this.fg.value.tags}).subscribe({next:e=>{this.gs.log("[NEWS_CREATE_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/news")},error:e=>{this.gs.log("[NEWS_CREATE_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(B.z),t.Y36(F.Z),t.Y36(O.X),t.Y36(De.Y),t.Y36(y.U))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-news-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","title","placeholder","Berita Terkini Blablabla ...","required",""],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["align","end"],["formControlName","content","required","",1,"p-3","w-100",3,"config"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/news",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,Pe,61,19,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[w.t,l.O5,n._Y,n.JL,n.sg,p.KE,p.hX,T.Yh,M.Hw,p.R9,p.TO,A.lW,Q.Nt,n.Fj,n.JJ,n.u,n.Q7,x.qn,l.sg,x.HS,x.qH,x.oH,p.bx,C.s6,A.zs,b.yS],pipes:[Y.$],styles:[""]}),i})(),data:{title:"Berita - Buat Baru",description:"Halaman Unggah Berita Baru",keywords:"Tambah Berita Baru"}}];let ze=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[l.ez,b.Bz.forChild(Ge),q.m,n.u5,n.UX,T.Ad,D.F,C.UM,R.T]]}),i})()},8616:(K,U,m)=>{m.d(U,{t:()=>k});var l=m(5e3),b=m(8406),n=m(8696),C=m(7140),T=m(9808),c=m(1861);function E(g,v){if(1&g&&l._UZ(0,"div",4),2&g){const _=l.oxw();l.Udp("background-size",_.GS.sizeContain?"contain":"cover")("background-image","url("+_.GS.bannerImg+")")("background-repeat",_.GS.bgRepeat?"repeat-x":"no-repeat")("height","/home"===_.ROUTER.url||"/berkas"===_.ROUTER.url?"192px":"128px")("background-position-y","/berkas"===_.ROUTER.url?"22.5%":"")}}function q(g,v){if(1&g&&(l.TgZ(0,"strong",10),l._uU(1," -- "),l.TgZ(2,"i")(3,"a",11),l._uU(4),l.qZA()()()),2&g){const _=l.oxw().$implicit;l.xp6(3),l.MGl("routerLink","/user/",_.notifCreator,""),l.xp6(1),l.hij(" ",_.notifCreator," ")}}function R(g,v){if(1&g){const _=l.EpF();l.TgZ(0,"button",12),l.NdJ("click",function(){l.CHM(_);const Z=l.oxw().$implicit;return l.oxw().removeNotif(Z.notifData.id)}),l.qZA()}}function D(g,v){if(1&g&&(l.TgZ(0,"div",5)(1,"div")(2,"strong",6),l._uU(3),l.qZA(),l._UZ(4,"span",7),l.ALo(5,"safeInnerHtml"),l.YNc(6,q,5,2,"strong",8),l.YNc(7,R,1,0,"button",9),l.qZA()()),2&g){const _=v.$implicit;l.xp6(1),l.Gre("alert alert-",_.notifData.type," alert-dismissible fade show"),l.xp6(2),l.Oqu(_.notifData.title),l.xp6(1),l.Q6J("innerHTML",l.lcZ(5,7,_.notifData.content),l.oJD),l.xp6(2),l.Q6J("ngIf",_.notifCreator),l.xp6(1),l.Q6J("ngIf",_.notifData.dismissible)}}let k=(()=>{class g{constructor(_,h,Z){this.router=_,this.gs=h,this.notif=Z}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(_){this.notif.removeNotif(_)}}return g.\u0275fac=function(_){return new(_||g)(l.Y36(b.F0),l.Y36(n.U),l.Y36(C.T))},g.\u0275cmp=l.Xpm({type:g,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(_,h){1&_&&(l.YNc(0,E,1,10,"div",0),l.TgZ(1,"div",1)(2,"div",2),l.YNc(3,D,8,9,"div",3),l.qZA()()),2&_&&(l.Q6J("ngIf",h.GS.bannerImg&&("/home"===h.ROUTER.url||"/berkas"===h.ROUTER.url||"/fansub"===h.ROUTER.url||"/berkas"===h.ROUTER.url||"/anime"===h.ROUTER.url||h.ROUTER.url.includes("/anime?")||"/dorama"===h.ROUTER.url||h.ROUTER.url.includes("/dorama?"))),l.xp6(3),l.Q6J("ngForOf",h.NOTIF.notifications))},directives:[T.O5,T.sg,b.yS],pipes:[c.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%;background-image:url(/assets/img/home-banner.png)}"]}),g})()},8613:(K,U,m)=>{m.d(U,{F:()=>T});var l=m(9808),b=m(8406),n=m(7355),C=m(5e3);let T=(()=>{class c{}return c.\u0275fac=function(q){return new(q||c)},c.\u0275mod=C.oAB({type:c}),c.\u0275inj=C.cJS({imports:[[l.ez,b.Bz,n.T]]}),c})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/241.e0ae2ca5a70b640e.js b/dist/fansubid/browser/241.e0ae2ca5a70b640e.js deleted file mode 100644 index 3284166b1..000000000 --- a/dist/fansubid/browser/241.e0ae2ca5a70b640e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[241],{4241:(K,U,m)=>{m.r(U),m.d(U,{CreateModule:()=>ze});var l=m(9808),b=m(8406),n=m(3075),C=m(9345),T=m(1385),c=m(6271),E=m(5094),q=m(210),R=m(7355),D=m(8613),k=m(8372),g=m(9094),v=m(8505),_=m(3900),h=m(8746),Z=m(5625),L=m(4249),t=m(5e3),B=m(3e3),F=m(8745),$=m(519),W=m(8439),X=m(5679),V=m(6781),tt=m(8987),O=m(7902),P=m(6925),y=m(8696),et=m(4137),it=m(6493),w=m(8616),p=m(7322),M=m(5245),A=m(7423),at=m(2368),ot=m(7238),j=m(4107),G=m(508),Q=m(7531),z=m(1079),nt=m(5899),rt=m(4834),Y=m(3626);function st(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function lt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function mt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2),t._UZ(1,"img",42),t.TgZ(2,"mat-form-field",43)(3,"mat-label"),t._uU(4,"Gambar Untuk Embed SEO"),t.qZA(),t.TgZ(5,"ngx-mat-file-input",44,45),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(6);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(7,"mat-icon",30),t._uU(8,"image"),t.qZA()(),t.TgZ(9,"mat-error",46)(10,"small"),t.YNc(11,st,3,3,"div",18),t.YNc(12,lt,2,1,"div",18),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("src",e.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",e.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",e.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.imageErrorText)}}function ct(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",23)(1,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",27),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ut(i,r){1&i&&(t.TgZ(0,"div",20)(1,"mat-slide-toggle",47),t._uU(2," Jadikan Private, Akses Hanya Dengan URL "),t.qZA()())}function dt(i,r){1&i&&(t.TgZ(0,"div",20)(1,"mat-slide-toggle",48),t._uU(2," Permanent Storage "),t.qZA()())}function _t(i,r){if(1&i&&(t.TgZ(0,"mat-option",49),t._uU(1),t.qZA()),2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.Oqu(e.name)}}function gt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Tidak Boleh Kosong"),t.qZA())}function pt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ft(i,r){1&i&&(t.TgZ(0,"mat-option",55),t._UZ(1,"mat-progress-bar",56),t.qZA())}function ht(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",58),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterAnimeSelected(s)}),t._UZ(1,"img",59),t.TgZ(2,"span",41),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.lnq("",e.id," :: ",null==e.media_type?null:e.media_type.toUpperCase()," :: ",e.title,"")}}function bt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,ht,4,5,"mat-option",57),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredAnime)}}function vt(i,r){if(1&i&&(t.TgZ(0,"small",60),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("anime_name").value)}}function xt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Tidak Boleh Kosong"),t.qZA())}function Ct(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Anime Hanya Boleh Angka"),t.qZA())}function Tt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",50)(1,"mat-label"),t._uU(2,"Anime Terkait"),t.qZA(),t.TgZ(3,"input",51),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedAnime()}),t.qZA(),t.TgZ(4,"mat-icon",30),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,52),t.YNc(8,ft,2,0,"mat-option",53),t.YNc(9,bt,2,1,"ng-container",18),t.qZA(),t.YNc(10,vt,2,1,"small",54),t.TgZ(11,"mat-error"),t.YNc(12,xt,2,0,"div",18),t.YNc(13,Ct,2,0,"div",18),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("anime_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("anime_id").hasError("pattern"))}}function Zt(i,r){1&i&&(t.TgZ(0,"mat-option",55),t._UZ(1,"mat-progress-bar",56),t.qZA())}function At(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",58),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(4).filterDoramaSelected(s)}),t._UZ(1,"img",59),t.TgZ(2,"span",41),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.mdl_id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.mdl_id," :: ",e.title,"")}}function kt(i,r){if(1&i&&(t.ynx(0),t.YNc(1,At,4,4,"mat-option",57),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredDorama)}}function It(i,r){if(1&i&&(t.TgZ(0,"small",60),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.fg.get("dorama_name").value)}}function Ut(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Tidak Boleh Kosong"),t.qZA())}function Et(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Dorama Hanya Boleh Angka"),t.qZA())}function qt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-form-field",50)(1,"mat-label"),t._uU(2,"Dorama Terkait"),t.qZA(),t.TgZ(3,"input",61),t.NdJ("keyup",function(){return t.CHM(e),t.oxw(2).resetSelectedDorama()}),t.qZA(),t.TgZ(4,"mat-icon",30),t._uU(5,"short_text"),t.qZA(),t.TgZ(6,"mat-autocomplete",null,62),t.YNc(8,Zt,2,0,"mat-option",53),t.YNc(9,kt,2,1,"ng-container",18),t.qZA(),t.YNc(10,It,2,1,"small",54),t.TgZ(11,"mat-error"),t.YNc(12,Ut,2,0,"div",18),t.YNc(13,Et,2,0,"div",18),t.qZA()()}if(2&i){const e=t.MAs(7),a=t.oxw(2);t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",e),t.xp6(5),t.Q6J("ngIf",a.isLoading),t.xp6(1),t.Q6J("ngIf",!a.isLoading),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_name").value),t.xp6(2),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("dorama_id").hasError("pattern"))}}function Jt(i,r){1&i&&(t.TgZ(0,"mat-icon",30),t._uU(1,"short_text"),t.qZA())}function St(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeFansub(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Nt(i,r){1&i&&(t.TgZ(0,"mat-option",55),t._UZ(1,"mat-progress-bar",56),t.qZA())}function Bt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-option",58),t.NdJ("click",function(){const s=t.CHM(e).$implicit,u=t.oxw(2).index;return t.oxw(2).filterFansubSelected(s,u)}),t._UZ(1,"img",69),t.TgZ(2,"span",41),t._uU(3),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("value",e.id),t.xp6(1),t.s9C("src",e.image_url,t.LSH),t.xp6(2),t.AsE("",e.slug," :: ",e.name,"")}}function Ft(i,r){if(1&i&&(t.ynx(0),t.YNc(1,Bt,4,4,"mat-option",57),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.filteredFansub)}}function yt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Tidak Boleh Kosong"),t.qZA())}function wt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"ID Fansub Hanya Boleh Angka"),t.qZA())}function Mt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"div",63)(2,"mat-form-field",50)(3,"mat-label"),t._uU(4,"Fansub Terkait"),t.qZA(),t.TgZ(5,"input",64),t.NdJ("keyup",function(){const s=t.CHM(e).index;return t.oxw(2).resetSelectedFansub(s)}),t.qZA(),t.YNc(6,Jt,2,0,"mat-icon",65),t.YNc(7,St,3,0,"button",66),t.TgZ(8,"mat-autocomplete",null,67),t.YNc(10,Nt,2,0,"mat-option",53),t.YNc(11,Ft,2,1,"ng-container",18),t.qZA(),t.TgZ(12,"small",60),t._uU(13),t.qZA(),t.TgZ(14,"mat-error"),t.YNc(15,yt,2,0,"div",18),t.YNc(16,wt,2,0,"div",18),t.qZA()()()()}if(2&i){const e=r.$implicit,a=r.index,o=t.MAs(9),s=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("matAutocomplete",o),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").value||0===a),t.xp6(1),t.Q6J("ngIf",!e.get("fansub_id").value&&a>0),t.xp6(3),t.Q6J("ngIf",s.isLoading),t.xp6(1),t.Q6J("ngIf",!s.isLoading),t.xp6(2),t.Oqu(e.get("fansub_name").value),t.xp6(2),t.Q6J("ngIf",e.get("fansub_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("fansub_id").hasError("pattern"))}}function Qt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Tidak Boleh Kosong"),t.qZA())}function Rt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Dt(i,r){if(1&i&&t._UZ(0,"angular-editor",70),2&i){const e=t.oxw(2);t.Q6J("config",e.GS.angularEditorConfig)}}function Lt(i,r){1&i&&t._UZ(0,"div")}function Ot(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.attachmentLimitExceeded)," !")}}function Yt(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.attachmentErrorText)}}function Ht(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",36)(1,"div",24)(2,"div",76),t._uU(3),t.ALo(4,"bytes"),t._UZ(5,"br")(6,"mat-progress-bar",77),t.qZA()(),t.TgZ(7,"div",78)(8,"button",26),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(3).submitAttachment(s)}),t.TgZ(9,"mat-icon",27),t._uU(10,"attachment"),t.qZA(),t._uU(11," Unggah "),t.qZA()()()}if(2&i){const e=r.$implicit,a=t.oxw(3);t.xp6(3),t.lnq(" ",e.status," :: ",e.progress,"% @ ",t.lcZ(4,6,e.speed),"/s "),t.xp6(3),t.Q6J("mode","determinate")("value",e.progress),t.xp6(2),t.Q6J("disabled",a.submitted||"complete"===e.status||"uploading"===e.status)}}function Kt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",10)(1,"mat-form-field",71)(2,"mat-label"),t._uU(3,"Upload Lampiran Berkas -- DDL"),t.qZA(),t.TgZ(4,"ngx-mat-file-input",72,73),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(5);return t.oxw(2).uploadAttachment(o,s)}),t.qZA(),t.TgZ(6,"mat-icon",30),t._uU(7,"attach_file"),t.qZA()(),t.TgZ(8,"mat-error",74)(9,"small"),t.YNc(10,Ot,3,3,"div",18),t.YNc(11,Yt,2,1,"div",18),t.qZA()()(),t.YNc(12,Ht,12,8,"div",75),t.ALo(13,"async")}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",null!==e.attachmentSelected)("accept",e.fileTypeAttachmentAllowed),t.xp6(6),t.Q6J("ngIf",e.attachmentLimitExceeded),t.xp6(1),t.Q6J("ngIf",e.attachmentErrorText),t.xp6(1),t.Q6J("ngForOf",t.lcZ(13,6,e.uploads$))}}function Vt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",79),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).verify()}),t.TgZ(1,"mat-icon",27),t._uU(2,"enhanced_encryption"),t.qZA(),t._uU(3," Verifikasi Akun Untuk Upload DDL! "),t.qZA()}}function Pt(i,r){1&i&&(t.TgZ(0,"mat-icon",30),t._uU(1,"web"),t.qZA())}function jt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Gt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Tidak Boleh Kosong"),t.qZA())}function zt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function $t(i,r){1&i&&(t.TgZ(0,"mat-icon",30),t._uU(1,"link"),t.qZA())}function Wt(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"button",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index;return t.oxw(2).removeDownloadLink(o)}),t.TgZ(1,"mat-icon"),t._uU(2,"close"),t.qZA()()}}function Xt(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Tidak Boleh Kosong"),t.qZA())}function te(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tautan Link Tidak Valid"),t.qZA())}function ee(i,r){if(1&i&&(t.TgZ(0,"div")(1,"div",80)(2,"mat-form-field",81)(3,"mat-label"),t._uU(4,"Nama Website"),t.qZA(),t._UZ(5,"input",82),t.YNc(6,Pt,2,0,"mat-icon",65),t.YNc(7,jt,3,0,"button",66),t.TgZ(8,"mat-error"),t.YNc(9,Gt,2,0,"div",18),t.YNc(10,zt,2,0,"div",18),t.qZA()(),t.TgZ(11,"mat-form-field",83)(12,"mat-label"),t._uU(13,"Tautan Link"),t.qZA(),t._UZ(14,"input",84),t.YNc(15,$t,2,0,"mat-icon",65),t.YNc(16,Wt,3,0,"button",66),t.TgZ(17,"mat-error"),t.YNc(18,Xt,2,0,"div",18),t.YNc(19,te,2,0,"div",18),t.qZA()()()()),2&i){const e=r.$implicit,a=r.index,o=t.oxw(2);t.xp6(1),t.Q6J("formGroupName",a),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("required",o.hasRequiredField(e,"name")),t.xp6(1),t.Q6J("ngIf",e.get("name").value||0===a&&o.hasRequiredField(e,"name")),t.xp6(1),t.Q6J("ngIf",!e.get("name").value&&(a>0||!o.hasRequiredField(e,"name"))),t.xp6(2),t.Q6J("ngIf",e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("required",o.hasRequiredField(e,"url")),t.xp6(1),t.Q6J("ngIf",e.get("url").value||0===a&&o.hasRequiredField(e,"url")),t.xp6(1),t.Q6J("ngIf",!e.get("url").value&&(a>0||!o.hasRequiredField(e,"url"))),t.xp6(2),t.Q6J("ngIf",e.get("url").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("url").hasError("pattern"))}}function ie(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"span",8),t.NdJ("click",function(){return t.CHM(e),t.oxw().toggleDetailMode()}),t._uU(5),t.qZA(),t.TgZ(6,"b",9),t._uU(7,"Tambah Berkas Baru"),t.qZA()()(),t.TgZ(8,"div",2)(9,"div",10)(10,"div",11)(11,"div",10),t.YNc(12,mt,13,6,"div",12),t.YNc(13,ct,5,1,"div",13),t.YNc(14,ut,3,0,"div",14),t.YNc(15,dt,3,0,"div",14),t.TgZ(16,"mat-form-field",15)(17,"mat-label"),t._uU(18,"Jenis Proyek"),t.qZA(),t.TgZ(19,"mat-select",16),t.YNc(20,_t,2,2,"mat-option",17),t.qZA(),t.TgZ(21,"mat-error"),t.YNc(22,gt,2,0,"div",18),t.YNc(23,pt,2,0,"div",18),t.qZA()(),t.YNc(24,Tt,14,7,"mat-form-field",19),t.YNc(25,qt,14,7,"mat-form-field",19),t.TgZ(26,"div",20),t._UZ(27,"mat-divider"),t.qZA(),t.TgZ(28,"div",21),t.YNc(29,Mt,17,10,"div",22),t.qZA(),t.TgZ(30,"div",23)(31,"div",10),t._UZ(32,"div",24),t.TgZ(33,"div",25)(34,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addFansub()}),t.TgZ(35,"mat-icon",27),t._uU(36,"add"),t.qZA(),t._uU(37," Tambah Fansub "),t.qZA()()()()()(),t.TgZ(38,"div",28)(39,"div",10)(40,"mat-form-field",15)(41,"mat-label"),t._uU(42,"Nama Berkas"),t.qZA(),t._UZ(43,"input",29),t.TgZ(44,"mat-icon",30),t._uU(45,"wysiwyg"),t.qZA(),t.TgZ(46,"mat-error"),t.YNc(47,Qt,2,0,"div",18),t.YNc(48,Rt,2,0,"div",18),t.qZA()(),t.YNc(49,Dt,1,1,"angular-editor",31),t.qZA(),t.TgZ(50,"div",10)(51,"div",20),t._UZ(52,"mat-divider"),t.qZA()(),t.YNc(53,Lt,1,0,"div",32),t.YNc(54,Kt,14,8,"ng-template",null,33,t.W1O),t.YNc(56,Vt,4,0,"ng-template",null,34,t.W1O),t.TgZ(58,"div",10)(59,"div",20),t._UZ(60,"mat-divider"),t.qZA()(),t.TgZ(61,"div",35),t.YNc(62,ee,20,13,"div",22),t.qZA(),t.TgZ(63,"div",36),t._UZ(64,"div",24)(65,"div",24)(66,"div",24),t.TgZ(67,"div",25)(68,"button",26),t.NdJ("click",function(){return t.CHM(e),t.oxw().addDownloadLink()}),t.TgZ(69,"mat-icon",27),t._uU(70,"add"),t.qZA(),t._uU(71," Tambah URL Eksternal "),t.qZA()()()()(),t.TgZ(72,"div",10)(73,"div",37)(74,"div",10),t._UZ(75,"div",24),t.TgZ(76,"div",38)(77,"a",39)(78,"mat-icon",27),t._uU(79,"undo"),t.qZA(),t._uU(80," Batal "),t.qZA()(),t.TgZ(81,"div",38)(82,"button",40),t._uU(83," Simpan "),t.TgZ(84,"mat-icon",41),t._uU(85,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(55),a=t.MAs(57),o=t.oxw();t.Q6J("formGroup",o.fg),t.xp6(5),t.hij(" ",o.detailMode?"Sederhana":"Lengkap"," "),t.xp6(7),t.Q6J("ngIf",o.detailMode),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image&&o.detailMode),t.xp6(1),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified),t.xp6(1),t.Q6J("ngIf",o.permanentStorage&&o.isAttachmentUploaded),t.xp6(1),t.Q6J("color","accent"),t.xp6(4),t.Q6J("ngForOf",o.projectList),t.xp6(2),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("projectType_id").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("anime")),t.xp6(1),t.Q6J("ngIf",o.berkasType.toLowerCase().includes("dorama")),t.xp6(4),t.Q6J("ngForOf",o.getFansubControl.controls),t.xp6(5),t.Q6J("disabled",o.submitted),t.xp6(6),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("ngIf",o.detailMode),t.xp6(4),t.Q6J("ngIf",null==o.AS.currentUserSubject||null==o.AS.currentUserSubject.value?null:o.AS.currentUserSubject.value.verified)("ngIfThen",e)("ngIfElse",a),t.xp6(9),t.Q6J("ngForOf",o.getDownloadUrlControl.controls),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(9),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid||"uploading"===(null==o.attachmentSelected?null:o.attachmentSelected.status))}}let ae=(()=>{class i{constructor(e,a,o,s,u,d,f,I,J,S,N,$e,We,Xe){this.router=e,this.fb=a,this.bs=o,this.pi=s,this.anime=u,this.dorama=d,this.project=f,this.fansub=I,this.berkas=J,this.imgbb=S,this.toast=N,this.gs=$e,this.as=We,this.uploadService=Xe,this.detailMode=!1,this.submitted=!1,this.projectList=[],this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentSelected=null,this.attachmentErrorText=null,this.attachmentLimitExceeded=null,this.uploadToast=null,this.timerTimeout=null,this.gambar=null,this.ddl=null,this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasCreate=null,this.subsUpload=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get GS(){return this.gs}get fileTypeAttachmentAllowed(){return c.t.fileTypeAttachmentAllowed.join(", ")}get permanentStorage(){var e,a;const o=null===(a=null===(e=this.AS.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.role;return o===L.yS.ADMIN||o===L.yS.MODERATOR}get isAttachmentUploaded(){return null!==this.fg.controls.attachment_id.value}ngOnInit(){this.pi.updatePageMetaData("Berkas - Buat Baru","Halaman Membuat Berkas Baru","Create Berkas"),this.gs.isBrowser&&(this.loadProjectList(),this.initForm(),this.uploads$=this.uploadService.connect(),this.subsUpload=this.uploadService.events.subscribe({next:e=>{this.gs.log("[UPLOAD_EVENTS]",e),"complete"===e.status?(this.gs.log("[UPLOAD_COMPLETED]",e.response),this.fg.controls.attachment_id.patchValue(e.response.result.id),this.uploadToast=this.toast.warning("Segera Kirim Data Berkas!","Lampiran Akan Dihapus ...",{closeButton:!1,timeOut:c.t.timeoutDeleteTempAttachmentTime,disableTimeOut:"extendedTimeOut",tapToDismiss:!1,progressAnimation:"decreasing"},!0),this.timerTimeout=setTimeout(()=>{this.gs.log("[UPLOAD_TIMEOUT]",c.t.timeoutDeleteTempAttachmentTime),this.failOrCancelUpload()},c.t.timeoutDeleteTempAttachmentTime)):"error"===e.status&&(this.gs.log("[UPLOAD_ERROR]",e.response,"error"),this.failOrCancelUpload(e.response))},error:e=>{this.gs.log("[UPLOAD_ERROR]",e,"error"),this.failOrCancelUpload(e)}}))}ngOnDestroy(){var e,a,o,s,u,d,f,I,J,S;this.uploadToast&&this.toast.remove(this.uploadToast.toastId),this.timerTimeout&&(clearTimeout(this.timerTimeout),this.timerTimeout=null),null===(e=this.subsProject)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe(),null===(o=this.subsAnimeDetail)||void 0===o||o.unsubscribe(),null===(s=this.subsDoramaDetail)||void 0===s||s.unsubscribe(),null===(u=this.subsProjectDetail)||void 0===u||u.unsubscribe();for(const N of this.subsFansubDetail)null==N||N.unsubscribe();null===(d=this.subsAnimeNew)||void 0===d||d.unsubscribe(),null===(f=this.subsDoramaNew)||void 0===f||f.unsubscribe(),null===(I=this.subsImgbb)||void 0===I||I.unsubscribe(),null===(J=this.subsBerkasCreate)||void 0===J||J.unsubscribe(),this.uploadService.disconnect(),null===(S=this.subsUpload)||void 0===S||S.unsubscribe()}toggleDetailMode(){this.detailMode=!this.detailMode}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:e=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",e),this.projectList=e.results,this.bs.idle()},error:e=>{this.gs.log("[PROJECT_LOAD_ERROR]",e,"error"),this.bs.idle()}})}hasRequiredField(e,a){return e.get(a).hasValidator(n.kI.required)}initForm(){var e,a;this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],projectType_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],anime_id:[null,n.kI.compose([])],anime_name:[null,n.kI.compose([])],dorama_id:[null,n.kI.compose([])],dorama_name:[null,n.kI.compose([])],fansub_list:this.fb.array([this.createFansub()]),image:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],attachment_id:[null,n.kI.compose([n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],download_url:this.fb.array([]),private:[!1,n.kI.compose([n.kI.required])],permanent_storage:[!1,n.kI.compose([n.kI.required])]}),(null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.verified)||this.addDownloadLink(),this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.isLoading=!0),(0,_.w)(o=>this.anime.searchAnime(o).pipe((0,h.x)(()=>this.isLoading=!1))),(0,Z.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_SUCCESS]",o),this.filteredAnime=o.results},error:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_ANIME_RESULT_ERROR]",o,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.isLoading=!0),(0,_.w)(o=>this.dorama.searchDorama(o).pipe((0,h.x)(()=>this.isLoading=!1))),(0,Z.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_SUCCESS]",o);for(const s of o.results)s.mdl_id=s.mdl_id.split("-")[1],s.image_url=s.thumb;this.filteredDorama=o.results},error:o=>{this.gs.log("[BERKAS_CREATE_SEARCH_DORAMA_RESULT_ERROR]",o,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,Z.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_PROJECT_CHANGED]",o);const s=this.projectList.find(u=>u.id===o);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),s.name.toLowerCase().includes("anime")?(this.berkasType=s.name,this.fg.controls.anime_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([n.kI.required])):s.name.toLowerCase().includes("dorama")?(this.berkasType=s.name,this.fg.controls.dorama_id.setValidators([n.kI.required,n.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([n.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(){var e,a;const o=this.fb.group({name:[null,n.kI.compose([n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],url:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])]});return(null===(a=null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)||void 0===a?void 0:a.verified)||(o.controls.name.addValidators([n.kI.required]),o.controls.url.addValidators([n.kI.required])),o}removeDownloadLink(e){this.getDownloadUrlControl.removeAt(e)}addDownloadLink(){this.getDownloadUrlControl.push(this.createDownloadLink())}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(){const e=this.fb.group({fansub_id:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^\d+$/)])],fansub_name:[null,n.kI.compose([n.kI.required])]});return this.subsFansubDetail.push(e.get("fansub_id").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.isLoading=!0),(0,_.w)(a=>this.fansub.searchFansub(a).pipe((0,h.x)(()=>this.isLoading=!1))),(0,Z.X)(-1)).subscribe({next:a=>{this.gs.log("[BERKAS_CREATE_SEARCH_FANSUB_RESULT]",a),this.filteredFansub=a.results}})),e}removeFansub(e){var a;this.getFansubControl.removeAt(e),null===(a=this.subsFansubDetail[e])||void 0===a||a.unsubscribe(),this.subsFansubDetail.splice(e,1)}addFansub(){this.getFansubControl.push(this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(e){this.getFansubControl.controls[e].get("fansub_name").patchValue(null)}filterAnimeSelected(e){var a;this.gs.log("[ANIME_FILTER_CLICK]",e),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:e.id,name:e.title,image_url:e.image_url,type:null===(a=e.media_type)||void 0===a?void 0:a.toUpperCase()}).subscribe({next:o=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",o),this.animeCheckOrAddResponse=o.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(o.result.id),this.fg.controls.anime_name.patchValue(o.result.name)},error:o=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",o,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(e){this.gs.log("[DORAMA_FILTER_CLICK]",e),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(e.mdl_id,10),slug:e.slug,name:e.title,image_url:e.image_url,type:e.type}).subscribe({next:a=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",a),this.doramaCheckOrAddResponse=a.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(a.result.id),this.fg.controls.dorama_name.patchValue(a.result.name)},error:a=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",a,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(e,a){this.gs.log("[FANSUB_FILTER_CLICK]",e),this.getFansubControl.controls[a].get("fansub_id").patchValue(e.id),this.getFansubControl.controls[a].get("fansub_name").patchValue(e.name)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=c.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){var e;if(this.bs.busy(),this.submitted=!0,this.fg.invalid||"uploading"===(null===(e=this.attachmentSelected)||void 0===e?void 0:e.status))return this.submitted=!1,void this.bs.idle();const a=[];for(const o of this.fg.value.fansub_list)a.push(o.fansub_id);this.subsBerkasCreate=this.berkas.createBerkas({image:this.fg.value.image,name:this.fg.value.name,description:this.fg.value.description,private:this.fg.value.private,permanent_storage:this.fg.value.permanent_storage,projectType_id:this.fg.value.projectType_id,anime_id:this.fg.value.anime_id,dorama_id:this.fg.value.dorama_id,fansub_id:a,download_url:this.fg.value.download_url,attachment_id:this.fg.value.attachment_id}).subscribe({next:o=>{this.gs.log("[BERKAS_CREATE_SUCCESS]",o),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/berkas")},error:o=>{this.gs.log("[BERKAS_CREATE_ERROR]",o,"error"),this.submitted=!1,this.bs.idle()}})}uploadAttachment(e,a){this.ddl=a;const o=e.target.files[0];this.attachmentLimitExceeded=null,this.attachmentErrorText=null,this.gs.log("[ATTACHMENT_SELECTED]",o),this.fg.controls.attachment_id.patchValue(null),this.uploadService.disconnect();try{o.size<=c.t.fileSizeAttachmentTotalLimit?this.uploadService.handleFiles(o):(this.attachmentLimitExceeded=c.t.fileSizeAttachmentTotalLimit,this.ddl.clear(e))}catch(s){this.ddl.clear(e)}}submitAttachment(e){const a=this.uploadService.state().find(o=>o.uploadId===e.uploadId);a&&(this.attachmentSelected=a,e.status="queue")}failOrCancelUpload(e=null){var a;this.attachmentSelected=null,this.attachmentErrorText=(null===(a=null==e?void 0:e.result)||void 0===a?void 0:a.message)||(null==e?void 0:e.info)||"Expired, Harap Upload Ulang!",this.uploadService.disconnect(),this.fg.controls.attachment_id.patchValue(null),this.toast.remove(this.uploadToast.toastId),this.ddl.clear()}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(b.F0),t.Y36(n.qu),t.Y36(B.z),t.Y36(F.Z),t.Y36($.o),t.Y36(W.X),t.Y36(X.Y),t.Y36(V.T),t.Y36(tt.A),t.Y36(O.X),t.Y36(P.k),t.Y36(y.U),t.Y36(et.e),t.Y36(it.Lz))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-berkas-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["class","col-12",4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama","required",""],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],[1,"col-12","p-3"],["formArrayName","fansub_list"],[4,"ngFor","ngForOf"],[1,"col-12","mb-4"],[1,"col"],[1,"col","pb-3"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"me-1"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv","required",""],["matSuffix",""],["class","p-3 w-100","formControlName","description",3,"config",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["ddlVerified",""],["ddlNotVerified",""],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/berkas",1,"w-100",3,"disabled"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],[1,"px-3","w-100"],["formControlName","private","matTooltip","Hanya diakses melalui profil dan/atau url"],["formControlName","permanent_storage","matTooltip","Berkas terjamin tidak akan hilang / expired"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"border-radius","0","height","40px","width","30px","object-fit","cover",3,"src"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub","required","",3,"matAutocomplete","keyup"],["matSuffix","",4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],[1,"me-1",2,"border-radius","0","height","40px","width","40px","object-fit","cover",3,"src"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"px-3","pt-3","col",3,"color"],["uploadx","",1,"w-100",3,"disabled","accept","change"],["ddl",""],[1,"px-4","w-100"],["class","row mb-4",4,"ngFor","ngForOf"],[1,"px-3"],[3,"mode","value"],[1,"col-6","col-lg-4"],["mat-stroked-button","","color","accent",1,"w-100",3,"click"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Google Drive",3,"required"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://webshit.saya.com/01/02/halaman-post-download.html",3,"required"]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,ie,86,25,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[w.t,l.O5,n._Y,n.JL,n.sg,p.KE,p.hX,T.Yh,M.Hw,p.R9,p.TO,A.lW,at.Rr,n.JJ,n.u,ot.gM,j.gD,n.Q7,l.sg,G.ey,Q.Nt,n.Fj,z.ZL,z.XC,nt.pW,rt.d,n.CE,n.x0,C.s6,A.zs,b.yS],pipes:[Y.$,l.Ov],styles:[""]}),i})();var H=m(6856),x=m(6688);function oe(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function ne(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function re(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitImage()}),t.TgZ(2,"mat-icon",55),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function se(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function le(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function me(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",59)(1,"button",58),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitCover()}),t.TgZ(2,"mat-icon",55),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function ce(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function ue(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function de(i,r){if(1&i&&(t.TgZ(0,"small",60)(1,"div"),t._uU(2),t.qZA()()),2&i){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function _e(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function ge(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function pe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function fe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function he(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function be(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function ve(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",61),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(3).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",62),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function xe(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function Ce(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function Te(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function Ze(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function Ae(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"RSS Link Tidak Valid"),t.qZA())}function ke(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){return t.CHM(e),t.oxw(2).onSubmit()}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Tambah Data Fansub Baru"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",13)(10,"div",6),t._UZ(11,"img",15),t.TgZ(12,"mat-form-field",16)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",17,18),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw(2).uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",19),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",20)(20,"small"),t.YNc(21,oe,3,3,"div",21),t.YNc(22,ne,2,1,"div",21),t.qZA()()(),t.YNc(23,re,5,1,"div",22),t.qZA()(),t.TgZ(24,"div",23)(25,"div",13)(26,"mat-form-field",24)(27,"mat-label"),t._uU(28,"Cover"),t.qZA(),t.TgZ(29,"ngx-mat-file-input",17,25),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(30);return t.oxw(2).uploadCover(o,s)}),t.qZA(),t.TgZ(31,"mat-icon",19),t._uU(32,"image"),t.qZA()(),t.TgZ(33,"mat-error",20)(34,"small"),t.YNc(35,se,3,3,"div",21),t.YNc(36,le,2,1,"div",21),t.qZA()(),t.YNc(37,me,5,1,"div",26),t.TgZ(38,"mat-form-field",27)(39,"mat-label"),t._uU(40,"Nama Fansub"),t.qZA(),t._UZ(41,"input",28),t.TgZ(42,"mat-icon",19),t._uU(43,"wysiwyg"),t.qZA(),t.TgZ(44,"mat-error"),t.YNc(45,ce,2,0,"div",21),t.YNc(46,ue,2,0,"div",21),t.qZA()(),t.TgZ(47,"mat-form-field",29)(48,"mat-label"),t._uU(49,"Singkatan"),t.qZA(),t._UZ(50,"input",30),t.TgZ(51,"mat-icon",19),t._uU(52,"short_text"),t.qZA(),t.YNc(53,de,3,1,"small",31),t.TgZ(54,"mat-error"),t.YNc(55,_e,2,0,"div",21),t.YNc(56,ge,2,0,"div",21),t.qZA()(),t._UZ(57,"angular-editor",32),t.TgZ(58,"mat-form-field",33)(59,"mat-label"),t._uU(60,"Mulai Ada Sejak"),t.qZA(),t.TgZ(61,"input",34),t.NdJ("focus",function(){return t.CHM(e),t.MAs(65).open()}),t.ALo(62,"date"),t.qZA(),t._UZ(63,"mat-datepicker-toggle",35)(64,"mat-datepicker",36,37),t.TgZ(66,"mat-error"),t.YNc(67,pe,2,0,"div",21),t.YNc(68,fe,2,0,"div",21),t.qZA()(),t.TgZ(69,"mat-form-field",33)(70,"mat-label"),t._uU(71,"Status"),t.qZA(),t.TgZ(72,"mat-select",38)(73,"mat-option",39),t._uU(74,"Tidak Aktif"),t.qZA(),t.TgZ(75,"mat-option",40),t._uU(76,"Aktif"),t.qZA()(),t.TgZ(77,"mat-hint",41),t._uU(78,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(79,"mat-error"),t.YNc(80,he,2,0,"div",21),t.YNc(81,be,2,0,"div",21),t.qZA()()()()(),t.TgZ(82,"div",13)(83,"div",6)(84,"div",13)(85,"mat-form-field",42)(86,"mat-label"),t._uU(87,"Tags & Kategori"),t.qZA(),t.TgZ(88,"mat-chip-list",null,43),t.YNc(90,ve,4,2,"mat-chip",44),t.TgZ(91,"input",45),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw(2).addTag(o)}),t.qZA(),t.TgZ(92,"mat-icon",19),t._uU(93,"loyalty"),t.qZA()(),t.TgZ(94,"mat-hint",41),t._uU(95,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(96,"div",13)(97,"div",6)(98,"div",13)(99,"mat-form-field",46)(100,"mat-label"),t._uU(101,"Tautan Website"),t.qZA(),t._UZ(102,"input",47),t.TgZ(103,"mat-icon",19),t._uU(104,"web"),t.qZA(),t.TgZ(105,"mat-error"),t.YNc(106,xe,2,0,"div",21),t.YNc(107,Ce,2,0,"div",21),t.qZA()(),t.TgZ(108,"mat-form-field",46)(109,"mat-label"),t._uU(110,"Facebook Fanpage"),t.qZA(),t._UZ(111,"input",48),t.TgZ(112,"mat-icon",19),t._uU(113,"facebook"),t.qZA(),t.TgZ(114,"mat-error"),t.YNc(115,Te,2,0,"div",21),t.qZA()(),t.TgZ(116,"mat-form-field",46)(117,"mat-label"),t._uU(118,"Tautan Discord"),t.qZA(),t._UZ(119,"input",49),t.TgZ(120,"mat-icon",19),t._UZ(121,"img",50),t.qZA(),t.TgZ(122,"mat-error"),t.YNc(123,Ze,2,0,"div",21),t.qZA()()()()(),t.TgZ(124,"div",13)(125,"mat-form-field",42)(126,"mat-label"),t._uU(127,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(128,"input",51),t.TgZ(129,"mat-icon",19),t._uU(130,"rss_feed"),t.qZA(),t.TgZ(131,"mat-error"),t.YNc(132,Ae,2,0,"div",21),t.qZA()()(),t.TgZ(133,"div",13)(134,"div",6)(135,"div",13),t._UZ(136,"div",52),t.TgZ(137,"div",53)(138,"a",54)(139,"mat-icon",55),t._uU(140,"undo"),t.qZA(),t._uU(141," Batal "),t.qZA()(),t.TgZ(142,"div",53)(143,"button",56),t._uU(144," Simpan "),t.TgZ(145,"mat-icon",57),t._uU(146,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(65),a=t.MAs(89),o=t.oxw(2);t.Q6J("formGroup",o.fg),t.xp6(11),t.Q6J("src",o.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.imageErrorText),t.xp6(1),t.Q6J("ngIf",o.image&&!o.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",o.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",o.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",o.coverErrorText),t.xp6(1),t.Q6J("ngIf",o.cover&&!o.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",o.slugInfo),t.xp6(2),t.Q6J("ngIf",o.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",o.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(62,48,o.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",o.fg.get("born").hasError("required")||o.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",o.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",o.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",o.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",o.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(8),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",o.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",o.fg.get("discord").hasError("pattern")),t.xp6(2),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",o.fg.get("rss_feed").hasError("pattern")),t.xp6(6),t.Q6J("disabled",o.submitted),t.xp6(5),t.Q6J("disabled",o.submitted||o.fg.invalid)}}function Ie(i,r){if(1&i&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,ke,147,51,"form",7),t.qZA()()()),2&i){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}let Ue=(()=>{class i{constructor(e,a,o,s,u,d,f,I){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.imgbb=u,this.fansub=d,this.toast=f,this.gs=I,this.submitted=!1,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.image_url="/assets/img/form/no-image.png",this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.cover_url="/assets/img/form/no-image.png",this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsImgbb=null,this.subsFansub=null,this.subsCekFansubSlug=null,this.slugInfo="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnDestroy(){var e,a;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Buat Baru","Halaman Menambahkan Fansub Baru","Create Fansub"),this.gs.isBrowser&&this.initForm()}initForm(){this.fg=this.fb.group({name:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],description:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],born:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],active:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],slug:[null,n.kI.compose([n.kI.required,n.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[[],n.kI.compose([])],image:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],cover:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],web:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],facebook:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],discord:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],rss_feed:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,k.b)(500),(0,g.x)(),(0,v.b)(()=>this.slugInfo="Mengecek ..."),(0,_.w)(e=>this.fansub.cekSlug({slug:e})),(0,Z.X)(-1)).subscribe({next:e=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",e),this.slugInfo=e.result.message}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=c.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}uploadCover(e,a){this.gambar_=a,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[COVER_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.cover=o,this.cover_url=s.result.toString()},d.src=s.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=c.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch(s){this.cover=null,this.cover_url="/assets/img/form/no-image.png",this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.submitted=!1,this.coverErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){this.bs.busy();const e=[];if(this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord}),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansub=this.fansub.createFansub({image:this.fg.value.image,cover:this.fg.value.cover,name:this.fg.value.name,description:this.fg.value.description,born:this.fg.value.born.getTime(),active:this.fg.value.active,tags:this.fg.value.tags,slug:this.fg.value.slug,urls:e,rss_feed:this.fg.value.rss_feed}).subscribe({next:a=>{this.gs.log("[FANSUB_CREATE_SUCCESS]",a),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/fansub")},error:a=>{this.gs.log("[FANSUB_CREATE_ERROR]",a,"error"),this.submitted=!1,this.bs.idle()}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(B.z),t.Y36(F.Z),t.Y36(O.X),t.Y36(V.T),t.Y36(P.k),t.Y36(y.U))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-fansub-create"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan","required",""],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub","required",""],["class","text-info",4,"ngIf"],["formControlName","description","required","",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born","required","",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif","required",""],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["appearance","outline",1,"p-3","col-12","col-md-4",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["width","24px",3,"src"],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/fansub",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&t.YNc(0,Ie,8,3,"div",0),2&e&&t.Q6J("ngIf",a.fg)},directives:[l.O5,w.t,n._Y,n.JL,n.sg,p.KE,p.hX,T.Yh,M.Hw,p.R9,p.TO,A.lW,Q.Nt,n.Fj,n.JJ,n.u,n.Q7,C.s6,H.hl,H.nW,H.Mq,j.gD,G.ey,p.bx,x.qn,l.sg,x.HS,x.qH,x.oH,A.zs,b.yS],pipes:[Y.$,l.uU],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),i})();var Ee=m(7358);function qe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",31),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTo(s)}),t._uU(1),t.TgZ(2,"mat-icon",32),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Je(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Boleh Kosong"),t.qZA())}function Se(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Ne(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",31),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeCc(s)}),t._uU(1),t.TgZ(2,"mat-icon",32),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Be(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function Fe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",31),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeBcc(s)}),t._uU(1),t.TgZ(2,"mat-icon",32),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ye(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Alamat Surel Tidak Valid"),t.qZA())}function we(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Tidak Boleh Kosong"),t.qZA())}function Me(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Pesan Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Qe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Buat Email Baru & Kirim"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"mat-form-field",11)(11,"mat-label"),t._uU(12,"Penerima"),t.qZA(),t.TgZ(13,"mat-chip-list",null,12),t.YNc(15,qe,4,2,"mat-chip",13),t.qZA(),t.TgZ(16,"input",14),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTo(o)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"short_text"),t.qZA(),t.TgZ(19,"mat-hint",16)(20,"mat-error"),t.YNc(21,Je,2,0,"div",17),t.YNc(22,Se,2,0,"div",17),t.qZA()()(),t.TgZ(23,"mat-form-field",11)(24,"mat-label"),t._uU(25,"Carbon Copy"),t.qZA(),t.TgZ(26,"mat-chip-list",null,18),t.YNc(28,Ne,4,2,"mat-chip",13),t.qZA(),t.TgZ(29,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addCc(o)}),t.qZA(),t.TgZ(30,"mat-icon",15),t._uU(31,"short_text"),t.qZA(),t.TgZ(32,"mat-hint",16)(33,"mat-error"),t.YNc(34,Be,2,0,"div",17),t.qZA()()(),t.TgZ(35,"mat-form-field",11)(36,"mat-label"),t._uU(37,"Blind Carbon Copy"),t.qZA(),t.TgZ(38,"mat-chip-list",null,20),t.YNc(40,Fe,4,2,"mat-chip",13),t.qZA(),t.TgZ(41,"input",19),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addBcc(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"short_text"),t.qZA(),t.TgZ(44,"mat-hint",16)(45,"mat-error"),t.YNc(46,ye,2,0,"div",17),t.qZA()()()()(),t.TgZ(47,"div",21)(48,"div",9)(49,"mat-form-field",22)(50,"mat-label"),t._uU(51,"Judul"),t.qZA(),t._UZ(52,"input",23),t.TgZ(53,"mat-icon",15),t._uU(54,"wysiwyg"),t.qZA(),t.TgZ(55,"mat-error"),t.YNc(56,we,2,0,"div",17),t.YNc(57,Me,2,0,"div",17),t.qZA()(),t._UZ(58,"angular-editor",24),t.qZA()()(),t.TgZ(59,"div",9)(60,"div",2)(61,"div",9),t._UZ(62,"div",25),t.TgZ(63,"div",26)(64,"a",27)(65,"mat-icon",28),t._uU(66,"undo"),t.qZA(),t._uU(67," Batal "),t.qZA()(),t.TgZ(68,"div",26)(69,"button",29),t._uU(70," Simpan "),t.TgZ(71,"mat-icon",30),t._uU(72,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(14),a=t.MAs(27),o=t.MAs(39),s=t.oxw();t.Q6J("formGroup",s.fg),t.xp6(10),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.to),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("to").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("to").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.cc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("cc").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",s.fg.value.bcc),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",s.GS.separatorKeysCodes)("matChipInputFor",o)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("ngIf",s.fg.get("bcc").hasError("pattern")),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",s.fg.get("subject").hasError("required")),t.xp6(1),t.Q6J("ngIf",s.fg.get("subject").hasError("pattern")),t.xp6(1),t.Q6J("config",s.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",s.submitted),t.xp6(5),t.Q6J("disabled",s.submitted||s.fg.invalid)}}let Re=(()=>{class i{constructor(e,a,o,s,u,d){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.gs=u,this.ms=d,this.submitted=!1,this.subsMail=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Mailbox - Buat Baru","Halaman Membuat Surel Baru","Create Email"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e;null===(e=this.subsMail)||void 0===e||e.unsubscribe()}initForm(){this.fg=this.fb.group({to:[[],n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEmailMulti)])],cc:[[],n.kI.compose([n.kI.pattern(c.t.regexEmailMulti)])],bcc:[[],n.kI.compose([n.kI.pattern(c.t.regexEmailMulti)])],subject:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],message:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])]})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsMail=this.ms.sendMail(this.fg.value).subscribe({next:e=>{this.gs.log("[MAIL_SEND_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/mailbox")},error:e=>{this.gs.log("[MAIL_SEND_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTo(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.to.push(o.trim()),a&&(a.value=""),this.fg.controls.to.patchValue(this.fg.value.to.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeTo(e){const a=this.fg.value.to.indexOf(e);a>=0&&this.fg.value.to.splice(a,1)}addCc(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.cc.push(o.trim()),a&&(a.value=""),this.fg.controls.cc.patchValue(this.fg.value.cc.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeCc(e){const a=this.fg.value.cc.indexOf(e);a>=0&&this.fg.value.cc.splice(a,1)}addBcc(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.bcc.push(o.trim()),a&&(a.value=""),this.fg.controls.bcc.patchValue(this.fg.value.bcc.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeBcc(e){const a=this.fg.value.bcc.indexOf(e);a>=0&&this.fg.value.bcc.splice(a,1)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(B.z),t.Y36(F.Z),t.Y36(y.U),t.Y36(Ee.Y))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mailbox-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],["hintLabel","Gunakan , Jika Lebih Dari 1","appearance","outline",1,"p-3","col-12",3,"color"],["to",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","user@domain.tld","required","",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["matSuffix",""],["align","end"],[4,"ngIf"],["cc",""],["placeholder","user@domain.tld",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["bcc",""],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","subject","placeholder","Judul Pesan Blablabla ...","required",""],["formControlName","message","required","",1,"p-3","w-100",3,"config"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/mailbox",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,Qe,73,26,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[w.t,l.O5,n._Y,n.JL,n.sg,p.KE,p.hX,x.qn,l.sg,x.HS,M.Hw,x.qH,x.oH,p.R9,p.bx,p.TO,Q.Nt,n.Fj,n.JJ,n.u,n.Q7,C.s6,A.zs,b.yS,A.lW],styles:[""]}),i})();var De=m(9618);function Le(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function Oe(i,r){if(1&i&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e.imageErrorText)}}function Ye(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"div",2)(1,"button",33),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).submitImage()}),t.TgZ(2,"mat-icon",30),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("disabled",e.submitted)}}function He(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Tidak Boleh Kosong"),t.qZA())}function Ke(i,r){1&i&&(t.TgZ(0,"div"),t._uU(1,"Judul Berita Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Ve(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",34),t.NdJ("removed",function(){const s=t.CHM(e).$implicit;return t.oxw(2).removeTag(s)}),t._uU(1),t.TgZ(2,"mat-icon",35),t._uU(3,"cancel"),t.qZA()()}if(2&i){const e=r.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function Pe(i,r){if(1&i){const e=t.EpF();t.TgZ(0,"form",4),t.NdJ("submit",function(){return t.CHM(e),t.oxw().onSubmit()}),t.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),t._uU(5,"Tambah Data Berita & Informasi Baru"),t.qZA()()(),t.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),t._UZ(11,"img",11),t.TgZ(12,"mat-form-field",12)(13,"mat-label"),t._uU(14,"Gambar"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",13,14),t.NdJ("change",function(o){t.CHM(e);const s=t.MAs(16);return t.oxw().uploadImage(o,s)}),t.qZA(),t.TgZ(17,"mat-icon",15),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",16)(20,"small"),t.YNc(21,Le,3,3,"div",17),t.YNc(22,Oe,2,1,"div",17),t.qZA()()(),t.YNc(23,Ye,5,1,"div",18),t.qZA()(),t.TgZ(24,"div",19)(25,"div",9)(26,"mat-form-field",20)(27,"mat-label"),t._uU(28,"Judul"),t.qZA(),t._UZ(29,"input",21),t.TgZ(30,"mat-icon",15),t._uU(31,"wysiwyg"),t.qZA(),t.TgZ(32,"mat-error"),t.YNc(33,He,2,0,"div",17),t.YNc(34,Ke,2,0,"div",17),t.qZA()(),t.TgZ(35,"mat-form-field",20)(36,"mat-label"),t._uU(37,"Tags & Kategori"),t.qZA(),t.TgZ(38,"mat-chip-list",null,22),t.YNc(40,Ve,4,2,"mat-chip",23),t.TgZ(41,"input",24),t.NdJ("matChipInputTokenEnd",function(o){return t.CHM(e),t.oxw().addTag(o)}),t.qZA(),t.TgZ(42,"mat-icon",15),t._uU(43,"loyalty"),t.qZA()(),t.TgZ(44,"mat-hint",25),t._uU(45,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()(),t._UZ(46,"angular-editor",26),t.qZA()()(),t.TgZ(47,"div",9)(48,"div",2)(49,"div",9),t._UZ(50,"div",27),t.TgZ(51,"div",28)(52,"a",29)(53,"mat-icon",30),t._uU(54,"undo"),t.qZA(),t._uU(55," Batal "),t.qZA()(),t.TgZ(56,"div",28)(57,"button",31),t._uU(58," Simpan "),t.TgZ(59,"mat-icon",32),t._uU(60,"save"),t.qZA()()()()()()()()()}if(2&i){const e=t.MAs(39),a=t.oxw();t.Q6J("formGroup",a.fg),t.xp6(11),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",a.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",a.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",a.imageErrorText),t.xp6(1),t.Q6J("ngIf",a.image&&!a.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",a.fg.get("title").hasError("required")),t.xp6(1),t.Q6J("ngIf",a.fg.get("title").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",a.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",a.GS.separatorKeysCodes)("matChipInputFor",e)("matChipInputAddOnBlur",!0),t.xp6(5),t.Q6J("config",a.GS.angularEditorConfig),t.xp6(6),t.Q6J("disabled",a.submitted),t.xp6(5),t.Q6J("disabled",a.submitted||a.fg.invalid)}}const Ge=[{path:"",pathMatch:"full",redirectTo:"/home"},{path:"berkas",component:ae,data:{title:"Berkas - Buat Baru",description:"Halaman Unggah Berkas Baru",keywords:"Tambah Berkas Baru"}},{path:"fansub",component:Ue,canActivate:[E.H],data:{title:"Fansub - Buat Baru",description:"Halaman Menambahkan Fansub Baru",keywords:"Create Fansub",[c.t.decoratorVerifiedOnly]:!0}},{path:"mailbox",component:Re,canActivate:[E.H],data:{title:"Surel - Buat Baru",description:"Halaman Kirim Surel Baru",keywords:"Buat Surel Baru",[c.t.decoratorVerifiedOnly]:!0}},{path:"news",component:(()=>{class i{constructor(e,a,o,s,u,d,f){this.fb=e,this.router=a,this.bs=o,this.pi=s,this.imgbb=u,this.news=d,this.gs=f,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.gambar=null,this.subsNews=null,this.subsImgbb=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Informasi - Buat Baru","Halaman Menambahkan Berita Baru","Create News"),this.gs.isBrowser&&this.initForm()}ngOnDestroy(){var e,a;null===(e=this.subsImgbb)||void 0===e||e.unsubscribe(),null===(a=this.subsNews)||void 0===a||a.unsubscribe()}initForm(){this.fg=this.fb.group({title:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],content:[null,n.kI.compose([n.kI.required,n.kI.pattern(c.t.regexEnglishKeyboardKeys)])],image:[null,n.kI.compose([n.kI.pattern(c.t.regexUrl)])],tags:[[],n.kI.compose([])]})}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null);const o=e.target.files[0];try{const s=new FileReader;s.readAsDataURL(o),s.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),o.size<=c.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=o,this.image_url=s.result.toString()},d.src=s.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=c.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(s){this.image=null,this.image_url="/assets/img/form/no-image.png",this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){if(this.bs.busy(),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNews=this.news.createNews({image:this.fg.value.image,title:this.fg.value.title,content:this.fg.value.content,tags:this.fg.value.tags}).subscribe({next:e=>{this.gs.log("[NEWS_CREATE_SUCCESS]",e),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl("/news")},error:e=>{this.gs.log("[NEWS_CREATE_ERROR]",e,"error"),this.submitted=!1,this.bs.idle()}})}addTag(e){const a=e.input,o=e.value;(o||"").trim()&&this.fg.value.tags.push(o.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((s,u,d)=>d.findIndex(f=>f===s)===u))}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(n.qu),t.Y36(b.F0),t.Y36(B.z),t.Y36(F.Z),t.Y36(O.X),t.Y36(De.Y),t.Y36(y.U))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-news-create"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","title","placeholder","Berita Terkini Blablabla ...","required",""],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["align","end"],["formControlName","content","required","",1,"p-3","w-100",3,"config"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","/news",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2),t.YNc(4,Pe,61,19,"form",3),t.qZA()()()),2&e&&(t.xp6(4),t.Q6J("ngIf",a.fg))},directives:[w.t,l.O5,n._Y,n.JL,n.sg,p.KE,p.hX,T.Yh,M.Hw,p.R9,p.TO,A.lW,Q.Nt,n.Fj,n.JJ,n.u,n.Q7,x.qn,l.sg,x.HS,x.qH,x.oH,p.bx,C.s6,A.zs,b.yS],pipes:[Y.$],styles:[""]}),i})(),data:{title:"Berita - Buat Baru",description:"Halaman Unggah Berita Baru",keywords:"Tambah Berita Baru"}}];let ze=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[[l.ez,b.Bz.forChild(Ge),q.m,n.u5,n.UX,T.Ad,D.F,C.UM,R.T]]}),i})()},8616:(K,U,m)=>{m.d(U,{t:()=>k});var l=m(5e3),b=m(8406),n=m(8696),C=m(7140),T=m(9808),c=m(1861);function E(g,v){if(1&g&&l._UZ(0,"div",4),2&g){const _=l.oxw();l.Udp("background-size",_.GS.sizeContain?"contain":"cover")("background-image","url("+_.GS.bannerImg+")")("background-repeat",_.GS.bgRepeat?"repeat-x":"no-repeat")("height","/home"===_.ROUTER.url||"/berkas"===_.ROUTER.url?"192px":"128px")("background-position-y","/berkas"===_.ROUTER.url?"22.5%":"")}}function q(g,v){if(1&g&&(l.TgZ(0,"strong",10),l._uU(1," -- "),l.TgZ(2,"i")(3,"a",11),l._uU(4),l.qZA()()()),2&g){const _=l.oxw().$implicit;l.xp6(3),l.MGl("routerLink","/user/",_.notifCreator,""),l.xp6(1),l.hij(" ",_.notifCreator," ")}}function R(g,v){if(1&g){const _=l.EpF();l.TgZ(0,"button",12),l.NdJ("click",function(){l.CHM(_);const Z=l.oxw().$implicit;return l.oxw().removeNotif(Z.notifData.id)}),l.qZA()}}function D(g,v){if(1&g&&(l.TgZ(0,"div",5)(1,"div")(2,"strong",6),l._uU(3),l.qZA(),l._UZ(4,"span",7),l.ALo(5,"safeInnerHtml"),l.YNc(6,q,5,2,"strong",8),l.YNc(7,R,1,0,"button",9),l.qZA()()),2&g){const _=v.$implicit;l.xp6(1),l.Gre("alert alert-",_.notifData.type," alert-dismissible fade show"),l.xp6(2),l.Oqu(_.notifData.title),l.xp6(1),l.Q6J("innerHTML",l.lcZ(5,7,_.notifData.content),l.oJD),l.xp6(2),l.Q6J("ngIf",_.notifCreator),l.xp6(1),l.Q6J("ngIf",_.notifData.dismissible)}}let k=(()=>{class g{constructor(_,h,Z){this.router=_,this.gs=h,this.notif=Z}ngOnInit(){}get GS(){return this.gs}get ROUTER(){return this.router}get NOTIF(){return this.notif}removeNotif(_){this.notif.removeNotif(_)}}return g.\u0275fac=function(_){return new(_||g)(l.Y36(b.F0),l.Y36(n.U),l.Y36(C.T))},g.\u0275cmp=l.Xpm({type:g,selectors:[["app-notifications"]],decls:4,vars:2,consts:[["class","container-fluid notif-banner align-items-center",3,"background-size","background-image","background-repeat","height","background-position-y",4,"ngIf"],[1,"container"],[1,"row","pt-3"],["class","col-12",4,"ngFor","ngForOf"],[1,"container-fluid","notif-banner","align-items-center"],[1,"col-12"],[1,"me-1"],[3,"innerHTML"],["class","ms-1",4,"ngIf"],["type","button","class","btn-close","data-dismiss","alert",3,"click",4,"ngIf"],[1,"ms-1"],[1,"text-decoration-none",3,"routerLink"],["type","button","data-dismiss","alert",1,"btn-close",3,"click"]],template:function(_,h){1&_&&(l.YNc(0,E,1,10,"div",0),l.TgZ(1,"div",1)(2,"div",2),l.YNc(3,D,8,9,"div",3),l.qZA()()),2&_&&(l.Q6J("ngIf",h.GS.bannerImg&&("/home"===h.ROUTER.url||"/berkas"===h.ROUTER.url||"/fansub"===h.ROUTER.url||"/berkas"===h.ROUTER.url||"/anime"===h.ROUTER.url||h.ROUTER.url.includes("/anime?")||"/dorama"===h.ROUTER.url||h.ROUTER.url.includes("/dorama?"))),l.xp6(3),l.Q6J("ngForOf",h.NOTIF.notifications))},directives:[T.O5,T.sg,b.yS],pipes:[c.H],styles:[".notif-banner[_ngcontent-%COMP%]{width:100%;background-size:cover;background-position:75% 50%;background-image:url(/assets/img/home-banner.png)}"]}),g})()},8613:(K,U,m)=>{m.d(U,{F:()=>T});var l=m(9808),b=m(8406),n=m(7355),C=m(5e3);let T=(()=>{class c{}return c.\u0275fac=function(q){return new(q||c)},c.\u0275mod=C.oAB({type:c}),c.\u0275inj=C.cJS({imports:[[l.ez,b.Bz,n.T]]}),c})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/330.3cc0e003c9557d4a.js b/dist/fansubid/browser/330.d311de31b7336b96.js similarity index 84% rename from dist/fansubid/browser/330.3cc0e003c9557d4a.js rename to dist/fansubid/browser/330.d311de31b7336b96.js index 6d4778c48..9de33be63 100644 --- a/dist/fansubid/browser/330.3cc0e003c9557d4a.js +++ b/dist/fansubid/browser/330.d311de31b7336b96.js @@ -1 +1 @@ -(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[330],{2330:(He,we,j)=>{"use strict";j.r(we),j.d(we,{BerkasModule:()=>l_});var J=j(9808),_e=j(8406),B=j(3075),ke=j(9345),ve=j(1385),re=j(6271),Ie=j(4249),Ee=j(210),Te=j(6436),pe=j(8613),u=j(5e3);let se=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[[J.ez]]}),s})();var Ue=j(8764),je=j(4167),tt=j(7355),vt=j(2777),oe=j(5861),Oe=j(520),me=j(8505),Le=j(7272),Ze=j(5934),Ce=j(8696),Me=j(3e3),Ve=j(7845),rt=j(8745),w=j(8987),D=j(6382),V=j(4137),te=j(4327),Y=j(6925),le=j(9731);let ue=(()=>{class s{constructor(t,r){this.api=t,this.gs=r}downloadLampiran(t){return this.api.getData(`/attachment/${t}`,{responseType:"blob",observe:"events",reportProgress:!0,headers:{"ngsw-bypass":"true"}})}getListDdl(t){return this.api.getData(`/attachment/${t}?ngsw-bypass=true`)}downloadDdlProxy(t){return this.api.getData(`/ddl-part/${t}`,{responseType:"blob",observe:"events",reportProgress:!0,headers:{"ngsw-bypass":"true"}})}downloadDdlDirect(t){return this.api.getData(t,{responseType:"blob",observe:"events",reportProgress:!0,headers:{"ngsw-bypass":"true"}})}}return s.\u0275fac=function(t){return new(t||s)(u.LFG(le.s),u.LFG(Ce.U))},s.\u0275prov=u.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})(),xe=(()=>{class s{constructor(t,r,e){this.gs=t,this.toast=r,this.dls=e,this.attachmentsDownload={}}getAttachmentDownloadFile(t){return this.attachmentsDownload[t.id]||(this.attachmentsDownload[t.id]={},this.attachmentsDownload[t.id].name=t.name,this.attachmentsDownload[t.id].size=t.size,this.attachmentsDownload[t.id].ext=t.ext,this.attachmentsDownload[t.id].download_count=t.download_count,this.attachmentsDownload[t.id].google_drive=t.google_drive,this.attachmentsDownload[t.id].discord=t.discord,this.attachmentsDownload[t.id].mode="indeterminate",this.attachmentsDownload[t.id].isDownloading=!1,this.attachmentsDownload[t.id].isCompleted=!1,this.attachmentsDownload[t.id].data=null,this.attachmentsDownload[t.id].handler=null,this.attachmentsDownload[t.id].toast=null,this.attachmentsDownload[t.id].totals=0,this.attachmentsDownload[t.id].percentage=0,this.attachmentsDownload[t.id].speed=0,this.attachmentsDownload[t.id].loaded=0),this.attachmentsDownload[t.id]}stopFail(t){t.isDownloading=!1,t.isCompleted=!1,t.toast&&this.toast.remove(t.toast.toastId)}onProgress(t,r){if(r.loaded){this.gs.log("[DOWNLOAD_PROGRESS]",r),t.mode="determinate";const e=r.loaded-t.loaded;t.totals+=e,t.speed=e/1e3,t.percentage=Math.round(t.totals/t.size*100),t.loaded=r.loaded,t.toast.toastRef.componentInstance.message=`${t.percentage}% @ ${t.speed} KB/s`}}startDownload(t,r=!0){var e=this;const i=this.attachmentsDownload[t];var a;i.toast=this.toast.warning(`${i.percentage}% @ ${i.speed} KB/s`,"Mengunduh ...",{closeButton:!1,timeOut:0,disableTimeOut:"extendedTimeOut",tapToDismiss:!1}),i.isCompleted?this.saveFileAs(t):(i.isDownloading=!0,i.discord?this.dls.getListDdl(t).subscribe({next:(a=(0,oe.Z)(function*(o){e.gs.log("[DOWNLOAD_LIST_DDL]",o);const l=o.results.sort((v,g)=>v.chunk_idx-g.chunk_idx),d=[];for(const v of l){let g=null;g=r?e.dls.downloadDdlDirect(v.url):e.dls.downloadDdlProxy(v.id),d.push(g)}const f=[];var v;i.handler=(0,Le.z)(...d).subscribe({next:(v=(0,oe.Z)(function*(g){if(g.type===Oe.dt.DownloadProgress&&e.onProgress(i,g),g.type===Oe.dt.Response){i.loaded=0;const E=yield g.body.arrayBuffer(),x=new Uint8Array(E);e.gs.log("[DOWNLOAD_CHUNK_APPEND]",E.byteLength),f.push(x)}if(g.type===Oe.dt.Response&&f.length===l.length){e.gs.log("[DOWNLOAD_CHUNK_COMPLETED]",f);const T=new Blob(f);i.mode="determinate",i.isDownloading=!1,i.isCompleted=!0,i.data=T,e.toast.remove(i.toast.toastId),e.saveFileAs(t)}}),function(T){return v.apply(this,arguments)}),error:v=>{e.gs.log("[DOWNLOAD_CHUNK_ERROR]",v),e.stopFail(i)}})}),function(l){return a.apply(this,arguments)}),error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a),this.stopFail(i)}}):i.handler=this.dls.downloadLampiran(t).subscribe({next:a=>{a.type===Oe.dt.DownloadProgress&&this.onProgress(i,a),a.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",a),i.mode="determinate",i.isDownloading=!1,i.isCompleted=!0,i.data=a.body,this.toast.remove(i.toast.toastId),this.saveFileAs(t))},error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a),this.stopFail(i)}}))}cancelDownload(t){const r=this.attachmentsDownload[t];r.mode="indeterminate",r.percentage=0,r.speed=0,r.totals=0,r.loaded=0,r.isDownloading=!1,r.isCompleted=!1,r.handler&&r.handler.unsubscribe(),r.toast&&this.toast.remove(r.toast.toastId)}saveFileAs(t){this.gs.log("[SAVE_FILE]",t);const r=this.attachmentsDownload[t];(0,te.saveAs)(r.data,`${r.name}.${r.ext}`)}}return s.\u0275fac=function(t){return new(t||s)(u.LFG(Ce.U),u.LFG(Y.k),u.LFG(ue))},s.\u0275prov=u.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();var ie=j(8020),de=j(8381),Q=j(8616),ee=j(4623),De=j(7423),ze=j(7238),Ge=j(5245),qe=j(5899),Fe=j(9226),P=j.n(Fe),It=j(1421),K=j.n(It);function it(){return it=Object.assign||function(s){for(var n=1;n-1},n.trigger=function(r){var e=this.listeners[r];if(e)if(2===arguments.length)for(var i=e.length,a=0;a-1;i=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)},n}(Cr),an=String.fromCharCode(9),wr=function(n){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(n||""),r={};return t[1]&&(r.length=parseInt(t[1],10)),t[2]&&(r.offset=parseInt(t[2],10)),r},Gt=function(n){for(var i,t=n.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},e=t.length;e--;)""!==t[e]&&((i=/([^=]*)=(.*)/.exec(t[e]).slice(1))[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),r[i[0]]=i[1]);return r},sn=function(s){function n(){var r;return(r=s.call(this)||this).customParsers=[],r.tagMappers=[],r}X(n,s);var t=n.prototype;return t.push=function(e){var a,o,i=this;if(0!==(e=e.trim()).length){if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce(function(d,f){var v=f(e);return v===e?d:d.concat([v])},[e]).forEach(function(d){for(var f=0;f0&&(a.duration=S.duration),0===S.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key:function(){if(S.attributes)if("NONE"!==S.attributes.METHOD)if(S.attributes.URI){if("com.apple.streamingkeydelivery"===S.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:S.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===S.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(S.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===S.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==S.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):S.attributes.KEYID&&"0x"===S.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:S.attributes.KEYFORMAT,keyId:S.attributes.KEYID.substring(2)},pssh:kr(S.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));S.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:S.attributes.METHOD||"AES-128",uri:S.attributes.URI},void 0!==S.attributes.IV&&(l.iv=S.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else l=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(S.number)?this.manifest.mediaSequence=S.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+S.number})},"discontinuity-sequence":function(){isFinite(S.number)?(this.manifest.discontinuitySequence=S.number,T=S.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+S.number})},"playlist-type":function(){/VOD|EVENT/.test(S.playlistType)?this.manifest.playlistType=S.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+S.playlist})},map:function(){o={},S.uri&&(o.uri=S.uri),S.byterange&&(o.byterange=S.byterange),l&&(o.key=l)},"stream-inf":function(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes?(a.attributes||(a.attributes={}),it(a.attributes,S.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes&&S.attributes.TYPE&&S.attributes["GROUP-ID"]&&S.attributes.NAME){var q=this.manifest.mediaGroups[S.attributes.TYPE];q[S.attributes["GROUP-ID"]]=q[S.attributes["GROUP-ID"]]||{},F=q[S.attributes["GROUP-ID"]],(U={default:/yes/i.test(S.attributes.DEFAULT)}).autoselect=!!U.default||/yes/i.test(S.attributes.AUTOSELECT),S.attributes.LANGUAGE&&(U.language=S.attributes.LANGUAGE),S.attributes.URI&&(U.uri=S.attributes.URI),S.attributes["INSTREAM-ID"]&&(U.instreamId=S.attributes["INSTREAM-ID"]),S.attributes.CHARACTERISTICS&&(U.characteristics=S.attributes.CHARACTERISTICS),S.attributes.FORCED&&(U.forced=/yes/i.test(S.attributes.FORCED)),F[S.attributes.NAME]=U}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){T+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=S.dateTimeString,this.manifest.dateTimeObject=S.dateTimeObject),a.dateTimeString=S.dateTimeString,a.dateTimeObject=S.dateTimeObject},targetduration:function(){!isFinite(S.duration)||S.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+S.duration}):(this.manifest.targetDuration=S.duration,ir.call(this,this.manifest))},start:function(){S.attributes&&!isNaN(S.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:S.attributes["TIME-OFFSET"],precise:S.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=S.data},"cue-out-cont":function(){a.cueOutCont=S.data},"cue-in":function(){a.cueIn=S.data},skip:function(){this.manifest.skip=Ci(S.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",S.attributes,["SKIPPED-SEGMENTS"])},part:function(){var q=this;d=!0;var ne=this.manifest.segments.length,he=Ci(S.attributes);a.parts=a.parts||[],a.parts.push(he),he.byterange&&(he.byterange.hasOwnProperty("offset")||(he.byterange.offset=x),x=he.byterange.offset+he.byterange.length),this.warnOnMissingAttributes_("#EXT-X-PART #"+(a.parts.length-1)+" for segment #"+ne,S.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(ye,ge){ye.hasOwnProperty("lastPart")||q.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+ge+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var q=this.manifest.serverControl=Ci(S.attributes);q.hasOwnProperty("canBlockReload")||(q.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),ir.call(this,this.manifest),q.canSkipDateranges&&!q.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var q=this.manifest.segments.length,ne=Ci(S.attributes),he=ne.type&&"PART"===ne.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(ne),ne.byterange&&(ne.byterange.hasOwnProperty("offset")||(ne.byterange.offset=he?x:0,he&&(x=ne.byterange.offset+ne.byterange.length)));var z=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+z+" for segment #"+q,S.attributes,["TYPE","URI"]),ne.type)for(var ye=0;yer.timeline?1:-1})},cu=function(n){var t=[];return function(n,t,r){t.forEach(function(e){for(var i in n.mediaGroups[e])for(var a in n.mediaGroups[e][i])r(n.mediaGroups[e][i][a])})}(n,lf,function(r,e,i,a){t=t.concat(r.playlists||[])}),t},fu=function(n){var t=n.playlist;t.mediaSequence=n.mediaSequence,t.segments.forEach(function(e,i){e.number=t.mediaSequence+i})},Wn=function(n){return n&&n.uri+"-"+function(n){var t;return t="bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1,n.offset+"-"+t}(n.byterange)},ls=function(n){return su(n.reduce(function(r,e){var a,i=e.attributes.id+(e.attributes.lang||"");r[i]?(e.segments&&(e.segments[0]&&(e.segments[0].discontinuity=!0),(a=r[i].segments).push.apply(a,e.segments)),e.attributes.contentProtection&&(r[i].attributes.contentProtection=e.attributes.contentProtection)):(r[i]=e,r[i].attributes.timelineStarts=[]);return r[i].attributes.timelineStarts.push({start:e.attributes.periodStart,timeline:e.attributes.periodStart}),r},{})).map(function(r){return r.discontinuityStarts=function(n,t){return n.reduce(function(r,e,i){return e.discontinuity&&r.push(i),r},[])}(r.segments||[]),r})},ds=function(n,t){var r=Wn(n.sidx),e=r&&t[r]&&t[r].sidx;return e&&us(n,e,n.sidx.resolvedUri),n},pf=function(n,t){if(void 0===t&&(t={}),!Object.keys(t).length)return n;for(var r in n)n[r]=ds(n[r],t);return n},Tf=function(n){var t,r=n.attributes,e=n.segments,i=n.sidx,a=n.discontinuityStarts,o={attributes:(t={NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuityStarts:a,timelineStarts:r.timelineStarts,segments:e};return r.contentProtection&&(o.contentProtection=r.contentProtection),i&&(o.sidx=i),o},bf=function(n){var t=n.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},xf=function(n){var t=n.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},Sf=function(n){var t=n.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},hu=function(n){return n?Object.keys(n).reduce(function(t,r){return t.concat(n[r].playlists)},[]):[]},Cf=function(n){var t,r=n.dashPlaylists,e=n.locations,i=n.sidxMapping,a=void 0===i?{}:i,o=n.previousManifest;if(!r.length)return{};var l=r[0].attributes,d=l.sourceDuration,f=l.type,v=l.suggestedPresentationDelay,g=l.minimumUpdatePeriod,T=ls(r.filter(bf)).map(Tf),E=ls(r.filter(xf)),x=ls(r.filter(Sf)),S=r.map(function(he){return he.attributes.captionServices}).filter(Boolean),F={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:d,playlists:pf(T,a)};g>=0&&(F.minimumUpdatePeriod=1e3*g),e&&(F.locations=e),"dynamic"===f&&(F.suggestedPresentationDelay=v);var H=E.length?function(n,t,r){void 0===t&&(t={}),void 0===r&&(r=!1);var e,i=n.reduce(function(o,l){var d=l.attributes.role&&l.attributes.role.value||"",f=l.attributes.lang||"",v=l.attributes.label||"main";f&&!l.attributes.label&&(v=l.attributes.lang+(d?" ("+d+")":"")),o[v]||(o[v]={language:f,autoselect:!0,default:"main"===d,playlists:[],uri:""});var T=ds(function(n,t){var r,e=n.attributes,i=n.segments,a=n.sidx,o=n.mediaSequence,l=n.discontinuitySequence,d=n.discontinuityStarts,f={attributes:(r={NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs},r["PROGRAM-ID"]=1,r),uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:l,discontinuityStarts:d,timelineStarts:e.timelineStarts,mediaSequence:o,segments:i};return e.contentProtection&&(f.contentProtection=e.contentProtection),a&&(f.sidx=a),t&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f}(l,r),t);return o[v].playlists.push(T),void 0===e&&"main"===d&&((e=l).default=!0),o},{});return e||(i[Object.keys(i)[0]].default=!0),i}(E,a,0===F.playlists.length):null,W=x.length?function(n,t){return void 0===t&&(t={}),n.reduce(function(r,e){var i=e.attributes.lang||"text";return r[i]||(r[i]={language:i,default:!1,autoselect:!1,playlists:[],uri:""}),r[i].playlists.push(ds(function(n){var t,r=n.attributes,e=n.segments,i=n.mediaSequence,a=n.discontinuityStarts,o=n.discontinuitySequence;void 0===e&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);var l=((t={NAME:r.id,BANDWIDTH:r.bandwidth})["PROGRAM-ID"]=1,t);return r.codecs&&(l.CODECS=r.codecs),{attributes:l,uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:i,segments:e}}(e),t)),r},{})}(x,a):null,q=T.concat(hu(H),hu(W)),ne=q.map(function(he){return he.timelineStarts});return F.timelineStarts=du(ne),function(n,t){n.forEach(function(r){r.mediaSequence=0,r.discontinuitySequence=ss(t,function(e){return e.timeline===r.timeline}),r.segments&&r.segments.forEach(function(e,i){e.number=i})})}(q,F.timelineStarts),H&&(F.mediaGroups.AUDIO.audio=H),W&&(F.mediaGroups.SUBTITLES.subs=W),S.length&&(F.mediaGroups["CLOSED-CAPTIONS"].cc=function(n){return n.reduce(function(t,r){return r&&r.forEach(function(e){var a=e.language;t[a]={autoselect:!1,default:!1,instreamId:e.channel,language:a},e.hasOwnProperty("aspectRatio")&&(t[a].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(t[a].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(t[a]["3D"]=e["3D"])}),t},{})}(S)),o?function(n){var t=n.oldManifest,r=n.newManifest,e=t.playlists.concat(cu(t)),i=r.playlists.concat(cu(r));return r.timelineStarts=du([t.timelineStarts,r.timelineStarts]),function(n){var t=n.oldPlaylists,e=n.timelineStarts;n.newPlaylists.forEach(function(i){i.discontinuitySequence=ss(e,function(f){return f.timeline===i.timeline});var a=function(n,t){for(var r=0;ra.timeline||a.segments.length&&i.timeline>a.segments[a.segments.length-1].timeline)&&i.discontinuitySequence--);a.segments[l].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),fu({playlist:i,mediaSequence:a.segments[l].number})}})}({oldPlaylists:e,newPlaylists:i,timelineStarts:r.timelineStarts}),r}({oldManifest:o,newManifest:F}):F},kf=function(n,t,r){var o=n.timescale,d=n.periodStart,v=n.minimumUpdatePeriod;return Math.ceil((((n.NOW+n.clientOffset)/1e3+(void 0===v?0:v)-(n.availabilityStartTime+(void 0===d?0:d)))*(void 0===o?1:o)-t)/r)},pu=function(n,t){for(var r=n.type,e=n.minimumUpdatePeriod,i=void 0===e?0:e,a=n.media,o=void 0===a?"":a,l=n.sourceDuration,d=n.timescale,f=void 0===d?1:d,v=n.startNumber,g=void 0===v?1:v,T=n.periodStart,E=[],x=-1,S=0;Sx&&(x=W);var q=void 0;if(H<0){var ne=S+1;q=ne===t.length?"dynamic"===r&&i>0&&o.indexOf("$Number$")>0?kf(n,x,U):(l*f-x)/U:(t[ne].t-x)/U}else q=H+1;for(var he=g+E.length+q,z=g+E.length;z=i)?a:""+new Array(i-a.length+1).join("0")+a}}(t))},Df=function(n,t){var r={RepresentationID:n.id,Bandwidth:n.bandwidth||0},e=n.initialization,i=void 0===e?{sourceURL:"",range:""}:e,a=on({baseUrl:n.baseUrl,source:mu(i.sourceURL,r),range:i.range}),o=function(n,t){return n.duration||t?n.duration?os(n):pu(n,t):[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodStart}]}(n,t);return o.map(function(l){r.Number=l.number,r.Time=l.time;var d=mu(n.media||"",r),g=n.periodStart+(l.time-(n.presentationTimeOffset||0))/(n.timescale||1);return{uri:d,timeline:l.timeline,duration:l.duration,resolvedUri:Ei(n.baseUrl||"",d),map:a,number:l.number,presentationTime:g}})},Lf=function(n,t){var r=n.duration,e=n.segmentUrls,i=void 0===e?[]:e,a=n.periodStart;if(!r&&!t||r&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var l,o=i.map(function(f){return function(n,t){var r=n.baseUrl,e=n.initialization,i=void 0===e?{}:e,a=on({baseUrl:r,source:i.sourceURL,range:i.range}),o=on({baseUrl:r,source:t.media,range:t.mediaRange});return o.map=a,o}(n,f)});return r&&(l=os(n)),t&&(l=pu(n,t)),l.map(function(f,v){if(o[v]){var g=o[v],T=n.timescale||1,E=n.presentationTimeOffset||0;return g.timeline=f.timeline,g.duration=f.duration,g.number=f.number,g.presentationTime=a+(f.time-E)/T,g}}).filter(function(f){return f})},Of=function(n){var e,i,t=n.attributes,r=n.segmentInfo;r.template?(i=Df,e=Ft(t,r.template)):r.base?(i=lu,e=Ft(t,r.base)):r.list&&(i=Lf,e=Ft(t,r.list));var a={attributes:t};if(!i)return a;var o=i(e,r.segmentTimeline);if(e.duration){var f=e.timescale;e.duration=e.duration/(void 0===f?1:f)}else e.duration=o.length?o.reduce(function(g,T){return Math.max(g,Math.ceil(T.duration))},0):0;return a.attributes=e,a.segments=o,r.base&&e.indexRange&&(a.sidx=o[0],a.segments=[]),a},_t=function(n,t){return ou(n.childNodes).filter(function(r){return r.tagName===t})},cs=function(n){return n.textContent.trim()},Dr=function(n){var l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(n);if(!l)return 0;var d=l.slice(1),v=d[1],g=d[2],T=d[3],E=d[4],x=d[5];return 31536e3*parseFloat(d[0]||0)+2592e3*parseFloat(v||0)+86400*parseFloat(g||0)+3600*parseFloat(T||0)+60*parseFloat(E||0)+parseFloat(x||0)},gu={mediaPresentationDuration:function(n){return Dr(n)},availabilityStartTime:function(n){return function(n){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(n)&&(n+="Z"),Date.parse(n)}(n)/1e3},minimumUpdatePeriod:function(n){return Dr(n)},suggestedPresentationDelay:function(n){return Dr(n)},type:function(n){return n},timeShiftBufferDepth:function(n){return Dr(n)},start:function(n){return Dr(n)},width:function(n){return parseInt(n,10)},height:function(n){return parseInt(n,10)},bandwidth:function(n){return parseInt(n,10)},startNumber:function(n){return parseInt(n,10)},timescale:function(n){return parseInt(n,10)},presentationTimeOffset:function(n){return parseInt(n,10)},duration:function(n){var t=parseInt(n,10);return isNaN(t)?Dr(n):t},d:function(n){return parseInt(n,10)},t:function(n){return parseInt(n,10)},r:function(n){return parseInt(n,10)},DEFAULT:function(n){return n}},Ot=function(n){return n&&n.attributes?ou(n.attributes).reduce(function(t,r){return t[r.name]=(gu[r.name]||gu.DEFAULT)(r.value),t},{}):{}},Nf={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Gn=function(n,t){return t.length?qn(n.map(function(r){return t.map(function(e){return Ei(r,cs(e))})})):n},fs=function(n){var t=_t(n,"SegmentTemplate")[0],r=_t(n,"SegmentList")[0],e=r&&_t(r,"SegmentURL").map(function(g){return Ft({tag:"SegmentURL"},Ot(g))}),i=_t(n,"SegmentBase")[0],a=r||t,o=a&&_t(a,"SegmentTimeline")[0],l=r||i||t,d=l&&_t(l,"Initialization")[0],f=t&&Ot(t);f&&d?f.initialization=d&&Ot(d):f&&f.initialization&&(f.initialization={sourceURL:f.initialization});var v={template:f,segmentTimeline:o&&_t(o,"S").map(function(g){return Ot(g)}),list:r&&Ft(Ot(r),{segmentUrls:e,initialization:Ot(d)}),base:i&&Ft(Ot(i),{initialization:Ot(d)})};return Object.keys(v).forEach(function(g){v[g]||delete v[g]}),v},jf=function(n,t){return function(r,e){var i=Gn(t,_t(r.node,"BaseURL")),a=Ft(n,{periodStart:r.attributes.start});"number"==typeof r.attributes.duration&&(a.periodDuration=r.attributes.duration);var o=_t(r.node,"AdaptationSet"),l=fs(r.node);return qn(o.map(function(n,t,r){return function(e){var i=Ot(e),a=Gn(t,_t(e,"BaseURL")),o=_t(e,"Role")[0],l={role:Ot(o)},d=Ft(n,i,l),f=_t(e,"Accessibility")[0],v=function(n){return"urn:scte:dash:cc:cea-608:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var i,a;if(a=e,/^CC\d=/.test(e)){var o=e.split("=");i=o[0],a=o[1]}else/^CC\d$/.test(e)&&(i=e);return{channel:i,language:a}}):"urn:scte:dash:cc:cea-708:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var a=e.split("="),l=a[1],d=void 0===l?"":l;i.channel=a[0],i.language=e,d.split(",").forEach(function(f){var v=f.split(":"),g=v[0],T=v[1];"lang"===g?i.language=T:"er"===g?i.easyReader=Number(T):"war"===g?i.aspectRatio=Number(T):"3D"===g&&(i["3D"]=Number(T))})}else i.language=e;return i.channel&&(i.channel="SERVICE"+i.channel),i}):void 0}(Ot(f));v&&(d=Ft(d,{captionServices:v}));var g=_t(e,"Label")[0];if(g&&g.childNodes.length){var T=g.childNodes[0].nodeValue.trim();d=Ft(d,{label:T})}var E=function(n){return n.reduce(function(t,r){var e=Ot(r),i=Nf[e.schemeIdUri];if(i){t[i]={attributes:e};var a=_t(r,"cenc:pssh")[0];if(a){var o=cs(a),l=o&&kr(o);t[i].pssh=l}}return t},{})}(_t(e,"ContentProtection"));Object.keys(E).length&&(d=Ft(d,{contentProtection:E}));var x=fs(e),S=_t(e,"Representation"),F=Ft(r,x);return qn(S.map(function(n,t,r){return function(e){var i=_t(e,"BaseURL"),a=Gn(t,i),o=Ft(n,Ot(e)),l=fs(e);return a.map(function(d){return{segmentInfo:Ft(r,l),attributes:Ft(o,{baseUrl:d})}})}}(d,a,F)))}}(a,i,l)))}},vu=function(n){if(""===n)throw new Error("DASH_EMPTY_MANIFEST");var r,e,t=new Ki.DOMParser;try{e=(r=t.parseFromString(n,"application/xml"))&&"MPD"===r.documentElement.tagName?r.documentElement:null}catch(i){}if(!e||e&&e.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return e},zf=j(7459),Kf=j.n(zf),Re=function(n){return n instanceof Uint8Array?n:(!Array.isArray(n)&&!function(n){return function(n){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer}(n)}(n)&&!(n instanceof ArrayBuffer)&&(n="number"!=typeof n||"number"==typeof n&&n!=n?0:[n]),new Uint8Array(n&&n.buffer||n,n&&n.byteOffset||0,n&&n.byteLength||0))},Dt=P().BigInt||Number,hs=[Dt("0x1"),Dt("0x100"),Dt("0x10000"),Dt("0x1000000"),Dt("0x100000000"),Dt("0x10000000000"),Dt("0x1000000000000"),Dt("0x100000000000000"),Dt("0x10000000000000000")],eh=(s=new Uint16Array([65484]),new Uint8Array(s.buffer,s.byteOffset,s.byteLength),function(n,t){var r=void 0===t?{}:t,e=r.signed,i=void 0!==e&&e,a=r.le,o=void 0!==a&&a;n=Re(n);var l=o?"reduce":"reduceRight",f=(n[l]?n[l]:Array.prototype[l]).call(n,function(g,T,E){var x=o?E:Math.abs(E+1-n.length);return g+Dt(T)*hs[x]},Dt(0));if(i){var v=hs[n.length]/Dt(2)-Dt(1);(f=Dt(f))>v&&(f-=v,f-=v,f-=Dt(2))}return Number(f)}),Tu=function(n,t){if("string"!=typeof n&&n&&"function"==typeof n.toString&&(n=n.toString()),"string"!=typeof n)return new Uint8Array;t||(n=unescape(encodeURIComponent(n)));for(var r=new Uint8Array(n.length),e=0;e=t.length&&(t.every?t.every:Array.prototype.every).call(t,function(f,v){return f===(l[v]?l[v]&n[a+v]:n[a+v])})},nh=Re([73,68,51]),un=function s(n,t){return void 0===t&&(t=0),(n=Re(n)).length-t<10||!ht(n,nh,{offset:t})?t:(t+=function(n,t){void 0===t&&(t=0);var e=(n=Re(n))[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9];return(16&n[t+5])>>4?e+20:e+10}(n,t),s(n,t))},ps=(new Uint8Array([79,112,117,115,72,101,97,100]),function(n){return"string"==typeof n?Tu(n):n}),gs=function(n){n=Re(n);for(var t=[],r=0;n.length>r;){var e=n[r],i=0,a=0,o=n[++a];for(a++;128&o;)i=(127&o)<<7,o=n[a],a++;i+=127&o;for(var l=0;l>>0,o=n.subarray(i+4,i+8);if(0===a)break;var l=i+a;if(l>n.length){if(r)break;l=n.length}var d=n.subarray(i+8,l);ht(o,t[0])&&(1===t.length?e.push(d):e.push.apply(e,s(d,t.slice(1),r))),i=l}return e},dt={EBML:Re([26,69,223,163]),DocType:Re([66,130]),Segment:Re([24,83,128,103]),SegmentInfo:Re([21,73,169,102]),Tracks:Re([22,84,174,107]),Track:Re([174]),TrackNumber:Re([215]),DefaultDuration:Re([35,227,131]),TrackEntry:Re([174]),TrackType:Re([131]),FlagDefault:Re([136]),CodecID:Re([134]),CodecPrivate:Re([99,162]),VideoTrack:Re([224]),AudioTrack:Re([225]),Cluster:Re([31,67,182,117]),Timestamp:Re([231]),TimestampScale:Re([42,215,177]),BlockGroup:Re([160]),BlockDuration:Re([155]),Block:Re([161]),SimpleBlock:Re([163])},vs=[128,64,32,16,8,4,2,1],nr=function(n,t,r,e){void 0===r&&(r=!0),void 0===e&&(e=!1);var i=function(n){for(var t=1,r=0;r=t.length)return t.length;var e=nr(t,r,!1);if(ht(n.bytes,e.bytes))return r;var i=nr(t,r+e.length);return s(n,t,r+i.length+i.value+e.length)},pt=function s(n,t){t=function(n){return Array.isArray(n)?n.map(function(t){return bu(t)}):[bu(n)]}(t),n=Re(n);var r=[];if(!t.length)return r;for(var e=0;en.length?n.length:o+a.value);ht(t[0],i.bytes)&&(1===t.length?r.push(d):r=r.concat(s(d,t.slice(1)))),e+=i.length+a.length+d.length}return r},mh=Re([0,0,0,1]),gh=Re([0,0,1]),vh=Re([0,0,3]),_h=function(n){for(var t=[],r=1;r>1&63),-1!==r.indexOf(d)&&(a=i+l),i+=l+("h264"===t?1:2)}else i++}return n.subarray(0,0)},Ut={webm:Re([119,101,98,109]),matroska:Re([109,97,116,114,111,115,107,97]),flac:Re([102,76,97,67]),ogg:Re([79,103,103,83]),ac3:Re([11,119]),riff:Re([82,73,70,70]),avi:Re([65,86,73]),wav:Re([87,65,86,69]),"3gp":Re([102,116,121,112,51,103]),mp4:Re([102,116,121,112]),fmp4:Re([115,116,121,112]),mov:Re([102,116,121,112,113,116]),moov:Re([109,111,111,118]),moof:Re([109,111,111,102])},Lr={aac:function(n){var t=un(n);return ht(n,[255,16],{offset:t,mask:[255,22]})},mp3:function(n){var t=un(n);return ht(n,[255,2],{offset:t,mask:[255,6]})},webm:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,Ut.webm)},mkv:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,Ut.matroska)},mp4:function(n){return!Lr["3gp"](n)&&!Lr.mov(n)&&(!!(ht(n,Ut.mp4,{offset:4})||ht(n,Ut.fmp4,{offset:4})||ht(n,Ut.moof,{offset:4})||ht(n,Ut.moov,{offset:4}))||void 0)},mov:function(n){return ht(n,Ut.mov,{offset:4})},"3gp":function(n){return ht(n,Ut["3gp"],{offset:4})},ac3:function(n){var t=un(n);return ht(n,Ut.ac3,{offset:t})},ts:function(n){if(n.length<189&&n.length>=1)return 71===n[0];for(var t=0;t+1880?l:0)}if(P().console){var d=P().console[r];!d&&"debug"===r&&(d=P().console.info||P().console.log),d&&a&&o.test(r)&&d[Array.isArray(i)?"apply":"call"](P().console,i)}}}(s,r),r.createLogger=function(e){return ku(s+": "+e)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(r.history=function(){return zt?[].concat(zt):[]}).filter=function(e){return(zt||[]).filter(function(i){return new RegExp(".*"+e+".*").test(i[0])})},r.history.clear=function(){zt&&(zt.length=0)},r.history.disable=function(){null!==zt&&(zt.length=0,zt=null)},r.history.enable=function(){null===zt&&(zt=[])},r.error=function(){for(var e=arguments.length,i=new Array(e),a=0;a1?n-1:0),r=1;r=0)throw new Error("class has illegal whitespace characters")}function Mr(){return K()===P().document}function Nr(s){return Ii(s)&&1===s.nodeType}function Fu(){try{return P().parent!==P().self}catch(s){return!0}}function Uu(s){return function(n,t){if(!Mu(n))return K()[s](null);Mu(t)&&(t=K().querySelector(t));var r=Nr(t)?t:K();return r[s]&&r[s](n)}}function $e(s,n,t,r){void 0===s&&(s="div"),void 0===n&&(n={}),void 0===t&&(t={});var e=K().createElement(s);return Object.getOwnPropertyNames(n).forEach(function(i){var a=n[i];-1!==i.indexOf("aria-")||"role"===i||"type"===i?(Ke.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+i+" to "+a+"."),e.setAttribute(i,a)):"textContent"===i?ar(e,a):(e[i]!==a||"tabIndex"===i)&&(e[i]=a)}),Object.getOwnPropertyNames(t).forEach(function(i){e.setAttribute(i,t[i])}),r&&ks(e,r),e}function ar(s,n){return void 0===s.textContent?s.innerText=n:s.textContent=n,s}function Es(s,n){n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s)}function sr(s,n){return Nu(n),s.classList?s.classList.contains(n):function Ph(s){return new RegExp("(^|\\s)"+s+"($|\\s)")}(n).test(s.className)}function Li(s,n){return s.classList?s.classList.add(n):sr(s,n)||(s.className=(s.className+" "+n).trim()),s}function mn(s,n){return s?(s.classList?s.classList.remove(n):(Nu(n),s.className=s.className.split(/\s+/).filter(function(t){return t!==n}).join(" ")),s):(Ke.warn("removeClass was called with an element that doesn't exist"),null)}function Bu(s,n,t){var r=sr(s,n);if("function"==typeof t&&(t=t(s,n)),"boolean"!=typeof t&&(t=!r),t!==r)return t?Li(s,n):mn(s,n),s}function Hu(s,n){Object.getOwnPropertyNames(n).forEach(function(t){var r=n[t];null==r||!1===r?s.removeAttribute(t):s.setAttribute(t,!0===r?"":r)})}function Oi(s){var n={};if(s&&s.attributes&&s.attributes.length>0)for(var r=s.attributes,e=r.length-1;e>=0;e--){var i=r[e].name,a=r[e].value;("boolean"==typeof s[i]||-1!==",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+","))&&(a=null!==a),n[i]=a}return n}function ju(s,n){return s.getAttribute(n)}function Fr(s,n,t){s.setAttribute(n,t)}function Qn(s,n){s.removeAttribute(n)}function Vu(){K().body.focus(),K().onselectstart=function(){return!1}}function qu(){K().onselectstart=function(){return!0}}function Ur(s){if(s&&s.getBoundingClientRect&&s.parentNode){var n=s.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(function(r){void 0!==n[r]&&(t[r]=n[r])}),t.height||(t.height=parseFloat(fn(s,"height"))),t.width||(t.width=parseFloat(fn(s,"width"))),t}}function gn(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};for(var n=s.offsetWidth,t=s.offsetHeight,r=0,e=0;s.offsetParent&&s!==K()[zn.fullscreenElement];)r+=s.offsetLeft,e+=s.offsetTop,s=s.offsetParent;return{left:r,top:e,width:n,height:t}}function Jn(s,n){var t={x:0,y:0};if(Bt)for(var r=s;r&&"html"!==r.nodeName.toLowerCase();){var e=fn(r,"transform");if(/^matrix/.test(e)){var i=e.slice(7,-1).split(/,\s/).map(Number);t.x+=i[4],t.y+=i[5]}else if(/^matrix3d/.test(e)){var a=e.slice(9,-1).split(/,\s/).map(Number);t.x+=a[12],t.y+=a[13]}r=r.parentNode}var o={},l=gn(n.target),d=gn(s),f=d.width,g=n.offsetY-(d.top-l.top),T=n.offsetX-(d.left-l.left);return n.changedTouches&&(T=n.changedTouches[0].pageX-d.left,g=n.changedTouches[0].pageY+d.top,Bt&&(T-=t.x,g-=t.y)),o.y=1-Math.max(0,Math.min(1,g/d.height)),o.x=Math.max(0,Math.min(1,T/f)),o}function Wu(s){return Ii(s)&&3===s.nodeType}function Cs(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function Gu(s){return"function"==typeof s&&(s=s()),(Array.isArray(s)?s:[s]).map(function(n){return"function"==typeof n&&(n=n()),Nr(n)||Wu(n)?n:"string"==typeof n&&/\S/.test(n)?K().createTextNode(n):void 0}).filter(function(n){return n})}function ks(s,n){return Gu(n).forEach(function(t){return s.appendChild(t)}),s}function Zu(s,n){return ks(Cs(s),n)}function vn(s){return void 0===s.button&&void 0===s.buttons||0===s.button&&void 0===s.buttons||"mouseup"===s.type&&0===s.button&&0===s.buttons||!(0!==s.button||1!==s.buttons)}var As,Yi=Uu("querySelector"),zu=Uu("querySelectorAll"),Ku=Object.freeze({__proto__:null,isReal:Mr,isEl:Nr,isInFrame:Fu,createEl:$e,textContent:ar,prependTo:Es,hasClass:sr,addClass:Li,removeClass:mn,toggleClass:Bu,setAttributes:Hu,getAttributes:Oi,getAttribute:ju,setAttribute:Fr,removeAttribute:Qn,blockTextSelection:Vu,unblockTextSelection:qu,getBoundingClientRect:Ur,findPosition:gn,getPointerPosition:Jn,isTextNode:Wu,emptyEl:Cs,normalizeContent:Gu,appendContent:ks,insertContent:Zu,isSingleLeftClick:vn,$:Yi,$$:zu}),$u=!1,Lh=function(){if(!1!==As.options.autoSetup){var n=Array.prototype.slice.call(K().getElementsByTagName("video")),t=Array.prototype.slice.call(K().getElementsByTagName("audio")),r=Array.prototype.slice.call(K().getElementsByTagName("video-js")),e=n.concat(t,r);if(e&&e.length>0)for(var i=0,a=e.length;i-1&&(e={passive:!0}),s.addEventListener(n,r.dispatcher,e)}else s.attachEvent&&s.attachEvent("on"+n,r.dispatcher)}function Rt(s,n,t){if(Ht.has(s)){var r=Ht.get(s);if(r.handlers){if(Array.isArray(n))return Ds(Rt,s,n,t);var e=function(d,f){r.handlers[f]=[],Ju(d,f)};if(void 0===n){for(var i in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},i)&&e(s,i);return}var a=r.handlers[n];if(a){if(!t)return void e(s,n);if(t.guid)for(var o=0;o=t&&(n.apply(void 0,arguments),r=a)}},At=function(){};At.prototype.allowedEvents_={},At.prototype.addEventListener=At.prototype.on=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},$t(this,s,n),this.addEventListener=t},At.prototype.removeEventListener=At.prototype.off=function(s,n){Rt(this,s,n)},At.prototype.one=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},ia(this,s,n),this.addEventListener=t},At.prototype.any=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},el(this,s,n),this.addEventListener=t},At.prototype.dispatchEvent=At.prototype.trigger=function(s){var n=s.type||s;"string"==typeof s&&(s={type:n}),s=ea(s),this.allowedEvents_[n]&&this["on"+n]&&this["on"+n](s),Br(this,s)},At.prototype.queueTrigger=function(s){var n=this;_n||(_n=new Map);var t=s.type||s,r=_n.get(this);r||_n.set(this,r=new Map);var e=r.get(t);r.delete(t),P().clearTimeout(e);var i=P().setTimeout(function(){0===r.size&&(r=null,_n.delete(n)),n.trigger(s)},0);r.set(t,i)};var ra=function(n){return"function"==typeof n.name?n.name():"string"==typeof n.name?n.name:n.name_?n.name_:n.constructor&&n.constructor.name?n.constructor.name:typeof n},Mi=function(n){return n instanceof At||!!n.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof n[t]})},Ps=function(n){return"string"==typeof n&&/\S/.test(n)||Array.isArray(n)&&!!n.length},na=function(n,t,r){if(!n||!n.nodeName&&!Mi(n))throw new Error("Invalid target for "+ra(t)+"#"+r+"; must be a DOM node or evented object.")},tl=function(n,t,r){if(!Ps(n))throw new Error("Invalid event type for "+ra(t)+"#"+r+"; must be a non-empty string or array.")},il=function(n,t,r){if("function"!=typeof n)throw new Error("Invalid listener for "+ra(t)+"#"+r+"; must be a function.")},Ls=function(n,t,r){var i,a,o,e=t.length<3||t[0]===n||t[0]===n.eventBusEl_;return e?(i=n.eventBusEl_,t.length>=3&&t.shift(),a=t[0],o=t[1]):(i=t[0],a=t[1],o=t[2]),na(i,n,r),tl(a,n,r),il(o,n,r),{isTargetingSelf:e,target:i,type:a,listener:o=nt(n,o)}},or=function(n,t,r,e){na(n,n,t),n.nodeName?Fh[t](n,r,e):n[t](r,e)},Hh={on:function(){for(var n=this,t=arguments.length,r=new Array(t),e=0;e=0;r--)this.children_[r].dispose&&this.children_[r].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null),this.player_=null}},n.isDisposed=function(){return Boolean(this.isDisposed_)},n.player=function(){return this.player_},n.options=function(r){return r?(this.options_=ct(this.options_,r),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(r,e,i){return $e(r,e,i)},n.localize=function(r,e,i){void 0===i&&(i=r);var a=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),l=o&&o[a],d=a&&a.split("-")[0],f=o&&o[d],v=i;return l&&l[r]?v=l[r]:f&&f[r]&&(v=f[r]),e&&(v=v.replace(/\{(\d+)\}/g,function(g,T){var E=e[T-1],x=E;return void 0===E&&(x=g),x})),v},n.handleLanguagechange=function(){},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(r){return this.childIndex_[r]},n.getChild=function(r){if(r)return this.childNameIndex_[r]},n.getDescendant=function(){for(var r=arguments.length,e=new Array(r),i=0;i=0;i--)if(this.children_[i]===r){e=!0,this.children_.splice(i,1);break}if(e){r.parentComponent_=null,this.childIndex_[r.id()]=null,this.childNameIndex_[yt(r.name())]=null,this.childNameIndex_[aa(r.name())]=null;var a=r.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(r.el())}}},n.initChildren=function(){var r=this,e=this.options_.children;if(e){var o,i=this.options_,l=s.getComponent("Tech");(o=Array.isArray(e)?e:Object.keys(e)).concat(Object.keys(this.options_).filter(function(d){return!o.some(function(f){return"string"==typeof f?d===f:d===f.name})})).map(function(d){var f,v;return"string"==typeof d?v=e[f=d]||r.options_[f]||{}:(f=d.name,v=d),{name:f,opts:v}}).filter(function(d){var f=s.getComponent(d.opts.componentClass||yt(d.name));return f&&!l.isTech(f)}).forEach(function(f){var v=f.name,g=f.opts;if(void 0!==i[v]&&(g=i[v]),!1!==g){!0===g&&(g={}),g.playerOptions=r.options_.playerOptions;var T=r.addChild(v,g);T&&(r[v]=T)}})}},n.buildCSSClass=function(){return""},n.ready=function(r,e){if(void 0===e&&(e=!1),r){if(!this.isReady_)return this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(r);e?r.call(this):this.setTimeout(r,1)}},n.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var r=this.readyQueue_;this.readyQueue_=[],r&&r.length>0&&r.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},n.$=function(r,e){return Yi(r,e||this.contentEl())},n.$$=function(r,e){return zu(r,e||this.contentEl())},n.hasClass=function(r){return sr(this.el_,r)},n.addClass=function(r){Li(this.el_,r)},n.removeClass=function(r){mn(this.el_,r)},n.toggleClass=function(r,e){Bu(this.el_,r,e)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(r){return ju(this.el_,r)},n.setAttribute=function(r,e){Fr(this.el_,r,e)},n.removeAttribute=function(r){Qn(this.el_,r)},n.width=function(r,e){return this.dimension("width",r,e)},n.height=function(r,e){return this.dimension("height",r,e)},n.dimensions=function(r,e){this.width(r,!0),this.height(e)},n.dimension=function(r,e,i){if(void 0!==e)return(null===e||e!=e)&&(e=0),this.el_.style[r]=-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?e:"auto"===e?"":e+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var a=this.el_.style[r],o=a.indexOf("px");return parseInt(-1!==o?a.slice(0,o):this.el_["offset"+yt(r)],10)},n.currentDimension=function(r){var e=0;if("width"!==r&&"height"!==r)throw new Error("currentDimension only accepts width or height value");if(e=fn(this.el_,r),0===(e=parseFloat(e))||isNaN(e)){var i="offset"+yt(r);e=this.el_[i]}return e},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(r){this.player_&&(Ne().isEventKey(r,"Tab")||r.stopPropagation(),this.player_.handleKeyDown(r))},n.handleKeyPress=function(r){this.handleKeyDown(r)},n.emitTapEvents=function(){var o,r=0,e=null;this.on("touchstart",function(d){1===d.touches.length&&(e={pageX:d.touches[0].pageX,pageY:d.touches[0].pageY},r=P().performance.now(),o=!0)}),this.on("touchmove",function(d){if(d.touches.length>1)o=!1;else if(e){var f=d.touches[0].pageX-e.pageX,v=d.touches[0].pageY-e.pageY;Math.sqrt(f*f+v*v)>10&&(o=!1)}});var l=function(){o=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(d){e=null,!0===o&&P().performance.now()-r<200&&(d.preventDefault(),this.trigger("tap"))})},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,r=nt(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){r(),this.clearInterval(e),e=this.setInterval(r,250)});var i=function(o){r(),this.clearInterval(e)};this.on("touchmove",r),this.on("touchend",i),this.on("touchcancel",i)}},n.setTimeout=function(r,e){var a,i=this;return r=nt(this,r),this.clearTimersOnDispose_(),a=P().setTimeout(function(){i.setTimeoutIds_.has(a)&&i.setTimeoutIds_.delete(a),r()},e),this.setTimeoutIds_.add(a),a},n.clearTimeout=function(r){return this.setTimeoutIds_.has(r)&&(this.setTimeoutIds_.delete(r),P().clearTimeout(r)),r},n.setInterval=function(r,e){r=nt(this,r),this.clearTimersOnDispose_();var i=P().setInterval(r,e);return this.setIntervalIds_.add(i),i},n.clearInterval=function(r){return this.setIntervalIds_.has(r)&&(this.setIntervalIds_.delete(r),P().clearInterval(r)),r},n.requestAnimationFrame=function(r){var i,e=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),r=nt(this,r),i=P().requestAnimationFrame(function(){e.rafIds_.has(i)&&e.rafIds_.delete(i),r()}),this.rafIds_.add(i),i):this.setTimeout(r,1e3/60)},n.requestNamedAnimationFrame=function(r,e){var i=this;if(!this.namedRafs_.has(r)){this.clearTimersOnDispose_(),e=nt(this,e);var a=this.requestAnimationFrame(function(){e(),i.namedRafs_.has(r)&&i.namedRafs_.delete(r)});return this.namedRafs_.set(r,a),r}},n.cancelNamedAnimationFrame=function(r){!this.namedRafs_.has(r)||(this.cancelAnimationFrame(this.namedRafs_.get(r)),this.namedRafs_.delete(r))},n.cancelAnimationFrame=function(r){return this.supportsRaf_?(this.rafIds_.has(r)&&(this.rafIds_.delete(r),P().cancelAnimationFrame(r)),r):this.clearTimeout(r)},n.clearTimersOnDispose_=function(){var r=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var a=e[1];r[e[0]].forEach(function(o,l){return r[a](l)})}),r.clearingTimersOnDispose_=!1}))},s.registerComponent=function(r,e){if("string"!=typeof r||!r)throw new Error('Illegal component name, "'+r+'"; must be a non-empty string.');var i=s.getComponent("Tech"),a=i&&i.isTech(e),o=s===e||s.prototype.isPrototypeOf(e.prototype);if(a||!o)throw new Error('Illegal component, "'+r+'"; '+(a?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");r=yt(r),s.components_||(s.components_={});var d=s.getComponent("Player");if("Player"===r&&d&&d.players){var f=d.players,v=Object.keys(f);if(f&&v.length>0&&v.map(function(g){return f[g]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return s.components_[r]=e,s.components_[aa(r)]=e,e},s.getComponent=function(r){if(r&&s.components_)return s.components_[r]},s}();function nl(s,n,t,r){return function Zh(s,n,t){if("number"!=typeof n||n<0||n>t)throw new Error("Failed to execute '"+s+"' on 'TimeRanges': The index provided ("+n+") is non-numeric or out of bounds (0-"+t+").")}(s,r,t.length-1),t[r][n]}function Ms(s){var n;return n=void 0===s||0===s.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:s.length,start:nl.bind(null,"start",0,s),end:nl.bind(null,"end",1,s)},P().Symbol&&P().Symbol.iterator&&(n[P().Symbol.iterator]=function(){return(s||[]).values()}),n}function ur(s,n){return Array.isArray(s)?Ms(s):void 0===s||void 0===n?Ms():Ms([[s,n]])}function al(s,n){var r,e,t=0;if(!n)return 0;(!s||!s.length)&&(s=ur(0,0));for(var i=0;in&&(e=n),t+=e-r;return t/n}function jt(s){if(s instanceof jt)return s;"number"==typeof s?this.code=s:"string"==typeof s?this.message=s:Ii(s)&&("number"==typeof s.code&&(this.code=s.code),gt(this,s)),this.message||(this.message=jt.defaultMessages[this.code]||"")}$.prototype.supportsRaf_="function"==typeof P().requestAnimationFrame&&"function"==typeof P().cancelAnimationFrame,$.registerComponent("Component",$),jt.prototype.code=0,jt.prototype.message="",jt.prototype.status=null,jt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],jt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Hr=0;Hr=0;i--)if(r[i].enabled){Us(r,r[i]);break}return(e=s.call(this,r)||this).changing_=!1,e}X(n,s);var t=n.prototype;return t.addTrack=function(e){var i=this;e.enabled&&Us(this,e),s.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){i.changing_||(i.changing_=!0,Us(i,e),i.changing_=!1,i.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){s.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},n}(Vr),Bs=function(n,t){for(var r=0;r=0;i--)if(r[i].selected){Bs(r,r[i]);break}return(e=s.call(this,r)||this).changing_=!1,Object.defineProperty(Ae(e),"selectedIndex",{get:function(){for(var o=0;o0&&(P().console&&P().console.groupCollapsed&&P().console.groupCollapsed("Text Track parsing errors for "+t.src),e.forEach(function(i){return Ke.error(i)}),P().console&&P().console.groupEnd&&P().console.groupEnd()),r.flush()},fl=function(n,t){var r={uri:n},e=sa(n);e&&(r.cors=e);var i="use-credentials"===t.tech_.crossOrigin();i&&(r.withCredentials=i),Vi()(r,nt(this,function(a,o,l){if(a)return Ke.error(a,o);t.loaded_=!0,"function"!=typeof P().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],function(d){if("vttjserror"!==d.type)return cl(l,t);Ke.error("vttjs failed to load, stopping trying to process "+t.src)}):cl(l,t)}))},Tn=function(s){function n(r){var e;if(void 0===r&&(r={}),!r.tech)throw new Error("A tech was not provided.");var i=ct(r,{kind:tp[r.kind]||"subtitles",language:r.language||r.srclang||""}),a=ll[i.mode]||"disabled",o=i.default;("metadata"===i.kind||"chapters"===i.kind)&&(a="hidden"),(e=s.call(this,i)||this).tech_=i.tech,e.cues_=[],e.activeCues_=[],e.preload_=!1!==e.tech_.preloadTextTracks;var l=new ul(e.cues_),d=new ul(e.activeCues_),f=!1,v=nt(Ae(e),function(){!this.tech_.isReady_||this.tech_.isDisposed()||(this.activeCues=this.activeCues,f&&(this.trigger("cuechange"),f=!1))});return e.tech_.one("dispose",function(){e.tech_.off("timeupdate",v)}),"disabled"!==a&&e.tech_.on("timeupdate",v),Object.defineProperties(Ae(e),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return a},set:function(E){!ll[E]||a!==E&&(a=E,!this.preload_&&"disabled"!==a&&0===this.cues.length&&fl(this.src,this),this.tech_.off("timeupdate",v),"disabled"!==a&&this.tech_.on("timeupdate",v),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var E=this.tech_.currentTime(),x=[],S=0,F=this.cues.length;S=E||U.startTime===U.endTime&&U.startTime<=E&&U.startTime+.5>=E)&&x.push(U)}if(f=!1,x.length!==this.activeCues_.length)f=!0;else for(var H=0;H0)return void this.trigger("vttjsloaded");var i=K().createElement("script");i.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",i.onload=function(){e.trigger("vttjsloaded")},i.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),P().WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.addWebVttScript_)},t.emulateTextTracks=function(){var e=this,i=this.textTracks(),a=this.remoteTextTracks(),o=function(g){return i.addTrack(g.track)},l=function(g){return i.removeTrack(g.track)};a.on("addtrack",o),a.on("removetrack",l),this.addWebVttScript_();var d=function(){return e.trigger("texttrackchange")},f=function(){d();for(var g=0;g=0;e--){var i=s[e];i[n]&&i[n](r,t)}}(s,t,o,a),o}var cp={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},fp={setCurrentTime:1,setMuted:1,setVolume:1},_l={play:1,pause:1};function Ws(s){return function(n,t){return n===oa?oa:t[s]?t[s](n):n}}function dr(s,n,t,r,e,i){void 0===s&&(s={}),void 0===n&&(n=[]),void 0===e&&(e=[]),void 0===i&&(i=!1);var o=n[0],l=n.slice(1);if("string"==typeof o)dr(s,lr[o],t,r,e,i);else if(o){var d=function mp(s,n){var t=qs[s.id()],r=null;if(null==t)return r=n(s),qs[s.id()]=[[n,r]],r;for(var e=0;e0;this.player_.tech(!0)&&!((pn||hn)&&i)&&this.player_.tech(!0).focus(),this.player_.paused()?vi(this.player_.play()):this.player_.pause()}},n}(la);$.registerComponent("PosterImage",Tp);var ri="#222",bp={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Gs(s,n){var t;if(4===s.length)t=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else{if(7!==s.length)throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");t=s.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"}function Zs(s,n,t){try{s.style[n]=t}catch(r){return}}var xp=function(s){function n(r,e,i){var a;a=s.call(this,r,e,i)||this;var o=function(d){return a.updateDisplay(d)};return r.on("loadstart",function(l){return a.toggleDisplay(l)}),r.on("texttrackchange",o),r.on("loadedmetadata",function(l){return a.preselectTrack(l)}),r.ready(nt(Ae(a),function(){if(r.tech_&&r.tech_.featuresNativeTextTracks)this.hide();else{r.on("fullscreenchange",o),r.on("playerresize",o),P().addEventListener("orientationchange",o),r.on("dispose",function(){return P().removeEventListener("orientationchange",o)});for(var l=this.options_.playerOptions.tracks||[],d=0;d0;return vi(i),void(this.player_.tech(!0)&&(!pn&&!hn||!a)&&this.player_.tech(!0).focus())}var o=this.player_.getChild("controlBar"),l=o&&o.getChild("playToggle");if(l){var d=function(){return l.focus()};yn(i)?i.then(d,function(){}):this.setTimeout(d,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,s.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},n}(li);bl.prototype.controlText_="Play Video",$.registerComponent("BigPlayButton",bl);var Ep=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).controlText(e&&e.controlText||i.localize("Close")),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){Ne().isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):s.prototype.handleKeyDown.call(this,e)},n}(li);$.registerComponent("CloseButton",Ep);var xl=function(s){function n(r,e){var i;return void 0===e&&(e={}),i=s.call(this,r,e)||this,e.replay=void 0===e.replay||e.replay,i.on(r,"play",function(a){return i.handlePlay(a)}),i.on(r,"pause",function(a){return i.handlePause(a)}),e.replay&&i.on(r,"ended",function(a){return i.handleEnded(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?vi(this.player_.play()):this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){var i=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(a){return i.handleSeeked(a)})},n}(li);xl.prototype.controlText_="Play",$.registerComponent("PlayToggle",xl);var Sl=function(n,t){n=n<0?0:n;var r=Math.floor(n%60),e=Math.floor(n/60%60),i=Math.floor(n/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(n)||n===1/0)&&(i=e=r="-"),(i=i>0||o>0?i+":":"")+(e=((i||a>=10)&&e<10?"0"+e:e)+":")+(r<10?"0"+r:r)},zs=Sl;function Gr(s,n){return void 0===n&&(n=s),zs(s,n)}var Zr=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,["timeupdate","ended"],function(a){return i.updateContent(a)}),i.updateTextNode_(),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=this.buildCSSClass(),i=s.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control"}),a=$e("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});return i.appendChild(a),this.contentEl_=$e("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),i.appendChild(this.contentEl_),i},t.dispose=function(){this.contentEl_=null,this.textNode_=null,s.prototype.dispose.call(this)},t.updateTextNode_=function(e){var i=this;void 0===e&&(e=0),e=Gr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(i.contentEl_){var a=i.textNode_;a&&i.contentEl_.firstChild!==a&&(a=null,Ke.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),i.textNode_=K().createTextNode(i.formattedTime_),i.textNode_&&(a?i.contentEl_.replaceChild(i.textNode_,a):i.contentEl_.appendChild(i.textNode_))}}))},t.updateContent=function(e){},n}($);Zr.prototype.labelText_="Time",Zr.prototype.controlText_="Time",$.registerComponent("TimeDisplay",Zr);var Ks=function(s){function n(){return s.apply(this,arguments)||this}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-current-time"},t.updateContent=function(e){var i;i=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)},n}(Zr);Ks.prototype.labelText_="Current Time",Ks.prototype.controlText_="Current Time",$.registerComponent("CurrentTimeDisplay",Ks);var $s=function(s){function n(r,e){var i,a=function(l){return i.updateContent(l)};return(i=s.call(this,r,e)||this).on(r,"durationchange",a),i.on(r,"loadstart",a),i.on(r,"loadedmetadata",a),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var i=this.player_.duration();this.updateTextNode_(i)},n}(Zr);$s.prototype.labelText_="Duration",$s.prototype.controlText_="Duration",$.registerComponent("DurationDisplay",$s);var Ap=function(s){function n(){return s.apply(this,arguments)||this}return X(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=s.prototype.createEl.call(this,"div"),a=s.prototype.createEl.call(this,"span",{textContent:"/"});return i.appendChild(a),e.appendChild(i),e},n}($);$.registerComponent("TimeDivider",Ap);var Ys=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,"durationchange",function(a){return i.updateContent(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=s.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&e.insertBefore($e("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){var i;"number"==typeof this.player_.duration()&&(i=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(i))},n}(Zr);Ys.prototype.labelText_="Remaining Time",Ys.prototype.controlText_="Remaining Time",$.registerComponent("RemainingTimeDisplay",Ys);var wp=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).updateShowing(),i.on(i.player(),"durationchange",function(a){return i.updateShowing(a)}),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=$e("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild($e("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"})),this.contentEl_.appendChild(K().createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,s.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},n}($);$.registerComponent("LiveDisplay",wp);var El=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&(i.updateLiveEdgeStatusHandler_=function(a){return i.updateLiveEdgeStatus(a)},i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatusHandler_)),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=$e("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,s.prototype.dispose.call(this)},n}(li);El.prototype.controlText_="Seek to live, currently playing live",$.registerComponent("SeekToLive",El);var da=function(n,t,r){return n=Number(n),Math.min(r,Math.max(t,isNaN(n)?t:n))},Xs=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).handleMouseDown_=function(a){return i.handleMouseDown(a)},i.handleMouseUp_=function(a){return i.handleMouseUp(a)},i.handleKeyDown_=function(a){return i.handleKeyDown(a)},i.handleClick_=function(a){return i.handleClick(a)},i.handleMouseMove_=function(a){return i.handleMouseMove(a)},i.update_=function(a){return i.update(a)},i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}X(n,s);var t=n.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,i,a){return void 0===i&&(i={}),void 0===a&&(a={}),i.className=i.className+" vjs-slider",i=gt({tabIndex:0},i),a=gt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},a),s.prototype.createEl.call(this,e,i,a)},t.handleMouseDown=function(e){var i=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"===e.type&&!Pi&&e.preventDefault(),Vu(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;qu(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},t.update=function(){var e=this;if(this.el_&&this.bar){var i=this.getProgress();return i===this.progress_||(this.progress_=i,this.requestNamedAnimationFrame("Slider#update",function(){var a=e.vertical()?"height":"width";e.bar.el().style[a]=(100*i).toFixed(2)+"%"})),i}},t.getProgress=function(){return Number(da(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var i=Jn(this.el_,e);return this.vertical()?i.y:i.x},t.handleKeyDown=function(e){Ne().isEventKey(e,"Left")||Ne().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):Ne().isEventKey(e,"Right")||Ne().isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):s.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal")},n}($);$.registerComponent("Slider",Xs);var Qs=function(n,t){return da(n/t*100,0,100).toFixed(2)+"%"},Ip=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).partEls_=[],i.on(r,"progress",function(a){return i.update(a)}),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=$e("span",{className:"vjs-control-text"}),a=$e("span",{textContent:this.localize("Loaded")}),o=K().createTextNode(": ");return this.percentageEl_=$e("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(a),i.appendChild(o),i.appendChild(this.percentageEl_),e},t.dispose=function(){this.partEls_=null,this.percentageEl_=null,s.prototype.dispose.call(this)},t.update=function(e){var i=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var a=i.player_.liveTracker,o=i.player_.buffered(),l=a&&a.isLive()?a.seekableEnd():i.player_.duration(),d=i.player_.bufferedEnd(),f=i.partEls_,v=Qs(d,l);i.percent_!==v&&(i.el_.style.width=v,ar(i.percentageEl_,v),i.percent_=v);for(var g=0;go.length;S--)i.el_.removeChild(f[S-1]);f.length=o.length})},n}($);$.registerComponent("LoadProgressBar",Ip);var Dp=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,i,a){var o=gn(this.el_),l=Ur(this.player_.el()),d=e.width*i;if(l&&o){var f=e.left-l.left+d,v=e.width-d+(l.right-e.right),g=o.width/2;fo.width&&(g=o.width),g=Math.round(g),this.el_.style.right="-"+g+"px",this.write(a)}},t.write=function(e){ar(this.el_,e)},t.updateTime=function(e,i,a,o){var l=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var d,f=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var v=l.player_.liveTracker.liveWindow(),g=v-i*v;d=(g<1?"":"-")+Gr(g,v)}else d=Gr(a,f);l.update(e,i,d),o&&o()})},n}($);$.registerComponent("TimeTooltip",Dp);var Js=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,i){var a=this.getChild("timeTooltip");if(a){var o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(e,i,o)}},n}($);Js.prototype.options_={children:[]},!Bt&&!Di&&Js.prototype.options_.children.push("timeTooltip"),$.registerComponent("PlayProgressBar",Js);var Cl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,i){var a=this,o=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,o,function(){a.el_.style.left=e.width*i+"px"})},n}($);Cl.prototype.options_={children:["timeTooltip"]},$.registerComponent("MouseTimeDisplay",Cl);var eo=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).setEventHandlers_(),i}X(n,s);var t=n.prototype;return t.setEventHandlers_=function(){var e=this;this.update_=nt(this,this.update),this.update=Ri(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(i){return e.enableInterval_(i)},this.disableIntervalHandler_=function(i){return e.disableInterval_(i)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in K()&&"visibilityState"in K()&&this.on(K(),"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){"hidden"===K().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||!this.updateInterval||(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(e){var i=this;if("hidden"!==K().visibilityState){var a=s.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var o=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),l=i.player_.liveTracker,d=i.player_.duration();l&&l.isLive()&&(d=i.player_.liveTracker.liveCurrentTime()),i.percent_!==a&&(i.el_.setAttribute("aria-valuenow",(100*a).toFixed(2)),i.percent_=a),(i.currentTime_!==o||i.duration_!==d)&&(i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[Gr(o,d),Gr(d,d)],"{1} of {2}")),i.currentTime_=o,i.duration_=d),i.bar&&i.bar.update(Ur(i.el()),i.getProgress())}),a}},t.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var i,e=this.getCurrentTime_(),a=this.player_.liveTracker;return a&&a.isLive()?(i=(e-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i},t.handleMouseDown=function(e){!vn(e)||(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),s.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e,i){if(void 0===i&&(i=!1),vn(e)){!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var a,o=this.calculateDistance(e),l=this.player_.liveTracker;if(l&&l.isLive()){if(o>=.99)return void l.seekToLiveEdge();var d=l.seekableStart(),f=l.liveCurrentTime();if((a=d+o*l.liveWindow())>=f&&(a=f),a<=d&&(a=d+.1),a===1/0)return}else(a=o*this.player_.duration())===this.player_.duration()&&(a-=.1);this.userSeek_(a)}},t.enable=function(){s.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.show()},t.disable=function(){s.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.hide()},t.handleMouseUp=function(e){s.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?vi(this.player_.play()):this.update_()},t.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},t.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){var i=this.player_.liveTracker;if(Ne().isEventKey(e,"Space")||Ne().isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(Ne().isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(Ne().isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(Ne()(e))){e.preventDefault(),e.stopPropagation();var a=10*(Ne().codes[Ne()(e)]-Ne().codes[0])/100;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else Ne().isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):Ne().isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):s.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in K()&&"visibilityState"in K()&&this.off(K(),"visibilitychange",this.toggleVisibility_),s.prototype.dispose.call(this)},n}(Xs);eo.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},!Bt&&!Di&&eo.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),$.registerComponent("SeekBar",eo);var Al=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).handleMouseMove=Ri(nt(Ae(i),i.handleMouseMove),30),i.throttledHandleMouseSeek=Ri(nt(Ae(i),i.handleMouseSeek),30),i.handleMouseUpHandler_=function(a){return i.handleMouseUp(a)},i.handleMouseDownHandler_=function(a){return i.handleMouseDown(a)},i.enable(),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var i=this.getChild("seekBar");if(i){var a=i.getChild("playProgressBar"),o=i.getChild("mouseTimeDisplay");if(a||o){var l=i.el(),d=gn(l),f=Jn(l,e).x;f=da(f,0,1),o&&o.update(d,f),a&&a.update(d,i.getProgress())}}},t.handleMouseSeek=function(e){var i=this.getChild("seekBar");i&&i.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){if(this.children().forEach(function(i){return i.disable&&i.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&vi(this.player_.play())}},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},t.handleMouseDown=function(e){var i=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},n}($);Al.prototype.options_={children:["seekBar"]},$.registerComponent("ProgressControl",Al);var wl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,["enterpictureinpicture","leavepictureinpicture"],function(a){return i.handlePictureInPictureChange(a)}),i.on(r,["disablepictureinpicturechanged","loadedmetadata"],function(a){return i.handlePictureInPictureEnabledChange(a)}),i.disable(),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+s.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){K().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},n}(li);wl.prototype.controlText_="Picture-in-Picture",$.registerComponent("PictureInPictureToggle",wl);var Il=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,"fullscreenchange",function(a){return i.handleFullscreenChange(a)}),!1===K()[r.fsApi_.fullscreenEnabled]&&i.disable(),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+s.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},n}(li);Il.prototype.controlText_="Fullscreen",$.registerComponent("FullscreenToggle",Il);var Lp=function(s){function n(){return s.apply(this,arguments)||this}return X(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(s.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},n}($);$.registerComponent("VolumeLevel",Lp);var Op=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},t.update=function(e,i,a,o){if(!a){var l=Ur(this.el_),d=Ur(this.player_.el()),f=e.width*i;if(!d||!l)return;var v=e.left-d.left+f,g=e.width-f+(d.right-e.right),T=l.width/2;vl.width&&(T=l.width),this.el_.style.right="-"+T+"px"}this.write(o+"%")},t.write=function(e){ar(this.el_,e)},t.updateVolume=function(e,i,a,o,l){var d=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){d.update(e,i,a,o.toFixed(0)),l&&l()})},n}($);$.registerComponent("VolumeLevelTooltip",Op);var Dl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,i,a){var o=this,l=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,a,l,function(){a?o.el_.style.bottom=e.height*i+"px":o.el_.style.left=e.width*i+"px"})},n}($);Dl.prototype.options_={children:["volumeLevelTooltip"]},$.registerComponent("MouseVolumeLevelDisplay",Dl);var fa=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on("slideractive",function(a){return i.updateLastVolume_(a)}),i.on(r,"volumechange",function(a){return i.updateARIAAttributes(a)}),r.ready(function(){return i.updateARIAAttributes()}),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){!vn(e)||s.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){var i=this.getChild("mouseVolumeLevelDisplay");if(i){var a=this.el(),o=Ur(a),l=this.vertical(),d=Jn(a,e);d=da(d=l?d.y:d.x,0,1),i.update(o,d,l)}!vn(e)||(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,i=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(i)})},n}(Xs);fa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Bt&&!Di&&fa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),fa.prototype.playerEvent="volumechange",$.registerComponent("VolumeBar",fa);var Pl=function(s){function n(r,e){var i;return void 0===e&&(e={}),e.vertical=e.vertical||!1,(void 0===e.volumeBar||cn(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),function(n,t){t.tech_&&!t.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ae(i=s.call(this,r,e)||this),r),i.throttledHandleMouseMove=Ri(nt(Ae(i),i.handleMouseMove),30),i.handleMouseUpHandler_=function(a){return i.handleMouseUp(a)},i.on("mousedown",function(a){return i.handleMouseDown(a)}),i.on("touchstart",function(a){return i.handleMouseDown(a)}),i.on("mousemove",function(a){return i.handleMouseMove(a)}),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},n}($);Pl.prototype.options_={children:["volumeBar"]},$.registerComponent("VolumeControl",Pl);var Ll=function(s){function n(r,e){var i;return function(n,t){t.tech_&&!t.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ae(i=s.call(this,r,e)||this),r),i.on(r,["loadstart","volumechange"],function(a){return i.update(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var i=this.player_.volume(),a=this.player_.lastVolume_();0===i?(this.player_.volume(a<.1?.1:a),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),i=3;Bt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?i=0:e<.33?i=1:e<.67&&(i=2);for(var a=0;a<4;a++)mn(this.el_,"vjs-vol-"+a);Li(this.el_,"vjs-vol-"+i)},t.updateControlText_=function(){var i=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)},n}(li);Ll.prototype.controlText_="Mute",$.registerComponent("MuteToggle",Ll);var Ol=function(s){function n(r,e){var i;return void 0===e&&(e={}),e.inline=void 0===e.inline||e.inline,(void 0===e.volumeControl||cn(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),(i=s.call(this,r,e)||this).handleKeyPressHandler_=function(a){return i.handleKeyPress(a)},i.on(r,["loadstart"],function(a){return i.volumePanelState_(a)}),i.on(i.muteToggle,"keyup",function(a){return i.handleKeyPress(a)}),i.on(i.volumeControl,"keyup",function(a){return i.handleVolumeControlKeyUp(a)}),i.on("keydown",function(a){return i.handleKeyPress(a)}),i.on("mouseover",function(a){return i.handleMouseOver(a)}),i.on("mouseout",function(a){return i.handleMouseOut(a)}),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}X(n,s);var t=n.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),s.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){Ne().isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass("vjs-hover"),$t(K(),"keyup",this.handleKeyPressHandler_)},t.handleMouseOut=function(e){this.removeClass("vjs-hover"),Rt(K(),"keyup",this.handleKeyPressHandler_)},t.handleKeyPress=function(e){Ne().isEventKey(e,"Esc")&&this.handleMouseOut()},n}($);Ol.prototype.options_={children:["muteToggle","volumeControl"]},$.registerComponent("VolumePanel",Ol);var Rl=function(s){function n(r,e){var i;return i=s.call(this,r,e)||this,e&&(i.menuButton_=e.menuButton),i.focusedChild_=-1,i.on("keydown",function(a){return i.handleKeyDown(a)}),i.boundHandleBlur_=function(a){return i.handleBlur(a)},i.boundHandleTapClick_=function(a){return i.handleTapClick(a)},i}X(n,s);var t=n.prototype;return t.addEventListenerForItem=function(e){e instanceof $&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof $&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),s.prototype.removeChild.call(this,e)},t.addItem=function(e){var i=this.addChild(e);i&&this.addEventListenerForItem(i)},t.createEl=function(){this.contentEl_=$e(this.options_.contentElType||"ul",{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=s.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),$t(i,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),i},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,s.prototype.dispose.call(this)},t.handleBlur=function(e){var i=e.relatedTarget||K().activeElement;if(!this.children().some(function(o){return o.el()===i})){var a=this.menuButton_;a&&a.buttonPressed_&&i!==a.el().firstChild&&a.unpressButton()}},t.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var i=this.children();if(!Array.isArray(i))return;var a=i.filter(function(o){return o.el()===e.target})[0];if(!a)return;"CaptionSettingsMenuItem"!==a.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){Ne().isEventKey(e,"Left")||Ne().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(Ne().isEventKey(e,"Right")||Ne().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())},n}($);$.registerComponent("Menu",Rl);var to=function(s){function n(r,e){var i;void 0===e&&(e={}),(i=s.call(this,r,e)||this).menuButton_=new li(r,e),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var a=li.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+a,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0;var o=function(d){return i.handleClick(d)};return i.handleMenuKeyUp_=function(l){return i.handleMenuKeyUp(l)},i.on(i.menuButton_,"tap",o),i.on(i.menuButton_,"click",o),i.on(i.menuButton_,"keydown",function(l){return i.handleKeyDown(l)}),i.on(i.menuButton_,"mouseenter",function(){i.addClass("vjs-hover"),i.menu.show(),$t(K(),"keyup",i.handleMenuKeyUp_)}),i.on("mouseleave",function(l){return i.handleMouseLeave(l)}),i.on("keydown",function(l){return i.handleSubmenuKeyDown(l)}),i}X(n,s);var t=n.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new Rl(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var i=$e("li",{className:"vjs-menu-title",textContent:yt(this.options_.title),tabIndex:-1}),a=new $(this.player_,{el:i});e.addItem(a)}if(this.items=this.createItems(),this.items)for(var o=0;o-1&&"showing"===d.mode){a=!1;break}}a!==this.isSelected_&&this.selected(a)},t.handleSelectedLanguageChange=function(e){for(var i=this.player().textTracks(),a=!0,o=0,l=i.length;o-1&&"showing"===d.mode){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})},n}(xn);$.registerComponent("OffTextTrackMenuItem",Ml);var zr=function(s){function n(r,e){return void 0===e&&(e={}),e.tracks=r.textTracks(),s.call(this,r,e)||this}return X(n,s),n.prototype.createItems=function(e,i){var a;void 0===e&&(e=[]),void 0===i&&(i=xn),this.label_&&(a=this.label_+" off"),e.push(new Ml(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;var o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var l=0;l-1){var f=new i(this.player_,{track:d,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});f.addClass("vjs-"+d.kind+"-menu-item"),e.push(f)}}return e},n}(io);$.registerComponent("TextTrackButton",zr);var Nl=function(s){function n(r,e){var i,a=e.track,o=e.cue,l=r.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=o.text,e.selected=o.startTime<=l&&l=0;i--){var a=e[i];if(a.kind===this.kind_)return a}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(yt(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),s.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var i=this.track_.cues;if(!i)return e;for(var a=0,o=i.length;a-1&&(i.label_="captions"),i.menuButton_.controlText(yt(i.label_)),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new so(this.player_,{kind:this.label_})),this.hideThreshold_+=1),s.prototype.createItems.call(this,e,Fl)},n}(zr);uo.prototype.kinds_=["captions","subtitles"],uo.prototype.controlText_="Subtitles",$.registerComponent("SubsCapsButton",uo);var Ul=function(s){function n(r,e){var i,a=e.track,o=r.audioTracks();e.label=a.label||a.language||"Unknown",e.selected=a.enabled,(i=s.call(this,r,e)||this).track=a,i.addClass("vjs-"+a.kind+"-menu-item");var l=function(){for(var f=arguments.length,v=new Array(f),g=0;g=0;a--)i.push(new lo(this.player(),{rate:e[a]+"x"}));return i},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(e){var i=this.player().playbackRate(),a=this.playbackRates(),l=(a.indexOf(i)+1)%a.length;this.player().playbackRate(a[l])},t.handlePlaybackRateschange=function(e){this.update()},t.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},n}(to);Hl.prototype.controlText_="Playback Rate",$.registerComponent("PlaybackRateMenuButton",Hl);var jl=function(s){function n(){return s.apply(this,arguments)||this}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(e,i,a){return void 0===e&&(e="div"),void 0===i&&(i={}),void 0===a&&(a={}),i.className||(i.className=this.buildCSSClass()),s.prototype.createEl.call(this,e,i,a)},n}($);$.registerComponent("Spacer",jl);var Np=function(s){function n(){return s.apply(this,arguments)||this}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-custom-control-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})},n}(jl);$.registerComponent("CustomControlSpacer",Np);var ha=function(s){function n(){return s.apply(this,arguments)||this}return X(n,s),n.prototype.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},n}($);ha.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in K()&&ha.prototype.options_.children.splice(ha.prototype.options_.children.length-1,0,"pictureInPictureToggle"),$.registerComponent("ControlBar",ha);var Vl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,"error",function(a){return i.open(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-error-display "+s.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):""},n}(jr);Vl.prototype.options_=it({},jr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),$.registerComponent("ErrorDisplay",Vl);var co="vjs-text-track-settings",ql=["#000","Black"],Wl=["#00F","Blue"],Gl=["#0FF","Cyan"],Zl=["#0F0","Green"],zl=["#F0F","Magenta"],Kl=["#F00","Red"],$l=["#FFF","White"],Yl=["#FF0","Yellow"],fo=["1","Opaque"],ho=["0.5","Semi-Transparent"],Xl=["0","Transparent"],cr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ql,$l,Kl,Zl,Wl,Yl,zl,Gl]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[fo,ho,Xl]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[$l,ql,Kl,Zl,Wl,Yl,zl,Gl]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(n){return"1.00"===n?null:Number(n)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[fo,ho]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Xl,ho,fo]}};function Ql(s,n){if(n&&(s=n(s)),s&&"none"!==s)return s}cr.windowColor.options=cr.backgroundColor.options;var Bp=function(s){function n(r,e){var i;return e.temporary=!1,(i=s.call(this,r,e)||this).updateDisplay=i.updateDisplay.bind(Ae(i)),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=$e("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===e.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),Or(cr,function(a){i.on(i.$(a.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}X(n,s);var t=n.prototype;return t.dispose=function(){this.endDialog=null,s.prototype.dispose.call(this)},t.createElSelect_=function(e,i,a){var o=this;void 0===i&&(i=""),void 0===a&&(a="label");var l=cr[e],d=l.id.replace("%s",this.id_),f=[i,d].join(" ").trim();return["<"+a+' id="'+d+'" class="'+("label"===a?"vjs-label":"")+'">',this.localize(l.label),"",'").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['
','',this.localize("Text"),"",this.createElSelect_("color",e),'',this.createElSelect_("textOpacity",e),"","
"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['
','',this.localize("Background"),"",this.createElSelect_("backgroundColor",e),'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['
','',this.localize("Window"),"",this.createElSelect_("windowColor",e),'',this.createElSelect_("windowOpacity",e),"","
"].join("")},t.createElColors_=function(){return $e("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return $e("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return $e("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return s.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var e=this;return function Ah(s,n,t){return void 0===t&&(t=0),wu(s).reduce(function(r,e){return n(r,s[e],e)},t)}(cr,function(i,a,o){var l=function Fp(s,n){return Ql(s.options[s.options.selectedIndex].value,n)}(e.$(a.selector),a.parser);return void 0!==l&&(i[o]=l),i},{})},t.setValues=function(e){var i=this;Or(cr,function(a,o){!function Up(s,n,t){if(n)for(var r=0;rthis.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(d=!1),d!==this.behindLiveEdge_&&(this.behindLiveEdge_=d,this.trigger("liveedgechange"))}},t.handleDurationchange=function(){this.toggleTracking()},t.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},t.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},t.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},t.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},t.stopTracking=function(){!this.isTracking()||(this.reset_(),this.trigger("liveedgechange"))},t.seekableEnd=function(){for(var e=this.player_.seekable(),i=[],a=e?e.length:0;a--;)i.push(e.end(a));return i.length?i.sort()[i.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),i=[],a=e?e.length:0;a--;)i.push(e.start(a));return i.length?i.sort()[0]:0},t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return"number"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},t.dispose=function(){this.off(K(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),s.prototype.dispose.call(this)},n}($);$.registerComponent("LiveTracker",Vp);var pa,po=function(n){var t=n.el();if(t.hasAttribute("src"))return n.triggerSourceset(t.src),!0;var r=n.$$("source"),e=[],i="";if(!r.length)return!1;for(var a=0;a=2&&l.push("loadeddata"),e.readyState>=3&&l.push("canplay"),e.readyState>=4&&l.push("canplaythrough"),this.ready(function(){l.forEach(function(d){this.trigger(d)},this)})}},t.setScrubbing=function(e){this.isScrubbing_=e},t.scrubbing=function(){return this.isScrubbing_},t.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Xn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){Ke(i,"Video is not ready. (Video.js)")}},t.duration=function(){var e=this;return this.el_.duration===1/0&&Di&&Pi&&0===this.el_.currentTime?(this.on("timeupdate",function a(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",a))}),NaN):this.el_.duration||NaN},t.width=function(){return this.el_.offsetWidth},t.height=function(){return this.el_.offsetHeight},t.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},a=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",a),this.on("dispose",function(){e.off("webkitbeginfullscreen",a),e.off("webkitendfullscreen",i)})}},t.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=P().navigator&&P().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)vi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},t.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},t.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},t.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.reset=function(){n.resetMediaElement(this.el_)},t.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.setControls=function(e){this.el_.controls=!!e},t.addTextTrack=function(e,i,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,a):s.prototype.addTextTrack.call(this,e,i,a)},t.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return s.prototype.createRemoteTextTrack.call(this,e);var i=K().createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i},t.addRemoteTextTrack=function(e,i){var a=s.prototype.addRemoteTextTrack.call(this,e,i);return this.featuresNativeTextTracks&&this.el().appendChild(a),a},t.removeRemoteTextTrack=function(e){if(s.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var i=this.$$("track"),a=i.length;a--;)(e===i[a]||e===i[a].track)&&this.el().removeChild(i[a])},t.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),P().performance&&"function"==typeof P().performance.now?e.creationTime=P().performance.now():P().performance&&P().performance.timing&&"number"==typeof P().performance.timing.navigationStart&&(e.creationTime=P().Date.now()-P().performance.timing.navigationStart),e},n}(at);mo(be,"TEST_VID",function(){if(Mr()){var s=K().createElement("video"),n=K().createElement("track");return n.kind="captions",n.srclang="en",n.label="English",s.appendChild(n),s}}),be.isSupported=function(){try{be.TEST_VID.volume=.5}catch(s){return!1}return!(!be.TEST_VID||!be.TEST_VID.canPlayType)},be.canPlayType=function(s){return be.TEST_VID.canPlayType(s)},be.canPlaySource=function(s,n){return be.canPlayType(s.type)},be.canControlVolume=function(){try{var s=be.TEST_VID.volume;be.TEST_VID.volume=s/2+.1;var n=s!==be.TEST_VID.volume;return n&&Bt?(P().setTimeout(function(){be&&be.prototype&&(be.prototype.featuresVolumeControl=s!==be.TEST_VID.volume)}),!1):n}catch(t){return!1}},be.canMuteVolume=function(){try{var s=be.TEST_VID.muted;return be.TEST_VID.muted=!s,be.TEST_VID.muted?Fr(be.TEST_VID,"muted","muted"):Qn(be.TEST_VID,"muted"),s!==be.TEST_VID.muted}catch(n){return!1}},be.canControlPlaybackRate=function(){if(Di&&Pi&&Ou<58)return!1;try{var s=be.TEST_VID.playbackRate;return be.TEST_VID.playbackRate=s/2+.1,s!==be.TEST_VID.playbackRate}catch(n){return!1}},be.canOverrideAttributes=function(){try{var s=function(){};Object.defineProperty(K().createElement("video"),"src",{get:s,set:s}),Object.defineProperty(K().createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(K().createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(K().createElement("audio"),"innerHTML",{get:s,set:s})}catch(n){return!1}return!0},be.supportsNativeTextTracks=function(){return Xn||Bt&&Pi},be.supportsNativeVideoTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.videoTracks)},be.supportsNativeAudioTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.audioTracks)},be.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(s){var t=s[1];mo(be.prototype,s[0],function(){return be[t]()},!0)}),be.prototype.featuresVolumeControl=be.canControlVolume(),be.prototype.movingMediaElementInDOM=!Bt,be.prototype.featuresFullscreenResize=!0,be.prototype.featuresProgressEvents=!0,be.prototype.featuresTimeupdateEvents=!0,be.patchCanPlayType=function(){Ts>=4&&!Lu&&!Pi&&(pa=be.TEST_VID&&be.TEST_VID.constructor.prototype.canPlayType,be.TEST_VID.constructor.prototype.canPlayType=function(s){return s&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(s)?"maybe":pa.call(this,s)})},be.unpatchCanPlayType=function(){var s=be.TEST_VID.constructor.prototype.canPlayType;return pa&&(be.TEST_VID.constructor.prototype.canPlayType=pa),s},be.patchCanPlayType(),be.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch(n){}}()}},be.resetMediaElement=function(s){if(s){for(var n=s.querySelectorAll("source"),t=n.length;t--;)s.removeChild(n[t]);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch(r){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){be.prototype["set"+yt(s)]=function(n){this.el_[s]=n,n?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){be.prototype["set"+yt(s)]=function(n){this.el_[s]=n}}),["pause","load","play"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]()}}),at.withSourceHandlers(be),be.nativeSourceHandler={},be.nativeSourceHandler.canPlayType=function(s){try{return be.TEST_VID.canPlayType(s)}catch(n){return""}},be.nativeSourceHandler.canHandleSource=function(s,n){if(s.type)return be.nativeSourceHandler.canPlayType(s.type);if(s.src){var t=Vs(s.src);return be.nativeSourceHandler.canPlayType("video/"+t)}return""},be.nativeSourceHandler.handleSource=function(s,n,t){n.setSrc(s.src)},be.nativeSourceHandler.dispose=function(){},be.registerSourceHandler(be.nativeSourceHandler),at.registerTech("Html5",be);var td=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],go={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},vo=["tiny","xsmall","small","medium","large","xlarge","huge"],ma={};vo.forEach(function(s){var n="x"===s.charAt(0)?"x-"+s.substring(1):s;ma[s]="vjs-layout-"+n});var Kp={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},xt=function(s){function n(r,e,i){var a;if(r.id=r.id||e.id||"vjs_video_"+Xi(),(e=gt(n.getTagSettings(r),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof r.closest){var o=r.closest("[lang]");o&&o.getAttribute&&(e.language=o.getAttribute("lang"))}else for(var l=r;l&&1===l.nodeType;){if(Oi(l).hasOwnProperty("lang")){e.language=l.getAttribute("lang");break}l=l.parentNode}if((a=s.call(this,null,e,i)||this).boundDocumentFullscreenChange_=function(g){return a.documentFullscreenChange_(g)},a.boundFullWindowOnEscKey_=function(g){return a.fullWindowOnEscKey(g)},a.boundUpdateStyleEl_=function(g){return a.updateStyleEl_(g)},a.boundApplyInitTime_=function(g){return a.applyInitTime_(g)},a.boundUpdateCurrentBreakpoint_=function(g){return a.updateCurrentBreakpoint_(g)},a.boundHandleTechClick_=function(g){return a.handleTechClick_(g)},a.boundHandleTechDoubleClick_=function(g){return a.handleTechDoubleClick_(g)},a.boundHandleTechTouchStart_=function(g){return a.handleTechTouchStart_(g)},a.boundHandleTechTouchMove_=function(g){return a.handleTechTouchMove_(g)},a.boundHandleTechTouchEnd_=function(g){return a.handleTechTouchEnd_(g)},a.boundHandleTechTap_=function(g){return a.handleTechTap_(g)},a.isFullscreen_=!1,a.log=Au(a.id_),a.fsApi_=zn,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=r,a.tagAttributes=r&&Oi(r),a.language(a.options_.language),e.languages){var d={};Object.getOwnPropertyNames(e.languages).forEach(function(g){d[g.toLowerCase()]=e.languages[g]}),a.languages_=d}else a.languages_=n.prototype.options_.languages;a.resetCache_(),a.poster_=e.poster||"",a.controls_=!!e.controls,r.controls=!1,r.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],r.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),e.plugins&&Object.keys(e.plugins).forEach(function(g){if("function"!=typeof a[g])throw new Error('plugin "'+g+'" does not exist')}),a.scrubbing_=!1,a.el_=a.createEl(),Os(Ae(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&($t(K(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var f=ct(a.options_);e.plugins&&Object.keys(e.plugins).forEach(function(g){a[g](e.plugins[g])}),e.debug&&a.debug(!0),a.options_.playerOptions=f,a.middleware_=[],a.playbackRates(e.playbackRates),a.initChildren(),a.isAudio("audio"===r.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),Rr&&a.addClass("vjs-touch-enabled"),Bt||a.addClass("vjs-workinghover"),n.players[a.id_]=Ae(a);var v="7.18.1".split(".")[0];return a.addClass("vjs-v"+v),a.userActive(!0),a.reportUserActivity(),a.one("play",function(g){return a.listenForUserActivity_(g)}),a.on("stageclick",function(g){return a.handleStageClick_(g)}),a.on("keydown",function(g){return a.handleKeyDown(g)}),a.on("languagechange",function(g){return a.handleLanguagechange(g)}),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}X(n,s);var t=n.prototype;return t.dispose=function(){var e=this;this.trigger("dispose"),this.off("dispose"),Rt(K(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Rt(K(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),n.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function pp(s){qs[s.id()]=null}(this),Vt.names.forEach(function(i){var o=e[Vt[i].getterName]();o&&o.off&&o.off()}),s.prototype.dispose.call(this)},t.createEl=function(){var i,e=this.tag,a=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();a?i=this.el_=e.parentNode:o||(i=this.el_=s.prototype.createEl.call(this,"div"));var l=Oi(e);if(o){for(i=this.el_=e,e=this.tag=K().createElement("video");i.children.length;)e.appendChild(i.firstChild);sr(i,"video-js")||Li(i,"video-js"),i.appendChild(e),a=this.playerElIngest_=i,Object.keys(i).forEach(function(E){try{e[E]=i[E]}catch(x){}})}if(e.setAttribute("tabindex","-1"),l.tabindex="-1",(pn||Pi&&Ru)&&(e.setAttribute("role","application"),l.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(E){o&&"class"===E||i.setAttribute(E,l[E]),o&&e.setAttribute(E,l[E])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused"),!0!==P().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Yu("vjs-styles-dimensions");var d=Yi(".vjs-styles-defaults"),f=Yi("head");f.insertBefore(this.styleEl_,d?d.nextSibling:f.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var v=e.getElementsByTagName("a"),g=0;g0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),g=v[1]/v[0];o=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/g:this.videoWidth()||300,l=void 0!==this.height_?this.height_:o*g,f=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(f),Xu(this.styleEl_,"\n ."+f+" {\n width: "+o+"px;\n height: "+l+"px;\n }\n\n ."+f+".vjs-fluid {\n padding-top: "+100*g+"%;\n }\n ")}else{var e="number"==typeof this.width_?this.width_:this.options_.width,i="number"==typeof this.height_?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(e>=0&&(a.width=e),i>=0&&(a.height=i))}},t.loadTech_=function(e,i){var a=this;this.tech_&&this.unloadTech_();var o=yt(e),l=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==o&&this.tag&&(at.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1;var d=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(d=!1);var f={source:i,autoplay:d,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+l+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Vt.names.forEach(function(g){var T=Vt[g];f[T.getterName]=a[T.privateName]}),gt(f,this.options_[o]),gt(f,this.options_[l]),gt(f,this.options_[e.toLowerCase()]),this.tag&&(f.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(f.startTime=this.cache_.currentTime);var v=at.getTech(e);if(!v)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new v(f),this.tech_.ready(nt(this,this.handleTechReady_),!0),function(n,t){n.forEach(function(r){var e=t.addRemoteTextTrack(r).track;!r.src&&r.cues&&r.cues.forEach(function(i){return e.addCue(i)})}),t.textTracks()}(this.textTracksJson_||[],this.tech_),td.forEach(function(g){a.on(a.tech_,g,function(T){return a["handleTech"+yt(g)+"_"](T)})}),Object.keys(go).forEach(function(g){a.on(a.tech_,g,function(T){0===a.tech_.playbackRate()&&a.tech_.seeking()?a.queuedCallbacks_.push({callback:a["handleTech"+go[g]+"_"].bind(a),event:T}):a["handleTech"+go[g]+"_"](T)})}),this.on(this.tech_,"loadstart",function(g){return a.handleTechLoadStart_(g)}),this.on(this.tech_,"sourceset",function(g){return a.handleTechSourceset_(g)}),this.on(this.tech_,"waiting",function(g){return a.handleTechWaiting_(g)}),this.on(this.tech_,"ended",function(g){return a.handleTechEnded_(g)}),this.on(this.tech_,"seeking",function(g){return a.handleTechSeeking_(g)}),this.on(this.tech_,"play",function(g){return a.handleTechPlay_(g)}),this.on(this.tech_,"firstplay",function(g){return a.handleTechFirstPlay_(g)}),this.on(this.tech_,"pause",function(g){return a.handleTechPause_(g)}),this.on(this.tech_,"durationchange",function(g){return a.handleTechDurationChange_(g)}),this.on(this.tech_,"fullscreenchange",function(g,T){return a.handleTechFullscreenChange_(g,T)}),this.on(this.tech_,"fullscreenerror",function(g,T){return a.handleTechFullscreenError_(g,T)}),this.on(this.tech_,"enterpictureinpicture",function(g){return a.handleTechEnterPictureInPicture_(g)}),this.on(this.tech_,"leavepictureinpicture",function(g){return a.handleTechLeavePictureInPicture_(g)}),this.on(this.tech_,"error",function(g){return a.handleTechError_(g)}),this.on(this.tech_,"posterchange",function(g){return a.handleTechPosterChange_(g)}),this.on(this.tech_,"textdata",function(g){return a.handleTechTextData_(g)}),this.on(this.tech_,"ratechange",function(g){return a.handleTechRateChange_(g)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&("Html5"!==o||!this.tag)&&Es(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.unloadTech_=function(){var e=this;Vt.names.forEach(function(i){var a=Vt[i];e[a.privateName]=e[a.getterName]()}),this.textTracksJson_=function(n){var t=n.$$("track"),r=Array.prototype.map.call(t,function(i){return i.track});return Array.prototype.map.call(t,function(i){var a=Ns(i.track);return i.src&&(a.src=i.src),a}).concat(Array.prototype.filter.call(n.textTracks(),function(i){return-1===r.indexOf(i)}).map(Ns))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.tech=function(e){return void 0===e&&Ke.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},t.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},t.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},t.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},t.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},t.manualAutoplay_=function(e){var i=this;if(this.tech_&&"string"==typeof e){var o,a=function(){var d=i.muted();i.muted(!0);var f=function(){i.muted(d)};i.playTerminatedQueue_.push(f);var v=i.play();if(yn(v))return v.catch(function(g){throw f(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(g||""))})};if("any"!==e||this.muted()?o="muted"!==e||this.muted()?this.play():a():yn(o=this.play())&&(o=o.catch(a)),yn(o))return o.then(function(){i.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){i.trigger({type:"autoplay-failure",autoplay:e})})}},t.updateSourceCaches_=function(e){void 0===e&&(e="");var i=e,a="";"string"!=typeof i&&(i=e.src,a=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!a&&(a=function(n,t){if(!t)return"";if(n.cache_.source.src===t&&n.cache_.source.type)return n.cache_.source.type;var r=n.cache_.sources.filter(function(o){return o.src===t});if(r.length)return r[0].type;for(var e=n.$$("source"),i=0;i0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var i=this.currentTime();this.on("timeupdate",function o(){i!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",o))})},t.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},t.handleTechFirstPlay_=function(){this.options_.starttime&&(Ke.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.handleTechClick_=function(e){!this.controls_||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.click||!1!==this.options_.userActions.click)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?vi(this.play()):this.pause())},t.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(a){return a.contains(e.target)})||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.doubleClick||!1!==this.options_.userActions.doubleClick)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},t.handleTechTap_=function(){this.userActive(!this.userActive())},t.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},t.handleStageClick_=function(){this.reportUserActivity()},t.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.documentFullscreenChange_=function(e){var i=e.target.player;if(!i||i===this){var a=this.el(),o=K()[this.fsApi_.fullscreenElement]===a;!o&&a.matches?o=a.matches(":"+this.fsApi_.fullscreen):!o&&a.msMatchesSelector&&(o=a.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}},t.handleTechFullscreenChange_=function(e,i){var a=this;i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){a.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))},t.handleTechFullscreenError_=function(e,i){this.trigger("fullscreenerror",i)},t.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},t.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},t.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},t.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.getCache=function(){return this.cache_},t.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},t.techCall_=function(e,i){this.ready(function(){if(e in fp)return function dp(s,n,t,r){return n[t](s.reduce(Ws(t),r))}(this.middleware_,this.tech_,e,i);if(e in _l)return vl(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(a){throw Ke(a),a}},!0)},t.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in cp)return function lp(s,n,t){return s.reduceRight(Ws(t),n[t]())}(this.middleware_,this.tech_,e);if(e in _l)return vl(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw void 0===this.tech_[e]?(Ke("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",i),i):"TypeError"===i.name?(Ke("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",i),this.tech_.isReady_=!1,i):(Ke(i),i)}}},t.play=function(){var e=this,i=this.options_.Promise||P().Promise;return i?new i(function(a){e.play_(a)}):this.play_()},t.play_=function(e){var i=this;void 0===e&&(e=vi),this.playCallbacks_.push(e);var a=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!a)return this.waitToPlay_=function(l){i.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!a&&(Xn||Bt)&&this.load());var o=this.techGet_("play");null===o?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(o)},t.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})},t.runPlayCallbacks_=function(e){var i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(a){a(e)})},t.pause=function(){this.techCall_("pause")},t.paused=function(){return!1!==this.techGet_("paused")},t.played=function(){return this.techGet_("played")||ur(0,0)},t.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},t.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},t.remainingTime=function(){return this.duration()-this.currentTime()},t.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.buffered=function(){var e=this.techGet_("buffered");return(!e||!e.length)&&(e=ur(0,0)),e},t.bufferedPercent=function(){return al(this.buffered(),this.duration())},t.bufferedEnd=function(){var e=this.buffered(),i=this.duration(),a=e.end(e.length-1);return a>i&&(a=i),a},t.volume=function(e){var i;return void 0!==e?(i=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=i,this.techCall_("setVolume",i),void(i>0&&this.lastVolume_(i))):(i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i)},t.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.isFullscreen=function(e){if(void 0!==e){var i=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},t.requestFullscreen=function(e){var i=this.options_.Promise||P().Promise;if(i){var a=this;return new i(function(o,l){function d(){a.off("fullscreenerror",v),a.off("fullscreenchange",f)}function f(){d(),o()}function v(T,E){d(),l(E)}a.one("fullscreenchange",f),a.one("fullscreenerror",v);var g=a.requestFullscreenHelper_(e);g&&(g.then(d,d),g.then(o,l))})}return this.requestFullscreenHelper_()},t.requestFullscreenHelper_=function(e){var a,i=this;if(this.fsApi_.prefixed||(a=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(a=e)),this.fsApi_.requestFullscreen){var o=this.el_[this.fsApi_.requestFullscreen](a);return o&&o.then(function(){return i.isFullscreen(!0)},function(){return i.isFullscreen(!1)}),o}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},t.exitFullscreen=function(){var e=this.options_.Promise||P().Promise;if(e){var i=this;return new e(function(a,o){function l(){i.off("fullscreenerror",f),i.off("fullscreenchange",d)}function d(){l(),a()}function f(g,T){l(),o(T)}i.one("fullscreenchange",d),i.one("fullscreenerror",f);var v=i.exitFullscreenHelper_();v&&(v.then(l,l),v.then(a,o))})}return this.exitFullscreenHelper_()},t.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var i=K()[this.fsApi_.exitFullscreen]();return i&&vi(i.then(function(){return e.isFullscreen(!1)})),i}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},t.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=K().documentElement.style.overflow,$t(K(),"keydown",this.boundFullWindowOnEscKey_),K().documentElement.style.overflow="hidden",Li(K().body,"vjs-full-window"),this.trigger("enterFullWindow")},t.fullWindowOnEscKey=function(e){Ne().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},t.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Rt(K(),"keydown",this.boundFullWindowOnEscKey_),K().documentElement.style.overflow=this.docOrigOverflow,mn(K().body,"vjs-full-window"),this.trigger("exitFullWindow")},t.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},t.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},t.requestPictureInPicture=function(){if("pictureInPictureEnabled"in K()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},t.exitPictureInPicture=function(){if("pictureInPictureEnabled"in K())return K().exitPictureInPicture()},t.handleKeyDown=function(e){var l,d,i=this.options_.userActions;i&&i.hotkeys&&(d=(l=this.el_.ownerDocument.activeElement).tagName.toLowerCase(),l.isContentEditable||("input"===d?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(l.type):-1!==["textarea"].indexOf(d))||("function"==typeof i.hotkeys?i.hotkeys.call(this,e):this.handleHotkeys(e)))},t.handleHotkeys=function(e){var i=this.options_.userActions?this.options_.userActions.hotkeys:{},a=i.fullscreenKey,l=i.muteKey,d=void 0===l?function(x){return Ne().isEventKey(x,"m")}:l,f=i.playPauseKey,v=void 0===f?function(x){return Ne().isEventKey(x,"k")||Ne().isEventKey(x,"Space")}:f;if((void 0===a?function(x){return Ne().isEventKey(x,"f")}:a).call(this,e)){e.preventDefault(),e.stopPropagation();var g=$.getComponent("FullscreenToggle");!1!==K()[this.fsApi_.fullscreenEnabled]&&g.prototype.handleClick.call(this,e)}else d.call(this,e)?(e.preventDefault(),e.stopPropagation(),$.getComponent("MuteToggle").prototype.handleClick.call(this,e)):v.call(this,e)&&(e.preventDefault(),e.stopPropagation(),$.getComponent("PlayToggle").prototype.handleClick.call(this,e))},t.canPlayType=function(e){for(var i,a=0,o=this.options_.techOrder;a1?a.handleSrc_(o.slice(1)):(a.changingSrc_=!1,a.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void a.triggerReady());!function up(s,n){s.forEach(function(t){return t.setTech&&t.setTech(n)})}(v,a.tech_)}),this.options_.retryOnError&&o.length>1){var l=function(){a.error(null),a.handleSrc_(o.slice(1),!0)},d=function(){a.off("error",l)};this.one("error",l),this.one("playing",d),this.resetRetryOnError_=function(){a.off("error",l),a.off("playing",d)}}}else this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},t.src=function(e){return this.handleSrc_(e,!1)},t.src_=function(e){var i=this,a=this.selectSource([e]);return!a||(function(n,t){return yt(n)===yt(t)}(a.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(a.tech,a.source),this.tech_.ready(function(){i.changingSrc_=!1}),!1))},t.load=function(){this.techCall_("load")},t.reset=function(){var e=this,i=this.options_.Promise||P().Promise;this.paused()||!i?this.doReset_():vi(this.play().then(function(){return e.doReset_()}))},t.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Mi(this)&&this.trigger("playerreset")},t.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},t.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,i=e.durationDisplay,a=e.remainingTimeDisplay;i&&i.updateContent(),a&&a.updateContent()},t.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},t.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},t.currentSources=function(){var e=this.currentSource(),i=[];return 0!==Object.keys(e).length&&i.push(e),this.cache_.sources||i},t.currentSource=function(){return this.cache_.source||{}},t.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var i;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),i=!1):this.options_.autoplay=!!e,i=void 0===i?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)},t.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.controls=function(e){if(void 0===e)return!!this.controls_;this.controls_!==(e=!!e)&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;this.usingNativeControls_!==(e=!!e)&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.error=function(e){var i=this;if(void 0===e)return this.error_||null;if($i("beforeerror").forEach(function(o){var l=o(i,e);Ii(l)&&!Array.isArray(l)||"string"==typeof l||"number"==typeof l||null===l?e=l:i.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){var a=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],a),void this.one("loadstart",function(){this.off(["click","touchstart"],a)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new jt(e),this.addClass("vjs-error"),Ke.error("(CODE:"+this.error_.code+" "+jt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),$i("error").forEach(function(o){return o(i,i.error_)})},t.reportUserActivity=function(e){this.userActivity_=!0},t.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.listenForUserActivity_=function(){var e,i,a,o=nt(this,this.reportUserActivity),f=function(E){o(),this.clearInterval(e)};this.on("mousedown",function(){o(),this.clearInterval(e),e=this.setInterval(o,250)}),this.on("mousemove",function(E){(E.screenX!==i||E.screenY!==a)&&(i=E.screenX,a=E.screenY,o())}),this.on("mouseup",f),this.on("mouseleave",f);var g,v=this.getChild("controlBar");v&&!Bt&&!Di&&(v.on("mouseenter",function(T){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),v.on("mouseleave",function(T){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(g);var T=this.options_.inactivityTimeout;T<=0||(g=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},T))}},250)},t.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.addTextTrack=function(e,i,a){if(this.tech_)return this.tech_.addTextTrack(e,i,a)},t.addRemoteTextTrack=function(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)},t.removeRemoteTextTrack=function(e){void 0===e&&(e={});var a=e.track;if(a||(a=e),this.tech_)return this.tech_.removeRemoteTextTrack(a)},t.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Mi(this)&&this.trigger("languagechange"))},t.languages=function(){return ct(n.prototype.options_.languages,this.languages_)},t.toJSON=function(){var e=ct(this.options_),i=e.tracks;e.tracks=[];for(var a=0;a"):function(){}},Qi=1/30,yi=.1,ad=function(n,t){var e,r=[];if(n&&n.length)for(e=0;e=t})},xa=function(n,t){return ad(n,function(r){return r-Qi>=t})},sd=function(n){var t=[];if(!n||!n.length)return"";for(var r=0;r "+n.end(r));return t.join(", ")},fr=function(n){for(var t=[],r=0;ra)){if(t>i&&t<=a){r+=a-t;continue}r+=a-i}}return r},ud=N.createTimeRange,To=function(n,t){if(!t.preload)return t.duration;var r=0;return(t.parts||[]).forEach(function(e){r+=e.duration}),(t.preloadHints||[]).forEach(function(e){"PART"===e.type&&(r+=n.partTargetDuration)}),r},bo=function(n){return(n.segments||[]).reduce(function(t,r,e){return r.parts?r.parts.forEach(function(i,a){t.push({duration:i.duration,segmentIndex:e,partIndex:a,part:i,segment:r})}):t.push({duration:r.duration,segmentIndex:e,partIndex:null,segment:r,part:null}),t},[])},ld=function(n){var t=n.segments&&n.segments.length&&n.segments[n.segments.length-1];return t&&t.parts||[]},dd=function(n){var t=n.preloadSegment;if(t){var r=t.parts;return(t.preloadHints||[]).reduce(function(a,o){return a+("PART"===o.type?1:0)},0)+(r&&r.length?r.length:0)}},cd=function(n,t){if(t.endList)return 0;if(n&&n.suggestedPresentationDelay)return n.suggestedPresentationDelay;var r=ld(t).length>0;return r&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:r&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},fd=function(n,t,r){if(void 0===t&&(t=n.mediaSequence+n.segments.length),ti){var o=[i,e];e=o[0],i=o[1]}if(e<0){for(var l=e;lDate.now()},xo=function(n){return n.excludeUntil&&n.excludeUntil===1/0},Sa=function(n){var t=md(n);return!n.disabled&&!t},gd=function(n,t){return t.attributes&&t.attributes[n]},So=function(n,t){if(1===n.playlists.length)return!0;var r=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===n.playlists.filter(function(e){return!!Sa(e)&&(e.attributes.BANDWIDTH||0)0)for(var T=f-1;T>=0;T--){var E=d[T];if(l+=E.duration,o){if(l<0)continue}else if(l+Qi<=0)continue;return{partIndex:E.partIndex,segmentIndex:E.segmentIndex,startTime:a-En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:T})}}return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:r}}if(f<0){for(var x=f;x<0;x++)if((l-=t.targetDuration)<0)return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:r};f=0}for(var S=f;S0)continue}else if(l-Qi>=0)continue;return{partIndex:F.partIndex,segmentIndex:F.segmentIndex,startTime:a+En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:S})}}return{segmentIndex:d[d.length-1].segmentIndex,partIndex:d[d.length-1].partIndex,startTime:r}},isEnabled:Sa,isDisabled:function(n){return n.disabled},isBlacklisted:md,isIncompatible:xo,playlistEnd:pd,isAes:function(n){for(var t=0;t-1&&o!==a.length-1&&(r._HLS_part=o),(o>-1||a.length)&&i--}r._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(r._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(r).length){var l=new(P().URL)(n);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(d){!r.hasOwnProperty(d)||l.searchParams.set(d,r[d])}),n=l.toString()}return n}(a,i)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:a,withCredentials:this.withCredentials},function(o,l){if(e.request){if(o)return e.playlistRequestError(e.request,e.media(),"HAVE_METADATA");e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}})}},t.playlistRequestError=function(e,i,a){var o=i.uri,l=i.id;this.request=null,a&&(this.state=a),this.error={playlist:this.master.playlists[l],status:e.status,message:"HLS playlist request error at URL: "+o+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},t.parseManifest_=function(e){var i=this,a=e.url;return function(n){var t=n.onwarn,r=n.oninfo,e=n.manifestString,i=n.customTagParsers,a=void 0===i?[]:i,o=n.customTagMappers,l=void 0===o?[]:o,d=n.experimentalLLHLS,f=new jn;t&&f.on("warn",t),r&&f.on("info",r),a.forEach(function(x){return f.addParser(x)}),l.forEach(function(x){return f.addTagMapper(x)}),f.push(e),f.end();var v=f.manifest;if(d||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(x){v.hasOwnProperty(x)&&delete v[x]}),v.segments&&v.segments.forEach(function(x){["parts","preloadHints"].forEach(function(S){x.hasOwnProperty(S)&&delete x[S]})})),!v.targetDuration){var g=10;v.segments&&v.segments.length&&(g=v.segments.reduce(function(x,S){return Math.max(x,S.duration)},0)),t&&t("manifest has no targetDuration defaulting to "+g),v.targetDuration=g}var T=ld(v);if(T.length&&!v.partTargetDuration){var E=T.reduce(function(x,S){return Math.max(x,S.duration)},0);t&&(t("manifest has no partTargetDuration defaulting to "+E),_d.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),v.partTargetDuration=E}return v}({onwarn:function(d){return i.logger_("m3u8-parser warn for "+a+": "+d.message)},oninfo:function(d){return i.logger_("m3u8-parser info for "+a+": "+d.message)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},t.haveMetadata=function(e){var i=e.playlistString,a=e.playlistObject,o=e.url,l=e.id;this.request=null,this.state="HAVE_METADATA";var d=a||this.parseManifest_({url:o,manifestString:i});d.lastRequest=Date.now(),yd({playlist:d,uri:o,id:l});var f=ko(this.master,d);this.targetDuration=d.partTargetDuration||d.targetDuration,this.pendingMedia_=null,f?(this.master=f,this.media_=this.master.playlists[l]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Ao(this.media(),!!f)),this.trigger("loadedplaylist")},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),P().clearTimeout(this.finalRenditionTimeout),this.off()},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e,i){var a=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(P().clearTimeout(this.finalRenditionTimeout),i){var o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=P().setTimeout(this.media.bind(this,e,!1),o)}else{var l=this.state,d=!this.media_||e.id!==this.media_.id,f=this.master.playlists[e.id];if(f&&f.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(d&&(this.trigger("mediachanging"),this.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")));if(this.updateMediaUpdateTimeout_(Ao(e,!0)),d){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(v,g){if(a.request){if(e.lastRequest=Date.now(),e.resolvedUri=ba(a.handleManifestRedirects,e.resolvedUri,g),v)return a.playlistRequestError(a.request,e,l);a.haveMetadata({playlistString:g.responseText,url:e.uri,id:e.id}),a.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")}})}}},t.pause=function(){this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},t.load=function(e){var i=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var a=this.media();if(e){var o=a?(a.partTargetDuration||a.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){i.mediaUpdateTimeout=null,i.load()},o)}else this.started?this.trigger(a&&!a.endList?"mediaupdatetimeout":"loadedplaylist"):this.start()},t.updateMediaUpdateTimeout_=function(e){var i=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=P().setTimeout(function(){i.mediaUpdateTimeout=null,i.trigger("mediaupdatetimeout"),i.updateMediaUpdateTimeout_(e)},e))},t.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=P().location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){e.setupInitialPlaylist(e.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(i,a){if(e.request){if(e.request=null,i)return e.error={status:a.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:a.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=ba(e.handleManifestRedirects,e.src,a);var o=e.parseManifest_({manifestString:a.responseText,url:e.src});e.setupInitialPlaylist(o)}})},t.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},t.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Td(this.master,this.srcUri()),e.playlists.forEach(function(a){a.segments=xd(a),a.segments.forEach(function(o){bd(o,a.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var i=this.srcUri()||P().location.href;this.master=function(n,t){var r=Co(0,t),e={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:P().location.href,resolvedUri:P().location.href,playlists:[{uri:t,id:r,resolvedUri:t,attributes:{}}]};return e.playlists[r]=e.playlists[0],e.playlists[t]=e.playlists[0],e}(0,i),this.haveMetadata({playlistObject:e,url:i,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(N.EventTarget),gm=N.xhr,vm=N.mergeOptions,wo=function(n,t,r,e){var i="arraybuffer"===n.responseType?n.response:n.responseText;!t&&i&&(n.responseTime=Date.now(),n.roundTripTime=n.responseTime-n.requestTime,n.bytesReceived=i.byteLength||i.length,n.bandwidth||(n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3))),r.headers&&(n.responseHeaders=r.headers),t&&"ETIMEDOUT"===t.code&&(n.timedout=!0),!t&&!n.aborted&&200!==r.statusCode&&206!==r.statusCode&&0!==r.statusCode&&(t=new Error("XHR Failed with a response of: "+(n&&(i||n.responseText)))),e(t,n)},Ed=function(){var n=function t(r,e){r=vm({timeout:45e3},r);var i=t.beforeRequest||N.Vhs.xhr.beforeRequest;if(i&&"function"==typeof i){var a=i(r);a&&(r=a)}var l=(!0===N.Vhs.xhr.original?gm:N.Vhs.xhr)(r,function(f,v){return wo(l,f,v,e)}),d=l.abort;return l.abort=function(){return l.aborted=!0,d.apply(l,arguments)},l.uri=r.uri,l.requestTime=Date.now(),l};return n.original=!0,n},Io=function(n){var t={};return n.byterange&&(t.Range=function(n){return"bytes="+n.offset+"-"+("bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1)}(n.byterange)),t},ym=function(n,t){return n.start(t)+"-"+n.end(t)},Tm=function(n,t){var r=n.toString(16);return"00".substring(0,2-r.length)+r+(t%2?" ":"")},bm=function(n){return n>=32&&n<126?String.fromCharCode(n):"."},Cd=function(n){var t={};return Object.keys(n).forEach(function(r){var e=n[r];t[r]=ArrayBuffer.isView(e)?{bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:e}),t},Ca=function(n){var t=n.byterange||{length:1/0,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")},kd=function(n){return n.resolvedUri},Ad=function(n){for(var t=Array.prototype.slice.call(n),r=16,e="",o=0;onew Date(l.getTime()+1e3*d)?null:(r>l&&(e=o),{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:Kt.duration(t,t.mediaSequence+t.segments.indexOf(e)),type:e.videoTimingInfo?"accurate":"estimate"})}(t,r);if(!v)return f({message:t+" was not found in the stream"});var g=v.segment,T=function(n,t){var r,e;try{r=new Date(n),e=new Date(t)}catch(o){}var i=r.getTime();return(e.getTime()-i)/1e3}(g.dateTimeObject,t);if("estimate"===v.type)return 0===i?f({message:t+" is not buffered yet. Try again"}):(a(v.estimatedStart+T),void d.one("seeked",function(){s({programTime:t,playlist:r,retryCount:i-1,seekTo:a,pauseAfterSeek:l,tech:d,callback:f})}));var E=g.start+T;d.one("seeked",function(){return f(null,d.currentTime())}),l&&d.pause(),a(E)},Do=function(n,t){if(4===n.readyState)return t()},Id=N.mergeOptions,Dd=function(n,t){if(!Sd(n,t)||n.sidx&&t.sidx&&(n.sidx.offset!==t.sidx.offset||n.sidx.length!==t.sidx.length))return!1;if(!n.sidx&&t.sidx||n.sidx&&!t.sidx||n.segments&&!t.segments||!n.segments&&t.segments)return!1;if(!n.segments&&!t.segments)return!0;for(var r=0;r=F+S)return f(v,{response:E.subarray(S,S+F),status:g.status,uri:g.uri});o.request=o.vhs_.xhr({uri:d,responseType:"arraybuffer",headers:Io({byterange:e.sidx.byterange})},f)})}else this.mediaRequest_=P().setTimeout(function(){return a(!1)},0)},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},P().clearTimeout(this.minimumUpdatePeriodTimeout_),P().clearTimeout(this.mediaRequest_),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e){var i=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var a=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var o=!this.media_||e.id!==this.media_.id;if(o&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),this.trigger("mediachange")));!o||(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,a,function(l){i.haveMetadata({startingState:a,playlist:e})}))},t.haveMetadata=function(e){var i=e.startingState,a=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[a.id]=a,this.mediaRequest_=null,this.refreshMedia_(a.id),this.trigger("HAVE_MASTER"===i?"loadedmetadata":"mediachange")},t.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(P().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},t.load=function(e){var i=this;P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var a=this.media();if(e){var o=a?a.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){return i.load()},o)}else this.started?a&&!a.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},t.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_(function(i,a){e.haveMaster_(),!e.hasPendingRequest()&&!e.media_&&e.media(e.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=P().setTimeout(function(){return e.haveMaster_()},0)},t.requestMaster_=function(e){var i=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(a,o){if(!i.requestErrored_(a,o)){var l=o.responseText!==i.masterPlaylistLoader_.masterXml_;return i.masterPlaylistLoader_.masterXml_=o.responseText,i.masterLoaded_=o.responseHeaders&&o.responseHeaders.date?Date.parse(o.responseHeaders.date):Date.now(),i.masterPlaylistLoader_.srcUrl=ba(i.handleManifestRedirects,i.masterPlaylistLoader_.srcUrl,o),l?(i.handleMaster_(),void i.syncClientServerClock_(function(){return e(o,l)})):e(o,l)}"HAVE_NOTHING"===i.state&&(i.started=!1)})},t.syncClientServerClock_=function(e){var i=this,a=function(n){return function(n){var t=_t(n,"UTCTiming")[0];if(!t)return null;var r=Ot(t);switch(r.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":r.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":r.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":r.method="DIRECT",r.value=Date.parse(r.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return r}(vu(n))}(this.masterPlaylistLoader_.masterXml_);return null===a?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===a.method?(this.masterPlaylistLoader_.clientOffset_=a.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:di(this.masterPlaylistLoader_.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(o,l){if(i.request){if(o)return i.masterPlaylistLoader_.clientOffset_=i.masterLoaded_-Date.now(),e();var d;d="HEAD"===a.method?l.responseHeaders&&l.responseHeaders.date?Date.parse(l.responseHeaders.date):i.masterLoaded_:Date.parse(l.responseText),i.masterPlaylistLoader_.clientOffset_=d-Date.now(),e()}}))},t.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,i=function(n){var r=n.srcUrl,o=function(n,t){void 0===t&&(t={});var r=function(n,t){void 0===t&&(t={});var r=t,e=r.manifestUri,i=void 0===e?"":e,a=r.NOW,o=void 0===a?Date.now():a,l=r.clientOffset,d=void 0===l?0:l,f=_t(n,"Period");if(!f.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var v=_t(n,"Location"),g=Ot(n),T=Gn([i],_t(n,"BaseURL"));g.type=g.type||"static",g.sourceDuration=g.mediaPresentationDuration||0,g.NOW=o,g.clientOffset=d,v.length&&(g.locations=v.map(cs));var E=[];return f.forEach(function(x,S){var F=Ot(x),U=E[S-1];F.start=function(n){var t=n.attributes,r=n.priorPeriodAttributes;return"number"==typeof t.start?t.start:r&&"number"==typeof r.start&&"number"==typeof r.duration?r.start+r.duration:r||"static"!==n.mpdType?null:0}({attributes:F,priorPeriodAttributes:U?U.attributes:null,mpdType:g.type}),E.push({node:x,attributes:F})}),{locations:g.locations,representationInfo:qn(E.map(jf(g,T)))}}(vu(n),t),e=function(n){return n.map(Of)}(r.representationInfo);return Cf({dashPlaylists:e,locations:r.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})}(n.masterXml,{manifestUri:r,clientOffset:n.clientOffset,sidxMapping:n.sidxMapping,previousManifest:n.previousManifest});return Td(o,r),o}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(i=function(n,t,r){for(var e=!0,i=Id(n,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a-1)},this.trigger=function(p){var h,m,_,y;if(h=c[p])if(2===arguments.length)for(_=h.length,m=0;m<_;++m)h[m].call(this,arguments[1]);else{for(y=[],m=arguments.length,m=1;m>>1,c.samplingfrequencyindex<<7|c.channelcount<<3,6,1,2]))},d=function(){return a(Pe.ftyp,st,Mt,st,Qe)},q=function(c){return a(Pe.hdlr,ai[c])},f=function(c){return a(Pe.mdat,c)},W=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,c.duration>>>24&255,c.duration>>>16&255,c.duration>>>8&255,255&c.duration,85,196,0,0]);return c.samplerate&&(p[12]=c.samplerate>>>24&255,p[13]=c.samplerate>>>16&255,p[14]=c.samplerate>>>8&255,p[15]=255&c.samplerate),a(Pe.mdhd,p)},H=function(c){return a(Pe.mdia,W(c),q(c.type),g(c))},v=function(c){return a(Pe.mfhd,new Uint8Array([0,0,0,0,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c]))},g=function(c){return a(Pe.minf,"video"===c.type?a(Pe.vmhd,xi):a(Pe.smhd,Ui),o(),he(c))},T=function(c,p){for(var h=[],m=p.length;m--;)h[m]=ye(p[m]);return a.apply(null,[Pe.moof,v(c)].concat(h))},E=function(c){for(var p=c.length,h=[];p--;)h[p]=F(c[p]);return a.apply(null,[Pe.moov,S(4294967295)].concat(h).concat(x(c)))},x=function(c){for(var p=c.length,h=[];p--;)h[p]=ge(c[p]);return a.apply(null,[Pe.mvex].concat(h))},S=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return a(Pe.mvhd,p)},ne=function(c){var m,_,p=c.samples||[],h=new Uint8Array(4+p.length);for(_=0;_>>8),y.push(255&m[I].byteLength),y=y.concat(Array.prototype.slice.call(m[I]));for(I=0;I<_.length;I++)k.push((65280&_[I].byteLength)>>>8),k.push(255&_[I].byteLength),k=k.concat(Array.prototype.slice.call(_[I]));if(O=[Pe.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&h.width)>>8,255&h.width,(65280&h.height)>>8,255&h.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a(Pe.avcC,new Uint8Array([1,h.profileIdc,h.profileCompatibility,h.levelIdc,255].concat([m.length],y,[_.length],k))),a(Pe.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],h.sarRatio){var L=h.sarRatio[0],M=h.sarRatio[1];O.push(a(Pe.pasp,new Uint8Array([(4278190080&L)>>24,(16711680&L)>>16,(65280&L)>>8,255&L,(4278190080&M)>>24,(16711680&M)>>16,(65280&M)>>8,255&M])))}return a.apply(null,O)},c=function(h){return a(Pe.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&h.channelcount)>>8,255&h.channelcount,(65280&h.samplesize)>>8,255&h.samplesize,0,0,0,0,(65280&h.samplerate)>>8,255&h.samplerate,0,0]),l(h))},U=function(c){var p=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,0,(4278190080&c.duration)>>24,(16711680&c.duration)>>16,(65280&c.duration)>>8,255&c.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&c.width)>>8,255&c.width,0,0,(65280&c.height)>>8,255&c.height,0,0]);return a(Pe.tkhd,p)},ye=function(c){var p,h,m,_,k,I;return p=a(Pe.tfhd,new Uint8Array([0,0,0,58,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Math.floor(c.baseMediaDecodeTime/i),I=Math.floor(c.baseMediaDecodeTime%i),h=a(Pe.tfdt,new Uint8Array([1,0,0,0,k>>>24&255,k>>>16&255,k>>>8&255,255&k,I>>>24&255,I>>>16&255,I>>>8&255,255&I])),"audio"===c.type?(m=Ye(c,92),a(Pe.traf,p,h,m)):(_=ne(c),m=Ye(c,_.length+92),a(Pe.traf,p,h,m,_))},F=function(c){return c.duration=c.duration||4294967295,a(Pe.trak,U(c),H(c))},ge=function(c){var p=new Uint8Array([0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==c.type&&(p[p.length-1]=0),a(Pe.trex,p)},function(){var b,c,p;p=function(m,_){var y=0,k=0,I=0,O=0;return m.length&&(void 0!==m[0].duration&&(y=1),void 0!==m[0].size&&(k=2),void 0!==m[0].flags&&(I=4),void 0!==m[0].compositionTimeOffset&&(O=8)),[0,0,y|k|I|O,1,(4278190080&m.length)>>>24,(16711680&m.length)>>>16,(65280&m.length)>>>8,255&m.length,(4278190080&_)>>>24,(16711680&_)>>>16,(65280&_)>>>8,255&_]},c=function(m,_){var y,k,I,O,L,M;for(I=p(O=m.samples||[],_+=20+16*O.length),(k=new Uint8Array(I.length+16*O.length)).set(I),y=I.length,M=0;M>>24,k[y++]=(16711680&L.duration)>>>16,k[y++]=(65280&L.duration)>>>8,k[y++]=255&L.duration,k[y++]=(4278190080&L.size)>>>24,k[y++]=(16711680&L.size)>>>16,k[y++]=(65280&L.size)>>>8,k[y++]=255&L.size,k[y++]=L.flags.isLeading<<2|L.flags.dependsOn,k[y++]=L.flags.isDependedOn<<6|L.flags.hasRedundancy<<4|L.flags.paddingValue<<1|L.flags.isNonSyncSample,k[y++]=61440&L.flags.degradationPriority,k[y++]=15&L.flags.degradationPriority,k[y++]=(4278190080&L.compositionTimeOffset)>>>24,k[y++]=(16711680&L.compositionTimeOffset)>>>16,k[y++]=(65280&L.compositionTimeOffset)>>>8,k[y++]=255&L.compositionTimeOffset;return a(Pe.trun,k)},b=function(m,_){var y,k,I,O,L,M;for(I=p(O=m.samples||[],_+=20+8*O.length),(y=new Uint8Array(I.length+8*O.length)).set(I),k=I.length,M=0;M>>24,y[k++]=(16711680&L.duration)>>>16,y[k++]=(65280&L.duration)>>>8,y[k++]=255&L.duration,y[k++]=(4278190080&L.size)>>>24,y[k++]=(16711680&L.size)>>>16,y[k++]=(65280&L.size)>>>8,y[k++]=255&L.size;return a(Pe.trun,y)},Ye=function(m,_){return"audio"===m.type?b(m,_):c(m,_)}}();var Wo,Zo,zo,Ua,Ko,yc,Tc,bc,Dn_mdat=f,Dn_moof=T,_c=function(c,p){var h={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return h.dataOffset=p,h.compositionTimeOffset=c.pts-c.dts,h.duration=c.duration,h.size=4*c.length,h.size+=c.byteLength,c.keyFrame&&(h.flags.dependsOn=2,h.flags.isNonSyncSample=0),h},Ji=[33,16,5,32,164,27],qo=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Je=function(c){for(var p=[];c--;)p.push(0);return p};Zo=function(c){return 9e4*c},zo=function(c,p){return c*p},Ua=function(c){return c/9e4},Ko=function(c,p){return c/p},yc=function(c,p){return Zo(Ko(c,p))},Tc=function(c,p){return zo(Ua(c),p)},bc=function(c,p,h){return Ua(h?c:c-p)};var Xe_secondsToVideoTs=Zo,Xe_videoTsToSeconds=Ua,Xe_audioTsToVideoTs=yc,Xe_videoTsToAudioTs=Tc,Xe_metadataTsToSeconds=bc,Ba_prefixWithSilence=function(c,p,h,m){var _,L,M,G,y=0,k=0,I=0,O=0;if(p.length&&(_=Xe_audioTsToVideoTs(c.baseMediaDecodeTime,c.samplerate),y=Math.ceil(9e4/(c.samplerate/1024)),h&&m&&(k=_-Math.max(h,m),O=(I=Math.floor(k/y))*y),!(I<1||O>45e3))){for((L=function(){if(!Wo){var c={96e3:[Ji,[227,64],Je(154),[56]],88200:[Ji,[231],Je(170),[56]],64e3:[Ji,[248,192],Je(240),[56]],48e3:[Ji,[255,192],Je(268),[55,148,128],Je(54),[112]],44100:[Ji,[255,192],Je(268),[55,163,128],Je(84),[112]],32e3:[Ji,[255,192],Je(268),[55,234],Je(226),[112]],24e3:[Ji,[255,192],Je(268),[55,255,128],Je(268),[111,112],Je(126),[224]],16e3:[Ji,[255,192],Je(268),[55,255,128],Je(268),[111,255],Je(269),[223,108],Je(195),[1,192]],12e3:[qo,Je(268),[3,127,248],Je(268),[6,255,240],Je(268),[13,255,224],Je(268),[27,253,128],Je(259),[56]],11025:[qo,Je(268),[3,127,248],Je(268),[6,255,240],Je(268),[13,255,224],Je(268),[27,255,192],Je(268),[55,175,128],Je(108),[112]],8e3:[qo,Je(268),[3,121,16],Je(47),[7]]};Wo=function(c){return Object.keys(c).reduce(function(p,h){return p[h]=new Uint8Array(c[h].reduce(function(m,_){return m.concat(_)},[])),p},{})}(c)}return Wo}()[c.samplerate])||(L=p[0].data),M=0;M=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(b),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Hi.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Hi.prototype.addText=function(b){this.rows[this.rowIdx]+=b},Hi.prototype.backspace=function(){if(!this.isEmpty()){var b=this.rows[this.rowIdx];this.rows[this.rowIdx]=b.substr(0,b.length-1)}};var ja=function(c,p,h){this.serviceNum=c,this.text="",this.currentWindow=new Hi(-1),this.windows=[],this.stream=h,"string"==typeof p&&this.createTextDecoder(p)};ja.prototype.init=function(b,c){this.startPts=b;for(var p=0;p<8;p++)this.windows[p]=new Hi(p),"function"==typeof c&&(this.windows[p].beforeRowOverflow=c)},ja.prototype.setCurrentWindow=function(b){this.currentWindow=this.windows[b]},ja.prototype.createTextDecoder=function(b){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(b)}catch(c){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+b+" encoding. "+c})}};var ot=function b(c){c=c||{},b.prototype.init.call(this);var _,p=this,h=c.captionServices||{},m={};Object.keys(h).forEach(function(y){_=h[y],/^SERVICE/.test(y)&&(m[y]=_.encoding)}),this.serviceEncodings=m,this.current708Packet=null,this.services={},this.push=function(y){3===y.type?(p.new708Packet(),p.add708Bytes(y)):(null===p.current708Packet&&p.new708Packet(),p.add708Bytes(y))}};ot.prototype=new n,ot.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ot.prototype.add708Bytes=function(b){var c=b.ccData,p=c>>>8,h=255&c;this.current708Packet.ptsVals.push(b.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(h)},ot.prototype.push708Packet=function(){var b=this.current708Packet,c=b.data,p=null,h=null,m=0,_=c[m++];for(b.seq=_>>6,b.sizeCode=63&_;m>5)&&h>0&&(p=_=c[m++]),this.pushServiceBlock(p,m,h),h>0&&(m+=h-1)},ot.prototype.pushServiceBlock=function(b,c,p){var h,m=c,_=this.current708Packet.data,y=this.services[b];for(y||(y=this.initService(b,m));m>5,_.rowLock=(16&h)>>4,_.columnLock=(8&h)>>3,_.priority=7&h,h=p[++b],_.relativePositioning=(128&h)>>7,_.anchorVertical=127&h,h=p[++b],_.anchorHorizontal=h,h=p[++b],_.anchorPoint=(240&h)>>4,_.rowCount=15&h,h=p[++b],_.columnCount=63&h,h=p[++b],_.windowStyle=(56&h)>>3,_.penStyle=7&h,_.virtualRowCount=_.rowCount+1,b},ot.prototype.setWindowAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.winAttr;return h=p[++b],m.fillOpacity=(192&h)>>6,m.fillRed=(48&h)>>4,m.fillGreen=(12&h)>>2,m.fillBlue=3&h,h=p[++b],m.borderType=(192&h)>>6,m.borderRed=(48&h)>>4,m.borderGreen=(12&h)>>2,m.borderBlue=3&h,h=p[++b],m.borderType+=(128&h)>>5,m.wordWrap=(64&h)>>6,m.printDirection=(48&h)>>4,m.scrollDirection=(12&h)>>2,m.justify=3&h,h=p[++b],m.effectSpeed=(240&h)>>4,m.effectDirection=(12&h)>>2,m.displayEffect=3&h,b},ot.prototype.flushDisplayed=function(b,c){for(var p=[],h=0;h<8;h++)c.windows[h].visible&&!c.windows[h].isEmpty()&&p.push(c.windows[h].getText());c.endPts=b,c.text=p.join("\n\n"),this.pushCaption(c),c.startPts=b},ot.prototype.pushCaption=function(b){""!==b.text&&(this.trigger("data",{startPts:b.startPts,endPts:b.endPts,text:b.text,stream:"cc708_"+b.serviceNum}),b.text="",b.startPts=b.endPts)},ot.prototype.displayWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=1);return b},ot.prototype.hideWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=0);return b},ot.prototype.toggleWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible^=1);return b},ot.prototype.clearWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].clearText();return b},ot.prototype.deleteWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].reset();return b},ot.prototype.setPenAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penAttr;return h=p[++b],m.textTag=(240&h)>>4,m.offset=(12&h)>>2,m.penSize=3&h,h=p[++b],m.italics=(128&h)>>7,m.underline=(64&h)>>6,m.edgeType=(56&h)>>3,m.fontStyle=7&h,b},ot.prototype.setPenColor=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penColor;return h=p[++b],m.fgOpacity=(192&h)>>6,m.fgRed=(48&h)>>4,m.fgGreen=(12&h)>>2,m.fgBlue=3&h,h=p[++b],m.bgOpacity=(192&h)>>6,m.bgRed=(48&h)>>4,m.bgGreen=(12&h)>>2,m.bgBlue=3&h,h=p[++b],m.edgeRed=(48&h)>>4,m.edgeGreen=(12&h)>>2,m.edgeBlue=3&h,b},ot.prototype.setPenLocation=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penLoc;return c.currentWindow.pendingNewLine=!0,h=p[++b],m.row=15&h,h=p[++b],m.column=63&h,b},ot.prototype.reset=function(b,c){var p=this.getPts(b);return this.flushDisplayed(p,c),this.initService(c.serviceNum,b)};var N_={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Va=function(c){return null===c?"":(c=N_[c]||c,String.fromCharCode(c))},F_=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],vr=function(){for(var c=[],p=15;p--;)c.push("");return c},mt=function b(c,p){b.prototype.init.call(this),this.field_=c||0,this.dataChannel_=p||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(h){var m,_,y,k,I;if((m=32639&h.ccData)!==this.lastControlCode_){if(4096==(61440&m)?this.lastControlCode_=m:m!==this.PADDING_&&(this.lastControlCode_=null),y=m>>>8,k=255&m,m!==this.PADDING_)if(m===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(m===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(h.pts),this.flushDisplayed(h.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=h.pts;else if(m===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(h.pts);else if(m===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(h.pts);else if(m===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(h.pts);else if(m===this.CARRIAGE_RETURN_)this.clearFormatting(h.pts),this.flushDisplayed(h.pts),this.shiftRowsUp_(),this.startPts_=h.pts;else if(m===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(m===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(h.pts),this.displayed_=vr();else if(m===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=vr();else if(m===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(h.pts),this.displayed_=vr()),this.mode_="paintOn",this.startPts_=h.pts;else if(this.isSpecialCharacter(y,k))I=Va((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isExtCharacter(y,k))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),I=Va((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isMidRowCode(y,k))this.clearFormatting(h.pts),this[this.mode_](h.pts," "),this.column_++,14==(14&k)&&this.addFormatting(h.pts,["i"]),1==(1&k)&&this.addFormatting(h.pts,["u"]);else if(this.isOffsetControlCode(y,k))this.column_+=3&k;else if(this.isPAC(y,k)){var O=F_.indexOf(7968&m);"rollUp"===this.mode_&&(O-this.rollUpRows_+1<0&&(O=this.rollUpRows_-1),this.setRollUp(h.pts,O)),O!==this.row_&&(this.clearFormatting(h.pts),this.row_=O),1&k&&-1===this.formatting_.indexOf("u")&&this.addFormatting(h.pts,["u"]),16==(16&m)&&(this.column_=4*((14&m)>>1)),this.isColorPAC(k)&&14==(14&k)&&this.addFormatting(h.pts,["i"])}else this.isNormalChar(y)&&(0===k&&(k=null),I=Va(y),I+=Va(k),this[this.mode_](h.pts,I),this.column_+=I.length)}else this.lastControlCode_=null}};mt.prototype=new n,mt.prototype.flushDisplayed=function(b){var c=this.displayed_.map(function(p,h){try{return p.trim()}catch(m){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+h+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");c.length&&this.trigger("data",{startPts:this.startPts_,endPts:b,text:c,stream:this.name_})},mt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=vr(),this.nonDisplayed_=vr(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},mt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},mt.prototype.isSpecialCharacter=function(b,c){return b===this.EXT_&&c>=48&&c<=63},mt.prototype.isExtCharacter=function(b,c){return(b===this.EXT_+1||b===this.EXT_+2)&&c>=32&&c<=63},mt.prototype.isMidRowCode=function(b,c){return b===this.EXT_&&c>=32&&c<=47},mt.prototype.isOffsetControlCode=function(b,c){return b===this.OFFSET_&&c>=33&&c<=35},mt.prototype.isPAC=function(b,c){return b>=this.BASE_&&b=64&&c<=127},mt.prototype.isColorPAC=function(b){return b>=64&&b<=79||b>=96&&b<=127},mt.prototype.isNormalChar=function(b){return b>=32&&b<=127},mt.prototype.setRollUp=function(b,c){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(b),this.nonDisplayed_=vr(),this.displayed_=vr()),void 0!==c&&c!==this.row_)for(var p=0;p"},"");this[this.mode_](b,p)},mt.prototype.clearFormatting=function(b){if(this.formatting_.length){var c=this.formatting_.reverse().reduce(function(p,h){return p+""},"");this.formatting_=[],this[this.mode_](b,c)}},mt.prototype.popOn=function(b,c){var p=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=p+=c},mt.prototype.rollUp=function(b,c){var p=this.displayed_[this.row_];this.displayed_[this.row_]=p+=c},mt.prototype.shiftRowsUp_=function(){var b;for(b=0;bp&&(h=-1);Math.abs(p-c)>4294967296;)c+=8589934592*h;return c},Ec=function b(c){var p,h;b.prototype.init.call(this),this.type_=c||"shared",this.push=function(m){"shared"!==this.type_&&m.type!==this.type_||(void 0===h&&(h=m.dts),m.dts=$o(m.dts,h),m.pts=$o(m.pts,h),p=m.dts,this.trigger("data",m))},this.flush=function(){h=p,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){h=void 0,p=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ec.prototype=new n;var za,Cc_TimestampRolloverStream=Ec,Cc_handleRollover=$o,kc=function(c,p,h){var m,_="";for(m=p;m>>2;ae*=4,M.timeStamp=ae+=3&Se[7],void 0===I.pts&&void 0===I.dts&&(I.pts=M.timeStamp,I.dts=M.timeStamp),this.trigger("timestamp",M)}I.frames.push(M),O+=10,O+=L}while(O>>4>1&&(k+=_[k]+1),0===y.pid)y.type="pat",c(_.subarray(k),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",c(_.subarray(k),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([_,k,y]):this.processPes_(_,k,y)},this.processPes_=function(_,y,k){k.streamType=k.pid===this.programMapTable.video?Lt.H264_STREAM_TYPE:k.pid===this.programMapTable.audio?Lt.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][k.pid],k.type="pes",k.data=_.subarray(y),this.trigger("data",k)}},On.prototype=new n,On.STREAM_TYPES={h264:27,adts:15},$a=function(){var y,c=this,p=!1,h={data:[],size:0},m={data:[],size:0},_={data:[],size:0},I=function(L,M,G){var Wt,fe=new Uint8Array(L.size),Se={type:M},ae=0,Be=0,Ct=!1;if(L.data.length&&!(L.size<9)){for(Se.trackId=L.data[0].pid,ae=0;ae>>3,M.pts*=4,M.pts+=(6&L[13])>>>1,M.dts=M.pts,64&G&&(M.dts=(14&L[14])<<27|(255&L[15])<<20|(254&L[16])<<12|(255&L[17])<<5|(254&L[18])>>>3,M.dts*=4,M.dts+=(6&L[18])>>>1)),M.data=L.subarray(9+L[8]))})(fe,Se),Ct="video"===M||Se.packetLength<=L.size,(G||Ct)&&(L.size=0,L.data.length=0),Ct&&c.trigger("data",Se)}};$a.prototype.init.call(this),this.push=function(O){({pat:function(){},pes:function(){var M,G;switch(O.streamType){case Lt.H264_STREAM_TYPE:M=h,G="video";break;case Lt.ADTS_STREAM_TYPE:M=m,G="audio";break;case Lt.METADATA_STREAM_TYPE:M=_,G="timed-metadata";break;default:return}O.payloadUnitStartIndicator&&I(M,G,!0),M.data.push(O),M.size+=O.data.byteLength},pmt:function(){var M={type:"metadata",tracks:[]};null!==(y=O.programMapTable).video&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),p=!0,c.trigger("data",M)}})[O.type]()},this.reset=function(){h.size=0,h.data.length=0,m.size=0,m.data.length=0,this.trigger("reset")},this.flushStreams_=function(){I(h,"video"),I(m,"audio"),I(_,"timed-metadata")},this.flush=function(){if(!p&&y){var O={type:"metadata",tracks:[]};null!==y.video&&O.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&O.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),c.trigger("data",O)}p=!1,this.flushStreams_(),this.trigger("done")}},$a.prototype=new n;var wc={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ka,TransportParseStream:On,ElementaryStream:$a,TimestampRolloverStream:V_,CaptionStream:Wa.CaptionStream,Cea608Stream:Wa.Cea608Stream,Cea708Stream:Wa.Cea708Stream,MetadataStream:j_};for(var Xo in Lt)Lt.hasOwnProperty(Xo)&&(wc[Xo]=Lt[Xo]);var Ya,ji=wc,Ic=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ya=function(c){var p,h=0;Ya.prototype.init.call(this),this.skipWarn_=function(m,_){this.trigger("log",{level:"warn",message:"adts skiping bytes "+m+" to "+_+" in frame "+h+" outside syncword"})},this.push=function(m){var y,k,I,O,L,_=0;if(c||(h=0),"audio"===m.type){p&&p.length?(I=p,(p=new Uint8Array(I.byteLength+m.data.byteLength)).set(I),p.set(m.data,I.byteLength)):p=m.data;for(var M;_+7>>2],p.byteLength-_<(y=(3&p[_+3])<<11|p[_+4]<<3|(224&p[_+5])>>5))break;this.trigger("data",{pts:m.pts+h*L,dts:m.dts+h*L,sampleCount:O,audioobjecttype:1+(p[_+2]>>>6&3),channelcount:(1&p[_+2])<<2|(192&p[_+3])>>>6,samplerate:Ic[(60&p[_+2])>>>2],samplingfrequencyindex:(60&p[_+2])>>>2,samplesize:16,data:p.subarray(_+7+k,_+y)}),h++,_+=y}else"number"!=typeof M&&(M=_),_++;"number"==typeof M&&(this.skipWarn_(M,_),M=null),p=p.subarray(_)}},this.flush=function(){h=0,this.trigger("done")},this.reset=function(){p=void 0,this.trigger("reset")},this.endTimeline=function(){p=void 0,this.trigger("endedtimeline")}},Ya.prototype=new n;var Pc,Dc=Ya;Pc=function(c){var p=c.byteLength,h=0,m=0;this.length=function(){return 8*p},this.bitsAvailable=function(){return 8*p+m},this.loadWord=function(){var _=c.byteLength-p,y=new Uint8Array(4),k=Math.min(4,p);if(0===k)throw new Error("no bytes available");y.set(c.subarray(_,_+k)),h=new DataView(y.buffer).getUint32(0),m=8*k,p-=k},this.skipBits=function(_){var y;m>_?(h<<=_,m-=_):(_-=m,_-=8*(y=Math.floor(_/8)),p-=y,this.loadWord(),h<<=_,m-=_)},this.readBits=function(_){var y=Math.min(m,_),k=h>>>32-y;return(m-=y)>0?h<<=y:p>0&&this.loadWord(),(y=_-y)>0?k<>>_))return h<<=_,m-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Xa,Rn,Lc,W_=Pc;Rn=function(){var p,h,c=0;Rn.prototype.init.call(this),this.push=function(m){var _;h?((_=new Uint8Array(h.byteLength+m.data.byteLength)).set(h),_.set(m.data,h.byteLength),h=_):h=m.data;for(var y=h.byteLength;c3&&this.trigger("data",h.subarray(c+3)),h=null,c=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Rn.prototype=new n,Lc={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Xa=function(){var p,h,m,_,y,k,I,c=new Rn;Xa.prototype.init.call(this),p=this,this.push=function(O){"video"===O.type&&(h=O.trackId,m=O.pts,_=O.dts,c.push(O))},c.on("data",function(O){var L={trackId:h,pts:m,dts:_,data:O,nalUnitTypeCode:31&O[0]};switch(L.nalUnitTypeCode){case 5:L.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:L.nalUnitType="sei_rbsp",L.escapedRBSP=y(O.subarray(1));break;case 7:L.nalUnitType="seq_parameter_set_rbsp",L.escapedRBSP=y(O.subarray(1)),L.config=k(L.escapedRBSP);break;case 8:L.nalUnitType="pic_parameter_set_rbsp";break;case 9:L.nalUnitType="access_unit_delimiter_rbsp"}p.trigger("data",L)}),c.on("done",function(){p.trigger("done")}),c.on("partialdone",function(){p.trigger("partialdone")}),c.on("reset",function(){p.trigger("reset")}),c.on("endedtimeline",function(){p.trigger("endedtimeline")}),this.flush=function(){c.flush()},this.partialFlush=function(){c.partialFlush()},this.reset=function(){c.reset()},this.endTimeline=function(){c.endTimeline()},I=function(L,M){var Se,G=8,fe=8;for(Se=0;Se=0?h:0,(16&c[p+5])>>4?h+20:h+10},z_=function b(c,p){return c.length-p<10||c[p]!=="I".charCodeAt(0)||c[p+1]!=="D".charCodeAt(0)||c[p+2]!=="3".charCodeAt(0)?p:b(c,p+=Oc(c,p))},Rc=function(c){return c[0]<<21|c[1]<<14|c[2]<<7|c[3]},Y_=function(c,p,h){return unescape(function(c,p,h){var m,_="";for(m=p;m=p+2&&255==(255&c[p])&&240==(240&c[p+1])&&16==(22&c[p+1])},parseId3TagSize:Oc,parseAdtsSize:function(c,p){return 6144&c[p+3]|c[p+4]<<3|(224&c[p+5])>>5},parseType:function(c,p){return c[p]==="I".charCodeAt(0)&&c[p+1]==="D".charCodeAt(0)&&c[p+2]==="3".charCodeAt(0)?"timed-metadata":!0&c[p]&&240==(240&c[p+1])?"audio":null},parseSampleRate:function(c){for(var p=0;p+5>>2];p++}return null},parseAacTimestamp:function(c){var p,h,m;p=10,64&c[5]&&(p+=4,p+=Rc(c.subarray(10,14)));do{if((h=Rc(c.subarray(p+4,p+8)))<1)return null;if("PRIV"===String.fromCharCode(c[p],c[p+1],c[p+2],c[p+3])){m=c.subarray(p+10,p+h+10);for(var y=0;y>>2;return(O*=4)+(3&I[7])}break}}p+=10,p+=h}while(p=3;)if(c[_]!=="I".charCodeAt(0)||c[_+1]!=="D".charCodeAt(0)||c[_+2]!=="3".charCodeAt(0))if(255!=(255&c[_])||240!=(240&c[_+1]))_++;else{if(c.length-_<7||_+(m=Qa.parseAdtsSize(c,_))>c.length)break;I={type:"audio",data:c.subarray(_,_+m),pts:p,dts:p},this.trigger("data",I),_+=m}else{if(c.length-_<10||_+(m=Qa.parseId3TagSize(c,_))>c.length)break;k={type:"timed-metadata",data:c.subarray(_,_+m)},this.trigger("data",k),_+=m}c=c.length-_>0?c.subarray(_):new Uint8Array},this.reset=function(){c=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){c=new Uint8Array,this.trigger("endedtimeline")}},Ja.prototype=new n;var Mn,tn,es,_r,ty=Ja,Qo=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Jo=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],ny=G_.H264Stream,ay=Qa.isLikelyAacData,oy=function(c,p){p.stream=c,this.trigger("log",p)},Mc=function(c,p){for(var h=Object.keys(p),m=0;m=h?c:(p.minSegmentDts=1/0,c.filter(function(m){return m.dts>=h&&(p.minSegmentDts=Math.min(p.minSegmentDts,m.dts),p.minSegmentPts=p.minSegmentDts,!0)}))}(h,c,_),c.baseMediaDecodeTime=fi_calculateTrackBaseMediaDecodeTime(c,p.keepOriginalTimestamps),Se=Ba_prefixWithSilence(c,I,y,k),c.samples=function(c){var p,m=[];for(p=0;p1&&(p=c.shift(),c.byteLength-=p.byteLength,c.nalCount-=p.nalCount,c[0][0].dts=p.dts,c[0][0].pts=p.pts,c[0][0].duration+=p.duration),c}(L)),_.length){var Ct;if(!(Ct=p.alignGopsAtEnd?this.alignGopsAtEnd_(L):this.alignGopsAtStart_(L)))return this.gopCache_.unshift({gop:L.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),m=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");fi_clearDtsInfo(c),L=Ct}fi_collectDtsInfo(c,L),c.samples=function(c,p){var h,m,_,y,I=p||0,O=[];for(h=0;h=-1e4&&G<=45e3&&(!fe||M>G)&&(fe=ae,M=G));return fe?fe.gop:null},this.alignGopsAtStart_=function(I){var O,L,M,G,fe,Se,ae,Be;for(fe=I.byteLength,Se=I.nalCount,ae=I.duration,O=L=0;O<_.length&&LM.pts?O++:(L++,fe-=G.byteLength,Se-=G.nalCount,ae-=G.duration);return 0===L?I:L===I.length?null:((Be=I.slice(L)).byteLength=fe,Be.duration=ae,Be.nalCount=Se,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be)},this.alignGopsAtEnd_=function(I){var O,L,M,G,fe,Se,ae;for(O=_.length-1,L=I.length-1,fe=null,Se=!1;O>=0&&L>=0;){if((M=_[O]).pts===(G=I[L]).pts){Se=!0;break}M.pts>G.pts?O--:(O===_.length-1&&(fe=L),L--)}if(!Se&&null===fe)return null;if(0===(ae=Se?L:fe))return I;var Be=I.slice(ae),Ct=Be.reduce(function(Wt,br){return Wt.byteLength+=br.byteLength,Wt.duration+=br.duration,Wt.nalCount+=br.nalCount,Wt},{byteLength:0,duration:0,nalCount:0});return Be.byteLength=Ct.byteLength,Be.duration=Ct.duration,Be.nalCount=Ct.nalCount,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be},this.alignGopsWith=function(I){_=I}},Mn.prototype=new n,_r=function(c,p){this.numberOfTracks=0,this.metadataStream=p,this.remuxTracks=void 0===(c=c||{}).remux||!!c.remux,this.keepOriginalTimestamps="boolean"==typeof c.keepOriginalTimestamps&&c.keepOriginalTimestamps,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,_r.prototype.init.call(this),this.push=function(h){return h.text?this.pendingCaptions.push(h):h.frames?this.pendingMetadata.push(h):(this.pendingTracks.push(h.track),this.pendingBytes+=h.boxes.byteLength,"video"===h.track.type&&(this.videoTrack=h.track,this.pendingBoxes.push(h.boxes)),void("audio"===h.track.type&&(this.audioTrack=h.track,this.pendingBoxes.unshift(h.boxes))))}},_r.prototype=new n,_r.prototype.flush=function(b){var h,m,_,k,c=0,p={captions:[],captionStreams:{},metadata:[],info:{}},y=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(y=this.videoTrack.timelineStartInfo.pts,Jo.forEach(function(I){p.info[I]=this.videoTrack[I]},this)):this.audioTrack&&(y=this.audioTrack.timelineStartInfo.pts,Qo.forEach(function(I){p.info[I]=this.audioTrack[I]},this)),this.videoTrack||this.audioTrack){for(p.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,_=function(c){var m,p=d(),h=E(c);return(m=new Uint8Array(p.byteLength+h.byteLength)).set(p),m.set(h,p.byteLength),m}(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),k=0;k=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},_r.prototype.setRemux=function(b){this.remuxTracks=b},es=function(c){var m,_,p=this,h=!0;es.prototype.init.call(this),this.baseMediaDecodeTime=(c=c||{}).baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new ji.MetadataStream,y.aacStream=new ty,y.audioTimestampRolloverStream=new ji.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new ji.TimestampRolloverStream("timed-metadata"),y.adtsStream=new Dc,y.coalesceStream=new _r(c,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(k){y.aacStream.setTimestamp(k.timeStamp)}),y.aacStream.on("data",function(k){"timed-metadata"!==k.type&&"audio"!==k.type||y.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:p.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new tn(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Mc(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new ji.MetadataStream,y.packetStream=new ji.TransportPacketStream,y.parseStream=new ji.TransportParseStream,y.elementaryStream=new ji.ElementaryStream,y.timestampRolloverStream=new ji.TimestampRolloverStream,y.adtsStream=new Dc,y.h264Stream=new ny,y.captionStream=new ji.CaptionStream(c),y.coalesceStream=new _r(c,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(k){var I;if("metadata"===k.type){for(I=k.tracks.length;I--;)m||"video"!==k.tracks[I].type?!_&&"audio"===k.tracks[I].type&&((_=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime):(m=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime;m&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new Mn(m,c),y.videoSegmentStream.on("log",p.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(O){_&&!c.keepOriginalTimestamps&&(_.timelineStartInfo=O,y.audioSegmentStream.setEarliestDts(O.dts-p.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",p.trigger.bind(p,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(O){_&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(O)}),y.videoSegmentStream.on("timingInfo",p.trigger.bind(p,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),_&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new tn(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(k){k.dispatchType=y.metadataStream.dispatchType,p.trigger("id3Frame",k)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Mc(this,y)},this.setBaseMediaDecodeTime=function(y){var k=this.transmuxPipeline_;c.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,fi_clearDtsInfo(_),k.audioTimestampRolloverStream&&k.audioTimestampRolloverStream.discontinuity()),m&&(k.videoSegmentStream&&(k.videoSegmentStream.gopCache_=[]),m.timelineStartInfo.dts=void 0,m.timelineStartInfo.pts=void 0,fi_clearDtsInfo(m),k.captionStream.reset()),k.timestampRolloverStream&&k.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var k=this.transmuxPipeline_;c.remux=y,k&&k.coalesceStream&&k.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){m&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var k=this;return function(I){I.stream=y,k.trigger("log",I)}},this.push=function(y){if(h){var k=ay(y);k&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():!k&&"ts"!==this.transmuxPipeline_.type&&this.setupTsPipeline(),h=!1}this.transmuxPipeline_.headOfPipeline.push(y)},this.flush=function(){h=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},es.prototype=new n;var qc,Zc,tu,uy={Transmuxer:es,VideoSegmentStream:Mn,AudioSegmentStream:tn,AUDIO_PROPERTIES:Qo,VIDEO_PROPERTIES:Jo,generateSegmentTimingInfo:eu},ts_toUnsigned=function(c){return c>>>0},yr=function(c){var p="";return p+=String.fromCharCode(c[0]),p+=String.fromCharCode(c[1]),(p+=String.fromCharCode(c[2]))+String.fromCharCode(c[3])},fy=ts_toUnsigned,ft=function b(c,p){var m,_,y,k,I,h=[];if(!p.length)return null;for(m=0;m1?m+_:c.byteLength,y===p[0]&&(1===p.length?h.push(c.subarray(m+8,k)):(I=b(c.subarray(m+8,k),p.slice(1))).length&&(h=h.concat(I))),m=k;return h},py=ts_toUnsigned,my=e.getUint64,Uc=function(c){return{isLeading:(12&c[0])>>>2,dependsOn:3&c[0],isDependedOn:(192&c[1])>>>6,hasRedundancy:(48&c[1])>>>4,paddingValue:(14&c[1])>>>1,isNonSyncSample:1&c[1],degradationPriority:c[2]<<8|c[3]}},jc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Fn="undefined"!=typeof window?window:void 0!==jc?jc:"undefined"!=typeof self?self:{},Ty=function(c){for(var _,y,p=c.byteLength,h=[],m=1;m0?function(c){var p={version:c[0],flags:new Uint8Array(c.subarray(1,4))};return p.baseMediaDecodeTime=1===p.version?my(c.subarray(4)):py(c[4]<<24|c[5]<<16|c[6]<<8|c[7]),p}(fe[0]).baseMediaDecodeTime:0,ae=ft(O,["trun"]);p===G&&ae.length>0&&(Be=function(c,p,h){var m=p,_=h.defaultSampleDuration||0,y=h.defaultSampleSize||0,k=h.trackId,I=[];return c.forEach(function(O){var M=function(c){var G,p={version:c[0],flags:new Uint8Array(c.subarray(1,4)),samples:[]},h=new DataView(c.buffer,c.byteOffset,c.byteLength),m=1&p.flags[2],_=4&p.flags[2],y=1&p.flags[1],k=2&p.flags[1],I=4&p.flags[1],O=8&p.flags[1],L=h.getUint32(4),M=8;for(m&&(p.dataOffset=h.getInt32(M),M+=4),_&&L&&(G={flags:Uc(c.subarray(M,M+4))},M+=4,y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),O&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G),L--);L--;)G={},y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),I&&(G.flags=Uc(c.subarray(M,M+4)),M+=4),O&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G);return p}(O).samples;M.forEach(function(G){void 0===G.duration&&(G.duration=_),void 0===G.size&&(G.size=y),G.trackId=k,G.dts=m,void 0===G.compositionTimeOffset&&(G.compositionTimeOffset=0),"bigint"==typeof m?(G.pts=m+Fn.BigInt(G.compositionTimeOffset),m+=Fn.BigInt(G.duration)):(G.pts=m+G.compositionTimeOffset,m+=G.duration)}),I=I.concat(M)}),I}(ae,Se,M),Ct=function(c,p,h){var y,k,I,O,m=new DataView(c.buffer,c.byteOffset,c.byteLength),_={logs:[],seiNals:[]};for(k=0;k+40;){var G=h.shift();this.parse(G,O,L)}return M=function(c,p,h){if(null===p)return null;var _=Cy(c,p)[p]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:h}}(I,m,_),M&&M.logs&&(y.logs=y.logs.concat(M.logs)),null!==M&&M.seiNals?(this.pushNals(M.seiNals),this.flushStream(),y):y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(I){if(!this.isInitialized()||!I||0===I.length)return null;I.forEach(function(O){p.push(O)})},this.flushStream=function(){if(!this.isInitialized())return null;k?p.partialFlush():p.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;p.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){h=[],m=null,_=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},is=ts_toUnsigned,Un=function(c){return("00"+c.toString(16)).slice(-2)},Iy=e.getUint64;qc=function(c,p){var m=ft(p,["moof","traf"]).reduce(function(_,y){var G,fe,k=ft(y,["tfhd"])[0],I=is(k[4]<<24|k[5]<<16|k[6]<<8|k[7]),O=c[I]||9e4,L=ft(y,["tfdt"])[0],M=new DataView(L.buffer,L.byteOffset,L.byteLength);return"bigint"==typeof(G=1===L[0]?Iy(L.subarray(4,12)):M.getUint32(4))?fe=G/Fn.BigInt(O):"number"==typeof G&&!isNaN(G)&&(fe=G/O),fe11?(_.codec+=".",_.codec+=Un(Se[9]),_.codec+=Un(Se[10]),_.codec+=Un(Se[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(Se=fe.subarray(28),"esds"===yr(Se.subarray(4,8))&&Se.length>20&&0!==Se[19]?(_.codec+="."+Un(Se[19]),_.codec+="."+Un(Se[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var Be=ft(m,["mdia","mdhd"])[0];Be&&(_.timescale=tu(Be)),h.push(_)}),h};var zc_startTime=qc,zc_tracks=Zc,Kc=function(c){var p=31&c[1];return(p<<=8)|c[2]},rs=function(c){return!!(64&c[1])},ns=function(c){var p=0;return(48&c[3])>>>4>1&&(p+=c[4]+1),p},iu=function(c){switch(c){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Ny={parseType:function(c,p){var h=Kc(c);return 0===h?"pat":h===p?"pmt":p?"pes":null},parsePat:function(c){var p=rs(c),h=4+ns(c);return p&&(h+=c[h]+1),(31&c[h+10])<<8|c[h+11]},parsePmt:function(c){var p={},h=rs(c),m=4+ns(c);if(h&&(m+=c[m]+1),1&c[m+5]){var y;y=3+((15&c[m+1])<<8|c[m+2])-4;for(var I=12+((15&c[m+10])<<8|c[m+11]);I=c.byteLength)return null;var _,m=null;return 192&(_=c[h+7])&&((m={}).pts=(14&c[h+9])<<27|(255&c[h+10])<<20|(254&c[h+11])<<12|(255&c[h+12])<<5|(254&c[h+13])>>>3,m.pts*=4,m.pts+=(6&c[h+13])>>>1,m.dts=m.pts,64&_&&(m.dts=(14&c[h+14])<<27|(255&c[h+15])<<20|(254&c[h+16])<<12|(255&c[h+17])<<5|(254&c[h+18])>>>3,m.dts*=4,m.dts+=(6&c[h+18])>>>1)),m},videoPacketContainsKeyFrame:function(c){for(var p=4+ns(c),h=c.subarray(p),m=0,_=0,y=!1;_3&&"slice_layer_without_partitioning_rbsp_idr"===iu(31&h[_+3])&&(y=!0),y}},rn=Cc_handleRollover,et={};et.ts=Ny,et.aac=Qa;var Tr=9e4,qt=188,$c=function(c,p,h){for(var y,I,O,L,m=0,_=qt,M=!1;_<=c.byteLength;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m++,_++;else{if("pes"===(y=c.subarray(m,_),et.ts.parseType(y,p.pid))&&(I=et.ts.parsePesType(y,p.table),O=et.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&O&&(L=et.ts.parsePesTime(y))&&(L.type="audio",h.audio.push(L),M=!0)),M)break;m+=qt,_+=qt}for(m=(_=c.byteLength)-qt,M=!1;m>=0;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m--,_--;else{if("pes"===(y=c.subarray(m,_),et.ts.parseType(y,p.pid))&&(I=et.ts.parsePesType(y,p.table),O=et.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&O&&(L=et.ts.parsePesTime(y))&&(L.type="audio",h.audio.push(L),M=!0)),M)break;m-=qt,_-=qt}},Uy=function(c,p,h){for(var y,I,O,L,M,G,fe,m=0,_=qt,Se=!1,ae={data:[],size:0};_=0;)if(71!==c[m]||71!==c[_])m--,_--;else{if("pes"===(y=c.subarray(m,_),et.ts.parseType(y,p.pid))&&(I=et.ts.parsePesType(y,p.table),O=et.ts.parsePayloadUnitStartIndicator(y),"video"===I&&O&&(L=et.ts.parsePesTime(y))&&(L.type="video",h.video.push(L),Se=!0)),Se)break;m-=qt,_-=qt}},qy_inspect=function(c,p){var m;return m=et.aac.isLikelyAacData(c)?function(c){for(var I,p=!1,h=0,m=null,_=null,y=0,k=0;c.length-k>=3;){switch(et.aac.parseType(c,k)){case"timed-metadata":if(c.length-k<10){p=!0;break}if((y=et.aac.parseId3TagSize(c,k))>c.length){p=!0;break}null===_&&(I=c.subarray(k,k+y),_=et.aac.parseAacTimestamp(I)),k+=y;break;case"audio":if(c.length-k<7){p=!0;break}if((y=et.aac.parseAdtsSize(c,k))>c.length){p=!0;break}null===m&&(I=c.subarray(k,k+y),m=et.aac.parseSampleRate(I)),h++,k+=y;break;default:k++}if(p)return null}if(null===m||null===_)return null;var L=Tr/m;return{audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+1024*h*L,pts:_+1024*h*L}]}}(c):function(c){var p={pid:null,table:null},h={};for(var m in function(c,p){for(var _,h=0,m=qt;m0}(x)){t.isFmp4=!0;var S=t.map.tracks,F={isFmp4:!0,hasVideo:!!S.video,hasAudio:!!S.audio};S.audio&&S.audio.codec&&"enca"!==S.audio.codec&&(F.audioCodec=S.audio.codec),S.video&&S.video.codec&&"encv"!==S.video.codec&&(F.videoCodec=S.video.codec),S.video&&S.audio&&(F.isMuxed=!0),e(t,F);var U=function(W){g(t,{data:x,type:F.hasAudio&&!F.isMuxed?"audio":"video"}),W&&W.length&&d(t,W),T(null,t,{})};ka({action:"probeMp4StartTime",timescales:t.map.timescales,data:x,transmuxer:t.transmuxer,callback:function(W){var q=W.data,ne=W.startTime;r=q.buffer,t.bytes=x=q,F.hasAudio&&!F.isMuxed&&i(t,"audio","start",ne),F.hasVideo&&i(t,"video","start",ne),S.video&&q.byteLength&&t.transmuxer?ka({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:x,timescales:t.map.timescales,trackIds:[S.video.id],callback:function(z){r=z.data.buffer,t.bytes=x=z.data,z.logs.forEach(function(ye){E(N.mergeOptions(ye,{stream:"mp4CaptionParser"}))}),U(z.captions)}}):U()}})}else{if(t.transmuxer)return void 0===t.container&&(t.container=ys(x)),"ts"!==t.container&&"aac"!==t.container?(e(t,{hasAudio:!1,hasVideo:!1}),void T(null,t,{})):void Jm({segment:t,bytes:r,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});T(null,t,{})}},Wd=function(n,t){var l,r=n.id,e=n.key,i=n.encryptedBytes,a=n.decryptionWorker;a.addEventListener("message",function d(f){if(f.data.source===r){a.removeEventListener("message",d);var v=f.data.decrypted;t(new Uint8Array(v.bytes,v.byteOffset,v.byteLength))}}),l=e.bytes.slice?e.bytes.slice():new Uint32Array(Array.prototype.slice.call(e.bytes)),a.postMessage(Cd({source:r,encrypted:i,key:l,iv:e.iv}),[i.buffer,l.buffer])},ng=function(n){var t=n.xhr,r=n.xhrOptions,i=n.segment,a=n.abortFn,o=n.progressFn,l=n.trackInfoFn,d=n.timingInfoFn,f=n.videoSegmentTimingInfoFn,v=n.audioSegmentTimingInfoFn,g=n.id3Fn,T=n.captionsFn,E=n.isEndOfTimeline,x=n.endedTimelineFn,S=n.dataFn,H=[],W=function(n){var t=n.activeXhrs,r=n.decryptionWorker,e=n.trackInfoFn,i=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog,x=0,S=!1;return function(F,U){if(!S){if(F)return S=!0,Oo(t),T(F,U);if((x+=1)===t.length){var H=function(){if(U.encryptedBytes)return function(n){var r=n.segment,e=n.trackInfoFn,i=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog;Wd({id:r.requestId,key:r.key,encryptedBytes:r.encryptedBytes,decryptionWorker:n.decryptionWorker},function(x){r.bytes=x,qd({segment:r,bytes:r.bytes,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})})}({decryptionWorker:r,segment:U,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});qd({segment:U,bytes:U.bytes,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})};if(U.endOfAllRequests=Date.now(),U.map&&U.map.encryptedBytes&&!U.map.bytes)return Wd({decryptionWorker:r,id:U.requestId+"-init",encryptedBytes:U.map.encryptedBytes,key:U.map.key},function(W){U.map.bytes=W,Vd(U,function(q){if(q)return Oo(t),T(q,U);H()})});H()}}}}({activeXhrs:H,decryptionWorker:n.decryptionWorker,trackInfoFn:l,timingInfoFn:d,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:v,id3Fn:g,captionsFn:T,isEndOfTimeline:E,endedTimelineFn:x,dataFn:S,doneFn:n.doneFn,onTransmuxerLog:n.onTransmuxerLog});if(i.key&&!i.key.bytes){var q=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&q.push(i.map.key);var z=t(N.mergeOptions(r,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),jd(i,q,W));H.push(z)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){var Pe=t(N.mergeOptions(r,{uri:i.map.key.resolvedUri,responseType:"arraybuffer"}),jd(i,[i.map.key],W));H.push(Pe)}var st=N.mergeOptions(r,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Io(i.map)}),Mt=function(n){var t=n.segment,r=n.finishProcessingFn;return function(e,i){var a=Ro(e,i);if(a)return r(a,t);var o=new Uint8Array(i.response);if(t.map.key)return t.map.encryptedBytes=o,r(null,t);t.map.bytes=o,Vd(t,function(l){if(l)return l.xhr=i,l.status=i.status,r(l,t);r(null,t)})}}({segment:i,finishProcessingFn:W}),Qe=t(st,Mt);H.push(Qe)}var hr=N.mergeOptions(r,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:Io(i)}),ai=t(hr,function(n){var t=n.segment,r=n.finishProcessingFn,e=n.responseType;return function(i,a){var o=Ro(i,a);if(o)return r(o,t);var l="arraybuffer"!==e&&a.responseText?function(n){for(var t=new Uint8Array(new ArrayBuffer(n.length)),r=0;r1)return ag("multiple "+r+" codecs found as attributes: "+t[r].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[r]=null);t[r]=t[r][0]}),t},Zd=function(n){var t=0;return n.audio&&t++,n.video&&t++,t},An=function(n,t){var r=t.attributes||{},e=Aa(function(n){var t=n.attributes||{};if(t.CODECS)return We(t.CODECS)}(t)||[]);if(Gd(n,t)&&!e.audio&&!function(n,t){if(!Gd(n,t))return!0;var e=n.mediaGroups.AUDIO[(t.attributes||{}).AUDIO];for(var i in e)if(!e[i].uri&&!e[i].playlists)return!0;return!1}(n,t)){var i=Aa(function(n,t){if(!n.mediaGroups.AUDIO||!t)return null;var r=n.mediaGroups.AUDIO[t];if(!r)return null;for(var e in r){var i=r[e];if(i.default&&i.playlists)return We(i.playlists[0].attributes.CODECS)}return null}(n,r.AUDIO)||[]);i.audio&&(e.audio=i.audio)}return e},wa=ci("PlaylistSelector"),zd=function(n){if(n&&n.playlist){var t=n.playlist;return JSON.stringify({id:t.id,bandwidth:n.bandwidth,width:n.width,height:n.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Ia=function(n,t){if(!n)return"";var r=P().getComputedStyle(n);return r?r[t]:""},Qr=function(n,t){var r=n.slice();n.sort(function(e,i){var a=t(e,i);return 0===a?r.indexOf(e)-r.indexOf(i):a})},Mo=function(n,t){var r,e;return n.attributes.BANDWIDTH&&(r=n.attributes.BANDWIDTH),r=r||P().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(e=t.attributes.BANDWIDTH),r-(e||P().Number.MAX_VALUE)},Kd=function(n,t,r,e,i,a){if(n){var o={bandwidth:t,width:r,height:e,limitRenditionByPlayerDimensions:i},l=n.playlists;Kt.isAudioOnly(n)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var d=l.map(function(ge){var Pe=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.width,st=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.height;return{bandwidth:ge.attributes&&ge.attributes.BANDWIDTH||P().Number.MAX_VALUE,width:Pe,height:st,playlist:ge}});Qr(d,function(ge,Ye){return ge.bandwidth-Ye.bandwidth});var f=(d=d.filter(function(ge){return!Kt.isIncompatible(ge.playlist)})).filter(function(ge){return Kt.isEnabled(ge.playlist)});f.length||(f=d.filter(function(ge){return!Kt.isDisabled(ge.playlist)}));var v=f.filter(function(ge){return ge.bandwidth*wt.BANDWIDTH_VARIANCEr||ge.height>e})).filter(function(ge){return ge.width===H[0].width&&ge.height===H[0].height}),g=W[W.length-1],q=W.filter(function(ge){return ge.bandwidth===g.bandwidth})[0]),a.experimentalLeastPixelDiffSelector){var he=S.map(function(ge){return ge.pixelDiff=Math.abs(ge.width-r)+Math.abs(ge.height-e),ge});Qr(he,function(ge,Ye){return ge.pixelDiff===Ye.pixelDiff?Ye.bandwidth-ge.bandwidth:ge.pixelDiff-Ye.pixelDiff}),ne=he[0]}var z=ne||q||U||T||f[0]||d[0];if(z&&z.playlist){var ye="sortedPlaylistReps";return ne?ye="leastPixelDiffRep":q?ye="resolutionPlusOneRep":U?ye="resolutionBestRep":T?ye="bandwidthBestRep":f[0]&&(ye="enabledPlaylistReps"),wa("choosing "+zd(z)+" using "+ye+" with options",o),z.playlist}return wa("could not choose a playlist with options",o),null}},$d=function(){var n=this.useDevicePixelRatio&&P().devicePixelRatio||1;return Kd(this.playlists.master,this.systemBandwidth,parseInt(Ia(this.tech_.el(),"width"),10)*n,parseInt(Ia(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},wn=function(n,t,r){var e,i;if(r&&r.cues)for(e=r.cues.length;e--;)(i=r.cues[e]).startTime>=n&&i.endTime<=t&&r.removeCue(i)},Xd=function(n){return"number"==typeof n&&isFinite(n)},Da=1/60,Jr=function(n){var t=n.startOfSegment,r=n.duration,e=n.segment,i=n.part,a=n.playlist,o=a.mediaSequence,l=a.id,d=a.segments,v=n.mediaIndex,g=n.partIndex,T=n.timeline,E=(void 0===d?[]:d).length-1,x="mediaIndex/partIndex increment";n.getMediaInfoForTime?x="getMediaInfoForTime ("+n.getMediaInfoForTime+")":n.isSyncRequest&&(x="getSyncSegmentCandidate (isSyncRequest)"),n.independent&&(x+=" with independent "+n.independent);var S="number"==typeof g,F=n.segment.uri?"segment":"pre-segment",U=S?dd({preloadSegment:e})-1:0;return F+" ["+(o+v)+"/"+(o+E)+"]"+(S?" part ["+g+"/"+U+"]":"")+" segment start/end ["+e.start+" => "+e.end+"]"+(S?" part start/end ["+i.start+" => "+i.end+"]":"")+" startOfSegment ["+t+"] duration ["+r+"] timeline ["+T+"] selected by ["+x+"] playlist ["+l+"]"},Qd=function(n){return n+"TimingInfo"},Jd=function(n){var t=n.timelineChangeController,e=n.segmentTimeline,i=n.loaderType,a=n.audioDisabled;if(n.currentTimeline===e)return!1;if("audio"===i){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==e}if("main"===i&&a){var l=t.pendingTimelineChange({type:"audio"});return!(l&&l.to===e)}return!1},ec=function(n){var t=n.segmentDuration,r=n.maxDuration;return!!t&&Math.round(t)>r+Qi},No=function(s){function n(r,e){var i;if(i=s.call(this)||this,!r)throw new TypeError("Initialization settings are required");if("function"!=typeof r.currentTime)throw new TypeError("No currentTime getter specified");if(!r.mediaSource)throw new TypeError("No MediaSource specified");return i.bandwidth=r.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.partIndex=null,i.hasPlayed_=r.hasPlayed,i.currentTime_=r.currentTime,i.seekable_=r.seekable,i.seeking_=r.seeking,i.duration_=r.duration,i.mediaSource_=r.mediaSource,i.vhs_=r.vhs,i.loaderType_=r.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=r.segmentMetadataTrack,i.goalBufferLength_=r.goalBufferLength,i.sourceType_=r.sourceType,i.sourceUpdater_=r.sourceUpdater,i.inbandTextTracks_=r.inbandTextTracks,i.state_="INIT",i.timelineChangeController_=r.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.parse708captions_=r.parse708captions,i.captionServices_=r.captionServices,i.experimentalExactManifestTimings=r.experimentalExactManifestTimings,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=N.browser.IE_VERSION>=11,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=r.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=r.decrypter,i.syncController_=r.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",function(){i.isEndOfStream_()||(i.ended_=!1)}),i.fetchAtBuffer_=!1,i.logger_=ci("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(Ae(i),"state",{get:function(){return this.state_},set:function(o){o!==this.state_&&(this.logger_(this.state_+" -> "+o),this.state_=o,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i}X(n,s);var t=n.prototype;return t.createTransmuxer_=function(){return function(n){var t=new Vm;t.currentTransmux=null,t.transmuxQueue=[];var r=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,r.call(t)},t.postMessage({action:"init",options:n}),t}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},t.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},t.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},t.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},t.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},t.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,P().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},t.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},t.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},t.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Lo_reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},t.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return N.createTimeRanges();if("main"===this.loaderType_){var a=e.hasVideo;if(a&&e.hasAudio&&!this.audioDisabled_&&!e.isMuxed)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},t.initSegmentForMap=function(e,i){if(void 0===i&&(i=!1),!e)return null;var a=Ca(e),o=this.initSegments_[a];return i&&!o&&e.bytes&&(this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e},t.segmentKey=function(e,i){if(void 0===i&&(i=!1),!e)return null;var a=kd(e),o=this.keyCache_[a];this.cacheEncryptionKeys_&&i&&!o&&e.bytes&&(this.keyCache_[a]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});var l={resolvedUri:(o||e).resolvedUri};return o&&(l.bytes=o.bytes),l},t.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},t.load=function(){if(this.monitorBuffer_(),this.playlist_){if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},t.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},t.playlist=function(e,i){if(void 0===i&&(i={}),e){var a=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var l=null;if(a&&(a.id?l=a.id:a.uri&&(l=a.uri)),this.logger_("playlist update ["+l+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var d=e.mediaSequence-a.mediaSequence;if(this.logger_("live window shift ["+d+"]"),null!==this.mediaIndex)if(this.mediaIndex-=d,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var f=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!f.parts||!f.parts.length||!f.parts[this.partIndex])){var v=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=v}}o&&(o.mediaIndex-=d,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,e)}},t.pause=function(){this.checkBufferTimeout_&&(P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},t.paused=function(){return null===this.checkBufferTimeout_},t.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},t.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},t.resyncLoader=function(){this.transmuxer_&&Lo_reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},t.remove=function(e,i,a,o){if(void 0===a&&(a=function(){}),void 0===o&&(o=!1),i===1/0&&(i=this.duration_()),i<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var l=1,d=function(){0==--l&&a()};for(var f in(o||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(e,i,d)),(o||"main"===this.loaderType_)&&(this.gopBuffer_=function(n,t,r,e){for(var i=Math.ceil((t-e)*Zn.ONE_SECOND_IN_TS),a=Math.ceil((r-e)*Zn.ONE_SECOND_IN_TS),o=n.slice(),l=n.length;l--&&!(n[l].pts<=a););if(-1===l)return o;for(var d=l+1;d--&&!(n[d].pts<=i););return d=Math.max(d,0),o.splice(d,l-d+1),o}(this.gopBuffer_,e,i,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(e,i,d)),this.inbandTextTracks_)wn(e,i,this.inbandTextTracks_[f]);wn(e,i,this.segmentMetadataTrack_),d()}else this.logger_("skipping remove because no source updater or starting media info")},t.monitorBuffer_=function(){this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),1)},t.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),500)},t.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();!e||("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},t.isEndOfStream_=function(e,i,a){if(void 0===e&&(e=this.mediaIndex),void 0===i&&(i=this.playlist_),void 0===a&&(a=this.partIndex),!i||!this.mediaSource_)return!1;var o="number"==typeof e&&i.segments[e];return i.endList&&"open"===this.mediaSource_.readyState&&e+1===i.segments.length&&(!o||!o.parts||a+1===o.parts.length)},t.chooseNextRequest_=function(){var e=this.buffered_(),i=od(e)||0,a=yo(e,this.currentTime_()),o=!this.hasPlayed_()&&a>=1,l=a>=this.goalBufferLength_(),d=this.playlist_.segments;if(!d.length||o||l)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var f={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(f.isSyncRequest)f.mediaIndex=function(n,t,r){t=t||[];for(var e=[],i=0,a=0;ar))return a}return 0===e.length?0:e[e.length-1]}(this.currentTimeline_,d,i);else if(null!==this.mediaIndex){var v=d[this.mediaIndex],g="number"==typeof this.partIndex?this.partIndex:-1;f.startOfSegment=v.end?v.end:i,v.parts&&v.parts[g+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=g+1):f.mediaIndex=this.mediaIndex+1}else{var T=Kt.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?i:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),E=T.segmentIndex,x=T.startTime,S=T.partIndex;f.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+i:"currentTime "+this.currentTime_(),f.mediaIndex=E,f.startOfSegment=x,f.partIndex=S}var F=d[f.mediaIndex],U=F&&"number"==typeof f.partIndex&&F.parts&&F.parts[f.partIndex];if(!F||"number"==typeof f.partIndex&&!U)return null;if("number"!=typeof f.partIndex&&F.parts&&(f.partIndex=0,U=F.parts[0]),!a&&U&&!U.independent)if(0===f.partIndex){var H=d[f.mediaIndex-1],W=H.parts&&H.parts.length&&H.parts[H.parts.length-1];W&&W.independent&&(f.mediaIndex-=1,f.partIndex=H.parts.length-1,f.independent="previous segment")}else F.parts[f.partIndex-1].independent&&(f.partIndex-=1,f.independent="previous part");return f.mediaIndex>=d.length-1&&this.mediaSource_&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?null:this.generateSegmentInfo_(f)},t.generateSegmentInfo_=function(e){var i=e.independent,a=e.playlist,o=e.mediaIndex,l=e.startOfSegment,d=e.isSyncRequest,f=e.partIndex,v=e.forceTimestampOffset,g=e.getMediaInfoForTime,T=a.segments[o],E="number"==typeof f&&T.parts[f],x={requestId:"segment-loader-"+Math.random(),uri:E&&E.resolvedUri||T.resolvedUri,mediaIndex:o,partIndex:E?f:null,isSyncRequest:d,startOfSegment:l,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:T.timeline,duration:E&&E.duration||T.duration,segment:T,part:E,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:g,independent:i},S=void 0!==v?v:this.isPendingTimestampOffset_;x.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:T.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:S});var F=od(this.sourceUpdater_.audioBuffered());return"number"==typeof F&&(x.audioAppendStart=F-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(x.gopsToAlignWith=function(n,t,r){if(null==t||!n.length)return[];var i,e=Math.ceil((t-r+3)*Zn.ONE_SECOND_IN_TS);for(i=0;ie);i++);return n.slice(i)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),x},t.timestampOffsetForSegment_=function(e){return function(n){var t=n.segmentTimeline,r=n.currentTimeline,e=n.startOfSegment,i=n.buffered;return n.overrideCheck||t!==r?t "+T+" for "+f),function(n,t,r){if(!n[r]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var e=r;/^cc708_/.test(r)&&(e="SERVICE"+r.split("_")[1]);var i=t.textTracks().getTrackById(e);if(i)n[r]=i;else{var o=r,l=r,d=!1,f=(t.options_.vhs&&t.options_.vhs.captionServices||{})[e];f&&(o=f.label,l=f.language,d=f.default),n[r]=t.addRemoteTextTrack({kind:"captions",id:e,default:d,label:o,language:l},!1).track}}}(x,a.vhs_.tech_,f),wn(g,T,x[f]),function(n){var t=n.inbandTextTracks,r=n.captionArray,e=n.timestampOffset;if(r){var i=P().WebKitDataCue||P().VTTCue;r.forEach(function(a){t[a.stream].addCue(new i(a.startTime+e,a.endTime+e,a.text))})}}({captionArray:E,inbandTextTracks:x,timestampOffset:l})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},t.handleId3_=function(e,i,a){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,a));var l=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();(function(n,t,r){n.metadataTrack_||(n.metadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,n.metadataTrack_.inBandMetadataTrackDispatchType=t)})(this.inbandTextTracks_,a,this.vhs_.tech_),function(n){var t=n.inbandTextTracks,r=n.metadataArray,e=n.timestampOffset,i=n.videoDuration;if(r){var a=P().WebKitDataCue||P().VTTCue,o=t.metadataTrack_;if(o&&(r.forEach(function(T){var E=T.cueTime+e;"number"!=typeof E||P().isNaN(E)||E<0||!(E<1/0)||T.frames.forEach(function(x){var S=new a(E,E,x.value||x.url||x.data||"");S.frame=x,S.value=x,function(n){Object.defineProperties(n.frame,{id:{get:function(){return N.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),n.value.key}},value:{get:function(){return N.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),n.value.data}},privateData:{get:function(){return N.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),n.value.data}}})}(S),o.addCue(S)})}),o.cues&&o.cues.length)){for(var l=o.cues,d=[],f=0;f1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+fr(f).join(", ")),v.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+fr(v).join(", "));var g=f.length?f.start(0):0,T=f.length?f.end(f.length-1):0,E=v.length?v.start(0):0,x=v.length?v.end(v.length-1):0;if(T-g<=1&&x-E<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+d.byteLength+", audio buffer: "+fr(f).join(", ")+", video buffer: "+fr(v).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:o,type:l,bytes:d}));var F=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+F),this.remove(0,F,function(){a.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),a.waitingOnRemove_=!1,a.quotaExceededErrorRetryTimeout_=P().setTimeout(function(){a.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),a.quotaExceededErrorRetryTimeout_=null,a.processCallQueue_()},1e3)},!0)},t.handleAppendError_=function(e,i){var a=e.segmentInfo,o=e.type,l=e.bytes;if(i){if(22===i.code)return void this.handleQuotaExceededError_({segmentInfo:a,type:o,bytes:l});this.logger_("Received non QUOTA_EXCEEDED_ERR on append",i),this.error(o+" append of "+l.length+"b failed for segment #"+a.mediaIndex+" in playlist "+a.playlist.id),this.trigger("appenderror")}},t.appendToSourceBuffer_=function(e){var i=e.segmentInfo,a=e.type,o=e.initSegment,l=e.data,d=e.bytes;if(!d){var f=[l],v=l.byteLength;o&&(f.unshift(o),v+=o.byteLength),d=function(n){var r,t=0;return n.bytes&&(r=new Uint8Array(n.bytes),n.segments.forEach(function(e){r.set(e,t),t+=e.byteLength})),r}({bytes:v,segments:f})}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:d},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:d}))},t.handleSegmentTimingInfo_=function(e,i,a){if(this.pendingSegment_&&i===this.pendingSegment_.requestId){var o=this.pendingSegment_.segment,l=e+"TimingInfo";o[l]||(o[l]={}),o[l].transmuxerPrependedSeconds=a.prependedContentDuration||0,o[l].transmuxedPresentationStart=a.start.presentation,o[l].transmuxedDecodeStart=a.start.decode,o[l].transmuxedPresentationEnd=a.end.presentation,o[l].transmuxedDecodeEnd=a.end.decode,o[l].baseMediaDecodeTime=a.baseMediaDecodeTime}},t.appendData_=function(e,i){var a=i.type,o=i.data;if(o&&o.byteLength&&("audio"!==a||!this.audioDisabled_)){var l=this.getInitSegmentAndUpdateState_({type:a,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:a,initSegment:l,data:o})}},t.loadSegment_=function(e){var i=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(function(){var a=it({},e,{forceTimestampOffset:!0});it(e,i.generateSegmentInfo_(a)),i.isPendingTimestampOffset_=!1,i.updateTransmuxerAndRequestSegment_(e)})},t.updateTransmuxerAndRequestSegment_=function(e){var i=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var a=this.createSimplifiedSegmentObj_(e),f=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)||null!==this.mediaIndex&&e.timeline!==this.currentTimeline_&&e.timeline>0;this.logger_("Requesting "+Jr(e)),a.map&&!a.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=ng({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:a,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:f,endedTimelineFn:function(){i.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(g){var T=g.message,E=g.level,x=g.stream;i.logger_(Jr(e)+" logged from transmuxer stream "+x+" as a "+E+": "+T)}})},t.trimBackBuffer_=function(e){var i=function(n,t,r){var e=t-wt.BACK_BUFFER_LENGTH;return n.length&&(e=Math.max(e,n.start(0))),Math.min(t-r,e)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)},t.createSimplifiedSegmentObj_=function(e){var i=e.segment,a=e.part,o={resolvedUri:a?a.resolvedUri:i.resolvedUri,byterange:a?a.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},l=e.playlist.segments[e.mediaIndex-1];if(l&&l.timeline===i.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),i.key){var d=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(i.key),o.key.iv=d}return i.map&&(o.map=this.initSegmentForMap(i.map)),o},t.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},t.saveBandwidthRelatedStats_=function(e,i){this.pendingSegment_.byteLength=i.bytesReceived,e=e);i++);return n.slice(0,i).concat(t)}(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}},t.setTimeMapping_=function(e){var i=this.syncController_.mappingForTimeline(e);null!==i&&(this.timeMapping_=i)},t.updateMediaSecondsLoaded_=function(e){this.mediaSecondsLoaded+="number"==typeof e.start&&"number"==typeof e.end?e.end-e.start:e.duration},t.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},t.trueSegmentStart_=function(e){var i=e.currentStart,o=e.mediaIndex,l=e.firstVideoFrameTimeForData;if(void 0!==i)return i;if(!e.useVideoTimingInfo)return e.audioTimingInfo.start;var T=e.playlist.segments[o-1];return 0!==o&&T&&void 0!==T.start&&T.end===l+e.currentVideoTimestampOffset?e.videoTimingInfo.start:l},t.waitForAppendsToComplete_=function(e){var i=this.getCurrentMediaInfo_(e);if(!i)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var d="main"===this.loaderType_&&i.hasVideo,f=!this.audioDisabled_&&i.hasAudio&&!i.isMuxed;if(e.waitingOnAppends=0,!e.hasAppendedData_)return!e.timingInfo&&"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);d&&e.waitingOnAppends++,f&&e.waitingOnAppends++,d&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),f&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},t.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},t.checkForIllegalMediaSwitch=function(e){var i=function(n,t,r){return"main"===n&&t&&r?r.hasAudio||r.hasVideo?t.hasVideo&&!r.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&r.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!i&&(this.error({message:i,blacklistDuration:1/0}),this.trigger("error"),!0)},t.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var i=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset")}},t.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var i=this.getMediaInfo_(),o="main"===this.loaderType_&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;!o||(e.timingInfo.end="number"==typeof o.end?o.end:o.start+e.duration)},t.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var i=function(n,t){if("hls"!==t)return null;var r=function(n){var t=0;return["video","audio"].forEach(function(r){var e=n[r+"TimingInfo"];if(e){var o,i=e.start,a=e.end;"bigint"==typeof i||"bigint"==typeof a?o=P().BigInt(a)-P().BigInt(i):"number"==typeof i&&"number"==typeof a&&(o=a-i),void 0!==o&&o>t&&(t=o)}}),"bigint"==typeof t&&t3*e.playlist.targetDuration,d=o&&o.end&&this.currentTime_()-o.end>3*e.playlist.partTargetDuration;if(l||d)return this.logger_("bad "+(l?"segment":"part")+" "+Jr(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Jr(e))},t.recordThroughput_=function(e){if(e.duration=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},t.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},t.segmentRequestFinished_=function(e,i,a){var o=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(i.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return-101===e.code&&this.handleTimeout_(),-102===e.code?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var l=this.pendingSegment_;this.saveBandwidthRelatedStats_(l.duration,i.stats),this.state="APPENDING",this.trigger("appending");var d=l.segment;if(d.map&&(d.map.bytes=i.map.bytes),l.bytes=i.bytes,"function"!=typeof P().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var f,v=function(){o.subtitlesTrack_.tech_.off("vttjsloaded",f),o.stopForError({message:"Error loading vtt.js"})};return f=function(){o.subtitlesTrack_.tech_.off("vttjserror",v),o.segmentRequestFinished_(e,i,a)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",f),void this.subtitlesTrack_.tech_.one("vttjserror",v)}d.requested=!0;try{this.parseVTTCues_(l)}catch(g){return void this.stopForError({message:g.message})}if(this.updateTimeMapping_(l,this.syncController_.timelines[l.timeline],this.playlist_),l.timingInfo=l.cues.length?{start:l.cues[0].startTime,end:l.cues[l.cues.length-1].endTime}:{start:l.startOfSegment,end:l.startOfSegment+l.duration},l.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");l.byteLength=l.bytes.byteLength,this.mediaSecondsLoaded+=d.duration,l.cues.forEach(function(g){o.subtitlesTrack_.addCue(o.featuresNativeTextTracks_?new(P().VTTCue)(g.startTime,g.endTime,g.text):g)}),function(n){var t=n.cues;if(t)for(var r=0;r1&&e.push(t[a]);e.length&&e.forEach(function(o){return n.removeCue(o)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},t.handleData_=function(){},t.updateTimingInfoEnd_=function(){},t.parseVTTCues_=function(e){var i,a=!1;"function"==typeof P().TextDecoder?i=new(P().TextDecoder)("utf8"):(i=P().WebVTT.StringDecoder(),a=!0);var o=new(P().WebVTT.Parser)(P(),P().vttjs,i);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=function(f){e.timestampmap=f},o.onparsingerror=function(f){N.log.warn("Error encountered when parsing cues: "+f.message)},e.segment.map){var l=e.segment.map.bytes;a&&(l=ac(l)),o.parse(l)}var d=e.bytes;a&&(d=ac(d)),o.parse(d),o.flush()},t.updateTimeMapping_=function(e,i,a){var o=e.segment;if(i){if(!e.cues.length)return void(o.empty=!0);var l=e.timestampmap,d=l.MPEGTS/Zn.ONE_SECOND_IN_TS-l.LOCAL+i.mapping;e.cues.forEach(function(g){g.startTime+=d,g.endTime+=d}),a.syncInfo||(a.syncInfo={mediaSequence:a.mediaSequence+e.mediaIndex,time:Math.min(e.cues[0].startTime,e.cues[e.cues.length-1].startTime-o.duration)})}},n}(No),Og=function(n,t){for(var r=n.cues,e=0;e=i.adStartTime&&t<=i.adEndTime)return i}return null},oc=[{name:"VOD",run:function(n,t,r,e,i){return r!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"ProgramDateTime",run:function(n,t,r,e,i){if(!Object.keys(n.timelineToDatetimeMappings).length)return null;var a=null,o=null,l=bo(t);i=i||0;for(var d=0;d=E)&&(o=E,a={time:T,segmentIndex:v.segmentIndex,partIndex:v.partIndex})}}return a}},{name:"Discontinuity",run:function(n,t,r,e,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,l=0;l=g)&&(o=g,a={time:v.time,segmentIndex:d,partIndex:null})}}return a}},{name:"Playlist",run:function(n,t,r,e,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Ng=function(s){function n(r){var e;return(e=s.call(this)||this).timelines=[],e.discontinuities=[],e.timelineToDatetimeMappings={},e.logger_=ci("SyncController"),e}X(n,s);var t=n.prototype;return t.getSyncPoint=function(e,i,a,o){var l=this.runStrategies_(e,i,a,o);return l.length?this.selectSyncPoint_(l,{key:"time",value:o}):null},t.getExpiredTime=function(e,i){if(!e||!e.segments)return null;var a=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!a.length)return null;var o=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+En({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))},t.runStrategies_=function(e,i,a,o){for(var l=[],d=0;d86400)N.log.warn("Not saving expired segment info. Media sequence gap "+a+" is too large.");else for(var o=a-1;o>=0;o--){var l=e.segments[o];if(l&&void 0!==l.start){i.syncInfo={mediaSequence:e.mediaSequence+o,time:l.start},this.logger_("playlist refresh sync: [time:"+i.syncInfo.time+", mediaSequence: "+i.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},t.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var i=e.segments[0],a=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-a}},t.saveSegmentTimingInfo=function(e){var i=e.segmentInfo,a=e.shouldSaveTimelineMapping,o=this.calculateSegmentTimeMapping_(i,i.timingInfo,a),l=i.segment;o&&(this.saveDiscontinuitySyncInfo_(i),i.playlist.syncInfo||(i.playlist.syncInfo={mediaSequence:i.playlist.mediaSequence+i.mediaIndex,time:l.start}));var d=l.dateTimeObject;l.discontinuity&&a&&d&&(this.timelineToDatetimeMappings[l.timeline]=-d.getTime()/1e3)},t.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},t.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},t.calculateSegmentTimeMapping_=function(e,i,a){var f,v,o=e.segment,l=e.part,d=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)d={time:e.startOfSegment,mapping:e.startOfSegment-i.start},a&&(this.timelines[e.timeline]=d,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+d.time+"] [mapping: "+d.mapping+"]")),f=e.startOfSegment,v=i.end+d.mapping;else{if(!d)return!1;f=i.start+d.mapping,v=i.end+d.mapping}return l&&(l.start=f,l.end=v),(!o.start||fv){var g;g=f<0?a.start-En({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:l}):a.end+En({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:l}),this.discontinuities[d]={time:g,accuracy:v}}}},t.dispose=function(){this.trigger("dispose"),this.off()},n}(N.EventTarget),Fg=function(s){function n(){var r;return(r=s.call(this)||this).pendingTimelineChanges_={},r.lastTimelineChanges_={},r}X(n,s);var t=n.prototype;return t.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},t.pendingTimelineChange=function(e){var i=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.pendingTimelineChanges_[i]={type:i,from:a,to:o},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[i]},t.lastTimelineChange=function(e){var i=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.lastTimelineChanges_[i]={type:i,from:a,to:o},delete this.pendingTimelineChanges_[i],this.trigger("timelinechange")),this.lastTimelineChanges_[i]},t.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},n}(N.EventTarget),Ug=Rd(Md(function(){function s(x,S,F){return x(F={path:S,exports:{},require:function(H,W){return function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},F.exports),F.exports}var t=s(function(x){function S(U,H){for(var W=0;W-1},S.trigger=function(U){var H=this.listeners[U];if(H)if(2===arguments.length)for(var W=H.length,q=0;q>7))^q]=q;for(ne=he=0;!H[ne];ne^=ge||1,he=ye[he]||1)for(H[ne]=st=(st=he^he<<1^he<<2^he<<3^he<<4)>>8^255&st^99,W[st]=ne,Qe=16843009*z[Ye=z[ge=z[ne]]]^65537*Ye^257*ge^16843008*ne,Mt=257*z[st]^16843008*st,q=0;q<4;q++)F[q][ne]=Mt=Mt<<24^Mt>>>8,U[q][st]=Qe=Qe<<24^Qe>>>8;for(q=0;q<5;q++)F[q]=F[q].slice(0),U[q]=U[q].slice(0);return S}()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var U,H,W,q=this._tables[0][4],ne=this._tables[1],he=F.length,z=1;if(4!==he&&6!==he&&8!==he)throw new Error("Invalid aes key size");var ye=F.slice(0),ge=[];for(this._key=[ye,ge],U=he;U<4*he+28;U++)W=ye[U-1],(U%he==0||8===he&&U%he==4)&&(W=q[W>>>24]<<24^q[W>>16&255]<<16^q[W>>8&255]<<8^q[255&W],U%he==0&&(W=W<<8^W>>>24^z<<24,z=z<<1^283*(z>>7))),ye[U]=ye[U-he]^W;for(H=0;U;H++,U--)W=ye[3&H?U:U-4],ge[H]=U<=4||H<4?W:ne[0][q[W>>>24]]^ne[1][q[W>>16&255]]^ne[2][q[W>>8&255]]^ne[3][q[255&W]]}return x.prototype.decrypt=function(U,H,W,q,ne,he){var st,Mt,Qe,ni,z=this._key[1],ye=U^z[0],ge=q^z[1],Ye=W^z[2],Pe=H^z[3],hr=z.length/4-2,ai=4,xi=this._tables[1],Ui=xi[0],pr=xi[1],Bi=xi[2],mr=xi[3],gr=xi[4];for(ni=0;ni>>24]^pr[ge>>16&255]^Bi[Ye>>8&255]^mr[255&Pe]^z[ai],Mt=Ui[ge>>>24]^pr[Ye>>16&255]^Bi[Pe>>8&255]^mr[255&ye]^z[ai+1],Qe=Ui[Ye>>>24]^pr[Pe>>16&255]^Bi[ye>>8&255]^mr[255&ge]^z[ai+2],Pe=Ui[Pe>>>24]^pr[ye>>16&255]^Bi[ge>>8&255]^mr[255&Ye]^z[ai+3],ai+=4,ye=st,ge=Mt,Ye=Qe;for(ni=0;ni<4;ni++)ne[(3&-ni)+he]=gr[ye>>>24]<<24^gr[ge>>16&255]<<16^gr[Ye>>8&255]<<8^gr[255&Pe]^z[ai++],st=ye,ye=ge,ge=Ye,Ye=Pe,Pe=st},x}(),f=function(x){function S(){var U;return(U=x.call(this,i)||this).jobs=[],U.delay=1,U.timeout_=null,U}e(S,x);var F=S.prototype;return F.processJob_=function(){this.jobs.shift()(),this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},F.push=function(H){this.jobs.push(H),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},S}(i),v=function(S){return S<<24|(65280&S)<<8|(16711680&S)>>8|S>>>24},T=function(){function x(F,U,H,W){var q=x.STEP,ne=new Int32Array(F.buffer),he=new Uint8Array(F.byteLength),z=0;for(this.asyncStream_=new f,this.asyncStream_.push(this.decryptChunk_(ne.subarray(z,z+q),U,H,he)),z=q;z>2),W=new d(Array.prototype.slice.call(F)),q=new Uint8Array(S.byteLength),ne=new Int32Array(q.buffer);for(he=U[0],z=U[1],ye=U[2],ge=U[3],Qe=0;Qe=0&&(t="main-desc"),t},Pa=function(n,t){n.abort(),n.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Bo=function(n,t){t.activePlaylistLoader=n,n.load()},La={AUDIO:function(n,t){return function(){var e=t.mediaTypes[n],i=t.blacklistCurrentPlaylist;Pa(t.segmentLoaders[n],e);var a=e.activeTrack(),o=e.activeGroup(),l=(o.filter(function(v){return v.default})[0]||o[0]).id,d=e.tracks[l];if(a!==d){for(var f in N.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[f].enabled=e.tracks[f]===d;e.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(n,t){return function(){var r=t.segmentLoaders[n],e=t.mediaTypes[n];N.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Pa(r,e);var i=e.activeTrack();i&&(i.mode="disabled"),e.onTrackChanged()}}},uc={AUDIO:function(n,t,r){if(t){var e=r.tech,i=r.requestOptions,a=r.segmentLoaders[n];t.on("loadedmetadata",function(){var o=t.media();a.playlist(o,i),(!e.paused()||o.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),i),e.paused()||a.load()}),t.on("error",La[n](n,r))}},SUBTITLES:function(n,t,r){var e=r.tech,i=r.requestOptions,a=r.segmentLoaders[n],o=r.mediaTypes[n];t.on("loadedmetadata",function(){var l=t.media();a.playlist(l,i),a.track(o.activeTrack()),(!e.paused()||l.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),i),e.paused()||a.load()}),t.on("error",La[n](n,r))}},Wg={AUDIO:function(n,t){var r=t.vhs,e=t.sourceType,i=t.segmentLoaders[n],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[n],d=l.groups,f=l.tracks,v=l.logger_,g=t.masterPlaylistLoader,T=Cn(g.master);for(var E in(!o[n]||0===Object.keys(o[n]).length)&&(o[n]={main:{default:{default:!0}}},T&&(o[n].main.default.playlists=g.master.playlists)),o[n])for(var x in d[E]||(d[E]=[]),o[n][E]){var S=o[n][E][x],F=void 0;if(T?(v("AUDIO group '"+E+"' label '"+x+"' is a master playlist"),S.isMasterPlaylist=!0,F=null):F="vhs-json"===e&&S.playlists?new Xr(S.playlists[0],r,a):S.resolvedUri?new Xr(S.resolvedUri,r,a):S.playlists&&"dash"===e?new Po(S.playlists[0],r,a,g):null,S=N.mergeOptions({id:x,playlistLoader:F},S),uc[n](n,S.playlistLoader,t),d[E].push(S),void 0===f[x]){var U=new N.AudioTrack({id:x,kind:Hg(S),enabled:!1,language:S.language,default:S.default,label:x});f[x]=U}}i.on("error",La[n](n,t))},SUBTITLES:function(n,t){var r=t.tech,e=t.vhs,i=t.sourceType,a=t.segmentLoaders[n],o=t.requestOptions,l=t.master.mediaGroups,d=t.mediaTypes[n],f=d.groups,v=d.tracks,g=t.masterPlaylistLoader;for(var T in l[n])for(var E in f[T]||(f[T]=[]),l[n][T])if(!l[n][T][E].forced){var x=l[n][T][E],S=void 0;if("hls"===i)S=new Xr(x.resolvedUri,e,o);else if("dash"===i){if(!x.playlists.filter(function(H){return H.excludeUntil!==1/0}).length)return;S=new Po(x.playlists[0],e,o,g)}else"vhs-json"===i&&(S=new Xr(x.playlists?x.playlists[0]:x.resolvedUri,e,o));if(x=N.mergeOptions({id:E,playlistLoader:S},x),uc[n](n,x.playlistLoader,t),f[T].push(x),void 0===v[E]){var U=r.addRemoteTextTrack({id:E,kind:"subtitles",default:x.default&&x.autoselect,language:x.language,label:E},!1).track;v[E]=U}}a.on("error",La[n](n,t))},"CLOSED-CAPTIONS":function(n,t){var r=t.tech,e=t.master.mediaGroups,i=t.mediaTypes[n],a=i.groups,o=i.tracks;for(var l in e[n])for(var d in a[l]||(a[l]=[]),e[n][l]){var f=e[n][l][d];if(/^(?:CC|SERVICE)/.test(f.instreamId)){var v=r.options_.vhs&&r.options_.vhs.captionServices||{},g={label:d,language:f.language,instreamId:f.instreamId,default:f.default&&f.autoselect};if(v[g.instreamId]&&(g=N.mergeOptions(g,v[g.instreamId])),void 0===g.default&&delete g.default,a[l].push(N.mergeOptions({id:d},f)),void 0===o[d]){var T=r.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;o[d]=T}}}}},Gg=function s(n,t){for(var r=0;r "+d+" from "+i),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+i})),this.masterPlaylistLoader_.media(e,a)},t.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=P().setInterval(function(){return e.checkABR_()},250)},t.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(P().clearInterval(this.abrTimer_),this.abrTimer_=null)},t.getAudioTrackPlaylists_=function(){var e=this.master(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;var l,a=e.mediaGroups.AUDIO,o=Object.keys(a);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{var d=a.main||o.length&&a[o[0]];for(var f in d)if(d[f].default){l={label:f};break}}if(!l)return i;var v=[];for(var g in a)if(a[g][l.label]){var T=a[g][l.label];if(T.playlists&&T.playlists.length)v.push.apply(v,T.playlists);else if(T.uri)v.push(T);else if(e.playlists.length)for(var E=0;E1&&Cn(t.master))for(var d=0;d1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},t.shouldSwitchToMedia_=function(e){var i=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),o=this.bufferLowWaterLine(),l=this.bufferHighWaterLine();return function(n){var t=n.currentPlaylist,r=n.buffered,e=n.currentTime,i=n.nextPlaylist,a=n.bufferLowWaterLine,o=n.bufferHighWaterLine,l=n.duration,d=n.experimentalBufferBasedABR,f=n.log;if(!i)return N.log.warn("We received no playlist to switch to. Please check your stream."),!1;var v="allowing switch "+(t&&t.id||"null")+" -> "+i.id;if(!t)return f(v+" as current playlist is not set"),!0;if(i.id===t.id)return!1;var g=Boolean(Yr(r,e).length);if(!t.endList)return g||"number"!=typeof t.partTargetDuration?(f(v+" as current playlist is live"),!0):(f("not "+v+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var T=yo(r,e),E=d?wt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:wt.MAX_BUFFER_LOW_WATER_LINE;if(lS)&&T>=a){var U=v+" as forwardBuffer >= bufferLowWaterLine ("+T+" >= "+a+")";return d&&(U+=" and next bandwidth > current bandwidth ("+x+" > "+S+")"),f(U),!0}return f("not "+v+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:a,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},t.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",function(){var a=e.selectPlaylist();e.shouldSwitchToMedia_(a)&&e.switchMedia_(a,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(a){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});var i=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var o=e.getCodecsOrExclude_();!o||e.sourceUpdater_.addOrChangeSourceBuffers(o)};this.mainSegmentLoader_.on("trackinfo",i),this.audioSegmentLoader_.on("trackinfo",i),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},t.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},t.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},t.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},t.fastQualityChange_=function(e){var i=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){i.tech_.setCurrentTime(N.browser.IE_VERSION||N.browser.IS_EDGE?i.tech_.currentTime()+.04:i.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},t.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()this.maxPlaylistRetries?1/0:Date.now()+1e3*i,a.excludeUntil=v,e.reason&&(a.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var g=this.selectPlaylist();if(!g)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");(e.internal?this.logger_:N.log.warn)((e.internal?"Internal problem":"Problem")+" encountered with playlist "+a.id+"."+(e.message?" "+e.message:"")+" Switching to playlist "+g.id+"."),g.attributes.AUDIO!==a.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),g.attributes.SUBTITLES!==a.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var x=g.targetDuration/2*1e3||5e3,S="number"==typeof g.lastRequest&&Date.now()-g.lastRequest<=x;return this.switchMedia_(g,"exclude",d||S)},t.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},t.delegateLoaders_=function(e,i){var a=this,o=[],l="all"===e;(l||"main"===e)&&o.push(this.masterPlaylistLoader_);var d=[];(l||"audio"===e)&&d.push("AUDIO"),(l||"subtitle"===e)&&(d.push("CLOSED-CAPTIONS"),d.push("SUBTITLES")),d.forEach(function(f){var v=a.mediaTypes_[f]&&a.mediaTypes_[f].activePlaylistLoader;v&&o.push(v)}),["main","audio","subtitle"].forEach(function(f){var v=a[f+"SegmentLoader_"];v&&(e===f||"all"===e)&&o.push(v)}),o.forEach(function(f){return i.forEach(function(v){"function"==typeof f[v]&&f[v]()})})},t.setCurrentTime=function(e){var i=Yr(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?i&&i.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},t.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Fi.Playlist.duration(e):1/0:0},t.seekable=function(){return this.seekable_},t.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(i){var a=this.syncController_.getExpiredTime(i,this.duration());if(null!==a){var d,f,o=this.masterPlaylistLoader_.master,l=Fi.Playlist.seekable(i,a,Fi.Playlist.liveEdgeDelay(o,i));0===l.length||this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(a=this.syncController_.getExpiredTime(i,this.duration()))||0===(e=Fi.Playlist.seekable(i,a,Fi.Playlist.liveEdgeDelay(o,i))).length)||(this.seekable_&&this.seekable_.length&&(d=this.seekable_.end(0),f=this.seekable_.start(0)),this.seekable_=e?e.start(0)>l.end(0)||l.start(0)>e.end(0)?l:N.createTimeRanges([[e.start(0)>l.start(0)?e.start(0):l.start(0),e.end(0)0&&(o=Math.max(o,a.end(a.length-1))),this.mediaSource.duration!==o&&this.sourceUpdater_.setDuration(o)}},t.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(i){var a=e.mediaTypes_[i].groups;for(var o in a)a[o].forEach(function(l){l.playlistLoader&&l.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},t.master=function(){return this.masterPlaylistLoader_.master},t.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},t.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!i||!a)},t.getCodecsOrExclude_=function(){var e=this,i={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};i.video=i.main;var a=An(this.master(),this.media()),o={},l=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(i.main.hasVideo&&(o.video=a.video||i.main.videoCodec||"avc1.4d400d"),i.main.isMuxed&&(o.video+=","+(a.audio||i.main.audioCodec||gi)),(i.main.hasAudio&&!i.main.isMuxed||i.audio.hasAudio||l)&&(o.audio=a.audio||i.main.audioCodec||i.audio.audioCodec||gi,i.audio.isFmp4=i.main.hasAudio&&!i.main.isMuxed?i.main.isFmp4:i.audio.isFmp4),o.audio||o.video){var v,f={};if(["video","audio"].forEach(function(x){if(o.hasOwnProperty(x)&&!function(S,F){return S?ei(F):oi(F)}(i[x].isFmp4,o[x])){var S=i[x].isFmp4?"browser":"muxer";f[S]=f[S]||[],f[S].push(o[x]),"audio"===x&&(v=S)}}),l&&v&&this.media().attributes.AUDIO){var g=this.media().attributes.AUDIO;this.master().playlists.forEach(function(x){(x.attributes&&x.attributes.AUDIO)===g&&x!==e.media()&&(x.excludeUntil=1/0)}),this.logger_("excluding audio group "+g+" as "+v+' does not support codec(s): "'+o.audio+'"')}if(!Object.keys(f).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var E=[];if(["video","audio"].forEach(function(x){var S=(We(e.sourceUpdater_.codecs[x]||"")[0]||{}).type,F=(We(o[x]||"")[0]||{}).type;S&&F&&S.toLowerCase()!==F.toLowerCase()&&E.push('"'+e.sourceUpdater_.codecs[x]+'" -> "'+o[x]+'"')}),E.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+E.join(", ")+".",blacklistDuration:1/0,internal:!0})}return o}var T=Object.keys(f).reduce(function(x,S){return x&&(x+=", "),x+(S+' does not support codec(s): "')+f[S].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:T,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},t.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}}},t.excludeUnsupportedVariants_=function(){var e=this,i=this.master().playlists,a=[];Object.keys(i).forEach(function(o){var l=i[o];if(-1===a.indexOf(l.id)){a.push(l.id);var d=An(e.master,l),f=[];d.audio&&!oi(d.audio)&&!ei(d.audio)&&f.push("audio codec "+d.audio),d.video&&!oi(d.video)&&!ei(d.video)&&f.push("video codec "+d.video),d.text&&"stpp.ttml.im1t"===d.text&&f.push("text codec "+d.text),f.length&&(l.excludeUntil=1/0,e.logger_("excluding "+l.id+" for unsupported: "+f.join(", ")))}})},t.excludeIncompatibleVariants_=function(e){var i=this,a=[],o=this.master().playlists,l=Aa(We(e)),d=Zd(l),f=l.video&&We(l.video)[0]||null,v=l.audio&&We(l.audio)[0]||null;Object.keys(o).forEach(function(g){var T=o[g];if(-1===a.indexOf(T.id)&&T.excludeUntil!==1/0){a.push(T.id);var E=[],x=An(i.masterPlaylistLoader_.master,T),S=Zd(x);if(x.audio||x.video){if(S!==d&&E.push('codec count "'+S+'" !== "'+d+'"'),!i.sourceUpdater_.canChangeType()){var F=x.video&&We(x.video)[0]||null,U=x.audio&&We(x.audio)[0]||null;F&&f&&F.type.toLowerCase()!==f.type.toLowerCase()&&E.push('video codec "'+F.type+'" !== "'+f.type+'"'),U&&v&&U.type.toLowerCase()!==v.type.toLowerCase()&&E.push('audio codec "'+U.type+'" !== "'+v.type+'"')}E.length&&(T.excludeUntil=1/0,i.logger_("blacklisting "+T.id+": "+E.join(" && ")))}}})},t.updateAdCues_=function(e){var i=0,a=this.seekable();a.length&&(i=a.start(0)),function(n,t,r){if(void 0===r&&(r=0),n.segments)for(var i,e=r,a=0;a0&&this.logger_("resetting possible stalled download count for "+r+" loader"),this[r+"StalledDownloads_"]=0,this[r+"Buffered_"]=e.buffered_()},n.checkSegmentDownloads_=function(r){var e=this.masterPlaylistController_,i=e[r+"SegmentLoader_"],a=i.buffered_(),o=function(n,t){if(n===t)return!1;if(!n&&t||!t&&n||n.length!==t.length)return!0;for(var r=0;r=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&r===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):r===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=r)}},n.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},n.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var o,e=this.seekable(),i=this.tech_.currentTime();if(this.afterSeekableWindow_(e,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(o=e.end(e.length-1)),this.beforeSeekableWindow_(e,i)){var d=e.start(0);o=d+(d===e.end(0)?0:yi)}if(void 0!==o)return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+sd(e)+". Seeking to "+o+"."),this.tech_.setCurrentTime(o),!0;for(var f=this.masterPlaylistController_.sourceUpdater_,v=this.tech_.buffered(),g=f.audioBuffer?f.audioBuffered():null,T=f.videoBuffer?f.videoBuffered():null,E=this.media(),x=E.partTargetDuration?E.partTargetDuration:2*(E.targetDuration-Qi),S=[g,T],F=0;F "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})}},n.techWaiting_=function(){var r=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(r,e)){var i=r.end(r.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var a=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:e}))return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var d=xa(o,e);if(d.length>0){var f=d.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+f+", seeking to "+d.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*f,e),!0}return!1},n.afterSeekableWindow_=function(r,e,i,a){if(void 0===a&&(a=!1),!r.length)return!1;var o=r.end(r.length-1)+yi;return!i.endList&&a&&(o=r.end(r.length-1)+3*i.targetDuration),e>o},n.beforeSeekableWindow_=function(r,e){return!!(r.length&&r.start(0)>0&&e2)return{start:o,end:l}}return null},s}(),sv={errorInterval:30,getSource:function(n){return n(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ov=function s(n,t){var r=0,e=0,i=N.mergeOptions(sv,t);n.ready(function(){n.trigger({type:"usage",name:"vhs-error-reload-initialized"}),n.trigger({type:"usage",name:"hls-error-reload-initialized"})});var a=function(){e&&n.currentTime(e)},o=function(g){null!=g&&(e=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",a),n.src(g),n.trigger({type:"usage",name:"vhs-error-reload"}),n.trigger({type:"usage",name:"hls-error-reload"}),n.play())},l=function(){return Date.now()-r<1e3*i.errorInterval?(n.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void n.trigger({type:"usage",name:"hls-error-reload-canceled"})):i.getSource&&"function"==typeof i.getSource?(r=Date.now(),i.getSource.call(n,o)):void N.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},d=function v(){n.off("loadedmetadata",a),n.off("error",l),n.off("dispose",v)};n.on("error",l),n.on("dispose",d),n.reloadSourceOnError=function(g){d(),s(n,g)}},Pt={PlaylistLoader:Xr,Playlist:Kt,utils:Em,STANDARD_PLAYLIST_SELECTOR:$d,INITIAL_PLAYLIST_SELECTOR:function(){var n=this,t=this.playlists.master.playlists.filter(Kt.isEnabled);return Qr(t,function(e,i){return Mo(e,i)}),t.filter(function(e){return!!An(n.playlists.master,e).video})[0]||null},lastBandwidthSelector:$d,movingAverageBandwidthSelector:function(n){var t=-1,r=-1;if(n<0||n>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var e=this.useDevicePixelRatio&&P().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,r=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==r&&(t=n*this.systemBandwidth+(1-n)*t,r=this.systemBandwidth),Kd(this.playlists.master,t,parseInt(Ia(this.tech_.el(),"width"),10)*e,parseInt(Ia(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Mo,comparePlaylistResolution:function(n,t){var r,e;return n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(r=n.attributes.RESOLUTION.width),r=r||P().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(e=t.attributes.RESOLUTION.width),r===(e=e||P().Number.MAX_VALUE)&&n.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?n.attributes.BANDWIDTH-t.attributes.BANDWIDTH:r-e},xhr:Ed()};Object.keys(wt).forEach(function(s){Object.defineProperty(Pt,s,{get:function(){return N.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),wt[s]},set:function(t){N.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?N.log.warn("value of Vhs."+s+" must be greater than or equal to 0"):wt[s]=t}})});var cc="videojs-vhs",fc=function(n,t){for(var r=t.media(),e=-1,i=0;i=g&&f>=g?Math.max(f,T):T}return f},set:function(f){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=f,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){return Math.floor(1/(1/(this.bandwidth||1)+(this.throughput>0?1/this.throughput:0)))},set:function(){N.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return a.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return a.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return a.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return a.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return a.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return a.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return a.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return a.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return a.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return a.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return a.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return fr(a.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return a.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return a.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return a.tech_.name_},enumerable:!0},duration:{get:function(){return a.tech_.duration()},enumerable:!0},master:{get:function(){return a.playlists.master},enumerable:!0},playerDimensions:{get:function(){return a.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return fr(a.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return a.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){a.options_.useBandwidthFromLocalStorage&&function(n){if(!P().localStorage)return!1;var t=hc();t=t?N.mergeOptions(t,n):n;try{P().localStorage.setItem(cc,JSON.stringify(t))}catch(r){return!1}}({bandwidth:a.bandwidth,throughput:Math.round(a.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n){n.representations=function(){var t=n.masterPlaylistController_.master(),r=Cn(t)?n.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return r?r.filter(function(e){return!xo(e)}).map(function(e,i){return new rv(n,e,e.id)}):[]}}(a)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){a.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=P().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},t.createKeySessions_=function(){var e=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),function(n){var t=n.player,r=n.sourceKeySystems,e=n.audioMedia,i=n.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(n,t){return n.reduce(function(r,e){if(!e.contentProtection)return r;var i=t.reduce(function(a,o){var l=e.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(i).length&&r.push(i),r},[])}(e?i.concat([e]):i,Object.keys(r)),l=[],d=[];return o.forEach(function(f){d.push(new Promise(function(v,g){t.tech_.one("keysessioncreated",v)})),l.push(new Promise(function(v,g){t.eme.initializeMediaKeys({keySystems:f},function(T){T?g(T):v()})}))}),Promise.race([Promise.all(l),Promise.race(d)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:i&&i.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(a){e.logger_("error while creating EME key session",a),e.player_.error({message:"Failed to initialize media keys for EME",code:3})})},t.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},t.setupEme_=function(){var e=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=function(n){var t=n.player,a=function(n,t,r){if(!n)return n;var e={};t&&t.attributes&&t.attributes.CODECS&&(e=Aa(We(t.attributes.CODECS))),r&&r.attributes&&r.attributes.CODECS&&(e.audio=r.attributes.CODECS);var i=Nt(e.video),a=Nt(e.audio),o={};for(var l in n)o[l]={},a&&(o[l].audioContentType=a),i&&(o[l].videoContentType=i),t.contentProtection&&t.contentProtection[l]&&t.contentProtection[l].pssh&&(o[l].pssh=t.contentProtection[l].pssh),"string"==typeof n[l]&&(o[l].url=n[l]);return N.mergeOptions(n,o)}(n.sourceKeySystems,n.media,n.audioMedia);return!(!a||(t.currentSource().keySystems=a,a&&!t.eme&&(N.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)))}({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:i&&i.media()});this.player_.tech_.on("keystatuschange",function(o){"output-restricted"===o.status&&e.masterPlaylistController_.blacklistCurrentPlaylist({playlist:e.masterPlaylistController_.media(),message:"DRM keystatus changed to "+o.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==N.browser.IE_VERSION&&a?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},t.setupQualityLevels_=function(){var e=this,i=N.players[this.tech_.options_.playerId];!i||!i.qualityLevels||this.qualityLevels_||(this.qualityLevels_=i.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n,t){t.representations().forEach(function(r){n.addQualityLevel(r)}),fc(n,t.playlists)}(e.qualityLevels_,e)}),this.playlists.on("mediachange",function(){fc(e.qualityLevels_,e.playlists)}))},n.version=function(){return{"@videojs/http-streaming":"2.13.1","mux.js":"6.0.1","mpd-parser":"0.21.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},t.version=function(){return this.constructor.version()},t.canChangeType=function(){return nc.canChangeType()},t.play=function(){this.masterPlaylistController_.play()},t.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},t.duration=function(){return this.masterPlaylistController_.duration()},t.seekable=function(){return this.masterPlaylistController_.seekable()},t.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&P().URL.revokeObjectURL&&(P().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),s.prototype.dispose.call(this)},t.convertToProgramTime=function(e,i){return function(n){var t=n.playlist,r=n.time,e=void 0===r?void 0:r,i=n.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===e)return i({message:"getProgramTime: playlist and time must be provided"});var a=function(n,t){if(!t||!t.segments||0===t.segments.length)return null;for(var e,r=0,i=0;ir){if(n>r+.25*a.duration)return null;e=a}return{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:r-e.duration,type:e.videoTimingInfo?"accurate":"estimate"}}(e,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:e},l=function(n,t){if(!t.dateTimeObject)return null;var a=n-(t.videoTimingInfo.transmuxedPresentationStart+t.videoTimingInfo.transmuxerPrependedSeconds);return new Date(t.dateTimeObject.getTime()+1e3*a)}(e,a.segment);return l&&(o.programDateTime=l.toISOString()),i(null,o)}({playlist:this.masterPlaylistController_.media(),time:e,callback:i})},t.seekToProgramTime=function(e,i,a,o){return void 0===a&&(a=!0),void 0===o&&(o=2),Lm({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:o,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})},n}(N.getComponent("Component")),Oa={name:"videojs-http-streaming",VERSION:"2.13.1",canHandleSource:function(n,t){void 0===t&&(t={});var r=N.mergeOptions(N.options,t);return Oa.canPlayType(n.type,r)},handleSource:function(n,t,r){void 0===r&&(r={});var e=N.mergeOptions(N.options,r);return t.vhs=new Ho(n,t,e),N.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return N.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Ed(),t.vhs.src(n.src,n.type),t.vhs},canPlayType:function(n,t){void 0===t&&(t={});var r=N.mergeOptions(N.options,t),e=r.vhs,i=(e=void 0===e?{}:e).overrideNative,a=void 0===i?!N.browser.IS_ANY_SAFARI:i,o=r.hls,l=(o=void 0===o?{}:o).overrideNative,d=void 0!==l&&l,f=Et(n);return f&&(!Pt.supportsTypeNatively(f)||d||a)?"maybe":""}};ei("avc1.4d400d,mp4a.40.2")&&N.getTech("Html5").registerSourceHandler(Oa,0),N.VhsHandler=Ho,Object.defineProperty(N,"HlsHandler",{get:function(){return N.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Ho},configurable:!0}),N.VhsSourceHandler=Oa,Object.defineProperty(N,"HlsSourceHandler",{get:function(){return N.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Oa},configurable:!0}),N.Vhs=Pt,Object.defineProperty(N,"Hls",{get:function(){return N.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Pt},configurable:!0}),N.use||(N.registerComponent("Hls",Pt),N.registerComponent("Vhs",Pt)),N.options.vhs=N.options.vhs||{},N.options.hls=N.options.hls||{},N.getPlugin&&N.getPlugin("reloadSourceOnError")||(N.registerPlugin||N.plugin)("reloadSourceOnError",function(n){ov(this,n)});const Sv=N,Ev=["target"];let Cv=(()=>{class s{constructor(t){this.gs=t,this.subtitlesOctopus=null,this.videoUrl=null,this.videoThumb=null,this.subtitleUrl=null,this.subtitleFonts=[]}ngOnInit(){this.gs.isBrowser&&this.target&&this.videoUrl&&(this.gs.log("[VIDEO-JS_INIT_URL]",this.videoUrl),this.player=Sv(this.target.nativeElement,{autoplay:!1,controls:!0,fluid:!0,muted:!1,sources:[{src:this.videoUrl,type:"video/mp4"}],poster:this.videoThumb},()=>{this.gs.log("[VIDEO-JS_READY]",this.player),this.subtitleUrl&&(this.subtitlesOctopus=new SubtitlesOctopus({video:this.target.nativeElement,subUrl:this.subtitleUrl,fonts:this.subtitleFonts,workerUrl:"/assets/lib/subtitles-octopus-worker.js",legacyWorkerUrl:"/assets/lib/subtitles-octopus-worker-legacy.js"}),this.gs.log("[SUBTITLE_INIT]",this.subtitlesOctopus))}))}ngOnDestroy(){var t,r;null===(t=this.subtitlesOctopus)||void 0===t||t.dispose(),null===(r=this.player)||void 0===r||r.dispose()}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(Ce.U))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-vjs-player"]],viewQuery:function(t,r){if(1&t&&u.Gf(Ev,7),2&t){let e;u.iGM(e=u.CRH())&&(r.target=e.first)}},inputs:{videoUrl:"videoUrl",videoThumb:"videoThumb",subtitleUrl:"subtitleUrl",subtitleFonts:"subtitleFonts"},decls:2,vars:0,consts:[["controls","","muted","","playsinline","","preload","none",1,"video-js","w-100"],["target",""]],template:function(t,r){1&t&&u._UZ(0,"video",0,1)},styles:[""]}),s})();var kv=j(325),Av=j(9461),wv=j(192),pc=j(3626);function Iv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",25),u._UZ(1,"img",33),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.hYB("routerLink","/anime/",t.berkasData.anime_.id,"-",t.animeName,""),u.xp6(1),u.s9C("src",t.berkasData.anime_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.anime_.name)}}function Dv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",25),u._UZ(1,"img",33),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.MGl("routerLink","/dorama/",t.berkasData.dorama_.slug,""),u.xp6(1),u.s9C("src",t.berkasData.dorama_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.dorama_.name)}}function Pv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",25),u._UZ(1,"img",33),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=n.$implicit;u.MGl("routerLink","/fansub/",t.slug,""),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.Oqu(t.name)}}function Lv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return e.ddl(e.berkasData.attachment_.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"movie"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.ALo(5,"bytes"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.name," :: ",t.lampiran.download_count,"x"),u.xp6(3),u.lnq(" ",u.Dn7(4,5,t.lampiran.name,0,5),".....",t.lampiran.ext," (",u.lcZ(5,9,t.lampiran.size),") ")}}function Ov(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return e.cancel_dl(e.berkasData.attachment_.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"close"),u.qZA(),u._uU(3," Batal Unduh "),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.name," :: ",t.lampiran.download_count,"x")}}function Rv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return e.saveFileAs(e.berkasData.attachment_.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"save"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.name," :: ",t.lampiran.download_count,"x"),u.xp6(3),u.AsE(" ",u.Dn7(4,4,t.lampiran.name,0,5),".....",t.lampiran.ext," ")}}function Mv(s,n){if(1&s&&(u.TgZ(0,"div",35),u._uU(1),u._UZ(2,"br"),u._uU(3),u._UZ(4,"br")(5,"mat-progress-bar",42),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.AsE(" ",t.lampiran.percentage>=100?"Selesai Mengunduh ... ":"Sedang Mengunduh ... "," ",t.lampiran.totals," Bytes "),u.xp6(2),u.AsE(" ",t.lampiran.percentage,"% @ ",t.lampiran.speed," KB/s "),u.xp6(2),u.Q6J("mode",t.lampiran.mode)("value",t.lampiran.percentage)}}function Nv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",44),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(5);return e.standardDdlVideo(e.berkasData.attachment_.id)}),u._uU(1," Unduhan Macet? "),u.TgZ(2,"i")(3,"u"),u._uU(4,"Coba Gunakan Unduhan Biasa~"),u.qZA()()()}}function Fv(s,n){if(1&s&&(u.TgZ(0,"div",16),u.YNc(1,Nv,5,0,"div",43),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.Q6J("ngIf",t.lampiran.isDownloading)}}function Uv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).standardDdlSubsFont(i.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"notes"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.ALo(5,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.s9C("matTooltip",t.name),u.xp6(3),u.lnq(" ",u.Dn7(4,4,t.name,0,5),".....",t.ext," (",u.lcZ(5,8,t.size),") ")}}function Bv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).standardDdlSubsFont(i.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"font_download"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.ALo(5,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.s9C("matTooltip",t.name),u.xp6(3),u.lnq(" ",u.Dn7(4,4,t.name,0,5),".....",t.ext," (",u.lcZ(5,8,t.size),") ")}}function Hv(s,n){if(1&s&&(u.TgZ(0,"div",34)(1,"div",35),u.YNc(2,Lv,6,11,"button",36),u.YNc(3,Ov,4,2,"button",36),u.YNc(4,Rv,5,8,"button",36),u.TgZ(5,"div",16),u.YNc(6,Mv,6,6,"div",37),u.qZA(),u.YNc(7,Fv,2,1,"div",38),u.YNc(8,Uv,6,10,"button",39),u.YNc(9,Bv,6,10,"button",39),u.qZA()()),2&s){const t=u.oxw(3);u.xp6(2),u.Q6J("ngIf",!t.lampiran.data&&!t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",!t.lampiran.data&&t.lampiran.isDownloading),u.xp6(1),u.Q6J("ngIf",t.lampiran.data),u.xp6(2),u.Q6J("ngIf",t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&!t.isDiscord),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.subtitles_),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.fonts_)}}function jv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",34)(1,"div",35)(2,"button",45),u.NdJ("click",function(){return u.CHM(t),u.oxw(3).verify()}),u.TgZ(3,"mat-icon",41),u._uU(4,"enhanced_encryption"),u.qZA(),u._uU(5),u.qZA()()()}if(2&s){const t=u.oxw(3);u.xp6(5),u.hij(" ",t.berkasData.attachment_," ")}}function Vv(s,n){if(1&s&&(u.TgZ(0,"div",17)(1,"div",18)(2,"h2",19)(3,"b",20)(4,"i"),u._uU(5,"Direct Download"),u.qZA()()()(),u.YNc(6,Hv,10,7,"div",28),u.YNc(7,jv,6,1,"div",28),u.qZA()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("ngIf",t.isHaveDDL),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function qv(s,n){if(1&s&&(u.TgZ(0,"a",48)(1,"mat-icon",41),u._uU(2,"cloud_download"),u.qZA(),u._uU(3),u.qZA()),2&s){const t=n.$implicit;u.s9C("href",t.url,u.LSH),u.xp6(3),u.hij(" ",t.name," ")}}function Wv(s,n){if(1&s&&(u.TgZ(0,"div"),u.YNc(1,qv,4,2,"a",47),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.berkasData.download_url)}}function Gv(s,n){if(1&s&&(u.TgZ(0,"div",34),u.YNc(1,Wv,2,1,"div",46),u.qZA()),2&s){const t=u.oxw(2),r=u.MAs(2);u.xp6(1),u.Q6J("ngIf",(null==t.berkasData.download_url?null:t.berkasData.download_url.length)>0)("ngIfElse",r)}}function Zv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",34)(1,"button",49),u.NdJ("click",function(){return u.CHM(t),u.oxw(2).login()}),u.TgZ(2,"mat-icon",41),u._uU(3,"vpn_key"),u.qZA(),u._uU(4," Klik Untuk Login "),u.qZA()()}}function zv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",55),u.NdJ("click",function(){return u.CHM(t),u.oxw(3).watchDdl()}),u.TgZ(1,"mat-icon",41),u._uU(2,"play_arrow"),u.qZA(),u._uU(3," Mulai Streaming Video "),u.qZA()}}function Kv(s,n){1&s&&u._UZ(0,"mat-progress-bar",56)}function $v(s,n){if(1&s&&u._UZ(0,"app-vjs-player",57),2&s){const t=u.oxw(3);u.Q6J("videoUrl",t.ddlVideo)("videoThumb",t.videoThumb)("subtitleUrl",t.ddlSubtitles)("subtitleFonts",t.ddlFonts)}}function Yv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",55),u.NdJ("click",function(){return u.CHM(t),u.oxw(3).verify()}),u.TgZ(1,"mat-icon",41),u._uU(2,"enhanced_encryption"),u.qZA(),u._uU(3),u.qZA()}if(2&s){const t=u.oxw(3);u.xp6(3),u.hij(" ",t.berkasData.attachment_," ")}}function Xv(s,n){if(1&s&&(u.TgZ(0,"div",17)(1,"div",18)(2,"h2",19)(3,"b",20),u._uU(4,"Video Stream (Browser Tertentu T.T)"),u.qZA()()(),u.TgZ(5,"div",21)(6,"div",50),u._uU(7," Dapat Digunakan Sebagai Referensi Untuk Pratinjau Namun Kemungkinan Jenis Huruf Tulisan Gagal Dimuat Sehingga Nantinya Akan Muncul Huruf Dengan Gambar \u{1f533} Misalnya Kanji, Lalu Juga Memungkinkan Terjadinya Gerakan Patah - Patah Jika Browser Tidak Kuat Untuk Render .ASS Subtitle Dengan Efek Yang Terlalu Banyak. "),u.TgZ(8,"a",51),u._uU(9," * Browser Firefox Sudah Pasti Tidak Bisa Memutar Video "),u.qZA()(),u.TgZ(10,"div",35),u.YNc(11,zv,4,0,"button",52),u.YNc(12,Kv,1,0,"mat-progress-bar",53),u.YNc(13,$v,1,4,"app-vjs-player",54),u.YNc(14,Yv,4,1,"button",52),u.qZA()()()),2&s){const t=u.oxw(2);u.xp6(11),u.Q6J("ngIf",t.isHaveDDL&&!t.vjsInit&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&t.vjsReady),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function Qv(s,n){if(1&s&&(u.TgZ(0,"div",17)(1,"div",18)(2,"h2",19)(3,"b",20),u._uU(4,"Deskripsi & Informasi"),u.qZA()()(),u.TgZ(5,"div",21),u._UZ(6,"div",58),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("innerHTML",t.berkasData.description,u.oJD)}}function Jv(s,n){1&s&&(u.TgZ(0,"div",17)(1,"div",21),u._UZ(2,"app-report"),u.qZA()())}function e0(s,n){if(1&s&&(u.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"ul",5),u._UZ(4,"li")(5,"li")(6,"li")(7,"li")(8,"li")(9,"li")(10,"li")(11,"li")(12,"li")(13,"li"),u.TgZ(14,"div",6)(15,"div",7)(16,"div",8)(17,"h2",9),u._uU(18),u.qZA(),u.TgZ(19,"p",10),u._uU(20),u.qZA(),u.TgZ(21,"p",11),u._uU(22),u.ALo(23,"date"),u.qZA()()()()()()(),u._UZ(24,"app-notifications"),u.TgZ(25,"div",12)(26,"div",13)(27,"div",14)(28,"div",15)(29,"div",16)(30,"div",17)(31,"div",18)(32,"h2",19)(33,"b",20),u._uU(34,"Rujukan"),u.qZA()()(),u.TgZ(35,"div",21)(36,"mat-selection-list",22),u.YNc(37,Iv,4,4,"mat-list-option",23),u.YNc(38,Dv,4,3,"mat-list-option",23),u.YNc(39,Pv,4,3,"mat-list-option",24),u.TgZ(40,"mat-list-option",25),u._UZ(41,"img",26),u.TgZ(42,"h4"),u._uU(43),u.qZA()()()()(),u.YNc(44,Vv,8,2,"div",27),u.TgZ(45,"div",17)(46,"div",18)(47,"h2",19)(48,"b",20),u._uU(49,"Tautan Unduhan"),u.qZA()()(),u.YNc(50,Gv,2,2,"div",28),u.YNc(51,Zv,5,0,"div",28),u.qZA()()()(),u.TgZ(52,"div",29)(53,"div",15)(54,"div",16),u.YNc(55,Xv,15,4,"div",27),u.YNc(56,Qv,7,1,"div",27),u.YNc(57,Jv,3,0,"div",27),u.TgZ(58,"div",17)(59,"div",30)(60,"h2",31)(61,"b",20),u._uU(62,"Komentar"),u.qZA()()(),u.TgZ(63,"div",21)(64,"div",32),u._UZ(65,"app-discussion"),u.qZA()()()()()()()()()),2&s){const t=u.oxw();u.xp6(2),u.Udp("background","url(/assets/img/banner/berkas-detail.png), linear-gradient(to bottom, "+(t.GS.isDarkMode?"#673ab7":"#3f51b5")+" 0%, #ee0dfd 100%)"),u.xp6(16),u.hij(" ",t.berkasData.project_type_.name," "),u.xp6(2),u.AsE("",t.berkasData.view_count,"x Dilihat :: ",t.berkasData.like_count," Orang Suka"),u.xp6(2),u.Oqu(u.xi3(23,19,t.berkasData.created_at,"d MMMM y, hh:mm:ss a z")),u.xp6(14),u.Q6J("multiple",!1),u.xp6(1),u.Q6J("ngIf",t.berkasData.anime_),u.xp6(1),u.Q6J("ngIf",t.berkasData.dorama_),u.xp6(1),u.Q6J("ngForOf",t.berkasData.fansub_),u.xp6(1),u.MGl("routerLink","/user/",t.berkasData.user_.username,""),u.xp6(1),u.s9C("src",t.berkasData.user_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.user_.username),u.xp6(1),u.Q6J("ngIf",(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&t.berkasData.attachment_),u.xp6(6),u.Q6J("ngIf",null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value),u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value)),u.xp6(4),u.Q6J("ngIf",t.berkasData.attachment_),u.xp6(1),u.Q6J("ngIf",t.berkasData.description),u.xp6(1),u.Q6J("ngIf",null==t.SS.mySocket?null:t.SS.mySocket.id)}}function t0(s,n){1&s&&u._UZ(0,"app-no-data",59)}let i0=(()=>{class s{constructor(t,r,e,i,a,o,l,d,f,v,g,T,E){this.router=t,this.activatedRoute=r,this.gs=e,this.bs=i,this.ds=a,this.pi=o,this.berkas=l,this.fs=d,this.as=f,this.dm=v,this.wb=g,this.ss=T,this.dls=E,this.berkasId="",this.berkasData=null,this.subsBerkas=null,this.subsParam=null,this.subsDialog=null,this.subsSubtitlesFonts=null,this.subtitles=[],this.fonts=[],this.vjsInit=!1,this.vjsReady=!1,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}get AS(){return this.as}get SS(){return this.ss}ngOnDestroy(){var t,r,e,i;null===(t=this.subsBerkas)||void 0===t||t.unsubscribe(),null===(r=this.subsParam)||void 0===r||r.unsubscribe(),null===(e=this.subsDialog)||void 0===e||e.unsubscribe(),null===(i=this.subsSubtitlesFonts)||void 0===i||i.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:t=>{this.berkasId=t.berkasId,this.bs.busy(),this.subsBerkas=this.berkas.getBerkas(this.berkasId).subscribe({next:r=>{this.gs.log("[BERKAS_DETAIL_SUCCESS]",r),this.berkasData=r.result,this.pi.updatePageMetaData(`${this.berkasData.name}`,`${this.berkasData.description}`,`${this.berkasData.name}`,this.berkasData.image_url,this.berkasData.user_.username),this.bs.idle(),this.gs.isBrowser&&this.fs.initializeFab("edit",null,"Ubah Data Berkas",`/berkas/${this.berkasId}/edit`,!1)},error:r=>{this.gs.log("[BERKAS_DETAIL_ERROR]",r,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/berkas"}})}})}})}watchDdl(){this.vjsInit=!0,this.setupVjs()}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url}})}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url}})}get animeName(){return this.berkasData.anime_.name.replace(/[^a-zA-Z0-9]/g,"-")}get lampiran(){return this.dm.getAttachmentDownloadFile(this.berkasData.attachment_)}get ddlVideo(){return this.ddlUrlLinkVideo(this.berkasData.attachment_.id)}get videoThumb(){return this.berkasData.image_url}get ddlSubtitles(){return this.subtitles.length>0?this.subtitles[0]:""}get ddlFonts(){return this.fonts.length>0?this.fonts:[]}get isHaveDDL(){return!(!("attachment_"in this.berkasData)||!this.berkasData.attachment_)&&"string"!=typeof this.berkasData.attachment_}get isDiscord(){var t;return this.isHaveDDL&&(null===(t=this.berkasData.attachment_)||void 0===t?void 0:t.discord)}ddl(t){var r=this;return(0,oe.Z)(function*(){r.isDiscord?r.subsDialog=(yield r.ds.openKonfirmasiDialog("Ekstensi CORS Unblock",'\n
\n \n
\n

\n Jika gagal download, silahkan pasang ekstensi CORS Unblock, kemudian nyalakan (logo icon berwarna menyala), dan download ulang berkasnya.\n Lalu saat setelah selesai, dapat dimatikan kembali (tidak wajib sih, hanya saja nanti takutnya mengganggu saat browsing).\n Keuntungan menggunakan ekstensi yaitu tanpa adanya batasan kecepatan server, yakni koneksi langsung.\n

\n

\n Chrome ::\n
\n \n https://chrome.google.com/webstore/detail/cors-unblock/lfhmikememgdcahcdlaciloancbhjino\n \n

\n

\n Edge ::\n
\n \n https://microsoftedge.microsoft.com/addons/detail/cors-unblock/hkjklmhkbkdhlgnnfbbcihcajofmjgbh\n \n

\n

\n Firefox ::\n
\n \n https://addons.mozilla.org/en-US/firefox/addon/cors-unblock\n \n

\n

\n Klik \'Ya\', jika sudah ada ekstensi, atau \'Tidak\' jika ingin melanjutkan dengan kecepatan terbatas.\n

\n ',!1)).afterClosed().subscribe({next:e=>{r.gs.log("[INFO_DIALOG_CLOSED]",e),void 0!==e&&r.dm.startDownload(t,!0===e),r.subsDialog.unsubscribe()}}):r.dm.startDownload(t)})()}cancel_dl(t){this.dm.cancelDownload(t)}saveFileAs(t){this.dm.saveFileAs(t)}standardDdlVideo(t){this.wb.winboxOpenUri(this.ddlUrlLinkVideo(t))}ddlUrlLinkVideo(t){return this.isDiscord?`${Ze.N.apiUrl}/ddl-seek/${t}?ngsw-bypass=true`:`${Ze.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}standardDdlSubsFont(t){this.wb.winboxOpenUri(this.ddlUrlLinkSubsFont(t))}ddlUrlLinkSubsFont(t){return`${Ze.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}setupVjs(){if(this.isHaveDDL){const t=[],r=[],e=[];if("subtitles_"in this.berkasData.attachment_&&this.berkasData.attachment_.subtitles_)for(const i of this.berkasData.attachment_.subtitles_){const a=this.dls.downloadLampiran(i.id).pipe((0,me.b)(o=>{o.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),r.push(URL.createObjectURL(new Blob([o.body]))))}));t.push(a)}if("fonts_"in this.berkasData.attachment_&&this.berkasData.attachment_.fonts_)for(const i of this.berkasData.attachment_.fonts_){const a=this.dls.downloadLampiran(i.id).pipe((0,me.b)(o=>{o.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),e.push(URL.createObjectURL(new Blob([o.body]))))}));t.push(a)}this.subsSubtitlesFonts=(0,Le.z)(...t).subscribe({next:i=>{i.type===Oe.dt.DownloadProgress&&this.gs.log("[DOWNLOAD_PROGRESS]",i),i.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",i),this.subtitles=r,this.fonts=e,this.vjsReady=!0)},error:i=>{this.gs.log("[DOWNLOAD_ERROR]",i)}})}}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(Ce.U),u.Y36(Me.z),u.Y36(Ve.x),u.Y36(rt.Z),u.Y36(w.A),u.Y36(D.r),u.Y36(V.e),u.Y36(xe),u.Y36(ie.N),u.Y36(de.R),u.Y36(ue))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-detail"]],decls:3,vars:1,consts:[["class","p-0 m-0",4,"ngIf"],["noData",""],[1,"p-0","m-0"],[1,"container-fluid","p-0"],[1,"wrapper"],[1,"bg-bubbles","align-items-center","p-0"],[1,"row","align-items-center","h-100"],[1,"col-12","mx-auto"],[1,"container","text-light"],[1,"mb-0",2,"line-height","normal"],[1,"mb-3"],[1,"mb-0"],[1,"container"],[1,"row"],[1,"col-md-5","col-xl-4","p-3"],[1,"row","sticky-top"],[1,"col"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],[3,"routerLink",4,"ngIf"],[3,"routerLink",4,"ngFor","ngForOf"],[3,"routerLink"],["matListAvatar","",1,"ms-3",3,"src"],["class","row py-3",4,"ngIf"],["class","col-12 text-center",4,"ngIf"],[1,"col-md-7","col-xl-8","p-3","sticky-top"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"p-3"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"col-12","text-center"],[1,"px-3"],["class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["class","px-3",4,"ngIf"],["class","col",4,"ngIf"],["class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngFor","ngForOf"],["mat-stroked-button","","color","accent",1,"m-1","w-100",3,"matTooltip","click"],[1,"me-1"],["color","accent",3,"mode","value"],["class","px-3 text-danger","style","cursor: pointer;",3,"click",4,"ngIf"],[1,"px-3","text-danger",2,"cursor","pointer",3,"click"],["mat-stroked-button","","color","accent","matTooltip","Direct Download Link Berkas",1,"m-1",3,"click"],[4,"ngIf","ngIfElse"],["class","m-1","target","_blank","mat-stroked-button","","color","accent",3,"href",4,"ngFor","ngForOf"],["target","_blank","mat-stroked-button","","color","accent",1,"m-1",3,"href"],["mat-stroked-button","","color","accent",1,"m-1",3,"click"],[1,"py-2","px-3"],["href","https://bugzilla.mozilla.org/show_bug.cgi?id=1422891",1,"text-warning","text-decoration-none"],["class","w-100","mat-stroked-button","","color","accent",3,"click",4,"ngIf"],["color","accent","mode","buffer",4,"ngIf"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts",4,"ngIf"],["mat-stroked-button","","color","accent",1,"w-100",3,"click"],["color","accent","mode","buffer"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts"],[1,"py-2","px-3",2,"white-space","pre-line !important",3,"innerHTML"],[1,"col-12","p-3"]],template:function(t,r){1&t&&(u.YNc(0,e0,66,22,"div",0),u.YNc(1,t0,1,0,"ng-template",null,1,u.W1O)),2&t&&u.Q6J("ngIf",r.berkasData)},directives:[J.O5,Q.t,ee.Ub,ee.vS,_e.rH,ee.eA,J.sg,De.lW,ze.gM,Ge.Hw,qe.pW,De.zs,Cv,kv.Y,Av.S,wv.d],pipes:[J.uU,J.OU,pc.$],styles:[".wrapper[_ngcontent-%COMP%]{position:sticky;left:0;width:100%;height:128px;overflow:hidden;background-size:168px,auto!important;background-repeat:no-repeat,repeat!important;background-position-x:100%,0%!important}.bg-bubbles[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:absolute;list-style:none;display:block;width:40px;height:40px;background-color:#ffffff26;bottom:-160px;animation:square 25s infinite;transition-timing-function:linear}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(1){left:10%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(2){left:20%;width:80px;height:80px;animation-delay:2s;animation-duration:17s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(3){left:25%;animation-delay:4s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(4){left:40%;width:60px;height:60px;animation-duration:22s;background-color:#ffffff40}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(5){left:70%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(6){left:80%;width:120px;height:120px;animation-delay:3s;background-color:#fff3}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(7){left:32%;width:160px;height:160px;animation-delay:7s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(8){left:55%;width:20px;height:20px;animation-delay:15s;animation-duration:40s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(9){left:25%;width:10px;height:10px;animation-delay:2s;animation-duration:40s;background-color:#ffffff4d}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(10){left:90%;width:160px;height:160px;animation-delay:11s}@keyframes square{0%{transform:translateY(0)}to{transform:translateY(-512px) rotate(512deg)}}"]}),s})();var Ra=j(8372),Ma=j(9094),jo=j(3900),Vo=j(8746),Na=j(5625),r0=j(519),n0=j(8439),a0=j(5679),s0=j(6781),o0=j(7902),Fa=j(7322),u0=j(2368),l0=j(4107),mc=j(508),d0=j(7531),gc=j(1079),c0=j(4834);function f0(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.ALo(2,"bytes"),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.hij("Ukuran Upload Melebihi Batas ",u.lcZ(2,1,t.imageLimitExceeded)," !")}}function h0(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.Oqu(t.imageErrorText)}}function p0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",27)(1,"button",30),u.NdJ("click",function(){return u.CHM(t),u.oxw(2).submitImage()}),u.TgZ(2,"mat-icon",31),u._uU(3,"add_photo_alternate"),u.qZA(),u._uU(4," Unggah "),u.qZA()()}if(2&s){const t=u.oxw(2);u.xp6(1),u.Q6J("disabled",t.submitted)}}function m0(s,n){1&s&&(u.TgZ(0,"div",24)(1,"mat-slide-toggle",43),u._uU(2," Jadikan Private, Akses Hanya Dengan URL "),u.qZA()())}function g0(s,n){if(1&s&&(u.TgZ(0,"mat-option",44),u._uU(1),u.qZA()),2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.Oqu(t.name)}}function v0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Tidak Boleh Kosong"),u.qZA())}function _0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function y0(s,n){1&s&&(u.TgZ(0,"mat-option",50),u._UZ(1,"mat-progress-bar",51),u.qZA())}function T0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",53),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).filterAnimeSelected(i)}),u._UZ(1,"img",54),u.TgZ(2,"span",42),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.lnq("",t.id," :: ",null==t.media_type?null:t.media_type.toUpperCase()," :: ",t.title,"")}}function b0(s,n){if(1&s&&(u.ynx(0),u.YNc(1,T0,4,5,"mat-option",52),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredAnime)}}function x0(s,n){if(1&s&&(u.TgZ(0,"small",55),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.fg.get("anime_name").value)}}function S0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Tidak Boleh Kosong"),u.qZA())}function E0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Hanya Boleh Angka"),u.qZA())}function C0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",45)(1,"mat-label"),u._uU(2,"Anime Terkait"),u.qZA(),u.TgZ(3,"input",46),u.NdJ("keyup",function(){return u.CHM(t),u.oxw(2).resetSelectedAnime()}),u.qZA(),u.TgZ(4,"mat-icon",15),u._uU(5,"short_text"),u.qZA(),u.TgZ(6,"mat-autocomplete",null,47),u.YNc(8,y0,2,0,"mat-option",48),u.YNc(9,b0,2,1,"ng-container",17),u.qZA(),u.YNc(10,x0,2,1,"small",49),u.TgZ(11,"mat-error"),u.YNc(12,S0,2,0,"div",17),u.YNc(13,E0,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(7),r=u.oxw(2);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(5),u.Q6J("ngIf",r.isLoading),u.xp6(1),u.Q6J("ngIf",!r.isLoading),u.xp6(1),u.Q6J("ngIf",r.fg.get("anime_name").value),u.xp6(2),u.Q6J("ngIf",r.fg.get("anime_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",r.fg.get("anime_id").hasError("pattern"))}}function k0(s,n){1&s&&(u.TgZ(0,"mat-option",50),u._UZ(1,"mat-progress-bar",51),u.qZA())}function A0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",53),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).filterDoramaSelected(i)}),u._UZ(1,"img",54),u.TgZ(2,"span",42),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.mdl_id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.mdl_id," :: ",t.title,"")}}function w0(s,n){if(1&s&&(u.ynx(0),u.YNc(1,A0,4,4,"mat-option",52),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredDorama)}}function I0(s,n){if(1&s&&(u.TgZ(0,"small",55),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.fg.get("dorama_name").value)}}function D0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Tidak Boleh Kosong"),u.qZA())}function P0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Hanya Boleh Angka"),u.qZA())}function L0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",45)(1,"mat-label"),u._uU(2,"Dorama Terkait"),u.qZA(),u.TgZ(3,"input",56),u.NdJ("keyup",function(){return u.CHM(t),u.oxw(2).resetSelectedDorama()}),u.qZA(),u.TgZ(4,"mat-icon",15),u._uU(5,"short_text"),u.qZA(),u.TgZ(6,"mat-autocomplete",null,57),u.YNc(8,k0,2,0,"mat-option",48),u.YNc(9,w0,2,1,"ng-container",17),u.qZA(),u.YNc(10,I0,2,1,"small",49),u.TgZ(11,"mat-error"),u.YNc(12,D0,2,0,"div",17),u.YNc(13,P0,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(7),r=u.oxw(2);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(5),u.Q6J("ngIf",r.isLoading),u.xp6(1),u.Q6J("ngIf",!r.isLoading),u.xp6(1),u.Q6J("ngIf",r.fg.get("dorama_name").value),u.xp6(2),u.Q6J("ngIf",r.fg.get("dorama_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",r.fg.get("dorama_id").hasError("pattern"))}}function O0(s,n){1&s&&(u.TgZ(0,"mat-icon",15),u._uU(1,"short_text"),u.qZA())}function R0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",63),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index;return u.oxw(2).removeFansub(e)}),u.TgZ(1,"mat-icon"),u._uU(2,"close"),u.qZA()()}}function M0(s,n){1&s&&(u.TgZ(0,"mat-option",50),u._UZ(1,"mat-progress-bar",51),u.qZA())}function N0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",53),u.NdJ("click",function(){const i=u.CHM(t).$implicit,a=u.oxw(2).index;return u.oxw(2).filterFansubSelected(i,a)}),u._UZ(1,"img",64),u.TgZ(2,"span",42),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.slug," :: ",t.name,"")}}function F0(s,n){if(1&s&&(u.ynx(0),u.YNc(1,N0,4,4,"mat-option",52),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredFansub)}}function U0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Tidak Boleh Kosong"),u.qZA())}function B0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Hanya Boleh Angka"),u.qZA())}function H0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div")(1,"div",58)(2,"mat-form-field",45)(3,"mat-label"),u._uU(4,"Fansub Terkait"),u.qZA(),u.TgZ(5,"input",59),u.NdJ("keyup",function(){const i=u.CHM(t).index;return u.oxw(2).resetSelectedFansub(i)}),u.qZA(),u.YNc(6,O0,2,0,"mat-icon",60),u.YNc(7,R0,3,0,"button",61),u.TgZ(8,"mat-autocomplete",null,62),u.YNc(10,M0,2,0,"mat-option",48),u.YNc(11,F0,2,1,"ng-container",17),u.qZA(),u.TgZ(12,"small",55),u._uU(13),u.qZA(),u.TgZ(14,"mat-error"),u.YNc(15,U0,2,0,"div",17),u.YNc(16,B0,2,0,"div",17),u.qZA()()()()}if(2&s){const t=n.$implicit,r=n.index,e=u.MAs(9),i=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",r),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",e),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").value||0===r),u.xp6(1),u.Q6J("ngIf",!t.get("fansub_id").value&&r>0),u.xp6(3),u.Q6J("ngIf",i.isLoading),u.xp6(1),u.Q6J("ngIf",!i.isLoading),u.xp6(2),u.Oqu(t.get("fansub_name").value),u.xp6(2),u.Q6J("ngIf",t.get("fansub_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").hasError("pattern"))}}function j0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Tidak Boleh Kosong"),u.qZA())}function V0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function q0(s,n){1&s&&(u.TgZ(0,"div",9)(1,"div",24),u._UZ(2,"mat-divider"),u.qZA()())}function W0(s,n){if(1&s&&(u.TgZ(0,"p",69),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.attachmentFontSubtitle.join(", ").toLowerCase())}}function G0(s,n){if(1&s&&(u.TgZ(0,"div",9)(1,"mat-list")(2,"div",65),u._uU(3,"Berkas yang terlampir tidak boleh diubah."),u.qZA(),u.TgZ(4,"mat-list-item")(5,"mat-icon",66),u._uU(6,"attach_file"),u.qZA(),u.TgZ(7,"div",67),u._uU(8),u.qZA(),u.TgZ(9,"div",67),u._uU(10),u.ALo(11,"bytes"),u.qZA()(),u.YNc(12,W0,2,1,"p",68),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(8),u.AsE("",t.attachmentFile.name,".",t.attachmentFile.ext,""),u.xp6(2),u.Oqu(u.lcZ(11,4,t.attachmentFile.size)),u.xp6(2),u.Q6J("ngIf",t.attachmentFontSubtitle.length>0)}}function Z0(s,n){1&s&&(u.TgZ(0,"mat-icon",15),u._uU(1,"web"),u.qZA())}function z0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",63),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index;return u.oxw(2).removeDownloadLink(e)}),u.TgZ(1,"mat-icon"),u._uU(2,"close"),u.qZA()()}}function K0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Tidak Boleh Kosong"),u.qZA())}function $0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function Y0(s,n){1&s&&(u.TgZ(0,"mat-icon",15),u._uU(1,"link"),u.qZA())}function X0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",63),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index;return u.oxw(2).removeDownloadLink(e)}),u.TgZ(1,"mat-icon"),u._uU(2,"close"),u.qZA()()}}function Q0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Tidak Boleh Kosong"),u.qZA())}function J0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Link Tidak Valid"),u.qZA())}function e_(s,n){if(1&s&&(u.TgZ(0,"div")(1,"div",70)(2,"mat-form-field",71)(3,"mat-label"),u._uU(4,"Nama Website"),u.qZA(),u._UZ(5,"input",72),u.YNc(6,Z0,2,0,"mat-icon",60),u.YNc(7,z0,3,0,"button",61),u.TgZ(8,"mat-error"),u.YNc(9,K0,2,0,"div",17),u.YNc(10,$0,2,0,"div",17),u.qZA()(),u.TgZ(11,"mat-form-field",73)(12,"mat-label"),u._uU(13,"Tautan Link"),u.qZA(),u._UZ(14,"input",74),u.YNc(15,Y0,2,0,"mat-icon",60),u.YNc(16,X0,3,0,"button",61),u.TgZ(17,"mat-error"),u.YNc(18,Q0,2,0,"div",17),u.YNc(19,J0,2,0,"div",17),u.qZA()()()()),2&s){const t=n.$implicit,r=n.index,e=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",r),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("required",e.hasRequiredField(t,"name")),u.xp6(1),u.Q6J("ngIf",t.get("name").value||0===r&&e.hasRequiredField(t,"name")),u.xp6(1),u.Q6J("ngIf",!t.get("name").value&&(r>0||!e.hasRequiredField(t,"name"))),u.xp6(2),u.Q6J("ngIf",t.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("name").hasError("pattern")),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("required",e.hasRequiredField(t,"url")),u.xp6(1),u.Q6J("ngIf",t.get("url").value||0===r&&e.hasRequiredField(t,"url")),u.xp6(1),u.Q6J("ngIf",!t.get("url").value&&(r>0||!e.hasRequiredField(t,"url"))),u.xp6(2),u.Q6J("ngIf",t.get("url").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("url").hasError("pattern"))}}function t_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"form",4),u.NdJ("submit",function(){return u.CHM(t),u.oxw().onSubmit()}),u.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),u._uU(5,"Ubah Berkas"),u.qZA()()(),u.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),u._UZ(11,"img",11),u.TgZ(12,"mat-form-field",12)(13,"mat-label"),u._uU(14,"Gambar Untuk Embed SEO"),u.qZA(),u.TgZ(15,"ngx-mat-file-input",13,14),u.NdJ("change",function(e){u.CHM(t);const i=u.MAs(16);return u.oxw().uploadImage(e,i)}),u.qZA(),u.TgZ(17,"mat-icon",15),u._uU(18,"image"),u.qZA()(),u.TgZ(19,"mat-error",16)(20,"small"),u.YNc(21,f0,3,3,"div",17),u.YNc(22,h0,2,1,"div",17),u.qZA()()(),u.YNc(23,p0,5,1,"div",18),u.YNc(24,m0,3,0,"div",19),u.TgZ(25,"mat-form-field",20)(26,"mat-label"),u._uU(27,"Jenis Proyek"),u.qZA(),u.TgZ(28,"mat-select",21),u.YNc(29,g0,2,2,"mat-option",22),u.qZA(),u.TgZ(30,"mat-error"),u.YNc(31,v0,2,0,"div",17),u.YNc(32,_0,2,0,"div",17),u.qZA()(),u.YNc(33,C0,14,7,"mat-form-field",23),u.YNc(34,L0,14,7,"mat-form-field",23),u.TgZ(35,"div",24),u._UZ(36,"mat-divider"),u.qZA(),u.TgZ(37,"div",25),u.YNc(38,H0,17,10,"div",26),u.qZA(),u.TgZ(39,"div",27)(40,"div",9),u._UZ(41,"div",28),u.TgZ(42,"div",29)(43,"button",30),u.NdJ("click",function(){return u.CHM(t),u.oxw().addFansub()}),u.TgZ(44,"mat-icon",31),u._uU(45,"add"),u.qZA(),u._uU(46," Tambah Fansub "),u.qZA()()()()()(),u.TgZ(47,"div",32)(48,"div",9)(49,"mat-form-field",20)(50,"mat-label"),u._uU(51,"Nama Berkas"),u.qZA(),u._UZ(52,"input",33),u.TgZ(53,"mat-icon",15),u._uU(54,"wysiwyg"),u.qZA(),u.TgZ(55,"mat-error"),u.YNc(56,j0,2,0,"div",17),u.YNc(57,V0,2,0,"div",17),u.qZA()(),u._UZ(58,"angular-editor",34),u.qZA(),u.YNc(59,q0,3,0,"div",35),u.YNc(60,G0,13,6,"div",35),u.TgZ(61,"div",9)(62,"div",24),u._UZ(63,"mat-divider"),u.qZA()(),u.TgZ(64,"div",36),u.YNc(65,e_,20,13,"div",26),u.qZA(),u.TgZ(66,"div",37),u._UZ(67,"div",28)(68,"div",28)(69,"div",28),u.TgZ(70,"div",29)(71,"button",30),u.NdJ("click",function(){return u.CHM(t),u.oxw().addDownloadLink()}),u.TgZ(72,"mat-icon",31),u._uU(73,"add"),u.qZA(),u._uU(74," Tambah URL "),u.qZA()()()()(),u.TgZ(75,"div",9)(76,"div",38)(77,"div",9),u._UZ(78,"div",28),u.TgZ(79,"div",39)(80,"a",40)(81,"mat-icon",31),u._uU(82,"undo"),u.qZA(),u._uU(83," Batal "),u.qZA()(),u.TgZ(84,"div",39)(85,"button",41),u._uU(86," Simpan "),u.TgZ(87,"mat-icon",42),u._uU(88,"save"),u.qZA()()()()()()()()()}if(2&s){const t=u.oxw();u.Q6J("formGroup",t.fg),u.xp6(11),u.Q6J("src",t.image_url,u.LSH),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("disabled",t.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),u.xp6(6),u.Q6J("ngIf",t.imageLimitExceeded),u.xp6(1),u.Q6J("ngIf",t.imageErrorText),u.xp6(1),u.Q6J("ngIf",t.image&&!t.fg.value.image),u.xp6(1),u.Q6J("ngIf",null==t.AS.currentUserSubject||null==t.AS.currentUserSubject.value?null:t.AS.currentUserSubject.value.verified),u.xp6(1),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngForOf",t.projectList),u.xp6(2),u.Q6J("ngIf",t.fg.get("projectType_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.fg.get("projectType_id").hasError("pattern")),u.xp6(1),u.Q6J("ngIf",t.berkasType.toLowerCase().includes("anime")),u.xp6(1),u.Q6J("ngIf",t.berkasType.toLowerCase().includes("dorama")),u.xp6(4),u.Q6J("ngForOf",t.getFansubControl.controls),u.xp6(5),u.Q6J("disabled",t.submitted),u.xp6(6),u.Q6J("color","accent"),u.xp6(7),u.Q6J("ngIf",t.fg.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.fg.get("name").hasError("pattern")),u.xp6(1),u.Q6J("config",t.GS.angularEditorConfig),u.xp6(1),u.Q6J("ngIf",t.attachmentFile),u.xp6(1),u.Q6J("ngIf",t.attachmentFile),u.xp6(5),u.Q6J("ngForOf",t.getDownloadUrlControl.controls),u.xp6(6),u.Q6J("disabled",t.submitted),u.xp6(9),u.Q6J("disabled",t.submitted),u.xp6(5),u.Q6J("disabled",t.submitted||t.fg.invalid||!t.fg.dirty)}}let i_=(()=>{class s{constructor(t,r,e,i,a,o,l,d,f,v,g,T,E,x){this.router=t,this.activatedRoute=r,this.fb=e,this.bs=i,this.pi=a,this.anime=o,this.dorama=l,this.project=d,this.fansub=f,this.berkas=v,this.toast=g,this.imgbb=T,this.gs=E,this.as=x,this.berkasId="",this.submitted=!1,this.projectList=[],this.gambar=null,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentFile=null,this.attachmentFontSubtitle=[],this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasDetail=null,this.subsBerkasUpdate=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Berkas - Ubah Berkas","Halaman Pembaharuan Data Berkas","Ubah Berkas"),this.gs.isBrowser&&(this.berkasId=this.activatedRoute.snapshot.paramMap.get("berkasId"),this.bs.busy(),this.subsBerkasDetail=this.berkas.getBerkas(this.berkasId).subscribe({next:t=>{var r,e;this.gs.log("[BERKAS_DETAIL_SUCCESS]",t),this.bs.idle(),(null===(e=null===(r=this.as.currentUserSubject)||void 0===r?void 0:r.value)||void 0===e?void 0:e.id)!==t.result.user_.id?(this.toast.warning("Berkas Ini Bukan Milikmu","Whoops!",null,!0),this.router.navigateByUrl(`/berkas/${t.result.id}`)):(this.loadProjectList(),this.initForm(t.result))},error:t=>{this.gs.log("[BERKAS_DETAIL_ERROR]",t,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/berkas/${this.berkasId}`}})}}))}ngOnDestroy(){var t,r,e,i,a,o,l,d,f,v;null===(t=this.subsProject)||void 0===t||t.unsubscribe(),null===(r=this.subsFansub)||void 0===r||r.unsubscribe(),null===(e=this.subsAnimeDetail)||void 0===e||e.unsubscribe(),null===(i=this.subsDoramaDetail)||void 0===i||i.unsubscribe(),null===(a=this.subsProjectDetail)||void 0===a||a.unsubscribe();for(const g of this.subsFansubDetail)null==g||g.unsubscribe();null===(o=this.subsAnimeNew)||void 0===o||o.unsubscribe(),null===(l=this.subsDoramaNew)||void 0===l||l.unsubscribe(),null===(d=this.subsImgbb)||void 0===d||d.unsubscribe(),null===(f=this.subsBerkasDetail)||void 0===f||f.unsubscribe(),null===(v=this.subsBerkasUpdate)||void 0===v||v.unsubscribe()}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:t=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",t),this.projectList=t.results,this.bs.idle()},error:t=>{this.gs.log("[PROJECT_LOAD_ERROR]",t,"error"),this.bs.idle()}})}hasRequiredField(t,r){return t.get(r).hasValidator(B.kI.required)}initForm(t){var r,e,i,a;"attachment_"in t&&t.attachment_&&(this.attachmentFile=t.attachment_,t.attachment_.fonts_&&t.attachment_.fonts_.forEach(o=>{this.attachmentFontSubtitle.push(`${o.name}.${o.ext}`)}),t.attachment_.subtitles_&&t.attachment_.subtitles_.forEach(o=>{this.attachmentFontSubtitle.push(`${o.name}.${o.ext}`)})),this.fg=this.fb.group({name:[t.name,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],description:[t.description,B.kI.compose([B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],projectType_id:[t.project_type_.id,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],anime_id:[(null===(r=t.anime_)||void 0===r?void 0:r.id)||null,B.kI.compose([])],anime_name:[(null===(e=t.anime_)||void 0===e?void 0:e.name)||null,B.kI.compose([])],dorama_id:[(null===(i=t.dorama_)||void 0===i?void 0:i.id)||null,B.kI.compose([])],dorama_name:[(null===(a=t.dorama_)||void 0===a?void 0:a.name)||null,B.kI.compose([])],fansub_list:this.fb.array([]),image:[null,B.kI.compose([B.kI.pattern(re.t.regexUrl)])],download_url:this.fb.array([]),private:[t.private,B.kI.compose([B.kI.required])]}),this.image_url=t.image_url,this.image_url_original=this.image_url,this.berkasType=t.project_type_.name,t.anime_&&(this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])),t.dorama_&&(this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required]));for(const o of t.download_url)this.addDownloadLink(o);for(const o of t.fansub_)this.addFansub(o);this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,jo.w)(o=>this.anime.searchAnime(o).pipe((0,Vo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_SUCCESS]",o),this.filteredAnime=o.results},error:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_ERROR]",o,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,jo.w)(o=>this.dorama.searchDorama(o).pipe((0,Vo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_SUCCESS]",o);for(const l of o.results)l.mdl_id=l.mdl_id.split("-")[1],l.image_url=l.thumb;this.filteredDorama=o.results},error:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_ERROR]",o,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,Na.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_EDIT_PROJECT_CHANGED]",o);const l=this.projectList.find(d=>d.id===o);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),l.name.toLowerCase().includes("anime")?(this.berkasType=l.name,this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])):l.name.toLowerCase().includes("dorama")?(this.berkasType=l.name,this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(t=null,r=null){return this.fb.group({name:[t,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],url:[r,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexUrl)])]})}addDownloadLink(t=null){this.getDownloadUrlControl.push(t?this.createDownloadLink(t.name,t.url):this.createDownloadLink())}removeDownloadLink(t){this.getDownloadUrlControl.removeAt(t)}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(t=null){const r=this.fb.group({fansub_id:[(null==t?void 0:t.id)||null,B.kI.compose([B.kI.required,B.kI.pattern(/^\d+$/)])],fansub_name:[(null==t?void 0:t.name)||null,B.kI.compose([B.kI.required])]});return this.subsFansubDetail.push(r.get("fansub_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,jo.w)(e=>this.fansub.searchFansub(e).pipe((0,Vo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_EDIT_SEARCH_FANSUB_RESULT]",e),this.filteredFansub=e.results}})),r}removeFansub(t){var r;this.getFansubControl.removeAt(t),null===(r=this.subsFansubDetail[t])||void 0===r||r.unsubscribe(),this.subsFansubDetail.splice(t,1)}addFansub(t=null){this.getFansubControl.push(t?this.createFansub(t):this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(t){this.getFansubControl.controls[t].get("fansub_name").patchValue(null)}filterAnimeSelected(t){var r;this.gs.log("[ANIME_FILTER_CLICK]",t),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:t.id,name:t.title,image_url:t.image_url,type:null===(r=t.media_type)||void 0===r?void 0:r.toUpperCase()}).subscribe({next:e=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",e),this.animeCheckOrAddResponse=e.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(e.result.id),this.fg.controls.anime_name.patchValue(e.result.name)},error:e=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",e,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(t){this.gs.log("[DORAMA_FILTER_CLICK]",t),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(t.mdl_id,10),slug:t.slug,name:t.title,image_url:t.image_url,type:t.type}).subscribe({next:r=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",r),this.doramaCheckOrAddResponse=r.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(r.result.id),this.fg.controls.dorama_name.patchValue(r.result.name)},error:r=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",r,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(t,r){this.gs.log("[FANSUB_FILTER_CLICK]",t),this.getFansubControl.controls[r].get("fansub_id").patchValue(t.id),this.getFansubControl.controls[r].get("fansub_name").patchValue(t.name)}uploadImage(t,r){this.gambar=r,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine();const e=t.target.files[0];try{const i=new FileReader;i.readAsDataURL(e),i.onload=a=>{if(this.gs.log("[IMAGE_SELECTED]",a),e.size<=re.t.fileSizeImageLimit){const o=this.gs.document.createElement("img");o.onload=()=>{this.image=e,this.image_url=i.result.toString()},o.src=i.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=re.t.fileSizeImageLimit,this.gambar.clear(t)}}catch(i){this.image=null,this.image_url=this.image_url_original,this.gambar.clear(t)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:t=>{this.gs.log("[IMAGE_SUCCESS]",t),this.fg.controls.image.patchValue(t.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:t=>{var r;this.gs.log("[IMAGE_ERROR]",t,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.submitted=!1,this.imageErrorText=(null===(r=t.result)||void 0===r?void 0:r.message)||t.info}})}onSubmit(){this.bs.busy();const t=this.gs.getDirtyValues(this.fg);if("fansub_list"in t){const r=[];for(const e of this.fg.value.fansub_list)r.push(e.fansub_id);t.fansub_id=r,delete t.fansub_list}if(this.gs.log("[BERKAS_EDIT_DIRTY]",t),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsBerkasUpdate=this.berkas.updateBerkas(this.berkasId,{...t}).subscribe({next:r=>{this.gs.log("[BERKAS_EDIT_SUCCESS]",r),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl(`/berkas/${this.berkasId}`)},error:r=>{this.gs.log("[BERKAS_EDIT_ERROR]",r,"error"),this.submitted=!1,this.bs.idle()}})}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(B.qu),u.Y36(Me.z),u.Y36(rt.Z),u.Y36(r0.o),u.Y36(n0.X),u.Y36(a0.Y),u.Y36(s0.T),u.Y36(w.A),u.Y36(Y.k),u.Y36(o0.X),u.Y36(Ce.U),u.Y36(V.e))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-edit"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama"],[3,"value",4,"ngFor","ngForOf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],[1,"col-12","p-3"],["formArrayName","fansub_list"],[4,"ngFor","ngForOf"],[1,"col-12","mb-4"],[1,"col"],[1,"col","pb-3"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"me-1"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv"],["formControlName","description",1,"p-3","w-100",3,"config"],["class","row",4,"ngIf"],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["formControlName","private","matTooltip","Hanya diakses melalui profil dan/atau url"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"border-radius","0","height","40px","width","30px","object-fit","cover",3,"src"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub",3,"matAutocomplete","keyup"],["matSuffix","",4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],[1,"me-1",2,"border-radius","0","height","40px","width","40px","object-fit","cover",3,"src"],["mat-subheader","",1,"text-warning"],["mat-list-icon",""],["mat-line",""],["class","p-3 m-0",4,"ngIf"],[1,"p-3","m-0"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Web Shit",3,"required"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://drive.google.com/drive/u/2/folders/1KYTJZsmH9dyyHBXnQD4N0SjSBXcs8qD-",3,"required"]],template:function(t,r){1&t&&(u._UZ(0,"app-notifications"),u.TgZ(1,"div",0)(2,"div",1)(3,"div",2),u.YNc(4,t_,89,27,"form",3),u.qZA()()()),2&t&&(u.xp6(4),u.Q6J("ngIf",r.fg))},directives:[Q.t,J.O5,B._Y,B.JL,B.sg,Fa.KE,Fa.hX,ve.Yh,Ge.Hw,Fa.R9,Fa.TO,De.lW,u0.Rr,B.JJ,B.u,ze.gM,l0.gD,J.sg,mc.ey,d0.Nt,B.Fj,gc.ZL,gc.XC,qe.pW,c0.d,B.CE,B.x0,ke.s6,ee.i$,ee.gs,ee.Tg,ee.Nh,mc.X2,B.Q7,De.zs,_e.yS],pipes:[pc.$],styles:[""]}),s})();var r_=j(8757);function n_(s,n){1&s&&(u.TgZ(0,"div",5)(1,"div",6)(2,"div",7),u._uU(3,"* Berkas "),u.TgZ(4,"i"),u._uU(5,"Private"),u.qZA(),u._uU(6," Tidak Di Tampilkan"),u.qZA()()())}function a_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",1),u.YNc(1,n_,7,0,"div",2),u.TgZ(2,"div",3)(3,"app-material-tab",4),u.NdJ("tableRowClicked",function(e){return u.CHM(t),u.oxw().openBerkas(e)})("paginatorClicked",function(e){return u.CHM(t),u.oxw().onPaginatorClicked(e)})("serverSideFilter",function(e){return u.CHM(t),u.oxw().onServerSideFilter(e)})("serverSideOrder",function(e){return u.CHM(t),u.oxw().onServerSideOrder(e)}),u.qZA()()()}if(2&s){const t=u.oxw();u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&null!=t.AS.currentUserSubject.value&&t.AS.currentUserSubject.value.verified)),u.xp6(2),u.Q6J("tabData",t.tabData)("count",t.count)("serverSide",!0)}}let s_=(()=>{class s{constructor(t,r,e,i,a,o){this.router=t,this.gs=r,this.bs=e,this.berkas=i,this.fs=a,this.as=o,this.berkasData=[],this.tabData=[{name:"Berkas Terkini",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsBerkas=null,this.gs.bannerImg="/assets/img/banner/berkas.jpg",this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}ngOnDestroy(){var t;null===(t=this.subsBerkas)||void 0===t||t.unsubscribe()}ngOnInit(){this.gs.isBrowser&&this.getBerkas()}getBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.berkas.getAllBerkas(this.q,this.page,this.row,this.sort,this.order).subscribe({next:t=>{this.gs.log("[BERKAS_LIST_SUCCESS]",t),this.count=t.count,this.berkasData=[];for(const r of t.results)this.berkasData.push({id:r.id,private:r.private,foto:r.user_.image_url,Proyek:r.project_type_.name,Tanggal:r.created_at,Kunjungan:r.view_count,Pemilik:r.user_.username,"Nama Berkas":r.name});this.tabData[0].data.row=this.berkasData,this.fs.initializeFab("add",null,"Tambah Berkas Baru","/create/berkas",!1),this.bs.idle()},error:t=>{this.gs.log("[BERKAS_LIST_ERROR]",t,"error"),this.bs.idle()}})}openBerkas(t){this.gs.log("[BERKAS_LIST_CLICK_BERKAS]",t),this.router.navigateByUrl(`/berkas/${t.id}`)}onPaginatorClicked(t){this.gs.log("[BERKAS_LIST_CLICK_PAGINATOR]",t),this.page=t.pageIndex+1,this.row=t.pageSize,this.getBerkas()}onServerSideFilter(t){this.gs.log("[BERKAS_LIST_ENTER_FILTER]",t),this.q=t,this.getBerkas()}onServerSideOrder(t){this.gs.log("[BERKAS_LIST_CLICK_ORDER]",t),this.q=t.q,this.sort=t.active,this.order=t.direction,this.getBerkas()}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(Ce.U),u.Y36(Me.z),u.Y36(w.A),u.Y36(D.r),u.Y36(V.e))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-list"]],decls:2,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],["class","row my-4",4,"ngIf"],[1,"row"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"row","my-4"],[1,"col-12"],[1,"text-danger","text-end"]],template:function(t,r){1&t&&(u._UZ(0,"app-notifications"),u.YNc(1,a_,4,4,"div",0)),2&t&&(u.xp6(1),u.Q6J("ngIf",r.berkasData))},directives:[Q.t,J.O5,r_.H],styles:[""]}),s})();var o_=j(2438);const u_=[{path:"",pathMatch:"full",component:s_},{path:":berkasId",children:[{path:"",pathMatch:"full",component:i0},{path:"edit",component:i_,canActivate:[vt.t],data:{title:"Berkas - Ubah Data",description:"Halaman Pembaharuan Data Fansub",keywords:"Ubah Berkas",[re.t.decoratorRoles]:[Ie.yS.ADMIN,Ie.yS.MODERATOR,Ie.yS.FANSUBBER,Ie.yS.USER]}}]}];let l_=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[[J.ez,_e.Bz.forChild(u_),Ee.m,Te.L,B.u5,B.UX,ve.Ad,pe.F,ke.UM,se,Ue.R,je.b,tt.T,o_.d]]}),s})()},3992:(He,we,j)=>{"use strict";var J=j(9226);He.exports=function(ve,re){return void 0===re&&(re=!1),function(Ie,Ee,Te){if(Ie)ve(Ie);else if(Ee.statusCode>=400&&Ee.statusCode<=599){var pe=Te;if(re)if(J.TextDecoder){var u=function B(ke){return void 0===ke&&(ke=""),ke.toLowerCase().split(";").reduce(function(ve,re){var Ie=re.split("="),Te=Ie[1];return"charset"===Ie[0].trim()?Te.trim():ve},"utf-8")}(Ee.headers&&Ee.headers["content-type"]);try{pe=new TextDecoder(u).decode(Te)}catch(se){}}else pe=String.fromCharCode.apply(null,new Uint8Array(Te));ve({cause:pe})}else ve(null,Te)}}},745:(He,we,j)=>{"use strict";var J=j(9226),_e=j(7154),B=j(2703);function Ie(se,Ue,je){var tt=se;return B(Ue)?(je=Ue,"string"==typeof se&&(tt={uri:se})):tt=_e({},Ue,{uri:se}),tt.callback=je,tt}function Ee(se,Ue,je){return Te(Ue=Ie(se,Ue,je))}function Te(se){if(void 0===se.callback)throw new Error("callback argument missing");var Ue=!1,je=function(le,ue,xe){Ue||(Ue=!0,se.callback(le,ue,xe))};function vt(){var Y=void 0;if(Y=me.response?me.response:me.responseText||function pe(se){try{if("document"===se.responseType)return se.responseXML;if(""===se.responseType&&(!se.responseXML||"parsererror"!==se.responseXML.documentElement.nodeName))return se.responseXML}catch(je){}return null}(me),D)try{Y=JSON.parse(Y)}catch(le){}return Y}function oe(Y){return clearTimeout(V),Y instanceof Error||(Y=new Error(""+(Y||"Unknown XMLHttpRequest Error"))),Y.statusCode=0,je(Y,te)}function Oe(){if(!Ze){var Y;clearTimeout(V);var le=te,ue=null;return 0!==(Y=se.useXDR&&void 0===me.status?200:1223===me.status?204:me.status)?(le={body:vt(),statusCode:Y,method:Me,headers:{},url:Ce,rawRequest:me},me.getAllResponseHeaders&&(le.headers=function(Ue){var je={};return Ue&&Ue.trim().split("\n").forEach(function(tt){var vt=tt.indexOf(":"),oe=tt.slice(0,vt).trim().toLowerCase(),Oe=tt.slice(vt+1).trim();void 0===je[oe]?je[oe]=Oe:Array.isArray(je[oe])?je[oe].push(Oe):je[oe]=[je[oe],Oe]}),je}(me.getAllResponseHeaders()))):ue=new Error("Internal XMLHttpRequest Error"),je(ue,le,le.body)}}var me=se.xhr||null;me||(me=se.cors||se.useXDR?new Ee.XDomainRequest:new Ee.XMLHttpRequest);var Le,Ze,V,Ce=me.url=se.uri||se.url,Me=me.method=se.method||"GET",Ve=se.body||se.data,rt=me.headers=se.headers||{},w=!!se.sync,D=!1,te={body:void 0,headers:{},statusCode:0,method:Me,url:Ce,rawRequest:me};if("json"in se&&!1!==se.json&&(D=!0,rt.accept||rt.Accept||(rt.Accept="application/json"),"GET"!==Me&&"HEAD"!==Me&&(rt["content-type"]||rt["Content-Type"]||(rt["Content-Type"]="application/json"),Ve=JSON.stringify(!0===se.json?Ve:se.json))),me.onreadystatechange=function tt(){4===me.readyState&&setTimeout(Oe,0)},me.onload=Oe,me.onerror=oe,me.onprogress=function(){},me.onabort=function(){Ze=!0},me.ontimeout=oe,me.open(Me,Ce,!w,se.username,se.password),w||(me.withCredentials=!!se.withCredentials),!w&&se.timeout>0&&(V=setTimeout(function(){if(!Ze){Ze=!0,me.abort("timeout");var Y=new Error("XMLHttpRequest timeout");Y.code="ETIMEDOUT",oe(Y)}},se.timeout)),me.setRequestHeader)for(Le in rt)rt.hasOwnProperty(Le)&&me.setRequestHeader(Le,rt[Le]);else if(se.headers&&!function re(se){for(var Ue in se)if(se.hasOwnProperty(Ue))return!1;return!0}(se.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in se&&(me.responseType=se.responseType),"beforeSend"in se&&"function"==typeof se.beforeSend&&se.beforeSend(me),me.send(Ve||null),me}Ee.httpHandler=j(3992),He.exports=Ee,He.exports.default=Ee,Ee.XMLHttpRequest=J.XMLHttpRequest||function u(){},Ee.XDomainRequest="withCredentials"in new Ee.XMLHttpRequest?Ee.XMLHttpRequest:J.XDomainRequest,function ve(se,Ue){for(var je=0;je{"use strict";function j(B,ke){return void 0===ke&&(ke=Object),ke&&"function"==typeof ke.freeze?ke.freeze(B):B}var J=j({HTML:"text/html",isHTML:function(B){return B===J.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_e=j({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(B){return B===_e.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});we.freeze=j,we.MIME_TYPE=J,we.NAMESPACE=_e},1991:(He,we,j)=>{var _e=j(9401),B=j(6853),ke=j(4436),ve=j(8702),re=B.DOMImplementation,Ie=_e.NAMESPACE,Ee=ve.ParseError,Te=ve.XMLReader;function pe(oe){this.options=oe||{locator:{}}}function se(){this.cdata=!1}function Ue(oe,Oe){Oe.lineNumber=oe.lineNumber,Oe.columnNumber=oe.columnNumber}function je(oe){if(oe)return"\n@"+(oe.systemId||"")+"#[line:"+oe.lineNumber+",col:"+oe.columnNumber+"]"}function tt(oe,Oe,me){return"string"==typeof oe?oe.substr(Oe,me):oe.length>=Oe+me||Oe?new java.lang.String(oe,Oe,me)+"":oe}function vt(oe,Oe){oe.currentElement?oe.currentElement.appendChild(Oe):oe.doc.appendChild(Oe)}pe.prototype.parseFromString=function(oe,Oe){var me=this.options,Le=new Te,Ze=me.domBuilder||new se,Ce=me.errorHandler,Me=me.locator,Ve=me.xmlns||{},rt=/\/x?html?$/.test(Oe),w=rt?ke.HTML_ENTITIES:ke.XML_ENTITIES;return Me&&Ze.setDocumentLocator(Me),Le.errorHandler=function u(oe,Oe,me){if(!oe){if(Oe instanceof se)return Oe;oe=Oe}var Le={},Ze=oe instanceof Function;function Ce(Me){var Ve=oe[Me];!Ve&&Ze&&(Ve=2==oe.length?function(rt){oe(Me,rt)}:oe),Le[Me]=Ve&&function(rt){Ve("[xmldom "+Me+"]\t"+rt+je(me))}||function(){}}return me=me||{},Ce("warning"),Ce("error"),Ce("fatalError"),Le}(Ce,Ze,Me),Le.domBuilder=me.domBuilder||Ze,rt&&(Ve[""]=Ie.HTML),Ve.xml=Ve.xml||Ie.XML,oe&&"string"==typeof oe?Le.parse(oe,Ve,w):Le.errorHandler.error("invalid doc source"),Ze.doc},se.prototype={startDocument:function(){this.doc=(new re).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(oe,Oe,me,Le){var Ze=this.doc,Ce=Ze.createElementNS(oe,me||Oe),Me=Le.length;vt(this,Ce),this.currentElement=Ce,this.locator&&Ue(this.locator,Ce);for(var Ve=0;Ve{var _e=j(9401).NAMESPACE;function B(C){return""!==C}function ve(C,A){return C.hasOwnProperty(A)||(C[A]=!0),C}function re(C){if(!C)return[];var A=function ke(C){return C?C.split(/[\t\n\f\r ]+/).filter(B):[]}(C);return Object.keys(A.reduce(ve,{}))}function Ee(C,A){for(var R in C)A[R]=C[R]}function Te(C,A){var R=C.prototype;if(!(R instanceof A)){let ce=function(){};ce.prototype=A.prototype,ce=new ce,Ee(R,ce),C.prototype=R=ce}R.constructor!=C&&("function"!=typeof C&&console.error("unknown Class:"+C),R.constructor=C)}var pe={},u=pe.ELEMENT_NODE=1,se=pe.ATTRIBUTE_NODE=2,Ue=pe.TEXT_NODE=3,je=pe.CDATA_SECTION_NODE=4,tt=pe.ENTITY_REFERENCE_NODE=5,vt=pe.ENTITY_NODE=6,oe=pe.PROCESSING_INSTRUCTION_NODE=7,Oe=pe.COMMENT_NODE=8,me=pe.DOCUMENT_NODE=9,Le=pe.DOCUMENT_TYPE_NODE=10,Ze=pe.DOCUMENT_FRAGMENT_NODE=11,Ce=pe.NOTATION_NODE=12,Me={},Ve={},D=(Me.INDEX_SIZE_ERR=(Ve[1]="Index size error",1),Me.DOMSTRING_SIZE_ERR=(Ve[2]="DOMString size error",2),Me.HIERARCHY_REQUEST_ERR=(Ve[3]="Hierarchy request error",3)),ue=(Me.WRONG_DOCUMENT_ERR=(Ve[4]="Wrong document",4),Me.INVALID_CHARACTER_ERR=(Ve[5]="Invalid character",5),Me.NO_DATA_ALLOWED_ERR=(Ve[6]="No data allowed",6),Me.NO_MODIFICATION_ALLOWED_ERR=(Ve[7]="No modification allowed",7),Me.NOT_FOUND_ERR=(Ve[8]="Not found",8)),ie=(Me.NOT_SUPPORTED_ERR=(Ve[9]="Not supported",9),Me.INUSE_ATTRIBUTE_ERR=(Ve[10]="Attribute in use",10));function Ge(C,A){if(A instanceof Error)var R=A;else R=this,Error.call(this,Ve[C]),this.message=Ve[C],Error.captureStackTrace&&Error.captureStackTrace(this,Ge);return R.code=C,A&&(this.message=this.message+": "+A),R}function qe(){}function Fe(C,A){this._node=C,this._refresh=A,P(this)}function P(C){var A=C._node._inc||C._node.ownerDocument._inc;if(C._inc!=A){var R=C._refresh(C._node);jn(C,"length",R.length),Ee(R,C),C._inc=A}}function It(){}function K(C,A){for(var R=C.length;R--;)if(C[R]===A)return R}function it(C,A,R,Z){if(Z?A[K(A,Z)]=R:A[A.length++]=R,C){R.ownerElement=C;var ce=C.ownerDocument;ce&&(Z&&er(ce,C,Z),function St(C,A,R){C&&C._inc++,R.namespaceURI===_e.XMLNS&&(A._nsMap[R.prefix?R.localName:""]=R.value)}(ce,C,R))}}function Jt(C,A,R){var Z=K(A,R);if(!(Z>=0))throw Ge(ue,new Error(C.tagName+"@"+R));for(var ce=A.length-1;Z"==C&&">")||"&"==C&&"&"||'"'==C&&"""||"&#"+C.charCodeAt()+";"}function X(C,A){if(A(C))return!0;if(C=C.firstChild)do{if(X(C,A))return!0}while(C=C.nextSibling)}function si(){}function er(C,A,R,Z){C&&C._inc++,R.namespaceURI===_e.XMLNS&&delete A._nsMap[R.prefix?R.localName:""]}function Vi(C,A,R){if(C&&C._inc){C._inc++;var Z=A.childNodes;if(R)Z[Z.length++]=R;else{for(var ce=A.firstChild,We=0;ce;)Z[We++]=ce,ce=ce.nextSibling;Z.length=We}}}function qi(C,A){var R=A.previousSibling,Z=A.nextSibling;return R?R.nextSibling=Z:C.firstChild=Z,Z?Z.previousSibling=R:C.lastChild=R,Vi(C.ownerDocument,C),A}function Wi(C,A,R){var Z=A.parentNode;if(Z&&Z.removeChild(A),A.nodeType===Ze){var ce=A.firstChild;if(null==ce)return A;var We=A.lastChild}else ce=We=A;var bt=R?R.previousSibling:C.lastChild;ce.previousSibling=bt,We.nextSibling=R,bt?bt.nextSibling=ce:C.firstChild=ce,null==R?C.lastChild=We:R.previousSibling=We;do{ce.parentNode=C}while(ce!==We&&(ce=ce.nextSibling));return Vi(C.ownerDocument||C,C),A.nodeType==Ze&&(A.firstChild=A.lastChild=null),A}function lt(){this._nsMap={}}function Gi(){}function tr(){}function Sr(){}function Er(){}function nn(){}function Ei(){}function Cr(){}function Bn(){}function kr(){}function Ar(){}function an(){}function wr(){}function Hn(C,A){var R=[],Z=9==this.nodeType&&this.documentElement||this,ce=Z.prefix,We=Z.namespaceURI;if(We&&null==ce&&null==(ce=Z.lookupPrefix(We)))var bt=[{namespace:We,prefix:null}];return Zi(this,R,C,A,bt),R.join("")}function Gt(C,A,R){var Z=C.prefix||"",ce=C.namespaceURI;if(!ce||"xml"===Z&&ce===_e.XML||ce===_e.XMLNS)return!1;for(var We=R.length;We--;){var bt=R[We];if(bt.prefix===Z)return bt.namespace!==ce}return!0}function sn(C,A,R){C.push(" ",A,'="',R.replace(/[<&"]/g,hi),'"')}function Zi(C,A,R,Z,ce){if(ce||(ce=[]),Z){if(!(C=Z(C)))return;if("string"==typeof C)return void A.push(C)}switch(C.nodeType){case u:var We=C.attributes,bt=We.length,Et=C.firstChild,pi=C.tagName,ki=pi;if(!(R=_e.isHTML(C.namespaceURI)||R)&&!C.prefix&&C.namespaceURI){for(var mi,Nt=0;Nt=0;ei--)if(""===(oi=ce[ei]).prefix&&oi.namespace===C.namespaceURI){mi=oi.namespace;break}if(mi!==C.namespaceURI)for(ei=ce.length-1;ei>=0;ei--){var oi;if((oi=ce[ei]).namespace===C.namespaceURI){oi.prefix&&(ki=oi.prefix+":"+pi);break}}}A.push("<",ki);for(var gi=0;gi"),R&&/^script$/i.test(pi))for(;Et;)Et.data?A.push(Et.data):Zi(Et,A,R,Z,ce.slice()),Et=Et.nextSibling;else for(;Et;)Zi(Et,A,R,Z,ce.slice()),Et=Et.nextSibling;A.push("")}else A.push("/>");return;case me:case Ze:for(Et=C.firstChild;Et;)Zi(Et,A,R,Z,ce.slice()),Et=Et.nextSibling;return;case se:return sn(A,C.name,C.value);case Ue:return A.push(C.data.replace(/[<&]/g,hi).replace(/]]>/g,"]]>"));case je:return A.push("");case Oe:return A.push("\x3c!--",C.data,"--\x3e");case Le:var Vn=C.publicId,Ki=C.systemId;if(A.push("");else if(Ki&&"."!=Ki)A.push(" SYSTEM ",Ki,">");else{var as=C.internalSubset;as&&A.push(" [",as,"]"),A.push(">")}return;case oe:return A.push("");case tt:return A.push("&",C.nodeName,";");default:A.push("??",C.nodeName)}}function Ci(C,A,R){var Z;switch(A.nodeType){case u:(Z=A.cloneNode(!1)).ownerDocument=C;case Ze:break;case se:R=!0}if(Z||(Z=A.cloneNode(!1)),Z.ownerDocument=C,Z.parentNode=null,R)for(var ce=A.firstChild;ce;)Z.appendChild(Ci(C,ce,R)),ce=ce.nextSibling;return Z}function ir(C,A,R){var Z=new A.constructor;for(var ce in A){var We=A[ce];"object"!=typeof We&&We!=Z[ce]&&(Z[ce]=We)}switch(A.childNodes&&(Z.childNodes=new qe),Z.ownerDocument=C,Z.nodeType){case u:var bt=A.attributes,pi=Z.attributes=new It,ki=bt.length;pi._ownerElement=Z;for(var mi=0;mi0},lookupPrefix:function(C){for(var A=this;A;){var R=A._nsMap;if(R)for(var Z in R)if(R[Z]==C)return Z;A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},lookupNamespaceURI:function(C){for(var A=this;A;){var R=A._nsMap;if(R&&C in R)return R[C];A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},isDefaultNamespace:function(C){return null==this.lookupPrefix(C)}},Ee(pe,Ae),Ee(pe,Ae.prototype),si.prototype={nodeName:"#document",nodeType:me,doctype:null,documentElement:null,_inc:1,insertBefore:function(C,A){if(C.nodeType==Ze){for(var R=C.firstChild;R;){var Z=R.nextSibling;this.insertBefore(R,A),R=Z}return C}return null==this.documentElement&&C.nodeType==u&&(this.documentElement=C),Wi(this,C,A),C.ownerDocument=this,C},removeChild:function(C){return this.documentElement==C&&(this.documentElement=null),qi(this,C)},importNode:function(C,A){return Ci(this,C,A)},getElementById:function(C){var A=null;return X(this.documentElement,function(R){if(R.nodeType==u&&R.getAttribute("id")==C)return A=R,!0}),A},getElementsByClassName:function(C){var A=re(C);return new Fe(this,function(R){var Z=[];return A.length>0&&X(R.documentElement,function(ce){if(ce!==R&&ce.nodeType===u){var We=ce.getAttribute("class");if(We){var bt=C===We;if(!bt){var pi=re(We);bt=A.every(function Ie(C){return function(A){return C&&-1!==C.indexOf(A)}}(pi))}bt&&Z.push(ce)}}}),Z})},createElement:function(C){var A=new lt;return A.ownerDocument=this,A.nodeName=C,A.tagName=C,A.localName=C,A.childNodes=new qe,(A.attributes=new It)._ownerElement=A,A},createDocumentFragment:function(){var C=new Ar;return C.ownerDocument=this,C.childNodes=new qe,C},createTextNode:function(C){var A=new Sr;return A.ownerDocument=this,A.appendData(C),A},createComment:function(C){var A=new Er;return A.ownerDocument=this,A.appendData(C),A},createCDATASection:function(C){var A=new nn;return A.ownerDocument=this,A.appendData(C),A},createProcessingInstruction:function(C,A){var R=new an;return R.ownerDocument=this,R.tagName=R.target=C,R.nodeValue=R.data=A,R},createAttribute:function(C){var A=new Gi;return A.ownerDocument=this,A.name=C,A.nodeName=C,A.localName=C,A.specified=!0,A},createEntityReference:function(C){var A=new kr;return A.ownerDocument=this,A.nodeName=C,A},createElementNS:function(C,A){var R=new lt,Z=A.split(":"),ce=R.attributes=new It;return R.childNodes=new qe,R.ownerDocument=this,R.nodeName=A,R.tagName=A,R.namespaceURI=C,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,ce._ownerElement=R,R},createAttributeNS:function(C,A){var R=new Gi,Z=A.split(":");return R.ownerDocument=this,R.nodeName=A,R.name=A,R.namespaceURI=C,R.specified=!0,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,R}},Te(si,Ae),si.prototype.getElementsByTagName=(lt.prototype={nodeType:u,hasAttribute:function(C){return null!=this.getAttributeNode(C)},getAttribute:function(C){var A=this.getAttributeNode(C);return A&&A.value||""},getAttributeNode:function(C){return this.attributes.getNamedItem(C)},setAttribute:function(C,A){var R=this.ownerDocument.createAttribute(C);R.value=R.nodeValue=""+A,this.setAttributeNode(R)},removeAttribute:function(C){var A=this.getAttributeNode(C);A&&this.removeAttributeNode(A)},appendChild:function(C){return C.nodeType===Ze?this.insertBefore(C,null):function ut(C,A){var R=A.parentNode;if(R){var Z=C.lastChild;R.removeChild(A),Z=C.lastChild}return Z=C.lastChild,A.parentNode=C,A.previousSibling=Z,A.nextSibling=null,Z?Z.nextSibling=A:C.firstChild=A,C.lastChild=A,Vi(C.ownerDocument,C,A),A}(this,C)},setAttributeNode:function(C){return this.attributes.setNamedItem(C)},setAttributeNodeNS:function(C){return this.attributes.setNamedItemNS(C)},removeAttributeNode:function(C){return this.attributes.removeNamedItem(C.nodeName)},removeAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);R&&this.removeAttributeNode(R)},hasAttributeNS:function(C,A){return null!=this.getAttributeNodeNS(C,A)},getAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);return R&&R.value||""},setAttributeNS:function(C,A,R){var Z=this.ownerDocument.createAttributeNS(C,A);Z.value=Z.nodeValue=""+R,this.setAttributeNode(Z)},getAttributeNodeNS:function(C,A){return this.attributes.getNamedItemNS(C,A)},getElementsByTagName:function(C){return new Fe(this,function(A){var R=[];return X(A,function(Z){Z!==A&&Z.nodeType==u&&("*"===C||Z.tagName==C)&&R.push(Z)}),R})},getElementsByTagNameNS:function(C,A){return new Fe(this,function(R){var Z=[];return X(R,function(ce){ce!==R&&ce.nodeType===u&&("*"===C||ce.namespaceURI===C)&&("*"===A||ce.localName==A)&&Z.push(ce)}),Z})}}).getElementsByTagName,si.prototype.getElementsByTagNameNS=lt.prototype.getElementsByTagNameNS,Te(lt,Ae),Gi.prototype.nodeType=se,Te(Gi,Ae),tr.prototype={data:"",substringData:function(C,A){return this.data.substring(C,C+A)},appendData:function(C){this.nodeValue=this.data=C=this.data+C,this.length=C.length},insertData:function(C,A){this.replaceData(C,0,A)},appendChild:function(C){throw new Error(Ve[D])},deleteData:function(C,A){this.replaceData(C,A,"")},replaceData:function(C,A,R){var Z=this.data.substring(0,C),ce=this.data.substring(C+A);this.nodeValue=this.data=R=Z+R+ce,this.length=R.length}},Te(tr,Ae),Sr.prototype={nodeName:"#text",nodeType:Ue,splitText:function(C){var A=this.data,R=A.substring(C);A=A.substring(0,C),this.data=this.nodeValue=A,this.length=A.length;var Z=this.ownerDocument.createTextNode(R);return this.parentNode&&this.parentNode.insertBefore(Z,this.nextSibling),Z}},Te(Sr,tr),Er.prototype={nodeName:"#comment",nodeType:Oe},Te(Er,tr),nn.prototype={nodeName:"#cdata-section",nodeType:je},Te(nn,tr),Ei.prototype.nodeType=Le,Te(Ei,Ae),Cr.prototype.nodeType=Ce,Te(Cr,Ae),Bn.prototype.nodeType=vt,Te(Bn,Ae),kr.prototype.nodeType=tt,Te(kr,Ae),Ar.prototype.nodeName="#document-fragment",Ar.prototype.nodeType=Ze,Te(Ar,Ae),an.prototype.nodeType=oe,Te(an,Ae),wr.prototype.serializeToString=function(C,A,R){return Hn.call(C,A,R)},Ae.prototype.toString=Hn;try{if(Object.defineProperty){let C=function(A){switch(A.nodeType){case u:case Ze:var R=[];for(A=A.firstChild;A;)7!==A.nodeType&&8!==A.nodeType&&R.push(C(A)),A=A.nextSibling;return R.join("");default:return A.nodeValue}};Object.defineProperty(Fe.prototype,"length",{get:function(){return P(this),this.$$length}}),Object.defineProperty(Ae.prototype,"textContent",{get:function(){return C(this)},set:function(A){switch(this.nodeType){case u:case Ze:for(;this.firstChild;)this.removeChild(this.firstChild);(A||String(A))&&this.appendChild(this.ownerDocument.createTextNode(A));break;default:this.data=A,this.value=A,this.nodeValue=A}}}),jn=function(A,R,Z){A["$$"+R]=Z}}}catch(C){}we.DocumentType=Ei,we.DOMException=Ge,we.DOMImplementation=Ne,we.Element=lt,we.Node=Ae,we.NodeList=qe,we.XMLSerializer=wr},4436:(He,we,j)=>{var J=j(9401).freeze;we.XML_ENTITIES=J({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),we.HTML_ENTITIES=J({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",times:"\xd7",divide:"\xf7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",euro:"\u20ac",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),we.entityMap=we.HTML_ENTITIES},978:(He,we,j)=>{j(6853);we.DOMParser=j(1991).DOMParser},8702:(He,we,j)=>{var J=j(9401).NAMESPACE,_e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=new RegExp("[\\-\\.0-9"+_e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),ke=new RegExp("^"+_e.source+B.source+"*(?::"+_e.source+B.source+"*)?$");function Ue(w,D){this.message=w,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,Ue)}function je(){}function vt(w,D){return D.lineNumber=w.lineNumber,D.columnNumber=w.columnNumber,D}function oe(w,D,V,te,Y,le){function ue(ze,Ge,qe){V.attributeNames.hasOwnProperty(ze)&&le.fatalError("Attribute "+ze+" redefined"),V.addValue(ze,Ge,qe)}for(var xe,de=++D,Q=0;;){var ee=w.charAt(de);switch(ee){case"=":if(1===Q)xe=w.slice(D,de),Q=3;else{if(2!==Q)throw new Error("attribute equal must after attrName");Q=3}break;case"'":case'"':if(3===Q||1===Q){if(1===Q&&(le.warning('attribute value must after "="'),xe=w.slice(D,de)),!((de=w.indexOf(ee,D=de+1))>0))throw new Error("attribute value no end '"+ee+"' match");ue(xe,ie=w.slice(D,de).replace(/&#?\w+;/g,Y),D-1),Q=5}else{if(4!=Q)throw new Error('attribute value must after "="');ue(xe,ie=w.slice(D,de).replace(/&#?\w+;/g,Y),D),le.warning('attribute "'+xe+'" missed start quot('+ee+")!!"),D=de+1,Q=5}break;case"/":switch(Q){case 0:V.setTagName(w.slice(D,de));case 5:case 6:case 7:Q=7,V.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return le.error("unexpected end of input"),0==Q&&V.setTagName(w.slice(D,de)),de;case">":switch(Q){case 0:V.setTagName(w.slice(D,de));case 5:case 6:case 7:break;case 4:case 1:"/"===(ie=w.slice(D,de)).slice(-1)&&(V.closed=!0,ie=ie.slice(0,-1));case 2:2===Q&&(ie=xe),4==Q?(le.warning('attribute "'+ie+'" missed quot(")!'),ue(xe,ie.replace(/&#?\w+;/g,Y),D)):((!J.isHTML(te[""])||!ie.match(/^(?:disabled|checked|selected)$/i))&&le.warning('attribute "'+ie+'" missed value!! "'+ie+'" instead!!'),ue(ie,ie,D));break;case 3:throw new Error("attribute value missed!!")}return de;case"\x80":ee=" ";default:if(ee<=" ")switch(Q){case 0:V.setTagName(w.slice(D,de)),Q=6;break;case 1:xe=w.slice(D,de),Q=2;break;case 4:var ie=w.slice(D,de).replace(/&#?\w+;/g,Y);le.warning('attribute "'+ie+'" missed quot(")!!'),ue(xe,ie,D);case 5:Q=6}else switch(Q){case 2:(!J.isHTML(te[""])||!xe.match(/^(?:disabled|checked|selected)$/i))&&le.warning('attribute "'+xe+'" missed value!! "'+xe+'" instead2!!'),ue(xe,xe,D),D=de,Q=1;break;case 5:le.warning('attribute space is required"'+xe+'"!!');case 6:Q=1,D=de;break;case 3:Q=4,D=de;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}de++}}function Oe(w,D,V){for(var te=w.tagName,Y=null,ee=w.length;ee--;){var le=w[ee],ue=le.qName,xe=le.value;if((De=ue.indexOf(":"))>0)var ie=le.prefix=ue.slice(0,De),de=ue.slice(De+1),Q="xmlns"===ie&&de;else de=ue,ie=null,Q="xmlns"===ue&&"";le.localName=de,!1!==Q&&(null==Y&&(Y={},Ze(V,V={})),V[Q]=Y[Q]=xe,le.uri=J.XMLNS,D.startPrefixMapping(Q,xe))}for(ee=w.length;ee--;)(ie=(le=w[ee]).prefix)&&("xml"===ie&&(le.uri=J.XML),"xmlns"!==ie&&(le.uri=V[ie||""]));var De;(De=te.indexOf(":"))>0?(ie=w.prefix=te.slice(0,De),de=w.localName=te.slice(De+1)):(ie=null,de=w.localName=te);var ze=w.uri=V[ie||""];if(D.startElement(ze,de,te,w),!w.closed)return w.currentNSMap=V,w.localNSMap=Y,!0;if(D.endElement(ze,de,te),Y)for(ie in Y)D.endPrefixMapping(ie)}function me(w,D,V,te,Y){if(/^(?:script|textarea)$/i.test(V)){var le=w.indexOf("",D),ue=w.substring(D+1,le);if(/[&<]/.test(ue))return/^script$/i.test(V)?(Y.characters(ue,0,ue.length),le):(ue=ue.replace(/&#?\w+;/g,te),Y.characters(ue,0,ue.length),le)}return D+1}function Le(w,D,V,te){var Y=te[V];return null==Y&&((Y=w.lastIndexOf(""))D?(V.comment(w,D+4,le-D-4),le+3):(te.error("Unclosed comment"),-1):-1;if("CDATA["==w.substr(D+3,6)){var le=w.indexOf("]]>",D+9);return V.startCDATA(),V.characters(w,D+9,le-D-9),V.endCDATA(),le+3}var ue=function rt(w,D){var V,te=[],Y=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(Y.lastIndex=D,Y.exec(w);V=Y.exec(w);)if(te.push(V),V[1])return te}(w,D),xe=ue.length;if(xe>1&&/!doctype/i.test(ue[0][0])){var ie=ue[1][0],de=!1,Q=!1;xe>3&&(/^public$/i.test(ue[2][0])?(de=ue[3][0],Q=xe>4&&ue[4][0]):/^system$/i.test(ue[2][0])&&(Q=ue[3][0]));var ee=ue[xe-1];return V.startDTD(ie,de,Q),V.endDTD(),ee.index+ee[0].length}return-1}function Me(w,D,V){var te=w.indexOf("?>",D);if(te){var Y=w.substring(D,te).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return Y?(V.processingInstruction(Y[1],Y[2]),te+2):-1}return-1}function Ve(){this.attributeNames={}}(Ue.prototype=new Error).name=Ue.name,je.prototype={parse:function(w,D,V){var te=this.domBuilder;te.startDocument(),Ze(D,D={}),function tt(w,D,V,te,Y){function ue(ut){var lt=ut.slice(1,-1);return lt in V?V[lt]:"#"===lt.charAt(0)?function le(ut){return ut>65535?(ut-=65536,String.fromCharCode(55296+(ut>>10),56320+(1023&ut))):String.fromCharCode(ut)}(parseInt(lt.substr(1).replace("x","0x"))):(Y.error("entity not found:"+ut),ut)}function xe(ut){if(ut>qe){var lt=w.substring(qe,ut).replace(/&#?\w+;/g,ue);De&&ie(qe),te.characters(lt,0,ut-qe),qe=ut}}function ie(ut,lt){for(;ut>=Q&&(lt=ee.exec(w));)Q=(de=lt.index)+lt[0].length,De.lineNumber++;De.columnNumber=ut-de+1}for(var de=0,Q=0,ee=/.*(?:\r\n?|\n)|.*$/g,De=te.locator,ze=[{currentNSMap:D}],Ge={},qe=0;;){try{var Fe=w.indexOf("<",qe);if(Fe<0){if(!w.substr(qe).match(/^\s*$/)){var P=te.doc,It=P.createTextNode(w.substr(qe));P.appendChild(It),te.currentElement=It}return}switch(Fe>qe&&xe(Fe),w.charAt(Fe+1)){case"/":var St=w.indexOf(">",Fe+3),K=w.substring(Fe+2,St).replace(/[ \t\n\r]+$/g,""),it=ze.pop();St<0?(K=w.substring(Fe+2).replace(/[\s<].*/,""),Y.error("end tag name: "+K+" is not complete:"+it.tagName),St=Fe+1+K.length):K.match(/\sqe?qe=St:xe(Math.max(Fe,qe)+1)}}(w,D,V,te,this.errorHandler),te.endDocument()}},Ve.prototype={setTagName:function(w){if(!ke.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,D,V){if(!ke.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:D,offset:V}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}},we.XMLReader=je,we.ParseError=Ue},1421:(He,we,j)=>{var B,J="undefined"!=typeof global?global:"undefined"!=typeof window?window:{},_e=j(5893);"undefined"!=typeof document?B=document:(B=J["__GLOBAL_DOCUMENT_CACHE@4"])||(B=J["__GLOBAL_DOCUMENT_CACHE@4"]=_e),He.exports=B},9226:He=>{var we;we="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},He.exports=we},2703:He=>{He.exports=function j(J){if(!J)return!1;var _e=we.call(J);return"[object Function]"===_e||"function"==typeof J&&"[object RegExp]"!==_e||"undefined"!=typeof window&&(J===window.setTimeout||J===window.alert||J===window.confirm||J===window.prompt)};var we=Object.prototype.toString},1234:(He,we)=>{function j(re){if(re&&"object"==typeof re){var Ie=re.which||re.keyCode||re.charCode;Ie&&(re=Ie)}if("number"==typeof re)return ke[re];var Te,Ee=String(re);return(Te=J[Ee.toLowerCase()])?Te:(Te=_e[Ee.toLowerCase()])||(1===Ee.length?Ee.charCodeAt(0):void 0)}j.isEventKey=function(Ie,Ee){if(Ie&&"object"==typeof Ie){var Te=Ie.which||Ie.keyCode||Ie.charCode;if(null==Te)return!1;if("string"==typeof Ee){var pe;if(pe=J[Ee.toLowerCase()])return pe===Te;if(pe=_e[Ee.toLowerCase()])return pe===Te}else if("number"==typeof Ee)return Ee===Te;return!1}};var J=(we=He.exports=j).code=we.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},_e=we.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(B=97;B<123;B++)J[String.fromCharCode(B)]=B-32;for(var B=48;B<58;B++)J[B-48]=B;for(B=1;B<13;B++)J["f"+B]=B+111;for(B=0;B<10;B++)J["numpad "+B]=B+96;var ke=we.names=we.title={};for(B in J)ke[J[B]]=B;for(var ve in _e)J[ve]=_e[ve]},7459:(He,we,j)=>{var J=j(3357).getUint64;He.exports=function(B){var ke=new DataView(B.buffer,B.byteOffset,B.byteLength),ve={version:B[0],flags:new Uint8Array(B.subarray(1,4)),references:[],referenceId:ke.getUint32(4),timescale:ke.getUint32(8)},re=12;0===ve.version?(ve.earliestPresentationTime=ke.getUint32(re),ve.firstOffset=ke.getUint32(re+4),re+=8):(ve.earliestPresentationTime=J(B.subarray(re)),ve.firstOffset=J(B.subarray(re+8)),re+=16);var Ie=ke.getUint16(re+=2);for(re+=2;Ie>0;re+=12,Ie--)ve.references.push({referenceType:(128&B[re])>>>7,referencedSize:2147483647&ke.getUint32(re),subsegmentDuration:ke.getUint32(re+4),startsWithSap:!!(128&B[re+8]),sapType:(112&B[re+8])>>>4,sapDeltaTime:268435455&ke.getUint32(re+8)});return ve}},6277:He=>{var j,J,_e,B,ke,ve,re;ke=function(Ie,Ee){return j(B(Ie,Ee))},ve=function(Ie,Ee){return J(_e(Ie),Ee)},re=function(Ie,Ee,Te){return _e(Te?Ie:Ie-Ee)},He.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:j=function(Ie){return 9e4*Ie},secondsToAudioTs:J=function(Ie,Ee){return Ie*Ee},videoTsToSeconds:_e=function(Ie){return Ie/9e4},audioTsToSeconds:B=function(Ie,Ee){return Ie/Ee},audioTsToVideoTs:ke,videoTsToAudioTs:ve,metadataTsToSeconds:re}},3357:He=>{var we=Math.pow(2,32);He.exports={getUint64:function(J){var B,_e=new DataView(J.buffer,J.byteOffset,J.byteLength);return _e.getBigUint64?(B=_e.getBigUint64(0)){He.exports=function we(j,J){var _e,B=null;try{_e=JSON.parse(j,J)}catch(ke){B=ke}return[B,_e]}},3871:function(He){var j,J,_e,B,ke;j=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,J=/^(?=([^\/?#]*))\1([^]*)$/,_e=/(?:\/|^)\.(?=\/)/g,B=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,He.exports=ke={buildAbsoluteURL:function(ve,re,Ie){if(Ie=Ie||{},ve=ve.trim(),!(re=re.trim())){if(!Ie.alwaysNormalize)return ve;var Ee=ke.parseURL(ve);if(!Ee)throw new Error("Error trying to parse base URL.");return Ee.path=ke.normalizePath(Ee.path),ke.buildURLFromParts(Ee)}var Te=ke.parseURL(re);if(!Te)throw new Error("Error trying to parse relative URL.");if(Te.scheme)return Ie.alwaysNormalize?(Te.path=ke.normalizePath(Te.path),ke.buildURLFromParts(Te)):re;var pe=ke.parseURL(ve);if(!pe)throw new Error("Error trying to parse base URL.");if(!pe.netLoc&&pe.path&&"/"!==pe.path[0]){var u=J.exec(pe.path);pe.netLoc=u[1],pe.path=u[2]}pe.netLoc&&!pe.path&&(pe.path="/");var se={scheme:pe.scheme,netLoc:Te.netLoc,path:null,params:Te.params,query:Te.query,fragment:Te.fragment};if(!Te.netLoc&&(se.netLoc=pe.netLoc,"/"!==Te.path[0]))if(Te.path){var Ue=pe.path,je=Ue.substring(0,Ue.lastIndexOf("/")+1)+Te.path;se.path=ke.normalizePath(je)}else se.path=pe.path,Te.params||(se.params=pe.params,Te.query||(se.query=pe.query));return null===se.path&&(se.path=Ie.alwaysNormalize?ke.normalizePath(Te.path):Te.path),ke.buildURLFromParts(se)},parseURL:function(ve){var re=j.exec(ve);return re?{scheme:re[1]||"",netLoc:re[2]||"",path:re[3]||"",params:re[4]||"",query:re[5]||"",fragment:re[6]||""}:null},normalizePath:function(ve){for(ve=ve.split("").reverse().join("").replace(_e,"");ve.length!==(ve=ve.replace(B,"")).length;);return ve.split("").reverse().join("")},buildURLFromParts:function(ve){return ve.scheme+ve.netLoc+ve.path+ve.params+ve.query+ve.fragment}}},3629:(He,we,j)=>{var J=j(9226),_e=He.exports={WebVTT:j(8318),VTTCue:j(5713),VTTRegion:j(3872)};J.vttjs=_e,J.WebVTT=_e.WebVTT;var B=_e.VTTCue,ke=_e.VTTRegion,ve=J.VTTCue,re=J.VTTRegion;_e.shim=function(){J.VTTCue=B,J.VTTRegion=ke},_e.restore=function(){J.VTTCue=ve,J.VTTRegion=re},J.VTTCue||_e.shim()},8318:(He,we,j)=>{var J=j(1421),_e=Object.create||function(){function w(){}return function(D){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return w.prototype=D,new w}}();function B(w,D){this.name="ParsingError",this.code=w.code,this.message=D||w.message}function ke(w){function D(te,Y,le,ue){return 3600*(0|te)+60*(0|Y)+(0|le)+(0|ue)/1e3}var V=w.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return V?V[3]?D(V[1],V[2],V[3].replace(":",""),V[4]):V[1]>59?D(V[1],V[2],0,V[4]):D(0,V[1],V[2],V[4]):null}function ve(){this.values=_e(null)}function re(w,D,V,te){var Y=te?w.split(te):[w];for(var le in Y)if("string"==typeof Y[le]){var ue=Y[le].split(V);2===ue.length&&D(ue[0],ue[1])}}function Ie(w,D,V){var te=w;function Y(){var xe=ke(w);if(null===xe)throw new B(B.Errors.BadTimeStamp,"Malformed timestamp: "+te);return w=w.replace(/^[^\sa-zA-Z-]+/,""),xe}function ue(){w=w.replace(/^\s+/,"")}if(ue(),D.startTime=Y(),ue(),"--\x3e"!==w.substr(0,3))throw new B(B.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+te);w=w.substr(3),ue(),D.endTime=Y(),ue(),function le(xe,ie){var de=new ve;re(xe,function(Q,ee){switch(Q){case"region":for(var De=V.length-1;De>=0;De--)if(V[De].id===ee){de.set(Q,V[De].region);break}break;case"vertical":de.alt(Q,ee,["rl","lr"]);break;case"line":var ze=ee.split(","),Ge=ze[0];de.integer(Q,Ge),de.percent(Q,Ge)&&de.set("snapToLines",!1),de.alt(Q,Ge,["auto"]),2===ze.length&&de.alt("lineAlign",ze[1],["start","center","end"]);break;case"position":ze=ee.split(","),de.percent(Q,ze[0]),2===ze.length&&de.alt("positionAlign",ze[1],["start","center","end"]);break;case"size":de.percent(Q,ee);break;case"align":de.alt(Q,ee,["start","center","end","left","right"])}},/:/,/\s/),ie.region=de.get("region",null),ie.vertical=de.get("vertical","");try{ie.line=de.get("line","auto")}catch(Q){}ie.lineAlign=de.get("lineAlign","start"),ie.snapToLines=de.get("snapToLines",!0),ie.size=de.get("size",100);try{ie.align=de.get("align","center")}catch(Q){ie.align=de.get("align","middle")}try{ie.position=de.get("position","auto")}catch(Q){ie.position=de.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},ie.align)}ie.positionAlign=de.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},ie.align)}(w,D)}(B.prototype=_e(Error.prototype)).constructor=B,B.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},ve.prototype={set:function(w,D){!this.get(w)&&""!==D&&(this.values[w]=D)},get:function(w,D,V){return V?this.has(w)?this.values[w]:D[V]:this.has(w)?this.values[w]:D},has:function(w){return w in this.values},alt:function(w,D,V){for(var te=0;te=0&&D<=100))&&(this.set(w,D),!0)}};var Ee=J.createElement&&J.createElement("textarea"),Te={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},pe={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},u={v:"title",lang:"lang"},se={rt:"ruby"};function Ue(w,D){function V(){if(!D)return null;var qe=D.match(/^([^<]*)(<[^>]*>?)?/);return function Ge(Fe){return D=D.substr(Fe.length),Fe}(qe[1]?qe[1]:qe[2])}function te(Ge){return Ee.innerHTML=Ge,Ge=Ee.textContent,Ee.textContent="",Ge}function le(Ge,qe){var Fe=Te[Ge];if(!Fe)return null;var P=w.document.createElement(Fe),It=u[Ge];return It&&qe&&(P[It]=qe.trim()),P}for(var ie,ue=w.document.createElement("div"),xe=ue,de=[];null!==(ie=V());)if("<"!==ie[0])xe.appendChild(w.document.createTextNode(te(ie)));else{if("/"===ie[1]){de.length&&de[de.length-1]===ie.substr(2).replace(">","")&&(de.pop(),xe=xe.parentNode);continue}var ee,Q=ke(ie.substr(1,ie.length-2));if(Q){ee=w.document.createProcessingInstruction("timestamp",Q),xe.appendChild(ee);continue}var De=ie.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!De||!(ee=le(De[1],De[3]))||se[(qe=ee).localName]&&se[qe.localName]!==xe.localName)continue;if(De[2]){var ze=De[2].split(".");ze.forEach(function(Ge){var qe=/^bg_/.test(Ge),Fe=qe?Ge.slice(3):Ge;pe.hasOwnProperty(Fe)&&(ee.style[qe?"background-color":"color"]=pe[Fe])}),ee.className=ze.join(" ")}de.push(De[1]),xe.appendChild(ee),xe=ee}var qe;return ue}var je=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function tt(w){for(var D=0;D=V[0]&&w<=V[1])return!0}return!1}function vt(w){var D=[],V="";if(!w||!w.childNodes)return"ltr";function Y(xe,ie){for(var de=ie.childNodes.length-1;de>=0;de--)xe.push(ie.childNodes[de])}function le(xe){if(!xe||!xe.length)return null;var ie=xe.pop(),de=ie.textContent||ie.innerText;if(de){var Q=de.match(/^.*(\n|\r)/);return Q?(xe.length=0,Q[0]):de}return"ruby"===ie.tagName?le(xe):ie.childNodes?(Y(xe,ie),le(xe)):void 0}for(Y(D,w);V=le(D);)for(var ue=0;ue=0&&w.line<=100))return w.line;if(!w.track||!w.track.textTrackList||!w.track.textTrackList.mediaElement)return-1;for(var D=w.track,V=D.textTrackList,te=0,Y=0;YDe&&(ee=ee<0?-1:1,ee*=Math.ceil(De/Q)*Q),xe<0&&(ee+=""===ue.vertical?V.height:V.width,ie=ie.reverse()),le.move(ze,ee)}else{var Ge=le.lineHeight/V.height*100;switch(ue.lineAlign){case"center":xe-=Ge/2;break;case"end":xe-=Ge}switch(ue.vertical){case"":D.applyStyles({top:D.formatStyle(xe,"%")});break;case"rl":D.applyStyles({left:D.formatStyle(xe,"%")});break;case"lr":D.applyStyles({right:D.formatStyle(xe,"%")})}ie=["+y","-x","+x","-y"],le=new Le(D)}var qe=function Y(Fe,P){for(var It,K=new Le(Fe),it=1,Jt=0;JtNe&&(It=new Le(Fe),it=Ne),Fe=new Le(K)}return It||K}(le,ie);D.move(qe.toCSSCompatValues(V))}function Ce(){}Oe.prototype.applyStyles=function(w,D){for(var V in D=D||this.div,w)w.hasOwnProperty(V)&&(D.style[V]=w[V])},Oe.prototype.formatStyle=function(w,D){return 0===w?0:w+D},(me.prototype=_e(Oe.prototype)).constructor=me,Le.prototype.move=function(w,D){switch(D=void 0!==D?D:this.lineHeight,w){case"+x":this.left+=D,this.right+=D;break;case"-x":this.left-=D,this.right-=D;break;case"+y":this.top+=D,this.bottom+=D;break;case"-y":this.top-=D,this.bottom-=D}},Le.prototype.overlaps=function(w){return this.leftw.left&&this.topw.top},Le.prototype.overlapsAny=function(w){for(var D=0;D=w.top&&this.bottom<=w.bottom&&this.left>=w.left&&this.right<=w.right},Le.prototype.overlapsOppositeAxis=function(w,D){switch(D){case"+x":return this.leftw.right;case"+y":return this.topw.bottom}},Le.prototype.intersectPercentage=function(w){return Math.max(0,Math.min(this.right,w.right)-Math.max(this.left,w.left))*Math.max(0,Math.min(this.bottom,w.bottom)-Math.max(this.top,w.top))/(this.height*this.width)},Le.prototype.toCSSCompatValues=function(w){return{top:this.top-w.top,bottom:w.bottom-this.bottom,left:this.left-w.left,right:w.right-this.right,height:this.height,width:this.width}},Le.getSimpleBoxPosition=function(w){var D=w.div?w.div.offsetHeight:w.tagName?w.offsetHeight:0,V=w.div?w.div.offsetWidth:w.tagName?w.offsetWidth:0,te=w.div?w.div.offsetTop:w.tagName?w.offsetTop:0;return{left:(w=w.div?w.div.getBoundingClientRect():w.tagName?w.getBoundingClientRect():w).left,right:w.right,top:w.top||te,height:w.height||D,bottom:w.bottom||te+(w.height||D),width:w.width||V}},Ce.StringDecoder=function(){return{decode:function(w){if(!w)return"";if("string"!=typeof w)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(w))}}},Ce.convertCueToDOMTree=function(w,D){return w&&D?Ue(w,D):null},Ce.processCues=function(w,D,V){if(!w||!D||!V)return null;for(;V.firstChild;)V.removeChild(V.firstChild);var te=w.document.createElement("div");if(te.style.position="absolute",te.style.left="0",te.style.right="0",te.style.top="0",te.style.bottom="0",te.style.margin="1.5%",V.appendChild(te),function Y(Q){for(var ee=0;ee{var j={"":1,lr:1,rl:1},J={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function B(ve){return"string"==typeof ve&&!!J[ve.toLowerCase()]&&ve.toLowerCase()}function ke(ve,re,Ie){this.hasBeenReset=!1;var Ee="",Te=!1,pe=ve,u=re,se=Ie,Ue=null,je="",tt=!0,vt="auto",oe="start",Oe="auto",me="auto",Le=100,Ze="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return Ee},set:function(Ce){Ee=""+Ce}},pauseOnExit:{enumerable:!0,get:function(){return Te},set:function(Ce){Te=!!Ce}},startTime:{enumerable:!0,get:function(){return pe},set:function(Ce){if("number"!=typeof Ce)throw new TypeError("Start time must be set to a number.");pe=Ce,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(Ce){if("number"!=typeof Ce)throw new TypeError("End time must be set to a number.");u=Ce,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return se},set:function(Ce){se=""+Ce,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return Ue},set:function(Ce){Ue=Ce,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return je},set:function(Ce){var Me=function _e(ve){return"string"==typeof ve&&!!j[ve.toLowerCase()]&&ve.toLowerCase()}(Ce);if(!1===Me)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");je=Me,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return tt},set:function(Ce){tt=!!Ce,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return vt},set:function(Ce){if("number"!=typeof Ce&&"auto"!==Ce)throw new SyntaxError("Line: an invalid number or illegal string was specified.");vt=Ce,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return oe},set:function(Ce){var Me=B(Ce);Me?(oe=Me,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return Oe},set:function(Ce){if(Ce<0||Ce>100)throw new Error("Position must be between 0 and 100.");Oe=Ce,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return me},set:function(Ce){var Me=B(Ce);Me?(me=Me,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return Le},set:function(Ce){if(Ce<0||Ce>100)throw new Error("Size must be between 0 and 100.");Le=Ce,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return Ze},set:function(Ce){var Me=B(Ce);if(!Me)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");Ze=Me,this.hasBeenReset=!0}}}),this.displayState=void 0}ke.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},He.exports=ke},3872:He=>{var we={"":!0,up:!0};function J(B){return"number"==typeof B&&B>=0&&B<=100}He.exports=function _e(){var B=100,ke=3,ve=0,re=100,Ie=0,Ee=100,Te="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return B},set:function(pe){if(!J(pe))throw new Error("Width must be between 0 and 100.");B=pe}},lines:{enumerable:!0,get:function(){return ke},set:function(pe){if("number"!=typeof pe)throw new TypeError("Lines must be set to a number.");ke=pe}},regionAnchorY:{enumerable:!0,get:function(){return re},set:function(pe){if(!J(pe))throw new Error("RegionAnchorX must be between 0 and 100.");re=pe}},regionAnchorX:{enumerable:!0,get:function(){return ve},set:function(pe){if(!J(pe))throw new Error("RegionAnchorY must be between 0 and 100.");ve=pe}},viewportAnchorY:{enumerable:!0,get:function(){return Ee},set:function(pe){if(!J(pe))throw new Error("ViewportAnchorY must be between 0 and 100.");Ee=pe}},viewportAnchorX:{enumerable:!0,get:function(){return Ie},set:function(pe){if(!J(pe))throw new Error("ViewportAnchorX must be between 0 and 100.");Ie=pe}},scroll:{enumerable:!0,get:function(){return Te},set:function(pe){var u=function j(B){return"string"==typeof B&&!!we[B.toLowerCase()]&&B.toLowerCase()}(pe);!1===u?console.warn("Scroll: an invalid or illegal string was specified."):Te=u}}})}},7154:He=>{function we(){return He.exports=we=Object.assign||function(j){for(var J=1;J{}}]); \ No newline at end of file +(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[330],{2330:(He,we,j)=>{"use strict";j.r(we),j.d(we,{BerkasModule:()=>l_});var J=j(9808),_e=j(8406),B=j(3075),ke=j(9345),ve=j(1385),re=j(6271),Ie=j(4249),Ee=j(210),Te=j(6436),pe=j(8613),u=j(5e3);let se=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[[J.ez]]}),s})();var Ue=j(8764),je=j(4167),tt=j(7355),vt=j(2777),oe=j(5861),Oe=j(520),me=j(8505),Le=j(7272),Ze=j(5934),Ce=j(8696),Me=j(3e3),Ve=j(7845),rt=j(8745),w=j(8987),D=j(6382),V=j(4137),te=j(4327),Y=j(6925),le=j(9731);let ue=(()=>{class s{constructor(t,r){this.api=t,this.gs=r}downloadLampiran(t){return this.api.getData(`/attachment/${t}`,{responseType:"blob",observe:"events",reportProgress:!0,headers:{"ngsw-bypass":"true"}})}getListDdl(t){return this.api.getData(`/attachment/${t}?ngsw-bypass=true`)}downloadDdlProxy(t){return this.api.getData(`/ddl-part/${t}`,{responseType:"blob",observe:"events",reportProgress:!0,headers:{"ngsw-bypass":"true"}})}downloadDdlDirect(t){return this.api.getData(t,{responseType:"blob",observe:"events",reportProgress:!0,headers:{"ngsw-bypass":"true"}})}}return s.\u0275fac=function(t){return new(t||s)(u.LFG(le.s),u.LFG(Ce.U))},s.\u0275prov=u.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})(),xe=(()=>{class s{constructor(t,r,e){this.gs=t,this.toast=r,this.dls=e,this.attachmentsDownload={}}getAttachmentDownloadFile(t){return this.attachmentsDownload[t.id]||(this.attachmentsDownload[t.id]={},this.attachmentsDownload[t.id].name=t.name,this.attachmentsDownload[t.id].size=t.size,this.attachmentsDownload[t.id].ext=t.ext,this.attachmentsDownload[t.id].download_count=t.download_count,this.attachmentsDownload[t.id].google_drive=t.google_drive,this.attachmentsDownload[t.id].discord=t.discord,this.attachmentsDownload[t.id].mode="indeterminate",this.attachmentsDownload[t.id].isDownloading=!1,this.attachmentsDownload[t.id].isCompleted=!1,this.attachmentsDownload[t.id].data=null,this.attachmentsDownload[t.id].handler=null,this.attachmentsDownload[t.id].toast=null,this.attachmentsDownload[t.id].totals=0,this.attachmentsDownload[t.id].percentage=0,this.attachmentsDownload[t.id].speed=0,this.attachmentsDownload[t.id].loaded=0),this.attachmentsDownload[t.id]}stopFail(t){t.isDownloading=!1,t.isCompleted=!1,t.toast&&this.toast.remove(t.toast.toastId)}onProgress(t,r){if(r.loaded){this.gs.log("[DOWNLOAD_PROGRESS]",r),t.mode="determinate";const e=r.loaded-t.loaded;t.totals+=e,t.speed=e/1e3,t.percentage=Math.round(t.totals/t.size*100),t.loaded=r.loaded,t.toast.toastRef.componentInstance.message=`${t.percentage}% @ ${t.speed} KB/s`}}startDownload(t,r=!0){var e=this;const i=this.attachmentsDownload[t];var a;i.toast=this.toast.warning(`${i.percentage}% @ ${i.speed} KB/s`,"Mengunduh ...",{closeButton:!1,timeOut:0,disableTimeOut:"extendedTimeOut",tapToDismiss:!1}),i.isCompleted?this.saveFileAs(t):(i.isDownloading=!0,i.discord?this.dls.getListDdl(t).subscribe({next:(a=(0,oe.Z)(function*(o){e.gs.log("[DOWNLOAD_LIST_DDL]",o);const l=o.results.sort((v,g)=>v.chunk_idx-g.chunk_idx),d=[];for(const v of l){let g=null;g=r?e.dls.downloadDdlDirect(v.url):e.dls.downloadDdlProxy(v.id),d.push(g)}const f=[];var v;i.handler=(0,Le.z)(...d).subscribe({next:(v=(0,oe.Z)(function*(g){if(g.type===Oe.dt.DownloadProgress&&e.onProgress(i,g),g.type===Oe.dt.Response){i.loaded=0;const E=yield g.body.arrayBuffer(),x=new Uint8Array(E);e.gs.log("[DOWNLOAD_CHUNK_APPEND]",E.byteLength),f.push(x)}if(g.type===Oe.dt.Response&&f.length===l.length){e.gs.log("[DOWNLOAD_CHUNK_COMPLETED]",f);const T=new Blob(f);i.mode="determinate",i.isDownloading=!1,i.isCompleted=!0,i.data=T,e.toast.remove(i.toast.toastId),e.saveFileAs(t)}}),function(T){return v.apply(this,arguments)}),error:v=>{e.gs.log("[DOWNLOAD_CHUNK_ERROR]",v),e.stopFail(i)}})}),function(l){return a.apply(this,arguments)}),error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a),this.stopFail(i)}}):i.handler=this.dls.downloadLampiran(t).subscribe({next:a=>{a.type===Oe.dt.DownloadProgress&&this.onProgress(i,a),a.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",a),i.mode="determinate",i.isDownloading=!1,i.isCompleted=!0,i.data=a.body,this.toast.remove(i.toast.toastId),this.saveFileAs(t))},error:a=>{this.gs.log("[DOWNLOAD_ERROR]",a),this.stopFail(i)}}))}cancelDownload(t){const r=this.attachmentsDownload[t];r.mode="indeterminate",r.percentage=0,r.speed=0,r.totals=0,r.loaded=0,r.isDownloading=!1,r.isCompleted=!1,r.handler&&r.handler.unsubscribe(),r.toast&&this.toast.remove(r.toast.toastId)}saveFileAs(t){this.gs.log("[SAVE_FILE]",t);const r=this.attachmentsDownload[t];(0,te.saveAs)(r.data,`${r.name}.${r.ext}`)}}return s.\u0275fac=function(t){return new(t||s)(u.LFG(Ce.U),u.LFG(Y.k),u.LFG(ue))},s.\u0275prov=u.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();var ie=j(8020),de=j(8381),Q=j(8616),ee=j(4623),De=j(7423),ze=j(7238),Ge=j(5245),qe=j(5899),Fe=j(9226),P=j.n(Fe),It=j(1421),K=j.n(It);function it(){return it=Object.assign||function(s){for(var n=1;n-1},n.trigger=function(r){var e=this.listeners[r];if(e)if(2===arguments.length)for(var i=e.length,a=0;a-1;i=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)},n}(Cr),an=String.fromCharCode(9),wr=function(n){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(n||""),r={};return t[1]&&(r.length=parseInt(t[1],10)),t[2]&&(r.offset=parseInt(t[2],10)),r},Gt=function(n){for(var i,t=n.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},e=t.length;e--;)""!==t[e]&&((i=/([^=]*)=(.*)/.exec(t[e]).slice(1))[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),r[i[0]]=i[1]);return r},sn=function(s){function n(){var r;return(r=s.call(this)||this).customParsers=[],r.tagMappers=[],r}X(n,s);var t=n.prototype;return t.push=function(e){var a,o,i=this;if(0!==(e=e.trim()).length){if("#"!==e[0])return void this.trigger("data",{type:"uri",uri:e});this.tagMappers.reduce(function(d,f){var v=f(e);return v===e?d:d.concat([v])},[e]).forEach(function(d){for(var f=0;f0&&(a.duration=S.duration),0===S.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key:function(){if(S.attributes)if("NONE"!==S.attributes.METHOD)if(S.attributes.URI){if("com.apple.streamingkeydelivery"===S.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:S.attributes});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===S.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(S.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===S.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==S.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):S.attributes.KEYID&&"0x"===S.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:S.attributes.KEYFORMAT,keyId:S.attributes.KEYID.substring(2)},pssh:kr(S.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));S.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:S.attributes.METHOD||"AES-128",uri:S.attributes.URI},void 0!==S.attributes.IV&&(l.iv=S.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else l=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(S.number)?this.manifest.mediaSequence=S.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+S.number})},"discontinuity-sequence":function(){isFinite(S.number)?(this.manifest.discontinuitySequence=S.number,T=S.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+S.number})},"playlist-type":function(){/VOD|EVENT/.test(S.playlistType)?this.manifest.playlistType=S.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+S.playlist})},map:function(){o={},S.uri&&(o.uri=S.uri),S.byterange&&(o.byterange=S.byterange),l&&(o.key=l)},"stream-inf":function(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes?(a.attributes||(a.attributes={}),it(a.attributes,S.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||v,S.attributes&&S.attributes.TYPE&&S.attributes["GROUP-ID"]&&S.attributes.NAME){var q=this.manifest.mediaGroups[S.attributes.TYPE];q[S.attributes["GROUP-ID"]]=q[S.attributes["GROUP-ID"]]||{},F=q[S.attributes["GROUP-ID"]],(U={default:/yes/i.test(S.attributes.DEFAULT)}).autoselect=!!U.default||/yes/i.test(S.attributes.AUTOSELECT),S.attributes.LANGUAGE&&(U.language=S.attributes.LANGUAGE),S.attributes.URI&&(U.uri=S.attributes.URI),S.attributes["INSTREAM-ID"]&&(U.instreamId=S.attributes["INSTREAM-ID"]),S.attributes.CHARACTERISTICS&&(U.characteristics=S.attributes.CHARACTERISTICS),S.attributes.FORCED&&(U.forced=/yes/i.test(S.attributes.FORCED)),F[S.attributes.NAME]=U}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){T+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=S.dateTimeString,this.manifest.dateTimeObject=S.dateTimeObject),a.dateTimeString=S.dateTimeString,a.dateTimeObject=S.dateTimeObject},targetduration:function(){!isFinite(S.duration)||S.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+S.duration}):(this.manifest.targetDuration=S.duration,ir.call(this,this.manifest))},start:function(){S.attributes&&!isNaN(S.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:S.attributes["TIME-OFFSET"],precise:S.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=S.data},"cue-out-cont":function(){a.cueOutCont=S.data},"cue-in":function(){a.cueIn=S.data},skip:function(){this.manifest.skip=Ci(S.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",S.attributes,["SKIPPED-SEGMENTS"])},part:function(){var q=this;d=!0;var ne=this.manifest.segments.length,he=Ci(S.attributes);a.parts=a.parts||[],a.parts.push(he),he.byterange&&(he.byterange.hasOwnProperty("offset")||(he.byterange.offset=x),x=he.byterange.offset+he.byterange.length),this.warnOnMissingAttributes_("#EXT-X-PART #"+(a.parts.length-1)+" for segment #"+ne,S.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(ye,ge){ye.hasOwnProperty("lastPart")||q.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+ge+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var q=this.manifest.serverControl=Ci(S.attributes);q.hasOwnProperty("canBlockReload")||(q.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),ir.call(this,this.manifest),q.canSkipDateranges&&!q.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var q=this.manifest.segments.length,ne=Ci(S.attributes),he=ne.type&&"PART"===ne.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(ne),ne.byterange&&(ne.byterange.hasOwnProperty("offset")||(ne.byterange.offset=he?x:0,he&&(x=ne.byterange.offset+ne.byterange.length)));var z=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+z+" for segment #"+q,S.attributes,["TYPE","URI"]),ne.type)for(var ye=0;yer.timeline?1:-1})},cu=function(n){var t=[];return function(n,t,r){t.forEach(function(e){for(var i in n.mediaGroups[e])for(var a in n.mediaGroups[e][i])r(n.mediaGroups[e][i][a])})}(n,lf,function(r,e,i,a){t=t.concat(r.playlists||[])}),t},fu=function(n){var t=n.playlist;t.mediaSequence=n.mediaSequence,t.segments.forEach(function(e,i){e.number=t.mediaSequence+i})},Wn=function(n){return n&&n.uri+"-"+function(n){var t;return t="bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1,n.offset+"-"+t}(n.byterange)},ls=function(n){return su(n.reduce(function(r,e){var a,i=e.attributes.id+(e.attributes.lang||"");r[i]?(e.segments&&(e.segments[0]&&(e.segments[0].discontinuity=!0),(a=r[i].segments).push.apply(a,e.segments)),e.attributes.contentProtection&&(r[i].attributes.contentProtection=e.attributes.contentProtection)):(r[i]=e,r[i].attributes.timelineStarts=[]);return r[i].attributes.timelineStarts.push({start:e.attributes.periodStart,timeline:e.attributes.periodStart}),r},{})).map(function(r){return r.discontinuityStarts=function(n,t){return n.reduce(function(r,e,i){return e.discontinuity&&r.push(i),r},[])}(r.segments||[]),r})},ds=function(n,t){var r=Wn(n.sidx),e=r&&t[r]&&t[r].sidx;return e&&us(n,e,n.sidx.resolvedUri),n},pf=function(n,t){if(void 0===t&&(t={}),!Object.keys(t).length)return n;for(var r in n)n[r]=ds(n[r],t);return n},Tf=function(n){var t,r=n.attributes,e=n.segments,i=n.sidx,a=n.discontinuityStarts,o={attributes:(t={NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuityStarts:a,timelineStarts:r.timelineStarts,segments:e};return r.contentProtection&&(o.contentProtection=r.contentProtection),i&&(o.sidx=i),o},bf=function(n){var t=n.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},xf=function(n){var t=n.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},Sf=function(n){var t=n.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},hu=function(n){return n?Object.keys(n).reduce(function(t,r){return t.concat(n[r].playlists)},[]):[]},Cf=function(n){var t,r=n.dashPlaylists,e=n.locations,i=n.sidxMapping,a=void 0===i?{}:i,o=n.previousManifest;if(!r.length)return{};var l=r[0].attributes,d=l.sourceDuration,f=l.type,v=l.suggestedPresentationDelay,g=l.minimumUpdatePeriod,T=ls(r.filter(bf)).map(Tf),E=ls(r.filter(xf)),x=ls(r.filter(Sf)),S=r.map(function(he){return he.attributes.captionServices}).filter(Boolean),F={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:d,playlists:pf(T,a)};g>=0&&(F.minimumUpdatePeriod=1e3*g),e&&(F.locations=e),"dynamic"===f&&(F.suggestedPresentationDelay=v);var H=E.length?function(n,t,r){void 0===t&&(t={}),void 0===r&&(r=!1);var e,i=n.reduce(function(o,l){var d=l.attributes.role&&l.attributes.role.value||"",f=l.attributes.lang||"",v=l.attributes.label||"main";f&&!l.attributes.label&&(v=l.attributes.lang+(d?" ("+d+")":"")),o[v]||(o[v]={language:f,autoselect:!0,default:"main"===d,playlists:[],uri:""});var T=ds(function(n,t){var r,e=n.attributes,i=n.segments,a=n.sidx,o=n.mediaSequence,l=n.discontinuitySequence,d=n.discontinuityStarts,f={attributes:(r={NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs},r["PROGRAM-ID"]=1,r),uri:"",endList:"static"===e.type,timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:l,discontinuityStarts:d,timelineStarts:e.timelineStarts,mediaSequence:o,segments:i};return e.contentProtection&&(f.contentProtection=e.contentProtection),a&&(f.sidx=a),t&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f}(l,r),t);return o[v].playlists.push(T),void 0===e&&"main"===d&&((e=l).default=!0),o},{});return e||(i[Object.keys(i)[0]].default=!0),i}(E,a,0===F.playlists.length):null,W=x.length?function(n,t){return void 0===t&&(t={}),n.reduce(function(r,e){var i=e.attributes.lang||"text";return r[i]||(r[i]={language:i,default:!1,autoselect:!1,playlists:[],uri:""}),r[i].playlists.push(ds(function(n){var t,r=n.attributes,e=n.segments,i=n.mediaSequence,a=n.discontinuityStarts,o=n.discontinuitySequence;void 0===e&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);var l=((t={NAME:r.id,BANDWIDTH:r.bandwidth})["PROGRAM-ID"]=1,t);return r.codecs&&(l.CODECS=r.codecs),{attributes:l,uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:i,segments:e}}(e),t)),r},{})}(x,a):null,q=T.concat(hu(H),hu(W)),ne=q.map(function(he){return he.timelineStarts});return F.timelineStarts=du(ne),function(n,t){n.forEach(function(r){r.mediaSequence=0,r.discontinuitySequence=ss(t,function(e){return e.timeline===r.timeline}),r.segments&&r.segments.forEach(function(e,i){e.number=i})})}(q,F.timelineStarts),H&&(F.mediaGroups.AUDIO.audio=H),W&&(F.mediaGroups.SUBTITLES.subs=W),S.length&&(F.mediaGroups["CLOSED-CAPTIONS"].cc=function(n){return n.reduce(function(t,r){return r&&r.forEach(function(e){var a=e.language;t[a]={autoselect:!1,default:!1,instreamId:e.channel,language:a},e.hasOwnProperty("aspectRatio")&&(t[a].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(t[a].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(t[a]["3D"]=e["3D"])}),t},{})}(S)),o?function(n){var t=n.oldManifest,r=n.newManifest,e=t.playlists.concat(cu(t)),i=r.playlists.concat(cu(r));return r.timelineStarts=du([t.timelineStarts,r.timelineStarts]),function(n){var t=n.oldPlaylists,e=n.timelineStarts;n.newPlaylists.forEach(function(i){i.discontinuitySequence=ss(e,function(f){return f.timeline===i.timeline});var a=function(n,t){for(var r=0;ra.timeline||a.segments.length&&i.timeline>a.segments[a.segments.length-1].timeline)&&i.discontinuitySequence--);a.segments[l].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),fu({playlist:i,mediaSequence:a.segments[l].number})}})}({oldPlaylists:e,newPlaylists:i,timelineStarts:r.timelineStarts}),r}({oldManifest:o,newManifest:F}):F},kf=function(n,t,r){var o=n.timescale,d=n.periodStart,v=n.minimumUpdatePeriod;return Math.ceil((((n.NOW+n.clientOffset)/1e3+(void 0===v?0:v)-(n.availabilityStartTime+(void 0===d?0:d)))*(void 0===o?1:o)-t)/r)},pu=function(n,t){for(var r=n.type,e=n.minimumUpdatePeriod,i=void 0===e?0:e,a=n.media,o=void 0===a?"":a,l=n.sourceDuration,d=n.timescale,f=void 0===d?1:d,v=n.startNumber,g=void 0===v?1:v,T=n.periodStart,E=[],x=-1,S=0;Sx&&(x=W);var q=void 0;if(H<0){var ne=S+1;q=ne===t.length?"dynamic"===r&&i>0&&o.indexOf("$Number$")>0?kf(n,x,U):(l*f-x)/U:(t[ne].t-x)/U}else q=H+1;for(var he=g+E.length+q,z=g+E.length;z=i)?a:""+new Array(i-a.length+1).join("0")+a}}(t))},Df=function(n,t){var r={RepresentationID:n.id,Bandwidth:n.bandwidth||0},e=n.initialization,i=void 0===e?{sourceURL:"",range:""}:e,a=on({baseUrl:n.baseUrl,source:mu(i.sourceURL,r),range:i.range}),o=function(n,t){return n.duration||t?n.duration?os(n):pu(n,t):[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodStart}]}(n,t);return o.map(function(l){r.Number=l.number,r.Time=l.time;var d=mu(n.media||"",r),g=n.periodStart+(l.time-(n.presentationTimeOffset||0))/(n.timescale||1);return{uri:d,timeline:l.timeline,duration:l.duration,resolvedUri:Ei(n.baseUrl||"",d),map:a,number:l.number,presentationTime:g}})},Lf=function(n,t){var r=n.duration,e=n.segmentUrls,i=void 0===e?[]:e,a=n.periodStart;if(!r&&!t||r&&t)throw new Error("SEGMENT_TIME_UNSPECIFIED");var l,o=i.map(function(f){return function(n,t){var r=n.baseUrl,e=n.initialization,i=void 0===e?{}:e,a=on({baseUrl:r,source:i.sourceURL,range:i.range}),o=on({baseUrl:r,source:t.media,range:t.mediaRange});return o.map=a,o}(n,f)});return r&&(l=os(n)),t&&(l=pu(n,t)),l.map(function(f,v){if(o[v]){var g=o[v],T=n.timescale||1,E=n.presentationTimeOffset||0;return g.timeline=f.timeline,g.duration=f.duration,g.number=f.number,g.presentationTime=a+(f.time-E)/T,g}}).filter(function(f){return f})},Of=function(n){var e,i,t=n.attributes,r=n.segmentInfo;r.template?(i=Df,e=Ft(t,r.template)):r.base?(i=lu,e=Ft(t,r.base)):r.list&&(i=Lf,e=Ft(t,r.list));var a={attributes:t};if(!i)return a;var o=i(e,r.segmentTimeline);if(e.duration){var f=e.timescale;e.duration=e.duration/(void 0===f?1:f)}else e.duration=o.length?o.reduce(function(g,T){return Math.max(g,Math.ceil(T.duration))},0):0;return a.attributes=e,a.segments=o,r.base&&e.indexRange&&(a.sidx=o[0],a.segments=[]),a},_t=function(n,t){return ou(n.childNodes).filter(function(r){return r.tagName===t})},cs=function(n){return n.textContent.trim()},Dr=function(n){var l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(n);if(!l)return 0;var d=l.slice(1),v=d[1],g=d[2],T=d[3],E=d[4],x=d[5];return 31536e3*parseFloat(d[0]||0)+2592e3*parseFloat(v||0)+86400*parseFloat(g||0)+3600*parseFloat(T||0)+60*parseFloat(E||0)+parseFloat(x||0)},gu={mediaPresentationDuration:function(n){return Dr(n)},availabilityStartTime:function(n){return function(n){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(n)&&(n+="Z"),Date.parse(n)}(n)/1e3},minimumUpdatePeriod:function(n){return Dr(n)},suggestedPresentationDelay:function(n){return Dr(n)},type:function(n){return n},timeShiftBufferDepth:function(n){return Dr(n)},start:function(n){return Dr(n)},width:function(n){return parseInt(n,10)},height:function(n){return parseInt(n,10)},bandwidth:function(n){return parseInt(n,10)},startNumber:function(n){return parseInt(n,10)},timescale:function(n){return parseInt(n,10)},presentationTimeOffset:function(n){return parseInt(n,10)},duration:function(n){var t=parseInt(n,10);return isNaN(t)?Dr(n):t},d:function(n){return parseInt(n,10)},t:function(n){return parseInt(n,10)},r:function(n){return parseInt(n,10)},DEFAULT:function(n){return n}},Ot=function(n){return n&&n.attributes?ou(n.attributes).reduce(function(t,r){return t[r.name]=(gu[r.name]||gu.DEFAULT)(r.value),t},{}):{}},Nf={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Gn=function(n,t){return t.length?qn(n.map(function(r){return t.map(function(e){return Ei(r,cs(e))})})):n},fs=function(n){var t=_t(n,"SegmentTemplate")[0],r=_t(n,"SegmentList")[0],e=r&&_t(r,"SegmentURL").map(function(g){return Ft({tag:"SegmentURL"},Ot(g))}),i=_t(n,"SegmentBase")[0],a=r||t,o=a&&_t(a,"SegmentTimeline")[0],l=r||i||t,d=l&&_t(l,"Initialization")[0],f=t&&Ot(t);f&&d?f.initialization=d&&Ot(d):f&&f.initialization&&(f.initialization={sourceURL:f.initialization});var v={template:f,segmentTimeline:o&&_t(o,"S").map(function(g){return Ot(g)}),list:r&&Ft(Ot(r),{segmentUrls:e,initialization:Ot(d)}),base:i&&Ft(Ot(i),{initialization:Ot(d)})};return Object.keys(v).forEach(function(g){v[g]||delete v[g]}),v},jf=function(n,t){return function(r,e){var i=Gn(t,_t(r.node,"BaseURL")),a=Ft(n,{periodStart:r.attributes.start});"number"==typeof r.attributes.duration&&(a.periodDuration=r.attributes.duration);var o=_t(r.node,"AdaptationSet"),l=fs(r.node);return qn(o.map(function(n,t,r){return function(e){var i=Ot(e),a=Gn(t,_t(e,"BaseURL")),o=_t(e,"Role")[0],l={role:Ot(o)},d=Ft(n,i,l),f=_t(e,"Accessibility")[0],v=function(n){return"urn:scte:dash:cc:cea-608:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var i,a;if(a=e,/^CC\d=/.test(e)){var o=e.split("=");i=o[0],a=o[1]}else/^CC\d$/.test(e)&&(i=e);return{channel:i,language:a}}):"urn:scte:dash:cc:cea-708:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var a=e.split("="),l=a[1],d=void 0===l?"":l;i.channel=a[0],i.language=e,d.split(",").forEach(function(f){var v=f.split(":"),g=v[0],T=v[1];"lang"===g?i.language=T:"er"===g?i.easyReader=Number(T):"war"===g?i.aspectRatio=Number(T):"3D"===g&&(i["3D"]=Number(T))})}else i.language=e;return i.channel&&(i.channel="SERVICE"+i.channel),i}):void 0}(Ot(f));v&&(d=Ft(d,{captionServices:v}));var g=_t(e,"Label")[0];if(g&&g.childNodes.length){var T=g.childNodes[0].nodeValue.trim();d=Ft(d,{label:T})}var E=function(n){return n.reduce(function(t,r){var e=Ot(r),i=Nf[e.schemeIdUri];if(i){t[i]={attributes:e};var a=_t(r,"cenc:pssh")[0];if(a){var o=cs(a),l=o&&kr(o);t[i].pssh=l}}return t},{})}(_t(e,"ContentProtection"));Object.keys(E).length&&(d=Ft(d,{contentProtection:E}));var x=fs(e),S=_t(e,"Representation"),F=Ft(r,x);return qn(S.map(function(n,t,r){return function(e){var i=_t(e,"BaseURL"),a=Gn(t,i),o=Ft(n,Ot(e)),l=fs(e);return a.map(function(d){return{segmentInfo:Ft(r,l),attributes:Ft(o,{baseUrl:d})}})}}(d,a,F)))}}(a,i,l)))}},vu=function(n){if(""===n)throw new Error("DASH_EMPTY_MANIFEST");var r,e,t=new Ki.DOMParser;try{e=(r=t.parseFromString(n,"application/xml"))&&"MPD"===r.documentElement.tagName?r.documentElement:null}catch(i){}if(!e||e&&e.getElementsByTagName("parsererror").length>0)throw new Error("DASH_INVALID_XML");return e},zf=j(7459),Kf=j.n(zf),Re=function(n){return n instanceof Uint8Array?n:(!Array.isArray(n)&&!function(n){return function(n){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer}(n)}(n)&&!(n instanceof ArrayBuffer)&&(n="number"!=typeof n||"number"==typeof n&&n!=n?0:[n]),new Uint8Array(n&&n.buffer||n,n&&n.byteOffset||0,n&&n.byteLength||0))},Dt=P().BigInt||Number,hs=[Dt("0x1"),Dt("0x100"),Dt("0x10000"),Dt("0x1000000"),Dt("0x100000000"),Dt("0x10000000000"),Dt("0x1000000000000"),Dt("0x100000000000000"),Dt("0x10000000000000000")],eh=(s=new Uint16Array([65484]),new Uint8Array(s.buffer,s.byteOffset,s.byteLength),function(n,t){var r=void 0===t?{}:t,e=r.signed,i=void 0!==e&&e,a=r.le,o=void 0!==a&&a;n=Re(n);var l=o?"reduce":"reduceRight",f=(n[l]?n[l]:Array.prototype[l]).call(n,function(g,T,E){var x=o?E:Math.abs(E+1-n.length);return g+Dt(T)*hs[x]},Dt(0));if(i){var v=hs[n.length]/Dt(2)-Dt(1);(f=Dt(f))>v&&(f-=v,f-=v,f-=Dt(2))}return Number(f)}),Tu=function(n,t){if("string"!=typeof n&&n&&"function"==typeof n.toString&&(n=n.toString()),"string"!=typeof n)return new Uint8Array;t||(n=unescape(encodeURIComponent(n)));for(var r=new Uint8Array(n.length),e=0;e=t.length&&(t.every?t.every:Array.prototype.every).call(t,function(f,v){return f===(l[v]?l[v]&n[a+v]:n[a+v])})},nh=Re([73,68,51]),un=function s(n,t){return void 0===t&&(t=0),(n=Re(n)).length-t<10||!ht(n,nh,{offset:t})?t:(t+=function(n,t){void 0===t&&(t=0);var e=(n=Re(n))[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9];return(16&n[t+5])>>4?e+20:e+10}(n,t),s(n,t))},ps=(new Uint8Array([79,112,117,115,72,101,97,100]),function(n){return"string"==typeof n?Tu(n):n}),gs=function(n){n=Re(n);for(var t=[],r=0;n.length>r;){var e=n[r],i=0,a=0,o=n[++a];for(a++;128&o;)i=(127&o)<<7,o=n[a],a++;i+=127&o;for(var l=0;l>>0,o=n.subarray(i+4,i+8);if(0===a)break;var l=i+a;if(l>n.length){if(r)break;l=n.length}var d=n.subarray(i+8,l);ht(o,t[0])&&(1===t.length?e.push(d):e.push.apply(e,s(d,t.slice(1),r))),i=l}return e},dt={EBML:Re([26,69,223,163]),DocType:Re([66,130]),Segment:Re([24,83,128,103]),SegmentInfo:Re([21,73,169,102]),Tracks:Re([22,84,174,107]),Track:Re([174]),TrackNumber:Re([215]),DefaultDuration:Re([35,227,131]),TrackEntry:Re([174]),TrackType:Re([131]),FlagDefault:Re([136]),CodecID:Re([134]),CodecPrivate:Re([99,162]),VideoTrack:Re([224]),AudioTrack:Re([225]),Cluster:Re([31,67,182,117]),Timestamp:Re([231]),TimestampScale:Re([42,215,177]),BlockGroup:Re([160]),BlockDuration:Re([155]),Block:Re([161]),SimpleBlock:Re([163])},vs=[128,64,32,16,8,4,2,1],nr=function(n,t,r,e){void 0===r&&(r=!0),void 0===e&&(e=!1);var i=function(n){for(var t=1,r=0;r=t.length)return t.length;var e=nr(t,r,!1);if(ht(n.bytes,e.bytes))return r;var i=nr(t,r+e.length);return s(n,t,r+i.length+i.value+e.length)},pt=function s(n,t){t=function(n){return Array.isArray(n)?n.map(function(t){return bu(t)}):[bu(n)]}(t),n=Re(n);var r=[];if(!t.length)return r;for(var e=0;en.length?n.length:o+a.value);ht(t[0],i.bytes)&&(1===t.length?r.push(d):r=r.concat(s(d,t.slice(1)))),e+=i.length+a.length+d.length}return r},mh=Re([0,0,0,1]),gh=Re([0,0,1]),vh=Re([0,0,3]),_h=function(n){for(var t=[],r=1;r>1&63),-1!==r.indexOf(d)&&(a=i+l),i+=l+("h264"===t?1:2)}else i++}return n.subarray(0,0)},Ut={webm:Re([119,101,98,109]),matroska:Re([109,97,116,114,111,115,107,97]),flac:Re([102,76,97,67]),ogg:Re([79,103,103,83]),ac3:Re([11,119]),riff:Re([82,73,70,70]),avi:Re([65,86,73]),wav:Re([87,65,86,69]),"3gp":Re([102,116,121,112,51,103]),mp4:Re([102,116,121,112]),fmp4:Re([115,116,121,112]),mov:Re([102,116,121,112,113,116]),moov:Re([109,111,111,118]),moof:Re([109,111,111,102])},Lr={aac:function(n){var t=un(n);return ht(n,[255,16],{offset:t,mask:[255,22]})},mp3:function(n){var t=un(n);return ht(n,[255,2],{offset:t,mask:[255,6]})},webm:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,Ut.webm)},mkv:function(n){var t=pt(n,[dt.EBML,dt.DocType])[0];return ht(t,Ut.matroska)},mp4:function(n){return!Lr["3gp"](n)&&!Lr.mov(n)&&(!!(ht(n,Ut.mp4,{offset:4})||ht(n,Ut.fmp4,{offset:4})||ht(n,Ut.moof,{offset:4})||ht(n,Ut.moov,{offset:4}))||void 0)},mov:function(n){return ht(n,Ut.mov,{offset:4})},"3gp":function(n){return ht(n,Ut["3gp"],{offset:4})},ac3:function(n){var t=un(n);return ht(n,Ut.ac3,{offset:t})},ts:function(n){if(n.length<189&&n.length>=1)return 71===n[0];for(var t=0;t+1880?l:0)}if(P().console){var d=P().console[r];!d&&"debug"===r&&(d=P().console.info||P().console.log),d&&a&&o.test(r)&&d[Array.isArray(i)?"apply":"call"](P().console,i)}}}(s,r),r.createLogger=function(e){return ku(s+": "+e)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');n=e}return n},(r.history=function(){return zt?[].concat(zt):[]}).filter=function(e){return(zt||[]).filter(function(i){return new RegExp(".*"+e+".*").test(i[0])})},r.history.clear=function(){zt&&(zt.length=0)},r.history.disable=function(){null!==zt&&(zt.length=0,zt=null)},r.history.enable=function(){null===zt&&(zt=[])},r.error=function(){for(var e=arguments.length,i=new Array(e),a=0;a1?n-1:0),r=1;r=0)throw new Error("class has illegal whitespace characters")}function Mr(){return K()===P().document}function Nr(s){return Ii(s)&&1===s.nodeType}function Fu(){try{return P().parent!==P().self}catch(s){return!0}}function Uu(s){return function(n,t){if(!Mu(n))return K()[s](null);Mu(t)&&(t=K().querySelector(t));var r=Nr(t)?t:K();return r[s]&&r[s](n)}}function $e(s,n,t,r){void 0===s&&(s="div"),void 0===n&&(n={}),void 0===t&&(t={});var e=K().createElement(s);return Object.getOwnPropertyNames(n).forEach(function(i){var a=n[i];-1!==i.indexOf("aria-")||"role"===i||"type"===i?(Ke.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+i+" to "+a+"."),e.setAttribute(i,a)):"textContent"===i?ar(e,a):(e[i]!==a||"tabIndex"===i)&&(e[i]=a)}),Object.getOwnPropertyNames(t).forEach(function(i){e.setAttribute(i,t[i])}),r&&ks(e,r),e}function ar(s,n){return void 0===s.textContent?s.innerText=n:s.textContent=n,s}function Es(s,n){n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s)}function sr(s,n){return Nu(n),s.classList?s.classList.contains(n):function Ph(s){return new RegExp("(^|\\s)"+s+"($|\\s)")}(n).test(s.className)}function Li(s,n){return s.classList?s.classList.add(n):sr(s,n)||(s.className=(s.className+" "+n).trim()),s}function mn(s,n){return s?(s.classList?s.classList.remove(n):(Nu(n),s.className=s.className.split(/\s+/).filter(function(t){return t!==n}).join(" ")),s):(Ke.warn("removeClass was called with an element that doesn't exist"),null)}function Bu(s,n,t){var r=sr(s,n);if("function"==typeof t&&(t=t(s,n)),"boolean"!=typeof t&&(t=!r),t!==r)return t?Li(s,n):mn(s,n),s}function Hu(s,n){Object.getOwnPropertyNames(n).forEach(function(t){var r=n[t];null==r||!1===r?s.removeAttribute(t):s.setAttribute(t,!0===r?"":r)})}function Oi(s){var n={};if(s&&s.attributes&&s.attributes.length>0)for(var r=s.attributes,e=r.length-1;e>=0;e--){var i=r[e].name,a=r[e].value;("boolean"==typeof s[i]||-1!==",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+","))&&(a=null!==a),n[i]=a}return n}function ju(s,n){return s.getAttribute(n)}function Fr(s,n,t){s.setAttribute(n,t)}function Qn(s,n){s.removeAttribute(n)}function Vu(){K().body.focus(),K().onselectstart=function(){return!1}}function qu(){K().onselectstart=function(){return!0}}function Ur(s){if(s&&s.getBoundingClientRect&&s.parentNode){var n=s.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(function(r){void 0!==n[r]&&(t[r]=n[r])}),t.height||(t.height=parseFloat(fn(s,"height"))),t.width||(t.width=parseFloat(fn(s,"width"))),t}}function gn(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};for(var n=s.offsetWidth,t=s.offsetHeight,r=0,e=0;s.offsetParent&&s!==K()[zn.fullscreenElement];)r+=s.offsetLeft,e+=s.offsetTop,s=s.offsetParent;return{left:r,top:e,width:n,height:t}}function Jn(s,n){var t={x:0,y:0};if(Bt)for(var r=s;r&&"html"!==r.nodeName.toLowerCase();){var e=fn(r,"transform");if(/^matrix/.test(e)){var i=e.slice(7,-1).split(/,\s/).map(Number);t.x+=i[4],t.y+=i[5]}else if(/^matrix3d/.test(e)){var a=e.slice(9,-1).split(/,\s/).map(Number);t.x+=a[12],t.y+=a[13]}r=r.parentNode}var o={},l=gn(n.target),d=gn(s),f=d.width,g=n.offsetY-(d.top-l.top),T=n.offsetX-(d.left-l.left);return n.changedTouches&&(T=n.changedTouches[0].pageX-d.left,g=n.changedTouches[0].pageY+d.top,Bt&&(T-=t.x,g-=t.y)),o.y=1-Math.max(0,Math.min(1,g/d.height)),o.x=Math.max(0,Math.min(1,T/f)),o}function Wu(s){return Ii(s)&&3===s.nodeType}function Cs(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function Gu(s){return"function"==typeof s&&(s=s()),(Array.isArray(s)?s:[s]).map(function(n){return"function"==typeof n&&(n=n()),Nr(n)||Wu(n)?n:"string"==typeof n&&/\S/.test(n)?K().createTextNode(n):void 0}).filter(function(n){return n})}function ks(s,n){return Gu(n).forEach(function(t){return s.appendChild(t)}),s}function Zu(s,n){return ks(Cs(s),n)}function vn(s){return void 0===s.button&&void 0===s.buttons||0===s.button&&void 0===s.buttons||"mouseup"===s.type&&0===s.button&&0===s.buttons||!(0!==s.button||1!==s.buttons)}var As,Yi=Uu("querySelector"),zu=Uu("querySelectorAll"),Ku=Object.freeze({__proto__:null,isReal:Mr,isEl:Nr,isInFrame:Fu,createEl:$e,textContent:ar,prependTo:Es,hasClass:sr,addClass:Li,removeClass:mn,toggleClass:Bu,setAttributes:Hu,getAttributes:Oi,getAttribute:ju,setAttribute:Fr,removeAttribute:Qn,blockTextSelection:Vu,unblockTextSelection:qu,getBoundingClientRect:Ur,findPosition:gn,getPointerPosition:Jn,isTextNode:Wu,emptyEl:Cs,normalizeContent:Gu,appendContent:ks,insertContent:Zu,isSingleLeftClick:vn,$:Yi,$$:zu}),$u=!1,Lh=function(){if(!1!==As.options.autoSetup){var n=Array.prototype.slice.call(K().getElementsByTagName("video")),t=Array.prototype.slice.call(K().getElementsByTagName("audio")),r=Array.prototype.slice.call(K().getElementsByTagName("video-js")),e=n.concat(t,r);if(e&&e.length>0)for(var i=0,a=e.length;i-1&&(e={passive:!0}),s.addEventListener(n,r.dispatcher,e)}else s.attachEvent&&s.attachEvent("on"+n,r.dispatcher)}function Rt(s,n,t){if(Ht.has(s)){var r=Ht.get(s);if(r.handlers){if(Array.isArray(n))return Ds(Rt,s,n,t);var e=function(d,f){r.handlers[f]=[],Ju(d,f)};if(void 0===n){for(var i in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},i)&&e(s,i);return}var a=r.handlers[n];if(a){if(!t)return void e(s,n);if(t.guid)for(var o=0;o=t&&(n.apply(void 0,arguments),r=a)}},At=function(){};At.prototype.allowedEvents_={},At.prototype.addEventListener=At.prototype.on=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},$t(this,s,n),this.addEventListener=t},At.prototype.removeEventListener=At.prototype.off=function(s,n){Rt(this,s,n)},At.prototype.one=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},ia(this,s,n),this.addEventListener=t},At.prototype.any=function(s,n){var t=this.addEventListener;this.addEventListener=function(){},el(this,s,n),this.addEventListener=t},At.prototype.dispatchEvent=At.prototype.trigger=function(s){var n=s.type||s;"string"==typeof s&&(s={type:n}),s=ea(s),this.allowedEvents_[n]&&this["on"+n]&&this["on"+n](s),Br(this,s)},At.prototype.queueTrigger=function(s){var n=this;_n||(_n=new Map);var t=s.type||s,r=_n.get(this);r||_n.set(this,r=new Map);var e=r.get(t);r.delete(t),P().clearTimeout(e);var i=P().setTimeout(function(){0===r.size&&(r=null,_n.delete(n)),n.trigger(s)},0);r.set(t,i)};var ra=function(n){return"function"==typeof n.name?n.name():"string"==typeof n.name?n.name:n.name_?n.name_:n.constructor&&n.constructor.name?n.constructor.name:typeof n},Mi=function(n){return n instanceof At||!!n.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof n[t]})},Ps=function(n){return"string"==typeof n&&/\S/.test(n)||Array.isArray(n)&&!!n.length},na=function(n,t,r){if(!n||!n.nodeName&&!Mi(n))throw new Error("Invalid target for "+ra(t)+"#"+r+"; must be a DOM node or evented object.")},tl=function(n,t,r){if(!Ps(n))throw new Error("Invalid event type for "+ra(t)+"#"+r+"; must be a non-empty string or array.")},il=function(n,t,r){if("function"!=typeof n)throw new Error("Invalid listener for "+ra(t)+"#"+r+"; must be a function.")},Ls=function(n,t,r){var i,a,o,e=t.length<3||t[0]===n||t[0]===n.eventBusEl_;return e?(i=n.eventBusEl_,t.length>=3&&t.shift(),a=t[0],o=t[1]):(i=t[0],a=t[1],o=t[2]),na(i,n,r),tl(a,n,r),il(o,n,r),{isTargetingSelf:e,target:i,type:a,listener:o=nt(n,o)}},or=function(n,t,r,e){na(n,n,t),n.nodeName?Fh[t](n,r,e):n[t](r,e)},Hh={on:function(){for(var n=this,t=arguments.length,r=new Array(t),e=0;e=0;r--)this.children_[r].dispose&&this.children_[r].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),this.el_=null),this.player_=null}},n.isDisposed=function(){return Boolean(this.isDisposed_)},n.player=function(){return this.player_},n.options=function(r){return r?(this.options_=ct(this.options_,r),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(r,e,i){return $e(r,e,i)},n.localize=function(r,e,i){void 0===i&&(i=r);var a=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),l=o&&o[a],d=a&&a.split("-")[0],f=o&&o[d],v=i;return l&&l[r]?v=l[r]:f&&f[r]&&(v=f[r]),e&&(v=v.replace(/\{(\d+)\}/g,function(g,T){var E=e[T-1],x=E;return void 0===E&&(x=g),x})),v},n.handleLanguagechange=function(){},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(r){return this.childIndex_[r]},n.getChild=function(r){if(r)return this.childNameIndex_[r]},n.getDescendant=function(){for(var r=arguments.length,e=new Array(r),i=0;i=0;i--)if(this.children_[i]===r){e=!0,this.children_.splice(i,1);break}if(e){r.parentComponent_=null,this.childIndex_[r.id()]=null,this.childNameIndex_[yt(r.name())]=null,this.childNameIndex_[aa(r.name())]=null;var a=r.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(r.el())}}},n.initChildren=function(){var r=this,e=this.options_.children;if(e){var o,i=this.options_,l=s.getComponent("Tech");(o=Array.isArray(e)?e:Object.keys(e)).concat(Object.keys(this.options_).filter(function(d){return!o.some(function(f){return"string"==typeof f?d===f:d===f.name})})).map(function(d){var f,v;return"string"==typeof d?v=e[f=d]||r.options_[f]||{}:(f=d.name,v=d),{name:f,opts:v}}).filter(function(d){var f=s.getComponent(d.opts.componentClass||yt(d.name));return f&&!l.isTech(f)}).forEach(function(f){var v=f.name,g=f.opts;if(void 0!==i[v]&&(g=i[v]),!1!==g){!0===g&&(g={}),g.playerOptions=r.options_.playerOptions;var T=r.addChild(v,g);T&&(r[v]=T)}})}},n.buildCSSClass=function(){return""},n.ready=function(r,e){if(void 0===e&&(e=!1),r){if(!this.isReady_)return this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(r);e?r.call(this):this.setTimeout(r,1)}},n.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var r=this.readyQueue_;this.readyQueue_=[],r&&r.length>0&&r.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},n.$=function(r,e){return Yi(r,e||this.contentEl())},n.$$=function(r,e){return zu(r,e||this.contentEl())},n.hasClass=function(r){return sr(this.el_,r)},n.addClass=function(r){Li(this.el_,r)},n.removeClass=function(r){mn(this.el_,r)},n.toggleClass=function(r,e){Bu(this.el_,r,e)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(r){return ju(this.el_,r)},n.setAttribute=function(r,e){Fr(this.el_,r,e)},n.removeAttribute=function(r){Qn(this.el_,r)},n.width=function(r,e){return this.dimension("width",r,e)},n.height=function(r,e){return this.dimension("height",r,e)},n.dimensions=function(r,e){this.width(r,!0),this.height(e)},n.dimension=function(r,e,i){if(void 0!==e)return(null===e||e!=e)&&(e=0),this.el_.style[r]=-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?e:"auto"===e?"":e+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var a=this.el_.style[r],o=a.indexOf("px");return parseInt(-1!==o?a.slice(0,o):this.el_["offset"+yt(r)],10)},n.currentDimension=function(r){var e=0;if("width"!==r&&"height"!==r)throw new Error("currentDimension only accepts width or height value");if(e=fn(this.el_,r),0===(e=parseFloat(e))||isNaN(e)){var i="offset"+yt(r);e=this.el_[i]}return e},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(r){this.player_&&(Ne().isEventKey(r,"Tab")||r.stopPropagation(),this.player_.handleKeyDown(r))},n.handleKeyPress=function(r){this.handleKeyDown(r)},n.emitTapEvents=function(){var o,r=0,e=null;this.on("touchstart",function(d){1===d.touches.length&&(e={pageX:d.touches[0].pageX,pageY:d.touches[0].pageY},r=P().performance.now(),o=!0)}),this.on("touchmove",function(d){if(d.touches.length>1)o=!1;else if(e){var f=d.touches[0].pageX-e.pageX,v=d.touches[0].pageY-e.pageY;Math.sqrt(f*f+v*v)>10&&(o=!1)}});var l=function(){o=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(d){e=null,!0===o&&P().performance.now()-r<200&&(d.preventDefault(),this.trigger("tap"))})},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,r=nt(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){r(),this.clearInterval(e),e=this.setInterval(r,250)});var i=function(o){r(),this.clearInterval(e)};this.on("touchmove",r),this.on("touchend",i),this.on("touchcancel",i)}},n.setTimeout=function(r,e){var a,i=this;return r=nt(this,r),this.clearTimersOnDispose_(),a=P().setTimeout(function(){i.setTimeoutIds_.has(a)&&i.setTimeoutIds_.delete(a),r()},e),this.setTimeoutIds_.add(a),a},n.clearTimeout=function(r){return this.setTimeoutIds_.has(r)&&(this.setTimeoutIds_.delete(r),P().clearTimeout(r)),r},n.setInterval=function(r,e){r=nt(this,r),this.clearTimersOnDispose_();var i=P().setInterval(r,e);return this.setIntervalIds_.add(i),i},n.clearInterval=function(r){return this.setIntervalIds_.has(r)&&(this.setIntervalIds_.delete(r),P().clearInterval(r)),r},n.requestAnimationFrame=function(r){var i,e=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),r=nt(this,r),i=P().requestAnimationFrame(function(){e.rafIds_.has(i)&&e.rafIds_.delete(i),r()}),this.rafIds_.add(i),i):this.setTimeout(r,1e3/60)},n.requestNamedAnimationFrame=function(r,e){var i=this;if(!this.namedRafs_.has(r)){this.clearTimersOnDispose_(),e=nt(this,e);var a=this.requestAnimationFrame(function(){e(),i.namedRafs_.has(r)&&i.namedRafs_.delete(r)});return this.namedRafs_.set(r,a),r}},n.cancelNamedAnimationFrame=function(r){!this.namedRafs_.has(r)||(this.cancelAnimationFrame(this.namedRafs_.get(r)),this.namedRafs_.delete(r))},n.cancelAnimationFrame=function(r){return this.supportsRaf_?(this.rafIds_.has(r)&&(this.rafIds_.delete(r),P().cancelAnimationFrame(r)),r):this.clearTimeout(r)},n.clearTimersOnDispose_=function(){var r=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var a=e[1];r[e[0]].forEach(function(o,l){return r[a](l)})}),r.clearingTimersOnDispose_=!1}))},s.registerComponent=function(r,e){if("string"!=typeof r||!r)throw new Error('Illegal component name, "'+r+'"; must be a non-empty string.');var i=s.getComponent("Tech"),a=i&&i.isTech(e),o=s===e||s.prototype.isPrototypeOf(e.prototype);if(a||!o)throw new Error('Illegal component, "'+r+'"; '+(a?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");r=yt(r),s.components_||(s.components_={});var d=s.getComponent("Player");if("Player"===r&&d&&d.players){var f=d.players,v=Object.keys(f);if(f&&v.length>0&&v.map(function(g){return f[g]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return s.components_[r]=e,s.components_[aa(r)]=e,e},s.getComponent=function(r){if(r&&s.components_)return s.components_[r]},s}();function nl(s,n,t,r){return function Zh(s,n,t){if("number"!=typeof n||n<0||n>t)throw new Error("Failed to execute '"+s+"' on 'TimeRanges': The index provided ("+n+") is non-numeric or out of bounds (0-"+t+").")}(s,r,t.length-1),t[r][n]}function Ms(s){var n;return n=void 0===s||0===s.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:s.length,start:nl.bind(null,"start",0,s),end:nl.bind(null,"end",1,s)},P().Symbol&&P().Symbol.iterator&&(n[P().Symbol.iterator]=function(){return(s||[]).values()}),n}function ur(s,n){return Array.isArray(s)?Ms(s):void 0===s||void 0===n?Ms():Ms([[s,n]])}function al(s,n){var r,e,t=0;if(!n)return 0;(!s||!s.length)&&(s=ur(0,0));for(var i=0;in&&(e=n),t+=e-r;return t/n}function jt(s){if(s instanceof jt)return s;"number"==typeof s?this.code=s:"string"==typeof s?this.message=s:Ii(s)&&("number"==typeof s.code&&(this.code=s.code),gt(this,s)),this.message||(this.message=jt.defaultMessages[this.code]||"")}$.prototype.supportsRaf_="function"==typeof P().requestAnimationFrame&&"function"==typeof P().cancelAnimationFrame,$.registerComponent("Component",$),jt.prototype.code=0,jt.prototype.message="",jt.prototype.status=null,jt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],jt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Hr=0;Hr=0;i--)if(r[i].enabled){Us(r,r[i]);break}return(e=s.call(this,r)||this).changing_=!1,e}X(n,s);var t=n.prototype;return t.addTrack=function(e){var i=this;e.enabled&&Us(this,e),s.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){i.changing_||(i.changing_=!0,Us(i,e),i.changing_=!1,i.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},t.removeTrack=function(e){s.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},n}(Vr),Bs=function(n,t){for(var r=0;r=0;i--)if(r[i].selected){Bs(r,r[i]);break}return(e=s.call(this,r)||this).changing_=!1,Object.defineProperty(Ae(e),"selectedIndex",{get:function(){for(var o=0;o0&&(P().console&&P().console.groupCollapsed&&P().console.groupCollapsed("Text Track parsing errors for "+t.src),e.forEach(function(i){return Ke.error(i)}),P().console&&P().console.groupEnd&&P().console.groupEnd()),r.flush()},fl=function(n,t){var r={uri:n},e=sa(n);e&&(r.cors=e);var i="use-credentials"===t.tech_.crossOrigin();i&&(r.withCredentials=i),Vi()(r,nt(this,function(a,o,l){if(a)return Ke.error(a,o);t.loaded_=!0,"function"!=typeof P().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],function(d){if("vttjserror"!==d.type)return cl(l,t);Ke.error("vttjs failed to load, stopping trying to process "+t.src)}):cl(l,t)}))},Tn=function(s){function n(r){var e;if(void 0===r&&(r={}),!r.tech)throw new Error("A tech was not provided.");var i=ct(r,{kind:tp[r.kind]||"subtitles",language:r.language||r.srclang||""}),a=ll[i.mode]||"disabled",o=i.default;("metadata"===i.kind||"chapters"===i.kind)&&(a="hidden"),(e=s.call(this,i)||this).tech_=i.tech,e.cues_=[],e.activeCues_=[],e.preload_=!1!==e.tech_.preloadTextTracks;var l=new ul(e.cues_),d=new ul(e.activeCues_),f=!1,v=nt(Ae(e),function(){!this.tech_.isReady_||this.tech_.isDisposed()||(this.activeCues=this.activeCues,f&&(this.trigger("cuechange"),f=!1))});return e.tech_.one("dispose",function(){e.tech_.off("timeupdate",v)}),"disabled"!==a&&e.tech_.on("timeupdate",v),Object.defineProperties(Ae(e),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return a},set:function(E){!ll[E]||a!==E&&(a=E,!this.preload_&&"disabled"!==a&&0===this.cues.length&&fl(this.src,this),this.tech_.off("timeupdate",v),"disabled"!==a&&this.tech_.on("timeupdate",v),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var E=this.tech_.currentTime(),x=[],S=0,F=this.cues.length;S=E||U.startTime===U.endTime&&U.startTime<=E&&U.startTime+.5>=E)&&x.push(U)}if(f=!1,x.length!==this.activeCues_.length)f=!0;else for(var H=0;H0)return void this.trigger("vttjsloaded");var i=K().createElement("script");i.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",i.onload=function(){e.trigger("vttjsloaded")},i.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),P().WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.addWebVttScript_)},t.emulateTextTracks=function(){var e=this,i=this.textTracks(),a=this.remoteTextTracks(),o=function(g){return i.addTrack(g.track)},l=function(g){return i.removeTrack(g.track)};a.on("addtrack",o),a.on("removetrack",l),this.addWebVttScript_();var d=function(){return e.trigger("texttrackchange")},f=function(){d();for(var g=0;g=0;e--){var i=s[e];i[n]&&i[n](r,t)}}(s,t,o,a),o}var cp={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},fp={setCurrentTime:1,setMuted:1,setVolume:1},_l={play:1,pause:1};function Ws(s){return function(n,t){return n===oa?oa:t[s]?t[s](n):n}}function dr(s,n,t,r,e,i){void 0===s&&(s={}),void 0===n&&(n=[]),void 0===e&&(e=[]),void 0===i&&(i=!1);var o=n[0],l=n.slice(1);if("string"==typeof o)dr(s,lr[o],t,r,e,i);else if(o){var d=function mp(s,n){var t=qs[s.id()],r=null;if(null==t)return r=n(s),qs[s.id()]=[[n,r]],r;for(var e=0;e0;this.player_.tech(!0)&&!((pn||hn)&&i)&&this.player_.tech(!0).focus(),this.player_.paused()?vi(this.player_.play()):this.player_.pause()}},n}(la);$.registerComponent("PosterImage",Tp);var ri="#222",bp={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Gs(s,n){var t;if(4===s.length)t=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else{if(7!==s.length)throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");t=s.slice(1)}return"rgba("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+","+n+")"}function Zs(s,n,t){try{s.style[n]=t}catch(r){return}}var xp=function(s){function n(r,e,i){var a;a=s.call(this,r,e,i)||this;var o=function(d){return a.updateDisplay(d)};return r.on("loadstart",function(l){return a.toggleDisplay(l)}),r.on("texttrackchange",o),r.on("loadedmetadata",function(l){return a.preselectTrack(l)}),r.ready(nt(Ae(a),function(){if(r.tech_&&r.tech_.featuresNativeTextTracks)this.hide();else{r.on("fullscreenchange",o),r.on("playerresize",o),P().addEventListener("orientationchange",o),r.on("dispose",function(){return P().removeEventListener("orientationchange",o)});for(var l=this.options_.playerOptions.tracks||[],d=0;d0;return vi(i),void(this.player_.tech(!0)&&(!pn&&!hn||!a)&&this.player_.tech(!0).focus())}var o=this.player_.getChild("controlBar"),l=o&&o.getChild("playToggle");if(l){var d=function(){return l.focus()};yn(i)?i.then(d,function(){}):this.setTimeout(d,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,s.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},n}(li);bl.prototype.controlText_="Play Video",$.registerComponent("BigPlayButton",bl);var Ep=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).controlText(e&&e.controlText||i.localize("Close")),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t.handleKeyDown=function(e){Ne().isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):s.prototype.handleKeyDown.call(this,e)},n}(li);$.registerComponent("CloseButton",Ep);var xl=function(s){function n(r,e){var i;return void 0===e&&(e={}),i=s.call(this,r,e)||this,e.replay=void 0===e.replay||e.replay,i.on(r,"play",function(a){return i.handlePlay(a)}),i.on(r,"pause",function(a){return i.handlePause(a)}),e.replay&&i.on(r,"ended",function(a){return i.handleEnded(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?vi(this.player_.play()):this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){var i=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(a){return i.handleSeeked(a)})},n}(li);xl.prototype.controlText_="Play",$.registerComponent("PlayToggle",xl);var Sl=function(n,t){n=n<0?0:n;var r=Math.floor(n%60),e=Math.floor(n/60%60),i=Math.floor(n/3600),a=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(n)||n===1/0)&&(i=e=r="-"),(i=i>0||o>0?i+":":"")+(e=((i||a>=10)&&e<10?"0"+e:e)+":")+(r<10?"0"+r:r)},zs=Sl;function Gr(s,n){return void 0===n&&(n=s),zs(s,n)}var Zr=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,["timeupdate","ended"],function(a){return i.updateContent(a)}),i.updateTextNode_(),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=this.buildCSSClass(),i=s.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control"}),a=$e("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xa0"},{role:"presentation"});return i.appendChild(a),this.contentEl_=$e("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),i.appendChild(this.contentEl_),i},t.dispose=function(){this.contentEl_=null,this.textNode_=null,s.prototype.dispose.call(this)},t.updateTextNode_=function(e){var i=this;void 0===e&&(e=0),e=Gr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(i.contentEl_){var a=i.textNode_;a&&i.contentEl_.firstChild!==a&&(a=null,Ke.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),i.textNode_=K().createTextNode(i.formattedTime_),i.textNode_&&(a?i.contentEl_.replaceChild(i.textNode_,a):i.contentEl_.appendChild(i.textNode_))}}))},t.updateContent=function(e){},n}($);Zr.prototype.labelText_="Time",Zr.prototype.controlText_="Time",$.registerComponent("TimeDisplay",Zr);var Ks=function(s){function n(){return s.apply(this,arguments)||this}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-current-time"},t.updateContent=function(e){var i;i=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)},n}(Zr);Ks.prototype.labelText_="Current Time",Ks.prototype.controlText_="Current Time",$.registerComponent("CurrentTimeDisplay",Ks);var $s=function(s){function n(r,e){var i,a=function(l){return i.updateContent(l)};return(i=s.call(this,r,e)||this).on(r,"durationchange",a),i.on(r,"loadstart",a),i.on(r,"loadedmetadata",a),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var i=this.player_.duration();this.updateTextNode_(i)},n}(Zr);$s.prototype.labelText_="Duration",$s.prototype.controlText_="Duration",$.registerComponent("DurationDisplay",$s);var Ap=function(s){function n(){return s.apply(this,arguments)||this}return X(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=s.prototype.createEl.call(this,"div"),a=s.prototype.createEl.call(this,"span",{textContent:"/"});return i.appendChild(a),e.appendChild(i),e},n}($);$.registerComponent("TimeDivider",Ap);var Ys=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,"durationchange",function(a){return i.updateContent(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=s.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&e.insertBefore($e("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){var i;"number"==typeof this.player_.duration()&&(i=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(i))},n}(Zr);Ys.prototype.labelText_="Remaining Time",Ys.prototype.controlText_="Remaining Time",$.registerComponent("RemainingTimeDisplay",Ys);var wp=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).updateShowing(),i.on(i.player(),"durationchange",function(a){return i.updateShowing(a)}),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=$e("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild($e("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xa0"})),this.contentEl_.appendChild(K().createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,s.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},n}($);$.registerComponent("LiveDisplay",wp);var El=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&(i.updateLiveEdgeStatusHandler_=function(a){return i.updateLiveEdgeStatus(a)},i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatusHandler_)),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=$e("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,s.prototype.dispose.call(this)},n}(li);El.prototype.controlText_="Seek to live, currently playing live",$.registerComponent("SeekToLive",El);var da=function(n,t,r){return n=Number(n),Math.min(r,Math.max(t,isNaN(n)?t:n))},Xs=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).handleMouseDown_=function(a){return i.handleMouseDown(a)},i.handleMouseUp_=function(a){return i.handleMouseUp(a)},i.handleKeyDown_=function(a){return i.handleKeyDown(a)},i.handleClick_=function(a){return i.handleClick(a)},i.handleMouseMove_=function(a){return i.handleMouseMove(a)},i.update_=function(a){return i.update(a)},i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}X(n,s);var t=n.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(e,i,a){return void 0===i&&(i={}),void 0===a&&(a={}),i.className=i.className+" vjs-slider",i=gt({tabIndex:0},i),a=gt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},a),s.prototype.createEl.call(this,e,i,a)},t.handleMouseDown=function(e){var i=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"===e.type&&!Pi&&e.preventDefault(),Vu(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;qu(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},t.update=function(){var e=this;if(this.el_&&this.bar){var i=this.getProgress();return i===this.progress_||(this.progress_=i,this.requestNamedAnimationFrame("Slider#update",function(){var a=e.vertical()?"height":"width";e.bar.el().style[a]=(100*i).toFixed(2)+"%"})),i}},t.getProgress=function(){return Number(da(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var i=Jn(this.el_,e);return this.vertical()?i.y:i.x},t.handleKeyDown=function(e){Ne().isEventKey(e,"Left")||Ne().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):Ne().isEventKey(e,"Right")||Ne().isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):s.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal")},n}($);$.registerComponent("Slider",Xs);var Qs=function(n,t){return da(n/t*100,0,100).toFixed(2)+"%"},Ip=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).partEls_=[],i.on(r,"progress",function(a){return i.update(a)}),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=$e("span",{className:"vjs-control-text"}),a=$e("span",{textContent:this.localize("Loaded")}),o=K().createTextNode(": ");return this.percentageEl_=$e("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(a),i.appendChild(o),i.appendChild(this.percentageEl_),e},t.dispose=function(){this.partEls_=null,this.percentageEl_=null,s.prototype.dispose.call(this)},t.update=function(e){var i=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var a=i.player_.liveTracker,o=i.player_.buffered(),l=a&&a.isLive()?a.seekableEnd():i.player_.duration(),d=i.player_.bufferedEnd(),f=i.partEls_,v=Qs(d,l);i.percent_!==v&&(i.el_.style.width=v,ar(i.percentageEl_,v),i.percent_=v);for(var g=0;go.length;S--)i.el_.removeChild(f[S-1]);f.length=o.length})},n}($);$.registerComponent("LoadProgressBar",Ip);var Dp=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,i,a){var o=gn(this.el_),l=Ur(this.player_.el()),d=e.width*i;if(l&&o){var f=e.left-l.left+d,v=e.width-d+(l.right-e.right),g=o.width/2;fo.width&&(g=o.width),g=Math.round(g),this.el_.style.right="-"+g+"px",this.write(a)}},t.write=function(e){ar(this.el_,e)},t.updateTime=function(e,i,a,o){var l=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var d,f=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var v=l.player_.liveTracker.liveWindow(),g=v-i*v;d=(g<1?"":"-")+Gr(g,v)}else d=Gr(a,f);l.update(e,i,d),o&&o()})},n}($);$.registerComponent("TimeTooltip",Dp);var Js=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},t.update=function(e,i){var a=this.getChild("timeTooltip");if(a){var o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(e,i,o)}},n}($);Js.prototype.options_={children:[]},!Bt&&!Di&&Js.prototype.options_.children.push("timeTooltip"),$.registerComponent("PlayProgressBar",Js);var Cl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,i){var a=this,o=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,o,function(){a.el_.style.left=e.width*i+"px"})},n}($);Cl.prototype.options_={children:["timeTooltip"]},$.registerComponent("MouseTimeDisplay",Cl);var eo=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).setEventHandlers_(),i}X(n,s);var t=n.prototype;return t.setEventHandlers_=function(){var e=this;this.update_=nt(this,this.update),this.update=Ri(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(i){return e.enableInterval_(i)},this.disableIntervalHandler_=function(i){return e.disableInterval_(i)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in K()&&"visibilityState"in K()&&this.on(K(),"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){"hidden"===K().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||!this.updateInterval||(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(e){var i=this;if("hidden"!==K().visibilityState){var a=s.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var o=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),l=i.player_.liveTracker,d=i.player_.duration();l&&l.isLive()&&(d=i.player_.liveTracker.liveCurrentTime()),i.percent_!==a&&(i.el_.setAttribute("aria-valuenow",(100*a).toFixed(2)),i.percent_=a),(i.currentTime_!==o||i.duration_!==d)&&(i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[Gr(o,d),Gr(d,d)],"{1} of {2}")),i.currentTime_=o,i.duration_=d),i.bar&&i.bar.update(Ur(i.el()),i.getProgress())}),a}},t.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var i,e=this.getCurrentTime_(),a=this.player_.liveTracker;return a&&a.isLive()?(i=(e-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i},t.handleMouseDown=function(e){!vn(e)||(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),s.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e,i){if(void 0===i&&(i=!1),vn(e)){!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var a,o=this.calculateDistance(e),l=this.player_.liveTracker;if(l&&l.isLive()){if(o>=.99)return void l.seekToLiveEdge();var d=l.seekableStart(),f=l.liveCurrentTime();if((a=d+o*l.liveWindow())>=f&&(a=f),a<=d&&(a=d+.1),a===1/0)return}else(a=o*this.player_.duration())===this.player_.duration()&&(a-=.1);this.userSeek_(a)}},t.enable=function(){s.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.show()},t.disable=function(){s.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.hide()},t.handleMouseUp=function(e){s.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?vi(this.player_.play()):this.update_()},t.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},t.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){var i=this.player_.liveTracker;if(Ne().isEventKey(e,"Space")||Ne().isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(Ne().isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(Ne().isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(Ne()(e))){e.preventDefault(),e.stopPropagation();var a=10*(Ne().codes[Ne()(e)]-Ne().codes[0])/100;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else Ne().isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):Ne().isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):s.prototype.handleKeyDown.call(this,e)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in K()&&"visibilityState"in K()&&this.off(K(),"visibilitychange",this.toggleVisibility_),s.prototype.dispose.call(this)},n}(Xs);eo.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},!Bt&&!Di&&eo.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),$.registerComponent("SeekBar",eo);var Al=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).handleMouseMove=Ri(nt(Ae(i),i.handleMouseMove),30),i.throttledHandleMouseSeek=Ri(nt(Ae(i),i.handleMouseSeek),30),i.handleMouseUpHandler_=function(a){return i.handleMouseUp(a)},i.handleMouseDownHandler_=function(a){return i.handleMouseDown(a)},i.enable(),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var i=this.getChild("seekBar");if(i){var a=i.getChild("playProgressBar"),o=i.getChild("mouseTimeDisplay");if(a||o){var l=i.el(),d=gn(l),f=Jn(l,e).x;f=da(f,0,1),o&&o.update(d,f),a&&a.update(d,i.getProgress())}}},t.handleMouseSeek=function(e){var i=this.getChild("seekBar");i&&i.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){if(this.children().forEach(function(i){return i.disable&&i.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&vi(this.player_.play())}},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},t.handleMouseDown=function(e){var i=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},n}($);Al.prototype.options_={children:["seekBar"]},$.registerComponent("ProgressControl",Al);var wl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,["enterpictureinpicture","leavepictureinpicture"],function(a){return i.handlePictureInPictureChange(a)}),i.on(r,["disablepictureinpicturechanged","loadedmetadata"],function(a){return i.handlePictureInPictureEnabledChange(a)}),i.disable(),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+s.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){K().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},n}(li);wl.prototype.controlText_="Picture-in-Picture",$.registerComponent("PictureInPictureToggle",wl);var Il=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,"fullscreenchange",function(a){return i.handleFullscreenChange(a)}),!1===K()[r.fsApi_.fullscreenEnabled]&&i.disable(),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-fullscreen-control "+s.prototype.buildCSSClass.call(this)},t.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},n}(li);Il.prototype.controlText_="Fullscreen",$.registerComponent("FullscreenToggle",Il);var Lp=function(s){function n(){return s.apply(this,arguments)||this}return X(n,s),n.prototype.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(s.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},n}($);$.registerComponent("VolumeLevel",Lp);var Op=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},t.update=function(e,i,a,o){if(!a){var l=Ur(this.el_),d=Ur(this.player_.el()),f=e.width*i;if(!d||!l)return;var v=e.left-d.left+f,g=e.width-f+(d.right-e.right),T=l.width/2;vl.width&&(T=l.width),this.el_.style.right="-"+T+"px"}this.write(o+"%")},t.write=function(e){ar(this.el_,e)},t.updateVolume=function(e,i,a,o,l){var d=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){d.update(e,i,a,o.toFixed(0)),l&&l()})},n}($);$.registerComponent("VolumeLevelTooltip",Op);var Dl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).update=Ri(nt(Ae(i),i.update),30),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,i,a){var o=this,l=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,a,l,function(){a?o.el_.style.bottom=e.height*i+"px":o.el_.style.left=e.width*i+"px"})},n}($);Dl.prototype.options_={children:["volumeLevelTooltip"]},$.registerComponent("MouseVolumeLevelDisplay",Dl);var fa=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on("slideractive",function(a){return i.updateLastVolume_(a)}),i.on(r,"volumechange",function(a){return i.updateARIAAttributes(a)}),r.ready(function(){return i.updateARIAAttributes()}),i}X(n,s);var t=n.prototype;return t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){!vn(e)||s.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){var i=this.getChild("mouseVolumeLevelDisplay");if(i){var a=this.el(),o=Ur(a),l=this.vertical(),d=Jn(a,e);d=da(d=l?d.y:d.x,0,1),i.update(o,d,l)}!vn(e)||(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,i=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(i)})},n}(Xs);fa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},!Bt&&!Di&&fa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),fa.prototype.playerEvent="volumechange",$.registerComponent("VolumeBar",fa);var Pl=function(s){function n(r,e){var i;return void 0===e&&(e={}),e.vertical=e.vertical||!1,(void 0===e.volumeBar||cn(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),function(n,t){t.tech_&&!t.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ae(i=s.call(this,r,e)||this),r),i.throttledHandleMouseMove=Ri(nt(Ae(i),i.handleMouseMove),30),i.handleMouseUpHandler_=function(a){return i.handleMouseUp(a)},i.on("mousedown",function(a){return i.handleMouseDown(a)}),i.on("touchstart",function(a){return i.handleMouseDown(a)}),i.on("mousemove",function(a){return i.handleMouseMove(a)}),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}X(n,s);var t=n.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.handleMouseDown=function(e){var i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)},t.handleMouseUp=function(e){var i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},n}($);Pl.prototype.options_={children:["volumeBar"]},$.registerComponent("VolumeControl",Pl);var Ll=function(s){function n(r,e){var i;return function(n,t){t.tech_&&!t.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(t,"loadstart",function(){t.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")})}(Ae(i=s.call(this,r,e)||this),r),i.on(r,["loadstart","volumechange"],function(a){return i.update(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var i=this.player_.volume(),a=this.player_.lastVolume_();0===i?(this.player_.volume(a<.1?.1:a),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),i=3;Bt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?i=0:e<.33?i=1:e<.67&&(i=2);for(var a=0;a<4;a++)mn(this.el_,"vjs-vol-"+a);Li(this.el_,"vjs-vol-"+i)},t.updateControlText_=function(){var i=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)},n}(li);Ll.prototype.controlText_="Mute",$.registerComponent("MuteToggle",Ll);var Ol=function(s){function n(r,e){var i;return void 0===e&&(e={}),e.inline=void 0===e.inline||e.inline,(void 0===e.volumeControl||cn(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),(i=s.call(this,r,e)||this).handleKeyPressHandler_=function(a){return i.handleKeyPress(a)},i.on(r,["loadstart"],function(a){return i.volumePanelState_(a)}),i.on(i.muteToggle,"keyup",function(a){return i.handleKeyPress(a)}),i.on(i.volumeControl,"keyup",function(a){return i.handleVolumeControlKeyUp(a)}),i.on("keydown",function(a){return i.handleKeyPress(a)}),i.on("mouseover",function(a){return i.handleMouseOver(a)}),i.on("mouseout",function(a){return i.handleMouseOut(a)}),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}X(n,s);var t=n.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},t.dispose=function(){this.handleMouseOut(),s.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){Ne().isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(e){this.addClass("vjs-hover"),$t(K(),"keyup",this.handleKeyPressHandler_)},t.handleMouseOut=function(e){this.removeClass("vjs-hover"),Rt(K(),"keyup",this.handleKeyPressHandler_)},t.handleKeyPress=function(e){Ne().isEventKey(e,"Esc")&&this.handleMouseOut()},n}($);Ol.prototype.options_={children:["muteToggle","volumeControl"]},$.registerComponent("VolumePanel",Ol);var Rl=function(s){function n(r,e){var i;return i=s.call(this,r,e)||this,e&&(i.menuButton_=e.menuButton),i.focusedChild_=-1,i.on("keydown",function(a){return i.handleKeyDown(a)}),i.boundHandleBlur_=function(a){return i.handleBlur(a)},i.boundHandleTapClick_=function(a){return i.handleTapClick(a)},i}X(n,s);var t=n.prototype;return t.addEventListenerForItem=function(e){e instanceof $&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof $&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),s.prototype.removeChild.call(this,e)},t.addItem=function(e){var i=this.addChild(e);i&&this.addEventListenerForItem(i)},t.createEl=function(){this.contentEl_=$e(this.options_.contentElType||"ul",{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=s.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),$t(i,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),i},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,s.prototype.dispose.call(this)},t.handleBlur=function(e){var i=e.relatedTarget||K().activeElement;if(!this.children().some(function(o){return o.el()===i})){var a=this.menuButton_;a&&a.buttonPressed_&&i!==a.el().firstChild&&a.unpressButton()}},t.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var i=this.children();if(!Array.isArray(i))return;var a=i.filter(function(o){return o.el()===e.target})[0];if(!a)return;"CaptionSettingsMenuItem"!==a.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){Ne().isEventKey(e,"Left")||Ne().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(Ne().isEventKey(e,"Right")||Ne().isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())},n}($);$.registerComponent("Menu",Rl);var to=function(s){function n(r,e){var i;void 0===e&&(e={}),(i=s.call(this,r,e)||this).menuButton_=new li(r,e),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var a=li.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+a,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0;var o=function(d){return i.handleClick(d)};return i.handleMenuKeyUp_=function(l){return i.handleMenuKeyUp(l)},i.on(i.menuButton_,"tap",o),i.on(i.menuButton_,"click",o),i.on(i.menuButton_,"keydown",function(l){return i.handleKeyDown(l)}),i.on(i.menuButton_,"mouseenter",function(){i.addClass("vjs-hover"),i.menu.show(),$t(K(),"keyup",i.handleMenuKeyUp_)}),i.on("mouseleave",function(l){return i.handleMouseLeave(l)}),i.on("keydown",function(l){return i.handleSubmenuKeyDown(l)}),i}X(n,s);var t=n.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e=new Rl(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var i=$e("li",{className:"vjs-menu-title",textContent:yt(this.options_.title),tabIndex:-1}),a=new $(this.player_,{el:i});e.addItem(a)}if(this.items=this.createItems(),this.items)for(var o=0;o-1&&"showing"===d.mode){a=!1;break}}a!==this.isSelected_&&this.selected(a)},t.handleSelectedLanguageChange=function(e){for(var i=this.player().textTracks(),a=!0,o=0,l=i.length;o-1&&"showing"===d.mode){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})},n}(xn);$.registerComponent("OffTextTrackMenuItem",Ml);var zr=function(s){function n(r,e){return void 0===e&&(e={}),e.tracks=r.textTracks(),s.call(this,r,e)||this}return X(n,s),n.prototype.createItems=function(e,i){var a;void 0===e&&(e=[]),void 0===i&&(i=xn),this.label_&&(a=this.label_+" off"),e.push(new Ml(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;var o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var l=0;l-1){var f=new i(this.player_,{track:d,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});f.addClass("vjs-"+d.kind+"-menu-item"),e.push(f)}}return e},n}(io);$.registerComponent("TextTrackButton",zr);var Nl=function(s){function n(r,e){var i,a=e.track,o=e.cue,l=r.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=o.text,e.selected=o.startTime<=l&&l=0;i--){var a=e[i];if(a.kind===this.kind_)return a}},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(yt(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),s.prototype.createMenu.call(this)},t.createItems=function(){var e=[];if(!this.track_)return e;var i=this.track_.cues;if(!i)return e;for(var a=0,o=i.length;a-1&&(i.label_="captions"),i.menuButton_.controlText(yt(i.label_)),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildWrapperCSSClass.call(this)},t.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new so(this.player_,{kind:this.label_})),this.hideThreshold_+=1),s.prototype.createItems.call(this,e,Fl)},n}(zr);uo.prototype.kinds_=["captions","subtitles"],uo.prototype.controlText_="Subtitles",$.registerComponent("SubsCapsButton",uo);var Ul=function(s){function n(r,e){var i,a=e.track,o=r.audioTracks();e.label=a.label||a.language||"Unknown",e.selected=a.enabled,(i=s.call(this,r,e)||this).track=a,i.addClass("vjs-"+a.kind+"-menu-item");var l=function(){for(var f=arguments.length,v=new Array(f),g=0;g=0;a--)i.push(new lo(this.player(),{rate:e[a]+"x"}));return i},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(e){var i=this.player().playbackRate(),a=this.playbackRates(),l=(a.indexOf(i)+1)%a.length;this.player().playbackRate(a[l])},t.handlePlaybackRateschange=function(e){this.update()},t.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},n}(to);Hl.prototype.controlText_="Playback Rate",$.registerComponent("PlaybackRateMenuButton",Hl);var jl=function(s){function n(){return s.apply(this,arguments)||this}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(e,i,a){return void 0===e&&(e="div"),void 0===i&&(i={}),void 0===a&&(a={}),i.className||(i.className=this.buildCSSClass()),s.prototype.createEl.call(this,e,i,a)},n}($);$.registerComponent("Spacer",jl);var Np=function(s){function n(){return s.apply(this,arguments)||this}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-custom-control-spacer "+s.prototype.buildCSSClass.call(this)},t.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xa0"})},n}(jl);$.registerComponent("CustomControlSpacer",Np);var ha=function(s){function n(){return s.apply(this,arguments)||this}return X(n,s),n.prototype.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},n}($);ha.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in K()&&ha.prototype.options_.children.splice(ha.prototype.options_.children.length-1,0,"pictureInPictureToggle"),$.registerComponent("ControlBar",ha);var Vl=function(s){function n(r,e){var i;return(i=s.call(this,r,e)||this).on(r,"error",function(a){return i.open(a)}),i}X(n,s);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-error-display "+s.prototype.buildCSSClass.call(this)},t.content=function(){var e=this.player().error();return e?this.localize(e.message):""},n}(jr);Vl.prototype.options_=it({},jr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),$.registerComponent("ErrorDisplay",Vl);var co="vjs-text-track-settings",ql=["#000","Black"],Wl=["#00F","Blue"],Gl=["#0FF","Cyan"],Zl=["#0F0","Green"],zl=["#F0F","Magenta"],Kl=["#F00","Red"],$l=["#FFF","White"],Yl=["#FF0","Yellow"],fo=["1","Opaque"],ho=["0.5","Semi-Transparent"],Xl=["0","Transparent"],cr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ql,$l,Kl,Zl,Wl,Yl,zl,Gl]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[fo,ho,Xl]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[$l,ql,Kl,Zl,Wl,Yl,zl,Gl]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(n){return"1.00"===n?null:Number(n)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[fo,ho]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Xl,ho,fo]}};function Ql(s,n){if(n&&(s=n(s)),s&&"none"!==s)return s}cr.windowColor.options=cr.backgroundColor.options;var Bp=function(s){function n(r,e){var i;return e.temporary=!1,(i=s.call(this,r,e)||this).updateDisplay=i.updateDisplay.bind(Ae(i)),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=$e("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===e.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),Or(cr,function(a){i.on(i.$(a.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}X(n,s);var t=n.prototype;return t.dispose=function(){this.endDialog=null,s.prototype.dispose.call(this)},t.createElSelect_=function(e,i,a){var o=this;void 0===i&&(i=""),void 0===a&&(a="label");var l=cr[e],d=l.id.replace("%s",this.id_),f=[i,d].join(" ").trim();return["<"+a+' id="'+d+'" class="'+("label"===a?"vjs-label":"")+'">',this.localize(l.label),"",'").join("")},t.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['
','',this.localize("Text"),"",this.createElSelect_("color",e),'',this.createElSelect_("textOpacity",e),"","
"].join("")},t.createElBgColor_=function(){var e="captions-background-"+this.id_;return['
','',this.localize("Background"),"",this.createElSelect_("backgroundColor",e),'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")},t.createElWinColor_=function(){var e="captions-window-"+this.id_;return['
','',this.localize("Window"),"",this.createElSelect_("windowColor",e),'',this.createElSelect_("windowOpacity",e),"","
"].join("")},t.createElColors_=function(){return $e("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},t.createElFont_=function(){return $e("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},t.createElControls_=function(){var e=this.localize("restore all settings to the default values");return $e("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},t.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},t.label=function(){return this.localize("Caption Settings Dialog")},t.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},t.buildCSSClass=function(){return s.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},t.getValues=function(){var e=this;return function Ah(s,n,t){return void 0===t&&(t=0),wu(s).reduce(function(r,e){return n(r,s[e],e)},t)}(cr,function(i,a,o){var l=function Fp(s,n){return Ql(s.options[s.options.selectedIndex].value,n)}(e.$(a.selector),a.parser);return void 0!==l&&(i[o]=l),i},{})},t.setValues=function(e){var i=this;Or(cr,function(a,o){!function Up(s,n,t){if(n)for(var r=0;rthis.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(d=!1),d!==this.behindLiveEdge_&&(this.behindLiveEdge_=d,this.trigger("liveedgechange"))}},t.handleDurationchange=function(){this.toggleTracking()},t.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},t.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},t.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},t.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},t.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},t.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},t.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},t.stopTracking=function(){!this.isTracking()||(this.reset_(),this.trigger("liveedgechange"))},t.seekableEnd=function(){for(var e=this.player_.seekable(),i=[],a=e?e.length:0;a--;)i.push(e.end(a));return i.length?i.sort()[i.length-1]:1/0},t.seekableStart=function(){for(var e=this.player_.seekable(),i=[],a=e?e.length:0;a--;)i.push(e.start(a));return i.length?i.sort()[0]:0},t.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},t.isLive=function(){return this.isTracking()},t.atLiveEdge=function(){return!this.behindLiveEdge()},t.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},t.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},t.behindLiveEdge=function(){return this.behindLiveEdge_},t.isTracking=function(){return"number"==typeof this.trackingInterval_},t.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},t.dispose=function(){this.off(K(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),s.prototype.dispose.call(this)},n}($);$.registerComponent("LiveTracker",Vp);var pa,po=function(n){var t=n.el();if(t.hasAttribute("src"))return n.triggerSourceset(t.src),!0;var r=n.$$("source"),e=[],i="";if(!r.length)return!1;for(var a=0;a=2&&l.push("loadeddata"),e.readyState>=3&&l.push("canplay"),e.readyState>=4&&l.push("canplaythrough"),this.ready(function(){l.forEach(function(d){this.trigger(d)},this)})}},t.setScrubbing=function(e){this.isScrubbing_=e},t.scrubbing=function(){return this.isScrubbing_},t.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Xn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){Ke(i,"Video is not ready. (Video.js)")}},t.duration=function(){var e=this;return this.el_.duration===1/0&&Di&&Pi&&0===this.el_.currentTime?(this.on("timeupdate",function a(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",a))}),NaN):this.el_.duration||NaN},t.width=function(){return this.el_.offsetWidth},t.height=function(){return this.el_.offsetHeight},t.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},a=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",a),this.on("dispose",function(){e.off("webkitbeginfullscreen",a),e.off("webkitendfullscreen",i)})}},t.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=P().navigator&&P().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)vi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},t.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},t.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},t.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.reset=function(){n.resetMediaElement(this.el_)},t.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.setControls=function(e){this.el_.controls=!!e},t.addTextTrack=function(e,i,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,a):s.prototype.addTextTrack.call(this,e,i,a)},t.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return s.prototype.createRemoteTextTrack.call(this,e);var i=K().createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i},t.addRemoteTextTrack=function(e,i){var a=s.prototype.addRemoteTextTrack.call(this,e,i);return this.featuresNativeTextTracks&&this.el().appendChild(a),a},t.removeRemoteTextTrack=function(e){if(s.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var i=this.$$("track"),a=i.length;a--;)(e===i[a]||e===i[a].track)&&this.el().removeChild(i[a])},t.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),P().performance&&"function"==typeof P().performance.now?e.creationTime=P().performance.now():P().performance&&P().performance.timing&&"number"==typeof P().performance.timing.navigationStart&&(e.creationTime=P().Date.now()-P().performance.timing.navigationStart),e},n}(at);mo(be,"TEST_VID",function(){if(Mr()){var s=K().createElement("video"),n=K().createElement("track");return n.kind="captions",n.srclang="en",n.label="English",s.appendChild(n),s}}),be.isSupported=function(){try{be.TEST_VID.volume=.5}catch(s){return!1}return!(!be.TEST_VID||!be.TEST_VID.canPlayType)},be.canPlayType=function(s){return be.TEST_VID.canPlayType(s)},be.canPlaySource=function(s,n){return be.canPlayType(s.type)},be.canControlVolume=function(){try{var s=be.TEST_VID.volume;be.TEST_VID.volume=s/2+.1;var n=s!==be.TEST_VID.volume;return n&&Bt?(P().setTimeout(function(){be&&be.prototype&&(be.prototype.featuresVolumeControl=s!==be.TEST_VID.volume)}),!1):n}catch(t){return!1}},be.canMuteVolume=function(){try{var s=be.TEST_VID.muted;return be.TEST_VID.muted=!s,be.TEST_VID.muted?Fr(be.TEST_VID,"muted","muted"):Qn(be.TEST_VID,"muted"),s!==be.TEST_VID.muted}catch(n){return!1}},be.canControlPlaybackRate=function(){if(Di&&Pi&&Ou<58)return!1;try{var s=be.TEST_VID.playbackRate;return be.TEST_VID.playbackRate=s/2+.1,s!==be.TEST_VID.playbackRate}catch(n){return!1}},be.canOverrideAttributes=function(){try{var s=function(){};Object.defineProperty(K().createElement("video"),"src",{get:s,set:s}),Object.defineProperty(K().createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(K().createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(K().createElement("audio"),"innerHTML",{get:s,set:s})}catch(n){return!1}return!0},be.supportsNativeTextTracks=function(){return Xn||Bt&&Pi},be.supportsNativeVideoTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.videoTracks)},be.supportsNativeAudioTracks=function(){return!(!be.TEST_VID||!be.TEST_VID.audioTracks)},be.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(s){var t=s[1];mo(be.prototype,s[0],function(){return be[t]()},!0)}),be.prototype.featuresVolumeControl=be.canControlVolume(),be.prototype.movingMediaElementInDOM=!Bt,be.prototype.featuresFullscreenResize=!0,be.prototype.featuresProgressEvents=!0,be.prototype.featuresTimeupdateEvents=!0,be.patchCanPlayType=function(){Ts>=4&&!Lu&&!Pi&&(pa=be.TEST_VID&&be.TEST_VID.constructor.prototype.canPlayType,be.TEST_VID.constructor.prototype.canPlayType=function(s){return s&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(s)?"maybe":pa.call(this,s)})},be.unpatchCanPlayType=function(){var s=be.TEST_VID.constructor.prototype.canPlayType;return pa&&(be.TEST_VID.constructor.prototype.canPlayType=pa),s},be.patchCanPlayType(),be.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch(n){}}()}},be.resetMediaElement=function(s){if(s){for(var n=s.querySelectorAll("source"),t=n.length;t--;)s.removeChild(n[t]);s.removeAttribute("src"),"function"==typeof s.load&&function(){try{s.load()}catch(r){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){be.prototype["set"+yt(s)]=function(n){this.el_[s]=n,n?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){be.prototype["set"+yt(s)]=function(n){this.el_[s]=n}}),["pause","load","play"].forEach(function(s){be.prototype[s]=function(){return this.el_[s]()}}),at.withSourceHandlers(be),be.nativeSourceHandler={},be.nativeSourceHandler.canPlayType=function(s){try{return be.TEST_VID.canPlayType(s)}catch(n){return""}},be.nativeSourceHandler.canHandleSource=function(s,n){if(s.type)return be.nativeSourceHandler.canPlayType(s.type);if(s.src){var t=Vs(s.src);return be.nativeSourceHandler.canPlayType("video/"+t)}return""},be.nativeSourceHandler.handleSource=function(s,n,t){n.setSrc(s.src)},be.nativeSourceHandler.dispose=function(){},be.registerSourceHandler(be.nativeSourceHandler),at.registerTech("Html5",be);var td=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],go={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},vo=["tiny","xsmall","small","medium","large","xlarge","huge"],ma={};vo.forEach(function(s){var n="x"===s.charAt(0)?"x-"+s.substring(1):s;ma[s]="vjs-layout-"+n});var Kp={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},xt=function(s){function n(r,e,i){var a;if(r.id=r.id||e.id||"vjs_video_"+Xi(),(e=gt(n.getTagSettings(r),e)).initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof r.closest){var o=r.closest("[lang]");o&&o.getAttribute&&(e.language=o.getAttribute("lang"))}else for(var l=r;l&&1===l.nodeType;){if(Oi(l).hasOwnProperty("lang")){e.language=l.getAttribute("lang");break}l=l.parentNode}if((a=s.call(this,null,e,i)||this).boundDocumentFullscreenChange_=function(g){return a.documentFullscreenChange_(g)},a.boundFullWindowOnEscKey_=function(g){return a.fullWindowOnEscKey(g)},a.boundUpdateStyleEl_=function(g){return a.updateStyleEl_(g)},a.boundApplyInitTime_=function(g){return a.applyInitTime_(g)},a.boundUpdateCurrentBreakpoint_=function(g){return a.updateCurrentBreakpoint_(g)},a.boundHandleTechClick_=function(g){return a.handleTechClick_(g)},a.boundHandleTechDoubleClick_=function(g){return a.handleTechDoubleClick_(g)},a.boundHandleTechTouchStart_=function(g){return a.handleTechTouchStart_(g)},a.boundHandleTechTouchMove_=function(g){return a.handleTechTouchMove_(g)},a.boundHandleTechTouchEnd_=function(g){return a.handleTechTouchEnd_(g)},a.boundHandleTechTap_=function(g){return a.handleTechTap_(g)},a.isFullscreen_=!1,a.log=Au(a.id_),a.fsApi_=zn,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=r,a.tagAttributes=r&&Oi(r),a.language(a.options_.language),e.languages){var d={};Object.getOwnPropertyNames(e.languages).forEach(function(g){d[g.toLowerCase()]=e.languages[g]}),a.languages_=d}else a.languages_=n.prototype.options_.languages;a.resetCache_(),a.poster_=e.poster||"",a.controls_=!!e.controls,r.controls=!1,r.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],r.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),e.plugins&&Object.keys(e.plugins).forEach(function(g){if("function"!=typeof a[g])throw new Error('plugin "'+g+'" does not exist')}),a.scrubbing_=!1,a.el_=a.createEl(),Os(Ae(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&($t(K(),a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var f=ct(a.options_);e.plugins&&Object.keys(e.plugins).forEach(function(g){a[g](e.plugins[g])}),e.debug&&a.debug(!0),a.options_.playerOptions=f,a.middleware_=[],a.playbackRates(e.playbackRates),a.initChildren(),a.isAudio("audio"===r.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),Rr&&a.addClass("vjs-touch-enabled"),Bt||a.addClass("vjs-workinghover"),n.players[a.id_]=Ae(a);var v="7.18.1".split(".")[0];return a.addClass("vjs-v"+v),a.userActive(!0),a.reportUserActivity(),a.one("play",function(g){return a.listenForUserActivity_(g)}),a.on("stageclick",function(g){return a.handleStageClick_(g)}),a.on("keydown",function(g){return a.handleKeyDown(g)}),a.on("languagechange",function(g){return a.handleLanguagechange(g)}),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a}X(n,s);var t=n.prototype;return t.dispose=function(){var e=this;this.trigger("dispose"),this.off("dispose"),Rt(K(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Rt(K(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),n.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function pp(s){qs[s.id()]=null}(this),Vt.names.forEach(function(i){var o=e[Vt[i].getterName]();o&&o.off&&o.off()}),s.prototype.dispose.call(this)},t.createEl=function(){var i,e=this.tag,a=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();a?i=this.el_=e.parentNode:o||(i=this.el_=s.prototype.createEl.call(this,"div"));var l=Oi(e);if(o){for(i=this.el_=e,e=this.tag=K().createElement("video");i.children.length;)e.appendChild(i.firstChild);sr(i,"video-js")||Li(i,"video-js"),i.appendChild(e),a=this.playerElIngest_=i,Object.keys(i).forEach(function(E){try{e[E]=i[E]}catch(x){}})}if(e.setAttribute("tabindex","-1"),l.tabindex="-1",(pn||Pi&&Ru)&&(e.setAttribute("role","application"),l.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(E){o&&"class"===E||i.setAttribute(E,l[E]),o&&e.setAttribute(E,l[E])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused"),!0!==P().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Yu("vjs-styles-dimensions");var d=Yi(".vjs-styles-defaults"),f=Yi("head");f.insertBefore(this.styleEl_,d?d.nextSibling:f.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var v=e.getElementsByTagName("a"),g=0;g0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),g=v[1]/v[0];o=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/g:this.videoWidth()||300,l=void 0!==this.height_?this.height_:o*g,f=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(f),Xu(this.styleEl_,"\n ."+f+" {\n width: "+o+"px;\n height: "+l+"px;\n }\n\n ."+f+".vjs-fluid {\n padding-top: "+100*g+"%;\n }\n ")}else{var e="number"==typeof this.width_?this.width_:this.options_.width,i="number"==typeof this.height_?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(e>=0&&(a.width=e),i>=0&&(a.height=i))}},t.loadTech_=function(e,i){var a=this;this.tech_&&this.unloadTech_();var o=yt(e),l=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==o&&this.tag&&(at.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1;var d=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(d=!1);var f={source:i,autoplay:d,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+l+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Vt.names.forEach(function(g){var T=Vt[g];f[T.getterName]=a[T.privateName]}),gt(f,this.options_[o]),gt(f,this.options_[l]),gt(f,this.options_[e.toLowerCase()]),this.tag&&(f.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(f.startTime=this.cache_.currentTime);var v=at.getTech(e);if(!v)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new v(f),this.tech_.ready(nt(this,this.handleTechReady_),!0),function(n,t){n.forEach(function(r){var e=t.addRemoteTextTrack(r).track;!r.src&&r.cues&&r.cues.forEach(function(i){return e.addCue(i)})}),t.textTracks()}(this.textTracksJson_||[],this.tech_),td.forEach(function(g){a.on(a.tech_,g,function(T){return a["handleTech"+yt(g)+"_"](T)})}),Object.keys(go).forEach(function(g){a.on(a.tech_,g,function(T){0===a.tech_.playbackRate()&&a.tech_.seeking()?a.queuedCallbacks_.push({callback:a["handleTech"+go[g]+"_"].bind(a),event:T}):a["handleTech"+go[g]+"_"](T)})}),this.on(this.tech_,"loadstart",function(g){return a.handleTechLoadStart_(g)}),this.on(this.tech_,"sourceset",function(g){return a.handleTechSourceset_(g)}),this.on(this.tech_,"waiting",function(g){return a.handleTechWaiting_(g)}),this.on(this.tech_,"ended",function(g){return a.handleTechEnded_(g)}),this.on(this.tech_,"seeking",function(g){return a.handleTechSeeking_(g)}),this.on(this.tech_,"play",function(g){return a.handleTechPlay_(g)}),this.on(this.tech_,"firstplay",function(g){return a.handleTechFirstPlay_(g)}),this.on(this.tech_,"pause",function(g){return a.handleTechPause_(g)}),this.on(this.tech_,"durationchange",function(g){return a.handleTechDurationChange_(g)}),this.on(this.tech_,"fullscreenchange",function(g,T){return a.handleTechFullscreenChange_(g,T)}),this.on(this.tech_,"fullscreenerror",function(g,T){return a.handleTechFullscreenError_(g,T)}),this.on(this.tech_,"enterpictureinpicture",function(g){return a.handleTechEnterPictureInPicture_(g)}),this.on(this.tech_,"leavepictureinpicture",function(g){return a.handleTechLeavePictureInPicture_(g)}),this.on(this.tech_,"error",function(g){return a.handleTechError_(g)}),this.on(this.tech_,"posterchange",function(g){return a.handleTechPosterChange_(g)}),this.on(this.tech_,"textdata",function(g){return a.handleTechTextData_(g)}),this.on(this.tech_,"ratechange",function(g){return a.handleTechRateChange_(g)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&("Html5"!==o||!this.tag)&&Es(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.unloadTech_=function(){var e=this;Vt.names.forEach(function(i){var a=Vt[i];e[a.privateName]=e[a.getterName]()}),this.textTracksJson_=function(n){var t=n.$$("track"),r=Array.prototype.map.call(t,function(i){return i.track});return Array.prototype.map.call(t,function(i){var a=Ns(i.track);return i.src&&(a.src=i.src),a}).concat(Array.prototype.filter.call(n.textTracks(),function(i){return-1===r.indexOf(i)}).map(Ns))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},t.tech=function(e){return void 0===e&&Ke.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},t.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},t.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},t.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},t.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},t.manualAutoplay_=function(e){var i=this;if(this.tech_&&"string"==typeof e){var o,a=function(){var d=i.muted();i.muted(!0);var f=function(){i.muted(d)};i.playTerminatedQueue_.push(f);var v=i.play();if(yn(v))return v.catch(function(g){throw f(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(g||""))})};if("any"!==e||this.muted()?o="muted"!==e||this.muted()?this.play():a():yn(o=this.play())&&(o=o.catch(a)),yn(o))return o.then(function(){i.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){i.trigger({type:"autoplay-failure",autoplay:e})})}},t.updateSourceCaches_=function(e){void 0===e&&(e="");var i=e,a="";"string"!=typeof i&&(i=e.src,a=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!a&&(a=function(n,t){if(!t)return"";if(n.cache_.source.src===t&&n.cache_.source.type)return n.cache_.source.type;var r=n.cache_.sources.filter(function(o){return o.src===t});if(r.length)return r[0].type;for(var e=n.$$("source"),i=0;i0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},t.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var i=this.currentTime();this.on("timeupdate",function o(){i!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",o))})},t.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},t.handleTechFirstPlay_=function(){this.options_.starttime&&(Ke.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.handleTechClick_=function(e){!this.controls_||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.click||!1!==this.options_.userActions.click)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?vi(this.play()):this.pause())},t.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(a){return a.contains(e.target)})||(void 0===this.options_||void 0===this.options_.userActions||void 0===this.options_.userActions.doubleClick||!1!==this.options_.userActions.doubleClick)&&(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},t.handleTechTap_=function(){this.userActive(!this.userActive())},t.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},t.handleStageClick_=function(){this.reportUserActivity()},t.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.documentFullscreenChange_=function(e){var i=e.target.player;if(!i||i===this){var a=this.el(),o=K()[this.fsApi_.fullscreenElement]===a;!o&&a.matches?o=a.matches(":"+this.fsApi_.fullscreen):!o&&a.msMatchesSelector&&(o=a.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}},t.handleTechFullscreenChange_=function(e,i){var a=this;i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){a.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))},t.handleTechFullscreenError_=function(e,i){this.trigger("fullscreenerror",i)},t.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},t.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},t.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},t.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.getCache=function(){return this.cache_},t.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},t.techCall_=function(e,i){this.ready(function(){if(e in fp)return function dp(s,n,t,r){return n[t](s.reduce(Ws(t),r))}(this.middleware_,this.tech_,e,i);if(e in _l)return vl(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(a){throw Ke(a),a}},!0)},t.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in cp)return function lp(s,n,t){return s.reduceRight(Ws(t),n[t]())}(this.middleware_,this.tech_,e);if(e in _l)return vl(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw void 0===this.tech_[e]?(Ke("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",i),i):"TypeError"===i.name?(Ke("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",i),this.tech_.isReady_=!1,i):(Ke(i),i)}}},t.play=function(){var e=this,i=this.options_.Promise||P().Promise;return i?new i(function(a){e.play_(a)}):this.play_()},t.play_=function(e){var i=this;void 0===e&&(e=vi),this.playCallbacks_.push(e);var a=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!a)return this.waitToPlay_=function(l){i.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!a&&(Xn||Bt)&&this.load());var o=this.techGet_("play");null===o?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(o)},t.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})},t.runPlayCallbacks_=function(e){var i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(a){a(e)})},t.pause=function(){this.techCall_("pause")},t.paused=function(){return!1!==this.techGet_("paused")},t.played=function(){return this.techGet_("played")||ur(0,0)},t.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},t.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},t.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},t.remainingTime=function(){return this.duration()-this.currentTime()},t.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},t.buffered=function(){var e=this.techGet_("buffered");return(!e||!e.length)&&(e=ur(0,0)),e},t.bufferedPercent=function(){return al(this.buffered(),this.duration())},t.bufferedEnd=function(){var e=this.buffered(),i=this.duration(),a=e.end(e.length-1);return a>i&&(a=i),a},t.volume=function(e){var i;return void 0!==e?(i=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=i,this.techCall_("setVolume",i),void(i>0&&this.lastVolume_(i))):(i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i)},t.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},t.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},t.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},t.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.isFullscreen=function(e){if(void 0!==e){var i=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},t.requestFullscreen=function(e){var i=this.options_.Promise||P().Promise;if(i){var a=this;return new i(function(o,l){function d(){a.off("fullscreenerror",v),a.off("fullscreenchange",f)}function f(){d(),o()}function v(T,E){d(),l(E)}a.one("fullscreenchange",f),a.one("fullscreenerror",v);var g=a.requestFullscreenHelper_(e);g&&(g.then(d,d),g.then(o,l))})}return this.requestFullscreenHelper_()},t.requestFullscreenHelper_=function(e){var a,i=this;if(this.fsApi_.prefixed||(a=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(a=e)),this.fsApi_.requestFullscreen){var o=this.el_[this.fsApi_.requestFullscreen](a);return o&&o.then(function(){return i.isFullscreen(!0)},function(){return i.isFullscreen(!1)}),o}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},t.exitFullscreen=function(){var e=this.options_.Promise||P().Promise;if(e){var i=this;return new e(function(a,o){function l(){i.off("fullscreenerror",f),i.off("fullscreenchange",d)}function d(){l(),a()}function f(g,T){l(),o(T)}i.one("fullscreenchange",d),i.one("fullscreenerror",f);var v=i.exitFullscreenHelper_();v&&(v.then(l,l),v.then(a,o))})}return this.exitFullscreenHelper_()},t.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var i=K()[this.fsApi_.exitFullscreen]();return i&&vi(i.then(function(){return e.isFullscreen(!1)})),i}this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},t.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=K().documentElement.style.overflow,$t(K(),"keydown",this.boundFullWindowOnEscKey_),K().documentElement.style.overflow="hidden",Li(K().body,"vjs-full-window"),this.trigger("enterFullWindow")},t.fullWindowOnEscKey=function(e){Ne().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},t.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Rt(K(),"keydown",this.boundFullWindowOnEscKey_),K().documentElement.style.overflow=this.docOrigOverflow,mn(K().body,"vjs-full-window"),this.trigger("exitFullWindow")},t.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},t.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},t.requestPictureInPicture=function(){if("pictureInPictureEnabled"in K()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},t.exitPictureInPicture=function(){if("pictureInPictureEnabled"in K())return K().exitPictureInPicture()},t.handleKeyDown=function(e){var l,d,i=this.options_.userActions;i&&i.hotkeys&&(d=(l=this.el_.ownerDocument.activeElement).tagName.toLowerCase(),l.isContentEditable||("input"===d?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(l.type):-1!==["textarea"].indexOf(d))||("function"==typeof i.hotkeys?i.hotkeys.call(this,e):this.handleHotkeys(e)))},t.handleHotkeys=function(e){var i=this.options_.userActions?this.options_.userActions.hotkeys:{},a=i.fullscreenKey,l=i.muteKey,d=void 0===l?function(x){return Ne().isEventKey(x,"m")}:l,f=i.playPauseKey,v=void 0===f?function(x){return Ne().isEventKey(x,"k")||Ne().isEventKey(x,"Space")}:f;if((void 0===a?function(x){return Ne().isEventKey(x,"f")}:a).call(this,e)){e.preventDefault(),e.stopPropagation();var g=$.getComponent("FullscreenToggle");!1!==K()[this.fsApi_.fullscreenEnabled]&&g.prototype.handleClick.call(this,e)}else d.call(this,e)?(e.preventDefault(),e.stopPropagation(),$.getComponent("MuteToggle").prototype.handleClick.call(this,e)):v.call(this,e)&&(e.preventDefault(),e.stopPropagation(),$.getComponent("PlayToggle").prototype.handleClick.call(this,e))},t.canPlayType=function(e){for(var i,a=0,o=this.options_.techOrder;a1?a.handleSrc_(o.slice(1)):(a.changingSrc_=!1,a.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void a.triggerReady());!function up(s,n){s.forEach(function(t){return t.setTech&&t.setTech(n)})}(v,a.tech_)}),this.options_.retryOnError&&o.length>1){var l=function(){a.error(null),a.handleSrc_(o.slice(1),!0)},d=function(){a.off("error",l)};this.one("error",l),this.one("playing",d),this.resetRetryOnError_=function(){a.off("error",l),a.off("playing",d)}}}else this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},t.src=function(e){return this.handleSrc_(e,!1)},t.src_=function(e){var i=this,a=this.selectSource([e]);return!a||(function(n,t){return yt(n)===yt(t)}(a.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(a.tech,a.source),this.tech_.ready(function(){i.changingSrc_=!1}),!1))},t.load=function(){this.techCall_("load")},t.reset=function(){var e=this,i=this.options_.Promise||P().Promise;this.paused()||!i?this.doReset_():vi(this.play().then(function(){return e.doReset_()}))},t.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Mi(this)&&this.trigger("playerreset")},t.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},t.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,i=e.durationDisplay,a=e.remainingTimeDisplay;i&&i.updateContent(),a&&a.updateContent()},t.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},t.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},t.currentSources=function(){var e=this.currentSource(),i=[];return 0!==Object.keys(e).length&&i.push(e),this.cache_.sources||i},t.currentSource=function(){return this.cache_.source||{}},t.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},t.currentType=function(){return this.currentSource()&&this.currentSource().type||""},t.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},t.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var i;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),i=!1):this.options_.autoplay=!!e,i=void 0===i?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)},t.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},t.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},t.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},t.controls=function(e){if(void 0===e)return!!this.controls_;this.controls_!==(e=!!e)&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},t.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;this.usingNativeControls_!==(e=!!e)&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},t.error=function(e){var i=this;if(void 0===e)return this.error_||null;if($i("beforeerror").forEach(function(o){var l=o(i,e);Ii(l)&&!Array.isArray(l)||"string"==typeof l||"number"==typeof l||null===l?e=l:i.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){var a=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],a),void this.one("loadstart",function(){this.off(["click","touchstart"],a)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new jt(e),this.addClass("vjs-error"),Ke.error("(CODE:"+this.error_.code+" "+jt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),$i("error").forEach(function(o){return o(i,i.error_)})},t.reportUserActivity=function(e){this.userActivity_=!0},t.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},t.listenForUserActivity_=function(){var e,i,a,o=nt(this,this.reportUserActivity),f=function(E){o(),this.clearInterval(e)};this.on("mousedown",function(){o(),this.clearInterval(e),e=this.setInterval(o,250)}),this.on("mousemove",function(E){(E.screenX!==i||E.screenY!==a)&&(i=E.screenX,a=E.screenY,o())}),this.on("mouseup",f),this.on("mouseleave",f);var g,v=this.getChild("controlBar");v&&!Bt&&!Di&&(v.on("mouseenter",function(T){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),v.on("mouseleave",function(T){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(g);var T=this.options_.inactivityTimeout;T<=0||(g=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},T))}},250)},t.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},t.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},t.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},t.addTextTrack=function(e,i,a){if(this.tech_)return this.tech_.addTextTrack(e,i,a)},t.addRemoteTextTrack=function(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)},t.removeRemoteTextTrack=function(e){void 0===e&&(e={});var a=e.track;if(a||(a=e),this.tech_)return this.tech_.removeRemoteTextTrack(a)},t.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Mi(this)&&this.trigger("languagechange"))},t.languages=function(){return ct(n.prototype.options_.languages,this.languages_)},t.toJSON=function(){var e=ct(this.options_),i=e.tracks;e.tracks=[];for(var a=0;a"):function(){}},Qi=1/30,yi=.1,ad=function(n,t){var e,r=[];if(n&&n.length)for(e=0;e=t})},xa=function(n,t){return ad(n,function(r){return r-Qi>=t})},sd=function(n){var t=[];if(!n||!n.length)return"";for(var r=0;r "+n.end(r));return t.join(", ")},fr=function(n){for(var t=[],r=0;ra)){if(t>i&&t<=a){r+=a-t;continue}r+=a-i}}return r},ud=N.createTimeRange,To=function(n,t){if(!t.preload)return t.duration;var r=0;return(t.parts||[]).forEach(function(e){r+=e.duration}),(t.preloadHints||[]).forEach(function(e){"PART"===e.type&&(r+=n.partTargetDuration)}),r},bo=function(n){return(n.segments||[]).reduce(function(t,r,e){return r.parts?r.parts.forEach(function(i,a){t.push({duration:i.duration,segmentIndex:e,partIndex:a,part:i,segment:r})}):t.push({duration:r.duration,segmentIndex:e,partIndex:null,segment:r,part:null}),t},[])},ld=function(n){var t=n.segments&&n.segments.length&&n.segments[n.segments.length-1];return t&&t.parts||[]},dd=function(n){var t=n.preloadSegment;if(t){var r=t.parts;return(t.preloadHints||[]).reduce(function(a,o){return a+("PART"===o.type?1:0)},0)+(r&&r.length?r.length:0)}},cd=function(n,t){if(t.endList)return 0;if(n&&n.suggestedPresentationDelay)return n.suggestedPresentationDelay;var r=ld(t).length>0;return r&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:r&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},fd=function(n,t,r){if(void 0===t&&(t=n.mediaSequence+n.segments.length),ti){var o=[i,e];e=o[0],i=o[1]}if(e<0){for(var l=e;lDate.now()},xo=function(n){return n.excludeUntil&&n.excludeUntil===1/0},Sa=function(n){var t=md(n);return!n.disabled&&!t},gd=function(n,t){return t.attributes&&t.attributes[n]},So=function(n,t){if(1===n.playlists.length)return!0;var r=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===n.playlists.filter(function(e){return!!Sa(e)&&(e.attributes.BANDWIDTH||0)0)for(var T=f-1;T>=0;T--){var E=d[T];if(l+=E.duration,o){if(l<0)continue}else if(l+Qi<=0)continue;return{partIndex:E.partIndex,segmentIndex:E.segmentIndex,startTime:a-En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:T})}}return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:r}}if(f<0){for(var x=f;x<0;x++)if((l-=t.targetDuration)<0)return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:r};f=0}for(var S=f;S0)continue}else if(l-Qi>=0)continue;return{partIndex:F.partIndex,segmentIndex:F.segmentIndex,startTime:a+En({defaultDuration:t.targetDuration,durationList:d,startIndex:f,endIndex:S})}}return{segmentIndex:d[d.length-1].segmentIndex,partIndex:d[d.length-1].partIndex,startTime:r}},isEnabled:Sa,isDisabled:function(n){return n.disabled},isBlacklisted:md,isIncompatible:xo,playlistEnd:pd,isAes:function(n){for(var t=0;t-1&&o!==a.length-1&&(r._HLS_part=o),(o>-1||a.length)&&i--}r._HLS_msn=i}if(t.serverControl&&t.serverControl.canSkipUntil&&(r._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(r).length){var l=new(P().URL)(n);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(d){!r.hasOwnProperty(d)||l.searchParams.set(d,r[d])}),n=l.toString()}return n}(a,i)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:a,withCredentials:this.withCredentials},function(o,l){if(e.request){if(o)return e.playlistRequestError(e.request,e.media(),"HAVE_METADATA");e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}})}},t.playlistRequestError=function(e,i,a){var o=i.uri,l=i.id;this.request=null,a&&(this.state=a),this.error={playlist:this.master.playlists[l],status:e.status,message:"HLS playlist request error at URL: "+o+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},t.parseManifest_=function(e){var i=this,a=e.url;return function(n){var t=n.onwarn,r=n.oninfo,e=n.manifestString,i=n.customTagParsers,a=void 0===i?[]:i,o=n.customTagMappers,l=void 0===o?[]:o,d=n.experimentalLLHLS,f=new jn;t&&f.on("warn",t),r&&f.on("info",r),a.forEach(function(x){return f.addParser(x)}),l.forEach(function(x){return f.addTagMapper(x)}),f.push(e),f.end();var v=f.manifest;if(d||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(x){v.hasOwnProperty(x)&&delete v[x]}),v.segments&&v.segments.forEach(function(x){["parts","preloadHints"].forEach(function(S){x.hasOwnProperty(S)&&delete x[S]})})),!v.targetDuration){var g=10;v.segments&&v.segments.length&&(g=v.segments.reduce(function(x,S){return Math.max(x,S.duration)},0)),t&&t("manifest has no targetDuration defaulting to "+g),v.targetDuration=g}var T=ld(v);if(T.length&&!v.partTargetDuration){var E=T.reduce(function(x,S){return Math.max(x,S.duration)},0);t&&(t("manifest has no partTargetDuration defaulting to "+E),_d.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),v.partTargetDuration=E}return v}({onwarn:function(d){return i.logger_("m3u8-parser warn for "+a+": "+d.message)},oninfo:function(d){return i.logger_("m3u8-parser info for "+a+": "+d.message)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},t.haveMetadata=function(e){var i=e.playlistString,a=e.playlistObject,o=e.url,l=e.id;this.request=null,this.state="HAVE_METADATA";var d=a||this.parseManifest_({url:o,manifestString:i});d.lastRequest=Date.now(),yd({playlist:d,uri:o,id:l});var f=ko(this.master,d);this.targetDuration=d.partTargetDuration||d.targetDuration,this.pendingMedia_=null,f?(this.master=f,this.media_=this.master.playlists[l]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Ao(this.media(),!!f)),this.trigger("loadedplaylist")},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),P().clearTimeout(this.finalRenditionTimeout),this.off()},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e,i){var a=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(P().clearTimeout(this.finalRenditionTimeout),i){var o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=P().setTimeout(this.media.bind(this,e,!1),o)}else{var l=this.state,d=!this.media_||e.id!==this.media_.id,f=this.master.playlists[e.id];if(f&&f.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(d&&(this.trigger("mediachanging"),this.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")));if(this.updateMediaUpdateTimeout_(Ao(e,!0)),d){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(v,g){if(a.request){if(e.lastRequest=Date.now(),e.resolvedUri=ba(a.handleManifestRedirects,e.resolvedUri,g),v)return a.playlistRequestError(a.request,e,l);a.haveMetadata({playlistString:g.responseText,url:e.uri,id:e.id}),a.trigger("HAVE_MASTER"===l?"loadedmetadata":"mediachange")}})}}},t.pause=function(){this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},t.load=function(e){var i=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var a=this.media();if(e){var o=a?(a.partTargetDuration||a.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){i.mediaUpdateTimeout=null,i.load()},o)}else this.started?this.trigger(a&&!a.endList?"mediaupdatetimeout":"loadedplaylist"):this.start()},t.updateMediaUpdateTimeout_=function(e){var i=this;this.mediaUpdateTimeout&&(P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=P().setTimeout(function(){i.mediaUpdateTimeout=null,i.trigger("mediaupdatetimeout"),i.updateMediaUpdateTimeout_(e)},e))},t.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=P().location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){e.setupInitialPlaylist(e.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(i,a){if(e.request){if(e.request=null,i)return e.error={status:a.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:a.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=ba(e.handleManifestRedirects,e.src,a);var o=e.parseManifest_({manifestString:a.responseText,url:e.src});e.setupInitialPlaylist(o)}})},t.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},t.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Td(this.master,this.srcUri()),e.playlists.forEach(function(a){a.segments=xd(a),a.segments.forEach(function(o){bd(o,a.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var i=this.srcUri()||P().location.href;this.master=function(n,t){var r=Co(0,t),e={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:P().location.href,resolvedUri:P().location.href,playlists:[{uri:t,id:r,resolvedUri:t,attributes:{}}]};return e.playlists[r]=e.playlists[0],e.playlists[t]=e.playlists[0],e}(0,i),this.haveMetadata({playlistObject:e,url:i,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(N.EventTarget),gm=N.xhr,vm=N.mergeOptions,wo=function(n,t,r,e){var i="arraybuffer"===n.responseType?n.response:n.responseText;!t&&i&&(n.responseTime=Date.now(),n.roundTripTime=n.responseTime-n.requestTime,n.bytesReceived=i.byteLength||i.length,n.bandwidth||(n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3))),r.headers&&(n.responseHeaders=r.headers),t&&"ETIMEDOUT"===t.code&&(n.timedout=!0),!t&&!n.aborted&&200!==r.statusCode&&206!==r.statusCode&&0!==r.statusCode&&(t=new Error("XHR Failed with a response of: "+(n&&(i||n.responseText)))),e(t,n)},Ed=function(){var n=function t(r,e){r=vm({timeout:45e3},r);var i=t.beforeRequest||N.Vhs.xhr.beforeRequest;if(i&&"function"==typeof i){var a=i(r);a&&(r=a)}var l=(!0===N.Vhs.xhr.original?gm:N.Vhs.xhr)(r,function(f,v){return wo(l,f,v,e)}),d=l.abort;return l.abort=function(){return l.aborted=!0,d.apply(l,arguments)},l.uri=r.uri,l.requestTime=Date.now(),l};return n.original=!0,n},Io=function(n){var t={};return n.byterange&&(t.Range=function(n){return"bytes="+n.offset+"-"+("bigint"==typeof n.offset||"bigint"==typeof n.length?P().BigInt(n.offset)+P().BigInt(n.length)-P().BigInt(1):n.offset+n.length-1)}(n.byterange)),t},ym=function(n,t){return n.start(t)+"-"+n.end(t)},Tm=function(n,t){var r=n.toString(16);return"00".substring(0,2-r.length)+r+(t%2?" ":"")},bm=function(n){return n>=32&&n<126?String.fromCharCode(n):"."},Cd=function(n){var t={};return Object.keys(n).forEach(function(r){var e=n[r];t[r]=ArrayBuffer.isView(e)?{bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:e}),t},Ca=function(n){var t=n.byterange||{length:1/0,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")},kd=function(n){return n.resolvedUri},Ad=function(n){for(var t=Array.prototype.slice.call(n),r=16,e="",o=0;onew Date(l.getTime()+1e3*d)?null:(r>l&&(e=o),{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:Kt.duration(t,t.mediaSequence+t.segments.indexOf(e)),type:e.videoTimingInfo?"accurate":"estimate"})}(t,r);if(!v)return f({message:t+" was not found in the stream"});var g=v.segment,T=function(n,t){var r,e;try{r=new Date(n),e=new Date(t)}catch(o){}var i=r.getTime();return(e.getTime()-i)/1e3}(g.dateTimeObject,t);if("estimate"===v.type)return 0===i?f({message:t+" is not buffered yet. Try again"}):(a(v.estimatedStart+T),void d.one("seeked",function(){s({programTime:t,playlist:r,retryCount:i-1,seekTo:a,pauseAfterSeek:l,tech:d,callback:f})}));var E=g.start+T;d.one("seeked",function(){return f(null,d.currentTime())}),l&&d.pause(),a(E)},Do=function(n,t){if(4===n.readyState)return t()},Id=N.mergeOptions,Dd=function(n,t){if(!Sd(n,t)||n.sidx&&t.sidx&&(n.sidx.offset!==t.sidx.offset||n.sidx.length!==t.sidx.length))return!1;if(!n.sidx&&t.sidx||n.sidx&&!t.sidx||n.segments&&!t.segments||!n.segments&&t.segments)return!1;if(!n.segments&&!t.segments)return!0;for(var r=0;r=F+S)return f(v,{response:E.subarray(S,S+F),status:g.status,uri:g.uri});o.request=o.vhs_.xhr({uri:d,responseType:"arraybuffer",headers:Io({byterange:e.sidx.byterange})},f)})}else this.mediaRequest_=P().setTimeout(function(){return a(!1)},0)},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},P().clearTimeout(this.minimumUpdatePeriodTimeout_),P().clearTimeout(this.mediaRequest_),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e){var i=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var a=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var o=!this.media_||e.id!==this.media_.id;if(o&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(o&&(this.trigger("mediachanging"),this.trigger("mediachange")));!o||(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,a,function(l){i.haveMetadata({startingState:a,playlist:e})}))},t.haveMetadata=function(e){var i=e.startingState,a=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[a.id]=a,this.mediaRequest_=null,this.refreshMedia_(a.id),this.trigger("HAVE_MASTER"===i?"loadedmetadata":"mediachange")},t.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(P().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},t.load=function(e){var i=this;P().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var a=this.media();if(e){var o=a?a.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=P().setTimeout(function(){return i.load()},o)}else this.started?a&&!a.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},t.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_(function(i,a){e.haveMaster_(),!e.hasPendingRequest()&&!e.media_&&e.media(e.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=P().setTimeout(function(){return e.haveMaster_()},0)},t.requestMaster_=function(e){var i=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(a,o){if(!i.requestErrored_(a,o)){var l=o.responseText!==i.masterPlaylistLoader_.masterXml_;return i.masterPlaylistLoader_.masterXml_=o.responseText,i.masterLoaded_=o.responseHeaders&&o.responseHeaders.date?Date.parse(o.responseHeaders.date):Date.now(),i.masterPlaylistLoader_.srcUrl=ba(i.handleManifestRedirects,i.masterPlaylistLoader_.srcUrl,o),l?(i.handleMaster_(),void i.syncClientServerClock_(function(){return e(o,l)})):e(o,l)}"HAVE_NOTHING"===i.state&&(i.started=!1)})},t.syncClientServerClock_=function(e){var i=this,a=function(n){return function(n){var t=_t(n,"UTCTiming")[0];if(!t)return null;var r=Ot(t);switch(r.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":r.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":r.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":r.method="DIRECT",r.value=Date.parse(r.value);break;default:throw new Error("UNSUPPORTED_UTC_TIMING_SCHEME")}return r}(vu(n))}(this.masterPlaylistLoader_.masterXml_);return null===a?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===a.method?(this.masterPlaylistLoader_.clientOffset_=a.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:di(this.masterPlaylistLoader_.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(o,l){if(i.request){if(o)return i.masterPlaylistLoader_.clientOffset_=i.masterLoaded_-Date.now(),e();var d;d="HEAD"===a.method?l.responseHeaders&&l.responseHeaders.date?Date.parse(l.responseHeaders.date):i.masterLoaded_:Date.parse(l.responseText),i.masterPlaylistLoader_.clientOffset_=d-Date.now(),e()}}))},t.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,i=function(n){var r=n.srcUrl,o=function(n,t){void 0===t&&(t={});var r=function(n,t){void 0===t&&(t={});var r=t,e=r.manifestUri,i=void 0===e?"":e,a=r.NOW,o=void 0===a?Date.now():a,l=r.clientOffset,d=void 0===l?0:l,f=_t(n,"Period");if(!f.length)throw new Error("INVALID_NUMBER_OF_PERIOD");var v=_t(n,"Location"),g=Ot(n),T=Gn([i],_t(n,"BaseURL"));g.type=g.type||"static",g.sourceDuration=g.mediaPresentationDuration||0,g.NOW=o,g.clientOffset=d,v.length&&(g.locations=v.map(cs));var E=[];return f.forEach(function(x,S){var F=Ot(x),U=E[S-1];F.start=function(n){var t=n.attributes,r=n.priorPeriodAttributes;return"number"==typeof t.start?t.start:r&&"number"==typeof r.start&&"number"==typeof r.duration?r.start+r.duration:r||"static"!==n.mpdType?null:0}({attributes:F,priorPeriodAttributes:U?U.attributes:null,mpdType:g.type}),E.push({node:x,attributes:F})}),{locations:g.locations,representationInfo:qn(E.map(jf(g,T)))}}(vu(n),t),e=function(n){return n.map(Of)}(r.representationInfo);return Cf({dashPlaylists:e,locations:r.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})}(n.masterXml,{manifestUri:r,clientOffset:n.clientOffset,sidxMapping:n.sidxMapping,previousManifest:n.previousManifest});return Td(o,r),o}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(i=function(n,t,r){for(var e=!0,i=Id(n,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a-1)},this.trigger=function(p){var h,m,_,y;if(h=c[p])if(2===arguments.length)for(_=h.length,m=0;m<_;++m)h[m].call(this,arguments[1]);else{for(y=[],m=arguments.length,m=1;m>>1,c.samplingfrequencyindex<<7|c.channelcount<<3,6,1,2]))},d=function(){return a(Pe.ftyp,st,Mt,st,Qe)},q=function(c){return a(Pe.hdlr,ai[c])},f=function(c){return a(Pe.mdat,c)},W=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,c.duration>>>24&255,c.duration>>>16&255,c.duration>>>8&255,255&c.duration,85,196,0,0]);return c.samplerate&&(p[12]=c.samplerate>>>24&255,p[13]=c.samplerate>>>16&255,p[14]=c.samplerate>>>8&255,p[15]=255&c.samplerate),a(Pe.mdhd,p)},H=function(c){return a(Pe.mdia,W(c),q(c.type),g(c))},v=function(c){return a(Pe.mfhd,new Uint8Array([0,0,0,0,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c]))},g=function(c){return a(Pe.minf,"video"===c.type?a(Pe.vmhd,xi):a(Pe.smhd,Ui),o(),he(c))},T=function(c,p){for(var h=[],m=p.length;m--;)h[m]=ye(p[m]);return a.apply(null,[Pe.moof,v(c)].concat(h))},E=function(c){for(var p=c.length,h=[];p--;)h[p]=F(c[p]);return a.apply(null,[Pe.moov,S(4294967295)].concat(h).concat(x(c)))},x=function(c){for(var p=c.length,h=[];p--;)h[p]=ge(c[p]);return a.apply(null,[Pe.mvex].concat(h))},S=function(c){var p=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return a(Pe.mvhd,p)},ne=function(c){var m,_,p=c.samples||[],h=new Uint8Array(4+p.length);for(_=0;_>>8),y.push(255&m[I].byteLength),y=y.concat(Array.prototype.slice.call(m[I]));for(I=0;I<_.length;I++)k.push((65280&_[I].byteLength)>>>8),k.push(255&_[I].byteLength),k=k.concat(Array.prototype.slice.call(_[I]));if(O=[Pe.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&h.width)>>8,255&h.width,(65280&h.height)>>8,255&h.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a(Pe.avcC,new Uint8Array([1,h.profileIdc,h.profileCompatibility,h.levelIdc,255].concat([m.length],y,[_.length],k))),a(Pe.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],h.sarRatio){var L=h.sarRatio[0],M=h.sarRatio[1];O.push(a(Pe.pasp,new Uint8Array([(4278190080&L)>>24,(16711680&L)>>16,(65280&L)>>8,255&L,(4278190080&M)>>24,(16711680&M)>>16,(65280&M)>>8,255&M])))}return a.apply(null,O)},c=function(h){return a(Pe.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&h.channelcount)>>8,255&h.channelcount,(65280&h.samplesize)>>8,255&h.samplesize,0,0,0,0,(65280&h.samplerate)>>8,255&h.samplerate,0,0]),l(h))},U=function(c){var p=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,0,(4278190080&c.duration)>>24,(16711680&c.duration)>>16,(65280&c.duration)>>8,255&c.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&c.width)>>8,255&c.width,0,0,(65280&c.height)>>8,255&c.height,0,0]);return a(Pe.tkhd,p)},ye=function(c){var p,h,m,_,k,I;return p=a(Pe.tfhd,new Uint8Array([0,0,0,58,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Math.floor(c.baseMediaDecodeTime/i),I=Math.floor(c.baseMediaDecodeTime%i),h=a(Pe.tfdt,new Uint8Array([1,0,0,0,k>>>24&255,k>>>16&255,k>>>8&255,255&k,I>>>24&255,I>>>16&255,I>>>8&255,255&I])),"audio"===c.type?(m=Ye(c,92),a(Pe.traf,p,h,m)):(_=ne(c),m=Ye(c,_.length+92),a(Pe.traf,p,h,m,_))},F=function(c){return c.duration=c.duration||4294967295,a(Pe.trak,U(c),H(c))},ge=function(c){var p=new Uint8Array([0,0,0,0,(4278190080&c.id)>>24,(16711680&c.id)>>16,(65280&c.id)>>8,255&c.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==c.type&&(p[p.length-1]=0),a(Pe.trex,p)},function(){var b,c,p;p=function(m,_){var y=0,k=0,I=0,O=0;return m.length&&(void 0!==m[0].duration&&(y=1),void 0!==m[0].size&&(k=2),void 0!==m[0].flags&&(I=4),void 0!==m[0].compositionTimeOffset&&(O=8)),[0,0,y|k|I|O,1,(4278190080&m.length)>>>24,(16711680&m.length)>>>16,(65280&m.length)>>>8,255&m.length,(4278190080&_)>>>24,(16711680&_)>>>16,(65280&_)>>>8,255&_]},c=function(m,_){var y,k,I,O,L,M;for(I=p(O=m.samples||[],_+=20+16*O.length),(k=new Uint8Array(I.length+16*O.length)).set(I),y=I.length,M=0;M>>24,k[y++]=(16711680&L.duration)>>>16,k[y++]=(65280&L.duration)>>>8,k[y++]=255&L.duration,k[y++]=(4278190080&L.size)>>>24,k[y++]=(16711680&L.size)>>>16,k[y++]=(65280&L.size)>>>8,k[y++]=255&L.size,k[y++]=L.flags.isLeading<<2|L.flags.dependsOn,k[y++]=L.flags.isDependedOn<<6|L.flags.hasRedundancy<<4|L.flags.paddingValue<<1|L.flags.isNonSyncSample,k[y++]=61440&L.flags.degradationPriority,k[y++]=15&L.flags.degradationPriority,k[y++]=(4278190080&L.compositionTimeOffset)>>>24,k[y++]=(16711680&L.compositionTimeOffset)>>>16,k[y++]=(65280&L.compositionTimeOffset)>>>8,k[y++]=255&L.compositionTimeOffset;return a(Pe.trun,k)},b=function(m,_){var y,k,I,O,L,M;for(I=p(O=m.samples||[],_+=20+8*O.length),(y=new Uint8Array(I.length+8*O.length)).set(I),k=I.length,M=0;M>>24,y[k++]=(16711680&L.duration)>>>16,y[k++]=(65280&L.duration)>>>8,y[k++]=255&L.duration,y[k++]=(4278190080&L.size)>>>24,y[k++]=(16711680&L.size)>>>16,y[k++]=(65280&L.size)>>>8,y[k++]=255&L.size;return a(Pe.trun,y)},Ye=function(m,_){return"audio"===m.type?b(m,_):c(m,_)}}();var Wo,Zo,zo,Ua,Ko,yc,Tc,bc,Dn_mdat=f,Dn_moof=T,_c=function(c,p){var h={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return h.dataOffset=p,h.compositionTimeOffset=c.pts-c.dts,h.duration=c.duration,h.size=4*c.length,h.size+=c.byteLength,c.keyFrame&&(h.flags.dependsOn=2,h.flags.isNonSyncSample=0),h},Ji=[33,16,5,32,164,27],qo=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Je=function(c){for(var p=[];c--;)p.push(0);return p};Zo=function(c){return 9e4*c},zo=function(c,p){return c*p},Ua=function(c){return c/9e4},Ko=function(c,p){return c/p},yc=function(c,p){return Zo(Ko(c,p))},Tc=function(c,p){return zo(Ua(c),p)},bc=function(c,p,h){return Ua(h?c:c-p)};var Xe_secondsToVideoTs=Zo,Xe_videoTsToSeconds=Ua,Xe_audioTsToVideoTs=yc,Xe_videoTsToAudioTs=Tc,Xe_metadataTsToSeconds=bc,Ba_prefixWithSilence=function(c,p,h,m){var _,L,M,G,y=0,k=0,I=0,O=0;if(p.length&&(_=Xe_audioTsToVideoTs(c.baseMediaDecodeTime,c.samplerate),y=Math.ceil(9e4/(c.samplerate/1024)),h&&m&&(k=_-Math.max(h,m),O=(I=Math.floor(k/y))*y),!(I<1||O>45e3))){for((L=function(){if(!Wo){var c={96e3:[Ji,[227,64],Je(154),[56]],88200:[Ji,[231],Je(170),[56]],64e3:[Ji,[248,192],Je(240),[56]],48e3:[Ji,[255,192],Je(268),[55,148,128],Je(54),[112]],44100:[Ji,[255,192],Je(268),[55,163,128],Je(84),[112]],32e3:[Ji,[255,192],Je(268),[55,234],Je(226),[112]],24e3:[Ji,[255,192],Je(268),[55,255,128],Je(268),[111,112],Je(126),[224]],16e3:[Ji,[255,192],Je(268),[55,255,128],Je(268),[111,255],Je(269),[223,108],Je(195),[1,192]],12e3:[qo,Je(268),[3,127,248],Je(268),[6,255,240],Je(268),[13,255,224],Je(268),[27,253,128],Je(259),[56]],11025:[qo,Je(268),[3,127,248],Je(268),[6,255,240],Je(268),[13,255,224],Je(268),[27,255,192],Je(268),[55,175,128],Je(108),[112]],8e3:[qo,Je(268),[3,121,16],Je(47),[7]]};Wo=function(c){return Object.keys(c).reduce(function(p,h){return p[h]=new Uint8Array(c[h].reduce(function(m,_){return m.concat(_)},[])),p},{})}(c)}return Wo}()[c.samplerate])||(L=p[0].data),M=0;M=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(b),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Hi.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Hi.prototype.addText=function(b){this.rows[this.rowIdx]+=b},Hi.prototype.backspace=function(){if(!this.isEmpty()){var b=this.rows[this.rowIdx];this.rows[this.rowIdx]=b.substr(0,b.length-1)}};var ja=function(c,p,h){this.serviceNum=c,this.text="",this.currentWindow=new Hi(-1),this.windows=[],this.stream=h,"string"==typeof p&&this.createTextDecoder(p)};ja.prototype.init=function(b,c){this.startPts=b;for(var p=0;p<8;p++)this.windows[p]=new Hi(p),"function"==typeof c&&(this.windows[p].beforeRowOverflow=c)},ja.prototype.setCurrentWindow=function(b){this.currentWindow=this.windows[b]},ja.prototype.createTextDecoder=function(b){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(b)}catch(c){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+b+" encoding. "+c})}};var ot=function b(c){c=c||{},b.prototype.init.call(this);var _,p=this,h=c.captionServices||{},m={};Object.keys(h).forEach(function(y){_=h[y],/^SERVICE/.test(y)&&(m[y]=_.encoding)}),this.serviceEncodings=m,this.current708Packet=null,this.services={},this.push=function(y){3===y.type?(p.new708Packet(),p.add708Bytes(y)):(null===p.current708Packet&&p.new708Packet(),p.add708Bytes(y))}};ot.prototype=new n,ot.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ot.prototype.add708Bytes=function(b){var c=b.ccData,p=c>>>8,h=255&c;this.current708Packet.ptsVals.push(b.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(h)},ot.prototype.push708Packet=function(){var b=this.current708Packet,c=b.data,p=null,h=null,m=0,_=c[m++];for(b.seq=_>>6,b.sizeCode=63&_;m>5)&&h>0&&(p=_=c[m++]),this.pushServiceBlock(p,m,h),h>0&&(m+=h-1)},ot.prototype.pushServiceBlock=function(b,c,p){var h,m=c,_=this.current708Packet.data,y=this.services[b];for(y||(y=this.initService(b,m));m>5,_.rowLock=(16&h)>>4,_.columnLock=(8&h)>>3,_.priority=7&h,h=p[++b],_.relativePositioning=(128&h)>>7,_.anchorVertical=127&h,h=p[++b],_.anchorHorizontal=h,h=p[++b],_.anchorPoint=(240&h)>>4,_.rowCount=15&h,h=p[++b],_.columnCount=63&h,h=p[++b],_.windowStyle=(56&h)>>3,_.penStyle=7&h,_.virtualRowCount=_.rowCount+1,b},ot.prototype.setWindowAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.winAttr;return h=p[++b],m.fillOpacity=(192&h)>>6,m.fillRed=(48&h)>>4,m.fillGreen=(12&h)>>2,m.fillBlue=3&h,h=p[++b],m.borderType=(192&h)>>6,m.borderRed=(48&h)>>4,m.borderGreen=(12&h)>>2,m.borderBlue=3&h,h=p[++b],m.borderType+=(128&h)>>5,m.wordWrap=(64&h)>>6,m.printDirection=(48&h)>>4,m.scrollDirection=(12&h)>>2,m.justify=3&h,h=p[++b],m.effectSpeed=(240&h)>>4,m.effectDirection=(12&h)>>2,m.displayEffect=3&h,b},ot.prototype.flushDisplayed=function(b,c){for(var p=[],h=0;h<8;h++)c.windows[h].visible&&!c.windows[h].isEmpty()&&p.push(c.windows[h].getText());c.endPts=b,c.text=p.join("\n\n"),this.pushCaption(c),c.startPts=b},ot.prototype.pushCaption=function(b){""!==b.text&&(this.trigger("data",{startPts:b.startPts,endPts:b.endPts,text:b.text,stream:"cc708_"+b.serviceNum}),b.text="",b.startPts=b.endPts)},ot.prototype.displayWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=1);return b},ot.prototype.hideWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible=0);return b},ot.prototype.toggleWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&(c.windows[_].visible^=1);return b},ot.prototype.clearWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].clearText();return b},ot.prototype.deleteWindows=function(b,c){var h=this.current708Packet.data[++b],m=this.getPts(b);this.flushDisplayed(m,c);for(var _=0;_<8;_++)h&1<<_&&c.windows[_].reset();return b},ot.prototype.setPenAttributes=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penAttr;return h=p[++b],m.textTag=(240&h)>>4,m.offset=(12&h)>>2,m.penSize=3&h,h=p[++b],m.italics=(128&h)>>7,m.underline=(64&h)>>6,m.edgeType=(56&h)>>3,m.fontStyle=7&h,b},ot.prototype.setPenColor=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penColor;return h=p[++b],m.fgOpacity=(192&h)>>6,m.fgRed=(48&h)>>4,m.fgGreen=(12&h)>>2,m.fgBlue=3&h,h=p[++b],m.bgOpacity=(192&h)>>6,m.bgRed=(48&h)>>4,m.bgGreen=(12&h)>>2,m.bgBlue=3&h,h=p[++b],m.edgeRed=(48&h)>>4,m.edgeGreen=(12&h)>>2,m.edgeBlue=3&h,b},ot.prototype.setPenLocation=function(b,c){var p=this.current708Packet.data,h=p[b],m=c.currentWindow.penLoc;return c.currentWindow.pendingNewLine=!0,h=p[++b],m.row=15&h,h=p[++b],m.column=63&h,b},ot.prototype.reset=function(b,c){var p=this.getPts(b);return this.flushDisplayed(p,c),this.initService(c.serviceNum,b)};var N_={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Va=function(c){return null===c?"":(c=N_[c]||c,String.fromCharCode(c))},F_=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],vr=function(){for(var c=[],p=15;p--;)c.push("");return c},mt=function b(c,p){b.prototype.init.call(this),this.field_=c||0,this.dataChannel_=p||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(h){var m,_,y,k,I;if((m=32639&h.ccData)!==this.lastControlCode_){if(4096==(61440&m)?this.lastControlCode_=m:m!==this.PADDING_&&(this.lastControlCode_=null),y=m>>>8,k=255&m,m!==this.PADDING_)if(m===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(m===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(h.pts),this.flushDisplayed(h.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=h.pts;else if(m===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(h.pts);else if(m===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(h.pts);else if(m===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(h.pts);else if(m===this.CARRIAGE_RETURN_)this.clearFormatting(h.pts),this.flushDisplayed(h.pts),this.shiftRowsUp_(),this.startPts_=h.pts;else if(m===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(m===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(h.pts),this.displayed_=vr();else if(m===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=vr();else if(m===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(h.pts),this.displayed_=vr()),this.mode_="paintOn",this.startPts_=h.pts;else if(this.isSpecialCharacter(y,k))I=Va((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isExtCharacter(y,k))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),I=Va((y=(3&y)<<8)|k),this[this.mode_](h.pts,I),this.column_++;else if(this.isMidRowCode(y,k))this.clearFormatting(h.pts),this[this.mode_](h.pts," "),this.column_++,14==(14&k)&&this.addFormatting(h.pts,["i"]),1==(1&k)&&this.addFormatting(h.pts,["u"]);else if(this.isOffsetControlCode(y,k))this.column_+=3&k;else if(this.isPAC(y,k)){var O=F_.indexOf(7968&m);"rollUp"===this.mode_&&(O-this.rollUpRows_+1<0&&(O=this.rollUpRows_-1),this.setRollUp(h.pts,O)),O!==this.row_&&(this.clearFormatting(h.pts),this.row_=O),1&k&&-1===this.formatting_.indexOf("u")&&this.addFormatting(h.pts,["u"]),16==(16&m)&&(this.column_=4*((14&m)>>1)),this.isColorPAC(k)&&14==(14&k)&&this.addFormatting(h.pts,["i"])}else this.isNormalChar(y)&&(0===k&&(k=null),I=Va(y),I+=Va(k),this[this.mode_](h.pts,I),this.column_+=I.length)}else this.lastControlCode_=null}};mt.prototype=new n,mt.prototype.flushDisplayed=function(b){var c=this.displayed_.map(function(p,h){try{return p.trim()}catch(m){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+h+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");c.length&&this.trigger("data",{startPts:this.startPts_,endPts:b,text:c,stream:this.name_})},mt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=vr(),this.nonDisplayed_=vr(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},mt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},mt.prototype.isSpecialCharacter=function(b,c){return b===this.EXT_&&c>=48&&c<=63},mt.prototype.isExtCharacter=function(b,c){return(b===this.EXT_+1||b===this.EXT_+2)&&c>=32&&c<=63},mt.prototype.isMidRowCode=function(b,c){return b===this.EXT_&&c>=32&&c<=47},mt.prototype.isOffsetControlCode=function(b,c){return b===this.OFFSET_&&c>=33&&c<=35},mt.prototype.isPAC=function(b,c){return b>=this.BASE_&&b=64&&c<=127},mt.prototype.isColorPAC=function(b){return b>=64&&b<=79||b>=96&&b<=127},mt.prototype.isNormalChar=function(b){return b>=32&&b<=127},mt.prototype.setRollUp=function(b,c){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(b),this.nonDisplayed_=vr(),this.displayed_=vr()),void 0!==c&&c!==this.row_)for(var p=0;p"},"");this[this.mode_](b,p)},mt.prototype.clearFormatting=function(b){if(this.formatting_.length){var c=this.formatting_.reverse().reduce(function(p,h){return p+""},"");this.formatting_=[],this[this.mode_](b,c)}},mt.prototype.popOn=function(b,c){var p=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=p+=c},mt.prototype.rollUp=function(b,c){var p=this.displayed_[this.row_];this.displayed_[this.row_]=p+=c},mt.prototype.shiftRowsUp_=function(){var b;for(b=0;bp&&(h=-1);Math.abs(p-c)>4294967296;)c+=8589934592*h;return c},Ec=function b(c){var p,h;b.prototype.init.call(this),this.type_=c||"shared",this.push=function(m){"shared"!==this.type_&&m.type!==this.type_||(void 0===h&&(h=m.dts),m.dts=$o(m.dts,h),m.pts=$o(m.pts,h),p=m.dts,this.trigger("data",m))},this.flush=function(){h=p,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){h=void 0,p=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ec.prototype=new n;var za,Cc_TimestampRolloverStream=Ec,Cc_handleRollover=$o,kc=function(c,p,h){var m,_="";for(m=p;m>>2;ae*=4,M.timeStamp=ae+=3&Se[7],void 0===I.pts&&void 0===I.dts&&(I.pts=M.timeStamp,I.dts=M.timeStamp),this.trigger("timestamp",M)}I.frames.push(M),O+=10,O+=L}while(O>>4>1&&(k+=_[k]+1),0===y.pid)y.type="pat",c(_.subarray(k),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",c(_.subarray(k),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([_,k,y]):this.processPes_(_,k,y)},this.processPes_=function(_,y,k){k.streamType=k.pid===this.programMapTable.video?Lt.H264_STREAM_TYPE:k.pid===this.programMapTable.audio?Lt.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][k.pid],k.type="pes",k.data=_.subarray(y),this.trigger("data",k)}},On.prototype=new n,On.STREAM_TYPES={h264:27,adts:15},$a=function(){var y,c=this,p=!1,h={data:[],size:0},m={data:[],size:0},_={data:[],size:0},I=function(L,M,G){var Wt,fe=new Uint8Array(L.size),Se={type:M},ae=0,Be=0,Ct=!1;if(L.data.length&&!(L.size<9)){for(Se.trackId=L.data[0].pid,ae=0;ae>>3,M.pts*=4,M.pts+=(6&L[13])>>>1,M.dts=M.pts,64&G&&(M.dts=(14&L[14])<<27|(255&L[15])<<20|(254&L[16])<<12|(255&L[17])<<5|(254&L[18])>>>3,M.dts*=4,M.dts+=(6&L[18])>>>1)),M.data=L.subarray(9+L[8]))})(fe,Se),Ct="video"===M||Se.packetLength<=L.size,(G||Ct)&&(L.size=0,L.data.length=0),Ct&&c.trigger("data",Se)}};$a.prototype.init.call(this),this.push=function(O){({pat:function(){},pes:function(){var M,G;switch(O.streamType){case Lt.H264_STREAM_TYPE:M=h,G="video";break;case Lt.ADTS_STREAM_TYPE:M=m,G="audio";break;case Lt.METADATA_STREAM_TYPE:M=_,G="timed-metadata";break;default:return}O.payloadUnitStartIndicator&&I(M,G,!0),M.data.push(O),M.size+=O.data.byteLength},pmt:function(){var M={type:"metadata",tracks:[]};null!==(y=O.programMapTable).video&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&M.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),p=!0,c.trigger("data",M)}})[O.type]()},this.reset=function(){h.size=0,h.data.length=0,m.size=0,m.data.length=0,this.trigger("reset")},this.flushStreams_=function(){I(h,"video"),I(m,"audio"),I(_,"timed-metadata")},this.flush=function(){if(!p&&y){var O={type:"metadata",tracks:[]};null!==y.video&&O.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),null!==y.audio&&O.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),c.trigger("data",O)}p=!1,this.flushStreams_(),this.trigger("done")}},$a.prototype=new n;var wc={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Ka,TransportParseStream:On,ElementaryStream:$a,TimestampRolloverStream:V_,CaptionStream:Wa.CaptionStream,Cea608Stream:Wa.Cea608Stream,Cea708Stream:Wa.Cea708Stream,MetadataStream:j_};for(var Xo in Lt)Lt.hasOwnProperty(Xo)&&(wc[Xo]=Lt[Xo]);var Ya,ji=wc,Ic=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ya=function(c){var p,h=0;Ya.prototype.init.call(this),this.skipWarn_=function(m,_){this.trigger("log",{level:"warn",message:"adts skiping bytes "+m+" to "+_+" in frame "+h+" outside syncword"})},this.push=function(m){var y,k,I,O,L,_=0;if(c||(h=0),"audio"===m.type){p&&p.length?(I=p,(p=new Uint8Array(I.byteLength+m.data.byteLength)).set(I),p.set(m.data,I.byteLength)):p=m.data;for(var M;_+7>>2],p.byteLength-_<(y=(3&p[_+3])<<11|p[_+4]<<3|(224&p[_+5])>>5))break;this.trigger("data",{pts:m.pts+h*L,dts:m.dts+h*L,sampleCount:O,audioobjecttype:1+(p[_+2]>>>6&3),channelcount:(1&p[_+2])<<2|(192&p[_+3])>>>6,samplerate:Ic[(60&p[_+2])>>>2],samplingfrequencyindex:(60&p[_+2])>>>2,samplesize:16,data:p.subarray(_+7+k,_+y)}),h++,_+=y}else"number"!=typeof M&&(M=_),_++;"number"==typeof M&&(this.skipWarn_(M,_),M=null),p=p.subarray(_)}},this.flush=function(){h=0,this.trigger("done")},this.reset=function(){p=void 0,this.trigger("reset")},this.endTimeline=function(){p=void 0,this.trigger("endedtimeline")}},Ya.prototype=new n;var Pc,Dc=Ya;Pc=function(c){var p=c.byteLength,h=0,m=0;this.length=function(){return 8*p},this.bitsAvailable=function(){return 8*p+m},this.loadWord=function(){var _=c.byteLength-p,y=new Uint8Array(4),k=Math.min(4,p);if(0===k)throw new Error("no bytes available");y.set(c.subarray(_,_+k)),h=new DataView(y.buffer).getUint32(0),m=8*k,p-=k},this.skipBits=function(_){var y;m>_?(h<<=_,m-=_):(_-=m,_-=8*(y=Math.floor(_/8)),p-=y,this.loadWord(),h<<=_,m-=_)},this.readBits=function(_){var y=Math.min(m,_),k=h>>>32-y;return(m-=y)>0?h<<=y:p>0&&this.loadWord(),(y=_-y)>0?k<>>_))return h<<=_,m-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Xa,Rn,Lc,W_=Pc;Rn=function(){var p,h,c=0;Rn.prototype.init.call(this),this.push=function(m){var _;h?((_=new Uint8Array(h.byteLength+m.data.byteLength)).set(h),_.set(m.data,h.byteLength),h=_):h=m.data;for(var y=h.byteLength;c3&&this.trigger("data",h.subarray(c+3)),h=null,c=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Rn.prototype=new n,Lc={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Xa=function(){var p,h,m,_,y,k,I,c=new Rn;Xa.prototype.init.call(this),p=this,this.push=function(O){"video"===O.type&&(h=O.trackId,m=O.pts,_=O.dts,c.push(O))},c.on("data",function(O){var L={trackId:h,pts:m,dts:_,data:O,nalUnitTypeCode:31&O[0]};switch(L.nalUnitTypeCode){case 5:L.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:L.nalUnitType="sei_rbsp",L.escapedRBSP=y(O.subarray(1));break;case 7:L.nalUnitType="seq_parameter_set_rbsp",L.escapedRBSP=y(O.subarray(1)),L.config=k(L.escapedRBSP);break;case 8:L.nalUnitType="pic_parameter_set_rbsp";break;case 9:L.nalUnitType="access_unit_delimiter_rbsp"}p.trigger("data",L)}),c.on("done",function(){p.trigger("done")}),c.on("partialdone",function(){p.trigger("partialdone")}),c.on("reset",function(){p.trigger("reset")}),c.on("endedtimeline",function(){p.trigger("endedtimeline")}),this.flush=function(){c.flush()},this.partialFlush=function(){c.partialFlush()},this.reset=function(){c.reset()},this.endTimeline=function(){c.endTimeline()},I=function(L,M){var Se,G=8,fe=8;for(Se=0;Se=0?h:0,(16&c[p+5])>>4?h+20:h+10},z_=function b(c,p){return c.length-p<10||c[p]!=="I".charCodeAt(0)||c[p+1]!=="D".charCodeAt(0)||c[p+2]!=="3".charCodeAt(0)?p:b(c,p+=Oc(c,p))},Rc=function(c){return c[0]<<21|c[1]<<14|c[2]<<7|c[3]},Y_=function(c,p,h){return unescape(function(c,p,h){var m,_="";for(m=p;m=p+2&&255==(255&c[p])&&240==(240&c[p+1])&&16==(22&c[p+1])},parseId3TagSize:Oc,parseAdtsSize:function(c,p){return 6144&c[p+3]|c[p+4]<<3|(224&c[p+5])>>5},parseType:function(c,p){return c[p]==="I".charCodeAt(0)&&c[p+1]==="D".charCodeAt(0)&&c[p+2]==="3".charCodeAt(0)?"timed-metadata":!0&c[p]&&240==(240&c[p+1])?"audio":null},parseSampleRate:function(c){for(var p=0;p+5>>2];p++}return null},parseAacTimestamp:function(c){var p,h,m;p=10,64&c[5]&&(p+=4,p+=Rc(c.subarray(10,14)));do{if((h=Rc(c.subarray(p+4,p+8)))<1)return null;if("PRIV"===String.fromCharCode(c[p],c[p+1],c[p+2],c[p+3])){m=c.subarray(p+10,p+h+10);for(var y=0;y>>2;return(O*=4)+(3&I[7])}break}}p+=10,p+=h}while(p=3;)if(c[_]!=="I".charCodeAt(0)||c[_+1]!=="D".charCodeAt(0)||c[_+2]!=="3".charCodeAt(0))if(255!=(255&c[_])||240!=(240&c[_+1]))_++;else{if(c.length-_<7||_+(m=Qa.parseAdtsSize(c,_))>c.length)break;I={type:"audio",data:c.subarray(_,_+m),pts:p,dts:p},this.trigger("data",I),_+=m}else{if(c.length-_<10||_+(m=Qa.parseId3TagSize(c,_))>c.length)break;k={type:"timed-metadata",data:c.subarray(_,_+m)},this.trigger("data",k),_+=m}c=c.length-_>0?c.subarray(_):new Uint8Array},this.reset=function(){c=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){c=new Uint8Array,this.trigger("endedtimeline")}},Ja.prototype=new n;var Mn,tn,es,_r,ty=Ja,Qo=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Jo=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],ny=G_.H264Stream,ay=Qa.isLikelyAacData,oy=function(c,p){p.stream=c,this.trigger("log",p)},Mc=function(c,p){for(var h=Object.keys(p),m=0;m=h?c:(p.minSegmentDts=1/0,c.filter(function(m){return m.dts>=h&&(p.minSegmentDts=Math.min(p.minSegmentDts,m.dts),p.minSegmentPts=p.minSegmentDts,!0)}))}(h,c,_),c.baseMediaDecodeTime=fi_calculateTrackBaseMediaDecodeTime(c,p.keepOriginalTimestamps),Se=Ba_prefixWithSilence(c,I,y,k),c.samples=function(c){var p,m=[];for(p=0;p1&&(p=c.shift(),c.byteLength-=p.byteLength,c.nalCount-=p.nalCount,c[0][0].dts=p.dts,c[0][0].pts=p.pts,c[0][0].duration+=p.duration),c}(L)),_.length){var Ct;if(!(Ct=p.alignGopsAtEnd?this.alignGopsAtEnd_(L):this.alignGopsAtStart_(L)))return this.gopCache_.unshift({gop:L.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),m=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");fi_clearDtsInfo(c),L=Ct}fi_collectDtsInfo(c,L),c.samples=function(c,p){var h,m,_,y,I=p||0,O=[];for(h=0;h=-1e4&&G<=45e3&&(!fe||M>G)&&(fe=ae,M=G));return fe?fe.gop:null},this.alignGopsAtStart_=function(I){var O,L,M,G,fe,Se,ae,Be;for(fe=I.byteLength,Se=I.nalCount,ae=I.duration,O=L=0;O<_.length&&LM.pts?O++:(L++,fe-=G.byteLength,Se-=G.nalCount,ae-=G.duration);return 0===L?I:L===I.length?null:((Be=I.slice(L)).byteLength=fe,Be.duration=ae,Be.nalCount=Se,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be)},this.alignGopsAtEnd_=function(I){var O,L,M,G,fe,Se,ae;for(O=_.length-1,L=I.length-1,fe=null,Se=!1;O>=0&&L>=0;){if((M=_[O]).pts===(G=I[L]).pts){Se=!0;break}M.pts>G.pts?O--:(O===_.length-1&&(fe=L),L--)}if(!Se&&null===fe)return null;if(0===(ae=Se?L:fe))return I;var Be=I.slice(ae),Ct=Be.reduce(function(Wt,br){return Wt.byteLength+=br.byteLength,Wt.duration+=br.duration,Wt.nalCount+=br.nalCount,Wt},{byteLength:0,duration:0,nalCount:0});return Be.byteLength=Ct.byteLength,Be.duration=Ct.duration,Be.nalCount=Ct.nalCount,Be.pts=Be[0].pts,Be.dts=Be[0].dts,Be},this.alignGopsWith=function(I){_=I}},Mn.prototype=new n,_r=function(c,p){this.numberOfTracks=0,this.metadataStream=p,this.remuxTracks=void 0===(c=c||{}).remux||!!c.remux,this.keepOriginalTimestamps="boolean"==typeof c.keepOriginalTimestamps&&c.keepOriginalTimestamps,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,_r.prototype.init.call(this),this.push=function(h){return h.text?this.pendingCaptions.push(h):h.frames?this.pendingMetadata.push(h):(this.pendingTracks.push(h.track),this.pendingBytes+=h.boxes.byteLength,"video"===h.track.type&&(this.videoTrack=h.track,this.pendingBoxes.push(h.boxes)),void("audio"===h.track.type&&(this.audioTrack=h.track,this.pendingBoxes.unshift(h.boxes))))}},_r.prototype=new n,_r.prototype.flush=function(b){var h,m,_,k,c=0,p={captions:[],captionStreams:{},metadata:[],info:{}},y=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(y=this.videoTrack.timelineStartInfo.pts,Jo.forEach(function(I){p.info[I]=this.videoTrack[I]},this)):this.audioTrack&&(y=this.audioTrack.timelineStartInfo.pts,Qo.forEach(function(I){p.info[I]=this.audioTrack[I]},this)),this.videoTrack||this.audioTrack){for(p.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,_=function(c){var m,p=d(),h=E(c);return(m=new Uint8Array(p.byteLength+h.byteLength)).set(p),m.set(h,p.byteLength),m}(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),k=0;k=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},_r.prototype.setRemux=function(b){this.remuxTracks=b},es=function(c){var m,_,p=this,h=!0;es.prototype.init.call(this),this.baseMediaDecodeTime=(c=c||{}).baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new ji.MetadataStream,y.aacStream=new ty,y.audioTimestampRolloverStream=new ji.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new ji.TimestampRolloverStream("timed-metadata"),y.adtsStream=new Dc,y.coalesceStream=new _r(c,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(k){y.aacStream.setTimestamp(k.timeStamp)}),y.aacStream.on("data",function(k){"timed-metadata"!==k.type&&"audio"!==k.type||y.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:p.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new tn(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Mc(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new ji.MetadataStream,y.packetStream=new ji.TransportPacketStream,y.parseStream=new ji.TransportParseStream,y.elementaryStream=new ji.ElementaryStream,y.timestampRolloverStream=new ji.TimestampRolloverStream,y.adtsStream=new Dc,y.h264Stream=new ny,y.captionStream=new ji.CaptionStream(c),y.coalesceStream=new _r(c,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(k){var I;if("metadata"===k.type){for(I=k.tracks.length;I--;)m||"video"!==k.tracks[I].type?!_&&"audio"===k.tracks[I].type&&((_=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime):(m=k.tracks[I]).timelineStartInfo.baseMediaDecodeTime=p.baseMediaDecodeTime;m&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new Mn(m,c),y.videoSegmentStream.on("log",p.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(O){_&&!c.keepOriginalTimestamps&&(_.timelineStartInfo=O,y.audioSegmentStream.setEarliestDts(O.dts-p.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",p.trigger.bind(p,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(O){_&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(O)}),y.videoSegmentStream.on("timingInfo",p.trigger.bind(p,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),_&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new tn(_,c),y.audioSegmentStream.on("log",p.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",p.trigger.bind(p,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",p.trigger.bind(p,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),p.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!m})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(k){k.dispatchType=y.metadataStream.dispatchType,p.trigger("id3Frame",k)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Mc(this,y)},this.setBaseMediaDecodeTime=function(y){var k=this.transmuxPipeline_;c.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,fi_clearDtsInfo(_),k.audioTimestampRolloverStream&&k.audioTimestampRolloverStream.discontinuity()),m&&(k.videoSegmentStream&&(k.videoSegmentStream.gopCache_=[]),m.timelineStartInfo.dts=void 0,m.timelineStartInfo.pts=void 0,fi_clearDtsInfo(m),k.captionStream.reset()),k.timestampRolloverStream&&k.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var k=this.transmuxPipeline_;c.remux=y,k&&k.coalesceStream&&k.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){m&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var k=this;return function(I){I.stream=y,k.trigger("log",I)}},this.push=function(y){if(h){var k=ay(y);k&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():!k&&"ts"!==this.transmuxPipeline_.type&&this.setupTsPipeline(),h=!1}this.transmuxPipeline_.headOfPipeline.push(y)},this.flush=function(){h=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},es.prototype=new n;var qc,Zc,tu,uy={Transmuxer:es,VideoSegmentStream:Mn,AudioSegmentStream:tn,AUDIO_PROPERTIES:Qo,VIDEO_PROPERTIES:Jo,generateSegmentTimingInfo:eu},ts_toUnsigned=function(c){return c>>>0},yr=function(c){var p="";return p+=String.fromCharCode(c[0]),p+=String.fromCharCode(c[1]),(p+=String.fromCharCode(c[2]))+String.fromCharCode(c[3])},fy=ts_toUnsigned,ft=function b(c,p){var m,_,y,k,I,h=[];if(!p.length)return null;for(m=0;m1?m+_:c.byteLength,y===p[0]&&(1===p.length?h.push(c.subarray(m+8,k)):(I=b(c.subarray(m+8,k),p.slice(1))).length&&(h=h.concat(I))),m=k;return h},py=ts_toUnsigned,my=e.getUint64,Uc=function(c){return{isLeading:(12&c[0])>>>2,dependsOn:3&c[0],isDependedOn:(192&c[1])>>>6,hasRedundancy:(48&c[1])>>>4,paddingValue:(14&c[1])>>>1,isNonSyncSample:1&c[1],degradationPriority:c[2]<<8|c[3]}},jc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Fn="undefined"!=typeof window?window:void 0!==jc?jc:"undefined"!=typeof self?self:{},Ty=function(c){for(var _,y,p=c.byteLength,h=[],m=1;m0?function(c){var p={version:c[0],flags:new Uint8Array(c.subarray(1,4))};return p.baseMediaDecodeTime=1===p.version?my(c.subarray(4)):py(c[4]<<24|c[5]<<16|c[6]<<8|c[7]),p}(fe[0]).baseMediaDecodeTime:0,ae=ft(O,["trun"]);p===G&&ae.length>0&&(Be=function(c,p,h){var m=p,_=h.defaultSampleDuration||0,y=h.defaultSampleSize||0,k=h.trackId,I=[];return c.forEach(function(O){var M=function(c){var G,p={version:c[0],flags:new Uint8Array(c.subarray(1,4)),samples:[]},h=new DataView(c.buffer,c.byteOffset,c.byteLength),m=1&p.flags[2],_=4&p.flags[2],y=1&p.flags[1],k=2&p.flags[1],I=4&p.flags[1],O=8&p.flags[1],L=h.getUint32(4),M=8;for(m&&(p.dataOffset=h.getInt32(M),M+=4),_&&L&&(G={flags:Uc(c.subarray(M,M+4))},M+=4,y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),O&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G),L--);L--;)G={},y&&(G.duration=h.getUint32(M),M+=4),k&&(G.size=h.getUint32(M),M+=4),I&&(G.flags=Uc(c.subarray(M,M+4)),M+=4),O&&(G.compositionTimeOffset=1===p.version?h.getInt32(M):h.getUint32(M),M+=4),p.samples.push(G);return p}(O).samples;M.forEach(function(G){void 0===G.duration&&(G.duration=_),void 0===G.size&&(G.size=y),G.trackId=k,G.dts=m,void 0===G.compositionTimeOffset&&(G.compositionTimeOffset=0),"bigint"==typeof m?(G.pts=m+Fn.BigInt(G.compositionTimeOffset),m+=Fn.BigInt(G.duration)):(G.pts=m+G.compositionTimeOffset,m+=G.duration)}),I=I.concat(M)}),I}(ae,Se,M),Ct=function(c,p,h){var y,k,I,O,m=new DataView(c.buffer,c.byteOffset,c.byteLength),_={logs:[],seiNals:[]};for(k=0;k+40;){var G=h.shift();this.parse(G,O,L)}return M=function(c,p,h){if(null===p)return null;var _=Cy(c,p)[p]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:h}}(I,m,_),M&&M.logs&&(y.logs=y.logs.concat(M.logs)),null!==M&&M.seiNals?(this.pushNals(M.seiNals),this.flushStream(),y):y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(I){if(!this.isInitialized()||!I||0===I.length)return null;I.forEach(function(O){p.push(O)})},this.flushStream=function(){if(!this.isInitialized())return null;k?p.partialFlush():p.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;p.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){h=[],m=null,_=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},is=ts_toUnsigned,Un=function(c){return("00"+c.toString(16)).slice(-2)},Iy=e.getUint64;qc=function(c,p){var m=ft(p,["moof","traf"]).reduce(function(_,y){var G,fe,k=ft(y,["tfhd"])[0],I=is(k[4]<<24|k[5]<<16|k[6]<<8|k[7]),O=c[I]||9e4,L=ft(y,["tfdt"])[0],M=new DataView(L.buffer,L.byteOffset,L.byteLength);return"bigint"==typeof(G=1===L[0]?Iy(L.subarray(4,12)):M.getUint32(4))?fe=G/Fn.BigInt(O):"number"==typeof G&&!isNaN(G)&&(fe=G/O),fe11?(_.codec+=".",_.codec+=Un(Se[9]),_.codec+=Un(Se[10]),_.codec+=Un(Se[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(Se=fe.subarray(28),"esds"===yr(Se.subarray(4,8))&&Se.length>20&&0!==Se[19]?(_.codec+="."+Un(Se[19]),_.codec+="."+Un(Se[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var Be=ft(m,["mdia","mdhd"])[0];Be&&(_.timescale=tu(Be)),h.push(_)}),h};var zc_startTime=qc,zc_tracks=Zc,Kc=function(c){var p=31&c[1];return(p<<=8)|c[2]},rs=function(c){return!!(64&c[1])},ns=function(c){var p=0;return(48&c[3])>>>4>1&&(p+=c[4]+1),p},iu=function(c){switch(c){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Ny={parseType:function(c,p){var h=Kc(c);return 0===h?"pat":h===p?"pmt":p?"pes":null},parsePat:function(c){var p=rs(c),h=4+ns(c);return p&&(h+=c[h]+1),(31&c[h+10])<<8|c[h+11]},parsePmt:function(c){var p={},h=rs(c),m=4+ns(c);if(h&&(m+=c[m]+1),1&c[m+5]){var y;y=3+((15&c[m+1])<<8|c[m+2])-4;for(var I=12+((15&c[m+10])<<8|c[m+11]);I=c.byteLength)return null;var _,m=null;return 192&(_=c[h+7])&&((m={}).pts=(14&c[h+9])<<27|(255&c[h+10])<<20|(254&c[h+11])<<12|(255&c[h+12])<<5|(254&c[h+13])>>>3,m.pts*=4,m.pts+=(6&c[h+13])>>>1,m.dts=m.pts,64&_&&(m.dts=(14&c[h+14])<<27|(255&c[h+15])<<20|(254&c[h+16])<<12|(255&c[h+17])<<5|(254&c[h+18])>>>3,m.dts*=4,m.dts+=(6&c[h+18])>>>1)),m},videoPacketContainsKeyFrame:function(c){for(var p=4+ns(c),h=c.subarray(p),m=0,_=0,y=!1;_3&&"slice_layer_without_partitioning_rbsp_idr"===iu(31&h[_+3])&&(y=!0),y}},rn=Cc_handleRollover,et={};et.ts=Ny,et.aac=Qa;var Tr=9e4,qt=188,$c=function(c,p,h){for(var y,I,O,L,m=0,_=qt,M=!1;_<=c.byteLength;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m++,_++;else{if("pes"===(y=c.subarray(m,_),et.ts.parseType(y,p.pid))&&(I=et.ts.parsePesType(y,p.table),O=et.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&O&&(L=et.ts.parsePesTime(y))&&(L.type="audio",h.audio.push(L),M=!0)),M)break;m+=qt,_+=qt}for(m=(_=c.byteLength)-qt,M=!1;m>=0;)if(71!==c[m]||71!==c[_]&&_!==c.byteLength)m--,_--;else{if("pes"===(y=c.subarray(m,_),et.ts.parseType(y,p.pid))&&(I=et.ts.parsePesType(y,p.table),O=et.ts.parsePayloadUnitStartIndicator(y),"audio"===I&&O&&(L=et.ts.parsePesTime(y))&&(L.type="audio",h.audio.push(L),M=!0)),M)break;m-=qt,_-=qt}},Uy=function(c,p,h){for(var y,I,O,L,M,G,fe,m=0,_=qt,Se=!1,ae={data:[],size:0};_=0;)if(71!==c[m]||71!==c[_])m--,_--;else{if("pes"===(y=c.subarray(m,_),et.ts.parseType(y,p.pid))&&(I=et.ts.parsePesType(y,p.table),O=et.ts.parsePayloadUnitStartIndicator(y),"video"===I&&O&&(L=et.ts.parsePesTime(y))&&(L.type="video",h.video.push(L),Se=!0)),Se)break;m-=qt,_-=qt}},qy_inspect=function(c,p){var m;return m=et.aac.isLikelyAacData(c)?function(c){for(var I,p=!1,h=0,m=null,_=null,y=0,k=0;c.length-k>=3;){switch(et.aac.parseType(c,k)){case"timed-metadata":if(c.length-k<10){p=!0;break}if((y=et.aac.parseId3TagSize(c,k))>c.length){p=!0;break}null===_&&(I=c.subarray(k,k+y),_=et.aac.parseAacTimestamp(I)),k+=y;break;case"audio":if(c.length-k<7){p=!0;break}if((y=et.aac.parseAdtsSize(c,k))>c.length){p=!0;break}null===m&&(I=c.subarray(k,k+y),m=et.aac.parseSampleRate(I)),h++,k+=y;break;default:k++}if(p)return null}if(null===m||null===_)return null;var L=Tr/m;return{audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+1024*h*L,pts:_+1024*h*L}]}}(c):function(c){var p={pid:null,table:null},h={};for(var m in function(c,p){for(var _,h=0,m=qt;m0}(x)){t.isFmp4=!0;var S=t.map.tracks,F={isFmp4:!0,hasVideo:!!S.video,hasAudio:!!S.audio};S.audio&&S.audio.codec&&"enca"!==S.audio.codec&&(F.audioCodec=S.audio.codec),S.video&&S.video.codec&&"encv"!==S.video.codec&&(F.videoCodec=S.video.codec),S.video&&S.audio&&(F.isMuxed=!0),e(t,F);var U=function(W){g(t,{data:x,type:F.hasAudio&&!F.isMuxed?"audio":"video"}),W&&W.length&&d(t,W),T(null,t,{})};ka({action:"probeMp4StartTime",timescales:t.map.timescales,data:x,transmuxer:t.transmuxer,callback:function(W){var q=W.data,ne=W.startTime;r=q.buffer,t.bytes=x=q,F.hasAudio&&!F.isMuxed&&i(t,"audio","start",ne),F.hasVideo&&i(t,"video","start",ne),S.video&&q.byteLength&&t.transmuxer?ka({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:x,timescales:t.map.timescales,trackIds:[S.video.id],callback:function(z){r=z.data.buffer,t.bytes=x=z.data,z.logs.forEach(function(ye){E(N.mergeOptions(ye,{stream:"mp4CaptionParser"}))}),U(z.captions)}}):U()}})}else{if(t.transmuxer)return void 0===t.container&&(t.container=ys(x)),"ts"!==t.container&&"aac"!==t.container?(e(t,{hasAudio:!1,hasVideo:!1}),void T(null,t,{})):void Jm({segment:t,bytes:r,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});T(null,t,{})}},Wd=function(n,t){var l,r=n.id,e=n.key,i=n.encryptedBytes,a=n.decryptionWorker;a.addEventListener("message",function d(f){if(f.data.source===r){a.removeEventListener("message",d);var v=f.data.decrypted;t(new Uint8Array(v.bytes,v.byteOffset,v.byteLength))}}),l=e.bytes.slice?e.bytes.slice():new Uint32Array(Array.prototype.slice.call(e.bytes)),a.postMessage(Cd({source:r,encrypted:i,key:l,iv:e.iv}),[i.buffer,l.buffer])},ng=function(n){var t=n.xhr,r=n.xhrOptions,i=n.segment,a=n.abortFn,o=n.progressFn,l=n.trackInfoFn,d=n.timingInfoFn,f=n.videoSegmentTimingInfoFn,v=n.audioSegmentTimingInfoFn,g=n.id3Fn,T=n.captionsFn,E=n.isEndOfTimeline,x=n.endedTimelineFn,S=n.dataFn,H=[],W=function(n){var t=n.activeXhrs,r=n.decryptionWorker,e=n.trackInfoFn,i=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog,x=0,S=!1;return function(F,U){if(!S){if(F)return S=!0,Oo(t),T(F,U);if((x+=1)===t.length){var H=function(){if(U.encryptedBytes)return function(n){var r=n.segment,e=n.trackInfoFn,i=n.timingInfoFn,a=n.videoSegmentTimingInfoFn,o=n.audioSegmentTimingInfoFn,l=n.id3Fn,d=n.captionsFn,f=n.isEndOfTimeline,v=n.endedTimelineFn,g=n.dataFn,T=n.doneFn,E=n.onTransmuxerLog;Wd({id:r.requestId,key:r.key,encryptedBytes:r.encryptedBytes,decryptionWorker:n.decryptionWorker},function(x){r.bytes=x,qd({segment:r,bytes:r.bytes,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})})}({decryptionWorker:r,segment:U,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E});qd({segment:U,bytes:U.bytes,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:d,isEndOfTimeline:f,endedTimelineFn:v,dataFn:g,doneFn:T,onTransmuxerLog:E})};if(U.endOfAllRequests=Date.now(),U.map&&U.map.encryptedBytes&&!U.map.bytes)return Wd({decryptionWorker:r,id:U.requestId+"-init",encryptedBytes:U.map.encryptedBytes,key:U.map.key},function(W){U.map.bytes=W,Vd(U,function(q){if(q)return Oo(t),T(q,U);H()})});H()}}}}({activeXhrs:H,decryptionWorker:n.decryptionWorker,trackInfoFn:l,timingInfoFn:d,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:v,id3Fn:g,captionsFn:T,isEndOfTimeline:E,endedTimelineFn:x,dataFn:S,doneFn:n.doneFn,onTransmuxerLog:n.onTransmuxerLog});if(i.key&&!i.key.bytes){var q=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&q.push(i.map.key);var z=t(N.mergeOptions(r,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),jd(i,q,W));H.push(z)}if(i.map&&!i.map.bytes){if(i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri)){var Pe=t(N.mergeOptions(r,{uri:i.map.key.resolvedUri,responseType:"arraybuffer"}),jd(i,[i.map.key],W));H.push(Pe)}var st=N.mergeOptions(r,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Io(i.map)}),Mt=function(n){var t=n.segment,r=n.finishProcessingFn;return function(e,i){var a=Ro(e,i);if(a)return r(a,t);var o=new Uint8Array(i.response);if(t.map.key)return t.map.encryptedBytes=o,r(null,t);t.map.bytes=o,Vd(t,function(l){if(l)return l.xhr=i,l.status=i.status,r(l,t);r(null,t)})}}({segment:i,finishProcessingFn:W}),Qe=t(st,Mt);H.push(Qe)}var hr=N.mergeOptions(r,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:Io(i)}),ai=t(hr,function(n){var t=n.segment,r=n.finishProcessingFn,e=n.responseType;return function(i,a){var o=Ro(i,a);if(o)return r(o,t);var l="arraybuffer"!==e&&a.responseText?function(n){for(var t=new Uint8Array(new ArrayBuffer(n.length)),r=0;r1)return ag("multiple "+r+" codecs found as attributes: "+t[r].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[r]=null);t[r]=t[r][0]}),t},Zd=function(n){var t=0;return n.audio&&t++,n.video&&t++,t},An=function(n,t){var r=t.attributes||{},e=Aa(function(n){var t=n.attributes||{};if(t.CODECS)return We(t.CODECS)}(t)||[]);if(Gd(n,t)&&!e.audio&&!function(n,t){if(!Gd(n,t))return!0;var e=n.mediaGroups.AUDIO[(t.attributes||{}).AUDIO];for(var i in e)if(!e[i].uri&&!e[i].playlists)return!0;return!1}(n,t)){var i=Aa(function(n,t){if(!n.mediaGroups.AUDIO||!t)return null;var r=n.mediaGroups.AUDIO[t];if(!r)return null;for(var e in r){var i=r[e];if(i.default&&i.playlists)return We(i.playlists[0].attributes.CODECS)}return null}(n,r.AUDIO)||[]);i.audio&&(e.audio=i.audio)}return e},wa=ci("PlaylistSelector"),zd=function(n){if(n&&n.playlist){var t=n.playlist;return JSON.stringify({id:t.id,bandwidth:n.bandwidth,width:n.width,height:n.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Ia=function(n,t){if(!n)return"";var r=P().getComputedStyle(n);return r?r[t]:""},Qr=function(n,t){var r=n.slice();n.sort(function(e,i){var a=t(e,i);return 0===a?r.indexOf(e)-r.indexOf(i):a})},Mo=function(n,t){var r,e;return n.attributes.BANDWIDTH&&(r=n.attributes.BANDWIDTH),r=r||P().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(e=t.attributes.BANDWIDTH),r-(e||P().Number.MAX_VALUE)},Kd=function(n,t,r,e,i,a){if(n){var o={bandwidth:t,width:r,height:e,limitRenditionByPlayerDimensions:i},l=n.playlists;Kt.isAudioOnly(n)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var d=l.map(function(ge){var Pe=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.width,st=ge.attributes&&ge.attributes.RESOLUTION&&ge.attributes.RESOLUTION.height;return{bandwidth:ge.attributes&&ge.attributes.BANDWIDTH||P().Number.MAX_VALUE,width:Pe,height:st,playlist:ge}});Qr(d,function(ge,Ye){return ge.bandwidth-Ye.bandwidth});var f=(d=d.filter(function(ge){return!Kt.isIncompatible(ge.playlist)})).filter(function(ge){return Kt.isEnabled(ge.playlist)});f.length||(f=d.filter(function(ge){return!Kt.isDisabled(ge.playlist)}));var v=f.filter(function(ge){return ge.bandwidth*wt.BANDWIDTH_VARIANCEr||ge.height>e})).filter(function(ge){return ge.width===H[0].width&&ge.height===H[0].height}),g=W[W.length-1],q=W.filter(function(ge){return ge.bandwidth===g.bandwidth})[0]),a.experimentalLeastPixelDiffSelector){var he=S.map(function(ge){return ge.pixelDiff=Math.abs(ge.width-r)+Math.abs(ge.height-e),ge});Qr(he,function(ge,Ye){return ge.pixelDiff===Ye.pixelDiff?Ye.bandwidth-ge.bandwidth:ge.pixelDiff-Ye.pixelDiff}),ne=he[0]}var z=ne||q||U||T||f[0]||d[0];if(z&&z.playlist){var ye="sortedPlaylistReps";return ne?ye="leastPixelDiffRep":q?ye="resolutionPlusOneRep":U?ye="resolutionBestRep":T?ye="bandwidthBestRep":f[0]&&(ye="enabledPlaylistReps"),wa("choosing "+zd(z)+" using "+ye+" with options",o),z.playlist}return wa("could not choose a playlist with options",o),null}},$d=function(){var n=this.useDevicePixelRatio&&P().devicePixelRatio||1;return Kd(this.playlists.master,this.systemBandwidth,parseInt(Ia(this.tech_.el(),"width"),10)*n,parseInt(Ia(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},wn=function(n,t,r){var e,i;if(r&&r.cues)for(e=r.cues.length;e--;)(i=r.cues[e]).startTime>=n&&i.endTime<=t&&r.removeCue(i)},Xd=function(n){return"number"==typeof n&&isFinite(n)},Da=1/60,Jr=function(n){var t=n.startOfSegment,r=n.duration,e=n.segment,i=n.part,a=n.playlist,o=a.mediaSequence,l=a.id,d=a.segments,v=n.mediaIndex,g=n.partIndex,T=n.timeline,E=(void 0===d?[]:d).length-1,x="mediaIndex/partIndex increment";n.getMediaInfoForTime?x="getMediaInfoForTime ("+n.getMediaInfoForTime+")":n.isSyncRequest&&(x="getSyncSegmentCandidate (isSyncRequest)"),n.independent&&(x+=" with independent "+n.independent);var S="number"==typeof g,F=n.segment.uri?"segment":"pre-segment",U=S?dd({preloadSegment:e})-1:0;return F+" ["+(o+v)+"/"+(o+E)+"]"+(S?" part ["+g+"/"+U+"]":"")+" segment start/end ["+e.start+" => "+e.end+"]"+(S?" part start/end ["+i.start+" => "+i.end+"]":"")+" startOfSegment ["+t+"] duration ["+r+"] timeline ["+T+"] selected by ["+x+"] playlist ["+l+"]"},Qd=function(n){return n+"TimingInfo"},Jd=function(n){var t=n.timelineChangeController,e=n.segmentTimeline,i=n.loaderType,a=n.audioDisabled;if(n.currentTimeline===e)return!1;if("audio"===i){var o=t.lastTimelineChange({type:"main"});return!o||o.to!==e}if("main"===i&&a){var l=t.pendingTimelineChange({type:"audio"});return!(l&&l.to===e)}return!1},ec=function(n){var t=n.segmentDuration,r=n.maxDuration;return!!t&&Math.round(t)>r+Qi},No=function(s){function n(r,e){var i;if(i=s.call(this)||this,!r)throw new TypeError("Initialization settings are required");if("function"!=typeof r.currentTime)throw new TypeError("No currentTime getter specified");if(!r.mediaSource)throw new TypeError("No MediaSource specified");return i.bandwidth=r.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.partIndex=null,i.hasPlayed_=r.hasPlayed,i.currentTime_=r.currentTime,i.seekable_=r.seekable,i.seeking_=r.seeking,i.duration_=r.duration,i.mediaSource_=r.mediaSource,i.vhs_=r.vhs,i.loaderType_=r.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=r.segmentMetadataTrack,i.goalBufferLength_=r.goalBufferLength,i.sourceType_=r.sourceType,i.sourceUpdater_=r.sourceUpdater,i.inbandTextTracks_=r.inbandTextTracks,i.state_="INIT",i.timelineChangeController_=r.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.parse708captions_=r.parse708captions,i.captionServices_=r.captionServices,i.experimentalExactManifestTimings=r.experimentalExactManifestTimings,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=N.browser.IE_VERSION>=11,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=r.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=r.decrypter,i.syncController_=r.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",function(){i.isEndOfStream_()||(i.ended_=!1)}),i.fetchAtBuffer_=!1,i.logger_=ci("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(Ae(i),"state",{get:function(){return this.state_},set:function(o){o!==this.state_&&(this.logger_(this.state_+" -> "+o),this.state_=o,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i}X(n,s);var t=n.prototype;return t.createTransmuxer_=function(){return function(n){var t=new Vm;t.currentTransmux=null,t.transmuxQueue=[];var r=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,r.call(t)},t.postMessage({action:"init",options:n}),t}({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},t.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},t.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},t.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},t.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},t.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,P().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},t.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},t.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},t.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Lo_reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},t.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return N.createTimeRanges();if("main"===this.loaderType_){var a=e.hasVideo;if(a&&e.hasAudio&&!this.audioDisabled_&&!e.isMuxed)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},t.initSegmentForMap=function(e,i){if(void 0===i&&(i=!1),!e)return null;var a=Ca(e),o=this.initSegments_[a];return i&&!o&&e.bytes&&(this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e},t.segmentKey=function(e,i){if(void 0===i&&(i=!1),!e)return null;var a=kd(e),o=this.keyCache_[a];this.cacheEncryptionKeys_&&i&&!o&&e.bytes&&(this.keyCache_[a]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});var l={resolvedUri:(o||e).resolvedUri};return o&&(l.bytes=o.bytes),l},t.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},t.load=function(){if(this.monitorBuffer_(),this.playlist_){if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},t.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},t.playlist=function(e,i){if(void 0===i&&(i={}),e){var a=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var l=null;if(a&&(a.id?l=a.id:a.uri&&(l=a.uri)),this.logger_("playlist update ["+l+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var d=e.mediaSequence-a.mediaSequence;if(this.logger_("live window shift ["+d+"]"),null!==this.mediaIndex)if(this.mediaIndex-=d,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var f=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!f.parts||!f.parts.length||!f.parts[this.partIndex])){var v=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=v}}o&&(o.mediaIndex-=d,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,e)}},t.pause=function(){this.checkBufferTimeout_&&(P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},t.paused=function(){return null===this.checkBufferTimeout_},t.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},t.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},t.resyncLoader=function(){this.transmuxer_&&Lo_reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},t.remove=function(e,i,a,o){if(void 0===a&&(a=function(){}),void 0===o&&(o=!1),i===1/0&&(i=this.duration_()),i<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var l=1,d=function(){0==--l&&a()};for(var f in(o||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(e,i,d)),(o||"main"===this.loaderType_)&&(this.gopBuffer_=function(n,t,r,e){for(var i=Math.ceil((t-e)*Zn.ONE_SECOND_IN_TS),a=Math.ceil((r-e)*Zn.ONE_SECOND_IN_TS),o=n.slice(),l=n.length;l--&&!(n[l].pts<=a););if(-1===l)return o;for(var d=l+1;d--&&!(n[d].pts<=i););return d=Math.max(d,0),o.splice(d,l-d+1),o}(this.gopBuffer_,e,i,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(e,i,d)),this.inbandTextTracks_)wn(e,i,this.inbandTextTracks_[f]);wn(e,i,this.segmentMetadataTrack_),d()}else this.logger_("skipping remove because no source updater or starting media info")},t.monitorBuffer_=function(){this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),1)},t.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&P().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=P().setTimeout(this.monitorBufferTick_.bind(this),500)},t.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();!e||("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},t.isEndOfStream_=function(e,i,a){if(void 0===e&&(e=this.mediaIndex),void 0===i&&(i=this.playlist_),void 0===a&&(a=this.partIndex),!i||!this.mediaSource_)return!1;var o="number"==typeof e&&i.segments[e];return i.endList&&"open"===this.mediaSource_.readyState&&e+1===i.segments.length&&(!o||!o.parts||a+1===o.parts.length)},t.chooseNextRequest_=function(){var e=this.buffered_(),i=od(e)||0,a=yo(e,this.currentTime_()),o=!this.hasPlayed_()&&a>=1,l=a>=this.goalBufferLength_(),d=this.playlist_.segments;if(!d.length||o||l)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var f={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(f.isSyncRequest)f.mediaIndex=function(n,t,r){t=t||[];for(var e=[],i=0,a=0;ar))return a}return 0===e.length?0:e[e.length-1]}(this.currentTimeline_,d,i);else if(null!==this.mediaIndex){var v=d[this.mediaIndex],g="number"==typeof this.partIndex?this.partIndex:-1;f.startOfSegment=v.end?v.end:i,v.parts&&v.parts[g+1]?(f.mediaIndex=this.mediaIndex,f.partIndex=g+1):f.mediaIndex=this.mediaIndex+1}else{var T=Kt.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?i:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),E=T.segmentIndex,x=T.startTime,S=T.partIndex;f.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+i:"currentTime "+this.currentTime_(),f.mediaIndex=E,f.startOfSegment=x,f.partIndex=S}var F=d[f.mediaIndex],U=F&&"number"==typeof f.partIndex&&F.parts&&F.parts[f.partIndex];if(!F||"number"==typeof f.partIndex&&!U)return null;if("number"!=typeof f.partIndex&&F.parts&&(f.partIndex=0,U=F.parts[0]),!a&&U&&!U.independent)if(0===f.partIndex){var H=d[f.mediaIndex-1],W=H.parts&&H.parts.length&&H.parts[H.parts.length-1];W&&W.independent&&(f.mediaIndex-=1,f.partIndex=H.parts.length-1,f.independent="previous segment")}else F.parts[f.partIndex-1].independent&&(f.partIndex-=1,f.independent="previous part");return f.mediaIndex>=d.length-1&&this.mediaSource_&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?null:this.generateSegmentInfo_(f)},t.generateSegmentInfo_=function(e){var i=e.independent,a=e.playlist,o=e.mediaIndex,l=e.startOfSegment,d=e.isSyncRequest,f=e.partIndex,v=e.forceTimestampOffset,g=e.getMediaInfoForTime,T=a.segments[o],E="number"==typeof f&&T.parts[f],x={requestId:"segment-loader-"+Math.random(),uri:E&&E.resolvedUri||T.resolvedUri,mediaIndex:o,partIndex:E?f:null,isSyncRequest:d,startOfSegment:l,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:T.timeline,duration:E&&E.duration||T.duration,segment:T,part:E,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:g,independent:i},S=void 0!==v?v:this.isPendingTimestampOffset_;x.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:T.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:S});var F=od(this.sourceUpdater_.audioBuffered());return"number"==typeof F&&(x.audioAppendStart=F-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(x.gopsToAlignWith=function(n,t,r){if(null==t||!n.length)return[];var i,e=Math.ceil((t-r+3)*Zn.ONE_SECOND_IN_TS);for(i=0;ie);i++);return n.slice(i)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),x},t.timestampOffsetForSegment_=function(e){return function(n){var t=n.segmentTimeline,r=n.currentTimeline,e=n.startOfSegment,i=n.buffered;return n.overrideCheck||t!==r?t "+T+" for "+f),function(n,t,r){if(!n[r]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var e=r;/^cc708_/.test(r)&&(e="SERVICE"+r.split("_")[1]);var i=t.textTracks().getTrackById(e);if(i)n[r]=i;else{var o=r,l=r,d=!1,f=(t.options_.vhs&&t.options_.vhs.captionServices||{})[e];f&&(o=f.label,l=f.language,d=f.default),n[r]=t.addRemoteTextTrack({kind:"captions",id:e,default:d,label:o,language:l},!1).track}}}(x,a.vhs_.tech_,f),wn(g,T,x[f]),function(n){var t=n.inbandTextTracks,r=n.captionArray,e=n.timestampOffset;if(r){var i=P().WebKitDataCue||P().VTTCue;r.forEach(function(a){t[a.stream].addCue(new i(a.startTime+e,a.endTime+e,a.text))})}}({captionArray:E,inbandTextTracks:x,timestampOffset:l})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},t.handleId3_=function(e,i,a){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,a));var l=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();(function(n,t,r){n.metadataTrack_||(n.metadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,n.metadataTrack_.inBandMetadataTrackDispatchType=t)})(this.inbandTextTracks_,a,this.vhs_.tech_),function(n){var t=n.inbandTextTracks,r=n.metadataArray,e=n.timestampOffset,i=n.videoDuration;if(r){var a=P().WebKitDataCue||P().VTTCue,o=t.metadataTrack_;if(o&&(r.forEach(function(T){var E=T.cueTime+e;"number"!=typeof E||P().isNaN(E)||E<0||!(E<1/0)||T.frames.forEach(function(x){var S=new a(E,E,x.value||x.url||x.data||"");S.frame=x,S.value=x,function(n){Object.defineProperties(n.frame,{id:{get:function(){return N.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),n.value.key}},value:{get:function(){return N.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),n.value.data}},privateData:{get:function(){return N.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),n.value.data}}})}(S),o.addCue(S)})}),o.cues&&o.cues.length)){for(var l=o.cues,d=[],f=0;f1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+fr(f).join(", ")),v.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+fr(v).join(", "));var g=f.length?f.start(0):0,T=f.length?f.end(f.length-1):0,E=v.length?v.start(0):0,x=v.length?v.end(v.length-1):0;if(T-g<=1&&x-E<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+d.byteLength+", audio buffer: "+fr(f).join(", ")+", video buffer: "+fr(v).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:o,type:l,bytes:d}));var F=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+F),this.remove(0,F,function(){a.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),a.waitingOnRemove_=!1,a.quotaExceededErrorRetryTimeout_=P().setTimeout(function(){a.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),a.quotaExceededErrorRetryTimeout_=null,a.processCallQueue_()},1e3)},!0)},t.handleAppendError_=function(e,i){var a=e.segmentInfo,o=e.type,l=e.bytes;if(i){if(22===i.code)return void this.handleQuotaExceededError_({segmentInfo:a,type:o,bytes:l});this.logger_("Received non QUOTA_EXCEEDED_ERR on append",i),this.error(o+" append of "+l.length+"b failed for segment #"+a.mediaIndex+" in playlist "+a.playlist.id),this.trigger("appenderror")}},t.appendToSourceBuffer_=function(e){var i=e.segmentInfo,a=e.type,o=e.initSegment,l=e.data,d=e.bytes;if(!d){var f=[l],v=l.byteLength;o&&(f.unshift(o),v+=o.byteLength),d=function(n){var r,t=0;return n.bytes&&(r=new Uint8Array(n.bytes),n.segments.forEach(function(e){r.set(e,t),t+=e.byteLength})),r}({bytes:v,segments:f})}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:d},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:d}))},t.handleSegmentTimingInfo_=function(e,i,a){if(this.pendingSegment_&&i===this.pendingSegment_.requestId){var o=this.pendingSegment_.segment,l=e+"TimingInfo";o[l]||(o[l]={}),o[l].transmuxerPrependedSeconds=a.prependedContentDuration||0,o[l].transmuxedPresentationStart=a.start.presentation,o[l].transmuxedDecodeStart=a.start.decode,o[l].transmuxedPresentationEnd=a.end.presentation,o[l].transmuxedDecodeEnd=a.end.decode,o[l].baseMediaDecodeTime=a.baseMediaDecodeTime}},t.appendData_=function(e,i){var a=i.type,o=i.data;if(o&&o.byteLength&&("audio"!==a||!this.audioDisabled_)){var l=this.getInitSegmentAndUpdateState_({type:a,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:a,initSegment:l,data:o})}},t.loadSegment_=function(e){var i=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(function(){var a=it({},e,{forceTimestampOffset:!0});it(e,i.generateSegmentInfo_(a)),i.isPendingTimestampOffset_=!1,i.updateTransmuxerAndRequestSegment_(e)})},t.updateTransmuxerAndRequestSegment_=function(e){var i=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var a=this.createSimplifiedSegmentObj_(e),f=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)||null!==this.mediaIndex&&e.timeline!==this.currentTimeline_&&e.timeline>0;this.logger_("Requesting "+Jr(e)),a.map&&!a.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=ng({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:a,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:f,endedTimelineFn:function(){i.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(g){var T=g.message,E=g.level,x=g.stream;i.logger_(Jr(e)+" logged from transmuxer stream "+x+" as a "+E+": "+T)}})},t.trimBackBuffer_=function(e){var i=function(n,t,r){var e=t-wt.BACK_BUFFER_LENGTH;return n.length&&(e=Math.max(e,n.start(0))),Math.min(t-r,e)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)},t.createSimplifiedSegmentObj_=function(e){var i=e.segment,a=e.part,o={resolvedUri:a?a.resolvedUri:i.resolvedUri,byterange:a?a.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},l=e.playlist.segments[e.mediaIndex-1];if(l&&l.timeline===i.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),i.key){var d=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(i.key),o.key.iv=d}return i.map&&(o.map=this.initSegmentForMap(i.map)),o},t.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},t.saveBandwidthRelatedStats_=function(e,i){this.pendingSegment_.byteLength=i.bytesReceived,e=e);i++);return n.slice(0,i).concat(t)}(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}},t.setTimeMapping_=function(e){var i=this.syncController_.mappingForTimeline(e);null!==i&&(this.timeMapping_=i)},t.updateMediaSecondsLoaded_=function(e){this.mediaSecondsLoaded+="number"==typeof e.start&&"number"==typeof e.end?e.end-e.start:e.duration},t.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},t.trueSegmentStart_=function(e){var i=e.currentStart,o=e.mediaIndex,l=e.firstVideoFrameTimeForData;if(void 0!==i)return i;if(!e.useVideoTimingInfo)return e.audioTimingInfo.start;var T=e.playlist.segments[o-1];return 0!==o&&T&&void 0!==T.start&&T.end===l+e.currentVideoTimestampOffset?e.videoTimingInfo.start:l},t.waitForAppendsToComplete_=function(e){var i=this.getCurrentMediaInfo_(e);if(!i)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var d="main"===this.loaderType_&&i.hasVideo,f=!this.audioDisabled_&&i.hasAudio&&!i.isMuxed;if(e.waitingOnAppends=0,!e.hasAppendedData_)return!e.timingInfo&&"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);d&&e.waitingOnAppends++,f&&e.waitingOnAppends++,d&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),f&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},t.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},t.checkForIllegalMediaSwitch=function(e){var i=function(n,t,r){return"main"===n&&t&&r?r.hasAudio||r.hasVideo?t.hasVideo&&!r.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&r.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!i&&(this.error({message:i,blacklistDuration:1/0}),this.trigger("error"),!0)},t.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var i=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset")}},t.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var i=this.getMediaInfo_(),o="main"===this.loaderType_&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;!o||(e.timingInfo.end="number"==typeof o.end?o.end:o.start+e.duration)},t.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var i=function(n,t){if("hls"!==t)return null;var r=function(n){var t=0;return["video","audio"].forEach(function(r){var e=n[r+"TimingInfo"];if(e){var o,i=e.start,a=e.end;"bigint"==typeof i||"bigint"==typeof a?o=P().BigInt(a)-P().BigInt(i):"number"==typeof i&&"number"==typeof a&&(o=a-i),void 0!==o&&o>t&&(t=o)}}),"bigint"==typeof t&&t3*e.playlist.targetDuration,d=o&&o.end&&this.currentTime_()-o.end>3*e.playlist.partTargetDuration;if(l||d)return this.logger_("bad "+(l?"segment":"part")+" "+Jr(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Jr(e))},t.recordThroughput_=function(e){if(e.duration=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},t.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},t.segmentRequestFinished_=function(e,i,a){var o=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(i.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return-101===e.code&&this.handleTimeout_(),-102===e.code?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var l=this.pendingSegment_;this.saveBandwidthRelatedStats_(l.duration,i.stats),this.state="APPENDING",this.trigger("appending");var d=l.segment;if(d.map&&(d.map.bytes=i.map.bytes),l.bytes=i.bytes,"function"!=typeof P().WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var f,v=function(){o.subtitlesTrack_.tech_.off("vttjsloaded",f),o.stopForError({message:"Error loading vtt.js"})};return f=function(){o.subtitlesTrack_.tech_.off("vttjserror",v),o.segmentRequestFinished_(e,i,a)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",f),void this.subtitlesTrack_.tech_.one("vttjserror",v)}d.requested=!0;try{this.parseVTTCues_(l)}catch(g){return void this.stopForError({message:g.message})}if(this.updateTimeMapping_(l,this.syncController_.timelines[l.timeline],this.playlist_),l.timingInfo=l.cues.length?{start:l.cues[0].startTime,end:l.cues[l.cues.length-1].endTime}:{start:l.startOfSegment,end:l.startOfSegment+l.duration},l.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");l.byteLength=l.bytes.byteLength,this.mediaSecondsLoaded+=d.duration,l.cues.forEach(function(g){o.subtitlesTrack_.addCue(o.featuresNativeTextTracks_?new(P().VTTCue)(g.startTime,g.endTime,g.text):g)}),function(n){var t=n.cues;if(t)for(var r=0;r1&&e.push(t[a]);e.length&&e.forEach(function(o){return n.removeCue(o)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},t.handleData_=function(){},t.updateTimingInfoEnd_=function(){},t.parseVTTCues_=function(e){var i,a=!1;"function"==typeof P().TextDecoder?i=new(P().TextDecoder)("utf8"):(i=P().WebVTT.StringDecoder(),a=!0);var o=new(P().WebVTT.Parser)(P(),P().vttjs,i);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=function(f){e.timestampmap=f},o.onparsingerror=function(f){N.log.warn("Error encountered when parsing cues: "+f.message)},e.segment.map){var l=e.segment.map.bytes;a&&(l=ac(l)),o.parse(l)}var d=e.bytes;a&&(d=ac(d)),o.parse(d),o.flush()},t.updateTimeMapping_=function(e,i,a){var o=e.segment;if(i){if(!e.cues.length)return void(o.empty=!0);var l=e.timestampmap,d=l.MPEGTS/Zn.ONE_SECOND_IN_TS-l.LOCAL+i.mapping;e.cues.forEach(function(g){g.startTime+=d,g.endTime+=d}),a.syncInfo||(a.syncInfo={mediaSequence:a.mediaSequence+e.mediaIndex,time:Math.min(e.cues[0].startTime,e.cues[e.cues.length-1].startTime-o.duration)})}},n}(No),Og=function(n,t){for(var r=n.cues,e=0;e=i.adStartTime&&t<=i.adEndTime)return i}return null},oc=[{name:"VOD",run:function(n,t,r,e,i){return r!==1/0?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"ProgramDateTime",run:function(n,t,r,e,i){if(!Object.keys(n.timelineToDatetimeMappings).length)return null;var a=null,o=null,l=bo(t);i=i||0;for(var d=0;d=E)&&(o=E,a={time:T,segmentIndex:v.segmentIndex,partIndex:v.partIndex})}}return a}},{name:"Discontinuity",run:function(n,t,r,e,i){var a=null;if(i=i||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=null,l=0;l=g)&&(o=g,a={time:v.time,segmentIndex:d,partIndex:null})}}return a}},{name:"Playlist",run:function(n,t,r,e,i){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Ng=function(s){function n(r){var e;return(e=s.call(this)||this).timelines=[],e.discontinuities=[],e.timelineToDatetimeMappings={},e.logger_=ci("SyncController"),e}X(n,s);var t=n.prototype;return t.getSyncPoint=function(e,i,a,o){var l=this.runStrategies_(e,i,a,o);return l.length?this.selectSyncPoint_(l,{key:"time",value:o}):null},t.getExpiredTime=function(e,i){if(!e||!e.segments)return null;var a=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!a.length)return null;var o=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+En({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))},t.runStrategies_=function(e,i,a,o){for(var l=[],d=0;d86400)N.log.warn("Not saving expired segment info. Media sequence gap "+a+" is too large.");else for(var o=a-1;o>=0;o--){var l=e.segments[o];if(l&&void 0!==l.start){i.syncInfo={mediaSequence:e.mediaSequence+o,time:l.start},this.logger_("playlist refresh sync: [time:"+i.syncInfo.time+", mediaSequence: "+i.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},t.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var i=e.segments[0],a=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-a}},t.saveSegmentTimingInfo=function(e){var i=e.segmentInfo,a=e.shouldSaveTimelineMapping,o=this.calculateSegmentTimeMapping_(i,i.timingInfo,a),l=i.segment;o&&(this.saveDiscontinuitySyncInfo_(i),i.playlist.syncInfo||(i.playlist.syncInfo={mediaSequence:i.playlist.mediaSequence+i.mediaIndex,time:l.start}));var d=l.dateTimeObject;l.discontinuity&&a&&d&&(this.timelineToDatetimeMappings[l.timeline]=-d.getTime()/1e3)},t.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},t.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},t.calculateSegmentTimeMapping_=function(e,i,a){var f,v,o=e.segment,l=e.part,d=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)d={time:e.startOfSegment,mapping:e.startOfSegment-i.start},a&&(this.timelines[e.timeline]=d,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+d.time+"] [mapping: "+d.mapping+"]")),f=e.startOfSegment,v=i.end+d.mapping;else{if(!d)return!1;f=i.start+d.mapping,v=i.end+d.mapping}return l&&(l.start=f,l.end=v),(!o.start||fv){var g;g=f<0?a.start-En({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:l}):a.end+En({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:l}),this.discontinuities[d]={time:g,accuracy:v}}}},t.dispose=function(){this.trigger("dispose"),this.off()},n}(N.EventTarget),Fg=function(s){function n(){var r;return(r=s.call(this)||this).pendingTimelineChanges_={},r.lastTimelineChanges_={},r}X(n,s);var t=n.prototype;return t.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},t.pendingTimelineChange=function(e){var i=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.pendingTimelineChanges_[i]={type:i,from:a,to:o},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[i]},t.lastTimelineChange=function(e){var i=e.type,a=e.from,o=e.to;return"number"==typeof a&&"number"==typeof o&&(this.lastTimelineChanges_[i]={type:i,from:a,to:o},delete this.pendingTimelineChanges_[i],this.trigger("timelinechange")),this.lastTimelineChanges_[i]},t.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},n}(N.EventTarget),Ug=Rd(Md(function(){function s(x,S,F){return x(F={path:S,exports:{},require:function(H,W){return function n(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},F.exports),F.exports}var t=s(function(x){function S(U,H){for(var W=0;W-1},S.trigger=function(U){var H=this.listeners[U];if(H)if(2===arguments.length)for(var W=H.length,q=0;q>7))^q]=q;for(ne=he=0;!H[ne];ne^=ge||1,he=ye[he]||1)for(H[ne]=st=(st=he^he<<1^he<<2^he<<3^he<<4)>>8^255&st^99,W[st]=ne,Qe=16843009*z[Ye=z[ge=z[ne]]]^65537*Ye^257*ge^16843008*ne,Mt=257*z[st]^16843008*st,q=0;q<4;q++)F[q][ne]=Mt=Mt<<24^Mt>>>8,U[q][st]=Qe=Qe<<24^Qe>>>8;for(q=0;q<5;q++)F[q]=F[q].slice(0),U[q]=U[q].slice(0);return S}()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var U,H,W,q=this._tables[0][4],ne=this._tables[1],he=F.length,z=1;if(4!==he&&6!==he&&8!==he)throw new Error("Invalid aes key size");var ye=F.slice(0),ge=[];for(this._key=[ye,ge],U=he;U<4*he+28;U++)W=ye[U-1],(U%he==0||8===he&&U%he==4)&&(W=q[W>>>24]<<24^q[W>>16&255]<<16^q[W>>8&255]<<8^q[255&W],U%he==0&&(W=W<<8^W>>>24^z<<24,z=z<<1^283*(z>>7))),ye[U]=ye[U-he]^W;for(H=0;U;H++,U--)W=ye[3&H?U:U-4],ge[H]=U<=4||H<4?W:ne[0][q[W>>>24]]^ne[1][q[W>>16&255]]^ne[2][q[W>>8&255]]^ne[3][q[255&W]]}return x.prototype.decrypt=function(U,H,W,q,ne,he){var st,Mt,Qe,ni,z=this._key[1],ye=U^z[0],ge=q^z[1],Ye=W^z[2],Pe=H^z[3],hr=z.length/4-2,ai=4,xi=this._tables[1],Ui=xi[0],pr=xi[1],Bi=xi[2],mr=xi[3],gr=xi[4];for(ni=0;ni>>24]^pr[ge>>16&255]^Bi[Ye>>8&255]^mr[255&Pe]^z[ai],Mt=Ui[ge>>>24]^pr[Ye>>16&255]^Bi[Pe>>8&255]^mr[255&ye]^z[ai+1],Qe=Ui[Ye>>>24]^pr[Pe>>16&255]^Bi[ye>>8&255]^mr[255&ge]^z[ai+2],Pe=Ui[Pe>>>24]^pr[ye>>16&255]^Bi[ge>>8&255]^mr[255&Ye]^z[ai+3],ai+=4,ye=st,ge=Mt,Ye=Qe;for(ni=0;ni<4;ni++)ne[(3&-ni)+he]=gr[ye>>>24]<<24^gr[ge>>16&255]<<16^gr[Ye>>8&255]<<8^gr[255&Pe]^z[ai++],st=ye,ye=ge,ge=Ye,Ye=Pe,Pe=st},x}(),f=function(x){function S(){var U;return(U=x.call(this,i)||this).jobs=[],U.delay=1,U.timeout_=null,U}e(S,x);var F=S.prototype;return F.processJob_=function(){this.jobs.shift()(),this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null},F.push=function(H){this.jobs.push(H),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},S}(i),v=function(S){return S<<24|(65280&S)<<8|(16711680&S)>>8|S>>>24},T=function(){function x(F,U,H,W){var q=x.STEP,ne=new Int32Array(F.buffer),he=new Uint8Array(F.byteLength),z=0;for(this.asyncStream_=new f,this.asyncStream_.push(this.decryptChunk_(ne.subarray(z,z+q),U,H,he)),z=q;z>2),W=new d(Array.prototype.slice.call(F)),q=new Uint8Array(S.byteLength),ne=new Int32Array(q.buffer);for(he=U[0],z=U[1],ye=U[2],ge=U[3],Qe=0;Qe=0&&(t="main-desc"),t},Pa=function(n,t){n.abort(),n.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Bo=function(n,t){t.activePlaylistLoader=n,n.load()},La={AUDIO:function(n,t){return function(){var e=t.mediaTypes[n],i=t.blacklistCurrentPlaylist;Pa(t.segmentLoaders[n],e);var a=e.activeTrack(),o=e.activeGroup(),l=(o.filter(function(v){return v.default})[0]||o[0]).id,d=e.tracks[l];if(a!==d){for(var f in N.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),e.tracks)e.tracks[f].enabled=e.tracks[f]===d;e.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(n,t){return function(){var r=t.segmentLoaders[n],e=t.mediaTypes[n];N.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Pa(r,e);var i=e.activeTrack();i&&(i.mode="disabled"),e.onTrackChanged()}}},uc={AUDIO:function(n,t,r){if(t){var e=r.tech,i=r.requestOptions,a=r.segmentLoaders[n];t.on("loadedmetadata",function(){var o=t.media();a.playlist(o,i),(!e.paused()||o.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),i),e.paused()||a.load()}),t.on("error",La[n](n,r))}},SUBTITLES:function(n,t,r){var e=r.tech,i=r.requestOptions,a=r.segmentLoaders[n],o=r.mediaTypes[n];t.on("loadedmetadata",function(){var l=t.media();a.playlist(l,i),a.track(o.activeTrack()),(!e.paused()||l.endList&&"none"!==e.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),i),e.paused()||a.load()}),t.on("error",La[n](n,r))}},Wg={AUDIO:function(n,t){var r=t.vhs,e=t.sourceType,i=t.segmentLoaders[n],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[n],d=l.groups,f=l.tracks,v=l.logger_,g=t.masterPlaylistLoader,T=Cn(g.master);for(var E in(!o[n]||0===Object.keys(o[n]).length)&&(o[n]={main:{default:{default:!0}}},T&&(o[n].main.default.playlists=g.master.playlists)),o[n])for(var x in d[E]||(d[E]=[]),o[n][E]){var S=o[n][E][x],F=void 0;if(T?(v("AUDIO group '"+E+"' label '"+x+"' is a master playlist"),S.isMasterPlaylist=!0,F=null):F="vhs-json"===e&&S.playlists?new Xr(S.playlists[0],r,a):S.resolvedUri?new Xr(S.resolvedUri,r,a):S.playlists&&"dash"===e?new Po(S.playlists[0],r,a,g):null,S=N.mergeOptions({id:x,playlistLoader:F},S),uc[n](n,S.playlistLoader,t),d[E].push(S),void 0===f[x]){var U=new N.AudioTrack({id:x,kind:Hg(S),enabled:!1,language:S.language,default:S.default,label:x});f[x]=U}}i.on("error",La[n](n,t))},SUBTITLES:function(n,t){var r=t.tech,e=t.vhs,i=t.sourceType,a=t.segmentLoaders[n],o=t.requestOptions,l=t.master.mediaGroups,d=t.mediaTypes[n],f=d.groups,v=d.tracks,g=t.masterPlaylistLoader;for(var T in l[n])for(var E in f[T]||(f[T]=[]),l[n][T])if(!l[n][T][E].forced){var x=l[n][T][E],S=void 0;if("hls"===i)S=new Xr(x.resolvedUri,e,o);else if("dash"===i){if(!x.playlists.filter(function(H){return H.excludeUntil!==1/0}).length)return;S=new Po(x.playlists[0],e,o,g)}else"vhs-json"===i&&(S=new Xr(x.playlists?x.playlists[0]:x.resolvedUri,e,o));if(x=N.mergeOptions({id:E,playlistLoader:S},x),uc[n](n,x.playlistLoader,t),f[T].push(x),void 0===v[E]){var U=r.addRemoteTextTrack({id:E,kind:"subtitles",default:x.default&&x.autoselect,language:x.language,label:E},!1).track;v[E]=U}}a.on("error",La[n](n,t))},"CLOSED-CAPTIONS":function(n,t){var r=t.tech,e=t.master.mediaGroups,i=t.mediaTypes[n],a=i.groups,o=i.tracks;for(var l in e[n])for(var d in a[l]||(a[l]=[]),e[n][l]){var f=e[n][l][d];if(/^(?:CC|SERVICE)/.test(f.instreamId)){var v=r.options_.vhs&&r.options_.vhs.captionServices||{},g={label:d,language:f.language,instreamId:f.instreamId,default:f.default&&f.autoselect};if(v[g.instreamId]&&(g=N.mergeOptions(g,v[g.instreamId])),void 0===g.default&&delete g.default,a[l].push(N.mergeOptions({id:d},f)),void 0===o[d]){var T=r.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;o[d]=T}}}}},Gg=function s(n,t){for(var r=0;r "+d+" from "+i),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+i})),this.masterPlaylistLoader_.media(e,a)},t.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=P().setInterval(function(){return e.checkABR_()},250)},t.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(P().clearInterval(this.abrTimer_),this.abrTimer_=null)},t.getAudioTrackPlaylists_=function(){var e=this.master(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;var l,a=e.mediaGroups.AUDIO,o=Object.keys(a);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{var d=a.main||o.length&&a[o[0]];for(var f in d)if(d[f].default){l={label:f};break}}if(!l)return i;var v=[];for(var g in a)if(a[g][l.label]){var T=a[g][l.label];if(T.playlists&&T.playlists.length)v.push.apply(v,T.playlists);else if(T.uri)v.push(T);else if(e.playlists.length)for(var E=0;E1&&Cn(t.master))for(var d=0;d1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},t.shouldSwitchToMedia_=function(e){var i=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),o=this.bufferLowWaterLine(),l=this.bufferHighWaterLine();return function(n){var t=n.currentPlaylist,r=n.buffered,e=n.currentTime,i=n.nextPlaylist,a=n.bufferLowWaterLine,o=n.bufferHighWaterLine,l=n.duration,d=n.experimentalBufferBasedABR,f=n.log;if(!i)return N.log.warn("We received no playlist to switch to. Please check your stream."),!1;var v="allowing switch "+(t&&t.id||"null")+" -> "+i.id;if(!t)return f(v+" as current playlist is not set"),!0;if(i.id===t.id)return!1;var g=Boolean(Yr(r,e).length);if(!t.endList)return g||"number"!=typeof t.partTargetDuration?(f(v+" as current playlist is live"),!0):(f("not "+v+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var T=yo(r,e),E=d?wt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:wt.MAX_BUFFER_LOW_WATER_LINE;if(lS)&&T>=a){var U=v+" as forwardBuffer >= bufferLowWaterLine ("+T+" >= "+a+")";return d&&(U+=" and next bandwidth > current bandwidth ("+x+" > "+S+")"),f(U),!0}return f("not "+v+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:a,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},t.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",function(){var a=e.selectPlaylist();e.shouldSwitchToMedia_(a)&&e.switchMedia_(a,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(a){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});var i=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var o=e.getCodecsOrExclude_();!o||e.sourceUpdater_.addOrChangeSourceBuffers(o)};this.mainSegmentLoader_.on("trackinfo",i),this.audioSegmentLoader_.on("trackinfo",i),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},t.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},t.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},t.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},t.fastQualityChange_=function(e){var i=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){i.tech_.setCurrentTime(N.browser.IE_VERSION||N.browser.IS_EDGE?i.tech_.currentTime()+.04:i.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},t.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()this.maxPlaylistRetries?1/0:Date.now()+1e3*i,a.excludeUntil=v,e.reason&&(a.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var g=this.selectPlaylist();if(!g)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");(e.internal?this.logger_:N.log.warn)((e.internal?"Internal problem":"Problem")+" encountered with playlist "+a.id+"."+(e.message?" "+e.message:"")+" Switching to playlist "+g.id+"."),g.attributes.AUDIO!==a.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),g.attributes.SUBTITLES!==a.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var x=g.targetDuration/2*1e3||5e3,S="number"==typeof g.lastRequest&&Date.now()-g.lastRequest<=x;return this.switchMedia_(g,"exclude",d||S)},t.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},t.delegateLoaders_=function(e,i){var a=this,o=[],l="all"===e;(l||"main"===e)&&o.push(this.masterPlaylistLoader_);var d=[];(l||"audio"===e)&&d.push("AUDIO"),(l||"subtitle"===e)&&(d.push("CLOSED-CAPTIONS"),d.push("SUBTITLES")),d.forEach(function(f){var v=a.mediaTypes_[f]&&a.mediaTypes_[f].activePlaylistLoader;v&&o.push(v)}),["main","audio","subtitle"].forEach(function(f){var v=a[f+"SegmentLoader_"];v&&(e===f||"all"===e)&&o.push(v)}),o.forEach(function(f){return i.forEach(function(v){"function"==typeof f[v]&&f[v]()})})},t.setCurrentTime=function(e){var i=Yr(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?i&&i.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},t.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Fi.Playlist.duration(e):1/0:0},t.seekable=function(){return this.seekable_},t.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(i){var a=this.syncController_.getExpiredTime(i,this.duration());if(null!==a){var d,f,o=this.masterPlaylistLoader_.master,l=Fi.Playlist.seekable(i,a,Fi.Playlist.liveEdgeDelay(o,i));0===l.length||this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(a=this.syncController_.getExpiredTime(i,this.duration()))||0===(e=Fi.Playlist.seekable(i,a,Fi.Playlist.liveEdgeDelay(o,i))).length)||(this.seekable_&&this.seekable_.length&&(d=this.seekable_.end(0),f=this.seekable_.start(0)),this.seekable_=e?e.start(0)>l.end(0)||l.start(0)>e.end(0)?l:N.createTimeRanges([[e.start(0)>l.start(0)?e.start(0):l.start(0),e.end(0)0&&(o=Math.max(o,a.end(a.length-1))),this.mediaSource.duration!==o&&this.sourceUpdater_.setDuration(o)}},t.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(i){var a=e.mediaTypes_[i].groups;for(var o in a)a[o].forEach(function(l){l.playlistLoader&&l.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},t.master=function(){return this.masterPlaylistLoader_.master},t.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},t.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!i||!a)},t.getCodecsOrExclude_=function(){var e=this,i={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}};i.video=i.main;var a=An(this.master(),this.media()),o={},l=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(i.main.hasVideo&&(o.video=a.video||i.main.videoCodec||"avc1.4d400d"),i.main.isMuxed&&(o.video+=","+(a.audio||i.main.audioCodec||gi)),(i.main.hasAudio&&!i.main.isMuxed||i.audio.hasAudio||l)&&(o.audio=a.audio||i.main.audioCodec||i.audio.audioCodec||gi,i.audio.isFmp4=i.main.hasAudio&&!i.main.isMuxed?i.main.isFmp4:i.audio.isFmp4),o.audio||o.video){var v,f={};if(["video","audio"].forEach(function(x){if(o.hasOwnProperty(x)&&!function(S,F){return S?ei(F):oi(F)}(i[x].isFmp4,o[x])){var S=i[x].isFmp4?"browser":"muxer";f[S]=f[S]||[],f[S].push(o[x]),"audio"===x&&(v=S)}}),l&&v&&this.media().attributes.AUDIO){var g=this.media().attributes.AUDIO;this.master().playlists.forEach(function(x){(x.attributes&&x.attributes.AUDIO)===g&&x!==e.media()&&(x.excludeUntil=1/0)}),this.logger_("excluding audio group "+g+" as "+v+' does not support codec(s): "'+o.audio+'"')}if(!Object.keys(f).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var E=[];if(["video","audio"].forEach(function(x){var S=(We(e.sourceUpdater_.codecs[x]||"")[0]||{}).type,F=(We(o[x]||"")[0]||{}).type;S&&F&&S.toLowerCase()!==F.toLowerCase()&&E.push('"'+e.sourceUpdater_.codecs[x]+'" -> "'+o[x]+'"')}),E.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+E.join(", ")+".",blacklistDuration:1/0,internal:!0})}return o}var T=Object.keys(f).reduce(function(x,S){return x&&(x+=", "),x+(S+' does not support codec(s): "')+f[S].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:T,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},t.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}}},t.excludeUnsupportedVariants_=function(){var e=this,i=this.master().playlists,a=[];Object.keys(i).forEach(function(o){var l=i[o];if(-1===a.indexOf(l.id)){a.push(l.id);var d=An(e.master,l),f=[];d.audio&&!oi(d.audio)&&!ei(d.audio)&&f.push("audio codec "+d.audio),d.video&&!oi(d.video)&&!ei(d.video)&&f.push("video codec "+d.video),d.text&&"stpp.ttml.im1t"===d.text&&f.push("text codec "+d.text),f.length&&(l.excludeUntil=1/0,e.logger_("excluding "+l.id+" for unsupported: "+f.join(", ")))}})},t.excludeIncompatibleVariants_=function(e){var i=this,a=[],o=this.master().playlists,l=Aa(We(e)),d=Zd(l),f=l.video&&We(l.video)[0]||null,v=l.audio&&We(l.audio)[0]||null;Object.keys(o).forEach(function(g){var T=o[g];if(-1===a.indexOf(T.id)&&T.excludeUntil!==1/0){a.push(T.id);var E=[],x=An(i.masterPlaylistLoader_.master,T),S=Zd(x);if(x.audio||x.video){if(S!==d&&E.push('codec count "'+S+'" !== "'+d+'"'),!i.sourceUpdater_.canChangeType()){var F=x.video&&We(x.video)[0]||null,U=x.audio&&We(x.audio)[0]||null;F&&f&&F.type.toLowerCase()!==f.type.toLowerCase()&&E.push('video codec "'+F.type+'" !== "'+f.type+'"'),U&&v&&U.type.toLowerCase()!==v.type.toLowerCase()&&E.push('audio codec "'+U.type+'" !== "'+v.type+'"')}E.length&&(T.excludeUntil=1/0,i.logger_("blacklisting "+T.id+": "+E.join(" && ")))}}})},t.updateAdCues_=function(e){var i=0,a=this.seekable();a.length&&(i=a.start(0)),function(n,t,r){if(void 0===r&&(r=0),n.segments)for(var i,e=r,a=0;a0&&this.logger_("resetting possible stalled download count for "+r+" loader"),this[r+"StalledDownloads_"]=0,this[r+"Buffered_"]=e.buffered_()},n.checkSegmentDownloads_=function(r){var e=this.masterPlaylistController_,i=e[r+"SegmentLoader_"],a=i.buffered_(),o=function(n,t){if(n===t)return!1;if(!n&&t||!t&&n||n.length!==t.length)return!0;for(var r=0;r=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&r===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):r===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=r)}},n.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},n.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var o,e=this.seekable(),i=this.tech_.currentTime();if(this.afterSeekableWindow_(e,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(o=e.end(e.length-1)),this.beforeSeekableWindow_(e,i)){var d=e.start(0);o=d+(d===e.end(0)?0:yi)}if(void 0!==o)return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+sd(e)+". Seeking to "+o+"."),this.tech_.setCurrentTime(o),!0;for(var f=this.masterPlaylistController_.sourceUpdater_,v=this.tech_.buffered(),g=f.audioBuffer?f.audioBuffered():null,T=f.videoBuffer?f.videoBuffered():null,E=this.media(),x=E.partTargetDuration?E.partTargetDuration:2*(E.targetDuration-Qi),S=[g,T],F=0;F "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})}},n.techWaiting_=function(){var r=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(r,e)){var i=r.end(r.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var a=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:e}))return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var d=xa(o,e);if(d.length>0){var f=d.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+f+", seeking to "+d.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*f,e),!0}return!1},n.afterSeekableWindow_=function(r,e,i,a){if(void 0===a&&(a=!1),!r.length)return!1;var o=r.end(r.length-1)+yi;return!i.endList&&a&&(o=r.end(r.length-1)+3*i.targetDuration),e>o},n.beforeSeekableWindow_=function(r,e){return!!(r.length&&r.start(0)>0&&e2)return{start:o,end:l}}return null},s}(),sv={errorInterval:30,getSource:function(n){return n(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ov=function s(n,t){var r=0,e=0,i=N.mergeOptions(sv,t);n.ready(function(){n.trigger({type:"usage",name:"vhs-error-reload-initialized"}),n.trigger({type:"usage",name:"hls-error-reload-initialized"})});var a=function(){e&&n.currentTime(e)},o=function(g){null!=g&&(e=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",a),n.src(g),n.trigger({type:"usage",name:"vhs-error-reload"}),n.trigger({type:"usage",name:"hls-error-reload"}),n.play())},l=function(){return Date.now()-r<1e3*i.errorInterval?(n.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void n.trigger({type:"usage",name:"hls-error-reload-canceled"})):i.getSource&&"function"==typeof i.getSource?(r=Date.now(),i.getSource.call(n,o)):void N.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},d=function v(){n.off("loadedmetadata",a),n.off("error",l),n.off("dispose",v)};n.on("error",l),n.on("dispose",d),n.reloadSourceOnError=function(g){d(),s(n,g)}},Pt={PlaylistLoader:Xr,Playlist:Kt,utils:Em,STANDARD_PLAYLIST_SELECTOR:$d,INITIAL_PLAYLIST_SELECTOR:function(){var n=this,t=this.playlists.master.playlists.filter(Kt.isEnabled);return Qr(t,function(e,i){return Mo(e,i)}),t.filter(function(e){return!!An(n.playlists.master,e).video})[0]||null},lastBandwidthSelector:$d,movingAverageBandwidthSelector:function(n){var t=-1,r=-1;if(n<0||n>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var e=this.useDevicePixelRatio&&P().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,r=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==r&&(t=n*this.systemBandwidth+(1-n)*t,r=this.systemBandwidth),Kd(this.playlists.master,t,parseInt(Ia(this.tech_.el(),"width"),10)*e,parseInt(Ia(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Mo,comparePlaylistResolution:function(n,t){var r,e;return n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(r=n.attributes.RESOLUTION.width),r=r||P().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(e=t.attributes.RESOLUTION.width),r===(e=e||P().Number.MAX_VALUE)&&n.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?n.attributes.BANDWIDTH-t.attributes.BANDWIDTH:r-e},xhr:Ed()};Object.keys(wt).forEach(function(s){Object.defineProperty(Pt,s,{get:function(){return N.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),wt[s]},set:function(t){N.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?N.log.warn("value of Vhs."+s+" must be greater than or equal to 0"):wt[s]=t}})});var cc="videojs-vhs",fc=function(n,t){for(var r=t.media(),e=-1,i=0;i=g&&f>=g?Math.max(f,T):T}return f},set:function(f){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=f,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){return Math.floor(1/(1/(this.bandwidth||1)+(this.throughput>0?1/this.throughput:0)))},set:function(){N.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return a.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return a.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return a.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return a.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return a.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return a.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return a.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return a.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return a.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return a.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return a.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return fr(a.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return a.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return a.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return a.tech_.name_},enumerable:!0},duration:{get:function(){return a.tech_.duration()},enumerable:!0},master:{get:function(){return a.playlists.master},enumerable:!0},playerDimensions:{get:function(){return a.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return fr(a.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return a.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){a.options_.useBandwidthFromLocalStorage&&function(n){if(!P().localStorage)return!1;var t=hc();t=t?N.mergeOptions(t,n):n;try{P().localStorage.setItem(cc,JSON.stringify(t))}catch(r){return!1}}({bandwidth:a.bandwidth,throughput:Math.round(a.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n){n.representations=function(){var t=n.masterPlaylistController_.master(),r=Cn(t)?n.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return r?r.filter(function(e){return!xo(e)}).map(function(e,i){return new rv(n,e,e.id)}):[]}}(a)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){a.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=P().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},t.createKeySessions_=function(){var e=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),function(n){var t=n.player,r=n.sourceKeySystems,e=n.audioMedia,i=n.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(n,t){return n.reduce(function(r,e){if(!e.contentProtection)return r;var i=t.reduce(function(a,o){var l=e.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(i).length&&r.push(i),r},[])}(e?i.concat([e]):i,Object.keys(r)),l=[],d=[];return o.forEach(function(f){d.push(new Promise(function(v,g){t.tech_.one("keysessioncreated",v)})),l.push(new Promise(function(v,g){t.eme.initializeMediaKeys({keySystems:f},function(T){T?g(T):v()})}))}),Promise.race([Promise.all(l),Promise.race(d)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:i&&i.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(a){e.logger_("error while creating EME key session",a),e.player_.error({message:"Failed to initialize media keys for EME",code:3})})},t.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},t.setupEme_=function(){var e=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=function(n){var t=n.player,a=function(n,t,r){if(!n)return n;var e={};t&&t.attributes&&t.attributes.CODECS&&(e=Aa(We(t.attributes.CODECS))),r&&r.attributes&&r.attributes.CODECS&&(e.audio=r.attributes.CODECS);var i=Nt(e.video),a=Nt(e.audio),o={};for(var l in n)o[l]={},a&&(o[l].audioContentType=a),i&&(o[l].videoContentType=i),t.contentProtection&&t.contentProtection[l]&&t.contentProtection[l].pssh&&(o[l].pssh=t.contentProtection[l].pssh),"string"==typeof n[l]&&(o[l].url=n[l]);return N.mergeOptions(n,o)}(n.sourceKeySystems,n.media,n.audioMedia);return!(!a||(t.currentSource().keySystems=a,a&&!t.eme&&(N.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)))}({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:i&&i.media()});this.player_.tech_.on("keystatuschange",function(o){"output-restricted"===o.status&&e.masterPlaylistController_.blacklistCurrentPlaylist({playlist:e.masterPlaylistController_.media(),message:"DRM keystatus changed to "+o.status+". Playlist will fail to play. Check for HDCP content.",blacklistDuration:1/0})}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==N.browser.IE_VERSION&&a?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},t.setupQualityLevels_=function(){var e=this,i=N.players[this.tech_.options_.playerId];!i||!i.qualityLevels||this.qualityLevels_||(this.qualityLevels_=i.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(n,t){t.representations().forEach(function(r){n.addQualityLevel(r)}),fc(n,t.playlists)}(e.qualityLevels_,e)}),this.playlists.on("mediachange",function(){fc(e.qualityLevels_,e.playlists)}))},n.version=function(){return{"@videojs/http-streaming":"2.13.1","mux.js":"6.0.1","mpd-parser":"0.21.0","m3u8-parser":"4.7.0","aes-decrypter":"3.1.2"}},t.version=function(){return this.constructor.version()},t.canChangeType=function(){return nc.canChangeType()},t.play=function(){this.masterPlaylistController_.play()},t.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},t.duration=function(){return this.masterPlaylistController_.duration()},t.seekable=function(){return this.masterPlaylistController_.seekable()},t.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&P().URL.revokeObjectURL&&(P().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),s.prototype.dispose.call(this)},t.convertToProgramTime=function(e,i){return function(n){var t=n.playlist,r=n.time,e=void 0===r?void 0:r,i=n.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===e)return i({message:"getProgramTime: playlist and time must be provided"});var a=function(n,t){if(!t||!t.segments||0===t.segments.length)return null;for(var e,r=0,i=0;ir){if(n>r+.25*a.duration)return null;e=a}return{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:r-e.duration,type:e.videoTimingInfo?"accurate":"estimate"}}(e,t);if(!a)return i({message:"valid programTime was not found"});if("estimate"===a.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:e},l=function(n,t){if(!t.dateTimeObject)return null;var a=n-(t.videoTimingInfo.transmuxedPresentationStart+t.videoTimingInfo.transmuxerPrependedSeconds);return new Date(t.dateTimeObject.getTime()+1e3*a)}(e,a.segment);return l&&(o.programDateTime=l.toISOString()),i(null,o)}({playlist:this.masterPlaylistController_.media(),time:e,callback:i})},t.seekToProgramTime=function(e,i,a,o){return void 0===a&&(a=!0),void 0===o&&(o=2),Lm({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:o,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})},n}(N.getComponent("Component")),Oa={name:"videojs-http-streaming",VERSION:"2.13.1",canHandleSource:function(n,t){void 0===t&&(t={});var r=N.mergeOptions(N.options,t);return Oa.canPlayType(n.type,r)},handleSource:function(n,t,r){void 0===r&&(r={});var e=N.mergeOptions(N.options,r);return t.vhs=new Ho(n,t,e),N.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return N.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=Ed(),t.vhs.src(n.src,n.type),t.vhs},canPlayType:function(n,t){void 0===t&&(t={});var r=N.mergeOptions(N.options,t),e=r.vhs,i=(e=void 0===e?{}:e).overrideNative,a=void 0===i?!N.browser.IS_ANY_SAFARI:i,o=r.hls,l=(o=void 0===o?{}:o).overrideNative,d=void 0!==l&&l,f=Et(n);return f&&(!Pt.supportsTypeNatively(f)||d||a)?"maybe":""}};ei("avc1.4d400d,mp4a.40.2")&&N.getTech("Html5").registerSourceHandler(Oa,0),N.VhsHandler=Ho,Object.defineProperty(N,"HlsHandler",{get:function(){return N.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Ho},configurable:!0}),N.VhsSourceHandler=Oa,Object.defineProperty(N,"HlsSourceHandler",{get:function(){return N.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Oa},configurable:!0}),N.Vhs=Pt,Object.defineProperty(N,"Hls",{get:function(){return N.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Pt},configurable:!0}),N.use||(N.registerComponent("Hls",Pt),N.registerComponent("Vhs",Pt)),N.options.vhs=N.options.vhs||{},N.options.hls=N.options.hls||{},N.getPlugin&&N.getPlugin("reloadSourceOnError")||(N.registerPlugin||N.plugin)("reloadSourceOnError",function(n){ov(this,n)});const Sv=N,Ev=["target"];let Cv=(()=>{class s{constructor(t){this.gs=t,this.subtitlesOctopus=null,this.videoUrl=null,this.videoThumb=null,this.subtitleUrl=null,this.subtitleFonts=[]}ngOnInit(){this.gs.isBrowser&&this.target&&this.videoUrl&&(this.gs.log("[VIDEO-JS_INIT_URL]",this.videoUrl),this.player=Sv(this.target.nativeElement,{autoplay:!1,controls:!0,fluid:!0,muted:!1,sources:[{src:this.videoUrl,type:"video/mp4"}],poster:this.videoThumb},()=>{this.gs.log("[VIDEO-JS_READY]",this.player),this.subtitleUrl&&(this.subtitlesOctopus=new SubtitlesOctopus({video:this.target.nativeElement,subUrl:this.subtitleUrl,fonts:this.subtitleFonts,workerUrl:"/assets/lib/subtitles-octopus-worker.js",legacyWorkerUrl:"/assets/lib/subtitles-octopus-worker-legacy.js"}),this.gs.log("[SUBTITLE_INIT]",this.subtitlesOctopus))}))}ngOnDestroy(){var t,r;null===(t=this.subtitlesOctopus)||void 0===t||t.dispose(),null===(r=this.player)||void 0===r||r.dispose()}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(Ce.U))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-vjs-player"]],viewQuery:function(t,r){if(1&t&&u.Gf(Ev,7),2&t){let e;u.iGM(e=u.CRH())&&(r.target=e.first)}},inputs:{videoUrl:"videoUrl",videoThumb:"videoThumb",subtitleUrl:"subtitleUrl",subtitleFonts:"subtitleFonts"},decls:2,vars:0,consts:[["controls","","muted","","playsinline","","preload","none",1,"video-js","w-100"],["target",""]],template:function(t,r){1&t&&u._UZ(0,"video",0,1)},styles:[""]}),s})();var kv=j(325),Av=j(9461),wv=j(192),pc=j(3626);function Iv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",25),u._UZ(1,"img",33),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.hYB("routerLink","/anime/",t.berkasData.anime_.id,"-",t.animeName,""),u.xp6(1),u.s9C("src",t.berkasData.anime_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.anime_.name)}}function Dv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",25),u._UZ(1,"img",33),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=u.oxw(2);u.MGl("routerLink","/dorama/",t.berkasData.dorama_.slug,""),u.xp6(1),u.s9C("src",t.berkasData.dorama_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.dorama_.name)}}function Pv(s,n){if(1&s&&(u.TgZ(0,"mat-list-option",25),u._UZ(1,"img",33),u.TgZ(2,"h4"),u._uU(3),u.qZA()()),2&s){const t=n.$implicit;u.MGl("routerLink","/fansub/",t.slug,""),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.Oqu(t.name)}}function Lv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return e.ddl(e.berkasData.attachment_.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"movie"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.ALo(5,"bytes"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.name," :: ",t.lampiran.download_count,"x"),u.xp6(3),u.lnq(" ",u.Dn7(4,5,t.lampiran.name,0,5),".....",t.lampiran.ext," (",u.lcZ(5,9,t.lampiran.size),") ")}}function Ov(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return e.cancel_dl(e.berkasData.attachment_.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"close"),u.qZA(),u._uU(3," Batal Unduh "),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.name," :: ",t.lampiran.download_count,"x")}}function Rv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(4);return e.saveFileAs(e.berkasData.attachment_.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"save"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.qZA()}if(2&s){const t=u.oxw(4);u.hYB("matTooltip","",t.lampiran.name," :: ",t.lampiran.download_count,"x"),u.xp6(3),u.AsE(" ",u.Dn7(4,4,t.lampiran.name,0,5),".....",t.lampiran.ext," ")}}function Mv(s,n){if(1&s&&(u.TgZ(0,"div",35),u._uU(1),u._UZ(2,"br"),u._uU(3),u._UZ(4,"br")(5,"mat-progress-bar",42),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.AsE(" ",t.lampiran.percentage>=100?"Selesai Mengunduh ... ":"Sedang Mengunduh ... "," ",t.lampiran.totals," Bytes "),u.xp6(2),u.AsE(" ",t.lampiran.percentage,"% @ ",t.lampiran.speed," KB/s "),u.xp6(2),u.Q6J("mode",t.lampiran.mode)("value",t.lampiran.percentage)}}function Nv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",44),u.NdJ("click",function(){u.CHM(t);const e=u.oxw(5);return e.standardDdlVideo(e.berkasData.attachment_.id)}),u._uU(1," Unduhan Macet? "),u.TgZ(2,"i")(3,"u"),u._uU(4,"Coba Gunakan Unduhan Biasa~"),u.qZA()()()}}function Fv(s,n){if(1&s&&(u.TgZ(0,"div",16),u.YNc(1,Nv,5,0,"div",43),u.qZA()),2&s){const t=u.oxw(4);u.xp6(1),u.Q6J("ngIf",t.lampiran.isDownloading)}}function Uv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).standardDdlSubsFont(i.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"notes"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.ALo(5,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.s9C("matTooltip",t.name),u.xp6(3),u.lnq(" ",u.Dn7(4,4,t.name,0,5),".....",t.ext," (",u.lcZ(5,8,t.size),") ")}}function Bv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",40),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).standardDdlSubsFont(i.id)}),u.TgZ(1,"mat-icon",41),u._uU(2,"font_download"),u.qZA(),u._uU(3),u.ALo(4,"slice"),u.ALo(5,"bytes"),u.qZA()}if(2&s){const t=n.$implicit;u.s9C("matTooltip",t.name),u.xp6(3),u.lnq(" ",u.Dn7(4,4,t.name,0,5),".....",t.ext," (",u.lcZ(5,8,t.size),") ")}}function Hv(s,n){if(1&s&&(u.TgZ(0,"div",34)(1,"div",35),u.YNc(2,Lv,6,11,"button",36),u.YNc(3,Ov,4,2,"button",36),u.YNc(4,Rv,5,8,"button",36),u.TgZ(5,"div",16),u.YNc(6,Mv,6,6,"div",37),u.qZA(),u.YNc(7,Fv,2,1,"div",38),u.YNc(8,Uv,6,10,"button",39),u.YNc(9,Bv,6,10,"button",39),u.qZA()()),2&s){const t=u.oxw(3);u.xp6(2),u.Q6J("ngIf",!t.lampiran.data&&!t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",!t.lampiran.data&&t.lampiran.isDownloading),u.xp6(1),u.Q6J("ngIf",t.lampiran.data),u.xp6(2),u.Q6J("ngIf",t.lampiran.isDownloading&&!t.lampiran.isCompleted),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&!t.isDiscord),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.subtitles_),u.xp6(1),u.Q6J("ngForOf",t.berkasData.attachment_.fonts_)}}function jv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",34)(1,"div",35)(2,"button",45),u.NdJ("click",function(){return u.CHM(t),u.oxw(3).verify()}),u.TgZ(3,"mat-icon",41),u._uU(4,"enhanced_encryption"),u.qZA(),u._uU(5),u.qZA()()()}if(2&s){const t=u.oxw(3);u.xp6(5),u.hij(" ",t.berkasData.attachment_," ")}}function Vv(s,n){if(1&s&&(u.TgZ(0,"div",17)(1,"div",18)(2,"h2",19)(3,"b",20)(4,"i"),u._uU(5,"Direct Download"),u.qZA()()()(),u.YNc(6,Hv,10,7,"div",28),u.YNc(7,jv,6,1,"div",28),u.qZA()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("ngIf",t.isHaveDDL),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function qv(s,n){if(1&s&&(u.TgZ(0,"a",48)(1,"mat-icon",41),u._uU(2,"cloud_download"),u.qZA(),u._uU(3),u.qZA()),2&s){const t=n.$implicit;u.s9C("href",t.url,u.LSH),u.xp6(3),u.hij(" ",t.name," ")}}function Wv(s,n){if(1&s&&(u.TgZ(0,"div"),u.YNc(1,qv,4,2,"a",47),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.berkasData.download_url)}}function Gv(s,n){if(1&s&&(u.TgZ(0,"div",34),u.YNc(1,Wv,2,1,"div",46),u.qZA()),2&s){const t=u.oxw(2),r=u.MAs(2);u.xp6(1),u.Q6J("ngIf",(null==t.berkasData.download_url?null:t.berkasData.download_url.length)>0)("ngIfElse",r)}}function Zv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",34)(1,"button",49),u.NdJ("click",function(){return u.CHM(t),u.oxw(2).login()}),u.TgZ(2,"mat-icon",41),u._uU(3,"vpn_key"),u.qZA(),u._uU(4," Klik Untuk Login "),u.qZA()()}}function zv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",55),u.NdJ("click",function(){return u.CHM(t),u.oxw(3).watchDdl()}),u.TgZ(1,"mat-icon",41),u._uU(2,"play_arrow"),u.qZA(),u._uU(3," Mulai Streaming Video "),u.qZA()}}function Kv(s,n){1&s&&u._UZ(0,"mat-progress-bar",56)}function $v(s,n){if(1&s&&u._UZ(0,"app-vjs-player",57),2&s){const t=u.oxw(3);u.Q6J("videoUrl",t.ddlVideo)("videoThumb",t.videoThumb)("subtitleUrl",t.ddlSubtitles)("subtitleFonts",t.ddlFonts)}}function Yv(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",55),u.NdJ("click",function(){return u.CHM(t),u.oxw(3).verify()}),u.TgZ(1,"mat-icon",41),u._uU(2,"enhanced_encryption"),u.qZA(),u._uU(3),u.qZA()}if(2&s){const t=u.oxw(3);u.xp6(3),u.hij(" ",t.berkasData.attachment_," ")}}function Xv(s,n){if(1&s&&(u.TgZ(0,"div",17)(1,"div",18)(2,"h2",19)(3,"b",20),u._uU(4,"Video Stream (Browser Tertentu T.T)"),u.qZA()()(),u.TgZ(5,"div",21)(6,"div",50),u._uU(7," Dapat Digunakan Sebagai Referensi Untuk Pratinjau Namun Kemungkinan Jenis Huruf Tulisan Gagal Dimuat Sehingga Nantinya Akan Muncul Huruf Dengan Gambar \u{1f533} Misalnya Kanji, Lalu Juga Memungkinkan Terjadinya Gerakan Patah - Patah Jika Browser Tidak Kuat Untuk Render .ASS Subtitle Dengan Efek Yang Terlalu Banyak. "),u.TgZ(8,"a",51),u._uU(9," * Browser Firefox Sudah Pasti Tidak Bisa Memutar Video "),u.qZA()(),u.TgZ(10,"div",35),u.YNc(11,zv,4,0,"button",52),u.YNc(12,Kv,1,0,"mat-progress-bar",53),u.YNc(13,$v,1,4,"app-vjs-player",54),u.YNc(14,Yv,4,1,"button",52),u.qZA()()()),2&s){const t=u.oxw(2);u.xp6(11),u.Q6J("ngIf",t.isHaveDDL&&!t.vjsInit&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&!t.vjsReady),u.xp6(1),u.Q6J("ngIf",t.isHaveDDL&&t.vjsInit&&t.vjsReady),u.xp6(1),u.Q6J("ngIf",!t.isHaveDDL)}}function Qv(s,n){if(1&s&&(u.TgZ(0,"div",17)(1,"div",18)(2,"h2",19)(3,"b",20),u._uU(4,"Deskripsi & Informasi"),u.qZA()()(),u.TgZ(5,"div",21),u._UZ(6,"div",58),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(6),u.Q6J("innerHTML",t.berkasData.description,u.oJD)}}function Jv(s,n){1&s&&(u.TgZ(0,"div",17)(1,"div",21),u._UZ(2,"app-report"),u.qZA()())}function e0(s,n){if(1&s&&(u.TgZ(0,"div",2)(1,"div",3)(2,"div",4)(3,"ul",5),u._UZ(4,"li")(5,"li")(6,"li")(7,"li")(8,"li")(9,"li")(10,"li")(11,"li")(12,"li")(13,"li"),u.TgZ(14,"div",6)(15,"div",7)(16,"div",8)(17,"h2",9),u._uU(18),u.qZA(),u.TgZ(19,"p",10),u._uU(20),u.qZA(),u.TgZ(21,"p",11),u._uU(22),u.ALo(23,"date"),u.qZA()()()()()()(),u._UZ(24,"app-notifications"),u.TgZ(25,"div",12)(26,"div",13)(27,"div",14)(28,"div",15)(29,"div",16)(30,"div",17)(31,"div",18)(32,"h2",19)(33,"b",20),u._uU(34,"Rujukan"),u.qZA()()(),u.TgZ(35,"div",21)(36,"mat-selection-list",22),u.YNc(37,Iv,4,4,"mat-list-option",23),u.YNc(38,Dv,4,3,"mat-list-option",23),u.YNc(39,Pv,4,3,"mat-list-option",24),u.TgZ(40,"mat-list-option",25),u._UZ(41,"img",26),u.TgZ(42,"h4"),u._uU(43),u.qZA()()()()(),u.YNc(44,Vv,8,2,"div",27),u.TgZ(45,"div",17)(46,"div",18)(47,"h2",19)(48,"b",20),u._uU(49,"Tautan Unduhan"),u.qZA()()(),u.YNc(50,Gv,2,2,"div",28),u.YNc(51,Zv,5,0,"div",28),u.qZA()()()(),u.TgZ(52,"div",29)(53,"div",15)(54,"div",16),u.YNc(55,Xv,15,4,"div",27),u.YNc(56,Qv,7,1,"div",27),u.YNc(57,Jv,3,0,"div",27),u.TgZ(58,"div",17)(59,"div",30)(60,"h2",31)(61,"b",20),u._uU(62,"Komentar"),u.qZA()()(),u.TgZ(63,"div",21)(64,"div",32),u._UZ(65,"app-discussion"),u.qZA()()()()()()()()()),2&s){const t=u.oxw();u.xp6(2),u.Udp("background","url(/assets/img/banner/berkas-detail.png), linear-gradient(to bottom, "+(t.GS.isDarkMode?"#673ab7":"#3f51b5")+" 0%, #ee0dfd 100%)"),u.xp6(16),u.hij(" ",t.berkasData.project_type_.name," "),u.xp6(2),u.AsE("",t.berkasData.view_count,"x Dilihat :: ",t.berkasData.like_count," Orang Suka"),u.xp6(2),u.Oqu(u.xi3(23,19,t.berkasData.created_at,"d MMMM y, hh:mm:ss a z")),u.xp6(14),u.Q6J("multiple",!1),u.xp6(1),u.Q6J("ngIf",t.berkasData.anime_),u.xp6(1),u.Q6J("ngIf",t.berkasData.dorama_),u.xp6(1),u.Q6J("ngForOf",t.berkasData.fansub_),u.xp6(1),u.MGl("routerLink","/user/",t.berkasData.user_.username,""),u.xp6(1),u.s9C("src",t.berkasData.user_.image_url,u.LSH),u.xp6(2),u.Oqu(t.berkasData.user_.username),u.xp6(1),u.Q6J("ngIf",(null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value)&&t.berkasData.attachment_),u.xp6(6),u.Q6J("ngIf",null==t.AS.currentUserSubject?null:t.AS.currentUserSubject.value),u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&t.AS.currentUserSubject.value)),u.xp6(4),u.Q6J("ngIf",t.berkasData.attachment_),u.xp6(1),u.Q6J("ngIf",t.berkasData.description),u.xp6(1),u.Q6J("ngIf",null==t.SS.mySocket?null:t.SS.mySocket.id)}}function t0(s,n){1&s&&u._UZ(0,"app-no-data",59)}let i0=(()=>{class s{constructor(t,r,e,i,a,o,l,d,f,v,g,T,E){this.router=t,this.activatedRoute=r,this.gs=e,this.bs=i,this.ds=a,this.pi=o,this.berkas=l,this.fs=d,this.as=f,this.dm=v,this.wb=g,this.ss=T,this.dls=E,this.berkasId="",this.berkasData=null,this.subsBerkas=null,this.subsParam=null,this.subsDialog=null,this.subsSubtitlesFonts=null,this.subtitles=[],this.fonts=[],this.vjsInit=!1,this.vjsReady=!1,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}get AS(){return this.as}get SS(){return this.ss}ngOnDestroy(){var t,r,e,i;null===(t=this.subsBerkas)||void 0===t||t.unsubscribe(),null===(r=this.subsParam)||void 0===r||r.unsubscribe(),null===(e=this.subsDialog)||void 0===e||e.unsubscribe(),null===(i=this.subsSubtitlesFonts)||void 0===i||i.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:t=>{this.berkasId=t.berkasId,this.bs.busy(),this.subsBerkas=this.berkas.getBerkas(this.berkasId).subscribe({next:r=>{this.gs.log("[BERKAS_DETAIL_SUCCESS]",r),this.berkasData=r.result,this.pi.updatePageMetaData(`${this.berkasData.name}`,`${this.berkasData.description}`,`${this.berkasData.name}`,this.berkasData.image_url,this.berkasData.user_.username),this.bs.idle(),this.gs.isBrowser&&this.fs.initializeFab("edit",null,"Ubah Data Berkas",`/berkas/${this.berkasId}/edit`,!1)},error:r=>{this.gs.log("[BERKAS_DETAIL_ERROR]",r,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/berkas"}})}})}})}watchDdl(){this.vjsInit=!0,this.setupVjs()}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}verify(){this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}get animeName(){return this.berkasData.anime_.name.replace(/[^a-zA-Z0-9]/g,"-")}get lampiran(){return this.dm.getAttachmentDownloadFile(this.berkasData.attachment_)}get ddlVideo(){return this.ddlUrlLinkVideo(this.berkasData.attachment_.id)}get videoThumb(){return this.berkasData.image_url}get ddlSubtitles(){return this.subtitles.length>0?this.subtitles[0]:""}get ddlFonts(){return this.fonts.length>0?this.fonts:[]}get isHaveDDL(){return!(!("attachment_"in this.berkasData)||!this.berkasData.attachment_)&&"string"!=typeof this.berkasData.attachment_}get isDiscord(){var t;return this.isHaveDDL&&(null===(t=this.berkasData.attachment_)||void 0===t?void 0:t.discord)}ddl(t){var r=this;return(0,oe.Z)(function*(){r.isDiscord?r.subsDialog=(yield r.ds.openKonfirmasiDialog("Ekstensi CORS Unblock",'\n
\n \n
\n

\n Jika gagal download, silahkan pasang ekstensi CORS Unblock, kemudian nyalakan (logo icon berwarna menyala), dan download ulang berkasnya.\n Lalu saat setelah selesai, dapat dimatikan kembali (tidak wajib sih, hanya saja nanti takutnya mengganggu saat browsing).\n Keuntungan menggunakan ekstensi yaitu tanpa adanya batasan kecepatan server, yakni koneksi langsung.\n

\n

\n Chrome ::\n
\n \n https://chrome.google.com/webstore/detail/cors-unblock/lfhmikememgdcahcdlaciloancbhjino\n \n

\n

\n Edge ::\n
\n \n https://microsoftedge.microsoft.com/addons/detail/cors-unblock/hkjklmhkbkdhlgnnfbbcihcajofmjgbh\n \n

\n

\n Firefox ::\n
\n \n https://addons.mozilla.org/en-US/firefox/addon/cors-unblock\n \n

\n

\n Klik \'Ya\', jika sudah ada ekstensi, atau \'Tidak\' jika ingin melanjutkan dengan kecepatan terbatas.\n

\n ',!1)).afterClosed().subscribe({next:e=>{r.gs.log("[INFO_DIALOG_CLOSED]",e),void 0!==e&&r.dm.startDownload(t,!0===e),r.subsDialog.unsubscribe()}}):r.dm.startDownload(t)})()}cancel_dl(t){this.dm.cancelDownload(t)}saveFileAs(t){this.dm.saveFileAs(t)}standardDdlVideo(t){this.wb.winboxOpenUri(this.ddlUrlLinkVideo(t))}ddlUrlLinkVideo(t){return this.isDiscord?`${Ze.N.apiUrl}/ddl-seek/${t}?ngsw-bypass=true`:`${Ze.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}standardDdlSubsFont(t){this.wb.winboxOpenUri(this.ddlUrlLinkSubsFont(t))}ddlUrlLinkSubsFont(t){return`${Ze.N.apiUrl}/attachment/${t}?ngsw-bypass=true`}setupVjs(){if(this.isHaveDDL){const t=[],r=[],e=[];if("subtitles_"in this.berkasData.attachment_&&this.berkasData.attachment_.subtitles_)for(const i of this.berkasData.attachment_.subtitles_){const a=this.dls.downloadLampiran(i.id).pipe((0,me.b)(o=>{o.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),r.push(URL.createObjectURL(new Blob([o.body]))))}));t.push(a)}if("fonts_"in this.berkasData.attachment_&&this.berkasData.attachment_.fonts_)for(const i of this.berkasData.attachment_.fonts_){const a=this.dls.downloadLampiran(i.id).pipe((0,me.b)(o=>{o.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",o),e.push(URL.createObjectURL(new Blob([o.body]))))}));t.push(a)}this.subsSubtitlesFonts=(0,Le.z)(...t).subscribe({next:i=>{i.type===Oe.dt.DownloadProgress&&this.gs.log("[DOWNLOAD_PROGRESS]",i),i.type===Oe.dt.Response&&(this.gs.log("[DOWNLOAD_COMPLETED]",i),this.subtitles=r,this.fonts=e,this.vjsReady=!0)},error:i=>{this.gs.log("[DOWNLOAD_ERROR]",i)}})}}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(Ce.U),u.Y36(Me.z),u.Y36(Ve.x),u.Y36(rt.Z),u.Y36(w.A),u.Y36(D.r),u.Y36(V.e),u.Y36(xe),u.Y36(ie.N),u.Y36(de.R),u.Y36(ue))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-detail"]],decls:3,vars:1,consts:[["class","p-0 m-0",4,"ngIf"],["noData",""],[1,"p-0","m-0"],[1,"container-fluid","p-0"],[1,"wrapper"],[1,"bg-bubbles","align-items-center","p-0"],[1,"row","align-items-center","h-100"],[1,"col-12","mx-auto"],[1,"container","text-light"],[1,"mb-0",2,"line-height","normal"],[1,"mb-3"],[1,"mb-0"],[1,"container"],[1,"row"],[1,"col-md-5","col-xl-4","p-3"],[1,"row","sticky-top"],[1,"col"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],[3,"routerLink",4,"ngIf"],[3,"routerLink",4,"ngFor","ngForOf"],[3,"routerLink"],["matListAvatar","",1,"ms-3",3,"src"],["class","row py-3",4,"ngIf"],["class","col-12 text-center",4,"ngIf"],[1,"col-md-7","col-xl-8","p-3","sticky-top"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"p-3"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],[1,"col-12","text-center"],[1,"px-3"],["class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["class","px-3",4,"ngIf"],["class","col",4,"ngIf"],["class","m-1 w-100","mat-stroked-button","","color","accent",3,"matTooltip","click",4,"ngFor","ngForOf"],["mat-stroked-button","","color","accent",1,"m-1","w-100",3,"matTooltip","click"],[1,"me-1"],["color","accent",3,"mode","value"],["class","px-3 text-danger","style","cursor: pointer;",3,"click",4,"ngIf"],[1,"px-3","text-danger",2,"cursor","pointer",3,"click"],["mat-stroked-button","","color","accent","matTooltip","Direct Download Link Berkas",1,"m-1",3,"click"],[4,"ngIf","ngIfElse"],["class","m-1","target","_blank","mat-stroked-button","","color","accent",3,"href",4,"ngFor","ngForOf"],["target","_blank","mat-stroked-button","","color","accent",1,"m-1",3,"href"],["mat-stroked-button","","color","accent",1,"m-1",3,"click"],[1,"py-2","px-3"],["href","https://bugzilla.mozilla.org/show_bug.cgi?id=1422891",1,"text-warning","text-decoration-none"],["class","w-100","mat-stroked-button","","color","accent",3,"click",4,"ngIf"],["color","accent","mode","buffer",4,"ngIf"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts",4,"ngIf"],["mat-stroked-button","","color","accent",1,"w-100",3,"click"],["color","accent","mode","buffer"],[3,"videoUrl","videoThumb","subtitleUrl","subtitleFonts"],[1,"py-2","px-3",2,"white-space","pre-line !important",3,"innerHTML"],[1,"col-12","p-3"]],template:function(t,r){1&t&&(u.YNc(0,e0,66,22,"div",0),u.YNc(1,t0,1,0,"ng-template",null,1,u.W1O)),2&t&&u.Q6J("ngIf",r.berkasData)},directives:[J.O5,Q.t,ee.Ub,ee.vS,_e.rH,ee.eA,J.sg,De.lW,ze.gM,Ge.Hw,qe.pW,De.zs,Cv,kv.Y,Av.S,wv.d],pipes:[J.uU,J.OU,pc.$],styles:[".wrapper[_ngcontent-%COMP%]{position:sticky;left:0;width:100%;height:128px;overflow:hidden;background-size:168px,auto!important;background-repeat:no-repeat,repeat!important;background-position-x:100%,0%!important}.bg-bubbles[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{position:absolute;list-style:none;display:block;width:40px;height:40px;background-color:#ffffff26;bottom:-160px;animation:square 25s infinite;transition-timing-function:linear}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(1){left:10%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(2){left:20%;width:80px;height:80px;animation-delay:2s;animation-duration:17s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(3){left:25%;animation-delay:4s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(4){left:40%;width:60px;height:60px;animation-duration:22s;background-color:#ffffff40}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(5){left:70%}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(6){left:80%;width:120px;height:120px;animation-delay:3s;background-color:#fff3}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(7){left:32%;width:160px;height:160px;animation-delay:7s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(8){left:55%;width:20px;height:20px;animation-delay:15s;animation-duration:40s}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(9){left:25%;width:10px;height:10px;animation-delay:2s;animation-duration:40s;background-color:#ffffff4d}.bg-bubbles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:nth-child(10){left:90%;width:160px;height:160px;animation-delay:11s}@keyframes square{0%{transform:translateY(0)}to{transform:translateY(-512px) rotate(512deg)}}"]}),s})();var Ra=j(8372),Ma=j(9094),jo=j(3900),Vo=j(8746),Na=j(5625),r0=j(519),n0=j(8439),a0=j(5679),s0=j(6781),o0=j(7902),Fa=j(7322),u0=j(2368),l0=j(4107),mc=j(508),d0=j(7531),gc=j(1079),c0=j(4834);function f0(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.ALo(2,"bytes"),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.hij("Ukuran Upload Melebihi Batas ",u.lcZ(2,1,t.imageLimitExceeded)," !")}}function h0(s,n){if(1&s&&(u.TgZ(0,"div"),u._uU(1),u.qZA()),2&s){const t=u.oxw(2);u.xp6(1),u.Oqu(t.imageErrorText)}}function p0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",27)(1,"button",30),u.NdJ("click",function(){return u.CHM(t),u.oxw(2).submitImage()}),u.TgZ(2,"mat-icon",31),u._uU(3,"add_photo_alternate"),u.qZA(),u._uU(4," Unggah "),u.qZA()()}if(2&s){const t=u.oxw(2);u.xp6(1),u.Q6J("disabled",t.submitted)}}function m0(s,n){1&s&&(u.TgZ(0,"div",24)(1,"mat-slide-toggle",43),u._uU(2," Jadikan Private, Akses Hanya Dengan URL "),u.qZA()())}function g0(s,n){if(1&s&&(u.TgZ(0,"mat-option",44),u._uU(1),u.qZA()),2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.Oqu(t.name)}}function v0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Tidak Boleh Kosong"),u.qZA())}function _0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Jenis Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function y0(s,n){1&s&&(u.TgZ(0,"mat-option",50),u._UZ(1,"mat-progress-bar",51),u.qZA())}function T0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",53),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).filterAnimeSelected(i)}),u._UZ(1,"img",54),u.TgZ(2,"span",42),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.lnq("",t.id," :: ",null==t.media_type?null:t.media_type.toUpperCase()," :: ",t.title,"")}}function b0(s,n){if(1&s&&(u.ynx(0),u.YNc(1,T0,4,5,"mat-option",52),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredAnime)}}function x0(s,n){if(1&s&&(u.TgZ(0,"small",55),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.fg.get("anime_name").value)}}function S0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Tidak Boleh Kosong"),u.qZA())}function E0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Anime Hanya Boleh Angka"),u.qZA())}function C0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",45)(1,"mat-label"),u._uU(2,"Anime Terkait"),u.qZA(),u.TgZ(3,"input",46),u.NdJ("keyup",function(){return u.CHM(t),u.oxw(2).resetSelectedAnime()}),u.qZA(),u.TgZ(4,"mat-icon",15),u._uU(5,"short_text"),u.qZA(),u.TgZ(6,"mat-autocomplete",null,47),u.YNc(8,y0,2,0,"mat-option",48),u.YNc(9,b0,2,1,"ng-container",17),u.qZA(),u.YNc(10,x0,2,1,"small",49),u.TgZ(11,"mat-error"),u.YNc(12,S0,2,0,"div",17),u.YNc(13,E0,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(7),r=u.oxw(2);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(5),u.Q6J("ngIf",r.isLoading),u.xp6(1),u.Q6J("ngIf",!r.isLoading),u.xp6(1),u.Q6J("ngIf",r.fg.get("anime_name").value),u.xp6(2),u.Q6J("ngIf",r.fg.get("anime_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",r.fg.get("anime_id").hasError("pattern"))}}function k0(s,n){1&s&&(u.TgZ(0,"mat-option",50),u._UZ(1,"mat-progress-bar",51),u.qZA())}function A0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",53),u.NdJ("click",function(){const i=u.CHM(t).$implicit;return u.oxw(4).filterDoramaSelected(i)}),u._UZ(1,"img",54),u.TgZ(2,"span",42),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.mdl_id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.mdl_id," :: ",t.title,"")}}function w0(s,n){if(1&s&&(u.ynx(0),u.YNc(1,A0,4,4,"mat-option",52),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredDorama)}}function I0(s,n){if(1&s&&(u.TgZ(0,"small",55),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.fg.get("dorama_name").value)}}function D0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Tidak Boleh Kosong"),u.qZA())}function P0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Dorama Hanya Boleh Angka"),u.qZA())}function L0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-form-field",45)(1,"mat-label"),u._uU(2,"Dorama Terkait"),u.qZA(),u.TgZ(3,"input",56),u.NdJ("keyup",function(){return u.CHM(t),u.oxw(2).resetSelectedDorama()}),u.qZA(),u.TgZ(4,"mat-icon",15),u._uU(5,"short_text"),u.qZA(),u.TgZ(6,"mat-autocomplete",null,57),u.YNc(8,k0,2,0,"mat-option",48),u.YNc(9,w0,2,1,"ng-container",17),u.qZA(),u.YNc(10,I0,2,1,"small",49),u.TgZ(11,"mat-error"),u.YNc(12,D0,2,0,"div",17),u.YNc(13,P0,2,0,"div",17),u.qZA()()}if(2&s){const t=u.MAs(7),r=u.oxw(2);u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",t),u.xp6(5),u.Q6J("ngIf",r.isLoading),u.xp6(1),u.Q6J("ngIf",!r.isLoading),u.xp6(1),u.Q6J("ngIf",r.fg.get("dorama_name").value),u.xp6(2),u.Q6J("ngIf",r.fg.get("dorama_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",r.fg.get("dorama_id").hasError("pattern"))}}function O0(s,n){1&s&&(u.TgZ(0,"mat-icon",15),u._uU(1,"short_text"),u.qZA())}function R0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",63),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index;return u.oxw(2).removeFansub(e)}),u.TgZ(1,"mat-icon"),u._uU(2,"close"),u.qZA()()}}function M0(s,n){1&s&&(u.TgZ(0,"mat-option",50),u._UZ(1,"mat-progress-bar",51),u.qZA())}function N0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"mat-option",53),u.NdJ("click",function(){const i=u.CHM(t).$implicit,a=u.oxw(2).index;return u.oxw(2).filterFansubSelected(i,a)}),u._UZ(1,"img",64),u.TgZ(2,"span",42),u._uU(3),u.qZA()()}if(2&s){const t=n.$implicit;u.Q6J("value",t.id),u.xp6(1),u.s9C("src",t.image_url,u.LSH),u.xp6(2),u.AsE("",t.slug," :: ",t.name,"")}}function F0(s,n){if(1&s&&(u.ynx(0),u.YNc(1,N0,4,4,"mat-option",52),u.BQk()),2&s){const t=u.oxw(3);u.xp6(1),u.Q6J("ngForOf",t.filteredFansub)}}function U0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Tidak Boleh Kosong"),u.qZA())}function B0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"ID Fansub Hanya Boleh Angka"),u.qZA())}function H0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div")(1,"div",58)(2,"mat-form-field",45)(3,"mat-label"),u._uU(4,"Fansub Terkait"),u.qZA(),u.TgZ(5,"input",59),u.NdJ("keyup",function(){const i=u.CHM(t).index;return u.oxw(2).resetSelectedFansub(i)}),u.qZA(),u.YNc(6,O0,2,0,"mat-icon",60),u.YNc(7,R0,3,0,"button",61),u.TgZ(8,"mat-autocomplete",null,62),u.YNc(10,M0,2,0,"mat-option",48),u.YNc(11,F0,2,1,"ng-container",17),u.qZA(),u.TgZ(12,"small",55),u._uU(13),u.qZA(),u.TgZ(14,"mat-error"),u.YNc(15,U0,2,0,"div",17),u.YNc(16,B0,2,0,"div",17),u.qZA()()()()}if(2&s){const t=n.$implicit,r=n.index,e=u.MAs(9),i=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",r),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("matAutocomplete",e),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").value||0===r),u.xp6(1),u.Q6J("ngIf",!t.get("fansub_id").value&&r>0),u.xp6(3),u.Q6J("ngIf",i.isLoading),u.xp6(1),u.Q6J("ngIf",!i.isLoading),u.xp6(2),u.Oqu(t.get("fansub_name").value),u.xp6(2),u.Q6J("ngIf",t.get("fansub_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("fansub_id").hasError("pattern"))}}function j0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Tidak Boleh Kosong"),u.qZA())}function V0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Nama Berkas Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function q0(s,n){1&s&&(u.TgZ(0,"div",9)(1,"div",24),u._UZ(2,"mat-divider"),u.qZA()())}function W0(s,n){if(1&s&&(u.TgZ(0,"p",69),u._uU(1),u.qZA()),2&s){const t=u.oxw(3);u.xp6(1),u.Oqu(t.attachmentFontSubtitle.join(", ").toLowerCase())}}function G0(s,n){if(1&s&&(u.TgZ(0,"div",9)(1,"mat-list")(2,"div",65),u._uU(3,"Berkas yang terlampir tidak boleh diubah."),u.qZA(),u.TgZ(4,"mat-list-item")(5,"mat-icon",66),u._uU(6,"attach_file"),u.qZA(),u.TgZ(7,"div",67),u._uU(8),u.qZA(),u.TgZ(9,"div",67),u._uU(10),u.ALo(11,"bytes"),u.qZA()(),u.YNc(12,W0,2,1,"p",68),u.qZA()()),2&s){const t=u.oxw(2);u.xp6(8),u.AsE("",t.attachmentFile.name,".",t.attachmentFile.ext,""),u.xp6(2),u.Oqu(u.lcZ(11,4,t.attachmentFile.size)),u.xp6(2),u.Q6J("ngIf",t.attachmentFontSubtitle.length>0)}}function Z0(s,n){1&s&&(u.TgZ(0,"mat-icon",15),u._uU(1,"web"),u.qZA())}function z0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",63),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index;return u.oxw(2).removeDownloadLink(e)}),u.TgZ(1,"mat-icon"),u._uU(2,"close"),u.qZA()()}}function K0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Tidak Boleh Kosong"),u.qZA())}function $0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Web Hanya Boleh Huruf Standar Papan Ketik"),u.qZA())}function Y0(s,n){1&s&&(u.TgZ(0,"mat-icon",15),u._uU(1,"link"),u.qZA())}function X0(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"button",63),u.NdJ("click",function(){u.CHM(t);const e=u.oxw().index;return u.oxw(2).removeDownloadLink(e)}),u.TgZ(1,"mat-icon"),u._uU(2,"close"),u.qZA()()}}function Q0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Tidak Boleh Kosong"),u.qZA())}function J0(s,n){1&s&&(u.TgZ(0,"div"),u._uU(1,"Tautan Link Tidak Valid"),u.qZA())}function e_(s,n){if(1&s&&(u.TgZ(0,"div")(1,"div",70)(2,"mat-form-field",71)(3,"mat-label"),u._uU(4,"Nama Website"),u.qZA(),u._UZ(5,"input",72),u.YNc(6,Z0,2,0,"mat-icon",60),u.YNc(7,z0,3,0,"button",61),u.TgZ(8,"mat-error"),u.YNc(9,K0,2,0,"div",17),u.YNc(10,$0,2,0,"div",17),u.qZA()(),u.TgZ(11,"mat-form-field",73)(12,"mat-label"),u._uU(13,"Tautan Link"),u.qZA(),u._UZ(14,"input",74),u.YNc(15,Y0,2,0,"mat-icon",60),u.YNc(16,X0,3,0,"button",61),u.TgZ(17,"mat-error"),u.YNc(18,Q0,2,0,"div",17),u.YNc(19,J0,2,0,"div",17),u.qZA()()()()),2&s){const t=n.$implicit,r=n.index,e=u.oxw(2);u.xp6(1),u.Q6J("formGroupName",r),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("required",e.hasRequiredField(t,"name")),u.xp6(1),u.Q6J("ngIf",t.get("name").value||0===r&&e.hasRequiredField(t,"name")),u.xp6(1),u.Q6J("ngIf",!t.get("name").value&&(r>0||!e.hasRequiredField(t,"name"))),u.xp6(2),u.Q6J("ngIf",t.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("name").hasError("pattern")),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("required",e.hasRequiredField(t,"url")),u.xp6(1),u.Q6J("ngIf",t.get("url").value||0===r&&e.hasRequiredField(t,"url")),u.xp6(1),u.Q6J("ngIf",!t.get("url").value&&(r>0||!e.hasRequiredField(t,"url"))),u.xp6(2),u.Q6J("ngIf",t.get("url").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.get("url").hasError("pattern"))}}function t_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"form",4),u.NdJ("submit",function(){return u.CHM(t),u.oxw().onSubmit()}),u.TgZ(1,"div",5)(2,"div",6)(3,"h2",7)(4,"b",8),u._uU(5,"Ubah Berkas"),u.qZA()()(),u.TgZ(6,"div",2)(7,"div",9)(8,"div",10)(9,"div",9)(10,"div",2),u._UZ(11,"img",11),u.TgZ(12,"mat-form-field",12)(13,"mat-label"),u._uU(14,"Gambar Untuk Embed SEO"),u.qZA(),u.TgZ(15,"ngx-mat-file-input",13,14),u.NdJ("change",function(e){u.CHM(t);const i=u.MAs(16);return u.oxw().uploadImage(e,i)}),u.qZA(),u.TgZ(17,"mat-icon",15),u._uU(18,"image"),u.qZA()(),u.TgZ(19,"mat-error",16)(20,"small"),u.YNc(21,f0,3,3,"div",17),u.YNc(22,h0,2,1,"div",17),u.qZA()()(),u.YNc(23,p0,5,1,"div",18),u.YNc(24,m0,3,0,"div",19),u.TgZ(25,"mat-form-field",20)(26,"mat-label"),u._uU(27,"Jenis Proyek"),u.qZA(),u.TgZ(28,"mat-select",21),u.YNc(29,g0,2,2,"mat-option",22),u.qZA(),u.TgZ(30,"mat-error"),u.YNc(31,v0,2,0,"div",17),u.YNc(32,_0,2,0,"div",17),u.qZA()(),u.YNc(33,C0,14,7,"mat-form-field",23),u.YNc(34,L0,14,7,"mat-form-field",23),u.TgZ(35,"div",24),u._UZ(36,"mat-divider"),u.qZA(),u.TgZ(37,"div",25),u.YNc(38,H0,17,10,"div",26),u.qZA(),u.TgZ(39,"div",27)(40,"div",9),u._UZ(41,"div",28),u.TgZ(42,"div",29)(43,"button",30),u.NdJ("click",function(){return u.CHM(t),u.oxw().addFansub()}),u.TgZ(44,"mat-icon",31),u._uU(45,"add"),u.qZA(),u._uU(46," Tambah Fansub "),u.qZA()()()()()(),u.TgZ(47,"div",32)(48,"div",9)(49,"mat-form-field",20)(50,"mat-label"),u._uU(51,"Nama Berkas"),u.qZA(),u._UZ(52,"input",33),u.TgZ(53,"mat-icon",15),u._uU(54,"wysiwyg"),u.qZA(),u.TgZ(55,"mat-error"),u.YNc(56,j0,2,0,"div",17),u.YNc(57,V0,2,0,"div",17),u.qZA()(),u._UZ(58,"angular-editor",34),u.qZA(),u.YNc(59,q0,3,0,"div",35),u.YNc(60,G0,13,6,"div",35),u.TgZ(61,"div",9)(62,"div",24),u._UZ(63,"mat-divider"),u.qZA()(),u.TgZ(64,"div",36),u.YNc(65,e_,20,13,"div",26),u.qZA(),u.TgZ(66,"div",37),u._UZ(67,"div",28)(68,"div",28)(69,"div",28),u.TgZ(70,"div",29)(71,"button",30),u.NdJ("click",function(){return u.CHM(t),u.oxw().addDownloadLink()}),u.TgZ(72,"mat-icon",31),u._uU(73,"add"),u.qZA(),u._uU(74," Tambah URL "),u.qZA()()()()(),u.TgZ(75,"div",9)(76,"div",38)(77,"div",9),u._UZ(78,"div",28),u.TgZ(79,"div",39)(80,"a",40)(81,"mat-icon",31),u._uU(82,"undo"),u.qZA(),u._uU(83," Batal "),u.qZA()(),u.TgZ(84,"div",39)(85,"button",41),u._uU(86," Simpan "),u.TgZ(87,"mat-icon",42),u._uU(88,"save"),u.qZA()()()()()()()()()}if(2&s){const t=u.oxw();u.Q6J("formGroup",t.fg),u.xp6(11),u.Q6J("src",t.image_url,u.LSH),u.xp6(1),u.Q6J("color","accent"),u.xp6(3),u.Q6J("disabled",t.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),u.xp6(6),u.Q6J("ngIf",t.imageLimitExceeded),u.xp6(1),u.Q6J("ngIf",t.imageErrorText),u.xp6(1),u.Q6J("ngIf",t.image&&!t.fg.value.image),u.xp6(1),u.Q6J("ngIf",null==t.AS.currentUserSubject||null==t.AS.currentUserSubject.value?null:t.AS.currentUserSubject.value.verified),u.xp6(1),u.Q6J("color","accent"),u.xp6(4),u.Q6J("ngForOf",t.projectList),u.xp6(2),u.Q6J("ngIf",t.fg.get("projectType_id").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.fg.get("projectType_id").hasError("pattern")),u.xp6(1),u.Q6J("ngIf",t.berkasType.toLowerCase().includes("anime")),u.xp6(1),u.Q6J("ngIf",t.berkasType.toLowerCase().includes("dorama")),u.xp6(4),u.Q6J("ngForOf",t.getFansubControl.controls),u.xp6(5),u.Q6J("disabled",t.submitted),u.xp6(6),u.Q6J("color","accent"),u.xp6(7),u.Q6J("ngIf",t.fg.get("name").hasError("required")),u.xp6(1),u.Q6J("ngIf",t.fg.get("name").hasError("pattern")),u.xp6(1),u.Q6J("config",t.GS.angularEditorConfig),u.xp6(1),u.Q6J("ngIf",t.attachmentFile),u.xp6(1),u.Q6J("ngIf",t.attachmentFile),u.xp6(5),u.Q6J("ngForOf",t.getDownloadUrlControl.controls),u.xp6(6),u.Q6J("disabled",t.submitted),u.xp6(9),u.Q6J("disabled",t.submitted),u.xp6(5),u.Q6J("disabled",t.submitted||t.fg.invalid||!t.fg.dirty)}}let i_=(()=>{class s{constructor(t,r,e,i,a,o,l,d,f,v,g,T,E,x){this.router=t,this.activatedRoute=r,this.fb=e,this.bs=i,this.pi=a,this.anime=o,this.dorama=l,this.project=d,this.fansub=f,this.berkas=v,this.toast=g,this.imgbb=T,this.gs=E,this.as=x,this.berkasId="",this.submitted=!1,this.projectList=[],this.gambar=null,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.filteredAnime=[],this.filteredDorama=[],this.filteredFansub=[],this.isLoading=!1,this.animeCheckOrAddResponse=null,this.doramaCheckOrAddResponse=null,this.attachmentFile=null,this.attachmentFontSubtitle=[],this.subsProject=null,this.subsFansub=null,this.subsAnimeDetail=null,this.subsDoramaDetail=null,this.subsProjectDetail=null,this.subsFansubDetail=[],this.subsAnimeNew=null,this.subsDoramaNew=null,this.subsImgbb=null,this.subsBerkasDetail=null,this.subsBerkasUpdate=null,this.berkasType="",this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}get GS(){return this.gs}ngOnInit(){this.pi.updatePageMetaData("Berkas - Ubah Berkas","Halaman Pembaharuan Data Berkas","Ubah Berkas"),this.gs.isBrowser&&(this.berkasId=this.activatedRoute.snapshot.paramMap.get("berkasId"),this.bs.busy(),this.subsBerkasDetail=this.berkas.getBerkas(this.berkasId).subscribe({next:t=>{var r,e;this.gs.log("[BERKAS_DETAIL_SUCCESS]",t),this.bs.idle(),(null===(e=null===(r=this.as.currentUserSubject)||void 0===r?void 0:r.value)||void 0===e?void 0:e.id)!==t.result.user_.id?(this.toast.warning("Berkas Ini Bukan Milikmu","Whoops!",null,!0),this.router.navigateByUrl(`/berkas/${t.result.id}`)):(this.loadProjectList(),this.initForm(t.result))},error:t=>{this.gs.log("[BERKAS_DETAIL_ERROR]",t,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/berkas/${this.berkasId}`}})}}))}ngOnDestroy(){var t,r,e,i,a,o,l,d,f,v;null===(t=this.subsProject)||void 0===t||t.unsubscribe(),null===(r=this.subsFansub)||void 0===r||r.unsubscribe(),null===(e=this.subsAnimeDetail)||void 0===e||e.unsubscribe(),null===(i=this.subsDoramaDetail)||void 0===i||i.unsubscribe(),null===(a=this.subsProjectDetail)||void 0===a||a.unsubscribe();for(const g of this.subsFansubDetail)null==g||g.unsubscribe();null===(o=this.subsAnimeNew)||void 0===o||o.unsubscribe(),null===(l=this.subsDoramaNew)||void 0===l||l.unsubscribe(),null===(d=this.subsImgbb)||void 0===d||d.unsubscribe(),null===(f=this.subsBerkasDetail)||void 0===f||f.unsubscribe(),null===(v=this.subsBerkasUpdate)||void 0===v||v.unsubscribe()}loadProjectList(){this.bs.busy(),this.subsProject=this.project.getProject().subscribe({next:t=>{this.gs.log("[PROJECT_LOAD_SUCCESS]",t),this.projectList=t.results,this.bs.idle()},error:t=>{this.gs.log("[PROJECT_LOAD_ERROR]",t,"error"),this.bs.idle()}})}hasRequiredField(t,r){return t.get(r).hasValidator(B.kI.required)}initForm(t){var r,e,i,a;"attachment_"in t&&t.attachment_&&(this.attachmentFile=t.attachment_,t.attachment_.fonts_&&t.attachment_.fonts_.forEach(o=>{this.attachmentFontSubtitle.push(`${o.name}.${o.ext}`)}),t.attachment_.subtitles_&&t.attachment_.subtitles_.forEach(o=>{this.attachmentFontSubtitle.push(`${o.name}.${o.ext}`)})),this.fg=this.fb.group({name:[t.name,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],description:[t.description,B.kI.compose([B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],projectType_id:[t.project_type_.id,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],anime_id:[(null===(r=t.anime_)||void 0===r?void 0:r.id)||null,B.kI.compose([])],anime_name:[(null===(e=t.anime_)||void 0===e?void 0:e.name)||null,B.kI.compose([])],dorama_id:[(null===(i=t.dorama_)||void 0===i?void 0:i.id)||null,B.kI.compose([])],dorama_name:[(null===(a=t.dorama_)||void 0===a?void 0:a.name)||null,B.kI.compose([])],fansub_list:this.fb.array([]),image:[null,B.kI.compose([B.kI.pattern(re.t.regexUrl)])],download_url:this.fb.array([]),private:[t.private,B.kI.compose([B.kI.required])]}),this.image_url=t.image_url,this.image_url_original=this.image_url,this.berkasType=t.project_type_.name,t.anime_&&(this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])),t.dorama_&&(this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required]));for(const o of t.download_url)this.addDownloadLink(o);for(const o of t.fansub_)this.addFansub(o);this.subsAnimeDetail=this.fg.get("anime_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,jo.w)(o=>this.anime.searchAnime(o).pipe((0,Vo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_SUCCESS]",o),this.filteredAnime=o.results},error:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_ANIME_RESULT_ERROR]",o,"error")}}),this.subsDoramaDetail=this.fg.get("dorama_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,jo.w)(o=>this.dorama.searchDorama(o).pipe((0,Vo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_SUCCESS]",o);for(const l of o.results)l.mdl_id=l.mdl_id.split("-")[1],l.image_url=l.thumb;this.filteredDorama=o.results},error:o=>{this.gs.log("[BERKAS_EDIT_SEARCH_DORAMA_RESULT_ERROR]",o,"error")}}),this.subsProjectDetail=this.fg.get("projectType_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,Na.X)(-1)).subscribe({next:o=>{this.gs.log("[BERKAS_EDIT_PROJECT_CHANGED]",o);const l=this.projectList.find(d=>d.id===o);this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null),this.fg.controls.anime_id.setErrors(null),this.fg.controls.anime_name.setErrors(null),this.fg.controls.dorama_id.setErrors(null),this.fg.controls.dorama_name.setErrors(null),this.fg.controls.anime_id.clearValidators(),this.fg.controls.anime_name.clearValidators(),this.fg.controls.dorama_id.clearValidators(),this.fg.controls.dorama_name.clearValidators(),this.fg.controls.anime_id.markAsPristine(),this.fg.controls.anime_name.markAsPristine(),this.fg.controls.dorama_id.markAsPristine(),this.fg.controls.dorama_name.markAsPristine(),this.fg.controls.anime_id.markAsUntouched(),this.fg.controls.anime_name.markAsUntouched(),this.fg.controls.dorama_id.markAsUntouched(),this.fg.controls.dorama_name.markAsUntouched(),l.name.toLowerCase().includes("anime")?(this.berkasType=l.name,this.fg.controls.anime_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.anime_name.setValidators([B.kI.required])):l.name.toLowerCase().includes("dorama")?(this.berkasType=l.name,this.fg.controls.dorama_id.setValidators([B.kI.required,B.kI.pattern(/^\d+$/)]),this.fg.controls.dorama_name.setValidators([B.kI.required])):this.berkasType="",this.fg.controls.anime_id.updateValueAndValidity(),this.fg.controls.anime_name.updateValueAndValidity(),this.fg.controls.dorama_id.updateValueAndValidity(),this.fg.controls.dorama_name.updateValueAndValidity()}})}get getDownloadUrlControl(){return this.fg.get("download_url")}createDownloadLink(t=null,r=null){return this.fb.group({name:[t,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexEnglishKeyboardKeys)])],url:[r,B.kI.compose([B.kI.required,B.kI.pattern(re.t.regexUrl)])]})}addDownloadLink(t=null){this.getDownloadUrlControl.push(t?this.createDownloadLink(t.name,t.url):this.createDownloadLink())}removeDownloadLink(t){this.getDownloadUrlControl.removeAt(t)}get getFansubControl(){return this.fg.get("fansub_list")}createFansub(t=null){const r=this.fb.group({fansub_id:[(null==t?void 0:t.id)||null,B.kI.compose([B.kI.required,B.kI.pattern(/^\d+$/)])],fansub_name:[(null==t?void 0:t.name)||null,B.kI.compose([B.kI.required])]});return this.subsFansubDetail.push(r.get("fansub_id").valueChanges.pipe((0,Ra.b)(500),(0,Ma.x)(),(0,me.b)(()=>this.isLoading=!0),(0,jo.w)(e=>this.fansub.searchFansub(e).pipe((0,Vo.x)(()=>this.isLoading=!1))),(0,Na.X)(-1)).subscribe({next:e=>{this.gs.log("[BERKAS_EDIT_SEARCH_FANSUB_RESULT]",e),this.filteredFansub=e.results}})),r}removeFansub(t){var r;this.getFansubControl.removeAt(t),null===(r=this.subsFansubDetail[t])||void 0===r||r.unsubscribe(),this.subsFansubDetail.splice(t,1)}addFansub(t=null){this.getFansubControl.push(t?this.createFansub(t):this.createFansub())}resetSelectedAnime(){this.fg.controls.anime_name.patchValue(null)}resetSelectedDorama(){this.fg.controls.dorama_name.patchValue(null)}resetSelectedFansub(t){this.getFansubControl.controls[t].get("fansub_name").patchValue(null)}filterAnimeSelected(t){var r;this.gs.log("[ANIME_FILTER_CLICK]",t),this.submitted=!0,this.subsAnimeNew=this.anime.addNewAnime({id:t.id,name:t.title,image_url:t.image_url,type:null===(r=t.media_type)||void 0===r?void 0:r.toUpperCase()}).subscribe({next:e=>{this.gs.log("[ANIME_CHECK_ADD_SUCCESS]",e),this.animeCheckOrAddResponse=e.result,this.submitted=!1,this.fg.controls.anime_id.patchValue(e.result.id),this.fg.controls.anime_name.patchValue(e.result.name)},error:e=>{this.gs.log("[ANIME_CHECK_ADD_ERROR]",e,"error"),this.submitted=!1,this.resetSelectedAnime(),this.fg.controls.anime_id.patchValue(null),this.fg.controls.anime_name.patchValue(null)}})}filterDoramaSelected(t){this.gs.log("[DORAMA_FILTER_CLICK]",t),this.submitted=!0,this.subsDoramaNew=this.dorama.addNewDorama({id:parseInt(t.mdl_id,10),slug:t.slug,name:t.title,image_url:t.image_url,type:t.type}).subscribe({next:r=>{this.gs.log("[DORAMA_CHECK_ADD_SUCCESS]",r),this.doramaCheckOrAddResponse=r.result,this.submitted=!1,this.fg.controls.dorama_id.patchValue(r.result.id),this.fg.controls.dorama_name.patchValue(r.result.name)},error:r=>{this.gs.log("[DORAMA_CHECK_ADD_ERROR]",r,"error"),this.submitted=!1,this.resetSelectedDorama(),this.fg.controls.dorama_id.patchValue(null),this.fg.controls.dorama_name.patchValue(null)}})}filterFansubSelected(t,r){this.gs.log("[FANSUB_FILTER_CLICK]",t),this.getFansubControl.controls[r].get("fansub_id").patchValue(t.id),this.getFansubControl.controls[r].get("fansub_name").patchValue(t.name)}uploadImage(t,r){this.gambar=r,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine();const e=t.target.files[0];try{const i=new FileReader;i.readAsDataURL(e),i.onload=a=>{if(this.gs.log("[IMAGE_SELECTED]",a),e.size<=re.t.fileSizeImageLimit){const o=this.gs.document.createElement("img");o.onload=()=>{this.image=e,this.image_url=i.result.toString()},o.src=i.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=re.t.fileSizeImageLimit,this.gambar.clear(t)}}catch(i){this.image=null,this.image_url=this.image_url_original,this.gambar.clear(t)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:t=>{this.gs.log("[IMAGE_SUCCESS]",t),this.fg.controls.image.patchValue(t.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:t=>{var r;this.gs.log("[IMAGE_ERROR]",t,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.submitted=!1,this.imageErrorText=(null===(r=t.result)||void 0===r?void 0:r.message)||t.info}})}onSubmit(){this.bs.busy();const t=this.gs.getDirtyValues(this.fg);if("fansub_list"in t){const r=[];for(const e of this.fg.value.fansub_list)r.push(e.fansub_id);t.fansub_id=r,delete t.fansub_list}if(this.gs.log("[BERKAS_EDIT_DIRTY]",t),this.submitted=!0,this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsBerkasUpdate=this.berkas.updateBerkas(this.berkasId,{...t}).subscribe({next:r=>{this.gs.log("[BERKAS_EDIT_SUCCESS]",r),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl(`/berkas/${this.berkasId}`)},error:r=>{this.gs.log("[BERKAS_EDIT_ERROR]",r,"error"),this.submitted=!1,this.bs.idle()}})}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(_e.gz),u.Y36(B.qu),u.Y36(Me.z),u.Y36(rt.Z),u.Y36(r0.o),u.Y36(n0.X),u.Y36(a0.Y),u.Y36(s0.T),u.Y36(w.A),u.Y36(Y.k),u.Y36(o0.X),u.Y36(Ce.U),u.Y36(V.e))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-edit"]],decls:5,vars:1,consts:[[1,"container"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12 mb-4",4,"ngIf"],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12",3,"color"],["formControlName","projectType_id","placeholder","Anime / Drama"],[3,"value",4,"ngFor","ngForOf"],["appearance","outline","class","p-3 w-100",3,"color",4,"ngIf"],[1,"col-12","p-3"],["formArrayName","fansub_list"],[4,"ngFor","ngForOf"],[1,"col-12","mb-4"],[1,"col"],[1,"col","pb-3"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"me-1"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["matInput","","formControlName","name","placeholder","[Fansub] Judul Anime - 00 [BD 4K x265 FLAC][CRC32].mkv"],["formControlName","description",1,"p-3","w-100",3,"config"],["class","row",4,"ngIf"],["formArrayName","download_url"],[1,"row","mb-4"],[1,"col-12","py-3"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["formControlName","private","matTooltip","Hanya diakses melalui profil dan/atau url"],[3,"value"],["appearance","outline",1,"p-3","w-100",3,"color"],["matInput","","formControlName","anime_id","placeholder","Full Metal Alchemist",3,"matAutocomplete","keyup"],["autoCompleteAnime","matAutocomplete"],["class","is-loading",4,"ngIf"],["class","text-warning",4,"ngIf"],[1,"is-loading"],["mode","indeterminate"],["class","px-1",3,"value","click",4,"ngFor","ngForOf"],[1,"px-1",3,"value","click"],[1,"me-1",2,"border-radius","0","height","40px","width","30px","object-fit","cover",3,"src"],[1,"text-warning"],["matInput","","formControlName","dorama_id","placeholder","Flying Colors",3,"matAutocomplete","keyup"],["autoCompleteDorama","matAutocomplete"],[1,"row",3,"formGroupName"],["matInput","","formControlName","fansub_id","placeholder","NamaFansub",3,"matAutocomplete","keyup"],["matSuffix","",4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","",3,"click",4,"ngIf"],["autoCompleteFansub","matAutocomplete"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],[1,"me-1",2,"border-radius","0","height","40px","width","40px","object-fit","cover",3,"src"],["mat-subheader","",1,"text-warning"],["mat-list-icon",""],["mat-line",""],["class","p-3 m-0",4,"ngIf"],[1,"p-3","m-0"],["matTooltip","Silahkan Isi Alamat Website Kamu Jika Ingin Mendapatkan Traffic Pengunjung",1,"row",3,"formGroupName"],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","name","placeholder","Web Shit",3,"required"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","url","placeholder","https://drive.google.com/drive/u/2/folders/1KYTJZsmH9dyyHBXnQD4N0SjSBXcs8qD-",3,"required"]],template:function(t,r){1&t&&(u._UZ(0,"app-notifications"),u.TgZ(1,"div",0)(2,"div",1)(3,"div",2),u.YNc(4,t_,89,27,"form",3),u.qZA()()()),2&t&&(u.xp6(4),u.Q6J("ngIf",r.fg))},directives:[Q.t,J.O5,B._Y,B.JL,B.sg,Fa.KE,Fa.hX,ve.Yh,Ge.Hw,Fa.R9,Fa.TO,De.lW,u0.Rr,B.JJ,B.u,ze.gM,l0.gD,J.sg,mc.ey,d0.Nt,B.Fj,gc.ZL,gc.XC,qe.pW,c0.d,B.CE,B.x0,ke.s6,ee.i$,ee.gs,ee.Tg,ee.Nh,mc.X2,B.Q7,De.zs,_e.yS],pipes:[pc.$],styles:[""]}),s})();var r_=j(8757);function n_(s,n){1&s&&(u.TgZ(0,"div",5)(1,"div",6)(2,"div",7),u._uU(3,"* Berkas "),u.TgZ(4,"i"),u._uU(5,"Private"),u.qZA(),u._uU(6," Tidak Di Tampilkan"),u.qZA()()())}function a_(s,n){if(1&s){const t=u.EpF();u.TgZ(0,"div",1),u.YNc(1,n_,7,0,"div",2),u.TgZ(2,"div",3)(3,"app-material-tab",4),u.NdJ("tableRowClicked",function(e){return u.CHM(t),u.oxw().openBerkas(e)})("paginatorClicked",function(e){return u.CHM(t),u.oxw().onPaginatorClicked(e)})("serverSideFilter",function(e){return u.CHM(t),u.oxw().onServerSideFilter(e)})("serverSideOrder",function(e){return u.CHM(t),u.oxw().onServerSideOrder(e)}),u.qZA()()()}if(2&s){const t=u.oxw();u.xp6(1),u.Q6J("ngIf",!(null!=t.AS.currentUserSubject&&null!=t.AS.currentUserSubject.value&&t.AS.currentUserSubject.value.verified)),u.xp6(2),u.Q6J("tabData",t.tabData)("count",t.count)("serverSide",!0)}}let s_=(()=>{class s{constructor(t,r,e,i,a,o){this.router=t,this.gs=r,this.bs=e,this.berkas=i,this.fs=a,this.as=o,this.berkasData=[],this.tabData=[{name:"Berkas Terkini",icon:"file_copy",type:"table",data:{column:["Proyek","Nama Berkas","Tanggal","Kunjungan","Pemilik"],row:[]}}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsBerkas=null,this.gs.bannerImg="/assets/img/banner/berkas.jpg",this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get AS(){return this.as}ngOnDestroy(){var t;null===(t=this.subsBerkas)||void 0===t||t.unsubscribe()}ngOnInit(){this.gs.isBrowser&&this.getBerkas()}getBerkas(){this.bs.busy(),this.subsBerkas&&(this.subsBerkas.unsubscribe(),this.bs.idle()),this.subsBerkas=this.berkas.getAllBerkas(this.q,this.page,this.row,this.sort,this.order).subscribe({next:t=>{this.gs.log("[BERKAS_LIST_SUCCESS]",t),this.count=t.count,this.berkasData=[];for(const r of t.results)this.berkasData.push({id:r.id,private:r.private,foto:r.user_.image_url,Proyek:r.project_type_.name,Tanggal:r.created_at,Kunjungan:r.view_count,Pemilik:r.user_.username,"Nama Berkas":r.name});this.tabData[0].data.row=this.berkasData,this.fs.initializeFab("add",null,"Tambah Berkas Baru","/create/berkas",!1),this.bs.idle()},error:t=>{this.gs.log("[BERKAS_LIST_ERROR]",t,"error"),this.bs.idle()}})}openBerkas(t){this.gs.log("[BERKAS_LIST_CLICK_BERKAS]",t),this.router.navigateByUrl(`/berkas/${t.id}`)}onPaginatorClicked(t){this.gs.log("[BERKAS_LIST_CLICK_PAGINATOR]",t),this.page=t.pageIndex+1,this.row=t.pageSize,this.getBerkas()}onServerSideFilter(t){this.gs.log("[BERKAS_LIST_ENTER_FILTER]",t),this.q=t,this.getBerkas()}onServerSideOrder(t){this.gs.log("[BERKAS_LIST_CLICK_ORDER]",t),this.q=t.q,this.sort=t.active,this.order=t.direction,this.getBerkas()}}return s.\u0275fac=function(t){return new(t||s)(u.Y36(_e.F0),u.Y36(Ce.U),u.Y36(Me.z),u.Y36(w.A),u.Y36(D.r),u.Y36(V.e))},s.\u0275cmp=u.Xpm({type:s,selectors:[["app-berkas-list"]],decls:2,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],["class","row my-4",4,"ngIf"],[1,"row"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"row","my-4"],[1,"col-12"],[1,"text-danger","text-end"]],template:function(t,r){1&t&&(u._UZ(0,"app-notifications"),u.YNc(1,a_,4,4,"div",0)),2&t&&(u.xp6(1),u.Q6J("ngIf",r.berkasData))},directives:[Q.t,J.O5,r_.H],styles:[""]}),s})();var o_=j(2438);const u_=[{path:"",pathMatch:"full",component:s_},{path:":berkasId",children:[{path:"",pathMatch:"full",component:i0},{path:"edit",component:i_,canActivate:[vt.t],data:{title:"Berkas - Ubah Data",description:"Halaman Pembaharuan Data Fansub",keywords:"Ubah Berkas",[re.t.decoratorRoles]:[Ie.yS.ADMIN,Ie.yS.MODERATOR,Ie.yS.FANSUBBER,Ie.yS.USER]}}]}];let l_=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=u.oAB({type:s}),s.\u0275inj=u.cJS({imports:[[J.ez,_e.Bz.forChild(u_),Ee.m,Te.L,B.u5,B.UX,ve.Ad,pe.F,ke.UM,se,Ue.R,je.b,tt.T,o_.d]]}),s})()},3992:(He,we,j)=>{"use strict";var J=j(9226);He.exports=function(ve,re){return void 0===re&&(re=!1),function(Ie,Ee,Te){if(Ie)ve(Ie);else if(Ee.statusCode>=400&&Ee.statusCode<=599){var pe=Te;if(re)if(J.TextDecoder){var u=function B(ke){return void 0===ke&&(ke=""),ke.toLowerCase().split(";").reduce(function(ve,re){var Ie=re.split("="),Te=Ie[1];return"charset"===Ie[0].trim()?Te.trim():ve},"utf-8")}(Ee.headers&&Ee.headers["content-type"]);try{pe=new TextDecoder(u).decode(Te)}catch(se){}}else pe=String.fromCharCode.apply(null,new Uint8Array(Te));ve({cause:pe})}else ve(null,Te)}}},745:(He,we,j)=>{"use strict";var J=j(9226),_e=j(7154),B=j(2703);function Ie(se,Ue,je){var tt=se;return B(Ue)?(je=Ue,"string"==typeof se&&(tt={uri:se})):tt=_e({},Ue,{uri:se}),tt.callback=je,tt}function Ee(se,Ue,je){return Te(Ue=Ie(se,Ue,je))}function Te(se){if(void 0===se.callback)throw new Error("callback argument missing");var Ue=!1,je=function(le,ue,xe){Ue||(Ue=!0,se.callback(le,ue,xe))};function vt(){var Y=void 0;if(Y=me.response?me.response:me.responseText||function pe(se){try{if("document"===se.responseType)return se.responseXML;if(""===se.responseType&&(!se.responseXML||"parsererror"!==se.responseXML.documentElement.nodeName))return se.responseXML}catch(je){}return null}(me),D)try{Y=JSON.parse(Y)}catch(le){}return Y}function oe(Y){return clearTimeout(V),Y instanceof Error||(Y=new Error(""+(Y||"Unknown XMLHttpRequest Error"))),Y.statusCode=0,je(Y,te)}function Oe(){if(!Ze){var Y;clearTimeout(V);var le=te,ue=null;return 0!==(Y=se.useXDR&&void 0===me.status?200:1223===me.status?204:me.status)?(le={body:vt(),statusCode:Y,method:Me,headers:{},url:Ce,rawRequest:me},me.getAllResponseHeaders&&(le.headers=function(Ue){var je={};return Ue&&Ue.trim().split("\n").forEach(function(tt){var vt=tt.indexOf(":"),oe=tt.slice(0,vt).trim().toLowerCase(),Oe=tt.slice(vt+1).trim();void 0===je[oe]?je[oe]=Oe:Array.isArray(je[oe])?je[oe].push(Oe):je[oe]=[je[oe],Oe]}),je}(me.getAllResponseHeaders()))):ue=new Error("Internal XMLHttpRequest Error"),je(ue,le,le.body)}}var me=se.xhr||null;me||(me=se.cors||se.useXDR?new Ee.XDomainRequest:new Ee.XMLHttpRequest);var Le,Ze,V,Ce=me.url=se.uri||se.url,Me=me.method=se.method||"GET",Ve=se.body||se.data,rt=me.headers=se.headers||{},w=!!se.sync,D=!1,te={body:void 0,headers:{},statusCode:0,method:Me,url:Ce,rawRequest:me};if("json"in se&&!1!==se.json&&(D=!0,rt.accept||rt.Accept||(rt.Accept="application/json"),"GET"!==Me&&"HEAD"!==Me&&(rt["content-type"]||rt["Content-Type"]||(rt["Content-Type"]="application/json"),Ve=JSON.stringify(!0===se.json?Ve:se.json))),me.onreadystatechange=function tt(){4===me.readyState&&setTimeout(Oe,0)},me.onload=Oe,me.onerror=oe,me.onprogress=function(){},me.onabort=function(){Ze=!0},me.ontimeout=oe,me.open(Me,Ce,!w,se.username,se.password),w||(me.withCredentials=!!se.withCredentials),!w&&se.timeout>0&&(V=setTimeout(function(){if(!Ze){Ze=!0,me.abort("timeout");var Y=new Error("XMLHttpRequest timeout");Y.code="ETIMEDOUT",oe(Y)}},se.timeout)),me.setRequestHeader)for(Le in rt)rt.hasOwnProperty(Le)&&me.setRequestHeader(Le,rt[Le]);else if(se.headers&&!function re(se){for(var Ue in se)if(se.hasOwnProperty(Ue))return!1;return!0}(se.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in se&&(me.responseType=se.responseType),"beforeSend"in se&&"function"==typeof se.beforeSend&&se.beforeSend(me),me.send(Ve||null),me}Ee.httpHandler=j(3992),He.exports=Ee,He.exports.default=Ee,Ee.XMLHttpRequest=J.XMLHttpRequest||function u(){},Ee.XDomainRequest="withCredentials"in new Ee.XMLHttpRequest?Ee.XMLHttpRequest:J.XDomainRequest,function ve(se,Ue){for(var je=0;je{"use strict";function j(B,ke){return void 0===ke&&(ke=Object),ke&&"function"==typeof ke.freeze?ke.freeze(B):B}var J=j({HTML:"text/html",isHTML:function(B){return B===J.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),_e=j({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(B){return B===_e.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});we.freeze=j,we.MIME_TYPE=J,we.NAMESPACE=_e},1991:(He,we,j)=>{var _e=j(9401),B=j(6853),ke=j(4436),ve=j(8702),re=B.DOMImplementation,Ie=_e.NAMESPACE,Ee=ve.ParseError,Te=ve.XMLReader;function pe(oe){this.options=oe||{locator:{}}}function se(){this.cdata=!1}function Ue(oe,Oe){Oe.lineNumber=oe.lineNumber,Oe.columnNumber=oe.columnNumber}function je(oe){if(oe)return"\n@"+(oe.systemId||"")+"#[line:"+oe.lineNumber+",col:"+oe.columnNumber+"]"}function tt(oe,Oe,me){return"string"==typeof oe?oe.substr(Oe,me):oe.length>=Oe+me||Oe?new java.lang.String(oe,Oe,me)+"":oe}function vt(oe,Oe){oe.currentElement?oe.currentElement.appendChild(Oe):oe.doc.appendChild(Oe)}pe.prototype.parseFromString=function(oe,Oe){var me=this.options,Le=new Te,Ze=me.domBuilder||new se,Ce=me.errorHandler,Me=me.locator,Ve=me.xmlns||{},rt=/\/x?html?$/.test(Oe),w=rt?ke.HTML_ENTITIES:ke.XML_ENTITIES;return Me&&Ze.setDocumentLocator(Me),Le.errorHandler=function u(oe,Oe,me){if(!oe){if(Oe instanceof se)return Oe;oe=Oe}var Le={},Ze=oe instanceof Function;function Ce(Me){var Ve=oe[Me];!Ve&&Ze&&(Ve=2==oe.length?function(rt){oe(Me,rt)}:oe),Le[Me]=Ve&&function(rt){Ve("[xmldom "+Me+"]\t"+rt+je(me))}||function(){}}return me=me||{},Ce("warning"),Ce("error"),Ce("fatalError"),Le}(Ce,Ze,Me),Le.domBuilder=me.domBuilder||Ze,rt&&(Ve[""]=Ie.HTML),Ve.xml=Ve.xml||Ie.XML,oe&&"string"==typeof oe?Le.parse(oe,Ve,w):Le.errorHandler.error("invalid doc source"),Ze.doc},se.prototype={startDocument:function(){this.doc=(new re).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(oe,Oe,me,Le){var Ze=this.doc,Ce=Ze.createElementNS(oe,me||Oe),Me=Le.length;vt(this,Ce),this.currentElement=Ce,this.locator&&Ue(this.locator,Ce);for(var Ve=0;Ve{var _e=j(9401).NAMESPACE;function B(C){return""!==C}function ve(C,A){return C.hasOwnProperty(A)||(C[A]=!0),C}function re(C){if(!C)return[];var A=function ke(C){return C?C.split(/[\t\n\f\r ]+/).filter(B):[]}(C);return Object.keys(A.reduce(ve,{}))}function Ee(C,A){for(var R in C)A[R]=C[R]}function Te(C,A){var R=C.prototype;if(!(R instanceof A)){let ce=function(){};ce.prototype=A.prototype,ce=new ce,Ee(R,ce),C.prototype=R=ce}R.constructor!=C&&("function"!=typeof C&&console.error("unknown Class:"+C),R.constructor=C)}var pe={},u=pe.ELEMENT_NODE=1,se=pe.ATTRIBUTE_NODE=2,Ue=pe.TEXT_NODE=3,je=pe.CDATA_SECTION_NODE=4,tt=pe.ENTITY_REFERENCE_NODE=5,vt=pe.ENTITY_NODE=6,oe=pe.PROCESSING_INSTRUCTION_NODE=7,Oe=pe.COMMENT_NODE=8,me=pe.DOCUMENT_NODE=9,Le=pe.DOCUMENT_TYPE_NODE=10,Ze=pe.DOCUMENT_FRAGMENT_NODE=11,Ce=pe.NOTATION_NODE=12,Me={},Ve={},D=(Me.INDEX_SIZE_ERR=(Ve[1]="Index size error",1),Me.DOMSTRING_SIZE_ERR=(Ve[2]="DOMString size error",2),Me.HIERARCHY_REQUEST_ERR=(Ve[3]="Hierarchy request error",3)),ue=(Me.WRONG_DOCUMENT_ERR=(Ve[4]="Wrong document",4),Me.INVALID_CHARACTER_ERR=(Ve[5]="Invalid character",5),Me.NO_DATA_ALLOWED_ERR=(Ve[6]="No data allowed",6),Me.NO_MODIFICATION_ALLOWED_ERR=(Ve[7]="No modification allowed",7),Me.NOT_FOUND_ERR=(Ve[8]="Not found",8)),ie=(Me.NOT_SUPPORTED_ERR=(Ve[9]="Not supported",9),Me.INUSE_ATTRIBUTE_ERR=(Ve[10]="Attribute in use",10));function Ge(C,A){if(A instanceof Error)var R=A;else R=this,Error.call(this,Ve[C]),this.message=Ve[C],Error.captureStackTrace&&Error.captureStackTrace(this,Ge);return R.code=C,A&&(this.message=this.message+": "+A),R}function qe(){}function Fe(C,A){this._node=C,this._refresh=A,P(this)}function P(C){var A=C._node._inc||C._node.ownerDocument._inc;if(C._inc!=A){var R=C._refresh(C._node);jn(C,"length",R.length),Ee(R,C),C._inc=A}}function It(){}function K(C,A){for(var R=C.length;R--;)if(C[R]===A)return R}function it(C,A,R,Z){if(Z?A[K(A,Z)]=R:A[A.length++]=R,C){R.ownerElement=C;var ce=C.ownerDocument;ce&&(Z&&er(ce,C,Z),function St(C,A,R){C&&C._inc++,R.namespaceURI===_e.XMLNS&&(A._nsMap[R.prefix?R.localName:""]=R.value)}(ce,C,R))}}function Jt(C,A,R){var Z=K(A,R);if(!(Z>=0))throw Ge(ue,new Error(C.tagName+"@"+R));for(var ce=A.length-1;Z"==C&&">")||"&"==C&&"&"||'"'==C&&"""||"&#"+C.charCodeAt()+";"}function X(C,A){if(A(C))return!0;if(C=C.firstChild)do{if(X(C,A))return!0}while(C=C.nextSibling)}function si(){}function er(C,A,R,Z){C&&C._inc++,R.namespaceURI===_e.XMLNS&&delete A._nsMap[R.prefix?R.localName:""]}function Vi(C,A,R){if(C&&C._inc){C._inc++;var Z=A.childNodes;if(R)Z[Z.length++]=R;else{for(var ce=A.firstChild,We=0;ce;)Z[We++]=ce,ce=ce.nextSibling;Z.length=We}}}function qi(C,A){var R=A.previousSibling,Z=A.nextSibling;return R?R.nextSibling=Z:C.firstChild=Z,Z?Z.previousSibling=R:C.lastChild=R,Vi(C.ownerDocument,C),A}function Wi(C,A,R){var Z=A.parentNode;if(Z&&Z.removeChild(A),A.nodeType===Ze){var ce=A.firstChild;if(null==ce)return A;var We=A.lastChild}else ce=We=A;var bt=R?R.previousSibling:C.lastChild;ce.previousSibling=bt,We.nextSibling=R,bt?bt.nextSibling=ce:C.firstChild=ce,null==R?C.lastChild=We:R.previousSibling=We;do{ce.parentNode=C}while(ce!==We&&(ce=ce.nextSibling));return Vi(C.ownerDocument||C,C),A.nodeType==Ze&&(A.firstChild=A.lastChild=null),A}function lt(){this._nsMap={}}function Gi(){}function tr(){}function Sr(){}function Er(){}function nn(){}function Ei(){}function Cr(){}function Bn(){}function kr(){}function Ar(){}function an(){}function wr(){}function Hn(C,A){var R=[],Z=9==this.nodeType&&this.documentElement||this,ce=Z.prefix,We=Z.namespaceURI;if(We&&null==ce&&null==(ce=Z.lookupPrefix(We)))var bt=[{namespace:We,prefix:null}];return Zi(this,R,C,A,bt),R.join("")}function Gt(C,A,R){var Z=C.prefix||"",ce=C.namespaceURI;if(!ce||"xml"===Z&&ce===_e.XML||ce===_e.XMLNS)return!1;for(var We=R.length;We--;){var bt=R[We];if(bt.prefix===Z)return bt.namespace!==ce}return!0}function sn(C,A,R){C.push(" ",A,'="',R.replace(/[<&"]/g,hi),'"')}function Zi(C,A,R,Z,ce){if(ce||(ce=[]),Z){if(!(C=Z(C)))return;if("string"==typeof C)return void A.push(C)}switch(C.nodeType){case u:var We=C.attributes,bt=We.length,Et=C.firstChild,pi=C.tagName,ki=pi;if(!(R=_e.isHTML(C.namespaceURI)||R)&&!C.prefix&&C.namespaceURI){for(var mi,Nt=0;Nt=0;ei--)if(""===(oi=ce[ei]).prefix&&oi.namespace===C.namespaceURI){mi=oi.namespace;break}if(mi!==C.namespaceURI)for(ei=ce.length-1;ei>=0;ei--){var oi;if((oi=ce[ei]).namespace===C.namespaceURI){oi.prefix&&(ki=oi.prefix+":"+pi);break}}}A.push("<",ki);for(var gi=0;gi"),R&&/^script$/i.test(pi))for(;Et;)Et.data?A.push(Et.data):Zi(Et,A,R,Z,ce.slice()),Et=Et.nextSibling;else for(;Et;)Zi(Et,A,R,Z,ce.slice()),Et=Et.nextSibling;A.push("")}else A.push("/>");return;case me:case Ze:for(Et=C.firstChild;Et;)Zi(Et,A,R,Z,ce.slice()),Et=Et.nextSibling;return;case se:return sn(A,C.name,C.value);case Ue:return A.push(C.data.replace(/[<&]/g,hi).replace(/]]>/g,"]]>"));case je:return A.push("");case Oe:return A.push("\x3c!--",C.data,"--\x3e");case Le:var Vn=C.publicId,Ki=C.systemId;if(A.push("");else if(Ki&&"."!=Ki)A.push(" SYSTEM ",Ki,">");else{var as=C.internalSubset;as&&A.push(" [",as,"]"),A.push(">")}return;case oe:return A.push("");case tt:return A.push("&",C.nodeName,";");default:A.push("??",C.nodeName)}}function Ci(C,A,R){var Z;switch(A.nodeType){case u:(Z=A.cloneNode(!1)).ownerDocument=C;case Ze:break;case se:R=!0}if(Z||(Z=A.cloneNode(!1)),Z.ownerDocument=C,Z.parentNode=null,R)for(var ce=A.firstChild;ce;)Z.appendChild(Ci(C,ce,R)),ce=ce.nextSibling;return Z}function ir(C,A,R){var Z=new A.constructor;for(var ce in A){var We=A[ce];"object"!=typeof We&&We!=Z[ce]&&(Z[ce]=We)}switch(A.childNodes&&(Z.childNodes=new qe),Z.ownerDocument=C,Z.nodeType){case u:var bt=A.attributes,pi=Z.attributes=new It,ki=bt.length;pi._ownerElement=Z;for(var mi=0;mi0},lookupPrefix:function(C){for(var A=this;A;){var R=A._nsMap;if(R)for(var Z in R)if(R[Z]==C)return Z;A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},lookupNamespaceURI:function(C){for(var A=this;A;){var R=A._nsMap;if(R&&C in R)return R[C];A=A.nodeType==se?A.ownerDocument:A.parentNode}return null},isDefaultNamespace:function(C){return null==this.lookupPrefix(C)}},Ee(pe,Ae),Ee(pe,Ae.prototype),si.prototype={nodeName:"#document",nodeType:me,doctype:null,documentElement:null,_inc:1,insertBefore:function(C,A){if(C.nodeType==Ze){for(var R=C.firstChild;R;){var Z=R.nextSibling;this.insertBefore(R,A),R=Z}return C}return null==this.documentElement&&C.nodeType==u&&(this.documentElement=C),Wi(this,C,A),C.ownerDocument=this,C},removeChild:function(C){return this.documentElement==C&&(this.documentElement=null),qi(this,C)},importNode:function(C,A){return Ci(this,C,A)},getElementById:function(C){var A=null;return X(this.documentElement,function(R){if(R.nodeType==u&&R.getAttribute("id")==C)return A=R,!0}),A},getElementsByClassName:function(C){var A=re(C);return new Fe(this,function(R){var Z=[];return A.length>0&&X(R.documentElement,function(ce){if(ce!==R&&ce.nodeType===u){var We=ce.getAttribute("class");if(We){var bt=C===We;if(!bt){var pi=re(We);bt=A.every(function Ie(C){return function(A){return C&&-1!==C.indexOf(A)}}(pi))}bt&&Z.push(ce)}}}),Z})},createElement:function(C){var A=new lt;return A.ownerDocument=this,A.nodeName=C,A.tagName=C,A.localName=C,A.childNodes=new qe,(A.attributes=new It)._ownerElement=A,A},createDocumentFragment:function(){var C=new Ar;return C.ownerDocument=this,C.childNodes=new qe,C},createTextNode:function(C){var A=new Sr;return A.ownerDocument=this,A.appendData(C),A},createComment:function(C){var A=new Er;return A.ownerDocument=this,A.appendData(C),A},createCDATASection:function(C){var A=new nn;return A.ownerDocument=this,A.appendData(C),A},createProcessingInstruction:function(C,A){var R=new an;return R.ownerDocument=this,R.tagName=R.target=C,R.nodeValue=R.data=A,R},createAttribute:function(C){var A=new Gi;return A.ownerDocument=this,A.name=C,A.nodeName=C,A.localName=C,A.specified=!0,A},createEntityReference:function(C){var A=new kr;return A.ownerDocument=this,A.nodeName=C,A},createElementNS:function(C,A){var R=new lt,Z=A.split(":"),ce=R.attributes=new It;return R.childNodes=new qe,R.ownerDocument=this,R.nodeName=A,R.tagName=A,R.namespaceURI=C,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,ce._ownerElement=R,R},createAttributeNS:function(C,A){var R=new Gi,Z=A.split(":");return R.ownerDocument=this,R.nodeName=A,R.name=A,R.namespaceURI=C,R.specified=!0,2==Z.length?(R.prefix=Z[0],R.localName=Z[1]):R.localName=A,R}},Te(si,Ae),si.prototype.getElementsByTagName=(lt.prototype={nodeType:u,hasAttribute:function(C){return null!=this.getAttributeNode(C)},getAttribute:function(C){var A=this.getAttributeNode(C);return A&&A.value||""},getAttributeNode:function(C){return this.attributes.getNamedItem(C)},setAttribute:function(C,A){var R=this.ownerDocument.createAttribute(C);R.value=R.nodeValue=""+A,this.setAttributeNode(R)},removeAttribute:function(C){var A=this.getAttributeNode(C);A&&this.removeAttributeNode(A)},appendChild:function(C){return C.nodeType===Ze?this.insertBefore(C,null):function ut(C,A){var R=A.parentNode;if(R){var Z=C.lastChild;R.removeChild(A),Z=C.lastChild}return Z=C.lastChild,A.parentNode=C,A.previousSibling=Z,A.nextSibling=null,Z?Z.nextSibling=A:C.firstChild=A,C.lastChild=A,Vi(C.ownerDocument,C,A),A}(this,C)},setAttributeNode:function(C){return this.attributes.setNamedItem(C)},setAttributeNodeNS:function(C){return this.attributes.setNamedItemNS(C)},removeAttributeNode:function(C){return this.attributes.removeNamedItem(C.nodeName)},removeAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);R&&this.removeAttributeNode(R)},hasAttributeNS:function(C,A){return null!=this.getAttributeNodeNS(C,A)},getAttributeNS:function(C,A){var R=this.getAttributeNodeNS(C,A);return R&&R.value||""},setAttributeNS:function(C,A,R){var Z=this.ownerDocument.createAttributeNS(C,A);Z.value=Z.nodeValue=""+R,this.setAttributeNode(Z)},getAttributeNodeNS:function(C,A){return this.attributes.getNamedItemNS(C,A)},getElementsByTagName:function(C){return new Fe(this,function(A){var R=[];return X(A,function(Z){Z!==A&&Z.nodeType==u&&("*"===C||Z.tagName==C)&&R.push(Z)}),R})},getElementsByTagNameNS:function(C,A){return new Fe(this,function(R){var Z=[];return X(R,function(ce){ce!==R&&ce.nodeType===u&&("*"===C||ce.namespaceURI===C)&&("*"===A||ce.localName==A)&&Z.push(ce)}),Z})}}).getElementsByTagName,si.prototype.getElementsByTagNameNS=lt.prototype.getElementsByTagNameNS,Te(lt,Ae),Gi.prototype.nodeType=se,Te(Gi,Ae),tr.prototype={data:"",substringData:function(C,A){return this.data.substring(C,C+A)},appendData:function(C){this.nodeValue=this.data=C=this.data+C,this.length=C.length},insertData:function(C,A){this.replaceData(C,0,A)},appendChild:function(C){throw new Error(Ve[D])},deleteData:function(C,A){this.replaceData(C,A,"")},replaceData:function(C,A,R){var Z=this.data.substring(0,C),ce=this.data.substring(C+A);this.nodeValue=this.data=R=Z+R+ce,this.length=R.length}},Te(tr,Ae),Sr.prototype={nodeName:"#text",nodeType:Ue,splitText:function(C){var A=this.data,R=A.substring(C);A=A.substring(0,C),this.data=this.nodeValue=A,this.length=A.length;var Z=this.ownerDocument.createTextNode(R);return this.parentNode&&this.parentNode.insertBefore(Z,this.nextSibling),Z}},Te(Sr,tr),Er.prototype={nodeName:"#comment",nodeType:Oe},Te(Er,tr),nn.prototype={nodeName:"#cdata-section",nodeType:je},Te(nn,tr),Ei.prototype.nodeType=Le,Te(Ei,Ae),Cr.prototype.nodeType=Ce,Te(Cr,Ae),Bn.prototype.nodeType=vt,Te(Bn,Ae),kr.prototype.nodeType=tt,Te(kr,Ae),Ar.prototype.nodeName="#document-fragment",Ar.prototype.nodeType=Ze,Te(Ar,Ae),an.prototype.nodeType=oe,Te(an,Ae),wr.prototype.serializeToString=function(C,A,R){return Hn.call(C,A,R)},Ae.prototype.toString=Hn;try{if(Object.defineProperty){let C=function(A){switch(A.nodeType){case u:case Ze:var R=[];for(A=A.firstChild;A;)7!==A.nodeType&&8!==A.nodeType&&R.push(C(A)),A=A.nextSibling;return R.join("");default:return A.nodeValue}};Object.defineProperty(Fe.prototype,"length",{get:function(){return P(this),this.$$length}}),Object.defineProperty(Ae.prototype,"textContent",{get:function(){return C(this)},set:function(A){switch(this.nodeType){case u:case Ze:for(;this.firstChild;)this.removeChild(this.firstChild);(A||String(A))&&this.appendChild(this.ownerDocument.createTextNode(A));break;default:this.data=A,this.value=A,this.nodeValue=A}}}),jn=function(A,R,Z){A["$$"+R]=Z}}}catch(C){}we.DocumentType=Ei,we.DOMException=Ge,we.DOMImplementation=Ne,we.Element=lt,we.Node=Ae,we.NodeList=qe,we.XMLSerializer=wr},4436:(He,we,j)=>{var J=j(9401).freeze;we.XML_ENTITIES=J({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),we.HTML_ENTITIES=J({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",times:"\xd7",divide:"\xf7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",euro:"\u20ac",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),we.entityMap=we.HTML_ENTITIES},978:(He,we,j)=>{j(6853);we.DOMParser=j(1991).DOMParser},8702:(He,we,j)=>{var J=j(9401).NAMESPACE,_e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,B=new RegExp("[\\-\\.0-9"+_e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),ke=new RegExp("^"+_e.source+B.source+"*(?::"+_e.source+B.source+"*)?$");function Ue(w,D){this.message=w,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,Ue)}function je(){}function vt(w,D){return D.lineNumber=w.lineNumber,D.columnNumber=w.columnNumber,D}function oe(w,D,V,te,Y,le){function ue(ze,Ge,qe){V.attributeNames.hasOwnProperty(ze)&&le.fatalError("Attribute "+ze+" redefined"),V.addValue(ze,Ge,qe)}for(var xe,de=++D,Q=0;;){var ee=w.charAt(de);switch(ee){case"=":if(1===Q)xe=w.slice(D,de),Q=3;else{if(2!==Q)throw new Error("attribute equal must after attrName");Q=3}break;case"'":case'"':if(3===Q||1===Q){if(1===Q&&(le.warning('attribute value must after "="'),xe=w.slice(D,de)),!((de=w.indexOf(ee,D=de+1))>0))throw new Error("attribute value no end '"+ee+"' match");ue(xe,ie=w.slice(D,de).replace(/&#?\w+;/g,Y),D-1),Q=5}else{if(4!=Q)throw new Error('attribute value must after "="');ue(xe,ie=w.slice(D,de).replace(/&#?\w+;/g,Y),D),le.warning('attribute "'+xe+'" missed start quot('+ee+")!!"),D=de+1,Q=5}break;case"/":switch(Q){case 0:V.setTagName(w.slice(D,de));case 5:case 6:case 7:Q=7,V.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return le.error("unexpected end of input"),0==Q&&V.setTagName(w.slice(D,de)),de;case">":switch(Q){case 0:V.setTagName(w.slice(D,de));case 5:case 6:case 7:break;case 4:case 1:"/"===(ie=w.slice(D,de)).slice(-1)&&(V.closed=!0,ie=ie.slice(0,-1));case 2:2===Q&&(ie=xe),4==Q?(le.warning('attribute "'+ie+'" missed quot(")!'),ue(xe,ie.replace(/&#?\w+;/g,Y),D)):((!J.isHTML(te[""])||!ie.match(/^(?:disabled|checked|selected)$/i))&&le.warning('attribute "'+ie+'" missed value!! "'+ie+'" instead!!'),ue(ie,ie,D));break;case 3:throw new Error("attribute value missed!!")}return de;case"\x80":ee=" ";default:if(ee<=" ")switch(Q){case 0:V.setTagName(w.slice(D,de)),Q=6;break;case 1:xe=w.slice(D,de),Q=2;break;case 4:var ie=w.slice(D,de).replace(/&#?\w+;/g,Y);le.warning('attribute "'+ie+'" missed quot(")!!'),ue(xe,ie,D);case 5:Q=6}else switch(Q){case 2:(!J.isHTML(te[""])||!xe.match(/^(?:disabled|checked|selected)$/i))&&le.warning('attribute "'+xe+'" missed value!! "'+xe+'" instead2!!'),ue(xe,xe,D),D=de,Q=1;break;case 5:le.warning('attribute space is required"'+xe+'"!!');case 6:Q=1,D=de;break;case 3:Q=4,D=de;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}de++}}function Oe(w,D,V){for(var te=w.tagName,Y=null,ee=w.length;ee--;){var le=w[ee],ue=le.qName,xe=le.value;if((De=ue.indexOf(":"))>0)var ie=le.prefix=ue.slice(0,De),de=ue.slice(De+1),Q="xmlns"===ie&&de;else de=ue,ie=null,Q="xmlns"===ue&&"";le.localName=de,!1!==Q&&(null==Y&&(Y={},Ze(V,V={})),V[Q]=Y[Q]=xe,le.uri=J.XMLNS,D.startPrefixMapping(Q,xe))}for(ee=w.length;ee--;)(ie=(le=w[ee]).prefix)&&("xml"===ie&&(le.uri=J.XML),"xmlns"!==ie&&(le.uri=V[ie||""]));var De;(De=te.indexOf(":"))>0?(ie=w.prefix=te.slice(0,De),de=w.localName=te.slice(De+1)):(ie=null,de=w.localName=te);var ze=w.uri=V[ie||""];if(D.startElement(ze,de,te,w),!w.closed)return w.currentNSMap=V,w.localNSMap=Y,!0;if(D.endElement(ze,de,te),Y)for(ie in Y)D.endPrefixMapping(ie)}function me(w,D,V,te,Y){if(/^(?:script|textarea)$/i.test(V)){var le=w.indexOf("",D),ue=w.substring(D+1,le);if(/[&<]/.test(ue))return/^script$/i.test(V)?(Y.characters(ue,0,ue.length),le):(ue=ue.replace(/&#?\w+;/g,te),Y.characters(ue,0,ue.length),le)}return D+1}function Le(w,D,V,te){var Y=te[V];return null==Y&&((Y=w.lastIndexOf(""))D?(V.comment(w,D+4,le-D-4),le+3):(te.error("Unclosed comment"),-1):-1;if("CDATA["==w.substr(D+3,6)){var le=w.indexOf("]]>",D+9);return V.startCDATA(),V.characters(w,D+9,le-D-9),V.endCDATA(),le+3}var ue=function rt(w,D){var V,te=[],Y=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(Y.lastIndex=D,Y.exec(w);V=Y.exec(w);)if(te.push(V),V[1])return te}(w,D),xe=ue.length;if(xe>1&&/!doctype/i.test(ue[0][0])){var ie=ue[1][0],de=!1,Q=!1;xe>3&&(/^public$/i.test(ue[2][0])?(de=ue[3][0],Q=xe>4&&ue[4][0]):/^system$/i.test(ue[2][0])&&(Q=ue[3][0]));var ee=ue[xe-1];return V.startDTD(ie,de,Q),V.endDTD(),ee.index+ee[0].length}return-1}function Me(w,D,V){var te=w.indexOf("?>",D);if(te){var Y=w.substring(D,te).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return Y?(V.processingInstruction(Y[1],Y[2]),te+2):-1}return-1}function Ve(){this.attributeNames={}}(Ue.prototype=new Error).name=Ue.name,je.prototype={parse:function(w,D,V){var te=this.domBuilder;te.startDocument(),Ze(D,D={}),function tt(w,D,V,te,Y){function ue(ut){var lt=ut.slice(1,-1);return lt in V?V[lt]:"#"===lt.charAt(0)?function le(ut){return ut>65535?(ut-=65536,String.fromCharCode(55296+(ut>>10),56320+(1023&ut))):String.fromCharCode(ut)}(parseInt(lt.substr(1).replace("x","0x"))):(Y.error("entity not found:"+ut),ut)}function xe(ut){if(ut>qe){var lt=w.substring(qe,ut).replace(/&#?\w+;/g,ue);De&&ie(qe),te.characters(lt,0,ut-qe),qe=ut}}function ie(ut,lt){for(;ut>=Q&&(lt=ee.exec(w));)Q=(de=lt.index)+lt[0].length,De.lineNumber++;De.columnNumber=ut-de+1}for(var de=0,Q=0,ee=/.*(?:\r\n?|\n)|.*$/g,De=te.locator,ze=[{currentNSMap:D}],Ge={},qe=0;;){try{var Fe=w.indexOf("<",qe);if(Fe<0){if(!w.substr(qe).match(/^\s*$/)){var P=te.doc,It=P.createTextNode(w.substr(qe));P.appendChild(It),te.currentElement=It}return}switch(Fe>qe&&xe(Fe),w.charAt(Fe+1)){case"/":var St=w.indexOf(">",Fe+3),K=w.substring(Fe+2,St).replace(/[ \t\n\r]+$/g,""),it=ze.pop();St<0?(K=w.substring(Fe+2).replace(/[\s<].*/,""),Y.error("end tag name: "+K+" is not complete:"+it.tagName),St=Fe+1+K.length):K.match(/\sqe?qe=St:xe(Math.max(Fe,qe)+1)}}(w,D,V,te,this.errorHandler),te.endDocument()}},Ve.prototype={setTagName:function(w){if(!ke.test(w))throw new Error("invalid tagName:"+w);this.tagName=w},addValue:function(w,D,V){if(!ke.test(w))throw new Error("invalid attribute:"+w);this.attributeNames[w]=this.length,this[this.length++]={qName:w,value:D,offset:V}},length:0,getLocalName:function(w){return this[w].localName},getLocator:function(w){return this[w].locator},getQName:function(w){return this[w].qName},getURI:function(w){return this[w].uri},getValue:function(w){return this[w].value}},we.XMLReader=je,we.ParseError=Ue},1421:(He,we,j)=>{var B,J="undefined"!=typeof global?global:"undefined"!=typeof window?window:{},_e=j(5893);"undefined"!=typeof document?B=document:(B=J["__GLOBAL_DOCUMENT_CACHE@4"])||(B=J["__GLOBAL_DOCUMENT_CACHE@4"]=_e),He.exports=B},9226:He=>{var we;we="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},He.exports=we},2703:He=>{He.exports=function j(J){if(!J)return!1;var _e=we.call(J);return"[object Function]"===_e||"function"==typeof J&&"[object RegExp]"!==_e||"undefined"!=typeof window&&(J===window.setTimeout||J===window.alert||J===window.confirm||J===window.prompt)};var we=Object.prototype.toString},1234:(He,we)=>{function j(re){if(re&&"object"==typeof re){var Ie=re.which||re.keyCode||re.charCode;Ie&&(re=Ie)}if("number"==typeof re)return ke[re];var Te,Ee=String(re);return(Te=J[Ee.toLowerCase()])?Te:(Te=_e[Ee.toLowerCase()])||(1===Ee.length?Ee.charCodeAt(0):void 0)}j.isEventKey=function(Ie,Ee){if(Ie&&"object"==typeof Ie){var Te=Ie.which||Ie.keyCode||Ie.charCode;if(null==Te)return!1;if("string"==typeof Ee){var pe;if(pe=J[Ee.toLowerCase()])return pe===Te;if(pe=_e[Ee.toLowerCase()])return pe===Te}else if("number"==typeof Ee)return Ee===Te;return!1}};var J=(we=He.exports=j).code=we.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},_e=we.aliases={windows:91,"\u21e7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(B=97;B<123;B++)J[String.fromCharCode(B)]=B-32;for(var B=48;B<58;B++)J[B-48]=B;for(B=1;B<13;B++)J["f"+B]=B+111;for(B=0;B<10;B++)J["numpad "+B]=B+96;var ke=we.names=we.title={};for(B in J)ke[J[B]]=B;for(var ve in _e)J[ve]=_e[ve]},7459:(He,we,j)=>{var J=j(3357).getUint64;He.exports=function(B){var ke=new DataView(B.buffer,B.byteOffset,B.byteLength),ve={version:B[0],flags:new Uint8Array(B.subarray(1,4)),references:[],referenceId:ke.getUint32(4),timescale:ke.getUint32(8)},re=12;0===ve.version?(ve.earliestPresentationTime=ke.getUint32(re),ve.firstOffset=ke.getUint32(re+4),re+=8):(ve.earliestPresentationTime=J(B.subarray(re)),ve.firstOffset=J(B.subarray(re+8)),re+=16);var Ie=ke.getUint16(re+=2);for(re+=2;Ie>0;re+=12,Ie--)ve.references.push({referenceType:(128&B[re])>>>7,referencedSize:2147483647&ke.getUint32(re),subsegmentDuration:ke.getUint32(re+4),startsWithSap:!!(128&B[re+8]),sapType:(112&B[re+8])>>>4,sapDeltaTime:268435455&ke.getUint32(re+8)});return ve}},6277:He=>{var j,J,_e,B,ke,ve,re;ke=function(Ie,Ee){return j(B(Ie,Ee))},ve=function(Ie,Ee){return J(_e(Ie),Ee)},re=function(Ie,Ee,Te){return _e(Te?Ie:Ie-Ee)},He.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:j=function(Ie){return 9e4*Ie},secondsToAudioTs:J=function(Ie,Ee){return Ie*Ee},videoTsToSeconds:_e=function(Ie){return Ie/9e4},audioTsToSeconds:B=function(Ie,Ee){return Ie/Ee},audioTsToVideoTs:ke,videoTsToAudioTs:ve,metadataTsToSeconds:re}},3357:He=>{var we=Math.pow(2,32);He.exports={getUint64:function(J){var B,_e=new DataView(J.buffer,J.byteOffset,J.byteLength);return _e.getBigUint64?(B=_e.getBigUint64(0)){He.exports=function we(j,J){var _e,B=null;try{_e=JSON.parse(j,J)}catch(ke){B=ke}return[B,_e]}},3871:function(He){var j,J,_e,B,ke;j=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,J=/^(?=([^\/?#]*))\1([^]*)$/,_e=/(?:\/|^)\.(?=\/)/g,B=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,He.exports=ke={buildAbsoluteURL:function(ve,re,Ie){if(Ie=Ie||{},ve=ve.trim(),!(re=re.trim())){if(!Ie.alwaysNormalize)return ve;var Ee=ke.parseURL(ve);if(!Ee)throw new Error("Error trying to parse base URL.");return Ee.path=ke.normalizePath(Ee.path),ke.buildURLFromParts(Ee)}var Te=ke.parseURL(re);if(!Te)throw new Error("Error trying to parse relative URL.");if(Te.scheme)return Ie.alwaysNormalize?(Te.path=ke.normalizePath(Te.path),ke.buildURLFromParts(Te)):re;var pe=ke.parseURL(ve);if(!pe)throw new Error("Error trying to parse base URL.");if(!pe.netLoc&&pe.path&&"/"!==pe.path[0]){var u=J.exec(pe.path);pe.netLoc=u[1],pe.path=u[2]}pe.netLoc&&!pe.path&&(pe.path="/");var se={scheme:pe.scheme,netLoc:Te.netLoc,path:null,params:Te.params,query:Te.query,fragment:Te.fragment};if(!Te.netLoc&&(se.netLoc=pe.netLoc,"/"!==Te.path[0]))if(Te.path){var Ue=pe.path,je=Ue.substring(0,Ue.lastIndexOf("/")+1)+Te.path;se.path=ke.normalizePath(je)}else se.path=pe.path,Te.params||(se.params=pe.params,Te.query||(se.query=pe.query));return null===se.path&&(se.path=Ie.alwaysNormalize?ke.normalizePath(Te.path):Te.path),ke.buildURLFromParts(se)},parseURL:function(ve){var re=j.exec(ve);return re?{scheme:re[1]||"",netLoc:re[2]||"",path:re[3]||"",params:re[4]||"",query:re[5]||"",fragment:re[6]||""}:null},normalizePath:function(ve){for(ve=ve.split("").reverse().join("").replace(_e,"");ve.length!==(ve=ve.replace(B,"")).length;);return ve.split("").reverse().join("")},buildURLFromParts:function(ve){return ve.scheme+ve.netLoc+ve.path+ve.params+ve.query+ve.fragment}}},3629:(He,we,j)=>{var J=j(9226),_e=He.exports={WebVTT:j(8318),VTTCue:j(5713),VTTRegion:j(3872)};J.vttjs=_e,J.WebVTT=_e.WebVTT;var B=_e.VTTCue,ke=_e.VTTRegion,ve=J.VTTCue,re=J.VTTRegion;_e.shim=function(){J.VTTCue=B,J.VTTRegion=ke},_e.restore=function(){J.VTTCue=ve,J.VTTRegion=re},J.VTTCue||_e.shim()},8318:(He,we,j)=>{var J=j(1421),_e=Object.create||function(){function w(){}return function(D){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return w.prototype=D,new w}}();function B(w,D){this.name="ParsingError",this.code=w.code,this.message=D||w.message}function ke(w){function D(te,Y,le,ue){return 3600*(0|te)+60*(0|Y)+(0|le)+(0|ue)/1e3}var V=w.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return V?V[3]?D(V[1],V[2],V[3].replace(":",""),V[4]):V[1]>59?D(V[1],V[2],0,V[4]):D(0,V[1],V[2],V[4]):null}function ve(){this.values=_e(null)}function re(w,D,V,te){var Y=te?w.split(te):[w];for(var le in Y)if("string"==typeof Y[le]){var ue=Y[le].split(V);2===ue.length&&D(ue[0],ue[1])}}function Ie(w,D,V){var te=w;function Y(){var xe=ke(w);if(null===xe)throw new B(B.Errors.BadTimeStamp,"Malformed timestamp: "+te);return w=w.replace(/^[^\sa-zA-Z-]+/,""),xe}function ue(){w=w.replace(/^\s+/,"")}if(ue(),D.startTime=Y(),ue(),"--\x3e"!==w.substr(0,3))throw new B(B.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+te);w=w.substr(3),ue(),D.endTime=Y(),ue(),function le(xe,ie){var de=new ve;re(xe,function(Q,ee){switch(Q){case"region":for(var De=V.length-1;De>=0;De--)if(V[De].id===ee){de.set(Q,V[De].region);break}break;case"vertical":de.alt(Q,ee,["rl","lr"]);break;case"line":var ze=ee.split(","),Ge=ze[0];de.integer(Q,Ge),de.percent(Q,Ge)&&de.set("snapToLines",!1),de.alt(Q,Ge,["auto"]),2===ze.length&&de.alt("lineAlign",ze[1],["start","center","end"]);break;case"position":ze=ee.split(","),de.percent(Q,ze[0]),2===ze.length&&de.alt("positionAlign",ze[1],["start","center","end"]);break;case"size":de.percent(Q,ee);break;case"align":de.alt(Q,ee,["start","center","end","left","right"])}},/:/,/\s/),ie.region=de.get("region",null),ie.vertical=de.get("vertical","");try{ie.line=de.get("line","auto")}catch(Q){}ie.lineAlign=de.get("lineAlign","start"),ie.snapToLines=de.get("snapToLines",!0),ie.size=de.get("size",100);try{ie.align=de.get("align","center")}catch(Q){ie.align=de.get("align","middle")}try{ie.position=de.get("position","auto")}catch(Q){ie.position=de.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},ie.align)}ie.positionAlign=de.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},ie.align)}(w,D)}(B.prototype=_e(Error.prototype)).constructor=B,B.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},ve.prototype={set:function(w,D){!this.get(w)&&""!==D&&(this.values[w]=D)},get:function(w,D,V){return V?this.has(w)?this.values[w]:D[V]:this.has(w)?this.values[w]:D},has:function(w){return w in this.values},alt:function(w,D,V){for(var te=0;te=0&&D<=100))&&(this.set(w,D),!0)}};var Ee=J.createElement&&J.createElement("textarea"),Te={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},pe={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},u={v:"title",lang:"lang"},se={rt:"ruby"};function Ue(w,D){function V(){if(!D)return null;var qe=D.match(/^([^<]*)(<[^>]*>?)?/);return function Ge(Fe){return D=D.substr(Fe.length),Fe}(qe[1]?qe[1]:qe[2])}function te(Ge){return Ee.innerHTML=Ge,Ge=Ee.textContent,Ee.textContent="",Ge}function le(Ge,qe){var Fe=Te[Ge];if(!Fe)return null;var P=w.document.createElement(Fe),It=u[Ge];return It&&qe&&(P[It]=qe.trim()),P}for(var ie,ue=w.document.createElement("div"),xe=ue,de=[];null!==(ie=V());)if("<"!==ie[0])xe.appendChild(w.document.createTextNode(te(ie)));else{if("/"===ie[1]){de.length&&de[de.length-1]===ie.substr(2).replace(">","")&&(de.pop(),xe=xe.parentNode);continue}var ee,Q=ke(ie.substr(1,ie.length-2));if(Q){ee=w.document.createProcessingInstruction("timestamp",Q),xe.appendChild(ee);continue}var De=ie.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!De||!(ee=le(De[1],De[3]))||se[(qe=ee).localName]&&se[qe.localName]!==xe.localName)continue;if(De[2]){var ze=De[2].split(".");ze.forEach(function(Ge){var qe=/^bg_/.test(Ge),Fe=qe?Ge.slice(3):Ge;pe.hasOwnProperty(Fe)&&(ee.style[qe?"background-color":"color"]=pe[Fe])}),ee.className=ze.join(" ")}de.push(De[1]),xe.appendChild(ee),xe=ee}var qe;return ue}var je=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function tt(w){for(var D=0;D=V[0]&&w<=V[1])return!0}return!1}function vt(w){var D=[],V="";if(!w||!w.childNodes)return"ltr";function Y(xe,ie){for(var de=ie.childNodes.length-1;de>=0;de--)xe.push(ie.childNodes[de])}function le(xe){if(!xe||!xe.length)return null;var ie=xe.pop(),de=ie.textContent||ie.innerText;if(de){var Q=de.match(/^.*(\n|\r)/);return Q?(xe.length=0,Q[0]):de}return"ruby"===ie.tagName?le(xe):ie.childNodes?(Y(xe,ie),le(xe)):void 0}for(Y(D,w);V=le(D);)for(var ue=0;ue=0&&w.line<=100))return w.line;if(!w.track||!w.track.textTrackList||!w.track.textTrackList.mediaElement)return-1;for(var D=w.track,V=D.textTrackList,te=0,Y=0;YDe&&(ee=ee<0?-1:1,ee*=Math.ceil(De/Q)*Q),xe<0&&(ee+=""===ue.vertical?V.height:V.width,ie=ie.reverse()),le.move(ze,ee)}else{var Ge=le.lineHeight/V.height*100;switch(ue.lineAlign){case"center":xe-=Ge/2;break;case"end":xe-=Ge}switch(ue.vertical){case"":D.applyStyles({top:D.formatStyle(xe,"%")});break;case"rl":D.applyStyles({left:D.formatStyle(xe,"%")});break;case"lr":D.applyStyles({right:D.formatStyle(xe,"%")})}ie=["+y","-x","+x","-y"],le=new Le(D)}var qe=function Y(Fe,P){for(var It,K=new Le(Fe),it=1,Jt=0;JtNe&&(It=new Le(Fe),it=Ne),Fe=new Le(K)}return It||K}(le,ie);D.move(qe.toCSSCompatValues(V))}function Ce(){}Oe.prototype.applyStyles=function(w,D){for(var V in D=D||this.div,w)w.hasOwnProperty(V)&&(D.style[V]=w[V])},Oe.prototype.formatStyle=function(w,D){return 0===w?0:w+D},(me.prototype=_e(Oe.prototype)).constructor=me,Le.prototype.move=function(w,D){switch(D=void 0!==D?D:this.lineHeight,w){case"+x":this.left+=D,this.right+=D;break;case"-x":this.left-=D,this.right-=D;break;case"+y":this.top+=D,this.bottom+=D;break;case"-y":this.top-=D,this.bottom-=D}},Le.prototype.overlaps=function(w){return this.leftw.left&&this.topw.top},Le.prototype.overlapsAny=function(w){for(var D=0;D=w.top&&this.bottom<=w.bottom&&this.left>=w.left&&this.right<=w.right},Le.prototype.overlapsOppositeAxis=function(w,D){switch(D){case"+x":return this.leftw.right;case"+y":return this.topw.bottom}},Le.prototype.intersectPercentage=function(w){return Math.max(0,Math.min(this.right,w.right)-Math.max(this.left,w.left))*Math.max(0,Math.min(this.bottom,w.bottom)-Math.max(this.top,w.top))/(this.height*this.width)},Le.prototype.toCSSCompatValues=function(w){return{top:this.top-w.top,bottom:w.bottom-this.bottom,left:this.left-w.left,right:w.right-this.right,height:this.height,width:this.width}},Le.getSimpleBoxPosition=function(w){var D=w.div?w.div.offsetHeight:w.tagName?w.offsetHeight:0,V=w.div?w.div.offsetWidth:w.tagName?w.offsetWidth:0,te=w.div?w.div.offsetTop:w.tagName?w.offsetTop:0;return{left:(w=w.div?w.div.getBoundingClientRect():w.tagName?w.getBoundingClientRect():w).left,right:w.right,top:w.top||te,height:w.height||D,bottom:w.bottom||te+(w.height||D),width:w.width||V}},Ce.StringDecoder=function(){return{decode:function(w){if(!w)return"";if("string"!=typeof w)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(w))}}},Ce.convertCueToDOMTree=function(w,D){return w&&D?Ue(w,D):null},Ce.processCues=function(w,D,V){if(!w||!D||!V)return null;for(;V.firstChild;)V.removeChild(V.firstChild);var te=w.document.createElement("div");if(te.style.position="absolute",te.style.left="0",te.style.right="0",te.style.top="0",te.style.bottom="0",te.style.margin="1.5%",V.appendChild(te),function Y(Q){for(var ee=0;ee{var j={"":1,lr:1,rl:1},J={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function B(ve){return"string"==typeof ve&&!!J[ve.toLowerCase()]&&ve.toLowerCase()}function ke(ve,re,Ie){this.hasBeenReset=!1;var Ee="",Te=!1,pe=ve,u=re,se=Ie,Ue=null,je="",tt=!0,vt="auto",oe="start",Oe="auto",me="auto",Le=100,Ze="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return Ee},set:function(Ce){Ee=""+Ce}},pauseOnExit:{enumerable:!0,get:function(){return Te},set:function(Ce){Te=!!Ce}},startTime:{enumerable:!0,get:function(){return pe},set:function(Ce){if("number"!=typeof Ce)throw new TypeError("Start time must be set to a number.");pe=Ce,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(Ce){if("number"!=typeof Ce)throw new TypeError("End time must be set to a number.");u=Ce,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return se},set:function(Ce){se=""+Ce,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return Ue},set:function(Ce){Ue=Ce,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return je},set:function(Ce){var Me=function _e(ve){return"string"==typeof ve&&!!j[ve.toLowerCase()]&&ve.toLowerCase()}(Ce);if(!1===Me)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");je=Me,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return tt},set:function(Ce){tt=!!Ce,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return vt},set:function(Ce){if("number"!=typeof Ce&&"auto"!==Ce)throw new SyntaxError("Line: an invalid number or illegal string was specified.");vt=Ce,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return oe},set:function(Ce){var Me=B(Ce);Me?(oe=Me,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return Oe},set:function(Ce){if(Ce<0||Ce>100)throw new Error("Position must be between 0 and 100.");Oe=Ce,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return me},set:function(Ce){var Me=B(Ce);Me?(me=Me,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return Le},set:function(Ce){if(Ce<0||Ce>100)throw new Error("Size must be between 0 and 100.");Le=Ce,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return Ze},set:function(Ce){var Me=B(Ce);if(!Me)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");Ze=Me,this.hasBeenReset=!0}}}),this.displayState=void 0}ke.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},He.exports=ke},3872:He=>{var we={"":!0,up:!0};function J(B){return"number"==typeof B&&B>=0&&B<=100}He.exports=function _e(){var B=100,ke=3,ve=0,re=100,Ie=0,Ee=100,Te="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return B},set:function(pe){if(!J(pe))throw new Error("Width must be between 0 and 100.");B=pe}},lines:{enumerable:!0,get:function(){return ke},set:function(pe){if("number"!=typeof pe)throw new TypeError("Lines must be set to a number.");ke=pe}},regionAnchorY:{enumerable:!0,get:function(){return re},set:function(pe){if(!J(pe))throw new Error("RegionAnchorX must be between 0 and 100.");re=pe}},regionAnchorX:{enumerable:!0,get:function(){return ve},set:function(pe){if(!J(pe))throw new Error("RegionAnchorY must be between 0 and 100.");ve=pe}},viewportAnchorY:{enumerable:!0,get:function(){return Ee},set:function(pe){if(!J(pe))throw new Error("ViewportAnchorY must be between 0 and 100.");Ee=pe}},viewportAnchorX:{enumerable:!0,get:function(){return Ie},set:function(pe){if(!J(pe))throw new Error("ViewportAnchorX must be between 0 and 100.");Ie=pe}},scroll:{enumerable:!0,get:function(){return Te},set:function(pe){var u=function j(B){return"string"==typeof B&&!!we[B.toLowerCase()]&&B.toLowerCase()}(pe);!1===u?console.warn("Scroll: an invalid or illegal string was specified."):Te=u}}})}},7154:He=>{function we(){return He.exports=we=Object.assign||function(j){for(var J=1;J{}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/469.4dbe01792dba7213.js b/dist/fansubid/browser/469.5a7443725b8d7b20.js similarity index 73% rename from dist/fansubid/browser/469.4dbe01792dba7213.js rename to dist/fansubid/browser/469.5a7443725b8d7b20.js index 56f804e68..664baa163 100644 --- a/dist/fansubid/browser/469.4dbe01792dba7213.js +++ b/dist/fansubid/browser/469.5a7443725b8d7b20.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[469],{8469:(j,_,o)=>{o.r(_),o.d(_,{DoramaModule:()=>z});var D=o(9808),d=o(8406),m=o(3075),Z=o(210),R=o(6436),M=o(4946),N=o(6020),U=o(2323),O=o(8613),f=o(3170),c=o(508),g=o(6022),b=o(1139),a=o(5e3),C=o(3e3),A=o(8696),y=o(6382),S=o(8439),F=o(8616),v=o(7322),k=o(4107),L=o(7531),p=o(6856),x=o(5245),I=o(876),T=o(8757);function P(i,u){if(1&i&&(a.TgZ(0,"mat-option",24),a._uU(1),a.qZA()),2&i){const t=u.$implicit;a.s9C("value",t),a.xp6(1),a.Oqu(t)}}let B=(()=>{class i{constructor(t,e,s,r,n,l){this.activatedRoute=t,this.router=e,this.bs=s,this.gs=r,this.fs=n,this.dorama=l,this.currentMonth=null,this.currentYear=null,this.selectedCountryName="",this.selectedSeasonName=null,this.doramaCountry=[],this.seasonalDorama=[],this.seasonalDoramaCard=[],this.seasonalDoramaWithFansub=[],this.tabData=[{name:"Info Garapan",icon:"closed_caption",type:"table",data:{column:["Jenis","Poster","Judul Dorama","Nama Fansub"],row:[]}}],this.subsParam=null,this.subsSeasonalDorama=null,this.subsFansubDorama=null,this.gs.bannerImg="/assets/img/season/winter.png",this.gs.bgRepeat=!0,this.gs.sizeContain=!0}ngOnDestroy(){var t,e,s;null===(t=this.subsParam)||void 0===t||t.unsubscribe(),null===(e=this.subsSeasonalDorama)||void 0===e||e.unsubscribe(),null===(s=this.subsFansubDorama)||void 0===s||s.unsubscribe()}ngOnInit(){this.fg=new m.cw({currentDate:new m.NI({value:(0,b._7)(),disabled:!0},m.kI.required)}),this.currentMonth=new Date(this.fg.value.currentDate.format()).getMonth()+1,this.currentYear=new Date(this.fg.value.currentDate.format()).getFullYear(),this.minDate=new Date("2011-01-01"),this.maxDate=new Date(this.currentYear+1,11,31),this.gs.isBrowser&&this.watchUrlRoute()}watchUrlRoute(){this.subsParam=this.activatedRoute.queryParams.subscribe({next:t=>{this.bs.busy(),this.currentYear=t.year?Number.isNaN(parseInt(t.year,10))?this.currentYear:parseInt(t.year,10):(new Date).getFullYear(),this.fg.controls.currentDate.patchValue((0,b._7)(new Date(`${this.currentYear}-${this.currentMonth}-01`))),this.currentYear=new Date(this.fg.value.currentDate.format()).getFullYear(),this.selectedSeasonName=t.season&&[g.F.WINTER,g.F.SPRING,g.F.SUMMER,g.F.FALL].indexOf(t.season)>=0?t.season:this.findSeasonNameByMonthNumber(this.currentMonth),this.gs.bannerImg=this.gs.seasonalWeather.find(e=>e.name===this.selectedSeasonName).img,this.bs.idle(),this.getSeasonalDorama(t.year&&t.season)}})}findSeasonNameByMonthNumber(t){return this.gs.seasonalWeather.find(e=>e.id===Math.ceil(t/3)).name}chosenYearHandler(t,e){const s=this.fg.value.currentDate;s.year(t.year()),this.fg.controls.currentDate.setValue(s),this.currentMonth=new Date(this.fg.value.currentDate.format()).getMonth()+1,this.currentYear=new Date(this.fg.value.currentDate.format()).getFullYear(),e.close(),this.changeSeasonalDorama()}getSeasonalDorama(t=!1){this.bs.busy(),this.subsSeasonalDorama=this.dorama.getSeasonalDorama(this.currentYear,this.selectedSeasonName).subscribe({next:e=>{this.gs.log("[DORAMA_SEASONAL_SUCCESS]",e),this.seasonalDorama=e.results.sort((s,r)=>(r.rating||0)-(s.rating||0)),this.doramaCountry=[];for(const s of this.seasonalDorama)s.mdl_id=s.id,s.image_url=s.cover,this.doramaCountry.push(s.country);this.doramaCountry=[...new Set(this.doramaCountry)].sort(),t&&this.fs.initializeFab("settings_backup_restore",null,"Kembali Ke Musim Sekarang","/dorama",!1),this.bs.idle(),this.getFansubDorama()},error:e=>{this.gs.log("[DORAMA_SEASONAL_ERROR]",e,"error"),this.bs.idle()}})}getFansubDorama(){this.bs.busy(),this.tabData[0].data.row=[];const t=[];for(const e of this.seasonalDorama)t.push(e.mdl_id);this.subsFansubDorama=this.dorama.getFansubDorama(t).subscribe({next:e=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",e),this.seasonalDoramaWithFansub=[];for(const s of this.seasonalDorama){s.namaFansubs=e.results[s.mdl_id];for(const r of s.namaFansubs)r.selected=!0,r.type="chip";this.seasonalDoramaWithFansub.push({url:s.url,country:s.country,Jenis:`${s.type} \u2022 ${s.rating||0}`,Poster:s.image_url,"Judul Dorama":s.title,"Nama Fansub":s.namaFansubs})}this.seasonalDoramaWithFansub=this.seasonalDoramaWithFansub.sort((s,r)=>r["Nama Fansub"].length-s["Nama Fansub"].length),this.bs.idle(),this.changeCountryDorama()},error:e=>{this.gs.log("[FANSUB_DORAMA_ERROR]",e,"error"),this.bs.idle()}})}changeSeasonalDorama(){this.router.navigate(["/dorama"],{queryParams:{season:this.selectedSeasonName,year:this.currentYear}})}changeCountryDorama(){this.tabData[0].data.row=this.seasonalDoramaWithFansub.filter(t=>t.country.includes(this.selectedCountryName)),this.seasonalDoramaCard=this.seasonalDorama.filter(t=>t.country.includes(this.selectedCountryName))}openDoramaPage(t){this.gs.log("[DORAMA_SEASONAL_CLICK_DORAMA]",t),this.router.navigateByUrl(`/dorama/${t.url.replace(/[^a-zA-Z0-9\-]/g,"")}`)}openFansub(t){this.gs.log("[DORAMA_SEASONAL_CLICK_FANSUB]",t),this.router.navigateByUrl(`/fansub/${t.slug}`)}}return i.\u0275fac=function(t){return new(t||i)(a.Y36(d.gz),a.Y36(d.F0),a.Y36(C.z),a.Y36(A.U),a.Y36(y.r),a.Y36(S.X))},i.\u0275cmp=a.Xpm({type:i,selectors:[["app-dorama-list"]],features:[a._Bn([{provide:c._A,useClass:f.t7,deps:[c.Ad,f.o8]},{provide:c.sG,useValue:b.Gs}])],decls:39,vars:12,consts:[[1,"container"],[1,"row","pb-3"],[1,"col-12"],[1,"row"],[1,"col-12","pb-3","sticky-top","bg-bifeldy",3,"formGroup"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-4","col-lg-2",3,"color"],[3,"value","valueChange"],["value","winter"],["value","spring"],["value","summer"],["value","fall"],[1,"pt-3","col-4","col-lg-2"],["matInput","","formControlName","currentDate",3,"matDatepicker","min","max"],["matSuffix","",1,"shiny",3,"for"],["matDatepickerToggleIcon","",1,"animate__animated","animate__swing","animate__infinite","animate__slower"],["startView","multi-year","disabled","false",3,"yearSelected"],["picker",""],[1,"ms-auto","pt-3","col-4","col-lg-2",3,"color"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"animeDoramaData","cardClicked"],[1,"row","pt-3"],[3,"tabData","chipClicked","tableRowClicked"],[3,"value"]],template:function(t,e){if(1&t){const s=a.EpF();a._UZ(0,"app-notifications"),a.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h3",5)(7,"mat-form-field",6)(8,"mat-label"),a._uU(9,"Tema Musim"),a.qZA(),a.TgZ(10,"mat-select",7),a.NdJ("valueChange",function(n){return e.selectedSeasonName=n})("valueChange",function(){return e.changeSeasonalDorama()}),a.TgZ(11,"mat-option",8),a._uU(12,"Winter"),a.qZA(),a.TgZ(13,"mat-option",9),a._uU(14,"Spring"),a.qZA(),a.TgZ(15,"mat-option",10),a._uU(16,"Summer"),a.qZA(),a.TgZ(17,"mat-option",11),a._uU(18,"Fall"),a.qZA()()(),a.TgZ(19,"mat-form-field",12)(20,"mat-label"),a._uU(21,"Tahun"),a.qZA(),a._UZ(22,"input",13),a.TgZ(23,"mat-datepicker-toggle",14)(24,"mat-icon",15),a._uU(25,"today"),a.qZA()(),a.TgZ(26,"mat-datepicker",16,17),a.NdJ("yearSelected",function(n){a.CHM(s);const l=a.MAs(27);return e.chosenYearHandler(n,l)}),a.qZA()(),a.TgZ(28,"mat-form-field",18)(29,"mat-label"),a._uU(30,"Negara"),a.qZA(),a.TgZ(31,"mat-select",7),a.NdJ("valueChange",function(n){return e.selectedCountryName=n})("valueChange",function(){return e.changeCountryDorama()}),a.TgZ(32,"mat-option",19),a._uU(33,"Semua"),a.qZA(),a.YNc(34,P,2,2,"mat-option",20),a.qZA()()()(),a.TgZ(35,"div",2)(36,"app-card-anime-dorama",21),a.NdJ("cardClicked",function(n){return e.openDoramaPage(n)}),a.qZA()()()()(),a.TgZ(37,"div",22)(38,"app-material-tab",23),a.NdJ("chipClicked",function(n){return e.openFansub(n)})("tableRowClicked",function(n){return e.openDoramaPage(n)}),a.qZA()()()}if(2&t){const s=a.MAs(27);a.xp6(5),a.Q6J("formGroup",e.fg),a.xp6(2),a.Q6J("color","accent"),a.xp6(3),a.Q6J("value",e.selectedSeasonName),a.xp6(12),a.Q6J("matDatepicker",s)("min",e.minDate)("max",e.maxDate),a.xp6(1),a.Q6J("for",s),a.xp6(5),a.Q6J("color","accent"),a.xp6(3),a.Q6J("value",e.selectedCountryName),a.xp6(3),a.Q6J("ngForOf",e.doramaCountry),a.xp6(2),a.Q6J("animeDoramaData",e.seasonalDoramaCard),a.xp6(2),a.Q6J("tabData",e.tabData)}},directives:[F.t,m.JL,m.sg,v.KE,v.hX,k.gD,c.ey,L.Nt,m.Fj,p.hl,m.JJ,m.u,p.nW,v.R9,x.Hw,p.Q0,p.Mq,D.sg,I.L,T.H],styles:[""]}),i})();var w=o(7623),E=o(8745),Y=o(4028),J=o(7567),Q=o(7423),H=o(7238);function K(i,u){if(1&i){const t=a.EpF();a.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h1",6)(6,"b"),a._uU(7),a.qZA()()(),a.TgZ(8,"div",7)(9,"app-material-chip",8),a.NdJ("chipClicked",function(s){return a.CHM(t),a.oxw().openGenre(s)}),a.qZA()(),a.TgZ(10,"div",9),a._UZ(11,"app-notifications",10),a.qZA(),a.TgZ(12,"div",7),a._UZ(13,"app-material-expansion-panel",11),a.qZA(),a.TgZ(14,"div",7)(15,"div",12)(16,"app-material-tab",13),a.NdJ("gridClicked",function(s){return a.CHM(t),a.oxw().openFansub(s)})("tableRowClicked",function(s){return a.CHM(t),a.oxw().openFile(s)})("paginatorClicked",function(s){return a.CHM(t),a.oxw().onPaginatorClicked(s)})("serverSideFilter",function(s){return a.CHM(t),a.oxw().onServerSideFilter(s)})("serverSideOrder",function(s){return a.CHM(t),a.oxw().onServerSideOrder(s)})("gridLoadNextPage",function(){return a.CHM(t),a.oxw().onFansubLoadNextPage()}),a.qZA()()()(),a.TgZ(17,"div",14)(18,"div",15)(19,"div",12),a._UZ(20,"img",16),a.qZA(),a.TgZ(21,"div",17)(22,"button",18),a.NdJ("click",function(){return a.CHM(t),a.oxw().openSeasonalDorama()}),a.TgZ(23,"mat-icon",19),a._uU(24,"dynamic_feed"),a.qZA(),a._uU(25),a.TgZ(26,"mat-icon",19),a._uU(27,"star_half"),a.qZA(),a._uU(28),a._UZ(29,"br"),a.TgZ(30,"mat-icon",19),a._uU(31,"date_range"),a.qZA(),a._uU(32),a.qZA()(),a.TgZ(33,"div",17)(34,"button",20),a.NdJ("click",function(){return a.CHM(t),a.oxw().openRank()}),a.TgZ(35,"mat-icon",19),a._uU(36,"timeline"),a.qZA(),a._uU(37),a.TgZ(38,"mat-icon",19),a._uU(39,"local_fire_department"),a.qZA(),a._uU(40),a._UZ(41,"br"),a.TgZ(42,"mat-icon",19),a._uU(43,"label"),a.qZA(),a._uU(44),a.qZA()()()()()(),a._UZ(45,"div",21)(46,"div",22),a.qZA()}if(2&i){const t=a.oxw();a.xp6(7),a.Oqu((null==t.doramaData.others?null:t.doramaData.others.native_title)||t.doramaData.title),a.xp6(2),a.Q6J("chipData",t.chipData),a.xp6(4),a.Q6J("panelData",t.panelData),a.xp6(3),a.Q6J("tabData",t.tabData)("count",t.count)("serverSide",!0)("gridPageFinished",t.fansubPageFinished),a.xp6(4),a.Q6J("src",t.doramaData.image_url,a.LSH),a.xp6(2),a.hYB("matTooltip","Lihat Semua Dorama Pada Musim '",t.seasonDorama," ",(null==t.yearDorama?null:t.yearDorama.getFullYear())||"","'"),a.xp6(3),a.hij(" ",("Movie"===(null==t.doramaData.details?null:t.doramaData.details.type)?"1":null==t.doramaData.details?null:t.doramaData.details.episodes)||"?"," Eps \xa0 "),a.xp6(3),a.hij(" ",t.doramaData.rating||"?"," "),a.xp6(4),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.release_date)||(null==t.doramaData.details?null:t.doramaData.details.aired)||"?"," "),a.xp6(5),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.ranked)||"?"," \xa0 "),a.xp6(3),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.popularity)||"?"," "),a.xp6(4),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.type)||"?"," "),a.xp6(1),a.Udp("background-image","url("+t.doramaData.image_url+")")}}const $=[{path:"",pathMatch:"full",component:B},{path:":doramaId",component:(()=>{class i{constructor(t,e,s,r,n,l,h){this.router=t,this.activatedRoute=e,this.gs=s,this.bs=r,this.pi=n,this.dorama=l,this.fs=h,this.doramaId="",this.doramaData=null,this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.fansubDorama=[],this.berkasDorama=[],this.fansubPageFinished=!1,this.fansubPage=1,this.chipData=[],this.panelData=[],this.tabData=[{name:"Daftar Fansub",icon:"closed_caption",type:"grid",data:[]},{name:"Berkas Terkait",icon:"file_copy",type:"table",data:{column:["Tanggal","Nama Berkas","Pemilik"],row:[]}}],this.subsDorama=null,this.subsBerkas=null,this.subsFansub=null,this.subsParam=null,this.gs.bannerImg=null,this.gs.bgRepeat=!0,this.gs.sizeContain=!0}ngOnDestroy(){var t,e,s,r;null===(t=this.subsDorama)||void 0===t||t.unsubscribe(),null===(e=this.subsBerkas)||void 0===e||e.unsubscribe(),null===(s=this.subsFansub)||void 0===s||s.unsubscribe(),null===(r=this.subsParam)||void 0===r||r.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:t=>{const e=t.doramaId;this.doramaId=e.split("-")[0],this.bs.busy(),this.subsDorama=this.dorama.getDorama(e).subscribe({next:s=>{var r,n,l,h;if(this.gs.log("[DORAMA_DETAIL_SUCCESS]",s),this.doramaData=s.result,this.doramaData.image_url=this.doramaData.poster,this.pi.updatePageMetaData(`${this.doramaData.title}`,`${this.doramaData.synopsis}`,`${(null===(n=null===(r=this.doramaData)||void 0===r?void 0:r.others)||void 0===n?void 0:n.tags)?null===(h=null===(l=this.doramaData)||void 0===l?void 0:l.others)||void 0===h?void 0:h.tags.join(", "):this.doramaData.title}`,this.doramaData.image_url),this.bs.idle(),this.gs.isBrowser){if("others"in this.doramaData){const W=this.doramaData.others.genres;for(const G of W)this.chipData.push({name:G,selected:!0,color:w.Q.PINK})}this.panelData=[],this.panelData.push({title:"Ringkasan Cerita",icon:"history_edu",text:this.doramaData.synopsis,tooltip:"Alih Bahasa Oleh 'Google Translate' \u{1f618}"}),this.fs.initializeFab(null,"/assets/img/logo/mdl.png","Buka Di MyDramaList",`https://mydramalist.com/${this.router.url.split("/")[this.router.url.split("/").length-1]}`,!0),this.getFansubDorama(),this.getBerkasDorama()}},error:s=>{this.gs.log("[DORAMA_DETAIL_ERROR]",s,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/dorama"}})}})}})}openRank(){}get yearDorama(){var t,e,s,r,n,l;return"release_date"in(null===(t=this.doramaData)||void 0===t?void 0:t.details)?new Date(null===(s=null===(e=this.doramaData)||void 0===e?void 0:e.details)||void 0===s?void 0:s.release_date)||null:new Date(null===(l=null===(n=null===(r=this.doramaData)||void 0===r?void 0:r.details)||void 0===n?void 0:n.aired)||void 0===l?void 0:l.split(" - ")[0])||null}get seasonDorama(){var t;return(null===(t=this.gs.seasonalWeather.find(e=>{var s;return e.id===Math.ceil(((null===(s=this.yearDorama)||void 0===s?void 0:s.getMonth())+1)/3)}))||void 0===t?void 0:t.name)||null}openSeasonalDorama(){var t;this.router.navigate(["/dorama"],{queryParams:{season:this.seasonDorama,year:null===(t=this.yearDorama)||void 0===t?void 0:t.getFullYear()}})}onServerSideFilter(t){this.gs.log("[BERKAS_DORAMA_ENTER_FILTER]",t),this.q=t,this.getBerkasDorama()}onServerSideOrder(t){this.gs.log("[BERKAS_DORAMA_CLICK_ORDER]",t),this.q=t.q,this.sort=t.active,this.order=t.direction,this.getBerkasDorama()}getBerkasDorama(){this.bs.busy(),this.subsBerkas=this.dorama.getBerkasDorama([this.doramaId],this.q,this.page,this.row,this.sort,this.order).subscribe({next:t=>{this.gs.log("[BERKAS_DORAMA_SUCCESS]",t),this.count=t.count,this.berkasDorama=[];for(const e of t.results[this.doramaId])this.berkasDorama.push({id:e.id,private:e.private,foto:e.user_.image_url,Pemilik:e.user_.username,Tanggal:e.created_at,"Nama Berkas":e.name});this.tabData[1].data.row=this.berkasDorama,this.bs.idle()},error:t=>{this.gs.log("[BERKAS_DORAMA_ERROR]",t,"error"),this.bs.idle()}})}getFansubDorama(){this.bs.busy(),this.subsFansub=this.dorama.getFansubDorama([this.doramaId],this.fansubPage).subscribe({next:t=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",t);for(const e of t.results[this.doramaId])this.fansubDorama.push({id:e.id,image:e.image_url,title:e.name,slug:e.slug,description:`${e.slug} :: ${e.active?"Aktif":"Non-Aktif"}`});this.tabData[0].data=this.fansubDorama,t.results[this.doramaId].length<=0&&(this.fansubPageFinished=!0),this.bs.idle()},error:t=>{this.gs.log("[FANSUB_DORAMA_ERROR]",t,"error"),this.bs.idle()}})}openGenre(t){this.gs.log("[DORAMA_DETAIL_CLICK_GENRE]",t)}openFansub(t){this.gs.log("[DORAMA_DETAIL_CLICK_FANSUB]",t),this.router.navigateByUrl(`/fansub/${t.slug}`)}onPaginatorClicked(t){this.gs.log("[DORAMA_DETAIL_CLICK_PAGINATOR]",t),this.page=t.pageIndex+1,this.row=t.pageSize,this.getBerkasDorama()}openFile(t){this.gs.log("[DORAMA_DETAIL_CLICK_BERKAS]",t),this.router.navigateByUrl(`/berkas/${t.id}`)}onFansubLoadNextPage(){this.fansubPageFinished||(this.fansubPage++,this.getFansubDorama())}}return i.\u0275fac=function(t){return new(t||i)(a.Y36(d.F0),a.Y36(d.gz),a.Y36(A.U),a.Y36(C.z),a.Y36(E.Z),a.Y36(S.X),a.Y36(y.r))},i.\u0275cmp=a.Xpm({type:i,selectors:[["app-dorama-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"dorama-info","align-items-center"],[1,"media","row","py-3","px-2","d-flex"],[1,"col-md-8","col-xl-9","pt-3","order-2","order-md-1"],[1,"row","py-3","px-0","mt-auto"],[1,"m-0"],[1,"row","py-3"],[3,"chipData","chipClicked"],[1,"row"],[1,"px-0"],[3,"panelData"],[1,"col-12"],[3,"tabData","count","serverSide","gridPageFinished","gridClicked","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder","gridLoadNextPage"],[1,"col-md-4","col-xl-3","px-3","order-1","order-md-2"],[1,"row","sticky-top","pt-3"],[1,"w-100",3,"src"],[1,"col-12","text-center","pt-3"],["mat-stroked-button","","color","accent",1,"w-100",3,"matTooltip","click"],[1,"me-1"],["mat-stroked-button","","color","warn","matTooltip","Buka Ranking Di MyDramaList",1,"w-100",3,"click"],[1,"dorama-banner","dorama-banner-1","align-items-center"],[1,"dorama-banner","dorama-banner-2","align-items-center"]],template:function(t,e){1&t&&a.YNc(0,K,47,18,"div",0),2&t&&a.Q6J("ngIf",e.doramaData)},directives:[D.O5,Y.G,F.t,J.Q,T.H,Q.lW,H.gM,x.Hw],styles:[".dorama-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(10px) brightness(100%);opacity:.5}.dorama-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.dorama-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.dorama-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),i})()}];let z=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=a.oAB({type:i}),i.\u0275inj=a.cJS({imports:[[D.ez,d.Bz.forChild($),m.u5,m.UX,Z.m,R.L,N.$,M.P,U._,O.F]]}),i})()}}]); \ No newline at end of file +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[469],{8469:(j,_,o)=>{o.r(_),o.d(_,{DoramaModule:()=>z});var D=o(9808),d=o(8406),m=o(3075),Z=o(210),R=o(6436),M=o(4946),N=o(6020),U=o(2323),O=o(8613),f=o(3170),c=o(508),g=o(6022),b=o(1139),a=o(5e3),C=o(3e3),A=o(8696),y=o(6382),S=o(8439),F=o(8616),v=o(7322),k=o(4107),L=o(7531),p=o(6856),x=o(5245),I=o(876),T=o(8757);function P(i,u){if(1&i&&(a.TgZ(0,"mat-option",24),a._uU(1),a.qZA()),2&i){const t=u.$implicit;a.s9C("value",t),a.xp6(1),a.Oqu(t)}}let B=(()=>{class i{constructor(t,e,s,r,n,l){this.activatedRoute=t,this.router=e,this.bs=s,this.gs=r,this.fs=n,this.dorama=l,this.currentMonth=null,this.currentYear=null,this.selectedCountryName="",this.selectedSeasonName=null,this.doramaCountry=[],this.seasonalDorama=[],this.seasonalDoramaCard=[],this.seasonalDoramaWithFansub=[],this.tabData=[{name:"Info Garapan",icon:"closed_caption",type:"table",data:{column:["Jenis","Poster","Judul Dorama","Nama Fansub"],row:[]}}],this.subsParam=null,this.subsSeasonalDorama=null,this.subsFansubDorama=null,this.gs.bannerImg="/assets/img/season/winter.png",this.gs.bgRepeat=!0,this.gs.sizeContain=!0}ngOnDestroy(){var t,e,s;null===(t=this.subsParam)||void 0===t||t.unsubscribe(),null===(e=this.subsSeasonalDorama)||void 0===e||e.unsubscribe(),null===(s=this.subsFansubDorama)||void 0===s||s.unsubscribe()}ngOnInit(){this.fg=new m.cw({currentDate:new m.NI({value:(0,b._7)(),disabled:!0},m.kI.required)}),this.currentMonth=new Date(this.fg.value.currentDate.format()).getMonth()+1,this.currentYear=new Date(this.fg.value.currentDate.format()).getFullYear(),this.minDate=new Date("2011-01-01"),this.maxDate=new Date(this.currentYear+1,11,31),this.gs.isBrowser&&this.watchUrlRoute()}watchUrlRoute(){this.subsParam=this.activatedRoute.queryParams.subscribe({next:t=>{this.bs.busy(),this.currentYear=t.year?Number.isNaN(parseInt(t.year,10))?this.currentYear:parseInt(t.year,10):(new Date).getFullYear(),this.fg.controls.currentDate.patchValue((0,b._7)(new Date(`${this.currentYear}-${this.currentMonth}-01`))),this.currentYear=new Date(this.fg.value.currentDate.format()).getFullYear(),this.selectedSeasonName=t.season&&[g.F.WINTER,g.F.SPRING,g.F.SUMMER,g.F.FALL].indexOf(t.season)>=0?t.season:this.findSeasonNameByMonthNumber(this.currentMonth),this.gs.bannerImg=this.gs.seasonalWeather.find(e=>e.name===this.selectedSeasonName).img,this.bs.idle(),this.getSeasonalDorama(t.year&&t.season)}})}findSeasonNameByMonthNumber(t){return this.gs.seasonalWeather.find(e=>e.id===Math.ceil(t/3)).name}chosenYearHandler(t,e){const s=this.fg.value.currentDate;s.year(t.year()),this.fg.controls.currentDate.setValue(s),this.currentMonth=new Date(this.fg.value.currentDate.format()).getMonth()+1,this.currentYear=new Date(this.fg.value.currentDate.format()).getFullYear(),e.close(),this.changeSeasonalDorama()}getSeasonalDorama(t=!1){this.bs.busy(),this.subsSeasonalDorama=this.dorama.getSeasonalDorama(this.currentYear,this.selectedSeasonName).subscribe({next:e=>{this.gs.log("[DORAMA_SEASONAL_SUCCESS]",e),this.seasonalDorama=e.results.sort((s,r)=>(r.rating||0)-(s.rating||0)),this.doramaCountry=[];for(const s of this.seasonalDorama)s.mdl_id=s.id,s.image_url=s.cover,this.doramaCountry.push(s.country);this.doramaCountry=[...new Set(this.doramaCountry)].sort(),t&&this.fs.initializeFab("settings_backup_restore",null,"Kembali Ke Musim Sekarang","/dorama",!1),this.bs.idle(),this.getFansubDorama()},error:e=>{this.gs.log("[DORAMA_SEASONAL_ERROR]",e,"error"),this.bs.idle()}})}getFansubDorama(){this.bs.busy(),this.tabData[0].data.row=[];const t=[];for(const e of this.seasonalDorama)t.push(e.mdl_id);this.subsFansubDorama=this.dorama.getFansubDorama(t).subscribe({next:e=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",e),this.seasonalDoramaWithFansub=[];for(const s of this.seasonalDorama){s.namaFansubs=e.results[s.mdl_id];for(const r of s.namaFansubs)r.selected=!0,r.type="chip";this.seasonalDoramaWithFansub.push({url:s.url,country:s.country,Jenis:`${s.type} \u2022 ${s.rating||0}`,Poster:s.image_url,"Judul Dorama":s.title,"Nama Fansub":s.namaFansubs})}this.seasonalDoramaWithFansub=this.seasonalDoramaWithFansub.sort((s,r)=>r["Nama Fansub"].length-s["Nama Fansub"].length),this.bs.idle(),this.changeCountryDorama()},error:e=>{this.gs.log("[FANSUB_DORAMA_ERROR]",e,"error"),this.bs.idle()}})}changeSeasonalDorama(){this.router.navigate(["/dorama"],{queryParams:{season:this.selectedSeasonName,year:this.currentYear}})}changeCountryDorama(){this.tabData[0].data.row=this.seasonalDoramaWithFansub.filter(t=>t.country.includes(this.selectedCountryName)),this.seasonalDoramaCard=this.seasonalDorama.filter(t=>t.country.includes(this.selectedCountryName))}openDoramaPage(t){this.gs.log("[DORAMA_SEASONAL_CLICK_DORAMA]",t),this.router.navigateByUrl(`/dorama/${t.url.replace(/[^a-zA-Z0-9\-]/g,"")}`)}openFansub(t){this.gs.log("[DORAMA_SEASONAL_CLICK_FANSUB]",t),this.router.navigateByUrl(`/fansub/${t.slug}`)}}return i.\u0275fac=function(t){return new(t||i)(a.Y36(d.gz),a.Y36(d.F0),a.Y36(C.z),a.Y36(A.U),a.Y36(y.r),a.Y36(S.X))},i.\u0275cmp=a.Xpm({type:i,selectors:[["app-dorama-list"]],features:[a._Bn([{provide:c._A,useClass:f.t7,deps:[c.Ad,f.o8]},{provide:c.sG,useValue:b.Gs}])],decls:39,vars:12,consts:[[1,"container"],[1,"row","pb-3"],[1,"col-12"],[1,"row"],[1,"col-12","pb-3","sticky-top","bg-bifeldy",3,"formGroup"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-4","col-lg-2",3,"color"],[3,"value","valueChange"],["value","winter"],["value","spring"],["value","summer"],["value","fall"],[1,"pt-3","col-4","col-lg-2"],["matInput","","formControlName","currentDate",3,"matDatepicker","min","max"],["matSuffix","",1,"shiny",3,"for"],["matDatepickerToggleIcon","",1,"animate__animated","animate__swing","animate__infinite","animate__slower"],["startView","multi-year","disabled","false",3,"yearSelected"],["picker",""],[1,"ms-auto","pt-3","col-4","col-lg-2",3,"color"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"animeDoramaData","cardClicked"],[1,"row","pt-3"],[3,"tabData","chipClicked","tableRowClicked"],[3,"value"]],template:function(t,e){if(1&t){const s=a.EpF();a._UZ(0,"app-notifications"),a.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h3",5)(7,"mat-form-field",6)(8,"mat-label"),a._uU(9,"Tema Musim"),a.qZA(),a.TgZ(10,"mat-select",7),a.NdJ("valueChange",function(n){return e.selectedSeasonName=n})("valueChange",function(){return e.changeSeasonalDorama()}),a.TgZ(11,"mat-option",8),a._uU(12,"Winter"),a.qZA(),a.TgZ(13,"mat-option",9),a._uU(14,"Spring"),a.qZA(),a.TgZ(15,"mat-option",10),a._uU(16,"Summer"),a.qZA(),a.TgZ(17,"mat-option",11),a._uU(18,"Fall"),a.qZA()()(),a.TgZ(19,"mat-form-field",12)(20,"mat-label"),a._uU(21,"Tahun"),a.qZA(),a._UZ(22,"input",13),a.TgZ(23,"mat-datepicker-toggle",14)(24,"mat-icon",15),a._uU(25,"today"),a.qZA()(),a.TgZ(26,"mat-datepicker",16,17),a.NdJ("yearSelected",function(n){a.CHM(s);const l=a.MAs(27);return e.chosenYearHandler(n,l)}),a.qZA()(),a.TgZ(28,"mat-form-field",18)(29,"mat-label"),a._uU(30,"Negara"),a.qZA(),a.TgZ(31,"mat-select",7),a.NdJ("valueChange",function(n){return e.selectedCountryName=n})("valueChange",function(){return e.changeCountryDorama()}),a.TgZ(32,"mat-option",19),a._uU(33,"Semua"),a.qZA(),a.YNc(34,P,2,2,"mat-option",20),a.qZA()()()(),a.TgZ(35,"div",2)(36,"app-card-anime-dorama",21),a.NdJ("cardClicked",function(n){return e.openDoramaPage(n)}),a.qZA()()()()(),a.TgZ(37,"div",22)(38,"app-material-tab",23),a.NdJ("chipClicked",function(n){return e.openFansub(n)})("tableRowClicked",function(n){return e.openDoramaPage(n)}),a.qZA()()()}if(2&t){const s=a.MAs(27);a.xp6(5),a.Q6J("formGroup",e.fg),a.xp6(2),a.Q6J("color","accent"),a.xp6(3),a.Q6J("value",e.selectedSeasonName),a.xp6(12),a.Q6J("matDatepicker",s)("min",e.minDate)("max",e.maxDate),a.xp6(1),a.Q6J("for",s),a.xp6(5),a.Q6J("color","accent"),a.xp6(3),a.Q6J("value",e.selectedCountryName),a.xp6(3),a.Q6J("ngForOf",e.doramaCountry),a.xp6(2),a.Q6J("animeDoramaData",e.seasonalDoramaCard),a.xp6(2),a.Q6J("tabData",e.tabData)}},directives:[F.t,m.JL,m.sg,v.KE,v.hX,k.gD,c.ey,L.Nt,m.Fj,p.hl,m.JJ,m.u,p.nW,v.R9,x.Hw,p.Q0,p.Mq,D.sg,I.L,T.H],styles:[""]}),i})();var w=o(7623),E=o(8745),Y=o(4028),J=o(7567),Q=o(7423),H=o(7238);function K(i,u){if(1&i){const t=a.EpF();a.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h1",6)(6,"b"),a._uU(7),a.qZA()()(),a.TgZ(8,"div",7)(9,"app-material-chip",8),a.NdJ("chipClicked",function(s){return a.CHM(t),a.oxw().openGenre(s)}),a.qZA()(),a.TgZ(10,"div",9),a._UZ(11,"app-notifications",10),a.qZA(),a.TgZ(12,"div",7),a._UZ(13,"app-material-expansion-panel",11),a.qZA(),a.TgZ(14,"div",7)(15,"div",12)(16,"app-material-tab",13),a.NdJ("gridClicked",function(s){return a.CHM(t),a.oxw().openFansub(s)})("tableRowClicked",function(s){return a.CHM(t),a.oxw().openFile(s)})("paginatorClicked",function(s){return a.CHM(t),a.oxw().onPaginatorClicked(s)})("serverSideFilter",function(s){return a.CHM(t),a.oxw().onServerSideFilter(s)})("serverSideOrder",function(s){return a.CHM(t),a.oxw().onServerSideOrder(s)})("gridLoadNextPage",function(){return a.CHM(t),a.oxw().onFansubLoadNextPage()}),a.qZA()()()(),a.TgZ(17,"div",14)(18,"div",15)(19,"div",12),a._UZ(20,"img",16),a.qZA(),a.TgZ(21,"div",17)(22,"button",18),a.NdJ("click",function(){return a.CHM(t),a.oxw().openSeasonalDorama()}),a.TgZ(23,"mat-icon",19),a._uU(24,"dynamic_feed"),a.qZA(),a._uU(25),a.TgZ(26,"mat-icon",19),a._uU(27,"star_half"),a.qZA(),a._uU(28),a._UZ(29,"br"),a.TgZ(30,"mat-icon",19),a._uU(31,"date_range"),a.qZA(),a._uU(32),a.qZA()(),a.TgZ(33,"div",17)(34,"button",20),a.NdJ("click",function(){return a.CHM(t),a.oxw().openRank()}),a.TgZ(35,"mat-icon",19),a._uU(36,"timeline"),a.qZA(),a._uU(37),a.TgZ(38,"mat-icon",19),a._uU(39,"local_fire_department"),a.qZA(),a._uU(40),a._UZ(41,"br"),a.TgZ(42,"mat-icon",19),a._uU(43,"label"),a.qZA(),a._uU(44),a.qZA()()()()()(),a._UZ(45,"div",21)(46,"div",22),a.qZA()}if(2&i){const t=a.oxw();a.xp6(7),a.Oqu((null==t.doramaData.others?null:t.doramaData.others.native_title)||t.doramaData.title),a.xp6(2),a.Q6J("chipData",t.chipData),a.xp6(4),a.Q6J("panelData",t.panelData),a.xp6(3),a.Q6J("tabData",t.tabData)("count",t.count)("serverSide",!0)("gridPageFinished",t.fansubPageFinished),a.xp6(4),a.Q6J("src",t.doramaData.image_url,a.LSH),a.xp6(2),a.hYB("matTooltip","Lihat Semua Dorama Pada Musim '",t.seasonDorama," ",(null==t.yearDorama?null:t.yearDorama.getFullYear())||"","'"),a.xp6(3),a.hij(" ",("Movie"===(null==t.doramaData.details?null:t.doramaData.details.type)?"1":null==t.doramaData.details?null:t.doramaData.details.episodes)||"?"," Eps \xa0 "),a.xp6(3),a.hij(" ",t.doramaData.rating||"?"," "),a.xp6(4),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.release_date)||(null==t.doramaData.details?null:t.doramaData.details.aired)||"?"," "),a.xp6(5),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.ranked)||"?"," \xa0 "),a.xp6(3),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.popularity)||"?"," "),a.xp6(4),a.hij(" ",(null==t.doramaData.details?null:t.doramaData.details.type)||"?"," "),a.xp6(1),a.Udp("background-image","url("+t.doramaData.image_url+")")}}const $=[{path:"",pathMatch:"full",component:B},{path:":doramaId",component:(()=>{class i{constructor(t,e,s,r,n,l,h){this.router=t,this.activatedRoute=e,this.gs=s,this.bs=r,this.pi=n,this.dorama=l,this.fs=h,this.doramaId="",this.doramaData=null,this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.fansubDorama=[],this.berkasDorama=[],this.fansubPageFinished=!1,this.fansubPage=1,this.chipData=[],this.panelData=[],this.tabData=[{name:"Daftar Fansub",icon:"closed_caption",type:"grid",data:[]},{name:"Berkas Terkait",icon:"file_copy",type:"table",data:{column:["Tanggal","Nama Berkas","Pemilik"],row:[]}}],this.subsDorama=null,this.subsBerkas=null,this.subsFansub=null,this.subsParam=null,this.gs.bannerImg=null,this.gs.bgRepeat=!0,this.gs.sizeContain=!0}ngOnDestroy(){var t,e,s,r;null===(t=this.subsDorama)||void 0===t||t.unsubscribe(),null===(e=this.subsBerkas)||void 0===e||e.unsubscribe(),null===(s=this.subsFansub)||void 0===s||s.unsubscribe(),null===(r=this.subsParam)||void 0===r||r.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:t=>{const e=t.doramaId;this.doramaId=e.split("-")[0],this.bs.busy(),this.subsDorama=this.dorama.getDorama(e).subscribe({next:s=>{var r,n,l,h;if(this.gs.log("[DORAMA_DETAIL_SUCCESS]",s),this.doramaData=s.result,this.doramaData.image_url=this.doramaData.poster,this.pi.updatePageMetaData(`${this.doramaData.title}`,`${this.doramaData.synopsis}`,`${(null===(n=null===(r=this.doramaData)||void 0===r?void 0:r.others)||void 0===n?void 0:n.tags)?null===(h=null===(l=this.doramaData)||void 0===l?void 0:l.others)||void 0===h?void 0:h.tags.join(", "):this.doramaData.title}`,this.doramaData.image_url),this.bs.idle(),this.gs.isBrowser){if("others"in this.doramaData){const W=this.doramaData.others.genres;for(const G of W)this.chipData.push({name:G,selected:!0,color:w.Q.PINK})}this.panelData=[],this.panelData.push({title:"Ringkasan Cerita",icon:"history_edu",text:this.doramaData.synopsis,tooltip:"Alih Bahasa Oleh 'Google Translate' \u{1f618}"}),this.fs.initializeFab(null,"/assets/img/logo/mdl.png","Buka Di MyDramaList",`https://mydramalist.com/${this.router.url.split("?")[0].split("/")[this.router.url.split("?")[0].split("/").length-1]}`,!0),this.getFansubDorama(),this.getBerkasDorama()}},error:s=>{this.gs.log("[DORAMA_DETAIL_ERROR]",s,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/dorama"}})}})}})}openRank(){}get yearDorama(){var t,e,s,r,n,l;return"release_date"in(null===(t=this.doramaData)||void 0===t?void 0:t.details)?new Date(null===(s=null===(e=this.doramaData)||void 0===e?void 0:e.details)||void 0===s?void 0:s.release_date)||null:new Date(null===(l=null===(n=null===(r=this.doramaData)||void 0===r?void 0:r.details)||void 0===n?void 0:n.aired)||void 0===l?void 0:l.split(" - ")[0])||null}get seasonDorama(){var t;return(null===(t=this.gs.seasonalWeather.find(e=>{var s;return e.id===Math.ceil(((null===(s=this.yearDorama)||void 0===s?void 0:s.getMonth())+1)/3)}))||void 0===t?void 0:t.name)||null}openSeasonalDorama(){var t;this.router.navigate(["/dorama"],{queryParams:{season:this.seasonDorama,year:null===(t=this.yearDorama)||void 0===t?void 0:t.getFullYear()}})}onServerSideFilter(t){this.gs.log("[BERKAS_DORAMA_ENTER_FILTER]",t),this.q=t,this.getBerkasDorama()}onServerSideOrder(t){this.gs.log("[BERKAS_DORAMA_CLICK_ORDER]",t),this.q=t.q,this.sort=t.active,this.order=t.direction,this.getBerkasDorama()}getBerkasDorama(){this.bs.busy(),this.subsBerkas=this.dorama.getBerkasDorama([this.doramaId],this.q,this.page,this.row,this.sort,this.order).subscribe({next:t=>{this.gs.log("[BERKAS_DORAMA_SUCCESS]",t),this.count=t.count,this.berkasDorama=[];for(const e of t.results[this.doramaId])this.berkasDorama.push({id:e.id,private:e.private,foto:e.user_.image_url,Pemilik:e.user_.username,Tanggal:e.created_at,"Nama Berkas":e.name});this.tabData[1].data.row=this.berkasDorama,this.bs.idle()},error:t=>{this.gs.log("[BERKAS_DORAMA_ERROR]",t,"error"),this.bs.idle()}})}getFansubDorama(){this.bs.busy(),this.subsFansub=this.dorama.getFansubDorama([this.doramaId],this.fansubPage).subscribe({next:t=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",t);for(const e of t.results[this.doramaId])this.fansubDorama.push({id:e.id,image:e.image_url,title:e.name,slug:e.slug,description:`${e.slug} :: ${e.active?"Aktif":"Non-Aktif"}`});this.tabData[0].data=this.fansubDorama,t.results[this.doramaId].length<=0&&(this.fansubPageFinished=!0),this.bs.idle()},error:t=>{this.gs.log("[FANSUB_DORAMA_ERROR]",t,"error"),this.bs.idle()}})}openGenre(t){this.gs.log("[DORAMA_DETAIL_CLICK_GENRE]",t)}openFansub(t){this.gs.log("[DORAMA_DETAIL_CLICK_FANSUB]",t),this.router.navigateByUrl(`/fansub/${t.slug}`)}onPaginatorClicked(t){this.gs.log("[DORAMA_DETAIL_CLICK_PAGINATOR]",t),this.page=t.pageIndex+1,this.row=t.pageSize,this.getBerkasDorama()}openFile(t){this.gs.log("[DORAMA_DETAIL_CLICK_BERKAS]",t),this.router.navigateByUrl(`/berkas/${t.id}`)}onFansubLoadNextPage(){this.fansubPageFinished||(this.fansubPage++,this.getFansubDorama())}}return i.\u0275fac=function(t){return new(t||i)(a.Y36(d.F0),a.Y36(d.gz),a.Y36(A.U),a.Y36(C.z),a.Y36(E.Z),a.Y36(S.X),a.Y36(y.r))},i.\u0275cmp=a.Xpm({type:i,selectors:[["app-dorama-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"dorama-info","align-items-center"],[1,"media","row","py-3","px-2","d-flex"],[1,"col-md-8","col-xl-9","pt-3","order-2","order-md-1"],[1,"row","py-3","px-0","mt-auto"],[1,"m-0"],[1,"row","py-3"],[3,"chipData","chipClicked"],[1,"row"],[1,"px-0"],[3,"panelData"],[1,"col-12"],[3,"tabData","count","serverSide","gridPageFinished","gridClicked","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder","gridLoadNextPage"],[1,"col-md-4","col-xl-3","px-3","order-1","order-md-2"],[1,"row","sticky-top","pt-3"],[1,"w-100",3,"src"],[1,"col-12","text-center","pt-3"],["mat-stroked-button","","color","accent",1,"w-100",3,"matTooltip","click"],[1,"me-1"],["mat-stroked-button","","color","warn","matTooltip","Buka Ranking Di MyDramaList",1,"w-100",3,"click"],[1,"dorama-banner","dorama-banner-1","align-items-center"],[1,"dorama-banner","dorama-banner-2","align-items-center"]],template:function(t,e){1&t&&a.YNc(0,K,47,18,"div",0),2&t&&a.Q6J("ngIf",e.doramaData)},directives:[D.O5,Y.G,F.t,J.Q,T.H,Q.lW,H.gM,x.Hw],styles:[".dorama-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(10px) brightness(100%);opacity:.5}.dorama-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.dorama-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.dorama-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),i})()}];let z=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=a.oAB({type:i}),i.\u0275inj=a.cJS({imports:[[D.ez,d.Bz.forChild($),m.u5,m.UX,Z.m,R.L,N.$,M.P,U._,O.F]]}),i})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/478.1385ed213a62dbaa.js b/dist/fansubid/browser/478.1385ed213a62dbaa.js new file mode 100644 index 000000000..fb93c57d6 --- /dev/null +++ b/dist/fansubid/browser/478.1385ed213a62dbaa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[478],{8478:(y,D,o)=>{o.r(D),o.d(D,{FansubModule:()=>ue});var m=o(9808),r=o(8406),c=o(3075),S=o(9345),_=o(9215),U=o(1385),p=o(6271),T=o(4249),R=o(2777),L=o(5094),h=o(210),x=o(7355),b=o(6436),A=o(4946),Z=o(8613),P=o(6020),V=o(4167),W=o(2438),t=o(5e3),B=o(8696),O=o(3e3),Y=o(6382),J=o(6781),H=o(8020),w=o(8616),K=o(8757);function X(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.barChartAnimeData)("labels",e.barChartAnimeLabels)("chartType",e.barChartType)("options",e.barChartAnimeOptions)("plugins",e.chartPlugins)("legend",!1)}}function tt(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.barChartDoramaData)("labels",e.barChartDoramaLabels)("chartType",e.barChartType)("options",e.barChartDoramaOptions)("plugins",e.chartPlugins)("legend",!1)}}function et(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.pieChartStatusData)("labels",e.pieChartStatusLabels)("chartType",e.pieChartType)("options",e.pieChartStatusOptions)("plugins",e.chartPlugins)("legend",!0)}}function it(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.doughnutChartGarapanData)("labels",e.doughnutChartGarapanLabels)("chartType",e.doughnutChartType)("options",e.doughnutChartGarapanOptions)("plugins",e.chartPlugins)("legend",!0)}}let at=(()=>{class s{constructor(e,a,i,n,u,d){this.router=e,this.gs=a,this.bs=i,this.fs=n,this.fansub=u,this.wb=d,this.allFansubId=[],this.fansubData=[],this.tabData=[{name:"Katalog Fansub",icon:"closed_caption",type:"table",data:{column:["Status","Logo","Nama Fansub","Anime","Dorama","Tautan Komunitas"],row:[]}}],this.pieChartStatusOptions={title:{display:!0,text:"Kondisi Fansub Terkini"},responsive:!0,legend:{position:"right"}},this.doughnutChartGarapanOptions={title:{display:!0,text:"Total Garapan Fansub"},responsive:!0,legend:{position:"right"}},this.barChartAnimeOptions={title:{display:!0,text:"Garapan Anime Terbanyak"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}]}},this.barChartDoramaOptions={title:{display:!0,text:"Garapan Dorama Terbanyak"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}]}},this.chartPlugins=[],this.pieChartStatusData=[],this.pieChartStatusLabels=[],this.doughnutChartGarapanData=[],this.doughnutChartGarapanLabels=[],this.barChartAnimeData=[],this.barChartAnimeLabels=[],this.barChartDoramaData=[],this.barChartDoramaLabels=[],this.pieChartType="pie",this.doughnutChartType="doughnut",this.barChartType="horizontalBar",this.fansubActive=0,this.fansubInActive=0,this.subsFansub=null,this.subsAnime=null,this.subsDorama=null,this.gs.bannerImg="/assets/img/banner/fansub.png",this.gs.sizeContain=!1,this.gs.bgRepeat=!1,this.gs.isBrowser&&((0,_.Dy)(),(0,_.bF)())}ngOnDestroy(){var e,a;null===(e=this.subsFansub)||void 0===e||e.unsubscribe(),null===(a=this.subsAnime)||void 0===a||a.unsubscribe()}ngOnInit(){this.gs.isBrowser&&this.getFansubData()}getFansubData(){this.bs.busy(),this.subsFansub=this.fansub.getAllFansub().subscribe({next:e=>{this.gs.log("[FANSUB_LIST_SUCCESS]",e);for(const a of e.results){this.allFansubId.push(a.id);const i=[];if(Array.isArray(a.urls))for(const n of a.urls)i.push({type:"button",icon:"discord"===n.name?void 0:n.name,image:"discord"===n.name?"/assets/img/discord/blue.png":void 0,url:n.url,name:n.name});this.fansubData.push({id:a.id,slug:a.slug,Logo:a.image_url,Status:a.active?"AKTIF":"TIDAK AKTIF","Nama Fansub":a.name,"Tautan Komunitas":i}),a.active?this.fansubActive++:a.active||this.fansubInActive++}this.pieChartStatusLabels=["Fansub Aktif","Fansub Tidak Aktif"],this.pieChartStatusData=[this.fansubActive,this.fansubInActive],this.tabData[0].data.row=this.fansubData,this.getAnimeFansub(),this.getDoramaFansub(),this.fs.initializeFab("add",null,"Tambahkan Fansub Baru","/create/fansub",!1),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_LIST_ERROR]",e,"error"),this.bs.idle()}})}getAnimeFansub(){this.bs.busy(),this.subsAnime=this.fansub.getAnimeFansub(this.allFansubId).subscribe({next:e=>{this.gs.log("[FANSUB_ANIME_SUCCESS]",e);for(const i of this.fansubData)i.Anime=e.results[i.id];this.doughnutChartGarapanLabels.push("Berkas Anime"),this.doughnutChartGarapanData.push(e.count);const a=[...this.fansubData].sort((i,n)=>n.Anime-i.Anime).slice(0,10);for(const i of a)this.barChartAnimeLabels.push(i["Nama Fansub"]),this.barChartAnimeData.push(i.Anime);this.bs.idle()},error:e=>{this.gs.log("[FANSUB_ANIME_ERROR]",e,"error"),this.bs.idle()}})}getDoramaFansub(){this.bs.busy(),this.subsDorama=this.fansub.getDoramaFansub(this.allFansubId).subscribe({next:e=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",e);for(const i of this.fansubData)i.Dorama=e.results[i.id];this.doughnutChartGarapanLabels.push("Berkas Dorama"),this.doughnutChartGarapanData.push(e.count);const a=[...this.fansubData].sort((i,n)=>n.Dorama-i.Dorama).slice(0,10);for(const i of a)this.barChartDoramaLabels.push(i["Nama Fansub"]),this.barChartDoramaData.push(i.Dorama);this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DORAMA_ERROR]",e,"error"),this.bs.idle()}})}openFansub(e){this.gs.log("[FANSUB_LIST_OPEN_FANSUB]",e),this.router.navigateByUrl(`/fansub/${e.slug}`)}openUrl(e){this.gs.log("[FANSUB_LIST_OPEN_URL]",e),this.wb.winboxOpenUri(e.url)}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(r.F0),t.Y36(B.U),t.Y36(O.z),t.Y36(Y.r),t.Y36(J.T),t.Y36(H.N))},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-fansub-list"]],decls:9,vars:5,consts:[[1,"container"],[1,"row","p-3"],["class","col-12 col-md-6 py-1 bg-bifeldy",4,"ngIf"],[1,"row","pt-3"],[3,"tabData","tableRowClicked","buttonClicked"],[1,"col-12","col-md-6","py-1","bg-bifeldy"],["baseChart","",3,"data","labels","chartType","options","plugins","legend"]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1),t.YNc(3,X,2,6,"div",2),t.YNc(4,tt,2,6,"div",2),t.YNc(5,et,2,6,"div",2),t.YNc(6,it,2,6,"div",2),t.qZA(),t.TgZ(7,"div",3)(8,"app-material-tab",4),t.NdJ("tableRowClicked",function(n){return a.openFansub(n)})("buttonClicked",function(n){return a.openUrl(n)}),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ngIf",a.barChartAnimeData.length>0&&a.barChartAnimeLabels.length>0),t.xp6(1),t.Q6J("ngIf",a.barChartDoramaData.length>0&&a.barChartDoramaLabels.length>0),t.xp6(1),t.Q6J("ngIf",2===a.pieChartStatusData.length&&2===a.pieChartStatusLabels.length),t.xp6(1),t.Q6J("ngIf",2===a.doughnutChartGarapanData.length&&2===a.doughnutChartGarapanLabels.length),t.xp6(2),t.Q6J("tabData",a.tabData))},directives:[w.t,m.O5,_.jh,K.H],styles:[""]}),s})();var st=o(5934),nt=o(7623),j=o(4137),ot=o(7845),G=o(8745),rt=o(8381),z=o(6925),I=o(7423),lt=o(7238),$=o(5245),ut=o(192),k=o(4623),ct=o(4028),dt=o(7567),gt=o(325),mt=o(6766);function bt(s,l){if(1&s&&(t.TgZ(0,"div",8)(1,"a",34)(2,"mat-icon",10),t._uU(3,"facebook"),t.qZA(),t._uU(4," Facebook Fanpage "),t.qZA()()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("href",e.getUrlByName("facebook"),t.LSH)}}function pt(s,l){if(1&s&&(t.TgZ(0,"div",8)(1,"a",35),t._UZ(2,"img",36),t._uU(3," Ruang Obrolan Discord "),t.qZA()()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("href",e.getUrlByName("discord"),t.LSH)}}function ht(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"a",37),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).joinLeaveMember()}),t._uU(1),t.qZA()}if(2&s){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.joinedAsMember?"Keluar":"Gabung"," ")}}function _t(s,l){1&s&&t._UZ(0,"app-no-data")}function ft(s,l){if(1&s&&(t.TgZ(0,"mat-list-option",40),t._UZ(1,"img",41),t.TgZ(2,"a",42)(3,"span",43),t._uU(4),t.qZA(),t.TgZ(5,"span",44),t._uU(6),t.qZA()()()),2&s){const e=l.$implicit;t.MGl("routerLink","/user/",e.user_.username,""),t.xp6(1),t.s9C("src",e.user_.image_url,t.LSH),t.xp6(3),t.hij(" ",e.keterangan," "),t.xp6(2),t.Oqu(e.user_.username)}}function vt(s,l){if(1&s&&(t.TgZ(0,"mat-selection-list",38),t.YNc(1,ft,7,4,"mat-list-option",39),t.qZA()),2&s){const e=t.oxw(2);t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.approvedMembers)}}function xt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"mat-list-option",46),t._UZ(1,"img",41),t.TgZ(2,"a",42)(3,"span",47)(4,"small",48),t.NdJ("click",function(){const n=t.CHM(e).$implicit;return t.oxw(3).approveMember(n)}),t._uU(5," Terima "),t.qZA(),t._uU(6," | "),t.TgZ(7,"small",49),t.NdJ("click",function(){const n=t.CHM(e).$implicit;return t.oxw(3).rejectMember(n)}),t._uU(8," Tolak "),t.qZA()(),t.TgZ(9,"span",50),t._uU(10),t.qZA()()()}if(2&s){const e=l.$implicit;t.xp6(1),t.s9C("src",e.user_.image_url,t.LSH),t.xp6(8),t.MGl("routerLink","/user/",e.user_.username,""),t.xp6(1),t.hij(" ",e.user_.username," ")}}function Tt(s,l){if(1&s&&(t.TgZ(0,"mat-selection-list",38),t.YNc(1,xt,11,3,"mat-list-option",45),t.qZA()),2&s){const e=t.oxw(2);t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.pendingMembers)}}function At(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",8)(1,"button",51),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).getSubDomain()}),t.TgZ(2,"mat-icon",10),t._uU(3,"dns"),t.qZA(),t._uU(4),t.qZA()()}if(2&s){const e=t.oxw(2);t.xp6(4),t.AsE(" 'https://",e.fansubData.slug,".",e.ENV.domain,"' ")}}function Ft(s,l){if(1&s&&(t.TgZ(0,"div",14),t._UZ(1,"app-material-expansion-panel",52),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("panelData",e.panelData)}}function Ct(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"mat-list-option",46)(1,"mat-icon",57),t._uU(2,"rss_feed"),t.qZA(),t.TgZ(3,"a",58),t.NdJ("click",function(){const n=t.CHM(e).$implicit;return t.oxw(3).openRssFeed(n.link)}),t.TgZ(4,"span",59),t._uU(5),t.ALo(6,"dateAgo"),t.qZA(),t._UZ(7,"span",60),t.qZA()()}if(2&s){const e=l.$implicit;t.xp6(5),t.Oqu(t.lcZ(6,2,e.created||e.published)),t.xp6(2),t.Q6J("innerHtml",e.title,t.oJD)}}function Dt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",14)(1,"div",53)(2,"h2",54)(3,"span",55),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).getRssFeed()}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",56),t._uU(6,"RSS Feed Fansub"),t.qZA()()(),t.TgZ(7,"div",6)(8,"mat-selection-list",38),t.YNc(9,Ct,8,4,"mat-list-option",45),t.ALo(10,"slice"),t.qZA()()()}if(2&s){const e=t.oxw(2);t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,2,e.rssFeedData.items,0,5))}}function Et(s,l){1&s&&(t.TgZ(0,"div",14)(1,"div",6),t._UZ(2,"app-report"),t.qZA()())}function St(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),t._UZ(6,"img",7),t.qZA(),t.TgZ(7,"div",8)(8,"button",9)(9,"mat-icon",10),t._uU(10,"calendar_today"),t.qZA(),t._uU(11),t.ALo(12,"date"),t.qZA(),t.TgZ(13,"button",11)(14,"mat-icon",10),t._uU(15,"history"),t.qZA(),t._uU(16),t.qZA()(),t.YNc(17,bt,5,1,"div",12),t.YNc(18,pt,4,1,"div",12),t.TgZ(19,"div",8)(20,"button",13),t.NdJ("click",function(){return t.CHM(e),t.oxw().editFansubData()}),t.TgZ(21,"mat-icon",10),t._uU(22,"edit"),t.qZA(),t._uU(23," Perbaharui Informasi "),t.qZA()(),t.TgZ(24,"div",6)(25,"div",14)(26,"div",15)(27,"h2",16),t.YNc(28,ht,2,1,"a",17),t.TgZ(29,"b",18),t._uU(30),t.qZA()()(),t.TgZ(31,"div",19)(32,"div",20),t.YNc(33,_t,1,0,"app-no-data",21),t.YNc(34,vt,2,2,"mat-selection-list",22),t.YNc(35,Tt,2,2,"mat-selection-list",22),t.qZA()(),t.TgZ(36,"div",8)(37,"button",23),t.NdJ("click",function(){return t.CHM(e),t.oxw().togglePendingMembers()}),t.TgZ(38,"mat-icon",10),t._uU(39,"manage_accounts"),t.qZA(),t._uU(40),t.qZA()()()(),t.YNc(41,At,5,2,"div",12),t.qZA()(),t.TgZ(42,"div",24)(43,"div",25)(44,"h1",26)(45,"b"),t._uU(46),t.qZA()()(),t.TgZ(47,"div",14)(48,"app-material-chip",27),t.NdJ("chipClicked",function(i){return t.CHM(e),t.oxw().openTag(i)}),t.qZA()(),t.TgZ(49,"div",28),t._UZ(50,"app-notifications",29),t.qZA(),t.YNc(51,Ft,2,1,"div",30),t.YNc(52,Dt,11,6,"div",30),t.YNc(53,Et,3,0,"div",30),t.TgZ(54,"div",14)(55,"div",6)(56,"app-material-tab",31),t.NdJ("listClicked",function(i){return t.CHM(e),t.oxw().openAnime(i)})("gridClicked",function(i){return t.CHM(e),t.oxw().openDorama(i)})("tableRowClicked",function(i){return t.CHM(e),t.oxw().openFile(i)})("paginatorClicked",function(i){return t.CHM(e),t.oxw().onPaginatorClicked(i)})("serverSideFilter",function(i){return t.CHM(e),t.oxw().onServerSideFilter(i)})("serverSideOrder",function(i){return t.CHM(e),t.oxw().onServerSideOrder(i)})("gridLoadNextPage",function(){return t.CHM(e),t.oxw().onDoramaLoadNextPage()})("listLoadNextPage",function(){return t.CHM(e),t.oxw().onAnimeLoadNextPage()}),t.qZA()()()()()(),t._UZ(57,"div",32)(58,"div",33),t.qZA()}if(2&s){const e=t.oxw();t.xp6(6),t.Q6J("src",e.fansubData.image_url,t.LSH),t.xp6(5),t.hij(" ",t.xi3(12,25,e.fansubData.born,"d MMMM y")," "),t.xp6(5),t.hij(" ",e.fansubData.active?"Aktif":"Tidak Aktif"," "),t.xp6(1),t.Q6J("ngIf",e.getUrlByName("facebook")),t.xp6(1),t.Q6J("ngIf",e.getUrlByName("discord")),t.xp6(2),t.s9C("matTooltip",e.fansubData.user_?"Terakhir Di Ubah Oleh :: "+e.fansubData.user_.username:"Perbaharui Data Fansub"),t.xp6(8),t.Q6J("ngIf",!e.showPendingMember),t.xp6(2),t.hij(" ",e.showPendingMember?"Permintaan Gabung":"Anggota"," "),t.xp6(3),t.Q6J("ngIf",!e.showPendingMember&&e.approvedMembers.length<=0||e.showPendingMember&&e.pendingMembers.length<=0),t.xp6(1),t.Q6J("ngIf",!e.showPendingMember&&e.approvedMembers.length>0),t.xp6(1),t.Q6J("ngIf",e.showPendingMember&&e.pendingMembers.length>0),t.xp6(5),t.hij(" Lihat ",e.showPendingMember?"Anggota":"Permintaan Gabung"," "),t.xp6(1),t.Q6J("ngIf",!e.fansubData.dns_id),t.xp6(5),t.Oqu(e.fansubData.name),t.xp6(2),t.Q6J("chipData",e.chipData),t.xp6(3),t.Q6J("ngIf",e.panelData.length>0),t.xp6(1),t.Q6J("ngIf",(null==e.rssFeedData?null:e.rssFeedData.items.length)>0&&"null"!==e.fansubSlug),t.xp6(1),t.Q6J("ngIf",null==e.SS.mySocket?null:e.SS.mySocket.id),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0)("gridPageFinished",e.doramaPageFinished)("listPageFinished",e.animePageFinished),t.xp6(1),t.Udp("background-image","url("+e.fansubData.cover_url+")")}}let Zt=(()=>{class s{constructor(e,a,i,n,u,d,g,f,E,v,F,C){this.activatedRoute=e,this.router=a,this.bs=i,this.as=n,this.ds=u,this.gs=d,this.fs=g,this.pi=f,this.fansub=E,this.ss=v,this.toast=F,this.wb=C,this.fansubSlug="",this.fansubData=null,this.rssFeedData=null,this.approvedMembers=[],this.pendingMembers=[],this.joinedAsMember=null,this.showPendingMember=!1,this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.animeFansub=[],this.doramaFansub=[],this.berkasFansub=[],this.animePageFinished=!1,this.doramaPageFinished=!1,this.animePage=1,this.doramaPage=1,this.chipData=[],this.panelData=[],this.tabData=[{name:"Anime",icon:"live_tv",type:"list",data:[]},{name:"Dorama",icon:"movie",type:"grid",data:[]},{name:"Berkas Terkait",icon:"file_copy",type:"table",data:{column:["Tanggal","Nama Berkas","Pemilik"],row:[]}}],this.subsActRoute=null,this.subsFansub=null,this.subsBerkas=null,this.subsAnime=null,this.subsDorama=null,this.subsParam=null,this.subsRssFeed=null,this.subsFansubMemberGet=null,this.subsFansubMemberJoin=null,this.subsFansubMemberApproveReject=null,this.subsFansubMemberLeave=null,this.subsDialog=null,this.subsClaimSubDomain=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get SS(){return this.ss}get ENV(){return st.N}ngOnDestroy(){var e,a,i,n,u,d,g,f,E,v,F,C,q;null===(e=this.subsActRoute)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe(),null===(i=this.subsBerkas)||void 0===i||i.unsubscribe(),null===(n=this.subsAnime)||void 0===n||n.unsubscribe(),null===(u=this.subsDorama)||void 0===u||u.unsubscribe(),null===(d=this.subsParam)||void 0===d||d.unsubscribe(),null===(g=this.subsRssFeed)||void 0===g||g.unsubscribe(),null===(f=this.subsFansubMemberGet)||void 0===f||f.unsubscribe(),null===(E=this.subsFansubMemberJoin)||void 0===E||E.unsubscribe(),null===(v=this.subsFansubMemberApproveReject)||void 0===v||v.unsubscribe(),null===(F=this.subsFansubMemberLeave)||void 0===F||F.unsubscribe(),null===(C=this.subsDialog)||void 0===C||C.unsubscribe(),null===(q=this.subsClaimSubDomain)||void 0===q||q.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:e=>{this.fansubSlug=e.fansubSlug,this.getFansubDetail()}})}getFansubDetail(){this.bs.busy(),this.subsFansub=this.fansub.getFansub(this.fansubSlug).subscribe({next:e=>{if(this.gs.log("[FANSUB_DETAIL_SUCCESS]",e),this.fansubData=e.result,this.pi.updatePageMetaData(`${this.fansubData.name}`,`${this.fansubData.description}`,`${Array.isArray(this.fansubData.tags)?this.fansubData.tags.join(", "):this.fansubData.name}`,this.fansubData.image_url,this.fansubData.user_.username),this.bs.idle(),this.gs.isBrowser){if(Array.isArray(this.fansubData.tags))for(let i=0;i{this.gs.log("[FANSUB_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/fansub"}})}})}getUrlByName(e){const a=this.fansubData.urls.find(i=>i.name===e);return a?a.url:null}getRssFeed(){this.bs.busy(),this.subsRssFeed=this.fansub.getRssFeedFansub(this.fansubSlug).subscribe({next:e=>{this.gs.log("[RSS_FEED_LIST_SUCCESS]",e),this.rssFeedData=e.result,this.bs.idle()},error:e=>{this.gs.log("[RSS_FEED_LIST_ERROR]",e,"error"),this.bs.idle()}})}openRssFeed(e){this.wb.winboxOpenUri(this.gs.rssLink(e))}getBerkasFansub(){this.bs.busy(),this.subsBerkas=this.fansub.getBerkasFansub([this.fansubData.id],this.q,this.page,this.row,this.sort,this.order).subscribe({next:e=>{this.gs.log("[BERKAS_ANIME_SUCCESS]",e),this.count=e.count,this.berkasFansub=[];for(const a of e.results[this.fansubData.id])this.berkasFansub.push({id:a.id,private:a.private,foto:a.user_.image_url,Pemilik:a.user_.username,Tanggal:a.created_at,"Nama Berkas":a.name});this.tabData[2].data.row=this.berkasFansub,this.bs.idle()},error:e=>{this.gs.log("[BERKAS_FANSUB_ERROR]",e,"error"),this.bs.idle()}})}getAnimeFansub(){this.bs.busy(),this.subsAnime=this.fansub.getAnimeFansub([this.fansubData.id],this.animePage).subscribe({next:e=>{this.gs.log("[FANSUB_ANIME_SUCCESS]",e);for(const a of e.results[this.fansubData.id])this.animeFansub.push({id:a.id,image:a.image_url,title:a.name});this.tabData[0].data=this.animeFansub,e.results[this.fansubData.id].length<=0&&(this.animePageFinished=!0),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_ANIME_ERROR]",e,"error"),this.bs.idle()}})}getDoramaFansub(){this.bs.busy(),this.subsDorama=this.fansub.getDoramaFansub([this.fansubData.id],this.doramaPage).subscribe({next:e=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",e);for(const a of e.results[this.fansubData.id])this.doramaFansub.push({id:a.id,image:a.image_url,title:a.name,slug:a.slug});this.tabData[1].data=this.doramaFansub,e.results[this.fansubData.id].length<=0&&(this.doramaPageFinished=!0),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DORAMA_ERROR]",e,"error"),this.bs.idle()}})}editFansubData(){this.router.navigateByUrl(`/fansub/${this.fansubSlug}/edit`)}onServerSideFilter(e){this.gs.log("[BERKAS_FANSUB_ENTER_FILTER]",e),this.q=e,this.getBerkasFansub()}onServerSideOrder(e){this.gs.log("[BERKAS_FANSUB_CLICK_ORDER]",e),this.q=e.q,this.sort=e.active,this.order=e.direction,this.getBerkasFansub()}onPaginatorClicked(e){this.gs.log("[FANSUB_DETAIL_CLICK_PAGINATOR]",e),this.page=e.pageIndex+1,this.row=e.pageSize,this.getBerkasFansub()}openFile(e){this.gs.log("[FANSUB_DETAIL_OPEN_FILE]",e),this.router.navigateByUrl(`/berkas/${e.id}`)}openAnime(e){this.gs.log("[FANSUB_DETAIL_OPEN_ANIME]",e);const a=e.title.replace(/[^a-zA-Z0-9]/g,"-");this.router.navigateByUrl(`/anime/${e.id}-${a}`)}openDorama(e){this.gs.log("[FANSUB_DETAIL_OPEN_DORAMA]",e),this.router.navigateByUrl(`/dorama/${e.slug}`)}openTag(e){this.gs.log("[FANSUB_DETAIL_OPEN_TAG]",e)}onAnimeLoadNextPage(){this.animePageFinished||(this.animePage++,this.getAnimeFansub())}onDoramaLoadNextPage(){this.doramaPageFinished||(this.doramaPage++,this.getDoramaFansub())}togglePendingMembers(){this.showPendingMember=!this.showPendingMember,this.getFansubMember()}getFansubMember(){this.bs.busy(),this.subsFansubMemberGet=this.fansub.getFansubMember(this.fansubSlug).subscribe({next:e=>{var a;this.gs.log("[FANSUB_DETAIL_MEMBER_LIST_SUCCESS]",e),this.approvedMembers=[],this.pendingMembers=[];for(const i of e.results)i.approved?this.approvedMembers.push(i):this.pendingMembers.push(i);if(null===(a=this.as.currentUserSubject)||void 0===a?void 0:a.value){const i=this.approvedMembers.findIndex(n=>{var u,d;return n.user_.id===(null===(d=null===(u=this.as.currentUserSubject)||void 0===u?void 0:u.value)||void 0===d?void 0:d.id)});this.joinedAsMember=i>=0?this.approvedMembers[i]:null}this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_LIST_ERROR]",e,"error"),this.bs.idle()}})}joinLeaveMember(){this.bs.busy(),this.joinedAsMember?this.subsFansubMemberLeave=this.fansub.leaveFansubMember(this.joinedAsMember.id).subscribe({next:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_LEAVE_SUCCESS]",e),this.getFansubMember(),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_LEAVE_ERROR]",e,"error"),this.getFansubMember(),this.bs.idle()}}):this.subsFansubMemberJoin=this.fansub.requestJoinFansubMember({slug:this.fansubSlug}).subscribe({next:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_JOIN_SUCCESS]",e),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:"Permintaan Gabung Berhasil",htmlMessage:"Silahkan Menghubungi Anggota Yang Sudah Tergabung / Admin / Moderator Fansub Untuk Menerima Permintaan Gabung.",confirmText:"Tutup"}}).afterClosed().subscribe({next:a=>{this.gs.log("[INFO_DIALOG_CLOSED]",a),this.getFansubMember(),this.subsDialog.unsubscribe()}})},error:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_JOIN_ERROR]",e,"error"),this.getFansubMember(),this.bs.idle()}})}approveOrRejectFansubMember(e,a){this.subsDialog=this.ds.openInputDialog({data:{title:`Keterangan ${a?"Approve":"Reject"} '${e.user_.username}' :: '${e.fansub_.slug}'`,input:{keterangan:{inputLabel:"Keterangan",inputPlaceholder:"Pemilik, Translator, Timer, QA / QC, TypeSetter, dll.",inputValue:null,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Max. 10 Huruf"}}).afterClosed().subscribe({next:i=>{var n;this.gs.log("[INPUT_DIALOG_CLOSED]",i),i?(this.bs.busy(),this.subsFansubMemberApproveReject=this.fansub.approveRejectFansubMember(e.id,{approved:a,keterangan:null===(n=i.keterangan)||void 0===n?void 0:n.substring(0,10)}).subscribe({next:u=>{this.gs.log("[FANSUB_DETAIL_MEMBER_APPROVE_REJECT_SUCCESS]",u),this.getFansubMember(),this.bs.idle()},error:u=>{this.gs.log("[FANSUB_DETAIL_MEMBER_APPROVE_REJECT_ERROR]",u,"error"),this.getFansubMember(),this.bs.idle()}})):!1===i&&this.getFansubMember(),this.subsDialog.unsubscribe()}})}approveMember(e){this.approveOrRejectFansubMember(e,!0)}rejectMember(e){this.approveOrRejectFansubMember(e,!1)}getSubDomain(){var e,a,i,n,u;(null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)?this.joinedAsMember||(null===(i=null===(a=this.as.currentUserSubject)||void 0===a?void 0:a.value)||void 0===i?void 0:i.role)===T.yS.ADMIN||(null===(u=null===(n=this.as.currentUserSubject)||void 0===n?void 0:n.value)||void 0===u?void 0:u.role)===T.yS.MODERATOR?this.subsDialog=this.ds.openInputDialog({data:{title:`Buat CNAME / A Record IP v4 v6 :: '${this.fansubSlug}'`,input:{server_target:{inputLabel:"Server Target",inputPlaceholder:"ghs.google.com",inputValue:null,inputRequired:!0},verification_name:{inputLabel:"Tambahan Khusus Blogger :: Name",inputPlaceholder:"blablabla-name",inputValue:null,inputRequired:!1},verification_target:{inputLabel:"Tambahan Khusus Blogger :: Target",inputPlaceholder:"blablabla-target.dv.googlehosted.com",inputValue:null,inputRequired:!1}},confirmText:"OK",cancelText:"Batal",infoText:"Abaikan 2 Input Terakhir Jika Bukan Blogger"}}).afterClosed().subscribe({next:d=>{this.gs.log("[INPUT_DIALOG_CLOSED]",d),d&&(this.bs.busy(),this.subsClaimSubDomain=this.fansub.claimSubDomain({slug:this.fansubSlug,server_target:d.server_target,verification_name:d.verification_name,verification_target:d.verification_target}).subscribe({next:g=>{this.gs.log("[FANSUB_CLAIM_SUBDOMAIN_SUCCESS]",g),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:"Klaim Berhasil",htmlMessage:`\n Domain '${this.fansubSlug}.${this.ENV.domain}' Sudah Didaftarkan Dan Dapat Digunakan,\n Silahkan Migrasi Domain Pada Situs Penyedia Layanan (Ex. Blogger / Wordpress / Etc.)\n Kemudian Tunggu Hingga Propagasi Dns Selesai.\n Terima Kasih.\n `,confirmText:"Tutup"}}).afterClosed().subscribe({next:f=>{this.gs.log("[INFO_DIALOG_CLOSED]",f),this.getFansubDetail(),this.subsDialog.unsubscribe()}})},error:g=>{this.gs.log("[FANSUB_CLAIM_SUBDOMAIN_ERROR]",g,"error"),this.bs.idle(),this.getFansubDetail()}})),this.subsDialog.unsubscribe()}}):this.toast.warning("Harus Menjadi Anggota Untuk Klaim Sub-Domain!","Whoops!",null,!0):this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(r.gz),t.Y36(r.F0),t.Y36(O.z),t.Y36(j.e),t.Y36(ot.x),t.Y36(B.U),t.Y36(Y.r),t.Y36(G.Z),t.Y36(J.T),t.Y36(rt.R),t.Y36(z.k),t.Y36(H.N))},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-fansub-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-info","align-items-center"],[1,"media","row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"w-100",3,"src"],[1,"col-12","text-center","pt-3"],["mat-button","","color","warn","matTooltip","Berdiri Sejak",1,"w-100"],[1,"me-1"],["mat-button","","color","accent","matTooltip","Status Fansub",1,"w-100"],["class","col-12 text-center pt-3",4,"ngIf"],["mat-button","",1,"w-100","text-success",2,"color","rgb(255, 64, 129) !important",3,"matTooltip","click"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],["class","float-end text-decoration-none text-warning","style","font-size: small; cursor: pointer;",3,"click",4,"ngIf"],["matTooltip","Lihat Permintaan Gabung Keanggotaan",1,"text-bifeldy",2,"cursor","pointer"],[1,"col-12",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],[4,"ngIf"],[3,"multiple",4,"ngIf"],["mat-button","","color","accent",1,"w-100",3,"click"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","mt-auto"],[1,"m-0"],[3,"chipData","chipClicked"],[1,"row"],[1,"px-0"],["class","row py-3",4,"ngIf"],[3,"tabData","count","serverSide","gridPageFinished","listPageFinished","listClicked","gridClicked","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder","gridLoadNextPage","listLoadNextPage"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],["mat-stroked-button","","matTooltip","Kunjungi Halaman Fanpage",1,"w-100",2,"color","rgb(114, 137, 218)",3,"href"],["mat-stroked-button","","matTooltip","Kunjungi Ruang Obrolan",1,"w-100",2,"color","rgb(114, 137, 218)",3,"href"],["src","/assets/img/discord/blue.png","width","24px"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"text-success"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],[1,"bg-bifeldy","px-2","me-1",2,"position","absolute","right","0"],[1,"text-success",2,"cursor","pointer",3,"click"],[1,"text-danger",2,"cursor","pointer",3,"click"],[1,"text-warning",3,"routerLink"],["mat-button","","color","accent","matTooltip","Ambil / Klaim / Dapatkan Sub-Domain Ini",1,"w-100",3,"click"],[3,"panelData"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],["mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0"],[1,"text-warning",3,"innerHtml"]],template:function(e,a){1&e&&t.YNc(0,St,59,28,"div",0),2&e&&t.Q6J("ngIf",a.fansubData)},directives:[m.O5,I.lW,lt.gM,$.Hw,I.zs,ut.d,k.Ub,m.sg,k.vS,r.rH,k.eA,ct.G,w.t,dt.Q,k.Nh,gt.Y,K.H],pipes:[m.uU,m.OU,mt.R],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),s})();var Ut=o(8372),Mt=o(9094),It=o(8505),kt=o(3900),Nt=o(5625),yt=o(7902),M=o(7322),Rt=o(7531),Q=o(6856),Lt=o(4107),Pt=o(508),N=o(6688),Bt=o(3626);function Ot(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function Jt(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function wt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",59),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitImage()}),t.TgZ(2,"mat-icon",56),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&s){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Qt(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function qt(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function Yt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",60)(1,"button",59),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitCover()}),t.TgZ(2,"mat-icon",56),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&s){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ht(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function Kt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function jt(s,l){if(1&s&&(t.TgZ(0,"small",61)(1,"div"),t._uU(2),t.qZA()()),2&s){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function Gt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function zt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function $t(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function Vt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Wt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function Xt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function te(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"mat-chip",62),t.NdJ("removed",function(){const n=t.CHM(e).$implicit;return t.oxw(3).removeTag(n)}),t._uU(1),t.TgZ(2,"mat-icon",63),t._uU(3,"cancel"),t.qZA()()}if(2&s){const e=l.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ee(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function ie(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function ae(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function se(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function ne(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function oe(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){return t.CHM(e),t.oxw(2).onSubmit()}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Perbaharui Data Fansub"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",15)(10,"div",6),t._UZ(11,"img",16),t.TgZ(12,"mat-form-field",17)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",18,19),t.NdJ("change",function(i){t.CHM(e);const n=t.MAs(16);return t.oxw(2).uploadImage(i,n)}),t.qZA(),t.TgZ(17,"mat-icon",20),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",21)(20,"small"),t.YNc(21,Ot,3,3,"div",22),t.YNc(22,Jt,2,1,"div",22),t.qZA()()(),t.YNc(23,wt,5,1,"div",23),t.qZA()(),t.TgZ(24,"div",24)(25,"div",13)(26,"mat-form-field",25)(27,"mat-label"),t._uU(28,"Cover"),t.qZA(),t.TgZ(29,"ngx-mat-file-input",18,26),t.NdJ("change",function(i){t.CHM(e);const n=t.MAs(30);return t.oxw(2).uploadCover(i,n)}),t.qZA(),t.TgZ(31,"mat-icon",20),t._uU(32,"image"),t.qZA()(),t.TgZ(33,"mat-error",21)(34,"small"),t.YNc(35,Qt,3,3,"div",22),t.YNc(36,qt,2,1,"div",22),t.qZA()(),t.YNc(37,Yt,5,1,"div",27),t.TgZ(38,"mat-form-field",28)(39,"mat-label"),t._uU(40,"Nama Fansub"),t.qZA(),t._UZ(41,"input",29),t.TgZ(42,"mat-icon",20),t._uU(43,"wysiwyg"),t.qZA(),t.TgZ(44,"mat-error"),t.YNc(45,Ht,2,0,"div",22),t.YNc(46,Kt,2,0,"div",22),t.qZA()(),t.TgZ(47,"mat-form-field",30)(48,"mat-label"),t._uU(49,"Singkatan"),t.qZA(),t._UZ(50,"input",31),t.TgZ(51,"mat-icon",20),t._uU(52,"short_text"),t.qZA(),t.YNc(53,jt,3,1,"small",32),t.TgZ(54,"mat-error"),t.YNc(55,Gt,2,0,"div",22),t.YNc(56,zt,2,0,"div",22),t.qZA()(),t._UZ(57,"angular-editor",33),t.TgZ(58,"mat-form-field",34)(59,"mat-label"),t._uU(60,"Mulai Ada Sejak"),t.qZA(),t.TgZ(61,"input",35),t.NdJ("focus",function(){return t.CHM(e),t.MAs(65).open()}),t.ALo(62,"date"),t.qZA(),t._UZ(63,"mat-datepicker-toggle",36)(64,"mat-datepicker",37,38),t.TgZ(66,"mat-error"),t.YNc(67,$t,2,0,"div",22),t.YNc(68,Vt,2,0,"div",22),t.qZA()(),t.TgZ(69,"mat-form-field",34)(70,"mat-label"),t._uU(71,"Status"),t.qZA(),t.TgZ(72,"mat-select",39)(73,"mat-option",40),t._uU(74,"Tidak Aktif"),t.qZA(),t.TgZ(75,"mat-option",41),t._uU(76,"Aktif"),t.qZA()(),t.TgZ(77,"mat-hint",42),t._uU(78,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(79,"mat-error"),t.YNc(80,Wt,2,0,"div",22),t.YNc(81,Xt,2,0,"div",22),t.qZA()()()()(),t.TgZ(82,"div",13)(83,"div",6)(84,"div",13)(85,"mat-form-field",43)(86,"mat-label"),t._uU(87,"Tags & Kategori"),t.qZA(),t.TgZ(88,"mat-chip-list",null,44),t.YNc(90,te,4,2,"mat-chip",45),t.TgZ(91,"input",46),t.NdJ("matChipInputTokenEnd",function(i){return t.CHM(e),t.oxw(2).addTag(i)}),t.qZA(),t.TgZ(92,"mat-icon",20),t._uU(93,"loyalty"),t.qZA()(),t.TgZ(94,"mat-hint",42),t._uU(95,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(96,"div",13)(97,"div",6)(98,"div",13)(99,"mat-form-field",47)(100,"mat-label"),t._uU(101,"Tautan Website"),t.qZA(),t._UZ(102,"input",48),t.TgZ(103,"mat-icon",20),t._uU(104,"web"),t.qZA(),t.TgZ(105,"mat-error"),t.YNc(106,ee,2,0,"div",22),t.YNc(107,ie,2,0,"div",22),t.qZA()(),t.TgZ(108,"mat-form-field",47)(109,"mat-label"),t._uU(110,"Facebook Fanpage"),t.qZA(),t._UZ(111,"input",49),t.TgZ(112,"mat-icon",20),t._uU(113,"facebook"),t.qZA(),t.TgZ(114,"mat-error"),t.YNc(115,ae,2,0,"div",22),t.qZA()(),t.TgZ(116,"mat-form-field",47)(117,"mat-label"),t._uU(118,"Tautan Discord"),t.qZA(),t._UZ(119,"input",50),t.TgZ(120,"mat-icon",20),t._UZ(121,"img",51),t.qZA(),t.TgZ(122,"mat-error"),t.YNc(123,se,2,0,"div",22),t.qZA()()()()(),t.TgZ(124,"div",13)(125,"mat-form-field",43)(126,"mat-label"),t._uU(127,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(128,"input",52),t.TgZ(129,"mat-icon",20),t._uU(130,"rss_feed"),t.qZA(),t.TgZ(131,"mat-error"),t.YNc(132,ne,2,0,"div",22),t.qZA()()(),t.TgZ(133,"div",13)(134,"div",6)(135,"div",13),t._UZ(136,"div",53),t.TgZ(137,"div",54)(138,"a",55)(139,"mat-icon",56),t._uU(140,"undo"),t.qZA(),t._uU(141," Batal "),t.qZA()(),t.TgZ(142,"div",54)(143,"button",57),t._uU(144," Simpan "),t.TgZ(145,"mat-icon",58),t._uU(146,"save"),t.qZA()()()()()()()()()}if(2&s){const e=t.MAs(65),a=t.MAs(89),i=t.oxw(2);t.Q6J("formGroup",i.fg),t.xp6(11),t.Q6J("src",i.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",i.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",i.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",i.imageErrorText),t.xp6(1),t.Q6J("ngIf",i.image&&!i.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",i.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",i.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",i.coverErrorText),t.xp6(1),t.Q6J("ngIf",i.cover&&!i.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",i.slugInfo),t.xp6(2),t.Q6J("ngIf",i.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",i.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(62,48,i.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",i.fg.get("born").hasError("required")||i.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",i.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",i.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",i.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",i.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(8),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",i.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",i.fg.get("discord").hasError("pattern")),t.xp6(2),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("rss_feed").hasError("pattern")),t.xp6(6),t.Q6J("disabled",i.submitted),t.xp6(5),t.Q6J("disabled",i.submitted||i.fg.invalid||!i.fg.dirty)}}function re(s,l){if(1&s&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,oe,147,51,"form",7),t.qZA()()()),2&s){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}const le=[{path:"",pathMatch:"full",component:at},{path:":fansubSlug",children:[{path:"",pathMatch:"full",component:Zt},{path:"edit",component:(()=>{class s{constructor(e,a,i,n,u,d,g,f,E,v){this.fb=e,this.router=a,this.bs=i,this.activatedRoute=n,this.pi=u,this.imgbb=d,this.fansub=g,this.toast=f,this.as=E,this.gs=v,this.fansubSlug="",this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.cover=null,this.coverErrorText=null,this.coverLimitExceeded=null,this.cover_url="/assets/img/form/no-image.png",this.cover_url_original=null,this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsActRoute=null,this.subsFansubUpdate=null,this.subsFansubDetail=null,this.subsImgbb=null,this.subsCekFansubSlug=null,this.subsFansubMemberGet=null,this.slugInfo="",this.editable=!0,this.approvedMembers=[],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnDestroy(){var e,a,i,n,u;null===(e=this.subsActRoute)||void 0===e||e.unsubscribe(),null===(a=this.subsFansubUpdate)||void 0===a||a.unsubscribe(),null===(i=this.subsFansubDetail)||void 0===i||i.unsubscribe(),null===(n=this.subsImgbb)||void 0===n||n.unsubscribe(),null===(u=this.subsFansubMemberGet)||void 0===u||u.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Ubah Data","Halaman Pembaharuan Data Fansub","Ubah Fansub"),this.gs.isBrowser&&(this.fansubSlug=this.activatedRoute.snapshot.paramMap.get("fansubSlug"),this.bs.busy(),this.subsFansubDetail=this.fansub.getFansub(this.fansubSlug).subscribe({next:e=>{this.gs.log("[FANSUB_DETAIL_SUCCESS]",e),this.bs.idle(),this.editable=e.result.editable,this.editable?(this.bs.busy(),this.subsFansubMemberGet=this.fansub.getFansubMember(this.fansubSlug).subscribe({next:a=>{var i,n,u,d,g,f;this.gs.log("[FANSUB_EDIT_MEMBER_LIST_SUCCESS]",a),this.bs.idle(),this.approvedMembers=[];for(const v of a.results)v.approved&&this.approvedMembers.push(v);this.approvedMembers.findIndex(v=>{var F,C;return v.user_.id===(null===(C=null===(F=this.as.currentUserSubject)||void 0===F?void 0:F.value)||void 0===C?void 0:C.id)})>=0||(null===(n=null===(i=this.as.currentUserSubject)||void 0===i?void 0:i.value)||void 0===n?void 0:n.role)===T.yS.ADMIN||(null===(d=null===(u=this.as.currentUserSubject)||void 0===u?void 0:u.value)||void 0===d?void 0:d.role)===T.yS.MODERATOR||(null===(f=null===(g=this.as.currentUserSubject)||void 0===g?void 0:g.value)||void 0===f?void 0:f.id)===e.result.user_.id?this.initForm(e.result):(this.toast.warning("Harus Menjadi Anggota Untuk Mengubah Data!","Whoops!",null,!0),this.router.navigateByUrl(`/fansub/${this.fansubSlug}`))},error:a=>{this.gs.log("[FANSUB_EDIT_MEMBER_LIST_ERROR]",a,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/fansub/${this.fansubSlug}`}})}})):(this.toast.warning("Data Fansub Ini Tidak Dapat Diubah","Whoops!",null,!0),this.router.navigateByUrl(`/fansub/${this.fansubSlug}`))},error:e=>{this.gs.log("[FANSUB_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/fansub/${this.fansubSlug}`}})}}))}initForm(e){this.image_url=e.image_url,this.image_url_original=this.image_url,this.cover_url=e.cover_url,this.cover_url_original=this.cover_url;const a=e.urls,i=a.find(g=>"web"===g.name),n=a.find(g=>"facebook"===g.name),u=a.find(g=>"discord"===g.name),d=!0===e.active?"1":"0";this.fg=this.fb.group({name:[e.name,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],description:[e.description,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],born:[e.born,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],active:[d,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],slug:[{value:e.slug,disabled:e.dns_id},c.kI.compose([c.kI.required,c.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[e.tags,c.kI.compose([])],image:[null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],cover:[null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],web:[(null==i?void 0:i.url)||null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],facebook:[(null==n?void 0:n.url)||null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],discord:[(null==u?void 0:u.url)||null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],rss_feed:[e.rss_feed,c.kI.compose([c.kI.pattern(p.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,Ut.b)(500),(0,Mt.x)(),(0,It.b)(()=>this.slugInfo="Mengecek ..."),(0,kt.w)(g=>this.fansub.cekSlug({slug:g})),(0,Nt.X)(-1)).subscribe({next:g=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",g),this.slugInfo=g.result.message}})}addTag(e){const a=e.input,i=e.value;(i||"").trim()&&this.fg.value.tags.push(i.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((n,u,d)=>d.findIndex(g=>g===n)===u)),this.fg.controls.tags.markAsDirty()}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine();const i=e.target.files[0];try{const n=new FileReader;n.readAsDataURL(i),n.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),i.size<=p.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=i,this.image_url=n.result.toString()},d.src=n.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=p.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(n){this.image=null,this.image_url=this.image_url_original,this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}uploadCover(e,a){this.gambar_=a,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null),this.fg.controls.cover.markAsPristine();const i=e.target.files[0];try{const n=new FileReader;n.readAsDataURL(i),n.onload=u=>{if(this.gs.log("[COVER_SELECTED]",u),i.size<=p.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.cover=i,this.cover_url=n.result.toString()},d.src=n.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=p.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch(n){this.cover=null,this.cover_url=this.cover_url_original,this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.fg.controls.cover.markAsDirty(),this.submitted=!1},error:e=>{var a;this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.fg.controls.cover.markAsPristine(),this.submitted=!1,this.coverErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){this.bs.busy();const e=[];this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord});const a=this.gs.getDirtyValues(this.fg);if("web"in a&&delete a.web,"facebook"in a&&delete a.facebook,"discord"in a&&delete a.discord,a.urls=e,this.gs.log("[FANSUB_EDIT_DIRTY]",a),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansubUpdate=this.fansub.updateFansub(this.fansubSlug,{...a}).subscribe({next:i=>{this.gs.log("[FANSUB_EDIT_SUCCESS]",i),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl(`/fansub/${i.result.slug}`)},error:i=>{this.gs.log("[FANSUB_EDIT_ERROR]",i,"error"),this.submitted=!1,this.bs.idle()}})}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(c.qu),t.Y36(r.F0),t.Y36(O.z),t.Y36(r.gz),t.Y36(G.Z),t.Y36(yt.X),t.Y36(J.T),t.Y36(z.k),t.Y36(j.e),t.Y36(B.U))},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-fansub-edit"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"row","mb-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan"],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub"],["class","text-info",4,"ngIf"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif"],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["appearance","outline",1,"p-3","col-12","col-md-4",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["width","24px",3,"src"],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&t.YNc(0,re,8,3,"div",0),2&e&&t.Q6J("ngIf",a.fg)},directives:[m.O5,w.t,c._Y,c.JL,c.sg,M.KE,M.hX,U.Yh,$.Hw,M.R9,M.TO,I.lW,Rt.Nt,c.Fj,c.JJ,c.u,S.s6,Q.hl,Q.nW,Q.Mq,Lt.gD,Pt.ey,M.bx,N.qn,m.sg,N.HS,N.qH,N.oH,I.zs,r.yS],pipes:[Bt.$,m.uU],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),s})(),canActivate:[R.t,L.H],data:{title:"Fansub - Ubah Data",description:"Halaman Pembaharuan Data Fansub",keywords:"Ubah Fansub",[p.t.decoratorRoles]:[T.yS.ADMIN,T.yS.MODERATOR,T.yS.FANSUBBER,T.yS.USER],[p.t.decoratorVerifiedOnly]:!0}}]}];let ue=(()=>{class s{}return s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=t.oAB({type:s}),s.\u0275inj=t.cJS({imports:[[m.ez,r.Bz.forChild(le),h.m,b.L,P.$,A.P,_.m9,Z.F,c.u5,c.UX,U.Ad,S.UM,V.b,x.T,W.d]]}),s})()},7567:(y,D,o)=>{o.d(D,{Q:()=>L});var m=o(1125),r=o(5e3),c=o(8696),S=o(9808),_=o(7238),U=o(5245);function p(h,x){if(1&h&&r._UZ(0,"h3",8),2&h){const b=r.oxw().$implicit;r.Q6J("innerHTML",b.text,r.oJD)}}function T(h,x){if(1&h&&(r.TgZ(0,"mat-expansion-panel",3)(1,"mat-expansion-panel-header")(2,"mat-panel-title",4)(3,"span",5),r._uU(4),r.qZA()(),r.TgZ(5,"mat-panel-description")(6,"mat-icon",6),r._uU(7),r.qZA()()(),r.YNc(8,p,1,1,"ng-template",7),r.qZA()),2&h){const b=x.$implicit,A=x.first,Z=r.oxw(2);r.Q6J("expanded",Z.GS.isDesktop&&A),r.xp6(3),r.s9C("matTooltip",b.tooltip),r.Q6J("matTooltipPosition","above"),r.xp6(1),r.hij(" ",b.title," "),r.xp6(3),r.Oqu(b.icon)}}function R(h,x){if(1&h&&(r.TgZ(0,"mat-accordion",1),r.YNc(1,T,9,5,"mat-expansion-panel",2),r.qZA()),2&h){const b=r.oxw();r.xp6(1),r.Q6J("ngForOf",b.panelData)}}let L=(()=>{class h{constructor(b){this.gs=b,this.panelData=[{title:"Title",icon:"warning",text:"Lorem ipsum ...",tooltip:"Info"}]}onResize(b){this.gs.onResize(b,"MATERIAL_EXPANSION_PANEL"),this.gs.isDesktop?this.accordion.openAll():this.accordion.closeAll()}get GS(){return this.gs}ngOnInit(){}}return h.\u0275fac=function(b){return new(b||h)(r.Y36(c.U))},h.\u0275cmp=r.Xpm({type:h,selectors:[["app-material-expansion-panel"]],viewQuery:function(b,A){if(1&b&&r.Gf(m.pp,5),2&b){let Z;r.iGM(Z=r.CRH())&&(A.accordion=Z.first)}},hostBindings:function(b,A){1&b&&r.NdJ("resize",function(P){return A.onResize(P)},!1,r.Jf7)},inputs:{panelData:"panelData"},decls:1,vars:1,consts:[["class","example-headers-align","multi","",4,"ngIf"],["multi","",1,"example-headers-align"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],[1,"font-weight-bold"],[3,"matTooltip","matTooltipPosition"],[1,"ms-auto"],["matExpansionPanelContent",""],[1,"m-0","text-justify",2,"white-space","pre-line !important",3,"innerHTML"]],template:function(b,A){1&b&&r.YNc(0,R,2,1,"mat-accordion",0),2&b&&r.Q6J("ngIf",A.panelData.length>0)},directives:[S.O5,m.pp,S.sg,m.ib,m.yz,m.yK,_.gM,m.u4,U.Hw,m.HS],styles:[""]}),h})()},6020:(y,D,o)=>{o.d(D,{$:()=>S});var m=o(9808),r=o(210),c=o(5e3);let S=(()=>{class _{}return _.\u0275fac=function(p){return new(p||_)},_.\u0275mod=c.oAB({type:_}),_.\u0275inj=c.cJS({imports:[[m.ez,r.m]]}),_})()},7623:(y,D,o)=>{o.d(D,{Q:()=>m});var m=(()=>{return(r=m||(m={})).BIRU="#7289DA",r.UNGU="#3F51B5",r.HITAM="#343A40",r.ABU="#A9A9A9",r.MERAH="#DC3545",r.PINK="#FF4081",r.OREN="#F44336",r.KUNING="#FFC107",r.HIJAU="#28A745",m;var r})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/478.26cffe3526b42d61.js b/dist/fansubid/browser/478.26cffe3526b42d61.js deleted file mode 100644 index 3ac0947dd..000000000 --- a/dist/fansubid/browser/478.26cffe3526b42d61.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[478],{8478:(y,D,o)=>{o.r(D),o.d(D,{FansubModule:()=>ue});var m=o(9808),r=o(8406),c=o(3075),S=o(9345),_=o(9215),U=o(1385),p=o(6271),T=o(4249),R=o(2777),L=o(5094),h=o(210),x=o(7355),b=o(6436),A=o(4946),Z=o(8613),P=o(6020),V=o(4167),W=o(2438),t=o(5e3),B=o(8696),O=o(3e3),Y=o(6382),J=o(6781),H=o(8020),w=o(8616),K=o(8757);function X(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.barChartAnimeData)("labels",e.barChartAnimeLabels)("chartType",e.barChartType)("options",e.barChartAnimeOptions)("plugins",e.chartPlugins)("legend",!1)}}function tt(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.barChartDoramaData)("labels",e.barChartDoramaLabels)("chartType",e.barChartType)("options",e.barChartDoramaOptions)("plugins",e.chartPlugins)("legend",!1)}}function et(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.pieChartStatusData)("labels",e.pieChartStatusLabels)("chartType",e.pieChartType)("options",e.pieChartStatusOptions)("plugins",e.chartPlugins)("legend",!0)}}function it(s,l){if(1&s&&(t.TgZ(0,"div",5),t._UZ(1,"canvas",6),t.qZA()),2&s){const e=t.oxw();t.xp6(1),t.Q6J("data",e.doughnutChartGarapanData)("labels",e.doughnutChartGarapanLabels)("chartType",e.doughnutChartType)("options",e.doughnutChartGarapanOptions)("plugins",e.chartPlugins)("legend",!0)}}let at=(()=>{class s{constructor(e,a,i,n,u,d){this.router=e,this.gs=a,this.bs=i,this.fs=n,this.fansub=u,this.wb=d,this.allFansubId=[],this.fansubData=[],this.tabData=[{name:"Katalog Fansub",icon:"closed_caption",type:"table",data:{column:["Status","Logo","Nama Fansub","Anime","Dorama","Tautan Komunitas"],row:[]}}],this.pieChartStatusOptions={title:{display:!0,text:"Kondisi Fansub Terkini"},responsive:!0,legend:{position:"right"}},this.doughnutChartGarapanOptions={title:{display:!0,text:"Total Garapan Fansub"},responsive:!0,legend:{position:"right"}},this.barChartAnimeOptions={title:{display:!0,text:"Garapan Anime Terbanyak"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}]}},this.barChartDoramaOptions={title:{display:!0,text:"Garapan Dorama Terbanyak"},responsive:!0,legend:{position:"right"},scales:{xAxes:[{ticks:{beginAtZero:!0},gridLines:{color:"rgba(92,92,92,1)"}}],yAxes:[{gridLines:{color:"rgba(92,92,92,1)"}}]}},this.chartPlugins=[],this.pieChartStatusData=[],this.pieChartStatusLabels=[],this.doughnutChartGarapanData=[],this.doughnutChartGarapanLabels=[],this.barChartAnimeData=[],this.barChartAnimeLabels=[],this.barChartDoramaData=[],this.barChartDoramaLabels=[],this.pieChartType="pie",this.doughnutChartType="doughnut",this.barChartType="horizontalBar",this.fansubActive=0,this.fansubInActive=0,this.subsFansub=null,this.subsAnime=null,this.subsDorama=null,this.gs.bannerImg="/assets/img/banner/fansub.png",this.gs.sizeContain=!1,this.gs.bgRepeat=!1,this.gs.isBrowser&&((0,_.Dy)(),(0,_.bF)())}ngOnDestroy(){var e,a;null===(e=this.subsFansub)||void 0===e||e.unsubscribe(),null===(a=this.subsAnime)||void 0===a||a.unsubscribe()}ngOnInit(){this.gs.isBrowser&&this.getFansubData()}getFansubData(){this.bs.busy(),this.subsFansub=this.fansub.getAllFansub().subscribe({next:e=>{this.gs.log("[FANSUB_LIST_SUCCESS]",e);for(const a of e.results){this.allFansubId.push(a.id);const i=[];if(Array.isArray(a.urls))for(const n of a.urls)i.push({type:"button",icon:"discord"===n.name?void 0:n.name,image:"discord"===n.name?"/assets/img/discord/blue.png":void 0,url:n.url,name:n.name});this.fansubData.push({id:a.id,slug:a.slug,Logo:a.image_url,Status:a.active?"AKTIF":"TIDAK AKTIF","Nama Fansub":a.name,"Tautan Komunitas":i}),a.active?this.fansubActive++:a.active||this.fansubInActive++}this.pieChartStatusLabels=["Fansub Aktif","Fansub Tidak Aktif"],this.pieChartStatusData=[this.fansubActive,this.fansubInActive],this.tabData[0].data.row=this.fansubData,this.getAnimeFansub(),this.getDoramaFansub(),this.fs.initializeFab("add",null,"Tambahkan Fansub Baru","/create/fansub",!1),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_LIST_ERROR]",e,"error"),this.bs.idle()}})}getAnimeFansub(){this.bs.busy(),this.subsAnime=this.fansub.getAnimeFansub(this.allFansubId).subscribe({next:e=>{this.gs.log("[FANSUB_ANIME_SUCCESS]",e);for(const i of this.fansubData)i.Anime=e.results[i.id];this.doughnutChartGarapanLabels.push("Berkas Anime"),this.doughnutChartGarapanData.push(e.count);const a=[...this.fansubData].sort((i,n)=>n.Anime-i.Anime).slice(0,10);for(const i of a)this.barChartAnimeLabels.push(i["Nama Fansub"]),this.barChartAnimeData.push(i.Anime);this.bs.idle()},error:e=>{this.gs.log("[FANSUB_ANIME_ERROR]",e,"error"),this.bs.idle()}})}getDoramaFansub(){this.bs.busy(),this.subsDorama=this.fansub.getDoramaFansub(this.allFansubId).subscribe({next:e=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",e);for(const i of this.fansubData)i.Dorama=e.results[i.id];this.doughnutChartGarapanLabels.push("Berkas Dorama"),this.doughnutChartGarapanData.push(e.count);const a=[...this.fansubData].sort((i,n)=>n.Dorama-i.Dorama).slice(0,10);for(const i of a)this.barChartDoramaLabels.push(i["Nama Fansub"]),this.barChartDoramaData.push(i.Dorama);this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DORAMA_ERROR]",e,"error"),this.bs.idle()}})}openFansub(e){this.gs.log("[FANSUB_LIST_OPEN_FANSUB]",e),this.router.navigateByUrl(`/fansub/${e.slug}`)}openUrl(e){this.gs.log("[FANSUB_LIST_OPEN_URL]",e),this.wb.winboxOpenUri(e.url)}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(r.F0),t.Y36(B.U),t.Y36(O.z),t.Y36(Y.r),t.Y36(J.T),t.Y36(H.N))},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-fansub-list"]],decls:9,vars:5,consts:[[1,"container"],[1,"row","p-3"],["class","col-12 col-md-6 py-1 bg-bifeldy",4,"ngIf"],[1,"row","pt-3"],[3,"tabData","tableRowClicked","buttonClicked"],[1,"col-12","col-md-6","py-1","bg-bifeldy"],["baseChart","",3,"data","labels","chartType","options","plugins","legend"]],template:function(e,a){1&e&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1),t.YNc(3,X,2,6,"div",2),t.YNc(4,tt,2,6,"div",2),t.YNc(5,et,2,6,"div",2),t.YNc(6,it,2,6,"div",2),t.qZA(),t.TgZ(7,"div",3)(8,"app-material-tab",4),t.NdJ("tableRowClicked",function(n){return a.openFansub(n)})("buttonClicked",function(n){return a.openUrl(n)}),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ngIf",a.barChartAnimeData.length>0&&a.barChartAnimeLabels.length>0),t.xp6(1),t.Q6J("ngIf",a.barChartDoramaData.length>0&&a.barChartDoramaLabels.length>0),t.xp6(1),t.Q6J("ngIf",2===a.pieChartStatusData.length&&2===a.pieChartStatusLabels.length),t.xp6(1),t.Q6J("ngIf",2===a.doughnutChartGarapanData.length&&2===a.doughnutChartGarapanLabels.length),t.xp6(2),t.Q6J("tabData",a.tabData))},directives:[w.t,m.O5,_.jh,K.H],styles:[""]}),s})();var st=o(5934),nt=o(7623),j=o(4137),ot=o(7845),G=o(8745),rt=o(8381),z=o(6925),I=o(7423),lt=o(7238),$=o(5245),ut=o(192),k=o(4623),ct=o(4028),dt=o(7567),gt=o(325),mt=o(6766);function bt(s,l){if(1&s&&(t.TgZ(0,"div",8)(1,"a",34)(2,"mat-icon",10),t._uU(3,"facebook"),t.qZA(),t._uU(4," Facebook Fanpage "),t.qZA()()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("href",e.getUrlByName("facebook"),t.LSH)}}function pt(s,l){if(1&s&&(t.TgZ(0,"div",8)(1,"a",35),t._UZ(2,"img",36),t._uU(3," Ruang Obrolan Discord "),t.qZA()()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("href",e.getUrlByName("discord"),t.LSH)}}function ht(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"a",37),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).joinLeaveMember()}),t._uU(1),t.qZA()}if(2&s){const e=t.oxw(2);t.xp6(1),t.hij(" ",e.joinedAsMember?"Keluar":"Gabung"," ")}}function _t(s,l){1&s&&t._UZ(0,"app-no-data")}function ft(s,l){if(1&s&&(t.TgZ(0,"mat-list-option",40),t._UZ(1,"img",41),t.TgZ(2,"a",42)(3,"span",43),t._uU(4),t.qZA(),t.TgZ(5,"span",44),t._uU(6),t.qZA()()()),2&s){const e=l.$implicit;t.MGl("routerLink","/user/",e.user_.username,""),t.xp6(1),t.s9C("src",e.user_.image_url,t.LSH),t.xp6(3),t.hij(" ",e.keterangan," "),t.xp6(2),t.Oqu(e.user_.username)}}function vt(s,l){if(1&s&&(t.TgZ(0,"mat-selection-list",38),t.YNc(1,ft,7,4,"mat-list-option",39),t.qZA()),2&s){const e=t.oxw(2);t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.approvedMembers)}}function xt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"mat-list-option",46),t._UZ(1,"img",41),t.TgZ(2,"a",42)(3,"span",47)(4,"small",48),t.NdJ("click",function(){const n=t.CHM(e).$implicit;return t.oxw(3).approveMember(n)}),t._uU(5," Terima "),t.qZA(),t._uU(6," | "),t.TgZ(7,"small",49),t.NdJ("click",function(){const n=t.CHM(e).$implicit;return t.oxw(3).rejectMember(n)}),t._uU(8," Tolak "),t.qZA()(),t.TgZ(9,"span",50),t._uU(10),t.qZA()()()}if(2&s){const e=l.$implicit;t.xp6(1),t.s9C("src",e.user_.image_url,t.LSH),t.xp6(8),t.MGl("routerLink","/user/",e.user_.username,""),t.xp6(1),t.hij(" ",e.user_.username," ")}}function Tt(s,l){if(1&s&&(t.TgZ(0,"mat-selection-list",38),t.YNc(1,xt,11,3,"mat-list-option",45),t.qZA()),2&s){const e=t.oxw(2);t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",e.pendingMembers)}}function At(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",8)(1,"button",51),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).getSubDomain()}),t.TgZ(2,"mat-icon",10),t._uU(3,"dns"),t.qZA(),t._uU(4),t.qZA()()}if(2&s){const e=t.oxw(2);t.xp6(4),t.AsE(" 'https://",e.fansubData.slug,".",e.ENV.domain,"' ")}}function Ft(s,l){if(1&s&&(t.TgZ(0,"div",14),t._UZ(1,"app-material-expansion-panel",52),t.qZA()),2&s){const e=t.oxw(2);t.xp6(1),t.Q6J("panelData",e.panelData)}}function Ct(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"mat-list-option",46)(1,"mat-icon",57),t._uU(2,"rss_feed"),t.qZA(),t.TgZ(3,"a",58),t.NdJ("click",function(){const n=t.CHM(e).$implicit;return t.oxw(3).openRssFeed(n.link)}),t.TgZ(4,"span",59),t._uU(5),t.ALo(6,"dateAgo"),t.qZA(),t._UZ(7,"span",60),t.qZA()()}if(2&s){const e=l.$implicit;t.xp6(5),t.Oqu(t.lcZ(6,2,e.created||e.published)),t.xp6(2),t.Q6J("innerHtml",e.title,t.oJD)}}function Dt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",14)(1,"div",53)(2,"h2",54)(3,"span",55),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).getRssFeed()}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",56),t._uU(6,"RSS Feed Fansub"),t.qZA()()(),t.TgZ(7,"div",6)(8,"mat-selection-list",38),t.YNc(9,Ct,8,4,"mat-list-option",45),t.ALo(10,"slice"),t.qZA()()()}if(2&s){const e=t.oxw(2);t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,2,e.rssFeedData.items,0,5))}}function Et(s,l){1&s&&(t.TgZ(0,"div",14)(1,"div",6),t._UZ(2,"app-report"),t.qZA()())}function St(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),t._UZ(6,"img",7),t.qZA(),t.TgZ(7,"div",8)(8,"button",9)(9,"mat-icon",10),t._uU(10,"calendar_today"),t.qZA(),t._uU(11),t.ALo(12,"date"),t.qZA(),t.TgZ(13,"button",11)(14,"mat-icon",10),t._uU(15,"history"),t.qZA(),t._uU(16),t.qZA()(),t.YNc(17,bt,5,1,"div",12),t.YNc(18,pt,4,1,"div",12),t.TgZ(19,"div",8)(20,"button",13),t.NdJ("click",function(){return t.CHM(e),t.oxw().editFansubData()}),t.TgZ(21,"mat-icon",10),t._uU(22,"edit"),t.qZA(),t._uU(23," Perbaharui Informasi "),t.qZA()(),t.TgZ(24,"div",6)(25,"div",14)(26,"div",15)(27,"h2",16),t.YNc(28,ht,2,1,"a",17),t.TgZ(29,"b",18),t._uU(30),t.qZA()()(),t.TgZ(31,"div",19)(32,"div",20),t.YNc(33,_t,1,0,"app-no-data",21),t.YNc(34,vt,2,2,"mat-selection-list",22),t.YNc(35,Tt,2,2,"mat-selection-list",22),t.qZA()(),t.TgZ(36,"div",8)(37,"button",23),t.NdJ("click",function(){return t.CHM(e),t.oxw().togglePendingMembers()}),t.TgZ(38,"mat-icon",10),t._uU(39,"manage_accounts"),t.qZA(),t._uU(40),t.qZA()()()(),t.YNc(41,At,5,2,"div",12),t.qZA()(),t.TgZ(42,"div",24)(43,"div",25)(44,"h1",26)(45,"b"),t._uU(46),t.qZA()()(),t.TgZ(47,"div",14)(48,"app-material-chip",27),t.NdJ("chipClicked",function(i){return t.CHM(e),t.oxw().openTag(i)}),t.qZA()(),t.TgZ(49,"div",28),t._UZ(50,"app-notifications",29),t.qZA(),t.YNc(51,Ft,2,1,"div",30),t.YNc(52,Dt,11,6,"div",30),t.YNc(53,Et,3,0,"div",30),t.TgZ(54,"div",14)(55,"div",6)(56,"app-material-tab",31),t.NdJ("listClicked",function(i){return t.CHM(e),t.oxw().openAnime(i)})("gridClicked",function(i){return t.CHM(e),t.oxw().openDorama(i)})("tableRowClicked",function(i){return t.CHM(e),t.oxw().openFile(i)})("paginatorClicked",function(i){return t.CHM(e),t.oxw().onPaginatorClicked(i)})("serverSideFilter",function(i){return t.CHM(e),t.oxw().onServerSideFilter(i)})("serverSideOrder",function(i){return t.CHM(e),t.oxw().onServerSideOrder(i)})("gridLoadNextPage",function(){return t.CHM(e),t.oxw().onDoramaLoadNextPage()})("listLoadNextPage",function(){return t.CHM(e),t.oxw().onAnimeLoadNextPage()}),t.qZA()()()()()(),t._UZ(57,"div",32)(58,"div",33),t.qZA()}if(2&s){const e=t.oxw();t.xp6(6),t.Q6J("src",e.fansubData.image_url,t.LSH),t.xp6(5),t.hij(" ",t.xi3(12,25,e.fansubData.born,"d MMMM y")," "),t.xp6(5),t.hij(" ",e.fansubData.active?"Aktif":"Tidak Aktif"," "),t.xp6(1),t.Q6J("ngIf",e.getUrlByName("facebook")),t.xp6(1),t.Q6J("ngIf",e.getUrlByName("discord")),t.xp6(2),t.s9C("matTooltip",e.fansubData.user_?"Terakhir Di Ubah Oleh :: "+e.fansubData.user_.username:"Perbaharui Data Fansub"),t.xp6(8),t.Q6J("ngIf",!e.showPendingMember),t.xp6(2),t.hij(" ",e.showPendingMember?"Permintaan Gabung":"Anggota"," "),t.xp6(3),t.Q6J("ngIf",!e.showPendingMember&&e.approvedMembers.length<=0||e.showPendingMember&&e.pendingMembers.length<=0),t.xp6(1),t.Q6J("ngIf",!e.showPendingMember&&e.approvedMembers.length>0),t.xp6(1),t.Q6J("ngIf",e.showPendingMember&&e.pendingMembers.length>0),t.xp6(5),t.hij(" Lihat ",e.showPendingMember?"Anggota":"Permintaan Gabung"," "),t.xp6(1),t.Q6J("ngIf",!e.fansubData.dns_id),t.xp6(5),t.Oqu(e.fansubData.name),t.xp6(2),t.Q6J("chipData",e.chipData),t.xp6(3),t.Q6J("ngIf",e.panelData.length>0),t.xp6(1),t.Q6J("ngIf",(null==e.rssFeedData?null:e.rssFeedData.items.length)>0&&"null"!==e.fansubSlug),t.xp6(1),t.Q6J("ngIf",null==e.SS.mySocket?null:e.SS.mySocket.id),t.xp6(3),t.Q6J("tabData",e.tabData)("count",e.count)("serverSide",!0)("gridPageFinished",e.doramaPageFinished)("listPageFinished",e.animePageFinished),t.xp6(1),t.Udp("background-image","url("+e.fansubData.cover_url+")")}}let Zt=(()=>{class s{constructor(e,a,i,n,u,d,g,f,E,v,F,C){this.activatedRoute=e,this.router=a,this.bs=i,this.as=n,this.ds=u,this.gs=d,this.fs=g,this.pi=f,this.fansub=E,this.ss=v,this.toast=F,this.wb=C,this.fansubSlug="",this.fansubData=null,this.rssFeedData=null,this.approvedMembers=[],this.pendingMembers=[],this.joinedAsMember=null,this.showPendingMember=!1,this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.animeFansub=[],this.doramaFansub=[],this.berkasFansub=[],this.animePageFinished=!1,this.doramaPageFinished=!1,this.animePage=1,this.doramaPage=1,this.chipData=[],this.panelData=[],this.tabData=[{name:"Anime",icon:"live_tv",type:"list",data:[]},{name:"Dorama",icon:"movie",type:"grid",data:[]},{name:"Berkas Terkait",icon:"file_copy",type:"table",data:{column:["Tanggal","Nama Berkas","Pemilik"],row:[]}}],this.subsActRoute=null,this.subsFansub=null,this.subsBerkas=null,this.subsAnime=null,this.subsDorama=null,this.subsParam=null,this.subsRssFeed=null,this.subsFansubMemberGet=null,this.subsFansubMemberJoin=null,this.subsFansubMemberApproveReject=null,this.subsFansubMemberLeave=null,this.subsDialog=null,this.subsClaimSubDomain=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get SS(){return this.ss}get ENV(){return st.N}ngOnDestroy(){var e,a,i,n,u,d,g,f,E,v,F,C,q;null===(e=this.subsActRoute)||void 0===e||e.unsubscribe(),null===(a=this.subsFansub)||void 0===a||a.unsubscribe(),null===(i=this.subsBerkas)||void 0===i||i.unsubscribe(),null===(n=this.subsAnime)||void 0===n||n.unsubscribe(),null===(u=this.subsDorama)||void 0===u||u.unsubscribe(),null===(d=this.subsParam)||void 0===d||d.unsubscribe(),null===(g=this.subsRssFeed)||void 0===g||g.unsubscribe(),null===(f=this.subsFansubMemberGet)||void 0===f||f.unsubscribe(),null===(E=this.subsFansubMemberJoin)||void 0===E||E.unsubscribe(),null===(v=this.subsFansubMemberApproveReject)||void 0===v||v.unsubscribe(),null===(F=this.subsFansubMemberLeave)||void 0===F||F.unsubscribe(),null===(C=this.subsDialog)||void 0===C||C.unsubscribe(),null===(q=this.subsClaimSubDomain)||void 0===q||q.unsubscribe()}ngOnInit(){this.subsParam=this.activatedRoute.params.subscribe({next:e=>{this.fansubSlug=e.fansubSlug,this.getFansubDetail()}})}getFansubDetail(){this.bs.busy(),this.subsFansub=this.fansub.getFansub(this.fansubSlug).subscribe({next:e=>{if(this.gs.log("[FANSUB_DETAIL_SUCCESS]",e),this.fansubData=e.result,this.pi.updatePageMetaData(`${this.fansubData.name}`,`${this.fansubData.description}`,`${Array.isArray(this.fansubData.tags)?this.fansubData.tags.join(", "):this.fansubData.name}`,this.fansubData.image_url,this.fansubData.user_.username),this.bs.idle(),this.gs.isBrowser){if(Array.isArray(this.fansubData.tags))for(let i=0;i{this.gs.log("[FANSUB_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:"/fansub"}})}})}getUrlByName(e){const a=this.fansubData.urls.find(i=>i.name===e);return a?a.url:null}getRssFeed(){this.bs.busy(),this.subsRssFeed=this.fansub.getRssFeedFansub(this.fansubSlug).subscribe({next:e=>{this.gs.log("[RSS_FEED_LIST_SUCCESS]",e),this.rssFeedData=e.result,this.bs.idle()},error:e=>{this.gs.log("[RSS_FEED_LIST_ERROR]",e,"error"),this.bs.idle()}})}openRssFeed(e){this.wb.winboxOpenUri(this.gs.rssLink(e))}getBerkasFansub(){this.bs.busy(),this.subsBerkas=this.fansub.getBerkasFansub([this.fansubData.id],this.q,this.page,this.row,this.sort,this.order).subscribe({next:e=>{this.gs.log("[BERKAS_ANIME_SUCCESS]",e),this.count=e.count,this.berkasFansub=[];for(const a of e.results[this.fansubData.id])this.berkasFansub.push({id:a.id,private:a.private,foto:a.user_.image_url,Pemilik:a.user_.username,Tanggal:a.created_at,"Nama Berkas":a.name});this.tabData[2].data.row=this.berkasFansub,this.bs.idle()},error:e=>{this.gs.log("[BERKAS_FANSUB_ERROR]",e,"error"),this.bs.idle()}})}getAnimeFansub(){this.bs.busy(),this.subsAnime=this.fansub.getAnimeFansub([this.fansubData.id],this.animePage).subscribe({next:e=>{this.gs.log("[FANSUB_ANIME_SUCCESS]",e);for(const a of e.results[this.fansubData.id])this.animeFansub.push({id:a.id,image:a.image_url,title:a.name});this.tabData[0].data=this.animeFansub,e.results[this.fansubData.id].length<=0&&(this.animePageFinished=!0),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_ANIME_ERROR]",e,"error"),this.bs.idle()}})}getDoramaFansub(){this.bs.busy(),this.subsDorama=this.fansub.getDoramaFansub([this.fansubData.id],this.doramaPage).subscribe({next:e=>{this.gs.log("[FANSUB_DORAMA_SUCCESS]",e);for(const a of e.results[this.fansubData.id])this.doramaFansub.push({id:a.id,image:a.image_url,title:a.name,slug:a.slug});this.tabData[1].data=this.doramaFansub,e.results[this.fansubData.id].length<=0&&(this.doramaPageFinished=!0),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DORAMA_ERROR]",e,"error"),this.bs.idle()}})}editFansubData(){this.router.navigateByUrl(`/fansub/${this.fansubSlug}/edit`)}onServerSideFilter(e){this.gs.log("[BERKAS_FANSUB_ENTER_FILTER]",e),this.q=e,this.getBerkasFansub()}onServerSideOrder(e){this.gs.log("[BERKAS_FANSUB_CLICK_ORDER]",e),this.q=e.q,this.sort=e.active,this.order=e.direction,this.getBerkasFansub()}onPaginatorClicked(e){this.gs.log("[FANSUB_DETAIL_CLICK_PAGINATOR]",e),this.page=e.pageIndex+1,this.row=e.pageSize,this.getBerkasFansub()}openFile(e){this.gs.log("[FANSUB_DETAIL_OPEN_FILE]",e),this.router.navigateByUrl(`/berkas/${e.id}`)}openAnime(e){this.gs.log("[FANSUB_DETAIL_OPEN_ANIME]",e);const a=e.title.replace(/[^a-zA-Z0-9]/g,"-");this.router.navigateByUrl(`/anime/${e.id}-${a}`)}openDorama(e){this.gs.log("[FANSUB_DETAIL_OPEN_DORAMA]",e),this.router.navigateByUrl(`/dorama/${e.slug}`)}openTag(e){this.gs.log("[FANSUB_DETAIL_OPEN_TAG]",e)}onAnimeLoadNextPage(){this.animePageFinished||(this.animePage++,this.getAnimeFansub())}onDoramaLoadNextPage(){this.doramaPageFinished||(this.doramaPage++,this.getDoramaFansub())}togglePendingMembers(){this.showPendingMember=!this.showPendingMember,this.getFansubMember()}getFansubMember(){this.bs.busy(),this.subsFansubMemberGet=this.fansub.getFansubMember(this.fansubSlug).subscribe({next:e=>{var a;this.gs.log("[FANSUB_DETAIL_MEMBER_LIST_SUCCESS]",e),this.approvedMembers=[],this.pendingMembers=[];for(const i of e.results)i.approved?this.approvedMembers.push(i):this.pendingMembers.push(i);if(null===(a=this.as.currentUserSubject)||void 0===a?void 0:a.value){const i=this.approvedMembers.findIndex(n=>{var u,d;return n.user_.id===(null===(d=null===(u=this.as.currentUserSubject)||void 0===u?void 0:u.value)||void 0===d?void 0:d.id)});this.joinedAsMember=i>=0?this.approvedMembers[i]:null}this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_LIST_ERROR]",e,"error"),this.bs.idle()}})}joinLeaveMember(){this.bs.busy(),this.joinedAsMember?this.subsFansubMemberLeave=this.fansub.leaveFansubMember(this.joinedAsMember.id).subscribe({next:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_LEAVE_SUCCESS]",e),this.getFansubMember(),this.bs.idle()},error:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_LEAVE_ERROR]",e,"error"),this.getFansubMember(),this.bs.idle()}}):this.subsFansubMemberJoin=this.fansub.requestJoinFansubMember({slug:this.fansubSlug}).subscribe({next:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_JOIN_SUCCESS]",e),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:"Permintaan Gabung Berhasil",htmlMessage:"Silahkan Menghubungi Anggota Yang Sudah Tergabung / Admin / Moderator Fansub Untuk Menerima Permintaan Gabung.",confirmText:"Tutup"}}).afterClosed().subscribe({next:a=>{this.gs.log("[INFO_DIALOG_CLOSED]",a),this.getFansubMember(),this.subsDialog.unsubscribe()}})},error:e=>{this.gs.log("[FANSUB_DETAIL_MEMBER_JOIN_ERROR]",e,"error"),this.getFansubMember(),this.bs.idle()}})}approveOrRejectFansubMember(e,a){this.subsDialog=this.ds.openInputDialog({data:{title:`Keterangan ${a?"Approve":"Reject"} '${e.user_.username}' :: '${e.fansub_.slug}'`,input:{keterangan:{inputLabel:"Keterangan",inputPlaceholder:"Pemilik, Translator, Timer, QA / QC, TypeSetter, dll.",inputValue:null,inputRequired:!0}},confirmText:"OK",cancelText:"Batal",infoText:"Max. 10 Huruf"}}).afterClosed().subscribe({next:i=>{var n;this.gs.log("[INPUT_DIALOG_CLOSED]",i),i?(this.bs.busy(),this.subsFansubMemberApproveReject=this.fansub.approveRejectFansubMember(e.id,{approved:a,keterangan:null===(n=i.keterangan)||void 0===n?void 0:n.substring(0,10)}).subscribe({next:u=>{this.gs.log("[FANSUB_DETAIL_MEMBER_APPROVE_REJECT_SUCCESS]",u),this.getFansubMember(),this.bs.idle()},error:u=>{this.gs.log("[FANSUB_DETAIL_MEMBER_APPROVE_REJECT_ERROR]",u,"error"),this.getFansubMember(),this.bs.idle()}})):!1===i&&this.getFansubMember(),this.subsDialog.unsubscribe()}})}approveMember(e){this.approveOrRejectFansubMember(e,!0)}rejectMember(e){this.approveOrRejectFansubMember(e,!1)}getSubDomain(){var e,a,i,n,u;(null===(e=this.as.currentUserSubject)||void 0===e?void 0:e.value)?this.joinedAsMember||(null===(i=null===(a=this.as.currentUserSubject)||void 0===a?void 0:a.value)||void 0===i?void 0:i.role)===T.yS.ADMIN||(null===(u=null===(n=this.as.currentUserSubject)||void 0===n?void 0:n.value)||void 0===u?void 0:u.role)===T.yS.MODERATOR?this.subsDialog=this.ds.openInputDialog({data:{title:`Buat CNAME / A Record IP v4 v6 :: '${this.fansubSlug}'`,input:{server_target:{inputLabel:"Server Target",inputPlaceholder:"ghs.google.com",inputValue:null,inputRequired:!0},verification_name:{inputLabel:"Tambahan Khusus Blogger :: Name",inputPlaceholder:"blablabla-name",inputValue:null,inputRequired:!1},verification_target:{inputLabel:"Tambahan Khusus Blogger :: Target",inputPlaceholder:"blablabla-target.dv.googlehosted.com",inputValue:null,inputRequired:!1}},confirmText:"OK",cancelText:"Batal",infoText:"Abaikan 2 Input Terakhir Jika Bukan Blogger"}}).afterClosed().subscribe({next:d=>{this.gs.log("[INPUT_DIALOG_CLOSED]",d),d&&(this.bs.busy(),this.subsClaimSubDomain=this.fansub.claimSubDomain({slug:this.fansubSlug,server_target:d.server_target,verification_name:d.verification_name,verification_target:d.verification_target}).subscribe({next:g=>{this.gs.log("[FANSUB_CLAIM_SUBDOMAIN_SUCCESS]",g),this.bs.idle(),this.subsDialog=this.ds.openInfoDialog({data:{title:"Klaim Berhasil",htmlMessage:`\n Domain '${this.fansubSlug}.${this.ENV.domain}' Sudah Didaftarkan Dan Dapat Digunakan,\n Silahkan Migrasi Domain Pada Situs Penyedia Layanan (Ex. Blogger / Wordpress / Etc.)\n Kemudian Tunggu Hingga Propagasi Dns Selesai.\n Terima Kasih.\n `,confirmText:"Tutup"}}).afterClosed().subscribe({next:f=>{this.gs.log("[INFO_DIALOG_CLOSED]",f),this.getFansubDetail(),this.subsDialog.unsubscribe()}})},error:g=>{this.gs.log("[FANSUB_CLAIM_SUBDOMAIN_ERROR]",g,"error"),this.bs.idle(),this.getFansubDetail()}})),this.subsDialog.unsubscribe()}}):this.toast.warning("Harus Menjadi Anggota Untuk Klaim Sub-Domain!","Whoops!",null,!0):this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url}})}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(r.gz),t.Y36(r.F0),t.Y36(O.z),t.Y36(j.e),t.Y36(ot.x),t.Y36(B.U),t.Y36(Y.r),t.Y36(G.Z),t.Y36(J.T),t.Y36(rt.R),t.Y36(z.k),t.Y36(H.N))},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-fansub-detail"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-info","align-items-center"],[1,"media","row","py-3","px-2"],[1,"col-md-4","col-xl-3","px-3"],[1,"row","sticky-top","pt-3"],[1,"col-12"],[1,"w-100",3,"src"],[1,"col-12","text-center","pt-3"],["mat-button","","color","warn","matTooltip","Berdiri Sejak",1,"w-100"],[1,"me-1"],["mat-button","","color","accent","matTooltip","Status Fansub",1,"w-100"],["class","col-12 text-center pt-3",4,"ngIf"],["mat-button","",1,"w-100","text-success",2,"color","rgb(255, 64, 129) !important",3,"matTooltip","click"],[1,"row","py-3"],[1,"col-12","pt-3","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],["class","float-end text-decoration-none text-warning","style","font-size: small; cursor: pointer;",3,"click",4,"ngIf"],["matTooltip","Lihat Permintaan Gabung Keanggotaan",1,"text-bifeldy",2,"cursor","pointer"],[1,"col-12",2,"max-height","288px"],[1,"h-100",2,"overflow-y","auto"],[4,"ngIf"],[3,"multiple",4,"ngIf"],["mat-button","","color","accent",1,"w-100",3,"click"],[1,"col-md-8","col-xl-9","pt-3"],[1,"row","py-3","px-0","mt-auto"],[1,"m-0"],[3,"chipData","chipClicked"],[1,"row"],[1,"px-0"],["class","row py-3",4,"ngIf"],[3,"tabData","count","serverSide","gridPageFinished","listPageFinished","listClicked","gridClicked","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder","gridLoadNextPage","listLoadNextPage"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],["mat-stroked-button","","matTooltip","Kunjungi Halaman Fanpage",1,"w-100",2,"color","rgb(114, 137, 218)",3,"href"],["mat-stroked-button","","matTooltip","Kunjungi Ruang Obrolan",1,"w-100",2,"color","rgb(114, 137, 218)",3,"href"],["src","/assets/img/discord/blue.png","width","24px"],[1,"float-end","text-decoration-none","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"text-success"],["class","h-100",4,"ngFor","ngForOf"],[1,"h-100"],[1,"bg-bifeldy","px-2","me-1",2,"position","absolute","right","0"],[1,"text-success",2,"cursor","pointer",3,"click"],[1,"text-danger",2,"cursor","pointer",3,"click"],[1,"text-warning",3,"routerLink"],["mat-button","","color","accent","matTooltip","Ambil / Klaim / Dapatkan Sub-Domain Ini",1,"w-100",3,"click"],[3,"panelData"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],["mat-list-icon","",1,"ps-3"],[1,"text-truncate","text-decoration-none",3,"click"],[1,"bg-bifeldy","px-2","me-1","text-danger",2,"position","absolute","right","0"],[1,"text-warning",3,"innerHtml"]],template:function(e,a){1&e&&t.YNc(0,St,59,28,"div",0),2&e&&t.Q6J("ngIf",a.fansubData)},directives:[m.O5,I.lW,lt.gM,$.Hw,I.zs,ut.d,k.Ub,m.sg,k.vS,r.rH,k.eA,ct.G,w.t,dt.Q,k.Nh,gt.Y,K.H],pipes:[m.uU,m.OU,mt.R],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),s})();var Ut=o(8372),Mt=o(9094),It=o(8505),kt=o(3900),Nt=o(5625),yt=o(7902),M=o(7322),Rt=o(7531),Q=o(6856),Lt=o(4107),Pt=o(508),N=o(6688),Bt=o(3626);function Ot(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.imageLimitExceeded)," !")}}function Jt(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.Oqu(e.imageErrorText)}}function wt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",6)(1,"button",59),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitImage()}),t.TgZ(2,"mat-icon",56),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&s){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Qt(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.ALo(2,"bytes"),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.hij("Ukuran Upload Melebihi Batas ",t.lcZ(2,1,e.coverLimitExceeded)," !")}}function qt(s,l){if(1&s&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&s){const e=t.oxw(3);t.xp6(1),t.Oqu(e.coverErrorText)}}function Yt(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"div",60)(1,"button",59),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).submitCover()}),t.TgZ(2,"mat-icon",56),t._uU(3,"add_photo_alternate"),t.qZA(),t._uU(4," Unggah "),t.qZA()()}if(2&s){const e=t.oxw(3);t.xp6(1),t.Q6J("disabled",e.submitted)}}function Ht(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Tidak Boleh Kosong"),t.qZA())}function Kt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Nama Fansub Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function jt(s,l){if(1&s&&(t.TgZ(0,"small",61)(1,"div"),t._uU(2),t.qZA()()),2&s){const e=t.oxw(3);t.xp6(2),t.Oqu(e.slugInfo)}}function Gt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Tidak Boleh Kosong"),t.qZA())}function zt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Singkatan Hanya Boleh Huruf Dan \u4e00"),t.qZA())}function $t(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Harus Diisi Secara Valid"),t.qZA())}function Vt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Tanggal Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function Wt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Mohon Pilih Salah Satu"),t.qZA())}function Xt(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Status Hanya Boleh Huruf Standar Papan Ketik"),t.qZA())}function te(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"mat-chip",62),t.NdJ("removed",function(){const n=t.CHM(e).$implicit;return t.oxw(3).removeTag(n)}),t._uU(1),t.TgZ(2,"mat-icon",63),t._uU(3,"cancel"),t.qZA()()}if(2&s){const e=l.$implicit;t.Q6J("removable",!0),t.xp6(1),t.hij(" ",e," ")}}function ee(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Website Tidak Boleh Kosong"),t.qZA())}function ie(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Website Link Tidak Valid"),t.qZA())}function ae(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Facebook Link Tidak Valid"),t.qZA())}function se(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function ne(s,l){1&s&&(t.TgZ(0,"div"),t._uU(1,"Discord Link Tidak Valid"),t.qZA())}function oe(s,l){if(1&s){const e=t.EpF();t.TgZ(0,"form",8),t.NdJ("submit",function(){return t.CHM(e),t.oxw(2).onSubmit()}),t.TgZ(1,"div",9)(2,"div",10)(3,"h2",11)(4,"b",12),t._uU(5,"Perbaharui Data Fansub"),t.qZA()()(),t.TgZ(6,"div",6)(7,"div",13)(8,"div",14)(9,"div",15)(10,"div",6),t._UZ(11,"img",16),t.TgZ(12,"mat-form-field",17)(13,"mat-label"),t._uU(14,"Foto"),t.qZA(),t.TgZ(15,"ngx-mat-file-input",18,19),t.NdJ("change",function(i){t.CHM(e);const n=t.MAs(16);return t.oxw(2).uploadImage(i,n)}),t.qZA(),t.TgZ(17,"mat-icon",20),t._uU(18,"image"),t.qZA()(),t.TgZ(19,"mat-error",21)(20,"small"),t.YNc(21,Ot,3,3,"div",22),t.YNc(22,Jt,2,1,"div",22),t.qZA()()(),t.YNc(23,wt,5,1,"div",23),t.qZA()(),t.TgZ(24,"div",24)(25,"div",13)(26,"mat-form-field",25)(27,"mat-label"),t._uU(28,"Cover"),t.qZA(),t.TgZ(29,"ngx-mat-file-input",18,26),t.NdJ("change",function(i){t.CHM(e);const n=t.MAs(30);return t.oxw(2).uploadCover(i,n)}),t.qZA(),t.TgZ(31,"mat-icon",20),t._uU(32,"image"),t.qZA()(),t.TgZ(33,"mat-error",21)(34,"small"),t.YNc(35,Qt,3,3,"div",22),t.YNc(36,qt,2,1,"div",22),t.qZA()(),t.YNc(37,Yt,5,1,"div",27),t.TgZ(38,"mat-form-field",28)(39,"mat-label"),t._uU(40,"Nama Fansub"),t.qZA(),t._UZ(41,"input",29),t.TgZ(42,"mat-icon",20),t._uU(43,"wysiwyg"),t.qZA(),t.TgZ(44,"mat-error"),t.YNc(45,Ht,2,0,"div",22),t.YNc(46,Kt,2,0,"div",22),t.qZA()(),t.TgZ(47,"mat-form-field",30)(48,"mat-label"),t._uU(49,"Singkatan"),t.qZA(),t._UZ(50,"input",31),t.TgZ(51,"mat-icon",20),t._uU(52,"short_text"),t.qZA(),t.YNc(53,jt,3,1,"small",32),t.TgZ(54,"mat-error"),t.YNc(55,Gt,2,0,"div",22),t.YNc(56,zt,2,0,"div",22),t.qZA()(),t._UZ(57,"angular-editor",33),t.TgZ(58,"mat-form-field",34)(59,"mat-label"),t._uU(60,"Mulai Ada Sejak"),t.qZA(),t.TgZ(61,"input",35),t.NdJ("focus",function(){return t.CHM(e),t.MAs(65).open()}),t.ALo(62,"date"),t.qZA(),t._UZ(63,"mat-datepicker-toggle",36)(64,"mat-datepicker",37,38),t.TgZ(66,"mat-error"),t.YNc(67,$t,2,0,"div",22),t.YNc(68,Vt,2,0,"div",22),t.qZA()(),t.TgZ(69,"mat-form-field",34)(70,"mat-label"),t._uU(71,"Status"),t.qZA(),t.TgZ(72,"mat-select",39)(73,"mat-option",40),t._uU(74,"Tidak Aktif"),t.qZA(),t.TgZ(75,"mat-option",41),t._uU(76,"Aktif"),t.qZA()(),t.TgZ(77,"mat-hint",42),t._uU(78,"Status Kehidupan Fansub Saat Ini"),t.qZA(),t.TgZ(79,"mat-error"),t.YNc(80,Wt,2,0,"div",22),t.YNc(81,Xt,2,0,"div",22),t.qZA()()()()(),t.TgZ(82,"div",13)(83,"div",6)(84,"div",13)(85,"mat-form-field",43)(86,"mat-label"),t._uU(87,"Tags & Kategori"),t.qZA(),t.TgZ(88,"mat-chip-list",null,44),t.YNc(90,te,4,2,"mat-chip",45),t.TgZ(91,"input",46),t.NdJ("matChipInputTokenEnd",function(i){return t.CHM(e),t.oxw(2).addTag(i)}),t.qZA(),t.TgZ(92,"mat-icon",20),t._uU(93,"loyalty"),t.qZA()(),t.TgZ(94,"mat-hint",42),t._uU(95,"Isi Dengan Bebas, Pisahkan Dengan Koma"),t.qZA()()()()(),t.TgZ(96,"div",13)(97,"div",6)(98,"div",13)(99,"mat-form-field",47)(100,"mat-label"),t._uU(101,"Tautan Website"),t.qZA(),t._UZ(102,"input",48),t.TgZ(103,"mat-icon",20),t._uU(104,"web"),t.qZA(),t.TgZ(105,"mat-error"),t.YNc(106,ee,2,0,"div",22),t.YNc(107,ie,2,0,"div",22),t.qZA()(),t.TgZ(108,"mat-form-field",47)(109,"mat-label"),t._uU(110,"Facebook Fanpage"),t.qZA(),t._UZ(111,"input",49),t.TgZ(112,"mat-icon",20),t._uU(113,"facebook"),t.qZA(),t.TgZ(114,"mat-error"),t.YNc(115,ae,2,0,"div",22),t.qZA()(),t.TgZ(116,"mat-form-field",47)(117,"mat-label"),t._uU(118,"Tautan Discord"),t.qZA(),t._UZ(119,"input",50),t.TgZ(120,"mat-icon",20),t._UZ(121,"img",51),t.qZA(),t.TgZ(122,"mat-error"),t.YNc(123,se,2,0,"div",22),t.qZA()()()()(),t.TgZ(124,"div",13)(125,"mat-form-field",43)(126,"mat-label"),t._uU(127,"URI / URL RSS v2.0 Feed"),t.qZA(),t._UZ(128,"input",52),t.TgZ(129,"mat-icon",20),t._uU(130,"rss_feed"),t.qZA(),t.TgZ(131,"mat-error"),t.YNc(132,ne,2,0,"div",22),t.qZA()()(),t.TgZ(133,"div",13)(134,"div",6)(135,"div",13),t._UZ(136,"div",53),t.TgZ(137,"div",54)(138,"a",55)(139,"mat-icon",56),t._uU(140,"undo"),t.qZA(),t._uU(141," Batal "),t.qZA()(),t.TgZ(142,"div",54)(143,"button",57),t._uU(144," Simpan "),t.TgZ(145,"mat-icon",58),t._uU(146,"save"),t.qZA()()()()()()()()()}if(2&s){const e=t.MAs(65),a=t.MAs(89),i=t.oxw(2);t.Q6J("formGroup",i.fg),t.xp6(11),t.Q6J("src",i.image_url,t.LSH),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",i.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",i.imageLimitExceeded),t.xp6(1),t.Q6J("ngIf",i.imageErrorText),t.xp6(1),t.Q6J("ngIf",i.image&&!i.fg.value.image),t.xp6(3),t.Q6J("color","accent"),t.xp6(3),t.Q6J("disabled",i.fg.value.cover)("accept","image/gif, image/jpeg, image/jpg, image/png"),t.xp6(6),t.Q6J("ngIf",i.coverLimitExceeded),t.xp6(1),t.Q6J("ngIf",i.coverErrorText),t.xp6(1),t.Q6J("ngIf",i.cover&&!i.fg.value.cover),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("name").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(6),t.Q6J("ngIf",i.slugInfo),t.xp6(2),t.Q6J("ngIf",i.fg.get("slug").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("slug").hasError("pattern")),t.xp6(1),t.Q6J("config",i.GS.angularEditorConfig),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.s9C("placeholder",t.xi3(62,48,i.currentDate,"d MMMM y")),t.Q6J("matDatepicker",e),t.xp6(2),t.Q6J("for",e),t.xp6(4),t.Q6J("ngIf",i.fg.get("born").hasError("required")||i.fg.get("born").hasError("matDatepickerParse")),t.xp6(1),t.Q6J("ngIf",i.fg.get("born").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(11),t.Q6J("ngIf",i.fg.get("active").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("active").hasError("pattern")),t.xp6(4),t.Q6J("color","accent"),t.xp6(5),t.Q6J("ngForOf",i.fg.value.tags),t.xp6(1),t.Q6J("matChipInputSeparatorKeyCodes",i.GS.separatorKeysCodes)("matChipInputFor",a)("matChipInputAddOnBlur",!0),t.xp6(8),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("web").hasError("required")),t.xp6(1),t.Q6J("ngIf",i.fg.get("web").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("facebook").hasError("pattern")),t.xp6(1),t.Q6J("color","accent"),t.xp6(5),t.MGl("src","/assets/img/discord/",i.GS.isDarkMode?"white":"black",".png",t.LSH),t.xp6(2),t.Q6J("ngIf",i.fg.get("discord").hasError("pattern")),t.xp6(2),t.Q6J("color","accent"),t.xp6(7),t.Q6J("ngIf",i.fg.get("rss_feed").hasError("pattern")),t.xp6(6),t.Q6J("disabled",i.submitted),t.xp6(5),t.Q6J("disabled",i.submitted||i.fg.invalid||!i.fg.dirty)}}function re(s,l){if(1&s&&(t.TgZ(0,"div",1),t._UZ(1,"div",2)(2,"div",3)(3,"div",4)(4,"app-notifications"),t.TgZ(5,"div",5)(6,"div",6),t.YNc(7,oe,147,51,"form",7),t.qZA()()()),2&s){const e=t.oxw();t.xp6(1),t.Udp("background-image","url("+e.cover_url+")"),t.xp6(6),t.Q6J("ngIf",e.fg)}}const le=[{path:"",pathMatch:"full",component:at},{path:":fansubSlug",children:[{path:"",pathMatch:"full",component:Zt},{path:"edit",component:(()=>{class s{constructor(e,a,i,n,u,d,g,f,E,v){this.fb=e,this.router=a,this.bs=i,this.activatedRoute=n,this.pi=u,this.imgbb=d,this.fansub=g,this.toast=f,this.as=E,this.gs=v,this.fansubSlug="",this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.cover=null,this.coverErrorText=null,this.coverLimitExceeded=null,this.cover_url="/assets/img/form/no-image.png",this.cover_url_original=null,this.urls=[],this.currentDate=new Date,this.gambar=null,this.gambar_=null,this.subsActRoute=null,this.subsFansubUpdate=null,this.subsFansubDetail=null,this.subsImgbb=null,this.subsCekFansubSlug=null,this.subsFansubMemberGet=null,this.slugInfo="",this.editable=!0,this.approvedMembers=[],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnDestroy(){var e,a,i,n,u;null===(e=this.subsActRoute)||void 0===e||e.unsubscribe(),null===(a=this.subsFansubUpdate)||void 0===a||a.unsubscribe(),null===(i=this.subsFansubDetail)||void 0===i||i.unsubscribe(),null===(n=this.subsImgbb)||void 0===n||n.unsubscribe(),null===(u=this.subsFansubMemberGet)||void 0===u||u.unsubscribe()}ngOnInit(){this.pi.updatePageMetaData("Fansub - Ubah Data","Halaman Pembaharuan Data Fansub","Ubah Fansub"),this.gs.isBrowser&&(this.fansubSlug=this.activatedRoute.snapshot.paramMap.get("fansubSlug"),this.bs.busy(),this.subsFansubDetail=this.fansub.getFansub(this.fansubSlug).subscribe({next:e=>{this.gs.log("[FANSUB_DETAIL_SUCCESS]",e),this.bs.idle(),this.editable=e.result.editable,this.editable?(this.bs.busy(),this.subsFansubMemberGet=this.fansub.getFansubMember(this.fansubSlug).subscribe({next:a=>{var i,n,u,d,g,f;this.gs.log("[FANSUB_EDIT_MEMBER_LIST_SUCCESS]",a),this.bs.idle(),this.approvedMembers=[];for(const v of a.results)v.approved&&this.approvedMembers.push(v);this.approvedMembers.findIndex(v=>{var F,C;return v.user_.id===(null===(C=null===(F=this.as.currentUserSubject)||void 0===F?void 0:F.value)||void 0===C?void 0:C.id)})>=0||(null===(n=null===(i=this.as.currentUserSubject)||void 0===i?void 0:i.value)||void 0===n?void 0:n.role)===T.yS.ADMIN||(null===(d=null===(u=this.as.currentUserSubject)||void 0===u?void 0:u.value)||void 0===d?void 0:d.role)===T.yS.MODERATOR||(null===(f=null===(g=this.as.currentUserSubject)||void 0===g?void 0:g.value)||void 0===f?void 0:f.id)===e.result.user_.id?this.initForm(e.result):(this.toast.warning("Harus Menjadi Anggota Untuk Mengubah Data!","Whoops!",null,!0),this.router.navigateByUrl(`/fansub/${this.fansubSlug}`))},error:a=>{this.gs.log("[FANSUB_EDIT_MEMBER_LIST_ERROR]",a,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/fansub/${this.fansubSlug}`}})}})):(this.toast.warning("Data Fansub Ini Tidak Dapat Diubah","Whoops!",null,!0),this.router.navigateByUrl(`/fansub/${this.fansubSlug}`))},error:e=>{this.gs.log("[FANSUB_DETAIL_ERROR]",e,"error"),this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:`/fansub/${this.fansubSlug}`}})}}))}initForm(e){this.image_url=e.image_url,this.image_url_original=this.image_url,this.cover_url=e.cover_url,this.cover_url_original=this.cover_url;const a=e.urls,i=a.find(g=>"web"===g.name),n=a.find(g=>"facebook"===g.name),u=a.find(g=>"discord"===g.name),d=!0===e.active?"1":"0";this.fg=this.fb.group({name:[e.name,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],description:[e.description,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],born:[e.born,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],active:[d,c.kI.compose([c.kI.required,c.kI.pattern(p.t.regexEnglishKeyboardKeys)])],slug:[{value:e.slug,disabled:e.dns_id},c.kI.compose([c.kI.required,c.kI.pattern(/^[0-9a-zA-Z-]*$/)])],tags:[e.tags,c.kI.compose([])],image:[null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],cover:[null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],web:[(null==i?void 0:i.url)||null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],facebook:[(null==n?void 0:n.url)||null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],discord:[(null==u?void 0:u.url)||null,c.kI.compose([c.kI.pattern(p.t.regexUrl)])],rss_feed:[e.rss_feed,c.kI.compose([c.kI.pattern(p.t.regexUrl)])]}),this.subsCekFansubSlug=this.fg.get("slug").valueChanges.pipe((0,Ut.b)(500),(0,Mt.x)(),(0,It.b)(()=>this.slugInfo="Mengecek ..."),(0,kt.w)(g=>this.fansub.cekSlug({slug:g})),(0,Nt.X)(-1)).subscribe({next:g=>{this.gs.log("[FANSUB_CEK_SLUG_RESULT]",g),this.slugInfo=g.result.message}})}addTag(e){const a=e.input,i=e.value;(i||"").trim()&&this.fg.value.tags.push(i.trim()),a&&(a.value=""),this.fg.controls.tags.patchValue(this.fg.value.tags.filter((n,u,d)=>d.findIndex(g=>g===n)===u)),this.fg.controls.tags.markAsDirty()}removeTag(e){const a=this.fg.value.tags.indexOf(e);a>=0&&this.fg.value.tags.splice(a,1)}uploadImage(e,a){this.gambar=a,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine();const i=e.target.files[0];try{const n=new FileReader;n.readAsDataURL(i),n.onload=u=>{if(this.gs.log("[IMAGE_SELECTED]",u),i.size<=p.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.image=i,this.image_url=n.result.toString()},d.src=n.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=p.t.fileSizeImageLimit,this.gambar.clear(e)}}catch(n){this.image=null,this.image_url=this.image_url_original,this.gambar.clear(e)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:e=>{this.gs.log("[IMAGE_SUCCESS]",e),this.fg.controls.image.patchValue(e.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:e=>{var a;this.gs.log("[IMAGE_ERROR]",e,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.submitted=!1,this.imageErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}uploadCover(e,a){this.gambar_=a,this.cover=null,this.coverLimitExceeded=null,this.coverErrorText=null,this.fg.controls.cover.patchValue(null),this.fg.controls.cover.markAsPristine();const i=e.target.files[0];try{const n=new FileReader;n.readAsDataURL(i),n.onload=u=>{if(this.gs.log("[COVER_SELECTED]",u),i.size<=p.t.fileSizeImageLimit){const d=this.gs.document.createElement("img");d.onload=()=>{this.cover=i,this.cover_url=n.result.toString()},d.src=n.result.toString()}else this.cover=null,this.cover_url="/assets/img/form/image-error.png",this.coverLimitExceeded=p.t.fileSizeImageLimit,this.gambar_.clear(e)}}catch(n){this.cover=null,this.cover_url=this.cover_url_original,this.gambar_.clear(e)}}submitCover(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.cover}).subscribe({next:e=>{this.gs.log("[COVER_SUCCESS]",e),this.fg.controls.cover.patchValue(e.result.url),this.fg.controls.cover.markAsDirty(),this.submitted=!1},error:e=>{var a;this.gs.log("[COVER_ERROR]",e,"error"),this.fg.controls.cover.patchValue(null),this.fg.controls.cover.markAsPristine(),this.submitted=!1,this.coverErrorText=(null===(a=e.result)||void 0===a?void 0:a.message)||e.info}})}onSubmit(){this.bs.busy();const e=[];this.fg.value.web&&e.push({name:"web",url:this.fg.value.web}),this.fg.value.facebook&&e.push({name:"facebook",url:this.fg.value.facebook}),this.fg.value.discord&&e.push({name:"discord",url:this.fg.value.discord});const a=this.gs.getDirtyValues(this.fg);if("web"in a&&delete a.web,"facebook"in a&&delete a.facebook,"discord"in a&&delete a.discord,a.urls=e,this.gs.log("[FANSUB_EDIT_DIRTY]",a),this.submitted=!0,this.fg.invalid||0===e.length)return 0===e.length&&this.toast.warning("Harap Isi Salah Satu URL","Form Tidak lengkap (Web/FB/DC)",null,!0),this.submitted=!1,void this.bs.idle();this.subsFansubUpdate=this.fansub.updateFansub(this.fansubSlug,{...a}).subscribe({next:i=>{this.gs.log("[FANSUB_EDIT_SUCCESS]",i),this.submitted=!1,this.bs.idle(),this.router.navigateByUrl(`/fansub/${i.result.slug}`)},error:i=>{this.gs.log("[FANSUB_EDIT_ERROR]",i,"error"),this.submitted=!1,this.bs.idle()}})}}return s.\u0275fac=function(e){return new(e||s)(t.Y36(c.qu),t.Y36(r.F0),t.Y36(O.z),t.Y36(r.gz),t.Y36(G.Z),t.Y36(yt.X),t.Y36(J.T),t.Y36(z.k),t.Y36(j.e),t.Y36(B.U))},s.\u0275cmp=t.Xpm({type:s,selectors:[["app-fansub-edit"]],decls:1,vars:1,consts:[["class","container",4,"ngIf"],[1,"container"],[1,"fansub-banner","fansub-banner-1","align-items-center"],[1,"fansub-banner","fansub-banner-2","align-items-center"],[2,"padding-top","160px"],[1,"row","px-3"],[1,"col-12"],[3,"formGroup","submit",4,"ngIf"],[3,"formGroup","submit"],[1,"row","mt-3","mb-3"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"row","mb-3"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"px-3","pt-3","w-100",3,"color"],["gambar_",""],["class","col-12 p-3",4,"ngIf"],["appearance","outline",1,"p-3","col-12","col-md-7",3,"color"],["matInput","","formControlName","name","placeholder","Fansub Jalanan"],["appearance","outline",1,"p-3","col-12","col-md-5",3,"color"],["matInput","","formControlName","slug","placeholder","Jalsub"],["class","text-info",4,"ngIf"],["formControlName","description",1,"p-3","w-100",3,"config"],["appearance","outline",1,"p-3","col-12","col-md-6",3,"color"],["matInput","","formControlName","born",3,"matDatepicker","placeholder","focus"],["matSuffix","",3,"for"],["disabled","false"],["kalender",""],["formControlName","active","placeholder","Aktif / Non-Aktif"],["value","0"],["value","1"],["align","end"],["appearance","outline",1,"p-3","col-12",3,"color"],["tag",""],["color","accent","selected","",3,"removable","removed",4,"ngFor","ngForOf"],["placeholder","Label Tag / Kategori",3,"matChipInputSeparatorKeyCodes","matChipInputFor","matChipInputAddOnBlur","matChipInputTokenEnd"],["appearance","outline",1,"p-3","col-12","col-md-4",3,"color"],["matInput","","formControlName","web","placeholder","http://www.domain.id"],["matInput","","formControlName","facebook","placeholder","http://www.facebook.com"],["matInput","","formControlName","discord","placeholder","http://www.discord.gg"],["width","24px",3,"src"],["matInput","","formControlName","rss_feed","placeholder","http://my-site.blogspot.com/feeds/posts/default?alt=rss"],[1,"col"],[1,"col-12","col-md-3","pb-3"],["mat-stroked-button","","routerLink","../",1,"w-100",3,"disabled"],[1,"me-1"],["mat-flat-button","","color","accent","type","submit",1,"w-100",3,"disabled"],[1,"ms-1"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"col-12","p-3"],[1,"text-info"],["color","accent","selected","",3,"removable","removed"],["matChipRemove",""]],template:function(e,a){1&e&&t.YNc(0,re,8,3,"div",0),2&e&&t.Q6J("ngIf",a.fg)},directives:[m.O5,w.t,c._Y,c.JL,c.sg,M.KE,M.hX,U.Yh,$.Hw,M.R9,M.TO,I.lW,Rt.Nt,c.Fj,c.JJ,c.u,S.s6,Q.hl,Q.nW,Q.Mq,Lt.gD,Pt.ey,M.bx,N.qn,m.sg,N.HS,N.qH,N.oH,I.zs,r.yS],pipes:[Bt.$,m.uU],styles:[".fansub-banner[_ngcontent-%COMP%]{height:128px;width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;filter:blur(5px) brightness(100%);opacity:.5}.fansub-banner-1[_ngcontent-%COMP%]{position:absolute;top:0;left:0}.fansub-banner-2[_ngcontent-%COMP%]{position:absolute;top:128px;left:0}.fansub-info[_ngcontent-%COMP%]{position:relative;height:256px;z-index:1}"]}),s})(),canActivate:[R.t,L.H],data:{title:"Fansub - Ubah Data",description:"Halaman Pembaharuan Data Fansub",keywords:"Ubah Fansub",[p.t.decoratorRoles]:[T.yS.ADMIN,T.yS.MODERATOR,T.yS.FANSUBBER,T.yS.USER],[p.t.decoratorVerifiedOnly]:!0}}]}];let ue=(()=>{class s{}return s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=t.oAB({type:s}),s.\u0275inj=t.cJS({imports:[[m.ez,r.Bz.forChild(le),h.m,b.L,P.$,A.P,_.m9,Z.F,c.u5,c.UX,U.Ad,S.UM,V.b,x.T,W.d]]}),s})()},7567:(y,D,o)=>{o.d(D,{Q:()=>L});var m=o(1125),r=o(5e3),c=o(8696),S=o(9808),_=o(7238),U=o(5245);function p(h,x){if(1&h&&r._UZ(0,"h3",8),2&h){const b=r.oxw().$implicit;r.Q6J("innerHTML",b.text,r.oJD)}}function T(h,x){if(1&h&&(r.TgZ(0,"mat-expansion-panel",3)(1,"mat-expansion-panel-header")(2,"mat-panel-title",4)(3,"span",5),r._uU(4),r.qZA()(),r.TgZ(5,"mat-panel-description")(6,"mat-icon",6),r._uU(7),r.qZA()()(),r.YNc(8,p,1,1,"ng-template",7),r.qZA()),2&h){const b=x.$implicit,A=x.first,Z=r.oxw(2);r.Q6J("expanded",Z.GS.isDesktop&&A),r.xp6(3),r.s9C("matTooltip",b.tooltip),r.Q6J("matTooltipPosition","above"),r.xp6(1),r.hij(" ",b.title," "),r.xp6(3),r.Oqu(b.icon)}}function R(h,x){if(1&h&&(r.TgZ(0,"mat-accordion",1),r.YNc(1,T,9,5,"mat-expansion-panel",2),r.qZA()),2&h){const b=r.oxw();r.xp6(1),r.Q6J("ngForOf",b.panelData)}}let L=(()=>{class h{constructor(b){this.gs=b,this.panelData=[{title:"Title",icon:"warning",text:"Lorem ipsum ...",tooltip:"Info"}]}onResize(b){this.gs.onResize(b,"MATERIAL_EXPANSION_PANEL"),this.gs.isDesktop?this.accordion.openAll():this.accordion.closeAll()}get GS(){return this.gs}ngOnInit(){}}return h.\u0275fac=function(b){return new(b||h)(r.Y36(c.U))},h.\u0275cmp=r.Xpm({type:h,selectors:[["app-material-expansion-panel"]],viewQuery:function(b,A){if(1&b&&r.Gf(m.pp,5),2&b){let Z;r.iGM(Z=r.CRH())&&(A.accordion=Z.first)}},hostBindings:function(b,A){1&b&&r.NdJ("resize",function(P){return A.onResize(P)},!1,r.Jf7)},inputs:{panelData:"panelData"},decls:1,vars:1,consts:[["class","example-headers-align","multi","",4,"ngIf"],["multi","",1,"example-headers-align"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],[1,"font-weight-bold"],[3,"matTooltip","matTooltipPosition"],[1,"ms-auto"],["matExpansionPanelContent",""],[1,"m-0","text-justify",2,"white-space","pre-line !important",3,"innerHTML"]],template:function(b,A){1&b&&r.YNc(0,R,2,1,"mat-accordion",0),2&b&&r.Q6J("ngIf",A.panelData.length>0)},directives:[S.O5,m.pp,S.sg,m.ib,m.yz,m.yK,_.gM,m.u4,U.Hw,m.HS],styles:[""]}),h})()},6020:(y,D,o)=>{o.d(D,{$:()=>S});var m=o(9808),r=o(210),c=o(5e3);let S=(()=>{class _{}return _.\u0275fac=function(p){return new(p||_)},_.\u0275mod=c.oAB({type:_}),_.\u0275inj=c.cJS({imports:[[m.ez,r.m]]}),_})()},7623:(y,D,o)=>{o.d(D,{Q:()=>m});var m=(()=>{return(r=m||(m={})).BIRU="#7289DA",r.UNGU="#3F51B5",r.HITAM="#343A40",r.ABU="#A9A9A9",r.MERAH="#DC3545",r.PINK="#FF4081",r.OREN="#F44336",r.KUNING="#FFC107",r.HIJAU="#28A745",m;var r})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/750.8026fa53a8ed0be8.js b/dist/fansubid/browser/750.8fffcc0b9b38b7eb.js similarity index 54% rename from dist/fansubid/browser/750.8026fa53a8ed0be8.js rename to dist/fansubid/browser/750.8fffcc0b9b38b7eb.js index 42dfa0c89..c37610d47 100644 --- a/dist/fansubid/browser/750.8026fa53a8ed0be8.js +++ b/dist/fansubid/browser/750.8fffcc0b9b38b7eb.js @@ -1 +1 @@ -"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[750],{6750:(ha,U,l)=>{l.r(U),l.d(U,{NihongoModule:()=>ma});var c=l(9808),h=l(8406),_=l(3075),H=l(9345),Q=l(1385),g=l(6271),r=l(4249),u=l(2777),N=l(210),t=l(5e3),v=l(8696),y=l(3e3),C=l(2663),T=l(8616),m=l(9224);function F(e,i){if(1&e&&(t.TgZ(0,"div",4)(1,"mat-card",5),t._UZ(2,"img",6),t.TgZ(3,"mat-card-content",7)(4,"h3")(5,"b"),t._uU(6),t.qZA()()()()()),2&e){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(3),t.Oqu(a.title)}}let z=(()=>{class e{constructor(a){this.gs=a,this.nihongoMenu=[{url:"belajar",title:"Pengenalan Aksara",image_url:"/assets/img/nihongo/hirakata.png"},{url:"kanji",title:"Pengayaan Kanji (* JP-EN)",image_url:"/assets/img/nihongo/jlpt.png"}]}ngOnInit(){}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(v.U))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-banner-nihongo"]],decls:4,vars:1,consts:[[1,"row"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-md-6 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","p-2"],[1,"gradient-border","rgb-border"],["mat-card-image","",2,"height","128px","object-fit","cover","cursor","pointer",3,"src","routerLink"],[2,"cursor","pointer",3,"routerLink"]],template:function(a,n){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,F,7,4,"div",3),t.qZA()()()),2&a&&(t.xp6(3),t.Q6J("ngForOf",n.nihongoMenu))},directives:[c.sg,m.a8,m.G2,h.rH,m.dn],styles:[""]}),e})();var A=l(5245),Y=l(8757),P=l(9731),R=l(8381);let O=(()=>{class e{constructor(a,n,o){this.api=a,this.gs=n,this.ss=o}getCurrentQuizRoom(){return this.ss.currentRoom}getCurrentQuizQuestion(a){return this.ss.quizRoom[a]}answerQuestion(a){this.ss.socketEmit("quiz-answer",a)}getQuizLeaderboard(a="",n=1,o=10,s="",d=""){return this.api.getData(`/quiz-leaderboard?q=${a}&page=${n}&row=${o}&sort=${s}&order=${d}`)}}return e.\u0275fac=function(a){return new(a||e)(t.LFG(P.s),t.LFG(v.U),t.LFG(R.R))},e.\u0275prov=t.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var S=l(4623),E=l(7423);function $(e,i){if(1&e&&(t.TgZ(0,"mat-list-option",10),t._UZ(1,"img",11),t.TgZ(2,"a",12)(3,"span",13),t._uU(4),t.qZA(),t.TgZ(5,"span",14),t._uU(6),t.qZA(),t.TgZ(7,"span",15),t._uU(8),t.qZA()()()),2&e){const a=i.$implicit;t.MGl("routerLink","/user/",a.username,""),t.xp6(1),t.s9C("src",a.image_url,t.LSH),t.xp6(3),t.hij(" ",a.points," "),t.xp6(2),t.Oqu(a.rank),t.xp6(2),t.Oqu(a.username)}}let G=(()=>{class e{constructor(a,n){this.gs=a,this.qs=n,this.leaderboardData=[],this.leaderBoardTotalPages=1,this.leaderboardPage=1,this.subsLeaderboard=null}ngOnInit(){this.gs.isBrowser&&this.getLeaderboard()}ngOnDestroy(){var a;null===(a=this.subsLeaderboard)||void 0===a||a.unsubscribe()}getLeaderboard(){this.subsLeaderboard=this.qs.getQuizLeaderboard("",this.leaderboardPage).subscribe({next:a=>{this.gs.log("[LEADERBOARD_LIST_SUCCESS]",a),this.leaderBoardTotalPages=a.pages,this.leaderboardData=a.results},error:a=>{this.gs.log("[LEADERBOARD_LIST_ERROR]",a,"error")}})}prevBoard(){this.leaderboardPage--,this.leaderboardPage<=0&&(this.leaderboardPage=1),this.getLeaderboard()}nextBoard(){this.leaderboardPage++,this.getLeaderboard()}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(v.U),t.Y36(O))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-leaderboard"]],decls:19,vars:8,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"col-12","text-end"],["mat-button","","color","accent",3,"disabled","click"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"me-3","text-danger"],[1,"text-success"]],template:function(a,n){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"span",3),t.NdJ("click",function(){return n.getLeaderboard()}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",4),t._uU(6,"Rank Points"),t.qZA()()(),t.TgZ(7,"div",5)(8,"mat-selection-list",6),t.YNc(9,$,9,5,"mat-list-option",7),t.ALo(10,"slice"),t.qZA(),t.TgZ(11,"div",0)(12,"div",8)(13,"button",9),t.NdJ("click",function(){return n.prevBoard()}),t.TgZ(14,"mat-icon"),t._uU(15,"navigate_before"),t.qZA()(),t.TgZ(16,"button",9),t.NdJ("click",function(){return n.nextBoard()}),t.TgZ(17,"mat-icon"),t._uU(18,"navigate_next"),t.qZA()()()()()()),2&a&&(t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,4,n.leaderboardData,0,10)),t.xp6(4),t.Q6J("disabled",n.leaderboardPage<=1),t.xp6(3),t.Q6J("disabled",n.leaderboardPage>=n.leaderBoardTotalPages))},directives:[S.Ub,c.sg,S.vS,h.rH,S.eA,E.lW,A.Hw],pipes:[c.OU],styles:[""]}),e})();var J=l(3331),D=l(8921);function W(e,i){if(1&e&&(t.TgZ(0,"mat-icon",22),t._uU(1),t.qZA()),2&e){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.icon)}}function X(e,i){if(1&e&&(t.TgZ(0,"div",15)(1,"mat-card",16)(2,"mat-card-header",17)(3,"div",18),t.YNc(4,W,2,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&e){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function V(e,i){if(1&e&&(t.TgZ(0,"mat-icon",22),t._uU(1),t.qZA()),2&e){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.icon)}}function tt(e,i){if(1&e&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,V,2,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&e){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function at(e,i){if(1&e&&(t.TgZ(0,"div",3)(1,"div",4)(2,"h2",5)(3,"b",6),t._uU(4,"Latihan Menengah"),t.qZA()()(),t.TgZ(5,"div",7)(6,"div",8),t.YNc(7,tt,10,6,"div",9),t.qZA()()()),2&e){const a=t.oxw();t.xp6(7),t.Q6J("ngForOf",a.testMenengah)}}function et(e,i){if(1&e&&(t.TgZ(0,"mat-icon",22),t._uU(1),t.qZA()),2&e){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.icon)}}function nt(e,i){if(1&e&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,et,2,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&e){const a=i.$implicit;t.xp6(1),t.Tol(a.name.startsWith("JLPT")?"rgb-border":"All Kanji"===a.name?"gradient-border rgb-border":""),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}let it=(()=>{class e{constructor(a,n,o,s){this.router=a,this.gs=n,this.bs=o,this.nihon=s,this.testDasar=[{url:"hiragana",name:"Hiragana",image_url:"/assets/img/nihongo/hiragana.png",icon:null,letter:"~46 Unik"},{url:"katakana",name:"Katakana",image_url:"/assets/img/nihongo/katakana.png",icon:null,letter:"~46 Unik"},{url:"angka",name:"Angka",image_url:null,icon:"plus_one",letter:"~\u221e Unik"}],this.testMenengah=[],this.testLanjutan=[{url:"kelas-1",name:"Kelas 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~80 Unik"},{url:"kelas-2",name:"Kelas 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~160 Unik"},{url:"kelas-3",name:"Kelas 3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-4",name:"Kelas 4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-5",name:"Kelas 5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~185 Unik"},{url:"kelas-6",name:"Kelas 6",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~181 Unik"},{url:"kelas-lanjutan-1",name:"Lanjutan 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1139 Unik"},{url:"kelas-lanjutan-2",name:"Lanjutan 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~349 Unik"},{url:"jlpt-n5",name:"JLPT N5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~79 Unik"},{url:"jlpt-n4",name:"JLPT N4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~166 Unik"},{url:"jlpt-n3",name:"JLPT N3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n2",name:"JLPT N2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n1",name:"JLPT N1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1231 Unik"},{url:"semua-kanji",name:"All Kanji",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~2494 Unik"}],this.tabData=[{name:"JLPT Roadmap",icon:"pin_drop",type:"html",data:'\n
\n \n \n
\n

Sumber gambar dan informasi: KawaKawa

\n

\u201cJLPT\u201d adalah singkatan dari Japanese-Language Proficiency Test (Tes Kemampuan Bahasa Jepang). JLPT adalah salah satu ujian kecakapan bahasa Jepang internasional yang paling terkenal. Ini memiliki lima level, dengan level lima (secara resmi disebut N5) menjadi yang termudah dan level satu (N1) menjadi yang paling sulit.

\n

JLPT dulu memiliki empat level tetapi sekarang dibagi menjadi lima (N5, N4, N3, N2, dan N1). Level mana yang ingin diambil dibebaskan untuk memilih. Contoh pertanyaan dapat diakses pada halaman New Japanese-Language Proficiency Test Sample Questions.

\n
    \n
  • Untuk lulus N5, perlu mengetahui sekitar 100 kanji dan sekitar 800 kosakata.
  • \n
  • Untuk lulus N4, perlu mengetahui sekitar 300 kanji dan sekitar 1.500 kosakata.
  • \n
  • Untuk lulus N3, perlu mengetahui sekitar 650 kanji dan sekitar 3.700 kosakata.
  • \n
  • Untuk lulus N2, perlu mengetahui sekitar 1.000 kanji dan sekitar 6.000 kosakata.
  • \n
  • Untuk lulus N1, perlu mengetahui sekitar 2.000 kanji dan sekitar 10.000 kosakata.
  • \n
\n

Untuk informasi skoring & penilaian dapat dilihat pada Scoring Sections, Pass or Fail, Score Report.

\n

N5 dan N4 adalah level termudah untuk diselesaikan dalam tes tetapi jika ingin menyelesaikan level yang lebih tinggi seperti N3, N2 dan N1 maka harus menghadiri pusat pembinaan di mana mereka menyediakan bahan pelajaran yang baik dan memiliki pelatih berpengalaman akan membantu belajar bahasa jepang dengan mudah.

\n

Informasi lebih lanjut, silahkan kunjungi https://www.jlpt.jp/e/index.html.

\n '}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsAllKategori=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&this.getKategori()}ngOnDestroy(){var a;null===(a=this.subsAllKategori)||void 0===a||a.unsubscribe()}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a);const n=[];for(const o of a.results)n.push({url:`latihan-${o.id}`,name:o.name,image_url:null,icon:"switch_access_shortcut",letter:`~${o.jumlah} Unik`});this.testMenengah=n,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getBook(){}openModule(a){this.gs.log("[NIHONGO_CLICK_MODUL]",a),this.router.navigateByUrl(`/nihongo/${a.id}`)}onPaginatorClicked(a){this.gs.log("[NIHONGO_CLICK_PAGINATOR]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getBook()}onServerSideFilter(a){this.gs.log("[NIHONGO_ENTER_FILTER]",a),this.q=a,this.getBook()}onServerSideOrder(a){this.gs.log("[NIHONGO_CLICK_ORDER]",a),this.q=a.q,this.sort=a.active,this.order=a.direction,this.getBook()}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(v.U),t.Y36(y.z),t.Y36(C.a))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-nihongo-list"]],decls:37,vars:6,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-sm-6 col-md-4 col-lg-6 col-xl-3 p-2",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[1,"row","mt-3"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12","col-sm-6","col-md-4","col-lg-6","col-xl-3","p-2"],[1,"gradient-border"],[1,"me-0",2,"cursor","pointer",3,"routerLink"],["mat-card-avatar","",2,"background-size","cover","background-color","whitesmoke"],["style","font-size: 300%; color: black",4,"ngIf"],[1,"text-warning","mb-1",2,"cursor","pointer"],[1,"mb-0"],[2,"font-size","300%","color","black"]],template:function(a,n){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"b",6),t._uU(8,"Belajar Bahasa Jepang"),t.qZA()()(),t.TgZ(9,"div",7),t._UZ(10,"app-banner-nihongo"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",4)(13,"h2",5)(14,"b",6),t._uU(15,"Latihan Dasar"),t.qZA()()(),t.TgZ(16,"div",7)(17,"div",8),t.YNc(18,X,10,6,"div",9),t.qZA()()(),t.YNc(19,at,8,1,"div",10),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"b",6),t._uU(24,"Latihan Lanjutan"),t.qZA()()(),t.TgZ(25,"div",7)(26,"div",8),t.YNc(27,nt,10,9,"div",9),t.qZA()()(),t.TgZ(28,"div",11)(29,"div",7)(30,"app-material-tab",12),t.NdJ("tableRowClicked",function(s){return n.openModule(s)})("paginatorClicked",function(s){return n.onPaginatorClicked(s)})("serverSideFilter",function(s){return n.onServerSideFilter(s)})("serverSideOrder",function(s){return n.onServerSideOrder(s)}),t.qZA()()()(),t.TgZ(31,"div",13)(32,"div",14)(33,"div",7),t._UZ(34,"app-leaderboard")(35,"app-banner-discord")(36,"app-stats-server"),t.qZA()()()()()),2&a&&(t.xp6(18),t.Q6J("ngForOf",n.testDasar),t.xp6(1),t.Q6J("ngIf",n.testMenengah.length>0),t.xp6(8),t.Q6J("ngForOf",n.testLanjutan),t.xp6(3),t.Q6J("tabData",n.tabData)("count",n.count)("serverSide",!0))},directives:[T.t,z,c.sg,m.a8,m.dk,h.rH,m.kc,c.O5,A.Hw,m.n5,m.$j,Y.H,G,J.B,D.X],styles:[""]}),e})();var x=l(6087),B=l(6925),ot=l(4137),j=l(7845),b=l(7322),L=l(4107),Z=l(508),w=l(7531),rt=l(578),q=l(201),I=l(192),M=l(7238);function st(e,i){if(1&e&&(t.TgZ(0,"mat-option",20),t._uU(1),t.qZA()),2&e){const a=i.$implicit;t.s9C("value",a.id),t.xp6(1),t.Oqu(a.name)}}function lt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"mat-form-field",21)(1,"mat-label"),t._uU(2,"Cari ..."),t.qZA(),t.TgZ(3,"input",22),t.NdJ("keyup.enter",function(o){return t.CHM(a),t.oxw().applyFilter(o)})("ngModelChange",function(o){return t.CHM(a),t.oxw().q=o}),t.qZA(),t.TgZ(4,"mat-icon",23),t._uU(5,"search"),t.qZA()()}if(2&e){const a=t.oxw();t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",a.q)}}function ct(e,i){1&e&&t._UZ(0,"div")}function gt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function ut(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,gt,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function pt(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,ut,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function mt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function dt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,mt,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function ht(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,dt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function _t(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function vt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,_t,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function ft(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,vt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function kt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function bt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,kt,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function Tt(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,bt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function At(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function xt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,At,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function Nt(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,xt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function yt(e,i){if(1&e&&(t.TgZ(0,"div",17)(1,"div",3)(2,"div",24)(3,"div",3)(4,"div",17)(5,"h2",25)(6,"b",26),t._uU(7,"Standar"),t.qZA()()(),t.TgZ(8,"div",17),t.YNc(9,pt,2,1,"div",27),t.ALo(10,"keyvalue"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",17)(13,"h2",25)(14,"b",26),t._uU(15,"Lainnya"),t.qZA()()(),t.TgZ(16,"div",17),t.YNc(17,ht,2,1,"div",27),t.ALo(18,"keyvalue"),t.qZA()()(),t.TgZ(19,"div",24)(20,"div",3)(21,"div",17)(22,"h2",25)(23,"b",26),t._uU(24,"Dakuon"),t.qZA()()(),t.TgZ(25,"div",17),t.YNc(26,ft,2,1,"div",27),t.ALo(27,"keyvalue"),t.qZA()(),t.TgZ(28,"div",3)(29,"div",17)(30,"h2",25)(31,"b",26),t._uU(32,"Handakuon"),t.qZA()()(),t.TgZ(33,"div",17),t.YNc(34,Tt,2,1,"div",27),t.ALo(35,"keyvalue"),t.qZA()(),t.TgZ(36,"div",3)(37,"div",17)(38,"h2",25)(39,"b",26),t._uU(40,"Yuon"),t.qZA()()(),t.TgZ(41,"div",17),t.YNc(42,Nt,2,1,"div",27),t.ALo(43,"keyvalue"),t.qZA()()()()()),2&e){const a=t.oxw();t.xp6(9),t.Q6J("ngForOf",t.lcZ(10,5,a.daftarHuruf.standard)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(18,7,a.daftarHuruf.other)),t.xp6(9),t.Q6J("ngForOf",t.lcZ(27,9,a.daftarHuruf.dakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(35,11,a.daftarHuruf.handakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(43,13,a.daftarHuruf.yuon))}}function Ct(e,i){1&e&&t._UZ(0,"div")}function St(e,i){if(1&e&&(t.TgZ(0,"div",35),t._UZ(1,"app-material-table",36),t.qZA()),2&e){const a=t.oxw(2);t.xp6(1),t.Q6J("tableDataColumn",a.daftarAngka.column)("tableDataRow",a.daftarAngka.row)}}function jt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",40)(1,"mat-card",41),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(4).editDataset(s)}),t.TgZ(2,"mat-card-header",42),t._UZ(3,"div",43),t.TgZ(4,"mat-card-title",44)(5,"h3",45),t._uU(6),t.qZA()(),t.TgZ(7,"mat-card-subtitle",46)(8,"p",47),t._uU(9),t.qZA(),t.TgZ(10,"p",48),t._uU(11),t.qZA()()()()()}if(2&e){const a=i.$implicit;t.xp6(3),t.Udp("background-image","url("+a.image_url+")"),t.xp6(3),t.Oqu(a.kana),t.xp6(3),t.Oqu(a.romaji),t.xp6(2),t.Oqu(a.meaning)}}function Zt(e,i){if(1&e&&(t.TgZ(0,"div",17)(1,"div",38),t.YNc(2,jt,12,5,"div",39),t.qZA()()),2&e){const a=t.oxw(3);t.xp6(2),t.Q6J("ngForOf",a.daftarNihongo)}}function Ut(e,i){if(1&e&&t.YNc(0,Zt,3,1,"div",37),2&e){const a=t.oxw(2),n=t.MAs(26);t.Q6J("ngIf",a.daftarNihongo.length>0)("ngIfElse",n)}}function Rt(e,i){if(1&e&&(t.YNc(0,Ct,1,0,"div",10),t.YNc(1,St,2,2,"ng-template",null,33,t.W1O),t.YNc(3,Ut,1,2,"ng-template",null,34,t.W1O)),2&e){const a=t.MAs(2),n=t.MAs(4),o=t.oxw();t.Q6J("ngIf","angka"===o.modeTampilan)("ngIfThen",a)("ngIfElse",n)}}function Ot(e,i){1&e&&t._UZ(0,"app-no-data",49)}function Et(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"button",50),t.NdJ("click",function(){return t.CHM(a),t.oxw().addDataset()}),t.TgZ(1,"mat-icon"),t._uU(2,"add"),t.qZA()()}}let Jt=(()=>{class e{constructor(a,n,o,s,d,f,k){this.router=a,this.toast=n,this.as=o,this.gs=s,this.bs=d,this.ds=f,this.nihon=k,this.pageSizeOptions=[50,75,100,125,150],this.kategori=[{id:"hiragana",name:"Hiragana"},{id:"katakana",name:"Katakana"},{id:"angka",name:"Angka"}],this.modeTampilan="hiragana",this.daftarHuruf=null,this.daftarNihongo=[],this.daftarAngka={column:["Angka","Kana","Romaji"],row:[]},this.count=0,this.page=1,this.row=50,this.q="",this.subsDialog=null,this.subsHirakata=null,this.subsAllNihongo=null,this.subsAllKategori=null,this.dummyDataset=[{category:"number",meaning:0,kana:"\u96f6\uff0f\u30bc\u30ed",romaji:"Rei/Zero"},{category:"number",meaning:1,kana:"\u4e00",romaji:"Ichi"},{category:"number",meaning:2,kana:"\u4e8c",romaji:"Ni"},{category:"number",meaning:3,kana:"\u4e09",romaji:"San"},{category:"number",meaning:4,kana:"\u56db",romaji:"Yon/Shi"},{category:"number",meaning:5,kana:"\u4e94",romaji:"Go"},{category:"number",meaning:6,kana:"\u516d",romaji:"Roku"},{category:"number",meaning:7,kana:"\u4e03",romaji:"Nana"},{category:"number",meaning:8,kana:"\u516b",romaji:"Hachi"},{category:"number",meaning:9,kana:"\u4e5d",romaji:"Kyuu/Ku"},{category:"number",meaning:10,kana:"\u5341",romaji:"Jyuu"},{category:"number",meaning:11,kana:"\u5341\u4e00",romaji:"Jyuu Ichi"},{category:"number",meaning:12,kana:"\u5341\u4e8c",romaji:"Jyuu Ni"},{category:"number",meaning:20,kana:"\u4e8c\u5341",romaji:"Ni Jyuu"},{category:"number",meaning:21,kana:"\u4e8c\u5341\u4e00",romaji:"Ni Jyuu Ichi"},{category:"number",meaning:30,kana:"\u4e09\u5341",romaji:"San Jyuu"},{category:"number",meaning:100,kana:"\u767e",romaji:"Hyaku"},{category:"number",meaning:101,kana:"\u767e\u4e00",romaji:"Hyaku Ichi"},{category:"number",meaning:123,kana:"\u767e\u4e8c\u5341\u4e09",romaji:"Hyaku Ni Jyuu San"},{category:"number",meaning:300,kana:"\u4e09\u767e",romaji:"San Byaku"},{category:"number",meaning:600,kana:"\u516d\u767e",romaji:"Roppyaku"},{category:"number",meaning:800,kana:"\u516b\u767e",romaji:"Happyaku"},{category:"number",meaning:1e3,kana:"\u5343",romaji:"Sen"},{category:"number",meaning:3e3,kana:"\u4e09\u5343",romaji:"San Zen"},{category:"number",meaning:8e3,kana:"\u516b\u5343",romaji:"Hassen"},{category:"number",meaning:1e4,kana:"\u4e00\u4e07",romaji:"Ichi-Man"},{category:"number",meaning:1e5,kana:"\u5341\u4e07",romaji:"Jyuu-Man"},{category:"number",meaning:1e6,kana:"\u767e\u4e07",romaji:"Hyaku-Man"}],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getHirakata(),this.getAngka(),this.getKategori(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){var a,n,o,s;null===(a=this.subsDialog)||void 0===a||a.unsubscribe(),null===(n=this.subsHirakata)||void 0===n||n.unsubscribe(),null===(o=this.subsAllNihongo)||void 0===o||o.unsubscribe(),null===(s=this.subsAllKategori)||void 0===s||s.unsubscribe()}changeModeTampilan(a){this.gs.log("[BELAJAR_CHANGE_KANA]",a),this.modeTampilan=a,this.count=0,this.page=1,this.row=50,this.q="",this.resetPaginator()}applyFilter(a){this.gs.log("[BELAJAR_SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[BELAJAR_PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.gs.includesOneOf(this.modeTampilan,["hiragana","katakana","angka"])||(this.daftarNihongo=[],this.getData())}resetPaginator(){var a,n;null===(a=this.paginator)||void 0===a||a._changePageSize(this.pageSizeOptions[0]),null===(n=this.paginator)||void 0===n||n.firstPage()}openDmak(a){this.gs.log("[BELAJAR_OPEN_DMAK]",a),this.subsDialog=this.ds.openDmakDialog({data:{romaji:a.romaji,hiragana_katakana_kanji:"hiragana"===this.modeTampilan?a.hiragana:a.katakana},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[BELAJAR_DMAK_DIALOG_CLOSED]",n),this.subsDialog.unsubscribe()}})}getHirakata(){this.bs.busy(),this.subsHirakata=this.nihon.getHirakata().subscribe({next:a=>{this.gs.log("[BELAJAR_HIRAKATA_SUCCESS]",a);const n={};for(const o of a.results)n[o.category]||(n[o.category]={}),n[o.category][o.segment]||(n[o.category][o.segment]=[]),n[o.category][o.segment].push({romaji:o.romaji,hiragana:o.hiragana,katakana:o.katakana});this.daftarHuruf=n,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_HIRAKATA_ERROR]",a,"error"),this.bs.idle()}})}getAngka(){const a=[];for(const n of this.dummyDataset)a.push({Angka:n.meaning,Kana:n.kana,Romaji:n.romaji});this.daftarAngka.row=a}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a),this.kategori=[...this.kategori,...a.results],this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getData(){this.bs.busy(),this.subsAllNihongo=this.nihon.getAllNihongo(this.modeTampilan,this.q,this.page,this.row).subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_LIST_SUCCESS]",a),this.count=a.count,this.daftarNihongo=a.results,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_LIST_ERROR]",a,"error"),this.bs.idle()}})}editDataset(a){var n,o,s,d,f,k;this.gs.log("[BELAJAR_DATASET_ADD_OR_EDIT_CLICK]",a),(!a&&(null===(o=null===(n=this.as.currentUserSubject)||void 0===n?void 0:n.value)||void 0===o?void 0:o.verified)||a&&((null===(d=null===(s=this.as.currentUserSubject)||void 0===s?void 0:s.value)||void 0===d?void 0:d.role)===r.yS.ADMIN||(null===(k=null===(f=this.as.currentUserSubject)||void 0===f?void 0:f.value)||void 0===k?void 0:k.role)===r.yS.MODERATOR))&&(this.subsDialog=this.ds.openBelajarDialog({data:{title:a?"Edit Data":"Tambah Dataset",modeTampilan:this.modeTampilan,dataset:a,confirmText:"Simpan",cancelText:"Tutup"}}).afterClosed().subscribe({next:da=>{this.gs.log("[BELAJAR_DATASET_DIALOG_CLOSED]",da),this.getData(),this.subsDialog.unsubscribe()}}))}addDataset(){var a,n,o;(null===(a=this.as.currentUserSubject)||void 0===a?void 0:a.value)?(null===(o=null===(n=this.as.currentUserSubject)||void 0===n?void 0:n.value)||void 0===o?void 0:o.verified)?this.editDataset(null):(this.toast.warning("Khusus Pengguna Terverifikasi","Whoops!",null,!0),this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url}})):this.router.navigate(["/login"],{queryParams:{returnUrl:"/nihongo/belajar"}})}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(B.k),t.Y36(ot.e),t.Y36(v.U),t.Y36(y.z),t.Y36(j.x),t.Y36(C.a))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-belajar"]],viewQuery:function(a,n){if(1&a&&t.Gf(x.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(n.paginator=o.first)}},decls:28,vars:13,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-6","col-lg-4",3,"color"],[3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["class","ms-auto pt-3 col-6 col-lg-4",3,"color",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["hirakata",""],["kataBendaLainnya",""],[1,"position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["noData",""],["mat-fab","","color","warn","class","me-3 mb-5 fab-button animate__animated animate__bounce animate__infinite animate__slow","matTooltip","Tambah Dataset","style","position: fixed; bottom: 0; right: 0; z-index: 999999;",3,"click",4,"ngIf"],[3,"value"],[1,"ms-auto","pt-3","col-6","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u81ea\u8ee2\u8eca\u3001\u30de\u30de\u30c1\u30e3\u30ea",3,"ngModel","keyup.enter","ngModelChange"],["matSuffix",""],[1,"col-12","col-md-6"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],["class","row text-center px-3",4,"ngFor","ngForOf"],[1,"row","text-center","px-3"],["class","col p-1",4,"ngFor","ngForOf"],[1,"col","p-1"],["class","rounded img-thumbnail","style","cursor: pointer;",3,"src","click",4,"ngIf"],[1,"rounded","img-thumbnail",2,"cursor","pointer",3,"src","click"],["angka",""],["selainAngka",""],[1,"p-3"],[3,"tableDataColumn","tableDataRow"],["class","col-12",4,"ngIf","ngIfElse"],["appDomChange","",1,"row","px-3"],["class","col-12 col-md-6 col-lg-4 col-xl-3 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-lg-4","col-xl-3","p-2"],[1,"card",3,"click"],[1,"me-0",2,"cursor","pointer"],["mat-card-avatar","",2,"background-size","contain","border-radius","0","background-position","center","background-repeat","no-repeat"],[1,"text-warning","mb-1",2,"cursor","pointer"],["matLine","",1,"mb-0"],[1,"mb-0"],["matLine","",1,"m-0","text-success"],["matLine","",1,"m-0"],[1,"col-12","p-3"],["mat-fab","","color","warn","matTooltip","Tambah Dataset",1,"me-3","mb-5","fab-button","animate__animated","animate__bounce","animate__infinite","animate__slow",2,"position","fixed","bottom","0","right","0","z-index","999999",3,"click"]],template:function(a,n){if(1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h3",5)(7,"mat-form-field",6)(8,"mat-label"),t._uU(9,"Pilih Kategori"),t.qZA(),t.TgZ(10,"mat-select",7),t.NdJ("valueChange",function(s){return n.modeTampilan=s})("valueChange",function(s){return n.changeModeTampilan(s)}),t.YNc(11,st,2,2,"mat-option",8),t.qZA()(),t.YNc(12,lt,6,2,"mat-form-field",9),t.qZA()(),t.YNc(13,ct,1,0,"div",10),t.YNc(14,yt,44,15,"ng-template",null,11,t.W1O),t.YNc(16,Rt,5,3,"ng-template",null,12,t.W1O),t.qZA(),t.TgZ(18,"div",13)(19,"mat-paginator",14),t.NdJ("page",function(s){return n.paginatorChanged(s)}),t.qZA()()(),t.TgZ(20,"div",15)(21,"div",16)(22,"div",17),t._UZ(23,"app-banner-discord")(24,"app-stats-server"),t.qZA()()()()(),t.YNc(25,Ot,1,0,"ng-template",null,18,t.W1O),t.YNc(27,Et,3,0,"button",19)),2&a){const o=t.MAs(15),s=t.MAs(17);t.xp6(7),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",n.modeTampilan),t.xp6(1),t.Q6J("ngForOf",n.kategori),t.xp6(1),t.Q6J("ngIf","hiragana"!==n.modeTampilan&&"katakana"!==n.modeTampilan&&"angka"!==n.modeTampilan),t.xp6(1),t.Q6J("ngIf",("hiragana"===n.modeTampilan||"katakana"===n.modeTampilan)&&n.daftarHuruf)("ngIfThen",o)("ngIfElse",s),t.xp6(5),t.Udp("display","hiragana"!==n.modeTampilan&&"katakana"!==n.modeTampilan&&"angka"!==n.modeTampilan?"block":"none"),t.xp6(1),t.Q6J("color","accent")("length",n.count)("pageSizeOptions",n.pageSizeOptions),t.xp6(8),t.Q6J("ngIf","hiragana"!==n.modeTampilan&&"katakana"!==n.modeTampilan&&"angka"!==n.modeTampilan)}},directives:[T.t,b.KE,b.hX,L.gD,c.sg,Z.ey,c.O5,w.Nt,_.Fj,_.nD,_.JJ,_.On,A.Hw,b.R9,rt.I,q.S,m.a8,m.dk,m.kc,m.n5,Z.X2,m.$j,x.NW,J.B,D.X,I.d,E.lW,M.gM],pipes:[c.Nd],styles:[""]}),e})();function Dt(e,i){if(1&e&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&e){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("N",a,"")}}function Bt(e,i){if(1&e&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&e){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("Kelas ",a,"")}}function Lt(e,i){1&e&&t._UZ(0,"app-no-data",18)}function wt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",21)(1,"div",22),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(2).openEdict(s)}),t.TgZ(2,"div",23)(3,"h5",24),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6),t.qZA()(),t.TgZ(7,"div",25)(8,"span",26),t._uU(9),t.qZA(),t.TgZ(10,"span"),t._uU(11," - "),t.qZA(),t.TgZ(12,"span",27),t._uU(13),t.qZA()()()()}if(2&e){const a=i.$implicit;t.xp6(4),t.Oqu(a.character),t.xp6(2),t.Oqu(a.translate),t.xp6(3),t.hij("N",a.jlpt,""),t.xp6(4),t.hij("S",a.school,"")}}function qt(e,i){if(1&e&&(t.TgZ(0,"div",11)(1,"div",19),t.YNc(2,wt,14,4,"div",20),t.qZA()()),2&e){const a=t.oxw();t.xp6(2),t.Q6J("ngForOf",a.kanjiData)}}const It=function(){return[5,4,3,2,1]},Mt=function(){return[1,2,3,4,5,6,7,8,9]};let Kt=(()=>{class e{constructor(a,n,o,s){this.gs=a,this.bs=n,this.nihon=o,this.ds=s,this.pageSizeOptions=[50,75,100,125,150],this.jlpt="",this.school="",this.count=0,this.page=1,this.row=50,this.q="",this.sort="",this.order="",this.kanjiData=[],this.subsKanji=null,this.subsDialog=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getKanji(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){var a,n;null===(a=this.subsKanji)||void 0===a||a.unsubscribe(),null===(n=this.subsDialog)||void 0===n||n.unsubscribe()}changeJlpt(a){this.gs.log("[JLPT_CHANGED]",a),this.jlpt=a,this.resetPaginator()}changeSchool(a){this.gs.log("[SCHOOL_CHANGED]",a),this.school=a,this.resetPaginator()}applyFilter(a){this.gs.log("[SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getKanji()}resetPaginator(){this.paginator._changePageSize(this.pageSizeOptions[0]),this.paginator.firstPage()}getKanji(){this.bs.busy(),this.subsKanji&&(this.subsKanji.unsubscribe(),this.bs.idle()),this.subsKanji=this.nihon.getAllKanji(this.jlpt,this.school,this.q,this.page,this.row,"context","asc").subscribe({next:a=>{this.gs.log("[KANJI_LIST_SUCCESS]",a),this.count=a.count,this.kanjiData=a.results,this.bs.idle()},error:a=>{this.gs.log("[KANJI_LIST_ERROR]",a,"error"),this.bs.idle()}})}openEdict(a){this.gs.log("[HIRAKATA_OPEN_EDICT]",a),this.subsDialog=this.ds.openEdictDialog({data:{character:a.character,context:a.context,freq:a.freq,gakken:a.gakken,harlpern_kkld:a.harlpern_kkld,harlpern_njecd:a.harlpern_njecd,jlpt:a.jlpt,maniette:a.maniette,nelson_c:a.nelson_c,nelson_n:a.nelson_n,remember:a.remember,school:a.school,skip:a.skip,stroke:a.stroke,translate:a.translate,v_kunyomi:a.v_kunyomi,v_onyomi:a.v_onyomi},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[EDICT_DIALOG_CLOSED]",n),this.subsDialog.unsubscribe()}})}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(v.U),t.Y36(y.z),t.Y36(C.a),t.Y36(j.x))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-kanji"]],viewQuery:function(a,n){if(1&a&&t.Gf(x.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(n.paginator=o.first)}},decls:31,vars:15,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-4","col-lg-2",3,"color"],[3,"value","valueChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[1,"ms-auto","pt-3","col-4","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u79c1",3,"ngModel","keyup.enter","ngModelChange"],["matSuffix",""],[1,"col-12"],[1,"row"],["class","col-12 p-3",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"container","position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[3,"value"],[1,"col-12","p-3"],["appDomChange","",1,"row","px-3"],["class","col-6 col-md-3 col-lg-2 p-2",4,"ngFor","ngForOf"],[1,"col-6","col-md-3","col-lg-2","p-2"],[1,"card","text-center","p-3",2,"cursor","pointer",3,"click"],[1,"card-body","p-0"],[1,"card-title","py-3",2,"font-size","300%"],[1,"position-absolute","top-0","end-0",2,"margin-right","3px","font-size","x-small"],[1,"text-warning"],[1,"text-info"]],template:function(a,n){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"h3",3)(5,"mat-form-field",4)(6,"mat-label"),t._uU(7,"JLPT"),t.qZA(),t.TgZ(8,"mat-select",5),t.NdJ("valueChange",function(s){return n.jlpt=s})("valueChange",function(s){return n.changeJlpt(s)}),t.TgZ(9,"mat-option",6),t._uU(10,"Semua"),t.qZA(),t.YNc(11,Dt,2,2,"mat-option",7),t.qZA()(),t.TgZ(12,"mat-form-field",4)(13,"mat-label"),t._uU(14,"Sekolah"),t.qZA(),t.TgZ(15,"mat-select",5),t.NdJ("valueChange",function(s){return n.school=s})("valueChange",function(s){return n.changeSchool(s)}),t.TgZ(16,"mat-option",6),t._uU(17,"Semua"),t.qZA(),t.YNc(18,Bt,2,2,"mat-option",7),t.qZA()(),t.TgZ(19,"mat-form-field",8)(20,"mat-label"),t._uU(21,"Cari ..."),t.qZA(),t.TgZ(22,"input",9),t.NdJ("keyup.enter",function(s){return n.applyFilter(s)})("ngModelChange",function(s){return n.q=s}),t.qZA(),t.TgZ(23,"mat-icon",10),t._uU(24,"search"),t.qZA()()()(),t.TgZ(25,"div",11)(26,"div",12),t.YNc(27,Lt,1,0,"app-no-data",13),t.YNc(28,qt,3,1,"div",14),t.qZA()()()(),t.TgZ(29,"div",15)(30,"mat-paginator",16),t.NdJ("page",function(s){return n.paginatorChanged(s)}),t.qZA()()),2&a&&(t.xp6(5),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",n.jlpt),t.xp6(3),t.Q6J("ngForOf",t.DdM(13,It)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",n.school),t.xp6(3),t.Q6J("ngForOf",t.DdM(14,Mt)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",n.q),t.xp6(5),t.Q6J("ngIf",n.kanjiData.length<=0),t.xp6(1),t.Q6J("ngIf",n.kanjiData.length>0),t.xp6(2),t.Q6J("color","accent")("length",n.count)("pageSizeOptions",n.pageSizeOptions))},directives:[T.t,b.KE,b.hX,L.gD,Z.ey,c.sg,w.Nt,_.Fj,_.nD,_.JJ,_.On,A.Hw,b.R9,c.O5,I.d,q.S,x.NW],styles:[""]}),e})();var Ht=l(5934),Qt=l(7814),Ft=l(7544),zt=l(1617);function Yt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",23)(1,"div",6)(2,"div",7),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(2).openProfile(s.value.username)}),t._UZ(3,"div",24),t.TgZ(4,"div"),t._uU(5),t.qZA()()()()}if(2&e){const a=i.$implicit,n=i.index;t.xp6(3),t.Jzz("\n background-image: url('",a.value.image_url,"');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.Q6J("matBadge",null==a||null==a.value?null:a.value.profile_.points)("matBadgeColor",0===n?"warn":1===n?"primary":"accent"),t.xp6(1),t.Gre("pt-1 ",0===n?"gradient-text":"",""),t.xp6(1),t.Oqu(a.value.username)}}function Pt(e,i){1&e&&t._UZ(0,"div")}function $t(e,i){if(1&e&&t._UZ(0,"div",25),2&e){const a=t.oxw(2);t.Jzz("\n background-size: contain;\n border-radius: 0px;\n background-position: center center;\n background-repeat: no-repeat;\n background-image: url('",a.getQuiz.question[a.question],"');\n ")}}function Gt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",26),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).openEdict()}),t._uU(1),t.qZA()}if(2&e){const a=t.oxw(2);t.xp6(1),t.hij(" ",a.swapOptions?a.getQuiz.question[a.question]:a.getQuiz.question[a.options]," ")}}function Wt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div")(1,"div",27),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(2).selectAnswer(s)}),t.TgZ(2,"div"),t._uU(3),t.qZA()()()}if(2&e){const a=i.$implicit,n=t.oxw(2);t.Gre("",n.ROUTER.url.includes("/kelas-")||n.ROUTER.url.includes("/jlpt-")||n.ROUTER.url.includes("/semua-kanji")||n.ROUTER.url.includes("/latihan-")?"col-md-6 col-12":"col-md-4 col-6"," p-2"),t.xp6(2),t.Gre("card-body ",n.ROUTER.url.includes("/kelas-")||n.ROUTER.url.includes("/jlpt-")||n.ROUTER.url.includes("/semua-kanji")?"p-0":"px-0",""),t.Udp("font-size",n.ROUTER.url.includes("/kelas-")||n.ROUTER.url.includes("/jlpt-")||n.ROUTER.url.includes("/semua-kanji")?"100%":"250%"),t.xp6(1),t.hij(" ",n.swapOptions?a[n.options]:a[n.question]," ")}}function Xt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",28)(1,"div",29),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).swapCharacter()}),t.TgZ(2,"div",30),t._uU(3,"\u{1f38c}"),t.qZA()()()}}function Vt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3),t.YNc(3,Yt,6,9,"div",4),t.ALo(4,"keyvalue"),t.TgZ(5,"div",5)(6,"div",6)(7,"div",7),t.NdJ("click",function(){return t.CHM(a),t.oxw().openLiveChat()}),t._UZ(8,"div",8),t.TgZ(9,"div",9),t._uU(10,"Semua Peserta"),t.qZA()()()()(),t.TgZ(11,"div",10)(12,"div",2),t._UZ(13,"hr",11),t.qZA()(),t.TgZ(14,"div",10)(15,"div",12)(16,"div",10)(17,"div",13)(18,"div",14),t.YNc(19,Pt,1,0,"div",15),t.YNc(20,$t,1,3,"ng-template",null,16,t.W1O),t.YNc(22,Gt,2,1,"ng-template",null,17,t.W1O),t.qZA()()(),t.TgZ(24,"div",10)(25,"div",13)(26,"div",18),t.YNc(27,Wt,4,9,"div",19),t.YNc(28,Xt,4,0,"div",20),t.qZA()()()(),t.TgZ(29,"div",21),t._UZ(30,"app-live-chat",22),t.qZA()()()()}if(2&e){const a=t.MAs(21),n=t.MAs(23),o=t.oxw();t.xp6(3),t.Q6J("ngForOf",t.xi3(4,10,o.participants,o.scoreOrder)),t.xp6(5),t.Jzz("\n background-image: url('",o.ENV.baseUrl,"/assets/img/favicon.png');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.xp6(11),t.Q6J("ngIf","image_url"===o.question)("ngIfThen",a)("ngIfElse",n),t.xp6(8),t.Q6J("ngForOf",o.getQuiz.options),t.xp6(1),t.Q6J("ngIf",!(o.ROUTER.url.includes("/kelas-")||o.ROUTER.url.includes("/jlpt-")||o.ROUTER.url.includes("/semua-kanji")||o.ROUTER.url.includes("/latihan-"))),t.xp6(2),t.Q6J("chatOnly",!0)}}let ta=(()=>{class e{constructor(a,n,o,s,d){this.router=a,this.gs=n,this.rps=o,this.quiz=s,this.ds=d,this.question="hiragana",this.options="romaji",this.swapOptions=!0,this.participants=null,this.subsParticipant=null,this.subsDialog=null,this.scoreOrder=(f,k)=>f.value.profile_.points>k.value.profile_.points?-1:k.value.profile_.points>f.value.profile_.points?1:0}get ENV(){return Ht.N}get ROUTER(){return this.router}get getQuiz(){return this.quiz.getCurrentQuizQuestion(this.router.url)}ngOnDestroy(){var a,n;null===(a=this.subsParticipant)||void 0===a||a.unsubscribe(),null===(n=this.subsDialog)||void 0===n||n.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.subsParticipant=this.quiz.getCurrentQuizRoom().subscribe({next:a=>{this.participants=null==a?void 0:a.member_list}}))}selectAnswer(a){this.quiz.answerQuestion({roomId:this.router.url,randomInteger:this.getQuiz.randomInteger,answer:a})}swapCharacter(){this.swapOptions=!this.swapOptions}openLiveChat(){this.rps.toggleSidePanel("LiveChatComponent")}openProfile(a){this.router.navigateByUrl(`/user/${a}`)}openEdict(){this.gs.log("[QUIZ_OPEN_EDICT]",this.getQuiz),this.getQuiz.question.character&&(this.subsDialog=this.ds.openEdictDialog({data:this.getQuiz.question,disableClose:!1}).afterClosed().subscribe({next:a=>{this.gs.log("[EDICT_DIALOG_CLOSED]",a),this.subsDialog.unsubscribe()}}))}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(v.U),t.Y36(Qt.C),t.Y36(O),t.Y36(j.x))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-quiz"]],inputs:{question:"question",options:"options"},decls:1,vars:1,consts:[["class","row px-0",4,"ngIf"],[1,"row","px-0"],[1,"col-12"],[1,"row","w-100","ps-3",2,"display","inline-flex","flex-wrap","nowrap","overflow-x","hidden"],["class","p-2","style","width: auto;",4,"ngFor","ngForOf"],[1,"ms-auto","p-2","bg-bifeldy",2,"width","auto","position","sticky","right","0"],[1,"card","text-center","border-0",2,"width","64px","background","transparent !important"],[1,"card-body","p-0",2,"cursor","pointer",3,"click"],[1,"rounded-3"],[1,"pt-1"],[1,"row"],[1,"my-1","border-bottom-dotted",2,"height","4px","background","url(/assets/img/stripe.png)"],[1,"col-lg-8","col-xl-9","p-3","text-center"],[1,"col-12","p-4"],[1,"mx-auto","card","p-3"],[4,"ngIf","ngIfThen","ngIfElse"],["menengah",""],["bukanMenengah",""],[1,"row","text-center"],[3,"class",4,"ngFor","ngForOf"],["class","col-6 col-md-4 p-2",4,"ngIf"],[1,"col-lg-4","col-xl-3","d-none","d-lg-block","d-xl-block"],[3,"chatOnly"],[1,"p-2",2,"width","auto"],["matBadgePosition","below",1,"rounded-3",3,"matBadge","matBadgeColor"],[1,"card-body","p-3","py-5"],[1,"card-body","p-3","py-5",2,"cursor","pointer","font-size","500%",3,"click"],[1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"col-6","col-md-4","p-2"],["matTooltip","Tukar Huruf",1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"card-body","px-0",2,"font-size","250%"]],template:function(a,n){1&a&&t.YNc(0,Vt,31,13,"div",0),2&a&&t.Q6J("ngIf",n.getQuiz)},directives:[c.O5,c.sg,Ft.k,M.gM,zt.u],pipes:[c.Nd],styles:[""]}),e})();function aa(e,i){if(1&e&&t._UZ(0,"app-quiz",2),2&e){const a=t.oxw();t.Q6J("question",a.GS.routerData.question)("options",a.GS.routerData.options)}}let p=(()=>{class e{constructor(a,n,o,s){this.router=a,this.toast=n,this.gs=o,this.ss=s,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){var a;this.gs.isBrowser&&((null===(a=this.ss.mySocket)||void 0===a?void 0:a.id)||(this.toast.warning("Tidak Dapat Terhubung Melalui Web Socket","Gagal Menyambung Ke Jaringan!",null,!0),this.router.navigateByUrl("/nihongo")),this.gs.isDarkMode||this.gs.toggleDarkTheme())}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(B.k),t.Y36(v.U),t.Y36(R.R))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-tes"]],decls:3,vars:1,consts:[[1,"container"],[3,"question","options",4,"ngIf"],[3,"question","options"]],template:function(a,n){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0),t.YNc(2,aa,1,2,"app-quiz",1),t.qZA()),2&a&&(t.xp6(2),t.Q6J("ngIf",n.GS.routerData.question&&n.GS.routerData.options))},directives:[T.t,c.O5,ta],styles:[""]}),e})();var ea=l(8613),na=l(4854),ia=l(669),oa=l(913),ra=l(6436),K=l(5116);let sa=(()=>{class e{}return e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[c.ez,h.Bz,N.m,K.d]]}),e})();var la=l(617);let ca=(()=>{class e{}return e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[c.ez,N.m,h.Bz]]}),e})();var ga=l(2438),ua=l(7956);const pa=[{path:"",pathMatch:"full",component:it},{path:"belajar",component:Jt,data:{title:"Huruf, Angka, Warna, Buah & Sayur, Dan Lingkungan Sekitar",description:"Mengenal Sambil Belajar Berbagai Macam",keywords:"Sesuatu Yang Sering Kita Temukan",question:null,options:null}},{path:"kanji",component:Kt,data:{title:"Huruf Kanji",description:"Mengenal Huruf Kanji Sesuai Rank JLPT & Sekolah",keywords:"Kanji",question:null,options:null}},{path:"hiragana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Hiragana",description:"Uji Kemampuan Huruf Hiragana",keywords:"Hiragana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"hiragana",options:"romaji"}},{path:"katakana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Katakana",description:"Uji Kemampuan Huruf Katakana",keywords:"Katakana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"katakana",options:"romaji"}},{path:"jlpt-n5",component:p,canActivate:[u.t],data:{title:"Tes Huruf N5",description:"Uji Kemampuan Huruf N5",keywords:"N5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n4",component:p,canActivate:[u.t],data:{title:"Tes Huruf N4",description:"Uji Kemampuan Huruf N4",keywords:"N4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n3",component:p,canActivate:[u.t],data:{title:"Tes Huruf N3",description:"Uji Kemampuan Huruf N3",keywords:"N3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n2",component:p,canActivate:[u.t],data:{title:"Tes Huruf N2",description:"Uji Kemampuan Huruf N2",keywords:"N2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n1",component:p,canActivate:[u.t],data:{title:"Tes Huruf N1",description:"Uji Kemampuan Huruf N1",keywords:"N1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 1",description:"Uji Kemampuan Huruf Kelas 1",keywords:"Kelas 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 2",description:"Uji Kemampuan Huruf Kelas 2",keywords:"Kelas 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-3",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 3",description:"Uji Kemampuan Huruf Kelas 3",keywords:"Kelas 3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-4",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 4",description:"Uji Kemampuan Huruf Kelas 4",keywords:"Kelas 4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-5",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 5",description:"Uji Kemampuan Huruf Kelas 5",keywords:"Kelas 5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-6",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 6",description:"Uji Kemampuan Huruf Kelas 6",keywords:"Kelas 6",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 1",description:"Uji Kemampuan Huruf Lanjutan 1",keywords:"Lanjutan 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 2",description:"Uji Kemampuan Huruf Lanjutan 2",keywords:"Lanjutan 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"semua-kanji",component:p,canActivate:[u.t],data:{title:"Tes Huruf Semua Kanji",description:"Uji Kemampuan Huruf Semua Kanji",keywords:"Semua Kanji",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:":category",component:p,canActivate:[u.t],data:{title:"Tes Kategori Lainnya",description:"Uji Kemampuan Kategori Lainnya",keywords:"Kategori Lainnya",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"image_url",options:"kana"}}];let ma=(()=>{class e{}return e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[c.ez,h.Bz.forChild(pa),_.u5,_.UX,ea.F,na.R,oa.g,ra.L,N.m,Q.Ad,H.UM,ia.A,K.d,sa,la.H,ua.C,ca,ga.d]]}),e})()}}]); \ No newline at end of file +"use strict";(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[750],{6750:(ha,U,l)=>{l.r(U),l.d(U,{NihongoModule:()=>ma});var c=l(9808),h=l(8406),_=l(3075),H=l(9345),Q=l(1385),g=l(6271),r=l(4249),u=l(2777),N=l(210),t=l(5e3),v=l(8696),y=l(3e3),C=l(2663),T=l(8616),m=l(9224);function F(e,i){if(1&e&&(t.TgZ(0,"div",4)(1,"mat-card",5),t._UZ(2,"img",6),t.TgZ(3,"mat-card-content",7)(4,"h3")(5,"b"),t._uU(6),t.qZA()()()()()),2&e){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.Q6J("src",a.image_url,t.LSH),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(3),t.Oqu(a.title)}}let z=(()=>{class e{constructor(a){this.gs=a,this.nihongoMenu=[{url:"belajar",title:"Pengenalan Aksara",image_url:"/assets/img/nihongo/hirakata.png"},{url:"kanji",title:"Pengayaan Kanji (* JP-EN)",image_url:"/assets/img/nihongo/jlpt.png"}]}ngOnInit(){}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(v.U))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-banner-nihongo"]],decls:4,vars:1,consts:[[1,"row"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-md-6 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","p-2"],[1,"gradient-border","rgb-border"],["mat-card-image","",2,"height","128px","object-fit","cover","cursor","pointer",3,"src","routerLink"],[2,"cursor","pointer",3,"routerLink"]],template:function(a,n){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t.YNc(3,F,7,4,"div",3),t.qZA()()()),2&a&&(t.xp6(3),t.Q6J("ngForOf",n.nihongoMenu))},directives:[c.sg,m.a8,m.G2,h.rH,m.dn],styles:[""]}),e})();var A=l(5245),Y=l(8757),P=l(9731),R=l(8381);let O=(()=>{class e{constructor(a,n,o){this.api=a,this.gs=n,this.ss=o}getCurrentQuizRoom(){return this.ss.currentRoom}getCurrentQuizQuestion(a){return this.ss.quizRoom[a]}answerQuestion(a){this.ss.socketEmit("quiz-answer",a)}getQuizLeaderboard(a="",n=1,o=10,s="",d=""){return this.api.getData(`/quiz-leaderboard?q=${a}&page=${n}&row=${o}&sort=${s}&order=${d}`)}}return e.\u0275fac=function(a){return new(a||e)(t.LFG(P.s),t.LFG(v.U),t.LFG(R.R))},e.\u0275prov=t.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var S=l(4623),E=l(7423);function $(e,i){if(1&e&&(t.TgZ(0,"mat-list-option",10),t._UZ(1,"img",11),t.TgZ(2,"a",12)(3,"span",13),t._uU(4),t.qZA(),t.TgZ(5,"span",14),t._uU(6),t.qZA(),t.TgZ(7,"span",15),t._uU(8),t.qZA()()()),2&e){const a=i.$implicit;t.MGl("routerLink","/user/",a.username,""),t.xp6(1),t.s9C("src",a.image_url,t.LSH),t.xp6(3),t.hij(" ",a.points," "),t.xp6(2),t.Oqu(a.rank),t.xp6(2),t.Oqu(a.username)}}let G=(()=>{class e{constructor(a,n){this.gs=a,this.qs=n,this.leaderboardData=[],this.leaderBoardTotalPages=1,this.leaderboardPage=1,this.subsLeaderboard=null}ngOnInit(){this.gs.isBrowser&&this.getLeaderboard()}ngOnDestroy(){var a;null===(a=this.subsLeaderboard)||void 0===a||a.unsubscribe()}getLeaderboard(){this.subsLeaderboard=this.qs.getQuizLeaderboard("",this.leaderboardPage).subscribe({next:a=>{this.gs.log("[LEADERBOARD_LIST_SUCCESS]",a),this.leaderBoardTotalPages=a.pages,this.leaderboardData=a.results},error:a=>{this.gs.log("[LEADERBOARD_LIST_ERROR]",a,"error")}})}prevBoard(){this.leaderboardPage--,this.leaderboardPage<=0&&(this.leaderboardPage=1),this.getLeaderboard()}nextBoard(){this.leaderboardPage++,this.getLeaderboard()}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(v.U),t.Y36(O))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-leaderboard"]],decls:19,vars:8,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"float-end","text-warning",2,"font-size","small","cursor","pointer",3,"click"],[1,"text-bifeldy"],[1,"col-12"],[3,"multiple"],["class","h-100",3,"routerLink",4,"ngFor","ngForOf"],[1,"col-12","text-end"],["mat-button","","color","accent",3,"disabled","click"],[1,"h-100",3,"routerLink"],["matListAvatar","",1,"ms-3",3,"src"],[1,"text-truncate","text-decoration-none"],[1,"bg-bifeldy","px-2","me-1","text-warning",2,"position","absolute","right","0"],[1,"me-3","text-danger"],[1,"text-success"]],template:function(a,n){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"span",3),t.NdJ("click",function(){return n.getLeaderboard()}),t._uU(4," Refresh "),t.qZA(),t.TgZ(5,"b",4),t._uU(6,"Rank Points"),t.qZA()()(),t.TgZ(7,"div",5)(8,"mat-selection-list",6),t.YNc(9,$,9,5,"mat-list-option",7),t.ALo(10,"slice"),t.qZA(),t.TgZ(11,"div",0)(12,"div",8)(13,"button",9),t.NdJ("click",function(){return n.prevBoard()}),t.TgZ(14,"mat-icon"),t._uU(15,"navigate_before"),t.qZA()(),t.TgZ(16,"button",9),t.NdJ("click",function(){return n.nextBoard()}),t.TgZ(17,"mat-icon"),t._uU(18,"navigate_next"),t.qZA()()()()()()),2&a&&(t.xp6(8),t.Q6J("multiple",!1),t.xp6(1),t.Q6J("ngForOf",t.Dn7(10,4,n.leaderboardData,0,10)),t.xp6(4),t.Q6J("disabled",n.leaderboardPage<=1),t.xp6(3),t.Q6J("disabled",n.leaderboardPage>=n.leaderBoardTotalPages))},directives:[S.Ub,c.sg,S.vS,h.rH,S.eA,E.lW,A.Hw],pipes:[c.OU],styles:[""]}),e})();var J=l(3331),D=l(8921);function W(e,i){if(1&e&&(t.TgZ(0,"mat-icon",22),t._uU(1),t.qZA()),2&e){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.icon)}}function X(e,i){if(1&e&&(t.TgZ(0,"div",15)(1,"mat-card",16)(2,"mat-card-header",17)(3,"div",18),t.YNc(4,W,2,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&e){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function V(e,i){if(1&e&&(t.TgZ(0,"mat-icon",22),t._uU(1),t.qZA()),2&e){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.icon)}}function tt(e,i){if(1&e&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,V,2,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&e){const a=i.$implicit;t.xp6(2),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}function at(e,i){if(1&e&&(t.TgZ(0,"div",3)(1,"div",4)(2,"h2",5)(3,"b",6),t._uU(4,"Latihan Menengah"),t.qZA()()(),t.TgZ(5,"div",7)(6,"div",8),t.YNc(7,tt,10,6,"div",9),t.qZA()()()),2&e){const a=t.oxw();t.xp6(7),t.Q6J("ngForOf",a.testMenengah)}}function et(e,i){if(1&e&&(t.TgZ(0,"mat-icon",22),t._uU(1),t.qZA()),2&e){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.icon)}}function nt(e,i){if(1&e&&(t.TgZ(0,"div",15)(1,"mat-card")(2,"mat-card-header",17)(3,"div",18),t.YNc(4,et,2,1,"mat-icon",19),t.qZA(),t.TgZ(5,"mat-card-title",20)(6,"h3",21),t._uU(7),t.qZA()(),t.TgZ(8,"mat-card-subtitle",21),t._uU(9),t.qZA()()()()),2&e){const a=i.$implicit;t.xp6(1),t.Tol(a.name.startsWith("JLPT")?"rgb-border":"All Kanji"===a.name?"gradient-border rgb-border":""),t.xp6(1),t.MGl("routerLink","/nihongo/",a.url,""),t.xp6(1),t.Udp("background-image","url("+(a.image_url||"")+")"),t.xp6(1),t.Q6J("ngIf",a.icon),t.xp6(3),t.Oqu(a.name),t.xp6(2),t.Oqu(a.letter)}}let it=(()=>{class e{constructor(a,n,o,s){this.router=a,this.gs=n,this.bs=o,this.nihon=s,this.testDasar=[{url:"hiragana",name:"Hiragana",image_url:"/assets/img/nihongo/hiragana.png",icon:null,letter:"~46 Unik"},{url:"katakana",name:"Katakana",image_url:"/assets/img/nihongo/katakana.png",icon:null,letter:"~46 Unik"},{url:"angka",name:"Angka",image_url:null,icon:"plus_one",letter:"~\u221e Unik"}],this.testMenengah=[],this.testLanjutan=[{url:"kelas-1",name:"Kelas 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~80 Unik"},{url:"kelas-2",name:"Kelas 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~160 Unik"},{url:"kelas-3",name:"Kelas 3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-4",name:"Kelas 4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~200 Unik"},{url:"kelas-5",name:"Kelas 5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~185 Unik"},{url:"kelas-6",name:"Kelas 6",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~181 Unik"},{url:"kelas-lanjutan-1",name:"Lanjutan 1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1139 Unik"},{url:"kelas-lanjutan-2",name:"Lanjutan 2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~349 Unik"},{url:"jlpt-n5",name:"JLPT N5",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~79 Unik"},{url:"jlpt-n4",name:"JLPT N4",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~166 Unik"},{url:"jlpt-n3",name:"JLPT N3",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n2",name:"JLPT N2",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~367 Unik"},{url:"jlpt-n1",name:"JLPT N1",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~1231 Unik"},{url:"semua-kanji",name:"All Kanji",image_url:"/assets/img/nihongo/kanji.png",icon:null,letter:"~2494 Unik"}],this.tabData=[{name:"JLPT Roadmap",icon:"pin_drop",type:"html",data:'\n
\n \n \n
\n

Sumber gambar dan informasi: KawaKawa

\n

\u201cJLPT\u201d adalah singkatan dari Japanese-Language Proficiency Test (Tes Kemampuan Bahasa Jepang). JLPT adalah salah satu ujian kecakapan bahasa Jepang internasional yang paling terkenal. Ini memiliki lima level, dengan level lima (secara resmi disebut N5) menjadi yang termudah dan level satu (N1) menjadi yang paling sulit.

\n

JLPT dulu memiliki empat level tetapi sekarang dibagi menjadi lima (N5, N4, N3, N2, dan N1). Level mana yang ingin diambil dibebaskan untuk memilih. Contoh pertanyaan dapat diakses pada halaman New Japanese-Language Proficiency Test Sample Questions.

\n
    \n
  • Untuk lulus N5, perlu mengetahui sekitar 100 kanji dan sekitar 800 kosakata.
  • \n
  • Untuk lulus N4, perlu mengetahui sekitar 300 kanji dan sekitar 1.500 kosakata.
  • \n
  • Untuk lulus N3, perlu mengetahui sekitar 650 kanji dan sekitar 3.700 kosakata.
  • \n
  • Untuk lulus N2, perlu mengetahui sekitar 1.000 kanji dan sekitar 6.000 kosakata.
  • \n
  • Untuk lulus N1, perlu mengetahui sekitar 2.000 kanji dan sekitar 10.000 kosakata.
  • \n
\n

Untuk informasi skoring & penilaian dapat dilihat pada Scoring Sections, Pass or Fail, Score Report.

\n

N5 dan N4 adalah level termudah untuk diselesaikan dalam tes tetapi jika ingin menyelesaikan level yang lebih tinggi seperti N3, N2 dan N1 maka harus menghadiri pusat pembinaan di mana mereka menyediakan bahan pelajaran yang baik dan memiliki pelatih berpengalaman akan membantu belajar bahasa jepang dengan mudah.

\n

Informasi lebih lanjut, silahkan kunjungi https://www.jlpt.jp/e/index.html.

\n '}],this.count=0,this.page=1,this.row=10,this.q="",this.sort="",this.order="",this.subsAllKategori=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&this.getKategori()}ngOnDestroy(){var a;null===(a=this.subsAllKategori)||void 0===a||a.unsubscribe()}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a);const n=[];for(const o of a.results)n.push({url:`latihan-${o.id}`,name:o.name,image_url:null,icon:"switch_access_shortcut",letter:`~${o.jumlah} Unik`});this.testMenengah=n,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getBook(){}openModule(a){this.gs.log("[NIHONGO_CLICK_MODUL]",a),this.router.navigateByUrl(`/nihongo/${a.id}`)}onPaginatorClicked(a){this.gs.log("[NIHONGO_CLICK_PAGINATOR]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getBook()}onServerSideFilter(a){this.gs.log("[NIHONGO_ENTER_FILTER]",a),this.q=a,this.getBook()}onServerSideOrder(a){this.gs.log("[NIHONGO_CLICK_ORDER]",a),this.q=a.q,this.sort=a.active,this.order=a.direction,this.getBook()}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(v.U),t.Y36(y.z),t.Y36(C.a))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-nihongo-list"]],decls:37,vars:6,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[1,"row","px-3"],["class","col-12 col-sm-6 col-md-4 col-lg-6 col-xl-3 p-2",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[1,"row","mt-3"],[3,"tabData","count","serverSide","tableRowClicked","paginatorClicked","serverSideFilter","serverSideOrder"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12","col-sm-6","col-md-4","col-lg-6","col-xl-3","p-2"],[1,"gradient-border"],[1,"me-0",2,"cursor","pointer",3,"routerLink"],["mat-card-avatar","",2,"background-size","cover","background-color","whitesmoke"],["style","font-size: 300%; color: black",4,"ngIf"],[1,"text-warning","mb-1",2,"cursor","pointer"],[1,"mb-0"],[2,"font-size","300%","color","black"]],template:function(a,n){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h2",5)(7,"b",6),t._uU(8,"Belajar Bahasa Jepang"),t.qZA()()(),t.TgZ(9,"div",7),t._UZ(10,"app-banner-nihongo"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",4)(13,"h2",5)(14,"b",6),t._uU(15,"Latihan Dasar"),t.qZA()()(),t.TgZ(16,"div",7)(17,"div",8),t.YNc(18,X,10,6,"div",9),t.qZA()()(),t.YNc(19,at,8,1,"div",10),t.TgZ(20,"div",3)(21,"div",4)(22,"h2",5)(23,"b",6),t._uU(24,"Latihan Lanjutan"),t.qZA()()(),t.TgZ(25,"div",7)(26,"div",8),t.YNc(27,nt,10,9,"div",9),t.qZA()()(),t.TgZ(28,"div",11)(29,"div",7)(30,"app-material-tab",12),t.NdJ("tableRowClicked",function(s){return n.openModule(s)})("paginatorClicked",function(s){return n.onPaginatorClicked(s)})("serverSideFilter",function(s){return n.onServerSideFilter(s)})("serverSideOrder",function(s){return n.onServerSideOrder(s)}),t.qZA()()()(),t.TgZ(31,"div",13)(32,"div",14)(33,"div",7),t._UZ(34,"app-leaderboard")(35,"app-banner-discord")(36,"app-stats-server"),t.qZA()()()()()),2&a&&(t.xp6(18),t.Q6J("ngForOf",n.testDasar),t.xp6(1),t.Q6J("ngIf",n.testMenengah.length>0),t.xp6(8),t.Q6J("ngForOf",n.testLanjutan),t.xp6(3),t.Q6J("tabData",n.tabData)("count",n.count)("serverSide",!0))},directives:[T.t,z,c.sg,m.a8,m.dk,h.rH,m.kc,c.O5,A.Hw,m.n5,m.$j,Y.H,G,J.B,D.X],styles:[""]}),e})();var x=l(6087),B=l(6925),ot=l(4137),j=l(7845),b=l(7322),L=l(4107),Z=l(508),w=l(7531),rt=l(578),q=l(201),I=l(192),M=l(7238);function st(e,i){if(1&e&&(t.TgZ(0,"mat-option",20),t._uU(1),t.qZA()),2&e){const a=i.$implicit;t.s9C("value",a.id),t.xp6(1),t.Oqu(a.name)}}function lt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"mat-form-field",21)(1,"mat-label"),t._uU(2,"Cari ..."),t.qZA(),t.TgZ(3,"input",22),t.NdJ("keyup.enter",function(o){return t.CHM(a),t.oxw().applyFilter(o)})("ngModelChange",function(o){return t.CHM(a),t.oxw().q=o}),t.qZA(),t.TgZ(4,"mat-icon",23),t._uU(5,"search"),t.qZA()()}if(2&e){const a=t.oxw();t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",a.q)}}function ct(e,i){1&e&&t._UZ(0,"div")}function gt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function ut(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,gt,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function pt(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,ut,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function mt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function dt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,mt,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function ht(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,dt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function _t(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function vt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,_t,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function ft(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,vt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function kt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function bt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,kt,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function Tt(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,bt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function At(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"img",32),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().$implicit;return t.oxw(3).openDmak(o)}),t.qZA()}if(2&e){const a=t.oxw().$implicit,n=t.oxw(3);t.hYB("src","/assets/",n.modeTampilan,"/",a.romaji,".png",t.LSH)}}function xt(e,i){if(1&e&&(t.TgZ(0,"div",30),t.YNc(1,At,1,2,"img",31),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngIf",a.hiragana&&a.katakana)}}function Nt(e,i){if(1&e&&(t.TgZ(0,"div",28),t.YNc(1,xt,2,1,"div",29),t.qZA()),2&e){const a=i.$implicit;t.xp6(1),t.Q6J("ngForOf",a.value)}}function yt(e,i){if(1&e&&(t.TgZ(0,"div",17)(1,"div",3)(2,"div",24)(3,"div",3)(4,"div",17)(5,"h2",25)(6,"b",26),t._uU(7,"Standar"),t.qZA()()(),t.TgZ(8,"div",17),t.YNc(9,pt,2,1,"div",27),t.ALo(10,"keyvalue"),t.qZA()(),t.TgZ(11,"div",3)(12,"div",17)(13,"h2",25)(14,"b",26),t._uU(15,"Lainnya"),t.qZA()()(),t.TgZ(16,"div",17),t.YNc(17,ht,2,1,"div",27),t.ALo(18,"keyvalue"),t.qZA()()(),t.TgZ(19,"div",24)(20,"div",3)(21,"div",17)(22,"h2",25)(23,"b",26),t._uU(24,"Dakuon"),t.qZA()()(),t.TgZ(25,"div",17),t.YNc(26,ft,2,1,"div",27),t.ALo(27,"keyvalue"),t.qZA()(),t.TgZ(28,"div",3)(29,"div",17)(30,"h2",25)(31,"b",26),t._uU(32,"Handakuon"),t.qZA()()(),t.TgZ(33,"div",17),t.YNc(34,Tt,2,1,"div",27),t.ALo(35,"keyvalue"),t.qZA()(),t.TgZ(36,"div",3)(37,"div",17)(38,"h2",25)(39,"b",26),t._uU(40,"Yuon"),t.qZA()()(),t.TgZ(41,"div",17),t.YNc(42,Nt,2,1,"div",27),t.ALo(43,"keyvalue"),t.qZA()()()()()),2&e){const a=t.oxw();t.xp6(9),t.Q6J("ngForOf",t.lcZ(10,5,a.daftarHuruf.standard)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(18,7,a.daftarHuruf.other)),t.xp6(9),t.Q6J("ngForOf",t.lcZ(27,9,a.daftarHuruf.dakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(35,11,a.daftarHuruf.handakuon)),t.xp6(8),t.Q6J("ngForOf",t.lcZ(43,13,a.daftarHuruf.yuon))}}function Ct(e,i){1&e&&t._UZ(0,"div")}function St(e,i){if(1&e&&(t.TgZ(0,"div",35),t._UZ(1,"app-material-table",36),t.qZA()),2&e){const a=t.oxw(2);t.xp6(1),t.Q6J("tableDataColumn",a.daftarAngka.column)("tableDataRow",a.daftarAngka.row)}}function jt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",40)(1,"mat-card",41),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(4).editDataset(s)}),t.TgZ(2,"mat-card-header",42),t._UZ(3,"div",43),t.TgZ(4,"mat-card-title",44)(5,"h3",45),t._uU(6),t.qZA()(),t.TgZ(7,"mat-card-subtitle",46)(8,"p",47),t._uU(9),t.qZA(),t.TgZ(10,"p",48),t._uU(11),t.qZA()()()()()}if(2&e){const a=i.$implicit;t.xp6(3),t.Udp("background-image","url("+a.image_url+")"),t.xp6(3),t.Oqu(a.kana),t.xp6(3),t.Oqu(a.romaji),t.xp6(2),t.Oqu(a.meaning)}}function Zt(e,i){if(1&e&&(t.TgZ(0,"div",17)(1,"div",38),t.YNc(2,jt,12,5,"div",39),t.qZA()()),2&e){const a=t.oxw(3);t.xp6(2),t.Q6J("ngForOf",a.daftarNihongo)}}function Ut(e,i){if(1&e&&t.YNc(0,Zt,3,1,"div",37),2&e){const a=t.oxw(2),n=t.MAs(26);t.Q6J("ngIf",a.daftarNihongo.length>0)("ngIfElse",n)}}function Rt(e,i){if(1&e&&(t.YNc(0,Ct,1,0,"div",10),t.YNc(1,St,2,2,"ng-template",null,33,t.W1O),t.YNc(3,Ut,1,2,"ng-template",null,34,t.W1O)),2&e){const a=t.MAs(2),n=t.MAs(4),o=t.oxw();t.Q6J("ngIf","angka"===o.modeTampilan)("ngIfThen",a)("ngIfElse",n)}}function Ot(e,i){1&e&&t._UZ(0,"app-no-data",49)}function Et(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"button",50),t.NdJ("click",function(){return t.CHM(a),t.oxw().addDataset()}),t.TgZ(1,"mat-icon"),t._uU(2,"add"),t.qZA()()}}let Jt=(()=>{class e{constructor(a,n,o,s,d,f,k){this.router=a,this.toast=n,this.as=o,this.gs=s,this.bs=d,this.ds=f,this.nihon=k,this.pageSizeOptions=[50,75,100,125,150],this.kategori=[{id:"hiragana",name:"Hiragana"},{id:"katakana",name:"Katakana"},{id:"angka",name:"Angka"}],this.modeTampilan="hiragana",this.daftarHuruf=null,this.daftarNihongo=[],this.daftarAngka={column:["Angka","Kana","Romaji"],row:[]},this.count=0,this.page=1,this.row=50,this.q="",this.subsDialog=null,this.subsHirakata=null,this.subsAllNihongo=null,this.subsAllKategori=null,this.dummyDataset=[{category:"number",meaning:0,kana:"\u96f6\uff0f\u30bc\u30ed",romaji:"Rei/Zero"},{category:"number",meaning:1,kana:"\u4e00",romaji:"Ichi"},{category:"number",meaning:2,kana:"\u4e8c",romaji:"Ni"},{category:"number",meaning:3,kana:"\u4e09",romaji:"San"},{category:"number",meaning:4,kana:"\u56db",romaji:"Yon/Shi"},{category:"number",meaning:5,kana:"\u4e94",romaji:"Go"},{category:"number",meaning:6,kana:"\u516d",romaji:"Roku"},{category:"number",meaning:7,kana:"\u4e03",romaji:"Nana"},{category:"number",meaning:8,kana:"\u516b",romaji:"Hachi"},{category:"number",meaning:9,kana:"\u4e5d",romaji:"Kyuu/Ku"},{category:"number",meaning:10,kana:"\u5341",romaji:"Jyuu"},{category:"number",meaning:11,kana:"\u5341\u4e00",romaji:"Jyuu Ichi"},{category:"number",meaning:12,kana:"\u5341\u4e8c",romaji:"Jyuu Ni"},{category:"number",meaning:20,kana:"\u4e8c\u5341",romaji:"Ni Jyuu"},{category:"number",meaning:21,kana:"\u4e8c\u5341\u4e00",romaji:"Ni Jyuu Ichi"},{category:"number",meaning:30,kana:"\u4e09\u5341",romaji:"San Jyuu"},{category:"number",meaning:100,kana:"\u767e",romaji:"Hyaku"},{category:"number",meaning:101,kana:"\u767e\u4e00",romaji:"Hyaku Ichi"},{category:"number",meaning:123,kana:"\u767e\u4e8c\u5341\u4e09",romaji:"Hyaku Ni Jyuu San"},{category:"number",meaning:300,kana:"\u4e09\u767e",romaji:"San Byaku"},{category:"number",meaning:600,kana:"\u516d\u767e",romaji:"Roppyaku"},{category:"number",meaning:800,kana:"\u516b\u767e",romaji:"Happyaku"},{category:"number",meaning:1e3,kana:"\u5343",romaji:"Sen"},{category:"number",meaning:3e3,kana:"\u4e09\u5343",romaji:"San Zen"},{category:"number",meaning:8e3,kana:"\u516b\u5343",romaji:"Hassen"},{category:"number",meaning:1e4,kana:"\u4e00\u4e07",romaji:"Ichi-Man"},{category:"number",meaning:1e5,kana:"\u5341\u4e07",romaji:"Jyuu-Man"},{category:"number",meaning:1e6,kana:"\u767e\u4e07",romaji:"Hyaku-Man"}],this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getHirakata(),this.getAngka(),this.getKategori(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){var a,n,o,s;null===(a=this.subsDialog)||void 0===a||a.unsubscribe(),null===(n=this.subsHirakata)||void 0===n||n.unsubscribe(),null===(o=this.subsAllNihongo)||void 0===o||o.unsubscribe(),null===(s=this.subsAllKategori)||void 0===s||s.unsubscribe()}changeModeTampilan(a){this.gs.log("[BELAJAR_CHANGE_KANA]",a),this.modeTampilan=a,this.count=0,this.page=1,this.row=50,this.q="",this.resetPaginator()}applyFilter(a){this.gs.log("[BELAJAR_SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[BELAJAR_PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.gs.includesOneOf(this.modeTampilan,["hiragana","katakana","angka"])||(this.daftarNihongo=[],this.getData())}resetPaginator(){var a,n;null===(a=this.paginator)||void 0===a||a._changePageSize(this.pageSizeOptions[0]),null===(n=this.paginator)||void 0===n||n.firstPage()}openDmak(a){this.gs.log("[BELAJAR_OPEN_DMAK]",a),this.subsDialog=this.ds.openDmakDialog({data:{romaji:a.romaji,hiragana_katakana_kanji:"hiragana"===this.modeTampilan?a.hiragana:a.katakana},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[BELAJAR_DMAK_DIALOG_CLOSED]",n),this.subsDialog.unsubscribe()}})}getHirakata(){this.bs.busy(),this.subsHirakata=this.nihon.getHirakata().subscribe({next:a=>{this.gs.log("[BELAJAR_HIRAKATA_SUCCESS]",a);const n={};for(const o of a.results)n[o.category]||(n[o.category]={}),n[o.category][o.segment]||(n[o.category][o.segment]=[]),n[o.category][o.segment].push({romaji:o.romaji,hiragana:o.hiragana,katakana:o.katakana});this.daftarHuruf=n,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_HIRAKATA_ERROR]",a,"error"),this.bs.idle()}})}getAngka(){const a=[];for(const n of this.dummyDataset)a.push({Angka:n.meaning,Kana:n.kana,Romaji:n.romaji});this.daftarAngka.row=a}getKategori(){this.bs.busy(),this.subsAllKategori=this.nihon.getAllKategori().subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_SUCCESS]",a),this.kategori=[...this.kategori,...a.results],this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_KATEGORI_ERROR]",a,"error"),this.bs.idle()}})}getData(){this.bs.busy(),this.subsAllNihongo=this.nihon.getAllNihongo(this.modeTampilan,this.q,this.page,this.row).subscribe({next:a=>{this.gs.log("[BELAJAR_KANA_LIST_SUCCESS]",a),this.count=a.count,this.daftarNihongo=a.results,this.bs.idle()},error:a=>{this.gs.log("[BELAJAR_KANA_LIST_ERROR]",a,"error"),this.bs.idle()}})}editDataset(a){var n,o,s,d,f,k;this.gs.log("[BELAJAR_DATASET_ADD_OR_EDIT_CLICK]",a),(!a&&(null===(o=null===(n=this.as.currentUserSubject)||void 0===n?void 0:n.value)||void 0===o?void 0:o.verified)||a&&((null===(d=null===(s=this.as.currentUserSubject)||void 0===s?void 0:s.value)||void 0===d?void 0:d.role)===r.yS.ADMIN||(null===(k=null===(f=this.as.currentUserSubject)||void 0===f?void 0:f.value)||void 0===k?void 0:k.role)===r.yS.MODERATOR))&&(this.subsDialog=this.ds.openBelajarDialog({data:{title:a?"Edit Data":"Tambah Dataset",modeTampilan:this.modeTampilan,dataset:a,confirmText:"Simpan",cancelText:"Tutup"}}).afterClosed().subscribe({next:da=>{this.gs.log("[BELAJAR_DATASET_DIALOG_CLOSED]",da),this.getData(),this.subsDialog.unsubscribe()}}))}addDataset(){var a,n,o;(null===(a=this.as.currentUserSubject)||void 0===a?void 0:a.value)?(null===(o=null===(n=this.as.currentUserSubject)||void 0===n?void 0:n.value)||void 0===o?void 0:o.verified)?this.editDataset(null):(this.toast.warning("Khusus Pengguna Terverifikasi","Whoops!",null,!0),this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})):this.router.navigate(["/login"],{queryParams:{returnUrl:"/nihongo/belajar"}})}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(B.k),t.Y36(ot.e),t.Y36(v.U),t.Y36(y.z),t.Y36(j.x),t.Y36(C.a))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-belajar"]],viewQuery:function(a,n){if(1&a&&t.Gf(x.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(n.paginator=o.first)}},decls:28,vars:13,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-lg-8","col-xl-9"],[1,"row"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-6","col-lg-4",3,"color"],[3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["class","ms-auto pt-3 col-6 col-lg-4",3,"color",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["hirakata",""],["kataBendaLainnya",""],[1,"position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[1,"col-lg-4","col-xl-3"],[1,"row","sticky-top"],[1,"col-12"],["noData",""],["mat-fab","","color","warn","class","me-3 mb-5 fab-button animate__animated animate__bounce animate__infinite animate__slow","matTooltip","Tambah Dataset","style","position: fixed; bottom: 0; right: 0; z-index: 999999;",3,"click",4,"ngIf"],[3,"value"],[1,"ms-auto","pt-3","col-6","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u81ea\u8ee2\u8eca\u3001\u30de\u30de\u30c1\u30e3\u30ea",3,"ngModel","keyup.enter","ngModelChange"],["matSuffix",""],[1,"col-12","col-md-6"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],["class","row text-center px-3",4,"ngFor","ngForOf"],[1,"row","text-center","px-3"],["class","col p-1",4,"ngFor","ngForOf"],[1,"col","p-1"],["class","rounded img-thumbnail","style","cursor: pointer;",3,"src","click",4,"ngIf"],[1,"rounded","img-thumbnail",2,"cursor","pointer",3,"src","click"],["angka",""],["selainAngka",""],[1,"p-3"],[3,"tableDataColumn","tableDataRow"],["class","col-12",4,"ngIf","ngIfElse"],["appDomChange","",1,"row","px-3"],["class","col-12 col-md-6 col-lg-4 col-xl-3 p-2",4,"ngFor","ngForOf"],[1,"col-12","col-md-6","col-lg-4","col-xl-3","p-2"],[1,"card",3,"click"],[1,"me-0",2,"cursor","pointer"],["mat-card-avatar","",2,"background-size","contain","border-radius","0","background-position","center","background-repeat","no-repeat"],[1,"text-warning","mb-1",2,"cursor","pointer"],["matLine","",1,"mb-0"],[1,"mb-0"],["matLine","",1,"m-0","text-success"],["matLine","",1,"m-0"],[1,"col-12","p-3"],["mat-fab","","color","warn","matTooltip","Tambah Dataset",1,"me-3","mb-5","fab-button","animate__animated","animate__bounce","animate__infinite","animate__slow",2,"position","fixed","bottom","0","right","0","z-index","999999",3,"click"]],template:function(a,n){if(1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"h3",5)(7,"mat-form-field",6)(8,"mat-label"),t._uU(9,"Pilih Kategori"),t.qZA(),t.TgZ(10,"mat-select",7),t.NdJ("valueChange",function(s){return n.modeTampilan=s})("valueChange",function(s){return n.changeModeTampilan(s)}),t.YNc(11,st,2,2,"mat-option",8),t.qZA()(),t.YNc(12,lt,6,2,"mat-form-field",9),t.qZA()(),t.YNc(13,ct,1,0,"div",10),t.YNc(14,yt,44,15,"ng-template",null,11,t.W1O),t.YNc(16,Rt,5,3,"ng-template",null,12,t.W1O),t.qZA(),t.TgZ(18,"div",13)(19,"mat-paginator",14),t.NdJ("page",function(s){return n.paginatorChanged(s)}),t.qZA()()(),t.TgZ(20,"div",15)(21,"div",16)(22,"div",17),t._UZ(23,"app-banner-discord")(24,"app-stats-server"),t.qZA()()()()(),t.YNc(25,Ot,1,0,"ng-template",null,18,t.W1O),t.YNc(27,Et,3,0,"button",19)),2&a){const o=t.MAs(15),s=t.MAs(17);t.xp6(7),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",n.modeTampilan),t.xp6(1),t.Q6J("ngForOf",n.kategori),t.xp6(1),t.Q6J("ngIf","hiragana"!==n.modeTampilan&&"katakana"!==n.modeTampilan&&"angka"!==n.modeTampilan),t.xp6(1),t.Q6J("ngIf",("hiragana"===n.modeTampilan||"katakana"===n.modeTampilan)&&n.daftarHuruf)("ngIfThen",o)("ngIfElse",s),t.xp6(5),t.Udp("display","hiragana"!==n.modeTampilan&&"katakana"!==n.modeTampilan&&"angka"!==n.modeTampilan?"block":"none"),t.xp6(1),t.Q6J("color","accent")("length",n.count)("pageSizeOptions",n.pageSizeOptions),t.xp6(8),t.Q6J("ngIf","hiragana"!==n.modeTampilan&&"katakana"!==n.modeTampilan&&"angka"!==n.modeTampilan)}},directives:[T.t,b.KE,b.hX,L.gD,c.sg,Z.ey,c.O5,w.Nt,_.Fj,_.nD,_.JJ,_.On,A.Hw,b.R9,rt.I,q.S,m.a8,m.dk,m.kc,m.n5,Z.X2,m.$j,x.NW,J.B,D.X,I.d,E.lW,M.gM],pipes:[c.Nd],styles:[""]}),e})();function Dt(e,i){if(1&e&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&e){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("N",a,"")}}function Bt(e,i){if(1&e&&(t.TgZ(0,"mat-option",17),t._uU(1),t.qZA()),2&e){const a=i.$implicit;t.s9C("value",a),t.xp6(1),t.hij("Kelas ",a,"")}}function Lt(e,i){1&e&&t._UZ(0,"app-no-data",18)}function wt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",21)(1,"div",22),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(2).openEdict(s)}),t.TgZ(2,"div",23)(3,"h5",24),t._uU(4),t.qZA(),t.TgZ(5,"div"),t._uU(6),t.qZA()(),t.TgZ(7,"div",25)(8,"span",26),t._uU(9),t.qZA(),t.TgZ(10,"span"),t._uU(11," - "),t.qZA(),t.TgZ(12,"span",27),t._uU(13),t.qZA()()()()}if(2&e){const a=i.$implicit;t.xp6(4),t.Oqu(a.character),t.xp6(2),t.Oqu(a.translate),t.xp6(3),t.hij("N",a.jlpt,""),t.xp6(4),t.hij("S",a.school,"")}}function qt(e,i){if(1&e&&(t.TgZ(0,"div",11)(1,"div",19),t.YNc(2,wt,14,4,"div",20),t.qZA()()),2&e){const a=t.oxw();t.xp6(2),t.Q6J("ngForOf",a.kanjiData)}}const It=function(){return[5,4,3,2,1]},Mt=function(){return[1,2,3,4,5,6,7,8,9]};let Kt=(()=>{class e{constructor(a,n,o,s){this.gs=a,this.bs=n,this.nihon=o,this.ds=s,this.pageSizeOptions=[50,75,100,125,150],this.jlpt="",this.school="",this.count=0,this.page=1,this.row=50,this.q="",this.sort="",this.order="",this.kanjiData=[],this.subsKanji=null,this.subsDialog=null,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}ngOnInit(){this.gs.isBrowser&&(this.getKanji(),this.gs.isDarkMode||this.gs.toggleDarkTheme())}ngOnDestroy(){var a,n;null===(a=this.subsKanji)||void 0===a||a.unsubscribe(),null===(n=this.subsDialog)||void 0===n||n.unsubscribe()}changeJlpt(a){this.gs.log("[JLPT_CHANGED]",a),this.jlpt=a,this.resetPaginator()}changeSchool(a){this.gs.log("[SCHOOL_CHANGED]",a),this.school=a,this.resetPaginator()}applyFilter(a){this.gs.log("[SEARCH_VALUE_CHANGED]",a),this.q=a.target.value.trim().toLowerCase(),this.resetPaginator()}paginatorChanged(a){this.gs.log("[PAGINATOR_VALUE_CHANGED]",a),this.page=a.pageIndex+1,this.row=a.pageSize,this.getKanji()}resetPaginator(){this.paginator._changePageSize(this.pageSizeOptions[0]),this.paginator.firstPage()}getKanji(){this.bs.busy(),this.subsKanji&&(this.subsKanji.unsubscribe(),this.bs.idle()),this.subsKanji=this.nihon.getAllKanji(this.jlpt,this.school,this.q,this.page,this.row,"context","asc").subscribe({next:a=>{this.gs.log("[KANJI_LIST_SUCCESS]",a),this.count=a.count,this.kanjiData=a.results,this.bs.idle()},error:a=>{this.gs.log("[KANJI_LIST_ERROR]",a,"error"),this.bs.idle()}})}openEdict(a){this.gs.log("[HIRAKATA_OPEN_EDICT]",a),this.subsDialog=this.ds.openEdictDialog({data:{character:a.character,context:a.context,freq:a.freq,gakken:a.gakken,harlpern_kkld:a.harlpern_kkld,harlpern_njecd:a.harlpern_njecd,jlpt:a.jlpt,maniette:a.maniette,nelson_c:a.nelson_c,nelson_n:a.nelson_n,remember:a.remember,school:a.school,skip:a.skip,stroke:a.stroke,translate:a.translate,v_kunyomi:a.v_kunyomi,v_onyomi:a.v_onyomi},disableClose:!1}).afterClosed().subscribe({next:n=>{this.gs.log("[EDICT_DIALOG_CLOSED]",n),this.subsDialog.unsubscribe()}})}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(v.U),t.Y36(y.z),t.Y36(C.a),t.Y36(j.x))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-kanji"]],viewQuery:function(a,n){if(1&a&&t.Gf(x.NW,7),2&a){let o;t.iGM(o=t.CRH())&&(n.paginator=o.first)}},decls:31,vars:15,consts:[[1,"container"],[1,"row","pb-3","px-0"],[1,"col-12","sticky-top","bg-bifeldy","pb-3"],[1,"m-0","border-bottom","border-primary","row"],[1,"pt-3","col-4","col-lg-2",3,"color"],[3,"value","valueChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[1,"ms-auto","pt-3","col-4","col-lg-4",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u79c1",3,"ngModel","keyup.enter","ngModelChange"],["matSuffix",""],[1,"col-12"],[1,"row"],["class","col-12 p-3",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"container","position-sticky","bottom-0"],["showFirstLastButtons","",1,"bg-bifeldy",3,"color","length","pageSizeOptions","page"],[3,"value"],[1,"col-12","p-3"],["appDomChange","",1,"row","px-3"],["class","col-6 col-md-3 col-lg-2 p-2",4,"ngFor","ngForOf"],[1,"col-6","col-md-3","col-lg-2","p-2"],[1,"card","text-center","p-3",2,"cursor","pointer",3,"click"],[1,"card-body","p-0"],[1,"card-title","py-3",2,"font-size","300%"],[1,"position-absolute","top-0","end-0",2,"margin-right","3px","font-size","x-small"],[1,"text-warning"],[1,"text-info"]],template:function(a,n){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0)(2,"div",1)(3,"div",2)(4,"h3",3)(5,"mat-form-field",4)(6,"mat-label"),t._uU(7,"JLPT"),t.qZA(),t.TgZ(8,"mat-select",5),t.NdJ("valueChange",function(s){return n.jlpt=s})("valueChange",function(s){return n.changeJlpt(s)}),t.TgZ(9,"mat-option",6),t._uU(10,"Semua"),t.qZA(),t.YNc(11,Dt,2,2,"mat-option",7),t.qZA()(),t.TgZ(12,"mat-form-field",4)(13,"mat-label"),t._uU(14,"Sekolah"),t.qZA(),t.TgZ(15,"mat-select",5),t.NdJ("valueChange",function(s){return n.school=s})("valueChange",function(s){return n.changeSchool(s)}),t.TgZ(16,"mat-option",6),t._uU(17,"Semua"),t.qZA(),t.YNc(18,Bt,2,2,"mat-option",7),t.qZA()(),t.TgZ(19,"mat-form-field",8)(20,"mat-label"),t._uU(21,"Cari ..."),t.qZA(),t.TgZ(22,"input",9),t.NdJ("keyup.enter",function(s){return n.applyFilter(s)})("ngModelChange",function(s){return n.q=s}),t.qZA(),t.TgZ(23,"mat-icon",10),t._uU(24,"search"),t.qZA()()()(),t.TgZ(25,"div",11)(26,"div",12),t.YNc(27,Lt,1,0,"app-no-data",13),t.YNc(28,qt,3,1,"div",14),t.qZA()()()(),t.TgZ(29,"div",15)(30,"mat-paginator",16),t.NdJ("page",function(s){return n.paginatorChanged(s)}),t.qZA()()),2&a&&(t.xp6(5),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",n.jlpt),t.xp6(3),t.Q6J("ngForOf",t.DdM(13,It)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("value",n.school),t.xp6(3),t.Q6J("ngForOf",t.DdM(14,Mt)),t.xp6(1),t.Q6J("color","accent"),t.xp6(3),t.Q6J("ngModel",n.q),t.xp6(5),t.Q6J("ngIf",n.kanjiData.length<=0),t.xp6(1),t.Q6J("ngIf",n.kanjiData.length>0),t.xp6(2),t.Q6J("color","accent")("length",n.count)("pageSizeOptions",n.pageSizeOptions))},directives:[T.t,b.KE,b.hX,L.gD,Z.ey,c.sg,w.Nt,_.Fj,_.nD,_.JJ,_.On,A.Hw,b.R9,c.O5,I.d,q.S,x.NW],styles:[""]}),e})();var Ht=l(5934),Qt=l(7814),Ft=l(7544),zt=l(1617);function Yt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",23)(1,"div",6)(2,"div",7),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(2).openProfile(s.value.username)}),t._UZ(3,"div",24),t.TgZ(4,"div"),t._uU(5),t.qZA()()()()}if(2&e){const a=i.$implicit,n=i.index;t.xp6(3),t.Jzz("\n background-image: url('",a.value.image_url,"');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.Q6J("matBadge",null==a||null==a.value?null:a.value.profile_.points)("matBadgeColor",0===n?"warn":1===n?"primary":"accent"),t.xp6(1),t.Gre("pt-1 ",0===n?"gradient-text":"",""),t.xp6(1),t.Oqu(a.value.username)}}function Pt(e,i){1&e&&t._UZ(0,"div")}function $t(e,i){if(1&e&&t._UZ(0,"div",25),2&e){const a=t.oxw(2);t.Jzz("\n background-size: contain;\n border-radius: 0px;\n background-position: center center;\n background-repeat: no-repeat;\n background-image: url('",a.getQuiz.question[a.question],"');\n ")}}function Gt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",26),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).openEdict()}),t._uU(1),t.qZA()}if(2&e){const a=t.oxw(2);t.xp6(1),t.hij(" ",a.swapOptions?a.getQuiz.question[a.question]:a.getQuiz.question[a.options]," ")}}function Wt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div")(1,"div",27),t.NdJ("click",function(){const s=t.CHM(a).$implicit;return t.oxw(2).selectAnswer(s)}),t.TgZ(2,"div"),t._uU(3),t.qZA()()()}if(2&e){const a=i.$implicit,n=t.oxw(2);t.Gre("",n.ROUTER.url.includes("/kelas-")||n.ROUTER.url.includes("/jlpt-")||n.ROUTER.url.includes("/semua-kanji")||n.ROUTER.url.includes("/latihan-")?"col-md-6 col-12":"col-md-4 col-6"," p-2"),t.xp6(2),t.Gre("card-body ",n.ROUTER.url.includes("/kelas-")||n.ROUTER.url.includes("/jlpt-")||n.ROUTER.url.includes("/semua-kanji")?"p-0":"px-0",""),t.Udp("font-size",n.ROUTER.url.includes("/kelas-")||n.ROUTER.url.includes("/jlpt-")||n.ROUTER.url.includes("/semua-kanji")?"100%":"250%"),t.xp6(1),t.hij(" ",n.swapOptions?a[n.options]:a[n.question]," ")}}function Xt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",28)(1,"div",29),t.NdJ("click",function(){return t.CHM(a),t.oxw(2).swapCharacter()}),t.TgZ(2,"div",30),t._uU(3,"\u{1f38c}"),t.qZA()()()}}function Vt(e,i){if(1&e){const a=t.EpF();t.TgZ(0,"div",1)(1,"div",2)(2,"div",3),t.YNc(3,Yt,6,9,"div",4),t.ALo(4,"keyvalue"),t.TgZ(5,"div",5)(6,"div",6)(7,"div",7),t.NdJ("click",function(){return t.CHM(a),t.oxw().openLiveChat()}),t._UZ(8,"div",8),t.TgZ(9,"div",9),t._uU(10,"Semua Peserta"),t.qZA()()()()(),t.TgZ(11,"div",10)(12,"div",2),t._UZ(13,"hr",11),t.qZA()(),t.TgZ(14,"div",10)(15,"div",12)(16,"div",10)(17,"div",13)(18,"div",14),t.YNc(19,Pt,1,0,"div",15),t.YNc(20,$t,1,3,"ng-template",null,16,t.W1O),t.YNc(22,Gt,2,1,"ng-template",null,17,t.W1O),t.qZA()()(),t.TgZ(24,"div",10)(25,"div",13)(26,"div",18),t.YNc(27,Wt,4,9,"div",19),t.YNc(28,Xt,4,0,"div",20),t.qZA()()()(),t.TgZ(29,"div",21),t._UZ(30,"app-live-chat",22),t.qZA()()()()}if(2&e){const a=t.MAs(21),n=t.MAs(23),o=t.oxw();t.xp6(3),t.Q6J("ngForOf",t.xi3(4,10,o.participants,o.scoreOrder)),t.xp6(5),t.Jzz("\n background-image: url('",o.ENV.baseUrl,"/assets/img/favicon.png');\n width: 64px;\n height: 64px;\n background-size: cover;\n background-position: center;\n "),t.xp6(11),t.Q6J("ngIf","image_url"===o.question)("ngIfThen",a)("ngIfElse",n),t.xp6(8),t.Q6J("ngForOf",o.getQuiz.options),t.xp6(1),t.Q6J("ngIf",!(o.ROUTER.url.includes("/kelas-")||o.ROUTER.url.includes("/jlpt-")||o.ROUTER.url.includes("/semua-kanji")||o.ROUTER.url.includes("/latihan-"))),t.xp6(2),t.Q6J("chatOnly",!0)}}let ta=(()=>{class e{constructor(a,n,o,s,d){this.router=a,this.gs=n,this.rps=o,this.quiz=s,this.ds=d,this.question="hiragana",this.options="romaji",this.swapOptions=!0,this.participants=null,this.subsParticipant=null,this.subsDialog=null,this.scoreOrder=(f,k)=>f.value.profile_.points>k.value.profile_.points?-1:k.value.profile_.points>f.value.profile_.points?1:0}get ENV(){return Ht.N}get ROUTER(){return this.router}get getQuiz(){return this.quiz.getCurrentQuizQuestion(this.router.url.split("?")[0])}ngOnDestroy(){var a,n;null===(a=this.subsParticipant)||void 0===a||a.unsubscribe(),null===(n=this.subsDialog)||void 0===n||n.unsubscribe()}ngOnInit(){this.gs.isBrowser&&(this.subsParticipant=this.quiz.getCurrentQuizRoom().subscribe({next:a=>{this.participants=null==a?void 0:a.member_list}}))}selectAnswer(a){this.quiz.answerQuestion({roomId:this.router.url.split("?")[0],randomInteger:this.getQuiz.randomInteger,answer:a})}swapCharacter(){this.swapOptions=!this.swapOptions}openLiveChat(){this.rps.toggleSidePanel("LiveChatComponent")}openProfile(a){this.router.navigateByUrl(`/user/${a}`)}openEdict(){this.gs.log("[QUIZ_OPEN_EDICT]",this.getQuiz),this.getQuiz.question.character&&(this.subsDialog=this.ds.openEdictDialog({data:this.getQuiz.question,disableClose:!1}).afterClosed().subscribe({next:a=>{this.gs.log("[EDICT_DIALOG_CLOSED]",a),this.subsDialog.unsubscribe()}}))}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(v.U),t.Y36(Qt.C),t.Y36(O),t.Y36(j.x))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-quiz"]],inputs:{question:"question",options:"options"},decls:1,vars:1,consts:[["class","row px-0",4,"ngIf"],[1,"row","px-0"],[1,"col-12"],[1,"row","w-100","ps-3",2,"display","inline-flex","flex-wrap","nowrap","overflow-x","hidden"],["class","p-2","style","width: auto;",4,"ngFor","ngForOf"],[1,"ms-auto","p-2","bg-bifeldy",2,"width","auto","position","sticky","right","0"],[1,"card","text-center","border-0",2,"width","64px","background","transparent !important"],[1,"card-body","p-0",2,"cursor","pointer",3,"click"],[1,"rounded-3"],[1,"pt-1"],[1,"row"],[1,"my-1","border-bottom-dotted",2,"height","4px","background","url(/assets/img/stripe.png)"],[1,"col-lg-8","col-xl-9","p-3","text-center"],[1,"col-12","p-4"],[1,"mx-auto","card","p-3"],[4,"ngIf","ngIfThen","ngIfElse"],["menengah",""],["bukanMenengah",""],[1,"row","text-center"],[3,"class",4,"ngFor","ngForOf"],["class","col-6 col-md-4 p-2",4,"ngIf"],[1,"col-lg-4","col-xl-3","d-none","d-lg-block","d-xl-block"],[3,"chatOnly"],[1,"p-2",2,"width","auto"],["matBadgePosition","below",1,"rounded-3",3,"matBadge","matBadgeColor"],[1,"card-body","p-3","py-5"],[1,"card-body","p-3","py-5",2,"cursor","pointer","font-size","500%",3,"click"],[1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"col-6","col-md-4","p-2"],["matTooltip","Tukar Huruf",1,"card","p-3","m-1",2,"cursor","pointer",3,"click"],[1,"card-body","px-0",2,"font-size","250%"]],template:function(a,n){1&a&&t.YNc(0,Vt,31,13,"div",0),2&a&&t.Q6J("ngIf",n.getQuiz)},directives:[c.O5,c.sg,Ft.k,M.gM,zt.u],pipes:[c.Nd],styles:[""]}),e})();function aa(e,i){if(1&e&&t._UZ(0,"app-quiz",2),2&e){const a=t.oxw();t.Q6J("question",a.GS.routerData.question)("options",a.GS.routerData.options)}}let p=(()=>{class e{constructor(a,n,o,s){this.router=a,this.toast=n,this.gs=o,this.ss=s,this.gs.bannerImg=null,this.gs.sizeContain=!1,this.gs.bgRepeat=!1}get GS(){return this.gs}ngOnInit(){var a;this.gs.isBrowser&&((null===(a=this.ss.mySocket)||void 0===a?void 0:a.id)||(this.toast.warning("Tidak Dapat Terhubung Melalui Web Socket","Gagal Menyambung Ke Jaringan!",null,!0),this.router.navigateByUrl("/nihongo")),this.gs.isDarkMode||this.gs.toggleDarkTheme())}}return e.\u0275fac=function(a){return new(a||e)(t.Y36(h.F0),t.Y36(B.k),t.Y36(v.U),t.Y36(R.R))},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-tes"]],decls:3,vars:1,consts:[[1,"container"],[3,"question","options",4,"ngIf"],[3,"question","options"]],template:function(a,n){1&a&&(t._UZ(0,"app-notifications"),t.TgZ(1,"div",0),t.YNc(2,aa,1,2,"app-quiz",1),t.qZA()),2&a&&(t.xp6(2),t.Q6J("ngIf",n.GS.routerData.question&&n.GS.routerData.options))},directives:[T.t,c.O5,ta],styles:[""]}),e})();var ea=l(8613),na=l(4854),ia=l(669),oa=l(913),ra=l(6436),K=l(5116);let sa=(()=>{class e{}return e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[c.ez,h.Bz,N.m,K.d]]}),e})();var la=l(617);let ca=(()=>{class e{}return e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[c.ez,N.m,h.Bz]]}),e})();var ga=l(2438),ua=l(7956);const pa=[{path:"",pathMatch:"full",component:it},{path:"belajar",component:Jt,data:{title:"Huruf, Angka, Warna, Buah & Sayur, Dan Lingkungan Sekitar",description:"Mengenal Sambil Belajar Berbagai Macam",keywords:"Sesuatu Yang Sering Kita Temukan",question:null,options:null}},{path:"kanji",component:Kt,data:{title:"Huruf Kanji",description:"Mengenal Huruf Kanji Sesuai Rank JLPT & Sekolah",keywords:"Kanji",question:null,options:null}},{path:"hiragana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Hiragana",description:"Uji Kemampuan Huruf Hiragana",keywords:"Hiragana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"hiragana",options:"romaji"}},{path:"katakana",component:p,canActivate:[u.t],data:{title:"Tes Huruf Katakana",description:"Uji Kemampuan Huruf Katakana",keywords:"Katakana",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"katakana",options:"romaji"}},{path:"jlpt-n5",component:p,canActivate:[u.t],data:{title:"Tes Huruf N5",description:"Uji Kemampuan Huruf N5",keywords:"N5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n4",component:p,canActivate:[u.t],data:{title:"Tes Huruf N4",description:"Uji Kemampuan Huruf N4",keywords:"N4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n3",component:p,canActivate:[u.t],data:{title:"Tes Huruf N3",description:"Uji Kemampuan Huruf N3",keywords:"N3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n2",component:p,canActivate:[u.t],data:{title:"Tes Huruf N2",description:"Uji Kemampuan Huruf N2",keywords:"N2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"jlpt-n1",component:p,canActivate:[u.t],data:{title:"Tes Huruf N1",description:"Uji Kemampuan Huruf N1",keywords:"N1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 1",description:"Uji Kemampuan Huruf Kelas 1",keywords:"Kelas 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 2",description:"Uji Kemampuan Huruf Kelas 2",keywords:"Kelas 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-3",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 3",description:"Uji Kemampuan Huruf Kelas 3",keywords:"Kelas 3",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-4",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 4",description:"Uji Kemampuan Huruf Kelas 4",keywords:"Kelas 4",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-5",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 5",description:"Uji Kemampuan Huruf Kelas 5",keywords:"Kelas 5",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-6",component:p,canActivate:[u.t],data:{title:"Tes Huruf Kelas 6",description:"Uji Kemampuan Huruf Kelas 6",keywords:"Kelas 6",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-1",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 1",description:"Uji Kemampuan Huruf Lanjutan 1",keywords:"Lanjutan 1",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"kelas-lanjutan-2",component:p,canActivate:[u.t],data:{title:"Tes Huruf Lanjutan 2",description:"Uji Kemampuan Huruf Lanjutan 2",keywords:"Lanjutan 2",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:"semua-kanji",component:p,canActivate:[u.t],data:{title:"Tes Huruf Semua Kanji",description:"Uji Kemampuan Huruf Semua Kanji",keywords:"Semua Kanji",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"character",options:"translate"}},{path:":category",component:p,canActivate:[u.t],data:{title:"Tes Kategori Lainnya",description:"Uji Kemampuan Kategori Lainnya",keywords:"Kategori Lainnya",[g.t.decoratorRoles]:[r.yS.ADMIN,r.yS.MODERATOR,r.yS.FANSUBBER,r.yS.USER],question:"image_url",options:"kana"}}];let ma=(()=>{class e{}return e.\u0275fac=function(a){return new(a||e)},e.\u0275mod=t.oAB({type:e}),e.\u0275inj=t.cJS({imports:[[c.ez,h.Bz.forChild(pa),_.u5,_.UX,ea.F,na.R,oa.g,ra.L,N.m,Q.Ad,H.UM,ia.A,K.d,sa,la.H,ua.C,ca,ga.d]]}),e})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/common.1ac374edf29bcb18.js b/dist/fansubid/browser/common.1ac374edf29bcb18.js new file mode 100644 index 000000000..18db2aee0 --- /dev/null +++ b/dist/fansubid/browser/common.1ac374edf29bcb18.js @@ -0,0 +1 @@ +(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[592],{3331:(y,E,r)=>{"use strict";r.d(E,{B:()=>d});var e=r(5934),l=r(5e3),v=r(8696);let d=(()=>{class s{constructor(i){this.gs=i}get GS(){return this.gs}ngOnInit(){}get discordUrl(){return e.N.discord.join_url}get discordGuildId(){return e.N.discord.guild_id}}return s.\u0275fac=function(i){return new(i||s)(l.Y36(v.U))},s.\u0275cmp=l.Xpm({type:s,selectors:[["app-banner-discord"]],decls:9,vars:3,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[1,"gradient-border","rgb-border","mx-2","mb-2"],["target","_blank",3,"href"],[1,"w-100",3,"src"]],template:function(i,f){1&i&&(l.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"b",3),l._uU(4,"Yuk Gabung Obrolan!"),l.qZA()()(),l.TgZ(5,"div",4)(6,"p",5)(7,"a",6),l._UZ(8,"img",7),l.qZA()()()()),2&i&&(l.xp6(7),l.s9C("href",f.discordUrl,l.LSH),l.xp6(1),l.hYB("src","https://discord.com/api/guilds/",f.discordGuildId,"/widget.png?style=banner",f.GS.gridListBreakpoint,"",l.LSH))},styles:[""]}),s})()},4854:(y,E,r)=>{"use strict";r.d(E,{R:()=>v});var e=r(9808),l=r(5e3);let v=(()=>{class d{}return d.\u0275fac=function(p){return new(p||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[[e.ez]]}),d})()},913:(y,E,r)=>{"use strict";r.d(E,{g:()=>s});var e=r(9808),l=r(8406),v=r(210),d=r(5e3);let s=(()=>{class p{}return p.\u0275fac=function(f){return new(f||p)},p.\u0275mod=d.oAB({type:p}),p.\u0275inj=d.cJS({imports:[[e.ez,l.Bz,v.m]]}),p})()},8921:(y,E,r)=>{"use strict";r.d(E,{X:()=>b});var e=r(5e3),l=r(8696),v=r(8381),d=r(9808),s=r(3626);function p(n,_){if(1&n&&(e.TgZ(0,"p",6),e._uU(1," Portal :: "),e.TgZ(2,"span",8),e._uU(3),e.qZA()()),2&n){const c=e.oxw();e.xp6(3),e.hij(" ",null==c.SS.github?null:c.SS.github.sha," ")}}function i(n,_){if(1&n&&(e.TgZ(0,"p",6),e._uU(1," Date :: "),e.TgZ(2,"span",8),e._uU(3),e.ALo(4,"date"),e.qZA()()),2&n){const c=e.oxw();e.xp6(3),e.hij(" ",e.xi3(4,1,null==c.SS.github||null==c.SS.github.commit||null==c.SS.github.commit.author?null:c.SS.github.commit.author.date,"d MMM y, hh:mm:ss a z")," ")}}function f(n,_){if(1&n&&(e.TgZ(0,"p",6),e._uU(1," Message :: "),e.TgZ(2,"span",7),e._uU(3),e.qZA()()),2&n){const c=e.oxw();e.xp6(3),e.hij(" ",null==c.SS.github||null==c.SS.github.commit?null:c.SS.github.commit.message," ")}}function M(n,_){if(1&n&&(e.TgZ(0,"p",6),e._uU(1," Socket :: "),e.TgZ(2,"span",8),e._uU(3),e.qZA()()),2&n){const c=e.oxw();e.xp6(3),e.hij(" ",null!=c.SS.mySocket&&c.SS.mySocket.id?c.SS.mySocket.id:"Sambungan Terputus"," ")}}function a(n,_){if(1&n&&(e.TgZ(0,"p",6),e._uU(1," Latency :: "),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const c=e.oxw();e.xp6(2),e.Gre("text-",c.SS.latency>75?"warning":"success",""),e.xp6(1),e.hij(" ",c.SS.latency," ms ")}}function u(n,_){if(1&n&&(e.TgZ(0,"p",6),e._uU(1," Nodes :: "),e.TgZ(2,"span",8),e._uU(3),e.qZA()()),2&n){const c=e.oxw();e.xp6(3),e.hij(" ",c.SS.visitor," Koneksi ")}}let b=(()=>{class n{constructor(c,h){this.gs=c,this.ss=h,this.currentServer=null,this.subsServer=null}get SS(){return this.ss}ngOnInit(){this.gs.isBrowser&&(this.subsServer=this.ss.currentServer.subscribe({next:c=>this.currentServer=c}))}ngOnDestroy(){var c;null===(c=this.subsServer)||void 0===c||c.unsubscribe()}}return n.\u0275fac=function(c){return new(c||n)(e.Y36(l.U),e.Y36(v.R))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-stats-server"]],decls:37,vars:27,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],["class","px-2 text-truncate",4,"ngIf"],[1,"px-2","text-truncate"],[1,"text-warning"],[1,"text-success"]],template:function(c,h){1&c&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"b",3),e._uU(4,"Statistik Server"),e.qZA()()(),e.TgZ(5,"div",4),e.YNc(6,p,4,1,"p",5),e.YNc(7,i,5,4,"p",5),e.YNc(8,f,4,1,"p",5),e.TgZ(9,"p",6),e._uU(10," Server :: "),e.TgZ(11,"span",7),e._uU(12),e.qZA()(),e.YNc(13,M,4,1,"p",5),e.YNc(14,a,4,4,"p",5),e.YNc(15,u,4,1,"p",5),e.TgZ(16,"p",6),e._uU(17," CPUs Load :: "),e.TgZ(18,"span",7),e._uU(19),e.ALo(20,"number"),e.qZA()(),e.TgZ(21,"p",6),e._uU(22," RAM Usage :: "),e.TgZ(23,"span",7),e._uU(24),e.ALo(25,"bytes"),e.qZA()(),e.TgZ(26,"p",6),e._uU(27," Disk IO (/s) :: "),e.TgZ(28,"span",7),e._uU(29),e.ALo(30,"bytes"),e.qZA()(),e.TgZ(31,"p",6),e._uU(32," Network UD (/s) :: "),e.TgZ(33,"span",7),e._uU(34),e.ALo(35,"bytes"),e.ALo(36,"bytes"),e.qZA()()()()),2&c&&(e.xp6(6),e.Q6J("ngIf",null==h.SS.github?null:h.SS.github.sha),e.xp6(1),e.Q6J("ngIf",null==h.SS.github||null==h.SS.github.commit||null==h.SS.github.commit.author?null:h.SS.github.commit.author.date),e.xp6(1),e.Q6J("ngIf",null==h.SS.github||null==h.SS.github.commit?null:h.SS.github.commit.message),e.xp6(4),e.hij(" ",null!=h.currentServer&&h.currentServer.isMaintenance?"Dalam Perbaikan":"Berjalan Normal"," "),e.xp6(1),e.Q6J("ngIf",h.SS.mySocket),e.xp6(1),e.Q6J("ngIf",h.SS.latency),e.xp6(1),e.Q6J("ngIf",h.SS.visitor),e.xp6(4),e.hij(" ",e.xi3(20,12,h.SS.statsServer.cpus,"1.2-2")," % "),e.xp6(5),e.hij(" ",e.xi3(25,15,h.SS.statsServer.mem_ram,2)," "),e.xp6(5),e.hij(" ",e.xi3(30,18,h.SS.statsServer.disk_io,2)," "),e.xp6(5),e.AsE(" ",e.xi3(35,21,h.SS.statsServer.net_tx,2)," / ",e.xi3(36,24,h.SS.statsServer.net_rx,2)," "))},directives:[d.O5],pipes:[d.uU,d.JJ,s.$],styles:[""]}),n})()},669:(y,E,r)=>{"use strict";r.d(E,{A:()=>d});var e=r(9808),l=r(7355),v=r(5e3);let d=(()=>{class s{}return s.\u0275fac=function(i){return new(i||s)},s.\u0275mod=v.oAB({type:s}),s.\u0275inj=v.cJS({imports:[[e.ez,l.T]]}),s})()},7358:(y,E,r)=>{"use strict";r.d(E,{Y:()=>d});var e=r(5e3),l=r(9731),v=r(8696);let d=(()=>{class s{constructor(i,f){this.api=i,this.gs=f}getMailbox(i="inbox",f="",M=1,a=10,u="",b=""){return this.api.getData(`/mail-${i}?q=${f}&page=${M}&row=${a}&sort=${u}&order=${b}`)}getAllMail(i="",f=1,M=10,a="",u=""){return this.api.getData(`/mail?q=${i}&page=${f}&row=${M}&sort=${a}&order=${u}`)}getMail(i){return this.api.getData(`/mail/${i}`)}sendMail(i){return this.api.postData("/mail",i)}}return s.\u0275fac=function(i){return new(i||s)(e.LFG(l.s),e.LFG(v.U))},s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})()},5679:(y,E,r)=>{"use strict";r.d(E,{Y:()=>d});var e=r(5e3),l=r(9731),v=r(8696);let d=(()=>{class s{constructor(i,f){this.api=i,this.gs=f}getProject(){return this.api.getData("/project-type")}createProject(i){return this.api.postData("/project-type",i)}deleteProject(i){return this.api.deleteData(`/project-type/${i}`)}}return s.\u0275fac=function(i){return new(i||s)(e.LFG(l.s),e.LFG(v.U))},s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})()},4327:function(y,E){var l;void 0!==(l=function(){"use strict";function d(a,u,b){var n=new XMLHttpRequest;n.open("GET",a),n.responseType="blob",n.onload=function(){M(n.response,u,b)},n.onerror=function(){console.error("could not download file")},n.send()}function s(a){var u=new XMLHttpRequest;u.open("HEAD",a,!1);try{u.send()}catch(b){}return 200<=u.status&&299>=u.status}function p(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(b){var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(u)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,f=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),M=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!f?function(a,u,b){var n=i.URL||i.webkitURL,_=document.createElement("a");_.download=u=u||a.name||"download",_.rel="noopener","string"==typeof a?(_.href=a,_.origin===location.origin?p(_):s(_.href)?d(a,u,b):p(_,_.target="_blank")):(_.href=n.createObjectURL(a),setTimeout(function(){n.revokeObjectURL(_.href)},4e4),setTimeout(function(){p(_)},0))}:"msSaveOrOpenBlob"in navigator?function(a,u,b){if(u=u||a.name||"download","string"!=typeof a)navigator.msSaveOrOpenBlob(function v(a,u){return void 0===u?u={autoBom:!1}:"object"!=typeof u&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a}(a,b),u);else if(s(a))d(a,u,b);else{var n=document.createElement("a");n.href=a,n.target="_blank",setTimeout(function(){p(n)})}}:function(a,u,b,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof a)return d(a,u,b);var _="application/octet-stream"===a.type,c=/constructor/i.test(i.HTMLElement)||i.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent);if((h||_&&c||f)&&"undefined"!=typeof FileReader){var D=new FileReader;D.onloadend=function(){var A=D.result;A=h?A:A.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=A:location=A,n=null},D.readAsDataURL(a)}else{var O=i.URL||i.webkitURL,C=O.createObjectURL(a);n?n.location=C:location.href=C,n=null,setTimeout(function(){O.revokeObjectURL(C)},4e4)}});i.saveAs=M.saveAs=M,y.exports=M}.apply(E,[]))&&(y.exports=l)},3290:(y,E,r)=>{"use strict";r.d(E,{Vd:()=>A,a:()=>D,lQ:()=>x,wT:()=>c});var e=r(5e3),l=r(9808),v=r(9646),d=r(1135),s=r(3075);const p=new e.OlP("recaptcha-language"),i=new e.OlP("recaptcha-base-url"),f=new e.OlP("recaptcha-nonce-tag"),M=new e.OlP("recaptcha-settings"),a=new e.OlP("recaptcha-v3-site-key"),b_loadScript=function u(o,m,t,S,R){window.ng2recaptchaloaded=()=>{m(grecaptcha)};const g=document.createElement("script");g.innerHTML="",g.src=`${S||"https://www.google.com/recaptcha/api.js"}?render=${o}&onload=ng2recaptchaloaded${t}`,R&&(g.nonce=R),g.async=!0,g.defer=!0,document.head.appendChild(g)};let n=(()=>{class o{constructor(t,S,R,g,T){this.platformId=t,this.language=S,this.baseUrl=R,this.nonce=g,this.v3SiteKey=T,this.init(),this.ready=(0,l.NF)(this.platformId)?o.ready.asObservable():(0,v.of)()}init(){if(!o.ready&&(0,l.NF)(this.platformId)){const t=new d.X(null);o.ready=t,b_loadScript(this.v3SiteKey||"explicit",g=>t.next(g),this.language?"&hl="+this.language:"",this.baseUrl,this.nonce)}}}return o.ready=null,o.\u0275fac=function(t){return new(t||o)(e.LFG(e.Lbi),e.LFG(p,8),e.LFG(i,8),e.LFG(f,8),e.LFG(a,8))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac}),o})(),_=0,c=(()=>{class o{constructor(t,S,R,g){this.elementRef=t,this.loader=S,this.zone=R,this.id="ngrecaptcha-"+_++,this.errorMode="default",this.resolved=new e.vpe,this.error=new e.vpe,g&&(this.siteKey=g.siteKey,this.theme=g.theme,this.type=g.type,this.size=g.size,this.badge=g.badge)}ngAfterViewInit(){this.subscription=this.loader.ready.subscribe(t=>{null!=t&&t.render instanceof Function&&(this.grecaptcha=t,this.renderRecaptcha())})}ngOnDestroy(){this.grecaptchaReset(),this.subscription&&this.subscription.unsubscribe()}execute(){"invisible"===this.size&&(null!=this.widget?this.grecaptcha.execute(this.widget):this.executeRequested=!0)}reset(){null!=this.widget&&(this.grecaptcha.getResponse(this.widget)&&this.resolved.emit(null),this.grecaptchaReset())}get __unsafe_widgetValue(){return null!=this.widget?this.grecaptcha.getResponse(this.widget):null}expired(){this.resolved.emit(null)}errored(t){this.error.emit(t)}captchaResponseCallback(t){this.resolved.emit(t)}grecaptchaReset(){null!=this.widget&&this.zone.runOutsideAngular(()=>this.grecaptcha.reset(this.widget))}renderRecaptcha(){const t={badge:this.badge,callback:S=>{this.zone.run(()=>this.captchaResponseCallback(S))},"expired-callback":()=>{this.zone.run(()=>this.expired())},sitekey:this.siteKey,size:this.size,tabindex:this.tabIndex,theme:this.theme,type:this.type};"handled"===this.errorMode&&(t["error-callback"]=(...S)=>{this.zone.run(()=>this.errored(S))}),this.widget=this.grecaptcha.render(this.elementRef.nativeElement,t),!0===this.executeRequested&&(this.executeRequested=!1,this.execute())}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(n),e.Y36(e.R0b),e.Y36(M,8))},o.\u0275cmp=e.Xpm({type:o,selectors:[["re-captcha"]],hostVars:1,hostBindings:function(t,S){2&t&&e.uIk("id",S.id)},inputs:{id:"id",siteKey:"siteKey",theme:"theme",type:"type",size:"size",tabIndex:"tabIndex",badge:"badge",errorMode:"errorMode"},outputs:{resolved:"resolved",error:"error"},exportAs:["reCaptcha"],decls:0,vars:0,template:function(t,S){},encapsulation:2}),o})(),h=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})(),D=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({providers:[n],imports:[[h]]}),o})(),A=(()=>{class o{constructor(t){this.host=t,this.requiresControllerReset=!1}writeValue(t){t?this.host.__unsafe_widgetValue!==t&&!1===Boolean(this.host.__unsafe_widgetValue)&&(this.requiresControllerReset=!0):this.host.reset()}registerOnChange(t){this.onChange=t,this.requiresControllerReset&&(this.requiresControllerReset=!1,this.onChange(null))}registerOnTouched(t){this.onTouched=t}onResolve(t){this.onChange&&this.onChange(t),this.onTouched&&this.onTouched()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(c))},o.\u0275dir=e.lG2({type:o,selectors:[["re-captcha","formControlName",""],["re-captcha","formControl",""],["re-captcha","ngModel",""]],hostBindings:function(t,S){1&t&&e.NdJ("resolved",function(g){return S.onResolve(g)})},features:[e._Bn([{multi:!0,provide:s.JU,useExisting:(0,e.Gpc)(()=>o)}])]}),o})(),x=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[[s.u5,h]]}),o})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/common.ec9ef4839de19b37.js b/dist/fansubid/browser/common.ec9ef4839de19b37.js deleted file mode 100644 index 2edc1b163..000000000 --- a/dist/fansubid/browser/common.ec9ef4839de19b37.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[592],{3331:(R,E,r)=>{"use strict";r.d(E,{B:()=>d});var e=r(5934),l=r(5e3),S=r(8696);let d=(()=>{class h{constructor(i){this.gs=i}get GS(){return this.gs}ngOnInit(){}get discordUrl(){return e.N.discord.join_url}get discordGuildId(){return e.N.discord.guild_id}}return h.\u0275fac=function(i){return new(i||h)(l.Y36(S.U))},h.\u0275cmp=l.Xpm({type:h,selectors:[["app-banner-discord"]],decls:9,vars:3,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[1,"gradient-border","rgb-border","mx-2","mb-2"],["target","_blank",3,"href"],[1,"w-100",3,"src"]],template:function(i,f){1&i&&(l.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"b",3),l._uU(4,"Yuk Gabung Obrolan!"),l.qZA()()(),l.TgZ(5,"div",4)(6,"p",5)(7,"a",6),l._UZ(8,"img",7),l.qZA()()()()),2&i&&(l.xp6(7),l.s9C("href",f.discordUrl,l.LSH),l.xp6(1),l.hYB("src","https://discord.com/api/guilds/",f.discordGuildId,"/widget.png?style=banner",f.GS.gridListBreakpoint,"",l.LSH))},styles:[""]}),h})()},4854:(R,E,r)=>{"use strict";r.d(E,{R:()=>S});var e=r(9808),l=r(5e3);let S=(()=>{class d{}return d.\u0275fac=function(p){return new(p||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[[e.ez]]}),d})()},913:(R,E,r)=>{"use strict";r.d(E,{g:()=>h});var e=r(9808),l=r(8406),S=r(210),d=r(5e3);let h=(()=>{class p{}return p.\u0275fac=function(f){return new(f||p)},p.\u0275mod=d.oAB({type:p}),p.\u0275inj=d.cJS({imports:[[e.ez,l.Bz,S.m]]}),p})()},8921:(R,E,r)=>{"use strict";r.d(E,{X:()=>u});var e=r(5e3),l=r(8696),S=r(8381),d=r(9808);function h(a,c){if(1&a&&(e.TgZ(0,"p",6),e._uU(1," Portal :: "),e.TgZ(2,"span",8),e._uU(3),e.qZA()()),2&a){const n=e.oxw();e.xp6(3),e.hij(" ",null==n.SS.github?null:n.SS.github.sha," ")}}function p(a,c){if(1&a&&(e.TgZ(0,"p",6),e._uU(1," Date :: "),e.TgZ(2,"span",8),e._uU(3),e.ALo(4,"date"),e.qZA()()),2&a){const n=e.oxw();e.xp6(3),e.hij(" ",e.xi3(4,1,null==n.SS.github||null==n.SS.github.commit||null==n.SS.github.commit.author?null:n.SS.github.commit.author.date,"d MMM y, hh:mm:ss a z")," ")}}function i(a,c){if(1&a&&(e.TgZ(0,"p",6),e._uU(1," Message :: "),e.TgZ(2,"span",7),e._uU(3),e.qZA()()),2&a){const n=e.oxw();e.xp6(3),e.hij(" ",null==n.SS.github||null==n.SS.github.commit?null:n.SS.github.commit.message," ")}}function f(a,c){if(1&a&&(e.TgZ(0,"p",6),e._uU(1," Socket :: "),e.TgZ(2,"span",8),e._uU(3),e.qZA()()),2&a){const n=e.oxw();e.xp6(3),e.hij(" ",null!=n.SS.mySocket&&n.SS.mySocket.id?n.SS.mySocket.id:"Sambungan Terputus"," ")}}function b(a,c){if(1&a&&(e.TgZ(0,"p",6),e._uU(1," Latency :: "),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&a){const n=e.oxw();e.xp6(2),e.Gre("text-",n.SS.latency>75?"warning":"success",""),e.xp6(1),e.hij(" ",n.SS.latency," ms ")}}function s(a,c){if(1&a&&(e.TgZ(0,"p",6),e._uU(1," Nodes :: "),e.TgZ(2,"span",8),e._uU(3),e.qZA()()),2&a){const n=e.oxw();e.xp6(3),e.hij(" ",n.SS.visitor," Koneksi ")}}let u=(()=>{class a{constructor(n,g){this.gs=n,this.ss=g,this.currentServer=null,this.subsServer=null}get SS(){return this.ss}ngOnInit(){this.gs.isBrowser&&(this.subsServer=this.ss.currentServer.subscribe({next:n=>this.currentServer=n}))}ngOnDestroy(){var n;null===(n=this.subsServer)||void 0===n||n.unsubscribe()}}return a.\u0275fac=function(n){return new(n||a)(e.Y36(l.U),e.Y36(S.R))},a.\u0275cmp=e.Xpm({type:a,selectors:[["app-stats-server"]],decls:16,vars:7,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],["class","px-2 text-truncate",4,"ngIf"],[1,"px-2","text-truncate"],[1,"text-warning"],[1,"text-success"]],template:function(n,g){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"b",3),e._uU(4,"Statistik Server"),e.qZA()()(),e.TgZ(5,"div",4),e.YNc(6,h,4,1,"p",5),e.YNc(7,p,5,4,"p",5),e.YNc(8,i,4,1,"p",5),e.TgZ(9,"p",6),e._uU(10," Server :: "),e.TgZ(11,"span",7),e._uU(12),e.qZA()(),e.YNc(13,f,4,1,"p",5),e.YNc(14,b,4,4,"p",5),e.YNc(15,s,4,1,"p",5),e.qZA()()),2&n&&(e.xp6(6),e.Q6J("ngIf",null==g.SS.github?null:g.SS.github.sha),e.xp6(1),e.Q6J("ngIf",null==g.SS.github||null==g.SS.github.commit||null==g.SS.github.commit.author?null:g.SS.github.commit.author.date),e.xp6(1),e.Q6J("ngIf",null==g.SS.github||null==g.SS.github.commit?null:g.SS.github.commit.message),e.xp6(4),e.hij(" ",null!=g.currentServer&&g.currentServer.isMaintenance?"Dalam Perbaikan":"Berjalan Normal"," "),e.xp6(1),e.Q6J("ngIf",g.SS.mySocket),e.xp6(1),e.Q6J("ngIf",g.SS.latency),e.xp6(1),e.Q6J("ngIf",g.SS.visitor))},directives:[d.O5],pipes:[d.uU],styles:[""]}),a})()},669:(R,E,r)=>{"use strict";r.d(E,{A:()=>S});var e=r(9808),l=r(5e3);let S=(()=>{class d{}return d.\u0275fac=function(p){return new(p||d)},d.\u0275mod=l.oAB({type:d}),d.\u0275inj=l.cJS({imports:[[e.ez]]}),d})()},7358:(R,E,r)=>{"use strict";r.d(E,{Y:()=>d});var e=r(5e3),l=r(9731),S=r(8696);let d=(()=>{class h{constructor(i,f){this.api=i,this.gs=f}getMailbox(i="inbox",f="",b=1,s=10,u="",a=""){return this.api.getData(`/mail-${i}?q=${f}&page=${b}&row=${s}&sort=${u}&order=${a}`)}getAllMail(i="",f=1,b=10,s="",u=""){return this.api.getData(`/mail?q=${i}&page=${f}&row=${b}&sort=${s}&order=${u}`)}getMail(i){return this.api.getData(`/mail/${i}`)}sendMail(i){return this.api.postData("/mail",i)}}return h.\u0275fac=function(i){return new(i||h)(e.LFG(l.s),e.LFG(S.U))},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})()},5679:(R,E,r)=>{"use strict";r.d(E,{Y:()=>d});var e=r(5e3),l=r(9731),S=r(8696);let d=(()=>{class h{constructor(i,f){this.api=i,this.gs=f}getProject(){return this.api.getData("/project-type")}createProject(i){return this.api.postData("/project-type",i)}deleteProject(i){return this.api.deleteData(`/project-type/${i}`)}}return h.\u0275fac=function(i){return new(i||h)(e.LFG(l.s),e.LFG(S.U))},h.\u0275prov=e.Yz7({token:h,factory:h.\u0275fac,providedIn:"root"}),h})()},4327:function(R,E){var l;void 0!==(l=function(){"use strict";function d(s,u,a){var c=new XMLHttpRequest;c.open("GET",s),c.responseType="blob",c.onload=function(){b(c.response,u,a)},c.onerror=function(){console.error("could not download file")},c.send()}function h(s){var u=new XMLHttpRequest;u.open("HEAD",s,!1);try{u.send()}catch(a){}return 200<=u.status&&299>=u.status}function p(s){try{s.dispatchEvent(new MouseEvent("click"))}catch(a){var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),s.dispatchEvent(u)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,f=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),b=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!f?function(s,u,a){var c=i.URL||i.webkitURL,n=document.createElement("a");n.download=u=u||s.name||"download",n.rel="noopener","string"==typeof s?(n.href=s,n.origin===location.origin?p(n):h(n.href)?d(s,u,a):p(n,n.target="_blank")):(n.href=c.createObjectURL(s),setTimeout(function(){c.revokeObjectURL(n.href)},4e4),setTimeout(function(){p(n)},0))}:"msSaveOrOpenBlob"in navigator?function(s,u,a){if(u=u||s.name||"download","string"!=typeof s)navigator.msSaveOrOpenBlob(function S(s,u){return void 0===u?u={autoBom:!1}:"object"!=typeof u&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\ufeff",s],{type:s.type}):s}(s,a),u);else if(h(s))d(s,u,a);else{var c=document.createElement("a");c.href=s,c.target="_blank",setTimeout(function(){p(c)})}}:function(s,u,a,c){if((c=c||open("","_blank"))&&(c.document.title=c.document.body.innerText="downloading..."),"string"==typeof s)return d(s,u,a);var n="application/octet-stream"===s.type,g=/constructor/i.test(i.HTMLElement)||i.safari,A=/CriOS\/[\d]+/.test(navigator.userAgent);if((A||n&&g||f)&&"undefined"!=typeof FileReader){var C=new FileReader;C.onloadend=function(){var y=C.result;y=A?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=y:location=y,c=null},C.readAsDataURL(s)}else{var w=i.URL||i.webkitURL,D=w.createObjectURL(s);c?c.location=D:location.href=D,c=null,setTimeout(function(){w.revokeObjectURL(D)},4e4)}});i.saveAs=b.saveAs=b,R.exports=b}.apply(E,[]))&&(R.exports=l)},3290:(R,E,r)=>{"use strict";r.d(E,{Vd:()=>y,a:()=>C,lQ:()=>x,wT:()=>g});var e=r(5e3),l=r(9808),S=r(9646),d=r(1135),h=r(3075);const p=new e.OlP("recaptcha-language"),i=new e.OlP("recaptcha-base-url"),f=new e.OlP("recaptcha-nonce-tag"),b=new e.OlP("recaptcha-settings"),s=new e.OlP("recaptcha-v3-site-key"),a_loadScript=function u(o,v,t,m,M){window.ng2recaptchaloaded=()=>{v(grecaptcha)};const _=document.createElement("script");_.innerHTML="",_.src=`${m||"https://www.google.com/recaptcha/api.js"}?render=${o}&onload=ng2recaptchaloaded${t}`,M&&(_.nonce=M),_.async=!0,_.defer=!0,document.head.appendChild(_)};let c=(()=>{class o{constructor(t,m,M,_,O){this.platformId=t,this.language=m,this.baseUrl=M,this.nonce=_,this.v3SiteKey=O,this.init(),this.ready=(0,l.NF)(this.platformId)?o.ready.asObservable():(0,S.of)()}init(){if(!o.ready&&(0,l.NF)(this.platformId)){const t=new d.X(null);o.ready=t,a_loadScript(this.v3SiteKey||"explicit",_=>t.next(_),this.language?"&hl="+this.language:"",this.baseUrl,this.nonce)}}}return o.ready=null,o.\u0275fac=function(t){return new(t||o)(e.LFG(e.Lbi),e.LFG(p,8),e.LFG(i,8),e.LFG(f,8),e.LFG(s,8))},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac}),o})(),n=0,g=(()=>{class o{constructor(t,m,M,_){this.elementRef=t,this.loader=m,this.zone=M,this.id="ngrecaptcha-"+n++,this.errorMode="default",this.resolved=new e.vpe,this.error=new e.vpe,_&&(this.siteKey=_.siteKey,this.theme=_.theme,this.type=_.type,this.size=_.size,this.badge=_.badge)}ngAfterViewInit(){this.subscription=this.loader.ready.subscribe(t=>{null!=t&&t.render instanceof Function&&(this.grecaptcha=t,this.renderRecaptcha())})}ngOnDestroy(){this.grecaptchaReset(),this.subscription&&this.subscription.unsubscribe()}execute(){"invisible"===this.size&&(null!=this.widget?this.grecaptcha.execute(this.widget):this.executeRequested=!0)}reset(){null!=this.widget&&(this.grecaptcha.getResponse(this.widget)&&this.resolved.emit(null),this.grecaptchaReset())}get __unsafe_widgetValue(){return null!=this.widget?this.grecaptcha.getResponse(this.widget):null}expired(){this.resolved.emit(null)}errored(t){this.error.emit(t)}captchaResponseCallback(t){this.resolved.emit(t)}grecaptchaReset(){null!=this.widget&&this.zone.runOutsideAngular(()=>this.grecaptcha.reset(this.widget))}renderRecaptcha(){const t={badge:this.badge,callback:m=>{this.zone.run(()=>this.captchaResponseCallback(m))},"expired-callback":()=>{this.zone.run(()=>this.expired())},sitekey:this.siteKey,size:this.size,tabindex:this.tabIndex,theme:this.theme,type:this.type};"handled"===this.errorMode&&(t["error-callback"]=(...m)=>{this.zone.run(()=>this.errored(m))}),this.widget=this.grecaptcha.render(this.elementRef.nativeElement,t),!0===this.executeRequested&&(this.executeRequested=!1,this.execute())}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(e.SBq),e.Y36(c),e.Y36(e.R0b),e.Y36(b,8))},o.\u0275cmp=e.Xpm({type:o,selectors:[["re-captcha"]],hostVars:1,hostBindings:function(t,m){2&t&&e.uIk("id",m.id)},inputs:{id:"id",siteKey:"siteKey",theme:"theme",type:"type",size:"size",tabIndex:"tabIndex",badge:"badge",errorMode:"errorMode"},outputs:{resolved:"resolved",error:"error"},exportAs:["reCaptcha"],decls:0,vars:0,template:function(t,m){},encapsulation:2}),o})(),A=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({}),o})(),C=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({providers:[c],imports:[[A]]}),o})(),y=(()=>{class o{constructor(t){this.host=t,this.requiresControllerReset=!1}writeValue(t){t?this.host.__unsafe_widgetValue!==t&&!1===Boolean(this.host.__unsafe_widgetValue)&&(this.requiresControllerReset=!0):this.host.reset()}registerOnChange(t){this.onChange=t,this.requiresControllerReset&&(this.requiresControllerReset=!1,this.onChange(null))}registerOnTouched(t){this.onTouched=t}onResolve(t){this.onChange&&this.onChange(t),this.onTouched&&this.onTouched()}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(g))},o.\u0275dir=e.lG2({type:o,selectors:[["re-captcha","formControlName",""],["re-captcha","formControl",""],["re-captcha","ngModel",""]],hostBindings:function(t,m){1&t&&e.NdJ("resolved",function(_){return m.onResolve(_)})},features:[e._Bn([{multi:!0,provide:h.JU,useExisting:(0,e.Gpc)(()=>o)}])]}),o})(),x=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[[h.u5,A]]}),o})()}}]); \ No newline at end of file diff --git a/dist/fansubid/browser/index.html b/dist/fansubid/browser/index.html index 58b724a48..3216304e2 100644 --- a/dist/fansubid/browser/index.html +++ b/dist/fansubid/browser/index.html @@ -63,7 +63,7 @@ - + \ No newline at end of file diff --git a/dist/fansubid/browser/main.9219daacd31d1656.js b/dist/fansubid/browser/main.9219daacd31d1656.js new file mode 100644 index 000000000..65488a5f9 --- /dev/null +++ b/dist/fansubid/browser/main.9219daacd31d1656.js @@ -0,0 +1 @@ +var lx=Object.defineProperty,cx=(it,U,a)=>U in it?lx(it,U,{enumerable:!0,configurable:!0,writable:!0,value:a}):it[U]=a,Gu=(it,U,a)=>(cx(it,"symbol"!=typeof U?U+"":U,a),a);(self.webpackChunkfansubid=self.webpackChunkfansubid||[]).push([[179],{192:(it,U,a)=>{"use strict";a.d(U,{d:()=>l});var n=a(5e3),r=a(8696);let l=(()=>{class u{constructor(I){this.gs=I}ngOnInit(){}}return u.\u0275fac=function(I){return new(I||u)(n.Y36(r.U))},u.\u0275cmp=n.Xpm({type:u,selectors:[["app-no-data"]],decls:5,vars:0,consts:[[2,"background-image","url('/assets/img/404/no-data.png')","background-size","contain","background-position","center","background-repeat","no-repeat","height","256px","overflow","hidden"],[1,"row","align-items-center","h-100"],[1,"col-8","mx-auto","text-light","text-center","rounded","py-3",2,"background-color","rgba(128, 128, 128, 0.875)"],[1,"m-0"]],template:function(I,M){1&I&&(n.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),n._uU(4," Tidak Ada Data \xaf\\_(\u30c4)_/\xaf "),n.qZA()()()())},styles:[""]}),u})()},2438:(it,U,a)=>{"use strict";a.d(U,{d:()=>l});var n=a(9808),r=a(5e3);let l=(()=>{class u{}return u.\u0275fac=function(I){return new(I||u)},u.\u0275mod=r.oAB({type:u}),u.\u0275inj=r.cJS({imports:[[n.ez]]}),u})()},1617:(it,U,a)=>{"use strict";a.d(U,{u:()=>j});var n=a(6271),r=a(4249),l=a(5e3),u=a(4137),o=a(8696),I=a(8381),M=a(3379),g=a(8406),C=a(9808),D=a(7322),y=a(4107),_=a(508),E=a(7531),O=a(3075),ee=a(5245),ue=a(7423);const Z=["liveChatScroll"];function ne(Y,J){if(1&Y&&(l.TgZ(0,"mat-option",17),l._uU(1,"Global Fansubber"),l.qZA()),2&Y){const ie=l.oxw(2);l.Q6J("value",ie.CONSTANTS.socketRoomNameGlobalFansub)}}function De(Y,J){if(1&Y&&(l.TgZ(0,"div",26)(1,"div",27),l._UZ(2,"img",28),l.qZA(),l.TgZ(3,"div",29)(4,"h4",30)(5,"span"),l._uU(6),l.qZA()()()()),2&Y){const ie=l.oxw().$implicit;l.MGl("routerLink","/user/",ie.value.username,""),l.xp6(2),l.s9C("src",ie.value.image_url,l.LSH),l.xp6(4),l.Oqu(ie.value.username)}}function ve(Y,J){if(1&Y&&(l.TgZ(0,"div",24),l.YNc(1,De,7,3,"div",25),l.qZA()),2&Y){const ie=J.$implicit;l.xp6(1),l.Q6J("ngIf",ie.value)}}function W(Y,J){if(1&Y&&(l.TgZ(0,"div",22),l.YNc(1,ve,2,1,"div",23),l.ALo(2,"keyvalue"),l.qZA()),2&Y){const ie=l.oxw(2);l.xp6(1),l.Q6J("ngForOf",l.lcZ(2,1,ie.roomCurrentOrGlobal.member_list))}}function z(Y,J){if(1&Y){const ie=l.EpF();l.TgZ(0,"div",13)(1,"div",3)(2,"h3",14)(3,"mat-form-field",15)(4,"mat-label"),l._uU(5,"Ruang Obrolan"),l.qZA(),l.TgZ(6,"mat-select",16),l.NdJ("valueChange",function(nt){return l.CHM(ie),l.oxw().liveChatResult.roomId=nt})("valueChange",function(nt){return l.CHM(ie),l.oxw().changeRoom(nt)}),l.TgZ(7,"mat-option",17),l._uU(8,"Halaman Ini"),l.qZA(),l.TgZ(9,"mat-option",17),l._uU(10,"Global Publik"),l.qZA(),l.YNc(11,ne,2,1,"mat-option",18),l.qZA()()()(),l.TgZ(12,"div",19)(13,"div",20),l.YNc(14,W,3,3,"div",21),l.qZA()()()}if(2&Y){const ie=l.oxw();l.xp6(3),l.Q6J("color","accent"),l.xp6(3),l.Q6J("value",ie.liveChatResult.roomId),l.xp6(1),l.Q6J("value",ie.ROUTER.url),l.xp6(2),l.Q6J("value",ie.CONSTANTS.socketRoomNameGlobalPublic),l.xp6(2),l.Q6J("ngIf",ie.isAdminModFansubber),l.xp6(3),l.Q6J("ngIf",ie.roomCurrentOrGlobal)}}function V(Y,J){if(1&Y&&(l.TgZ(0,"div",27),l._UZ(1,"img",28),l.qZA()),2&Y){const ie=l.oxw().$implicit;l.xp6(1),l.s9C("src",ie.sender.image_url,l.LSH)}}function Me(Y,J){if(1&Y){const ie=l.EpF();l.TgZ(0,"div"),l.YNc(1,V,2,1,"div",31),l.TgZ(2,"div",32)(3,"h5",30)(4,"span",33),l.NdJ("click",function(){const Tt=l.CHM(ie).$implicit;return l.oxw().openUserProfile(Tt.sender.username)}),l._uU(5),l.qZA(),l._UZ(6,"span",34),l.qZA()()()}if(2&Y){const ie=J.$implicit,Be=J.index,nt=l.oxw();l.Gre("d-flex py-1 ",Be===nt.chatCurrentOrGlobal.length-nt.SS.messageChatUnreadCount?"border-top":"",""),l.xp6(1),l.Q6J("ngIf",ie.sender.image_url),l.xp6(4),l.hij(" ",ie.sender.username," "),l.xp6(1),l.Q6J("innerHtml",nt.innerHtml(ie.message),l.oJD)}}function Q(Y,J){if(1&Y){const ie=l.EpF();l.TgZ(0,"mat-form-field",35)(1,"mat-label"),l._uU(2,"Kirim Pesan Obrolan Disini ..."),l.qZA(),l.TgZ(3,"input",36),l.NdJ("keyup.enter",function(nt){return l.CHM(ie),l.oxw().applyFilter(nt)})("ngModelChange",function(nt){return l.CHM(ie),l.oxw().liveChatResult.messageToSend=nt}),l.qZA(),l.TgZ(4,"mat-icon",37),l._uU(5,"send"),l.qZA()()}if(2&Y){const ie=l.oxw();l.Q6J("color","accent"),l.xp6(3),l.Q6J("ngModel",ie.liveChatResult.messageToSend)("disabled",!ie.canChat)}}function fe(Y,J){if(1&Y){const ie=l.EpF();l.TgZ(0,"button",38),l.NdJ("click",function(){return l.CHM(ie),l.oxw().login()}),l.TgZ(1,"mat-icon",39),l._uU(2,"vpn_key"),l.qZA(),l._uU(3," Login Untuk Bisa Mengobrol "),l.qZA()}}const Ae=function(Y){return{height:Y}};let j=(()=>{class Y{constructor(ie,Be,nt,Tt,Rt){this.as=ie,this.gs=Be,this.ss=nt,this.ls=Tt,this.router=Rt,this.chatOnly=!1,this.liveChatResult={messageToSend:"",roomId:""},this.globalRoom=null,this.fansubRoom=null,this.currentRoom=null,this.messageHistory=[],this.subsCurrentRoom=null,this.subsGlobalRoom=null,this.subsFansubRoom=null,this.firstTimeOpen=!0,this.timedOut=null}get AS(){return this.as}get ROUTER(){return this.router}get SS(){return this.ss}ngOnInit(){this.gs.isBrowser&&(this.liveChatResult=this.ls.getItem(this.gs.localStorageKeys.LiveChatResults,!0)||this.liveChatResult,this.liveChatResult.roomId=this.router.url.split("?")[0],this.subsCurrentRoom=this.ss.currentRoom.subscribe({next:ie=>{this.currentRoom=ie}}),this.subsGlobalRoom=this.ss.globalRoom.subscribe({next:ie=>{this.globalRoom=ie}}),this.subsFansubRoom=this.ss.fansubRoom.subscribe({next:ie=>{this.fansubRoom=ie}}))}get CONSTANTS(){return n.t}get isAdminModFansubber(){var ie,Be,nt,Tt,Rt,mt,gt;return!(!(null===(ie=this.as.currentUserSubject)||void 0===ie?void 0:ie.value)||(null===(nt=null===(Be=this.as.currentUserSubject)||void 0===Be?void 0:Be.value)||void 0===nt?void 0:nt.role)!==r.yS.ADMIN&&(null===(Rt=null===(Tt=this.as.currentUserSubject)||void 0===Tt?void 0:Tt.value)||void 0===Rt?void 0:Rt.role)!==r.yS.MODERATOR&&(null===(gt=null===(mt=this.as.currentUserSubject)||void 0===mt?void 0:mt.value)||void 0===gt?void 0:gt.role)!==r.yS.FANSUBBER)}get roomCurrentOrGlobal(){return this.liveChatResult.roomId===n.t.socketRoomNameGlobalPublic?this.globalRoom:this.liveChatResult.roomId===n.t.socketRoomNameGlobalFansub?this.fansubRoom:this.currentRoom}get chatCurrentOrGlobal(){return this.messageHistory=this.liveChatResult.roomId===n.t.socketRoomNameGlobalPublic?this.ss.globalChatRoom:this.liveChatResult.roomId===n.t.socketRoomNameGlobalFansub?this.ss.fansubChatRoom:this.ss.currentChatRoom,this.ss.messageChatUnreadCount>0&&this.scrollMessage(),this.messageHistory}get canChat(){var ie;return!!(null===(ie=this.as.currentUserSubject)||void 0===ie?void 0:ie.value)&&(this.liveChatResult.roomId!==n.t.socketRoomNameGlobalFansub||this.isAdminModFansubber)}ngAfterViewInit(){this.gs.isBrowser&&this.scrollMessage()}ngOnDestroy(){var ie,Be;this.ls.setItem(this.gs.localStorageKeys.LiveChatResults,this.liveChatResult),null===(ie=this.subsCurrentRoom)||void 0===ie||ie.unsubscribe(),null===(Be=this.subsGlobalRoom)||void 0===Be||Be.unsubscribe(),this.timedOut&&(clearTimeout(this.timedOut),this.timedOut=null)}innerHtml(ie){return this.gs.linkify(this.gs.htmlToText(ie))}scrollToBottom(){this.timedOut=setTimeout(()=>{this.ss.messageChatUnreadCount=0,this.liveChatScroll.nativeElement.scrollTop=this.liveChatScroll.nativeElement.scrollHeight},0)}scrollMessage(){this.liveChatScroll&&(this.firstTimeOpen?(this.firstTimeOpen=!1,this.scrollToBottom()):this.liveChatScroll.nativeElement.scrollTop+this.liveChatScroll.nativeElement.clientHeight===this.liveChatScroll.nativeElement.scrollHeight&&this.scrollToBottom())}sendMessage(){this.ss.socketEmit("send-chat",{roomId:this.roomCurrentOrGlobal.room_id,message:this.gs.htmlToText(this.liveChatResult.messageToSend)}),this.liveChatResult.messageToSend=null}applyFilter(ie){this.gs.log("[MESSAGE_VALUE_CHANGED]",ie),this.liveChatResult.messageToSend=ie.target.value.trim().toLowerCase(),this.liveChatResult.messageToSend&&this.sendMessage()}changeRoom(ie){this.gs.log("[MESSAGE_ROOM_CHANGED]",ie),this.liveChatResult.roomId=ie,this.scrollMessage()}login(){this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]}})}openUserProfile(ie){this.router.navigateByUrl(`/user/${ie}`)}}return Y.\u0275fac=function(ie){return new(ie||Y)(l.Y36(u.e),l.Y36(o.U),l.Y36(I.R),l.Y36(M.n),l.Y36(g.F0))},Y.\u0275cmp=l.Xpm({type:Y,selectors:[["app-live-chat"]],viewQuery:function(ie,Be){if(1&ie&&l.Gf(Z,5),2&ie){let nt;l.iGM(nt=l.CRH())&&(Be.liveChatScroll=nt.first)}},inputs:{chatOnly:"chatOnly"},decls:15,vars:13,consts:[[1,"row",3,"ngStyle"],[1,"col-12","h-100"],["class","row","style","height: 40%!important;",4,"ngIf"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12"],[2,"overflow-y","auto",3,"ngStyle"],["liveChatScroll",""],[3,"class",4,"ngFor","ngForOf"],[1,"col-12","mt-auto"],["class","mt-3 col-12",3,"color",4,"ngIf"],["class","mt-4 col-12 text-light","mat-flat-button","","color","accent",3,"click",4,"ngIf"],[1,"row",2,"height","40%!important"],[1,"border-bottom-dotted","row"],[1,"pt-3","col-12",3,"color"],[3,"value","valueChange"],[3,"value"],[3,"value",4,"ngIf"],[1,"col-12",2,"height","calc(100% - 105px)"],[1,"h-100",2,"overflow-y","auto"],["class","row m-0",4,"ngIf"],[1,"row","m-0"],["class","col-6 p-0",4,"ngFor","ngForOf"],[1,"col-6","p-0"],["class","card d-flex py-1 align-items-center p-1 text-success",3,"routerLink",4,"ngIf"],[1,"card","d-flex","py-1","align-items-center","p-1","text-success",3,"routerLink"],[1,"flex-shrink-0"],["height","24","width","24",1,"ms-1","mt-1",2,"border-radius","0",3,"src"],[1,"flex-grow-1","ms-1"],["matLine","",1,"m-0"],["class","flex-shrink-0",4,"ngIf"],[1,"flex-grow-1","mx-1","my-auto"],[1,"me-1","text-success",2,"cursor","pointer",3,"click"],[1,"text-warning",2,"word-break","break-word",3,"innerHtml"],[1,"mt-3","col-12",3,"color"],["matInput","","maxlength","200","placeholder","Ex. Hello \u4e16\u754c\uff01",3,"ngModel","disabled","keyup.enter","ngModelChange"],["matSuffix",""],["mat-flat-button","","color","accent",1,"mt-4","col-12","text-light",3,"click"],[1,"me-1"]],template:function(ie,Be){1&ie&&(l.TgZ(0,"div",0)(1,"div",1),l.YNc(2,z,15,6,"div",2),l.TgZ(3,"div",0)(4,"div",3)(5,"h2",4)(6,"b",5),l._uU(7,"Obrolan"),l.qZA()()(),l.TgZ(8,"div",6)(9,"div",7,8),l.YNc(11,Me,7,6,"div",9),l.qZA()(),l.TgZ(12,"div",10),l.YNc(13,Q,6,3,"mat-form-field",11),l.YNc(14,fe,4,0,"button",12),l.qZA()()()()),2&ie&&(l.Q6J("ngStyle",l.VKq(7,Ae,Be.chatOnly?"":"calc(100vh - 120px)")),l.xp6(2),l.Q6J("ngIf",!Be.chatOnly),l.xp6(1),l.Q6J("ngStyle",l.VKq(9,Ae,Be.chatOnly?"100%!important":"60%!important")),l.xp6(6),l.Q6J("ngStyle",l.VKq(11,Ae,Be.chatOnly?"320px":"calc(50vh - 139px)")),l.xp6(2),l.Q6J("ngForOf",Be.chatCurrentOrGlobal),l.xp6(2),l.Q6J("ngIf",null==Be.AS.currentUserSubject?null:Be.AS.currentUserSubject.value),l.xp6(1),l.Q6J("ngIf",!(null!=Be.AS.currentUserSubject&&Be.AS.currentUserSubject.value)))},directives:[C.PC,C.O5,D.KE,D.hX,y.gD,_.ey,C.sg,g.rH,_.X2,E.Nt,O.Fj,O.nD,O.JJ,O.On,ee.Hw,D.R9,ue.lW],pipes:[C.Nd],styles:[".card[_ngcontent-%COMP%]{position:inherit;display:flex;flex-direction:row;min-width:0;word-wrap:break-word;background-color:#0000!important;background-clip:border-box;border:none;border-radius:.25rem;cursor:pointer}.card[_ngcontent-%COMP%]:hover{color:#ffc107!important}"]}),Y})()},5116:(it,U,a)=>{"use strict";a.d(U,{d:()=>I});var n=a(9808),r=a(8406),l=a(3075),u=a(210),o=a(5e3);let I=(()=>{class M{}return M.\u0275fac=function(C){return new(C||M)},M.\u0275mod=o.oAB({type:M}),M.\u0275inj=o.cJS({imports:[[n.ez,r.Bz,l.u5,u.m]]}),M})()},2777:(it,U,a)=>{"use strict";a.d(U,{t:()=>g});var n=a(6271),r=a(5e3),l=a(8406),u=a(4137),o=a(6925),I=a(8696),M=a(3e3);let g=(()=>{class C{constructor(y,_,E,O,ee){this.router=y,this.as=_,this.toast=E,this.gs=O,this.bs=ee}canActivate(y,_){var E;const O=y.data[n.t.decoratorRoles];if(!O)return!0;if(this.gs.isBrowser){const ee=null===(E=this.as.currentUserSubject)||void 0===E?void 0:E.value;if(ee)return!!O.includes(ee.role)||(this.bs.clear(),this.toast.error(`Membutuhkan Role :: ${O.join(" / ")}`,"Whoops, Akses Ditolak!",null,!0),this.router.navigateByUrl(this.gs.previousUrl||"/"),!1);this.bs.clear(),this.toast.error("Harap Login Terlebih Dahulu~","Whoops, Akses Ditolak!",null,!0)}return this.router.navigate(["/login"],{queryParams:{returnUrl:_.url}}),!1}}return C.\u0275fac=function(y){return new(y||C)(r.LFG(l.F0),r.LFG(u.e),r.LFG(o.k),r.LFG(I.U),r.LFG(M.z))},C.\u0275prov=r.Yz7({token:C,factory:C.\u0275fac,providedIn:"root"}),C})()},5094:(it,U,a)=>{"use strict";a.d(U,{H:()=>g});var n=a(6271),r=a(5e3),l=a(8406),u=a(4137),o=a(6925),I=a(8696),M=a(3e3);let g=(()=>{class C{constructor(y,_,E,O,ee){this.router=y,this.as=_,this.toast=E,this.gs=O,this.bs=ee}canActivate(y,_){var E;if(!y.data[n.t.decoratorVerifiedOnly])return!0;if(this.gs.isBrowser){const ee=null===(E=this.as.currentUserSubject)||void 0===E?void 0:E.value;if(ee)return!!ee.verified||(this.bs.clear(),this.toast.error("Khusus Pengguna Terverifikasi","Whoops, Akses Ditolak!",null,!0),this.router.navigateByUrl("/verify"),!1);this.bs.clear(),this.toast.error("Harap Login Terlebih Dahulu~","Whoops, Akses Ditolak!",null,!0)}return this.router.navigate(["/login"],{queryParams:{returnUrl:_.url}}),!1}}return C.\u0275fac=function(y){return new(y||C)(r.LFG(l.F0),r.LFG(u.e),r.LFG(o.k),r.LFG(I.U),r.LFG(M.z))},C.\u0275prov=r.Yz7({token:C,factory:C.\u0275fac,providedIn:"root"}),C})()},210:(it,U,a)=>{"use strict";a.d(U,{m:()=>Y});var n=a(1555),r=a(1079),l=a(7544),u=a(7423),o=a(9224),I=a(6688),M=a(6856),g=a(8966),C=a(4834),D=a(1125),y=a(3954),_=a(5245),E=a(7531),O=a(4623),ee=a(508),ue=a(6087),Z=a(5899),ne=a(4107),De=a(2638),ve=a(2368),W=a(5615),z=a(4999),V=a(3251),Me=a(4594),Q=a(7238),fe=a(7261),Ae=a(4847),j=a(5e3);let Y=(()=>{class J{}return J.\u0275fac=function(Be){return new(Be||J)},J.\u0275mod=j.oAB({type:J}),J.\u0275inj=j.cJS({imports:[n.U5,r.Bb,l.g,u.ot,o.QW,I.Hi,M.FA,g.Is,C.t,D.To,y.N6,_.Ps,E.c,O.ie,ee.XK,ue.TU,Z.Cv,ee.si,ne.LD,De.SJ,ve.rP,W.T5,z.p0,V.Nh,Me.g0,Q.AV,fe.ZX,Ae.JX]}),J})()},3626:(it,U,a)=>{"use strict";a.d(U,{$:()=>r});var n=a(5e3);class r{static formatResult(u,o){return`${u} ${o}`}static calculateResult(u,o){const I=u.prev?r.formats[u.prev]:void 0;return I?o/I.max:o}isNumber(u){return"number"==typeof u}isNumberFinite(u){return this.isNumber(u)&&isFinite(u)}isPositive(u){return u>=0}isInteger(u){return u%1==0}toDecimal(u,o){return Math.round(u*Math.pow(10,o))/Math.pow(10,o)}transform(u,o=0,I="B",M){if(!(this.isNumberFinite(u)&&this.isNumberFinite(o)&&this.isInteger(o)&&this.isPositive(o)))return u;let g=u,C=I;for(;"B"!==C;)g*=1024,C=r.formats[C].prev;if(M){const y=this.toDecimal(r.calculateResult(r.formats[M],g),o);return r.formatResult(y,M)}for(const D in r.formats)if(r.formats.hasOwnProperty(D)){const y=r.formats[D];if(g{"use strict";a.d(U,{T:()=>l});var n=a(9808),r=a(5e3);let l=(()=>{class u{}return u.\u0275fac=function(I){return new(I||u)},u.\u0275mod=r.oAB({type:u}),u.\u0275inj=r.cJS({imports:[[n.ez]]}),u})()},1861:(it,U,a)=>{"use strict";a.d(U,{H:()=>l});var n=a(5e3),r=a(2313);let l=(()=>{class u{constructor(I){this.domSanitizer=I}transform(I){return this.domSanitizer.bypassSecurityTrustHtml(I)}}return u.\u0275fac=function(I){return new(I||u)(n.Y36(r.H7,16))},u.\u0275pipe=n.Yjl({name:"safeInnerHtml",type:u,pure:!0}),u})()},466:(it,U,a)=>{"use strict";a.d(U,{l:()=>o});var n=a(5934),r=a(5e3),l=a(9731),u=a(8696);let o=(()=>{class I{constructor(g,C){this.api=g,this.gs=C,this.menuList=[{url:"banned-list",name:"Banned List",image_url:null,icon:"lock_open",deskripsi:"Kelola Banned User"},{url:"ddl-list",name:"Berkas DDL",image_url:null,icon:"insert_drive_file",deskripsi:"Kelola Berkas DDL"},{url:"dns",name:"CNAME / A Record",image_url:null,icon:"badge",deskripsi:`sub-domain.${n.N.domain}`},{url:"cors-list",name:"CORS & API Key",image_url:null,icon:"privacy_tip",deskripsi:"Cross-Origin API"},{url:"email",name:"Email",image_url:null,icon:"alternate_email",deskripsi:`email.address@${n.N.domain}`},{url:"fansub-member",name:"Fansub Members",image_url:null,icon:"stars",deskripsi:"Keanggotaan Fansub"},{url:"information",name:"Informasi Dialog",image_url:null,icon:"live_help",deskripsi:"Popup Info Dialog"},{url:"project-type",name:"Project Type",image_url:null,icon:"loyalty",deskripsi:"Kategori Garapan"},{url:"push-notification",name:"Push Notification",image_url:null,icon:"notifications_active",deskripsi:"Pengumuman Dadakan"},{url:"user-list",name:"User List",image_url:null,icon:"supervisor_account",deskripsi:"Seluruh Member"}]}getAllNotif(g="",C=1,D=10,y="",_=""){return this.api.getData(`/notification?q=${g}&page=${C}&row=${D}&sort=${y}&order=${_}`)}createNotif(g){return this.api.postData("/notification",g)}deleteNotif(g){return this.api.deleteData(`/notification/${g}`)}getAllBanned(g="",C=1,D=10,y="",_=""){return this.api.getData(`/banned?q=${g}&page=${C}&row=${D}&sort=${y}&order=${_}`)}unBan(g){return this.api.deleteData(`/banned/${g}`)}ban(g){return this.api.postData("/banned",g)}proDemote(g){return this.api.postData("/promote",g)}getAllCors(g="",C=1,D=10,y="",_=""){return this.api.getData(`/api-key?q=${g}&page=${C}&row=${D}&sort=${y}&order=${_}`)}revokeCors(g){return this.api.deleteData(`/api-key/${g}`)}}return I.\u0275fac=function(g){return new(g||I)(r.LFG(l.s),r.LFG(u.U))},I.\u0275prov=r.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},519:(it,U,a)=>{"use strict";a.d(U,{o:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}searchAnime(M){return this.api.getData(`/anime?q=${M}`)}getAnime(M){return this.api.getData(`/anime/${M}`)}addNewAnime(M){return this.api.patchData("/anime",M)}getSeasonalAnime(M,g){return this.api.getData(`/anime-seasonal?year=${M}&season=${g}`)}getBerkasAnime(M=[],g="",C=1,D=10,y="",_=""){return this.api.patchData(`/anime-berkas?q=${g}&page=${C}&row=${D}&sort=${y}&order=${_}`,{id:M})}getFansubAnime(M=[],g=1,C=10){return this.api.patchData(`/anime-fansub?page=${g}&row=${C}`,{id:M})}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},9731:(it,U,a)=>{"use strict";a.d(U,{s:()=>ue});var n=a(520),r=a(4986),l=a(1165),u=a(4482),o=a(8421),I=a(3888),M=a(5403),g=a(9672);const C=(0,I.d)(Z=>function(De=null){Z(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=De});function D(Z,ne){const{first:De,each:ve,with:W=y,scheduler:z=(null!=ne?ne:r.z),meta:V=null}=(0,l.q)(Z)?{first:Z}:"number"==typeof Z?{each:Z}:Z;if(null==De&&null==ve)throw new TypeError("No timeout provided.");return(0,u.e)((Me,Q)=>{let fe,Ae,j=null,Y=0;const J=ie=>{Ae=(0,g.f)(Q,z,()=>{try{fe.unsubscribe(),(0,o.Xf)(W({meta:V,lastValue:j,seen:Y})).subscribe(Q)}catch(Be){Q.error(Be)}},ie)};fe=Me.subscribe((0,M.x)(Q,ie=>{null==Ae||Ae.unsubscribe(),Y++,Q.next(j=ie),ve>0&&J(ve)},void 0,void 0,()=>{(null==Ae?void 0:Ae.closed)||null==Ae||Ae.unsubscribe(),j=null})),!Y&&J(null!=De?"number"==typeof De?De:+De-z.now():ve)})}function y(Z){throw new C(Z)}var _=a(5625),E=a(5934),O=a(5e3),ee=a(8696);let ue=(()=>{class Z{constructor(De,ve){this.http=De,this.gs=ve}HTTP_REQ_URL(De){if(De.startsWith("/")){let ve=E.N.baseUrl;De.startsWith("/api/")||(ve+=E.N.apiUrl),De=ve+De}return De}getData(De,ve={},W=2e4,z=3){return this.gs.log("[API_GET]",De),this.prepareOptions(ve),this.http.get(this.HTTP_REQ_URL(De),ve).pipe(D(W),(0,_.X)(z))}postData(De,ve={},W=!1,z={},V=6e4){this.gs.log("[API_POST]",De);let Me=ve;return W&&(Me=this.prepareFormData(ve)),this.prepareOptions(z),this.http.post(this.HTTP_REQ_URL(De),Me,z).pipe(D(V))}putData(De,ve={},W=!1,z={},V=6e4){this.gs.log("[API_PUT]",De);let Me=ve;return W&&(Me=this.prepareFormData(ve)),this.prepareOptions(z),this.http.put(this.HTTP_REQ_URL(De),Me,z).pipe(D(V))}patchData(De,ve={},W=!1,z={},V=6e4){this.gs.log("[API_PATCH]",De);let Me=ve;return W&&(Me=this.prepareFormData(ve)),this.prepareOptions(z),this.http.patch(this.HTTP_REQ_URL(De),Me,z).pipe(D(V))}deleteData(De,ve={},W=2e4,z=3){return this.gs.log("[API_DELETE]",De),this.prepareOptions(ve),this.http.delete(this.HTTP_REQ_URL(De),ve).pipe(D(W),(0,_.X)(z))}prepareOptions(De){De.headers instanceof n.WM||(De.headers=new n.WM(De.headers))}prepareFormData(De){const ve=new FormData;for(const W in De)De.hasOwnProperty(W)&&ve.append(W,De[W]);return ve}}return Z.\u0275fac=function(De){return new(De||Z)(O.LFG(n.eN),O.LFG(ee.U))},Z.\u0275prov=O.Yz7({token:Z,factory:Z.\u0275fac,providedIn:"root"}),Z})()},4137:(it,U,a)=>{"use strict";a.d(U,{e:()=>C});var n=a(1135),r=a(8505),l=a(5e3),u=a(8406),o=a(8696),I=a(3e3),M=a(3379),g=a(9731);let C=(()=>{class D{constructor(_,E,O,ee,ue){this.router=_,this.gs=E,this.bs=O,this.ls=ee,this.api=ue,this.currentUserSubject=new n.X(null),this.currentUser=this.currentUserSubject.asObservable(),this.token=null,this.gs.isBrowser&&(this.token=this.ls.getItem(this.gs.localStorageKeys.token),this.ls.removeItem(this.gs.localStorageKeys.token))}verify(_){return this.gs.log("[AUTH_VERIFY]",_),this.api.patchData("/verify",{token:_}).pipe((0,r.b)(E=>{this.currentUserSubject.next(E.result),this.token=E.token}))}resendActivation(_){return this.gs.log("[AUTH_ACTIVATION]",_),this.api.postData("/aktivasi",{id:_})}login(_){return this.gs.log("[AUTH_LOGIN]",_),this.api.postData("/login",_).pipe((0,r.b)(E=>{this.token=E.result.token}))}register(_){return this.gs.log("[AUTH_REGISTER]",_),this.api.postData("/register",_)}removeUser(){this.currentUserSubject.next(null),this.token=null}logout(){this.gs.log("[AUTH_LOGOUT]",this.token),this.bs.busy(),this.api.deleteData("/logout").subscribe({next:_=>{this.gs.log("[LOGOUT_SUCCESS]",_),this.bs.idle(),this.removeUser(),this.ls.clear(),this.router.navigateByUrl("/")},error:_=>{this.gs.log("[LOGOUT_ERROR]",_,"error"),this.bs.idle()}})}}return D.\u0275fac=function(_){return new(_||D)(l.LFG(u.F0),l.LFG(o.U),l.LFG(I.z),l.LFG(M.n),l.LFG(g.s))},D.\u0275prov=l.Yz7({token:D,factory:D.\u0275fac,providedIn:"root"}),D})()},8987:(it,U,a)=>{"use strict";a.d(U,{A:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}getAllBerkas(M="",g=1,C=10,D="",y=""){return this.api.getData(`/berkas?q=${M}&page=${g}&row=${C}&sort=${D}&order=${y}`)}getBerkas(M){return this.api.getData(`/berkas/${M}`)}createBerkas(M){return this.api.postData("/berkas",M)}updateBerkas(M,g){return this.api.putData(`/berkas/${M}`,g)}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},3e3:(it,U,a)=>{"use strict";a.d(U,{z:()=>o});var n=a(7579),r=a(5e3),l=a(72),u=a(8696);let o=(()=>{class I{constructor(g,C){this.spinnerService=g,this.gs=C,this.cancelPendingRequests$=new n.x,this.busyRequestCount=0}get onCancelPendingRequests(){return this.cancelPendingRequests$.asObservable()}busy(){this.gs.isBrowser&&(this.busyRequestCount<=0&&this.spinnerService.show(),this.busyRequestCount++,this.gs.log("[BUSY_STATE_COUNTER_BUSY]",this.busyRequestCount))}idle(){this.gs.isBrowser&&(this.busyRequestCount--,this.busyRequestCount<=0&&(this.busyRequestCount=0,this.spinnerService.hide()),this.gs.log("[BUSY_STATE_COUNTER_IDLE]",this.busyRequestCount))}clear(){if(this.gs.isBrowser)for(;this.busyRequestCount>0;)this.idle(),this.cancelPendingRequests$.next()}}return I.\u0275fac=function(g){return new(g||I)(r.LFG(l.t2),r.LFG(u.U))},I.\u0275prov=r.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},8379:(it,U,a)=>{"use strict";a.d(U,{$:()=>o});var n=a(7206),r=a.n(n),l=a(5e3),u=a(8696);let o=(()=>{class I{constructor(g){this.gs=g,this.keySize=256,this.ivSize=128,this.iterations=100}encrypt(g,C){const D=r().lib.WordArray.random(16),y=r().PBKDF2(C,D,{keySize:this.keySize/32,iterations:this.iterations}),_=r().lib.WordArray.random(16),E=r().AES.encrypt(g,y,{iv:_,padding:r().pad.Pkcs7,mode:r().mode.CBC});return D.toString()+_.toString()+E.toString()}decrypt(g,C){const D=r().enc.Hex.parse(g.substr(0,32)),y=r().enc.Hex.parse(g.substr(32,32)),_=g.substring(64),E=r().PBKDF2(C,D,{keySize:this.keySize/32,iterations:this.iterations});return r().AES.decrypt(_,E,{iv:y,padding:r().pad.Pkcs7,mode:r().mode.CBC}).toString(r().enc.Utf8)}hashPassword(g){return r().SHA512(g).toString()}}return I.\u0275fac=function(g){return new(g||I)(l.LFG(u.U))},I.\u0275prov=l.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},7845:(it,U,a)=>{"use strict";a.d(U,{x:()=>Ls});var n=a(5861),r=a(6805);function l(S,m){const d="object"==typeof m;return new Promise((T,se)=>{let lt,Ue=!1;S.subscribe({next:ht=>{lt=ht,Ue=!0},error:se,complete:()=>{Ue?T(lt):d?T(m.defaultValue):se(new r.K)}})})}var u=a(8966),o=a(5e3),I=a(8696),M=a(9808),g=a(7423),C=a(1861);function D(S,m){if(1&S&&(o.TgZ(0,"small",6)(1,"i"),o._uU(2),o.qZA()()),2&S){const d=o.oxw();o.xp6(2),o.hij("* ",d.DATA.infoText,"")}}function y(S,m){if(1&S&&(o.TgZ(0,"button",7),o._uU(1),o.qZA()),2&S){const d=o.oxw();o.Q6J("mat-dialog-close",!1),o.xp6(1),o.Oqu(d.DATA.cancelText)}}let _=(()=>{class S{constructor(d,T){this.data=d,this.gs=T}get DATA(){return this.data}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data)}}return S.\u0275fac=function(d){return new(d||S)(o.Y36(u.WI),o.Y36(I.U))},S.\u0275cmp=o.Xpm({type:S,selectors:[["app-material-dialog-info"]],decls:9,vars:8,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break","text-warning",3,"innerHTML"],["mat-dialog-actions",""],["class","text-start m-2",4,"ngIf"],["mat-button","",1,"ms-auto","text-success","shiny",3,"mat-dialog-close"],["mat-button","",3,"mat-dialog-close",4,"ngIf"],[1,"text-start","m-2"],["mat-button","",3,"mat-dialog-close"]],template:function(d,T){1&d&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o._UZ(2,"div",1),o.ALo(3,"safeInnerHtml"),o.TgZ(4,"div",2),o.YNc(5,D,3,1,"small",3),o.TgZ(6,"button",4),o._uU(7),o.qZA(),o.YNc(8,y,2,2,"button",5),o.qZA()),2&d&&(o.xp6(1),o.Oqu(T.DATA.title),o.xp6(1),o.Q6J("innerHTML",o.lcZ(3,6,T.DATA.htmlMessage),o.oJD),o.xp6(3),o.Q6J("ngIf",T.DATA.infoText),o.xp6(1),o.Q6J("mat-dialog-close",!0),o.xp6(1),o.Oqu(T.DATA.confirmText),o.xp6(1),o.Q6J("ngIf",T.DATA.cancelText))},directives:[u.uh,u.xY,u.H8,M.O5,g.lW,u.ZT],pipes:[C.H],styles:[""]}),S})();var E=a(7238),O=a(5245);const ee=["dmakElement"];let ue=(()=>{class S{constructor(d,T){this.data=d,this.gs=T,this.dmak=null,this.dmakUrl="/assets/kanji/",this.charToDraw="NO DATA"}get DATA(){return this.data}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data),"hiragana_katakana_kanji"in this.data&&this.data.hiragana_katakana_kanji&&(this.charToDraw=this.data.hiragana_katakana_kanji)}ngAfterViewInit(){this.dmak=new Dmak(this.charToDraw,{element:"dmakElement",uri:this.dmakUrl,stroke:{order:{visible:!0},attr:{active:"#f44336",stroke:"#28a745"}}})}play(){this.dmak.render()}pause(){this.dmak.pause()}next(){this.pause(),this.dmak.renderNextStrokes(1)}back(){this.pause(),this.dmak.eraseLastStrokes(1)}reset(){this.pause(),this.dmak.erase()}}return S.\u0275fac=function(d){return new(d||S)(o.Y36(u.WI),o.Y36(I.U))},S.\u0275cmp=o.Xpm({type:S,selectors:[["app-material-dialog-dmak"]],viewQuery:function(d,T){if(1&d&&o.Gf(ee,5),2&d){let se;o.iGM(se=o.CRH())&&(T.dmakElement=se.first)}},decls:12,vars:1,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break"],["id","dmakElement",1,"text-center"],["dmakElement",""],["mat-dialog-actions",""],["mat-button","","matTooltip","Back",1,"ms-auto",3,"click"],["mat-button","","matTooltip","Next",3,"click"]],template:function(d,T){1&d&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1),o._UZ(3,"div",2,3),o.qZA(),o.TgZ(5,"div",4)(6,"button",5),o.NdJ("click",function(){return T.back()}),o.TgZ(7,"mat-icon"),o._uU(8,"chevron_left"),o.qZA()(),o.TgZ(9,"button",6),o.NdJ("click",function(){return T.next()}),o.TgZ(10,"mat-icon"),o._uU(11,"chevron_right"),o.qZA()()()),2&d&&(o.xp6(1),o.hij("Cara Penulisan '",T.DATA.romaji,"'"))},directives:[u.uh,u.xY,u.H8,g.lW,E.gM,O.Hw],styles:[""]}),S})();function Z(S){return null===S?"null":S!==Object(S)?typeof S:{}.toString.call(S).slice(8,-1).toLowerCase()}function ne(S){return"string"!==Z(S)||!S.length}const V={useObsoleteKana:!1,passRomaji:!1,upcaseKatakana:!1,IMEMode:!1,convertLongVowelMark:!0,romanization:"hepburn"};var At=Number.isNaN||function(m){return"number"==typeof m&&m!=m};function Bt(S,m){return!!(S===m||At(S)&&At(m))}function qt(S,m){if(S.length!==m.length)return!1;for(var d=0;d{const se="string"===Z(T);return m[d]=se?{"":T}:Wt(T),m},{})}function Se(S,m){return m.split("").reduce((d,T)=>(void 0===d[T]&&(d[T]={}),d[T]),S)}function pt(S={}){const m={};return"object"===Z(S)&&Object.entries(S).forEach(([d,T])=>{let se=m;d.split("").forEach(Ue=>{void 0===se[Ue]&&(se[Ue]={}),se=se[Ue]}),se[""]=T}),function(T){return function Ue(lt,ht){return void 0===lt||"string"===Z(lt)?ht:Object.entries(ht).reduce((Ot,[Vt,hn])=>(Ot[Vt]=Ue(lt[Vt],hn),Ot),lt)}(JSON.parse(JSON.stringify(T)),m)}}function we(S,m){return m?"function"===Z(m)?m(S):pt(m)(S):S}const le={a:"\u3042",i:"\u3044",u:"\u3046",e:"\u3048",o:"\u304a",k:{a:"\u304b",i:"\u304d",u:"\u304f",e:"\u3051",o:"\u3053"},s:{a:"\u3055",i:"\u3057",u:"\u3059",e:"\u305b",o:"\u305d"},t:{a:"\u305f",i:"\u3061",u:"\u3064",e:"\u3066",o:"\u3068"},n:{a:"\u306a",i:"\u306b",u:"\u306c",e:"\u306d",o:"\u306e"},h:{a:"\u306f",i:"\u3072",u:"\u3075",e:"\u3078",o:"\u307b"},m:{a:"\u307e",i:"\u307f",u:"\u3080",e:"\u3081",o:"\u3082"},y:{a:"\u3084",u:"\u3086",o:"\u3088"},r:{a:"\u3089",i:"\u308a",u:"\u308b",e:"\u308c",o:"\u308d"},w:{a:"\u308f",i:"\u3090",e:"\u3091",o:"\u3092"},g:{a:"\u304c",i:"\u304e",u:"\u3050",e:"\u3052",o:"\u3054"},z:{a:"\u3056",i:"\u3058",u:"\u305a",e:"\u305c",o:"\u305e"},d:{a:"\u3060",i:"\u3062",u:"\u3065",e:"\u3067",o:"\u3069"},b:{a:"\u3070",i:"\u3073",u:"\u3076",e:"\u3079",o:"\u307c"},p:{a:"\u3071",i:"\u3074",u:"\u3077",e:"\u307a",o:"\u307d"},v:{a:"\u3094\u3041",i:"\u3094\u3043",u:"\u3094",e:"\u3094\u3047",o:"\u3094\u3049"}},K={".":"\u3002",",":"\u3001",":":"\uff1a","/":"\u30fb","!":"\uff01","?":"\uff1f","~":"\u301c","-":"\u30fc","\u2018":"\u300c","\u2019":"\u300d","\u201c":"\u300e","\u201d":"\u300f","[":"\uff3b","]":"\uff3d","(":"\uff08",")":"\uff09","{":"\uff5b","}":"\uff5d"},pe={k:"\u304d",s:"\u3057",t:"\u3061",n:"\u306b",h:"\u3072",m:"\u307f",r:"\u308a",g:"\u304e",z:"\u3058",d:"\u3062",b:"\u3073",p:"\u3074",v:"\u3094",q:"\u304f",f:"\u3075"},Pe={ya:"\u3083",yi:"\u3043",yu:"\u3085",ye:"\u3047",yo:"\u3087"},ye={a:"\u3041",i:"\u3043",u:"\u3045",e:"\u3047",o:"\u3049"},Ne={sh:"sy",ch:"ty",cy:"ty",chy:"ty",shy:"sy",j:"zy",jy:"zy",shi:"si",chi:"ti",tsu:"tu",ji:"zi",fu:"hu"},Ve=Object.assign({tu:"\u3063",wa:"\u308e",ka:"\u30f5",ke:"\u30f6"},ye,Pe),bt={yi:"\u3044",wu:"\u3046",ye:"\u3044\u3047",wi:"\u3046\u3043",we:"\u3046\u3047",kwa:"\u304f\u3041",whu:"\u3046",tha:"\u3066\u3083",thu:"\u3066\u3085",tho:"\u3066\u3087",dha:"\u3067\u3083",dhu:"\u3067\u3085",dho:"\u3067\u3087"},xt={wh:"\u3046",qw:"\u304f",q:"\u304f",gw:"\u3050",sw:"\u3059",ts:"\u3064",th:"\u3066",tw:"\u3068",dh:"\u3067",dw:"\u3069",fw:"\u3075",f:"\u3075"},cn={kwi:"\u304f\u3043",kuxi:"\u304f\u3043",kuli:"\u304f\u3043",kwe:"\u304f\u3047",kuxe:"\u304f\u3047",kule:"\u304f\u3047",kwo:"\u304f\u3049",kuxo:"\u304f\u3049",kulo:"\u304f\u3049"};function ct(){const S=Wt(le),m=se=>Se(S,se);function T(se){return Object.entries(se).reduce((Ue,[lt,ht])=>(Ue[lt]=lt?T(ht):`\u3063${ht}`,Ue),{})}return Object.entries(pe).forEach(([se,Ue])=>{Object.entries(Pe).forEach(([lt,ht])=>{m(se+lt)[""]=Ue+ht})}),Object.entries(K).forEach(([se,Ue])=>{m(se)[""]=Ue}),Object.entries(cn).forEach(([se,Ue])=>{m(se)[""]=Ue}),Object.entries(xt).forEach(([se,Ue])=>{Object.entries(ye).forEach(([lt,ht])=>{m(se+lt)[""]=Ue+ht})}),["n","n'","xn"].forEach(se=>{m(se)[""]="\u3093"}),S.c=JSON.parse(JSON.stringify(S.k)),Object.entries(Ne).forEach(([se,Ue])=>{const lt=se.slice(0,se.length-1),ht=se.charAt(se.length-1);m(lt)[ht]=JSON.parse(JSON.stringify(m(Ue)))}),Object.entries(Ve).forEach(([se,Ue])=>{const lt=yn=>yn.charAt(yn.length-1),ht=yn=>yn.slice(0,yn.length-1),Vt=m(`x${se}`);Vt[""]=Ue,m(`l${ht(se)}`)[lt(se)]=Vt,function d(se){return[...Object.entries(Ne),["c","k"]].reduce((Ue,[lt,ht])=>se.startsWith(ht)?Ue.concat(se.replace(ht,lt)):Ue,[])}(se).forEach(yn=>{["l","x"].forEach(In=>{m(In+ht(yn))[lt(yn)]=m(In+se)})})}),Object.entries(bt).forEach(([se,Ue])=>{m(se)[""]=Ue}),[...Object.keys(pe),"c","y","w","j"].forEach(se=>{const Ue=S[se];Ue[se]=T(Ue)}),delete S.n.n,Object.freeze(JSON.parse(JSON.stringify(S)))}let ut=null;const yt=pt({wi:"\u3090",we:"\u3091"});function Dn(S=""){return!ne(S)&&12540===S.charCodeAt(0)}function ni(S=""){return function De(S="",m,d){if(ne(S))return!1;const T=S.charCodeAt(0);return m<=T&&T<=d}(S,12449,12540)}Zt((S,m,d)=>{let T=function tt(){return null==ut&&(ut=ct()),ut}();return T=S?function Nt(S){const m=JSON.parse(JSON.stringify(S));return m.n.n={"":"\u3093"},m.n[" "]={"":"\u3093"},m}(T):T,T=m?yt(T):T,d&&(T=we(T,d)),T},En);const Lt={a:"\u3042",i:"\u3044",u:"\u3046",e:"\u3048",o:"\u3046"};function nn(S="",m,{isDestinationRomaji:d,convertLongVowelMark:T}={}){let se="";return S.split("").reduce((Ue,lt,ht)=>{if(function kn(S=""){return!ne(S)&&12539===S.charCodeAt(0)}(lt)||((S,m)=>Dn(S)&&m<1)(lt,ht)||(S=>["\u30f6","\u30f5"].includes(S))(lt))return Ue.concat(lt);if(T&&se&&((S,m)=>Dn(S)&&m>0)(lt,ht)){const Ot=m(se).slice(-1);return ni(S[ht-1])&&"o"===Ot&&d?Ue.concat("\u304a"):Ue.concat(Lt[Ot])}if(!Dn(lt)&&ni(lt)){const Ot=lt.charCodeAt(0)+-96,Vt=String.fromCharCode(Ot);return se=Vt,Ue.concat(Vt)}return se="",Ue.concat(lt)},[]).join("")}let vn=null;const Vn={\u3042:"a",\u3044:"i",\u3046:"u",\u3048:"e",\u304a:"o",\u304b:"ka",\u304d:"ki",\u304f:"ku",\u3051:"ke",\u3053:"ko",\u3055:"sa",\u3057:"shi",\u3059:"su",\u305b:"se",\u305d:"so",\u305f:"ta",\u3061:"chi",\u3064:"tsu",\u3066:"te",\u3068:"to",\u306a:"na",\u306b:"ni",\u306c:"nu",\u306d:"ne",\u306e:"no",\u306f:"ha",\u3072:"hi",\u3075:"fu",\u3078:"he",\u307b:"ho",\u307e:"ma",\u307f:"mi",\u3080:"mu",\u3081:"me",\u3082:"mo",\u3089:"ra",\u308a:"ri",\u308b:"ru",\u308c:"re",\u308d:"ro",\u3084:"ya",\u3086:"yu",\u3088:"yo",\u308f:"wa",\u3090:"wi",\u3091:"we",\u3092:"wo",\u3093:"n",\u304c:"ga",\u304e:"gi",\u3050:"gu",\u3052:"ge",\u3054:"go",\u3056:"za",\u3058:"ji",\u305a:"zu",\u305c:"ze",\u305e:"zo",\u3060:"da",\u3062:"ji",\u3065:"zu",\u3067:"de",\u3069:"do",\u3070:"ba",\u3073:"bi",\u3076:"bu",\u3079:"be",\u307c:"bo",\u3071:"pa",\u3074:"pi",\u3077:"pu",\u307a:"pe",\u307d:"po",\u3094\u3041:"va",\u3094\u3043:"vi",\u3094:"vu",\u3094\u3047:"ve",\u3094\u3049:"vo"},hi={"\u3002":".","\u3001":",","\uff1a":":","\u30fb":"/","\uff01":"!","\uff1f":"?","\u301c":"~",\u30fc:"-","\u300c":"\u2018","\u300d":"\u2019","\u300e":"\u201c","\u300f":"\u201d","\uff3b":"[","\uff3d":"]","\uff08":"(","\uff09":")","\uff5b":"{","\uff5d":"}","\u3000":" "},Ti=["\u3042","\u3044","\u3046","\u3048","\u304a","\u3084","\u3086","\u3088"],ti={\u3083:"ya",\u3085:"yu",\u3087:"yo"},qi={\u3043:"yi",\u3047:"ye"},_r={\u3041:"a",\u3043:"i",\u3045:"u",\u3047:"e",\u3049:"o"},Vr=["\u304d","\u306b","\u3072","\u307f","\u308a","\u304e","\u3073","\u3074","\u3094","\u304f","\u3075"],xr={\u3057:"sh",\u3061:"ch",\u3058:"j",\u3062:"j"},Ir={\u3063:"",\u3083:"ya",\u3085:"yu",\u3087:"yo",\u3041:"a",\u3043:"i",\u3045:"u",\u3047:"e",\u3049:"o"},Dr={b:"b",c:"t",d:"d",f:"f",g:"g",h:"h",j:"j",k:"k",m:"m",p:"p",q:"q",r:"r",s:"s",t:"t",v:"v",w:"w",x:"x",z:"z"};function ir(){return null==vn&&(vn=function Br(){const S=Wt(Vn),m=T=>Se(S,T),d=(T,se)=>{m(T)[""]=se};return Object.entries(hi).forEach(([T,se])=>{m(T)[""]=se}),[...Object.entries(ti),...Object.entries(_r)].forEach(([T,se])=>{d(T,se)}),Vr.forEach(T=>{const se=m(T)[""][0];Object.entries(ti).forEach(([Ue,lt])=>{d(T+Ue,se+lt)}),Object.entries(qi).forEach(([Ue,lt])=>{d(T+Ue,se+lt)})}),Object.entries(xr).forEach(([T,se])=>{Object.entries(ti).forEach(([Ue,lt])=>{d(T+Ue,se+lt[1])}),d(`${T}\u3043`,`${se}yi`),d(`${T}\u3047`,`${se}e`)}),S.\u3063=Wi(S),Object.entries(Ir).forEach(([T,se])=>{d(T,se)}),Ti.forEach(T=>{d(`\u3093${T}`,`n'${m(T)[""]}`)}),Object.freeze(JSON.parse(JSON.stringify(S)))}()),vn}function Wi(S){return Object.entries(S).reduce((m,[d,T])=>{if(d)m[d]=Wi(T);else{const se=T.charAt(0);m[d]=Object.keys(Dr).includes(se)?Dr[se]+T:T}return m},{})}const Yi=Zt((S,m)=>{let d=function Xi(S){return"hepburn"===S?ir():{}}(S);return m&&(d=we(d,m)),d},En);function dr(S="",m={},d){const T=((S={})=>Object.assign({},V,S))(m);return d||(d=Yi(T.romanization,T.customRomajiMapping)),function vr(S,m,d){d||(d=Yi(m.romanization,m.customRomajiMapping));return _t(nn(S,dr,Object.assign({},{isDestinationRomaji:!0},m)),d,!m.IMEMode)}(S,T,d).map(se=>{const[Ue,lt,ht]=se;return T.upcaseKatakana&&function Ai(S=""){return!ne(S)&&[...S].every(ni)}(S.slice(Ue,lt))?ht.toUpperCase():ht}).join("")}var Vi=a(2663),pr=a(4623),Jr=a(508),Ci=a(192);const _e=["dmakElement"];function Ke(S,m){if(1&S&&(o.TgZ(0,"li"),o._uU(1),o.qZA()),2&S){const d=m.$implicit,T=o.oxw();o.xp6(1),o.AsE(" ",d," (",T.getRomaji(d),") ")}}function he(S,m){if(1&S&&(o.TgZ(0,"li"),o._uU(1),o.qZA()),2&S){const d=m.$implicit,T=o.oxw();o.xp6(1),o.AsE(" ",d," (",T.getRomaji(d),") ")}}function et(S,m){if(1&S){const d=o.EpF();o.TgZ(0,"mat-list-option",25),o.NdJ("click",function(){const Ue=o.CHM(d).$implicit;return o.oxw(2).openVocab(Ue)}),o.TgZ(1,"h4",26),o._uU(2),o.qZA(),o.TgZ(3,"h5",27),o._uU(4),o.qZA(),o.TgZ(5,"p",28),o._uU(6),o.qZA()()}if(2&S){const d=m.$implicit,T=o.oxw(2);o.xp6(2),o.Oqu(d.kanji),o.xp6(2),o.AsE("",d.reading," (",T.getRomaji(d.reading),")"),o.xp6(2),o.Oqu(d.meaning)}}function wt(S,m){if(1&S&&(o.TgZ(0,"div")(1,"mat-selection-list",23),o.YNc(2,et,7,4,"mat-list-option",24),o.qZA()()),2&S){const d=o.oxw();o.xp6(1),o.Q6J("multiple",!1),o.xp6(1),o.Q6J("ngForOf",d.edict)}}function zt(S,m){1&S&&o._UZ(0,"app-no-data")}function Jt(S,m){if(1&S){const d=o.EpF();o.TgZ(0,"div",29)(1,"button",30),o.NdJ("click",function(){return o.CHM(d),o.oxw().loadNextPage()}),o._uU(2,"Load More ..."),o.qZA()()}}let wn=(()=>{class S{constructor(d,T,se){this.data=d,this.nihon=T,this.gs=se,this.dmak=null,this.dmakUrl="/assets/kanji/",this.charToDraw="NO DATA",this.edict=[],this.page=1,this.pageFinished=!1,this.subsEdict=null}get DATA(){return this.data}getRomaji(d){return dr(d)}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data),"character"in this.data&&this.data.character&&(this.charToDraw=this.data.character),this.loadEdict()}ngOnDestroy(){var d;null===(d=this.subsEdict)||void 0===d||d.unsubscribe()}ngAfterViewInit(){this.dmak=new Dmak(this.charToDraw,{element:"dmakElement",uri:this.dmakUrl,stroke:{order:{visible:!0},attr:{active:"#f44336",stroke:"#28a745"}}})}loadEdict(){this.subsEdict=this.nihon.getAllEdict(this.charToDraw,this.page).subscribe({next:d=>{this.gs.log("[EDICT_LIST_SUCCESS]",d),this.edict=[...this.edict,...d.results],d.results.length<=0&&(this.pageFinished=!0)},error:d=>{this.gs.log("[EDICT_LIST_ERROR]",d,"error")}})}loadNextPage(){this.pageFinished||(this.page++,this.loadEdict())}openVocab(d){this.gs.log("[EDICT_LIST_CLICK_VOCAB]",d)}}return S.\u0275fac=function(d){return new(d||S)(o.Y36(u.WI),o.Y36(Vi.a),o.Y36(I.U))},S.\u0275cmp=o.Xpm({type:S,selectors:[["app-material-dialog-edict"]],viewQuery:function(d,T){if(1&d&&o.Gf(_e,5),2&d){let se;o.iGM(se=o.CRH())&&(T.dmakElement=se.first)}},decls:42,vars:10,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break"],[1,"row"],[1,"col-md-4","col-xl-3"],[1,"row","sticky-top","p-3"],[1,"col-12"],["id","dmakElement",1,"text-center"],["dmakElement",""],[1,"col-12","mt-3"],[1,"text-warning"],[1,"text-truncate"],[1,"text-success"],[1,"text-truncate","mt-3"],[1,"text-success","m-0"],[4,"ngFor","ngForOf"],[1,"col-md-8","col-xl-9"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"border-bottom-dotted"],[1,"text-bifeldy"],[4,"ngIf"],["class","col-12 text-center p-3",4,"ngIf"],["mat-dialog-actions",""],["mat-button","",1,"ms-auto",3,"mat-dialog-close"],[3,"multiple"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],["matLine","",1,"px-3"],["matLine","",1,"px-3","text-success"],["matLine","",1,"px-3","text-warning"],[1,"col-12","text-center","p-3"],["mat-button","",3,"click"]],template:function(d,T){1&d&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4)(6,"div",5),o._UZ(7,"div",6,7),o.qZA(),o.TgZ(9,"div",8)(10,"p",9),o._uU(11),o.qZA()(),o.TgZ(12,"div",5)(13,"div",10),o._uU(14," JLPT Level :: "),o.TgZ(15,"span",11),o._uU(16),o.qZA()(),o.TgZ(17,"div",10),o._uU(18," School Level :: "),o.TgZ(19,"span",11),o._uU(20),o.qZA()(),o.TgZ(21,"div",12),o._uU(22," Kunyomi :: "),o.TgZ(23,"ul",13),o.YNc(24,Ke,2,2,"li",14),o.qZA()(),o.TgZ(25,"div",10),o._uU(26," Onyomi :: "),o.TgZ(27,"ul",13),o.YNc(28,he,2,2,"li",14),o.qZA()()()()(),o.TgZ(29,"div",15)(30,"div",2)(31,"div",16)(32,"h2",17)(33,"b",18),o._uU(34,"Kosa Kata"),o.qZA()()(),o.TgZ(35,"div",5),o.YNc(36,wt,3,2,"div",19),o.YNc(37,zt,1,0,"app-no-data",19),o.qZA(),o.YNc(38,Jt,3,0,"div",20),o.qZA()()()(),o.TgZ(39,"div",21)(40,"button",22),o._uU(41,"Tutup"),o.qZA()()),2&d&&(o.xp6(1),o.hij("Kamus Dictionary '",T.DATA.character,"'"),o.xp6(10),o.Oqu(T.DATA.translate),o.xp6(5),o.hij("N",T.DATA.jlpt,""),o.xp6(4),o.Oqu(T.DATA.school),o.xp6(4),o.Q6J("ngForOf",T.DATA.v_kunyomi.split(",")),o.xp6(4),o.Q6J("ngForOf",T.DATA.v_onyomi.split(",")),o.xp6(8),o.Q6J("ngIf",T.edict.length>0),o.xp6(1),o.Q6J("ngIf",T.edict.length<=0),o.xp6(1),o.Q6J("ngIf",!T.pageFinished),o.xp6(2),o.Q6J("mat-dialog-close",!0))},directives:[u.uh,u.xY,M.sg,M.O5,pr.Ub,pr.vS,Jr.X2,Ci.d,g.lW,u.H8,u.ZT],styles:[""]}),S})();var Sn=a(3075),Yn=a(6271),$n=a(3e3),Xn=a(7902),di=a(7322),fi=a(1385),pi=a(7531),Te=a(8406),oe=a(3626);function G(S,m){if(1&S&&(o.TgZ(0,"div"),o._uU(1),o.ALo(2,"bytes"),o.qZA()),2&S){const d=o.oxw(2);o.xp6(1),o.hij("Ukuran Upload Melebihi Batas ",o.lcZ(2,1,d.imageLimitExceeded)," !")}}function Qe(S,m){if(1&S&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&S){const d=o.oxw(2);o.xp6(1),o.Oqu(d.imageErrorText)}}function Yt(S,m){1&S&&(o.TgZ(0,"div"),o._uU(1,"Gambar Wajib Ada!"),o.qZA())}function An(S,m){if(1&S){const d=o.EpF();o.TgZ(0,"div",7)(1,"button",22),o.NdJ("click",function(){return o.CHM(d),o.oxw(2).submitImage()}),o.TgZ(2,"mat-icon",23),o._uU(3,"add_photo_alternate"),o.qZA(),o._uU(4," Unggah "),o.qZA()()}if(2&S){const d=o.oxw(2);o.xp6(1),o.Q6J("disabled",d.submitted)}}function Mi(S,m){1&S&&(o.TgZ(0,"div"),o._uU(1,"Kana Tidak Boleh Kosong"),o.qZA())}function Gi(S,m){1&S&&(o.TgZ(0,"div"),o._uU(1,"Kana Hanya Boleh Huruf Jepang"),o.qZA())}function $r(S,m){1&S&&(o.TgZ(0,"div"),o._uU(1,"Romaji Tidak Boleh Kosong"),o.qZA())}function jr(S,m){1&S&&(o.TgZ(0,"div"),o._uU(1,"Romaji Hanya Boleh Huruf Standar Papan Ketik"),o.qZA())}function rn(S,m){1&S&&(o.TgZ(0,"div"),o._uU(1,"Arti Tidak Boleh Kosong"),o.qZA())}function oi(S,m){1&S&&(o.TgZ(0,"div"),o._uU(1,"Arti Hanya Boleh Huruf Standar Papan Ketik"),o.qZA())}function xs(S,m){if(1&S&&(o.TgZ(0,"div",5)(1,"div",24),o._uU(2," Last Edit By :: "),o.TgZ(3,"a",25),o._uU(4),o.qZA()()()),2&S){const d=o.oxw(2);o.xp6(3),o.MGl("routerLink","/user/",null==d.DATA.dataset||null==d.DATA.dataset.user_?null:d.DATA.dataset.user_.username,""),o.xp6(1),o.hij(" ",null==d.DATA.dataset||null==d.DATA.dataset.user_?null:d.DATA.dataset.user_.username," ")}}function Li(S,m){if(1&S){const d=o.EpF();o.TgZ(0,"form",4)(1,"div",5)(2,"div",6)(3,"div",5)(4,"div",7),o._UZ(5,"img",8),o.TgZ(6,"mat-form-field",9)(7,"mat-label"),o._uU(8,"Gambar"),o.qZA(),o.TgZ(9,"ngx-mat-file-input",10,11),o.NdJ("change",function(se){o.CHM(d);const Ue=o.MAs(10);return o.oxw().uploadImage(se,Ue)}),o.qZA(),o.TgZ(11,"mat-icon",12),o._uU(12,"image"),o.qZA()(),o.TgZ(13,"mat-error",13)(14,"small"),o.YNc(15,G,3,3,"div",14),o.YNc(16,Qe,2,1,"div",14),o.YNc(17,Yt,2,0,"div",14),o.qZA()()(),o.YNc(18,An,5,1,"div",15),o.qZA()(),o.TgZ(19,"div",16)(20,"div",5)(21,"mat-form-field",17)(22,"mat-label"),o._uU(23,"Kana"),o.qZA(),o._UZ(24,"input",18),o.TgZ(25,"mat-icon",12),o._uU(26,"translate"),o.qZA(),o.TgZ(27,"mat-error"),o.YNc(28,Mi,2,0,"div",14),o.YNc(29,Gi,2,0,"div",14),o.qZA()(),o.TgZ(30,"mat-form-field",17)(31,"mat-label"),o._uU(32,"Romaji"),o.qZA(),o._UZ(33,"input",19),o.TgZ(34,"mat-icon",12),o._uU(35,"text_fields"),o.qZA(),o.TgZ(36,"mat-error"),o.YNc(37,$r,2,0,"div",14),o.YNc(38,jr,2,0,"div",14),o.qZA()(),o.TgZ(39,"mat-form-field",17)(40,"mat-label"),o._uU(41,"Arti Terjemahan"),o.qZA(),o._UZ(42,"input",20),o.TgZ(43,"mat-icon",12),o._uU(44,"g_translate"),o.qZA(),o.TgZ(45,"mat-error"),o.YNc(46,rn,2,0,"div",14),o.YNc(47,oi,2,0,"div",14),o.qZA()()(),o.YNc(48,xs,5,2,"div",21),o.qZA()()()}if(2&S){const d=o.oxw();o.Q6J("formGroup",d.fg),o.xp6(5),o.Q6J("src",d.image_url,o.LSH),o.xp6(1),o.Q6J("color","accent"),o.xp6(3),o.Q6J("disabled",d.fg.value.image)("accept","image/gif, image/jpeg, image/jpg, image/png"),o.xp6(6),o.Q6J("ngIf",d.imageLimitExceeded),o.xp6(1),o.Q6J("ngIf",d.imageErrorText),o.xp6(1),o.Q6J("ngIf",d.fg.get("image").hasError("required")),o.xp6(1),o.Q6J("ngIf",d.image&&!d.fg.value.image),o.xp6(3),o.Q6J("color","accent"),o.xp6(7),o.Q6J("ngIf",d.fg.get("kana").hasError("required")),o.xp6(1),o.Q6J("ngIf",d.fg.get("kana").hasError("pattern")),o.xp6(1),o.Q6J("color","accent"),o.xp6(7),o.Q6J("ngIf",d.fg.get("romaji").hasError("required")),o.xp6(1),o.Q6J("ngIf",d.fg.get("romaji").hasError("pattern")),o.xp6(1),o.Q6J("color","accent"),o.xp6(7),o.Q6J("ngIf",d.fg.get("meaning").hasError("required")),o.xp6(1),o.Q6J("ngIf",d.fg.get("meaning").hasError("pattern")),o.xp6(1),o.Q6J("ngIf",null==d.DATA.dataset?null:d.DATA.dataset.user_)}}function Ds(S,m){if(1&S&&(o.TgZ(0,"button",29),o._uU(1),o.qZA()),2&S){const d=o.oxw(2);o.Q6J("mat-dialog-close",null),o.xp6(1),o.Oqu(d.DATA.cancelText)}}function qr(S,m){if(1&S){const d=o.EpF();o.TgZ(0,"div",26)(1,"button",27),o.NdJ("click",function(){return o.CHM(d),o.oxw().saveData()}),o._uU(2),o.qZA(),o.YNc(3,Ds,2,2,"button",28),o.qZA()}if(2&S){const d=o.oxw();o.xp6(1),o.Q6J("disabled",d.submitted||d.fg.invalid||!d.fg.dirty),o.xp6(1),o.hij(" ",d.DATA.confirmText," "),o.xp6(1),o.Q6J("ngIf",d.DATA.cancelText)}}let Pr=(()=>{class S{constructor(d,T,se,Ue,lt,ht,Ot){this.fb=d,this.bs=T,this.imgbb=se,this.nihongo=Ue,this.dialogRef=lt,this.data=ht,this.gs=Ot,this.submitted=!1,this.image=null,this.imageErrorText=null,this.imageLimitExceeded=null,this.image_url="/assets/img/form/no-image.png",this.image_url_original=null,this.gambar=null,this.subsNihongo=null,this.subsImgbb=null}get DATA(){return this.data}ngOnInit(){var d;this.gs.isBrowser&&(this.gs.log("[DIALOG_DATA_IN]",this.data),this.initForm(null===(d=this.data)||void 0===d?void 0:d.dataset))}ngOnDestroy(){var d,T;null===(d=this.subsImgbb)||void 0===d||d.unsubscribe(),null===(T=this.subsNihongo)||void 0===T||T.unsubscribe()}initForm(d){this.fg=this.fb.group({kana:[null==d?void 0:d.kana,Sn.kI.compose([Sn.kI.required,Sn.kI.pattern(Yn.t.regexJapaneseKeyboardKeys)])],romaji:[null==d?void 0:d.romaji,Sn.kI.compose([Sn.kI.required,Sn.kI.pattern(Yn.t.regexEnglishKeyboardKeys)])],meaning:[null==d?void 0:d.meaning,Sn.kI.compose([Sn.kI.required,Sn.kI.pattern(Yn.t.regexEnglishKeyboardKeys)])],category:[(null==d?void 0:d.category)||this.data.modeTampilan,Sn.kI.compose([Sn.kI.required,Sn.kI.pattern(Yn.t.regexEnglishKeyboardKeys)])],image:[null,Sn.kI.compose([Sn.kI.pattern(Yn.t.regexUrl)])]}),d?this.image_url=null==d?void 0:d.image_url:this.fg.controls.image.setValidators([Sn.kI.required,Sn.kI.pattern(Yn.t.regexEnglishKeyboardKeys)]),this.image_url_original=this.image_url}uploadImage(d,T){this.gambar=T,this.image=null,this.imageLimitExceeded=null,this.imageErrorText=null,this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine();const se=d.target.files[0];try{const Ue=new FileReader;Ue.readAsDataURL(se),Ue.onload=lt=>{if(this.gs.log("[IMAGE_SELECTED]",lt),se.size<=Yn.t.fileSizeImageLimit){const ht=this.gs.document.createElement("img");ht.onload=()=>{this.image=se,this.image_url=Ue.result.toString()},ht.src=Ue.result.toString()}else this.image=null,this.image_url="/assets/img/form/image-error.png",this.imageLimitExceeded=Yn.t.fileSizeImageLimit,this.gambar.clear(d)}}catch(Ue){this.image=null,this.image_url=this.image_url_original,this.gambar.clear(d)}}submitImage(){this.submitted=!0,this.subsImgbb=this.imgbb.uploadImage({file:this.image}).subscribe({next:d=>{this.gs.log("[IMAGE_SUCCESS]",d),this.fg.controls.image.patchValue(d.result.url),this.fg.controls.image.markAsDirty(),this.submitted=!1},error:d=>{var T;this.gs.log("[IMAGE_ERROR]",d,"error"),this.fg.controls.image.patchValue(null),this.fg.controls.image.markAsPristine(),this.submitted=!1,this.imageErrorText=(null===(T=d.result)||void 0===T?void 0:T.message)||d.info}})}saveData(){var d;this.bs.busy(),this.submitted=!0;let T=null;if((null===(d=this.data)||void 0===d?void 0:d.dataset)&&(T=this.gs.getDirtyValues(this.fg),this.gs.log("[NIHONGO_ADD_OR_EDIT_DIRTY]",T)),this.fg.invalid)return this.submitted=!1,void this.bs.idle();this.subsNihongo=T?this.nihongo.updateNihongo(this.data.dataset.id,{...T}):this.nihongo.createNihongo({image:this.fg.value.image,kana:this.fg.value.kana,romaji:this.fg.value.romaji,meaning:this.fg.value.meaning,category:this.fg.value.category}),this.subsNihongo=this.subsNihongo.subscribe({next:se=>{this.gs.log("[NIHONGO_ADD_OR_EDIT_SUCCESS]",se),this.submitted=!1,this.bs.idle(),this.dialogRef.close(se)},error:se=>{this.gs.log("[NIHONGO_ADD_OR_EDIT_ERROR]",se,"error"),this.submitted=!1,this.bs.idle()}})}}return S.\u0275fac=function(d){return new(d||S)(o.Y36(Sn.qu),o.Y36($n.z),o.Y36(Xn.X),o.Y36(Vi.a),o.Y36(u.so),o.Y36(u.WI),o.Y36(I.U))},S.\u0275cmp=o.Xpm({type:S,selectors:[["app-material-dialog-belajar"]],decls:5,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break","text-warning"],[3,"formGroup",4,"ngIf"],["mat-dialog-actions","",4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-12","col-md-5","col-xl-4","p-3"],[1,"col-12"],[1,"w-100","border",3,"src"],["appearance","outline",1,"pt-3","w-100",3,"color"],[1,"w-100",3,"disabled","accept","change"],["gambar",""],["matSuffix",""],[1,"px-3","pb-3","w-100"],[4,"ngIf"],["class","col-12",4,"ngIf"],[1,"col-12","col-md-7","col-xl-8","pt-3"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","","formControlName","kana","placeholder","\u8910\u8272"],["matInput","","formControlName","romaji","placeholder","Kasshoku"],["matInput","","formControlName","meaning","placeholder","Coklat"],["class","row",4,"ngIf"],["mat-raised-button","","color","primary","type","button",1,"w-100",3,"disabled","click"],[1,"me-1"],[1,"col","text-end"],[1,"text-success",2,"text-decoration","none",3,"routerLink"],["mat-dialog-actions",""],["mat-button","",1,"ms-auto","text-success",3,"disabled","click"],["mat-button","",3,"mat-dialog-close",4,"ngIf"],["mat-button","",3,"mat-dialog-close"]],template:function(d,T){1&d&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1),o.YNc(3,Li,49,19,"form",2),o.qZA(),o.YNc(4,qr,4,3,"div",3)),2&d&&(o.xp6(1),o.AsE("",T.DATA.title," '",T.DATA.dataset?T.DATA.dataset.kana:T.DATA.modeTampilan,"'"),o.xp6(2),o.Q6J("ngIf",T.fg),o.xp6(1),o.Q6J("ngIf",T.fg))},directives:[u.uh,u.xY,M.O5,Sn._Y,Sn.JL,Sn.sg,di.KE,di.hX,fi.Yh,O.Hw,di.R9,di.TO,g.lW,pi.Nt,Sn.Fj,Sn.JJ,Sn.u,Te.yS,u.H8,u.ZT],pipes:[oe.$],styles:[""]}),S})();function us(S,m){if(1&S&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&S){const d=o.oxw().$implicit;o.xp6(1),o.hij("",d.value.inputLabel," Tidak Boleh Kosong")}}function hs(S,m){if(1&S&&(o.TgZ(0,"div"),o._uU(1),o.qZA()),2&S){const d=o.oxw().$implicit;o.xp6(1),o.hij("",d.value.inputLabel," Hanya Boleh Huruf Standar Papan Ketik")}}function Fs(S,m){if(1&S&&(o.TgZ(0,"mat-form-field",9)(1,"mat-label"),o._uU(2),o.qZA(),o._UZ(3,"input",10),o.TgZ(4,"mat-icon",11),o._uU(5,"wysiwyg"),o.qZA(),o.TgZ(6,"mat-error"),o.YNc(7,us,2,1,"div",12),o.YNc(8,hs,2,1,"div",12),o.qZA()()),2&S){const d=m.$implicit,T=o.oxw(2);o.Q6J("color","accent"),o.xp6(2),o.Oqu(d.value.inputLabel),o.xp6(1),o.s9C("placeholder",d.value.inputPlaceholder),o.Q6J("formControlName",d.key)("required",d.value.inputRequired),o.xp6(4),o.Q6J("ngIf",T.fg.get(d.key).hasError("required")),o.xp6(1),o.Q6J("ngIf",T.fg.get(d.key).hasError("pattern"))}}function Xr(S,m){if(1&S&&(o.TgZ(0,"form",7),o.YNc(1,Fs,9,7,"mat-form-field",8),o.ALo(2,"keyvalue"),o.qZA()),2&S){const d=o.oxw();o.Q6J("formGroup",d.fg),o.xp6(1),o.Q6J("ngForOf",o.lcZ(2,2,d.DATA.input))}}function es(S,m){if(1&S&&(o.TgZ(0,"small",13)(1,"i"),o._uU(2),o.qZA()()),2&S){const d=o.oxw();o.xp6(2),o.hij("* ",d.DATA.infoText,"")}}function ts(S,m){if(1&S&&(o.TgZ(0,"button",14),o._uU(1),o.qZA()),2&S){const d=o.oxw();o.Q6J("mat-dialog-close",!1),o.xp6(1),o.Oqu(d.DATA.cancelText)}}let er=(()=>{class S{constructor(d,T,se){this.data=d,this.fb=T,this.gs=se}get DATA(){return this.data}get BALIKAN(){return this.fg.value}ngOnInit(){this.gs.log("[DIALOG_DATA_IN]",this.data);const d={};for(const[T,se]of Object.entries(this.data.input)){const Ue=[Sn.kI.pattern(Yn.t.regexEnglishKeyboardKeys)];se.inputRequired&&Ue.push(Sn.kI.required),d[T]=[se.inputValue,Sn.kI.compose(Ue)]}this.fg=this.fb.group(d)}}return S.\u0275fac=function(d){return new(d||S)(o.Y36(u.WI),o.Y36(Sn.qu),o.Y36(I.U))},S.\u0275cmp=o.Xpm({type:S,selectors:[["app-material-dialog-input"]],decls:9,vars:7,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"text-break","text-warning"],[3,"formGroup",4,"ngIf"],["mat-dialog-actions",""],["class","text-start m-2",4,"ngIf"],["mat-button","",1,"ms-auto","text-success","shiny",3,"mat-dialog-close","disabled"],["mat-button","",3,"mat-dialog-close",4,"ngIf"],[3,"formGroup"],["appearance","outline","class","p-3 col-12",3,"color",4,"ngFor","ngForOf"],["appearance","outline",1,"p-3","col-12",3,"color"],["matInput","",3,"formControlName","placeholder","required"],["matSuffix",""],[4,"ngIf"],[1,"text-start","m-2"],["mat-button","",3,"mat-dialog-close"]],template:function(d,T){1&d&&(o.TgZ(0,"h1",0),o._uU(1),o.qZA(),o.TgZ(2,"div",1),o.YNc(3,Xr,3,4,"form",2),o.qZA(),o.TgZ(4,"div",3),o.YNc(5,es,3,1,"small",4),o.TgZ(6,"button",5),o._uU(7),o.qZA(),o.YNc(8,ts,2,2,"button",6),o.qZA()),2&d&&(o.xp6(1),o.Oqu(T.DATA.title),o.xp6(2),o.Q6J("ngIf",T.fg),o.xp6(2),o.Q6J("ngIf",T.DATA.infoText),o.xp6(1),o.Q6J("mat-dialog-close",T.BALIKAN)("disabled",T.fg.invalid),o.xp6(1),o.Oqu(T.DATA.confirmText),o.xp6(1),o.Q6J("ngIf",T.DATA.cancelText))},directives:[u.uh,u.xY,M.O5,Sn._Y,Sn.JL,Sn.sg,M.sg,di.KE,di.hX,pi.Nt,Sn.Fj,Sn.JJ,Sn.u,Sn.Q7,O.Hw,di.R9,di.TO,u.H8,g.lW,u.ZT],pipes:[M.Nd],styles:[""]}),S})();var kr=a(7745);let Ls=(()=>{class S{constructor(d,T,se){this.dialog=d,this.gs=T,this.info=se,this.maxWidth="80vw",this.gs.isBrowser&&(this.maxWidth=4===this.gs.gridListBreakpoint?"45vw":3===this.gs.gridListBreakpoint?"50vw":2===this.gs.gridListBreakpoint?"60vw":"80vw")}openInputDialog(d){return"disableClose"in d||(d.disableClose=!0),this.dialog.open(er,d)}openInfoDialog(d){return"disableClose"in d||(d.disableClose=!0),"maxWidth"in d||(d.maxWidth=this.maxWidth),this.dialog.open(_,d)}openDmakDialog(d){return"disableClose"in d||(d.disableClose=!0),this.dialog.open(ue,d)}openEdictDialog(d){return"disableClose"in d||(d.disableClose=!0),this.dialog.open(wn,d)}openBelajarDialog(d){return"disableClose"in d||(d.disableClose=!0),this.dialog.open(Pr,d)}openKonfirmasiDialog(d,T,se=!0){var Ue=this;return(0,n.Z)(function*(){return Ue.openInfoDialog({data:{title:d,htmlMessage:T,confirmText:"Ya",cancelText:"Tidak"},disableClose:se,maxWidth:Ue.maxWidth})})()}fetchInformationRegisterMode(d,T=!1){var se=this;return(0,n.Z)(function*(){try{const Ue=yield l(se.info.getInfo(d.id));d.data.title=Ue.result.title,d.data.htmlMessage=Ue.result.content,d.disableClose=Ue.result.close,T&&(d.data.confirmText=Ue.result.confirm,d.data.cancelText=Ue.result.cancel,d.disableClose=!0)}catch(Ue){se.gs.log("[DIALOG_SERVICE-FETCH_DIALOG_ERROR]",Ue.error)}return se.openInfoDialog(d)})()}fetchInformation(d){var T=this;return(0,n.Z)(function*(){try{const se=yield l(T.info.getInfo(d.id));d.data.title=se.result.title,d.data.htmlMessage=se.result.content,d.data.confirmText=se.result.confirm,d.data.cancelText=se.result.cancel,d.disableClose=se.result.close}catch(se){T.gs.log("[DIALOG_SERVICE-FETCH_DIALOG_ERROR]",se.error)}})()}openMaintenanceDialog(){var d=this;return(0,n.Z)(function*(){const T={id:"MAINTENANCE",data:{title:"Informasi Perbaikan Web & Server",htmlMessage:"Gagal Memuat Perbaikan Web & Server",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:d.maxWidth};return yield d.fetchInformation(T),d.openInfoDialog(T)})()}openVerifikasiSosmed(){var d=this;return(0,n.Z)(function*(){const T={id:"VERIFIKASI-SOSMED",data:{title:"Metode Verifikasi Baru (\uff61>\ufe4f<\uff61)",htmlMessage:"Gagal Memuat Metode Verifikasi",confirmText:"Via Discord",cancelText:"Batal"},disableClose:!1,maxWidth:d.maxWidth};return yield d.fetchInformation(T),d.openInfoDialog(T)})()}}return S.\u0275fac=function(d){return new(d||S)(o.LFG(u.uw),o.LFG(I.U),o.LFG(kr.O))},S.\u0275prov=o.Yz7({token:S,factory:S.\u0275fac,providedIn:"root"}),S})()},8439:(it,U,a)=>{"use strict";a.d(U,{X:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}searchDorama(M,g=""){return this.api.getData(`/dorama?q=${M}&type=${g}`)}getDorama(M){return this.api.getData(`/dorama/${M}`)}addNewDorama(M){return this.api.patchData("/dorama",M)}getSeasonalDorama(M,g){return this.api.getData(`/dorama-seasonal?year=${M}&season=${g}`)}getBerkasDorama(M=[],g="",C=1,D=10,y="",_=""){return this.api.patchData(`/dorama-berkas?q=${g}&page=${C}&row=${D}&sort=${y}&order=${_}`,{id:M})}getFansubDorama(M=[],g=1,C=10){return this.api.patchData(`/dorama-fansub?page=${g}&row=${C}`,{id:M})}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},6382:(it,U,a)=>{"use strict";a.d(U,{r:()=>o});var n=a(5e3),r=a(8406),l=a(8696),u=a(8020);let o=(()=>{class I{constructor(g,C,D){this.router=g,this.gs=C,this.wb=D,this.isHidden=!0,this.newTab=!0,this.targetUrl=null,this.backgroundImage=null,this.backgroundIcon=null,this.tooltipText=null}toggleFab(){this.isHidden=!this.isHidden}showFab(){this.isHidden=!1}hideFab(){this.isHidden=!0}removeFab(){this.isHidden=!0,this.tooltipText=null,this.backgroundIcon=null,this.backgroundImage=null,this.targetUrl=null,this.newTab=null}initializeFab(g,C,D,y,_){this.backgroundIcon=g,this.backgroundImage=C,this.tooltipText=D,this.targetUrl=y,this.newTab=_,this.isHidden=!1}setTooltipText(g){this.tooltipText=g}setNewTab(g){this.newTab=g}setTargetUrl(g){this.targetUrl=g}setBackgroundImage(g){this.backgroundImage=g}setBackgroundIcon(g){this.backgroundIcon=g}buttonClicked(){this.newTab?this.wb.winboxOpenUri(this.targetUrl):this.router.navigateByUrl(this.targetUrl)}}return I.\u0275fac=function(g){return new(g||I)(n.LFG(r.F0),n.LFG(l.U),n.LFG(u.N))},I.\u0275prov=n.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},6781:(it,U,a)=>{"use strict";a.d(U,{T:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}searchFansub(M="",g=1,C=10,D="",y=""){return this.api.getData(`/fansub?q=${M}&page=${g}&row=${C}&sort=${D}&order=${y}`)}createFansub(M){return this.api.postData("/fansub",M)}updateFansub(M,g){return this.api.putData(`/fansub/${M}`,g)}getFansub(M){return this.api.getData(`/fansub/${M}`)}getAllFansub(){return this.api.getData("/fansub-all")}cekSlug(M){return this.api.patchData("/fansub-slug",M)}getBerkasFansub(M=[],g="",C=1,D=10,y="",_=""){return this.api.patchData(`/fansub-berkas?q=${g}&page=${C}&row=${D}&sort=${y}&order=${_}`,{id:M})}getAnimeFansub(M=[],g=1,C=10){return this.api.patchData(`/fansub-anime?page=${g}&row=${C}`,{id:M})}getDoramaFansub(M=[],g=1,C=10){return this.api.patchData(`/fansub-dorama?page=${g}&row=${C}`,{id:M})}getRssFeedFansubAllActiveOnly(){return this.api.getData("/fansub-rss-feed-active")}getRssFeedFansubAll(){return this.api.getData("/fansub-rss-feed-all")}getRssFeedFansub(M){return this.api.getData(`/fansub/${M}/rss`)}getFansubMember(M){return this.api.getData(`/fansub/${M}/member`)}getAllFansubMember(M="",g=1,C=10,D="",y=""){return this.api.getData(`/fansub-member?q=${M}&page=${g}&row=${C}&sort=${D}&order=${y}`)}requestJoinFansubMember(M){return this.api.postData("/fansub-member",M)}approveRejectFansubMember(M,g){return this.api.putData(`/fansub-member/${M}`,g)}leaveFansubMember(M){return this.api.deleteData(`/fansub-member/${M}`)}getAllSubDomain(M="",g=1,C=12,D="",y=""){return this.api.getData(`/fansub-dns?q=${M}&page=${g}&row=${C}&sort=${D}&order=${y}`)}claimSubDomain(M){return this.api.postData("/fansub-dns",M)}getSubDomain(M){return this.api.getData(`/fansub-dns/${M}?ngsw-bypass=true`)}updateSubDomain(M,g){return this.api.putData(`/fansub-dns/${M}`,g)}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},8696:(it,U,a)=>{"use strict";a.d(U,{U:()=>Wt});var n=a(5e3),r=a(9808),l=a(1159),u=a(6905),o=a(6963),I=a(4799),M=a(2221),D={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function y(Se,pt){if(!Array.isArray(Se)||!Se.length)return Se;let le,K,we={...D,...pt};if(we.strictlyTwoElementsInRangeArrays&&!Se.every((ye,Ne)=>!(!Array.isArray(ye)||2!==ye.length)||(le=Ne,K=ye.length,!1)))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${le}th range (${JSON.stringify(Se[le],null,4)}) has not two but ${K} elements!`);if(!Se.every((ye,Ne)=>!(!Array.isArray(ye)||!Number.isInteger(ye[0])||ye[0]<0||!Number.isInteger(ye[1])||ye[1]<0)||(le=Ne,!1)))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${le}th range (${JSON.stringify(Se[le],null,4)}) does not consist of only natural numbers!`);let pe=Se.length**2,Pe=0;return Array.from(Se).sort((ye,Ne)=>(we.progressFn&&(Pe+=1,we.progressFn(Math.floor(100*Pe/pe))),ye[0]===Ne[0]?ye[1]Ne[1]?1:0:ye[0]Array.isArray(Ve)).map(Ve=>[...Ve]).filter(Ve=>void 0!==Ve[2]||Ve[0]!==Ve[1]);pe=le.progressFn?y(K,{progressFn:Ve=>{ye=Math.floor(Ve/5),ye!==Pe&&(Pe=ye,le.progressFn(ye))}}):y(K);let Ne=pe.length-1;for(let Ve=Ne;Ve>0;Ve--)le.progressFn&&(ye=Math.floor(78*(1-Ve/Ne))+21,ye!==Pe&&ye>Pe&&(Pe=ye,le.progressFn(ye))),(pe[Ve][0]<=pe[Ve-1][0]||!le.joinRangesThatTouchEdges&&pe[Ve][0]=pe[Ve][0]||pe[Ve-1][1]<=pe[Ve][1])&&null!==pe[Ve-1][2]&&(null===pe[Ve][2]&&null!==pe[Ve-1][2]?pe[Ve-1][2]=null:null!=pe[Ve-1][2]?2==+le.mergeType&&pe[Ve-1][0]===pe[Ve][0]?pe[Ve-1][2]=pe[Ve][2]:pe[Ve-1][2]+=pe[Ve][2]:pe[Ve-1][2]=pe[Ve][2]),pe.splice(Ve,1),Ve=pe.length);return pe.length?pe:null}function ne(Se,pt){if(!Se)throw new Error("Invariant failed")}function W(Se,pt,we){let pe,le=0,K=0;if(0===arguments.length)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if("string"!=typeof Se)throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof Se}, equal to: ${JSON.stringify(Se,null,4)}`);if(pt&&!Array.isArray(pt))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof pt}, equal to: ${JSON.stringify(pt,null,4)}`);if(we&&"function"!=typeof we)throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof we}, equal to: ${JSON.stringify(we,null,4)}`);if(!pt||!pt.filter(bt=>bt).length)return Se;pe=Array.isArray(pt)&&Number.isInteger(pt[0])&&Number.isInteger(pt[1])?[Array.from(pt)]:Array.from(pt);let Pe=pe.length,ye=0;pe.filter(bt=>bt).forEach((bt,xt)=>{if(we&&(le=Math.floor(ye/Pe*10),le!==K&&(K=le,we(le))),!Array.isArray(bt))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${xt}th element not an array: ${JSON.stringify(bt,null,4)}, which is ${typeof bt}`);if(!Number.isInteger(bt[0])){if(!Number.isInteger(+bt[0])||+bt[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${xt}th element, array ${JSON.stringify(bt,null,0)}. Its first element is not an integer, string index, but ${typeof bt[0]}, equal to: ${JSON.stringify(bt[0],null,4)}.`);pe[xt][0]=+pe[xt][0]}if(!Number.isInteger(bt[1])){if(!Number.isInteger(+bt[1])||+bt[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${xt}th element, array ${JSON.stringify(bt,null,0)}. Its second element is not an integer, string index, but ${typeof bt[1]}, equal to: ${JSON.stringify(bt[1],null,4)}.`);pe[xt][1]=+pe[xt][1]}ye+=1});let Ne=ee(pe,{progressFn:bt=>{we&&(le=10+Math.floor(bt/10),le!==K&&(K=le,we(le)))}});ne(Ne);let Ve=Ne.length;if(Ve>0){let bt=Se.slice(Ne[Ve-1][1]);Se=Ne.reduce((xt,cn,ct,ut)=>(we&&(le=20+Math.floor(ct/Ve*80),le!==K&&(K=le,we(le))),`${xt}${Se.slice(0===ct?0:ut[ct-1][1],ut[ct][0])}${ut[ct][2]||""}`),""),Se+=bt}return Se}function Me(Se,pt=1){function le(pe){return Array.from(pe).reverse().join("")}function K(pe,Pe,ye){let Ne=ye?"\n":"\r",Ve=ye?"\r":"\n";if(!pe)return pe;let bt=0,xt=0,cn="";for(let ct=0,ut=pe.length;ct=0&&(pe=+pt);let Pe="",ye="";if(Se.trim()){if(!Se[0].trim())for(let Ne=0,Ve=Se.length;Ne!(!Array.isArray(ye)||2!==ye.length)||(le=Ne,K=ye.length,!1)))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${le}th range (${JSON.stringify(Se[le],null,4)}) has not two but ${K} elements!`);if(!Se.every((ye,Ne)=>!(!Array.isArray(ye)||!Number.isInteger(ye[0])||ye[0]<0||!Number.isInteger(ye[1])||ye[1]<0)||(le=Ne,!1)))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${le}th range (${JSON.stringify(Se[le],null,4)}) does not consist of only natural numbers!`);let pe=Se.length**2,Pe=0;return Array.from(Se).sort((ye,Ne)=>(we.progressFn&&(Pe+=1,we.progressFn(Math.floor(100*Pe/pe))),ye[0]===Ne[0]?ye[1]Ne[1]?1:0:ye[0]=0}function nt(Se){return"string"==typeof Se}var Tt={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1};function He(Se,pt=0){return function q({str:Se,idx:pt=0,stopAtNewlines:we=!1,stopAtRawNbsp:le=!1}){if("string"!=typeof Se||!Se.length||((!pt||"number"!=typeof pt)&&(pt=0),!Se[pt+1]))return null;if(Se[pt+1]&&(Se[pt+1].trim()||we&&"\n\r".includes(Se[pt+1])||le&&"\xa0"===Se[pt+1]))return pt+1;if(Se[pt+2]&&(Se[pt+2].trim()||we&&"\n\r".includes(Se[pt+2])||le&&"\xa0"===Se[pt+2]))return pt+2;for(let K=pt+1,pe=Se.length;K"string"==typeof we&&we.trim());if("string"==typeof Se)return Se.trim()?[Se]:[];throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_03] ${pt} must be array containing zero or more strings or something falsey. Currently it's equal to: ${Se}, that a type of ${typeof Se}.`)}function be(Se,pt,we){return!Se||!Se.quotes||!function F(Se,pt,we,le){for(let K=pt,pe=Se.length;K")}a(9893);var qe=new Set(["!doctype","abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"]),ot=new Set(["a","b","i","p","q","s","u"]),At=new Set([".",",",";","!","?"]),Bt=new Set([".",",","?",";",")","\u2026",'"',"\xbb"]),qt=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]),bn={ignoreTags:[],ignoreTagsWithTheirContents:[],onlyStripTags:[],stripTogetherWithTheirContents:["script","style","xml"],skipHtmlDecoding:!1,trimOnlySpaces:!1,stripRecognisedHTMLOnly:!1,dumpLinkHrefsNearby:{enabled:!1,putOnNewLine:!1,wrapHeads:"",wrapTails:""},cb:null};function En(Se,pt){var x,re,Fe,st,Gt,$t,Fn,Bn;let we=Date.now(),le=[],K=[],pe=[],Pe=[],ye={};!function Ne(){ye={attributes:[]}}();let Ve=null,bt=null,xt={},cn={tagName:"",hrefValue:"",openingTagEnds:void 0},ct="",ut=!1,tt=null,yt=!0;function mn(dt){return"string"==typeof dt}function Dn(dt,dn,en){if(Array.isArray(dn.stripTogetherWithTheirContents)&&(dn.stripTogetherWithTheirContents.includes(ye.name)||dn.stripTogetherWithTheirContents.includes("*")))if(ye.slashPresent&&Array.isArray(le)&&le.some(un=>un.name===ye.name)){for(let un=le.length;un--;)if(le[un].name===ye.name){Pe=Pe.filter(([Cn,_n])=>(Cn=dt+1)&&(_n<=le[un].lastOpeningBracketAt||_n>dt+1));let fn=dt+1;ye.lastClosingBracketAt&&(fn=ye.lastClosingBracketAt+1),Pe.push([le[un].lastOpeningBracketAt,fn]),Bt.has(Se[dt])&&dn.cb?dn.cb({tag:ye,deleteFrom:le[un].lastOpeningBracketAt,deleteTo:dt+1,insert:null,rangesArr:en,proposedReturn:[le[un].lastOpeningBracketAt,dt,null]}):dn.cb&&dn.cb({tag:ye,deleteFrom:le[un].lastOpeningBracketAt,deleteTo:dt,insert:"",rangesArr:en,proposedReturn:[le[un].lastOpeningBracketAt,dt,""]}),le.splice(un,1);break}}else ye.slashPresent||le.push(ye);else Array.isArray(dn.ignoreTagsWithTheirContents)&&li(dt,dn,ye)&&(yt=!1)}function kn(dt,dn,en,un,fn,Cn){var Ei;if(Array.isArray(an.current())&&"number"==typeof en&&0===an.current()[0][0]&&an.current()[0][1]>=en)return"";if(Se.length===un&&Cn&&(!on.dumpLinkHrefsNearby||!(null==(Ei=on.dumpLinkHrefsNearby)?void 0:Ei.enabled)))return null;let _n="";if(Number.isInteger(en)&&enCn+1){let vi=dt.slice(Cn+1,un);un&&!He(Se,un-1)&&(vi=vi.trimEnd()),vi.includes("\n")&&Qn(un,dt)?_n+=" ":_n+=vi}let ci=!Bt.has(dt[dn]),bi=">"!==dt[un-1]||!dt[en].trim(),si=!['"',"("].includes(dt[fn-1]),ni=![";",".",":","!"].includes(dt[dn]);if((ci||bi&&si&&ni)&&(bi||si)&&"!"!==dt[dn]&&(!qt.has(ye.name)||"number"==typeof en&&enCn+1)){let vi=_n.match(/\n/g);return Array.isArray(vi)&&vi.length?1===vi.length?"\n":2===vi.length?"\n\n":"\n\n\n":" "}return""}function Wn(dt,dn){var en,un;if((null==(en=dt.dumpLinkHrefsNearby)?void 0:en.enabled)&&cn.tagName&&cn.tagName===ye.name&&ye.lastOpeningBracketAt&&(cn.openingTagEnds&&ye.lastOpeningBracketAt>cn.openingTagEnds||!cn.openingTagEnds)&&(ut=!0),ut){let fn=(null==(un=dt.dumpLinkHrefsNearby)?void 0:un.putOnNewLine)?"\n\n":"";ct=`${fn}${cn.hrefValue}`,("number"!=typeof dn||He(Se,dn-1))&&(ct+=fn)}}function Qn(dt,dn){return dn?"<"===dn[dt]&&"%"!==dn[dt+1]:"<"===Se[dt]&&"%"!==Se[dt+1]}function Ln(dt){return">"===Se[dt]&&"%"!==Se[dt-1]}function li(dt,dn,en){if(dn.ignoreTagsWithTheirContents.includes("*"))return!0;let un=Se.indexOf(`<${en.name}`,dt),fn=Se.indexOf(`Cn.name===en.name)||fn>-1&&un>-1&&un"string"==typeof dt||(ln.el=dt,ln.i=dn,!1)))throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${ln.i} has a value ${ln.el} which is not string but ${(typeof ln.el).toLowerCase()}.`);on.cb||(on.cb=({rangesArr:dt,proposedReturn:dn})=>{dn&&dt.push(...dn)});let an=new class{constructor(Se){Gu(this,"ranges"),Gu(this,"opts");let pt={...Tt,...Se};if(pt.mergeType&&1!==pt.mergeType&&2!==pt.mergeType)if(nt(pt.mergeType)&&"1"===pt.mergeType.trim())pt.mergeType=1;else{if(!nt(pt.mergeType)||"2"!==pt.mergeType.trim())throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof pt.mergeType}", equal to ${JSON.stringify(pt.mergeType,null,4)}`);pt.mergeType=2}this.opts=pt,this.ranges=[]}add(Se,pt,we){if(null==Se&&null==pt)return;if(ie(Se)&&!ie(pt)){if(Array.isArray(Se)){if(Se.length){if(Se.some(pe=>Array.isArray(pe)))return void Se.forEach(pe=>{Array.isArray(pe)&&this.add(...pe)});Se.length&&Be(+Se[0])&&Be(+Se[1])&&this.add(...Se)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(Se,null,0)}) but second-one, "to" is not (${JSON.stringify(pt,null,0)})`)}if(!ie(Se)&&ie(pt))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(pt,null,0)}) but first-one, "from" is not (${JSON.stringify(Se,null,0)})`);let le=+Se,K=+pt;if(Be(we)&&(we=String(we)),!Be(le)||!Be(K))throw Be(le)&&le>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof K}" equal to: ${JSON.stringify(K,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof le}" equal to: ${JSON.stringify(le,null,4)}`);if(ie(we)&&!nt(we)&&!Be(we))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof we}, equal to:\n${JSON.stringify(we,null,4)}`);if(ie(this.ranges)&&Array.isArray(this.last())&&le===this.last()[1]){if(this.last()[1]=K,this.last(),null!==this.last()[2]&&ie(we)){let pe=!this.last()[2]||!this.last()[2].length||this.opts&&this.opts.mergeType&&1!==this.opts.mergeType?we:`${this.last()[2]}${we}`;this.opts.limitToBeAddedWhitespace&&(pe=Me(pe,this.opts.limitLinebreaksCount)),nt(pe)&&!pe.length||(this.last()[2]=pe)}}else{this.ranges||(this.ranges=[]);let pe=void 0===we||nt(we)&&!we.length?[le,K]:[le,K,we&&this.opts.limitToBeAddedWhitespace?Me(we,this.opts.limitLinebreaksCount):we];this.ranges.push(pe)}}push(Se,pt,we){this.add(Se,pt,we)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=function Y(Se,pt){function we(Ve){return!!Ve&&"object"==typeof Ve&&!Array.isArray(Ve)}if(!Array.isArray(Se)||!Se.length)return null;let le;if(pt){if(!we(pt))throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:\n${JSON.stringify(pt,null,4)} (type ${typeof pt})`);if(le={...j,...pt},le.progressFn&&we(le.progressFn)&&!Object.keys(le.progressFn).length)le.progressFn=null;else if(le.progressFn&&"function"!=typeof le.progressFn)throw new Error(`ranges-merge: [THROW_ID_01] resolvedOpts.progressFn must be a function! It was given of a type: "${typeof le.progressFn}", equal to ${JSON.stringify(le.progressFn,null,4)}`);if(![1,2,"1","2"].includes(le.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "${typeof le.mergeType}", equal to ${JSON.stringify(le.mergeType,null,4)}`);if("boolean"!=typeof le.joinRangesThatTouchEdges)throw new Error(`ranges-merge: [THROW_ID_04] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof le.joinRangesThatTouchEdges}", equal to ${JSON.stringify(le.joinRangesThatTouchEdges,null,4)}`)}else le={...j};let pe,Pe,ye,K=Se.filter(Ve=>Array.isArray(Ve)).map(Ve=>[...Ve]).filter(Ve=>void 0!==Ve[2]||Ve[0]!==Ve[1]);pe=le.progressFn?fe(K,{progressFn:Ve=>{ye=Math.floor(Ve/5),ye!==Pe&&(Pe=ye,le.progressFn(ye))}}):fe(K);let Ne=pe.length-1;for(let Ve=Ne;Ve>0;Ve--)le.progressFn&&(ye=Math.floor(78*(1-Ve/Ne))+21,ye!==Pe&&ye>Pe&&(Pe=ye,le.progressFn(ye))),(pe[Ve][0]<=pe[Ve-1][0]||!le.joinRangesThatTouchEdges&&pe[Ve][0]=pe[Ve][0]||pe[Ve-1][1]<=pe[Ve][1])&&null!==pe[Ve-1][2]&&(null===pe[Ve][2]&&null!==pe[Ve-1][2]?pe[Ve-1][2]=null:null!=pe[Ve-1][2]?2==+le.mergeType&&pe[Ve-1][0]===pe[Ve][0]?pe[Ve-1][2]=pe[Ve][2]:pe[Ve-1][2]+=pe[Ve][2]:pe[Ve-1][2]=pe[Ve][2]),pe.splice(Ve,1),Ve=pe.length);return pe.length?pe:null}(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(Se=>ie(Se[2])?[Se[0],Se[1],Me(Se[2],this.opts.limitLinebreaksCount)]:Se):this.ranges):null}wipe(){this.ranges=[]}replace(Se){if(Array.isArray(Se)&&Se.length){if(!Array.isArray(Se[0])||!Be(Se[0][0]))throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(Se[0],null,4)} should be an array and its first element should be an integer, a string index.`);this.ranges=Array.from(Se)}else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}}({limitToBeAddedWhitespace:!0,limitLinebreaksCount:2});if(!on.skipHtmlDecoding)for(;Se!==(0,M.decode)(Se,{scope:"strict"});)Se=(0,M.decode)(Se,{scope:"strict"});let We=!1,Ie=!1;for(let dt=0,dn=Se.length;dt1&&ye.lastClosingBracketAt&&ye.lastClosingBracketAtdt){dt=en;continue}}if(!We&&Ln(dt)&&(!ye||Object.keys(ye).length<2)&&dt>1)for(let en=dt;en--;)if(void 0===Se[en-1]||Ln(en)){let un=void 0===Se[en-1]?en:en+1,fn=Se.slice(un,dt+1);if(Se!==`<${o(fn.trim(),"/>")}>`&&[...qe].some(Cn=>o(fn.trim().split(/\s+/).filter(_n=>_n.trim()).filter((_n,ci)=>0===ci),"/>").toLowerCase()===Cn)&&""===En(`<${fn.trim()}>`,on).result){(!pe.length||pe[pe.length-1][0]!==ye.lastOpeningBracketAt)&&pe.push([un,dt+1]),(!Pe.length||Pe[Pe.length-1][0]!==ye.lastOpeningBracketAt)&&Pe.push([un,dt+1]);let Cn=kn(Se,dt,un,dt+1,un,dt+1),_n=dt+1;if(Se[_n]&&!Se[_n].trim())for(let ci=_n;ci{var fn,Cn;if("string"==typeof un.name&&"href"===un.name.toLowerCase())return en=`${(null==(fn=on.dumpLinkHrefsNearby)?void 0:fn.wrapHeads)||""}${un.value}${(null==(Cn=on.dumpLinkHrefsNearby)?void 0:Cn.wrapTails)||""}`,!0})&&(cn={tagName:ye.name,hrefValue:en,openingTagEnds:void 0})}else!Ie&&!ye.quotes&&ye.nameStarts&&(ye.quotes={},ye.quotes.value=Se[dt],ye.quotes.start=dt,xt.nameStarts&&xt.nameEnds&&xt.nameEnds!(un===ye.leftOuterWhitespace&&fn===dt))),on.cb({tag:ye,deleteFrom:ye.leftOuterWhitespace,deleteTo:dt,insert:`${en}${ct}${en}`,rangesArr:an,proposedReturn:[ye.leftOuterWhitespace,dt,`${en}${ct}${en}`]}),ri(),Dn(dt,on,an)}}if((null==(Fe=ye.quotes)?void 0:Fe.start)&&ye.quotes.start/!".includes(Se[dt])&&!xt.nameStarts&&!ye.lastClosingBracketAt&&(xt.nameStarts=dt),null!==ye.lastOpeningBracketAt&&ye.lastOpeningBracketAt"===Se[dt])&&void 0!==ye.lastOpeningBracketAt){if(void 0===ye.lastClosingBracketAt){if(ye.lastOpeningBracketAtun!==en.lastOpeningBracketAt),Pe.push([en.lastOpeningBracketAt,dt+1])):Pe.push([ye.lastOpeningBracketAt,dt+1])}else Pe.push([ye.lastOpeningBracketAt,dt+1])}}else if(dt>ye.lastClosingBracketAt&&Se[dt].trim()||void 0===Se[dt+1]){let en=ye.lastClosingBracketAt===dt?dt+1:dt;on.trimOnlySpaces&&en===dn-1&&null!==tt&&ttCn.equalsAt))){(!Pe.length||Pe[Pe.length-1][0]!==ye.lastOpeningBracketAt)&&Pe.push([ye.lastOpeningBracketAt,ye.lastClosingBracketAt+1]);let _n,Cn=kn(Se,dt,ye.leftOuterWhitespace,en,ye.lastOpeningBracketAt,ye.lastClosingBracketAt);ct="",ut=!1,Wn(on,en),mn(ct)&&ct.length?(_n=`${Cn}${ct}${"\n\n"===Cn?"\n":Cn}`,en===ye.lastClosingBracketAt+1&&(!Se[en]||!At.has(Se[en]))&&(_n+=" "),ye.leftOuterWhitespace===ye.lastOpeningBracketAt&&an.last()&&an.last()[1]dt)&&ci++}on.cb({tag:ye,deleteFrom:ye.leftOuterWhitespace,deleteTo:en+ci,insert:_n,rangesArr:an,proposedReturn:[ye.leftOuterWhitespace,en+ci,_n]}),ri(),Dn(dt,on,an)}else ye={};Ln(dt)||(ye={})}Ie&&(Ie=!1)}if((!We||"<"===Se[dt]&&He(Se,He(Se,dt))&&"/"===Se[He(Se,dt)]&&Se.startsWith("script",He(Se,He(Se,dt))))&&Qn(dt)&&!Qn(dt-1)&&!"'\"".includes(Se[dt+1])&&(!"'\"".includes(Se[dt+2])||/\w/.test(Se[dt+1]))&&("c"!==Se[dt+1]||":"!==Se[dt+2])&&("f"!==Se[dt+1]||"m"!==Se[dt+2]||"t"!==Se[dt+3]||":"!==Se[dt+4])&&("s"!==Se[dt+1]||"q"!==Se[dt+2]||"l"!==Se[dt+3]||":"!==Se[dt+4])&&("x"!==Se[dt+1]||":"!==Se[dt+2])&&("f"!==Se[dt+1]||"n"!==Se[dt+2]||":"!==Se[dt+3])&&be(ye,Se,dt)){if(Ln(He(Se,dt)))continue;if(ye.nameEnds&&ye.nameEnds"==`${Se[fn-2]}${Se[fn-1]}${Se[fn]}`||!en&&"--\x3e"==`${Se[fn-2]}${Se[fn-1]}${Se[fn]}`)&&(un=fn),un&&(un"===Se[fn])&&(Cn+=1),(!pe.length||pe[pe.length-1][0]!==ye.lastOpeningBracketAt)&&pe.push([ye.lastOpeningBracketAt,un+1]),(!Pe.length||Pe[Pe.length-1][0]!==ye.lastOpeningBracketAt)&&Pe.push([ye.lastOpeningBracketAt,un+1]);let _n=kn(Se,fn,ye.leftOuterWhitespace,Cn,ye.lastOpeningBracketAt,un);on.cb({tag:ye,deleteFrom:ye.leftOuterWhitespace,deleteTo:Cn,insert:_n,rangesArr:an,proposedReturn:[ye.leftOuterWhitespace,Cn,_n]}),dt=fn-1,">"===Se[fn]&&(dt=fn),ye={},xt={};break}}}Se[dt].trim()?null!==Ve&&(!ye.quotes&&xt.equalsAt>Ve-1&&xt.nameEnds&&xt.equalsAt>xt.nameEnds&&'"'!==Se[dt]&&"'"!==Se[dt]&&(u(xt)&&ye.attributes.push(xt),xt={},ye.equalsSpottedAt=void 0),Ve=null):null===Ve&&(Ve=dt,void 0!==ye.lastOpeningBracketAt&&ye.lastOpeningBracketAten.name===ye.name)&&(ye.onlyPlausible=!0,ye.name=void 0,ye.nameStarts=void 0))," "===Se[dt]?null===bt&&(bt=dt):null!==bt&&(bt=null),"script"===ye.name&&(We=!ye.slashPresent)}if(Se&&(on.trimOnlySpaces&&" "===Se[0]||!on.trimOnlySpaces&&!Se[0].trim()))for(let dt=0,dn=Se.length;dt{class Se{constructor(we,le){this.localStorageKeys={AturanTatib:`${Et.N.siteName}_AturanTatib`,DebugLogs:`${Et.N.siteName}_DebugLogs`,DarkMode:`${Et.N.siteName}_DarkMode`,token:`${Et.N.siteName}_Token`,LiveChatResults:`${Et.N.siteName}_LiveChatResults`,SearchResults:`${Et.N.siteName}_SearchResults`,Torrents:`${Et.N.siteName}_Torrents`},this.forceEnableDebugLog=null,this.separatorKeysCodes=[l.K5,l.OC],this.routerData=null,this.previousUrl=null,this.bgImgUrlPath=null,this.bannerImg=null,this.sizeContain=!1,this.bgRepeat=!1,this.leftMenuImage=null,this.rightMenuImage=null,this.isBrowser=null,this.document=null,this.gridListBreakpoint=1,this.isDesktop=!0,this.isDevMode=!0,this.isDarkMode=!1,this.weatherEffect=null,this.weatherRunning=!1,this.angularEditorConfig={editable:!0,minHeight:"256px",placeholder:"Deskripsi, Informasi, Atau Keterangan Lainnya ...",uploadUrl:`${Et.N.apiUrl}/image`,uploadWithCredentials:!0,defaultParagraphSeparator:"div",toolbarHiddenButtons:[[],[]],customClasses:[{name:"white-space-normal-important",class:"white-space-normal-important"},{name:"text-decoration-none",class:"text-decoration-none"}]},this.seasonalWeather=[{id:1,name:_t.F.WINTER,cssClassName:"snow",img:"/assets/img/season/winter.png"},{id:2,name:_t.F.SPRING,cssClassName:"sakura",img:"/assets/img/season/spring.png"},{id:3,name:_t.F.SUMMER,cssClassName:null,img:"/assets/img/season/summer.png"},{id:4,name:_t.F.FALL,cssClassName:"fall",img:"/assets/img/season/fall.png"}],this.isBrowser=(0,r.NF)(we),this.document=le,this.isDevMode=(0,n.X6Q)(),this.isBrowser&&(this.onResize(null),this.weatherJS())}log(we,le=null,K="log"){if(this.isBrowser&&(this.forceEnableDebugLog="true"===localStorage.getItem(this.localStorageKeys.DebugLogs)),this.isDevMode||this.forceEnableDebugLog){let pe=null;pe="warn"===K?console.warn:"error"===K?console.error:"table"===K?console.table:console.log,le?pe(we,le):pe(we)}}getDirtyValues(we){const le={};for(const K of Object.keys(we.controls)){const pe=we.get(K);pe.dirty&&(le[K]=pe.value)}return le}get randomColor(){return(16777215*Math.random()<<0).toString(16)}get bgImgUrl(){return this.isDesktop?this.bgImgUrlPath:null}onResize(we,le="APP_COMPONENT"){var K;if(we&&this.log(`[WINDOW_RESIZE-${le}]`,we),this.isBrowser){const pe=(null===(K=null==we?void 0:we.target)||void 0===K?void 0:K.window)||window;this.isDesktop=!0,this.leftMenuImage="/assets/img/background/left-menu.png",this.rightMenuImage="/assets/img/background/right-panel.png",pe.innerWidth>=1200?this.gridListBreakpoint=4:pe.innerWidth>=992?this.gridListBreakpoint=3:pe.innerWidth>=767?this.gridListBreakpoint=2:(this.isDesktop=!1,this.gridListBreakpoint=1,this.leftMenuImage=null,this.rightMenuImage="")}}htmlToText(we){return we?En(we).result:""}shuffle(we){let le=we.length,K=0,pe=0;for(;0!==le;)pe=Math.floor(Math.random()*le),le-=1,K=we[le],we[le]=we[pe],we[pe]=K;return we}cleanObject(we){for(const le in we)we[le]||delete we[le]}includesOneOf(we,le){for(const K of le)if(we.includes(K))return!0;return!1}linkify(we){if(we){const K=/(^|[^\/])(www\.[\S]+(\b|$))/gim,pe=/[\w.]+@[a-zA-Z_-]+?(?:\.[a-zA-Z]{2,6})+/gim;return we.replace(/\b(?:https?|ftp):\/\/[a-z0-9-+&@#\/%?=~_|!:,.;]*[a-z0-9-+&@#\/%=~_|]/gim,'$&').replace(K,'$1$2').replace(pe,'$&')}return""}toggleDarkTheme(we=!1){we?this.isDarkMode?this.document.body.classList.add("bifeldy-dark-theme"):this.document.body.classList.remove("bifeldy-dark-theme"):this.isDarkMode?(this.isDarkMode=!1,this.document.body.classList.remove("bifeldy-dark-theme")):(this.isDarkMode=!0,this.document.body.classList.add("bifeldy-dark-theme"))}rssLink(we){if("string"==typeof we)return we;let le=we.findIndex(K=>"alternate"===K.rel&&"text/html"===K.type);return le<0?we.length>0?we[we.length-1].href:"":we[le].href}weatherJS(){const we=(new Date).getMonth()+1,le=this.seasonalWeather.find(K=>K.id===Math.ceil(we/3));(null==le?void 0:le.cssClassName)&&(this.weatherEffect=new Sakura("body",{className:le.cssClassName,lifeTime:5e3}),this.weatherRunning=!0)}weatherToggle(){this.weatherRunning?(this.weatherEffect.stop(!0),this.weatherRunning=!1):(this.weatherEffect.start(),this.weatherRunning=!0)}}return Se.\u0275fac=function(we){return new(we||Se)(n.LFG(n.Lbi),n.LFG(r.K0))},Se.\u0275prov=n.Yz7({token:Se,factory:Se.\u0275fac,providedIn:"root"}),Se})()},7902:(it,U,a)=>{"use strict";a.d(U,{X:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}uploadImage(M){return this.api.postData("/image",M,!0,{headers:{"ngsw-bypass":"true"}})}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},7745:(it,U,a)=>{"use strict";a.d(U,{O:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}getAllInfo(M,g,C,D,y){return this.api.getData(`/information?q=${M}&page=${g}&row=${C}&sort=${D}&order=${y}`)}getInfo(M){return this.api.getData(`/information/${M}`)}createUpdateInfo(M){return this.api.postData("/information",M)}deleteInfo(M){return this.api.deleteData(`/information/${M}`)}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},7:(it,U,a)=>{"use strict";a.d(U,{S:()=>l});var n=a(5e3),r=a(8696);let l=(()=>{class u{constructor(I){this.gs=I,this.sideNav=null,this.sideNavExpanded=!1,this.linkText=!1,this.opened=!0,this.mainMenus=[{name:"Beranda",link:"/home",icon:"dashboard",badge:null},{name:"Berita & Informasi",link:"/news",icon:"receipt_long",badge:null},{name:"Nihongo \u65e5\u672c\u8a9e",link:"/nihongo",icon:"translate",badge:null},{name:"E-Mail@FanSub.ID",link:"/mailbox",icon:"mail_outline",badge:null}],this.contentMenus=[{name:"Anime Musiman",link:"/anime",icon:"live_tv",badge:null},{name:"Film Drama",link:"/dorama",icon:"movie",badge:null},{name:"Katalog Fansub",link:"/fansub",icon:"closed_caption",badge:null},{name:"Berbagi Garapan",link:"/berkas",icon:"file_copy",badge:null}],this.miscMenus=[{name:"RSS Feed",link:"/rss-feed",icon:"rss_feed",badge:null},{name:"Admin & Mod Panel",link:"/admin-mod",icon:"admin_panel_settings",badge:null}],this.otherMenus=[{name:"Kebijakan Privasi",link:"/privacy-policy",icon:"policy",badge:null},{name:"About",link:"/about",icon:"info",badge:null}],this.gs.isBrowser&&(this.opened=window.innerWidth>=992)}changeSideNavState(){this.linkText=this.sideNavExpanded}forceCloseSideNav(){!this.gs.isDesktop&&this.sideNav.opened&&this.sideNav.close(),this.onMouseHoverOut()}onSideNavToggleView(){this.sideNav.opened?(this.sideNav.close(),this.gs.isDesktop||this.onMouseHoverOut()):(this.sideNav.open(),this.gs.isDesktop||this.onMouseHoverIn())}onSideNavToggleExpanded(){this.sideNavExpanded=!this.sideNavExpanded,this.changeSideNavState()}onMouseHoverIn(){!1===this.sideNavExpanded&&(this.sideNavExpanded=!0,this.changeSideNavState())}onMouseHoverOut(){!0===this.sideNavExpanded&&(this.sideNavExpanded=!1,this.changeSideNavState())}}return u.\u0275fac=function(I){return new(I||u)(n.LFG(r.U))},u.\u0275prov=n.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},3379:(it,U,a)=>{"use strict";a.d(U,{n:()=>o});var n=a(5934),r=a(5e3),l=a(8379),u=a(8696);let o=(()=>{class I{constructor(g,C){this.crypt=g,this.gs=C}getItem(g,C=!1){if(!this.gs.isBrowser)return null;if(!C)return localStorage.getItem(g);try{const D=localStorage.getItem(g),y=this.crypt.decrypt(D,n.N.apiKey);return JSON.parse(y)}catch(D){return this.removeItem(g),null}}setItem(g,C){if(this.gs.isBrowser)if("string"==typeof C)localStorage.setItem(g,C);else{const D=JSON.stringify(C),y=this.crypt.encrypt(D,n.N.apiKey);localStorage.setItem(g,y)}}removeItem(g){this.gs.isBrowser&&localStorage.removeItem(g)}clear(){if(this.gs.isBrowser)for(const g of Object.keys(this.gs.localStorageKeys))"Torrents"!==g&&this.removeItem(this.gs.localStorageKeys[g])}}return I.\u0275fac=function(g){return new(g||I)(r.LFG(l.$),r.LFG(u.U))},I.\u0275prov=r.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},9618:(it,U,a)=>{"use strict";a.d(U,{Y:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}getAllNews(M="",g=1,C=10,D="",y=""){return this.api.getData(`/news?q=${M}&page=${g}&row=${C}&sort=${D}&order=${y}`)}createNews(M){return this.api.postData("/news",M)}updateNews(M,g){return this.api.putData(`/news/${M}`,g)}getNews(M){return this.api.getData(`/news/${M}`)}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},2663:(it,U,a)=>{"use strict";a.d(U,{a:()=>u});var n=a(5e3),r=a(9731),l=a(8696);let u=(()=>{class o{constructor(M,g){this.api=M,this.gs=g}getAllNihongo(M="",g="",C=1,D=10,y="",_=""){return this.api.getData(`/nihongo?category=${M}&q=${g}&page=${C}&row=${D}&sort=${y}&order=${_}`)}getAllKategori(){return this.api.patchData("/nihongo")}createNihongo(M){return this.api.postData("/nihongo",M)}updateNihongo(M,g){return this.api.putData(`/nihongo/${M}`,g)}getHirakata(){return this.api.getData("/nihongo-hirakata-all")}getAllKanji(M="",g="",C="",D=1,y=10,_="",E=""){return this.api.getData(`/nihongo-kanji?jlpt=${M}&school=${g}&q=${C}&page=${D}&row=${y}&sort=${_}&order=${E}`)}getAllEdict(M="",g=1,C=10,D="",y=""){return this.api.getData(`/nihongo-edict?q=${M}&page=${g}&row=${C}&sort=${D}&order=${y}`)}}return o.\u0275fac=function(M){return new(M||o)(n.LFG(r.s),n.LFG(l.U))},o.\u0275prov=n.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},7140:(it,U,a)=>{"use strict";a.d(U,{T:()=>u});var n=a(5934),r=a(5e3),l=a(8696);let u=(()=>{class o{constructor(M){this.gs=M,this.notifications=[],this.dissmissTimeout={},this.timedOut=null,this.gs.isBrowser&&this.notifications.push({notifCreator:null,notifData:{id:`${n.N.siteName.toUpperCase()}_UNDER_DEVELOPMENT`,type:"info",title:"Pemberitahuan!",content:'\n Jika ingin request fitur baru ataupun melaporkan Bug dapat menulis pesan di kanal Discord\n \'#dev-prog\'.\n Terima kasih. ^_^\n ',dismissible:!0}})}addNotif(M,g,C,D,y,_=!0){_&&(this.dissmissTimeout[g]=setTimeout(()=>this.removeNotif(g),1e4)),this.notifications.splice(0,0,{notifCreator:M,notifData:{id:g,type:C,title:D,content:y,dismissible:_}})}removeNotif(M){this.dissmissTimeout[M]&&(clearTimeout(this.dissmissTimeout[M]),this.dissmissTimeout[M]=null,delete this.dissmissTimeout[M]),this.timedOut=setTimeout(()=>{const g=this.notifications.findIndex(C=>C.notifData.id===M);g>=0&&(this.notifications=this.notifications.slice(0,g).concat(this.notifications.slice(g+1,this.notifications.length)))},500)}}return o.\u0275fac=function(M){return new(M||o)(r.LFG(l.U))},o.\u0275prov=r.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})()},8745:(it,U,a)=>{"use strict";a.d(U,{Z:()=>I});var n=a(5934),r=a(5e3),l=a(2313),u=a(8696),o=a(8406);let I=(()=>{class M{constructor(C,D,y,_){this.t=C,this.m=D,this.gs=y,this.router=_,this.siteName=n.N.siteName,this.title="",this.description="",this.keywords="",this.image="",this.author=""}get getTitle(){return this.title}get getDescription(){return this.description}get getKeywords(){return this.keywords}updatePageMetaData(C,D,y,_=`${n.N.baseUrl}/assets/img/favicon.png`,E="\u300c\u{1f4a4} Fansub \u2728 ID \u{1f31e}\u300d"){this.title=C,this.description=this.gs.htmlToText(D),this.keywords=y,this.image=_.startsWith("/")?n.N.baseUrl+_:_,this.author=E,this.t.setTitle(`${this.title} | ${this.siteName}`),this.m.updateTag({name:"keywords",content:this.keywords}),this.m.updateTag({name:"author",content:this.author}),this.m.updateTag({property:"og:title",content:`${this.title} | ${this.siteName}`}),this.m.updateTag({property:"og:image",content:this.image}),this.m.updateTag({name:"twitter:title",content:`${this.title} | ${this.siteName}`}),this.description&&(this.m.updateTag({name:"description",content:this.description}),this.m.updateTag({property:"og:description",content:this.description}),this.m.updateTag({name:"twitter:description",content:this.description})),this.m.updateTag({name:"twitter:image",content:this.image}),this.router.url.split("?")[0].includes("/berkas/")&&!this.image.includes(n.N.baseUrl)&&this.m.updateTag({name:"twitter:card",content:"summary_large_image"})}updateStatusBarTheme(C){this.m.updateTag(C?{name:"theme-color",content:"#673ab7"}:{name:"theme-color",content:"#3f51b5"})}}return M.\u0275fac=function(C){return new(C||M)(r.LFG(l.Dx),r.LFG(l.h_),r.LFG(u.U),r.LFG(o.F0))},M.\u0275prov=r.Yz7({token:M,factory:M.\u0275fac,providedIn:"root"}),M})()},7814:(it,U,a)=>{"use strict";a.d(U,{C:()=>Ce});var n=a(5e3),r=a(8696),l=a(9618),u=a(7845),o=a(2663),I=a(519),M=a(8439),g=a(6781),C=a(8987),D=a(8058),y=a(3379),_=a(7322),E=a(7531),O=a(3075),ee=a(5245),ue=a(9808),Z=a(4623),ne=a(8406),De=a(508);function ve(q,He){if(1&q&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&q){const ae=He.$implicit;n.MGl("routerLink","/news/",ae.id,""),n.xp6(1),n.s9C("src",ae.image_url,n.LSH),n.xp6(2),n.Oqu(ae.title),n.xp6(3),n.Oqu(ae.user_.username),n.xp6(3),n.Oqu(n.xi3(10,5,ae.created_at,"d-MM-y"))}}function W(q,He){if(1&q&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Berita"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,ve,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&q){const ae=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ae.searchResult.beritaResults,0,5))}}function z(q,He){if(1&q){const ae=n.EpF();n.TgZ(0,"mat-list-option",17),n.NdJ("click",function(){const de=n.CHM(ae).$implicit;return n.oxw(2).openEdict(de)}),n.TgZ(1,"h4",18),n._uU(2),n.qZA(),n.TgZ(3,"h5",18)(4,"span",14),n._uU(5),n.qZA(),n._uU(6," \xa0 "),n.TgZ(7,"span",15),n._uU(8),n.qZA()()()}if(2&q){const ae=He.$implicit;n.xp6(2),n.lnq(" ",ae.character," | ",ae.v_kunyomi,"| ",ae.v_onyomi," "),n.xp6(3),n.hij("N",ae.jlpt,""),n.xp6(3),n.Oqu(ae.translate)}}function V(q,He){if(1&q&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Kanji"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,z,9,5,"mat-list-option",16),n.ALo(8,"slice"),n.qZA()()()),2&q){const ae=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ae.searchResult.kanjiResults,0,5))}}function Me(q,He){if(1&q&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.qZA()()()),2&q){const ae=He.$implicit,Ze=n.oxw(2);n.hYB("routerLink","/anime/",ae.id,"-",Ze.getAnimeTitle(ae.title),""),n.xp6(1),n.s9C("src",ae.image_url,n.LSH),n.xp6(2),n.Oqu(ae.title),n.xp6(3),n.Oqu(ae.id),n.xp6(3),n.AsE("",ae.num_episodes," Eps ",null==ae.media_type?null:ae.media_type.toUpperCase(),"")}}function Q(q,He){if(1&q&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Anime"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,Me,10,7,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&q){const ae=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ae.searchResult.animeResults,0,5))}}function fe(q,He){if(1&q&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.qZA()()()),2&q){const ae=He.$implicit;n.MGl("routerLink","/dorama/",ae.slug,""),n.xp6(1),n.s9C("src",ae.thumb,n.LSH),n.xp6(2),n.Oqu(ae.title),n.xp6(3),n.Oqu(ae.mdl_id),n.xp6(3),n.Oqu(ae.type)}}function Ae(q,He){if(1&q&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Dorama"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,fe,10,5,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&q){const ae=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ae.searchResult.doramaResults,0,5))}}function j(q,He){if(1&q&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&q){const ae=He.$implicit;n.MGl("routerLink","/fansub/",ae.slug,""),n.xp6(1),n.s9C("src",ae.image_url,n.LSH),n.xp6(2),n.Oqu(ae.name),n.xp6(3),n.Oqu(ae.active?"Aktif":"Tidak Aktif"),n.xp6(3),n.Oqu(n.xi3(10,5,ae.born,"d-MM-y"))}}function Y(q,He){if(1&q&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Fansub"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,j,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&q){const ae=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ae.searchResult.fansubResults,0,5))}}function J(q,He){if(1&q&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&q){const ae=He.$implicit;n.MGl("routerLink","/berkas/",ae.id,""),n.xp6(1),n.s9C("src",ae.image_url,n.LSH),n.xp6(2),n.Oqu(ae.name),n.xp6(3),n.Oqu(ae.user_.username),n.xp6(3),n.Oqu(n.xi3(10,5,ae.created_at,"d-MM-y"))}}function ie(q,He){if(1&q&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Berkas"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,J,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&q){const ae=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ae.searchResult.berkasResults,0,5))}}function Be(q,He){if(1&q&&(n.TgZ(0,"mat-list-option",11),n._UZ(1,"img",12),n.TgZ(2,"h4",13),n._uU(3),n.qZA(),n.TgZ(4,"h5",13)(5,"span",14),n._uU(6),n.qZA(),n._uU(7," \xa0 "),n.TgZ(8,"span",15),n._uU(9),n.ALo(10,"date"),n.qZA()()()),2&q){const ae=He.$implicit;n.MGl("routerLink","/user/",ae.username,""),n.xp6(1),n.s9C("src",ae.image_url,n.LSH),n.xp6(2),n.Oqu(ae.kartu_tanda_penduduk_.nama),n.xp6(3),n.Oqu(ae.id),n.xp6(3),n.Oqu(n.xi3(10,5,ae.created_at,"d-MM-y"))}}function nt(q,He){if(1&q&&(n.TgZ(0,"div",0)(1,"div",5)(2,"h2",7)(3,"b",8),n._uU(4,"Pengguna"),n.qZA()()(),n.TgZ(5,"div",5)(6,"mat-selection-list",9),n.YNc(7,Be,11,8,"mat-list-option",10),n.ALo(8,"slice"),n.qZA()()()),2&q){const ae=n.oxw();n.xp6(6),n.Q6J("multiple",!1),n.xp6(1),n.Q6J("ngForOf",n.Dn7(8,2,ae.searchResult.penggunaResults,0,5))}}let Tt=(()=>{class q{constructor(ae,Ze,Re,de,te,ze,Ct,Ft,jt,gn){this.gs=ae,this.news=Ze,this.ds=Re,this.nihon=de,this.anime=te,this.dorama=ze,this.fansub=Ct,this.berkas=Ft,this.user=jt,this.ls=gn,this.searchResult={q:"",beritaResults:[],kanjiResults:[],animeResults:[],doramaResults:[],fansubResults:[],berkasResults:[],penggunaResults:[]},this.subsBerita=null,this.subsKanji=null,this.subsAnime=null,this.subsDorama=null,this.subsFansub=null,this.subsBerkas=null,this.subsPengguna=null,this.subsDialog=null,this.timedOut1=null,this.timedOut2=null,this.timedOut3=null,this.timedOut4=null,this.timedOut5=null,this.timedOut6=null,this.timedOut7=null}ngOnInit(){this.gs.isBrowser&&(this.searchResult=this.ls.getItem(this.gs.localStorageKeys.SearchResults,!0)||this.searchResult)}ngOnDestroy(){var ae,Ze,Re,de,te,ze,Ct,Ft;this.ls.setItem(this.gs.localStorageKeys.SearchResults,this.searchResult),null===(ae=this.subsBerita)||void 0===ae||ae.unsubscribe(),null===(Ze=this.subsKanji)||void 0===Ze||Ze.unsubscribe(),null===(Re=this.subsAnime)||void 0===Re||Re.unsubscribe(),null===(de=this.subsDorama)||void 0===de||de.unsubscribe(),null===(te=this.subsFansub)||void 0===te||te.unsubscribe(),null===(ze=this.subsBerkas)||void 0===ze||ze.unsubscribe(),null===(Ct=this.subsPengguna)||void 0===Ct||Ct.unsubscribe(),null===(Ft=this.subsDialog)||void 0===Ft||Ft.unsubscribe(),this.timedOut1&&(clearTimeout(this.timedOut1),this.timedOut1=null),this.timedOut2&&(clearTimeout(this.timedOut2),this.timedOut2=null),this.timedOut3&&(clearTimeout(this.timedOut3),this.timedOut3=null),this.timedOut4&&(clearTimeout(this.timedOut4),this.timedOut4=null),this.timedOut5&&(clearTimeout(this.timedOut5),this.timedOut5=null),this.timedOut6&&(clearTimeout(this.timedOut6),this.timedOut6=null),this.timedOut7&&(clearTimeout(this.timedOut7),this.timedOut7=null)}applyFilter(ae){this.gs.log("[SEARCH_VALUE_CHANGED]",ae),this.searchResult.q=ae.target.value.trim().toLowerCase(),this.searchResult.beritaResults=[],this.searchResult.kanjiResults=[],this.searchResult.animeResults=[],this.searchResult.doramaResults=[],this.searchResult.fansubResults=[],this.searchResult.berkasResults=[],this.searchResult.penggunaResults=[],this.searchResult.q&&(this.timedOut1=setTimeout(()=>{this.getNews()},250),this.timedOut2=setTimeout(()=>{this.getKanji()},500),this.timedOut3=setTimeout(()=>{this.getAnime()},750),this.timedOut4=setTimeout(()=>{this.getDorama()},1e3),this.timedOut5=setTimeout(()=>{this.getFansub()},1250),this.timedOut6=setTimeout(()=>{this.getBerkas()},1500),this.timedOut7=setTimeout(()=>{this.getPengguna()},1750))}openEdict(ae){this.gs.log("[HIRAKATA_OPEN_EDICT]",ae),this.subsDialog=this.ds.openEdictDialog({data:{character:ae.character,context:ae.context,freq:ae.freq,gakken:ae.gakken,harlpern_kkld:ae.harlpern_kkld,harlpern_njecd:ae.harlpern_njecd,jlpt:ae.jlpt,maniette:ae.maniette,nelson_c:ae.nelson_c,nelson_n:ae.nelson_n,remember:ae.remember,school:ae.school,skip:ae.skip,stroke:ae.stroke,translate:ae.translate,v_kunyomi:ae.v_kunyomi,v_onyomi:ae.v_onyomi},disableClose:!1}).afterClosed().subscribe({next:Ze=>{this.gs.log("[EDICT_DIALOG_CLOSED]",Ze),this.subsDialog.unsubscribe()}})}getNews(){this.subsBerita&&this.subsBerita.unsubscribe(),this.subsBerita=this.news.getAllNews(this.searchResult.q,1,5).subscribe({next:ae=>{this.gs.log("[NEWS_SEARCH_SUCCESS]",ae),this.searchResult.beritaResults=ae.results},error:ae=>{this.gs.log("[NEWS_SEARCH_ERROR]",ae,"error")}})}getKanji(){this.subsKanji&&this.subsKanji.unsubscribe(),this.subsKanji=this.nihon.getAllKanji("","",this.searchResult.q,1,5).subscribe({next:ae=>{this.gs.log("[KANJI_SEARCH_SUCCESS]",ae),this.searchResult.kanjiResults=ae.results},error:ae=>{this.gs.log("[KANJI_SEARCH_ERROR]",ae,"error")}})}getAnimeTitle(ae){return ae.replace(/[^a-zA-Z0-9]/g,"-")}getAnime(){this.subsAnime&&this.subsAnime.unsubscribe(),this.subsAnime=this.anime.searchAnime(this.searchResult.q).subscribe({next:ae=>{this.gs.log("[ANIME_SEARCH_SUCCESS]",ae),this.searchResult.animeResults=ae.results},error:ae=>{this.gs.log("[ANIME_SEARCH_ERROR]",ae,"error")}})}getDorama(){this.subsDorama&&this.subsDorama.unsubscribe(),this.subsDorama=this.dorama.searchDorama(this.searchResult.q).subscribe({next:ae=>{this.gs.log("[DORAMA_SEARCH_SUCCESS]",ae),this.searchResult.doramaResults=ae.results},error:ae=>{this.gs.log("[DORAMA_SEARCH_ERROR]",ae,"error")}})}getFansub(){this.subsFansub&&this.subsFansub.unsubscribe(),this.subsFansub=this.fansub.searchFansub(this.searchResult.q,1,5).subscribe({next:ae=>{this.gs.log("[FANSUB_SEARCH_SUCCESS]",ae),this.searchResult.fansubResults=ae.results},error:ae=>{this.gs.log("[FANSUB_SEARCH_ERROR]",ae,"error")}})}getBerkas(){this.subsBerkas&&this.subsBerkas.unsubscribe(),this.subsBerkas=this.berkas.getAllBerkas(this.searchResult.q,1,5).subscribe({next:ae=>{this.gs.log("[BERKAS_SEARCH_SUCCESS]",ae),this.searchResult.berkasResults=ae.results},error:ae=>{this.gs.log("[BERKAS_SEARCH_ERROR]",ae,"error")}})}getPengguna(){this.subsPengguna&&this.subsPengguna.unsubscribe(),this.subsPengguna=this.user.getAllUser(this.searchResult.q,1,5).subscribe({next:ae=>{this.gs.log("[PENGGUNA_SEARCH_SUCCESS]",ae),this.searchResult.penggunaResults=ae.results},error:ae=>{this.gs.log("[PENGGUNA_SEARCH_ERROR]",ae,"error")}})}}return q.\u0275fac=function(ae){return new(ae||q)(n.Y36(r.U),n.Y36(l.Y),n.Y36(u.x),n.Y36(o.a),n.Y36(I.o),n.Y36(M.X),n.Y36(g.T),n.Y36(C.A),n.Y36(D.K),n.Y36(y.n))},q.\u0275cmp=n.Xpm({type:q,selectors:[["app-search-all"]],decls:16,vars:9,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"ms-auto","pt-3","col-12",3,"color"],["matInput","","maxlength","200","placeholder","Ex. \u3070\u30fc\u304b\u30fc\uff01",3,"ngModel","keyup.enter","ngModelChange"],["matSuffix",""],[1,"col-12"],["class","row",4,"ngIf"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"pt-0",3,"multiple"],[3,"routerLink",4,"ngFor","ngForOf"],[3,"routerLink"],["matListAvatar","",1,"ms-3",2,"border-radius","0",3,"src"],["matLine",""],[1,"text-warning"],[1,"text-success"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],["matLine","",1,"ms-3"]],template:function(ae,Ze){1&ae&&(n.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),n._uU(4,"Cari Apapun Di Sini ..."),n.qZA(),n.TgZ(5,"input",3),n.NdJ("keyup.enter",function(de){return Ze.applyFilter(de)})("ngModelChange",function(de){return Ze.searchResult.q=de}),n.qZA(),n.TgZ(6,"mat-icon",4),n._uU(7,"search"),n.qZA()()(),n.TgZ(8,"div",5),n.YNc(9,W,9,6,"div",6),n.YNc(10,V,9,6,"div",6),n.YNc(11,Q,9,6,"div",6),n.YNc(12,Ae,9,6,"div",6),n.YNc(13,Y,9,6,"div",6),n.YNc(14,ie,9,6,"div",6),n.YNc(15,nt,9,6,"div",6),n.qZA()()),2&ae&&(n.xp6(2),n.Q6J("color","accent"),n.xp6(3),n.Q6J("ngModel",Ze.searchResult.q),n.xp6(4),n.Q6J("ngIf",Ze.searchResult.beritaResults.length>0),n.xp6(1),n.Q6J("ngIf",Ze.searchResult.kanjiResults.length>0),n.xp6(1),n.Q6J("ngIf",Ze.searchResult.animeResults.length>0),n.xp6(1),n.Q6J("ngIf",Ze.searchResult.doramaResults.length>0),n.xp6(1),n.Q6J("ngIf",Ze.searchResult.fansubResults.length>0),n.xp6(1),n.Q6J("ngIf",Ze.searchResult.berkasResults.length>0),n.xp6(1),n.Q6J("ngIf",Ze.searchResult.penggunaResults.length>0))},directives:[_.KE,_.hX,E.Nt,O.Fj,O.nD,O.JJ,O.On,ee.Hw,_.R9,ue.O5,Z.Ub,ue.sg,Z.vS,ne.rH,Z.eA,De.X2],pipes:[ue.OU,ue.uU],styles:[""]}),q})();var Rt=a(466),mt=a(9224);function gt(q,He){if(1&q&&(n.TgZ(0,"mat-icon",12),n._uU(1),n.qZA()),2&q){const ae=n.oxw().$implicit;n.xp6(1),n.Oqu(ae.icon)}}function Le(q,He){if(1&q&&(n.TgZ(0,"div",6)(1,"mat-card")(2,"mat-card-header",7)(3,"div",8),n.YNc(4,gt,2,1,"mat-icon",9),n.qZA(),n.TgZ(5,"mat-card-title",10)(6,"h3",11),n._uU(7),n.qZA()(),n.TgZ(8,"mat-card-subtitle",11),n._uU(9),n.qZA()()()()),2&q){const ae=He.$implicit;n.xp6(2),n.MGl("routerLink","/admin-mod/",ae.url,""),n.xp6(1),n.Udp("background-image","url("+(ae.image_url?ae.image_url:"")+")"),n.xp6(1),n.Q6J("ngIf",ae.icon),n.xp6(3),n.Oqu(ae.name),n.xp6(2),n.Oqu(ae.deskripsi)}}let Je=(()=>{class q{constructor(ae,Ze){this.gs=ae,this.adm=Ze}get ADM(){return this.adm}ngOnInit(){}}return q.\u0275fac=function(ae){return new(ae||q)(n.Y36(r.U),n.Y36(Rt.l))},q.\u0275cmp=n.Xpm({type:q,selectors:[["app-admin-navigation"]],decls:7,vars:1,consts:[[1,"row"],[1,"col-12","sticky-top","bg-bifeldy"],[1,"pt-3","border-bottom-dotted"],[1,"text-bifeldy"],[1,"col-12","px-3"],["class","col-12 p-2",4,"ngFor","ngForOf"],[1,"col-12","p-2"],[2,"cursor","pointer",3,"routerLink"],["mat-card-avatar","",2,"background-size","cover"],["style","font-size: 300%;",4,"ngIf"],[1,"text-warning","mb-1",2,"cursor","pointer"],[1,"mb-0"],[2,"font-size","300%"]],template:function(ae,Ze){1&ae&&(n.TgZ(0,"div",0)(1,"div",1)(2,"h2",2)(3,"b",3),n._uU(4,"Menu Admin Lainnya"),n.qZA()()(),n.TgZ(5,"div",4),n.YNc(6,Le,10,6,"div",5),n.qZA()()),2&ae&&(n.xp6(6),n.Q6J("ngForOf",Ze.ADM.menuList))},directives:[ue.sg,mt.a8,mt.dk,ne.rH,mt.kc,ue.O5,ee.Hw,mt.n5,mt.$j],styles:[""]}),q})();var H=a(1617),Ee=a(8381);let Ce=(()=>{class q{constructor(ae,Ze){this.gs=ae,this.ss=Ze,this.sidePanel=null,this.componentView=null}toggleSidePanel(ae){this.componentView?this.closeSidePanel():this.openSidePanel(ae)}closeSidePanel(){this.sidePanel.close()}onClose(){this.componentView=null}openSidePanel(ae){if("string"!=typeof ae)this.componentView=ae;else if("SearchAllComponent"===ae)this.componentView=Tt;else if("AdminNavigationComponent"===ae)this.componentView=Je;else if("LiveChatComponent"===ae){if(!this.ss.mySocket.id)return;this.componentView=H.u}this.sidePanel.open()}}return q.\u0275fac=function(ae){return new(ae||q)(n.LFG(r.U),n.LFG(Ee.R))},q.\u0275prov=n.Yz7({token:q,factory:q.\u0275fac,providedIn:"root"}),q})()},9775:(it,U,a)=>{"use strict";a.d(U,{H:()=>I});var n=a(5861),r=a(5e3),l=a(3988),u=a(8696),o=a(7845);let I=(()=>{class M{constructor(C,D,y,_){this.su=C,this.sp=D,this.gs=y,this.ds=_,this.isUpdateAvailable=!1,this.swuVerUpd=null,this.swuUnRecv=null,this.dialogRef=null,this.subsDialog=null,this.gs.isBrowser&&this.initialize()}get swEnabled(){return this.su.isEnabled&&this.sp.isEnabled}checkForUpdate(){var C=this;return(0,n.Z)(function*(){if(!C.isUpdateAvailable){C.isUpdateAvailable=!0;try{C.isUpdateAvailable=yield C.su.checkForUpdate()}catch(D){C.gs.log("[SERVICE_WORKER_CHECK_FOR_UPDATE_ERROR]",D)}}return C.gs.log("[SERVICE_WORKER_UPDATE_AVAILABLE]",C.isUpdateAvailable),C.isUpdateAvailable})()}activateUpdate(){var C=this;return(0,n.Z)(function*(){var D,y,_;let E=!1;if(C.isUpdateAvailable)try{E=yield C.su.activateUpdate(),C.isUpdateAvailable=!1,null===(D=C.dialogRef)||void 0===D||D.close(null),null===(y=C.subsDialog)||void 0===y||y.unsubscribe(),C.dialogRef=C.ds.openInfoDialog({data:{title:"Pembaharuan "+(E?"Berhasil":"Gagal"),htmlMessage:"Ingin Refresh Halaman (?)",confirmText:"Ya",cancelText:"Tidak"}}),C.subsDialog=null===(_=C.dialogRef)||void 0===_?void 0:_.afterClosed().subscribe({next:O=>{C.gs.log("[INFO_DIALOG_CLOSED]",O),C.dialogRef=null,C.subsDialog.unsubscribe(),!0===O&&window.location.reload()}})}catch(O){C.gs.log("[SERVICE_WORKER_ACTIVATE_UPDATE_ERROR]",O)}return C.gs.log("[SERVICE_WORKER_UPDATE_FINISH]",E),E})()}initialize(){var C=this;return(0,n.Z)(function*(){var D;C.swuVerUpd=C.su.versionUpdates.subscribe({next:(D=(0,n.Z)(function*(y){var _,E,O,ee,ue,Z,ne,De,ve;C.gs.log(`[SERVICE_WORKER_${y.type}]`,y),"VERSION_DETECTED"===y.type&&(null===(_=C.dialogRef)||void 0===_||_.close(null),null===(E=C.subsDialog)||void 0===E||E.unsubscribe()),"VERSION_READY"===y.type&&(C.dialogRef=C.ds.openInfoDialog({data:{title:"Ada Pembaharuan Tersedia",htmlMessage:`\n
Sekarang :: ${null===(ee=null===(O=y.currentVersion)||void 0===O?void 0:O.hash)||void 0===ee?void 0:ee.slice(0,8)}
\n
Tersedia :: ${null===(Z=null===(ue=y.latestVersion)||void 0===ue?void 0:ue.hash)||void 0===Z?void 0:Z.slice(0,8)}
\n `,confirmText:"OK"}})),"VERSION_INSTALLATION_FAILED"===y.type&&(C.dialogRef=C.ds.openInfoDialog({data:{title:"Pembaharuan Gagal",htmlMessage:`\n
Versi :: ${null===(De=null===(ne=y.version)||void 0===ne?void 0:ne.hash)||void 0===De?void 0:De.slice(0,8)}
\n
Error :: ${y.error}
\n `,confirmText:"Ulangi",cancelText:"Lewati"}})),C.subsDialog=null===(ve=C.dialogRef)||void 0===ve?void 0:ve.afterClosed().subscribe({next:W=>{C.gs.log("[INFO_DIALOG_CLOSED]",W),!0===W&&C.activateUpdate(),C.dialogRef=null,C.subsDialog.unsubscribe()}})}),function(_){return D.apply(this,arguments)})}),C.swuUnRecv=C.su.unrecoverable.subscribe({next:D=>{var y,_,E;C.gs.log(`[SERVICE_WORKER_${D.type}]`,D.reason),null===(y=C.dialogRef)||void 0===y||y.close(null),null===(_=C.subsDialog)||void 0===_||_.unsubscribe(),C.dialogRef=C.ds.openInfoDialog({data:{title:"Service Worker Bermasalah",htmlMessage:`Kesalahan :: ${D.reason}`,confirmText:"Refresh Halaman"}}),C.subsDialog=null===(E=C.dialogRef)||void 0===E?void 0:E.afterClosed().subscribe({next:O=>{C.gs.log("[INFO_DIALOG_CLOSED]",O),C.dialogRef=null,C.subsDialog.unsubscribe(),window.location.reload()}})}})})()}}return M.\u0275fac=function(C){return new(C||M)(r.LFG(l.yO),r.LFG(l.Mk),r.LFG(u.U),r.LFG(o.x))},M.\u0275prov=r.Yz7({token:M,factory:M.\u0275fac,providedIn:"root"}),M})()},8381:(it,U,a)=>{"use strict";a.d(U,{R:()=>Z});var n=a(5861),r=a(685),l=a.n(r),u=a(1135),o=a(6271),I=a(5934),M=a(5e3),g=a(4137),C=a(8406),D=a(8696),y=a(3e3),_=a(7140),E=a(7),O=a(6925),ee=a(7845),ue=a(9775);let Z=(()=>{class ne{constructor(ve,W,z,V,Me,Q,fe,Ae,j){this.as=ve,this.router=W,this.gs=z,this.bs=V,this.notif=Me,this.lms=Q,this.toast=fe,this.ds=Ae,this.sw=j,this.mySocket=null,this.visitor=0,this.latency=0,this.statsServer={cpus:0,mem_ram:0,disk_io:0,net_tx:0,net_rx:0},this.messageChatUnreadCount=0,this.badgeNews=[],this.badgeBerkas=[],this.badgeFansub=[],this.github=null,this.currentServerSubject=new u.X(null),this.currentServer=this.currentServerSubject.asObservable(),this.currentServerValue=null,this.currentRoomSubject=new u.X(null),this.currentRoom=this.currentRoomSubject.asObservable(),this.currentChatRoom=[],this.globalRoomSubject=new u.X(null),this.globalRoom=this.globalRoomSubject.asObservable(),this.globalChatRoom=[],this.fansubRoomSubject=new u.X(null),this.fansubRoom=this.fansubRoomSubject.asObservable(),this.fansubChatRoom=[],this.serverLog="// Tidak Ada Catatan Log~",this.quizRoom={},this.subsServer=null,this.subsDialog=null,this.timedOut=null,this.gs.isBrowser&&(this.mySocket=l()("//",{query:{"ngsw-bypass":!0,token:this.as.token},transports:["websocket","polling"],transportOptions:{polling:{extraHeaders:{"x-access-token":this.as.token}}}}),this.socketListen(),this.checkServerMaintenance())}get currentRoomValue(){var ve;return(null===(ve=this.currentRoomSubject)||void 0===ve?void 0:ve.value)||null}get globalRoomValue(){var ve;return(null===(ve=this.globalRoomSubject)||void 0===ve?void 0:ve.value)||null}checkServerMaintenance(){var W,ve=this;this.subsServer=this.currentServer.subscribe({next:(W=(0,n.Z)(function*(z){var V;z&&z.isMaintenance&&(null===(V=ve.currentServerValue)||void 0===V?void 0:V.isMaintenance)!==z.isMaintenance&&(ve.subsDialog=(yield ve.ds.openMaintenanceDialog()).afterClosed().subscribe({next:Me=>{ve.gs.log("[INFO_DIALOG_CLOSED]",Me),ve.subsDialog.unsubscribe()}})),ve.currentServerValue=z}),function(V){return W.apply(this,arguments)})})}pingPong(){this.socketEmitVolatile("ping-pong",{},ve=>{this.gs.log("[SOCKET_PING_PONG]",ve),"github"in ve&&ve.github&&(this.github=ve.github),"server"in ve&&ve.server&&this.currentServerSubject.next(ve.server)})}socketListen(){var ve=this;this.mySocket.on("connect",()=>{this.gs.log("[SOCKET_CONNECTED]",this.mySocket.id),this.pingPong(),this.notif.removeNotif(`${I.N.siteName.toUpperCase()}_SOCKET_DISCONNECTED`),this.timedOut=setTimeout(()=>{this.socketLeaveAndJoinNewRoom(null,this.router.url.split("?")[0])},1234)}),this.mySocket.on("connect_error",()=>{this.gs.log("[SOCKET_CONNECT_ERROR]",this.mySocket.io.opts),this.mySocket.io.opts.transports=["polling","websocket"]}),this.mySocket.on("disconnect",W=>{this.gs.log("[SOCKET_DISCONNECTED]",W),this.notif.addNotif(null,`${I.N.siteName.toUpperCase()}_SOCKET_DISCONNECTED`,"warning","Sambungan Terputus","Tidak dapat terhubung dengan Server melalui WebSocket !!",!1),this.sw.isUpdateAvailable=!1}),this.mySocket.on("ping",()=>{this.gs.log("[SOCKET_PING]",Date.now())}),this.mySocket.on("server-config",W=>{this.currentServerSubject.next(W)}),this.mySocket.on("pong",W=>{this.latency=W,this.gs.log("[SOCKET_PONG]",`${Date.now()} => ${W} ms`),this.pingPong(),this.sw.checkForUpdate()}),this.mySocket.on("visitors",W=>{this.gs.log("[SOCKET_VISITOR]",this.visitor),this.visitor=W}),this.mySocket.on("console-log",W=>{this.gs.log("[SOCKET_CONSOLE_LOG]",W),this.serverLog=`${W}\r\n${this.serverLog}`}),this.mySocket.on("force-redirect",W=>{this.gs.log("[SOCKET_REDIRECT]",W.message),this.toast.info(W.message,W.title,null,!0),this.router.navigateByUrl(W.url)}),this.mySocket.on("force-logout",W=>{this.gs.log("[SOCKET_EXIT]",W),this.toast.info(W,"Keluar Paksa!",null,!0),this.as.logout()}),this.mySocket.on("new-notification",W=>{this.gs.log("[SOCKET_NOTIFICATION]",W),this.notif.addNotif(W.notifCreator,W.notifData.id,W.notifData.type,W.notifData.title,W.notifData.content,W.notifData.dismissible)}),this.mySocket.on("new-information",function(){var W=(0,n.Z)(function*(z){ve.gs.log("[SOCKET_INFORMATION]",z),ve.subsDialog=ve.ds.openInfoDialog({data:{title:z.infoData.title,htmlMessage:z.infoData.content,confirmText:z.infoData.confirm,cancelText:z.infoData.cancel},disableClose:z.infoData.close}).afterClosed().subscribe({next:V=>{ve.gs.log("[INFO_DIALOG_CLOSED]",V),ve.subsDialog.unsubscribe()}})});return function(z){return W.apply(this,arguments)}}()),this.mySocket.on("new-berkas",W=>{this.gs.log("[SOCKET_BERKAS]",W),this.badgeBerkas.push(W);const z=this.lms.contentMenus.find(V=>"/berkas"===V.link);z&&(z.badge=this.badgeBerkas.length>0?this.badgeBerkas.length:null)}),this.mySocket.on("new-fansub",W=>{this.gs.log("[SOCKET_FANSUB]",W),this.badgeFansub.push(W);const z=this.lms.contentMenus.find(V=>"/fansub"===V.link);z&&(z.badge=this.badgeFansub.length>0?this.badgeFansub.length:null)}),this.mySocket.on("new-news",W=>{this.gs.log("[SOCKET_NEWS]",W),this.badgeNews.push(W);const z=this.lms.mainMenus.find(V=>"/news"===V.link);z&&(z.badge=this.badgeNews.length>0?this.badgeNews.length:null)}),this.mySocket.on("receive-chat",W=>{this.gs.log("[SOCKET_RECEIVE-CHAT]",W),W.room_id===o.t.socketRoomNameGlobalPublic?this.globalChatRoom.push(W):W.room_id===o.t.socketRoomNameGlobalFansub?this.fansubChatRoom.push(W):W.room_id!==o.t.socketRoomNameServerLogs&&this.currentChatRoom.push(W),this.messageChatUnreadCount++}),this.mySocket.on("room-info",W=>{this.gs.log("[SOCKET_ROOM-INFO]",W),this.gs.cleanObject(null==W?void 0:W.member_list),W.room_id===o.t.socketRoomNameGlobalPublic?this.globalRoomSubject.next(W):W.room_id===o.t.socketRoomNameGlobalFansub?this.fansubRoomSubject.next(W):W.room_id!==o.t.socketRoomNameServerLogs&&this.currentRoomSubject.next(W)}),this.mySocket.on("multiple-connection",(W,z)=>{this.gs.log("[SOCKET_MULTIPLE-CONNECTION]",W),this.toast.warning("Sesi lain telah aktif!","Koneksi Duplikat",null,!0),this.mySocket.io.reconnection(!1),this.bs.clear(),z&&z()}),this.mySocket.on("quiz-question",W=>{if(this.gs.log("[SOCKET_QUIZ]",W),this.gs.routerData.question&&this.gs.routerData.options){const{room_id:z,...V}=W;this.quizRoom[z]=V,this.quizRoom[z].options=this.gs.shuffle(this.quizRoom[z].options)}}),this.mySocket.on("stats-server",W=>{this.gs.log("[SOCKET_STATS_SERVER]",W),this.statsServer.mem_ram=W.mem_ram,this.statsServer.disk_io=W.disk_io,this.statsServer.cpus=W.cpus,this.statsServer.net_tx=W.net_tx,this.statsServer.net_rx=W.net_rx})}socketEmit(ve,W={},z=null){var V,Me;this.as.token&&(W.token=this.as.token),z?null===(V=this.mySocket)||void 0===V||V.emit(ve,W,z):null===(Me=this.mySocket)||void 0===Me||Me.emit(ve,W)}socketEmitVolatile(ve,W={},z=null){this.socketEmit(ve,W,z)}socketLeaveAndJoinNewRoom(ve,W){this.gs.log(`[SOCKET_LEAVE-JOIN-ROOM] ${ve} => ${W}`),this.socketEmit("leave-join-room",{oldRoom:ve,newRoom:W})}}return ne.\u0275fac=function(ve){return new(ve||ne)(M.LFG(g.e),M.LFG(C.F0),M.LFG(D.U),M.LFG(y.z),M.LFG(_.T),M.LFG(E.S),M.LFG(O.k),M.LFG(ee.x),M.LFG(ue.H))},ne.\u0275prov=M.Yz7({token:ne,factory:ne.\u0275fac,providedIn:"root"}),ne})()},6925:(it,U,a)=>{"use strict";a.d(U,{k:()=>o});var n=a(5e3),r=a(8696),l=a(2290),u=a(7140);let o=(()=>{class I{constructor(g,C,D){this.gs=g,this.toast=C,this.notif=D}remove(g){return this.toast.remove(g)}success(g,C,D,y=!1){return y&&this.notif.addNotif(null,(new Date).getTime(),"success",C,g),this.gs.isDesktop||y?this.toast.success(g,C,D):null}warning(g,C,D,y=!1){return y&&this.notif.addNotif(null,(new Date).getTime(),"warning",C,g),this.gs.isDesktop||y?this.toast.warning(g,C,D):null}info(g,C,D,y=!1){return y&&this.notif.addNotif(null,(new Date).getTime(),"info",C,g),this.gs.isDesktop||y?this.toast.info(g,C,D):null}error(g,C,D,y=!1){return y&&this.notif.addNotif(null,(new Date).getTime(),"danger",C,g),this.gs.isDesktop||y?this.toast.error(g,C,D):null}}return I.\u0275fac=function(g){return new(g||I)(n.LFG(r.U),n.LFG(l._W),n.LFG(u.T))},I.\u0275prov=n.Yz7({token:I,factory:I.\u0275fac,providedIn:"root"}),I})()},8058:(it,U,a)=>{"use strict";a.d(U,{K:()=>I});var n=a(8505),r=a(5e3),l=a(9731),u=a(4137),o=a(8696);let I=(()=>{class M{constructor(C,D,y){this.api=C,this.as=D,this.gs=y}checkBanned(C){return this.api.getData(`/banned?username=${C}`)}getAllUser(C="",D=1,y=10,_="",E=""){return this.api.getData(`/user?q=${C}&page=${D}&row=${y}&sort=${_}&order=${E}`)}getUserData(C){return this.api.getData(`/user/${C}`)}updateUser(C,D){return this.api.putData(`/user/${C}`,D).pipe((0,n.b)(y=>{this.as.token=y.result.token}))}getUserBerkas(C,D="",y=1,_=10,E="",O=""){return this.api.getData(`/user/${C}/feed-berkas?q=${D}&page=${y}&row=${_}&sort=${E}&order=${O}`)}getUserFeedComment(C,D="",y=1,_=10,E="",O=""){return this.api.getData(`/user/${C}/feed-comment?q=${D}&page=${y}&row=${_}&sort=${E}&order=${O}`)}getUserFeedLikeDislike(C,D="",y=1,_=10,E="",O=""){return this.api.getData(`/user/${C}/feed-likedislike?q=${D}&page=${y}&row=${_}&sort=${E}&order=${O}`)}getUserFeedVisit(C,D="",y=1,_=10,E="",O=""){return this.api.getData(`/user/${C}/feed-visit?q=${D}&page=${y}&row=${_}&sort=${E}&order=${O}`)}cekNik(C){return this.api.postData("/verify-nik",C)}verifyKTP(C){return this.api.postData("/verify-ktp",C).pipe((0,n.b)(D=>{this.as.token=D.result.token}))}sosmedLogin(C){return this.api.postData("/verify-sosmed",C)}getUserGroup(C){return this.api.getData(`/user/${C}/group`)}findLostAccount(C){return this.api.postData("/lost-account-find",C)}resetLostAccount(C){return this.api.postData("/lost-account-reset",C)}}return M.\u0275fac=function(C){return new(C||M)(r.LFG(l.s),r.LFG(u.e),r.LFG(o.U))},M.\u0275prov=r.Yz7({token:M,factory:M.\u0275fac,providedIn:"root"}),M})()},8020:(it,U,a)=>{"use strict";a.d(U,{N:()=>I});var n=a(5861),r=a(5e3),l=a(8696),u=a(7845),o=a(8381);let I=(()=>{class M{constructor(C,D,y){this.gs=C,this.ds=D,this.ss=y,this.currentServer=null,this.openedWindow={},this.subsDialog=null,this.subsServer=null,this.gs.isBrowser&&(this.subsServer=this.ss.currentServer.subscribe({next:_=>this.currentServer=_}))}confirmationOpenUrl(C,D){var y=this;return(0,n.Z)(function*(){y.subsDialog=(yield y.ds.openKonfirmasiDialog(`Ingin Buka Di Tab ${"_self"===D?"Ini":"Baru"} ?`,C,!1)).afterClosed().subscribe({next:_=>{y.gs.log("[INFO_DIALOG_CLOSED]",_),!0===_&&window.open(C,D),y.subsDialog.unsubscribe()}})})()}winboxOpenUri(C,D="_blank",y=!1){var _;if(C.startsWith("http://")&&(C="https://"+C.slice(7,C.length)),C.startsWith("/api/"))this.confirmationOpenUrl(C,"_self");else if((null===(_=this.currentServer)||void 0===_?void 0:_.winboxOpenLink)&&!this.gs.includesOneOf(C,["ftp://","mailto:"])||y){const E=(new Date).getTime();this.openedWindow[E]=new WinBox(C,{id:E,title:C,url:C,class:"no-full no-shadow no-max",background:"#7b1fa2",x:"center",y:"center",top:56,right:0,bottom:32,left:64,onclose:O=>(this.confirmationOpenUrl(C,D),!1)})}else this.confirmationOpenUrl(C,D)}}return M.\u0275fac=function(C){return new(C||M)(r.LFG(l.U),r.LFG(u.x),r.LFG(o.R))},M.\u0275prov=r.Yz7({token:M,factory:M.\u0275fac,providedIn:"root"}),M})()},6271:(it,U,a)=>{"use strict";a.d(U,{t:()=>n});const n={apiTagAnime:"Anime",apiTagApiKey:"API Key",apiTagAttachment:"Attachment",apiTagBanned:"Banned",apiTagBerkas:"Berkas",apiTagDorama:"Dorama",apiTagDdlFile:"DDL File",apiTagFansub:"Fansub",apiTagMail:"Surat Elektronik",apiTagNews:"News",apiTagNihongo:"Nihongo",apiTagQuiz:"Quiz",apiTagSession:"Session",apiTagUser:"User",attachmentSpeedLimiterBps:256e3,blacklistedWords:["*","www","fansub","fansub.id","fansubid","fansub-id","localhost","mail","email","e-mail","tracker","fansub","fansubber","ferdion","bifeldy","dev","api","docs","cs","help","support","admin","administrator","info","information","noreply","mod","moderator"],cronFansubRssFeed:"CRON_FANSUB_RSS_FEED",cronTrackerStatistics:"CRON_TRACKER_STATISTICS",cronStatsServer:"CRON_STATS_SERVER",decoratorFilterApiKeyAccess:"filter-api-key-access",decoratorRoles:"roles",decoratorVerifiedOnly:"verified-only",extSubs:["ass","srt"],extFonts:["ttf","otf","woff","woff2"],fileTypeAttachmentAllowed:["video/x-matroska","video/mp4"],fileSizeAttachmentChunkCloudflareLimit:64e6,fileSizeAttachmentChunkDiscordLimit:8e6,fileSizeAttachmentTotalLimit:256e6,fileSizeImageLimit:256e3,gCaptchaSiteKey:"6Ld4Bt4UAAAAAKJQ_jfqtWdsq9BuARLHag2DBvqK",jwtAlgorithm:"HS512",jwtExpiredIn:86400,quizOptionsCountHirakata:5,quizOptionsCountCategory:6,quizOptionsCountKanji:6,regexIpAddress:/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,regexAllKeyboardKeys:/^[\P{Cc}\P{Cn}\P{Cs}]*$/,regexEmail:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/,regexEmailMulti:/^[^a-z0-9_]*([a-z0-9_+\-.%]+@[a-z0-9_\-.]+\.[a-z]+[^a-z0-9_]*,{1}[^a-z0-9_]*)*([a-z0-9_+\-.%]+@[a-z0-9_\-.]+\.[a-z]+)[^a-z0-9_]*$/,regexEnglishKeyboardKeys:/^[a-zA-Z0-9~`!@#\$%\^&\*\(\)_\-\+={\[\}\]\|\\:;"'<,>\.\?\/ \n]*$/,regexJapaneseKeyboardKeys:/[\u4e00-\u9fa0\u3041-\u3094\u30a1-\u30f4\u30fc\uff41-\uff5a\uff21-\uff3a\uff10-\uff19\u3005\u3006\u3024\u3001\u3002]+/u,regexUrl:/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/,socketRoomNameGlobalPublic:"GLOBAL_PUBLIK",socketRoomNameGlobalFansub:"GLOBAL_FANSUB",socketRoomNameServerLogs:"SERVER_LOGS",timeoutCancelRegisterKey:"TIMEOUT_CANCEL_REGISTER",timeoutCancelRegisterTime:3e5,timeoutDeleteTempAttachmentKey:"TIMEOUT_DELETE_TEMP_ATTACHMENT",timeoutDeleteTempAttachmentTime:18e4,timeJwtEncryption:180,timeLoginRememberMe:604800,timeResetAccount:300,timeMaxDaysNotification:6048e5,verificationDomain:["ghs.google.com"]}},5934:(it,U,a)=>{"use strict";a.d(U,{N:()=>n});const n={production:!0,siteName:"FansubID",siteDescription:"Di Kamar Saja!",author:"Bifeldy",domain:"fansub.id",baseUrl:"https://www.fansub.id",apiUrl:"/api",apiKey:"00000000-0000-0000-0000-000000000000",discord:{client_id:"789831990433153034",join_url:"https://discord.gg/xGWdExk",guild_id:"342220398022098944"},torrent:{trackerAnnounce:["wss://tracker.fansub.id","wss://tracker.btorrent.xyz","wss://tracker.openwebtorrent.com"],iceServers:[{urls:["stun:tracker.fansub.id:11111","stun:openrelay.metered.ca:80","stun:stun.l.google.com:19302"]}]}}},7446:(it,U,a)=>{"use strict";var n=a(2313),r=a(5e3),l=a(520),u=a(9646),o=a(9300),I=a(5698),M=a(8505);function g(v){const xe={};for(const h of v.keys()){const A=v.getAll(h);null!==A&&(xe[h]=A)}return xe}let C=(()=>{class v{constructor(h,A){this.transferState=A,this.isCacheActive=!0,h.isStable.pipe((0,o.h)(ce=>ce),(0,I.q)(1)).subscribe(()=>{this.isCacheActive=!1})}invalidateCacheEntry(h){Object.keys(this.transferState.store).forEach(A=>A.includes(h)?this.transferState.remove((0,n.Cb)(A)):null)}makeCacheKey(h,A,ce){const je=ce.keys().sort().map(Ht=>`${Ht}=${ce.getAll(Ht)}`).join("&");return(0,n.Cb)(("GET"===h?"G.":"H.")+A+"?"+je)}intercept(h,A){if("GET"!==h.method&&"HEAD"!==h.method&&(this.isCacheActive=!1,this.invalidateCacheEntry(h.url)),!this.isCacheActive)return A.handle(h);const ce=this.makeCacheKey(h.method,h.url,h.params);if(this.transferState.hasKey(ce)){const je=this.transferState.get(ce,{});return(0,u.of)(new l.Zn({body:je.body,headers:new l.WM(je.headers),status:je.status,statusText:je.statusText,url:je.url}))}return A.handle(h).pipe((0,M.b)(It=>{It instanceof l.Zn&&this.transferState.set(ce,{body:It.body,headers:g(It.headers),status:It.status,statusText:It.statusText,url:It.url||""})}))}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(r.z2F),r.LFG(n.ki))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac}),v})(),D=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({providers:[C,{provide:l.TP,useExisting:C,multi:!0}],imports:[[n.Cu]]}),v})();var E=a(6360),O=a(9808),ee=a(1135),ue=a(8306),Z=a(6451),ne=a(7579);function De(v){for(let xe in v){let h=v[xe]||"";switch(xe){case"display":v.display="flex"===h?["-webkit-flex","flex"]:"inline-flex"===h?["-webkit-inline-flex","inline-flex"]:h;break;case"align-items":case"align-self":case"align-content":case"flex":case"flex-basis":case"flex-flow":case"flex-grow":case"flex-shrink":case"flex-wrap":case"justify-content":v["-webkit-"+xe]=h;break;case"flex-direction":h=h||"row",v["-webkit-flex-direction"]=h,v["flex-direction"]=h;break;case"order":v.order=v["-webkit-"+xe]=isNaN(+h)?"0":h}}return v}const ve="inline",W=["row","column","row-reverse","column-reverse"];function z(v){let[xe,h,A]=function V(v){var xe;v=null!==(xe=null==v?void 0:v.toLowerCase())&&void 0!==xe?xe:"";let[h,A,ce]=v.split(" ");return W.find(je=>je===h)||(h=W[0]),A===ve&&(A=ce!==ve?ce:"",ce=ve),[h,Q(A),!!ce]}(v);return function fe(v,xe=null,h=!1){return{display:h?"inline-flex":"flex","box-sizing":"border-box","flex-direction":v,"flex-wrap":xe||null}}(xe,h,A)}function Q(v){if(v)switch(v.toLowerCase()){case"reverse":case"wrap-reverse":case"reverse-wrap":v="wrap-reverse";break;case"no":case"none":case"nowrap":v="nowrap";break;default:v="wrap"}return v}const Y={provide:r.tb,useFactory:function j(v,xe){return()=>{if((0,O.NF)(xe)){const h=Array.from(v.querySelectorAll(`[class*=${J}]`)),A=/\bflex-layout-.+?\b/g;h.forEach(ce=>{ce.classList.contains(`${J}ssr`)&&ce.parentNode?ce.parentNode.removeChild(ce):ce.className.replace(A,"")})}}},deps:[O.K0,r.Lbi],multi:!0},J="flex-layout-";let ie=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({providers:[Y]}),v})();class Be{constructor(xe=!1,h="all",A="",ce="",je=0){this.matches=xe,this.mediaQuery=h,this.mqAlias=A,this.suffix=ce,this.priority=je,this.property=""}clone(){return new Be(this.matches,this.mediaQuery,this.mqAlias,this.suffix)}}let nt=(()=>{class v{constructor(){this.stylesheet=new Map}addStyleToElement(h,A,ce){const je=this.stylesheet.get(h);je?je.set(A,ce):this.stylesheet.set(h,new Map([[A,ce]]))}clearStyles(){this.stylesheet.clear()}getStyleForElement(h,A){const ce=this.stylesheet.get(h);let je="";if(ce){const It=ce.get(A);("number"==typeof It||"string"==typeof It)&&(je=It+"")}return je}}return v.\u0275fac=function(h){return new(h||v)},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();const Tt={addFlexToParent:!0,addOrientationBps:!1,disableDefaultBps:!1,disableVendorPrefixes:!1,serverLoaded:!1,useColumnBasisZero:!0,printWithBreakpoints:[],mediaTriggerAutoRestore:!0,ssrObserveBreakpoints:[],multiplier:void 0,defaultUnit:"px",detectLayoutDisplay:!1},Rt=new r.OlP("Flex Layout token, config options for the library",{providedIn:"root",factory:()=>Tt}),mt=new r.OlP("FlexLayoutServerLoaded",{providedIn:"root",factory:()=>!1}),gt=new r.OlP("Flex Layout token, collect all breakpoints into one provider",{providedIn:"root",factory:()=>null});function Le(v,xe){return v=v?v.clone():new Be,xe&&(v.mqAlias=xe.alias,v.mediaQuery=xe.mediaQuery,v.suffix=xe.suffix,v.priority=xe.priority),v}class Je{constructor(){this.shouldCache=!0}sideEffect(xe,h,A){}}let H=(()=>{class v{constructor(h,A,ce,je){this._serverStylesheet=h,this._serverModuleLoaded=A,this._platformId=ce,this.layoutConfig=je}applyStyleToElement(h,A,ce=null){let je={};"string"==typeof A&&(je[A]=ce,A=je),je=this.layoutConfig.disableVendorPrefixes?A:De(A),this._applyMultiValueStyleToElement(je,h)}applyStyleToElements(h,A=[]){const ce=this.layoutConfig.disableVendorPrefixes?h:De(h);A.forEach(je=>{this._applyMultiValueStyleToElement(ce,je)})}getFlowDirection(h){const A="flex-direction";let ce=this.lookupStyle(h,A);return[ce||"row",this.lookupInlineStyle(h,A)||(0,O.PM)(this._platformId)&&this._serverModuleLoaded?ce:""]}hasWrap(h){return"wrap"===this.lookupStyle(h,"flex-wrap")}lookupAttributeValue(h,A){var ce;return null!==(ce=h.getAttribute(A))&&void 0!==ce?ce:""}lookupInlineStyle(h,A){return(0,O.NF)(this._platformId)?h.style.getPropertyValue(A):function Ee(v,xe){var h;return null!==(h=He(v)[xe])&&void 0!==h?h:""}(h,A)}lookupStyle(h,A,ce=!1){let je="";return h&&((je=this.lookupInlineStyle(h,A))||((0,O.NF)(this._platformId)?ce||(je=getComputedStyle(h).getPropertyValue(A)):this._serverModuleLoaded&&(je=this._serverStylesheet.getStyleForElement(h,A)))),je?je.trim():""}_applyMultiValueStyleToElement(h,A){Object.keys(h).sort().forEach(ce=>{const je=h[ce],It=Array.isArray(je)?je:[je];It.sort();for(let Ht of It)Ht=Ht?Ht+"":"",(0,O.NF)(this._platformId)||!this._serverModuleLoaded?(0,O.NF)(this._platformId)?A.style.setProperty(ce,Ht):Ce(A,ce,Ht):this._serverStylesheet.addStyleToElement(A,ce,Ht)})}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(nt),r.LFG(mt),r.LFG(r.Lbi),r.LFG(Rt))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();function Ce(v,xe,h){xe=xe.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();const A=He(v);A[xe]=null!=h?h:"",function q(v,xe){let h="";for(const A in xe)xe[A]&&(h+=`${A}:${xe[A]};`);v.setAttribute("style",h)}(v,A)}function He(v){const xe={},h=v.getAttribute("style");if(h){const A=h.split(/;+/g);for(let ce=0;ce0){const It=je.indexOf(":");if(-1===It)throw new Error(`Invalid CSS style: ${je}`);xe[je.substr(0,It).trim()]=je.substr(It+1).trim()}}}return xe}function ae(v,xe){return(xe&&xe.priority||0)-(v&&v.priority||0)}function Ze(v,xe){return(v.priority||0)-(xe.priority||0)}let Re=(()=>{class v{constructor(h,A,ce){this._zone=h,this._platformId=A,this._document=ce,this.source=new ee.X(new Be(!0)),this.registry=new Map,this.pendingRemoveListenerFns=[],this._observable$=this.source.asObservable()}get activations(){const h=[];return this.registry.forEach((A,ce)=>{A.matches&&h.push(ce)}),h}isActive(h){var A;const ce=this.registry.get(h);return null!==(A=null==ce?void 0:ce.matches)&&void 0!==A?A:this.registerQuery(h).some(je=>je.matches)}observe(h,A=!1){if(h&&h.length){const ce=this._observable$.pipe((0,o.h)(It=>!A||h.indexOf(It.mediaQuery)>-1)),je=new ue.y(It=>{const Ht=this.registerQuery(h);if(Ht.length){const Un=Ht.pop();Ht.forEach(Di=>{It.next(Di)}),this.source.next(Un)}It.complete()});return(0,Z.T)(je,ce)}return this._observable$}registerQuery(h){const A=Array.isArray(h)?h:[h],ce=[];return function te(v,xe){const h=v.filter(A=>!de[A]);if(h.length>0){const A=h.join(", ");try{const ce=xe.createElement("style");ce.setAttribute("type","text/css"),ce.styleSheet||ce.appendChild(xe.createTextNode(`\n/*\n @angular/flex-layout - workaround for possible browser quirk with mediaQuery listeners\n see http://bit.ly/2sd4HMP\n*/\n@media ${A} {.fx-query-test{ }}\n`)),xe.head.appendChild(ce),h.forEach(je=>de[je]=ce)}catch(ce){console.error(ce)}}}(A,this._document),A.forEach(je=>{const It=Un=>{this._zone.run(()=>this.source.next(new Be(Un.matches,je)))};let Ht=this.registry.get(je);Ht||(Ht=this.buildMQL(je),Ht.addListener(It),this.pendingRemoveListenerFns.push(()=>Ht.removeListener(It)),this.registry.set(je,Ht)),Ht.matches&&ce.push(new Be(!0,je))}),ce}ngOnDestroy(){let h;for(;h=this.pendingRemoveListenerFns.pop();)h()}buildMQL(h){return function ze(v,xe){return xe&&window.matchMedia("all").addListener?window.matchMedia(v):{matches:"all"===v||""===v,media:v,addListener:()=>{},removeListener:()=>{},onchange:null,addEventListener(){},removeEventListener(){},dispatchEvent:()=>!1}}(h,(0,O.NF)(this._platformId))}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(r.R0b),r.LFG(r.Lbi),r.LFG(O.K0))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();const de={},Ct=[{alias:"xs",mediaQuery:"screen and (min-width: 0px) and (max-width: 599.98px)",priority:1e3},{alias:"sm",mediaQuery:"screen and (min-width: 600px) and (max-width: 959.98px)",priority:900},{alias:"md",mediaQuery:"screen and (min-width: 960px) and (max-width: 1279.98px)",priority:800},{alias:"lg",mediaQuery:"screen and (min-width: 1280px) and (max-width: 1919.98px)",priority:700},{alias:"xl",mediaQuery:"screen and (min-width: 1920px) and (max-width: 4999.98px)",priority:600},{alias:"lt-sm",overlapping:!0,mediaQuery:"screen and (max-width: 599.98px)",priority:950},{alias:"lt-md",overlapping:!0,mediaQuery:"screen and (max-width: 959.98px)",priority:850},{alias:"lt-lg",overlapping:!0,mediaQuery:"screen and (max-width: 1279.98px)",priority:750},{alias:"lt-xl",overlapping:!0,priority:650,mediaQuery:"screen and (max-width: 1919.98px)"},{alias:"gt-xs",overlapping:!0,mediaQuery:"screen and (min-width: 600px)",priority:-950},{alias:"gt-sm",overlapping:!0,mediaQuery:"screen and (min-width: 960px)",priority:-850},{alias:"gt-md",overlapping:!0,mediaQuery:"screen and (min-width: 1280px)",priority:-750},{alias:"gt-lg",overlapping:!0,mediaQuery:"screen and (min-width: 1920px)",priority:-650}],Ft="(orientation: portrait) and (max-width: 599.98px)",jt="(orientation: landscape) and (max-width: 959.98px)",gn="(orientation: portrait) and (min-width: 600px) and (max-width: 839.98px)",kt="(orientation: landscape) and (min-width: 960px) and (max-width: 1279.98px)",Ye="(orientation: portrait) and (min-width: 840px)",k="(orientation: landscape) and (min-width: 1280px)",N={HANDSET:`${Ft}, ${jt}`,TABLET:`${gn} , ${kt}`,WEB:`${Ye}, ${k} `,HANDSET_PORTRAIT:`${Ft}`,TABLET_PORTRAIT:`${gn} `,WEB_PORTRAIT:`${Ye}`,HANDSET_LANDSCAPE:`${jt}`,TABLET_LANDSCAPE:`${kt}`,WEB_LANDSCAPE:`${k}`},P=[{alias:"handset",priority:2e3,mediaQuery:N.HANDSET},{alias:"handset.landscape",priority:2e3,mediaQuery:N.HANDSET_LANDSCAPE},{alias:"handset.portrait",priority:2e3,mediaQuery:N.HANDSET_PORTRAIT},{alias:"tablet",priority:2100,mediaQuery:N.TABLET},{alias:"tablet.landscape",priority:2100,mediaQuery:N.TABLET_LANDSCAPE},{alias:"tablet.portrait",priority:2100,mediaQuery:N.TABLET_PORTRAIT},{alias:"web",priority:2200,mediaQuery:N.WEB,overlapping:!0},{alias:"web.landscape",priority:2200,mediaQuery:N.WEB_LANDSCAPE,overlapping:!0},{alias:"web.portrait",priority:2200,mediaQuery:N.WEB_PORTRAIT,overlapping:!0}],F=/(\.|-|_)/g;function be(v){let xe=v.length>0?v.charAt(0):"",h=v.length>1?v.slice(1):"";return xe.toUpperCase()+h}const Bt=new r.OlP("Token (@angular/flex-layout) Breakpoints",{providedIn:"root",factory:()=>{const v=(0,r.f3M)(gt),xe=(0,r.f3M)(Rt),h=[].concat.apply([],(v||[]).map(ce=>Array.isArray(ce)?ce:[ce]));return function At(v,xe=[]){const h={};return v.forEach(A=>{h[A.alias]=A}),xe.forEach(A=>{h[A.alias]?function Ae(v,...xe){if(null==v)throw TypeError("Cannot convert undefined or null to object");for(let h of xe)if(null!=h)for(let A in h)h.hasOwnProperty(A)&&(v[A]=h[A]);return v}(h[A.alias],A):h[A.alias]=A}),function ot(v){return v.forEach(xe=>{xe.suffix||(xe.suffix=function qe(v){return v.replace(F,"|").split("|").map(be).join("")}(xe.alias),xe.overlapping=!!xe.overlapping)}),v}(Object.keys(h).map(A=>h[A]))}((xe.disableDefaultBps?[]:Ct).concat(xe.addOrientationBps?P:[]),h)}});let qt=(()=>{class v{constructor(h){this.findByMap=new Map,this.items=[...h].sort(Ze)}findByAlias(h){return h?this.findWithPredicate(h,A=>A.alias===h):null}findByQuery(h){return this.findWithPredicate(h,A=>A.mediaQuery===h)}get overlappings(){return this.items.filter(h=>h.overlapping)}get aliases(){return this.items.map(h=>h.alias)}get suffixes(){return this.items.map(h=>{var A;return null!==(A=null==h?void 0:h.suffix)&&void 0!==A?A:""})}findWithPredicate(h,A){var ce;let je=this.findByMap.get(h);return je||(je=null!==(ce=this.items.find(A))&&void 0!==ce?ce:null,this.findByMap.set(h,je)),null!=je?je:null}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Bt))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();const Zt="print",tn={alias:Zt,mediaQuery:Zt,priority:1e3};let bn=(()=>{class v{constructor(h,A,ce){this.breakpoints=h,this.layoutConfig=A,this._document=ce,this.registeredBeforeAfterPrintHooks=!1,this.isPrintingBeforeAfterEvent=!1,this.beforePrintEventListeners=[],this.afterPrintEventListeners=[],this.formerActivations=null,this.isPrinting=!1,this.queue=new En,this.deactivations=[]}withPrintQuery(h){return[...h,Zt]}isPrintEvent(h){return h.mediaQuery.startsWith(Zt)}get printAlias(){var h;return[...null!==(h=this.layoutConfig.printWithBreakpoints)&&void 0!==h?h:[]]}get printBreakPoints(){return this.printAlias.map(h=>this.breakpoints.findByAlias(h)).filter(h=>null!==h)}getEventBreakpoints({mediaQuery:h}){const A=this.breakpoints.findByQuery(h);return(A?[...this.printBreakPoints,A]:this.printBreakPoints).sort(ae)}updateEvent(h){var A;let ce=this.breakpoints.findByQuery(h.mediaQuery);return this.isPrintEvent(h)&&(ce=this.getEventBreakpoints(h)[0],h.mediaQuery=null!==(A=null==ce?void 0:ce.mediaQuery)&&void 0!==A?A:""),Le(h,ce)}registerBeforeAfterPrintHooks(h){if(!this._document.defaultView||this.registeredBeforeAfterPrintHooks)return;this.registeredBeforeAfterPrintHooks=!0;const A=()=>{this.isPrinting||(this.isPrintingBeforeAfterEvent=!0,this.startPrinting(h,this.getEventBreakpoints(new Be(!0,Zt))),h.updateStyles())},ce=()=>{this.isPrintingBeforeAfterEvent=!1,this.isPrinting&&(this.stopPrinting(h),h.updateStyles())};this._document.defaultView.addEventListener("beforeprint",A),this._document.defaultView.addEventListener("afterprint",ce),this.beforePrintEventListeners.push(A),this.afterPrintEventListeners.push(ce)}interceptEvents(h){return A=>{this.isPrintEvent(A)?A.matches&&!this.isPrinting?(this.startPrinting(h,this.getEventBreakpoints(A)),h.updateStyles()):!A.matches&&this.isPrinting&&!this.isPrintingBeforeAfterEvent&&(this.stopPrinting(h),h.updateStyles()):this.collectActivations(h,A)}}blockPropagation(){return h=>!(this.isPrinting||this.isPrintEvent(h))}startPrinting(h,A){this.isPrinting=!0,this.formerActivations=h.activatedBreakpoints,h.activatedBreakpoints=this.queue.addPrintBreakpoints(A)}stopPrinting(h){h.activatedBreakpoints=this.deactivations,this.deactivations=[],this.formerActivations=null,this.queue.clear(),this.isPrinting=!1}collectActivations(h,A){if(!this.isPrinting||this.isPrintingBeforeAfterEvent){if(!this.isPrintingBeforeAfterEvent)return void(this.deactivations=[]);if(!A.matches){const ce=this.breakpoints.findByQuery(A.mediaQuery);if(ce){const je=this.formerActivations&&this.formerActivations.includes(ce),It=!this.formerActivations&&h.activatedBreakpoints.includes(ce);(je||It)&&(this.deactivations.push(ce),this.deactivations.sort(ae))}}}}ngOnDestroy(){this._document.defaultView&&(this.beforePrintEventListeners.forEach(h=>this._document.defaultView.removeEventListener("beforeprint",h)),this.afterPrintEventListeners.forEach(h=>this._document.defaultView.removeEventListener("afterprint",h)))}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(qt),r.LFG(Rt),r.LFG(O.K0))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();class En{constructor(){this.printBreakpoints=[]}addPrintBreakpoints(xe){return xe.push(tn),xe.sort(ae),xe.forEach(h=>this.addBreakpoint(h)),this.printBreakpoints}addBreakpoint(xe){xe&&void 0===this.printBreakpoints.find(A=>A.mediaQuery===xe.mediaQuery)&&(this.printBreakpoints=function Et(v){var xe;return null!==(xe=null==v?void 0:v.mediaQuery.startsWith(Zt))&&void 0!==xe&&xe}(xe)?[xe,...this.printBreakpoints]:[...this.printBreakpoints,xe])}clear(){this.printBreakpoints=[]}}let _t=(()=>{class v{constructor(h,A,ce){this.matchMedia=h,this.breakpoints=A,this.hook=ce,this._useFallbacks=!0,this._activatedBreakpoints=[],this.elementMap=new Map,this.elementKeyMap=new WeakMap,this.watcherMap=new WeakMap,this.updateMap=new WeakMap,this.clearMap=new WeakMap,this.subject=new ne.x,this.observeActivations()}get activatedAlias(){var h,A;return null!==(A=null===(h=this.activatedBreakpoints[0])||void 0===h?void 0:h.alias)&&void 0!==A?A:""}set activatedBreakpoints(h){this._activatedBreakpoints=[...h]}get activatedBreakpoints(){return[...this._activatedBreakpoints]}set useFallbacks(h){this._useFallbacks=h}onMediaChange(h){const A=this.findByQuery(h.mediaQuery);if(A){h=Le(h,A);const ce=this.activatedBreakpoints.indexOf(A);h.matches&&-1===ce?(this._activatedBreakpoints.push(A),this._activatedBreakpoints.sort(ae),this.updateStyles()):!h.matches&&-1!==ce&&(this._activatedBreakpoints.splice(ce,1),this._activatedBreakpoints.sort(ae),this.updateStyles())}}init(h,A,ce,je,It=[]){Wt(this.updateMap,h,A,ce),Wt(this.clearMap,h,A,je),this.buildElementKeyMap(h,A),this.watchExtraTriggers(h,A,It)}getValue(h,A,ce){const je=this.elementMap.get(h);if(je){const It=void 0!==ce?je.get(ce):this.getActivatedValues(je,A);if(It)return It.get(A)}}hasValue(h,A){const ce=this.elementMap.get(h);if(ce){const je=this.getActivatedValues(ce,A);if(je)return void 0!==je.get(A)||!1}return!1}setValue(h,A,ce,je){var It;let Ht=this.elementMap.get(h);if(Ht){const Di=(null!==(It=Ht.get(je))&&void 0!==It?It:new Map).set(A,ce);Ht.set(je,Di),this.elementMap.set(h,Ht)}else Ht=(new Map).set(je,(new Map).set(A,ce)),this.elementMap.set(h,Ht);const Un=this.getValue(h,A);void 0!==Un&&this.updateElement(h,A,Un)}trackValue(h,A){return this.subject.asObservable().pipe((0,o.h)(ce=>ce.element===h&&ce.key===A))}updateStyles(){this.elementMap.forEach((h,A)=>{const ce=new Set(this.elementKeyMap.get(A));let je=this.getActivatedValues(h);je&&je.forEach((It,Ht)=>{this.updateElement(A,Ht,It),ce.delete(Ht)}),ce.forEach(It=>{if(je=this.getActivatedValues(h,It),je){const Ht=je.get(It);this.updateElement(A,It,Ht)}else this.clearElement(A,It)})})}clearElement(h,A){const ce=this.clearMap.get(h);if(ce){const je=ce.get(A);je&&(je(),this.subject.next({element:h,key:A,value:""}))}}updateElement(h,A,ce){const je=this.updateMap.get(h);if(je){const It=je.get(A);It&&(It(ce),this.subject.next({element:h,key:A,value:ce}))}}releaseElement(h){const A=this.watcherMap.get(h);A&&(A.forEach(je=>je.unsubscribe()),this.watcherMap.delete(h));const ce=this.elementMap.get(h);ce&&(ce.forEach((je,It)=>ce.delete(It)),this.elementMap.delete(h))}triggerUpdate(h,A){const ce=this.elementMap.get(h);if(ce){const je=this.getActivatedValues(ce,A);je&&(A?this.updateElement(h,A,je.get(A)):je.forEach((It,Ht)=>this.updateElement(h,Ht,It)))}}buildElementKeyMap(h,A){let ce=this.elementKeyMap.get(h);ce||(ce=new Set,this.elementKeyMap.set(h,ce)),ce.add(A)}watchExtraTriggers(h,A,ce){if(ce&&ce.length){let je=this.watcherMap.get(h);if(je||(je=new Map,this.watcherMap.set(h,je)),!je.get(A)){const Ht=(0,Z.T)(...ce).subscribe(()=>{const Un=this.getValue(h,A);this.updateElement(h,A,Un)});je.set(A,Ht)}}}findByQuery(h){return this.breakpoints.findByQuery(h)}getActivatedValues(h,A){for(let je=0;jeA.mediaQuery);this.hook.registerBeforeAfterPrintHooks(this),this.matchMedia.observe(this.hook.withPrintQuery(h)).pipe((0,M.b)(this.hook.interceptEvents(this)),(0,o.h)(this.hook.blockPropagation())).subscribe(this.onMediaChange.bind(this))}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Re),r.LFG(qt),r.LFG(bn))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();function Wt(v,xe,h,A){var ce;if(void 0!==A){const je=null!==(ce=v.get(xe))&&void 0!==ce?ce:new Map;je.set(h,A),v.set(xe,je)}}let Se=(()=>{class v{constructor(h,A,ce,je){this.elementRef=h,this.styleBuilder=A,this.styler=ce,this.marshal=je,this.DIRECTIVE_KEY="",this.inputs=[],this.mru={},this.destroySubject=new ne.x,this.styleCache=new Map}get parentElement(){return this.elementRef.nativeElement.parentElement}get nativeElement(){return this.elementRef.nativeElement}get activatedValue(){return this.marshal.getValue(this.nativeElement,this.DIRECTIVE_KEY)}set activatedValue(h){this.marshal.setValue(this.nativeElement,this.DIRECTIVE_KEY,h,this.marshal.activatedAlias)}ngOnChanges(h){Object.keys(h).forEach(A=>{if(-1!==this.inputs.indexOf(A)){const ce=A.split(".").slice(1).join(".");this.setValue(h[A].currentValue,ce)}})}ngOnDestroy(){this.destroySubject.next(),this.destroySubject.complete(),this.marshal.releaseElement(this.nativeElement)}init(h=[]){this.marshal.init(this.elementRef.nativeElement,this.DIRECTIVE_KEY,this.updateWithValue.bind(this),this.clearStyles.bind(this),h)}addStyles(h,A){const ce=this.styleBuilder,je=ce.shouldCache;let It=this.styleCache.get(h);(!It||!je)&&(It=ce.buildStyles(h,A),je&&this.styleCache.set(h,It)),this.mru=Object.assign({},It),this.applyStyleToElement(It),ce.sideEffect(h,It,A)}clearStyles(){Object.keys(this.mru).forEach(h=>{this.mru[h]=""}),this.applyStyleToElement(this.mru),this.mru={},this.currentValue=void 0}triggerUpdate(){this.marshal.triggerUpdate(this.nativeElement,this.DIRECTIVE_KEY)}getFlexFlowDirection(h,A=!1){if(h){const[ce,je]=this.styler.getFlowDirection(h);if(!je&&A){const It=z(ce);this.styler.applyStyleToElements(It,[h])}return ce.trim()}return"row"}hasWrap(h){return this.styler.hasWrap(h)}applyStyleToElement(h,A,ce=this.nativeElement){this.styler.applyStyleToElement(ce,h,A)}setValue(h,A){this.marshal.setValue(this.nativeElement,this.DIRECTIVE_KEY,h,A)}updateWithValue(h){this.currentValue!==h&&(this.addStyles(h),this.currentValue=h)}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(r.SBq),r.Y36(Je),r.Y36(H),r.Y36(_t))},v.\u0275dir=r.lG2({type:v,features:[r.TTD]}),v})();a(3191);var ut=a(2722);class Ie{constructor(xe,h,A=!0){this.key=xe,this.value=h,this.key=A?xe.replace(/['"]/g,"").trim():xe.trim(),this.value=A?h.replace(/['"]/g,"").trim():h.trim(),this.value=this.value.replace(/;/,"")}}function me(v){let xe=typeof v;return"object"===xe?v.constructor===Array?"array":v.constructor===Set?"set":"object":xe}function st(v){const[xe,...h]=v.split(":");return new Ie(xe,h.join(":"))}function Gt(v,xe){return xe.key&&(v[xe.key]=xe.value),v}let $t=(()=>{class v extends Se{constructor(h,A,ce,je,It,Ht,Un,Di,Tr){var lr;super(h,null,A,ce),this.sanitizer=je,this.ngStyleInstance=Un,this.DIRECTIVE_KEY="ngStyle",this.ngStyleInstance||(this.ngStyleInstance=new O.PC(h,It,Ht)),this.init();const No=null!==(lr=this.nativeElement.getAttribute("style"))&&void 0!==lr?lr:"";this.fallbackStyles=this.buildStyleMap(No),this.isServer=Di&&(0,O.PM)(Tr)}updateWithValue(h){const A=this.buildStyleMap(h);this.ngStyleInstance.ngStyle=Object.assign(Object.assign({},this.fallbackStyles),A),this.isServer&&this.applyStyleToElement(A),this.ngStyleInstance.ngDoCheck()}clearStyles(){this.ngStyleInstance.ngStyle=this.fallbackStyles,this.ngStyleInstance.ngDoCheck()}buildStyleMap(h){const A=ce=>{var je;return null!==(je=this.sanitizer.sanitize(r.q3G.STYLE,ce))&&void 0!==je?je:""};if(h)switch(me(h)){case"string":return dn(function x(v,xe=";"){return String(v).trim().split(xe).map(h=>h.trim()).filter(h=>""!==h)}(h),A);case"array":return dn(h,A);default:return function Fe(v,xe){let h=[];return"set"===me(v)?v.forEach(A=>h.push(A)):Object.keys(v).forEach(A=>{h.push(`${A}:${v[A]}`)}),function re(v,xe){return v.map(st).filter(A=>!!A).map(A=>(xe&&(A.value=xe(A.value)),A)).reduce(Gt,{})}(h,xe)}(h,A)}return{}}ngDoCheck(){this.ngStyleInstance.ngDoCheck()}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(r.SBq),r.Y36(H),r.Y36(_t),r.Y36(n.H7),r.Y36(r.aQg),r.Y36(r.Qsj),r.Y36(O.PC,10),r.Y36(mt),r.Y36(r.Lbi))},v.\u0275dir=r.lG2({type:v,features:[r.qOj]}),v})();const Fn=["ngStyle","ngStyle.xs","ngStyle.sm","ngStyle.md","ngStyle.lg","ngStyle.xl","ngStyle.lt-sm","ngStyle.lt-md","ngStyle.lt-lg","ngStyle.lt-xl","ngStyle.gt-xs","ngStyle.gt-sm","ngStyle.gt-md","ngStyle.gt-lg"];let dt=(()=>{class v extends $t{constructor(){super(...arguments),this.inputs=Fn}}return v.\u0275fac=function(){let xe;return function(A){return(xe||(xe=r.n5z(v)))(A||v)}}(),v.\u0275dir=r.lG2({type:v,selectors:[["","ngStyle",""],["","ngStyle.xs",""],["","ngStyle.sm",""],["","ngStyle.md",""],["","ngStyle.lg",""],["","ngStyle.xl",""],["","ngStyle.lt-sm",""],["","ngStyle.lt-md",""],["","ngStyle.lt-lg",""],["","ngStyle.lt-xl",""],["","ngStyle.gt-xs",""],["","ngStyle.gt-sm",""],["","ngStyle.gt-md",""],["","ngStyle.gt-lg",""]],inputs:{ngStyle:"ngStyle","ngStyle.xs":"ngStyle.xs","ngStyle.sm":"ngStyle.sm","ngStyle.md":"ngStyle.md","ngStyle.lg":"ngStyle.lg","ngStyle.xl":"ngStyle.xl","ngStyle.lt-sm":"ngStyle.lt-sm","ngStyle.lt-md":"ngStyle.lt-md","ngStyle.lt-lg":"ngStyle.lt-lg","ngStyle.lt-xl":"ngStyle.lt-xl","ngStyle.gt-xs":"ngStyle.gt-xs","ngStyle.gt-sm":"ngStyle.gt-sm","ngStyle.gt-md":"ngStyle.gt-md","ngStyle.gt-lg":"ngStyle.gt-lg"},features:[r.qOj]}),v})();function dn(v,xe){return v.map(st).filter(A=>!!A).map(A=>(xe&&(A.value=xe(A.value)),A)).reduce(Gt,{})}let un=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[ie]]}),v})();var fn=a(226);let pi=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[ie,fn.vT]]}),v})(),Pn=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[ie]]}),v})(),xi=(()=>{class v{constructor(h,A){(0,O.PM)(A)&&!h&&console.warn("Warning: Flex Layout loaded on the server without FlexLayoutServerModule")}static withConfig(h,A=[]){return{ngModule:v,providers:h.serverLoaded?[{provide:Rt,useValue:Object.assign(Object.assign({},Tt),h)},{provide:gt,useValue:A,multi:!0},{provide:mt,useValue:!0}]:[{provide:Rt,useValue:Object.assign(Object.assign({},Tt),h)},{provide:gt,useValue:A,multi:!0}]}}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(mt),r.LFG(r.Lbi))},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[pi,un,Pn],pi,un,Pn]}),v})();var wr=a(3075),ns=a(7261),Ms=a(7322),cs=a(7238),Ns=a(3988),fo=a(72),Za=a(2290),Ks=a(727),Qa=a(9841),Ao=a(2805),ga=a(515),Zs=a(4482),Qs=a(5032),Us=a(5403),Ja=a(8421),Js=a(3900),Kl=a(1005),qa=a(8746),Zi=a(4004);function Zl(v,xe){if(1&v&&r._UZ(0,"div",6),2&v){const h=r.oxw(2);r.Udp("box-shadow","0 0 10px "+h.color+", 0 0 5px "+h.color)}}function Wu(v,xe){if(1&v&&(r.TgZ(0,"div",7),r._UZ(1,"div",8),r.qZA()),2&v){const h=r.oxw(2);r.xp6(1),r.Udp("border-top-color",h.color)("border-left-color",h.color)}}function Yu(v,xe){if(1&v&&(r.ynx(0),r.TgZ(1,"div",1)(2,"div",2)(3,"div",3),r.YNc(4,Zl,1,2,"div",4),r.qZA()(),r.YNc(5,Wu,2,4,"div",5),r.qZA(),r.BQk()),2&v){const h=xe.$implicit,A=r.oxw();r.xp6(1),r.Udp("transition","opacity "+A.speed+"ms "+A.ease),r.uIk("active",h.active),r.xp6(2),r.Udp("transform",h.transform)("background-color",A.color)("transition",h.active?"all "+A.speed+"ms "+A.ease:"none"),r.xp6(1),r.Q6J("ngIf",A.meteor),r.xp6(1),r.Q6J("ngIf",A.spinner)}}class $u{constructor(xe,h){this._onDestroyCallback=h,this._started=new ne.x,this.started=this._started.pipe((0,o.h)(()=>!this.isStarted)),this._completed=new ne.x,this.completed=this._completed.pipe((0,o.h)(()=>this.isStarted)),this._trickling=new ne.x,this._worker=Ks.w0.EMPTY,this._state=new ee.X({active:!1,value:0}),this._config=new ee.X(xe),this.state=this._state.asObservable(),this.config=this._config.asObservable(),this._worker=(0,Qa.a)([this._trickling,this._config]).pipe(function ma(v){return(0,Zs.e)((xe,h)=>{let A=!1,ce=null,je=null;const It=()=>{if(null==je||je.unsubscribe(),je=null,A){A=!1;const Ht=ce;ce=null,h.next(Ht)}};xe.subscribe((0,Us.x)(h,Ht=>{null==je||je.unsubscribe(),A=!0,ce=Ht,je=(0,Us.x)(h,It,Qs.Z),(0,Ja.Xf)(v(Ht)).subscribe(je)},()=>{It(),h.complete()},void 0,()=>{ce=je=null}))})}(([A,ce])=>(0,Ao.H)(A?ce.debounceTime:0)),(0,Js.w)(([A,ce])=>A?this.onTrickling(ce):this.onComplete(ce))).subscribe()}get snapshot(){return this._state.value}get isStarted(){return this.snapshot.active}start(){this._started.next(),this._trickling.next(!0)}complete(){this._trickling.next(!1)}inc(xe){const h=this.snapshot.value;this.isStarted?("number"!=typeof xe&&(xe=this._config.value.trickleFunc(h)),this.set(h+xe)):this.start()}set(xe){this.setState({value:this.clamp(xe),active:!0})}setConfig(xe){this._config.next(Object.assign(Object.assign({},this._config.value),xe))}destroy(){this._worker.unsubscribe(),this._trickling.complete(),this._state.complete(),this._config.complete(),this._started.complete(),this._completed.complete(),this._onDestroyCallback()}setState(xe){this._state.next(Object.assign(Object.assign({},this.snapshot),xe))}clamp(xe){return Math.max(this._config.value.min,Math.min(this._config.value.max,xe))}onTrickling(xe){return this.isStarted||this.set(this._config.value.min),(0,Ao.H)(0,xe.trickleSpeed).pipe((0,M.b)(()=>this.inc()))}onComplete(xe){return this._completed.next(),this.isStarted?(0,u.of)({}).pipe((0,M.b)(()=>this.setState({value:100})),(0,Kl.g)(1.7*xe.speed),(0,M.b)(()=>this.setState({active:!1})),(0,Kl.g)(xe.speed),(0,qa.x)(()=>this.setState({value:0})),(0,ut.R)(this._started)):ga.E}}const Ql=new r.OlP("ngProgressConfig"),Jl={min:8,max:100,speed:200,debounceTime:0,trickleSpeed:300,fixed:!0,meteor:!0,thick:!1,spinner:!0,ease:"linear",color:"#1B95E0",direction:"ltr+",spinnerPosition:"right",trickleFunc:v=>v>=0&&v<20?10:v>=20&&v<50?4:v>=50&&v<80?2:v>=80&&v<99?.5:0};let ql=(()=>{class v{constructor(h){this._instances=new Map,this.config=h?Object.assign(Object.assign({},Jl),h):Jl}ref(h="root",A){if(this._instances.has(h)){const ce=this._instances.get(h);return A&&ce.setConfig(Object.assign(Object.assign({},this.config),A)),ce}{const ce=new $u(Object.assign(Object.assign({},this.config),A),this.deleteInstance(h));return this._instances.set(h,ce).get(h)}}destroyAll(){this._instances.forEach(h=>h.destroy())}deleteInstance(h){return()=>{this._instances.delete(h)}}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Ql,8))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})(),po=(()=>{class v{constructor(h){this._ngProgress=h,this.id="root",this.min=this._ngProgress.config.min,this.max=this._ngProgress.config.max,this.ease=this._ngProgress.config.ease,this.color=this._ngProgress.config.color,this.speed=this._ngProgress.config.speed,this.thick=this._ngProgress.config.thick,this.fixed=this._ngProgress.config.fixed,this.meteor=this._ngProgress.config.meteor,this.spinner=this._ngProgress.config.spinner,this.trickleSpeed=this._ngProgress.config.trickleSpeed,this.debounceTime=this._ngProgress.config.debounceTime,this.trickleFunc=this._ngProgress.config.trickleFunc,this.spinnerPosition=this._ngProgress.config.spinnerPosition,this.direction=this._ngProgress.config.direction,this.started=new r.vpe,this.completed=new r.vpe}get isStarted(){var h;return null===(h=this.progressRef)||void 0===h?void 0:h.isStarted}ngOnChanges(){var h;null===(h=this.progressRef)||void 0===h||h.setConfig({max:this.max>0&&this.max<=100?this.max:100,min:this.min<100&&this.min>=0?this.min:0,speed:this.speed,trickleSpeed:this.trickleSpeed,trickleFunc:this.trickleFunc,debounceTime:this.debounceTime})}ngOnInit(){this.progressRef=this._ngProgress.ref(this.id,{max:this.max,min:this.min,speed:this.speed,trickleSpeed:this.trickleSpeed,debounceTime:this.debounceTime}),this.state$=this.progressRef.state.pipe((0,Zi.U)(h=>({active:h.active,transform:`translate3d(${h.value}%,0,0)`}))),this.started.observed&&(this._started=this.progressRef.started.subscribe(()=>this.started.emit())),this.completed.observed&&(this._completed=this.progressRef.completed.subscribe(()=>this.completed.emit()))}ngOnDestroy(){var h,A,ce;null===(h=this._started)||void 0===h||h.unsubscribe(),null===(A=this._completed)||void 0===A||A.unsubscribe(),null===(ce=this.progressRef)||void 0===ce||ce.destroy()}start(){this.progressRef.start()}complete(){this.progressRef.complete()}inc(h){this.progressRef.inc(h)}set(h){this.progressRef.set(h)}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(ql))},v.\u0275cmp=r.Xpm({type:v,selectors:[["ng-progress"]],hostAttrs:["role","progressbar"],hostVars:4,hostBindings:function(h,A){2&h&&r.uIk("spinnerPosition",A.spinnerPosition)("direction",A.direction)("thick",A.thick)("fixed",A.fixed)},inputs:{id:"id",min:"min",max:"max",ease:"ease",color:"color",speed:"speed",thick:"thick",fixed:"fixed",meteor:"meteor",spinner:"spinner",trickleSpeed:"trickleSpeed",debounceTime:"debounceTime",trickleFunc:"trickleFunc",spinnerPosition:"spinnerPosition",direction:"direction"},outputs:{started:"started",completed:"completed"},features:[r.TTD],decls:2,vars:3,consts:[[4,"ngIf"],[1,"ng-progress-bar"],[1,"ng-bar-placeholder"],[1,"ng-bar"],["class","ng-meteor",3,"boxShadow",4,"ngIf"],["class","ng-spinner",4,"ngIf"],[1,"ng-meteor"],[1,"ng-spinner"],[1,"ng-spinner-icon"]],template:function(h,A){1&h&&(r.YNc(0,Yu,6,11,"ng-container",0),r.ALo(1,"async")),2&h&&r.Q6J("ngIf",r.lcZ(1,1,A.state$))},directives:[O.O5],pipes:[O.Ov],styles:['[_nghost-%COMP%]{z-index:999999;pointer-events:none}[fixed=true][_nghost-%COMP%] .ng-progress-bar[_ngcontent-%COMP%], [fixed=true][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{position:fixed}[fixed=true][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{top:15px}[fixed=true][spinnerPosition=left][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{left:15px}[fixed=true][spinnerPosition=right][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{right:15px}[thick=true][_nghost-%COMP%] .ng-spinner-icon[_ngcontent-%COMP%]{width:24px;height:24px;border-width:3px}[thick=true][_nghost-%COMP%] .ng-bar-placeholder[_ngcontent-%COMP%]{height:3px!important}[direction="ltr+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=ltr-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(3deg)}[direction="ltr+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=ltr-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(4deg)}[direction="ltr+"][_nghost-%COMP%] .ng-bar[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-bar[_ngcontent-%COMP%]{margin-left:-100%}[direction="ltr+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{right:0}[direction="ltr+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{top:-3px}[direction="ltr+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{top:-4px}[direction=ltr-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{bottom:-3px}[direction=ltr-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction="rtl+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{bottom:-4px}[direction=ltr-][_nghost-%COMP%] .ng-bar-placeholder[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-bar-placeholder[_ngcontent-%COMP%]{transform:rotate(180deg)}[direction=ltr-][_nghost-%COMP%] .ng-spinner-icon[_ngcontent-%COMP%], [direction="rtl+"][_nghost-%COMP%] .ng-spinner-icon[_ngcontent-%COMP%]{animation-directionection:reverse}[direction="rtl+"][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(-3deg)}[direction="rtl+"][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%], [direction=rtl-][thick=true][_nghost-%COMP%] .ng-meteor[_ngcontent-%COMP%]{transform:rotate(-4deg)}[spinnerPosition=left][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{left:10px}[spinnerPosition=right][_nghost-%COMP%] .ng-spinner[_ngcontent-%COMP%]{right:10px}.ng-progress-bar[_ngcontent-%COMP%]{position:relative;z-index:999999;top:0;left:0;width:100%;transform:scale(1);filter:alpha(opacity=0);opacity:0}.ng-progress-bar[active=true][_ngcontent-%COMP%]{filter:alpha(opacity=100);opacity:1;transition:none}.ng-bar-placeholder[_ngcontent-%COMP%]{position:absolute;height:2px;width:100%}.ng-bar[_ngcontent-%COMP%]{width:100%;height:100%;transform:translate(-100%,0,0)}.ng-meteor[_ngcontent-%COMP%]{display:block;position:absolute;width:100px;height:100%;opacity:1}.ng-spinner[_ngcontent-%COMP%]{position:absolute;display:block;z-index:1031;top:10px}.ng-spinner-icon[_ngcontent-%COMP%]{width:18px;height:18px;box-sizing:border-box;-webkit-animation:spinner-animation .25s linear infinite;animation:spinner-animation .25s linear infinite;border:2px solid transparent;border-radius:50%}@-webkit-keyframes spinner-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spinner-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}'],changeDetection:0}),v})(),Ku=(()=>{class v{static withConfig(h){return{ngModule:v,providers:[{provide:Ql,useValue:h}]}}}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[O.ez]]}),v})();const or=new r.OlP("ngProgressHttpConfig");let _a=(()=>{class v{constructor(h,A){this.ngProgress=h,this._inProgressCount=0,this._config={id:"root",silentApis:[],matcher:void 0},this._config=A?Object.assign(Object.assign({},this._config),A):this._config}intercept(h,A){return h.headers.has("ignoreProgressBar")?A.handle(h.clone({headers:h.headers.delete("ignoreProgressBar")})):this.checkUrl(h)?A.handle(h):(this._inProgressCount++,this._progressRef=this.ngProgress.ref(this._config.id),this._progressRef.isStarted||this._progressRef.start(),A.handle(h).pipe((0,qa.x)(()=>{this._inProgressCount--,0===this._inProgressCount&&this._progressRef.complete()})))}checkUrl(h){var A,ce;const je=h.url.toLowerCase();return this._config.matcher&&(null===(A=this._config.silentApis)||void 0===A?void 0:A.length)?Xl(je,this._config.matcher)&&qs(je,this._config.silentApis):(null===(ce=this._config.silentApis)||void 0===ce?void 0:ce.length)?qs(je,this._config.silentApis):!!this._config.matcher&&Xl(je,this._config.matcher)}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(ql),r.LFG(or,8))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac}),v})();function qs(v,xe){return!!xe.find(h=>v.includes(h.toLowerCase()))}function Xl(v,xe){return!!v.match(xe)}let ec=(()=>{class v{static withConfig(h){return{ngModule:v,providers:[{provide:or,useValue:h}]}}}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({providers:[{provide:l.TP,useClass:_a,multi:!0}]}),v})();var Qr=a(6493),Lr=a(6271),Ui=a(8406),Ar=a(4249),ws=a(2777),Xa=a(5094);const tc=[{path:"",pathMatch:"full",redirectTo:"home"},{path:"admin-mod",loadChildren:()=>Promise.all([a.e(471),a.e(345),a.e(592),a.e(438)]).then(a.bind(a,4438)).then(v=>v.AdminModule),canActivate:[ws.t],data:{title:"Admin & Moderator Panel Management",description:"Halaman Khusus Untuk Administrasi & Moderasi",keywords:"Admin Moderator Fansub Database",[Lr.t.decoratorRoles]:[Ar.yS.ADMIN,Ar.yS.MODERATOR]}},{path:"create",loadChildren:()=>Promise.all([a.e(345),a.e(592),a.e(241)]).then(a.bind(a,4241)).then(v=>v.CreateModule),canActivate:[ws.t],data:{title:"Membuat Konten Baru",description:"Membuat Konten Baru",keywords:"Add New Content",[Lr.t.decoratorRoles]:[Ar.yS.ADMIN,Ar.yS.MODERATOR,Ar.yS.FANSUBBER,Ar.yS.USER]}},{path:"login",loadChildren:()=>a.e(146).then(a.bind(a,8146)).then(v=>v.LoginModule),data:{title:"Masuk",description:"Halaman Login",keywords:"Login"}},{path:"register",loadChildren:()=>Promise.all([a.e(592),a.e(839)]).then(a.bind(a,3839)).then(v=>v.RegisterModule),data:{title:"Pendaftaran",description:"Halaman Pembuatan Akun Baru",keywords:"Register"}},{path:"reset-password",loadChildren:()=>Promise.all([a.e(592),a.e(960)]).then(a.bind(a,5960)).then(v=>v.ResetPasswordModule),data:{title:"Reset Akun",description:"Halaman Atur Ulang Kata Sandi",keywords:"Reset Password"}},{path:"privacy-policy",loadChildren:()=>a.e(772).then(a.bind(a,5772)).then(v=>v.PrivacyPolicyModule),data:{title:"Privacy Policy",description:"Halaman Kebijakan Privasi",keywords:"privacy-policy"}},{path:"verify",loadChildren:()=>Promise.all([a.e(592),a.e(628)]).then(a.bind(a,7628)).then(v=>v.VerifyModule),canActivate:[ws.t],data:{title:"Verifikasi",description:"Halaman Verifikasi Akun",keywords:"Verify",[Lr.t.decoratorRoles]:[Ar.yS.ADMIN,Ar.yS.MODERATOR,Ar.yS.FANSUBBER,Ar.yS.USER]}},{path:"home",loadChildren:()=>Promise.all([a.e(592),a.e(915)]).then(a.bind(a,2915)).then(v=>v.HomeModule),data:{title:"Beranda",description:"Halaman Beranda",keywords:"Beranda"}},{path:"news",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(345),a.e(592),a.e(108)]).then(a.bind(a,6108)).then(v=>v.NewsModule),data:{title:"Berita & Informasi",description:"Papan Pengumuman",keywords:"News"}},{path:"mailbox",loadChildren:()=>Promise.all([a.e(471),a.e(592),a.e(297)]).then(a.bind(a,2297)).then(v=>v.MailboxModule),canActivate:[ws.t,Xa.H],data:{title:"Surat Elektronik",description:"E-Mail & DM's",keywords:"Surel Email DM",[Lr.t.decoratorRoles]:[Ar.yS.ADMIN,Ar.yS.MODERATOR,Ar.yS.FANSUBBER,Ar.yS.USER],[Lr.t.decoratorVerifiedOnly]:!0}},{path:"nihongo",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(345),a.e(592),a.e(750)]).then(a.bind(a,6750)).then(v=>v.NihongoModule),data:{title:"Belajar Bahasa Jepang",description:"Jejepangan Lebih Seru Dengan Bahasa Aslinya",keywords:"Bahasa Jepang"}},{path:"berkas",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(345),a.e(268),a.e(219),a.e(592),a.e(330)]).then(a.bind(a,2330)).then(v=>v.BerkasModule),data:{title:"Semua Berkas",description:"Kelola Arsip Berkas",keywords:"Berkas File"}},{path:"anime",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(268),a.e(925),a.e(32)]).then(a.bind(a,32)).then(v=>v.AnimeModule),data:{title:"List Anime & Garapan Musiman",description:"Daftar Isi Anime Musiman Yang Baru Saja Rilis Subtitle Indonesianya",keywords:"Anime Subtitle Indonesia"}},{path:"dorama",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(268),a.e(925),a.e(469)]).then(a.bind(a,8469)).then(v=>v.DoramaModule),data:{title:"List Dorama & Garapan Musiman",description:"Daftar Isi Dorama Musiman Yang Baru Saja Rilis Subtitle Indonesianya",keywords:"Dorama Subtitle Indonesia"}},{path:"fansub",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(345),a.e(268),a.e(219),a.e(478)]).then(a.bind(a,8478)).then(v=>v.FansubModule),data:{title:"Katalog Informasi Seluruh Fansub Indonesia",description:"Daftar Isi Seluruh Fansub Indonesia",keywords:"Fansub Indonesia"}},{path:"about",loadChildren:()=>a.e(180).then(a.bind(a,2180)).then(v=>v.AboutModule),data:{title:"About",description:"Halaman Mengenai Website",keywords:"About"}},{path:"user",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(345),a.e(268),a.e(219),a.e(794)]).then(a.bind(a,2794)).then(v=>v.UserModule),data:{title:"User Profile",description:"Halaman Informasi Pengguna",keywords:"User"}},{path:"rss-feed",loadChildren:()=>Promise.all([a.e(471),a.e(847),a.e(592),a.e(229)]).then(a.bind(a,229)).then(v=>v.RssFeedModule),data:{title:"Loper Koran RSS Feed",description:"Halaman Rangkuman Berita Acara Fansub Indonesia",keywords:"RSS Feed"}},{path:"torrent",loadChildren:()=>Promise.all([a.e(592),a.e(58)]).then(a.bind(a,4058)).then(v=>v.TorrentModule),data:{title:"Web-SocketRTC Torrent",description:"Halaman Peer-to-Peer Berbagi Berkas",keywords:"Web Torrent"}},{path:"docs",loadChildren:()=>Promise.all([a.e(592),a.e(938)]).then(a.bind(a,7938)).then(v=>v.DocsModule),data:{title:"Developers Documentation",description:"For Developers Only",keywords:"Domain & API Keys"}},{path:"error",loadChildren:()=>a.e(129).then(a.bind(a,8129)).then(v=>v.NotFoundModule),data:{title:"Error - 404",description:"Whoops! Halaman Tidak Ditemukan",keywords:"404 - Not Found"}},{path:"**",redirectTo:"error"}];let nc=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[Ui.Bz.forRoot(tc,{initialNavigation:"enabledBlocking",scrollPositionRestoration:"enabled",relativeLinkResolution:"corrected"})],Ui.Bz]}),v})(),Zu=(()=>{class v extends n.hm{constructor(){super(...arguments),this.overrides={pinch:{enable:!1},rotate:{enable:!1}}}}return v.\u0275fac=function(){let xe;return function(A){return(xe||(xe=r.n5z(v)))(A||v)}}(),v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();const Qu={showDelay:250,hideDelay:0,touchendHideDelay:0,touchGestures:"off"};var Hs=a(210),Qi=a(8696),Xs=a(3e3);let eo=(()=>{class v{constructor(h,A){this.gs=h,this.bs=A}intercept(h,A){return A.handle(h).pipe((0,ut.R)(this.bs.onCancelPendingRequests))}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Qi.U),r.LFG(Xs.z))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac}),v})();var ar=a(5934),to=a(8381),To=a(4137);let ic=(()=>{class v{constructor(h,A,ce){this.gs=h,this.ss=A,this.as=ce}intercept(h,A){var ce;const je=h.url,It=je.startsWith(ar.N.baseUrl)||je.startsWith(ar.N.apiUrl);if(this.gs.isBrowser&&It){if(h=h.clone({withCredentials:!this.gs.isDevMode}),this.as.token){const Ht=this.as.token.length,Un=this.as.token.slice(0,5)+"....."+this.as.token.slice(Ht-5,Ht);this.gs.log("[INTERCEPT_JWT]",Un),h=h.clone({headers:h.headers.append("Authorization",`Bearer ${this.as.token}`)})}(null===(ce=this.ss.mySocket)||void 0===ce?void 0:ce.id)&&(this.gs.log("[INTERCEPT_SOCKET]",this.ss.mySocket.id),h=h.clone({headers:h.headers.append("x-socket-id",this.ss.mySocket.id)}))}return A.handle(h)}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Qi.U),r.LFG(to.R),r.LFG(To.e))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac}),v})();var rc=a(262),sc=a(2843),oc=a(6925),go=a(3379);let va=(()=>{class v{constructor(h,A,ce,je,It,Ht,Un,Di){this.gs=h,this.router=A,this.as=ce,this.toast=je,this.bs=It,this.ss=Ht,this.ls=Un,this.activatedRoute=Di}intercept(h,A){return A.handle(h).pipe((0,M.b)(ce=>{if(ce instanceof l.Zn&&this.gs.isBrowser){let je="UwUu~ Berhasil~",It="Yeay, Selesai!";switch(ce&&ce.body&&(ce.body.info&&(It=ce.body.info),ce.body.result&&ce.body.result.message&&(je=ce.body.result.message)),ce.status){case 200:this.toast.success(je,It);break;case 201:case 202:this.toast.info(je,It);break;default:this.toast.warning(je,It)}if("GET"===h.method){this.gs.log("[SOCKET_TRACK-SET]",h.url);let Ht=h.url;Ht.startsWith(ar.N.baseUrl)&&(Ht=Ht.slice(ar.N.baseUrl.length)),Ht.startsWith(ar.N.apiUrl)&&(Ht=Ht.slice(ar.N.apiUrl.length)),this.ss.socketEmitVolatile("track-set",{pathUrl:Ht.split("?")[0]})}}}),(0,rc.K)(ce=>{var je;if(this.gs.log(`[INTERCEPT_ERROR-${ce.status}]`,ce.statusText),this.gs.isBrowser){let It="Terjadi Kesalahan Pada Jaringan~",Ht="Whoops, Server Sibuk T.T";switch(ce&&ce.error&&(ce.error.info&&(Ht=ce.error.info),ce.error.result&&ce.error.result.message&&(It=ce.error.result.message)),this.toast.error(It,Ht,null,!0),ce.status){case 401:this.as.removeUser(),this.ls.clear(),this.bs.idle(),this.router.navigate(["/login"],{queryParams:{returnUrl:this.router.url.split("?")[0]||"/"}});break;case 404:this.bs.idle(),this.router.navigate(["/error"],{queryParams:{returnUrl:(null===(je=this.activatedRoute.snapshot.parent)||void 0===je?void 0:je.url)||"/"}});break;case 418:this.bs.idle(),this.router.navigate(["/verify"],{queryParams:{returnUrl:this.router.url.split("?")[0]||"/"}})}}return(0,sc._)(()=>ce.error)}))}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Qi.U),r.LFG(Ui.F0),r.LFG(To.e),r.LFG(oc.k),r.LFG(Xs.z),r.LFG(to.R),r.LFG(go.n),r.LFG(Ui.gz))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac}),v})();var So=a(5861),Hi=a(1777);const mo=(0,Hi.X$)("onSideNavChange",[(0,Hi.SB)("close",(0,Hi.oB)({"min-width":"50px"})),(0,Hi.SB)("open",(0,Hi.oB)({"min-width":"200px"})),(0,Hi.eR)("close => open",(0,Hi.jt)("250ms ease-in")),(0,Hi.eR)("open => close",(0,Hi.jt)("250ms ease-out"))]),ya=(0,Hi.X$)("onMainContentChange",[(0,Hi.SB)("close",(0,Hi.oB)({"margin-left":"62px"})),(0,Hi.SB)("open",(0,Hi.oB)({"margin-left":"200px"})),(0,Hi.eR)("close => open",(0,Hi.jt)("250ms ease-in")),(0,Hi.eR)("open => close",(0,Hi.jt)("250ms ease-out"))]),Oo=(0,Hi.X$)("animateText",[(0,Hi.SB)("hide",(0,Hi.oB)({display:"none",opacity:0})),(0,Hi.SB)("show",(0,Hi.oB)({display:"block",opacity:1})),(0,Hi.eR)("close => open",(0,Hi.jt)("350ms ease-in")),(0,Hi.eR)("open => close",(0,Hi.jt)("200ms ease-out"))]);var el=a(8745),tl=a(6382),ba=a(7),Ro=a(7814),nl=a(8020),no=a(7845),il=a(9775);let ac=(()=>{class v{constructor(h){this.gs=h,this.currentViewer=null}viewImage(h){this.currentViewer=new Viewer(h,{url:"src",navbar:!1,title:!0,toolbar:{zoomIn:!0,zoomOut:!0,oneToOne:!0,reset:!0,prev:!1,play:{show:!1,size:"large"},next:!1,rotateLeft:!0,rotateRight:!0,flipHorizontal:!0,flipVertical:!0},ready:A=>{this.gs.log("[VIEWERJS]",A.type),this.currentViewer.show()},show:A=>{this.gs.log("[VIEWERJS]",A.type)},shown:A=>{this.gs.log("[VIEWERJS]",A.type)},view:A=>{this.gs.log("[VIEWERJS]",A.type)},viewed:A=>{this.gs.log("[VIEWERJS]",A.type)},move:A=>{this.gs.log("[VIEWERJS]",A.type)},moved:A=>{this.gs.log("[VIEWERJS]",A.type)},rotate:A=>{this.gs.log("[VIEWERJS]",A.type)},rotated:A=>{this.gs.log("[VIEWERJS]",A.type)},scale:A=>{this.gs.log("[VIEWERJS]",A.type)},scaled:A=>{this.gs.log("[VIEWERJS]",A.type)},play:A=>{this.gs.log("[VIEWERJS]",A.type)},stop:A=>{this.gs.log("[VIEWERJS]",A.type)},hide:A=>{this.gs.log("[VIEWERJS]",A.type)},zoom:A=>{this.gs.log("[VIEWERJS]",A.type)},zoomed:A=>{this.gs.log("[VIEWERJS]",A.type)},hidden:A=>{this.gs.log("[VIEWERJS]",A.type),this.currentViewer.destroy(),this.currentViewer=null}})}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Qi.U))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})();var Cr=a(4594),Ca=a(7423),Io=a(5245),xa=a(508),io=a(7544);function lc(v,xe){if(1&v&&(r.TgZ(0,"button",12)(1,"mat-icon",13),r._uU(2,"sports_score"),r.qZA(),r._uU(3),r.qZA()),2&v){const h=r.oxw();r.xp6(3),r.hij(" ",h.myPoints," ")}}function cc(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"button",14),r.NdJ("click",function(){return r.CHM(h),r.oxw().toggleWeather()}),r.TgZ(1,"mat-icon"),r._uU(2,"filter_vintage"),r.qZA()()}}function dc(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"button",15),r.NdJ("click",function(){return r.CHM(h),r.oxw().openAdminNavigation()}),r.TgZ(1,"mat-icon"),r._uU(2,"apps"),r.qZA()()}}function Po(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"button",16),r.NdJ("click",function(){return r.CHM(h),r.oxw().reloadPage()}),r.TgZ(1,"mat-icon"),r._uU(2,"replay"),r.qZA()()}}let _o=(()=>{class v{constructor(h,A,ce,je,It,Ht,Un,Di,Tr){this.snackBar=h,this.lms=A,this.rps=ce,this.router=je,this.pi=It,this.gs=Ht,this.ss=Un,this.bs=Di,this.ls=Tr,this.myPoints=0,this.subsGlobalRoom=null}get GS(){return this.gs}get ROUTER(){return this.router}get PI(){return this.pi}get SS(){return this.ss}ngOnInit(){if(this.gs.isBrowser){const h=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;this.gs.isDarkMode=h||"true"===this.ls.getItem(this.gs.localStorageKeys.DarkMode),this.toggleDarkTheme(!0),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",A=>{this.gs.isDarkMode=A.matches,this.toggleDarkTheme(!0)}),this.subsGlobalRoom=this.ss.globalRoom.subscribe({next:A=>{var ce,je;this.myPoints=(null===(je=null===(ce=null==A?void 0:A.member_list[this.ss.mySocket.id])||void 0===ce?void 0:ce.profile_)||void 0===je?void 0:je.points)||0}})}}ngOnDestroy(){var h;null===(h=this.subsGlobalRoom)||void 0===h||h.unsubscribe()}get discordUrl(){return ar.N.discord.join_url}toggleSideNav(){this.lms.onSideNavToggleView()}toggleWeather(){this.gs.weatherToggle(),this.snackBar.open(`Berhasil ${this.gs.weatherRunning?"Menyalakan":"Mematikan"} Efek Musiman`,"Ok")}reloadPage(){this.bs.busy(),window.location.reload()}openSearch(){this.rps.toggleSidePanel("SearchAllComponent")}openLiveChat(){this.rps.toggleSidePanel("LiveChatComponent")}openAdminNavigation(){this.rps.toggleSidePanel("AdminNavigationComponent")}toggleDarkTheme(h=!1){this.gs.toggleDarkTheme(h),this.ls.setItem(this.gs.localStorageKeys.DarkMode,JSON.stringify(this.gs.isDarkMode)),this.pi.updateStatusBarTheme(this.gs.isDarkMode),this.snackBar.open("Menggunakan Mode "+(this.gs.isDarkMode?"Gelap":"Terang"),"Ok")}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(ns.ux),r.Y36(ba.S),r.Y36(Ro.C),r.Y36(Ui.F0),r.Y36(el.Z),r.Y36(Qi.U),r.Y36(to.R),r.Y36(Xs.z),r.Y36(go.n))},v.\u0275cmp=r.Xpm({type:v,selectors:[["app-header"]],decls:20,vars:7,consts:[["color","primary",2,"height","56px","padding","0 12px"],["mat-icon-button","","matTooltip","Menu",3,"click"],["matLine","",1,"text-truncate",2,"margin-left","1rem","margin-right","1rem"],[1,"spacer"],["mat-stroked-button","","matTooltip","Points",4,"ngIf"],["class","animate__animated animate__tada animate__infinite animate__slower","mat-icon-button","","matTooltip","Weather Effect",3,"click",4,"ngIf"],["mat-icon-button","","matTooltip","Ganti Warna",1,"animate__animated","animate__flash","animate__infinite","animate__slower",3,"click"],["mat-icon-button","","matTooltip","Obrolan",3,"click"],["matBadgePosition","before",3,"matBadge","matBadgeColor"],["mat-icon-button","",3,"click",4,"ngIf"],["mat-icon-button","","matTooltip","Pencarian",1,"animate__animated","animate__heartBeat","animate__infinite","animate__slower",3,"click"],["mat-icon-button","","matTooltip","Refresh",3,"click",4,"ngIf"],["mat-stroked-button","","matTooltip","Points"],[1,"me-1"],["mat-icon-button","","matTooltip","Weather Effect",1,"animate__animated","animate__tada","animate__infinite","animate__slower",3,"click"],["mat-icon-button","",3,"click"],["mat-icon-button","","matTooltip","Refresh",3,"click"]],template:function(h,A){1&h&&(r.TgZ(0,"mat-toolbar",0)(1,"button",1),r.NdJ("click",function(){return A.toggleSideNav()}),r.TgZ(2,"mat-icon"),r._uU(3,"menu"),r.qZA()(),r.TgZ(4,"span",2),r._uU(5),r.qZA(),r._UZ(6,"span",3),r.YNc(7,lc,4,1,"button",4),r.YNc(8,cc,3,0,"button",5),r.TgZ(9,"button",6),r.NdJ("click",function(){return A.toggleDarkTheme()}),r.TgZ(10,"mat-icon"),r._uU(11,"nights_stay"),r.qZA()(),r.TgZ(12,"button",7),r.NdJ("click",function(){return A.openLiveChat()}),r.TgZ(13,"mat-icon",8),r._uU(14," forum "),r.qZA()(),r.YNc(15,dc,3,0,"button",9),r.TgZ(16,"button",10),r.NdJ("click",function(){return A.openSearch()}),r.TgZ(17,"mat-icon"),r._uU(18,"search"),r.qZA()(),r.YNc(19,Po,3,0,"button",11),r.qZA()),2&h&&(r.xp6(5),r.hij(" ",A.PI.getTitle," "),r.xp6(2),r.Q6J("ngIf",A.ROUTER.url.includes("/nihongo")),r.xp6(1),r.Q6J("ngIf",A.GS.weatherEffect),r.xp6(5),r.Q6J("matBadge",A.SS.messageChatUnreadCount)("matBadgeColor","warn"),r.xp6(2),r.Q6J("ngIf",A.ROUTER.url.includes("/admin-mod/")),r.xp6(4),r.Q6J("ngIf",!(null!=A.SS.mySocket&&A.SS.mySocket.id)))},directives:[Cr.Ye,Ca.lW,cs.gM,Io.Hw,xa.X2,O.O5,io.k],styles:[""]}),v})();var ko=a(2638),ro=a(4623),uc=a(4834),rl=a(2368);function Da(v,xe){1&v&&r._UZ(0,"div")}function Fo(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"a",12),r.NdJ("click",function(){return r.CHM(h),r.oxw().forceCloseSideNav()}),r._UZ(1,"img",13),r.TgZ(2,"span",14),r._uU(3),r._UZ(4,"br"),r._uU(5),r.qZA()(),r.TgZ(6,"a",15),r.NdJ("click",function(){return r.CHM(h),r.oxw().logout()}),r.TgZ(7,"mat-icon",8),r._uU(8,"power_settings_new"),r.qZA(),r.TgZ(9,"span",9),r._uU(10,"Keluar"),r.qZA()()}if(2&v){const h=r.oxw();r.xp6(1),r.s9C("src",null==h.AS.currentUserSubject||null==h.AS.currentUserSubject.value?null:h.AS.currentUserSubject.value.image_url,r.LSH),r.xp6(1),r.Q6J("@animateText",h.linkText?"show":"hide"),r.xp6(1),r.hij(" ",null==h.AS.currentUserSubject||null==h.AS.currentUserSubject.value?null:h.AS.currentUserSubject.value.kartu_tanda_penduduk_.nama," "),r.xp6(2),r.hij(" ",null==h.AS.currentUserSubject||null==h.AS.currentUserSubject.value?null:h.AS.currentUserSubject.value._email," "),r.xp6(4),r.Q6J("@animateText",h.linkText?"show":"hide")}}function sl(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"a",16),r.NdJ("click",function(){return r.CHM(h),r.oxw().forceCloseSideNav()}),r.TgZ(1,"mat-icon",8),r._uU(2,"login"),r.qZA(),r.TgZ(3,"span",9),r._uU(4,"Masuk"),r.qZA()(),r.TgZ(5,"a",17),r.NdJ("click",function(){return r.CHM(h),r.oxw().forceCloseSideNav()}),r.TgZ(6,"mat-icon",8),r._uU(7,"group_add"),r.qZA(),r.TgZ(8,"span",9),r._uU(9,"Daftar"),r.qZA()()}if(2&v){const h=r.oxw();r.xp6(3),r.Q6J("@animateText",h.linkText?"show":"hide"),r.xp6(5),r.Q6J("@animateText",h.linkText?"show":"hide")}}function hc(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"a",18),r.NdJ("click",function(){return r.CHM(h),r.oxw().forceCloseSideNav()}),r.TgZ(1,"mat-icon",19),r._uU(2),r.qZA(),r.TgZ(3,"span",9),r._uU(4),r.qZA()()}if(2&v){const h=xe.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("matBadge",h.badge),r.xp6(1),r.Oqu(h.icon),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}function fc(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"a",18),r.NdJ("click",function(){return r.CHM(h),r.oxw().forceCloseSideNav()}),r.TgZ(1,"mat-icon",19),r._uU(2),r.qZA(),r.TgZ(3,"span",9),r._uU(4),r.qZA()()}if(2&v){const h=xe.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("matBadge",h.badge),r.xp6(1),r.Oqu(h.icon),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}function so(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"a",18),r.NdJ("click",function(){return r.CHM(h),r.oxw().forceCloseSideNav()}),r.TgZ(1,"mat-icon",19),r._uU(2),r.qZA(),r.TgZ(3,"span",9),r._uU(4),r.qZA()()}if(2&v){const h=xe.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("matBadge",h.badge),r.xp6(1),r.Oqu(h.icon),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}function vo(v,xe){if(1&v){const h=r.EpF();r.TgZ(0,"a",18),r.NdJ("click",function(){return r.CHM(h),r.oxw().forceCloseSideNav()}),r.TgZ(1,"mat-icon",19),r._uU(2),r.qZA(),r.TgZ(3,"span",9),r._uU(4),r.qZA()()}if(2&v){const h=xe.$implicit,A=r.oxw();r.s9C("routerLink",h.link),r.xp6(1),r.Q6J("matBadge",h.badge),r.xp6(1),r.Oqu(h.icon),r.xp6(1),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(1),r.Oqu(h.name)}}const pc=function(v){return{"overflow-y":v}};let Ju=(()=>{class v{constructor(h,A,ce,je,It,Ht){this.router=h,this.lms=A,this.as=ce,this.gs=je,this.ds=It,this.ls=Ht,this.subsDialog=null}get AS(){return this.as}get GS(){return this.gs}get mainMenus(){return this.lms.mainMenus}get contentMenus(){return this.lms.contentMenus}get miscMenus(){return this.lms.miscMenus}get otherMenus(){return this.lms.otherMenus}ngOnDestroy(){var h;null===(h=this.subsDialog)||void 0===h||h.unsubscribe()}ngOnInit(){}get sideNavExpanded(){return this.lms.sideNavExpanded}get linkText(){return this.lms.linkText}onMouseHoverIn(){this.gs.isDesktop&&this.lms.onMouseHoverIn()}onMouseHoverOut(){this.gs.isDesktop&&this.lms.onMouseHoverOut()}forceCloseSideNav(){this.lms.forceCloseSideNav()}logout(){this.as.logout()}openDocumentation(){this.forceCloseSideNav(),this.router.navigateByUrl("/docs")}openWebTorrent(){this.forceCloseSideNav(),this.gs.isDesktop?this.router.navigateByUrl("/torrent"):this.subsDialog=this.ds.openInfoDialog({data:{title:".: Web-Torrent :.",htmlMessage:"Fitur Ini Tergolong Cukup Berat Karena Dikhususkan Untuk Pengguna Desktop, Akan Ada Kemungkinan Juga Tampilan Menjadi Berantakan, Yakin Ingin Melanjutkan ?",confirmText:"Ya, Lanjutkan",cancelText:"Tidak, Batal"},disableClose:!1}).afterClosed().subscribe({next:h=>{this.gs.log("[INFO_DIALOG_CLOSED]",h),!0===h&&this.router.navigateByUrl("/torrent"),this.subsDialog.unsubscribe()}})}toggleDebugLog(h){this.gs.forceEnableDebugLog=h.checked,this.ls.setItem(this.gs.localStorageKeys.DebugLogs,JSON.stringify(h.checked))}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(Ui.F0),r.Y36(ba.S),r.Y36(To.e),r.Y36(Qi.U),r.Y36(no.x),r.Y36(go.n))},v.\u0275cmp=r.Xpm({type:v,selectors:[["app-left-menu"]],decls:35,vars:14,consts:[[1,"sidenav_container",3,"ngStyle","mouseenter","mouseleave"],["fxLayout","column"],[4,"ngIf","ngIfThen","ngIfElse"],["sudahLogin",""],["belumLogin",""],[2,"margin-top","8px"],["mat-list-item","","routerLinkActive","side-menu-link-active",3,"routerLink","click",4,"ngFor","ngForOf"],["mat-list-item","","routerLinkActive","side-menu-link-active",3,"click"],[2,"padding-left","0.2em"],[2,"padding-left","1.75em","padding-right","0.2em"],[2,"right","1em !important","position","absolute"],[3,"ngModel","ngModelChange","click","change"],["mat-list-item","","routerLink","/user","routerLinkActive","side-menu-link-active",3,"click"],[1,"jim",3,"src"],[1,"text-truncate",2,"padding-left","1.2em","padding-right","0.2em"],["mat-list-item","",3,"click"],["mat-list-item","","routerLink","/login","routerLinkActive","side-menu-link-active",3,"click"],["mat-list-item","","routerLink","/register","routerLinkActive","side-menu-link-active",3,"click"],["mat-list-item","","routerLinkActive","side-menu-link-active",3,"routerLink","click"],["matBadgeColor","warn","matBadgePosition","before",2,"padding-left","0.2em",3,"matBadge"]],template:function(h,A){if(1&h&&(r.TgZ(0,"div",0),r.NdJ("mouseenter",function(){return A.onMouseHoverIn()})("mouseleave",function(){return A.onMouseHoverOut()}),r.TgZ(1,"div",1)(2,"mat-nav-list"),r.YNc(3,Da,1,0,"div",2),r.YNc(4,Fo,11,5,"ng-template",null,3,r.W1O),r.YNc(6,sl,10,2,"ng-template",null,4,r.W1O),r.qZA(),r._UZ(8,"mat-divider",5),r.TgZ(9,"mat-nav-list"),r.YNc(10,hc,5,5,"a",6),r.qZA(),r._UZ(11,"mat-divider",5),r.TgZ(12,"mat-nav-list"),r.YNc(13,fc,5,5,"a",6),r.qZA(),r._UZ(14,"mat-divider",5),r.TgZ(15,"mat-nav-list")(16,"a",7),r.NdJ("click",function(){return A.openWebTorrent()}),r.TgZ(17,"mat-icon",8),r._uU(18,"sailing"),r.qZA(),r.TgZ(19,"span",9),r._uU(20,"Web Torrent"),r.qZA()(),r.YNc(21,so,5,5,"a",6),r.qZA(),r._UZ(22,"mat-divider",5),r.TgZ(23,"mat-nav-list"),r.YNc(24,vo,5,5,"a",6),r.qZA(),r._UZ(25,"mat-divider",5),r.TgZ(26,"mat-nav-list")(27,"a",7),r.NdJ("click",function(){return A.openDocumentation()}),r.TgZ(28,"mat-icon",8),r._uU(29,"settings_ethernet"),r.qZA(),r.TgZ(30,"span",9),r._uU(31," Dev. Mode "),r.TgZ(32,"span",10)(33,"mat-slide-toggle",11),r.NdJ("ngModelChange",function(je){return A.GS.forceEnableDebugLog=je})("click",function(je){return je.stopPropagation()})("change",function(je){return A.toggleDebugLog(je)}),r.qZA()()()()(),r._UZ(34,"div",5),r.qZA()()),2&h){const ce=r.MAs(5),je=r.MAs(7);r.Q6J("@onSideNavChange",A.sideNavExpanded?"open":"close")("ngStyle",r.VKq(12,pc,A.sideNavExpanded?"auto":"hidden")),r.xp6(3),r.Q6J("ngIf",null==A.AS.currentUserSubject?null:A.AS.currentUserSubject.value)("ngIfThen",ce)("ngIfElse",je),r.xp6(7),r.Q6J("ngForOf",A.mainMenus),r.xp6(3),r.Q6J("ngForOf",A.contentMenus),r.xp6(6),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(2),r.Q6J("ngForOf",A.miscMenus),r.xp6(3),r.Q6J("ngForOf",A.otherMenus),r.xp6(6),r.Q6J("@animateText",A.linkText?"show":"hide"),r.xp6(3),r.Q6J("ngModel",A.GS.forceEnableDebugLog)}},directives:[O.PC,ro.Hk,O.O5,ro.Tg,Ui.yS,Ui.Od,Io.Hw,uc.d,O.sg,io.k,rl.Rr,wr.JJ,wr.On],styles:[".sidenav_container[_ngcontent-%COMP%]{min-width:64px!important;max-width:320px;height:calc(100vh - 88px)}.jim[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:cover;border-radius:50%}.side-menu-link-active[_ngcontent-%COMP%]{background:rgba(255,64,129,.15);color:#ff4081!important;font-weight:700}.mat-list-item-content[_ngcontent-%COMP%]{padding:0!important}"],data:{animation:[mo,Oo]}}),v})();function ol(v,xe){1&v&&r.GkF(0,4)}let gc=(()=>{class v{constructor(h,A){this.rps=h,this.gs=A}get RPS(){return this.rps}ngOnInit(){}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(Ro.C),r.Y36(Qi.U))},v.\u0275cmp=r.Xpm({type:v,selectors:[["app-right-panel"]],decls:4,vars:1,consts:[[1,"sidepanel_container","p-3"],[1,"row"],[1,"col-12"],["ngIf","rps.component",4,"ngComponentOutlet"],["ngIf","rps.component"]],template:function(h,A){1&h&&(r.TgZ(0,"div",0)(1,"div",1)(2,"div",2),r.YNc(3,ol,1,0,"ng-container",3),r.qZA()()()),2&h&&(r.xp6(3),r.Q6J("ngComponentOutlet",A.RPS.componentView))},directives:[O.$G,O.O5],styles:[".sidepanel_container[_ngcontent-%COMP%]{max-width:320px}.mat-list-item-content[_ngcontent-%COMP%]{padding:0!important}"]}),v})(),qu=(()=>{class v{constructor(h,A){this.fs=h,this.gs=A}ngOnInit(){}get isHidden(){return this.fs.isHidden}get tooltipText(){return this.fs.tooltipText}get backgroundImage(){return this.fs.backgroundImage}get backgroundIcon(){return this.fs.backgroundIcon}buttonClicked(){this.fs.buttonClicked()}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(tl.r),r.Y36(Qi.U))},v.\u0275cmp=r.Xpm({type:v,selectors:[["app-material-fab"]],decls:3,vars:6,consts:[["mat-fab","","color","warn",1,"me-3","mb-5","fab-button","animate__animated","animate__bounce","animate__infinite","animate__slow",3,"matTooltip","click"]],template:function(h,A){1&h&&(r.TgZ(0,"button",0),r.NdJ("click",function(){return A.buttonClicked()}),r.TgZ(1,"mat-icon"),r._uU(2),r.qZA()()),2&h&&(r.Udp("display",A.isHidden?"none":"")("background-image",A.backgroundImage?"url("+A.backgroundImage+")":""),r.s9C("matTooltip",A.tooltipText),r.xp6(2),r.Oqu(A.backgroundIcon))},directives:[Ca.lW,cs.gM,Io.Hw],styles:[".fab-button[_ngcontent-%COMP%]{z-index:9999;position:fixed;bottom:0;right:0;background-size:contain;background-position:center}"]}),v})();function mc(v,xe){1&v&&r.GkF(0)}function _c(v,xe){if(1&v&&(r.ynx(0),r._uU(1),r.BQk()),2&v){const h=r.oxw(2).$implicit;r.xp6(1),r.Oqu(h.label)}}const vc=function(v){return{"xng-breadcrumb-link-disabled":v}},yo=function(v,xe,h,A,ce,je){return{$implicit:v,info:xe,last:h,first:A,index:ce,count:je}};function Ea(v,xe){if(1&v&&(r.TgZ(0,"a",7),r.YNc(1,mc,1,0,"ng-container",8),r.YNc(2,_c,2,1,"ng-container",9),r.qZA()),2&v){const h=r.oxw(),A=h.$implicit,ce=h.last,je=h.first,It=h.index,Ht=h.count,Un=r.oxw();r.Q6J("ngClass",r.VKq(10,vc,A.disable))("routerLink",A.routeInterceptor?A.routeInterceptor(A.routeLink,A):A.routeLink)("queryParams",Un.preserveQueryParams?A.queryParams:void 0)("fragment",Un.preserveFragment?A.fragment:void 0)("target",Un.anchorTarget?Un.anchorTarget:"_self"),r.uIk("aria-disabled",A.disable)("tabIndex",A.disable?-1:0),r.xp6(1),r.Q6J("ngTemplateOutlet",Un.itemTemplate)("ngTemplateOutletContext",r.HTZ(12,yo,A.label,A.info,ce,je,It,Ht)),r.xp6(1),r.Q6J("ngIf",!Un.itemTemplate)}}function oo(v,xe){1&v&&r.GkF(0)}function yc(v,xe){if(1&v&&(r.ynx(0),r._uU(1),r.BQk()),2&v){const h=r.oxw(2).$implicit;r.xp6(1),r.Oqu(h.label)}}function bc(v,xe){if(1&v&&(r.TgZ(0,"label",10),r.YNc(1,oo,1,0,"ng-container",8),r.YNc(2,yc,2,1,"ng-container",9),r.qZA()),2&v){const h=r.oxw(),A=h.$implicit,ce=h.last,je=h.first,It=h.index,Ht=h.count,Un=r.oxw();r.xp6(1),r.Q6J("ngTemplateOutlet",Un.itemTemplate)("ngTemplateOutletContext",r.HTZ(3,yo,A.label,A.info,ce,je,It,Ht)),r.xp6(1),r.Q6J("ngIf",!Un.itemTemplate)}}function Xu(v,xe){1&v&&r.GkF(0)}function Lo(v,xe){if(1&v&&(r.ynx(0),r._uU(1),r.BQk()),2&v){const h=r.oxw(3);r.xp6(1),r.Oqu(h.separator)}}function Ma(v,xe){if(1&v&&(r.TgZ(0,"li",11),r.YNc(1,Xu,1,0,"ng-container",12),r.YNc(2,Lo,2,1,"ng-container",9),r.qZA()),2&v){const h=r.oxw(2);r.xp6(1),r.Q6J("ngTemplateOutlet",h.separatorTemplate),r.xp6(1),r.Q6J("ngIf",!h.separatorTemplate)}}function al(v,xe){if(1&v&&(r.ynx(0),r.TgZ(1,"li",3),r.YNc(2,Ea,3,19,"a",4),r.YNc(3,bc,3,10,"label",5),r.qZA(),r.YNc(4,Ma,3,2,"li",6),r.BQk()),2&v){const h=xe.last;r.xp6(2),r.Q6J("ngIf",!h),r.xp6(1),r.Q6J("ngIf",h),r.xp6(1),r.Q6J("ngIf",!h)}}let ll=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275dir=r.lG2({type:v,selectors:[["","xngBreadcrumbItem",""]]}),v})();const cl=v=>v&&Object.keys(v).length>0;let Cc=(()=>{class v{constructor(h,A){this.activatedRoute=h,this.router=A,this.baseHref="/",this.dynamicBreadcrumbStore=[],this.currentBreadcrumbs=[],this.previousBreadcrumbs=[],this.breadcrumbs=new ee.X([]),this.breadcrumbs$=this.breadcrumbs.asObservable(),this.detectRouteChanges()}detectRouteChanges(){this.setupBreadcrumbs(this.activatedRoute.snapshot),this.router.events.pipe((0,o.h)(h=>h instanceof Ui.c9)).subscribe(h=>{h instanceof Ui.c9&&h.shouldActivate&&this.setupBreadcrumbs(h.state.root)})}setupBreadcrumbs(h){this.previousBreadcrumbs=this.currentBreadcrumbs;const A=this.getRootBreadcrumb();this.currentBreadcrumbs=A?[A]:[],this.prepareBreadcrumbList(h,this.baseHref)}getRootBreadcrumb(){var h;const A=this.router.config.find(It=>""===It.path),ce=this.extractObject(null===(h=null==A?void 0:A.data)||void 0===h?void 0:h.breadcrumb),je=this.getFromStore(ce.alias,"/");if(cl(ce)||cl(je))return Object.assign(Object.assign(Object.assign(Object.assign({},je),ce),{routeLink:this.baseHref}),this.getQueryParamsFromPreviousList("/"))}prepareBreadcrumbItem(h,A){const{path:ce,breadcrumb:je}=this.parseRouteData(h.routeConfig),It=this.resolvePathSegment(ce,h),Ht=`${A}${It}`,Un=this.getFromStore(je.alias,Ht),Di=this.extractLabel((null==Un?void 0:Un.label)||(null==je?void 0:je.label),It);let Tr=!1,lr="";return Di||(Tr=!0,lr=It),Object.assign(Object.assign(Object.assign(Object.assign({},Un),je),{label:Tr?lr:Di,routeLink:Ht,isAutoGeneratedLabel:Tr}),this.getQueryParamsFromPreviousList(Ht))}prepareBreadcrumbList(h,A){var ce;if(null===(ce=h.routeConfig)||void 0===ce?void 0:ce.path){const Ht=this.prepareBreadcrumbItem(h,A);if(this.currentBreadcrumbs.push(Ht),h.firstChild)return this.prepareBreadcrumbList(h.firstChild,Ht.routeLink+"/")}else if(h.firstChild)return this.prepareBreadcrumbList(h.firstChild,A);this.setQueryParamsForActiveBreadcrumb(this.currentBreadcrumbs[this.currentBreadcrumbs.length-1],h);const It=this.currentBreadcrumbs.filter(Ht=>!Ht.skip);this.breadcrumbs.next(It)}getFromStore(h,A){return this.dynamicBreadcrumbStore.find(ce=>h&&h===ce.alias||A&&A===ce.routeLink||this.matchRegex(A,ce.routeRegex))}matchRegex(h,A){const ce=h.match(new RegExp(A));return(null==ce?void 0:ce[0])===h}resolvePathSegment(h,A){return h.includes(":")&&Object.entries(A.params).forEach(([ce,je])=>{h=h.replace(`:${ce}`,`${je}`)}),h}getQueryParamsFromPreviousList(h){const{queryParams:A,fragment:ce}=this.previousBreadcrumbs.find(je=>je.routeLink===h)||{};return{queryParams:A,fragment:ce}}setQueryParamsForActiveBreadcrumb(h,A){if(h){const{queryParams:ce,fragment:je}=A;h.queryParams=ce?Object.assign({},ce):void 0,h.fragment=je}}parseRouteData(h){const{path:A,data:ce}=h;return{path:A,breadcrumb:this.mergeWithBaseChildData(h,null==ce?void 0:ce.breadcrumb)}}mergeWithBaseChildData(h,A){var ce;if(!h)return this.extractObject(A);let je;h.loadChildren?je=h._loadedConfig.routes.find(Ht=>""===Ht.path):h.children&&(je=h.children.find(Ht=>""===Ht.path));const It=null===(ce=null==je?void 0:je.data)||void 0===ce?void 0:ce.breadcrumb;return It?this.mergeWithBaseChildData(je,Object.assign(Object.assign({},this.extractObject(A)),this.extractObject(It))):this.extractObject(A)}set(h,A){const ce=this.extractObject(A);let je;je=h.startsWith("@")?["alias",Object.assign(Object.assign({},ce),{alias:h.slice(1)})]:h.includes(":")?["routeRegex",Object.assign(Object.assign({},ce),{routeRegex:this.buildRegex(h)})]:["routeLink",Object.assign(Object.assign({},ce),{routeLink:this.ensureLeadingSlash(h)})],je[1].isAutoGeneratedLabel=!1,this.updateStore(...je),this.updateCurrentBreadcrumbs(...je)}updateStore(h,A){const ce=this.dynamicBreadcrumbStore.findIndex(je=>A[h]===je[h]);ce>-1?this.dynamicBreadcrumbStore[ce]=Object.assign(Object.assign({},this.dynamicBreadcrumbStore[ce]),A):this.dynamicBreadcrumbStore.push(Object.assign({},A))}updateCurrentBreadcrumbs(h,A){const ce=this.currentBreadcrumbs.findIndex(je=>"routeRegex"===h?this.matchRegex(je.routeLink,A[h]):A[h]===je[h]);if(ce>-1){this.currentBreadcrumbs[ce]=Object.assign(Object.assign({},this.currentBreadcrumbs[ce]),A);const je=this.currentBreadcrumbs.filter(It=>!It.skip);this.breadcrumbs.next([...je])}}buildRegex(h){return this.ensureLeadingSlash(h).replace(new RegExp("/:[^/]+","g"),"/[^/]+")}ensureLeadingSlash(h){return h.startsWith("/")?h:`/${h}`}extractLabel(h,A){const ce="object"==typeof h?h.label:h;return"function"==typeof ce?ce(A):ce}extractObject(h){return!h||"string"!=typeof h&&"function"!=typeof h?h||{}:{label:h}}}return v.\u0275fac=function(h){return new(h||v)(r.LFG(Ui.gz),r.LFG(Ui.F0))},v.\u0275prov=r.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),v})(),xc=(()=>{class v{constructor(h,A){this.breadcrumbService=h,this._separator="/",this.autoGenerate=!0,this.preserveQueryParams=!0,this.preserveFragment=!0,this.class="",this.setupMessage="not set up yet",this.someParameterValue=null,A.params.subscribe(ce=>{this.setupComponent(ce.someParam)})}set separator(h){h instanceof r.Rgc?(this.separatorTemplate=h,this._separator=void 0):(this.separatorTemplate=void 0,this._separator=h||"/")}get separator(){return this._separator}setupComponent(h){this.setupMessage="set up at "+new Date,this.someParameterValue=h}ngOnInit(){this.breadcrumbs$=this.breadcrumbService.breadcrumbs$.pipe((0,Zi.U)(h=>h.filter(A=>!!this.autoGenerate||!A.isAutoGeneratedLabel).map(A=>{const{routeInterceptor:ce,routeLink:je}=A;return Object.assign(Object.assign({},A),{routeLink:(null==ce?void 0:ce(je,A))||je})})))}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(Cc),r.Y36(Ui.gz))},v.\u0275cmp=r.Xpm({type:v,selectors:[["xng-breadcrumb"]],contentQueries:function(h,A,ce){if(1&h&&r.Suo(ce,ll,5,r.Rgc),2&h){let je;r.iGM(je=r.CRH())&&(A.itemTemplate=je.first)}},inputs:{autoGenerate:"autoGenerate",preserveQueryParams:"preserveQueryParams",preserveFragment:"preserveFragment",class:"class",anchorTarget:"anchorTarget",separator:"separator"},decls:4,vars:4,consts:[["aria-label","breadcrumb",1,"xng-breadcrumb-root",3,"ngClass"],[1,"xng-breadcrumb-list"],[4,"ngFor","ngForOf"],[1,"xng-breadcrumb-item"],["class","xng-breadcrumb-link","role","button","rel","noopener noreferrer",3,"ngClass","routerLink","queryParams","fragment","target",4,"ngIf"],["class","xng-breadcrumb-trail",4,"ngIf"],["class","xng-breadcrumb-separator","aria-hidden","true","role","separator",4,"ngIf"],["role","button","rel","noopener noreferrer",1,"xng-breadcrumb-link",3,"ngClass","routerLink","queryParams","fragment","target"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[1,"xng-breadcrumb-trail"],["aria-hidden","true","role","separator",1,"xng-breadcrumb-separator"],[4,"ngTemplateOutlet"]],template:function(h,A){1&h&&(r.TgZ(0,"nav",0)(1,"ol",1),r.YNc(2,al,5,3,"ng-container",2),r.ALo(3,"async"),r.qZA()()),2&h&&(r.Q6J("ngClass",A.class),r.xp6(2),r.Q6J("ngForOf",r.lcZ(3,2,A.breadcrumbs$)))},directives:[O.mk,O.sg,O.O5,Ui.yS,O.tP],pipes:[O.Ov],styles:[".xng-breadcrumb-root{margin:0;color:#0009}.xng-breadcrumb-list{display:flex;align-items:center;flex-wrap:wrap;margin:0;padding:0}.xng-breadcrumb-item{list-style:none}.xng-breadcrumb-trail{display:flex;align-items:center;color:#000000e6}.xng-breadcrumb-link{display:flex;align-items:center;white-space:nowrap;color:inherit;text-decoration:none;transition:-webkit-text-decoration .3s;transition:text-decoration .3s;transition:text-decoration .3s,-webkit-text-decoration .3s;cursor:pointer}.xng-breadcrumb-link:hover{text-decoration:underline}.xng-breadcrumb-link-disabled{pointer-events:none;cursor:disabled}.xng-breadcrumb-separator{display:flex;-webkit-user-select:none;user-select:none;margin-left:8px;margin-right:8px}\n"],encapsulation:2}),v})(),Dc=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[O.ez,Ui.Bz]]}),v})(),Ec=(()=>{class v{constructor(h,A,ce){this.gs=h,this.ss=A,this.wb=ce}get SS(){return this.ss}ngOnInit(){}get discordUrl(){return ar.N.discord.join_url}get author(){return ar.N.author}get siteName(){return ar.N.siteName}openGithub(){this.wb.winboxOpenUri(`https://github.com/${this.author}/${this.siteName}`)}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(Qi.U),r.Y36(to.R),r.Y36(nl.N))},v.\u0275cmp=r.Xpm({type:v,selectors:[["app-footer"]],decls:14,vars:6,consts:[["color","primary",2,"height","32px","padding","0 12px"],[2,"font-size","small"],[2,"text-decoration","none","color","whitesmoke","cursor","pointer",3,"click"],[2,"display","inline-block","transform","rotateY(180deg)"],[2,"display","inline-block"],[1,"spacer","px-1"],["target","_blank",2,"text-decoration","none","color","whitesmoke",3,"href"]],template:function(h,A){1&h&&(r.TgZ(0,"mat-toolbar",0)(1,"span",1)(2,"div",2),r.NdJ("click",function(){return A.openGithub()}),r.TgZ(3,"div",3),r._uU(4,"\xa9"),r.qZA(),r.TgZ(5,"div",4),r._uU(6),r.ALo(7,"slice"),r.qZA()()(),r._UZ(8,"span",5)(9,"xng-breadcrumb")(10,"span",5),r.TgZ(11,"span",1)(12,"a",6),r._uU(13," With \u{1f498} Just For You~ "),r.qZA()()()),2&h&&(r.xp6(6),r.hij("\xa0 2013 | ",r.Dn7(7,2,null==A.SS.github?null:A.SS.github.sha,0,7),""),r.xp6(6),r.s9C("href",A.discordUrl,r.LSH))},directives:[Cr.Ye,xc],pipes:[O.OU],styles:[""]}),v})();const fs=["leftSideNav"],ao=["rightSidePanel"],dl=["siteContent"],ul=function(v){return{"background-image":v}};let Mc=(()=>{class v{constructor(h,A,ce,je,It,Ht,Un,Di,Tr,lr,No,Uo,Aa,js,Ho,tr,ps){this.snackBar=h,this.renderer=A,this.router=ce,this.route=je,this.bs=It,this.pi=Ht,this.as=Un,this.fs=Di,this.ls=Tr,this.gs=lr,this.lms=No,this.rps=Uo,this.ss=Aa,this.wb=js,this.ds=Ho,this.sw=tr,this.viewer=ps,this.subsRouter=null,this.subsRouterChild=null,this.subsUrl=null,this.subsVerify=null,this.subsDialog=null,this.timedOut=null}get sideNavType(){return this.gs.isDesktop?"side":"over"}onResize(h){this.gs.onResize(h)}get ROUTER(){return this.router}get GS(){return this.gs}get LMS(){return this.lms}get RPS(){return this.rps}ngOnDestroy(){var h,A,ce,je,It;null===(h=this.subsRouter)||void 0===h||h.unsubscribe(),null===(A=this.subsRouterChild)||void 0===A||A.unsubscribe(),null===(ce=this.subsUrl)||void 0===ce||ce.unsubscribe(),null===(je=this.subsVerify)||void 0===je||je.unsubscribe(),null===(It=this.subsDialog)||void 0===It||It.unsubscribe(),this.timedOut&&(clearTimeout(this.timedOut),this.timedOut=null)}ngAfterViewInit(){if(this.lms.sideNav=this.leftSideNav,this.rps.sidePanel=this.rightSidePanel,this.gs.isBrowser){const h=this.renderer.selectRootElement("#app-loading");h&&(h.style.visibility="hidden",h.style.opacity=0)}}ngOnInit(){var h=this;this.gs.log(`[APP_BUILD_STATUS] \u{1f498} ${ar.N.siteName} :: ${ar.N.production?"Production":"Development"} With Logging Enabled \u{1f4cc}`),this.gs.log(`[SERVICE_WORKER_STATUS] \u{1f498} isEnabled :: ${this.sw.swEnabled} \u{1f4cc}`),this.pi.updatePageMetaData(`\u300c\u{1f4a4} ${ar.N.siteName}\u300d`,`\u300c\u2728 ${ar.N.siteDescription}\u300d`,`\u300c\u{1f4a4} ${ar.N.siteName} \u2728\u{1f31e}\u300d`,`${ar.N.baseUrl}/assets/img/favicon.png`),this.subsRouter=this.router.events.subscribe({next:A=>{if(A instanceof Ui.xV)this.gs.isBrowser&&this.bs.busy();else if(A instanceof Ui.GH)this.gs.isBrowser&&this.bs.idle();else if(A instanceof Ui.OD){if(this.gs.isBrowser&&A.url){const ce=A.url.split("/")[1];if(ce){const je=`badge${ce[0].toUpperCase()}${ce.slice(1)}`;if(this.ss[je]){this.ss[je]=[];const It=this.lms.mainMenus.find(Di=>Di.link===A.url),Ht=this.lms.contentMenus.find(Di=>Di.link===A.url),Un=this.lms.miscMenus.find(Di=>Di.link===A.url);It&&(It.badge=null),Ht&&(Ht.badge=null),Un&&(Un.badge=null)}}this.gs.previousUrl=this.router.url.split("?")[0]}}else if(A instanceof Ui.m2){let ce=this.route.firstChild;for(const je of ce.children)ce=je;this.subsRouterChild=ce.data.subscribe({next:je=>{if(this.updateBackgroundImage(),this.gs.routerData=je,this.pi.updatePageMetaData(je.title,je.description,je.keywords,this.gs.bgImgUrl||`${ar.N.baseUrl}/assets/img/favicon.png`),this.fs.removeFab(),this.gs.isBrowser){this.siteContent&&(this.siteContent.elementRef.nativeElement.scrollTop=0);const It=A.url.split("?")[0];this.gs.previousUrl!==It&&(this.ss.currentChatRoom=[]),this.ss.socketLeaveAndJoinNewRoom(this.gs.previousUrl,It)}}})}}}),this.gs.isBrowser&&(this.checkStorage(),this.windowRightClick=this.onWindowRightClick,this.windowLeftClick=this.onWindowLeftClick,this.windowDoubleClick=this.onWindowDoubleClick,this.windowBeforeUnloaded=this.onWindowBeforeUnloaded,this.timedOut=setTimeout((0,So.Z)(function*(){if("true"!==h.ls.getItem(h.gs.localStorageKeys.AturanTatib)){const ce={id:"ATURAN-TATA-TERTIB",data:{title:"Aturan Dan Tata Tertib Komunitas",htmlMessage:"Gagal Memuat Aturan Dan Tata Tertib Komunitas",confirmText:"Ok, Saya Mengerti!",cancelText:null},disableClose:!1,maxWidth:h.ds.maxWidth};h.subsDialog=(yield h.ds.fetchInformationRegisterMode(ce)).afterClosed().subscribe({next:je=>{h.gs.log("[ATURAN_TATA_TERTIB_DIALOG_CLOSED]",je),"boolean"==typeof je&&h.ls.setItem(h.gs.localStorageKeys.AturanTatib,JSON.stringify(je)),h.subsDialog.unsubscribe()}})}h.injectServerTimeClock(),h.gs.weatherEffect&&h.snackBar.open("Gunakan Menu Di Kanan Atas (Gambar Bunga) Untuk Mematikan Animasi Efek Musiman!","Ok")}),1234))}updateBackgroundImage(){const h=this.router.url.split("?")[0].substring(1).split("/")[0];this.gs.bgImgUrlPath=h?`/assets/img/router/${h}.png`:""}checkStorage(){this.bs.busy(),this.subsVerify=this.as.verify(this.as.token).subscribe({next:h=>{this.gs.log("[VERIFY_SUCCESS]",h),this.ss.socketLeaveAndJoinNewRoom(this.gs.previousUrl,this.router.url.split("?")[0]),this.bs.idle()},error:h=>{this.gs.log("[VERIFY_ERROR]",h,"error"),this.bs.idle(),this.as.removeUser()}})}resetLoading(){this.bs.clear()}onWindowRightClick(h){this.gs.log("[MOUSE_RIGHT_CLICK]",h)}onWindowLeftClick(h){this.gs.log("[MOUSE_LEFT_CLICK]",h);const A=h||window.event,ce=A.target||A.srcElement;if("A"===ce.tagName||"a"===ce.tagName){const je=ce.getAttribute("href");if(je&&this.gs.isDesktop&&this.gs.includesOneOf(je,["http","ftp","mailto"])&&!je.includes(ar.N.baseUrl))return A.preventDefault(),A.stopPropagation(),this.winboxOpenUri(je),!1}return!0}onWindowDoubleClick(h){this.gs.log("[MOUSE_DOUBLE_CLICK]",h);const A=h||window.event,ce=A.target||A.srcElement;("IMG"===ce.tagName||"img"===ce.tagName)&&this.gs.isDesktop&&this.viewer.viewImage(ce)}onWindowBeforeUnloaded(h){this.as.token&&(this.gs.log("[BROWSER_EXIT_CLOSE_SAVE_JWT]",this.as.token),this.ls.setItem(this.gs.localStorageKeys.token,this.as.token))}winboxOpenUri(h){this.wb.winboxOpenUri(h)}injectServerTimeClock(){if(this.gs.isDesktop){const h=this.gs.document.getElementsByClassName("mat-drawer-backdrop");if(h.length>0){h[0].innerHTML='\n
\n
\n

~ Kalender (\uff61>\ufe4f<\uff61) Server ~

\n

\n

\n
\n
\n ';const ce=this.gs.document.createElement("script");ce.type="text/javascript",ce.textContent="\n function runCalendar() {\n const calendar = new Date();\n const serverTime = document.getElementById('serverTime');\n serverTime.innerHTML = calendar.toLocaleTimeString('ja-JP', {\n timeZone: 'Asia/Tokyo',\n timeZoneName: 'longGeneric'\n });\n const serverDate = document.getElementById('serverDate');\n serverDate.innerHTML = calendar.toLocaleDateString('id-ID', {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n timeZone: 'Asia/Tokyo'\n });\n setTimeout(runCalendar, 1000);\n }\n runCalendar();\n ",this.gs.document.head.appendChild(ce)}}}}return v.\u0275fac=function(h){return new(h||v)(r.Y36(ns.ux),r.Y36(r.Qsj),r.Y36(Ui.F0),r.Y36(Ui.gz),r.Y36(Xs.z),r.Y36(el.Z),r.Y36(To.e),r.Y36(tl.r),r.Y36(go.n),r.Y36(Qi.U),r.Y36(ba.S),r.Y36(Ro.C),r.Y36(to.R),r.Y36(nl.N),r.Y36(no.x),r.Y36(il.H),r.Y36(ac))},v.\u0275cmp=r.Xpm({type:v,selectors:[["app-root"]],viewQuery:function(h,A){if(1&h&&(r.Gf(fs,7),r.Gf(ao,7),r.Gf(dl,7)),2&h){let ce;r.iGM(ce=r.CRH())&&(A.leftSideNav=ce.first),r.iGM(ce=r.CRH())&&(A.rightSidePanel=ce.first),r.iGM(ce=r.CRH())&&(A.siteContent=ce.first)}},hostBindings:function(h,A){1&h&&r.NdJ("contextmenu",function(je){return A.windowRightClick(je)},!1,r.Jf7)("click",function(je){return A.windowLeftClick(je)},!1,r.Jf7)("dblclick",function(je){return A.windowDoubleClick(je)},!1,r.Jf7)("beforeunload",function(je){return A.windowBeforeUnloaded(je)},!1,r.Jf7)("resize",function(je){return A.onResize(je)},!1,r.Jf7)},decls:24,vars:27,consts:[[3,"color","fixed","meteor","thick"],[1,"sidenav-container",3,"hasBackdrop"],["disableClose","",2,"background-position","bottom center","background-size","128px","background-repeat","no-repeat",3,"mode","opened","ngStyle"],["leftSideNav",""],["position","end",1,"bg-bifeldy",2,"background-position","bottom center","background-size","128px","background-repeat","no-repeat",3,"mode","opened","ngStyle","closedStart"],["rightSidePanel",""],["siteContent",""],[1,"main_content"],[3,"bdColor","type","size","color"],[1,"text-light","text-center"],[1,"text-info","text-decoration-none",3,"click"],[2,"cursor","pointer"]],template:function(h,A){if(1&h&&(r._UZ(0,"app-header")(1,"ng-progress",0),r.TgZ(2,"mat-sidenav-container",1)(3,"mat-sidenav",2,3),r._UZ(5,"app-left-menu"),r.qZA(),r.TgZ(6,"mat-sidenav",4,5),r.NdJ("closedStart",function(){return A.RPS.onClose()}),r._UZ(8,"app-right-panel"),r.qZA(),r.TgZ(9,"mat-sidenav-content",null,6)(11,"div",7),r._UZ(12,"router-outlet"),r.qZA(),r._UZ(13,"app-material-fab"),r.qZA()(),r._UZ(14,"app-footer"),r.TgZ(15,"ngx-spinner",8)(16,"p",9),r._uU(17," Sedang Memuat Data ^_^ "),r._UZ(18,"br"),r._uU(19," Mohon Menunggu ... "),r._UZ(20,"br"),r.TgZ(21,"span",10),r.NdJ("click",function(){return A.resetLoading()}),r.TgZ(22,"b",11),r._uU(23,"Batalkan"),r.qZA()()()()),2&h){const ce=r.MAs(7);r.xp6(1),r.Q6J("color","#ff4081")("fixed",!1)("meteor",!1)("thick",!0),r.xp6(1),r.Q6J("hasBackdrop",A.LMS.sideNavExpanded||ce.isOpen),r.xp6(1),r.Q6J("mode",A.sideNavType)("opened",A.LMS.opened)("ngStyle",r.VKq(23,ul,"url("+A.GS.leftMenuImage+")")),r.xp6(3),r.Q6J("mode","over")("opened",!1)("ngStyle",r.VKq(25,ul,"url("+A.GS.rightMenuImage+")")),r.xp6(3),r.Udp("background-repeat","no-repeat")("background-size","128px"+("/login"===A.ROUTER.url||"/register"===A.ROUTER.url||"/about"===A.ROUTER.url||"/verify"===A.ROUTER.url||"/privacy-policy"===A.ROUTER.url||"/reset-password"===A.ROUTER.url?", cover":""))("background-position","bottom right"+("/login"===A.ROUTER.url||"/register"===A.ROUTER.url||"/about"===A.ROUTER.url||"/verify"===A.ROUTER.url||"/privacy-policy"===A.ROUTER.url||"/reset-password"===A.ROUTER.url?", center":""))("background-image","url("+A.GS.bgImgUrl+")"+("/login"===A.ROUTER.url||"/register"===A.ROUTER.url||"/about"===A.ROUTER.url||"/verify"===A.ROUTER.url||"/privacy-policy"===A.ROUTER.url||"/reset-password"===A.ROUTER.url?", url(/assets/img/background/paint.svg)":"")),r.xp6(6),r.Q6J("bdColor","#0000007f")("type","square-jelly-box")("size","medium")("color","#e84360")}},directives:[_o,po,ko.TM,ko.JX,O.PC,dt,Ju,gc,ko.Rh,Ui.lC,qu,Ec,fo.Ro],styles:[".main_content[_ngcontent-%COMP%]{width:100%;height:calc(100vh - 88px)}"],data:{animation:[ya]}}),v})(),wc=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[O.ez,Ui.Bz,Hs.m]]}),v})(),Ac=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[O.ez,Ui.Bz,Hs.m,wr.u5]]}),v})();var Tc=a(5116);let hl=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[O.ez,Hs.m]]}),v})(),Sc=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[O.ez,Hs.m,Dc]]}),v})();var Oc=a(1385),Rc=a(7355),Ic=a(2438);let eh=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v}),v.\u0275inj=r.cJS({imports:[[O.ez,Ui.Bz,Hs.m,wr.u5,wr.UX,Oc.Ad,Ic.d,Rc.T]]}),v})(),Pc=(()=>{class v{}return v.\u0275fac=function(h){return new(h||v)},v.\u0275mod=r.oAB({type:v,bootstrap:[Mc]}),v.\u0275inj=r.cJS({providers:[{provide:n.ok,useClass:Zu},{provide:cs.Jm,useValue:Qu},{provide:Ms.o2,useValue:{floatLabel:"always"}},{provide:ns.Ve,useValue:{duration:1e4}},{provide:l.TP,useClass:ic,multi:!0},{provide:l.TP,useClass:va,multi:!0},{provide:l.TP,useClass:eo,multi:!0}],imports:[[n.b2.withServerTransition({appId:"serverApp"}),nc,E.PW,xi,D,wr.UX,l.JF,Hs.m,n.t6,fo.ef,Za.Rh.forRoot({timeOut:3e3,positionClass:"toast-top-right",closeButton:!0,progressBar:!0,progressAnimation:"increasing"}),Ku,ec,wc,Ac,Tc.d,hl,Sc,eh,Ns.Wr.register("/ngsw-worker.js",{enabled:ar.N.production,registrationStrategy:"registerWhenStable:30000"}),Qr.zO.withConfig({autoUpload:!1,concurrency:1,endpoint:`${ar.N.apiUrl}/attachment`,headers:{"ngsw-bypass":"true"},retryConfig:{maxAttempts:3},maxChunkSize:Lr.t.fileSizeAttachmentChunkCloudflareLimit})]]}),v})();function wa(){n.q6().bootstrapModule(Pc).catch(v=>console.error(v))}a(5386),ar.N.production&&(0,r.G48)(),"complete"===document.readyState?wa():document.addEventListener("DOMContentLoaded",wa)},4249:(it,U,a)=>{"use strict";a.d(U,{Bp:()=>M,eK:()=>I,yS:()=>n});var n=(()=>{return(g=n||(n={})).ADMIN="ADMIN",g.FANSUBBER="FANSUBBER",g.MODERATOR="MODERATOR",g.USER="USER",n;var g})(),I=(()=>{return(g=I||(I={})).LIKE="LIKE",g.DISLIKE="DISLIKE",I;var g})(),M=(()=>{return(g=M||(M={})).DISCORD="DISCORD",g.DISQUS="DISQUS",g.FACEBOOK="FACEBOOK",g.GOOGLE="GOOGLE",M;var g})()},6022:(it,U,a)=>{"use strict";a.d(U,{F:()=>n});var n=(()=>{return(r=n||(n={})).WINTER="winter",r.SPRING="spring",r.SUMMER="summer",r.FALL="fall",n;var r})()},8498:it=>{function a(){}it.exports=function U(n,r,l){var u=!1;return l=l||a,o.count=n,0===n?r():o;function o(I,M){if(o.count<=0)throw new Error("after called too many times");--o.count,I?(u=!0,r(I),r=l):0===o.count&&!u&&r(null,M)}}},9933:it=>{it.exports=function(U,a,n){var r=U.byteLength;if(a=a||0,n=n||r,U.slice)return U.slice(a,n);if(a<0&&(a+=r),n<0&&(n+=r),n>r&&(n=r),a>=r||a>=n||0===r)return new ArrayBuffer(0);for(var l=new Uint8Array(U),u=new Uint8Array(n-a),o=a,I=0;o{function U(a){this.ms=(a=a||{}).min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}it.exports=U,U.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*a);a=0==(1&Math.floor(10*n))?a-r:a+r}return 0|Math.min(a,this.max)},U.prototype.reset=function(){this.attempts=0},U.prototype.setMin=function(a){this.ms=a},U.prototype.setMax=function(a){this.max=a},U.prototype.setJitter=function(a){this.jitter=a}},390:(it,U)=>{!function(a){"use strict";U.encode=function(n){var l,r=new Uint8Array(n),u=r.length,o="";for(l=0;l>2],o+=a[(3&r[l])<<4|r[l+1]>>4],o+=a[(15&r[l+1])<<2|r[l+2]>>6],o+=a[63&r[l+2]];return u%3==2?o=o.substring(0,o.length-1)+"=":u%3==1&&(o=o.substring(0,o.length-2)+"=="),o},U.decode=function(n){var u,I,M,g,C,r=.75*n.length,l=n.length,o=0;"="===n[n.length-1]&&(r--,"="===n[n.length-2]&&r--);var D=new ArrayBuffer(r),y=new Uint8Array(D);for(u=0;u>4,y[o++]=(15&M)<<4|g>>2,y[o++]=(3&g)<<6|63&C;return D}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},113:it=>{var U=void 0!==U?U:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,a=function(){try{return 2===new Blob(["hi"]).size}catch(M){return!1}}(),n=a&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(M){return!1}}(),r=U&&U.prototype.append&&U.prototype.getBlob;function l(I){return I.map(function(M){if(M.buffer instanceof ArrayBuffer){var g=M.buffer;if(M.byteLength!==g.byteLength){var C=new Uint8Array(M.byteLength);C.set(new Uint8Array(g,M.byteOffset,M.byteLength)),g=C.buffer}return g}return M})}function u(I,M){M=M||{};var g=new U;return l(I).forEach(function(C){g.append(C)}),M.type?g.getBlob(M.type):g.getBlob()}function o(I,M){return new Blob(l(I),M||{})}"undefined"!=typeof Blob&&(u.prototype=Blob.prototype,o.prototype=Blob.prototype),it.exports=a?n?Blob:o:r?u:void 0},1213:it=>{var U=[].slice;it.exports=function(a,n){if("string"==typeof n&&(n=a[n]),"function"!=typeof n)throw new Error("bind() requires a function");var r=U.call(arguments,2);return function(){return n.apply(a,r.concat(U.call(arguments)))}}},1264:it=>{function U(n){if(n)return function a(n){for(var r in U.prototype)n[r]=U.prototype[r];return n}(n)}it.exports=U,U.prototype.on=U.prototype.addEventListener=function(n,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(r),this},U.prototype.once=function(n,r){function l(){this.off(n,l),r.apply(this,arguments)}return l.fn=r,this.on(n,l),this},U.prototype.off=U.prototype.removeListener=U.prototype.removeAllListeners=U.prototype.removeEventListener=function(n,r){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var l=this._callbacks["$"+n];if(!l)return this;if(1==arguments.length)return delete this._callbacks["$"+n],this;for(var u,o=0;o{it.exports=function(U,a){var n=function(){};n.prototype=a.prototype,U.prototype=new n,U.prototype.constructor=U}},7466:function(it,U,a){var n;it.exports=(n=a(7585),a(8319),a(9493),a(7865),a(3057),function(){var r=n,u=r.lib.BlockCipher,o=r.algo,I=[],M=[],g=[],C=[],D=[],y=[],_=[],E=[],O=[],ee=[];!function(){for(var ne=[],De=0;De<256;De++)ne[De]=De<128?De<<1:De<<1^283;var ve=0,W=0;for(De=0;De<256;De++){var z=W^W<<1^W<<2^W<<3^W<<4;I[ve]=z=z>>>8^255&z^99,M[z]=ve;var fe,V=ne[ve],Me=ne[V],Q=ne[Me];g[ve]=(fe=257*ne[z]^16843008*z)<<24|fe>>>8,C[ve]=fe<<16|fe>>>16,D[ve]=fe<<8|fe>>>24,y[ve]=fe,_[z]=(fe=16843009*Q^65537*Me^257*V^16843008*ve)<<24|fe>>>8,E[z]=fe<<16|fe>>>16,O[z]=fe<<8|fe>>>24,ee[z]=fe,ve?(ve=V^ne[ne[ne[Q^V]]],W^=ne[ne[W]]):ve=W=1}}();var ue=[0,1,2,4,8,16,32,64,128,27,54],Z=o.AES=u.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var De=this._keyPriorReset=this._key,ve=De.words,W=De.sigBytes/4,V=4*((this._nRounds=W+6)+1),Me=this._keySchedule=[],Q=0;Q6&&Q%W==4&&(ne=I[ne>>>24]<<24|I[ne>>>16&255]<<16|I[ne>>>8&255]<<8|I[255&ne]):(ne=I[(ne=ne<<8|ne>>>24)>>>24]<<24|I[ne>>>16&255]<<16|I[ne>>>8&255]<<8|I[255&ne],ne^=ue[Q/W|0]<<24),Me[Q]=Me[Q-W]^ne);for(var fe=this._invKeySchedule=[],Ae=0;Ae>>24]]^E[I[ne>>>16&255]]^O[I[ne>>>8&255]]^ee[I[255&ne]]}}},encryptBlock:function(ne,De){this._doCryptBlock(ne,De,this._keySchedule,g,C,D,y,I)},decryptBlock:function(ne,De){var ve=ne[De+1];ne[De+1]=ne[De+3],ne[De+3]=ve,this._doCryptBlock(ne,De,this._invKeySchedule,_,E,O,ee,M),ve=ne[De+1],ne[De+1]=ne[De+3],ne[De+3]=ve},_doCryptBlock:function(ne,De,ve,W,z,V,Me,Q){for(var fe=this._nRounds,Ae=ne[De]^ve[0],j=ne[De+1]^ve[1],Y=ne[De+2]^ve[2],J=ne[De+3]^ve[3],ie=4,Be=1;Be>>24]^z[j>>>16&255]^V[Y>>>8&255]^Me[255&J]^ve[ie++],Tt=W[j>>>24]^z[Y>>>16&255]^V[J>>>8&255]^Me[255&Ae]^ve[ie++],Rt=W[Y>>>24]^z[J>>>16&255]^V[Ae>>>8&255]^Me[255&j]^ve[ie++],mt=W[J>>>24]^z[Ae>>>16&255]^V[j>>>8&255]^Me[255&Y]^ve[ie++];Ae=nt,j=Tt,Y=Rt,J=mt}nt=(Q[Ae>>>24]<<24|Q[j>>>16&255]<<16|Q[Y>>>8&255]<<8|Q[255&J])^ve[ie++],Tt=(Q[j>>>24]<<24|Q[Y>>>16&255]<<16|Q[J>>>8&255]<<8|Q[255&Ae])^ve[ie++],Rt=(Q[Y>>>24]<<24|Q[J>>>16&255]<<16|Q[Ae>>>8&255]<<8|Q[255&j])^ve[ie++],mt=(Q[J>>>24]<<24|Q[Ae>>>16&255]<<16|Q[j>>>8&255]<<8|Q[255&Y])^ve[ie++],ne[De]=nt,ne[De+1]=Tt,ne[De+2]=Rt,ne[De+3]=mt},keySize:8});r.AES=u._createHelper(Z)}(),n.AES)},3057:function(it,U,a){var l,u,o,I,M,g,D,_,E,ee,ue,Z,De,W,V,Me,fe,Ae,n;it.exports=(n=a(7585),a(7865),void(n.lib.Cipher||(l=n,u=l.lib,o=u.Base,I=u.WordArray,M=u.BufferedBlockAlgorithm,g=l.enc,D=g.Base64,_=l.algo.EvpKDF,E=u.Cipher=M.extend({cfg:o.extend(),createEncryptor:function(j,Y){return this.create(this._ENC_XFORM_MODE,j,Y)},createDecryptor:function(j,Y){return this.create(this._DEC_XFORM_MODE,j,Y)},init:function(j,Y,J){this.cfg=this.cfg.extend(J),this._xformMode=j,this._key=Y,this.reset()},reset:function(){M.reset.call(this),this._doReset()},process:function(j){return this._append(j),this._process()},finalize:function(j){return j&&this._append(j),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function j(Y){return"string"==typeof Y?Ae:Me}return function(Y){return{encrypt:function(J,ie,Be){return j(ie).encrypt(Y,J,ie,Be)},decrypt:function(J,ie,Be){return j(ie).decrypt(Y,J,ie,Be)}}}}()}),u.StreamCipher=E.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),ee=l.mode={},ue=u.BlockCipherMode=o.extend({createEncryptor:function(j,Y){return this.Encryptor.create(j,Y)},createDecryptor:function(j,Y){return this.Decryptor.create(j,Y)},init:function(j,Y){this._cipher=j,this._iv=Y}}),Z=ee.CBC=function(){var j=ue.extend();function Y(J,ie,Be){var nt,Tt=this._iv;Tt?(nt=Tt,this._iv=undefined):nt=this._prevBlock;for(var Rt=0;Rt>>2]}},u.BlockCipher=E.extend({cfg:E.cfg.extend({mode:Z,padding:De}),reset:function(){var j;E.reset.call(this);var Y=this.cfg,J=Y.iv,ie=Y.mode;this._xformMode==this._ENC_XFORM_MODE?j=ie.createEncryptor:(j=ie.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==j?this._mode.init(this,J&&J.words):(this._mode=j.call(ie,this,J&&J.words),this._mode.__creator=j)},_doProcessBlock:function(j,Y){this._mode.processBlock(j,Y)},_doFinalize:function(){var j,Y=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(Y.pad(this._data,this.blockSize),j=this._process(!0)):(j=this._process(!0),Y.unpad(j)),j},blockSize:4}),W=u.CipherParams=o.extend({init:function(j){this.mixIn(j)},toString:function(j){return(j||this.formatter).stringify(this)}}),V=(l.format={}).OpenSSL={stringify:function(j){var J=j.ciphertext,ie=j.salt;return(ie?I.create([1398893684,1701076831]).concat(ie).concat(J):J).toString(D)},parse:function(j){var Y,J=D.parse(j),ie=J.words;return 1398893684==ie[0]&&1701076831==ie[1]&&(Y=I.create(ie.slice(2,4)),ie.splice(0,4),J.sigBytes-=16),W.create({ciphertext:J,salt:Y})}},Me=u.SerializableCipher=o.extend({cfg:o.extend({format:V}),encrypt:function(j,Y,J,ie){ie=this.cfg.extend(ie);var Be=j.createEncryptor(J,ie),nt=Be.finalize(Y),Tt=Be.cfg;return W.create({ciphertext:nt,key:J,iv:Tt.iv,algorithm:j,mode:Tt.mode,padding:Tt.padding,blockSize:j.blockSize,formatter:ie.format})},decrypt:function(j,Y,J,ie){return ie=this.cfg.extend(ie),Y=this._parse(Y,ie.format),j.createDecryptor(J,ie).finalize(Y.ciphertext)},_parse:function(j,Y){return"string"==typeof j?Y.parse(j,this):j}}),fe=(l.kdf={}).OpenSSL={execute:function(j,Y,J,ie){ie||(ie=I.random(8));var Be=_.create({keySize:Y+J}).compute(j,ie),nt=I.create(Be.words.slice(Y),4*J);return Be.sigBytes=4*Y,W.create({key:Be,iv:nt,salt:ie})}},Ae=u.PasswordBasedCipher=Me.extend({cfg:Me.cfg.extend({kdf:fe}),encrypt:function(j,Y,J,ie){var Be=(ie=this.cfg.extend(ie)).kdf.execute(J,j.keySize,j.ivSize);ie.iv=Be.iv;var nt=Me.encrypt.call(this,j,Y,Be.key,ie);return nt.mixIn(Be),nt},decrypt:function(j,Y,J,ie){ie=this.cfg.extend(ie),Y=this._parse(Y,ie.format);var Be=ie.kdf.execute(J,j.keySize,j.ivSize,Y.salt);return ie.iv=Be.iv,Me.decrypt.call(this,j,Y,Be.key,ie)}}))))},7585:function(it,U,a){var n;it.exports=(n=n||function(r,l){var u;if("undefined"!=typeof window&&window.crypto&&(u=window.crypto),"undefined"!=typeof self&&self.crypto&&(u=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(u=globalThis.crypto),!u&&"undefined"!=typeof window&&window.msCrypto&&(u=window.msCrypto),!u&&"undefined"!=typeof global&&global.crypto&&(u=global.crypto),!u)try{u=a(2480)}catch(ne){}var o=function(){if(u){if("function"==typeof u.getRandomValues)try{return u.getRandomValues(new Uint32Array(1))[0]}catch(ne){}if("function"==typeof u.randomBytes)try{return u.randomBytes(4).readInt32LE()}catch(ne){}}throw new Error("Native crypto module could not be used to get secure random number.")},I=Object.create||function(){function ne(){}return function(De){var ve;return ne.prototype=De,ve=new ne,ne.prototype=null,ve}}(),M={},g=M.lib={},C=g.Base={extend:function(ne){var De=I(this);return ne&&De.mixIn(ne),(!De.hasOwnProperty("init")||this.init===De.init)&&(De.init=function(){De.$super.init.apply(this,arguments)}),De.init.prototype=De,De.$super=this,De},create:function(){var ne=this.extend();return ne.init.apply(ne,arguments),ne},init:function(){},mixIn:function(ne){for(var De in ne)ne.hasOwnProperty(De)&&(this[De]=ne[De]);ne.hasOwnProperty("toString")&&(this.toString=ne.toString)},clone:function(){return this.init.prototype.extend(this)}},D=g.WordArray=C.extend({init:function(ne,De){ne=this.words=ne||[],this.sigBytes=null!=De?De:4*ne.length},toString:function(ne){return(ne||_).stringify(this)},concat:function(ne){var De=this.words,ve=ne.words,W=this.sigBytes,z=ne.sigBytes;if(this.clamp(),W%4)for(var V=0;V>>2]|=(ve[V>>>2]>>>24-V%4*8&255)<<24-(W+V)%4*8;else for(var Q=0;Q>>2]=ve[Q>>>2];return this.sigBytes+=z,this},clamp:function(){var ne=this.words,De=this.sigBytes;ne[De>>>2]&=4294967295<<32-De%4*8,ne.length=r.ceil(De/4)},clone:function(){var ne=C.clone.call(this);return ne.words=this.words.slice(0),ne},random:function(ne){for(var De=[],ve=0;ve>>2]>>>24-z%4*8&255;W.push((V>>>4).toString(16)),W.push((15&V).toString(16))}return W.join("")},parse:function(ne){for(var De=ne.length,ve=[],W=0;W>>3]|=parseInt(ne.substr(W,2),16)<<24-W%8*4;return new D.init(ve,De/2)}},E=y.Latin1={stringify:function(ne){for(var De=ne.words,ve=ne.sigBytes,W=[],z=0;z>>2]>>>24-z%4*8&255));return W.join("")},parse:function(ne){for(var De=ne.length,ve=[],W=0;W>>2]|=(255&ne.charCodeAt(W))<<24-W%4*8;return new D.init(ve,De)}},O=y.Utf8={stringify:function(ne){try{return decodeURIComponent(escape(E.stringify(ne)))}catch(De){throw new Error("Malformed UTF-8 data")}},parse:function(ne){return E.parse(unescape(encodeURIComponent(ne)))}},ee=g.BufferedBlockAlgorithm=C.extend({reset:function(){this._data=new D.init,this._nDataBytes=0},_append:function(ne){"string"==typeof ne&&(ne=O.parse(ne)),this._data.concat(ne),this._nDataBytes+=ne.sigBytes},_process:function(ne){var De,ve=this._data,W=ve.words,z=ve.sigBytes,V=this.blockSize,Q=z/(4*V),fe=(Q=ne?r.ceil(Q):r.max((0|Q)-this._minBufferSize,0))*V,Ae=r.min(4*fe,z);if(fe){for(var j=0;j>>2]>>>24-E%4*8&255)<<16|(C[E+1>>>2]>>>24-(E+1)%4*8&255)<<8|C[E+2>>>2]>>>24-(E+2)%4*8&255,ne=0;ne<4&&E+.75*ne>>6*(3-ne)&63));var De=y.charAt(64);if(De)for(;_.length%4;)_.push(De);return _.join("")},parse:function(g){var C=g.length,D=this._map,y=this._reverseMap;if(!y){y=this._reverseMap=[];for(var _=0;_>>6-E%4*2;y[_>>>2]|=(O|ee)<<24-_%4*8,_++}return u.create(y,_)}(g,C,y)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},4410:function(it,U,a){var n,u;it.exports=(n=a(7585),u=n.lib.WordArray,n.enc.Base64url={stringify:function(g,C=!0){var D=g.words,y=g.sigBytes,_=C?this._safe_map:this._map;g.clamp();for(var E=[],O=0;O>>2]>>>24-O%4*8&255)<<16|(D[O+1>>>2]>>>24-(O+1)%4*8&255)<<8|D[O+2>>>2]>>>24-(O+2)%4*8&255,De=0;De<4&&O+.75*De>>6*(3-De)&63));var ve=_.charAt(64);if(ve)for(;E.length%4;)E.push(ve);return E.join("")},parse:function(g,C=!0){var D=g.length,y=C?this._safe_map:this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var E=0;E>>6-E%4*2;y[_>>>2]|=(O|ee)<<24-_%4*8,_++}return u.create(y,_)}(g,D,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},n.enc.Base64url)},9012:function(it,U,a){var n;it.exports=(n=a(7585),function(){var u=n.lib.WordArray,o=n.enc;function M(g){return g<<8&4278255360|g>>>8&16711935}o.Utf16=o.Utf16BE={stringify:function(g){for(var C=g.words,D=g.sigBytes,y=[],_=0;_>>2]>>>16-_%4*8&65535));return y.join("")},parse:function(g){for(var C=g.length,D=[],y=0;y>>1]|=g.charCodeAt(y)<<16-y%2*16;return u.create(D,2*C)}},o.Utf16LE={stringify:function(g){for(var C=g.words,D=g.sigBytes,y=[],_=0;_>>2]>>>16-_%4*8&65535);y.push(String.fromCharCode(E))}return y.join("")},parse:function(g){for(var C=g.length,D=[],y=0;y>>1]|=M(g.charCodeAt(y)<<16-y%2*16);return u.create(D,2*C)}}}(),n.enc.Utf16)},7865:function(it,U,a){var r,l,u,o,I,g,n;it.exports=(n=a(7585),a(5162),a(3764),o=(l=(r=n).lib).WordArray,g=(I=r.algo).EvpKDF=(u=l.Base).extend({cfg:u.extend({keySize:4,hasher:I.MD5,iterations:1}),init:function(C){this.cfg=this.cfg.extend(C)},compute:function(C,D){for(var y,_=this.cfg,E=_.hasher.create(),O=o.create(),ee=O.words,ue=_.keySize,Z=_.iterations;ee.length_&&(D=C.finalize(D)),D.clamp();for(var E=this._oKey=D.clone(),O=this._iKey=D.clone(),ee=E.words,ue=O.words,Z=0;Z>>2]|=M[D]<<24-D%4*8;o.call(this,C,g)}else o.apply(this,arguments)};I.prototype=u}}(),n.lib.WordArray)},9493:function(it,U,a){var n;it.exports=(n=a(7585),function(r){var l=n,u=l.lib,o=u.WordArray,I=u.Hasher,M=l.algo,g=[];!function(){for(var O=0;O<64;O++)g[O]=4294967296*r.abs(r.sin(O+1))|0}();var C=M.MD5=I.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(O,ee){for(var ue=0;ue<16;ue++){var Z=ee+ue,ne=O[Z];O[Z]=16711935&(ne<<8|ne>>>24)|4278255360&(ne<<24|ne>>>8)}var De=this._hash.words,ve=O[ee+0],W=O[ee+1],z=O[ee+2],V=O[ee+3],Me=O[ee+4],Q=O[ee+5],fe=O[ee+6],Ae=O[ee+7],j=O[ee+8],Y=O[ee+9],J=O[ee+10],ie=O[ee+11],Be=O[ee+12],nt=O[ee+13],Tt=O[ee+14],Rt=O[ee+15],mt=De[0],gt=De[1],Le=De[2],Je=De[3];mt=D(mt,gt,Le,Je,ve,7,g[0]),Je=D(Je,mt,gt,Le,W,12,g[1]),Le=D(Le,Je,mt,gt,z,17,g[2]),gt=D(gt,Le,Je,mt,V,22,g[3]),mt=D(mt,gt,Le,Je,Me,7,g[4]),Je=D(Je,mt,gt,Le,Q,12,g[5]),Le=D(Le,Je,mt,gt,fe,17,g[6]),gt=D(gt,Le,Je,mt,Ae,22,g[7]),mt=D(mt,gt,Le,Je,j,7,g[8]),Je=D(Je,mt,gt,Le,Y,12,g[9]),Le=D(Le,Je,mt,gt,J,17,g[10]),gt=D(gt,Le,Je,mt,ie,22,g[11]),mt=D(mt,gt,Le,Je,Be,7,g[12]),Je=D(Je,mt,gt,Le,nt,12,g[13]),Le=D(Le,Je,mt,gt,Tt,17,g[14]),mt=y(mt,gt=D(gt,Le,Je,mt,Rt,22,g[15]),Le,Je,W,5,g[16]),Je=y(Je,mt,gt,Le,fe,9,g[17]),Le=y(Le,Je,mt,gt,ie,14,g[18]),gt=y(gt,Le,Je,mt,ve,20,g[19]),mt=y(mt,gt,Le,Je,Q,5,g[20]),Je=y(Je,mt,gt,Le,J,9,g[21]),Le=y(Le,Je,mt,gt,Rt,14,g[22]),gt=y(gt,Le,Je,mt,Me,20,g[23]),mt=y(mt,gt,Le,Je,Y,5,g[24]),Je=y(Je,mt,gt,Le,Tt,9,g[25]),Le=y(Le,Je,mt,gt,V,14,g[26]),gt=y(gt,Le,Je,mt,j,20,g[27]),mt=y(mt,gt,Le,Je,nt,5,g[28]),Je=y(Je,mt,gt,Le,z,9,g[29]),Le=y(Le,Je,mt,gt,Ae,14,g[30]),mt=_(mt,gt=y(gt,Le,Je,mt,Be,20,g[31]),Le,Je,Q,4,g[32]),Je=_(Je,mt,gt,Le,j,11,g[33]),Le=_(Le,Je,mt,gt,ie,16,g[34]),gt=_(gt,Le,Je,mt,Tt,23,g[35]),mt=_(mt,gt,Le,Je,W,4,g[36]),Je=_(Je,mt,gt,Le,Me,11,g[37]),Le=_(Le,Je,mt,gt,Ae,16,g[38]),gt=_(gt,Le,Je,mt,J,23,g[39]),mt=_(mt,gt,Le,Je,nt,4,g[40]),Je=_(Je,mt,gt,Le,ve,11,g[41]),Le=_(Le,Je,mt,gt,V,16,g[42]),gt=_(gt,Le,Je,mt,fe,23,g[43]),mt=_(mt,gt,Le,Je,Y,4,g[44]),Je=_(Je,mt,gt,Le,Be,11,g[45]),Le=_(Le,Je,mt,gt,Rt,16,g[46]),mt=E(mt,gt=_(gt,Le,Je,mt,z,23,g[47]),Le,Je,ve,6,g[48]),Je=E(Je,mt,gt,Le,Ae,10,g[49]),Le=E(Le,Je,mt,gt,Tt,15,g[50]),gt=E(gt,Le,Je,mt,Q,21,g[51]),mt=E(mt,gt,Le,Je,Be,6,g[52]),Je=E(Je,mt,gt,Le,V,10,g[53]),Le=E(Le,Je,mt,gt,J,15,g[54]),gt=E(gt,Le,Je,mt,W,21,g[55]),mt=E(mt,gt,Le,Je,j,6,g[56]),Je=E(Je,mt,gt,Le,Rt,10,g[57]),Le=E(Le,Je,mt,gt,fe,15,g[58]),gt=E(gt,Le,Je,mt,nt,21,g[59]),mt=E(mt,gt,Le,Je,Me,6,g[60]),Je=E(Je,mt,gt,Le,ie,10,g[61]),Le=E(Le,Je,mt,gt,z,15,g[62]),gt=E(gt,Le,Je,mt,Y,21,g[63]),De[0]=De[0]+mt|0,De[1]=De[1]+gt|0,De[2]=De[2]+Le|0,De[3]=De[3]+Je|0},_doFinalize:function(){var O=this._data,ee=O.words,ue=8*this._nDataBytes,Z=8*O.sigBytes;ee[Z>>>5]|=128<<24-Z%32;var ne=r.floor(ue/4294967296),De=ue;ee[15+(Z+64>>>9<<4)]=16711935&(ne<<8|ne>>>24)|4278255360&(ne<<24|ne>>>8),ee[14+(Z+64>>>9<<4)]=16711935&(De<<8|De>>>24)|4278255360&(De<<24|De>>>8),O.sigBytes=4*(ee.length+1),this._process();for(var ve=this._hash,W=ve.words,z=0;z<4;z++){var V=W[z];W[z]=16711935&(V<<8|V>>>24)|4278255360&(V<<24|V>>>8)}return ve},clone:function(){var O=I.clone.call(this);return O._hash=this._hash.clone(),O}});function D(O,ee,ue,Z,ne,De,ve){var W=O+(ee&ue|~ee&Z)+ne+ve;return(W<>>32-De)+ee}function y(O,ee,ue,Z,ne,De,ve){var W=O+(ee&Z|ue&~Z)+ne+ve;return(W<>>32-De)+ee}function _(O,ee,ue,Z,ne,De,ve){var W=O+(ee^ue^Z)+ne+ve;return(W<>>32-De)+ee}function E(O,ee,ue,Z,ne,De,ve){var W=O+(ue^(ee|~Z))+ne+ve;return(W<>>32-De)+ee}l.MD5=I._createHelper(C),l.HmacMD5=I._createHmacHelper(C)}(Math),n.MD5)},4424:function(it,U,a){var n;it.exports=(n=a(7585),a(3057),n.mode.CFB=function(){var r=n.lib.BlockCipherMode.extend();function l(u,o,I,M){var g,C=this._iv;C?(g=C.slice(0),this._iv=void 0):g=this._prevBlock,M.encryptBlock(g,0);for(var D=0;D>24&255)){var M=I>>16&255,g=I>>8&255,C=255&I;255===M?(M=0,255===g?(g=0,255===C?C=0:++C):++g):++M,I=0,I+=M<<16,I+=g<<8,I+=C}else I+=1<<24;return I}var o=r.Encryptor=r.extend({processBlock:function(I,M){var g=this._cipher,C=g.blockSize,D=this._iv,y=this._counter;D&&(y=this._counter=D.slice(0),this._iv=void 0),function u(I){return 0===(I[0]=l(I[0]))&&(I[1]=l(I[1])),I}(y);var _=y.slice(0);g.encryptBlock(_,0);for(var E=0;E>>2]|=I<<24-M%4*8,r.sigBytes+=I},unpad:function(r){r.sigBytes-=255&r.words[r.sigBytes-1>>>2]}},n.pad.Ansix923)},4630:function(it,U,a){var n;it.exports=(n=a(7585),a(3057),n.pad.Iso10126={pad:function(r,l){var u=4*l,o=u-r.sigBytes%u;r.concat(n.lib.WordArray.random(o-1)).concat(n.lib.WordArray.create([o<<24],1))},unpad:function(r){r.sigBytes-=255&r.words[r.sigBytes-1>>>2]}},n.pad.Iso10126)},187:function(it,U,a){var n;it.exports=(n=a(7585),a(3057),n.pad.Iso97971={pad:function(r,l){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,l)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971)},3237:function(it,U,a){var n;it.exports=(n=a(7585),a(3057),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)},1691:function(it,U,a){var n;it.exports=(n=a(7585),a(3057),n.pad.ZeroPadding={pad:function(r,l){var u=4*l;r.clamp(),r.sigBytes+=u-(r.sigBytes%u||u)},unpad:function(r){var l=r.words,u=r.sigBytes-1;for(u=r.sigBytes-1;u>=0;u--)if(l[u>>>2]>>>24-u%4*8&255){r.sigBytes=u+1;break}}},n.pad.ZeroPadding)},8812:function(it,U,a){var r,l,u,o,I,g,C,n;it.exports=(n=a(7585),a(5162),a(3764),o=(l=(r=n).lib).WordArray,g=(I=r.algo).HMAC,C=I.PBKDF2=(u=l.Base).extend({cfg:u.extend({keySize:4,hasher:I.SHA1,iterations:1}),init:function(D){this.cfg=this.cfg.extend(D)},compute:function(D,y){for(var _=this.cfg,E=g.create(_.hasher,D),O=o.create(),ee=o.create([1]),ue=O.words,Z=ee.words,ne=_.keySize,De=_.iterations;ue.length>>16,y[1],y[0]<<16|y[3]>>>16,y[2],y[1]<<16|y[0]>>>16,y[3],y[2]<<16|y[1]>>>16],O=this._C=[y[2]<<16|y[2]>>>16,4294901760&y[0]|65535&y[1],y[3]<<16|y[3]>>>16,4294901760&y[1]|65535&y[2],y[0]<<16|y[0]>>>16,4294901760&y[2]|65535&y[3],y[1]<<16|y[1]>>>16,4294901760&y[3]|65535&y[0]];this._b=0;for(var ee=0;ee<4;ee++)D.call(this);for(ee=0;ee<8;ee++)O[ee]^=E[ee+4&7];if(_){var ue=_.words,Z=ue[0],ne=ue[1],De=16711935&(Z<<8|Z>>>24)|4278255360&(Z<<24|Z>>>8),ve=16711935&(ne<<8|ne>>>24)|4278255360&(ne<<24|ne>>>8),W=De>>>16|4294901760&ve,z=ve<<16|65535&De;for(O[0]^=De,O[1]^=W,O[2]^=ve,O[3]^=z,O[4]^=De,O[5]^=W,O[6]^=ve,O[7]^=z,ee=0;ee<4;ee++)D.call(this)}},_doProcessBlock:function(y,_){var E=this._X;D.call(this),I[0]=E[0]^E[5]>>>16^E[3]<<16,I[1]=E[2]^E[7]>>>16^E[5]<<16,I[2]=E[4]^E[1]>>>16^E[7]<<16,I[3]=E[6]^E[3]>>>16^E[1]<<16;for(var O=0;O<4;O++)I[O]=16711935&(I[O]<<8|I[O]>>>24)|4278255360&(I[O]<<24|I[O]>>>8),y[_+O]^=I[O]},blockSize:4,ivSize:2});function D(){for(var y=this._X,_=this._C,E=0;E<8;E++)M[E]=_[E];for(_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0>>0?1:0)|0,this._b=_[7]>>>0>>0?1:0,E=0;E<8;E++){var O=y[E]+_[E],ee=65535&O,ue=O>>>16;g[E]=((ee*ee>>>17)+ee*ue>>>15)+ue*ue^((4294901760&O)*O|0)+((65535&O)*O|0)}y[0]=g[0]+(g[7]<<16|g[7]>>>16)+(g[6]<<16|g[6]>>>16)|0,y[1]=g[1]+(g[0]<<8|g[0]>>>24)+g[7]|0,y[2]=g[2]+(g[1]<<16|g[1]>>>16)+(g[0]<<16|g[0]>>>16)|0,y[3]=g[3]+(g[2]<<8|g[2]>>>24)+g[1]|0,y[4]=g[4]+(g[3]<<16|g[3]>>>16)+(g[2]<<16|g[2]>>>16)|0,y[5]=g[5]+(g[4]<<8|g[4]>>>24)+g[3]|0,y[6]=g[6]+(g[5]<<16|g[5]>>>16)+(g[4]<<16|g[4]>>>16)|0,y[7]=g[7]+(g[6]<<8|g[6]>>>24)+g[5]|0}r.RabbitLegacy=u._createHelper(C)}(),n.RabbitLegacy)},8182:function(it,U,a){var n;it.exports=(n=a(7585),a(8319),a(9493),a(7865),a(3057),function(){var r=n,u=r.lib.StreamCipher,I=[],M=[],g=[],C=r.algo.Rabbit=u.extend({_doReset:function(){for(var y=this._key.words,_=this.cfg.iv,E=0;E<4;E++)y[E]=16711935&(y[E]<<8|y[E]>>>24)|4278255360&(y[E]<<24|y[E]>>>8);var O=this._X=[y[0],y[3]<<16|y[2]>>>16,y[1],y[0]<<16|y[3]>>>16,y[2],y[1]<<16|y[0]>>>16,y[3],y[2]<<16|y[1]>>>16],ee=this._C=[y[2]<<16|y[2]>>>16,4294901760&y[0]|65535&y[1],y[3]<<16|y[3]>>>16,4294901760&y[1]|65535&y[2],y[0]<<16|y[0]>>>16,4294901760&y[2]|65535&y[3],y[1]<<16|y[1]>>>16,4294901760&y[3]|65535&y[0]];for(this._b=0,E=0;E<4;E++)D.call(this);for(E=0;E<8;E++)ee[E]^=O[E+4&7];if(_){var ue=_.words,Z=ue[0],ne=ue[1],De=16711935&(Z<<8|Z>>>24)|4278255360&(Z<<24|Z>>>8),ve=16711935&(ne<<8|ne>>>24)|4278255360&(ne<<24|ne>>>8),W=De>>>16|4294901760&ve,z=ve<<16|65535&De;for(ee[0]^=De,ee[1]^=W,ee[2]^=ve,ee[3]^=z,ee[4]^=De,ee[5]^=W,ee[6]^=ve,ee[7]^=z,E=0;E<4;E++)D.call(this)}},_doProcessBlock:function(y,_){var E=this._X;D.call(this),I[0]=E[0]^E[5]>>>16^E[3]<<16,I[1]=E[2]^E[7]>>>16^E[5]<<16,I[2]=E[4]^E[1]>>>16^E[7]<<16,I[3]=E[6]^E[3]>>>16^E[1]<<16;for(var O=0;O<4;O++)I[O]=16711935&(I[O]<<8|I[O]>>>24)|4278255360&(I[O]<<24|I[O]>>>8),y[_+O]^=I[O]},blockSize:4,ivSize:2});function D(){for(var y=this._X,_=this._C,E=0;E<8;E++)M[E]=_[E];for(_[0]=_[0]+1295307597+this._b|0,_[1]=_[1]+3545052371+(_[0]>>>0>>0?1:0)|0,_[2]=_[2]+886263092+(_[1]>>>0>>0?1:0)|0,_[3]=_[3]+1295307597+(_[2]>>>0>>0?1:0)|0,_[4]=_[4]+3545052371+(_[3]>>>0>>0?1:0)|0,_[5]=_[5]+886263092+(_[4]>>>0>>0?1:0)|0,_[6]=_[6]+1295307597+(_[5]>>>0>>0?1:0)|0,_[7]=_[7]+3545052371+(_[6]>>>0>>0?1:0)|0,this._b=_[7]>>>0>>0?1:0,E=0;E<8;E++){var O=y[E]+_[E],ee=65535&O,ue=O>>>16;g[E]=((ee*ee>>>17)+ee*ue>>>15)+ue*ue^((4294901760&O)*O|0)+((65535&O)*O|0)}y[0]=g[0]+(g[7]<<16|g[7]>>>16)+(g[6]<<16|g[6]>>>16)|0,y[1]=g[1]+(g[0]<<8|g[0]>>>24)+g[7]|0,y[2]=g[2]+(g[1]<<16|g[1]>>>16)+(g[0]<<16|g[0]>>>16)|0,y[3]=g[3]+(g[2]<<8|g[2]>>>24)+g[1]|0,y[4]=g[4]+(g[3]<<16|g[3]>>>16)+(g[2]<<16|g[2]>>>16)|0,y[5]=g[5]+(g[4]<<8|g[4]>>>24)+g[3]|0,y[6]=g[6]+(g[5]<<16|g[5]>>>16)+(g[4]<<16|g[4]>>>16)|0,y[7]=g[7]+(g[6]<<8|g[6]>>>24)+g[5]|0}r.Rabbit=u._createHelper(C)}(),n.Rabbit)},486:function(it,U,a){var n;it.exports=(n=a(7585),a(8319),a(9493),a(7865),a(3057),function(){var r=n,u=r.lib.StreamCipher,o=r.algo,I=o.RC4=u.extend({_doReset:function(){for(var C=this._key,D=C.words,y=C.sigBytes,_=this._S=[],E=0;E<256;E++)_[E]=E;E=0;for(var O=0;E<256;E++){var ee=E%y,Z=_[E];_[E]=_[O=(O+_[E]+(D[ee>>>2]>>>24-ee%4*8&255))%256],_[O]=Z}this._i=this._j=0},_doProcessBlock:function(C,D){C[D]^=M.call(this)},keySize:8,ivSize:0});function M(){for(var C=this._S,D=this._i,y=this._j,_=0,E=0;E<4;E++){var O=C[D=(D+1)%256];C[D]=C[y=(y+C[D])%256],C[y]=O,_|=C[(C[D]+C[y])%256]<<24-8*E}return this._i=D,this._j=y,_}r.RC4=u._createHelper(I);var g=o.RC4Drop=I.extend({cfg:I.cfg.extend({drop:192}),_doReset:function(){I._doReset.call(this);for(var C=this.cfg.drop;C>0;C--)M.call(this)}});r.RC4Drop=u._createHelper(g)}(),n.RC4)},4973:function(it,U,a){var n;it.exports=(n=a(7585),function(r){var l=n,u=l.lib,o=u.WordArray,I=u.Hasher,M=l.algo,g=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),C=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),D=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),y=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),_=o.create([0,1518500249,1859775393,2400959708,2840853838]),E=o.create([1352829926,1548603684,1836072691,2053994217,0]),O=M.RIPEMD160=I.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(W,z){for(var V=0;V<16;V++){var Me=z+V,Q=W[Me];W[Me]=16711935&(Q<<8|Q>>>24)|4278255360&(Q<<24|Q>>>8)}var nt,Tt,Rt,mt,gt,Le,Je,H,Ee,Ce,q,fe=this._hash.words,Ae=_.words,j=E.words,Y=g.words,J=C.words,ie=D.words,Be=y.words;for(Le=nt=fe[0],Je=Tt=fe[1],H=Rt=fe[2],Ee=mt=fe[3],Ce=gt=fe[4],V=0;V<80;V+=1)q=nt+W[z+Y[V]]|0,q+=V<16?ee(Tt,Rt,mt)+Ae[0]:V<32?ue(Tt,Rt,mt)+Ae[1]:V<48?Z(Tt,Rt,mt)+Ae[2]:V<64?ne(Tt,Rt,mt)+Ae[3]:De(Tt,Rt,mt)+Ae[4],q=(q=ve(q|=0,ie[V]))+gt|0,nt=gt,gt=mt,mt=ve(Rt,10),Rt=Tt,Tt=q,q=Le+W[z+J[V]]|0,q+=V<16?De(Je,H,Ee)+j[0]:V<32?ne(Je,H,Ee)+j[1]:V<48?Z(Je,H,Ee)+j[2]:V<64?ue(Je,H,Ee)+j[3]:ee(Je,H,Ee)+j[4],q=(q=ve(q|=0,Be[V]))+Ce|0,Le=Ce,Ce=Ee,Ee=ve(H,10),H=Je,Je=q;q=fe[1]+Rt+Ee|0,fe[1]=fe[2]+mt+Ce|0,fe[2]=fe[3]+gt+Le|0,fe[3]=fe[4]+nt+Je|0,fe[4]=fe[0]+Tt+H|0,fe[0]=q},_doFinalize:function(){var W=this._data,z=W.words,V=8*this._nDataBytes,Me=8*W.sigBytes;z[Me>>>5]|=128<<24-Me%32,z[14+(Me+64>>>9<<4)]=16711935&(V<<8|V>>>24)|4278255360&(V<<24|V>>>8),W.sigBytes=4*(z.length+1),this._process();for(var Q=this._hash,fe=Q.words,Ae=0;Ae<5;Ae++){var j=fe[Ae];fe[Ae]=16711935&(j<<8|j>>>24)|4278255360&(j<<24|j>>>8)}return Q},clone:function(){var W=I.clone.call(this);return W._hash=this._hash.clone(),W}});function ee(W,z,V){return W^z^V}function ue(W,z,V){return W&z|~W&V}function Z(W,z,V){return(W|~z)^V}function ne(W,z,V){return W&V|z&~V}function De(W,z,V){return W^(z|~V)}function ve(W,z){return W<>>32-z}l.RIPEMD160=I._createHelper(O),l.HmacRIPEMD160=I._createHmacHelper(O)}(Math),n.RIPEMD160)},5162:function(it,U,a){var r,l,u,o,M,g,n;it.exports=(n=a(7585),u=(l=(r=n).lib).WordArray,M=[],g=r.algo.SHA1=(o=l.Hasher).extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(C,D){for(var y=this._hash.words,_=y[0],E=y[1],O=y[2],ee=y[3],ue=y[4],Z=0;Z<80;Z++){if(Z<16)M[Z]=0|C[D+Z];else{var ne=M[Z-3]^M[Z-8]^M[Z-14]^M[Z-16];M[Z]=ne<<1|ne>>>31}var De=(_<<5|_>>>27)+ue+M[Z];De+=Z<20?1518500249+(E&O|~E&ee):Z<40?1859775393+(E^O^ee):Z<60?(E&O|E&ee|O&ee)-1894007588:(E^O^ee)-899497514,ue=ee,ee=O,O=E<<30|E>>>2,E=_,_=De}y[0]=y[0]+_|0,y[1]=y[1]+E|0,y[2]=y[2]+O|0,y[3]=y[3]+ee|0,y[4]=y[4]+ue|0},_doFinalize:function(){var C=this._data,D=C.words,y=8*this._nDataBytes,_=8*C.sigBytes;return D[_>>>5]|=128<<24-_%32,D[14+(_+64>>>9<<4)]=Math.floor(y/4294967296),D[15+(_+64>>>9<<4)]=y,C.sigBytes=4*D.length,this._process(),this._hash},clone:function(){var C=o.clone.call(this);return C._hash=this._hash.clone(),C}}),r.SHA1=o._createHelper(g),r.HmacSHA1=o._createHmacHelper(g),n.SHA1)},8769:function(it,U,a){var r,u,o,I,M,n;it.exports=(n=a(7585),a(1817),u=(r=n).lib.WordArray,M=(o=r.algo).SHA224=(I=o.SHA256).extend({_doReset:function(){this._hash=new u.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var g=I._doFinalize.call(this);return g.sigBytes-=4,g}}),r.SHA224=I._createHelper(M),r.HmacSHA224=I._createHmacHelper(M),n.SHA224)},1817:function(it,U,a){var n;it.exports=(n=a(7585),function(r){var l=n,u=l.lib,o=u.WordArray,I=u.Hasher,M=l.algo,g=[],C=[];!function(){function _(ue){for(var Z=r.sqrt(ue),ne=2;ne<=Z;ne++)if(!(ue%ne))return!1;return!0}function E(ue){return 4294967296*(ue-(0|ue))|0}for(var O=2,ee=0;ee<64;)_(O)&&(ee<8&&(g[ee]=E(r.pow(O,.5))),C[ee]=E(r.pow(O,1/3)),ee++),O++}();var D=[],y=M.SHA256=I.extend({_doReset:function(){this._hash=new o.init(g.slice(0))},_doProcessBlock:function(_,E){for(var O=this._hash.words,ee=O[0],ue=O[1],Z=O[2],ne=O[3],De=O[4],ve=O[5],W=O[6],z=O[7],V=0;V<64;V++){if(V<16)D[V]=0|_[E+V];else{var Me=D[V-15],fe=D[V-2];D[V]=((Me<<25|Me>>>7)^(Me<<14|Me>>>18)^Me>>>3)+D[V-7]+((fe<<15|fe>>>17)^(fe<<13|fe>>>19)^fe>>>10)+D[V-16]}var Y=ee&ue^ee&Z^ue&Z,Be=z+((De<<26|De>>>6)^(De<<21|De>>>11)^(De<<7|De>>>25))+(De&ve^~De&W)+C[V]+D[V];z=W,W=ve,ve=De,De=ne+Be|0,ne=Z,Z=ue,ue=ee,ee=Be+(((ee<<30|ee>>>2)^(ee<<19|ee>>>13)^(ee<<10|ee>>>22))+Y)|0}O[0]=O[0]+ee|0,O[1]=O[1]+ue|0,O[2]=O[2]+Z|0,O[3]=O[3]+ne|0,O[4]=O[4]+De|0,O[5]=O[5]+ve|0,O[6]=O[6]+W|0,O[7]=O[7]+z|0},_doFinalize:function(){var _=this._data,E=_.words,O=8*this._nDataBytes,ee=8*_.sigBytes;return E[ee>>>5]|=128<<24-ee%32,E[14+(ee+64>>>9<<4)]=r.floor(O/4294967296),E[15+(ee+64>>>9<<4)]=O,_.sigBytes=4*E.length,this._process(),this._hash},clone:function(){var _=I.clone.call(this);return _._hash=this._hash.clone(),_}});l.SHA256=I._createHelper(y),l.HmacSHA256=I._createHmacHelper(y)}(Math),n.SHA256)},1971:function(it,U,a){var n;it.exports=(n=a(7585),a(401),function(r){var l=n,u=l.lib,o=u.WordArray,I=u.Hasher,g=l.x64.Word,C=l.algo,D=[],y=[],_=[];!function(){for(var ee=1,ue=0,Z=0;Z<24;Z++){D[ee+5*ue]=(Z+1)*(Z+2)/2%64;var De=(2*ee+3*ue)%5;ee=ue%5,ue=De}for(ee=0;ee<5;ee++)for(ue=0;ue<5;ue++)y[ee+5*ue]=ue+(2*ee+3*ue)%5*5;for(var ve=1,W=0;W<24;W++){for(var z=0,V=0,Me=0;Me<7;Me++){if(1&ve){var Q=(1<>>24)|4278255360&(ve<<24|ve>>>8),(z=Z[De]).high^=W=16711935&(W<<8|W>>>24)|4278255360&(W<<24|W>>>8),z.low^=ve}for(var V=0;V<24;V++){for(var Me=0;Me<5;Me++){for(var Q=0,fe=0,Ae=0;Ae<5;Ae++)Q^=(z=Z[Me+5*Ae]).high,fe^=z.low;var j=E[Me];j.high=Q,j.low=fe}for(Me=0;Me<5;Me++){var Y=E[(Me+4)%5],J=E[(Me+1)%5],ie=J.high,Be=J.low;for(Q=Y.high^(ie<<1|Be>>>31),fe=Y.low^(Be<<1|ie>>>31),Ae=0;Ae<5;Ae++)(z=Z[Me+5*Ae]).high^=Q,z.low^=fe}for(var nt=1;nt<25;nt++){var Tt=(z=Z[nt]).high,Rt=z.low,mt=D[nt];mt<32?(Q=Tt<>>32-mt,fe=Rt<>>32-mt):(Q=Rt<>>64-mt,fe=Tt<>>64-mt);var gt=E[y[nt]];gt.high=Q,gt.low=fe}var Le=E[0],Je=Z[0];for(Le.high=Je.high,Le.low=Je.low,Me=0;Me<5;Me++)for(Ae=0;Ae<5;Ae++){var H=E[nt=Me+5*Ae],Ee=E[(Me+1)%5+5*Ae],Ce=E[(Me+2)%5+5*Ae];(z=Z[nt]).high=H.high^~Ee.high&Ce.high,z.low=H.low^~Ee.low&Ce.low}var z,q=_[V];(z=Z[0]).high^=q.high,z.low^=q.low}},_doFinalize:function(){var ee=this._data,ue=ee.words,ne=8*ee.sigBytes,De=32*this.blockSize;ue[ne>>>5]|=1<<24-ne%32,ue[(r.ceil((ne+1)/De)*De>>>5)-1]|=128,ee.sigBytes=4*ue.length,this._process();for(var ve=this._state,W=this.cfg.outputLength/8,z=W/8,V=[],Me=0;Me>>24)|4278255360&(fe<<24|fe>>>8),V.push(Ae=16711935&(Ae<<8|Ae>>>24)|4278255360&(Ae<<24|Ae>>>8)),V.push(fe)}return new o.init(V,W)},clone:function(){for(var ee=I.clone.call(this),ue=ee._state=this._state.slice(0),Z=0;Z<25;Z++)ue[Z]=ue[Z].clone();return ee}});l.SHA3=I._createHelper(O),l.HmacSHA3=I._createHmacHelper(O)}(Math),n.SHA3)},6787:function(it,U,a){var r,l,u,o,I,M,g,n;it.exports=(n=a(7585),a(401),a(3351),u=(l=(r=n).x64).Word,o=l.WordArray,g=(I=r.algo).SHA384=(M=I.SHA512).extend({_doReset:function(){this._hash=new o.init([new u.init(3418070365,3238371032),new u.init(1654270250,914150663),new u.init(2438529370,812702999),new u.init(355462360,4144912697),new u.init(1731405415,4290775857),new u.init(2394180231,1750603025),new u.init(3675008525,1694076839),new u.init(1203062813,3204075428)])},_doFinalize:function(){var C=M._doFinalize.call(this);return C.sigBytes-=16,C}}),r.SHA384=M._createHelper(g),r.HmacSHA384=M._createHmacHelper(g),n.SHA384)},3351:function(it,U,a){var n;it.exports=(n=a(7585),a(401),function(){var r=n,u=r.lib.Hasher,o=r.x64,I=o.Word,M=o.WordArray,g=r.algo;function C(){return I.create.apply(I,arguments)}var D=[C(1116352408,3609767458),C(1899447441,602891725),C(3049323471,3964484399),C(3921009573,2173295548),C(961987163,4081628472),C(1508970993,3053834265),C(2453635748,2937671579),C(2870763221,3664609560),C(3624381080,2734883394),C(310598401,1164996542),C(607225278,1323610764),C(1426881987,3590304994),C(1925078388,4068182383),C(2162078206,991336113),C(2614888103,633803317),C(3248222580,3479774868),C(3835390401,2666613458),C(4022224774,944711139),C(264347078,2341262773),C(604807628,2007800933),C(770255983,1495990901),C(1249150122,1856431235),C(1555081692,3175218132),C(1996064986,2198950837),C(2554220882,3999719339),C(2821834349,766784016),C(2952996808,2566594879),C(3210313671,3203337956),C(3336571891,1034457026),C(3584528711,2466948901),C(113926993,3758326383),C(338241895,168717936),C(666307205,1188179964),C(773529912,1546045734),C(1294757372,1522805485),C(1396182291,2643833823),C(1695183700,2343527390),C(1986661051,1014477480),C(2177026350,1206759142),C(2456956037,344077627),C(2730485921,1290863460),C(2820302411,3158454273),C(3259730800,3505952657),C(3345764771,106217008),C(3516065817,3606008344),C(3600352804,1432725776),C(4094571909,1467031594),C(275423344,851169720),C(430227734,3100823752),C(506948616,1363258195),C(659060556,3750685593),C(883997877,3785050280),C(958139571,3318307427),C(1322822218,3812723403),C(1537002063,2003034995),C(1747873779,3602036899),C(1955562222,1575990012),C(2024104815,1125592928),C(2227730452,2716904306),C(2361852424,442776044),C(2428436474,593698344),C(2756734187,3733110249),C(3204031479,2999351573),C(3329325298,3815920427),C(3391569614,3928383900),C(3515267271,566280711),C(3940187606,3454069534),C(4118630271,4000239992),C(116418474,1914138554),C(174292421,2731055270),C(289380356,3203993006),C(460393269,320620315),C(685471733,587496836),C(852142971,1086792851),C(1017036298,365543100),C(1126000580,2618297676),C(1288033470,3409855158),C(1501505948,4234509866),C(1607167915,987167468),C(1816402316,1246189591)],y=[];!function(){for(var E=0;E<80;E++)y[E]=C()}();var _=g.SHA512=u.extend({_doReset:function(){this._hash=new M.init([new I.init(1779033703,4089235720),new I.init(3144134277,2227873595),new I.init(1013904242,4271175723),new I.init(2773480762,1595750129),new I.init(1359893119,2917565137),new I.init(2600822924,725511199),new I.init(528734635,4215389547),new I.init(1541459225,327033209)])},_doProcessBlock:function(E,O){for(var ee=this._hash.words,ue=ee[0],Z=ee[1],ne=ee[2],De=ee[3],ve=ee[4],W=ee[5],z=ee[6],V=ee[7],Me=ue.high,Q=ue.low,fe=Z.high,Ae=Z.low,j=ne.high,Y=ne.low,J=De.high,ie=De.low,Be=ve.high,nt=ve.low,Tt=W.high,Rt=W.low,mt=z.high,gt=z.low,Le=V.high,Je=V.low,H=Me,Ee=Q,Ce=fe,q=Ae,He=j,ae=Y,Ze=J,Re=ie,de=Be,te=nt,ze=Tt,Ct=Rt,Ft=mt,jt=gt,gn=Le,kt=Je,Ye=0;Ye<80;Ye++){var k,N,P=y[Ye];if(Ye<16)N=P.high=0|E[O+2*Ye],k=P.low=0|E[O+2*Ye+1];else{var F=y[Ye-15],be=F.high,qe=F.low,At=(qe>>>1|be<<31)^(qe>>>8|be<<24)^(qe>>>7|be<<25),Bt=y[Ye-2],qt=Bt.high,Zt=Bt.low,bn=(Zt>>>19|qt<<13)^(Zt<<3|qt>>>29)^(Zt>>>6|qt<<26),En=y[Ye-7],Wt=y[Ye-16],pt=Wt.low;P.high=N=(N=(N=((be>>>1|qe<<31)^(be>>>8|qe<<24)^be>>>7)+En.high+((k=At+En.low)>>>0>>0?1:0))+((qt>>>19|Zt<<13)^(qt<<3|Zt>>>29)^qt>>>6)+((k+=bn)>>>0>>0?1:0))+Wt.high+((k+=pt)>>>0>>0?1:0),P.low=k}var ct,we=de&ze^~de&Ft,le=te&Ct^~te&jt,K=H&Ce^H&He^Ce&He,ye=(Ee>>>28|H<<4)^(Ee<<30|H>>>2)^(Ee<<25|H>>>7),bt=D[Ye],cn=bt.low,ut=gn+((de>>>14|te<<18)^(de>>>18|te<<14)^(de<<23|te>>>9))+((ct=kt+((te>>>14|de<<18)^(te>>>18|de<<14)^(te<<23|de>>>9)))>>>0>>0?1:0),tt=ye+(Ee&q^Ee&ae^q&ae);gn=Ft,kt=jt,Ft=ze,jt=Ct,ze=de,Ct=te,de=Ze+(ut=(ut=(ut=ut+we+((ct+=le)>>>0>>0?1:0))+bt.high+((ct+=cn)>>>0>>0?1:0))+N+((ct+=k)>>>0>>0?1:0))+((te=Re+ct|0)>>>0>>0?1:0)|0,Ze=He,Re=ae,He=Ce,ae=q,Ce=H,q=Ee,H=ut+(((H>>>28|Ee<<4)^(H<<30|Ee>>>2)^(H<<25|Ee>>>7))+K+(tt>>>0>>0?1:0))+((Ee=ct+tt|0)>>>0>>0?1:0)|0}Q=ue.low=Q+Ee,ue.high=Me+H+(Q>>>0>>0?1:0),Ae=Z.low=Ae+q,Z.high=fe+Ce+(Ae>>>0>>0?1:0),Y=ne.low=Y+ae,ne.high=j+He+(Y>>>0>>0?1:0),ie=De.low=ie+Re,De.high=J+Ze+(ie>>>0>>0?1:0),nt=ve.low=nt+te,ve.high=Be+de+(nt>>>0>>0?1:0),Rt=W.low=Rt+Ct,W.high=Tt+ze+(Rt>>>0>>0?1:0),gt=z.low=gt+jt,z.high=mt+Ft+(gt>>>0>>0?1:0),Je=V.low=Je+kt,V.high=Le+gn+(Je>>>0>>0?1:0)},_doFinalize:function(){var E=this._data,O=E.words,ee=8*this._nDataBytes,ue=8*E.sigBytes;return O[ue>>>5]|=128<<24-ue%32,O[30+(ue+128>>>10<<5)]=Math.floor(ee/4294967296),O[31+(ue+128>>>10<<5)]=ee,E.sigBytes=4*O.length,this._process(),this._hash.toX32()},clone:function(){var E=u.clone.call(this);return E._hash=this._hash.clone(),E},blockSize:32});r.SHA512=u._createHelper(_),r.HmacSHA512=u._createHmacHelper(_)}(),n.SHA512)},7243:function(it,U,a){var n;it.exports=(n=a(7585),a(8319),a(9493),a(7865),a(3057),function(){var r=n,l=r.lib,u=l.WordArray,o=l.BlockCipher,I=r.algo,M=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],g=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],C=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],D=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],y=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],_=I.DES=o.extend({_doReset:function(){for(var Z=this._key.words,ne=[],De=0;De<56;De++){var ve=M[De]-1;ne[De]=Z[ve>>>5]>>>31-ve%32&1}for(var W=this._subKeys=[],z=0;z<16;z++){var V=W[z]=[],Me=C[z];for(De=0;De<24;De++)V[De/6|0]|=ne[(g[De]-1+Me)%28]<<31-De%6,V[4+(De/6|0)]|=ne[28+(g[De+24]-1+Me)%28]<<31-De%6;for(V[0]=V[0]<<1|V[0]>>>31,De=1;De<7;De++)V[De]=V[De]>>>4*(De-1)+3;V[7]=V[7]<<5|V[7]>>>27}var Q=this._invSubKeys=[];for(De=0;De<16;De++)Q[De]=W[15-De]},encryptBlock:function(ue,Z){this._doCryptBlock(ue,Z,this._subKeys)},decryptBlock:function(ue,Z){this._doCryptBlock(ue,Z,this._invSubKeys)},_doCryptBlock:function(ue,Z,ne){this._lBlock=ue[Z],this._rBlock=ue[Z+1],E.call(this,4,252645135),E.call(this,16,65535),O.call(this,2,858993459),O.call(this,8,16711935),E.call(this,1,1431655765);for(var De=0;De<16;De++){for(var ve=ne[De],W=this._lBlock,z=this._rBlock,V=0,Me=0;Me<8;Me++)V|=D[Me][((z^ve[Me])&y[Me])>>>0];this._lBlock=z,this._rBlock=W^V}var Q=this._lBlock;this._lBlock=this._rBlock,this._rBlock=Q,E.call(this,1,1431655765),O.call(this,8,16711935),O.call(this,2,858993459),E.call(this,16,65535),E.call(this,4,252645135),ue[Z]=this._lBlock,ue[Z+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function E(ue,Z){var ne=(this._lBlock>>>ue^this._rBlock)&Z;this._rBlock^=ne,this._lBlock^=ne<>>ue^this._lBlock)&Z;this._lBlock^=ne,this._rBlock^=ne<192.");var ne=Z.slice(0,2),De=Z.length<4?Z.slice(0,2):Z.slice(2,4),ve=Z.length<6?Z.slice(0,2):Z.slice(4,6);this._des1=_.createEncryptor(u.create(ne)),this._des2=_.createEncryptor(u.create(De)),this._des3=_.createEncryptor(u.create(ve))},encryptBlock:function(ue,Z){this._des1.encryptBlock(ue,Z),this._des2.decryptBlock(ue,Z),this._des3.encryptBlock(ue,Z)},decryptBlock:function(ue,Z){this._des3.decryptBlock(ue,Z),this._des2.encryptBlock(ue,Z),this._des1.decryptBlock(ue,Z)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=o._createHelper(ee)}(),n.TripleDES)},401:function(it,U,a){var u,o,I,M,n;it.exports=(n=a(7585),o=(u=n.lib).Base,I=u.WordArray,(M=n.x64={}).Word=o.extend({init:function(D,y){this.high=D,this.low=y}}),M.WordArray=o.extend({init:function(D,y){D=this.words=D||[],this.sigBytes=null!=y?y:8*D.length},toX32:function(){for(var D=this.words,y=D.length,_=[],E=0;E{it.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},7410:(it,U,a)=>{it.exports=a(3213),it.exports.parser=a(552)},3213:(it,U,a)=>{var n=a(1497),r=a(1264),l=a(2534)("engine.io-client:socket"),u=a(4068),o=a(552),I=a(1884),M=a(3257);function g(D,y){if(!(this instanceof g))return new g(D,y);y=y||{},D&&"object"==typeof D&&(y=D,D=null),D?(D=I(D),y.hostname=D.host,y.secure="https"===D.protocol||"wss"===D.protocol,y.port=D.port,D.query&&(y.query=D.query)):y.host&&(y.hostname=I(y.host).host),this.secure=null!=y.secure?y.secure:"undefined"!=typeof location&&"https:"===location.protocol,y.hostname&&!y.port&&(y.port=this.secure?"443":"80"),this.agent=y.agent||!1,this.hostname=y.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=y.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=y.query||{},"string"==typeof this.query&&(this.query=M.decode(this.query)),this.upgrade=!1!==y.upgrade,this.path=(y.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!y.forceJSONP,this.jsonp=!1!==y.jsonp,this.forceBase64=!!y.forceBase64,this.enablesXDR=!!y.enablesXDR,this.withCredentials=!1!==y.withCredentials,this.timestampParam=y.timestampParam||"t",this.timestampRequests=y.timestampRequests,this.transports=y.transports||["polling","websocket"],this.transportOptions=y.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=y.policyPort||843,this.rememberUpgrade=y.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=y.onlyBinaryUpgrades,this.perMessageDeflate=!1!==y.perMessageDeflate&&(y.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=y.pfx||void 0,this.key=y.key||void 0,this.passphrase=y.passphrase||void 0,this.cert=y.cert||void 0,this.ca=y.ca||void 0,this.ciphers=y.ciphers||void 0,this.rejectUnauthorized=void 0===y.rejectUnauthorized||y.rejectUnauthorized,this.forceNode=!!y.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(y.extraHeaders&&Object.keys(y.extraHeaders).length>0&&(this.extraHeaders=y.extraHeaders),y.localAddress&&(this.localAddress=y.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}it.exports=g,g.priorWebsocketSuccess=!1,r(g.prototype),g.protocol=o.protocol,g.Socket=g,g.Transport=a(3330),g.transports=a(1497),g.parser=a(552),g.prototype.createTransport=function(D){l('creating transport "%s"',D);var y=function C(D){var y={};for(var _ in D)D.hasOwnProperty(_)&&(y[_]=D[_]);return y}(this.query);y.EIO=o.protocol,y.transport=D;var _=this.transportOptions[D]||{};return this.id&&(y.sid=this.id),new n[D]({query:y,socket:this,agent:_.agent||this.agent,hostname:_.hostname||this.hostname,port:_.port||this.port,secure:_.secure||this.secure,path:_.path||this.path,forceJSONP:_.forceJSONP||this.forceJSONP,jsonp:_.jsonp||this.jsonp,forceBase64:_.forceBase64||this.forceBase64,enablesXDR:_.enablesXDR||this.enablesXDR,withCredentials:_.withCredentials||this.withCredentials,timestampRequests:_.timestampRequests||this.timestampRequests,timestampParam:_.timestampParam||this.timestampParam,policyPort:_.policyPort||this.policyPort,pfx:_.pfx||this.pfx,key:_.key||this.key,passphrase:_.passphrase||this.passphrase,cert:_.cert||this.cert,ca:_.ca||this.ca,ciphers:_.ciphers||this.ciphers,rejectUnauthorized:_.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:_.perMessageDeflate||this.perMessageDeflate,extraHeaders:_.extraHeaders||this.extraHeaders,forceNode:_.forceNode||this.forceNode,localAddress:_.localAddress||this.localAddress,requestTimeout:_.requestTimeout||this.requestTimeout,protocols:_.protocols||void 0,isReactNative:this.isReactNative})},g.prototype.open=function(){var D;if(this.rememberUpgrade&&g.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))D="websocket";else{if(0===this.transports.length){var y=this;return void setTimeout(function(){y.emit("error","No transports available")},0)}D=this.transports[0]}this.readyState="opening";try{D=this.createTransport(D)}catch(_){return this.transports.shift(),void this.open()}D.open(),this.setTransport(D)},g.prototype.setTransport=function(D){l("setting transport %s",D.name);var y=this;this.transport&&(l("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=D,D.on("drain",function(){y.onDrain()}).on("packet",function(_){y.onPacket(_)}).on("error",function(_){y.onError(_)}).on("close",function(){y.onClose("transport close")})},g.prototype.probe=function(D){l('probing transport "%s"',D);var y=this.createTransport(D,{probe:1}),_=!1,E=this;function O(){E.onlyBinaryUpgrades&&(_=_||!this.supportsBinary&&E.transport.supportsBinary),_||(l('probe transport "%s" opened',D),y.send([{type:"ping",data:"probe"}]),y.once("packet",function(z){if(!_)if("pong"===z.type&&"probe"===z.data){if(l('probe transport "%s" pong',D),E.upgrading=!0,E.emit("upgrading",y),!y)return;g.priorWebsocketSuccess="websocket"===y.name,l('pausing current transport "%s"',E.transport.name),E.transport.pause(function(){_||"closed"!==E.readyState&&(l("changing transport and sending upgrade packet"),ve(),E.setTransport(y),y.send([{type:"upgrade"}]),E.emit("upgrade",y),y=null,E.upgrading=!1,E.flush())})}else{l('probe transport "%s" failed',D);var V=new Error("probe error");V.transport=y.name,E.emit("upgradeError",V)}}))}function ee(){_||(_=!0,ve(),y.close(),y=null)}function ue(W){var z=new Error("probe error: "+W);z.transport=y.name,ee(),l('probe transport "%s" failed because of error: %s',D,W),E.emit("upgradeError",z)}function Z(){ue("transport closed")}function ne(){ue("socket closed")}function De(W){y&&W.name!==y.name&&(l('"%s" works - aborting "%s"',W.name,y.name),ee())}function ve(){y.removeListener("open",O),y.removeListener("error",ue),y.removeListener("close",Z),E.removeListener("close",ne),E.removeListener("upgrading",De)}g.priorWebsocketSuccess=!1,y.once("open",O),y.once("error",ue),y.once("close",Z),this.once("close",ne),this.once("upgrading",De),y.open()},g.prototype.onOpen=function(){if(l("socket open"),this.readyState="open",g.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){l("starting upgrade probes");for(var D=0,y=this.upgrades.length;D{var n=a(552),r=a(1264);function l(u){this.path=u.path,this.hostname=u.hostname,this.port=u.port,this.secure=u.secure,this.query=u.query,this.timestampParam=u.timestampParam,this.timestampRequests=u.timestampRequests,this.readyState="",this.agent=u.agent||!1,this.socket=u.socket,this.enablesXDR=u.enablesXDR,this.withCredentials=u.withCredentials,this.pfx=u.pfx,this.key=u.key,this.passphrase=u.passphrase,this.cert=u.cert,this.ca=u.ca,this.ciphers=u.ciphers,this.rejectUnauthorized=u.rejectUnauthorized,this.forceNode=u.forceNode,this.isReactNative=u.isReactNative,this.extraHeaders=u.extraHeaders,this.localAddress=u.localAddress}it.exports=l,r(l.prototype),l.prototype.onError=function(u,o){var I=new Error(u);return I.type="TransportError",I.description=o,this.emit("error",I),this},l.prototype.open=function(){return("closed"===this.readyState||""===this.readyState)&&(this.readyState="opening",this.doOpen()),this},l.prototype.close=function(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this},l.prototype.send=function(u){if("open"!==this.readyState)throw new Error("Transport not open");this.write(u)},l.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},l.prototype.onData=function(u){var o=n.decodePacket(u,this.socket.binaryType);this.onPacket(o)},l.prototype.onPacket=function(u){this.emit("packet",u)},l.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},1497:(it,U,a)=>{var n=a(3035),r=a(2889),l=a(6029),u=a(3909);U.polling=function o(I){var g=!1,C=!1,D=!1!==I.jsonp;if("undefined"!=typeof location){var y="https:"===location.protocol,_=location.port;_||(_=y?443:80),g=I.hostname!==location.hostname||_!==I.port,C=I.secure!==y}if(I.xdomain=g,I.xscheme=C,"open"in new n(I)&&!I.forceJSONP)return new r(I);if(!D)throw new Error("JSONP disabled");return new l(I)},U.websocket=u},6029:(it,U,a)=>{var n=a(3904),r=a(9471),l=a(851);it.exports=g;var I,u=/\n/g,o=/\\n/g;function M(){}function g(C){n.call(this,C),this.query=this.query||{},I||(I=l.___eio=l.___eio||[]),this.index=I.length;var D=this;I.push(function(y){D.onData(y)}),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",function(){D.script&&(D.script.onerror=M)},!1)}r(g,n),g.prototype.supportsBinary=!1,g.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),n.prototype.doClose.call(this)},g.prototype.doPoll=function(){var C=this,D=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),D.async=!0,D.src=this.uri(),D.onerror=function(E){C.onError("jsonp poll error",E)};var y=document.getElementsByTagName("script")[0];y?y.parentNode.insertBefore(D,y):(document.head||document.body).appendChild(D),this.script=D,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout(function(){var E=document.createElement("iframe");document.body.appendChild(E),document.body.removeChild(E)},100)},g.prototype.doWrite=function(C,D){var y=this;if(!this.form){var ee,_=document.createElement("form"),E=document.createElement("textarea"),O=this.iframeId="eio_iframe_"+this.index;_.className="socketio",_.style.position="absolute",_.style.top="-1000px",_.style.left="-1000px",_.target=O,_.method="POST",_.setAttribute("accept-charset","utf-8"),E.name="d",_.appendChild(E),document.body.appendChild(_),this.form=_,this.area=E}function ue(){Z(),D()}function Z(){if(y.iframe)try{y.form.removeChild(y.iframe)}catch(De){y.onError("jsonp polling iframe removal error",De)}try{ee=document.createElement('